@elliemae/ds-form-input-text 3.49.0-rc.8 → 3.49.0

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.
Files changed (44) hide show
  1. package/dist/cjs/DSInputText.js +3 -4
  2. package/dist/cjs/DSInputText.js.map +2 -2
  3. package/dist/cjs/config/useInputText.js +2 -2
  4. package/dist/cjs/config/useInputText.js.map +2 -2
  5. package/dist/cjs/{exported-related/theming.js → constants/index.js} +19 -6
  6. package/dist/cjs/constants/index.js.map +7 -0
  7. package/dist/cjs/index.js +13 -1
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/styled/borders.js +11 -12
  10. package/dist/cjs/styled/borders.js.map +2 -2
  11. package/dist/cjs/styled/components.js +13 -7
  12. package/dist/cjs/styled/components.js.map +2 -2
  13. package/dist/esm/DSInputText.js +3 -4
  14. package/dist/esm/DSInputText.js.map +2 -2
  15. package/dist/esm/config/useInputText.js +1 -1
  16. package/dist/esm/config/useInputText.js.map +1 -1
  17. package/dist/esm/constants/index.js +25 -0
  18. package/dist/esm/constants/index.js.map +7 -0
  19. package/dist/esm/index.js +16 -1
  20. package/dist/esm/index.js.map +2 -2
  21. package/dist/esm/styled/borders.js +11 -12
  22. package/dist/esm/styled/borders.js.map +2 -2
  23. package/dist/esm/styled/components.js +11 -5
  24. package/dist/esm/styled/components.js.map +2 -2
  25. package/dist/types/config/useInputText.d.ts +6 -6
  26. package/dist/types/constants/index.d.ts +14 -0
  27. package/dist/types/index.d.ts +1 -1
  28. package/dist/types/react-desc-prop-types.d.ts +1 -0
  29. package/dist/types/styled/components.d.ts +1 -1
  30. package/package.json +12 -10
  31. package/dist/cjs/exported-related/data-test-ids.js +0 -39
  32. package/dist/cjs/exported-related/data-test-ids.js.map +0 -7
  33. package/dist/cjs/exported-related/index.js +0 -31
  34. package/dist/cjs/exported-related/index.js.map +0 -7
  35. package/dist/cjs/exported-related/theming.js.map +0 -7
  36. package/dist/esm/exported-related/data-test-ids.js +0 -9
  37. package/dist/esm/exported-related/data-test-ids.js.map +0 -7
  38. package/dist/esm/exported-related/index.js +0 -4
  39. package/dist/esm/exported-related/index.js.map +0 -7
  40. package/dist/esm/exported-related/theming.js +0 -12
  41. package/dist/esm/exported-related/theming.js.map +0 -7
  42. package/dist/types/exported-related/data-test-ids.d.ts +0 -4
  43. package/dist/types/exported-related/index.d.ts +0 -2
  44. package/dist/types/exported-related/theming.d.ts +0 -6
@@ -40,7 +40,6 @@ var import_ds_icon = require("@elliemae/ds-icon");
40
40
  var import_ds_system = require("@elliemae/ds-system");
41
41
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
42
42
  var import_useInputText = require("./config/useInputText.js");
43
- var import_data_test_ids = require("./exported-related/data-test-ids.js");
44
43
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
45
44
  var import_components = require("./styled/components.js");
