@elliemae/ds-form 3.1.0-next.2 → 3.1.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/ComboBoxFreeSolo/components/MultiValueLabel.js +3 -3
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js.map +2 -2
- package/dist/cjs/DateInput/DSDateInput.js +1 -2
- package/dist/cjs/DateInput/DSDateInput.js.map +2 -2
- package/dist/cjs/DateInput/props.js +19 -19
- 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 +13 -13
- package/dist/cjs/DateInputV2/components/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/styled.js +5 -5
- package/dist/cjs/DateInputV2/components/styled.js.map +2 -2
- package/dist/cjs/FormItem/DSFormItemLayout.js +1 -2
- 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/Suffix/Suffix.js +4 -4
- package/dist/cjs/FormItem/Suffix/Suffix.js.map +2 -2
- package/dist/cjs/FormItem/props.js +42 -42
- 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 +10 -10
- 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 +34 -34
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +37 -37
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js +46 -46
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +34 -34
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
- package/dist/cjs/InputMask/props.js +36 -36
- 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 +11 -11
- 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 +15 -15
- 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 +4 -4
- package/dist/esm/CheckboxGroup/props.js.map +2 -2
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueRemove.js +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValueRemove.js +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/esm/DateInput/DSDateInput.js +1 -2
- 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/DateInputV2/components/styled.js +1 -1
- package/dist/esm/DateInputV2/components/styled.js.map +1 -1
- package/dist/esm/FormItem/DSFormItemLayout.js +1 -2
- 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/Suffix/Suffix.js +1 -1
- package/dist/esm/FormItem/Suffix/Suffix.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 +1 -1
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +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/package.json +22 -21
|
@@ -24,45 +24,45 @@ __export(props_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(props_exports);
|
|
26
26
|
var React = __toESM(require("react"));
|
|
27
|
-
var
|
|
27
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
28
|
const inputProps = {
|
|
29
|
-
autoFocus:
|
|
30
|
-
style:
|
|
31
|
-
disabled:
|
|
32
|
-
disableTooltip:
|
|
33
|
-
className:
|
|
34
|
-
name:
|
|
35
|
-
maxLength:
|
|
36
|
-
minLength:
|
|
37
|
-
fluidWidth:
|
|
38
|
-
isShowElipsisActive:
|
|
39
|
-
placeholder:
|
|
40
|
-
onKeyDown:
|
|
41
|
-
onClick:
|
|
42
|
-
onChange:
|
|
43
|
-
onFocus:
|
|
44
|
-
onBlur:
|
|
45
|
-
onPaste:
|
|
46
|
-
onKeyUp:
|
|
47
|
-
value:
|
|
48
|
-
hasError:
|
|
49
|
-
readOnly:
|
|
50
|
-
innerRef:
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
autoFocus: import_ds_utilities.PropTypes.bool.description("Should component focus automatically"),
|
|
30
|
+
style: import_ds_utilities.PropTypes.object.description("Set style for the input mask"),
|
|
31
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether the input mask is disabled or not"),
|
|
32
|
+
disableTooltip: import_ds_utilities.PropTypes.bool.description("Whether to show a tooltip or not when text does not fit").defaultValue(true),
|
|
33
|
+
className: import_ds_utilities.PropTypes.string.description("css class"),
|
|
34
|
+
name: import_ds_utilities.PropTypes.string.description("html name prop for form"),
|
|
35
|
+
maxLength: import_ds_utilities.PropTypes.number.description("Max length for the input mask"),
|
|
36
|
+
minLength: import_ds_utilities.PropTypes.number.description("Min length for the input mask"),
|
|
37
|
+
fluidWidth: import_ds_utilities.PropTypes.bool.description("Whether to make the content of the input mask fit the container or not"),
|
|
38
|
+
isShowElipsisActive: import_ds_utilities.PropTypes.bool.description("Wheter to enable the ellipsis and tooltip functionality or not").defaultValue(true),
|
|
39
|
+
placeholder: import_ds_utilities.PropTypes.node.description("Component that works as placeholder"),
|
|
40
|
+
onKeyDown: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once a key is being pressed"),
|
|
41
|
+
onClick: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input mask is clicked"),
|
|
42
|
+
onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input mask changes"),
|
|
43
|
+
onFocus: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input mask is focused"),
|
|
44
|
+
onBlur: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input mask loses focus"),
|
|
45
|
+
onPaste: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input mask is pasted"),
|
|
46
|
+
onKeyUp: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once in the input mask a keyboard key is released"),
|
|
47
|
+
value: import_ds_utilities.PropTypes.string.description("Default value once the component is initialized"),
|
|
48
|
+
hasError: import_ds_utilities.PropTypes.bool.description("Whether the input mask has error or not"),
|
|
49
|
+
readOnly: import_ds_utilities.PropTypes.bool.description("Whether the input mask is read only or not"),
|
|
50
|
+
innerRef: import_ds_utilities.PropTypes.oneOfType([
|
|
51
|
+
import_ds_utilities.PropTypes.func,
|
|
52
|
+
import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })
|
|
53
53
|
]).description("Whether the input mask is read only or not"),
|
|
54
|
-
type:
|
|
55
|
-
clearable:
|
|
56
|
-
leftComponent:
|
|
57
|
-
rightComponent:
|
|
58
|
-
mask:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
type: import_ds_utilities.PropTypes.string.description("Type of input. Ex: 'text'"),
|
|
55
|
+
clearable: import_ds_utilities.PropTypes.bool.description("Whether the input mask is clearable or not"),
|
|
56
|
+
leftComponent: import_ds_utilities.PropTypes.node.description("Component to be added at the right side of the input"),
|
|
57
|
+
rightComponent: import_ds_utilities.PropTypes.node.description("Component to be added at the right side of the input"),
|
|
58
|
+
mask: import_ds_utilities.PropTypes.oneOfType([
|
|
59
|
+
import_ds_utilities.PropTypes.array,
|
|
60
|
+
import_ds_utilities.PropTypes.string,
|
|
61
|
+
import_ds_utilities.PropTypes.func
|
|
62
62
|
]).description("Mask that has to match with the input information entered. ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT', 'ZIP_CODE_SEARCH']"),
|
|
63
|
-
pipe:
|
|
64
|
-
useSubfix:
|
|
65
|
-
placeholderChar:
|
|
63
|
+
pipe: import_ds_utilities.PropTypes.func.description("Expects pipe functions. i.e. autoCorrectedDatePipe"),
|
|
64
|
+
useSubfix: import_ds_utilities.PropTypes.string.description("Put a sufix after the input mask"),
|
|
65
|
+
placeholderChar: import_ds_utilities.PropTypes.string.description(`The placeholder character represents the fillable spot in the mask.
|
|
66
66
|
The default placeholder character is underscore, _.`).defaultValue("_")
|
|
67
67
|
};
|
|
68
68
|
//# sourceMappingURL=props.js.map
|
|
@@ -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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\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(\n 'Whether the input mask is disabled or not',\n ),\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(\n 'Whether to make the content of the input mask fit the container or not',\n ),\n /** isShowElipsisActive */\n isShowElipsisActive: PropTypes.bool\n .description(\n 'Wheter to enable the ellipsis and tooltip functionality or not',\n )\n .defaultValue(true),\n /**\n * Component that works as placeholder\n */\n placeholder: PropTypes.node.description(\n 'Component that works as placeholder',\n ),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description(\n 'Allows a function that is triggered once a key is being pressed',\n ),\n /**\n * Allows a function that is triggered once the input mask is clicked\n */\n onClick: PropTypes.func.description(\n 'Allows a function that is triggered once the input mask is clicked',\n ),\n /**\n * Allows a function that is triggered once the input mask changes\n */\n onChange: PropTypes.func.description(\n 'Allows a function that is triggered once the input mask changes',\n ),\n /**\n * Allows a function that is triggered once the input mask is focused\n */\n onFocus: PropTypes.func.description(\n 'Allows a function that is triggered once the input mask is focused',\n ),\n /**\n * Allows a function that is triggered once the input mask loses focus\n */\n onBlur: PropTypes.func.description(\n 'Allows a function that is triggered once the input mask loses focus',\n ),\n /**\n * Allows a function that is triggered once the input mask is pasted\n */\n onPaste: PropTypes.func.description(\n 'Allows a function that is triggered once the input mask is pasted',\n ),\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(\n 'Default value once the component is initialized',\n ),\n /**\n * Whether the input mask has error or not\n */\n hasError: PropTypes.bool.description(\n 'Whether the input mask has error or not',\n ),\n /**\n * Whether the input mask is read only or not\n */\n readOnly: PropTypes.bool.description(\n 'Whether the input mask is read only or not',\n ),\n innerRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any }),\n ]).description('Whether the input mask is read only or not'),\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(\n 'Whether the input mask is clearable or not',\n ),\n /**\n * Component to be added at the right side of the input\n */\n leftComponent: PropTypes.node.description(\n 'Component to be added at the right side of the input',\n ),\n /**\n * Component to be added at the right side of the input\n */\n rightComponent: PropTypes.node.description(\n 'Component to be added at the right side of the input',\n ),\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([\n PropTypes.array,\n PropTypes.string,\n PropTypes.func,\n ]).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(\n 'Expects pipe functions. i.e. autoCorrectedDatePipe',\n ),\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,0BAA0B;AAEnB,MAAM,aAAa;AAAA,EAExB,WAAW,8BAAU,KAAK,YAAY,sCAAsC;AAAA,EAI5E,OAAO,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,UAAU,8BAAU,KAAK,YACvB,2CACF;AAAA,EAEA,gBAAgB,8BAAU,KACvB,YAAY,yDAAyD,EACrE,aAAa,IAAI;AAAA,EAEpB,WAAW,8BAAU,OAAO,YAAY,WAAW;AAAA,EAEnD,MAAM,8BAAU,OAAO,YAAY,yBAAyB;AAAA,EAI5D,WAAW,8BAAU,OAAO,YAAY,+BAA+B;AAAA,EAIvE,WAAW,8BAAU,OAAO,YAAY,+BAA+B;AAAA,EAIvE,YAAY,8BAAU,KAAK,YACzB,wEACF;AAAA,EAEA,qBAAqB,8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ports = __toCommonJS(DSInputProtected_exports);
|
|
57
57
|
var React = __toESM(require("react"));
|
|
58
58
|
var import_react = __toESM(require("react"));
|
|
59
|
-
var
|
|
59
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
60
60
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
61
61
|
var import_ds_button = require("@elliemae/ds-button");
|
|
62
62
|
var import_InputGroup = require("../InputGroup");
|
|
@@ -132,7 +132,7 @@ const DSInputProtected = (_a) => {
|
|
|
132
132
|
DSInputProtected.propTypes = import_props.inputProtectedProps;
|
|
133
133
|
DSInputProtected.defaultProps = import_defaultProps.defaultProps;
|
|
134
134
|
DSInputProtected.displayName = "DSInputProtected";
|
|
135
|
-
const DSInputProtectedWithSchema = (0,
|
|
135
|
+
const DSInputProtectedWithSchema = (0, import_ds_utilities.describe)(DSInputProtected);
|
|
136
136
|
DSInputProtectedWithSchema.propTypes = import_props.inputProtectedProps;
|
|
137
137
|
var DSInputProtected_default = DSInputProtected;
|
|
138
138
|
//# 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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,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-utilities';\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;ADGvB,mBAAwD;AACxD,0BAAyB;AACzB,sBAAqE;AACrE,uBAAyB;AACzB,wBAA6B;AAC7B,uBAA4B;AAC5B,mBAAoC;AACpC,0BAA6B;AAC7B,qBAAwD;AAExD,MAAM,qBAAqB;AAAA,EACzB,cAAc,mDAAC,kCAAa;AAAA,EAC5B,YAAY,mDAAC,gCAAW;AAAA,EACxB,aAAa,mDAAC,iCAAY;AAAA,EAC1B,eAAe,mDAAC,mCAAc;AAChC;AAEA,MAAM,mBAAmB,CAAC,OAUpB;AAVoB,eACxB;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,MARM,IASrB,iBATqB,IASrB;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,OAAO,aAAa,mBAAmB;AAC7C,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@ -24,26 +24,26 @@ __export(props_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(props_exports);
|
|
26
26
|
var React = __toESM(require("react"));
|
|
27
|
-
var
|
|
27
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
28
|
var import_options = require("./options");
|
|
29
29
|
const inputProtectedProps = {
|
|
30
|
-
leftAddon:
|
|
30
|
+
leftAddon: import_ds_utilities.PropTypes.oneOf([
|
|
31
31
|
import_options.LEFT_ADDON_OPTIONS.LockLocked,
|
|
32
32
|
import_options.LEFT_ADDON_OPTIONS.LockUnlocked
|
|
33
33
|
]).description("left addon component to display"),
|
|
34
|
-
rightAddon:
|
|
34
|
+
rightAddon: import_ds_utilities.PropTypes.oneOf([
|
|
35
35
|
import_options.RIGHT_ADDON_OPTIONS.VisibleView,
|
|
36
36
|
import_options.RIGHT_ADDON_OPTIONS.InvisibleHide
|
|
37
37
|
]).description("right addon component to display").defaultValue(import_options.RIGHT_ADDON_OPTIONS.InvisibleHide),
|
|
38
|
-
onChange:
|
|
39
|
-
value:
|
|
40
|
-
readOnly:
|
|
41
|
-
mask:
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
onChange: import_ds_utilities.PropTypes.func.description("Function executed when input s value changes"),
|
|
39
|
+
value: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number]).description("input s value"),
|
|
40
|
+
readOnly: import_ds_utilities.PropTypes.bool.description("Whether the input is read-only or not").defaultValue(false),
|
|
41
|
+
mask: import_ds_utilities.PropTypes.oneOfType([
|
|
42
|
+
import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.string),
|
|
43
|
+
import_ds_utilities.PropTypes.func
|
|
44
44
|
]).description("mask to apply"),
|
|
45
|
-
type:
|
|
46
|
-
placeholderChar:
|
|
45
|
+
type: import_ds_utilities.PropTypes.oneOf(["password", "number", "text"]).description("type of input"),
|
|
46
|
+
placeholderChar: import_ds_utilities.PropTypes.string.description(`The placeholder character represents the fillable spot in the mask.
|
|
47
47
|
* The default placeholder character is underscore, _.`)
|
|
48
48
|
};
|
|
49
49
|
//# sourceMappingURL=props.js.map
|
|
@@ -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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\nimport { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options';\n\nexport const inputProtectedProps = {\n leftAddon: PropTypes.oneOf([\n LEFT_ADDON_OPTIONS.LockLocked,\n LEFT_ADDON_OPTIONS.LockUnlocked,\n ]).description('left addon component to display'),\n rightAddon: PropTypes.oneOf([\n RIGHT_ADDON_OPTIONS.VisibleView,\n RIGHT_ADDON_OPTIONS.InvisibleHide,\n ])\n .description('right addon component to display')\n .defaultValue(RIGHT_ADDON_OPTIONS.InvisibleHide),\n onChange: PropTypes.func.description(\n 'Function executed when input s value changes',\n ),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'input s value',\n ),\n readOnly: PropTypes.bool\n .description('Whether the input is read-only or not')\n .defaultValue(false),\n mask: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.func,\n ]).description('mask to apply'),\n type: PropTypes.oneOf(['password', 'number', 'text']).description(\n 'type of input',\n ),\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,0BAA0B;AAC1B,qBAAwD;AAEjD,MAAM,sBAAsB;AAAA,EACjC,WAAW,8BAAU,MAAM;AAAA,IACzB,kCAAmB;AAAA,IACnB,kCAAmB;AAAA,EACrB,CAAC,EAAE,YAAY,iCAAiC;AAAA,EAChD,YAAY,8BAAU,MAAM;AAAA,IAC1B,mCAAoB;AAAA,IACpB,mCAAoB;AAAA,EACtB,CAAC,EACE,YAAY,kCAAkC,EAC9C,aAAa,mCAAoB,aAAa;AAAA,EACjD,UAAU,8BAAU,KAAK,YACvB,8CACF;AAAA,EACA,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAC/D,eACF;AAAA,EACA,UAAU,8BAAU,KACjB,YAAY,uCAAuC,EACnD,aAAa,KAAK;AAAA,EACrB,MAAM,8BAAU,UAAU;AAAA,IACxB,8BAAU,QAAQ,8BAAU,MAAM;AAAA,IAClC,8BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,eAAe;AAAA,EAC9B,MAAM,8BAAU,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,EAAE,YACpD,eACF;AAAA,EAKA,iBAAiB,8BAAU,OAAO,YAChC;AAAA,wDAEF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -44,7 +44,7 @@ __export(DSLargeInputText_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(DSLargeInputText_exports);
|
|
45
45
|
var React = __toESM(require("react"));
|
|
46
46
|
var import_react = __toESM(require("react"));
|
|
47
|
-
var
|
|
47
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
48
48
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
49
49
|
var import_props = require("./props");
|
|
50
50
|
var import_defaultProps = require("./defaultProps");
|
|
@@ -137,7 +137,7 @@ const DSLargeInputText = ({
|
|
|
137
137
|
DSLargeInputText.propTypes = import_props.props;
|
|
138
138
|
DSLargeInputText.defaultProps = import_defaultProps.defaultProps;
|
|
139
139
|
DSLargeInputText.displayName = "DSLargeInputText";
|
|
140
|
-
const DSLargeInputTextWithSchema = (0,
|
|
140
|
+
const DSLargeInputTextWithSchema = (0, import_ds_utilities.describe)(DSLargeInputText).description("A large input");
|
|
141
141
|
DSLargeInputTextWithSchema.propTypes = import_props.props;
|
|
142
142
|
var DSLargeInputText_default = DSLargeInputText;
|
|
143
143
|
//# 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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,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-utilities';\nimport {\n convertPropToCssClassName,\n aggregatedClasses,\n} from '@elliemae/ds-classnames';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst CounterArea = aggregatedClasses('div')(\n 'counter',\n 'textarea',\n ({ limitError }) => ({\n 'limit-error': limitError,\n }),\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 () =>\n characterLimitCounter < String(value).length && characterLimitCounter > 0,\n [characterLimitCounter, value],\n );\n const {\n cssClassName,\n classNameElement,\n classNameBlock,\n } = convertPropToCssClassName('form-element-textarea', 'text', {\n hasError: limitError || hasError,\n readOnly,\n disabled,\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 {`${\n limitError\n ? `${errorLimit} ${characterLimitCounter} characters. `\n : ''\n }${String(value).length} / ${characterLimitCounter}`}\n </CounterArea>\n )}\n </>\n );\n};\n\nDSLargeInputText.propTypes = props;\nDSLargeInputText.defaultProps = defaultProps;\nDSLargeInputText.displayName = 'DSLargeInputText';\nconst DSLargeInputTextWithSchema = describe(DSLargeInputText).description(\n 'A large input',\n);\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;ADEvB,mBAA+B;AAC/B,0BAAyB;AACzB,2BAGO;AACP,mBAAsB;AACtB,0BAA6B;AAE7B,MAAM,cAAc,4CAAkB,KAAK,EACzC,WACA,YACA,CAAC,EAAE,iBAAkB;AAAA,EACnB,eAAe;AACjB,EACF;AAEA,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;AAAA,MACI;AACJ,QAAM,aAAa,0BACjB,MACE,wBAAwB,OAAO,KAAK,EAAE,UAAU,wBAAwB,GAC1E,CAAC,uBAAuB,KAAK,CAC/B;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,MACE,oDAA0B,yBAAyB,QAAQ;AAAA,IAC7D,UAAU,cAAc;AAAA,IACxB;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,cAAc,CAAC,MAAM;AAEzB,YAAQ,CAAC;AAAA,EAIX;AACA,SACE,wFACE,mDAAC,wCAAQ,iBAAR;AAAA,IAAwB,WAAW,GAAG,gBAAgB;AAAA,MACrD,mDAAC;AAAA,IAAI,WAAW,eAAe,SAAS;AAAA,KACtC,mDAAC;AAAA,IACC,KAAK;AAAA,IACL,qBAAmB;AAAA,IACnB,cAAY;AAAA,IACZ,kBAAc;AAAA,IACd,oBAAkB;AAAA,IAClB,iBAAe;AAAA,IACf;AAAA,IACA,WAAW,iBAAiB,UAAU;AAAA,IACtC,eAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM,OAAO,IAAI;AAAA,IACjB,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,GACF,CACF,CACF,GACC,wBAAwB,KACvB,mDAAC;AAAA,IAAY,YAAY,EAAE,WAAW;AAAA,IAAG,eAAY;AAAA,KAClD,GACC,aACI,GAAG,cAAc,yCACjB,KACH,OAAO,KAAK,EAAE,YAAY,uBAC/B,CAEJ;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,kCAAS,gBAAgB,EAAE,YAC5D,eACF;AACA,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -24,34 +24,34 @@ __export(props_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(props_exports);
|
|
26
26
|
var React = __toESM(require("react"));
|
|
27
|
-
var
|
|
27
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
28
|
const props = {
|
|
29
|
-
containerProps:
|
|
30
|
-
autoFocus:
|
|
31
|
-
className:
|
|
32
|
-
disabled:
|
|
33
|
-
name:
|
|
34
|
-
id:
|
|
35
|
-
maxLength:
|
|
36
|
-
minLength:
|
|
37
|
-
placeholder:
|
|
38
|
-
onClick:
|
|
39
|
-
onChange:
|
|
40
|
-
onFocus:
|
|
41
|
-
onBlur:
|
|
42
|
-
onKeyUp:
|
|
43
|
-
onKeyDown:
|
|
44
|
-
onPaste:
|
|
45
|
-
value:
|
|
46
|
-
hasError:
|
|
47
|
-
required:
|
|
48
|
-
readOnly:
|
|
49
|
-
resize:
|
|
50
|
-
innerRef:
|
|
51
|
-
ariaLabel:
|
|
52
|
-
ariaAutocomplete:
|
|
53
|
-
role:
|
|
54
|
-
characterLimitCounter:
|
|
55
|
-
tabIndex:
|
|
29
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
30
|
+
autoFocus: import_ds_utilities.PropTypes.bool.description("Whether uses auto focus or not"),
|
|
31
|
+
className: import_ds_utilities.PropTypes.string.description("CSS class"),
|
|
32
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether is disabled or not"),
|
|
33
|
+
name: import_ds_utilities.PropTypes.string.description("HTML form name property"),
|
|
34
|
+
id: import_ds_utilities.PropTypes.number.description("HTML id"),
|
|
35
|
+
maxLength: import_ds_utilities.PropTypes.number.description("Max length for text to be entered"),
|
|
36
|
+
minLength: import_ds_utilities.PropTypes.number.description("Min length for text to be entered"),
|
|
37
|
+
placeholder: import_ds_utilities.PropTypes.string.description("Placeholder for the text"),
|
|
38
|
+
onClick: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input text is clicked"),
|
|
39
|
+
onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input text changes"),
|
|
40
|
+
onFocus: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input text is focused"),
|
|
41
|
+
onBlur: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input text loses focus"),
|
|
42
|
+
onKeyUp: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once in the input a keyboard key is released"),
|
|
43
|
+
onKeyDown: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once a key is being pressed"),
|
|
44
|
+
onPaste: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the input text is pasted"),
|
|
45
|
+
value: import_ds_utilities.PropTypes.string.description("Default value once the component is initialized"),
|
|
46
|
+
hasError: import_ds_utilities.PropTypes.bool.description("Whether the input text has error or not"),
|
|
47
|
+
required: import_ds_utilities.PropTypes.bool.description("Whether the input text is required or not"),
|
|
48
|
+
readOnly: import_ds_utilities.PropTypes.bool.description("Whether the input text is read only or not"),
|
|
49
|
+
resize: import_ds_utilities.PropTypes.string.description("Whether the input text style is vertical or not"),
|
|
50
|
+
innerRef: import_ds_utilities.PropTypes.func.description("ref forwarded to component"),
|
|
51
|
+
ariaLabel: import_ds_utilities.PropTypes.string.description("a11y aria label"),
|
|
52
|
+
ariaAutocomplete: import_ds_utilities.PropTypes.string.description(""),
|
|
53
|
+
role: import_ds_utilities.PropTypes.string.description("Type of input. Ex: textbox"),
|
|
54
|
+
characterLimitCounter: import_ds_utilities.PropTypes.number.description("it will show a counter/limit if the value is greater than 0"),
|
|
55
|
+
tabIndex: import_ds_utilities.PropTypes.string.description("Tab index html property.")
|
|
56
56
|
};
|
|
57
57
|
//# 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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description(\n 'Injected props to wrapper element of component',\n ),\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(\n 'Allows a function that is triggered once the input text is clicked',\n ),\n /**\n * Allows a function that is triggered once the input text changes\n */\n onChange: PropTypes.func.description(\n 'Allows a function that is triggered once the input text changes',\n ),\n /**\n * Allows a function that is triggered once the input text is focused\n */\n onFocus: PropTypes.func.description(\n 'Allows a function that is triggered once the input text is focused',\n ),\n /**\n * Allows a function that is triggered once the input text loses focus\n */\n onBlur: PropTypes.func.description(\n 'Allows a function that is triggered once the input text loses focus',\n ),\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(\n 'Allows a function that is triggered once a key is being pressed',\n ),\n /**\n * Allows a function that is triggered once the input text is pasted\n */\n onPaste: PropTypes.func.description(\n 'Allows a function that is triggered once the input text is pasted',\n ),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description(\n 'Default value once the component is initialized',\n ),\n /**\n * Whether the input text has error or not\n */\n hasError: PropTypes.bool.description(\n 'Whether the input text has error or not',\n ),\n /**\n * Whether the input text is required or not\n */\n required: PropTypes.bool.description(\n 'Whether the input text is required or not',\n ),\n /**\n * Whether the input text is read only or not\n */\n readOnly: PropTypes.bool.description(\n 'Whether the input text is read only or not',\n ),\n /**\n * Whether the input text style is vertical or not\n */\n resize: PropTypes.string.description(\n 'Whether the input text style is vertical or not',\n ),\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(\n 'it will show a counter/limit if the value is greater than 0',\n ),\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,0BAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,8BAAU,OAAO,YAC/B,gDACF;AAAA,EAIA,WAAW,8BAAU,KAAK,YAAY,gCAAgC;AAAA,EAEtE,WAAW,8BAAU,OAAO,YAAY,WAAW;AAAA,EAInD,UAAU,8BAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,MAAM,8BAAU,OAAO,YAAY,yBAAyB;AAAA,EAE5D,IAAI,8BAAU,OAAO,YAAY,SAAS;AAAA,EAI1C,WAAW,8BAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,WAAW,8BAAU,OAAO,YAAY,mCAAmC;AAAA,EAI3E,aAAa,8BAAU,OAAO,YAAY,0BAA0B;AAAA,EAIpE,SAAS,8BAAU,KAAK,YACtB,oEACF;AAAA,EAIA,UAAU,8BAAU,KAAK,YACvB,iEACF;AAAA,EAIA,SAAS,8BAAU,KAAK,YACtB,oEACF;AAAA,EAIA,QAAQ,8BAAU,KAAK,YACrB,qEACF;AAAA,EAIA,SAAS,8BAAU,KAAK,YACtB,kFACF;AAAA,EAIA,WAAW,8BAAU,KAAK,YACxB,iEACF;AAAA,EAIA,SAAS,8BAAU,KAAK,YACtB,mEACF;AAAA,EAIA,OAAO,8BAAU,OAAO,YACtB,iDACF;AAAA,EAIA,UAAU,8BAAU,KAAK,YACvB,yCACF;AAAA,EAIA,UAAU,8BAAU,KAAK,YACvB,2CACF;AAAA,EAIA,UAAU,8BAAU,KAAK,YACvB,4CACF;AAAA,EAIA,QAAQ,8BAAU,OAAO,YACvB,iDACF;AAAA,EAEA,UAAU,8BAAU,KAAK,YAAY,4BAA4B;AAAA,EAEjE,WAAW,8BAAU,OAAO,YAAY,iBAAiB;AAAA,EACzD,kBAAkB,8BAAU,OAAO,YAAY,EAAE;AAAA,EAIjD,MAAM,8BAAU,OAAO,YAAY,4BAA4B;AAAA,EAI/D,uBAAuB,8BAAU,OAAO,YACtC,6DACF;AAAA,EAIA,UAAU,8BAAU,OAAO,YAAY,0BAA0B;AACnE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -56,7 +56,7 @@ __export(DSRadio_exports, {
|
|
|
56
56
|
module.exports = __toCommonJS(DSRadio_exports);
|
|
57
57
|
var React = __toESM(require("react"));
|
|
58
58
|
var import_react = __toESM(require("react"));
|
|
59
|
-
var
|
|
59
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
60
60
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
61
61
|
var import_Circle = require("./Circle");
|
|
62
62
|
const DSRadio = (_a) => {
|
|
@@ -157,24 +157,24 @@ DSRadio.defaultProps = {
|
|
|
157
157
|
tabIndex: 0
|
|
158
158
|
};
|
|
159
159
|
const radioProps = {
|
|
160
|
-
containerProps:
|
|
161
|
-
className:
|
|
162
|
-
name:
|
|
163
|
-
labelText:
|
|
164
|
-
htmlFor:
|
|
165
|
-
hasError:
|
|
166
|
-
readOnly:
|
|
167
|
-
disabled:
|
|
168
|
-
checked:
|
|
169
|
-
value:
|
|
170
|
-
onChange:
|
|
171
|
-
children:
|
|
172
|
-
tabIndex:
|
|
173
|
-
style:
|
|
160
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Injected props to wrapper element of component"),
|
|
161
|
+
className: import_ds_utilities.PropTypes.string.description("css class prop"),
|
|
162
|
+
name: import_ds_utilities.PropTypes.string.description("name property to manage form"),
|
|
163
|
+
labelText: import_ds_utilities.PropTypes.string.description("Displayable label for the radio"),
|
|
164
|
+
htmlFor: import_ds_utilities.PropTypes.element.description("HTMLFOR property to manage form"),
|
|
165
|
+
hasError: import_ds_utilities.PropTypes.bool.description("Whether the radio has error or not"),
|
|
166
|
+
readOnly: import_ds_utilities.PropTypes.bool.description("Whether the radio is read only or not"),
|
|
167
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether the radio is disabled or not"),
|
|
168
|
+
checked: import_ds_utilities.PropTypes.bool.description("Whether the radio is checked or not"),
|
|
169
|
+
value: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.object]).description("Value that takes the checkbox if it is checked").isRequired,
|
|
170
|
+
onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the radio changes"),
|
|
171
|
+
children: import_ds_utilities.PropTypes.node.description("Optional, if you want a checkbox customized"),
|
|
172
|
+
tabIndex: import_ds_utilities.PropTypes.number.description("HTML tabindex to manage focus"),
|
|
173
|
+
style: import_ds_utilities.PropTypes.number.description("style override object")
|
|
174
174
|
};
|
|
175
175
|
DSRadio.propTypes = radioProps;
|
|
176
176
|
DSRadio.displayName = "DSRadio";
|
|
177
|
-
const DSRadioWithSchema = (0,
|
|
177
|
+
const DSRadioWithSchema = (0, import_ds_utilities.describe)(DSRadio);
|
|
178
178
|
DSRadioWithSchema.propTypes = radioProps;
|
|
179
179
|
var DSRadio_default = DSRadio;
|
|
180
180
|
//# 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 * as CSS from 'csstype';\nimport { PropTypes, describe } from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA8B;AAE9B,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport * as CSS from 'csstype';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\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?: CSS.Properties;\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 ...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={otherProps.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.number.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;ADEvB,mBAA8B;AAE9B,0BAAoC;AACpC,2BAA0C;AAC1C,oBAAuB;AAsBvB,MAAM,UAAU,CAAC,OAgBD;AAhBC,eACf;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAde,IAeZ,uBAfY,IAeZ;AAAA,IAdH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKA,QAAM,EAAE,cAAc,qBAAqB,oDAA0B,sBAAsB,WAAW;AAAA,IACpG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,WAAW,yBAAgC,IAAI;AACrD,SACE,mDAAC,wCAAQ,iBAAR;AAAA,IAAwB,WAAW;AAAA,MAClC,mDAAC;AAAA,IAAM,WAAW,iBAAiB,OAAO;AAAA,IAAG;AAAA,KAC3C,mDAAC,0CACK,aADL;AAAA,IAEC,KAAK;AAAA,IACL,iBAAe;AAAA,IACf,SAAS,WAAW,QAAQ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iCAAiC;AAAA,EAEzE,SAAS,8BAAU,QAAQ,YAAY,iCAAiC;AAAA,EAIxE,UAAU,8BAAU,KAAK,YAAY,oCAAoC;AAAA,EAIzE,UAAU,8BAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,UAAU,8BAAU,KAAK,YAAY,sCAAsC;AAAA,EAI3E,SAAS,8BAAU,KAAK,YAAY,qCAAqC;AAAA,EAIzE,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YACjF,gDACF,EAAE;AAAA,EAIF,UAAU,8BAAU,KAAK,YAAY,4DAA4D;AAAA,EAIjG,UAAU,8BAAU,KAAK,YAAY,6CAA6C;AAAA,EAElF,UAAU,8BAAU,OAAO,YAAY,+BAA+B;AAAA,EAEtE,OAAO,8BAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -44,7 +44,7 @@ __export(DSRadioGroup_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(DSRadioGroup_exports);
|
|
45
45
|
var React = __toESM(require("react"));
|
|
46
46
|
var import_react = __toESM(require("react"));
|
|
47
|
-
var
|
|
47
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
48
48
|
var import_ds_shared = require("@elliemae/ds-shared");
|
|
49
49
|
var import_FormItem = require("../FormItem");
|
|
50
50
|
var import_Radio = require("../Radio");
|
|
@@ -116,7 +116,7 @@ const DSRadioGroup = ({
|
|
|
116
116
|
DSRadioGroup.propTypes = import_props.props;
|
|
117
117
|
DSRadioGroup.defaultProps = import_defaultProps.defaultProps;
|
|
118
118
|
DSRadioGroup.displayName = "DSRadioGroup";
|
|
119
|
-
const DSRadioGroupWithSchema = (0,
|
|
119
|
+
const DSRadioGroupWithSchema = (0, import_ds_utilities.describe)(DSRadioGroup);
|
|
120
120
|
DSRadioGroupWithSchema.propTypes = import_props.props;
|
|
121
121
|
var DSRadioGroup_default = DSRadioGroup;
|
|
122
122
|
//# 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 '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\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\n className={`${baseClass}-form-item-layout-wrapper`}\n {...containerProps}\n role=\"group\"\n >\n <DSFormItemLayout\n {...labelProps}\n inputComponent={group}\n onChange={onChange}\n truncateText={truncateText}\n />\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;ADAvB,mBAAkB;AAClB,0BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,mBAAwB;AACxB,mBAAgC;AAChC,0BAA6B;AAE7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,YAAY,CAAC,UACjB,mDAAC;AAAA,EACC,QAAQ,CAAC,YACP,mDAAC,uDACK,QADL;AAAA,IAEC,SAAS,QAAQ,gBAAgB,MAAM;AAAA,IACvC,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,IACpB;AAAA,CAEJ;AAGF,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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