@elliemae/ds-form 3.16.0-next.1 → 3.16.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js +2 -2
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
- package/dist/cjs/CheckboxGroup/props.js +12 -12
- package/dist/cjs/CheckboxGroup/props.js.map +2 -2
- package/dist/cjs/DateInput/DSDateInput.js +2 -1
- package/dist/cjs/DateInput/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInput/props.js +17 -17
- package/dist/cjs/DateInput/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DSDateInput.js +2 -2
- package/dist/cjs/DateInputV2/components/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInputV2/components/props.js +11 -11
- package/dist/cjs/DateInputV2/components/props.js.map +2 -2
- package/dist/cjs/FormItem/DSFormItemLayout.js +2 -1
- package/dist/cjs/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/cjs/FormItem/Error/DSError.js +4 -4
- package/dist/cjs/FormItem/Error/DSError.js.map +2 -2
- package/dist/cjs/FormItem/props.js +44 -44
- package/dist/cjs/FormItem/props.js.map +2 -2
- package/dist/cjs/InputGroup/DSInputGroup.js +2 -2
- package/dist/cjs/InputGroup/DSInputGroup.js.map +2 -2
- package/dist/cjs/InputGroup/props.js +8 -8
- package/dist/cjs/InputGroup/props.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMask.js +2 -2
- package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/cjs/InputMask/props.js +31 -31
- package/dist/cjs/InputMask/props.js.map +2 -2
- package/dist/cjs/InputProtected/DSInputProtected.js +2 -2
- package/dist/cjs/InputProtected/DSInputProtected.js.map +2 -2
- package/dist/cjs/InputProtected/props.js +9 -9
- package/dist/cjs/InputProtected/props.js.map +2 -2
- package/dist/cjs/LargeInputText/DSLargeInputText.js +2 -2
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/cjs/LargeInputText/props.js +28 -28
- package/dist/cjs/LargeInputText/props.js.map +2 -2
- package/dist/cjs/Radio/DSRadio.js +16 -16
- package/dist/cjs/Radio/DSRadio.js.map +2 -2
- package/dist/cjs/RadioGroup/DSRadioGroup.js +2 -2
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
- package/dist/cjs/RadioGroup/props.js +11 -11
- package/dist/cjs/RadioGroup/props.js.map +2 -2
- package/dist/cjs/TimeInput/DSTimeInput.js +13 -13
- package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/cjs/Toggle/DSToggle.js +13 -13
- package/dist/cjs/Toggle/DSToggle.js.map +2 -2
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js +1 -1
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/esm/CheckboxGroup/props.js +1 -1
- package/dist/esm/CheckboxGroup/props.js.map +1 -1
- package/dist/esm/DateInput/DSDateInput.js +2 -1
- package/dist/esm/DateInput/DSDateInput.js.map +2 -2
- package/dist/esm/DateInput/props.js +1 -1
- package/dist/esm/DateInput/props.js.map +1 -1
- package/dist/esm/DateInputV2/components/DSDateInput.js +1 -1
- package/dist/esm/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/esm/DateInputV2/components/props.js +1 -1
- package/dist/esm/DateInputV2/components/props.js.map +1 -1
- package/dist/esm/FormItem/DSFormItemLayout.js +2 -1
- package/dist/esm/FormItem/DSFormItemLayout.js.map +2 -2
- package/dist/esm/FormItem/Error/DSError.js +1 -1
- package/dist/esm/FormItem/Error/DSError.js.map +1 -1
- package/dist/esm/FormItem/props.js +1 -1
- package/dist/esm/FormItem/props.js.map +1 -1
- package/dist/esm/InputGroup/DSInputGroup.js +1 -1
- package/dist/esm/InputGroup/DSInputGroup.js.map +1 -1
- package/dist/esm/InputGroup/props.js +1 -1
- package/dist/esm/InputGroup/props.js.map +1 -1
- package/dist/esm/InputMask/DSInputMask.js +1 -1
- package/dist/esm/InputMask/DSInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/esm/InputMask/props.js +1 -1
- package/dist/esm/InputMask/props.js.map +1 -1
- package/dist/esm/InputProtected/DSInputProtected.js +1 -1
- package/dist/esm/InputProtected/DSInputProtected.js.map +1 -1
- package/dist/esm/InputProtected/props.js +1 -1
- package/dist/esm/InputProtected/props.js.map +1 -1
- package/dist/esm/LargeInputText/DSLargeInputText.js +1 -1
- package/dist/esm/LargeInputText/DSLargeInputText.js.map +1 -1
- package/dist/esm/LargeInputText/props.js +1 -1
- package/dist/esm/LargeInputText/props.js.map +1 -1
- package/dist/esm/Radio/DSRadio.js +1 -1
- package/dist/esm/Radio/DSRadio.js.map +1 -1
- package/dist/esm/RadioGroup/DSRadioGroup.js +1 -1
- package/dist/esm/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/esm/RadioGroup/props.js +1 -1
- package/dist/esm/RadioGroup/props.js.map +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/esm/Toggle/DSToggle.js +1 -1
- package/dist/esm/Toggle/DSToggle.js.map +1 -1
- package/dist/types/CheckboxGroup/DSCheckboxGroup.d.ts +7 -7
- package/dist/types/CheckboxGroup/props.d.ts +6 -6
- package/dist/types/DateInput/DSDateInput.d.ts +16 -16
- package/dist/types/DateInput/props.d.ts +16 -16
- package/dist/types/DateInputV2/components/DSDateInput.d.ts +11 -11
- package/dist/types/DateInputV2/components/props.d.ts +10 -10
- package/dist/types/FormItem/DSFormItemLayout.d.ts +40 -40
- package/dist/types/FormItem/Error/DSError.d.ts +3 -3
- package/dist/types/FormItem/props.d.ts +39 -39
- package/dist/types/InputGroup/DSInputGroup.d.ts +8 -8
- package/dist/types/InputGroup/props.d.ts +7 -7
- package/dist/types/InputMask/DSInputMask.d.ts +31 -31
- package/dist/types/InputMask/props.d.ts +30 -30
- package/dist/types/InputProtected/DSInputProtected.d.ts +9 -9
- package/dist/types/InputProtected/props.d.ts +8 -8
- package/dist/types/LargeInputText/DSLargeInputText.d.ts +28 -28
- package/dist/types/LargeInputText/props.d.ts +27 -27
- package/dist/types/Radio/DSRadio.d.ts +15 -15
- package/dist/types/RadioGroup/DSRadioGroup.d.ts +8 -8
- package/dist/types/RadioGroup/props.d.ts +7 -7
- package/dist/types/TimeInput/DSTimeInput.d.ts +12 -12
- package/dist/types/Toggle/DSToggle.d.ts +12 -12
- package/package.json +14 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/RadioGroup/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { orientation as radioGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /** Inject props to component wrapper */\n containerProps: PropTypes.object.description('Inject props to component wrapper'),\n /**\n * Allows a function that is triggered once the radio group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio group changes'),\n /**\n * Selected default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Selected default active value'),\n /**\n * Radio group items to show of type DSRadio\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Radio group items to show of type DSRadio'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(radioGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * Whether the radio group is disabled or not\n */\n disabled: PropTypes.bool.description(''),\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('Whether the radio group is disabled or not'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,uBAAqD;AAE9C,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,kCAAU,OAAO,YAAY,mCAAmC;AAAA,EAIhF,UAAU,kCAAU,KAAK,YAAY,kEAAkE;AAAA,EAIvG,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAIlH,UAAU,kCAAU,QAAQ,kCAAU,OAAO,EAAE,WAAW,YAAY,2CAA2C;AAAA,EAIjH,aAAa,kCAAU,MAAM,iBAAAA,WAAqB,EAAE,YAAY,4BAA4B;AAAA,EAI5F,UAAU,kCAAU,KAAK,YAAY,EAAE;AAAA,EACvC,YAAY,kCAAU,MAAM;AAAA,IAC1B,iBAAiB,kCAAU;AAAA,IAC3B,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC;AAAA,IACpE,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,4CAA4C;AAC7D;",
|
|
6
6
|
"names": ["radioGroupOrientation"]
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ __export(DSTimeInput_exports, {
|
|
|
32
32
|
module.exports = __toCommonJS(DSTimeInput_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_Input = require("../Input");
|
|
37
37
|
var import_TimeInputImpl = require("./TimeInputImpl");
|
|
38
38
|
const DSTimeInput = ({
|
|
@@ -77,23 +77,23 @@ DSTimeInput.defaultProps = {
|
|
|
77
77
|
clearable: true
|
|
78
78
|
};
|
|
79
79
|
const props = {
|
|
80
|
-
containerProps:
|
|
81
|
-
onChange:
|
|
82
|
-
"aria-label":
|
|
83
|
-
style:
|
|
84
|
-
innerRef:
|
|
80
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
81
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the time input changes"),
|
|
82
|
+
"aria-label": import_ds_props_helpers.PropTypes.string.description("a11y aria label"),
|
|
83
|
+
style: import_ds_props_helpers.PropTypes.object.description("style object for time input wrapper"),
|
|
84
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]).description(
|
|
85
85
|
"inner ref for time input wrapper"
|
|
86
86
|
),
|
|
87
|
-
className:
|
|
88
|
-
format:
|
|
89
|
-
value:
|
|
90
|
-
clearable:
|
|
91
|
-
disabled:
|
|
92
|
-
ariaLabel:
|
|
87
|
+
className: import_ds_props_helpers.PropTypes.string.description("class for time input"),
|
|
88
|
+
format: import_ds_props_helpers.PropTypes.string.description("Valid time format"),
|
|
89
|
+
value: import_ds_props_helpers.PropTypes.string.description("Default value once the component is initialized"),
|
|
90
|
+
clearable: import_ds_props_helpers.PropTypes.bool.description("Whether the time input is clearable or not"),
|
|
91
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the time input is disabled or not"),
|
|
92
|
+
ariaLabel: import_ds_props_helpers.PropTypes.string.description("Aria label")
|
|
93
93
|
};
|
|
94
94
|
DSTimeInput.propTypes = props;
|
|
95
95
|
DSTimeInput.displayName = "DSTimeInput";
|
|
96
|
-
const DSTimeInputWithSchema = (0,
|
|
96
|
+
const DSTimeInputWithSchema = (0, import_ds_props_helpers.describe)(DSTimeInput);
|
|
97
97
|
DSTimeInputWithSchema.propTypes = props;
|
|
98
98
|
var DSTimeInput_default = DSTimeInput;
|
|
99
99
|
//# sourceMappingURL=DSTimeInput.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/TimeInput/DSTimeInput.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBjB;AArBN,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../Input';\nimport { TimeInputImpl } from './TimeInputImpl';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the time input changes'),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for time input wrapper',\n ),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the time input is clearable or not'),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the time input is disabled or not'),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBjB;AArBN,8BAAoC;AACpC,mBAAwB;AACxB,2BAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW,MAAM;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AACd,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC,EAAE,UAAU,kBAAkB,eAAe,MAC7D;AAAA,MAAC;AAAA;AAAA,QACC,cAAY;AAAA,QACZ;AAAA,QACA;AAAA,QACA,UAAU,CAAC,SAAS,cAAc,IAAI;AAAA,QACrC,GAAG;AAAA,QACJ;AAAA;AAAA,IACF;AAAA,IAEF;AAAA,IACA;AAAA,IACA,qBAAqB;AAAA,IACrB;AAAA,IACA,SAAS,MAAM,SAAS,IAAI;AAAA,IAC5B;AAAA;AACF;AAGF,YAAY,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AACb;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,kCAAU,OAAO,YAAY,gDAAgD;AAAA,EAI7F,UAAU,kCAAU,KAAK,YAAY,iEAAiE;AAAA,EAEtG,cAAc,kCAAU,OAAO,YAAY,iBAAiB;AAAA,EAE5D,OAAO,kCAAU,OAAO,YAAY,qCAAqC;AAAA,EAEzE,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAEA,WAAW,kCAAU,OAAO,YAAY,sBAAsB;AAAA,EAI9D,QAAQ,kCAAU,OAAO,YAAY,mBAAmB;AAAA,EAIxD,OAAO,kCAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,WAAW,kCAAU,KAAK,YAAY,4CAA4C;AAAA,EAIlF,UAAU,kCAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,WAAW,kCAAU,OAAO,YAAY,YAAY;AACtD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ __export(DSToggle_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(DSToggle_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
35
|
var import_DSToggleImpl = require("./DSToggleImpl");
|
|
36
36
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
37
37
|
const DSToggle = ({
|
|
@@ -72,21 +72,21 @@ DSToggle.defaultProps = {
|
|
|
72
72
|
checked: void 0
|
|
73
73
|
};
|
|
74
74
|
const props = {
|
|
75
|
-
containerProps:
|
|
76
|
-
hasError:
|
|
77
|
-
readOnly:
|
|
78
|
-
disabled:
|
|
79
|
-
checked:
|
|
80
|
-
onChange:
|
|
81
|
-
labelOn:
|
|
82
|
-
labelOff:
|
|
83
|
-
value:
|
|
84
|
-
size:
|
|
85
|
-
name:
|
|
75
|
+
containerProps: import_ds_props_helpers.PropTypes.shape({}).description("Set of Properties attached to the main container"),
|
|
76
|
+
hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the toggle has error or not"),
|
|
77
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the toggle is read only or not"),
|
|
78
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the toggle is disabled or not"),
|
|
79
|
+
checked: import_ds_props_helpers.PropTypes.bool.description("Whether the toggle is checked or not"),
|
|
80
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the toggle changes"),
|
|
81
|
+
labelOn: import_ds_props_helpers.PropTypes.string.description("Label to show when the toggle is ON"),
|
|
82
|
+
labelOff: import_ds_props_helpers.PropTypes.string.description("Label to show when the toggle is OFF"),
|
|
83
|
+
value: import_ds_props_helpers.PropTypes.string.description("Default value once the component is initialized"),
|
|
84
|
+
size: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.dsBasicSizes).description("['s', 'm', 'l']"),
|
|
85
|
+
name: import_ds_props_helpers.PropTypes.string.description("Input name")
|
|
86
86
|
};
|
|
87
87
|
DSToggle.propTypes = props;
|
|
88
88
|
DSToggle.displayName = "DSToggle";
|
|
89
|
-
const DSToggleWithSchema = (0,
|
|
89
|
+
const DSToggleWithSchema = (0, import_ds_props_helpers.describe)(DSToggle);
|
|
90
90
|
DSToggleWithSchema.propTypes = props;
|
|
91
91
|
var DSToggle_default = DSToggle;
|
|
92
92
|
//# sourceMappingURL=DSToggle.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Toggle/DSToggle.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBrB;AAjBF,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSToggleImpl } from './DSToggleImpl';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\n\nconst DSToggle = ({\n containerProps,\n hasError,\n readOnly,\n disabled,\n checked,\n labelOn,\n labelOff,\n name,\n value,\n size,\n ...otherProps\n}) => (\n <DSToggleImpl\n {...otherProps}\n checked={checked}\n containerProps={containerProps}\n disabled={disabled}\n hasError={hasError}\n labelOff={labelOff}\n labelOn={labelOn}\n name={name}\n readOnly={readOnly}\n size={size}\n value={value}\n />\n);\n\nDSToggle.defaultProps = {\n labelOn: 'ON',\n labelOff: 'OFF',\n size: 's',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: undefined,\n};\n\nconst props = {\n /**\n * Set of Properties attached to the main container\n */\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n /**\n * Whether the toggle has error or not\n */\n hasError: PropTypes.bool.description('Whether the toggle has error or not'),\n /**\n * Whether the toggle is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the toggle is read only or not'),\n /**\n * Whether the toggle is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the toggle is disabled or not'),\n /**\n * Whether the toggle is checked or not\n */\n checked: PropTypes.bool.description('Whether the toggle is checked or not'),\n /**\n * Allows a function that is triggered once the toggle changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the toggle changes'),\n /**\n * Label to show when the toggle is ON\n */\n labelOn: PropTypes.string.description('Label to show when the toggle is ON'),\n /**\n * Label to show when the toggle is OFF\n */\n labelOff: PropTypes.string.description('Label to show when the toggle is OFF'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Input name\n */\n name: PropTypes.string.description('Input name'),\n};\n\nDSToggle.propTypes = props;\nDSToggle.displayName = 'DSToggle';\nconst DSToggleWithSchema = describe(DSToggle);\n\nDSToggleWithSchema.propTypes = props;\n\nexport default DSTo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,YAAY;AACjD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAE5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import { describe } from "@elliemae/ds-
|
|
5
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
6
6
|
import { GroupItem, Group } from "@elliemae/ds-shared";
|
|
7
7
|
import { DSFormItemLayout } from "../FormItem";
|
|
8
8
|
import { DSCheckbox } from "../Checkbox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/CheckboxGroup/DSCheckboxGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSCheckbox } from '../Checkbox';\nimport { props as cprops } from './props';\nimport { defaultProps } from './defaultProps';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={context.activeValue && context.activeValue.indexOf(props.value) !== -1}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSCheckboxGroup = ({\n onChange,\n activeValue,\n children,\n disabled,\n orientation,\n truncateText,\n labelProps,\n containerProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} multiple onChange={onChange}>\n <div\n className={`${baseClass} ${baseClass}--${orientation}`}\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <CheckboxItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nconst noop = () => null;\n\nDSCheckboxGroup.propTypes = cprops;\nDSCheckboxGroup.defaultProps = defaultProps;\nDSCheckboxGroup.displayName = 'DSCheckboxGroup';\nconst DSCheckboxGroupWithSchema = describe(DSCheckboxGroup);\nDSCheckboxGroupWithSchema.propTypes = cprops;\n\nCheckboxItem.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n};\n\nCheckboxItem.defaultProps = {\n checked: false,\n disabled: false,\n onChange: noop,\n};\n\nexport { DSCheckboxGroup, DSCheckboxGroupWithSchema };\n// export default DSCheckboxGroup;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBjB;AAhBN,OAAOA,YAAW;AAClB,OAAO,eAAe;AACtB,SAAS,gBAAgB;AACzB,SAAS,WAAW,a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AA;AAAA,YACE,GAAG,MAAM;AAAA,YACV,UAAU,CAAC,MAAM;AACf,wBAAU,KAAK,CAAC;AAAA,YAClB;AAAA,YACA,WAAW,CAAC,MAAM,UAAU,GAAG,KAAK;AAAA;AAAA,QACtC;AAAA,QAEF;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAGF,MAAI,cAAc,WAAW,WAAW;AACtC,WACE,oBAAC,SAAI,WAAW,GAAG,sCAAuC,GAAG,gBAAgB,MAAK,SAChF,8BAAC,oBAAkB,GAAG,YAAY,gBAAgB,OAAO,UAAoB,cAA4B,GAC3G;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,MAAM,OAAO,MAAM;AAEnB,gBAAgB,YAAY;AAC5B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;AAEtC,aAAa,YAAY;AAAA,EACvB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AACtB;AAEA,aAAa,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AACZ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { DSCheckbox } from "../Checkbox";
|
|
4
4
|
import { orientation as checkboxGroupOrientation } from "@elliemae/ds-shared";
|
|
5
5
|
const props = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/CheckboxGroup/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSCheckbox } from '../Checkbox';\nimport { orientation as checkboxGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /**\n * Allows a function that is triggered once the checkbox group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the checkbox group changes'),\n /**\n * Default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]).description(\n 'Default active value',\n ),\n /**\n * Checkbox group items to show of type DSCheckbox\n */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([DSCheckbox]),\n }),\n ).description('Checkbox group items to show of type DSCheckbox'),\n /**\n * Whether the checkbox group is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the checkbox group is disabled or not'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(checkboxGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * label props\n */\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('label props'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,eAAe,gCAAgC;AAEjD,MAAM,QAAQ;AAAA,EAInB,UAAU,UAAU,KAAK,YAAY,qEAAqE;AAAA,EAI1G,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,KAAK,CAAC,EAAE;AAAA,IACtF;AAAA,EACF;AAAA,EAIA,UAAU,UAAU;AAAA,IAClB,UAAU,MAAM;AAAA,MACd,MAAM,UAAU,MAAM,CAAC,UAAU,CAAC;AAAA,IACpC,CAAC;AAAA,EACH,EAAE,YAAY,iDAAiD;AAAA,EAI/D,UAAU,UAAU,KAAK,YAAY,+CAA+C;AAAA,EAIpF,aAAa,UAAU,MAAM,wBAAwB,EAAE,YAAY,4BAA4B;AAAA,EAI/F,YAAY,UAAU,MAAM;AAAA,IAC1B,iBAAiB,UAAU;AAAA,IAC3B,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,IACpE,UAAU,UAAU;AAAA,EACtB,CAAC,EAAE,YAAY,aAAa;AAC9B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useCallback, useEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { runAll } from "@elliemae/ds-utilities";
|
|
5
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
5
6
|
import { DSInput } from "../Input";
|
|
6
7
|
import { DateInputImpl } from "./components/DateInputImpl";
|
|
7
8
|
import { props } from "./props";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/DateInput/DSDateInput.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { runAll } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../Input';\nimport { DateInputImpl } from './components/DateInputImpl';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst DSDateInput = ({\n innerRef,\n className,\n style,\n onFocus,\n onBlur,\n onClear,\n onChange,\n onKeyDown,\n onError,\n format,\n value,\n clearable,\n disabled,\n yearMaxRange,\n yearMinRange,\n containerProps,\n // TODO remove and keep `true` behavior ( PUI-4141 )\n INTERNAL_V2_NO_MUTATION,\n}) => {\n const [valueDate, setValueDate] = useState(value);\n\n useEffect(() => {\n if (value) {\n setValueDate(value);\n }\n }, [value]);\n\n const handleOnClear = useCallback(() => {\n runAll(onClear, setValueDate(''));\n }, [onClear]);\n\n const handleKeyDown = useCallback((e, date, inputOnKeyDown) => {\n inputOnKeyDown(e, date);\n }, []);\n\n const handleOnChange = useCallback((date, inputOnChange) => {\n setValueDate(date);\n inputOnChange(date);\n }, []);\n\n return (\n <DSInput\n className={`${className} input-date-input `}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, onKeyDown: inputOnKeyDown, ...restInputProps }) => (\n <DateInputImpl\n INTERNAL_V2_NO_MUTATION={INTERNAL_V2_NO_MUTATION}\n disabled={disabled}\n format={format}\n onChange={(date) => handleOnChange(date, inputOnChange)}\n onError={onError}\n onKeyDown={(e, date) => handleKeyDown(e, date, inputOnKeyDown)}\n value={valueDate}\n {...restInputProps}\n style={style}\n yearMaxRange={yearMaxRange}\n yearMinRange={yearMinRange}\n onFocus={onFocus}\n />\n )}\n disableTooltip={false}\n disabled={disabled}\n innerRef={innerRef}\n onBlur={onBlur}\n onChange={onChange}\n onKeyDown={onKeyDown}\n onClear={handleOnClear}\n value={valueDate}\n />\n );\n};\n\nDSDateInput.propTypes = props;\nDSDateInput.defaultProps = defaultProps;\nDSDateInput.displayName = 'DSDateInput';\nconst DSDateInputWithSchema = describe(DSDateInput).deprecated('use DateInputV2 instead');\nDSDateInputWithSchema.propTypes = props;\n\nexport { DateInputImpl, DSDateInputWithSchema, DSDateInput };\n\nexport default DSDateInput;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwDf;AAvDR,SAAgB,UAAU,aAAa,iBAAiB;AACxD,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAE7B,MAAM,cAAc,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,YAAY,YAAY;AACxB,YAAY,eAAe;AAC3B,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW,EAAE,WAAW,yBAAyB;AACxF,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const props = {
|
|
4
4
|
containerProps: PropTypes.object.description("props injected to date input wrapper node"),
|
|
5
5
|
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/DateInput/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const props = {\n /** props injected to date input wrapper node */\n containerProps: PropTypes.object.description('props injected to date input wrapper node'),\n /** inner ref for input wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for input wrapper',\n ),\n /** class for input */\n className: PropTypes.string.description('class for input'),\n /**\n * Set style for the date input\n */\n style: PropTypes.object.description('Set style for the date input'),\n /**\n * Triggers the onBlur when focus moves out of date input\n */\n onBlur: PropTypes.func.description('Triggers the onBlur when focus moves out of date input'),\n /**\n * Triggers the onFocus when the component gets the focus\n */\n onFocus: PropTypes.func.description('Triggers the onFocus when the component gets the focus'),\n /**\n * Triggers the onClear\n */\n onClear: PropTypes.func.description('Triggers the onClear'),\n /**\n * Triggers the onKeyDown\n */\n onKeyDown: PropTypes.func.description('Triggers the onKeyDown'),\n /**\n * Allows a function that is triggered once the date input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the date input changes'),\n /**\n * Triggers the onError once one input date is wrong\n */\n onError: PropTypes.func.description('Triggers the onError once one input date is wrong'),\n /**\n * Format type for date input\n */\n format: PropTypes.string.description('Format type for date input'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the date input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the date input is clearable or not'),\n /**\n * Whether the date input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the date input is disabled or not'),\n /**\n * Max year that can be accepted by the date input\n */\n yearMaxRange: PropTypes.number.description('Max year that can be accepted by the date input'),\n /**\n * Min year that can be accepted by the date input\n */\n yearMinRange: PropTypes.number.description('Min year that can be accepted by the date input'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,OAAO,YAAY,2CAA2C;AAAA,EAExF,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAEA,WAAW,UAAU,OAAO,YAAY,iBAAiB;AAAA,EAIzD,OAAO,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,QAAQ,UAAU,KAAK,YAAY,wDAAwD;AAAA,EAI3F,SAAS,UAAU,KAAK,YAAY,wDAAwD;AAAA,EAI5F,SAAS,UAAU,KAAK,YAAY,sBAAsB;AAAA,EAI1D,WAAW,UAAU,KAAK,YAAY,wBAAwB;AAAA,EAI9D,UAAU,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAItG,SAAS,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,QAAQ,UAAU,OAAO,YAAY,4BAA4B;AAAA,EAIjE,OAAO,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,WAAW,UAAU,KAAK,YAAY,4CAA4C;AAAA,EAIlF,UAAU,UAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,cAAc,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAI5F,cAAc,UAAU,OAAO,YAAY,iDAAiD;AAC9F;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { describe } from "@elliemae/ds-
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { DSInput } from "../../Input";
|
|
5
5
|
import { DateInputs } from "./DateInputs";
|
|
6
6
|
import { props, defaultProps } from "./props";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/DateInputV2/components/DSDateInput.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSInput } from '../../Input';\nimport { DateInputs } from './DateInputs';\nimport { props, defaultProps } from './props';\n\nconst DSDateInputV2 = ({\n onFocus,\n onBlur,\n onChange,\n onDateChange,\n onKeyDown,\n onError,\n value,\n disabled,\n containerProps,\n tabIndex,\n innerRef,\n}) => (\n <DSInput\n innerRef={innerRef}\n containerProps={containerProps}\n customInputType={({ innerRef: ir }) => (\n <DateInputs\n disabled={disabled}\n innerRef={ir}\n onBlur={onBlur}\n onChange={onChange}\n onDateChange={onDateChange}\n onCustomKeyDown={onKeyDown}\n onError={onError}\n time={value}\n tabIndex={tabIndex}\n />\n )}\n disableTooltip={false}\n disabled={disabled}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n tabIndex={tabIndex}\n />\n);\n\nDSDateInputV2.defaultProps = defaultProps;\n\nDSDateInputV2.propTypes = props;\nDSDateInputV2.displayName = 'DSDateInputV2';\nconst DSDateInputV2WithSchema = describe(DSDateInputV2);\nDSDateInputV2WithSchema.propTypes = props;\n\nexport { DSDateInputV2, DSDateInputV2WithSchema };\nexport default DSDateInputV2;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACuBjB;AAtBN,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,oBAAoB;AAEpC,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC,EAAE,UAAU,GAAG,MAC/B;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA,iBAAiB;AAAA,QACjB;AAAA,QACA,MAAM;AAAA,QACN;AAAA;AAAA,IACF;AAAA,IAEF,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAGF,cAAc,eAAe;AAE7B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;AAGpC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { noop } from "lodash";
|
|
4
4
|
const props = {
|
|
5
5
|
containerProps: PropTypes.object.description("Props to inject to date input wrapper"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/DateInputV2/components/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\n\nexport const props = {\n /** Props to inject to date input wrapper */\n containerProps: PropTypes.object.description('Props to inject to date input wrapper'),\n /**\n * Triggers the onBlur when focus moves out of date input\n */\n onBlur: PropTypes.func.description('Triggers the onBlur when focus moves out of date input'),\n /**\n * Triggers the onFocus when the component gets the focus\n */\n onFocus: PropTypes.func.description('Triggers the onFocus when the component gets the focus'),\n /**\n * Triggers the onKeyDown\n */\n onKeyDown: PropTypes.func.description('Triggers the onKeyDown'),\n /**\n * Allows a function that is triggered once the date input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the date input changes'),\n /**\n * Triggers when the date is completely set and only once you have blurred the\n * corresponding input. For example if you are editing the day and the year and month\n * are already set, once you completely set the day it will trigger.\n */\n onDateChange: PropTypes.func.description(\n ' Triggers when the date is completely set and only once you have blurred the corresponding input. For example if you are editing the day and the year and month are already set, once you completely set the day it will trigger.',\n ),\n /**\n * Triggers the onError once one input date is wrong\n */\n onError: PropTypes.func.description('Triggers the onError once one input date is wrong'),\n /**\n * Default value once the component is initialized MMDDYYYY\n */\n value: PropTypes.string.description('Default value once the component is initialized MMDDYYYY'),\n /**\n * Whether the date input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the date input is disabled or not'),\n /**\n * tab index\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('tab index'),\n};\n\nexport const defaultProps = {\n onFocus: noop,\n onBlur: noop,\n onChange: noop,\n onDateChange: noop,\n onKeyDown: noop,\n onError: noop,\n value: '',\n disabled: false,\n containerProps: {},\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAEd,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,OAAO,YAAY,uCAAuC;AAAA,EAIpF,QAAQ,UAAU,KAAK,YAAY,wDAAwD;AAAA,EAI3F,SAAS,UAAU,KAAK,YAAY,wDAAwD;AAAA,EAI5F,WAAW,UAAU,KAAK,YAAY,wBAAwB;AAAA,EAI9D,UAAU,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAMtG,cAAc,UAAU,KAAK;AAAA,IAC3B;AAAA,EACF;AAAA,EAIA,SAAS,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,OAAO,UAAU,OAAO,YAAY,0DAA0D;AAAA,EAI9F,UAAU,UAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,WAAW;AAC7F;AAEO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB,CAAC;AACnB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { getComponentFromProps } from "@elliemae/ds-utilities";
|
|
5
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
5
6
|
import { Group } from "@elliemae/ds-shared";
|
|
6
7
|
import { DSInputGroup } from "../InputGroup";
|
|
7
8
|
import { DSFloatingLabelInput } from "../FloatingLabelInput";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/DSFormItemLayout.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { getComponentFromProps } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSInputGroup } from '../InputGroup';\nimport { DSFloatingLabelInput } from '../FloatingLabelInput';\nimport { DSError } from './Error/DSError';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\nimport { FORMITEM_LAYOUT_VARIANTS } from './variants';\nimport { Suffix, SuffixInputWrapper, SuffixWrapper } from './Suffix/Suffix';\n// import { maskTypes } from '../InputMask/MaskTypes';\n\nexport { DSError, FORMITEM_LAYOUT_VARIANTS };\n\nconst blockName = 'form-item';\n\nconst Wrapper = aggregatedClasses('div')(blockName, null, ({ leftLabel, variant, fitContent, withHighlight }) => ({\n 'with-left-label': leftLabel,\n 'fit-content': fitContent,\n [variant]: variant,\n 'with-highlight': withHighlight,\n}));\n\nconst WrapperContent = aggregatedClasses('div')(`${blockName}-content`);\nconst WrapperContentGroup = aggregatedClasses('fieldset')(`${blockName}-content`);\n\nconst DSFormItemLayout = ({\n leftLabel,\n floatingLabel,\n name,\n id,\n value,\n inputComponent: InputComponent,\n labelComponent: LabelComponent,\n feedbackComponent: FeedbackComponent,\n labelText,\n truncateText,\n hasError,\n // orientation = 'vertical', // one of [ vertical, horizontal ]\n validationState, // one of [ success, error, warning ]\n validationMessage,\n feedbackMessage,\n readOnly,\n focused,\n type,\n autoFocus,\n disabled,\n onChange,\n onBlur,\n onFocus,\n onPaste,\n onKeyUp,\n extraInputProps,\n extraContent,\n leftAddon,\n rightAddon,\n required,\n optional,\n mask,\n useSubfix,\n suffix,\n variant,\n fitContent,\n withHighlight,\n containerProps,\n ...rest\n}) => {\n const isGroup = InputComponent.type === (<Group />).type;\n const floatingLabelOverride = floatingLabel === 'UNSAFE';\n const WrapperContentComp = !isGroup ? WrapperContent : WrapperContentGroup;\n\n // group the input props to not duplicate it inside the specific inputComponent (floating or not)\n const inputProps = {\n ...extraInputProps,\n disabled,\n hasError: hasError || validationState === 'error',\n id,\n name,\n type,\n autoFocus,\n onBlur,\n onChange,\n onFocus,\n onPaste,\n onKeyUp,\n readOnly,\n value,\n mask,\n useSubfix,\n variant,\n required,\n ...rest,\n };\n\n const renderInput = (Input) =>\n leftAddon || rightAddon ? (\n <DSInputGroup leftAddon={leftAddon} rightAddon={rightAddon} variant={variant}>\n {Input}\n </DSInputGroup>\n ) : (\n Input\n );\n\n const renderFloating = (\n <DSFloatingLabelInput\n {...inputProps}\n extraInputProps={extraInputProps}\n focused={focused}\n inputComponent={InputComponent}\n labelComponent={LabelComponent}\n labelText={labelText}\n optional={optional}\n required={required}\n variant={variant}\n />\n );\n\n const InputWithLabel = floatingLabelOverride ? (\n renderInput(renderFloating)\n ) : (\n <>\n <LabelComponent\n htmlFor={id || name}\n label={labelText}\n optional={optional}\n required={required}\n isGroup={isGroup}\n truncateText={truncateText}\n />\n {renderInput(getComponentFromProps(InputComponent, inputProps))}\n </>\n );\n\n if (suffix) {\n return (\n <Wrapper\n classProps={{\n disabled,\n readOnly,\n hasError,\n leftLabel,\n variant,\n fitContent,\n withHighlight,\n }}\n {...containerProps}\n >\n <SuffixWrapper className=\"suffix-wrapper\">\n <SuffixInputWrapper className=\"suffix-input-wrapper\">\n <WrapperContentComp>\n {InputWithLabel}\n {extraContent}\n </WrapperContentComp>\n <FeedbackComponent\n hasError={hasError}\n text={validationState || hasError ? validationMessage : feedbackMessage}\n />\n </SuffixInputWrapper>\n <Suffix\n className=\"suffix-label\"\n label={!!labelText}\n withFeedback={Boolean(validationMessage || feedbackMessage)}\n >\n {suffix}\n </Suffix>\n </SuffixWrapper>\n </Wrapper>\n );\n }\n\n return (\n <Wrapper\n classProps={{\n disabled,\n readOnly,\n hasError,\n leftLabel,\n variant,\n fitContent,\n withHighlight,\n }}\n {...containerProps}\n >\n <WrapperContentComp>\n {InputWithLabel}\n {extraContent}\n </WrapperContentComp>\n <FeedbackComponent hasError={hasError} text={validationState || hasError ? validationMessage : feedbackMessage} />\n </Wrapper>\n );\n};\n\nDSFormItemLayout.propTypes = props;\nDSFormItemLayout.defaultProps = defaultProps;\nDSFormItemLayout.displayName = 'DSFormItemLayout';\nconst DSFormItemLayoutWithSchema = describe(DSFormItemLayout);\nDSFormItemLayoutWithSchema.propTypes = props;\n\nexport default DSFormItemLayout;\nexport { DSFormItemLayoutWithSchema, DSFormItemLayout };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuEoB,SAqDvC,UArDuC,KAqDvC,YArDuC;AApE3C,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,gCAAgC;AACzC,SAAS,QAAQ,oBAAoB,qBAAqB;AAK1D,MAAM,YAAY;AAElB,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,WAAW,SAAS,YAAY,cAAc,OAAO;AAAA,EAChH,mBAAmB;AAAA,EACnB,eAAe;AAAA,EACf,CAAC,UAAU;AAAA,EACX,kBAAkB;AACpB,EA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BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAEvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
const DSError = ({ hasError = false, errorText = "Error" }) => {
|
|
5
5
|
if (!hasError)
|
|
6
6
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/FormItem/Error/DSError.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst DSError = ({ hasError = false, errorText = 'Error' }) => {\n if (!hasError) return null;\n return <div className=\"em-ds-error\">{errorText}</div>;\n};\n\nconst props = {\n /** error state */\n hasError: PropTypes.bool.description('error state'),\n /** error label text */\n errorText: PropTypes.string.description('error label text'),\n};\n\nDSError.propTypes = props;\nDSError.displayName = 'DSError';\nconst DSErrorWithSchema = describe(DSError);\n\nDSErrorWithSchema.propTypes = props;\n\nexport default DSError;\nexport { DSErrorWithSchema, DSError };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACKd;AAJT,SAAS,WAAW,gBAAgB;AAEpC,MAAM,UAAU,CAAC,EAAE,WAAW,OAAO,YAAY,QAAQ,MAAM;AAC7D,MAAI,CAAC;AAAU,WAAO;AACtB,SAAO,oBAAC,SAAI,WAAU,eAAe,qBAAU;AACjD;AAEA,MAAM,QAAQ;AAAA,EAEZ,UAAU,UAAU,KAAK,YAAY,aAAa;AAAA,EAElD,WAAW,UAAU,OAAO,YAAY,kBAAkB;AAC5D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAE1C,kBAAkB,YAAY;AAE9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { FORMITEM_LAYOUT_VARIANTS } from "./variants";
|
|
4
4
|
const props = {
|
|
5
5
|
containerProps: PropTypes.object.description("props to inject to form item layout wrapper"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FormItem/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { FORMITEM_LAYOUT_VARIANTS } from './variants';\n\nexport const props = {\n /** props to inject to form item layout wrapper */\n containerProps: PropTypes.object.description('props to inject to form item layout wrapper'),\n /** disableTooltip */\n disableTooltip: PropTypes.bool\n .description('Whether to show a tooltip or not when text does not fit')\n .defaultValue(true),\n /** position label on the left */\n leftLabel: PropTypes.bool.description('position label on the left'),\n /** turn on floating label */\n floatingLabel: PropTypes.bool.description('turn on floating label'),\n /** id for form item layout */\n id: PropTypes.string.description('id for form item layout'),\n /** html name prop for form tags */\n name: PropTypes.string.description('html name prop for form tags'),\n /** form item layout element value */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'form item layout element value',\n ),\n /** Any input component */\n inputComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Any input component'),\n /** isShowElipsisActive */\n /** isShowElipsisActive */\n isShowElipsisActive: PropTypes.bool\n .description('Wheter to enable the ellipsis and tooltip functionality or not')\n .defaultValue(true),\n /** Label component */\n labelComponent: PropTypes.func.description('Label component'),\n /** feedback component to embed on form item */\n feedbackComponent: PropTypes.func.description('feedback component to embed on form item'),\n /** label text */\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('label text'),\n /** error state */\n hasError: PropTypes.bool.description('error state'),\n /** add fit content to form container */\n fitContent: PropTypes.bool.description(\n 'Adds fit content css property to the main container, making the layout width adapt to the input component',\n ),\n /** validation state */\n validationState: PropTypes.oneOf(['success', 'error', 'warning']).description('validation state'),\n /** validation message */\n validationMessage: PropTypes.string.description('validation message'),\n /** feedback message */\n feedbackMessage: PropTypes.string.description('feedback message'),\n /** read only form item */\n readOnly: PropTypes.bool.description('read only form item'),\n /** focused state */\n focused: PropTypes.bool.description('focused state'),\n /** input type */\n type: PropTypes.string.description('input type'),\n /** auto focus input */\n autoFocus: PropTypes.bool.description('auto focus input'),\n /** disabled state */\n disabled: PropTypes.bool.description('disabled state'),\n /** on change handler */\n onChange: PropTypes.func.description('on change handler'),\n /** on blur handler */\n onBlur: PropTypes.func.description('on blur handler'),\n /** extra input props to inject */\n extraInputProps: PropTypes.object.description('extra input props to inject'),\n /** extra content */\n extraContent: PropTypes.element.description('extra content'),\n /** left addon for form item */\n leftAddon: PropTypes.element.description('left addon for form item'),\n /** right addon for form item */\n rightAddon: PropTypes.element.description('right addon for form item'),\n /** add required mark */\n required: PropTypes.bool.description('add required mark'),\n /** add optional mark */\n optional: PropTypes.bool.description('add optional mark'),\n /** on focus handler */\n onFocus: PropTypes.func.description('on focus handler'),\n /** on paste handler */\n onPaste: PropTypes.func.description('on paste handler'),\n /** add truncation and ellipsis */\n truncateText: PropTypes.bool.description('add truncation and ellipsis'),\n /** on key up event handler */\n onKeyUp: PropTypes.func.description('on key up event handler'),\n /** mask for input mask component */\n mask: PropTypes.oneOfType([\n // PropTypes.oneOf(maskTypes),\n PropTypes.string,\n PropTypes.func,\n PropTypes.object,\n PropTypes.array,\n ]).description('mask for input mask component'),\n /** add suffix to input */\n useSubfix: PropTypes.string.description('add suffix to input'),\n /** suffix for input */\n suffix: PropTypes.string.description('suffix for input'),\n /** form item layout type */\n variant: PropTypes.oneOf([\n FORMITEM_LAYOUT_VARIANTS.DEFAULT,\n FORMITEM_LAYOUT_VARIANTS.FOCUS,\n FORMITEM_LAYOUT_VARIANTS.ACTIVE,\n FORMITEM_LAYOUT_VARIANTS.DISABLED,\n FORMITEM_LAYOUT_VARIANTS.READ_ONLY,\n FORMITEM_LAYOUT_VARIANTS.OPTIONAL,\n ]).description('form item layout type'),\n withHighlight: PropTypes.bool.description('adds highlight style to the input component'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,gCAAgC;AAElC,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,OAAO,YAAY,6CAA6C;AAAA,EAE1F,gBAAgB,UAAU,KACvB,YAAY,yDAAyD,EACrE,aAAa,IAAI;AAAA,EAEpB,WAAW,UAAU,KAAK,YAAY,4BAA4B;AAAA,EAElE,eAAe,UAAU,KAAK,YAAY,wBAAwB;AAAA,EAElE,IAAI,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAE1D,MAAM,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAEjE,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE;AAAA,IACjF;AAAA,EACF;AAAA,EAEA,gBAAgB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,OAAO,CAAC,EAAE,YAAY,qBAAqB;AAAA,EAG1G,qBAAqB,UAAU,KAC5B,YAAY,gEAAgE,EAC5E,aAAa,IAAI;AAAA,EAEpB,gBAAgB,UAAU,KAAK,YAAY,iBAAiB;AAAA,EAE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AU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAE9C,WAAW,UAAU,OAAO,YAAY,qBAAqB;AAAA,EAE7D,QAAQ,UAAU,OAAO,YAAY,kBAAkB;AAAA,EAEvD,SAAS,UAAU,MAAM;AAAA,IACvB,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,EAC3B,CAAC,EAAE,YAAY,uBAAuB;AAAA,EACtC,eAAe,UAAU,KAAK,YAAY,6CAA6C;AACzF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { describe } from "@elliemae/ds-
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { AddonWrapper } from "./AddonWrapper";
|
|
5
5
|
import { props } from "./props";
|
|
6
6
|
import { defaultProps } from "./defaultProps";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputGroup/DSInputGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { AddonWrapper } from './AddonWrapper';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst DSInputGroup = ({\n containerProps,\n innerRef,\n className,\n style,\n leftAddon,\n rightAddon,\n children: InputComponents, // as InputComponents,\n}) => (\n <AddonWrapper\n ref={innerRef}\n className={className}\n containerProps={containerProps}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n style={style}\n >\n {InputComponents}\n </AddonWrapper>\n);\n\nDSInputGroup.propTypes = props;\nDSInputGroup.defaultProps = defaultProps;\nDSInputGroup.displayName = 'DSInputGroup';\nconst DSInputGroupWithSchema = describe(DSInputGroup);\n\nDSInputGroupWithSchema.propTypes = props;\n\nexport default DSInputGroup;\nexport { DSInputGroupWithSchema, DSInputGroup };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACerB;AAdF,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAE7B,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACZ,MACE;AAAA,EAAC;AAAA;AAAA,IACC,KAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAGF,aAAa,YAAY;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AAEpD,uBAAuB,YAAY;AAEnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const props = {
|
|
4
4
|
containerProps: PropTypes.shape({}).description("props injected to wrapper of page header"),
|
|
5
5
|
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputGroup/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description('props injected to wrapper of page header'),\n /** inner ref for input group wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for input group wrapper',\n ),\n /** class for input group wrapper */\n className: PropTypes.string.description('class for input group wrapper'),\n /**\n * Set style for the input group\n */\n style: PropTypes.object.description('Set style for the input group'),\n /**\n * Component to be added at the left side of the input\n */\n leftAddon: PropTypes.element.description('Component to be added at the left side of the input'),\n /**\n * Component to be added at the right side of the input\n */\n rightAddon: PropTypes.element.description('Component to be added at the right side of the input'),\n /**\n * Input components to show\n */\n children: PropTypes.element.description('Input components to show'),\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA,EAE1F,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAEA,WAAW,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAIvE,OAAO,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAInE,WAAW,UAAU,QAAQ,YAAY,qDAAqD;AAAA,EAI9F,YAAY,UAAU,QAAQ,YAAY,sDAAsD;AAAA,EAIhG,UAAU,UAAU,QAAQ,YAAY,0BAA0B;AACpE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useState } from "react";
|
|
4
|
-
import { describe } from "@elliemae/ds-
|
|
4
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import { MASK_TYPES } from "./MaskTypes";
|
|
6
6
|
import { MASK_PIPES } from "./MaskPipes";
|
|
7
7
|
import { DSInputMaskDeprecated } from "./DSInputMaskDeprecated";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputMask/DSInputMask.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { MASK_TYPES } from './MaskTypes';\nimport { MASK_PIPES } from './MaskPipes';\nimport { DSInputMaskDeprecated } from './DSInputMaskDeprecated';\nimport { inputProps } from './props';\nimport { defaultProps } from './defaultProps';\nimport { OutOfTheBoxMaskTypes } from './mask_types';\n\nconst isStringMask = (mask: any) => typeof mask === 'string';\n\nconst isObjectMask = (mask: any) => typeof mask === 'object' && mask.type;\n\nconst getRawMask = (mask: any, rawValue: string) => (typeof mask === 'function' ? mask(rawValue) : mask);\n\nconst getValueFromEventOrString = (e: any): string => {\n let value = e;\n if (e && e.target) {\n const {\n target: { value: eValue },\n } = e;\n value = eValue;\n }\n return value;\n};\n\nconst DSInputMask = ({\n 'aria-label': ariaLabel = 'Input Mask',\n autoFocus,\n innerRef,\n mask,\n pipe,\n value: valueOrEvent,\n ...rest\n}) => {\n const [rawValue, setRawValue] = useState(getValueFromEventOrString(valueOrEvent));\n\n useEffect(() => {\n setRawValue(getValueFromEventOrString(valueOrEvent));\n }, [valueOrEvent]);\n\n const [rawMask, setRawMask] = useState<any>(getRawMask(mask, rawValue));\n\n const [focus, setFocus] = useState(autoFocus);\n\n const [lastkey, setLastkey] = useState<{ code: number; key: string }>({\n code: null,\n key: null,\n });\n\n const [cursorPosition, setCursorPosition] = useState({ current: 0 });\n\n const handleSetMask = useCallback(\n (newValue) => {\n setRawMask(getRawMask(mask, newValue));\n },\n [mask],\n );\n\n if (!pipe && isStringMask(rawMask)) {\n return OutOfTheBoxMaskTypes[rawMask]({\n ...rest,\n 'aria-label': ariaLabel,\n innerRef,\n value: rawValue,\n focus,\n setFocus,\n setRawMask: handleSetMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n });\n }\n\n if (!pipe && isObjectMask(rawMask)) {\n // we should change rawMask.type to rawMask.maskType\n // to avoid override standard props\n return OutOfTheBoxMaskTypes[rawMask.type]({\n ...rawMask,\n ...rest,\n 'aria-label': ariaLabel,\n innerRef,\n value: rawValue,\n focus,\n setFocus,\n setRawMask: handleSetMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n });\n }\n\n const getDeprecatedMask = () => {\n if (mask === MASK_TYPES.DATE) return MASK_TYPES.DATE_DEPRECATED;\n if (mask === MASK_TYPES.DATE_TIME) return MASK_TYPES.DATE_TIME_DEPRECATED;\n return mask;\n };\n return (\n <DSInputMaskDeprecated\n {...rest}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n innerRef={innerRef}\n mask={getDeprecatedMask()}\n pipe={pipe}\n value={rawValue}\n />\n );\n};\n\nDSInputMask.propTypes = inputProps;\nDSInputMask.defaultProps = defaultProps;\nDSInputMask.displayName = 'DSInputMask';\nconst DSInputMaskWithSchema = describe(DSInputMask).description('Masking input for custom formats');\nDSInputMaskWithSchema.propTypes = inputProps;\n\nexport { MASK_TYPES, MASK_PIPES, DSInputMaskWithSchema, DSInputMask };\nexport default DSInputMask;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACuGnB;AAtGJ,SAAgB,aAAa,WAAW,gBAAgB;AACxD,SAAS,g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