46
45
  const DSInputText = (props) => {
@@ -65,7 +64,7 @@ const DSInputText = (props) => {
65
64
  ariaDescribedBy
66
65
  } = propsWithDefault;
67
66
  const inputRef = (0, import_react.useRef)(null);
68
- const shouldDisplayClearButton = clearable && !disabled && value !== "";
67
+ const shouldDisplayClearButton = clearable && !disabled && value !== "" && !applyAriaDisabled && !readOnly;
69
68
  const defaultAriaDescribedBy = (0, import_react.useMemo)(
70
69
  () => id !== void 0 ? `${id}_feedback_message ${id}_error_message` : void 0,
71
70
  [id]
@@ -91,7 +90,6 @@ const DSInputText = (props) => {
91
90
  import_components.StyledInput,
92
91
  {
93
92
  inputSize,
94
- "data-testid": import_data_test_ids.DSInputTextDataTestIds.INPUT,
95
93
  disabled,
96
94
  placeholder,
97
95
  readOnly,
@@ -101,6 +99,7 @@ const DSInputText = (props) => {
101
99
  "aria-invalid": hasError,
102
100
  id,
103
101
  "aria-disabled": applyAriaDisabled,
102
+ "aria-readonly": readOnly,
104
103
  ...handlers,
105
104
  ...otherGlobalAttributes
106
105
  }
@@ -108,9 +107,9 @@ const DSInputText = (props) => {
108
107
  shouldDisplayClearButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
109
108
  import_components.StyledClearButton,
110
109
  {
110
+ disabled: disabled || applyAriaDisabled || readOnly,
111
111
  "aria-label": "Clear input value",
112
112
  buttonType: "icon",
113
- "data-testid": import_data_test_ids.DSInputTextDataTestIds.CLEAR_BUTTON,
114
113
  onClick: handleClear,
115
114
  size: "s",
116
115
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.CloseMedium, { color: import_ds_icon.DSIconColors.PRIMARY, size: "s" })
@@ -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, useMemo, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-system';\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 {\n clearable,\n disabled,\n hasError,\n innerRef,\n placeholder,\n readOnly,\n inputSize,\n onClear,\n value,\n applyAriaDisabled,\n ariaDescribedBy,\n } = propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const defaultAriaDescribedBy = useMemo(\n () => (id !== undefined ? `${id}_feedback_message ${id}_error_message` : undefined),\n [id],\n );\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 applyAriaDisabled={applyAriaDisabled}\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={\n defaultAriaDescribedBy || ariaDescribedBy ? `${defaultAriaDescribedBy} ${ariaDescribedBy}` : undefined\n }\n aria-invalid={hasError}\n id={id}\n aria-disabled={applyAriaDisabled}\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;ADgDnB;AAhDJ,mBAAoD;AACpD,sBAA4B;AAC5B,qBAA6B;AAC7B,uBAA0B;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;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,eAAW,qBAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,6BAAyB;AAAA,IAC7B,MAAO,OAAO,SAAY,GAAG,EAAE,qBAAqB,EAAE,mBAAmB;AAAA,IACzE,CAAC,EAAE;AAAA,EACL;AAEA,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;AAAA,MACA,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,4BAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBACE,0BAA0B,kBAAkB,GAAG,sBAAsB,IAAI,eAAe,KAAK;AAAA,YAE/F,gBAAc;AAAA,YACd;AAAA,YACA,iBAAe;AAAA,YACd,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;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.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 {\n clearable,\n disabled,\n hasError,\n innerRef,\n placeholder,\n readOnly,\n inputSize,\n onClear,\n value,\n applyAriaDisabled,\n ariaDescribedBy,\n } = propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '' && !applyAriaDisabled && !readOnly;\n\n const defaultAriaDescribedBy = useMemo(\n () => (id !== undefined ? `${id}_feedback_message ${id}_error_message` : undefined),\n [id],\n );\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 applyAriaDisabled={applyAriaDisabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={\n defaultAriaDescribedBy || ariaDescribedBy ? `${defaultAriaDescribedBy} ${ariaDescribedBy}` : undefined\n }\n aria-invalid={hasError}\n id={id}\n aria-disabled={applyAriaDisabled}\n aria-readonly={readOnly}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n disabled={disabled || applyAriaDisabled || readOnly}\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\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;ADgDnB;AA/CJ,mBAAoD;AACpD,sBAA4B;AAC5B,qBAA6B;AAC7B,uBAA0B;AAC1B,8BAAyB;AACzB,0BAA6B;AAE7B,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;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,eAAW,qBAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU,MAAM,CAAC,qBAAqB,CAAC;AAElG,QAAM,6BAAyB;AAAA,IAC7B,MAAO,OAAO,SAAY,GAAG,EAAE,qBAAqB,EAAE,mBAAmB;AAAA,IACzE,CAAC,EAAE;AAAA,EACL;AAEA,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;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,cAAU,4BAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBACE,0BAA0B,kBAAkB,GAAG,sBAAsB,IAAI,eAAe,KAAK;AAAA,YAE/F,gBAAc;AAAA,YACd;AAAA,YACA,iBAAe;AAAA,YACf,iBAAe;AAAA,YACd,GAAG;AAAA,YACH,GAAG;AAAA;AAAA,QACN;AAAA,QACC,4BACC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,YAAY,qBAAqB;AAAA,YAC3C,cAAW;AAAA,YACX,YAAW;AAAA,YACX,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
  }
@@ -34,11 +34,11 @@ module.exports = __toCommonJS(useInputText_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
36
  var import_react = require("react");
37
- var import_exported_related = require("../exported-related/index.js");
37
+ var import_constants = require("../constants/index.js");
38
38
  var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
39
  const useInputText = (props) => {
40
40
  const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
41
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.DSInputTextPropTypes, import_exported_related.DSInputTextName);
41
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.DSInputTextPropTypes, import_constants.DSInputTextName);
42
42
  const { onValueChange, applyAriaDisabled } = propsWithDefault;
43
43
  const [hasFocus, setHasFocus] = (0, import_react.useState)(false);
44
44
  const handleOnChange = (0, import_react.useCallback)(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useInputText.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\nimport { DSInputTextName } from '../exported-related/index.js';\nimport type { DSInputTextT } from '../react-desc-prop-types.js';\nimport { defaultProps, DSInputTextPropTypes } from '../react-desc-prop-types.js';\n\nexport const useInputText = (props: DSInputTextT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSInputTextT.IProps>>(props, defaultProps);\n\n useValidateTypescriptPropTypes(props, DSInputTextPropTypes, DSInputTextName);\n\n const { onValueChange, applyAriaDisabled } = propsWithDefault;\n\n // =============================================================================\n // INTERNAL STATE\n // =============================================================================\n const [hasFocus, setHasFocus] = useState(false);\n\n // ===========================================================================\n // INTERNAL HANDLERS\n // ===========================================================================\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n if (applyAriaDisabled) return;\n onValueChange(e.target.value, e);\n },\n [onValueChange, applyAriaDisabled],\n );\n\n const handleOnFocus: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(true);\n }, []);\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(false);\n }, []);\n\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes(propsWithDefault, {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return useMemo(\n () => ({\n globalAttributes,\n hasFocus,\n handlers: {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n },\n propsWithDefault,\n xstyledProps,\n }),\n [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAKO;AAEP,mBAA+C;AAC/C,8BAAgC;AAEhC,mCAAmD;AAE5C,MAAM,eAAe,CAAC,UAA8B;AACzD,QAAM,uBAAmB,sDAA4D,OAAO,yCAAY;AAExG,8DAA+B,OAAO,mDAAsB,uCAAe;AAE3E,QAAM,EAAE,eAAe,kBAAkB,IAAI;AAK7C,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAK9C,QAAM,qBAA6D;AAAA,IACjE,CAAC,MAAM;AACL,UAAI,kBAAmB;AACvB,oBAAc,EAAE,OAAO,OAAO,CAAC;AAAA,IACjC;AAAA,IACA,CAAC,eAAe,iBAAiB;AAAA,EACnC;AAEA,QAAM,oBAA2D,0BAAY,MAAM;AACjF,gBAAY,IAAI;AAAA,EAClB,GAAG,CAAC,CAAC;AAEL,QAAM,mBAA0D,0BAAY,MAAM;AAChF,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AAKL,QAAM,uBAAmB,gDAAuB,kBAAkB;AAAA,IAChE,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,mBAAe,4CAAmB,gBAAgB;AAExD,aAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,gBAAgB,eAAe,UAAU,kBAAkB,YAAY;AAAA,EAC1G;AACF;",
4
+ "sourcesContent": ["import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\nimport { DSInputTextName } from '../constants/index.js';\nimport type { DSInputTextT } from '../react-desc-prop-types.js';\nimport { defaultProps, DSInputTextPropTypes } from '../react-desc-prop-types.js';\n\nexport const useInputText = (props: DSInputTextT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSInputTextT.IProps>>(props, defaultProps);\n\n useValidateTypescriptPropTypes(props, DSInputTextPropTypes, DSInputTextName);\n\n const { onValueChange, applyAriaDisabled } = propsWithDefault;\n\n // =============================================================================\n // INTERNAL STATE\n // =============================================================================\n const [hasFocus, setHasFocus] = useState(false);\n\n // ===========================================================================\n // INTERNAL HANDLERS\n // ===========================================================================\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n if (applyAriaDisabled) return;\n onValueChange(e.target.value, e);\n },\n [onValueChange, applyAriaDisabled],\n );\n\n const handleOnFocus: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(true);\n }, []);\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(false);\n }, []);\n\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes(propsWithDefault, {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return useMemo(\n () => ({\n globalAttributes,\n hasFocus,\n handlers: {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n },\n propsWithDefault,\n xstyledProps,\n }),\n [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAKO;AAEP,mBAA+C;AAC/C,uBAAgC;AAEhC,mCAAmD;AAE5C,MAAM,eAAe,CAAC,UAA8B;AACzD,QAAM,uBAAmB,sDAA4D,OAAO,yCAAY;AAExG,8DAA+B,OAAO,mDAAsB,gCAAe;AAE3E,QAAM,EAAE,eAAe,kBAAkB,IAAI;AAK7C,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAK9C,QAAM,qBAA6D;AAAA,IACjE,CAAC,MAAM;AACL,UAAI,kBAAmB;AACvB,oBAAc,EAAE,OAAO,OAAO,CAAC;AAAA,IACjC;AAAA,IACA,CAAC,eAAe,iBAAiB;AAAA,EACnC;AAEA,QAAM,oBAA2D,0BAAY,MAAM;AACjF,gBAAY,IAAI;AAAA,EAClB,GAAG,CAAC,CAAC;AAEL,QAAM,mBAA0D,0BAAY,MAAM;AAChF,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AAKL,QAAM,uBAAmB,gDAAuB,kBAAkB;AAAA,IAChE,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,mBAAe,4CAAmB,gBAAgB;AAExD,aAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,gBAAgB,eAAe,UAAU,kBAAkB,YAAY;AAAA,EAC1G;AACF;",
6
6
  "names": []
7
7
  }
@@ -26,17 +26,30 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var theming_exports = {};
30
- __export(theming_exports, {
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ DSFormInputTextName: () => DSFormInputTextName,
32
+ DSInputTextDataTestIds: () => DSInputTextDataTestIds,
31
33
  DSInputTextName: () => DSInputTextName,
32
- DSInputTextSlots: () => DSInputTextSlots
34
+ DSInputTextSlots: () => DSInputTextSlots,
35
+ FORM_INPUT_TEXT_DATA_TESTID: () => FORM_INPUT_TEXT_DATA_TESTID,
36
+ FORM_INPUT_TEXT_SLOTS: () => FORM_INPUT_TEXT_SLOTS
33
37
  });
34
- module.exports = __toCommonJS(theming_exports);
38
+ module.exports = __toCommonJS(constants_exports);
35
39
  var React = __toESM(require("react"));
36
- const DSInputTextName = "DSInputText";
40
+ var import_ds_system = require("@elliemae/ds-system");
41
+ const DSFormInputTextName = "DSInputtext";
42
+ const FORM_INPUT_TEXT_SLOTS = {
43
+ INPUT_WRAPPER: "root",
44
+ INPUT: "input",
45
+ CLEAR_BUTTON: "input-clear-button"
46
+ };
47
+ const FORM_INPUT_TEXT_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSFormInputTextName, FORM_INPUT_TEXT_SLOTS);
48
+ const DSInputTextDataTestIds = FORM_INPUT_TEXT_DATA_TESTID;
49
+ const DSInputTextName = "DSInputtext";
37
50
  const DSInputTextSlots = {
38
51
  INPUT_WRAPPER: "root",
39
52
  INPUT: "input",
40
53
  CLEAR_BUTTON: "input-clear-button"
41
54
  };
42
- //# sourceMappingURL=theming.js.map
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFormInputTextName = 'DSInputtext';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FORM_INPUT_TEXT_SLOTS = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FORM_INPUT_TEXT_DATA_TESTID = slotObjectToDataTestIds(DSFormInputTextName, FORM_INPUT_TEXT_SLOTS);\n\n// keeping legacy code to avoid breaking changes, the code above this is the new convention\nexport const DSInputTextDataTestIds = FORM_INPUT_TEXT_DATA_TESTID;\n\nexport const DSInputTextName = 'DSInputtext';\n\nexport const DSInputTextSlots = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,sBAAsB;AAG5B,MAAM,wBAAwB;AAAA,EACnC,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;AAGO,MAAM,kCAA8B,0CAAwB,qBAAqB,qBAAqB;AAGtG,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;",
6
+ "names": []
7
+ }
package/dist/cjs/index.js CHANGED
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -24,8 +28,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
28
  ));
25
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
30
  var src_exports = {};
31
+ __export(src_exports, {
32
+ DSFormInputTextName: () => import_constants.DSFormInputTextName,
33
+ DSInputTextDataTestIds: () => import_constants.DSInputTextDataTestIds,
34
+ DSInputTextName: () => import_constants.DSInputTextName,
35
+ DSInputTextSlots: () => import_constants.DSInputTextSlots,
36
+ FORM_INPUT_TEXT_DATA_TESTID: () => import_constants.FORM_INPUT_TEXT_DATA_TESTID,
37
+ FORM_INPUT_TEXT_SLOTS: () => import_constants.FORM_INPUT_TEXT_SLOTS
38
+ });
27
39
  module.exports = __toCommonJS(src_exports);
28
40
  var React = __toESM(require("react"));
29
41
  __reExport(src_exports, require("./DSInputText.js"), module.exports);
30
- __reExport(src_exports, require("./exported-related/index.js"), module.exports);
42
+ var import_constants = require("./constants/index.js");
31
43
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSInputText.js';\nexport * from './exported-related/index.js';\nexport type { DSInputTextT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,6BAAd;AACA,wBAAc,wCADd;",
4
+ "sourcesContent": ["export * from './DSInputText.js';\nexport type { DSInputTextT } from './react-desc-prop-types.js';\nexport {\n DSFormInputTextName,\n FORM_INPUT_TEXT_SLOTS,\n FORM_INPUT_TEXT_DATA_TESTID,\n // legacy imports to avoid breaking changes\n DSInputTextDataTestIds,\n DSInputTextSlots,\n DSInputTextName,\n} from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,6BAAd;AAEA,uBAQO;",
6
6
  "names": []
7
7
  }
@@ -38,8 +38,9 @@ const commonBorderCss = import_ds_system.css`
38
38
  border: 1px solid ${import_ds_system.th.color("neutral-400")};
39
39
  `;
40
40
  const readOnlyBorderCss = import_ds_system.css`
41
- border: 1px solid transparent;
42
- border-top-color: ${import_ds_system.th.color("neutral-400")};
41
+ background-color: ${import_ds_system.th.color("neutral-050")};
42
+ border: 1px solid ${import_ds_system.th.color("neutral-080")};
43
+ border-bottom: 1px solid ${import_ds_system.th.color("neutral-400")};
43
44
  `;
44
45
  const disabledBorderCss = commonBorderCss;
45
46
  const hasErrorBorderCss = import_ds_system.css`
@@ -48,6 +49,9 @@ const hasErrorBorderCss = import_ds_system.css`
48
49
  const hoverBorderCss = import_ds_system.css`
49
50
  border: 1px solid ${import_ds_system.th.color("brand-700")};
50
51
  `;
52
+ const hoverReadOnlyBorderCss = import_ds_system.css`
53
+ border: 1px solid ${import_ds_system.th.color("brand-600")};
54
+ `;
51
55
  const focusBorderCss = import_ds_system.css`
52
56
  border: 1px solid transparent;
53
57
  outline: 2px solid ${import_ds_system.th.color("brand-700")};
@@ -55,24 +59,19 @@ const focusBorderCss = import_ds_system.css`
55
59
  `;
56
60
  const getBorderCss = (props) => {
57
61
  if (props.isDisabled) return disabledBorderCss;
58
- if (props.applyAriaDisabled) {
59
- if (props.hasFocus) return focusBorderCss;
60
- return disabledBorderCss;
61
- }
62
62
  if (props.hasFocus) return focusBorderCss;
63
63
  if (props.hasError) return hasErrorBorderCss;
64
- if (props.isReadOnly) return readOnlyBorderCss;
64
+ if (props.isReadOnly || props.applyAriaDisabled) return readOnlyBorderCss;
65
65
  return commonBorderCss;
66
66
  };
67
67
  const getHoverBorderCss = (props) => {
68
68
  if (props.isDisabled) return disabledBorderCss;
69
- if (props.applyAriaDisabled) {
70
- if (props.hasFocus) return focusBorderCss;
71
- return disabledBorderCss;
72
- }
73
69
  if (props.hasFocus) return focusBorderCss;
74
70
  if (props.hasError) return hasErrorBorderCss;
75
- if (props.isReadOnly) return readOnlyBorderCss;
71
+ if (props.isReadOnly || props.applyAriaDisabled) {
72
+ if (props.hasFocus) return focusBorderCss;
73
+ return hoverReadOnlyBorderCss;
74
+ }
76
75
  return hoverBorderCss;
77
76
  };
78
77
  //# sourceMappingURL=borders.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/styled/borders.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n applyAriaDisabled: 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.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return disabledBorderCss;\n }\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.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return disabledBorderCss;\n }\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;AAUxB,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,mBAAmB;AAC3B,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,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,mBAAmB;AAC3B,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;",
4
+ "sourcesContent": ["import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n applyAriaDisabled: 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 background-color: ${th.color('neutral-050')};\n border: 1px solid ${th.color('neutral-080')};\n border-bottom: 1px solid ${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 hoverReadOnlyBorderCss = css`\n border: 1px solid ${th.color('brand-600')};\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 || props.applyAriaDisabled) 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 || props.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return hoverReadOnlyBorderCss;\n }\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;AAUxB,MAAM,kBAAkB;AAAA,sBACF,oBAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAAA,sBACJ,oBAAG,MAAM,aAAa,CAAC;AAAA,sBACvB,oBAAG,MAAM,aAAa,CAAC;AAAA,6BAChB,oBAAG,MAAM,aAAa,CAAC;AAAA;AAGpD,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;AAAA,sBACJ,oBAAG,MAAM,YAAY,CAAC;AAAA;AAG5C,MAAM,iBAAiB;AAAA,sBACD,oBAAG,MAAM,WAAW,CAAC;AAAA;AAG3C,MAAM,yBAAyB;AAAA,sBACT,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,cAAc,MAAM,kBAAmB,QAAO;AACxD,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,cAAc,MAAM,mBAAmB;AAC/C,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -37,11 +37,11 @@ var React = __toESM(require("react"));
37
37
  var import_ds_button_v2 = require("@elliemae/ds-button-v2");
