@elliemae/ds-form 2.0.0-rc.9 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Checkbox/DSCheckbox.js +2 -2
- package/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/cjs/ComboBox/v1/DSComboBox.js +20 -24
- package/cjs/ComboBox/v1/components/AllOption.js +2 -2
- package/cjs/ComboBox/v1/components/Control.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v1/components/MenuList.js +2 -2
- package/cjs/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v1/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v1/components/ValueContainer.js +2 -2
- package/cjs/ComboBox/v1/withSelectStringValueConverter.js +5 -6
- package/cjs/ComboBox/v2/Combobox.js +2 -2
- package/cjs/ComboBox/v2/components/AllOption.js +2 -2
- package/cjs/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/Content.js +2 -2
- package/cjs/ComboBox/v2/components/Control.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOption.js +2 -2
- package/cjs/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/cjs/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/cjs/ComboBox/v2/components/GroupHeading.js +2 -2
- package/cjs/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/cjs/ComboBox/v2/components/MenuList.js +2 -2
- package/cjs/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBox/v2/components/SelectMenu.js +2 -2
- package/cjs/ComboBox/v2/components/ValueContainer.js +2 -2
- package/cjs/ComboBox/v3/ComboBoxCTX.js +16 -17
- package/cjs/ComboBox/v3/config/useComboBox.js +8 -8
- package/cjs/ComboBox/v3/parts/container/Container.js +1 -1
- package/cjs/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
- package/cjs/ComboBox/v3/parts/controls-input/useControlsInput.js +8 -8
- package/cjs/ComboBox/v3/parts/header-list/HeaderList.js +5 -3
- package/cjs/ComboBox/v3/parts/menu-list/MenuList.js +7 -8
- package/cjs/ComboBox/v3/parts/menu-list/styled.js +8 -4
- package/cjs/ComboBox/v3/parts/menu-list/useItemRenderer.js +12 -11
- package/cjs/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +5 -5
- package/cjs/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
- package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/cjs/DateInput/DSDateInput.js +2 -2
- package/cjs/DateInput/components/DateInputImpl.js +2 -2
- package/cjs/DateInput/components/DateInputs.js +2 -2
- package/cjs/DateInputV2/components/DateInputs.js +2 -2
- package/cjs/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/cjs/FloatingLabelInput/FloatingLabelInputImpl.js +6 -9
- package/cjs/FormItem/DSFormItemLayout.js +2 -2
- package/cjs/FormItem/ValidationFieldWrapper.js +4 -5
- package/cjs/Input/DSInput.js +2 -2
- package/cjs/Input/InputAddonWrapper.js +4 -5
- package/cjs/Input/InputImpl.js +18 -20
- package/cjs/InputGroup/AddonWrapper.js +6 -8
- package/cjs/InputMask/DSInputMask.js +2 -2
- package/cjs/InputMask/DSInputMaskDeprecated.js +12 -14
- package/cjs/InputMask/MaskTypes.js +2 -2
- package/cjs/InputMask/mask_types/DateInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/cjs/InputMask/mask_types/NumberInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/cjs/InputMask/mask_types/SsnInputMask.js +2 -2
- package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/cjs/InputMask/mask_types/index.js +2 -2
- package/cjs/InputProtected/DSInputProtected.js +2 -2
- package/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/cjs/MenuItem/components/SubmenuItem/index.js +2 -2
- package/cjs/Radio/DSRadio.js +2 -2
- package/cjs/RadioGroup/DSRadioGroup.js +2 -2
- package/cjs/SearchBox/NavSearchBox.js +5 -1
- package/cjs/SearchBox/SearchBoxToggle.js +2 -2
- package/cjs/SearchBox/withSearchable.js +5 -7
- package/cjs/TextBox/DSTextBox.js +2 -2
- package/cjs/TimeInput/DSTimeInput.js +2 -2
- package/cjs/TimeInput/TimeInputImpl.js +2 -2
- package/cjs/TimeInput/TimeInputs.js +2 -2
- package/cjs/Toggle/DSToggle.js +2 -2
- package/cjs/Toggle/DSToggleImpl.js +30 -30
- package/cjs/Toggle/DSToggleRender.js +2 -2
- package/esm/Checkbox/DSCheckbox.js +2 -2
- package/esm/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/esm/ComboBox/v1/DSComboBox.js +19 -23
- package/esm/ComboBox/v1/components/AllOption.js +2 -2
- package/esm/ComboBox/v1/components/Control.js +2 -2
- package/esm/ComboBox/v1/components/CustomOption.js +2 -2
- package/esm/ComboBox/v1/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v1/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v1/components/MenuList.js +2 -2
- package/esm/ComboBox/v1/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v1/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v1/components/ValueContainer.js +2 -2
- package/esm/ComboBox/v1/withSelectStringValueConverter.js +5 -6
- package/esm/ComboBox/v2/Combobox.js +2 -2
- package/esm/ComboBox/v2/components/AllOption.js +2 -2
- package/esm/ComboBox/v2/components/ClearIndicator.js +2 -2
- package/esm/ComboBox/v2/components/Content.js +2 -2
- package/esm/ComboBox/v2/components/Control.js +2 -2
- package/esm/ComboBox/v2/components/CustomOption.js +2 -2
- package/esm/ComboBox/v2/components/CustomOptionMulti.js +2 -2
- package/esm/ComboBox/v2/components/DropdownIndicator.js +2 -2
- package/esm/ComboBox/v2/components/GroupHeading.js +2 -2
- package/esm/ComboBox/v2/components/IndicatorSeparator.js +2 -2
- package/esm/ComboBox/v2/components/MenuList.js +2 -2
- package/esm/ComboBox/v2/components/MultiValueRemove.js +2 -2
- package/esm/ComboBox/v2/components/SelectMenu.js +2 -2
- package/esm/ComboBox/v2/components/ValueContainer.js +2 -2
- package/esm/ComboBox/v3/ComboBoxCTX.js +5 -6
- package/esm/ComboBox/v3/config/useComboBox.js +8 -8
- package/esm/ComboBox/v3/parts/container/Container.js +1 -1
- package/esm/ComboBox/v3/parts/controls-input/ControlsInput.js +5 -3
- package/esm/ComboBox/v3/parts/controls-input/useControlsInput.js +8 -8
- package/esm/ComboBox/v3/parts/header-list/HeaderList.js +5 -3
- package/esm/ComboBox/v3/parts/menu-list/MenuList.js +8 -9
- package/esm/ComboBox/v3/parts/menu-list/styled.js +8 -4
- package/esm/ComboBox/v3/parts/menu-list/useItemRenderer.js +12 -11
- package/esm/ComboBox/v3/utils/hooks/useKeyboardNavigation.js +5 -5
- package/esm/ComboBox/v3/utils/hooks/useOnElementResize.js +4 -4
- package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +2 -2
- package/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValue.js +2 -2
- package/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/esm/DateInput/DSDateInput.js +2 -2
- package/esm/DateInput/components/DateInputImpl.js +2 -2
- package/esm/DateInput/components/DateInputs.js +2 -2
- package/esm/DateInputV2/components/DateInputs.js +2 -2
- package/esm/ExpandableInput/ExpandableInputImpl.js +2 -2
- package/esm/FloatingLabelInput/FloatingLabelInputImpl.js +6 -9
- package/esm/FormItem/DSFormItemLayout.js +2 -2
- package/esm/FormItem/ValidationFieldWrapper.js +4 -5
- package/esm/Input/DSInput.js +2 -2
- package/esm/Input/InputAddonWrapper.js +4 -5
- package/esm/Input/InputImpl.js +17 -19
- package/esm/InputGroup/AddonWrapper.js +7 -9
- package/esm/InputMask/DSInputMask.js +2 -2
- package/esm/InputMask/DSInputMaskDeprecated.js +12 -14
- package/esm/InputMask/MaskTypes.js +2 -2
- package/esm/InputMask/mask_types/DateInputMask.js +2 -2
- package/esm/InputMask/mask_types/DateTimeInputMask.js +2 -2
- package/esm/InputMask/mask_types/DictionaryInputMask.js +2 -2
- package/esm/InputMask/mask_types/NumberInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInputMask.js +2 -2
- package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +2 -2
- package/esm/InputMask/mask_types/SsnInputMask.js +2 -2
- package/esm/InputMask/mask_types/UsZipCodeInputMask.js +2 -2
- package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +2 -2
- package/esm/InputMask/mask_types/index.js +2 -2
- package/esm/InputProtected/DSInputProtected.js +2 -2
- package/esm/LargeInputText/DSLargeInputText.js +2 -2
- package/esm/MenuItem/components/SubmenuItem/index.js +2 -2
- package/esm/Radio/DSRadio.js +2 -2
- package/esm/RadioGroup/DSRadioGroup.js +2 -2
- package/esm/SearchBox/NavSearchBox.js +5 -1
- package/esm/SearchBox/SearchBoxToggle.js +2 -2
- package/esm/SearchBox/withSearchable.js +4 -6
- package/esm/TextBox/DSTextBox.js +2 -2
- package/esm/TimeInput/DSTimeInput.js +2 -2
- package/esm/TimeInput/TimeInputImpl.js +2 -2
- package/esm/TimeInput/TimeInputs.js +2 -2
- package/esm/Toggle/DSToggle.js +2 -2
- package/esm/Toggle/DSToggleImpl.js +30 -30
- package/esm/Toggle/DSToggleRender.js +2 -2
- package/package.json +24 -28
- package/types/ComboBox/v3/parts/controls-input/useControlsInput.d.ts +3 -3
- package/types/ComboBox/v3/parts/menu-list/styled.d.ts +4 -3
- package/types/ComboBox/v3/parts/menu-list/useItemRenderer.d.ts +1 -1
- package/types/ComboBox/v3/utils/hooks/useKeyboardNavigation.d.ts +4 -1
- package/types/ComboBox/v3/utils/listHelper.d.ts +1 -1
- package/types/SearchBox/index.d.ts +1 -1
- package/cjs/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -31
- package/esm/ComboBox/v3/utils/hooks/useOnWindowResize.js +0 -27
- package/types/ComboBox/v3/utils/hooks/useOnWindowResize.d.ts +0 -5
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
|
|
8
|
-
// Taken and modified from https://stackoverflow.com/a/60218754
|
|
9
|
-
|
|
10
|
-
const useDimensions = targetRef => {
|
|
11
|
-
const queryDimension = React.useCallback(dimension => targetRef.current ? targetRef.current[dimension] : 0, []);
|
|
12
|
-
const [width, setWidth] = React.useState(targetRef.current ? targetRef.current.offsetWidth : 0);
|
|
13
|
-
const [height, setHeight] = React.useState(targetRef.current ? targetRef.current.offsetWidth : 0);
|
|
14
|
-
const handleResize = React.useCallback(() => {
|
|
15
|
-
setWidth(queryDimension('offsetWidth'));
|
|
16
|
-
setHeight(queryDimension('offsetHeight'));
|
|
17
|
-
}, []);
|
|
18
|
-
React.useEffect(() => {
|
|
19
|
-
window.addEventListener('resize', handleResize);
|
|
20
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
21
|
-
}, []);
|
|
22
|
-
React.useLayoutEffect(() => {
|
|
23
|
-
handleResize();
|
|
24
|
-
}, []);
|
|
25
|
-
return React.useMemo(() => ({
|
|
26
|
-
width,
|
|
27
|
-
height
|
|
28
|
-
}), [width, height]);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.useDimensions = useDimensions;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import { useCallback, useState, useEffect, useLayoutEffect, useMemo } from 'react';
|
|
3
|
-
|
|
4
|
-
// Taken and modified from https://stackoverflow.com/a/60218754
|
|
5
|
-
|
|
6
|
-
const useDimensions = targetRef => {
|
|
7
|
-
const queryDimension = useCallback(dimension => targetRef.current ? targetRef.current[dimension] : 0, []);
|
|
8
|
-
const [width, setWidth] = useState(targetRef.current ? targetRef.current.offsetWidth : 0);
|
|
9
|
-
const [height, setHeight] = useState(targetRef.current ? targetRef.current.offsetWidth : 0);
|
|
10
|
-
const handleResize = useCallback(() => {
|
|
11
|
-
setWidth(queryDimension('offsetWidth'));
|
|
12
|
-
setHeight(queryDimension('offsetHeight'));
|
|
13
|
-
}, []);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
window.addEventListener('resize', handleResize);
|
|
16
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
17
|
-
}, []);
|
|
18
|
-
useLayoutEffect(() => {
|
|
19
|
-
handleResize();
|
|
20
|
-
}, []);
|
|
21
|
-
return useMemo(() => ({
|
|
22
|
-
width,
|
|
23
|
-
height
|
|
24
|
-
}), [width, height]);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { useDimensions };
|