@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
|
@@ -28,44 +28,44 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
const inputProps = {
|
|
33
|
-
autoFocus:
|
|
34
|
-
style:
|
|
35
|
-
disabled:
|
|
36
|
-
disableTooltip:
|
|
37
|
-
className:
|
|
38
|
-
name:
|
|
39
|
-
maxLength:
|
|
40
|
-
minLength:
|
|
41
|
-
fluidWidth:
|
|
42
|
-
isShowElipsisActive:
|
|
43
|
-
placeholder:
|
|
44
|
-
onKeyDown:
|
|
45
|
-
onClick:
|
|
46
|
-
onChange:
|
|
47
|
-
onFocus:
|
|
48
|
-
onBlur:
|
|
49
|
-
onPaste:
|
|
50
|
-
onKeyUp:
|
|
33
|
+
autoFocus: import_ds_props_helpers.PropTypes.bool.description("Should component focus automatically"),
|
|
34
|
+
style: import_ds_props_helpers.PropTypes.object.description("Set style for the input mask"),
|
|
35
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the input mask is disabled or not"),
|
|
36
|
+
disableTooltip: import_ds_props_helpers.PropTypes.bool.description("Whether to show a tooltip or not when text does not fit").defaultValue(true),
|
|
37
|
+
className: import_ds_props_helpers.PropTypes.string.description("css class"),
|
|
38
|
+
name: import_ds_props_helpers.PropTypes.string.description("html name prop for form"),
|
|
39
|
+
maxLength: import_ds_props_helpers.PropTypes.number.description("Max length for the input mask"),
|
|
40
|
+
minLength: import_ds_props_helpers.PropTypes.number.description("Min length for the input mask"),
|
|
41
|
+
fluidWidth: import_ds_props_helpers.PropTypes.bool.description("Whether to make the content of the input mask fit the container or not"),
|
|
42
|
+
isShowElipsisActive: import_ds_props_helpers.PropTypes.bool.description("Wheter to enable the ellipsis and tooltip functionality or not").defaultValue(true),
|
|
43
|
+
placeholder: import_ds_props_helpers.PropTypes.node.description("Component that works as placeholder"),
|
|
44
|
+
onKeyDown: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once a key is being pressed"),
|
|
45
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input mask is clicked"),
|
|
46
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input mask changes"),
|
|
47
|
+
onFocus: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input mask is focused"),
|
|
48
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input mask loses focus"),
|
|
49
|
+
onPaste: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input mask is pasted"),
|
|
50
|
+
onKeyUp: import_ds_props_helpers.PropTypes.func.description(
|
|
51
51
|
"Allows a function that is triggered once in the input mask a keyboard key is released"
|
|
52
52
|
),
|
|
53
|
-
value:
|
|
54
|
-
hasError:
|
|
55
|
-
readOnly:
|
|
56
|
-
innerRef:
|
|
53
|
+
value: import_ds_props_helpers.PropTypes.string.description("Default value once the component is initialized"),
|
|
54
|
+
hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the input mask has error or not"),
|
|
55
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the input mask is read only or not"),
|
|
56
|
+
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(
|
|
57
57
|
"Whether the input mask is read only or not"
|
|
58
58
|
),
|
|
59
|
-
type:
|
|
60
|
-
clearable:
|
|
61
|
-
leftComponent:
|
|
62
|
-
rightComponent:
|
|
63
|
-
mask:
|
|
59
|
+
type: import_ds_props_helpers.PropTypes.string.description("Type of input. Ex: 'text'"),
|
|
60
|
+
clearable: import_ds_props_helpers.PropTypes.bool.description("Whether the input mask is clearable or not"),
|
|
61
|
+
leftComponent: import_ds_props_helpers.PropTypes.node.description("Component to be added at the right side of the input"),
|
|
62
|
+
rightComponent: import_ds_props_helpers.PropTypes.node.description("Component to be added at the right side of the input"),
|
|
63
|
+
mask: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.array, import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.object]).description(
|
|
64
64
|
"Mask that has to match with the input information entered. ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT', 'ZIP_CODE_SEARCH']"
|
|
65
65
|
),
|
|
66
|
-
pipe:
|
|
67
|
-
useSubfix:
|
|
68
|
-
placeholderChar:
|
|
66
|
+
pipe: import_ds_props_helpers.PropTypes.func.description("Expects pipe functions. i.e. autoCorrectedDatePipe"),
|
|
67
|
+
useSubfix: import_ds_props_helpers.PropTypes.string.description("Put a sufix after the input mask"),
|
|
68
|
+
placeholderChar: import_ds_props_helpers.PropTypes.string.description(
|
|
69
69
|
`The placeholder character represents the fillable spot in the mask.
|
|
70
70
|
The default placeholder character is underscore, _.`
|
|
71
71
|
).defaultValue("_")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/InputMask/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';\n\nexport const inputProps = {\n /** Should component focus automatically */\n autoFocus: PropTypes.bool.description('Should component focus automatically'),\n /**\n * Set style for the input mask\n */\n style: PropTypes.object.description('Set style for the input mask'),\n /**\n * Whether the input mask is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the input mask is disabled or not'),\n /** disableTooltip */\n disableTooltip: PropTypes.bool\n .description('Whether to show a tooltip or not when text does not fit')\n .defaultValue(true),\n /** css class */\n className: PropTypes.string.description('css class'),\n /** html name prop for form */\n name: PropTypes.string.description('html name prop for form'),\n /**\n * Max length for the input mask\n */\n maxLength: PropTypes.number.description('Max length for the input mask'),\n /**\n * Min length for the input mask\n */\n minLength: PropTypes.number.description('Min length for the input mask'),\n /**\n * Whether to make the content of the input mask fit the container or not\n */\n fluidWidth: PropTypes.bool.description('Whether to make the content of the input mask fit the container or not'),\n /** isShowElipsisActive */\n isShowElipsisActive: PropTypes.bool\n .description('Wheter to enable the ellipsis and tooltip functionality or not')\n .defaultValue(true),\n /**\n * Component that works as placeholder\n */\n placeholder: PropTypes.node.description('Component that works as placeholder'),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input mask is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input mask is clicked'),\n /**\n * Allows a function that is triggered once the input mask changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input mask changes'),\n /**\n * Allows a function that is triggered once the input mask is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input mask is focused'),\n /**\n * Allows a function that is triggered once the input mask loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input mask loses focus'),\n /**\n * Allows a function that is triggered once the input mask is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input mask is pasted'),\n /**\n * Allows a function that is triggered once in the input mask a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input mask a keyboard key is released',\n ),\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 input mask has error or not\n */\n hasError: PropTypes.bool.description('Whether the input mask has error or not'),\n /**\n * Whether the input mask is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input mask is read only or not'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Whether the input mask is read only or not',\n ),\n /**\n * Type of input. Ex: 'text'\n */\n type: PropTypes.string.description(\"Type of input. Ex: 'text'\"),\n /**\n * Whether the input mask is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the input mask is clearable or not'),\n /**\n * Component to be added at the right side of the input\n */\n leftComponent: PropTypes.node.description('Component to be added at the right side of the input'),\n /**\n * Component to be added at the right side of the input\n */\n rightComponent: PropTypes.node.description('Component to be added at the right side of the input'),\n /**\n * Mask that has to match with the input information entered\n * ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT']\n */\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.func, PropTypes.object]).description(\n \"Mask that has to match with the input information entered. ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT', 'ZIP_CODE_SEARCH']\",\n ),\n /**\n Expects pipe functions. i.e. autoCorrectedDatePipe\n link a docu de text-mask\n */\n pipe: PropTypes.func.description('Expects pipe functions. i.e. autoCorrectedDatePipe'),\n /**\n * Put a sufix after the input mask\n */\n useSubfix: PropTypes.string.description('Put a sufix after the input mask'),\n /**\n * The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _\n */\n placeholderChar: PropTypes.string\n .description(\n `The placeholder character represents the fillable spot in the mask.\n The default placeholder character is underscore, _.`,\n )\n .defaultValue('_'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,aAAa;AAAA,EAExB,WAAW,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EAI5E,OAAO,kCAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,UAAU,kCAAU,KAAK,YAAY,2CAA2C;AAAA,EAEhF,gBAAgB,kCAAU,KACvB,YAAY,yDAAyD,EACrE,aAAa,IAAI;AAAA,EAEpB,WAAW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EAAE;AAAA,IAC/F;AAAA,EACF;AAAA,EAKA,MAAM,kCAAU,KAAK,YAAY,oDAAoD;AAAA,EAIrF,WAAW,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EAK1E,iBAAiB,kCAAU,OACxB;AAAA,IACC;AAAA;AAAA,EAEF,EACC,aAAa,GAAG;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSInputProtected_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
37
|
var import_ds_button = require("@elliemae/ds-button");
|
|
38
38
|
var import_InputGroup = require("../InputGroup");
|
|
@@ -113,7 +113,7 @@ const DSInputProtected = ({
|
|
|
113
113
|
DSInputProtected.propTypes = import_props.inputProtectedProps;
|
|
114
114
|
DSInputProtected.defaultProps = import_defaultProps.defaultProps;
|
|
115
115
|
DSInputProtected.displayName = "DSInputProtected";
|
|
116
|
-
const DSInputProtectedWithSchema = (0,
|
|
116
|
+
const DSInputProtectedWithSchema = (0, import_ds_props_helpers.describe)(DSInputProtected);
|
|
117
117
|
DSInputProtectedWithSchema.propTypes = import_props.inputProtectedProps;
|
|
118
118
|
var DSInputProtected_default = DSInputProtected;
|
|
119
119
|
//# sourceMappingURL=DSInputProtected.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/InputProtected/DSInputProtected.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcP;AAXhB,mBAAwD;AACxD,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { LockUnlocked, LockLocked, VisibleView, InvisibleHide } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSInputGroup } from '../InputGroup';\nimport { DSInputMask } from '../InputMask';\nimport { inputProtectedProps } from './props';\nimport { defaultProps } from './defaultProps';\nimport { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options';\n\nconst ADDON_ICON_OPTIONS = {\n LockUnlocked: <LockUnlocked />,\n LockLocked: <LockLocked />,\n VisibleView: <VisibleView />,\n InvisibleHide: <InvisibleHide />,\n};\n\nconst DSInputProtected = ({\n leftAddon,\n rightAddon,\n onChange,\n value,\n readOnly,\n mask,\n type,\n placeholderChar = undefined,\n ...rest\n}) => {\n const left = leftAddon && ADDON_ICON_OPTIONS[leftAddon];\n const right = rightAddon && ADDON_ICON_OPTIONS[rightAddon];\n const [inputLocked, setLocked] = useState(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n const [inputHidden, setHidden] = useState(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n\n useEffect(() => {\n setLocked(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n setHidden(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n }, [leftAddon, rightAddon]);\n\n const handleLeft = useCallback(() => {\n setLocked(!inputLocked);\n }, [inputLocked]);\n const handleRight = useCallback(() => {\n setHidden(!inputHidden);\n }, [inputHidden]);\n\n return (\n <div>\n <DSInputGroup\n leftAddon={\n left ? (\n <DSButton\n aria-label={`${inputLocked ? 'Allow' : 'Disallow'} Edition`}\n buttonType=\"secondary\"\n icon={ADDON_ICON_OPTIONS[inputLocked ? LEFT_ADDON_OPTIONS.LockLocked : LEFT_ADDON_OPTIONS.LockUnlocked]}\n onClick={handleLeft}\n />\n ) : undefined\n }\n rightAddon={\n right ? (\n <DSButton\n aria-label={`${inputHidden ? 'Show' : 'Hide'} Characters`}\n buttonType=\"secondary\"\n icon={\n ADDON_ICON_OPTIONS[inputHidden ? RIGHT_ADDON_OPTIONS.InvisibleHide : RIGHT_ADDON_OPTIONS.VisibleView]\n }\n onClick={handleRight}\n containerProps={{\n 'data-testid': 'inputprotected-show-hide-button',\n }}\n />\n ) : undefined\n }\n >\n <DSInputMask\n {...rest}\n mask={mask}\n placeholderChar={placeholderChar}\n onChange={onChange}\n disabled={left ? inputLocked : readOnly}\n type={right && inputHidden ? 'password' : type}\n value={value}\n />\n </DSInputGroup>\n </div>\n );\n};\n\nDSInputProtected.propTypes = inputProtectedProps;\nDSInputProtected.defaultProps = defaultProps;\nDSInputProtected.displayName = 'DSInputProtected';\nconst DSInputProtectedWithSchema = describe(DSInputProtected);\nDSInputProtectedWithSchema.propTypes = inputProtectedProps;\n\nexport { DSInputProtectedWithSchema, DSInputProtected };\nexport default DSInputProtected;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcP;AAXhB,mBAAwD;AACxD,8BAAyB;AACzB,sBAAqE;AACrE,uBAAyB;AACzB,wBAA6B;AAC7B,uBAA4B;AAC5B,mBAAoC;AACpC,0BAA6B;AAC7B,qBAAwD;AAExD,MAAM,qBAAqB;AAAA,EACzB,cAAc,4CAAC,gCAAa;AAAA,EAC5B,YAAY,4CAAC,8BAAW;AAAA,EACxB,aAAa,4CAAC,+BAAY;AAAA,EAC1B,eAAe,4CAAC,iCAAc;AAChC;AAEA,MAAM,mBAAmB,CAA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AAc,aAAa;AAAA,UAC1C;AAAA;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAGvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,21 +28,21 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
var import_options = require("./options");
|
|
33
33
|
const inputProtectedProps = {
|
|
34
|
-
leftAddon:
|
|
34
|
+
leftAddon: import_ds_props_helpers.PropTypes.oneOf([import_options.LEFT_ADDON_OPTIONS.LockLocked, import_options.LEFT_ADDON_OPTIONS.LockUnlocked]).description(
|
|
35
35
|
"left addon component to display"
|
|
36
36
|
),
|
|
37
|
-
rightAddon:
|
|
38
|
-
onChange:
|
|
39
|
-
value:
|
|
40
|
-
readOnly:
|
|
41
|
-
mask:
|
|
37
|
+
rightAddon: import_ds_props_helpers.PropTypes.oneOf([import_options.RIGHT_ADDON_OPTIONS.VisibleView, import_options.RIGHT_ADDON_OPTIONS.InvisibleHide]).description("right addon component to display").defaultValue(import_options.RIGHT_ADDON_OPTIONS.InvisibleHide),
|
|
38
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Function executed when input s value changes"),
|
|
39
|
+
value: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("input s value"),
|
|
40
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the input is read-only or not").defaultValue(false),
|
|
41
|
+
mask: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.array, import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.object, import_ds_props_helpers.PropTypes.string]).description(
|
|
42
42
|
"mask to apply"
|
|
43
43
|
),
|
|
44
|
-
type:
|
|
45
|
-
placeholderChar:
|
|
44
|
+
type: import_ds_props_helpers.PropTypes.oneOf(["password", "number", "text"]).description("type of input"),
|
|
45
|
+
placeholderChar: import_ds_props_helpers.PropTypes.string.description(
|
|
46
46
|
`The placeholder character represents the fillable spot in the mask.
|
|
47
47
|
* The default placeholder character is underscore, _.`
|
|
48
48
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/InputProtected/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 { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options';\n\nexport const inputProtectedProps = {\n leftAddon: PropTypes.oneOf([LEFT_ADDON_OPTIONS.LockLocked, LEFT_ADDON_OPTIONS.LockUnlocked]).description(\n 'left addon component to display',\n ),\n rightAddon: PropTypes.oneOf([RIGHT_ADDON_OPTIONS.VisibleView, RIGHT_ADDON_OPTIONS.InvisibleHide])\n .description('right addon component to display')\n .defaultValue(RIGHT_ADDON_OPTIONS.InvisibleHide),\n onChange: PropTypes.func.description('Function executed when input s value changes'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('input s value'),\n readOnly: PropTypes.bool.description('Whether the input is read-only or not').defaultValue(false),\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.object, PropTypes.string]).description(\n 'mask to apply',\n ),\n type: PropTypes.oneOf(['password', 'number', 'text']).description('type of input'),\n /**\n * PlaceholderChar: The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.\n */\n placeholderChar: PropTypes.string.description(\n `The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.`,\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,qBAAwD;AAEjD,MAAM,sBAAsB;AAAA,EACjC,WAAW,kCAAU,MAAM,CAAC,kCAAmB,YAAY,kCAAmB,YAAY,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EACA,YAAY,kCAAU,MAAM,CAAC,mCAAoB,aAAa,mCAAoB,aAAa,CAAC,EAC7F,YAAY,kCAAkC,EAC9C,aAAa,mCAAoB,aAAa;AAAA,EACjD,UAAU,kCAAU,KAAK,YAAY,8CAA8C;AAAA,EACnF,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,eAAe;AAAA,EAC5F,UAAU,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,KAAK;AAAA,EAChG,MAAM,kCAAU,UAAU,CAAC,kCAAU,OAAO,kCAAU,MAAM,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE;AAAA,IAC/F;AAAA,EACF;AAAA,EACA,MAAM,kCAAU,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,EAAE,YAAY,eAAe;AAAA,EAKjF,iBAAiB,kCAAU,OAAO;AAAA,IAChC;AAAA;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSLargeInputText_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
37
37
|
var import_props = require("./props");
|
|
38
38
|
var import_defaultProps = require("./defaultProps");
|
|
@@ -127,7 +127,7 @@ const DSLargeInputText = ({
|
|
|
127
127
|
DSLargeInputText.propTypes = import_props.props;
|
|
128
128
|
DSLargeInputText.defaultProps = import_defaultProps.defaultProps;
|
|
129
129
|
DSLargeInputText.displayName = "DSLargeInputText";
|
|
130
|
-
const DSLargeInputTextWithSchema = (0,
|
|
130
|
+
const DSLargeInputTextWithSchema = (0, import_ds_props_helpers.describe)(DSLargeInputText).description("A large input");
|
|
131
131
|
DSLargeInputTextWithSchema.propTypes = import_props.props;
|
|
132
132
|
var DSLargeInputText_default = DSLargeInputText;
|
|
133
133
|
//# sourceMappingURL=DSLargeInputText.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/LargeInputText/DSLargeInputText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/no-autofocus, react/prop-types */\nimport React, { useMemo } from 'react';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEnB;AA/DJ,mBAA+B;AAC/B,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/no-autofocus, react/prop-types */\nimport React, { useMemo } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst CounterArea = aggregatedClasses('div')('counter', 'textarea', ({ limitError }) => ({\n 'limit-error': limitError,\n}));\n\nconst DSLargeInputText = ({\n containerProps,\n autoFocus,\n className,\n disabled,\n name,\n id,\n maxLength,\n minLength,\n placeholder,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onKeyUp,\n onKeyDown,\n onPaste,\n value,\n hasError,\n required,\n readOnly,\n resize,\n innerRef,\n ariaLabel,\n ariaAutocomplete,\n role,\n characterLimitCounter,\n rows,\n errorLimit,\n tabIndex,\n}) => {\n const limitError = useMemo(\n () => characterLimitCounter < String(value).length && characterLimitCounter > 0,\n [characterLimitCounter, value],\n );\n const { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName(\n 'form-element-textarea',\n 'text',\n {\n hasError: limitError || hasError,\n readOnly,\n disabled,\n },\n );\n // auto size when user types\n const handleKeyUp = (e) => {\n // const { target } = e\n onKeyUp(e);\n // if (e.key !== 'Enter') return\n // target.style.cssText = 'height:auto; padding:0'\n // target.style.cssText = `height: ${target.scrollHeight}px`\n };\n return (\n <>\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={classNameBlock('wrapper')}>\n <textarea\n ref={innerRef}\n aria-autocomplete={ariaAutocomplete}\n aria-label={ariaLabel}\n aria-multiline\n aria-placeholder={placeholder}\n aria-required={required}\n autoFocus={autoFocus}\n className={classNameElement('textarea')}\n data-testid=\"ds-large-input_main-component\"\n disabled={disabled}\n id={id}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onKeyUp={handleKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n role={role}\n rows={String(rows)}\n style={{\n resize,\n }}\n value={value}\n tabIndex={tabIndex}\n />\n </div>\n </div>\n {characterLimitCounter > 0 && (\n <CounterArea classProps={{ limitError }} data-testid=\"counter-area\">\n {`${limitError ? `${errorLimit} ${characterLimitCounter} characters. ` : ''}${\n String(value).length\n } / ${characterLimitCounter}`}\n </CounterArea>\n )}\n </>\n );\n};\n\nDSLargeInputText.propTypes = props;\nDSLargeInputText.defaultProps = defaultProps;\nDSLargeInputText.displayName = 'DSLargeInputText';\nconst DSLargeInputTextWithSchema = describe(DSLargeInputText).description('A large input');\nDSLargeInputTextWithSchema.propTypes = props;\n\nexport { DSLargeInputTextWithSchema, DSLargeInputText };\n\nexport default DSLargeInputText;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEnB;AA/DJ,mBAA+B;AAC/B,8BAAyB;AACzB,2BAA6D;AAC7D,mBAAsB;AACtB,0BAA6B;AAE7B,MAAM,kBAAc,wCAAkB,KAAK,EAAE,WAAW,YAAY,CAAC,EAAE,WAAW,OAAO;AAAA,EACvF,eAAe;AACjB,EAAE;AAEF,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,iBAAa;AAAA,IACjB,MAAM,wBAAwB,OAAO,KAAK,EAAE,UAAU,wBAAwB;AAAA,IAC9E,CAAC,uBAAuB,KAAK;AAAA,EAC/B;AACA,QAAM,EAAE,cAAc,kBAAkB,eAAe,QAAI;AAAA,IACzD;AAAA,IACA;AAAA,IACA;AAAA,MACE,UAAU,cAAc;AAAA,MACxB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,cAAc,CAAC,MAAM;AAEzB,YAAQ,CAAC;AAAA,EAIX;AACA,SACE,4EACE;AAAA,gDAAC,SAAK,GAAG,gBAAgB,WAAW,GAAG,gBAAgB,aACrD,sDAAC,SAAI,WAAW,eAAe,SAAS,GACtC;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,qBAAmB;AAAA,QACnB,cAAY;AAAA,QACZ,kBAAc;AAAA,QACd,oBAAkB;AAAA,QAClB,iBAAe;AAAA,QACf;AAAA,QACA,WAAW,iBAAiB,UAAU;AAAA,QACtC,eAAY;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,OAAO,IAAI;AAAA,QACjB,OAAO;AAAA,UACL;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF,GACF;AAAA,IACC,wBAAwB,KACvB,4CAAC,eAAY,YAAY,EAAE,WAAW,GAAG,eAAY,gBAClD,aAAG,aAAa,GAAG,cAAc,yCAAyC,KACzE,OAAO,KAAK,EAAE,YACV,yBACR;AAAA,KAEJ;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB,EAAE,YAAY,eAAe;AACzF,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,36 +28,36 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
const props = {
|
|
33
|
-
containerProps:
|
|
34
|
-
autoFocus:
|
|
35
|
-
className:
|
|
36
|
-
disabled:
|
|
37
|
-
name:
|
|
38
|
-
id:
|
|
39
|
-
maxLength:
|
|
40
|
-
minLength:
|
|
41
|
-
placeholder:
|
|
42
|
-
onClick:
|
|
43
|
-
onChange:
|
|
44
|
-
onFocus:
|
|
45
|
-
onBlur:
|
|
46
|
-
onKeyUp:
|
|
33
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
34
|
+
autoFocus: import_ds_props_helpers.PropTypes.bool.description("Whether uses auto focus or not"),
|
|
35
|
+
className: import_ds_props_helpers.PropTypes.string.description("CSS class"),
|
|
36
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether is disabled or not"),
|
|
37
|
+
name: import_ds_props_helpers.PropTypes.string.description("HTML form name property"),
|
|
38
|
+
id: import_ds_props_helpers.PropTypes.number.description("HTML id"),
|
|
39
|
+
maxLength: import_ds_props_helpers.PropTypes.number.description("Max length for text to be entered"),
|
|
40
|
+
minLength: import_ds_props_helpers.PropTypes.number.description("Min length for text to be entered"),
|
|
41
|
+
placeholder: import_ds_props_helpers.PropTypes.string.description("Placeholder for the text"),
|
|
42
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input text is clicked"),
|
|
43
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input text changes"),
|
|
44
|
+
onFocus: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input text is focused"),
|
|
45
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input text loses focus"),
|
|
46
|
+
onKeyUp: import_ds_props_helpers.PropTypes.func.description(
|
|
47
47
|
"Allows a function that is triggered once in the input a keyboard key is released"
|
|
48
48
|
),
|
|
49
|
-
onKeyDown:
|
|
50
|
-
onPaste:
|
|
51
|
-
value:
|
|
52
|
-
hasError:
|
|
53
|
-
required:
|
|
54
|
-
readOnly:
|
|
55
|
-
resize:
|
|
56
|
-
innerRef:
|
|
57
|
-
ariaLabel:
|
|
58
|
-
ariaAutocomplete:
|
|
59
|
-
role:
|
|
60
|
-
characterLimitCounter:
|
|
61
|
-
tabIndex:
|
|
49
|
+
onKeyDown: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once a key is being pressed"),
|
|
50
|
+
onPaste: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the input text is pasted"),
|
|
51
|
+
value: import_ds_props_helpers.PropTypes.string.description("Default value once the component is initialized"),
|
|
52
|
+
hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the input text has error or not"),
|
|
53
|
+
required: import_ds_props_helpers.PropTypes.bool.description("Whether the input text is required or not"),
|
|
54
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the input text is read only or not"),
|
|
55
|
+
resize: import_ds_props_helpers.PropTypes.string.description("Whether the input text style is vertical or not"),
|
|
56
|
+
innerRef: import_ds_props_helpers.PropTypes.func.description("ref forwarded to component"),
|
|
57
|
+
ariaLabel: import_ds_props_helpers.PropTypes.string.description("a11y aria label"),
|
|
58
|
+
ariaAutocomplete: import_ds_props_helpers.PropTypes.string.description(""),
|
|
59
|
+
role: import_ds_props_helpers.PropTypes.string.description("Type of input. Ex: textbox"),
|
|
60
|
+
characterLimitCounter: import_ds_props_helpers.PropTypes.number.description("it will show a counter/limit if the value is greater than 0"),
|
|
61
|
+
tabIndex: import_ds_props_helpers.PropTypes.string.description("Tab index html property.")
|
|
62
62
|
};
|
|
63
63
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/LargeInputText/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';\n\nexport const props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Whether uses auto focus or not\n */\n autoFocus: PropTypes.bool.description('Whether uses auto focus or not'),\n /** CSS class */\n className: PropTypes.string.description('CSS class'),\n /**\n * Whether is disabled or not\n */\n disabled: PropTypes.bool.description('Whether is disabled or not'),\n /** HTML form name property */\n name: PropTypes.string.description('HTML form name property'),\n /** HTML id */\n id: PropTypes.number.description('HTML id'),\n /**\n * Max length for text to be entered\n */\n maxLength: PropTypes.number.description('Max length for text to be entered'),\n /**\n * Min length for text to be entered\n */\n minLength: PropTypes.number.description('Min length for text to be entered'),\n /**\n * Placeholder for the text\n */\n placeholder: PropTypes.string.description('Placeholder for the text'),\n /**\n * Allows a function that is triggered once the input text is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input text is clicked'),\n /**\n * Allows a function that is triggered once the input text changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input text changes'),\n /**\n * Allows a function that is triggered once the input text is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input text is focused'),\n /**\n * Allows a function that is triggered once the input text loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input text loses focus'),\n /**\n * Allows a function that is triggered once in the input a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input a keyboard key is released',\n ),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input text is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input text is pasted'),\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 input text has error or not\n */\n hasError: PropTypes.bool.description('Whether the input text has error or not'),\n /**\n * Whether the input text is required or not\n */\n required: PropTypes.bool.description('Whether the input text is required or not'),\n /**\n * Whether the input text is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input text is read only or not'),\n /**\n * Whether the input text style is vertical or not\n */\n resize: PropTypes.string.description('Whether the input text style is vertical or not'),\n /** ref forwarded to component */\n innerRef: PropTypes.func.description('ref forwarded to component'),\n /** a11y aria label */\n ariaLabel: PropTypes.string.description('a11y aria label'),\n ariaAutocomplete: PropTypes.string.description(''),\n /**\n * Type of input. Ex: textbox\n */\n role: PropTypes.string.description('Type of input. Ex: textbox'),\n /**\n * it will show a counter/limit if the value is greater than 0\n */\n characterLimitCounter: PropTypes.number.description('it will show a counter/limit if the value is greater than 0'),\n /**\n * Tab index html property.\n */\n tabIndex: PropTypes.string.description('Tab index html property.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,kCAAU,OAAO,YAAY,gDAAgD;AAAA,EAI7F,WAAW,kCAAU,KAAK,YAAY,gCAAgC;AAAA,EAEtE,WAAW,kCAAU,OAAO,YAAY,WAAW;AAAA,EAInD,UAAU,kCAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,MAAM,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAE5D,IAAI,kCAAU,OAAO,YAAY,SAAS;AAAA,EAI1C,WAAW,kCAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,WAAW,kCAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,aAAa,kCAAU,OAAO,YAAY,0BAA0B;AAAA,EAIpE,SAAS,kCAAU,KAAK,YAAY,oEAAoE;AAAA,EAIxG,UAAU,kCAAU,KAAK,YAAY,iEAAiE;AAAA,EAItG,SAAS,kCAAU,KAAK,YAAY,oEAAoE;AAAA,EAIxG,QAAQ,kCAAU,KAAK,YAAY,qEAAqE;AAAA,EAIxG,SAAS,kCAAU,KAAK;AAAA,IACtB;AAAA,EACF;AAAA,EAIA,WAAW,kCAAU,KAAK,YAAY,iEAAiE;AAAA,EAIvG,SAAS,kCAAU,KAAK,YAAY,mEAAmE;AAAA,EAIvG,OAAO,kCAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,UAAU,kCAAU,KAAK,YAAY,yCAAyC;AAAA,EAI9E,UAAU,kCAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,UAAU,kCAAU,KAAK,YAAY,4CAA4C;AAAA,EAIjF,QAAQ,kCAAU,OAAO,YAAY,iDAAiD;AAAA,EAEtF,UAAU,kCAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,WAAW,kCAAU,OAAO,YAAY,iBAAiB;AAAA,EACzD,kBAAkB,kCAAU,OAAO,YAAY,EAAE;AAAA,EAIjD,MAAM,kCAAU,OAAO,YAAY,4BAA4B;AAAA,EAI/D,uBAAuB,kCAAU,OAAO,YAAY,6DAA6D;AAAA,EAIjH,UAAU,kCAAU,OAAO,YAAY,0BAA0B;AACnE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSRadio_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
37
37
|
var import_Circle = require("./Circle");
|
|
38
38
|
const DSRadio = ({
|
|
@@ -123,26 +123,26 @@ DSRadio.defaultProps = {
|
|
|
123
123
|
tabIndex: 0
|
|
124
124
|
};
|
|
125
125
|
const radioProps = {
|
|
126
|
-
containerProps:
|
|
127
|
-
className:
|
|
128
|
-
name:
|
|
129
|
-
labelText:
|
|
130
|
-
htmlFor:
|
|
131
|
-
hasError:
|
|
132
|
-
readOnly:
|
|
133
|
-
disabled:
|
|
134
|
-
checked:
|
|
135
|
-
value:
|
|
126
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
127
|
+
className: import_ds_props_helpers.PropTypes.string.description("css class prop"),
|
|
128
|
+
name: import_ds_props_helpers.PropTypes.string.description("name property to manage form"),
|
|
129
|
+
labelText: import_ds_props_helpers.PropTypes.string.description("Displayable label for the radio"),
|
|
130
|
+
htmlFor: import_ds_props_helpers.PropTypes.element.description("HTMLFOR property to manage form"),
|
|
131
|
+
hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the radio has error or not"),
|
|
132
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the radio is read only or not"),
|
|
133
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the radio is disabled or not"),
|
|
134
|
+
checked: import_ds_props_helpers.PropTypes.bool.description("Whether the radio is checked or not"),
|
|
135
|
+
value: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.object]).description(
|
|
136
136
|
"Value that takes the checkbox if it is checked"
|
|
137
137
|
).isRequired,
|
|
138
|
-
onChange:
|
|
139
|
-
children:
|
|
140
|
-
tabIndex:
|
|
141
|
-
style:
|
|
138
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the radio changes"),
|
|
139
|
+
children: import_ds_props_helpers.PropTypes.node.description("Optional, if you want a checkbox customized"),
|
|
140
|
+
tabIndex: import_ds_props_helpers.PropTypes.number.description("HTML tabindex to manage focus"),
|
|
141
|
+
style: import_ds_props_helpers.PropTypes.object.description("style override object")
|
|
142
142
|
};
|
|
143
143
|
DSRadio.propTypes = radioProps;
|
|
144
144
|
DSRadio.displayName = "DSRadio";
|
|
145
|
-
const DSRadioWithSchema = (0,
|
|
145
|
+
const DSRadioWithSchema = (0, import_ds_props_helpers.describe)(DSRadio);
|
|
146
146
|
DSRadioWithSchema.propTypes = radioProps;
|
|
147
147
|
var DSRadio_default = DSRadio;
|
|
148
148
|
//# sourceMappingURL=DSRadio.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Radio/DSRadio.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuDjB;AArDN,mBAA8B;AAC9B,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { Circle } from './Circle';\n\ninterface DSRadioT {\n [x: string]: unknown;\n innerRef?: React.MutableRefObject<HTMLInputElement>;\n containerProps?: { [x: string]: unknown };\n className?: string;\n style?: React.CSSProperties;\n labelText?: string;\n htmlFor?: string;\n hasError?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n checked?: boolean;\n value?: string;\n name?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLSpanElement>;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n}\n\nconst DSRadio = ({\n containerProps,\n className,\n style,\n labelText,\n htmlFor,\n hasError,\n readOnly,\n disabled,\n checked,\n value,\n name,\n onChange,\n children,\n tabIndex,\n innerRef,\n ...otherProps\n}: DSRadioT) => {\n // this will be solved when we move to styled components...\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { cssClassName, classNameElement } = convertPropToCssClassName('form-element-radio', className, {\n hasError,\n readOnly,\n disabled,\n });\n const checkRef = useRef<HTMLInputElement | null>(null);\n return (\n <div {...containerProps} className={cssClassName}>\n <label className={classNameElement('label')} htmlFor={htmlFor}>\n <input\n {...otherProps}\n ref={checkRef}\n aria-disabled={disabled}\n checked={disabled ? false : checked}\n className={classNameElement('input')}\n disabled={disabled}\n name={name}\n onChange={(e) => {\n if (!readOnly && !disabled) {\n onChange(e);\n }\n }}\n readOnly={readOnly}\n tabIndex={-1}\n type=\"radio\"\n value={value}\n />\n <span\n ref={innerRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={classNameElement('input-button')}\n onKeyDown={(e) => {\n // really really bad pattern...\n // overwriting the target to point to the hidden input because the focus is on the span and not on the input...\n // we will solve this with a v2 of this when we move to controlled + styled components...\n e.target = checkRef.current;\n if (disabled) return;\n if (e.key === 'Enter' || e.keyCode === 32) {\n onChange(e);\n } else if (otherProps.onKeyDown) {\n otherProps.onKeyDown(e);\n }\n }}\n role=\"radio\"\n style={style}\n tabIndex={disabled ? -1 : tabIndex}\n // value={value} // should be unused?\n >\n <Circle checked={checked} />\n </span>\n <span className={classNameElement('label-text')}>{labelText}</span>\n </label>\n {children && <div className={classNameElement('radio-children')}>{children}</div>}\n </div>\n );\n};\n\nDSRadio.defaultProps = {\n containerProps: {},\n className: '',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: false,\n name: '',\n onChange: () => null,\n children: null,\n tabIndex: 0,\n};\n\nconst radioProps = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /** css class prop */\n className: PropTypes.string.description('css class prop'),\n /** name property to manage form */\n name: PropTypes.string.description('name property to manage form'),\n /**\n * Displayable label for the radio\n */\n labelText: PropTypes.string.description('Displayable label for the radio'),\n /** HTMLFOR property to manage form */\n htmlFor: PropTypes.element.description('HTMLFOR property to manage form'),\n /**\n * Whether the radio has error or not\n */\n hasError: PropTypes.bool.description('Whether the radio has error or not'),\n /**\n * Whether the radio is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the radio is read only or not'),\n /**\n * Whether the radio is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the radio is disabled or not'),\n /**\n * Whether the radio is checked or not\n */\n checked: PropTypes.bool.description('Whether the radio is checked or not'),\n /**\n * Value that takes the checkbox if it is checked\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'Value that takes the checkbox if it is checked',\n ).isRequired,\n /**\n * Allows a function that is triggered once the radio changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio changes'),\n /**\n * Optional, if you want a checkbox customized\n */\n children: PropTypes.node.description('Optional, if you want a checkbox customized'),\n /** HTML tabindex to manage focus */\n tabIndex: PropTypes.number.description('HTML tabindex to manage focus'),\n /** style override object */\n style: PropTypes.object.description('style override object'),\n};\n\nDSRadio.propTypes = radioProps;\nDSRadio.displayName = 'DSRadio';\nconst DSRadioWithSchema = describe(DSRadio);\nDSRadioWithSchema.propTypes = radioProps;\n\nexport { DSRadio, DSRadioWithSchema };\n\nexport default DSRadio;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuDjB;AArDN,mBAA8B;AAC9B,8BAAoC;AACpC,2BAA0C;AAC1C,oBAAuB;AAsBvB,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MAAgB;AAGd,QAAM,EAAE,cAAc,iBAAiB,QAAI,gDAA0B,sBAAsB,WAAW;AAAA,IACpG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,eAAW,qBAAgC,IAAI;AACrD,SACE,6CAAC,SAAK,GAAG,gBAAgB,WAAW,cAClC;AAAA,iDAAC,WAAM,WAAW,iBAAiB,OAAO,GAAG,SAC3C;AAAA;AAAA,QAAC;AAA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OAAO,YAAY,gBAAgB;AAAA,EAExD,MAAM,kCAAU,OAAO,YAAY,8BAA8B;AAAA,EAIjE,WAAW,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EAEzE,SAAS,kCAAU,QAAQ,YAAY,iCAAiC;AAAA,EAIxE,UAAU,kCAAU,KAAK,YAAY,oCAAoC;AAAA,EAIzE,UAAU,kCAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,UAAU,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EAI3E,SAAS,kCAAU,KAAK,YAAY,qCAAqC;AAAA,EAIzE,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA,EAIF,UAAU,kCAAU,KAAK,YAAY,4DAA4D;AAAA,EAIjG,UAAU,kCAAU,KAAK,YAAY,6CAA6C;AAAA,EAElF,UAAU,kCAAU,OAAO,YAAY,+BAA+B;AAAA,EAEtE,OAAO,kCAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,wBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSRadioGroup_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = __toESM(require("react"));
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
37
37
|
var import_FormItem = require("../FormItem");
|
|
38
38
|
var import_Radio = require("../Radio");
|
|
@@ -111,7 +111,7 @@ const DSRadioGroup = ({
|
|
|
111
111
|
DSRadioGroup.propTypes = import_props.props;
|
|
112
112
|
DSRadioGroup.defaultProps = import_defaultProps.defaultProps;
|
|
113
113
|
DSRadioGroup.displayName = "DSRadioGroup";
|
|
114
|
-
const DSRadioGroupWithSchema = (0,
|
|
114
|
+
const DSRadioGroupWithSchema = (0, import_ds_props_helpers.describe)(DSRadioGroup);
|
|
115
115
|
DSRadioGroupWithSchema.propTypes = import_props.props;
|
|
116
116
|
var DSRadioGroup_default = DSRadioGroup;
|
|
117
117
|
//# sourceMappingURL=DSRadioGroup.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/RadioGroup/DSRadioGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcjB;AAdN,mBAAkB;AAClB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSRadio } from '../Radio';\nimport { props as rprops } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-radio-group`;\n\nconst RadioItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSRadio\n {...props}\n checked={context.activeValue === props.value}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSRadioGroup = ({\n containerProps,\n onChange,\n activeValue,\n children,\n orientation,\n disabled,\n truncateText,\n labelProps,\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} onChange={onChange}>\n <div\n data-testid=\"ds-radiogroup\"\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n className={`${baseClass} ${baseClass}--${orientation}`}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <RadioItem\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\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops;\n\nexport { DSRadioGroup, DSRadioGroupWithSchema };\n\nexport default DSRadioGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcjB;AAdN,mBAAkB;AAClB,8BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,mBAAwB;AACxB,mBAAgC;AAChC,0BAA6B;AAE7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,YAAY,CAAC,UACjB;AAAA,EAAC;AAAA;AAAA,IACC,QAAQ,CAAC,YACP;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,QAAQ,gBAAgB,MAAM;AAAA,QACvC,UAAU,QAAQ,YAAY,MAAM;AAA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cAA4B,GAC3G;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,aAAa,YAAY,aAAAC;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY,aAAAA;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React", "rprops"]
|
|
7
7
|
}
|
|
@@ -28,19 +28,19 @@ __export(props_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(props_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
32
32
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
33
33
|
const props = {
|
|
34
|
-
containerProps:
|
|
35
|
-
onChange:
|
|
36
|
-
activeValue:
|
|
37
|
-
children:
|
|
38
|
-
orientation:
|
|
39
|
-
disabled:
|
|
40
|
-
labelProps:
|
|
41
|
-
feedbackMessage:
|
|
42
|
-
labelText:
|
|
43
|
-
required:
|
|
34
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Inject props to component wrapper"),
|
|
35
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("Allows a function that is triggered once the radio group changes"),
|
|
36
|
+
activeValue: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("Selected default active value"),
|
|
37
|
+
children: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.element).isRequired.description("Radio group items to show of type DSRadio"),
|
|
38
|
+
orientation: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.orientation).description("['horizontal', 'vertical']"),
|
|
39
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description(""),
|
|
40
|
+
labelProps: import_ds_props_helpers.PropTypes.shape({
|
|
41
|
+
feedbackMessage: import_ds_props_helpers.PropTypes.string,
|
|
42
|
+
labelText: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]),
|
|
43
|
+
required: import_ds_props_helpers.PropTypes.bool
|
|
44
44
|
}).description("Whether the radio group is disabled or not")
|
|
45
45
|
};
|
|
46
46
|
//# sourceMappingURL=props.js.map
|