38
38
  var import_ds_grid = require("@elliemae/ds-grid");
39
39
  var import_ds_system = require("@elliemae/ds-system");
40
- var import_exported_related = require("../exported-related/index.js");
40
+ var import_constants = require("../constants/index.js");
41
41
  var import_borders = require("./borders.js");
42
42
  const StyledInputWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, {
43
- name: import_exported_related.DSInputTextName,
44
- slot: import_exported_related.DSInputTextSlots.INPUT_WRAPPER
43
+ name: import_constants.DSInputTextName,
44
+ slot: import_constants.DSInputTextSlots.INPUT_WRAPPER
45
45
  })`
46
46
  ${import_borders.getBorderCss}
47
47
  border-radius: 2px;
@@ -51,7 +51,7 @@ const StyledInputWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, {
51
51
  min-height: ${({ inputSize }) => inputSize === "m" ? "28px" : "24px"};
52
52
  ${import_ds_system.xStyledCommonProps}
53
53
  `;
54
- const StyledInput = (0, import_ds_system.styled)("input", { name: import_exported_related.DSInputTextName, slot: import_exported_related.DSInputTextSlots.INPUT })`
54
+ const StyledInput = (0, import_ds_system.styled)("input", { name: import_constants.DSInputTextName, slot: import_constants.DSInputTextSlots.INPUT })`
55
55
  padding: ${({ inputSize }) => inputSize === "m" ? "4px" : "3px"} ${import_ds_system.th.space("xxs")};
