@elliemae/ds-form-input-text 3.35.0 → 3.36.0-next.1
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/dist/cjs/DSInputText.js +0 -1
- package/dist/cjs/DSInputText.js.map +2 -2
- package/dist/cjs/styled/borders.js +8 -16
- package/dist/cjs/styled/borders.js.map +1 -1
- package/dist/cjs/styled/components.js.map +1 -1
- package/dist/esm/DSInputText.js +0 -1
- package/dist/esm/DSInputText.js.map +2 -2
- package/dist/esm/styled/borders.js +8 -16
- package/dist/esm/styled/borders.js.map +1 -1
- package/dist/esm/styled/components.js.map +1 -1
- package/dist/types/config/useInputText.d.ts +18 -18
- package/package.json +9 -9
package/dist/cjs/DSInputText.js
CHANGED
|
@@ -101,7 +101,6 @@ const DSInputText = (props) => {
|
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
};
|
|
104
|
-
DSInputText.propTypes = import_react_desc_prop_types.DSInputTextPropTypes;
|
|
105
104
|
DSInputText.displayName = "DSInputText";
|
|
106
105
|
const DSInputTextWithSchema = (0, import_ds_props_helpers.describe)(DSInputText);
|
|
107
106
|
DSInputTextWithSchema.propTypes = import_react_desc_prop_types.DSInputTextPropTypes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSInputText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.js';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';\nimport type { DSInputTextT } from './react-desc-prop-types.js';\nimport { DSInputTextPropTypes } from './react-desc-prop-types.js';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components.js';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, id, ...otherGlobalAttributes },\n hasFocus,\n handlers,\n propsWithDefault,\n xstyledProps,\n } = useInputText(props);\n\n const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } =\n propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n inputRef?.current?.focus();\n }, [onClear]);\n\n return (\n <StyledInputWrapper\n className={className}\n cols={shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto']}\n isDisabled={disabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={id !== undefined ? `${id}_feedback_message` : undefined}\n id={id}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\n data-testid={DSInputTextDataTestIds.CLEAR_BUTTON}\n onClick={handleClear}\n size=\"s\"\n >\n <CloseMedium color={DSIconColors.PRIMARY} size=\"s\" />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCnB;AAhCJ,mBAA2C;AAC3C,sBAA4B;AAC5B,qBAA6B;AAC7B,0BAA0B;AAC1B,8BAAyB;AACzB,0BAA6B;AAC7B,2BAAuC;AAEvC,mCAAqC;AACrC,wBAAmE;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,IAAI,GAAG,sBAAsB;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,kCAAa,KAAK;AAEtB,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,MAAM,IAChG;AAEF,QAAM,eAAW,qBAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,kBAAc,0BAAY,MAAM;AACpC,YAAQ;AACR,cAAU,SAAS,MAAM;AAAA,EAC3B,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,MAClE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAa,4CAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YACA,cAAU,+BAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBAAkB,OAAO,SAAY,GAAG,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.js';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';\nimport type { DSInputTextT } from './react-desc-prop-types.js';\nimport { DSInputTextPropTypes } from './react-desc-prop-types.js';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components.js';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, id, ...otherGlobalAttributes },\n hasFocus,\n handlers,\n propsWithDefault,\n xstyledProps,\n } = useInputText(props);\n\n const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } =\n propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n inputRef?.current?.focus();\n }, [onClear]);\n\n return (\n <StyledInputWrapper\n className={className}\n cols={shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto']}\n isDisabled={disabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={id !== undefined ? `${id}_feedback_message` : undefined}\n id={id}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\n data-testid={DSInputTextDataTestIds.CLEAR_BUTTON}\n onClick={handleClear}\n size=\"s\"\n >\n <CloseMedium color={DSIconColors.PRIMARY} size=\"s\" />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.displayName = 'DSInputText';\nexport const DSInputTextWithSchema = describe(DSInputText);\nDSInputTextWithSchema.propTypes = DSInputTextPropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCnB;AAhCJ,mBAA2C;AAC3C,sBAA4B;AAC5B,qBAA6B;AAC7B,0BAA0B;AAC1B,8BAAyB;AACzB,0BAA6B;AAC7B,2BAAuC;AAEvC,mCAAqC;AACrC,wBAAmE;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,IAAI,GAAG,sBAAsB;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,kCAAa,KAAK;AAEtB,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,MAAM,IAChG;AAEF,QAAM,eAAW,qBAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,kBAAc,0BAAY,MAAM;AACpC,YAAQ;AACR,cAAU,SAAS,MAAM;AAAA,EAC3B,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,MAClE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAa,4CAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YACA,cAAU,+BAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBAAkB,OAAO,SAAY,GAAG,EAAE,sBAAsB;AAAA,YAChE;AAAA,YACC,GAAG;AAAA,YACH,GAAG;AAAA;AAAA,QACN;AAAA,QACC,4BACC;AAAA,UAAC;AAAA;AAAA,YACC,cAAW;AAAA,YACX,YAAW;AAAA,YACX,eAAa,4CAAuB;AAAA,YACpC,SAAS;AAAA,YACT,MAAK;AAAA,YAEL,sDAAC,+BAAY,OAAO,4BAAa,SAAS,MAAK,KAAI;AAAA;AAAA,QACrD;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,YAAY,cAAc;AACnB,MAAM,4BAAwB,kCAAS,WAAW;AACzD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -54,25 +54,17 @@ const focusBorderCss = import_ds_system.css`
|
|
|
54
54
|
outline-offset: -2px;
|
|
55
55
|
`;
|
|
56
56
|
const getBorderCss = (props) => {
|
|
57
|
-
if (props.isDisabled)
|
|
58
|
-
|
|
59
|
-
if (props.
|
|
60
|
-
|
|
61
|
-
if (props.hasError)
|
|
62
|
-
return hasErrorBorderCss;
|
|
63
|
-
if (props.isReadOnly)
|
|
64
|
-
return readOnlyBorderCss;
|
|
57
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
58
|
+
if (props.hasFocus) return focusBorderCss;
|
|
59
|
+
if (props.hasError) return hasErrorBorderCss;
|
|
60
|
+
if (props.isReadOnly) return readOnlyBorderCss;
|
|
65
61
|
return commonBorderCss;
|
|
66
62
|
};
|
|
67
63
|
const getHoverBorderCss = (props) => {
|
|
68
|
-
if (props.isDisabled)
|
|
69
|
-
|
|
70
|
-
if (props.
|
|
71
|
-
|
|
72
|
-
if (props.hasError)
|
|
73
|
-
return hasErrorBorderCss;
|
|
74
|
-
if (props.isReadOnly)
|
|
75
|
-
return readOnlyBorderCss;
|
|
64
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
65
|
+
if (props.hasFocus) return focusBorderCss;
|
|
66
|
+
if (props.hasError) return hasErrorBorderCss;
|
|
67
|
+
if (props.isReadOnly) return readOnlyBorderCss;
|
|
76
68
|
return hoverBorderCss;
|
|
77
69
|
};
|
|
78
70
|
//# sourceMappingURL=borders.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/borders.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n hasError: boolean;\n isReadOnly: boolean;\n hasFocus: boolean;\n}\n\nconst commonBorderCss = css`\n border: 1px solid ${th.color('neutral-400')};\n`;\n\nconst readOnlyBorderCss = css`\n border: 1px solid transparent;\n border-top-color: ${th.color('neutral-400')};\n`;\n\nconst disabledBorderCss = commonBorderCss;\n\nconst hasErrorBorderCss = css`\n border: 1px solid ${th.color('danger-900')};\n`;\n\nconst hoverBorderCss = css`\n border: 1px solid ${th.color('brand-700')};\n`;\n\nconst focusBorderCss = css`\n border: 1px solid transparent;\n outline: 2px solid ${th.color('brand-700')};\n outline-offset: -2px;\n`;\n\nexport const getBorderCss = (props: BorderNecessaryProps): ReturnType<typeof css> => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return commonBorderCss;\n};\n\nexport const getHoverBorderCss = (props: BorderNecessaryProps): ReturnType<typeof css> => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return hoverBorderCss;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwB;AASxB,MAAM,kBAAkB;AAAA,sBACF,oBAAG,MAAM,aAAa;AAAA;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwB;AASxB,MAAM,kBAAkB;AAAA,sBACF,oBAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAAA;AAAA,sBAEJ,oBAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;AAAA,sBACJ,oBAAG,MAAM,YAAY,CAAC;AAAA;AAG5C,MAAM,iBAAiB;AAAA,sBACD,oBAAG,MAAM,WAAW,CAAC;AAAA;AAG3C,MAAM,iBAAiB;AAAA;AAAA,uBAEA,oBAAG,MAAM,WAAW,CAAC;AAAA;AAAA;AAIrC,MAAM,eAAe,CAAC,UAAwD;AACnF,MAAI,MAAM,WAAY,QAAO;AAC7B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;AAEO,MAAM,oBAAoB,CAAC,UAAwD;AACxF,MAAI,MAAM,WAAY,QAAO;AAC7B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/components.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related/index.js';\nimport { getBorderCss, getHoverBorderCss } from './borders.js';\n\ninterface StyledInputWrapperProps {\n isDisabled: boolean;\n hasError: boolean;\n isReadOnly: boolean;\n hasFocus: boolean;\n inputSize: string;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n ${getBorderCss}\n border-radius: 2px;\n :hover {\n ${getHoverBorderCss}\n }\n min-height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })<{\n inputSize: string;\n}>`\n padding: ${({ inputSize }) => (inputSize === 'm' ? '4px' : '3px')} ${th.space('xxs')};\n @media (max-width: ${th.breakpoint('small')}) {\n padding: ${({ inputSize }) => (inputSize === 'm' ? '3px' : '1.25px')} ${th.space('xxs')};\n }\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n color: ${th.color('neutral-800')};\n\n ::placeholder {\n font-weight: ${th.fontWeight('regular')};\n font-style: italic;\n color: ${th.color('neutral-500')};\n }\n\n :disabled {\n background-color: ${th.color('neutral-080')};\n color: #616b7f;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledClearButton = styled(DSButtonV2, { name: DSInputTextName, slot: DSInputTextSlots.CLEAR_BUTTON })`\n height: 100%;\n\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\n &:hover:not(:disabled) {\n background-color: transparent;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2B;AAC3B,qBAAqB;AACrB,uBAA+C;AAC/C,8BAAkD;AAClD,qBAAgD;AAUzC,MAAM,yBAAqB,yBAAO,qBAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,yCAAiB;AACzB,CAAC;AAAA,IACG;AAAA;AAAA;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2B;AAC3B,qBAAqB;AACrB,uBAA+C;AAC/C,8BAAkD;AAClD,qBAAgD;AAUzC,MAAM,yBAAqB,yBAAO,qBAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,yCAAiB;AACzB,CAAC;AAAA,IACG,2BAAY;AAAA;AAAA;AAAA,MAGV,gCAAiB;AAAA;AAAA,gBAEP,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,SAAS,MAAO;AAAA,IACpE,mCAAkB;AAAA;AAGf,MAAM,kBAAc,yBAAO,SAAS,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,MAAM,CAAC;AAAA,aAGrF,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,QAAQ,KAAM,IAAI,oBAAG,MAAM,KAAK,CAAC;AAAA,uBAC/D,oBAAG,WAAW,OAAO,CAAC;AAAA,eAC9B,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,QAAQ,QAAS,IAAI,oBAAG,MAAM,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQhF,oBAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA,mBAGf,oBAAG,WAAW,SAAS,CAAC;AAAA;AAAA,aAE9B,oBAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA,wBAIZ,oBAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAMxC,MAAM,wBAAoB,yBAAO,gCAAY,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSInputText.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSInputText.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.js';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';\nimport type { DSInputTextT } from './react-desc-prop-types.js';\nimport { DSInputTextPropTypes } from './react-desc-prop-types.js';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components.js';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, id, ...otherGlobalAttributes },\n hasFocus,\n handlers,\n propsWithDefault,\n xstyledProps,\n } = useInputText(props);\n\n const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } =\n propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n inputRef?.current?.focus();\n }, [onClear]);\n\n return (\n <StyledInputWrapper\n className={className}\n cols={shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto']}\n isDisabled={disabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={id !== undefined ? `${id}_feedback_message` : undefined}\n id={id}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\n data-testid={DSInputTextDataTestIds.CLEAR_BUTTON}\n onClick={handleClear}\n size=\"s\"\n >\n <CloseMedium color={DSIconColors.PRIMARY} size=\"s\" />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACgCnB,SAUE,KAVF;AAhCJ,SAAgB,aAAa,cAAc;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AAEvC,SAAS,4BAA4B;AACrC,SAAS,mBAAmB,aAAa,0BAA0B;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,IAAI,GAAG,sBAAsB;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,aAAa,KAAK;AAEtB,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,MAAM,IAChG;AAEF,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,cAAc,YAAY,MAAM;AACpC,YAAQ;AACR,cAAU,SAAS,MAAM;AAAA,EAC3B,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,MAClE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAa,uBAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YACA,UAAU,UAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBAAkB,OAAO,SAAY,GAAG,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.js';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';\nimport type { DSInputTextT } from './react-desc-prop-types.js';\nimport { DSInputTextPropTypes } from './react-desc-prop-types.js';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components.js';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, id, ...otherGlobalAttributes },\n hasFocus,\n handlers,\n propsWithDefault,\n xstyledProps,\n } = useInputText(props);\n\n const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } =\n propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n inputRef?.current?.focus();\n }, [onClear]);\n\n return (\n <StyledInputWrapper\n className={className}\n cols={shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto']}\n isDisabled={disabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={id !== undefined ? `${id}_feedback_message` : undefined}\n id={id}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\n data-testid={DSInputTextDataTestIds.CLEAR_BUTTON}\n onClick={handleClear}\n size=\"s\"\n >\n <CloseMedium color={DSIconColors.PRIMARY} size=\"s\" />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.displayName = 'DSInputText';\nexport const DSInputTextWithSchema = describe(DSInputText);\nDSInputTextWithSchema.propTypes = DSInputTextPropTypes;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgCnB,SAUE,KAVF;AAhCJ,SAAgB,aAAa,cAAc;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AAEvC,SAAS,4BAA4B;AACrC,SAAS,mBAAmB,aAAa,0BAA0B;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,IAAI,GAAG,sBAAsB;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,aAAa,KAAK;AAEtB,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,MAAM,IAChG;AAEF,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,cAAc,YAAY,MAAM;AACpC,YAAQ;AACR,cAAU,SAAS,MAAM;AAAA,EAC3B,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,MAClE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAa,uBAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YACA,UAAU,UAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBAAkB,OAAO,SAAY,GAAG,EAAE,sBAAsB;AAAA,YAChE;AAAA,YACC,GAAG;AAAA,YACH,GAAG;AAAA;AAAA,QACN;AAAA,QACC,4BACC;AAAA,UAAC;AAAA;AAAA,YACC,cAAW;AAAA,YACX,YAAW;AAAA,YACX,eAAa,uBAAuB;AAAA,YACpC,SAAS;AAAA,YACT,MAAK;AAAA,YAEL,8BAAC,eAAY,OAAO,aAAa,SAAS,MAAK,KAAI;AAAA;AAAA,QACrD;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,YAAY,cAAc;AACnB,MAAM,wBAAwB,SAAS,WAAW;AACzD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -20,25 +20,17 @@ const focusBorderCss = css`
|
|
|
20
20
|
outline-offset: -2px;
|
|
21
21
|
`;
|
|
22
22
|
const getBorderCss = (props) => {
|
|
23
|
-
if (props.isDisabled)
|
|
24
|
-
|
|
25
|
-
if (props.
|
|
26
|
-
|
|
27
|
-
if (props.hasError)
|
|
28
|
-
return hasErrorBorderCss;
|
|
29
|
-
if (props.isReadOnly)
|
|
30
|
-
return readOnlyBorderCss;
|
|
23
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
24
|
+
if (props.hasFocus) return focusBorderCss;
|
|
25
|
+
if (props.hasError) return hasErrorBorderCss;
|
|
26
|
+
if (props.isReadOnly) return readOnlyBorderCss;
|
|
31
27
|
return commonBorderCss;
|
|
32
28
|
};
|
|
33
29
|
const getHoverBorderCss = (props) => {
|
|
34
|
-
if (props.isDisabled)
|
|
35
|
-
|
|
36
|
-
if (props.
|
|
37
|
-
|
|
38
|
-
if (props.hasError)
|
|
39
|
-
return hasErrorBorderCss;
|
|
40
|
-
if (props.isReadOnly)
|
|
41
|
-
return readOnlyBorderCss;
|
|
30
|
+
if (props.isDisabled) return disabledBorderCss;
|
|
31
|
+
if (props.hasFocus) return focusBorderCss;
|
|
32
|
+
if (props.hasError) return hasErrorBorderCss;
|
|
33
|
+
if (props.isReadOnly) return readOnlyBorderCss;
|
|
42
34
|
return hoverBorderCss;
|
|
43
35
|
};
|
|
44
36
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/borders.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n hasError: boolean;\n isReadOnly: boolean;\n hasFocus: boolean;\n}\n\nconst commonBorderCss = css`\n border: 1px solid ${th.color('neutral-400')};\n`;\n\nconst readOnlyBorderCss = css`\n border: 1px solid transparent;\n border-top-color: ${th.color('neutral-400')};\n`;\n\nconst disabledBorderCss = commonBorderCss;\n\nconst hasErrorBorderCss = css`\n border: 1px solid ${th.color('danger-900')};\n`;\n\nconst hoverBorderCss = css`\n border: 1px solid ${th.color('brand-700')};\n`;\n\nconst focusBorderCss = css`\n border: 1px solid transparent;\n outline: 2px solid ${th.color('brand-700')};\n outline-offset: -2px;\n`;\n\nexport const getBorderCss = (props: BorderNecessaryProps): ReturnType<typeof css> => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return commonBorderCss;\n};\n\nexport const getHoverBorderCss = (props: BorderNecessaryProps): ReturnType<typeof css> => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return hoverBorderCss;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,IAAI,WAAW;AASxB,MAAM,kBAAkB;AAAA,sBACF,GAAG,MAAM,aAAa;AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,IAAI,WAAW;AASxB,MAAM,kBAAkB;AAAA,sBACF,GAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAAA;AAAA,sBAEJ,GAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;AAAA,sBACJ,GAAG,MAAM,YAAY,CAAC;AAAA;AAG5C,MAAM,iBAAiB;AAAA,sBACD,GAAG,MAAM,WAAW,CAAC;AAAA;AAG3C,MAAM,iBAAiB;AAAA;AAAA,uBAEA,GAAG,MAAM,WAAW,CAAC;AAAA;AAAA;AAIrC,MAAM,eAAe,CAAC,UAAwD;AACnF,MAAI,MAAM,WAAY,QAAO;AAC7B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;AAEO,MAAM,oBAAoB,CAAC,UAAwD;AACxF,MAAI,MAAM,WAAY,QAAO;AAC7B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/components.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related/index.js';\nimport { getBorderCss, getHoverBorderCss } from './borders.js';\n\ninterface StyledInputWrapperProps {\n isDisabled: boolean;\n hasError: boolean;\n isReadOnly: boolean;\n hasFocus: boolean;\n inputSize: string;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n ${getBorderCss}\n border-radius: 2px;\n :hover {\n ${getHoverBorderCss}\n }\n min-height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })<{\n inputSize: string;\n}>`\n padding: ${({ inputSize }) => (inputSize === 'm' ? '4px' : '3px')} ${th.space('xxs')};\n @media (max-width: ${th.breakpoint('small')}) {\n padding: ${({ inputSize }) => (inputSize === 'm' ? '3px' : '1.25px')} ${th.space('xxs')};\n }\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n color: ${th.color('neutral-800')};\n\n ::placeholder {\n font-weight: ${th.fontWeight('regular')};\n font-style: italic;\n color: ${th.color('neutral-500')};\n }\n\n :disabled {\n background-color: ${th.color('neutral-080')};\n color: #616b7f;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledClearButton = styled(DSButtonV2, { name: DSInputTextName, slot: DSInputTextSlots.CLEAR_BUTTON })`\n height: 100%;\n\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\n &:hover:not(:disabled) {\n background-color: transparent;\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,IAAI,QAAQ,0BAA0B;AAC/C,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,cAAc,yBAAyB;AAUzC,MAAM,qBAAqB,OAAO,MAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,IACG;AAAA;AAAA;AAAA,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,IAAI,QAAQ,0BAA0B;AAC/C,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,cAAc,yBAAyB;AAUzC,MAAM,qBAAqB,OAAO,MAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,IACG,YAAY;AAAA;AAAA;AAAA,MAGV,iBAAiB;AAAA;AAAA,gBAEP,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,SAAS,MAAO;AAAA,IACpE,kBAAkB;AAAA;AAGf,MAAM,cAAc,OAAO,SAAS,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA,aAGrF,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,QAAQ,KAAM,IAAI,GAAG,MAAM,KAAK,CAAC;AAAA,uBAC/D,GAAG,WAAW,OAAO,CAAC;AAAA,eAC9B,CAAC,EAAE,UAAU,MAAO,cAAc,MAAM,QAAQ,QAAS,IAAI,GAAG,MAAM,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQhF,GAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA,mBAGf,GAAG,WAAW,SAAS,CAAC;AAAA;AAAA,aAE9B,GAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA,wBAIZ,GAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAMxC,MAAM,oBAAoB,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,13 +2,14 @@ import type React from 'react';
|
|
|
2
2
|
import type { DSInputTextT } from '../react-desc-prop-types.js';
|
|
3
3
|
export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
4
4
|
globalAttributes: Partial<Pick<object, "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
|
|
5
|
-
|
|
5
|
+
form?: string | undefined;
|
|
6
|
+
list?: string | undefined;
|
|
6
7
|
"aria-activedescendant"?: string | undefined;
|
|
7
|
-
"aria-atomic"?: boolean | "true" | "false" | undefined;
|
|
8
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
8
9
|
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
9
10
|
"aria-braillelabel"?: string | undefined;
|
|
10
11
|
"aria-brailleroledescription"?: string | undefined;
|
|
11
|
-
"aria-busy"?: boolean | "true" | "false" | undefined;
|
|
12
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
12
13
|
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
13
14
|
"aria-colcount"?: number | undefined;
|
|
14
15
|
"aria-colindex"?: number | undefined;
|
|
@@ -19,37 +20,37 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
19
20
|
"aria-describedby"?: string | undefined;
|
|
20
21
|
"aria-description"?: string | undefined;
|
|
21
22
|
"aria-details"?: string | undefined;
|
|
22
|
-
"aria-disabled"?: boolean | "true" | "false" | undefined;
|
|
23
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
23
24
|
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
24
25
|
"aria-errormessage"?: string | undefined;
|
|
25
|
-
"aria-expanded"?: boolean | "true" | "false" | undefined;
|
|
26
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
26
27
|
"aria-flowto"?: string | undefined;
|
|
27
|
-
"aria-grabbed"?: boolean | "true" | "false" | undefined;
|
|
28
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
28
29
|
"aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
|
|
29
|
-
"aria-hidden"?: boolean | "true" | "false" | undefined;
|
|
30
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
30
31
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
31
32
|
"aria-keyshortcuts"?: string | undefined;
|
|
32
33
|
"aria-label"?: string | undefined;
|
|
33
34
|
"aria-labelledby"?: string | undefined;
|
|
34
35
|
"aria-level"?: number | undefined;
|
|
35
36
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
36
|
-
"aria-modal"?: boolean | "true" | "false" | undefined;
|
|
37
|
-
"aria-multiline"?: boolean | "true" | "false" | undefined;
|
|
38
|
-
"aria-multiselectable"?: boolean | "true" | "false" | undefined;
|
|
37
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
38
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
39
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
39
40
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
40
41
|
"aria-owns"?: string | undefined;
|
|
41
42
|
"aria-placeholder"?: string | undefined;
|
|
42
43
|
"aria-posinset"?: number | undefined;
|
|
43
44
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
44
|
-
"aria-readonly"?: boolean | "true" | "false" | undefined;
|
|
45
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
45
46
|
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
46
|
-
"aria-required"?: boolean | "true" | "false" | undefined;
|
|
47
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
47
48
|
"aria-roledescription"?: string | undefined;
|
|
48
49
|
"aria-rowcount"?: number | undefined;
|
|
49
50
|
"aria-rowindex"?: number | undefined;
|
|
50
51
|
"aria-rowindextext"?: string | undefined;
|
|
51
52
|
"aria-rowspan"?: number | undefined;
|
|
52
|
-
"aria-selected"?: boolean | "true" | "false" | undefined;
|
|
53
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
53
54
|
"aria-setsize"?: number | undefined;
|
|
54
55
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
55
56
|
"aria-valuemax"?: number | undefined;
|
|
@@ -217,8 +218,6 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
217
218
|
onAnimationIterationCapture?: React.AnimationEventHandler<Element> | undefined;
|
|
218
219
|
onTransitionEnd?: React.TransitionEventHandler<Element> | undefined;
|
|
219
220
|
onTransitionEndCapture?: React.TransitionEventHandler<Element> | undefined;
|
|
220
|
-
form?: string | undefined;
|
|
221
|
-
list?: string | undefined;
|
|
222
221
|
defaultChecked?: boolean | undefined;
|
|
223
222
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
224
223
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -226,16 +225,16 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
226
225
|
accessKey?: string | undefined;
|
|
227
226
|
autoFocus?: boolean | undefined;
|
|
228
227
|
className?: string | undefined;
|
|
229
|
-
contentEditable?: boolean | "true" | "false" | "inherit" | "plaintext-only" | undefined;
|
|
228
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
230
229
|
contextMenu?: string | undefined;
|
|
231
230
|
dir?: string | undefined;
|
|
232
|
-
draggable?: boolean | "true" | "false" | undefined;
|
|
231
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
233
232
|
hidden?: boolean | undefined;
|
|
234
233
|
id?: string | undefined;
|
|
235
234
|
lang?: string | undefined;
|
|
236
235
|
nonce?: string | undefined;
|
|
237
236
|
slot?: string | undefined;
|
|
238
|
-
spellCheck?: boolean | "true" | "false" | undefined;
|
|
237
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
239
238
|
style?: React.CSSProperties | undefined;
|
|
240
239
|
tabIndex?: 0 | -1 | undefined;
|
|
241
240
|
title?: string | undefined;
|
|
@@ -328,6 +327,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
328
327
|
minLength?: number | undefined;
|
|
329
328
|
multiple?: boolean | undefined;
|
|
330
329
|
muted?: boolean | undefined;
|
|
330
|
+
name?: string | undefined;
|
|
331
331
|
noValidate?: boolean | undefined;
|
|
332
332
|
open?: boolean | undefined;
|
|
333
333
|
optimum?: number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-input-text",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.36.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Input Text",
|
|
6
6
|
"files": [
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-button-v2": "3.
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-props-helpers": "3.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-utilities": "3.
|
|
45
|
-
"@elliemae/ds-
|
|
39
|
+
"@elliemae/ds-button-v2": "3.36.0-next.1",
|
|
40
|
+
"@elliemae/ds-icon": "3.36.0-next.1",
|
|
41
|
+
"@elliemae/ds-props-helpers": "3.36.0-next.1",
|
|
42
|
+
"@elliemae/ds-system": "3.36.0-next.1",
|
|
43
|
+
"@elliemae/ds-grid": "3.36.0-next.1",
|
|
44
|
+
"@elliemae/ds-utilities": "3.36.0-next.1",
|
|
45
|
+
"@elliemae/ds-icons": "3.36.0-next.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
49
49
|
"@elliemae/pui-theme": "~2.9.3",
|
|
50
50
|
"styled-components": "~5.3.9",
|
|
51
51
|
"styled-system": "~5.1.5",
|
|
52
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
52
|
+
"@elliemae/ds-monorepo-devops": "3.36.0-next.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@elliemae/pui-theme": "~2.9.3",
|