@elliemae/ds-legacy-form-input-text 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/cjs/DSInputText.js +106 -0
  2. package/dist/cjs/DSInputText.js.map +7 -0
  3. package/dist/cjs/config/useInputText.js +77 -0
  4. package/dist/cjs/config/useInputText.js.map +7 -0
  5. package/dist/cjs/exported-related/data-test-ids.js +39 -0
  6. package/dist/cjs/exported-related/data-test-ids.js.map +7 -0
  7. package/dist/cjs/exported-related/index.js +31 -0
  8. package/dist/cjs/exported-related/index.js.map +7 -0
  9. package/dist/cjs/exported-related/theming.js +42 -0
  10. package/dist/cjs/exported-related/theming.js.map +7 -0
  11. package/dist/cjs/index.js +31 -0
  12. package/dist/cjs/index.js.map +7 -0
  13. package/dist/cjs/package.json +7 -0
  14. package/dist/cjs/react-desc-prop-types.js +61 -0
  15. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  16. package/dist/cjs/styled/borders.js +78 -0
  17. package/dist/cjs/styled/borders.js.map +7 -0
  18. package/dist/cjs/styled/components.js +94 -0
  19. package/dist/cjs/styled/components.js.map +7 -0
  20. package/dist/esm/DSInputText.js +76 -0
  21. package/dist/esm/DSInputText.js.map +7 -0
  22. package/dist/esm/config/useInputText.js +52 -0
  23. package/dist/esm/config/useInputText.js.map +7 -0
  24. package/dist/esm/exported-related/data-test-ids.js +9 -0
  25. package/dist/esm/exported-related/data-test-ids.js.map +7 -0
  26. package/dist/esm/exported-related/index.js +4 -0
  27. package/dist/esm/exported-related/index.js.map +7 -0
  28. package/dist/esm/exported-related/theming.js +12 -0
  29. package/dist/esm/exported-related/theming.js.map +7 -0
  30. package/dist/esm/index.js +4 -0
  31. package/dist/esm/index.js.map +7 -0
  32. package/dist/esm/package.json +7 -0
  33. package/dist/esm/react-desc-prop-types.js +31 -0
  34. package/dist/esm/react-desc-prop-types.js.map +7 -0
  35. package/dist/esm/styled/borders.js +48 -0
  36. package/dist/esm/styled/borders.js.map +7 -0
  37. package/dist/esm/styled/components.js +64 -0
  38. package/dist/esm/styled/components.js.map +7 -0
  39. package/dist/types/DSInputText.d.ts +4 -0
  40. package/dist/types/config/useInputText.d.ts +13 -0
  41. package/dist/types/exported-related/data-test-ids.d.ts +4 -0
  42. package/dist/types/exported-related/index.d.ts +2 -0
  43. package/dist/types/exported-related/theming.d.ts +6 -0
  44. package/dist/types/index.d.ts +3 -0
  45. package/dist/types/react-desc-prop-types.d.ts +21 -0
  46. package/dist/types/styled/borders.d.ts +10 -0
  47. package/dist/types/styled/components.d.ts +12 -0
  48. package/dist/types/tests/DSInput.events.test.d.ts +1 -0
  49. package/dist/types/tests/DSInput.keyboard.test.d.ts +1 -0
  50. package/dist/types/tests/DSInput.test.d.ts +1 -0
  51. package/dist/types/tests/axe.test.d.ts +1 -0
  52. package/package.json +75 -0