56
56
  @media (max-width: ${import_ds_system.th.breakpoint("small")}) {
57
57
  padding: ${({ inputSize }) => inputSize === "m" ? "3px" : "1.25px"} ${import_ds_system.th.space("xxs")};
@@ -70,15 +70,21 @@ const StyledInput = (0, import_ds_system.styled)("input", { name: import_exporte
70
70
  color: ${import_ds_system.th.color("neutral-500")};
71
71
  }
72
72
 
73
- :disabled,
74
- &[aria-disabled='true'] {
73
+ :disabled {
75
74
  background-color: ${import_ds_system.th.color("neutral-080")};
76
75
  color: #616b7f;
77
76
  cursor: not-allowed;
78
77
  caret-color: transparent;
79
78
  }
79
+
80
+ &[aria-disabled='true'],
81
+ &[aria-readonly='true'] {
82
+ background-color: ${import_ds_system.th.color("neutral-050")};
83
+ caret-color: transparent;
84
+ cursor: text;
85
+ }
80
86
  `;
81
- const StyledClearButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2, { name: import_exported_related.DSInputTextName, slot: import_exported_related.DSInputTextSlots.CLEAR_BUTTON })`
87
+ const StyledClearButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV3, { name: import_constants.DSInputTextName, slot: import_constants.DSInputTextSlots.CLEAR_BUTTON })`
82
88
  height: 100%;
83
89
 
84
90
  &:after {
@@ -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-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 applyAriaDisabled: 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 &[aria-disabled='true'] {\n background-color: ${th.color('neutral-080')};\n color: #616b7f;\n cursor: not-allowed;\n caret-color: transparent;\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 &:hover:not([aria-disabled='true']) {\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;AAWzC,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;AAAA,wBAKZ,oBAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxC,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;AAAA;",
4
+ "sourcesContent": ["import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../constants/index.js';\nimport { getBorderCss, getHoverBorderCss } from './borders.js';\n\ninterface StyledInputWrapperProps {\n isDisabled: boolean;\n applyAriaDisabled: 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 caret-color: transparent;\n }\n\n &[aria-disabled='true'],\n &[aria-readonly='true'] {\n background-color: ${th.color('neutral-050')};\n caret-color: transparent;\n cursor: text;\n }\n`;\n\nexport const StyledClearButton = styled(DSButtonV3, { 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 &:hover:not([aria-disabled='true']) {\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,uBAAkD;AAClD,qBAAgD;AAWzC,MAAM,yBAAqB,yBAAO,qBAAM;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,kCAAiB;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,kCAAiB,MAAM,kCAAiB,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;AAAA;AAAA;AAAA;AAAA,wBAQvB,oBAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAMxC,MAAM,wBAAoB,yBAAO,gCAAY,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -6,7 +6,6 @@ import { DSIconColors } from "@elliemae/ds-icon";
6
6
  import { mergeRefs } from "@elliemae/ds-system";
7
7
  import { describe } from "@elliemae/ds-props-helpers";
8
8
  import { useInputText } from "./config/useInputText.js";
9
- import { DSInputTextDataTestIds } from "./exported-related/data-test-ids.js";
10
9
  import { DSInputTextPropTypes } from "./react-desc-prop-types.js";
11
10
  import { StyledClearButton, StyledInput, StyledInputWrapper } from "./styled/components.js";
12
11
  const DSInputText = (props) => {
@@ -31,7 +30,7 @@ const DSInputText = (props) => {
31
30
  ariaDescribedBy
32
31
  } = propsWithDefault;
33
32
  const inputRef = useRef(null);
34
- const shouldDisplayClearButton = clearable && !disabled && value !== "";
33
+ const shouldDisplayClearButton = clearable && !disabled && value !== "" && !applyAriaDisabled && !readOnly;
35
34
  const defaultAriaDescribedBy = useMemo(
36
35
  () => id !== void 0 ? `${id}_feedback_message ${id}_error_message` : void 0,
37
36
  [id]
@@ -57,7 +56,6 @@ const DSInputText = (props) => {
57
56
  StyledInput,
58
57
  {
59
58
  inputSize,
60
- "data-testid": DSInputTextDataTestIds.INPUT,
61
59
  disabled,
62
60
  placeholder,
63
61
  readOnly,
@@ -67,6 +65,7 @@ const DSInputText = (props) => {
67
65
  "aria-invalid": hasError,
68
66
  id,
69
67
  "aria-disabled": applyAriaDisabled,
68
+ "aria-readonly": readOnly,
70
69
  ...handlers,
71
70
  ...otherGlobalAttributes
72
71
  }
@@ -74,9 +73,9 @@ const DSInputText = (props) => {
74
73
  shouldDisplayClearButton && /* @__PURE__ */ jsx(
75
74
  StyledClearButton,
76
75
  {
76
+ disabled: disabled || applyAriaDisabled || readOnly,
77
77
  "aria-label": "Clear input value",
78
78
  buttonType: "icon",
79
- "data-testid": DSInputTextDataTestIds.CLEAR_BUTTON,
80
79
  onClick: handleClear,
81
80
  size: "s",
82
81
  children: /* @__PURE__ */ jsx(CloseMedium, { color: DSIconColors.PRIMARY, size: "s" })
@@ -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, useMemo, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-system';\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 {\n clearable,\n disabled,\n hasError,\n innerRef,\n placeholder,\n readOnly,\n inputSize,\n onClear,\n value,\n applyAriaDisabled,\n ariaDescribedBy,\n } = propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const defaultAriaDescribedBy = useMemo(\n () => (id !== undefined ? `${id}_feedback_message ${id}_error_message` : undefined),\n [id],\n );\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 applyAriaDisabled={applyAriaDisabled}\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={\n defaultAriaDescribedBy || ariaDescribedBy ? `${defaultAriaDescribedBy} ${ariaDescribedBy}` : undefined\n }\n aria-invalid={hasError}\n id={id}\n aria-disabled={applyAriaDisabled}\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;ACgDnB,SAWE,KAXF;AAhDJ,SAAgB,aAAa,SAAS,cAAc;AACpD,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;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,yBAAyB;AAAA,IAC7B,MAAO,OAAO,SAAY,GAAG,EAAE,qBAAqB,EAAE,mBAAmB;AAAA,IACzE,CAAC,EAAE;AAAA,EACL;AAEA,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;AAAA,MACA,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,oBACE,0BAA0B,kBAAkB,GAAG,sBAAsB,IAAI,eAAe,KAAK;AAAA,YAE/F,gBAAc;AAAA,YACd;AAAA,YACA,iBAAe;AAAA,YACd,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;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-icons';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useInputText } from './config/useInputText.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 {\n clearable,\n disabled,\n hasError,\n innerRef,\n placeholder,\n readOnly,\n inputSize,\n onClear,\n value,\n applyAriaDisabled,\n ariaDescribedBy,\n } = propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '' && !applyAriaDisabled && !readOnly;\n\n const defaultAriaDescribedBy = useMemo(\n () => (id !== undefined ? `${id}_feedback_message ${id}_error_message` : undefined),\n [id],\n );\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 applyAriaDisabled={applyAriaDisabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n inputSize={inputSize}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n innerRef={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={\n defaultAriaDescribedBy || ariaDescribedBy ? `${defaultAriaDescribedBy} ${ariaDescribedBy}` : undefined\n }\n aria-invalid={hasError}\n id={id}\n aria-disabled={applyAriaDisabled}\n aria-readonly={readOnly}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n disabled={disabled || applyAriaDisabled || readOnly}\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\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;ACgDnB,SAWE,KAXF;AA/CJ,SAAgB,aAAa,SAAS,cAAc;AACpD,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAE7B,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;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU,MAAM,CAAC,qBAAqB,CAAC;AAElG,QAAM,yBAAyB;AAAA,IAC7B,MAAO,OAAO,SAAY,GAAG,EAAE,qBAAqB,EAAE,mBAAmB;AAAA,IACzE,CAAC,EAAE;AAAA,EACL;AAEA,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;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,UAAU,UAAU,UAAU,QAAQ;AAAA,YACtC;AAAA,YACA,oBACE,0BAA0B,kBAAkB,GAAG,sBAAsB,IAAI,eAAe,KAAK;AAAA,YAE/F,gBAAc;AAAA,YACd;AAAA,YACA,iBAAe;AAAA,YACf,iBAAe;AAAA,YACd,GAAG;AAAA,YACH,GAAG;AAAA;AAAA,QACN;AAAA,QACC,4BACC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,YAAY,qBAAqB;AAAA,YAC3C,cAAW;AAAA,YACX,YAAW;AAAA,YACX,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
  }
@@ -6,7 +6,7 @@ import {
6
6
  useValidateTypescriptPropTypes
7
7
  } from "@elliemae/ds-props-helpers";
8
8
  import { useCallback, useMemo, useState } from "react";
9
- import { DSInputTextName } from "../exported-related/index.js";
9
+ import { DSInputTextName } from "../constants/index.js";
10
10
  import { defaultProps, DSInputTextPropTypes } from "../react-desc-prop-types.js";
11
11
  const useInputText = (props) => {
12
12
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useInputText.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\nimport { DSInputTextName } from '../exported-related/index.js';\nimport type { DSInputTextT } from '../react-desc-prop-types.js';\nimport { defaultProps, DSInputTextPropTypes } from '../react-desc-prop-types.js';\n\nexport const useInputText = (props: DSInputTextT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSInputTextT.IProps>>(props, defaultProps);\n\n useValidateTypescriptPropTypes(props, DSInputTextPropTypes, DSInputTextName);\n\n const { onValueChange, applyAriaDisabled } = propsWithDefault;\n\n // =============================================================================\n // INTERNAL STATE\n // =============================================================================\n const [hasFocus, setHasFocus] = useState(false);\n\n // ===========================================================================\n // INTERNAL HANDLERS\n // ===========================================================================\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n if (applyAriaDisabled) return;\n onValueChange(e.target.value, e);\n },\n [onValueChange, applyAriaDisabled],\n );\n\n const handleOnFocus: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(true);\n }, []);\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(false);\n }, []);\n\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes(propsWithDefault, {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return useMemo(\n () => ({\n globalAttributes,\n hasFocus,\n handlers: {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n },\n propsWithDefault,\n xstyledProps,\n }),\n [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps],\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\nimport { DSInputTextName } from '../constants/index.js';\nimport type { DSInputTextT } from '../react-desc-prop-types.js';\nimport { defaultProps, DSInputTextPropTypes } from '../react-desc-prop-types.js';\n\nexport const useInputText = (props: DSInputTextT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSInputTextT.IProps>>(props, defaultProps);\n\n useValidateTypescriptPropTypes(props, DSInputTextPropTypes, DSInputTextName);\n\n const { onValueChange, applyAriaDisabled } = propsWithDefault;\n\n // =============================================================================\n // INTERNAL STATE\n // =============================================================================\n const [hasFocus, setHasFocus] = useState(false);\n\n // ===========================================================================\n // INTERNAL HANDLERS\n // ===========================================================================\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n if (applyAriaDisabled) return;\n onValueChange(e.target.value, e);\n },\n [onValueChange, applyAriaDisabled],\n );\n\n const handleOnFocus: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(true);\n }, []);\n\n const handleOnBlur: React.FocusEventHandler<HTMLInputElement> = useCallback(() => {\n setHasFocus(false);\n }, []);\n\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes(propsWithDefault, {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return useMemo(\n () => ({\n globalAttributes,\n hasFocus,\n handlers: {\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n },\n propsWithDefault,\n xstyledProps,\n }),\n [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps],\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,aAAa,SAAS,gBAAgB;AAC/C,SAAS,uBAAuB;AAEhC,SAAS,cAAc,4BAA4B;AAE5C,MAAM,eAAe,CAAC,UAA8B;AACzD,QAAM,mBAAmB,6BAA4D,OAAO,YAAY;AAExG,iCAA+B,OAAO,sBAAsB,eAAe;AAE3E,QAAM,EAAE,eAAe,kBAAkB,IAAI;AAK7C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAK9C,QAAM,iBAA6D;AAAA,IACjE,CAAC,MAAM;AACL,UAAI,kBAAmB;AACvB,oBAAc,EAAE,OAAO,OAAO,CAAC;AAAA,IACjC;AAAA,IACA,CAAC,eAAe,iBAAiB;AAAA,EACnC;AAEA,QAAM,gBAA2D,YAAY,MAAM;AACjF,gBAAY,IAAI;AAAA,EAClB,GAAG,CAAC,CAAC;AAEL,QAAM,eAA0D,YAAY,MAAM;AAChF,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AAKL,QAAM,mBAAmB,uBAAuB,kBAAkB;AAAA,IAChE,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,eAAe,mBAAmB,gBAAgB;AAExD,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,gBAAgB,eAAe,UAAU,kBAAkB,YAAY;AAAA,EAC1G;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSFormInputTextName = "DSInputtext";
4
+ const FORM_INPUT_TEXT_SLOTS = {
5
+ INPUT_WRAPPER: "root",
6
+ INPUT: "input",
7
+ CLEAR_BUTTON: "input-clear-button"
8
+ };
9
+ const FORM_INPUT_TEXT_DATA_TESTID = slotObjectToDataTestIds(DSFormInputTextName, FORM_INPUT_TEXT_SLOTS);
10
+ const DSInputTextDataTestIds = FORM_INPUT_TEXT_DATA_TESTID;
11
+ const DSInputTextName = "DSInputtext";
12
+ const DSInputTextSlots = {
13
+ INPUT_WRAPPER: "root",
14
+ INPUT: "input",
15
+ CLEAR_BUTTON: "input-clear-button"
16
+ };
17
+ export {
18
+ DSFormInputTextName,
19
+ DSInputTextDataTestIds,
20
+ DSInputTextName,
21
+ DSInputTextSlots,
22
+ FORM_INPUT_TEXT_DATA_TESTID,
23
+ FORM_INPUT_TEXT_SLOTS
24
+ };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFormInputTextName = 'DSInputtext';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FORM_INPUT_TEXT_SLOTS = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const FORM_INPUT_TEXT_DATA_TESTID = slotObjectToDataTestIds(DSFormInputTextName, FORM_INPUT_TEXT_SLOTS);\n\n// keeping legacy code to avoid breaking changes, the code above this is the new convention\nexport const DSInputTextDataTestIds = FORM_INPUT_TEXT_DATA_TESTID;\n\nexport const DSInputTextName = 'DSInputtext';\n\nexport const DSInputTextSlots = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,sBAAsB;AAG5B,MAAM,wBAAwB;AAAA,EACnC,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;AAGO,MAAM,8BAA8B,wBAAwB,qBAAqB,qBAAqB;AAGtG,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;",
6
+ "names": []
7
+ }
package/dist/esm/index.js CHANGED
@@ -1,4 +1,19 @@
1
1
  import * as React from "react";
2
2
  export * from "./DSInputText.js";
3
- export * from "./exported-related/index.js";
3
+ import {
4
+ DSFormInputTextName,
5
+ FORM_INPUT_TEXT_SLOTS,
6
+ FORM_INPUT_TEXT_DATA_TESTID,
7
+ DSInputTextDataTestIds,
8
+ DSInputTextSlots,
9
+ DSInputTextName
10
+ } from "./constants/index.js";
11
+ export {
12
+ DSFormInputTextName,
13
+ DSInputTextDataTestIds,
14
+ DSInputTextName,
15
+ DSInputTextSlots,
16
+ FORM_INPUT_TEXT_DATA_TESTID,
17
+ FORM_INPUT_TEXT_SLOTS
18
+ };
4
19
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSInputText.js';\nexport * from './exported-related/index.js';\nexport type { DSInputTextT } from './react-desc-prop-types.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSInputText.js';\nexport type { DSInputTextT } from './react-desc-prop-types.js';\nexport {\n DSFormInputTextName,\n FORM_INPUT_TEXT_SLOTS,\n FORM_INPUT_TEXT_DATA_TESTID,\n // legacy imports to avoid breaking changes\n DSInputTextDataTestIds,\n DSInputTextSlots,\n DSInputTextName,\n} from './constants/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
6
6
  "names": []
7
7
  }
@@ -4,8 +4,9 @@ const commonBorderCss = css`
4
4
  border: 1px solid ${th.color("neutral-400")};
5
5
  `;
6
6
  const readOnlyBorderCss = css`
7
- border: 1px solid transparent;
8
- border-top-color: ${th.color("neutral-400")};
7
+ background-color: ${th.color("neutral-050")};
8
+ border: 1px solid ${th.color("neutral-080")};
9
+ border-bottom: 1px solid ${th.color("neutral-400")};
9
10
  `;
10
11
  const disabledBorderCss = commonBorderCss;
11
12
  const hasErrorBorderCss = css`
@@ -14,6 +15,9 @@ const hasErrorBorderCss = css`
14
15
  const hoverBorderCss = css`
15
16
  border: 1px solid ${th.color("brand-700")};
16
17
  `;
18
+ const hoverReadOnlyBorderCss = css`
19
+ border: 1px solid ${th.color("brand-600")};
20
+ `;
17
21
  const focusBorderCss = css`
18
22
  border: 1px solid transparent;
19
23
  outline: 2px solid ${th.color("brand-700")};
@@ -21,24 +25,19 @@ const focusBorderCss = css`
21
25
  `;
22
26
  const getBorderCss = (props) => {
23
27
  if (props.isDisabled) return disabledBorderCss;
24
- if (props.applyAriaDisabled) {
25
- if (props.hasFocus) return focusBorderCss;
26
- return disabledBorderCss;
27
- }
28
28
  if (props.hasFocus) return focusBorderCss;
29
29
  if (props.hasError) return hasErrorBorderCss;
30
- if (props.isReadOnly) return readOnlyBorderCss;
30
+ if (props.isReadOnly || props.applyAriaDisabled) return readOnlyBorderCss;
31
31
  return commonBorderCss;
32
32
  };
33
33
  const getHoverBorderCss = (props) => {
34
34
  if (props.isDisabled) return disabledBorderCss;
35
- if (props.applyAriaDisabled) {
36
- if (props.hasFocus) return focusBorderCss;
37
- return disabledBorderCss;
38
- }
39
35
  if (props.hasFocus) return focusBorderCss;
40
36
  if (props.hasError) return hasErrorBorderCss;
41
- if (props.isReadOnly) return readOnlyBorderCss;
37
+ if (props.isReadOnly || props.applyAriaDisabled) {
38
+ if (props.hasFocus) return focusBorderCss;
39
+ return hoverReadOnlyBorderCss;
40
+ }
42
41
  return hoverBorderCss;
43
42
  };
44
43
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/borders.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n applyAriaDisabled: 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.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return disabledBorderCss;\n }\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.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return disabledBorderCss;\n }\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;AAUxB,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,mBAAmB;AAC3B,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,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,mBAAmB;AAC3B,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,SAAU,QAAO;AAC3B,MAAI,MAAM,WAAY,QAAO;AAC7B,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { th, css } from '@elliemae/ds-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n applyAriaDisabled: 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 background-color: ${th.color('neutral-050')};\n border: 1px solid ${th.color('neutral-080')};\n border-bottom: 1px solid ${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 hoverReadOnlyBorderCss = css`\n border: 1px solid ${th.color('brand-600')};\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 || props.applyAriaDisabled) 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 || props.applyAriaDisabled) {\n if (props.hasFocus) return focusBorderCss;\n return hoverReadOnlyBorderCss;\n }\n return hoverBorderCss;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,IAAI,WAAW;AAUxB,MAAM,kBAAkB;AAAA,sBACF,GAAG,MAAM,aAAa,CAAC;AAAA;AAG7C,MAAM,oBAAoB;AAAA,sBACJ,GAAG,MAAM,aAAa,CAAC;AAAA,sBACvB,GAAG,MAAM,aAAa,CAAC;AAAA,6BAChB,GAAG,MAAM,aAAa,CAAC;AAAA;AAGpD,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;AAAA,sBACJ,GAAG,MAAM,YAAY,CAAC;AAAA;AAG5C,MAAM,iBAAiB;AAAA,sBACD,GAAG,MAAM,WAAW,CAAC;AAAA;AAG3C,MAAM,yBAAyB;AAAA,sBACT,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,cAAc,MAAM,kBAAmB,QAAO;AACxD,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,cAAc,MAAM,mBAAmB;AAC/C,QAAI,MAAM,SAAU,QAAO;AAC3B,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import { DSButtonV2 } from "@elliemae/ds-button-v2";
2
+ import { DSButtonV3 } from "@elliemae/ds-button-v2";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
4
  import { th, styled, xStyledCommonProps } from "@elliemae/ds-system";
5
- import { DSInputTextName, DSInputTextSlots } from "../exported-related/index.js";
5
+ import { DSInputTextName, DSInputTextSlots } from "../constants/index.js";
6
6
  import { getBorderCss, getHoverBorderCss } from "./borders.js";
7
7
  const StyledInputWrapper = styled(Grid, {
8
8
  name: DSInputTextName,
@@ -35,15 +35,21 @@ const StyledInput = styled("input", { name: DSInputTextName, slot: DSInputTextSl
35
35
  color: ${th.color("neutral-500")};
36
36
  }
37
37
 
38
- :disabled,
39
- &[aria-disabled='true'] {
38
+ :disabled {
40
39
  background-color: ${th.color("neutral-080")};
41
40
  color: #616b7f;
42
41
  cursor: not-allowed;
43
42
  caret-color: transparent;
44
43
  }
44
+
45
+ &[aria-disabled='true'],
46
+ &[aria-readonly='true'] {
47
+ background-color: ${th.color("neutral-050")};
48
+ caret-color: transparent;
49
+ cursor: text;
50
+ }
45
51
  `;
46
- const StyledClearButton = styled(DSButtonV2, { name: DSInputTextName, slot: DSInputTextSlots.CLEAR_BUTTON })`
52
+ const StyledClearButton = styled(DSButtonV3, { name: DSInputTextName, slot: DSInputTextSlots.CLEAR_BUTTON })`
47
53
  height: 100%;
48
54
 
49
55
  &:after {
@@ -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-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 applyAriaDisabled: 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 &[aria-disabled='true'] {\n background-color: ${th.color('neutral-080')};\n color: #616b7f;\n cursor: not-allowed;\n caret-color: transparent;\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 &:hover:not([aria-disabled='true']) {\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;AAWzC,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;AAAA,wBAKZ,GAAG,MAAM,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxC,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;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { th, styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSInputTextName, DSInputTextSlots } from '../constants/index.js';\nimport { getBorderCss, getHoverBorderCss } from './borders.js';\n\ninterface StyledInputWrapperProps {\n isDisabled: boolean;\n applyAriaDisabled: 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 caret-color: transparent;\n }\n\n &[aria-disabled='true'],\n &[aria-readonly='true'] {\n background-color: ${th.color('neutral-050')};\n caret-color: transparent;\n cursor: text;\n }\n`;\n\nexport const StyledClearButton = styled(DSButtonV3, { 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 &:hover:not([aria-disabled='true']) {\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;AAWzC,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;AAAA;AAAA;AAAA;AAAA,wBAQvB,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;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,12 +1,12 @@
1
1
  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
- 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" | "enterKeyHint" | "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<{
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" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "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
6
  list?: string | undefined;
7
7
  "aria-activedescendant"?: string | undefined;
8
8
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
9
- "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
9
+ "aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
10
10
  "aria-braillelabel"?: string | undefined;
11
11
  "aria-brailleroledescription"?: string | undefined;
12
12
  "aria-busy"?: (boolean | "true" | "false") | undefined;
@@ -21,7 +21,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
21
21
  "aria-description"?: string | undefined;
22
22
  "aria-details"?: string | undefined;
23
23
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
24
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
24
+ "aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
25
25
  "aria-errormessage"?: string | undefined;
26
26
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
27
27
  "aria-flowto"?: string | undefined;
@@ -223,6 +223,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
223
223
  suppressContentEditableWarning?: boolean | undefined;
224
224
  suppressHydrationWarning?: boolean | undefined;
225
225
  accessKey?: string | undefined;
226
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined;
226
227
  autoFocus?: boolean | undefined;
227
228
  className?: string | undefined;
228
229
  contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
@@ -253,7 +254,6 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
253
254
  rev?: string | undefined;
254
255
  typeof?: string | undefined;
255
256
  vocab?: string | undefined;
256
- autoCapitalize?: string | undefined;
257
257
  autoCorrect?: string | undefined;
258
258
  autoSave?: string | undefined;
259
259
  color?: string | undefined;
@@ -264,8 +264,8 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
264
264
  itemRef?: string | undefined;
265
265
  results?: number | undefined;
266
266
  security?: string | undefined;
267
- unselectable?: "on" | "off" | undefined;
268
- inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
267
+ unselectable?: "off" | "on" | undefined;
268
+ inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
269
269
  is?: string | undefined;
270
270
  accept?: string | undefined;
271
271
  acceptCharset?: string | undefined;
@@ -0,0 +1,14 @@
1
+ export declare const DSFormInputTextName = "DSInputtext";
2
+ export declare const FORM_INPUT_TEXT_SLOTS: {
3
+ readonly INPUT_WRAPPER: "root";
4
+ readonly INPUT: "input";
5
+ readonly CLEAR_BUTTON: "input-clear-button";
6
+ };
7
+ export declare const FORM_INPUT_TEXT_DATA_TESTID: Record<string, string>;
8
+ export declare const DSInputTextDataTestIds: Record<string, string>;
9
+ export declare const DSInputTextName = "DSInputtext";
10
+ export declare const DSInputTextSlots: {
11
+ INPUT_WRAPPER: string;
12
+ INPUT: string;
13
+ CLEAR_BUTTON: string;
14
+ };
@@ -1,3 +1,3 @@
1
1
  export * from './DSInputText.js';
2
- export * from './exported-related/index.js';
3
2
  export type { DSInputTextT } from './react-desc-prop-types.js';
3
+ export { DSFormInputTextName, FORM_INPUT_TEXT_SLOTS, FORM_INPUT_TEXT_DATA_TESTID, DSInputTextDataTestIds, DSInputTextSlots, DSInputTextName, } from './constants/index.js';
@@ -1,3 +1,4 @@
1
+ /// <reference types="prop-types" />
1
2
  import type React from 'react';
2
3
  import type { GlobalAttributesT, XstyledProps, ValidationMap } from '@elliemae/ds-props-helpers';
3
4
  export declare namespace DSInputTextT {
@@ -11,5 +11,5 @@ export declare const StyledInputWrapper: import("styled-components").StyledCompo
11
11
  export declare const StyledInput: import("styled-components").StyledComponent<"input", import("@elliemae/ds-system").Theme, {
12
12
  inputSize: string;
13
13
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"input">, never>;
14
- export declare const StyledClearButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>>, never>;
14
+ export declare const StyledClearButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV3T.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV3T.Props>>, never>;
15
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-input-text",
3
- "version": "3.49.0-rc.8",
3
+ "version": "3.49.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Input Text",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
26
26
  },
27
27
  "engines": {
28
- "pnpm": ">=6",
29
- "node": ">=16"
28
+ "pnpm": ">=9",
29
+ "node": ">=22"
30
30
  },
31
31
  "author": "ICE MT",
32
32
  "jestSonar": {
@@ -36,19 +36,21 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-button-v2": "3.49.0-rc.8",
40
- "@elliemae/ds-grid": "3.49.0-rc.8",
41
- "@elliemae/ds-icons": "3.49.0-rc.8",
42
- "@elliemae/ds-props-helpers": "3.49.0-rc.8",
43
- "@elliemae/ds-system": "3.49.0-rc.8",
44
- "@elliemae/ds-icon": "3.49.0-rc.8"
39
+ "@elliemae/ds-button-v2": "3.49.0",
40
+ "@elliemae/ds-grid": "3.49.0",
41
+ "@elliemae/ds-icon": "3.49.0",
42
+ "@elliemae/ds-props-helpers": "3.49.0",
43
+ "@elliemae/ds-icons": "3.49.0",
44
+ "@elliemae/ds-system": "3.49.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@elliemae/pui-cli": "9.0.0-next.50",
48
48
  "@elliemae/pui-theme": "~2.10.0",
49
+ "jest": "~29.7.0",
50
+ "jest-cli": "~29.7.0",
49
51
  "styled-components": "~5.3.9",
50
52
  "styled-system": "~5.1.5",
51
- "@elliemae/ds-monorepo-devops": "3.49.0-rc.8"
53
+ "@elliemae/ds-monorepo-devops": "3.49.0"
52
54
  },
53
55
  "peerDependencies": {
54
56
  "@elliemae/pui-theme": "~2.10.0",
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var data_test_ids_exports = {};
30
- __export(data_test_ids_exports, {
31
- DSInputTextDataTestIds: () => DSInputTextDataTestIds
32
- });
33
- module.exports = __toCommonJS(data_test_ids_exports);
34
- var React = __toESM(require("react"));
35
- const DSInputTextDataTestIds = {
36
- INPUT: "ds-input-text-input",
37
- CLEAR_BUTTON: "ds-input-text-clear-button"
38
- };
39
- //# sourceMappingURL=data-test-ids.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/data-test-ids.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSInputTextDataTestIds = {\n INPUT: 'ds-input-text-input',\n CLEAR_BUTTON: 'ds-input-text-clear-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
- // If the importer is in node compatibility mode or this is not an ESM
19
- // file that has been converted to a CommonJS file using a Babel-
20
- // compatible transform (i.e. "__esModule" has not been set), then set
21
- // "default" to the CommonJS "module.exports" for node compatibility.
22
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
- mod
24
- ));
25
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
- var exported_related_exports = {};
27
- module.exports = __toCommonJS(exported_related_exports);
28
- var React = __toESM(require("react"));
29
- __reExport(exported_related_exports, require("./data-test-ids.js"), module.exports);
30
- __reExport(exported_related_exports, require("./theming.js"), module.exports);
31
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './data-test-ids.js';\nexport * from './theming.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,+BAAd;AACA,qCAAc,yBADd;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/theming.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSInputTextName = 'DSInputText';\n\nexport const DSInputTextSlots = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- const DSInputTextDataTestIds = {
3
- INPUT: "ds-input-text-input",
4
- CLEAR_BUTTON: "ds-input-text-clear-button"
5
- };
6
- export {
7
- DSInputTextDataTestIds
8
- };
9
- //# sourceMappingURL=data-test-ids.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/data-test-ids.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSInputTextDataTestIds = {\n INPUT: 'ds-input-text-input',\n CLEAR_BUTTON: 'ds-input-text-clear-button',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- export * from "./data-test-ids.js";
3
- export * from "./theming.js";
4
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './data-test-ids.js';\nexport * from './theming.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
- "names": []
7
- }
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- const DSInputTextName = "DSInputText";
3
- const DSInputTextSlots = {
4
- INPUT_WRAPPER: "root",
5
- INPUT: "input",
6
- CLEAR_BUTTON: "input-clear-button"
7
- };
8
- export {
9
- DSInputTextName,
10
- DSInputTextSlots
11
- };
12
- //# sourceMappingURL=theming.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSInputTextName = 'DSInputText';\n\nexport const DSInputTextSlots = {\n INPUT_WRAPPER: 'root',\n INPUT: 'input',\n CLEAR_BUTTON: 'input-clear-button',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAAA,EAC9B,eAAe;AAAA,EACf,OAAO;AAAA,EACP,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,4 +0,0 @@
1
- export declare const DSInputTextDataTestIds: {
2
- INPUT: string;
3
- CLEAR_BUTTON: string;
4
- };
@@ -1,2 +0,0 @@
1
- export * from './data-test-ids.js';
2
- export * from './theming.js';
@@ -1,6 +0,0 @@
1
- export declare const DSInputTextName = "DSInputText";
2
- export declare const DSInputTextSlots: {
3
- INPUT_WRAPPER: string;
4
- INPUT: string;
5
- CLEAR_BUTTON: string;
6
- };