@elliemae/ds-controlled-form 2.4.2-rc.12 → 2.4.2-rc.15
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/autocomplete/config/useAutocomplete.js +0 -1
- package/cjs/autocomplete/parts/A11yFocusedOption.js +9 -6
- package/cjs/autocomplete/parts/container/Container.js +1 -1
- package/cjs/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
- package/cjs/autocomplete/parts/menu-list/MenuList.js +3 -5
- package/cjs/autocomplete/parts/menu-list/styled.js +2 -2
- package/cjs/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
- package/cjs/checkbox/config/useValidateProps.js +6 -3
- package/cjs/checkbox/styles.js +72 -28
- package/cjs/checkbox/utils/styleHelpers.js +20 -2
- package/cjs/combobox/config/useComboBox.js +1 -2
- package/cjs/combobox/config/useCorrectOptions.js +1 -2
- package/cjs/combobox/parts/A11yFocusedOption.js +4 -4
- package/cjs/combobox/parts/A11ySelectedValues.js +2 -2
- package/cjs/combobox/parts/DropdownIndicator.js +13 -5
- package/cjs/combobox/parts/container/Container.js +1 -1
- package/cjs/combobox/parts/container/styled.js +11 -10
- package/cjs/combobox/parts/controls/Controls.js +3 -9
- package/cjs/combobox/parts/controls/styled.js +54 -22
- package/cjs/combobox/parts/controls/useOnPillsNavigation.js +4 -12
- package/cjs/combobox/parts/controls-input/styled.js +41 -11
- package/cjs/combobox/parts/controls-input/useControlsInput.js +1 -5
- package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
- package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
- package/cjs/combobox/parts/header-list/HeaderList.js +1 -1
- package/cjs/combobox/parts/header-list/styled.js +39 -10
- package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
- package/cjs/combobox/parts/menu-list/MenuList.js +2 -2
- package/cjs/combobox/parts/menu-list/styled.js +37 -21
- package/cjs/combobox/parts/menu-list/useItemRenderer.js +3 -3
- package/cjs/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
- package/cjs/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
- package/cjs/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
- package/cjs/combobox/parts/styled.js +6 -7
- package/cjs/combobox/sharedTypes.js +2 -2
- package/cjs/combobox/utils/listHelper.js +4 -9
- package/cjs/date-range-picker/config/useRangePickerLogic.js +4 -8
- package/cjs/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
- package/cjs/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
- package/cjs/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
- package/cjs/date-time-picker/config/useChangeHandlers.js +3 -3
- package/cjs/date-time-picker/config/useControlledDateTimePicker.js +1 -1
- package/cjs/date-time-picker/config/useFocusTracker.js +1 -1
- package/cjs/date-time-picker/config/useGetDestructuredValues.js +6 -6
- package/cjs/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
- package/cjs/date-time-picker/config/useGetReferences.js +1 -1
- package/cjs/date-time-picker/config/useRelevantValueFromProps.js +1 -1
- package/cjs/date-time-picker/config/useValidateProps.js +42 -11
- package/cjs/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
- package/cjs/date-time-picker/parts/DateInputs/DDInput.js +3 -7
- package/cjs/date-time-picker/parts/DateInputs/MMInput.js +3 -7
- package/cjs/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
- package/cjs/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
- package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
- package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
- package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
- package/cjs/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
- package/cjs/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -15
- package/cjs/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +1 -2
- package/cjs/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
- package/cjs/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
- package/cjs/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
- package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
- package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -15
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +2 -5
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
- package/cjs/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
- package/cjs/date-time-picker/parts/Styleds.js +12 -6
- package/cjs/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
- package/cjs/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
- package/cjs/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
- package/cjs/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
- package/cjs/date-time-picker/utils/dateHelpers.js +17 -34
- package/cjs/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
- package/cjs/date-time-picker/utils/stringHelpers.js +5 -11
- package/cjs/input-group/styled.js +79 -13
- package/cjs/large-text-input/DSControlledLargeTextInput.js +1 -1
- package/cjs/large-text-input/styles.js +27 -13
- package/cjs/mask-hook/hooks/useNumberMask.js +1 -5
- package/cjs/mask-hook/hooks/usePhoneMask.js +1 -4
- package/cjs/mask-hook/hooks/useRegExpMask.js +4 -7
- package/cjs/mask-hook/hooks/useSSNMask.js +1 -4
- package/cjs/mask-hook/hooks/useZipCodeMask.js +1 -4
- package/cjs/mask-hook/utils/addSpecialCharacters.js +0 -1
- package/cjs/mask-hook/utils/flatStringArray.js +0 -1
- package/cjs/text-input/config/useInputText.js +0 -1
- package/cjs/text-input/styled/borders.js +18 -11
- package/cjs/text-input/styled/components.js +49 -10
- package/cjs/toggle/ControlledToggle.js +2 -3
- package/cjs/toggle/styles.js +7 -5
- package/esm/autocomplete/config/useAutocomplete.js +0 -1
- package/esm/autocomplete/parts/A11yFocusedOption.js +9 -5
- package/esm/autocomplete/parts/container/Container.js +1 -1
- package/esm/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
- package/esm/autocomplete/parts/menu-list/MenuList.js +3 -5
- package/esm/autocomplete/parts/menu-list/styled.js +2 -2
- package/esm/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
- package/esm/checkbox/config/useValidateProps.js +6 -3
- package/esm/checkbox/styles.js +72 -24
- package/esm/checkbox/utils/styleHelpers.js +20 -2
- package/esm/combobox/config/useComboBox.js +0 -1
- package/esm/combobox/config/useCorrectOptions.js +1 -2
- package/esm/combobox/parts/A11yFocusedOption.js +4 -4
- package/esm/combobox/parts/A11ySelectedValues.js +2 -2
- package/esm/combobox/parts/DropdownIndicator.js +13 -4
- package/esm/combobox/parts/container/Container.js +1 -1
- package/esm/combobox/parts/container/styled.js +11 -6
- package/esm/combobox/parts/controls/Controls.js +3 -9
- package/esm/combobox/parts/controls/styled.js +54 -18
- package/esm/combobox/parts/controls/useOnPillsNavigation.js +4 -12
- package/esm/combobox/parts/controls-input/styled.js +41 -7
- package/esm/combobox/parts/controls-input/useControlsInput.js +1 -5
- package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
- package/esm/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
- package/esm/combobox/parts/header-list/HeaderList.js +1 -1
- package/esm/combobox/parts/header-list/styled.js +40 -7
- package/esm/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
- package/esm/combobox/parts/menu-list/MenuList.js +2 -2
- package/esm/combobox/parts/menu-list/styled.js +37 -17
- package/esm/combobox/parts/menu-list/useItemRenderer.js +3 -3
- package/esm/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
- package/esm/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
- package/esm/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
- package/esm/combobox/parts/styled.js +6 -3
- package/esm/combobox/sharedTypes.js +2 -2
- package/esm/combobox/utils/listHelper.js +4 -9
- package/esm/date-range-picker/config/useRangePickerLogic.js +3 -7
- package/esm/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
- package/esm/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
- package/esm/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
- package/esm/date-time-picker/config/useChangeHandlers.js +3 -3
- package/esm/date-time-picker/config/useControlledDateTimePicker.js +1 -1
- package/esm/date-time-picker/config/useFocusTracker.js +1 -1
- package/esm/date-time-picker/config/useGetDestructuredValues.js +6 -6
- package/esm/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
- package/esm/date-time-picker/config/useGetReferences.js +1 -1
- package/esm/date-time-picker/config/useRelevantValueFromProps.js +1 -1
- package/esm/date-time-picker/config/useValidateProps.js +42 -11
- package/esm/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
- package/esm/date-time-picker/parts/DateInputs/DDInput.js +3 -7
- package/esm/date-time-picker/parts/DateInputs/MMInput.js +3 -7
- package/esm/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
- package/esm/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
- package/esm/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
- package/esm/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
- package/esm/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
- package/esm/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
- package/esm/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -14
- package/esm/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +0 -1
- package/esm/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
- package/esm/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
- package/esm/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
- package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
- package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
- package/esm/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
- package/esm/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
- package/esm/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
- package/esm/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
- package/esm/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -14
- package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +2 -5
- package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
- package/esm/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
- package/esm/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
- package/esm/date-time-picker/parts/Styleds.js +12 -6
- package/esm/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
- package/esm/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
- package/esm/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
- package/esm/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
- package/esm/date-time-picker/utils/dateHelpers.js +17 -34
- package/esm/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
- package/esm/date-time-picker/utils/stringHelpers.js +5 -11
- package/esm/input-group/styled.js +79 -9
- package/esm/large-text-input/DSControlledLargeTextInput.js +1 -1
- package/esm/large-text-input/styles.js +27 -9
- package/esm/mask-hook/hooks/useNumberMask.js +1 -5
- package/esm/mask-hook/hooks/usePhoneMask.js +1 -4
- package/esm/mask-hook/hooks/useRegExpMask.js +4 -7
- package/esm/mask-hook/hooks/useSSNMask.js +1 -4
- package/esm/mask-hook/hooks/useZipCodeMask.js +1 -4
- package/esm/mask-hook/utils/addSpecialCharacters.js +0 -1
- package/esm/mask-hook/utils/flatStringArray.js +0 -1
- package/esm/text-input/config/useInputText.js +0 -1
- package/esm/text-input/styled/borders.js +18 -7
- package/esm/text-input/styled/components.js +49 -6
- package/esm/toggle/ControlledToggle.js +0 -1
- package/esm/toggle/styles.js +7 -5
- package/package.json +15 -15
- package/types/text-input/config/useInputText.d.ts +3 -3
|
@@ -2,66 +2,98 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
var dsGrid = require('@elliemae/ds-grid');
|
|
8
7
|
var theming = require('../../theming.js');
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
13
|
-
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
15
|
-
const normalBorder = dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n border: 1px solid ", ";\n"])), _ref => {
|
|
9
|
+
const normalBorder = dsSystem.css`
|
|
10
|
+
border: 1px solid ${_ref => {
|
|
16
11
|
let {
|
|
17
12
|
hasError,
|
|
18
13
|
theme
|
|
19
14
|
} = _ref;
|
|
20
15
|
return hasError ? theme.colors.danger[900] : theme.colors.neutral[400];
|
|
21
|
-
}
|
|
22
|
-
|
|
16
|
+
}};
|
|
17
|
+
`;
|
|
18
|
+
const focusBorder = dsSystem.css`
|
|
19
|
+
outline: 2px solid ${_ref2 => {
|
|
23
20
|
let {
|
|
24
21
|
theme
|
|
25
22
|
} = _ref2;
|
|
26
23
|
return theme.colors.brand[700];
|
|
27
|
-
}
|
|
28
|
-
|
|
24
|
+
}};
|
|
25
|
+
outline-offset: -2px;
|
|
26
|
+
`;
|
|
27
|
+
const hoverBorder = dsSystem.css`
|
|
28
|
+
border: 1px solid ${_ref3 => {
|
|
29
29
|
let {
|
|
30
30
|
theme
|
|
31
31
|
} = _ref3;
|
|
32
32
|
return theme.colors.brand[700];
|
|
33
|
-
}
|
|
33
|
+
}};
|
|
34
|
+
`;
|
|
34
35
|
const StyledControlsWrapper = dsSystem.styled(dsGrid.Grid, {
|
|
35
36
|
name: theming.DSComboBoxName,
|
|
36
37
|
slot: theming.DSComboboxSlots.INPUT_WRAPPER
|
|
37
|
-
})
|
|
38
|
+
})`
|
|
39
|
+
background: ${_ref4 => {
|
|
38
40
|
let {
|
|
39
41
|
disabled,
|
|
40
42
|
theme
|
|
41
43
|
} = _ref4;
|
|
42
44
|
return disabled ? theme.colors.neutral['080'] : '#ffffff';
|
|
43
|
-
}
|
|
45
|
+
}};
|
|
46
|
+
position: relative;
|
|
47
|
+
border-radius: 2px;
|
|
48
|
+
min-width: ${_ref5 => {
|
|
44
49
|
let {
|
|
45
50
|
minWidth,
|
|
46
51
|
inline
|
|
47
52
|
} = _ref5;
|
|
48
|
-
return inline || !minWidth ? '' :
|
|
49
|
-
}
|
|
53
|
+
return inline || !minWidth ? '' : `${minWidth}px`;
|
|
54
|
+
}};
|
|
55
|
+
align-items: center;
|
|
56
|
+
align-content: center;
|
|
57
|
+
height: 28px;
|
|
58
|
+
padding-left: 8px;
|
|
59
|
+
margin: ${_ref6 => {
|
|
50
60
|
let {
|
|
51
61
|
inline
|
|
52
62
|
} = _ref6;
|
|
53
63
|
return inline ? '10px 16px' : '';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
}};
|
|
65
|
+
${normalBorder}
|
|
66
|
+
&:hover {
|
|
67
|
+
${hoverBorder}
|
|
68
|
+
}
|
|
69
|
+
&:focus-within {
|
|
70
|
+
${focusBorder}
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
const StyledSelection = dsSystem.styled.div`
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
margin-right: 3px;
|
|
76
|
+
display: flex;
|
|
77
|
+
`;
|
|
78
|
+
const StyledHeaderActionsWrapper = dsSystem.styled(dsGrid.Grid)`
|
|
79
|
+
height: 100%;
|
|
80
|
+
.em-ds-button--text:focus::after {
|
|
81
|
+
border: none;
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
const StyleDropdownIndicator = dsSystem.styled.div``;
|
|
85
|
+
const StyleHeaderActionsSeparator = dsSystem.styled.span`
|
|
86
|
+
align-self: stretch;
|
|
87
|
+
margin: 4px 0px;
|
|
88
|
+
width: 1px;
|
|
89
|
+
background-color: ${_ref7 => {
|
|
59
90
|
let {
|
|
60
91
|
theme,
|
|
61
92
|
disabled
|
|
62
93
|
} = _ref7;
|
|
63
94
|
return disabled ? theme.colors.neutral['400'] : theme.colors.neutral['500'];
|
|
64
|
-
}
|
|
95
|
+
}};
|
|
96
|
+
`;
|
|
65
97
|
|
|
66
98
|
exports.StyleDropdownIndicator = StyleDropdownIndicator;
|
|
67
99
|
exports.StyleHeaderActionsSeparator = StyleHeaderActionsSeparator;
|
|
@@ -21,30 +21,22 @@ const useOnPillsNavigation = () => {
|
|
|
21
21
|
const onKeyDownPills = React.useCallback(e => {
|
|
22
22
|
if ((e.key === 'ArrowLeft' || e.key === 'ArrowRight' || e.key === 'ArrowUp' || e.key === 'ArrowDown') && inputValue === '') {
|
|
23
23
|
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.focus();
|
|
24
|
+
innerRef.current?.focus();
|
|
27
25
|
setMenuState(true, 'open', e);
|
|
28
26
|
return;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
if (e.key === 'ArrowLeft') {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const removablePills = (_selectedOptionsRef$c = selectedOptionsRef.current) === null || _selectedOptionsRef$c === void 0 ? void 0 : _selectedOptionsRef$c.querySelectorAll(REMOVABLE_PILL_SELECTOR);
|
|
30
|
+
const removablePills = selectedOptionsRef.current?.querySelectorAll(REMOVABLE_PILL_SELECTOR);
|
|
35
31
|
|
|
36
32
|
if (hasFocus && removablePills) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(_removablePills = removablePills[removablePills.length - 1]) === null || _removablePills === void 0 ? void 0 : _removablePills.focus();
|
|
33
|
+
removablePills[removablePills.length - 1]?.focus();
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
36
|
|
|
43
37
|
if (e.key === 'ArrowRight') {
|
|
44
|
-
var _innerRef$current2;
|
|
45
|
-
|
|
46
38
|
e.preventDefault();
|
|
47
|
-
|
|
39
|
+
innerRef.current?.focus();
|
|
48
40
|
}
|
|
49
41
|
}
|
|
50
42
|
}, [inputValue, innerRef, setMenuState, selectedOptionsRef, hasFocus]);
|
|
@@ -2,27 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
var theming = require('../../theming.js');
|
|
8
7
|
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
12
|
-
|
|
13
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
14
8
|
const StyledInput = dsSystem.styled('input', {
|
|
15
9
|
name: theming.DSComboBoxName,
|
|
16
10
|
slot: theming.DSComboboxSlots.INPUT
|
|
17
|
-
})
|
|
11
|
+
})`
|
|
12
|
+
font-size: 13px;
|
|
13
|
+
line-height: 13px;
|
|
14
|
+
border: none;
|
|
15
|
+
padding: 0;
|
|
16
|
+
outline: none;
|
|
17
|
+
color: ${props => props.theme.colors.neutral[700]};
|
|
18
|
+
&:focus {
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
${_ref => {
|
|
18
22
|
let {
|
|
19
23
|
withoutCaret
|
|
20
24
|
} = _ref;
|
|
21
25
|
return withoutCaret && 'caret-color: transparent;';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
}}
|
|
27
|
+
&::placeholder {
|
|
28
|
+
color: transparent;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const StyledInputPlaceHolder = dsSystem.styled.div`
|
|
32
|
+
font-style: italic;
|
|
33
|
+
color: ${props => props.theme.colors.neutral[500]};
|
|
34
|
+
position: absolute;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
width: 100%;
|
|
38
|
+
user-select: none;
|
|
39
|
+
height: 28px;
|
|
40
|
+
font-size: 13px;
|
|
41
|
+
& span::after {
|
|
42
|
+
content: '';
|
|
43
|
+
padding: 1px;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
const StyledInputWidthReference = dsSystem.styled.span`
|
|
47
|
+
visibility: hidden;
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: -9999px;
|
|
50
|
+
`;
|
|
51
|
+
const StyledInputWrapper = dsSystem.styled('div')`
|
|
52
|
+
position: relative;
|
|
53
|
+
align-items: center;
|
|
54
|
+
display: flex;
|
|
55
|
+
`;
|
|
26
56
|
|
|
27
57
|
exports.StyledInput = StyledInput;
|
|
28
58
|
exports.StyledInputPlaceHolder = StyledInputPlaceHolder;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
-
require('core-js/modules/es.string.replace.js');
|
|
7
5
|
var React = require('react');
|
|
8
6
|
var useMaskedOnChange = require('./useMaskedOnChange.js');
|
|
9
7
|
var ComboBoxCTX = require('../../ComboBoxCTX.js');
|
|
@@ -28,9 +26,7 @@ const useControlsInput = () => {
|
|
|
28
26
|
const showPlaceholder = !inputValue && listHelper.isSelectedValueEmpty(selectedValues) ? placeholder : null;
|
|
29
27
|
const spanReferenceText = inputValue.replace(/\s/g, '\u00a0');
|
|
30
28
|
React.useEffect(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
setWidth((_spanReference$curren = spanReference.current) !== null && _spanReference$curren !== void 0 && _spanReference$curren.offsetWidth ? spanReference.current.offsetWidth + 2 : 1);
|
|
29
|
+
setWidth(spanReference.current?.offsetWidth ? spanReference.current.offsetWidth + 2 : 1);
|
|
34
30
|
}, [inputValue]); // if we se an input mask we configure inside here the proper mask
|
|
35
31
|
// or a stardard combobox onchange event
|
|
36
32
|
|
|
@@ -48,7 +48,7 @@ const useKeyboardNavigation = () => {
|
|
|
48
48
|
// =============================================================================
|
|
49
49
|
// CUSTOM KEYS
|
|
50
50
|
// =============================================================================
|
|
51
|
-
if (onKeyDown &&
|
|
51
|
+
if (onKeyDown && currentItem?.type === constants.MENU_OPTION_TYPES.OPTION) onKeyDown(e, currentItem);
|
|
52
52
|
|
|
53
53
|
if ((['ArrowDown', 'ArrowUp', 'Enter', 'Spacebar'].includes(e.key) || e.keyCode >= 48 && e.keyCode <= 90) && !menuState) {
|
|
54
54
|
setMenuState(true);
|
|
@@ -74,7 +74,7 @@ const useKeyboardNavigation = () => {
|
|
|
74
74
|
// =============================================================================
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
if (e.key === 'Enter' &&
|
|
77
|
+
if (e.key === 'Enter' && currentItem?.type === constants.INTERNAL_MENU_OPTION_TYPES.CREATABLE && onCreate) {
|
|
78
78
|
onCreate(inputValue); // blank active item to force search last one
|
|
79
79
|
|
|
80
80
|
setFocusOptionIdx('');
|
|
@@ -90,7 +90,7 @@ const useKeyboardNavigation = () => {
|
|
|
90
90
|
e.preventDefault();
|
|
91
91
|
e.stopPropagation();
|
|
92
92
|
|
|
93
|
-
if (focusOptionIdx !== '' && (menuState || inline) &&
|
|
93
|
+
if (focusOptionIdx !== '' && (menuState || inline) && currentItem?.type === constants.MENU_OPTION_TYPES.OPTION && !currentItem.disabled) {
|
|
94
94
|
if (onFilter) onFilter(allOptions, '');
|
|
95
95
|
setInputValue('');
|
|
96
96
|
|
|
@@ -163,9 +163,7 @@ const useKeyboardNavigation = () => {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
if (e.key === 'Tab' && !inline && menuState) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const element = (_selectAllCheckboxRef = selectAllCheckboxRef.current) !== null && _selectAllCheckboxRef !== void 0 ? _selectAllCheckboxRef : toggleSelectionButtonRef.current;
|
|
166
|
+
const element = selectAllCheckboxRef.current ?? toggleSelectionButtonRef.current;
|
|
169
167
|
|
|
170
168
|
if (element) {
|
|
171
169
|
e.preventDefault();
|
|
@@ -37,7 +37,7 @@ const useMaskedOnChange = () => {
|
|
|
37
37
|
valueSetter: setInputValue,
|
|
38
38
|
onChange: handleOnChangeMask
|
|
39
39
|
});
|
|
40
|
-
return
|
|
40
|
+
return onChangeMask?.onChange || handleOnChange;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
exports.useMaskedOnChange = useMaskedOnChange;
|
|
@@ -59,7 +59,7 @@ const HeaderList = () => {
|
|
|
59
59
|
size: DSButton.BUTTON_SIZES.S,
|
|
60
60
|
"data-testid": ComboboxDataTestids.ComboboxDataTestid.MULTISELECT.SHOW_SELECTED_OPTIONS_TOGGLE,
|
|
61
61
|
innerRef: toggleSelectionButtonRef
|
|
62
|
-
}, void 0, !showSelectedOptions ?
|
|
62
|
+
}, void 0, !showSelectedOptions ? `SHOW SELECTED [${multiSelectedValues.length}]` : 'SHOW ALL') : _StyledNoOptionsSelec || (_StyledNoOptionsSelec = /*#__PURE__*/_jsx__default["default"](styled.StyledNoOptionsSelected, {}, void 0, "0 SELECTED"))));
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
exports.HeaderList = HeaderList;
|
|
@@ -2,20 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
var DSButton = require('@elliemae/ds-button');
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
/* eslint-disable max-len */
|
|
9
|
+
const StyledHeaderListWrapper = dsSystem.styled.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: 10;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
padding: 0px 12px 0px 16px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 28px;
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
box-shadow: 0 4px 2px -4px ${props => props.theme.colors.neutral[700]};
|
|
20
|
+
overflow-x: hidden;
|
|
10
21
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const StyledButtonSelection = dsSystem.styled(DSButton.DSButtonV2)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
& button {
|
|
23
|
+
font-size: 13px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const StyledButtonSelection = dsSystem.styled(DSButton.DSButtonV2)`
|
|
27
|
+
border-radius: 0px;
|
|
28
|
+
padding: 0 ${props => props.theme.space.xxs};
|
|
29
|
+
margin: 0;
|
|
30
|
+
align-items: center;
|
|
31
|
+
transition: unset;
|
|
32
|
+
&:hover:not([disabled]) {
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
color: ${props => props.theme.colors.brand['700']};
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
const StyledSelectedItems = dsSystem.styled.div`
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
`;
|
|
41
|
+
const StyledNoOptionsSelected = dsSystem.styled.div`
|
|
42
|
+
padding: 0 ${props => props.theme.space.xxs};
|
|
43
|
+
`;
|
|
44
|
+
const StyledSelectAllCheckbox = dsSystem.styled.div`
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
`;
|
|
19
48
|
|
|
20
49
|
exports.StyledButtonSelection = StyledButtonSelection;
|
|
21
50
|
exports.StyledHeaderListWrapper = StyledHeaderListWrapper;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
5
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
7
6
|
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
7
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
@@ -29,7 +28,7 @@ const useHeaderListHandlers = () => {
|
|
|
29
28
|
return true;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
if (
|
|
31
|
+
if (multiSelectedValues?.length === 0) {
|
|
33
32
|
return false;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -59,27 +58,21 @@ const useHeaderListHandlers = () => {
|
|
|
59
58
|
|
|
60
59
|
const handleKeyDown = React.useCallback(e => {
|
|
61
60
|
if (e.key === 'Escape') {
|
|
62
|
-
var _innerRef$current;
|
|
63
|
-
|
|
64
61
|
setMenuState(false, 'close', e);
|
|
65
|
-
|
|
62
|
+
innerRef.current?.focus();
|
|
66
63
|
}
|
|
67
64
|
}, [setMenuState, innerRef]); // when hitting tab on selected values button filter we target the input again
|
|
68
65
|
|
|
69
66
|
const handleFilterSelectionBtnOnTab = React.useCallback(e => {
|
|
70
67
|
if (e.key === 'Tab' && !e.shiftKey) {
|
|
71
|
-
var _innerRef$current2;
|
|
72
|
-
|
|
73
68
|
e.preventDefault();
|
|
74
|
-
|
|
69
|
+
innerRef.current?.focus();
|
|
75
70
|
}
|
|
76
71
|
}, [innerRef]);
|
|
77
72
|
const handleCheckAllOnTab = React.useCallback(e => {
|
|
78
73
|
if (e.key === 'Tab' && !e.shiftKey && multiSelectedValues.length === 0) {
|
|
79
|
-
var _innerRef$current3;
|
|
80
|
-
|
|
81
74
|
e.preventDefault();
|
|
82
|
-
|
|
75
|
+
innerRef.current?.focus();
|
|
83
76
|
}
|
|
84
77
|
}, [innerRef, multiSelectedValues]);
|
|
85
78
|
React.useEffect(() => {
|
|
@@ -64,14 +64,14 @@ const MenuList = () => {
|
|
|
64
64
|
role: "listbox",
|
|
65
65
|
"data-testid": ComboboxDataTestids.ComboboxDataTestid.LIST,
|
|
66
66
|
style: {
|
|
67
|
-
height: virtualListHelpers
|
|
67
|
+
height: virtualListHelpers?.totalSize,
|
|
68
68
|
margin: inline ? '0px' : '8px 0px'
|
|
69
69
|
}
|
|
70
70
|
}, void 0, ItemRenderer)
|
|
71
71
|
}) : _StyledNoResultsWrapp || (_StyledNoResultsWrapp = /*#__PURE__*/_jsx__default["default"](styled.StyledNoResultsWrapper, {
|
|
72
72
|
role: "alert"
|
|
73
73
|
}, void 0, noOptionsMessage))]
|
|
74
|
-
}, width), [wrapperListRef, inline, preventLoseInputFocus, width, menuMinWidth, withHeader, filteredOptions.length, onCreate, menuMaxHeight, listRef, virtualListHelpers
|
|
74
|
+
}, width), [wrapperListRef, inline, preventLoseInputFocus, width, menuMinWidth, withHeader, filteredOptions.length, onCreate, menuMaxHeight, listRef, virtualListHelpers?.totalSize, ItemRenderer, noOptionsMessage]);
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
exports.MenuList = MenuList;
|
|
@@ -2,46 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
11
|
-
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
13
|
-
const StyledListWrapper = dsSystem.styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n min-width: ", ";\n width: ", ";\n background-color: #ffffff;\n max-height: ", ";\n z-index: 100;\n"])), _ref => {
|
|
7
|
+
const StyledListWrapper = dsSystem.styled.div`
|
|
8
|
+
min-width: ${_ref => {
|
|
14
9
|
let {
|
|
15
10
|
inline,
|
|
16
11
|
minWidth
|
|
17
12
|
} = _ref;
|
|
18
|
-
return inline ? '100%' :
|
|
19
|
-
}
|
|
13
|
+
return inline ? '100%' : `${minWidth}px`;
|
|
14
|
+
}};
|
|
15
|
+
width: ${_ref2 => {
|
|
20
16
|
let {
|
|
21
17
|
width
|
|
22
18
|
} = _ref2;
|
|
23
|
-
return
|
|
24
|
-
}
|
|
19
|
+
return `${width}px`;
|
|
20
|
+
}};
|
|
21
|
+
background-color: #ffffff;
|
|
22
|
+
max-height: ${_ref3 => {
|
|
25
23
|
let {
|
|
26
24
|
maxHeight
|
|
27
25
|
} = _ref3;
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
return `${maxHeight}px`;
|
|
27
|
+
}};
|
|
28
|
+
z-index: 100;
|
|
29
|
+
`;
|
|
30
|
+
const StyledList = dsSystem.styled.ul`
|
|
31
|
+
position: relative;
|
|
32
|
+
padding: 0;
|
|
33
|
+
background-color: #ffffff;
|
|
34
|
+
overflow-x: hidden;
|
|
35
|
+
`;
|
|
36
|
+
const StyledVirtualListWrapper = dsSystem.styled.div`
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
margin-top: ${_ref4 => {
|
|
32
39
|
let {
|
|
33
40
|
withHeader
|
|
34
41
|
} = _ref4;
|
|
35
42
|
return withHeader ? '28px' : '';
|
|
36
|
-
}
|
|
43
|
+
}};
|
|
44
|
+
max-height: ${_ref5 => {
|
|
37
45
|
let {
|
|
38
46
|
maxHeight
|
|
39
47
|
} = _ref5;
|
|
40
|
-
return maxHeight ?
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
48
|
+
return maxHeight ? `${maxHeight}px` : '300px';
|
|
49
|
+
}};
|
|
50
|
+
`;
|
|
51
|
+
const StyledCreatableLabel = dsSystem.styled.span`
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
font-style: italic;
|
|
54
|
+
`;
|
|
55
|
+
const StyledCreatableValue = dsSystem.styled.span`
|
|
56
|
+
word-break: break-all;
|
|
57
|
+
`;
|
|
58
|
+
const StyledNoResultsWrapper = dsSystem.styled.div`
|
|
59
|
+
padding: 16px;
|
|
60
|
+
`;
|
|
45
61
|
|
|
46
62
|
exports.StyledCreatableLabel = StyledCreatableLabel;
|
|
47
63
|
exports.StyledCreatableValue = StyledCreatableValue;
|
|
@@ -91,9 +91,9 @@ const useItemRenderer = () => {
|
|
|
91
91
|
top: 0,
|
|
92
92
|
left: 0,
|
|
93
93
|
width: '100%',
|
|
94
|
-
transform:
|
|
94
|
+
transform: `translateY(${vItem.start}px)`
|
|
95
95
|
},
|
|
96
|
-
key:
|
|
96
|
+
key: `${option.dsId}`,
|
|
97
97
|
innerRef: vItem.measureRef
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -135,7 +135,7 @@ const useItemRenderer = () => {
|
|
|
135
135
|
cols: ['min-content', 'auto'],
|
|
136
136
|
gutter: "xxs",
|
|
137
137
|
alignItems: "center"
|
|
138
|
-
}, void 0, _StyledCreatableLabel || (_StyledCreatableLabel = /*#__PURE__*/_jsx__default["default"](styled.StyledCreatableLabel, {}, void 0, "Add:")), /*#__PURE__*/_jsx__default["default"](styled.StyledCreatableValue, {}, void 0, "
|
|
138
|
+
}, void 0, _StyledCreatableLabel || (_StyledCreatableLabel = /*#__PURE__*/_jsx__default["default"](styled.StyledCreatableLabel, {}, void 0, "Add:")), /*#__PURE__*/_jsx__default["default"](styled.StyledCreatableValue, {}, void 0, `"${label}"`));
|
|
139
139
|
},
|
|
140
140
|
label: option.label,
|
|
141
141
|
onClick: handleOnCreateClick
|
|
@@ -39,7 +39,7 @@ const MultiSelectedValuesContainer = () => {
|
|
|
39
39
|
}, pill.dsId)), multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
|
|
40
40
|
size: "s",
|
|
41
41
|
labelTruncated: false,
|
|
42
|
-
label:
|
|
42
|
+
label: `+${multiSelectedValue.length - correctPillsToShow}`,
|
|
43
43
|
type: "value",
|
|
44
44
|
disabled: disabled
|
|
45
45
|
}, "grouped"))), [pillGroupRef, multiSelectedValue, correctPillsToShow, disabled]);
|
|
@@ -31,12 +31,10 @@ const RemovableSelectedValuePill = props => {
|
|
|
31
31
|
type: disabled ? 'value' : 'removable',
|
|
32
32
|
tabIndex: -1,
|
|
33
33
|
onRemove: e => {
|
|
34
|
-
var _innerRef$current;
|
|
35
|
-
|
|
36
34
|
// preventing the menu to be opened
|
|
37
35
|
e.stopPropagation();
|
|
38
36
|
onChange(listHelper.getSuggestedValueOnChange(pill, selectedValues), pill, e);
|
|
39
|
-
|
|
37
|
+
innerRef.current?.focus();
|
|
40
38
|
}
|
|
41
39
|
}, pill.value);
|
|
42
40
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
5
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
6
|
require('core-js/modules/esnext.iterator.map.js');
|
|
8
7
|
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
@@ -53,7 +52,7 @@ const useGroupPills = () => {
|
|
|
53
52
|
let currentWidth = 0;
|
|
54
53
|
const referenceWidth = selectedOptionsRef.current.offsetWidth;
|
|
55
54
|
const pills = [...pillGroupRef.current.querySelectorAll(disabled ? '.ds-pill-wrapper-value' : '.ds-pill-wrapper-removable')];
|
|
56
|
-
const pillsWidth = pills.map(pill => pill
|
|
55
|
+
const pillsWidth = pills.map(pill => pill?.offsetWidth);
|
|
57
56
|
pillsWidth.forEach((pillWidth, idx) => {
|
|
58
57
|
currentWidth += pillWidth;
|
|
59
58
|
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
5
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const StyledA11ySelectedValues = dsSystem.styled.span`
|
|
8
|
+
width: 1px;
|
|
9
|
+
height: 1px;
|
|
10
|
+
position: absolute;
|
|
11
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
12
|
+
`;
|
|
14
13
|
|
|
15
14
|
exports.StyledA11ySelectedValues = StyledA11ySelectedValues;
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var constants = require('./constants.js');
|
|
6
6
|
|
|
7
|
-
const isSeparator = el =>
|
|
8
|
-
const isOption = el =>
|
|
7
|
+
const isSeparator = el => el?.type === constants.MENU_OPTION_TYPES.SEPARATOR;
|
|
8
|
+
const isOption = el => el?.type === constants.MENU_OPTION_TYPES.OPTION;
|
|
9
9
|
|
|
10
10
|
exports.isOption = isOption;
|
|
11
11
|
exports.isSeparator = isSeparator;
|