@elliemae/ds-form 2.0.0-rc.4 → 2.0.0-rc.8
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/v3/ComboBox.js +1 -1
- package/cjs/ComboBox/v3/ComboBoxCTX.js +0 -1
- package/cjs/ComboBox/v3/parts/controls/styled.js +18 -18
- 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 +39 -36
- package/cjs/ComboBox/v3/parts/header-list/styled.js +10 -3
- package/cjs/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +3 -4
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +11 -6
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +6 -5
- package/cjs/ComboBox/v3/parts/menu-list/useMenuList.js +3 -2
- package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +13 -7
- package/cjs/ComboBox/v3/propTypes.js +12 -13
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +11 -11
- package/cjs/MenuItem/components/MenuItem/index.js +1 -1
- package/cjs/MenuItem/components/Section/index.js +1 -1
- package/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js +6 -6
- package/cjs/MenuItem/components/SubmenuItem/index.js +1 -1
- package/cjs/MenuItem/components/styled.js +7 -2
- package/esm/ComboBox/v3/ComboBox.js +1 -1
- package/esm/ComboBox/v3/ComboBoxCTX.js +0 -1
- package/esm/ComboBox/v3/parts/controls/styled.js +18 -19
- 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 +40 -37
- package/esm/ComboBox/v3/parts/header-list/styled.js +10 -5
- package/esm/ComboBox/v3/parts/header-list/useHeaderListHandlers.js +3 -4
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +11 -6
- package/esm/ComboBox/v3/parts/menu-list/styled.js +6 -5
- package/esm/ComboBox/v3/parts/menu-list/useMenuList.js +3 -2
- package/esm/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +13 -7
- package/esm/ComboBox/v3/propTypes.js +12 -13
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +11 -11
- package/esm/MenuItem/components/MenuItem/index.js +1 -1
- package/esm/MenuItem/components/Section/index.js +1 -1
- package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js +6 -6
- package/esm/MenuItem/components/SubmenuItem/index.js +1 -1
- package/esm/MenuItem/components/styled.js +7 -3
- package/package.json +18 -21
- 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 -17
- 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/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 -210
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +5 -3
- package/types/ComboBox/v3/parts/multi-selected-values-container/styled.d.ts +3 -3
- package/types/ComboBox/v3/parts/single-selected-value-container/styled.d.ts +1 -1
- package/types/ComboBox/v3/propTypes.d.ts +49 -16
- 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/MenuItem/components/SingleMenuItem/styled.js +0 -19
- package/esm/MenuItem/components/SingleMenuItem/styled.js +0 -10
- package/types/MenuItem/components/SingleMenuItem/styled.d.ts +0 -2
|
@@ -19,7 +19,7 @@ var _Container;
|
|
|
19
19
|
|
|
20
20
|
const DSComboBox = props => {
|
|
21
21
|
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props, ComboBoxCTX.defaultProps);
|
|
22
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault,
|
|
22
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, propTypes.propTypes);
|
|
23
23
|
const ctx = useComboBox.useComboBox(props);
|
|
24
24
|
return /*#__PURE__*/_jsx__default["default"](ComboBoxCTX.ComboBoxContext.Provider, {
|
|
25
25
|
value: ctx
|
|
@@ -2,38 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
5
6
|
var styled = require('styled-components');
|
|
7
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
6
8
|
var Grid = require('@elliemae/ds-grid');
|
|
7
9
|
|
|
8
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
11
|
|
|
12
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
10
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} = _ref;
|
|
17
|
-
|
|
18
|
-
if (hasError) {
|
|
19
|
-
return theme.colors.danger[900];
|
|
15
|
+
var _templateObject, _templateObject2;
|
|
16
|
+
const normalBorder = dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n border: 1px solid\n ", ";\n"])), props => {
|
|
17
|
+
if (props.hasError) {
|
|
18
|
+
return props.theme.colors.danger[900];
|
|
20
19
|
}
|
|
21
20
|
|
|
21
|
+
return props.theme.colors.neutral[400];
|
|
22
|
+
});
|
|
23
|
+
const focusBorder = dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n border: 2px solid ", ";\n"])), _ref => {
|
|
24
|
+
let {
|
|
25
|
+
theme
|
|
26
|
+
} = _ref;
|
|
22
27
|
return theme.colors.brand[700];
|
|
23
28
|
});
|
|
24
29
|
const StyledControlsWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
25
30
|
componentId: "sc-64uci7-0"
|
|
26
|
-
})(["background:transparent;position:relative;border
|
|
27
|
-
if (props.hasError) {
|
|
28
|
-
return props.theme.colors.danger[900];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return props.theme.colors.neutral[400];
|
|
32
|
-
}, _ref2 => {
|
|
31
|
+
})(["background:transparent;position:relative;border-radius:2px;min-width:", ";align-items:center;align-content:center;height:28px;padding-left:8px;margin:", ";&::after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2px;", " pointer-events:none;z-index:7;}"], _ref2 => {
|
|
33
32
|
let {
|
|
34
|
-
minWidth
|
|
33
|
+
minWidth,
|
|
34
|
+
inline
|
|
35
35
|
} = _ref2;
|
|
36
|
-
return minWidth;
|
|
36
|
+
return inline ? '' : "".concat(minWidth, "px");
|
|
37
37
|
}, _ref3 => {
|
|
38
38
|
let {
|
|
39
39
|
inline
|
|
@@ -43,7 +43,7 @@ const StyledControlsWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid)
|
|
|
43
43
|
let {
|
|
44
44
|
hasFocus
|
|
45
45
|
} = _ref4;
|
|
46
|
-
return hasFocus
|
|
46
|
+
return hasFocus ? focusBorder : normalBorder;
|
|
47
47
|
});
|
|
48
48
|
const StyledSelection = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
49
49
|
componentId: "sc-64uci7-1"
|
|
@@ -25,9 +25,6 @@ const DropdownIndicator = () => {
|
|
|
25
25
|
"aria-expanded": showPopover,
|
|
26
26
|
"aria-haspopup": "listbox",
|
|
27
27
|
buttonType: "text",
|
|
28
|
-
style: {
|
|
29
|
-
height: '100%'
|
|
30
|
-
},
|
|
31
28
|
icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx__default["default"](ChevronSmallDown__default["default"], {})),
|
|
32
29
|
tabIndex: -1
|
|
33
30
|
});
|
|
@@ -12,6 +12,6 @@ var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
|
12
12
|
|
|
13
13
|
const StyledDropDownButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
14
14
|
componentId: "sc-1ijoe1w-0"
|
|
15
|
-
})(["
|
|
15
|
+
})(["box-sizing:border-box;width:100;& svg{fill:", ";}"], props => props.theme.colors.brand['700']);
|
|
16
16
|
|
|
17
17
|
exports.StyledDropDownButton = StyledDropDownButton;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var dsControlledForm = require('@elliemae/ds-controlled-form');
|
|
8
7
|
var lodash = require('lodash');
|
|
9
8
|
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
10
9
|
var styled = require('./styled.js');
|
|
@@ -17,9 +16,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
16
|
|
|
18
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
18
|
|
|
20
|
-
var
|
|
19
|
+
var _StyledSeparator, _StyledNoOptionsSelec, _StyledSeparator2;
|
|
21
20
|
|
|
22
21
|
const HeaderList = () => {
|
|
22
|
+
var _inputRef$current;
|
|
23
|
+
|
|
23
24
|
const {
|
|
24
25
|
props: {
|
|
25
26
|
onSelectAll,
|
|
@@ -28,7 +29,8 @@ const HeaderList = () => {
|
|
|
28
29
|
selectedValues,
|
|
29
30
|
options
|
|
30
31
|
},
|
|
31
|
-
showSelectedOptions
|
|
32
|
+
showSelectedOptions,
|
|
33
|
+
inputRef
|
|
32
34
|
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
33
35
|
const multiSelectedValues = selectedValues;
|
|
34
36
|
const selectableOptions = listHelper.getSelectableOptions(options);
|
|
@@ -44,13 +46,38 @@ const HeaderList = () => {
|
|
|
44
46
|
return /*#__PURE__*/_jsx__default["default"](styled.StyledHeaderListWrapper, {
|
|
45
47
|
onKeyDown: handleKeyDown,
|
|
46
48
|
onMouseDown: handleOnMouseDown
|
|
47
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0, onSelectAll && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
50
|
+
disabled: (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) !== '' || selectableOptions.length === multiSelectedValues.length,
|
|
51
|
+
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SELECT_ALL_BUTTON,
|
|
52
|
+
buttonType: "text",
|
|
53
|
+
labelText: "All",
|
|
54
|
+
size: "s",
|
|
55
|
+
onMouseDown: handleOnMouseDown,
|
|
56
|
+
onBlur: handleOnBlurSelectAll,
|
|
57
|
+
onClick: handleClickOnSelectAll
|
|
58
|
+
}), onSelectAll && onClearAll && (_StyledSeparator || (_StyledSeparator = /*#__PURE__*/_jsx__default["default"](styled.StyledSeparator, {
|
|
59
|
+
orientation: "vertical",
|
|
60
|
+
position: "center",
|
|
61
|
+
type: "group-level",
|
|
62
|
+
margin: "none"
|
|
63
|
+
}))), onClearAll && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
64
|
+
disabled: multiSelectedValues.length === 0,
|
|
65
|
+
tabIndex: 0,
|
|
66
|
+
"data-testid": ComboboxDataTestids.ComboboxDataTestid.CLEAR_ALL_BUTTON,
|
|
67
|
+
buttonType: "text",
|
|
68
|
+
size: "s",
|
|
69
|
+
labelText: "Clear",
|
|
70
|
+
onMouseDown: handleOnMouseDown,
|
|
71
|
+
onBlur: handleOnBlurClearAll,
|
|
72
|
+
onClick: handleClickOnClearAll
|
|
73
|
+
})), /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0, withToggle ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
74
|
+
children: multiSelectedValues.length > 0 ? /*#__PURE__*/_jsx__default["default"](styled.StyledButtonSelection, {
|
|
75
|
+
buttonType: "text",
|
|
76
|
+
disabled: !showSelectedOptions && selectableOptions.length === multiSelectedValues.length,
|
|
77
|
+
onClick: handleToggle,
|
|
78
|
+
labelText: !showSelectedOptions ? "".concat(multiSelectedValues.length, " SELECTED") : 'SHOW ALL',
|
|
79
|
+
size: "s"
|
|
80
|
+
}) : _StyledNoOptionsSelec || (_StyledNoOptionsSelec = /*#__PURE__*/_jsx__default["default"](styled.StyledNoOptionsSelected, {}, void 0, "0 SELECTED"))
|
|
54
81
|
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
55
82
|
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledShowAllButton, {
|
|
56
83
|
buttonType: "text",
|
|
@@ -63,7 +90,7 @@ const HeaderList = () => {
|
|
|
63
90
|
style: {
|
|
64
91
|
fontWeight: showSelectedOptions ? '300' : '600'
|
|
65
92
|
}
|
|
66
|
-
}),
|
|
93
|
+
}), _StyledSeparator2 || (_StyledSeparator2 = /*#__PURE__*/_jsx__default["default"](styled.StyledSeparator, {
|
|
67
94
|
orientation: "vertical",
|
|
68
95
|
position: "center",
|
|
69
96
|
type: "group-level",
|
|
@@ -71,37 +98,13 @@ const HeaderList = () => {
|
|
|
71
98
|
})), /*#__PURE__*/_jsx__default["default"](styled.StyledButtonSelection, {
|
|
72
99
|
tabIndex: showSelectedOptions ? -1 : 0,
|
|
73
100
|
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SHOW_SELECTED_OPTIONS_BUTTON,
|
|
74
|
-
disabled: multiSelectedValues.length === 0,
|
|
101
|
+
disabled: multiSelectedValues.length === 0 || !showSelectedOptions && selectableOptions.length === multiSelectedValues.length,
|
|
75
102
|
buttonType: "text",
|
|
76
103
|
isSelected: showSelectedOptions,
|
|
77
104
|
onClick: !showSelectedOptions ? handleToggle : lodash.noop,
|
|
78
105
|
labelText: "".concat(multiSelectedValues.length, " SELECTED"),
|
|
79
106
|
size: "s"
|
|
80
107
|
})]
|
|
81
|
-
})), /*#__PURE__*/_jsx__default["default"](styled.StyledSelectedItems, {}, void 0, onSelectAll && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
82
|
-
disabled: selectableOptions.length === multiSelectedValues.length,
|
|
83
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.SELECT_ALL_BUTTON,
|
|
84
|
-
buttonType: "text",
|
|
85
|
-
labelText: "All",
|
|
86
|
-
size: "s",
|
|
87
|
-
onMouseDown: handleOnMouseDown,
|
|
88
|
-
onBlur: handleOnBlurSelectAll,
|
|
89
|
-
onClick: handleClickOnSelectAll
|
|
90
|
-
}), onSelectAll && onClearAll && (_StyledSeparator2 || (_StyledSeparator2 = /*#__PURE__*/_jsx__default["default"](styled.StyledSeparator, {
|
|
91
|
-
orientation: "vertical",
|
|
92
|
-
position: "center",
|
|
93
|
-
type: "group-level",
|
|
94
|
-
margin: "none"
|
|
95
|
-
}))), onClearAll && /*#__PURE__*/_jsx__default["default"](styled.StyledButton, {
|
|
96
|
-
disabled: multiSelectedValues.length === 0,
|
|
97
|
-
tabIndex: 0,
|
|
98
|
-
"data-testid": ComboboxDataTestids.ComboboxDataTestid.CLEAR_ALL_BUTTON,
|
|
99
|
-
buttonType: "text",
|
|
100
|
-
size: "s",
|
|
101
|
-
labelText: "Clear",
|
|
102
|
-
onMouseDown: handleOnMouseDown,
|
|
103
|
-
onBlur: handleOnBlurClearAll,
|
|
104
|
-
onClick: handleClickOnClearAll
|
|
105
108
|
})));
|
|
106
109
|
};
|
|
107
110
|
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
5
6
|
var styled = require('styled-components');
|
|
7
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
6
8
|
var DSButton = require('@elliemae/ds-button');
|
|
7
9
|
var DSSeparator = require('@elliemae/ds-separator');
|
|
8
10
|
|
|
9
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
12
|
|
|
13
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
11
14
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
15
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
13
16
|
var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
var _templateObject;
|
|
16
19
|
|
|
17
|
-
const selectedStyle = isSelected =>
|
|
20
|
+
const selectedStyle = isSelected => dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n & span {\n border-bottom: 2px solid ", ";\n }\n cursor: ", ";\n"])), props => isSelected ? props.theme.colors.brand[700] : '#FFF', isSelected && 'default');
|
|
18
21
|
|
|
19
22
|
const StyledHeaderListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
20
23
|
componentId: "sc-dazbzt-0"
|
|
@@ -27,7 +30,7 @@ const StyledButton = /*#__PURE__*/styled__default["default"](DSButton__default["
|
|
|
27
30
|
})(["padding:0 ", ";align-items:center;"], props => props.theme.space.xxs);
|
|
28
31
|
const StyledGeneralSelectionButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
29
32
|
componentId: "sc-dazbzt-3"
|
|
30
|
-
})(["border-radius:0px;padding:", ";margin:0;align-items:center;", " transition:unset;"], props => props.theme.space.xxs, _ref => {
|
|
33
|
+
})(["border-radius:0px;padding:0 ", ";margin:0;align-items:center;", " transition:unset;"], props => props.theme.space.xxs, _ref => {
|
|
31
34
|
let {
|
|
32
35
|
isSelected
|
|
33
36
|
} = _ref;
|
|
@@ -42,10 +45,14 @@ const StyledShowAllButton = /*#__PURE__*/styled__default["default"](StyledGenera
|
|
|
42
45
|
const StyledSelectedItems = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
43
46
|
componentId: "sc-dazbzt-6"
|
|
44
47
|
})(["display:flex;align-items:center;"]);
|
|
48
|
+
const StyledNoOptionsSelected = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
49
|
+
componentId: "sc-dazbzt-7"
|
|
50
|
+
})(["padding:0 ", ";"], props => props.theme.space.xxs);
|
|
45
51
|
|
|
46
52
|
exports.StyledButton = StyledButton;
|
|
47
53
|
exports.StyledButtonSelection = StyledButtonSelection;
|
|
48
54
|
exports.StyledHeaderListWrapper = StyledHeaderListWrapper;
|
|
55
|
+
exports.StyledNoOptionsSelected = StyledNoOptionsSelected;
|
|
49
56
|
exports.StyledSelectedItems = StyledSelectedItems;
|
|
50
57
|
exports.StyledSeparator = StyledSeparator;
|
|
51
58
|
exports.StyledShowAllButton = StyledShowAllButton;
|
|
@@ -25,14 +25,13 @@ const useHeaderListHandlers = () => {
|
|
|
25
25
|
inputRef.current.focus();
|
|
26
26
|
}
|
|
27
27
|
}, [inputRef, onClearAll, multiSelectedValues]);
|
|
28
|
-
const handleOnBlurClearAll = React.useCallback(e => {
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
inputRef.current.focus();
|
|
28
|
+
const handleOnBlurClearAll = React.useCallback(e => {// since ux change order from the action buttons this is unneccesary. will comment until review finish
|
|
29
|
+
// e.preventDefault();
|
|
30
|
+
// inputRef.current.focus();
|
|
31
31
|
}, [inputRef]);
|
|
32
32
|
const handleClickOnSelectAll = React.useCallback(() => {
|
|
33
33
|
onSelectAll();
|
|
34
34
|
inputRef.current.focus();
|
|
35
|
-
setShowPopover(false);
|
|
36
35
|
}, [onSelectAll, inputRef, setShowPopover]);
|
|
37
36
|
const handleClickOnClearAll = React.useCallback(e => {
|
|
38
37
|
setShowSelectedOptions(false);
|
|
@@ -40,34 +40,39 @@ const MenuList = () => {
|
|
|
40
40
|
}
|
|
41
41
|
} = React.useContext(ComboBoxCTX.ComboBoxContext);
|
|
42
42
|
const multiple = Array.isArray(selectedValues);
|
|
43
|
+
const withHeader = !inline && multiple && options.length > 0;
|
|
43
44
|
const {
|
|
44
45
|
ItemRenderer
|
|
45
46
|
} = useItemRenderer.useItemRenderer();
|
|
46
47
|
useMenuList.useMenuList();
|
|
47
48
|
useOnElementResize.useOnElementResize(controlsWrapperRef);
|
|
48
|
-
const listWidth =
|
|
49
|
-
const
|
|
49
|
+
const listWidth = menuMinWidth || "".concat(referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.offsetWidth);
|
|
50
|
+
const handleOnFocus = React.useCallback(() => {
|
|
50
51
|
inputRef === null || inputRef === void 0 ? void 0 : inputRef.current.focus();
|
|
51
52
|
}, [inputRef]);
|
|
52
53
|
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledListWrapper, {
|
|
54
|
+
tabIndex: -1,
|
|
53
55
|
ref: wrapperListRef,
|
|
56
|
+
inline: inline,
|
|
54
57
|
onMouseDown: e => e.preventDefault(),
|
|
55
58
|
minWidth: listWidth,
|
|
56
59
|
id: "combo-listbox",
|
|
57
60
|
role: "listbox",
|
|
58
|
-
children: [
|
|
61
|
+
children: [withHeader && (_HeaderList || (_HeaderList = /*#__PURE__*/_jsx__default["default"](HeaderList.HeaderList, {}))), options.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(styled.StyledVirtualListWrapper, {
|
|
62
|
+
tabIndex: -1,
|
|
59
63
|
maxHeight: menuMaxHeight,
|
|
60
64
|
ref: listRef,
|
|
61
65
|
style: {
|
|
62
|
-
marginTop:
|
|
66
|
+
marginTop: withHeader && '28px'
|
|
63
67
|
},
|
|
64
68
|
children: /*#__PURE__*/_jsx__default["default"](styled.StyledList, {
|
|
65
69
|
tabIndex: -1,
|
|
66
70
|
"aria-expanded": showPopover,
|
|
67
|
-
onFocus:
|
|
71
|
+
onFocus: handleOnFocus,
|
|
68
72
|
"data-testid": ComboboxDataTestids.ComboboxDataTestid.LIST,
|
|
69
73
|
style: {
|
|
70
|
-
height: totalSize
|
|
74
|
+
height: totalSize,
|
|
75
|
+
margin: inline ? '0px' : '8px 0px'
|
|
71
76
|
}
|
|
72
77
|
}, void 0, ItemRenderer)
|
|
73
78
|
}) : _EmptyState || (_EmptyState = /*#__PURE__*/_jsx__default["default"](index.EmptyState, {}))]
|
|
@@ -10,17 +10,18 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
10
10
|
|
|
11
11
|
const StyledListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
12
12
|
componentId: "sc-1uedyf-0"
|
|
13
|
-
})(["min-width:", "
|
|
13
|
+
})(["min-width:", ";"], props => props.inline ? '100%' : "".concat(props.minWidth, "px"));
|
|
14
14
|
const StyledList = /*#__PURE__*/styled__default["default"].ul.withConfig({
|
|
15
15
|
componentId: "sc-1uedyf-1"
|
|
16
|
-
})(["position:relative;padding:0;
|
|
16
|
+
})(["position:relative;padding:0;"]);
|
|
17
17
|
const StyledVirtualListWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
18
|
componentId: "sc-1uedyf-2"
|
|
19
|
-
})(["overflow-y:auto;max-height:", "
|
|
19
|
+
})(["overflow-y:auto;max-height:", ";"], _ref => {
|
|
20
20
|
let {
|
|
21
|
-
maxHeight
|
|
21
|
+
maxHeight,
|
|
22
|
+
inline
|
|
22
23
|
} = _ref;
|
|
23
|
-
return maxHeight
|
|
24
|
+
return inline ? '' : "".concat(!maxHeight ? '400' : maxHeight, "px");
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
exports.StyledList = StyledList;
|
|
@@ -10,6 +10,7 @@ const useMenuList = () => {
|
|
|
10
10
|
|
|
11
11
|
const {
|
|
12
12
|
props: {
|
|
13
|
+
inline,
|
|
13
14
|
selectedValues,
|
|
14
15
|
onMenuOpen,
|
|
15
16
|
options
|
|
@@ -28,7 +29,7 @@ const useMenuList = () => {
|
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
if (showPopover) {
|
|
32
|
+
if (showPopover || inline) {
|
|
32
33
|
onMenuOpen();
|
|
33
34
|
|
|
34
35
|
if (inputRef.current.value !== '') {
|
|
@@ -54,7 +55,7 @@ const useMenuList = () => {
|
|
|
54
55
|
}
|
|
55
56
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
57
|
|
|
57
|
-
}, [showPopover, hasFocus, (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value]);
|
|
58
|
+
}, [showPopover, inline, hasFocus, (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value]);
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
exports.useMenuList = useMenuList;
|
package/cjs/ComboBox/v3/parts/multi-selected-values-container/MultiSelectedValuesContainer.js
CHANGED
|
@@ -22,6 +22,8 @@ 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
29
|
selectedValues
|
|
@@ -38,19 +40,23 @@ const MultiSelectedValuesContainer = () => {
|
|
|
38
40
|
}
|
|
39
41
|
}, void 0, /*#__PURE__*/_jsx__default["default"](dsPills.DSPillGroupV2, {
|
|
40
42
|
innerRef: pillGroupRef
|
|
41
|
-
}, void 0, multiSelectedValue.length > 0 && multiSelectedValue.slice(0, correctPillsToShow).map(option =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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,
|
|
49
|
+
label: option.label,
|
|
50
|
+
type: "value"
|
|
51
|
+
}, option.value);
|
|
52
|
+
}), multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
|
|
47
53
|
size: "s",
|
|
48
54
|
labelTruncated: false,
|
|
49
55
|
label: "+".concat(multiSelectedValue.length - correctPillsToShow),
|
|
50
56
|
type: "value"
|
|
51
57
|
}, "grouped"))), [pillsToShow, pillGroupRef, inputRef, multiSelectedValue, correctPillsToShow]);
|
|
52
58
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
53
|
-
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]
|
|
54
60
|
});
|
|
55
61
|
};
|
|
56
62
|
|
|
@@ -5,22 +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.oneOfType([reactDesc.PropTypes.array, reactDesc.PropTypes.object]).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
|
-
|
|
19
|
-
onMenuOpen: reactDesc.PropTypes.func.description('').defaultValue(''),
|
|
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(''),
|
|
20
19
|
inputMinWidth: reactDesc.PropTypes.any.description('Minimum width for the combo box input controller').defaultValue(undefined),
|
|
21
20
|
menuMinWidth: reactDesc.PropTypes.any.description('Minimum width for the dropdown menu').defaultValue(undefined),
|
|
22
21
|
menuMaxHeight: reactDesc.PropTypes.any.description('Maximum height for the dropdown menu').defaultValue(undefined),
|
|
23
|
-
withToggle: reactDesc.PropTypes.bool.description('').defaultValue('false')
|
|
22
|
+
withToggle: reactDesc.PropTypes.bool.description('POC purpose this prop will not remain').defaultValue('false')
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
exports.propTypes = propTypes;
|
|
@@ -54,7 +54,7 @@ const useKeyboardNavigation = () => {
|
|
|
54
54
|
|
|
55
55
|
onKeyDown(e, currentItem); // =============================================================================
|
|
56
56
|
// ENTER KEY TO CREATE ELEMENTS
|
|
57
|
-
//
|
|
57
|
+
// ====================================================== =================
|
|
58
58
|
|
|
59
59
|
if (e.key === 'Enter' && onCreate && !selectableOptions.length) {
|
|
60
60
|
onCreate(targetElement.value);
|
|
@@ -69,7 +69,7 @@ const useKeyboardNavigation = () => {
|
|
|
69
69
|
if (e.keyCode === 32 && targetElement.value === '' || e.key === 'Enter') {
|
|
70
70
|
e.preventDefault();
|
|
71
71
|
|
|
72
|
-
if (!showPopover) {
|
|
72
|
+
if (!showPopover && !inline) {
|
|
73
73
|
setShowPopover(true);
|
|
74
74
|
} else {
|
|
75
75
|
selectOption();
|
|
@@ -92,8 +92,9 @@ const useKeyboardNavigation = () => {
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
if (e.key === 'ArrowDown') {
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
|
|
95
97
|
if (showPopover || inline) {
|
|
96
|
-
e.preventDefault();
|
|
97
98
|
const nextItemIndex = listHelper.findInCircularList(options, currentItemIndex, isOptionFocuseable);
|
|
98
99
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
99
100
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
@@ -103,8 +104,9 @@ const useKeyboardNavigation = () => {
|
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
if (e.key === 'ArrowUp') {
|
|
107
|
+
e.preventDefault();
|
|
108
|
+
|
|
106
109
|
if (showPopover || inline) {
|
|
107
|
-
e.preventDefault();
|
|
108
110
|
const nextItemIndex = listHelper.findInCircularList(options, currentItemIndex, isOptionFocuseable, -1);
|
|
109
111
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
110
112
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
@@ -114,7 +116,7 @@ const useKeyboardNavigation = () => {
|
|
|
114
116
|
const nextItemIndex = listHelper.findInCircularList(options, 0, isOptionFocuseable, -1);
|
|
115
117
|
setCurrentOption(options[nextItemIndex].dsId);
|
|
116
118
|
scrollOptionIntoView(options[nextItemIndex].dsId);
|
|
117
|
-
}
|
|
119
|
+
});
|
|
118
120
|
}
|
|
119
121
|
} // =============================================================================
|
|
120
122
|
// ESCAPE
|
|
@@ -122,9 +124,9 @@ const useKeyboardNavigation = () => {
|
|
|
122
124
|
|
|
123
125
|
|
|
124
126
|
if (e.key === 'Escape' && !inline) {
|
|
125
|
-
setShowPopover(false);
|
|
126
|
-
onFilter('');
|
|
127
|
-
inputRef.current.value = '';
|
|
127
|
+
setShowPopover(false); // TODO confirm funcionality
|
|
128
|
+
// onFilter('');
|
|
129
|
+
// inputRef.current.value = '';
|
|
128
130
|
} // =============================================================================
|
|
129
131
|
// BACKSPACE
|
|
130
132
|
// =============================================================================
|
|
@@ -142,9 +144,7 @@ const useKeyboardNavigation = () => {
|
|
|
142
144
|
setShowSelectedValue(true);
|
|
143
145
|
}
|
|
144
146
|
|
|
145
|
-
if (e.key === 'Tab' && inline)
|
|
146
|
-
e.preventDefault();
|
|
147
|
-
}
|
|
147
|
+
if (e.key === 'Tab' && inline) ;
|
|
148
148
|
}, [scrollOptionIntoView, currentItemIndex, options, currentItem, selectableOptions, inputRef, multiple, showPopover, selectedValues, inline, onKeyDown, onSelectAll, onChange, onCreate, onFilter, setCurrentOption, setShowPopover, setShowSelectedValue, selectOption]);
|
|
149
149
|
return onInputKeyDown;
|
|
150
150
|
};
|
|
@@ -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,
|
|
@@ -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
|
|
|
@@ -39,7 +39,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
39
39
|
|
|
40
40
|
const SubmenuItem = props$1 => {
|
|
41
41
|
const propsWithDefault = dsPropsHelpers.useMemoMergePropsWithDefault(props$1, props.defaultProps);
|
|
42
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault,
|
|
42
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(propsWithDefault, props.itemProps);
|
|
43
43
|
const {
|
|
44
44
|
dsId,
|
|
45
45
|
label,
|
|
@@ -2,19 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
5
6
|
var styled = require('styled-components');
|
|
7
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
6
8
|
var styledSystem = require('styled-system');
|
|
7
9
|
|
|
8
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
11
|
|
|
12
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
10
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
14
|
|
|
15
|
+
var _templateObject, _templateObject2;
|
|
16
|
+
|
|
12
17
|
const borderOutside = function (color) {
|
|
13
18
|
let width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
14
|
-
return
|
|
19
|
+
return dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\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);
|
|
15
20
|
};
|
|
16
21
|
|
|
17
|
-
const disabledOption = () =>
|
|
22
|
+
const disabledOption = () => dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n cursor: not-allowed;\n * {\n cursor: not-allowed;\n }\n"])));
|
|
18
23
|
|
|
19
24
|
const activeBorderCss = props => borderOutside(props.theme.colors.brand[500]);
|
|
20
25
|
|