@elliemae/ds-form-input-text 3.2.1-rc.0 → 3.2.1-rc.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 +9 -2
- package/dist/cjs/DSInputText.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +0 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled/components.js +4 -0
- package/dist/cjs/styled/components.js.map +2 -2
- package/dist/esm/DSInputText.js +10 -3
- package/dist/esm/DSInputText.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +0 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled/components.js +4 -0
- package/dist/esm/styled/components.js.map +2 -2
- package/package.json +7 -7
package/dist/cjs/DSInputText.js
CHANGED
|
@@ -69,7 +69,14 @@ const DSInputText = (props) => {
|
|
|
69
69
|
xstyledProps
|
|
70
70
|
} = _a;
|
|
71
71
|
const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } = propsWithDefault;
|
|
72
|
+
const inputRef = (0, import_react.useRef)(null);
|
|
73
|
+
const currentRef = innerRef ?? inputRef;
|
|
72
74
|
const shouldDisplayClearButton = clearable && value !== "";
|
|
75
|
+
const handleClear = (0, import_react.useCallback)(() => {
|
|
76
|
+
onClear();
|
|
77
|
+
console.log(currentRef, "currentRef");
|
|
78
|
+
currentRef?.current?.focus();
|
|
79
|
+
}, [onClear, currentRef]);
|
|
73
80
|
return /* @__PURE__ */ import_react.default.createElement(import_components.StyledInputWrapper, __spreadValues({
|
|
74
81
|
className,
|
|
75
82
|
cols: shouldDisplayClearButton ? ["auto", "min-content"] : ["auto"],
|
|
@@ -83,13 +90,13 @@ const DSInputText = (props) => {
|
|
|
83
90
|
disabled,
|
|
84
91
|
placeholder,
|
|
85
92
|
readOnly,
|
|
86
|
-
ref:
|
|
93
|
+
ref: currentRef,
|
|
87
94
|
value
|
|
88
95
|
}, handlers), otherGlobalAttributes)), shouldDisplayClearButton && /* @__PURE__ */ import_react.default.createElement(import_components.StyledClearButton, {
|
|
89
96
|
"aria-label": "Clear input value",
|
|
90
97
|
buttonType: "icon",
|
|
91
98
|
"data-testid": import_data_test_ids.DSInputTextDataTestIds.CLEAR_BUTTON,
|
|
92
|
-
onClick:
|
|
99
|
+
onClick: handleClear
|
|
93
100
|
}, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.CloseMedium, {
|
|
94
101
|
color: import_ds_icon.DSIconColors.PRIMARY
|
|
95
102
|
})));
|
|
@@ -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 from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { describe } from '@elliemae/ds-utilities';\nimport { useInputText } from './config/useInputText';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids';\nimport { DSInputTextPropTypes, DSInputTextT } from './react-desc-prop-types';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, ...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 shouldDisplayClearButton = clearable && value !== '';\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 data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n ref={
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { describe } from '@elliemae/ds-utilities';\nimport { useInputText } from './config/useInputText';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids';\nimport { DSInputTextPropTypes, DSInputTextT } from './react-desc-prop-types';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, ...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(null);\n const currentRef = innerRef ?? inputRef;\n const shouldDisplayClearButton = clearable && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n console.log(currentRef, 'currentRef');\n currentRef?.current?.focus();\n }, [onClear, currentRef]);\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 data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n ref={currentRef}\n value={value}\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 >\n <CloseMedium color={DSIconColors.PRIMARY} />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.propTypes = DSInputTextPropTypes;\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;ADAvB,mBAA2C;AAC3C,sBAA4B;AAC5B,qBAA6B;AAC7B,0BAAyB;AACzB,0BAA6B;AAC7B,2BAAuC;AACvC,mCAAmD;AACnD,wBAAmE;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAMI,2CAAa,KAAK,GALF;AAAA,IAAlB,kBAAkB;AAAA,MAKhB,IALgB,SAAE,gBAAF,IAAgB,kCAAhB,IAAgB,CAAd,eAAF;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,UAC1F;AAEF,QAAM,WAAW,yBAAO,IAAI;AAC5B,QAAM,aAAa,YAAY;AAC/B,QAAM,2BAA2B,aAAa,UAAU;AAExD,QAAM,cAAc,8BAAY,MAAM;AACpC,YAAQ;AACR,YAAQ,IAAI,YAAY,YAAY;AACpC,gBAAY,SAAS,MAAM;AAAA,EAC7B,GAAG,CAAC,SAAS,UAAU,CAAC;AAExB,SACE,mDAAC;AAAA,IACC;AAAA,IACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,IAClE,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,KACI,eAEJ,mDAAC;AAAA,IACC,eAAa,4CAAuB;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,KACI,WACA,sBACN,GACC,4BACC,mDAAC;AAAA,IACC,cAAW;AAAA,IACX,YAAW;AAAA,IACX,eAAa,4CAAuB;AAAA,IACpC,SAAS;AAAA,KAET,mDAAC;AAAA,IAAY,OAAO,4BAAa;AAAA,GAAS,CAC5C,CAEJ;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AACnB,MAAM,wBAAwB,kCAAS,WAAW;AACzD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nexport declare namespace DSInputTextT {\n interface IProps {\n value?: string | number;\n onValueChange?: (nextValue: string | number, e: React.ChangeEvent<HTMLInputElement>) => void;\n onClear?: () => void;\n placeholder?: string;\n innerRef?: React.RefObject<HTMLInputElement> | ((_ref: HTMLInputElement) => void);\n disabled?: boolean;\n readOnly?: boolean;\n hasError?: boolean;\n inputSize?: 's' | 'm';\n clearable?: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: DSInputTextT.Props = {\n onValueChange: () => null,\n onClear: () => null,\n placeholder: 'Hint Text',\n disabled: false,\n readOnly: false,\n hasError: false,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAMO;AAmBA,MAAM,eAAmC;AAAA,EAC9C,eAAe,MAAM;AAAA,EACrB,SAAS,MAAM;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,
|
|
4
|
+
"sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nexport declare namespace DSInputTextT {\n interface IProps {\n value?: string | number;\n onValueChange?: (nextValue: string | number, e: React.ChangeEvent<HTMLInputElement>) => void;\n onClear?: () => void;\n placeholder?: string;\n innerRef?: React.RefObject<HTMLInputElement> | ((_ref: HTMLInputElement) => void);\n disabled?: boolean;\n readOnly?: boolean;\n hasError?: boolean;\n inputSize?: 's' | 'm';\n clearable?: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: DSInputTextT.Props = {\n onValueChange: () => null,\n onClear: () => null,\n placeholder: 'Hint Text',\n disabled: false,\n readOnly: false,\n hasError: false,\n inputSize: 'm',\n clearable: false,\n};\n\nexport const DSInputTextPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.string)])\n .description('Value of the input')\n .defaultValue(''),\n onValueChange: PropTypes.func\n .description('Callback triggered when the value changes')\n .defaultValue(() => null)\n .signature('((newValue: string, e: React.ChangeEvent) => void)'),\n placeholder: PropTypes.string.description('Value of the placeholder').defaultValue(''),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func.signature('((ref: HTMLInputElement) => void)')])\n .description('Reference to the input')\n .defaultValue(null),\n disabled: PropTypes.bool.description('Whether the input is disabled').defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the input is readonly').defaultValue(false),\n hasError: PropTypes.bool.description('Whether the input has error').defaultValue(false),\n inputSize: PropTypes.oneOf(['s', 'm']).description('Size of the input').defaultValue('m'),\n clearable: PropTypes.bool.description('Whether the input is clearable').defaultValue(false),\n onClear: PropTypes.func\n .description('Callback triggered when the clearable button is pressed')\n .defaultValue(() => null)\n .signature('(() => void)'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAMO;AAmBA,MAAM,eAAmC;AAAA,EAC9C,eAAe,MAAM;AAAA,EACrB,SAAS,MAAM;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AACb;AAEO,MAAM,uBAAuB,gDAC/B,gDACA,uCAF+B;AAAA,EAGlC,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,QAAQ,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC,EACjG,YAAY,oBAAoB,EAChC,aAAa,EAAE;AAAA,EAClB,eAAe,8BAAU,KACtB,YAAY,2CAA2C,EACvD,aAAa,MAAM,IAAI,EACvB,UAAU,oDAAoD;AAAA,EACjE,aAAa,8BAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,EAAE;AAAA,EACrF,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,KAAK,UAAU,mCAAmC,CAAC,CAAC,EAC5G,YAAY,wBAAwB,EACpC,aAAa,IAAI;AAAA,EACpB,UAAU,8BAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,8BAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,8BAAU,KAAK,YAAY,6BAA6B,EAAE,aAAa,KAAK;AAAA,EACtF,WAAW,8BAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,mBAAmB,EAAE,aAAa,GAAG;AAAA,EACxF,WAAW,8BAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EAC1F,SAAS,8BAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,MAAM,IAAI,EACvB,UAAU,cAAc;AAC7B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/components.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { DSButtonV2 } from '@elliemae/ds-button';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, layout, space, sizing } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related';\nimport { DSInputTextT } from '../react-desc-prop-types';\nimport { getBorderCss, getHoverBorderCss } from './borders';\n\ninterface StyledInputWrapperProps {\n inputSize: DSInputTextT.Props['inputSize'];\n isDisabled: DSInputTextT.Props['disabled'];\n hasError: DSInputTextT.Props['hasError'];\n isReadOnly: DSInputTextT.Props['readOnly'];\n hasFocus: boolean;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n\n ${getBorderCss}\n border-radius: 2px;\n\n :hover {\n ${getHoverBorderCss}\n }\n\n ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })`\n padding: 0 ${th.space('xxs')};\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n font-size: 13px;\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 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`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2B;AAC3B,qBAAqB;AACrB,uBAAkD;AAClD,8BAAkD;AAElD,qBAAgD;AAUzC,MAAM,qBAAqB,6BAAO,qBAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,yCAAiB;AACzB,CAAC;AAAA,YACW,CAAC,EAAE,gBAAiB,cAAc,MAAM,SAAS;AAAA;AAAA,IAEzD;AAAA;AAAA;AAAA;AAAA,MAIE;AAAA;AAAA;AAAA,IAGF;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,cAAc,6BAAO,SAAS,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,MAAM,CAAC;AAAA,eACnF,oBAAG,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQlB,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA,mBAGd,oBAAG,WAAW,SAAS;AAAA;AAAA,aAE7B,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,wBAIX,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAMvC,MAAM,oBAAoB,6BAAO,6BAAY,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
4
|
+
"sourcesContent": ["import { DSButtonV2 } from '@elliemae/ds-button';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, layout, space, sizing } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related';\nimport { DSInputTextT } from '../react-desc-prop-types';\nimport { getBorderCss, getHoverBorderCss } from './borders';\n\ninterface StyledInputWrapperProps {\n inputSize: DSInputTextT.Props['inputSize'];\n isDisabled: DSInputTextT.Props['disabled'];\n hasError: DSInputTextT.Props['hasError'];\n isReadOnly: DSInputTextT.Props['readOnly'];\n hasFocus: boolean;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n\n ${getBorderCss}\n border-radius: 2px;\n\n :hover {\n ${getHoverBorderCss}\n }\n\n ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })`\n padding: 0 ${th.space('xxs')};\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n font-size: 13px;\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 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\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,uBAA2B;AAC3B,qBAAqB;AACrB,uBAAkD;AAClD,8BAAkD;AAElD,qBAAgD;AAUzC,MAAM,qBAAqB,6BAAO,qBAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,yCAAiB;AACzB,CAAC;AAAA,YACW,CAAC,EAAE,gBAAiB,cAAc,MAAM,SAAS;AAAA;AAAA,IAEzD;AAAA;AAAA;AAAA;AAAA,MAIE;AAAA;AAAA;AAAA,IAGF;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,cAAc,6BAAO,SAAS,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,MAAM,CAAC;AAAA,eACnF,oBAAG,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQlB,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA,mBAGd,oBAAG,WAAW,SAAS;AAAA;AAAA,aAE7B,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,wBAIX,oBAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAMvC,MAAM,oBAAoB,6BAAO,6BAAY,EAAE,MAAM,yCAAiB,MAAM,yCAAiB,aAAa,CAAC;AAAA;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
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import * as React from "react";
|
|
30
|
-
import React2 from "react";
|
|
30
|
+
import React2, { useCallback, useRef } from "react";
|
|
31
31
|
import { CloseMedium } from "@elliemae/ds-icons";
|
|
32
32
|
import { DSIconColors } from "@elliemae/ds-icon";
|
|
33
33
|
import { describe } from "@elliemae/ds-utilities";
|
|
@@ -45,7 +45,14 @@ const DSInputText = (props) => {
|
|
|
45
45
|
xstyledProps
|
|
46
46
|
} = _a;
|
|
47
47
|
const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } = propsWithDefault;
|
|
48
|
+
const inputRef = useRef(null);
|
|
49
|
+
const currentRef = innerRef ?? inputRef;
|
|
48
50
|
const shouldDisplayClearButton = clearable && value !== "";
|
|
51
|
+
const handleClear = useCallback(() => {
|
|
52
|
+
onClear();
|
|
53
|
+
console.log(currentRef, "currentRef");
|
|
54
|
+
currentRef?.current?.focus();
|
|
55
|
+
}, [onClear, currentRef]);
|
|
49
56
|
return /* @__PURE__ */ React2.createElement(StyledInputWrapper, __spreadValues({
|
|
50
57
|
className,
|
|
51
58
|
cols: shouldDisplayClearButton ? ["auto", "min-content"] : ["auto"],
|
|
@@ -59,13 +66,13 @@ const DSInputText = (props) => {
|
|
|
59
66
|
disabled,
|
|
60
67
|
placeholder,
|
|
61
68
|
readOnly,
|
|
62
|
-
ref:
|
|
69
|
+
ref: currentRef,
|
|
63
70
|
value
|
|
64
71
|
}, handlers), otherGlobalAttributes)), shouldDisplayClearButton && /* @__PURE__ */ React2.createElement(StyledClearButton, {
|
|
65
72
|
"aria-label": "Clear input value",
|
|
66
73
|
buttonType: "icon",
|
|
67
74
|
"data-testid": DSInputTextDataTestIds.CLEAR_BUTTON,
|
|
68
|
-
onClick:
|
|
75
|
+
onClick: handleClear
|
|
69
76
|
}, /* @__PURE__ */ React2.createElement(CloseMedium, {
|
|
70
77
|
color: DSIconColors.PRIMARY
|
|
71
78
|
})));
|
|
@@ -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 from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { describe } from '@elliemae/ds-utilities';\nimport { useInputText } from './config/useInputText';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids';\nimport { DSInputTextPropTypes, DSInputTextT } from './react-desc-prop-types';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, ...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 shouldDisplayClearButton = clearable && value !== '';\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 data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n ref={
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAMI,kBAAa,KAAK,GALF;AAAA,IAAlB,kBAAkB;AAAA,MAKhB,IALgB,SAAE,gBAAF,IAAgB,kCAAhB,IAAgB,CAAd,eAAF;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,UAC1F;AAEF,QAAM,2BAA2B,aAAa,UAAU;AAExD,SACE,qCAAC;AAAA,IACC;AAAA,IACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,IAClE,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,KACI,eAEJ,qCAAC;AAAA,IACC,eAAa,uBAAuB;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,KACI,WACA,sBACN,GACC,4BACC,qCAAC;AAAA,IACC,cAAW;AAAA,IACX,YAAW;AAAA,IACX,eAAa,uBAAuB;AAAA,IACpC,SAAS;AAAA,KAET,qCAAC;AAAA,IAAY,OAAO,aAAa;AAAA,GAAS,CAC5C,CAEJ;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AACnB,MAAM,wBAAwB,SAAS,WAAW;AACzD,sBAAsB,YAAY;",
|
|
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 { describe } from '@elliemae/ds-utilities';\nimport { useInputText } from './config/useInputText';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids';\nimport { DSInputTextPropTypes, DSInputTextT } from './react-desc-prop-types';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, ...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(null);\n const currentRef = innerRef ?? inputRef;\n const shouldDisplayClearButton = clearable && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n console.log(currentRef, 'currentRef');\n currentRef?.current?.focus();\n }, [onClear, currentRef]);\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 data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n ref={currentRef}\n value={value}\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 >\n <CloseMedium color={DSIconColors.PRIMARY} />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.propTypes = DSInputTextPropTypes;\nDSInputText.displayName = 'DSInputText';\nexport const DSInputTextWithSchema = describe(DSInputText);\nDSInputTextWithSchema.propTypes = DSInputTextPropTypes;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAMI,kBAAa,KAAK,GALF;AAAA,IAAlB,kBAAkB;AAAA,MAKhB,IALgB,SAAE,gBAAF,IAAgB,kCAAhB,IAAgB,CAAd,eAAF;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,UAC1F;AAEF,QAAM,WAAW,OAAO,IAAI;AAC5B,QAAM,aAAa,YAAY;AAC/B,QAAM,2BAA2B,aAAa,UAAU;AAExD,QAAM,cAAc,YAAY,MAAM;AACpC,YAAQ;AACR,YAAQ,IAAI,YAAY,YAAY;AACpC,gBAAY,SAAS,MAAM;AAAA,EAC7B,GAAG,CAAC,SAAS,UAAU,CAAC;AAExB,SACE,qCAAC;AAAA,IACC;AAAA,IACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,IAClE,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,KACI,eAEJ,qCAAC;AAAA,IACC,eAAa,uBAAuB;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,KACI,WACA,sBACN,GACC,4BACC,qCAAC;AAAA,IACC,cAAW;AAAA,IACX,YAAW;AAAA,IACX,eAAa,uBAAuB;AAAA,IACpC,SAAS;AAAA,KAET,qCAAC;AAAA,IAAY,OAAO,aAAa;AAAA,GAAS,CAC5C,CAEJ;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AACnB,MAAM,wBAAwB,SAAS,WAAW;AACzD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nexport declare namespace DSInputTextT {\n interface IProps {\n value?: string | number;\n onValueChange?: (nextValue: string | number, e: React.ChangeEvent<HTMLInputElement>) => void;\n onClear?: () => void;\n placeholder?: string;\n innerRef?: React.RefObject<HTMLInputElement> | ((_ref: HTMLInputElement) => void);\n disabled?: boolean;\n readOnly?: boolean;\n hasError?: boolean;\n inputSize?: 's' | 'm';\n clearable?: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: DSInputTextT.Props = {\n onValueChange: () => null,\n onClear: () => null,\n placeholder: 'Hint Text',\n disabled: false,\n readOnly: false,\n hasError: false,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AAAA;AAAA;AAAA;AAAA;AAyBO,MAAM,eAAmC;AAAA,EAC9C,eAAe,MAAM;AAAA,EACrB,SAAS,MAAM;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nexport declare namespace DSInputTextT {\n interface IProps {\n value?: string | number;\n onValueChange?: (nextValue: string | number, e: React.ChangeEvent<HTMLInputElement>) => void;\n onClear?: () => void;\n placeholder?: string;\n innerRef?: React.RefObject<HTMLInputElement> | ((_ref: HTMLInputElement) => void);\n disabled?: boolean;\n readOnly?: boolean;\n hasError?: boolean;\n inputSize?: 's' | 'm';\n clearable?: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: DSInputTextT.Props = {\n onValueChange: () => null,\n onClear: () => null,\n placeholder: 'Hint Text',\n disabled: false,\n readOnly: false,\n hasError: false,\n inputSize: 'm',\n clearable: false,\n};\n\nexport const DSInputTextPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.string)])\n .description('Value of the input')\n .defaultValue(''),\n onValueChange: PropTypes.func\n .description('Callback triggered when the value changes')\n .defaultValue(() => null)\n .signature('((newValue: string, e: React.ChangeEvent) => void)'),\n placeholder: PropTypes.string.description('Value of the placeholder').defaultValue(''),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func.signature('((ref: HTMLInputElement) => void)')])\n .description('Reference to the input')\n .defaultValue(null),\n disabled: PropTypes.bool.description('Whether the input is disabled').defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the input is readonly').defaultValue(false),\n hasError: PropTypes.bool.description('Whether the input has error').defaultValue(false),\n inputSize: PropTypes.oneOf(['s', 'm']).description('Size of the input').defaultValue('m'),\n clearable: PropTypes.bool.description('Whether the input is clearable').defaultValue(false),\n onClear: PropTypes.func\n .description('Callback triggered when the clearable button is pressed')\n .defaultValue(() => null)\n .signature('(() => void)'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AAAA;AAAA;AAAA;AAAA;AAyBO,MAAM,eAAmC;AAAA,EAC9C,eAAe,MAAM;AAAA,EACrB,SAAS,MAAM;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AACb;AAEO,MAAM,uBAAuB,gDAC/B,4BACA,mBAF+B;AAAA,EAGlC,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC,EACjG,YAAY,oBAAoB,EAChC,aAAa,EAAE;AAAA,EAClB,eAAe,UAAU,KACtB,YAAY,2CAA2C,EACvD,aAAa,MAAM,IAAI,EACvB,UAAU,oDAAoD;AAAA,EACjE,aAAa,UAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,EAAE;AAAA,EACrF,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,KAAK,UAAU,mCAAmC,CAAC,CAAC,EAC5G,YAAY,wBAAwB,EACpC,aAAa,IAAI;AAAA,EACpB,UAAU,UAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,UAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,UAAU,KAAK,YAAY,6BAA6B,EAAE,aAAa,KAAK;AAAA,EACtF,WAAW,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,mBAAmB,EAAE,aAAa,GAAG;AAAA,EACxF,WAAW,UAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EAC1F,SAAS,UAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,MAAM,IAAI,EACvB,UAAU,cAAc;AAC7B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/components.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV2 } from '@elliemae/ds-button';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, layout, space, sizing } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related';\nimport { DSInputTextT } from '../react-desc-prop-types';\nimport { getBorderCss, getHoverBorderCss } from './borders';\n\ninterface StyledInputWrapperProps {\n inputSize: DSInputTextT.Props['inputSize'];\n isDisabled: DSInputTextT.Props['disabled'];\n hasError: DSInputTextT.Props['hasError'];\n isReadOnly: DSInputTextT.Props['readOnly'];\n hasFocus: boolean;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n\n ${getBorderCss}\n border-radius: 2px;\n\n :hover {\n ${getHoverBorderCss}\n }\n\n ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })`\n padding: 0 ${th.space('xxs')};\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n font-size: 13px;\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 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`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA;AAUO,MAAM,qBAAqB,OAAO,MAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,YACW,CAAC,EAAE,gBAAiB,cAAc,MAAM,SAAS;AAAA;AAAA,IAEzD;AAAA;AAAA;AAAA;AAAA,MAIE;AAAA;AAAA;AAAA,IAGF;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,cAAc,OAAO,SAAS,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA,eACnF,GAAG,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQlB,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA,mBAGd,GAAG,WAAW,SAAS;AAAA;AAAA,aAE7B,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,wBAIX,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAMvC,MAAM,oBAAoB,OAAO,YAAY,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV2 } from '@elliemae/ds-button';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, layout, space, sizing } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../exported-related';\nimport { DSInputTextT } from '../react-desc-prop-types';\nimport { getBorderCss, getHoverBorderCss } from './borders';\n\ninterface StyledInputWrapperProps {\n inputSize: DSInputTextT.Props['inputSize'];\n isDisabled: DSInputTextT.Props['disabled'];\n hasError: DSInputTextT.Props['hasError'];\n isReadOnly: DSInputTextT.Props['readOnly'];\n hasFocus: boolean;\n}\n\nexport const StyledInputWrapper = styled(Grid, {\n name: DSInputTextName,\n slot: DSInputTextSlots.INPUT_WRAPPER,\n})<StyledInputWrapperProps>`\n height: ${({ inputSize }) => (inputSize === 'm' ? '28px' : '24px')};\n\n ${getBorderCss}\n border-radius: 2px;\n\n :hover {\n ${getHoverBorderCss}\n }\n\n ${layout}\n ${space}\n ${sizing}\n`;\n\nexport const StyledInput = styled('input', { name: DSInputTextName, slot: DSInputTextSlots.INPUT })`\n padding: 0 ${th.space('xxs')};\n border: none;\n outline: none;\n border-radius: 2px;\n\n width: 100%;\n height: 100%;\n font-size: 13px;\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 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\n &:hover:not(:disabled) {\n background-color: transparent;\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA;AAUO,MAAM,qBAAqB,OAAO,MAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,iBAAiB;AACzB,CAAC;AAAA,YACW,CAAC,EAAE,gBAAiB,cAAc,MAAM,SAAS;AAAA;AAAA,IAEzD;AAAA;AAAA;AAAA;AAAA,MAIE;AAAA;AAAA;AAAA,IAGF;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,cAAc,OAAO,SAAS,EAAE,MAAM,iBAAiB,MAAM,iBAAiB,MAAM,CAAC;AAAA,eACnF,GAAG,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAQlB,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA,mBAGd,GAAG,WAAW,SAAS;AAAA;AAAA,aAE7B,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,wBAIX,GAAG,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAMvC,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;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-input-text",
|
|
3
|
-
"version": "3.2.1-rc.
|
|
3
|
+
"version": "3.2.1-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Input Text",
|
|
6
6
|
"files": [
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"indent": 4
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@elliemae/ds-button": "3.2.1-rc.
|
|
39
|
-
"@elliemae/ds-grid": "3.2.1-rc.
|
|
40
|
-
"@elliemae/ds-icon": "3.2.1-rc.
|
|
41
|
-
"@elliemae/ds-icons": "3.2.1-rc.
|
|
42
|
-
"@elliemae/ds-system": "3.2.1-rc.
|
|
43
|
-
"@elliemae/ds-utilities": "3.2.1-rc.
|
|
38
|
+
"@elliemae/ds-button": "3.2.1-rc.1",
|
|
39
|
+
"@elliemae/ds-grid": "3.2.1-rc.1",
|
|
40
|
+
"@elliemae/ds-icon": "3.2.1-rc.1",
|
|
41
|
+
"@elliemae/ds-icons": "3.2.1-rc.1",
|
|
42
|
+
"@elliemae/ds-system": "3.2.1-rc.1",
|
|
43
|
+
"@elliemae/ds-utilities": "3.2.1-rc.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@elliemae/pui-theme": "~2.6.0",
|