@elliemae/ds-controlled-form 2.3.0-next.13 → 2.3.0-next.17
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/controlled-checkbox/ControlledCheckbox.js +8 -4
- package/cjs/controlled-mask-hook/hooks/index.js +10 -0
- package/cjs/controlled-mask-hook/hooks/usePhoneMask.js +72 -0
- package/cjs/controlled-mask-hook/index.js +10 -0
- package/cjs/controlled-mask-hook/react-desc-prop-types.js +19 -0
- package/cjs/controlled-mask-hook/utils/addSpecialCharacters.js +50 -0
- package/cjs/controlled-mask-hook/utils/getPartialMaskedPos.js +15 -0
- package/cjs/controlled-mask-hook/utils/index.js +13 -0
- package/cjs/controlled-mask-hook/utils/setCursorPosition.js +9 -0
- package/cjs/controlled-text-input/DSInputText.js +89 -0
- package/cjs/controlled-text-input/config/useInputText.js +54 -0
- package/cjs/controlled-text-input/exported-related/data-test-ids.js +10 -0
- package/cjs/controlled-text-input/exported-related/index.js +12 -0
- package/cjs/controlled-text-input/exported-related/theming.js +13 -0
- package/cjs/controlled-text-input/index.js +15 -0
- package/cjs/controlled-text-input/react-desc-prop-types.js +45 -0
- package/cjs/controlled-text-input/styled/borders.js +33 -0
- package/cjs/controlled-text-input/styled/components.js +38 -0
- package/cjs/index.js +17 -6
- package/esm/controlled-checkbox/ControlledCheckbox.js +8 -4
- package/esm/controlled-mask-hook/hooks/index.js +1 -0
- package/esm/controlled-mask-hook/hooks/usePhoneMask.js +67 -0
- package/esm/controlled-mask-hook/index.js +1 -0
- package/esm/controlled-mask-hook/react-desc-prop-types.js +14 -0
- package/esm/controlled-mask-hook/utils/addSpecialCharacters.js +46 -0
- package/esm/controlled-mask-hook/utils/getPartialMaskedPos.js +11 -0
- package/esm/controlled-mask-hook/utils/index.js +3 -0
- package/esm/controlled-mask-hook/utils/setCursorPosition.js +5 -0
- package/esm/controlled-text-input/DSInputText.js +78 -0
- package/esm/controlled-text-input/config/useInputText.js +50 -0
- package/esm/controlled-text-input/exported-related/data-test-ids.js +6 -0
- package/esm/controlled-text-input/exported-related/index.js +2 -0
- package/esm/controlled-text-input/exported-related/theming.js +8 -0
- package/esm/controlled-text-input/index.js +3 -0
- package/esm/controlled-text-input/react-desc-prop-types.js +36 -0
- package/esm/controlled-text-input/styled/borders.js +24 -0
- package/esm/controlled-text-input/styled/components.js +28 -0
- package/esm/index.js +6 -2
- package/package.json +79 -10
- package/types/controlled-autocomplete/parts/controls/styled.d.ts +1 -1
- package/types/controlled-checkbox/react-desc-prop-types.d.ts +1 -0
- package/types/controlled-combobox/parts/controls/styled.d.ts +2 -2
- package/types/controlled-combobox/parts/dropdown-indicator/styled.d.ts +1 -1
- package/types/controlled-date-time-picker/parts/Pickers/Calendar/Styleds.d.ts +4 -4
- package/types/controlled-date-time-picker/parts/Pickers/CalendarWithTimeWheel/Styleds.d.ts +1 -1
- package/types/controlled-date-time-picker/parts/Pickers/TimeWheel/Styleds.d.ts +4 -4
- package/types/controlled-date-time-picker/parts/Styleds.d.ts +6 -6
- package/types/controlled-mask-hook/hooks/index.d.ts +1 -0
- package/types/controlled-mask-hook/hooks/usePhoneMask.d.ts +3 -0
- package/types/controlled-mask-hook/index.d.ts +2 -0
- package/types/controlled-mask-hook/react-desc-prop-types.d.ts +17 -0
- package/types/controlled-mask-hook/tests/usePhoneMask.test.d.ts +1 -0
- package/types/controlled-mask-hook/utils/addSpecialCharacters.d.ts +9 -0
- package/types/controlled-mask-hook/utils/getPartialMaskedPos.d.ts +1 -0
- package/types/controlled-mask-hook/utils/index.d.ts +3 -0
- package/types/controlled-mask-hook/utils/setCursorPosition.d.ts +1 -0
- package/types/controlled-text-input/DSInputText.d.ts +4 -0
- package/types/controlled-text-input/config/useInputText.d.ts +434 -0
- package/types/controlled-text-input/exported-related/data-test-ids.d.ts +4 -0
- package/types/controlled-text-input/exported-related/index.d.ts +2 -0
- package/types/controlled-text-input/exported-related/theming.d.ts +6 -0
- package/types/controlled-text-input/index.d.ts +2 -0
- package/types/controlled-text-input/react-desc-prop-types.d.ts +20 -0
- package/types/controlled-text-input/styled/borders.d.ts +10 -0
- package/types/controlled-text-input/styled/components.d.ts +3 -0
- package/types/controlled-text-input/tests/DSInput.events.test.d.ts +1 -0
- package/types/controlled-text-input/tests/DSInput.keyboard.test.d.ts +1 -0
- package/types/controlled-text-input/tests/DSInput.test.d.ts +1 -0
- package/types/index.d.ts +4 -2
|
@@ -15,7 +15,7 @@ import { setMultipleRefs } from './utils/setMultipleRefs.js';
|
|
|
15
15
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
|
-
const _excluded = ["id", "disabled", "readOnly", "label", "aria-label", "aria-controls", "onKeyDown"];
|
|
18
|
+
const _excluded = ["id", "disabled", "readOnly", "label", "aria-label", "aria-controls", "onKeyDown", "className"];
|
|
19
19
|
|
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
@@ -32,7 +32,8 @@ const DSControlledCheckbox = props => {
|
|
|
32
32
|
innerRef,
|
|
33
33
|
tabIndex,
|
|
34
34
|
ariaLabel: legacyAriaLabel,
|
|
35
|
-
ariaControls: legacyAriaControls
|
|
35
|
+
ariaControls: legacyAriaControls,
|
|
36
|
+
'data-testid': dataTestid = 'ds-checkbox-container'
|
|
36
37
|
} = propsWithDefault;
|
|
37
38
|
const handleOnKeyDown = useCallback(e => {
|
|
38
39
|
if (checkboxRef.current && e.key === 'Enter') {
|
|
@@ -50,18 +51,21 @@ const DSControlledCheckbox = props => {
|
|
|
50
51
|
label: globalLabel,
|
|
51
52
|
'aria-label': ariaLabel,
|
|
52
53
|
'aria-controls': ariaControls,
|
|
53
|
-
onKeyDown
|
|
54
|
+
onKeyDown,
|
|
55
|
+
className
|
|
54
56
|
} = _useGetGlobalAttribut,
|
|
55
57
|
restGlobals = _objectWithoutProperties(_useGetGlobalAttribut, _excluded);
|
|
56
58
|
|
|
57
59
|
return /*#__PURE__*/_jsx(StyledContainer, {
|
|
58
|
-
"data-testid":
|
|
60
|
+
"data-testid": dataTestid,
|
|
61
|
+
className: className
|
|
59
62
|
}, void 0, /*#__PURE__*/_jsx(StyledCheckBox, {
|
|
60
63
|
checked: checked,
|
|
61
64
|
hasError: hasError,
|
|
62
65
|
disabled: disabled,
|
|
63
66
|
readOnly: readOnly
|
|
64
67
|
}, void 0, /*#__PURE__*/jsx(StyledInput, _objectSpread(_objectSpread({}, restGlobals), {}, {
|
|
68
|
+
"data-testid": "ds-checkbox",
|
|
65
69
|
id: id,
|
|
66
70
|
ref: ref => setMultipleRefs([checkboxRef, innerRef])(ref),
|
|
67
71
|
onKeyDown: handleOnKeyDown,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UsePhoneMaskWithSchema, usePhoneMask } from './usePhoneMask.js';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import { useRef, useState, useCallback } from 'react';
|
|
6
|
+
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
7
|
+
import { useCallbackAfterRender } from '@elliemae/ds-utilities';
|
|
8
|
+
import { addSpecialCharacters } from '../utils/addSpecialCharacters.js';
|
|
9
|
+
import { getPartialMaskedPos } from '../utils/getPartialMaskedPos.js';
|
|
10
|
+
import { setCursorPosition } from '../utils/setCursorPosition.js';
|
|
11
|
+
import { DSMaskHookPropsTypes, DSMaskHookDefaultProps } from '../react-desc-prop-types.js';
|
|
12
|
+
|
|
13
|
+
const phoneSpecialChars = [['(', 0], [') ', 4], ['-', 9]];
|
|
14
|
+
|
|
15
|
+
const conformValue = (rawValue, cursorPos, lastKeyCode) => {
|
|
16
|
+
// Work with digits only
|
|
17
|
+
let maskedValue = rawValue.split('').filter(char => char >= '0' && char <= '9'); // We can't have zeros at the start of the array
|
|
18
|
+
|
|
19
|
+
while (maskedValue.length && maskedValue[0] === '0') maskedValue.splice(0, 1); // We only consider first 10 digits
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
maskedValue = maskedValue.slice(0, 10);
|
|
23
|
+
const maskedPos = getPartialMaskedPos(rawValue, maskedValue, cursorPos);
|
|
24
|
+
return addSpecialCharacters(maskedValue, phoneSpecialChars, maskedPos, lastKeyCode);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const usePhoneMask = props => {
|
|
28
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, DSMaskHookDefaultProps);
|
|
29
|
+
useValidateTypescriptPropTypes(propsWithDefault, DSMaskHookPropsTypes);
|
|
30
|
+
const {
|
|
31
|
+
valueSetter,
|
|
32
|
+
onChange: userOnChange,
|
|
33
|
+
onKeyDown: userOnKeyDown
|
|
34
|
+
} = propsWithDefault;
|
|
35
|
+
const lastKeyCode = useRef('Unidentified');
|
|
36
|
+
const scheduleAfterRender = useCallbackAfterRender(); // Some times, the value of the mask is not gonna change (user types invalid char for example)
|
|
37
|
+
// This makes the input to go from "correct" -> "incorrect" -> "correct"
|
|
38
|
+
// But since the input is controlled, the input does not re-render
|
|
39
|
+
// This makes the input go mumbo-jumbo and places the cursor in the end, because we kinda changed the value async
|
|
40
|
+
// Solution for this is to trigger a re-render, we do this with a set state call in the on change event
|
|
41
|
+
|
|
42
|
+
const [, setKey] = useState(0);
|
|
43
|
+
const onKeyDown = useCallback(e => {
|
|
44
|
+
lastKeyCode.current = e.code;
|
|
45
|
+
if (userOnKeyDown) userOnKeyDown(e);
|
|
46
|
+
}, [userOnKeyDown]);
|
|
47
|
+
const onChange = useCallback(e => {
|
|
48
|
+
var _e$target$selectionEn;
|
|
49
|
+
|
|
50
|
+
const [mask, cursorPos] = conformValue(e.target.value, (_e$target$selectionEn = e.target.selectionEnd) !== null && _e$target$selectionEn !== void 0 ? _e$target$selectionEn : 0, lastKeyCode.current);
|
|
51
|
+
valueSetter(prevMask => {
|
|
52
|
+
// Here we need to update the key
|
|
53
|
+
if (mask === prevMask) setKey(key => key + 1);
|
|
54
|
+
return mask;
|
|
55
|
+
});
|
|
56
|
+
if (userOnChange) userOnChange(e, mask);
|
|
57
|
+
scheduleAfterRender(() => setCursorPosition(e.target, cursorPos));
|
|
58
|
+
}, [valueSetter, scheduleAfterRender, userOnChange]);
|
|
59
|
+
return {
|
|
60
|
+
onKeyDown,
|
|
61
|
+
onChange
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const UsePhoneMaskWithSchema = describe(usePhoneMask);
|
|
65
|
+
UsePhoneMaskWithSchema.propTypes = DSMaskHookPropsTypes;
|
|
66
|
+
|
|
67
|
+
export { UsePhoneMaskWithSchema, usePhoneMask };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UsePhoneMaskWithSchema, usePhoneMask } from './hooks/usePhoneMask.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropTypes } from '@elliemae/ds-props-helpers';
|
|
2
|
+
|
|
3
|
+
const DSMaskHookDefaultProps = {
|
|
4
|
+
onChange: () => null,
|
|
5
|
+
onKeyDown: () => null,
|
|
6
|
+
onBlur: () => null
|
|
7
|
+
};
|
|
8
|
+
const DSMaskHookPropsTypes = {
|
|
9
|
+
valueSetter: PropTypes.func.description('React set state function for the value').isRequired,
|
|
10
|
+
onChange: PropTypes.func.description('Callback for onChange'),
|
|
11
|
+
onKeyDown: PropTypes.func.description('Callback for onKeyDown')
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { DSMaskHookDefaultProps, DSMaskHookPropsTypes };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
|
|
6
|
+
/* eslint-disable max-params */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {string[]} maskWithoutSpecialChars An array of characters with the unfinished mask
|
|
11
|
+
* @param {[string, number][]} specialCharsDescr An array of tuples. Each tuple contains a string and a position (What string to add in a particular position)
|
|
12
|
+
* @param {number} maskedPos Current masked position
|
|
13
|
+
* @param {string} lastKeyCode Last key code of the user
|
|
14
|
+
* @returns {[string, number]} A tuple containing the final mask and the final masked position
|
|
15
|
+
*/
|
|
16
|
+
const addSpecialCharacters = (maskWithoutSpecialChars, specialCharsDescr, maskedPos, lastKeyCode) => {
|
|
17
|
+
const finalMask = maskWithoutSpecialChars;
|
|
18
|
+
let finalMaskedPos = maskedPos; // We insert the special chars in the respective positions, tweaking the masked pos
|
|
19
|
+
|
|
20
|
+
specialCharsDescr.forEach(_ref => {
|
|
21
|
+
let [chars, pos] = _ref;
|
|
22
|
+
|
|
23
|
+
if (finalMask.length > pos) {
|
|
24
|
+
finalMask.splice(pos, 0, ...chars);
|
|
25
|
+
if (finalMaskedPos >= pos) finalMaskedPos += chars.length;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (lastKeyCode !== 'Backspace' && finalMaskedPos < finalMask.length) {
|
|
30
|
+
// If not erasing, move the cursor forward if we are in a special chars area
|
|
31
|
+
specialCharsDescr.forEach(_ref2 => {
|
|
32
|
+
let [chars, pos] = _ref2;
|
|
33
|
+
if (finalMaskedPos === pos) finalMaskedPos += chars.length;
|
|
34
|
+
});
|
|
35
|
+
} else if (lastKeyCode === 'Backspace' && finalMaskedPos) {
|
|
36
|
+
// If erasing, move the cursor back if we are in a special chars area
|
|
37
|
+
specialCharsDescr.forEach(_ref3 => {
|
|
38
|
+
let [chars, pos] = _ref3;
|
|
39
|
+
if (pos + 1 <= finalMaskedPos && finalMaskedPos <= pos + chars.length) finalMaskedPos = pos;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return [finalMask.join(''), finalMaskedPos];
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { addSpecialCharacters };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const getPartialMaskedPos = (rawValue, maskWithoutSpecialChars, cursorPos) => {
|
|
2
|
+
let maskedPos = 0;
|
|
3
|
+
|
|
4
|
+
for (let i = 0; i < cursorPos; i += 1) {
|
|
5
|
+
if (maskWithoutSpecialChars[maskedPos] === rawValue[i]) maskedPos += 1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return maskedPos;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { getPartialMaskedPos };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'react';
|
|
10
|
+
import { CloseMedium } from '@elliemae/ds-icons';
|
|
11
|
+
import { DSIconColors } from '@elliemae/ds-icon';
|
|
12
|
+
import { describe } from '@elliemae/ds-props-helpers';
|
|
13
|
+
import { useInputText } from './config/useInputText.js';
|
|
14
|
+
import { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';
|
|
15
|
+
import { DSInputTextPropTypes } from './react-desc-prop-types.js';
|
|
16
|
+
import { StyledInputWrapper, StyledInput, StyledClearButton } from './styled/components.js';
|
|
17
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
18
|
+
|
|
19
|
+
const _excluded = ["className"];
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
+
const DSInputText = props => {
|
|
25
|
+
const _useInputText = useInputText(props),
|
|
26
|
+
{
|
|
27
|
+
globalAttributes: {
|
|
28
|
+
className
|
|
29
|
+
},
|
|
30
|
+
hasFocus,
|
|
31
|
+
handlers,
|
|
32
|
+
propsWithDefault,
|
|
33
|
+
xstyledProps
|
|
34
|
+
} = _useInputText,
|
|
35
|
+
otherGlobalAttributes = _objectWithoutProperties(_useInputText.globalAttributes, _excluded);
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
clearable,
|
|
39
|
+
disabled,
|
|
40
|
+
hasError,
|
|
41
|
+
innerRef,
|
|
42
|
+
placeholder,
|
|
43
|
+
readOnly,
|
|
44
|
+
inputSize,
|
|
45
|
+
onClear,
|
|
46
|
+
value
|
|
47
|
+
} = propsWithDefault;
|
|
48
|
+
const shouldDisplayClearButton = clearable && value !== '';
|
|
49
|
+
return /*#__PURE__*/jsxs(StyledInputWrapper, _objectSpread(_objectSpread({
|
|
50
|
+
className: className,
|
|
51
|
+
cols: shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto'],
|
|
52
|
+
isDisabled: disabled,
|
|
53
|
+
isReadOnly: readOnly,
|
|
54
|
+
hasError: hasError,
|
|
55
|
+
hasFocus: hasFocus,
|
|
56
|
+
inputSize: inputSize
|
|
57
|
+
}, xstyledProps), {}, {
|
|
58
|
+
children: [/*#__PURE__*/jsx(StyledInput, _objectSpread(_objectSpread({
|
|
59
|
+
"data-testid": DSInputTextDataTestIds.INPUT,
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
placeholder: placeholder,
|
|
62
|
+
readOnly: readOnly,
|
|
63
|
+
ref: innerRef,
|
|
64
|
+
value: value
|
|
65
|
+
}, handlers), otherGlobalAttributes)), shouldDisplayClearButton && /*#__PURE__*/_jsx(StyledClearButton, {
|
|
66
|
+
"aria-label": "Clear input value",
|
|
67
|
+
buttonType: "icon",
|
|
68
|
+
"data-testid": DSInputTextDataTestIds.CLEAR_BUTTON,
|
|
69
|
+
onClick: onClear
|
|
70
|
+
}, void 0, /*#__PURE__*/_jsx(CloseMedium, {
|
|
71
|
+
color: DSIconColors.PRIMARY
|
|
72
|
+
}))]
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
const DSInputTextWithSchema = describe(DSInputText);
|
|
76
|
+
DSInputTextWithSchema.propTypes = DSInputTextPropTypes;
|
|
77
|
+
|
|
78
|
+
export { DSInputText, DSInputTextWithSchema };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
+
import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';
|
|
3
|
+
import { useState, useCallback, useMemo } from 'react';
|
|
4
|
+
import { defaultProps, DSInputTextPropTypes } from '../react-desc-prop-types.js';
|
|
5
|
+
|
|
6
|
+
const useInputText = props => {
|
|
7
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
8
|
+
useValidateTypescriptPropTypes(props, DSInputTextPropTypes);
|
|
9
|
+
const {
|
|
10
|
+
onValueChange
|
|
11
|
+
} = propsWithDefault; // =============================================================================
|
|
12
|
+
// INTERNAL STATE
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
const [hasFocus, setHasFocus] = useState(false); // ===========================================================================
|
|
16
|
+
// INTERNAL HANDLERS
|
|
17
|
+
// ===========================================================================
|
|
18
|
+
|
|
19
|
+
const handleOnChange = useCallback(e => {
|
|
20
|
+
onValueChange(e.target.value, e);
|
|
21
|
+
}, [onValueChange]);
|
|
22
|
+
const handleOnFocus = useCallback(() => {
|
|
23
|
+
setHasFocus(true);
|
|
24
|
+
}, []);
|
|
25
|
+
const handleOnBlur = useCallback(() => {
|
|
26
|
+
setHasFocus(false);
|
|
27
|
+
}, []); // =============================================================================
|
|
28
|
+
// GLOBAL ATTRIBUTES & XSTYLED PROPS
|
|
29
|
+
// =============================================================================
|
|
30
|
+
|
|
31
|
+
const globalAttributes = useGetGlobalAttributes(propsWithDefault, {
|
|
32
|
+
onChange: handleOnChange,
|
|
33
|
+
onFocus: handleOnFocus,
|
|
34
|
+
onBlur: handleOnBlur
|
|
35
|
+
});
|
|
36
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
37
|
+
return useMemo(() => ({
|
|
38
|
+
globalAttributes,
|
|
39
|
+
hasFocus,
|
|
40
|
+
handlers: {
|
|
41
|
+
onChange: handleOnChange,
|
|
42
|
+
onFocus: handleOnFocus,
|
|
43
|
+
onBlur: handleOnBlur
|
|
44
|
+
},
|
|
45
|
+
propsWithDefault,
|
|
46
|
+
xstyledProps
|
|
47
|
+
}), [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps]);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { useInputText };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';
|
|
8
|
+
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
+
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
const defaultProps = {
|
|
13
|
+
value: '',
|
|
14
|
+
onValueChange: () => null,
|
|
15
|
+
onClear: () => null,
|
|
16
|
+
placeholder: 'Hint Text',
|
|
17
|
+
disabled: false,
|
|
18
|
+
readOnly: false,
|
|
19
|
+
hasError: false,
|
|
20
|
+
innerRef: () => null,
|
|
21
|
+
inputSize: 'm',
|
|
22
|
+
clearable: false
|
|
23
|
+
};
|
|
24
|
+
const DSInputTextPropTypes = _objectSpread(_objectSpread(_objectSpread({}, globalAttributesPropTypes), xstyledPropTypes), {}, {
|
|
25
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.string)]).description('Value of the input').defaultValue(''),
|
|
26
|
+
onChange: PropTypes.func.description('onChange event handler').defaultValue(() => null),
|
|
27
|
+
placeholder: PropTypes.string.description('Value of the placeholder').defaultValue(''),
|
|
28
|
+
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Reference to the input').defaultValue(null),
|
|
29
|
+
disabled: PropTypes.bool.description('Whether the input is disabled').defaultValue(false),
|
|
30
|
+
readOnly: PropTypes.bool.description('Whether the input is readonly').defaultValue(false),
|
|
31
|
+
hasError: PropTypes.bool.description('Whether the input has error').defaultValue(false),
|
|
32
|
+
inputSize: PropTypes.oneOf(['s', 'm']).description('Size of the input').defaultValue('m'),
|
|
33
|
+
clearable: PropTypes.bool.description('Whether the input is clearable').defaultValue(false)
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { DSInputTextPropTypes, defaultProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import { css, th } from '@elliemae/ds-system';
|
|
3
|
+
|
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
5
|
+
const commonBorderCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n"])), th.color('neutral-400'));
|
|
6
|
+
const readOnlyBorderCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid transparent;\n border-top-color: ", ";\n"])), th.color('neutral-400'));
|
|
7
|
+
const disabledBorderCss = commonBorderCss;
|
|
8
|
+
const hasErrorBorderCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n"])), th.color('danger-900'));
|
|
9
|
+
const hoverBorderCss = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n"])), th.color('brand-700'));
|
|
10
|
+
const focusBorderCss = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 1px solid transparent;\n outline: 2px solid ", ";\n outline-offset: -1px;\n"])), th.color('brand-700'));
|
|
11
|
+
const getBorderCss = props => {
|
|
12
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
13
|
+
if (props.hasFocus) return focusBorderCss;
|
|
14
|
+
if (props.hasError) return hasErrorBorderCss;
|
|
15
|
+
if (props.isReadOnly) return readOnlyBorderCss;
|
|
16
|
+
return commonBorderCss;
|
|
17
|
+
};
|
|
18
|
+
const getHoverBorderCss = props => {
|
|
19
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
20
|
+
if (props.hasFocus) return focusBorderCss;
|
|
21
|
+
return hoverBorderCss;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { getBorderCss, getHoverBorderCss };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
2
|
+
import { DSButtonV2 } from '@elliemae/ds-button';
|
|
3
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
4
|
+
import { styled, th } from '@elliemae/ds-system';
|
|
5
|
+
import { layout, space, sizing } from '@xstyled/styled-components';
|
|
6
|
+
import { DSInputTextName, DSInputTextSlots } from '../exported-related/theming.js';
|
|
7
|
+
import { getBorderCss, getHoverBorderCss } from './borders.js';
|
|
8
|
+
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
10
|
+
const StyledInputWrapper = styled(Grid, {
|
|
11
|
+
name: DSInputTextName,
|
|
12
|
+
slot: DSInputTextSlots.INPUT_WRAPPER
|
|
13
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n\n ", "\n border-radius: 2px;\n\n :hover {\n ", "\n }\n\n ", "\n ", "\n ", "\n"])), _ref => {
|
|
14
|
+
let {
|
|
15
|
+
inputSize
|
|
16
|
+
} = _ref;
|
|
17
|
+
return inputSize === 'm' ? '28px' : '24px';
|
|
18
|
+
}, getBorderCss, getHoverBorderCss, layout, space, sizing);
|
|
19
|
+
const StyledInput = styled('input', {
|
|
20
|
+
name: DSInputTextName,
|
|
21
|
+
slot: DSInputTextSlots.INPUT
|
|
22
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 ", ";\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n font-size: 13px;\n\n ::placeholder {\n font-weight: ", ";\n font-style: italic;\n color: ", ";\n }\n\n :disabled {\n background-color: ", ";\n color: #616b7f;\n cursor: not-allowed;\n }\n"])), th.space('xxs'), th.fontWeight('regular'), th.color('neutral-500'), th.color('neutral-080'));
|
|
23
|
+
const StyledClearButton = styled(DSButtonV2, {
|
|
24
|
+
name: DSInputTextName,
|
|
25
|
+
slot: DSInputTextSlots.CLEAR_BUTTON
|
|
26
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 100%;\n min-width: 20px;\n width: 20px;\n &:after {\n border-top-left-radius: 0px !important;\n border-bottom-left-radius: 0px !important;\n }\n :focus {\n border-width: 0px;\n }\n"])));
|
|
27
|
+
|
|
28
|
+
export { StyledClearButton, StyledInput, StyledInputWrapper };
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { DSAutocomplete, DSAutocompleteWithSchema } from './controlled-autocomplete/Autocomplete.js';
|
|
1
2
|
export { DSControlledCheckbox, DSControlledCheckboxWithSchema } from './controlled-checkbox/ControlledCheckbox.js';
|
|
3
|
+
export { DSComboBox, DSComboBoxWithSchema } from './controlled-combobox/ComboBox.js';
|
|
2
4
|
export { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './controlled-date-range-picker/ControlledDateRangePicker.js';
|
|
3
5
|
export { ControlledDateRangePickerDatatestid } from './controlled-date-range-picker/ControlledDateRangePickerDatatestid.js';
|
|
4
6
|
export { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './controlled-date-range-picker/ControlledDateRangePickerTypes.js';
|
|
@@ -9,6 +11,8 @@ export { deconstructValuesFromDateString, prependStringWithPlaceHolders } from '
|
|
|
9
11
|
export { getValidationDateTimeStringMetaInfo } from './controlled-date-time-picker/utils/dateTimeHelpers.js';
|
|
10
12
|
export { getDateStringFromDay, getDateValuesFromDate, getDayFromDateString, getValidationDateStringMetaInfo } from './controlled-date-time-picker/utils/dateHelpers.js';
|
|
11
13
|
export { getValidationTimeStringMetaInfo } from './controlled-date-time-picker/utils/timeHelpers.js';
|
|
14
|
+
export { UsePhoneMaskWithSchema, usePhoneMask } from './controlled-mask-hook/hooks/usePhoneMask.js';
|
|
15
|
+
export { DSInputText, DSInputTextWithSchema } from './controlled-text-input/DSInputText.js';
|
|
16
|
+
export { DSInputTextDataTestIds } from './controlled-text-input/exported-related/data-test-ids.js';
|
|
17
|
+
export { DSInputTextName, DSInputTextSlots } from './controlled-text-input/exported-related/theming.js';
|
|
12
18
|
export { DSControlledToggle, DSControlledToggleWithSchema } from './controlled-toggle/ControlledToggle.js';
|
|
13
|
-
export { DSAutocomplete, DSAutocompleteWithSchema } from './controlled-autocomplete/Autocomplete.js';
|
|
14
|
-
export { DSComboBox, DSComboBoxWithSchema } from './controlled-combobox/ComboBox.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-controlled-form",
|
|
3
|
-
"version": "2.3.0-next.
|
|
3
|
+
"version": "2.3.0-next.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Controllers",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -39,6 +39,74 @@
|
|
|
39
39
|
"import": "./esm/controlled-toggle/ControlledToggle.js",
|
|
40
40
|
"require": "./cjs/controlled-toggle/ControlledToggle.js"
|
|
41
41
|
},
|
|
42
|
+
"./controlled-text-input/styled/components": {
|
|
43
|
+
"import": "./esm/controlled-text-input/styled/components.js",
|
|
44
|
+
"require": "./cjs/controlled-text-input/styled/components.js"
|
|
45
|
+
},
|
|
46
|
+
"./controlled-text-input/styled/borders": {
|
|
47
|
+
"import": "./esm/controlled-text-input/styled/borders.js",
|
|
48
|
+
"require": "./cjs/controlled-text-input/styled/borders.js"
|
|
49
|
+
},
|
|
50
|
+
"./controlled-text-input/react-desc-prop-types": {
|
|
51
|
+
"import": "./esm/controlled-text-input/react-desc-prop-types.js",
|
|
52
|
+
"require": "./cjs/controlled-text-input/react-desc-prop-types.js"
|
|
53
|
+
},
|
|
54
|
+
"./controlled-text-input": {
|
|
55
|
+
"import": "./esm/controlled-text-input/index.js",
|
|
56
|
+
"require": "./cjs/controlled-text-input/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./controlled-text-input/exported-related/theming": {
|
|
59
|
+
"import": "./esm/controlled-text-input/exported-related/theming.js",
|
|
60
|
+
"require": "./cjs/controlled-text-input/exported-related/theming.js"
|
|
61
|
+
},
|
|
62
|
+
"./controlled-text-input/exported-related": {
|
|
63
|
+
"import": "./esm/controlled-text-input/exported-related/index.js",
|
|
64
|
+
"require": "./cjs/controlled-text-input/exported-related/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./controlled-text-input/exported-related/data-test-ids": {
|
|
67
|
+
"import": "./esm/controlled-text-input/exported-related/data-test-ids.js",
|
|
68
|
+
"require": "./cjs/controlled-text-input/exported-related/data-test-ids.js"
|
|
69
|
+
},
|
|
70
|
+
"./controlled-text-input/DSInputText": {
|
|
71
|
+
"import": "./esm/controlled-text-input/DSInputText.js",
|
|
72
|
+
"require": "./cjs/controlled-text-input/DSInputText.js"
|
|
73
|
+
},
|
|
74
|
+
"./controlled-text-input/config/useInputText": {
|
|
75
|
+
"import": "./esm/controlled-text-input/config/useInputText.js",
|
|
76
|
+
"require": "./cjs/controlled-text-input/config/useInputText.js"
|
|
77
|
+
},
|
|
78
|
+
"./controlled-mask-hook/utils/setCursorPosition": {
|
|
79
|
+
"import": "./esm/controlled-mask-hook/utils/setCursorPosition.js",
|
|
80
|
+
"require": "./cjs/controlled-mask-hook/utils/setCursorPosition.js"
|
|
81
|
+
},
|
|
82
|
+
"./controlled-mask-hook/utils": {
|
|
83
|
+
"import": "./esm/controlled-mask-hook/utils/index.js",
|
|
84
|
+
"require": "./cjs/controlled-mask-hook/utils/index.js"
|
|
85
|
+
},
|
|
86
|
+
"./controlled-mask-hook/utils/getPartialMaskedPos": {
|
|
87
|
+
"import": "./esm/controlled-mask-hook/utils/getPartialMaskedPos.js",
|
|
88
|
+
"require": "./cjs/controlled-mask-hook/utils/getPartialMaskedPos.js"
|
|
89
|
+
},
|
|
90
|
+
"./controlled-mask-hook/utils/addSpecialCharacters": {
|
|
91
|
+
"import": "./esm/controlled-mask-hook/utils/addSpecialCharacters.js",
|
|
92
|
+
"require": "./cjs/controlled-mask-hook/utils/addSpecialCharacters.js"
|
|
93
|
+
},
|
|
94
|
+
"./controlled-mask-hook/react-desc-prop-types": {
|
|
95
|
+
"import": "./esm/controlled-mask-hook/react-desc-prop-types.js",
|
|
96
|
+
"require": "./cjs/controlled-mask-hook/react-desc-prop-types.js"
|
|
97
|
+
},
|
|
98
|
+
"./controlled-mask-hook": {
|
|
99
|
+
"import": "./esm/controlled-mask-hook/index.js",
|
|
100
|
+
"require": "./cjs/controlled-mask-hook/index.js"
|
|
101
|
+
},
|
|
102
|
+
"./controlled-mask-hook/hooks/usePhoneMask": {
|
|
103
|
+
"import": "./esm/controlled-mask-hook/hooks/usePhoneMask.js",
|
|
104
|
+
"require": "./cjs/controlled-mask-hook/hooks/usePhoneMask.js"
|
|
105
|
+
},
|
|
106
|
+
"./controlled-mask-hook/hooks": {
|
|
107
|
+
"import": "./esm/controlled-mask-hook/hooks/index.js",
|
|
108
|
+
"require": "./cjs/controlled-mask-hook/hooks/index.js"
|
|
109
|
+
},
|
|
42
110
|
"./controlled-date-time-picker/utils/timeHelpers": {
|
|
43
111
|
"import": "./esm/controlled-date-time-picker/utils/timeHelpers.js",
|
|
44
112
|
"require": "./cjs/controlled-date-time-picker/utils/timeHelpers.js"
|
|
@@ -720,15 +788,16 @@
|
|
|
720
788
|
"build": "node ../../scripts/build/build.js"
|
|
721
789
|
},
|
|
722
790
|
"dependencies": {
|
|
723
|
-
"@elliemae/ds-button": "2.3.0-next.
|
|
724
|
-
"@elliemae/ds-form-layout-blocks": "2.3.0-next.
|
|
725
|
-
"@elliemae/ds-grid": "2.3.0-next.
|
|
726
|
-
"@elliemae/ds-icon": "2.3.0-next.
|
|
727
|
-
"@elliemae/ds-icons": "2.3.0-next.
|
|
728
|
-
"@elliemae/ds-props-helpers": "2.3.0-next.
|
|
729
|
-
"@elliemae/ds-system": "2.3.0-next.
|
|
730
|
-
"@elliemae/ds-tooltip": "2.3.0-next.
|
|
731
|
-
"@elliemae/ds-truncated-tooltip-text": "2.3.0-next.
|
|
791
|
+
"@elliemae/ds-button": "2.3.0-next.17",
|
|
792
|
+
"@elliemae/ds-form-layout-blocks": "2.3.0-next.17",
|
|
793
|
+
"@elliemae/ds-grid": "2.3.0-next.17",
|
|
794
|
+
"@elliemae/ds-icon": "2.3.0-next.17",
|
|
795
|
+
"@elliemae/ds-icons": "2.3.0-next.17",
|
|
796
|
+
"@elliemae/ds-props-helpers": "2.3.0-next.17",
|
|
797
|
+
"@elliemae/ds-system": "2.3.0-next.17",
|
|
798
|
+
"@elliemae/ds-tooltip": "2.3.0-next.17",
|
|
799
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0-next.17",
|
|
800
|
+
"@xstyled/styled-components": "~3.5.1",
|
|
732
801
|
"prop-types": "~15.7.2",
|
|
733
802
|
"react-desc": "~4.1.3",
|
|
734
803
|
"react-popper": "~2.2.5",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledControlsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
2
|
+
export declare const StyledControlsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
3
|
minWidth: number;
|
|
4
4
|
hasError: boolean;
|
|
5
5
|
}, never>;
|
|
@@ -6,9 +6,9 @@ interface StyledControlsWrapperT {
|
|
|
6
6
|
minWidth: number;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const StyledControlsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
9
|
+
export declare const StyledControlsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, StyledControlsWrapperT, never>;
|
|
10
10
|
export declare const StyledSelection: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
-
export declare const StyledHeaderActionsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
11
|
+
export declare const StyledHeaderActionsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
12
12
|
export declare const StyleDropdownIndicator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
13
|
export declare const StyleHeaderActionsSeparator: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
14
14
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledDropDownButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button/types/v2/
|
|
2
|
+
export declare const StyledDropDownButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button/types/v2/react-desc-prop-types").DSButtonT.Props>, import("styled-components").DefaultTheme, {}, never>;
|