@@ -0,0 +1,106 @@
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 DSInputText_exports = {};
30
+ __export(DSInputText_exports, {
31
+ DSInputText: () => DSInputText,
32
+ DSInputTextWithSchema: () => DSInputTextWithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSInputText_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_react = require("react");
38
+ var import_ds_legacy_icons = require("@elliemae/ds-legacy-icons");
39
+ var import_ds_legacy_icon = require("@elliemae/ds-legacy-icon");
40
+ var import_ds_legacy_utilities = require("@elliemae/ds-legacy-utilities");
41
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
42
+ var import_useInputText = require("./config/useInputText.js");
43
+ var import_data_test_ids = require("./exported-related/data-test-ids.js");
44
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
45
+ var import_components = require("./styled/components.js");
46
+ const DSInputText = (props) => {
47
+ const {
48
+ globalAttributes: { className, id, ...otherGlobalAttributes },
49
+ hasFocus,
50
+ handlers,
51
+ propsWithDefault,
52
+ xstyledProps
53
+ } = (0, import_useInputText.useInputText)(props);
54
+ const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } = propsWithDefault;
55
+ const inputRef = (0, import_react.useRef)(null);
56
+ const shouldDisplayClearButton = clearable && !disabled && value !== "";
57
+ const handleClear = (0, import_react.useCallback)(() => {
58
+ onClear();
59
+ inputRef?.current?.focus();
60
+ }, [onClear]);
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
+ import_components.StyledInputWrapper,
63
+ {
64
+ className,
65
+ cols: shouldDisplayClearButton ? ["auto", "min-content"] : ["auto"],
66
+ isDisabled: disabled,
67
+ isReadOnly: readOnly,
68
+ hasError,
69
+ hasFocus,
70
+ inputSize,
71
+ ...xstyledProps,
72
+ children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
+ import_components.StyledInput,
75
+ {
76
+ "data-testid": import_data_test_ids.DSInputTextDataTestIds.INPUT,
77
+ disabled,
78
+ placeholder,
79
+ readOnly,
80
+ ref: (0, import_ds_legacy_utilities.mergeRefs)(innerRef, inputRef),
81
+ value,
82
+ "aria-describedby": id !== void 0 ? `${id}_feedback_message` : void 0,
83
+ id,
84
+ ...handlers,
85
+ ...otherGlobalAttributes
86
+ }
87
+ ),
88
+ shouldDisplayClearButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
+ import_components.StyledClearButton,
90
+ {
91
+ "aria-label": "Clear input value",
92
+ buttonType: "icon",
93
+ "data-testid": import_data_test_ids.DSInputTextDataTestIds.CLEAR_BUTTON,
94
+ onClick: handleClear,
95
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_icons.CloseMedium, { color: import_ds_legacy_icon.DSIconColors.PRIMARY })
96
+ }
97
+ )
98
+ ]
99
+ }
100
+ );
101
+ };
102
+ DSInputText.propTypes = import_react_desc_prop_types.DSInputTextPropTypes;
103
+ DSInputText.displayName = "DSInputText";
104
+ const DSInputTextWithSchema = (0, import_ds_legacy_props_helpers.describe)(DSInputText);
105
+ DSInputTextWithSchema.propTypes = import_react_desc_prop_types.DSInputTextPropTypes;
106
+ //# sourceMappingURL=DSInputText.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSInputText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React, { useCallback, useRef } from 'react';\nimport { CloseMedium } from '@elliemae/ds-legacy-icons';\nimport { DSIconColors } from '@elliemae/ds-legacy-icon';\nimport { mergeRefs } from '@elliemae/ds-legacy-utilities';\nimport { describe } from '@elliemae/ds-legacy-props-helpers';\nimport { useInputText } from './config/useInputText.js';\nimport { DSInputTextDataTestIds } from './exported-related/data-test-ids.js';\nimport type { DSInputTextT } from './react-desc-prop-types.js';\nimport { DSInputTextPropTypes } from './react-desc-prop-types.js';\nimport { StyledClearButton, StyledInput, StyledInputWrapper } from './styled/components.js';\n\nexport const DSInputText: React.ComponentType<DSInputTextT.Props> = (props) => {\n const {\n globalAttributes: { className, id, ...otherGlobalAttributes },\n hasFocus,\n handlers,\n propsWithDefault,\n xstyledProps,\n } = useInputText(props);\n\n const { clearable, disabled, hasError, innerRef, placeholder, readOnly, inputSize, onClear, value } =\n propsWithDefault;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const shouldDisplayClearButton = clearable && !disabled && value !== '';\n\n const handleClear = useCallback(() => {\n onClear();\n inputRef?.current?.focus();\n }, [onClear]);\n\n return (\n <StyledInputWrapper\n className={className}\n cols={shouldDisplayClearButton ? ['auto', 'min-content'] : ['auto']}\n isDisabled={disabled}\n isReadOnly={readOnly}\n hasError={hasError}\n hasFocus={hasFocus}\n inputSize={inputSize}\n {...xstyledProps}\n >\n <StyledInput\n data-testid={DSInputTextDataTestIds.INPUT}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n ref={mergeRefs(innerRef, inputRef)}\n value={value}\n aria-describedby={id !== undefined ? `${id}_feedback_message` : undefined}\n id={id}\n {...handlers}\n {...otherGlobalAttributes}\n />\n {shouldDisplayClearButton && (\n <StyledClearButton\n aria-label=\"Clear input value\"\n buttonType=\"icon\"\n data-testid={DSInputTextDataTestIds.CLEAR_BUTTON}\n onClick={handleClear}\n >\n <CloseMedium color={DSIconColors.PRIMARY} />\n </StyledClearButton>\n )}\n </StyledInputWrapper>\n );\n};\n\nDSInputText.propTypes = DSInputTextPropTypes;\nDSInputText.displayName = 'DSInputText';\nexport const DSInputTextWithSchema = describe(DSInputText);\nDSInputTextWithSchema.propTypes = DSInputTextPropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCnB;AAhCJ,mBAA2C;AAC3C,6BAA4B;AAC5B,4BAA6B;AAC7B,iCAA0B;AAC1B,qCAAyB;AACzB,0BAA6B;AAC7B,2BAAuC;AAEvC,mCAAqC;AACrC,wBAAmE;AAE5D,MAAM,cAAuD,CAAC,UAAU;AAC7E,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,IAAI,GAAG,sBAAsB;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,kCAAa,KAAK;AAEtB,QAAM,EAAE,WAAW,UAAU,UAAU,UAAU,aAAa,UAAU,WAAW,SAAS,MAAM,IAChG;AAEF,QAAM,eAAW,qBAAyB,IAAI;AAC9C,QAAM,2BAA2B,aAAa,CAAC,YAAY,UAAU;AAErE,QAAM,kBAAc,0BAAY,MAAM;AACpC,YAAQ;AACR,cAAU,SAAS,MAAM;AAAA,EAC3B,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,2BAA2B,CAAC,QAAQ,aAAa,IAAI,CAAC,MAAM;AAAA,MAClE,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,4CAAuB;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAK,sCAAU,UAAU,QAAQ;AAAA,YACjC;AAAA,YACA,oBAAkB,OAAO,SAAY,GAAG,wBAAwB;AAAA,YAChE;AAAA,YACC,GAAG;AAAA,YACH,GAAG;AAAA;AAAA,QACN;AAAA,QACC,4BACC;AAAA,UAAC;AAAA;AAAA,YACC,cAAW;AAAA,YACX,YAAW;AAAA,YACX,eAAa,4CAAuB;AAAA,YACpC,SAAS;AAAA,YAET,sDAAC,sCAAY,OAAO,mCAAa,SAAS;AAAA;AAAA,QAC5C;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AACnB,MAAM,4BAAwB,yCAAS,WAAW;AACzD,sBAAsB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
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 useInputText_exports = {};
30
+ __export(useInputText_exports, {
31
+ useInputText: () => useInputText
32
+ });
33
+ module.exports = __toCommonJS(useInputText_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
36
+ var import_exported_related = require("../exported-related/index.js");
37
+ var import_react = require("react");
38
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
+ const useInputText = (props) => {
40
+ const propsWithDefault = (0, import_ds_legacy_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
41
+ (0, import_ds_legacy_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.DSInputTextPropTypes, import_exported_related.DSInputTextName);
42
+ const { onValueChange } = propsWithDefault;
43
+ const [hasFocus, setHasFocus] = (0, import_react.useState)(false);
44
+ const handleOnChange = (0, import_react.useCallback)(
45
+ (e) => {
46
+ onValueChange(e.target.value, e);
47
+ },
48
+ [onValueChange]
49
+ );
50
+ const handleOnFocus = (0, import_react.useCallback)(() => {
51
+ setHasFocus(true);
52
+ }, []);
53
+ const handleOnBlur = (0, import_react.useCallback)(() => {
54
+ setHasFocus(false);
55
+ }, []);
56
+ const globalAttributes = (0, import_ds_legacy_props_helpers.useGetGlobalAttributes)(propsWithDefault, {
57
+ onChange: handleOnChange,
58
+ onFocus: handleOnFocus,
59
+ onBlur: handleOnBlur
60
+ });
61
+ const xstyledProps = (0, import_ds_legacy_props_helpers.useGetXstyledProps)(propsWithDefault);
62
+ return (0, import_react.useMemo)(
63
+ () => ({
64
+ globalAttributes,
65
+ hasFocus,
66
+ handlers: {
67
+ onChange: handleOnChange,
68
+ onFocus: handleOnFocus,
69
+ onBlur: handleOnBlur
70
+ },
71
+ propsWithDefault,
72
+ xstyledProps
73
+ }),
74
+ [globalAttributes, handleOnBlur, handleOnChange, handleOnFocus, hasFocus, propsWithDefault, xstyledProps]
75
+ );
76
+ };
77
+ //# sourceMappingURL=useInputText.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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-legacy-props-helpers';\nimport { DSInputTextName } from '../exported-related/index.js';\nimport type React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\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 } = 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 onValueChange(e.target.value, e);\n },\n [onValueChange],\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,qCAKO;AACP,8BAAgC;AAEhC,mBAA+C;AAE/C,mCAAmD;AAE5C,MAAM,eAAe,CAAC,UAA8B;AACzD,QAAM,uBAAmB,6DAA4D,OAAO,yCAAY;AAExG,qEAA+B,OAAO,mDAAsB,uCAAe;AAE3E,QAAM,EAAE,cAAc,IAAI;AAK1B,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAK9C,QAAM,qBAA6D;AAAA,IACjE,CAAC,MAAM;AACL,oBAAc,EAAE,OAAO,OAAO,CAAC;AAAA,IACjC;AAAA,IACA,CAAC,aAAa;AAAA,EAChB;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,uDAAuB,kBAAkB;AAAA,IAChE,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,mBAAe,mDAAmB,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
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,31 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,42 @@
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 theming_exports = {};
30
+ __export(theming_exports, {
31
+ DSInputTextName: () => DSInputTextName,
32
+ DSInputTextSlots: () => DSInputTextSlots
33
+ });
34
+ module.exports = __toCommonJS(theming_exports);
35
+ var React = __toESM(require("react"));
36
+ const DSInputTextName = "DSInputText";
37
+ const DSInputTextSlots = {
38
+ INPUT_WRAPPER: "root",
39
+ INPUT: "input",
40
+ CLEAR_BUTTON: "input-clear-button"
41
+ };
42
+ //# sourceMappingURL=theming.js.map
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,31 @@
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 src_exports = {};
27
+ module.exports = __toCommonJS(src_exports);
28
+ var React = __toESM(require("react"));
29
+ __reExport(src_exports, require("./DSInputText.js"), module.exports);
30
+ __reExport(src_exports, require("./exported-related/index.js"), module.exports);
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -0,0 +1,61 @@
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 react_desc_prop_types_exports = {};
30
+ __export(react_desc_prop_types_exports, {
31
+ DSInputTextPropTypes: () => DSInputTextPropTypes,
32
+ defaultProps: () => defaultProps
33
+ });
34
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
37
+ const defaultProps = {
38
+ onValueChange: () => null,
39
+ onClear: () => null,
40
+ placeholder: "Hint Text",
41
+ disabled: false,
42
+ readOnly: false,
43
+ hasError: false,
44
+ inputSize: "m",
45
+ clearable: false
46
+ };
47
+ const DSInputTextPropTypes = {
48
+ ...import_ds_legacy_props_helpers.globalAttributesPropTypes,
49
+ ...import_ds_legacy_props_helpers.xstyledPropTypes,
50
+ value: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.string, import_ds_legacy_props_helpers.PropTypes.number, import_ds_legacy_props_helpers.PropTypes.arrayOf(import_ds_legacy_props_helpers.PropTypes.string)]).description("Value of the input").defaultValue(""),
51
+ onValueChange: import_ds_legacy_props_helpers.PropTypes.func.description("Callback triggered when the value changes").defaultValue(() => null).signature("((newValue: string, e: React.ChangeEvent) => void)"),
52
+ placeholder: import_ds_legacy_props_helpers.PropTypes.string.description("Value of the placeholder").defaultValue(""),
53
+ innerRef: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.object, import_ds_legacy_props_helpers.PropTypes.func.signature("((ref: HTMLInputElement) => void)")]).description("Reference to the input").defaultValue(null),
54
+ disabled: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether the input is disabled").defaultValue(false),
55
+ readOnly: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether the input is readonly").defaultValue(false),
56
+ hasError: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether the input has error").defaultValue(false),
57
+ inputSize: import_ds_legacy_props_helpers.PropTypes.oneOf(["s", "m"]).description("Size of the input").defaultValue("m"),
58
+ clearable: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether the input is clearable").defaultValue(false),
59
+ onClear: import_ds_legacy_props_helpers.PropTypes.func.description("Callback triggered when the clearable button is pressed").defaultValue(() => null).signature("(() => void)")
60
+ };
61
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type {} from '@elliemae/ds-legacy-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-legacy-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-legacy-props-helpers';\n\nexport declare namespace DSInputTextT {\n export interface IProps {\n value?: string | number;\n onValueChange?: (nextValue: string | number, e: React.ChangeEvent<HTMLInputElement>) => void;\n onClear?: () => void;\n placeholder?: string;\n innerRef?: React.MutableRefObject<HTMLInputElement | null> | ((_ref: HTMLInputElement | null) => void);\n disabled?: boolean;\n readOnly?: boolean;\n hasError?: boolean;\n inputSize?: 's' | 'm';\n clearable?: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: DSInputTextT.Props = {\n onValueChange: () => null,\n onClear: () => null,\n placeholder: 'Hint Text',\n disabled: false,\n readOnly: false,\n hasError: false,\n inputSize: 'm',\n clearable: false,\n};\n\nexport const DSInputTextPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.string)])\n .description('Value of the input')\n .defaultValue(''),\n onValueChange: PropTypes.func\n .description('Callback triggered when the value changes')\n .defaultValue(() => null)\n .signature('((newValue: string, e: React.ChangeEvent) => void)'),\n placeholder: PropTypes.string.description('Value of the placeholder').defaultValue(''),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func.signature('((ref: HTMLInputElement) => void)')])\n .description('Reference to the input')\n .defaultValue(null),\n disabled: PropTypes.bool.description('Whether the input is disabled').defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the input is readonly').defaultValue(false),\n hasError: PropTypes.bool.description('Whether the input has error').defaultValue(false),\n inputSize: PropTypes.oneOf(['s', 'm']).description('Size of the input').defaultValue('m'),\n clearable: PropTypes.bool.description('Whether the input is clearable').defaultValue(false),\n onClear: PropTypes.func\n .description('Callback triggered when the clearable button is pressed')\n .defaultValue(() => null)\n .signature('(() => void)'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,qCAAuE;AAmBhE,MAAM,eAAmC;AAAA,EAC9C,eAAe,MAAM;AAAA,EACrB,SAAS,MAAM;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AACb;AAEO,MAAM,uBAAuB;AAAA,EAClC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,yCAAU,UAAU,CAAC,yCAAU,QAAQ,yCAAU,QAAQ,yCAAU,QAAQ,yCAAU,MAAM,CAAC,CAAC,EACjG,YAAY,oBAAoB,EAChC,aAAa,EAAE;AAAA,EAClB,eAAe,yCAAU,KACtB,YAAY,2CAA2C,EACvD,aAAa,MAAM,IAAI,EACvB,UAAU,oDAAoD;AAAA,EACjE,aAAa,yCAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,EAAE;AAAA,EACrF,UAAU,yCAAU,UAAU,CAAC,yCAAU,QAAQ,yCAAU,KAAK,UAAU,mCAAmC,CAAC,CAAC,EAC5G,YAAY,wBAAwB,EACpC,aAAa,IAAI;AAAA,EACpB,UAAU,yCAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,yCAAU,KAAK,YAAY,+BAA+B,EAAE,aAAa,KAAK;AAAA,EACxF,UAAU,yCAAU,KAAK,YAAY,6BAA6B,EAAE,aAAa,KAAK;AAAA,EACtF,WAAW,yCAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,mBAAmB,EAAE,aAAa,GAAG;AAAA,EACxF,WAAW,yCAAU,KAAK,YAAY,gCAAgC,EAAE,aAAa,KAAK;AAAA,EAC1F,SAAS,yCAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,MAAM,IAAI,EACvB,UAAU,cAAc;AAC7B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,78 @@
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 borders_exports = {};
30
+ __export(borders_exports, {
31
+ getBorderCss: () => getBorderCss,
32
+ getHoverBorderCss: () => getHoverBorderCss
33
+ });
34
+ module.exports = __toCommonJS(borders_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
37
+ const commonBorderCss = import_ds_legacy_system.css`
38
+ border: 1px solid ${import_ds_legacy_system.th.color("neutral-400")};
39
+ `;
40
+ const readOnlyBorderCss = import_ds_legacy_system.css`
41
+ border: 1px solid transparent;
42
+ border-top-color: ${import_ds_legacy_system.th.color("neutral-400")};
43
+ `;
44
+ const disabledBorderCss = commonBorderCss;
45
+ const hasErrorBorderCss = import_ds_legacy_system.css`
46
+ border: 1px solid ${import_ds_legacy_system.th.color("danger-900")};
47
+ `;
48
+ const hoverBorderCss = import_ds_legacy_system.css`
49
+ border: 1px solid ${import_ds_legacy_system.th.color("brand-700")};
50
+ `;
51
+ const focusBorderCss = import_ds_legacy_system.css`
52
+ border: 1px solid transparent;
53
+ outline: 2px solid ${import_ds_legacy_system.th.color("brand-700")};
54
+ outline-offset: -2px;
55
+ `;
56
+ const getBorderCss = (props) => {
57
+ if (props.isDisabled)
58
+ return disabledBorderCss;
59
+ if (props.hasFocus)
60
+ return focusBorderCss;
61
+ if (props.hasError)
62
+ return hasErrorBorderCss;
63
+ if (props.isReadOnly)
64
+ return readOnlyBorderCss;
65
+ return commonBorderCss;
66
+ };
67
+ const getHoverBorderCss = (props) => {
68
+ if (props.isDisabled)
69
+ return disabledBorderCss;
70
+ if (props.hasFocus)
71
+ return focusBorderCss;
72
+ if (props.hasError)
73
+ return hasErrorBorderCss;
74
+ if (props.isReadOnly)
75
+ return readOnlyBorderCss;
76
+ return hoverBorderCss;
77
+ };
78
+ //# sourceMappingURL=borders.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/styled/borders.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { FlattenSimpleInterpolation } from '@elliemae/ds-legacy-system';\nimport { th, css } from '@elliemae/ds-legacy-system';\n\ninterface BorderNecessaryProps {\n isDisabled: boolean;\n hasError: boolean;\n isReadOnly: boolean;\n hasFocus: boolean;\n}\n\nconst commonBorderCss: FlattenSimpleInterpolation = css`\n border: 1px solid ${th.color('neutral-400')};\n`;\n\nconst readOnlyBorderCss: FlattenSimpleInterpolation = css`\n border: 1px solid transparent;\n border-top-color: ${th.color('neutral-400')};\n`;\n\nconst disabledBorderCss = commonBorderCss;\n\nconst hasErrorBorderCss: FlattenSimpleInterpolation = css`\n border: 1px solid ${th.color('danger-900')};\n`;\n\nconst hoverBorderCss: FlattenSimpleInterpolation = css`\n border: 1px solid ${th.color('brand-700')};\n`;\n\nconst focusBorderCss: FlattenSimpleInterpolation = 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): FlattenSimpleInterpolation => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return commonBorderCss;\n};\n\nexport const getHoverBorderCss = (props: BorderNecessaryProps): FlattenSimpleInterpolation => {\n if (props.isDisabled) return disabledBorderCss;\n if (props.hasFocus) return focusBorderCss;\n if (props.hasError) return hasErrorBorderCss;\n if (props.isReadOnly) return readOnlyBorderCss;\n return hoverBorderCss;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAwB;AASxB,MAAM,kBAA8C;AAAA,sBAC9B,2BAAG,MAAM,aAAa;AAAA;AAG5C,MAAM,oBAAgD;AAAA;AAAA,sBAEhC,2BAAG,MAAM,aAAa;AAAA;AAG5C,MAAM,oBAAoB;AAE1B,MAAM,oBAAgD;AAAA,sBAChC,2BAAG,MAAM,YAAY;AAAA;AAG3C,MAAM,iBAA6C;AAAA,sBAC7B,2BAAG,MAAM,WAAW;AAAA;AAG1C,MAAM,iBAA6C;AAAA;AAAA,uBAE5B,2BAAG,MAAM,WAAW;AAAA;AAAA;AAIpC,MAAM,eAAe,CAAC,UAA4D;AACvF,MAAI,MAAM;AAAY,WAAO;AAC7B,MAAI,MAAM;AAAU,WAAO;AAC3B,MAAI,MAAM;AAAU,WAAO;AAC3B,MAAI,MAAM;AAAY,WAAO;AAC7B,SAAO;AACT;AAEO,MAAM,oBAAoB,CAAC,UAA4D;AAC5F,MAAI,MAAM;AAAY,WAAO;AAC7B,MAAI,MAAM;AAAU,WAAO;AAC3B,MAAI,MAAM;AAAU,WAAO;AAC3B,MAAI,MAAM;AAAY,WAAO;AAC7B,SAAO;AACT;",
6
+ "names": []
7
+ }