@elliemae/ds-form 3.1.5-rc.9 → 3.2.0-rc.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.
Files changed (63) hide show
  1. package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
  2. package/dist/cjs/FormItem/DSFormItemLayout.js.map +1 -1
  3. package/dist/cjs/FormItem/ValidationFieldWrapper.js.map +1 -1
  4. package/dist/cjs/FormItem/props.js +3 -1
  5. package/dist/cjs/FormItem/props.js.map +2 -2
  6. package/dist/cjs/InputGroup/AddonWrapper.js.map +1 -1
  7. package/dist/cjs/InputMask/mask_types/DateInputMask.js +0 -36
  8. package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +2 -2
  9. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +0 -36
  10. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
  11. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +0 -39
  12. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
  13. package/dist/cjs/InputMask/mask_types/NumberInputMask.js +0 -48
  14. package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +2 -2
  15. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +0 -36
  16. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  17. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +0 -36
  18. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
  19. package/dist/cjs/InputMask/mask_types/SsnInputMask.js +0 -36
  20. package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +2 -2
  21. package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js +0 -36
  22. package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +2 -2
  23. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -36
  24. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
  25. package/dist/cjs/InputMask/props.js +2 -1
  26. package/dist/cjs/InputMask/props.js.map +2 -2
  27. package/dist/cjs/InputProtected/props.js +4 -2
  28. package/dist/cjs/InputProtected/props.js.map +2 -2
  29. package/dist/cjs/Radio/DSRadio.js +6 -4
  30. package/dist/cjs/Radio/DSRadio.js.map +2 -2
  31. package/dist/cjs/Toggle/DSToggleImpl.js.map +1 -1
  32. package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
  33. package/dist/esm/FormItem/DSFormItemLayout.js.map +1 -1
  34. package/dist/esm/FormItem/ValidationFieldWrapper.js.map +1 -1
  35. package/dist/esm/FormItem/props.js +3 -1
  36. package/dist/esm/FormItem/props.js.map +2 -2
  37. package/dist/esm/InputGroup/AddonWrapper.js.map +1 -1
  38. package/dist/esm/InputMask/mask_types/DateInputMask.js +0 -36
  39. package/dist/esm/InputMask/mask_types/DateInputMask.js.map +2 -2
  40. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +0 -36
  41. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
  42. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +0 -39
  43. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
  44. package/dist/esm/InputMask/mask_types/NumberInputMask.js +0 -48
  45. package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +2 -2
  46. package/dist/esm/InputMask/mask_types/PhoneInputMask.js +0 -36
  47. package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  48. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +0 -36
  49. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
  50. package/dist/esm/InputMask/mask_types/SsnInputMask.js +0 -36
  51. package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +2 -2
  52. package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js +0 -36
  53. package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +2 -2
  54. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -36
  55. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
  56. package/dist/esm/InputMask/props.js +2 -1
  57. package/dist/esm/InputMask/props.js.map +2 -2
  58. package/dist/esm/InputProtected/props.js +4 -2
  59. package/dist/esm/InputProtected/props.js.map +2 -2
  60. package/dist/esm/Radio/DSRadio.js +6 -4
  61. package/dist/esm/Radio/DSRadio.js.map +2 -2
  62. package/dist/esm/Toggle/DSToggleImpl.js.map +1 -1
  63. package/package.json +19 -20
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/InputMask/mask_types/ZipCodeSearchInputMask.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { DSTextBox } from '../../TextBox';\nimport { TCharsToAdd } from '../types';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\nconst conformValue = (rawValue, cursorPos, lastkeycode) => {\n const nextMaskedValue = rawValue\n .split('')\n .filter((char) => char >= '0' && char <= '9')\n .slice(0, 9);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n\n // list of [string to add, position to add]\n const charactersToAdd: TCharsToAdd = [['-', 5]];\n\n charactersToAdd.forEach(([chars, pos]) => {\n if (nextMaskedValue.length > pos) {\n nextMaskedValue.splice(pos, 0, chars);\n if (maskedPos >= pos) maskedPos += chars.length;\n }\n });\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos) maskedPos += chars.length;\n });\n } else if (lastkeycode === 8 && maskedPos) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos + 1) maskedPos -= chars.length;\n });\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst ZipCodeSearchInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true }) => {\n const { nextMaskedValue, maskedPos } = conformValue(\n rawValue,\n cursorPos,\n lastkeycode,\n );\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n },\n [onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef && typeof innerRef === 'function') innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nZipCodeSearchInputMask.propTypes = {\n focus: PropTypes.bool,\n setFocus: PropTypes.func,\n setRawMask: PropTypes.func,\n cursorPosition: PropTypes.shape({ current: PropTypes.number }),\n setCursorPosition: PropTypes.func,\n lastkey: PropTypes.shape({ code: PropTypes.number, key: PropTypes.string }),\n setLastkey: PropTypes.func,\n setRawValue: PropTypes.func,\n style: PropTypes.object,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n name: PropTypes.string,\n maxLength: PropTypes.number,\n minLength: PropTypes.number,\n fluidWidth: PropTypes.bool,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func,\n onKeyDown: PropTypes.func,\n leftComponent: PropTypes.element,\n rightComponent: PropTypes.element,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onPaste: PropTypes.func,\n onKeyUp: PropTypes.func,\n hasError: PropTypes.bool,\n readOnly: PropTypes.bool,\n onClick: PropTypes.func,\n clearable: PropTypes.bool,\n type: PropTypes.string,\n innerRef: PropTypes.any,\n mask: PropTypes.any,\n placeholderChar: PropTypes.string,\n};\n\nexport { ZipCodeSearchInputMask };\nexport default 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AU,MAAM,EAAE,MAAM,UAAU,QAAQ,KAAK,UAAU,OAAO,CAAC;AAAA,EAC1E,YAAY,UAAU;AAAA,EACtB,aAAa,UAAU;AAAA,EACvB,OAAO,UAAU;AAAA,EACjB,UAAU,UAAU;AAAA,EACpB,WAAW,UAAU;AAAA,EACrB,MAAM,UAAU;AAAA,EAChB,WAAW,UAAU;AAAA,EACrB,WAAW,UAAU;AAAA,EACrB,YAAY,UAAU;AAAA,EACtB,aAAa,UAAU;AAAA,EACvB,OAAO,UAAU;AAAA,EACjB,UAAU,UAAU;AAAA,EACpB,WAAW,UAAU;AAAA,EACrB,eAAe,UAAU;AAAA,EACzB,gBAAgB,UAAU;AAAA,EAC1B,SAAS,UAAU;AAAA,EACnB,QAAQ,UAAU;AAAA,EAClB,SAAS,UAAU;AAAA,EACnB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AAAA,EACpB,SAAS,UAAU;AAAA,EACnB,WAAW,UAAU;AAAA,EACrB,MAAM,UAAU;AAAA,EAChB,UAAU,UAAU;AAAA,EACpB,MAAM,UAAU;AAAA,EAChB,iBAAiB,UAAU;AAC7B;AAGA,IAAO,iCAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { DSTextBox } from '../../TextBox';\nimport { TCharsToAdd } from '../types';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\nconst conformValue = (rawValue, cursorPos, lastkeycode) => {\n const nextMaskedValue = rawValue\n .split('')\n .filter((char) => char >= '0' && char <= '9')\n .slice(0, 9);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n\n // list of [string to add, position to add]\n const charactersToAdd: TCharsToAdd = [['-', 5]];\n\n charactersToAdd.forEach(([chars, pos]) => {\n if (nextMaskedValue.length > pos) {\n nextMaskedValue.splice(pos, 0, chars);\n if (maskedPos >= pos) maskedPos += chars.length;\n }\n });\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos) maskedPos += chars.length;\n });\n } else if (lastkeycode === 8 && maskedPos) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos + 1) maskedPos -= chars.length;\n });\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst ZipCodeSearchInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true }) => {\n const { nextMaskedValue, maskedPos } = conformValue(\n rawValue,\n cursorPos,\n lastkeycode,\n );\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n },\n [onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef && typeof innerRef === 'function') innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nexport { ZipCodeSearchInputMask };\nexport default ZipCodeSearchInputMask;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AAEA;AAEA;AAEA,MAAM,eAAe,CAAC,UAAU,WAAW,gBAAgB;AACzD,QAAM,kBAAkB,SACrB,MAAM,EAAE,EACR,OAAO,CAAC,SAAS,QAAQ,OAAO,QAAQ,GAAG,EAC3C,MAAM,GAAG,CAAC;AAEb,MAAI,YAAY;AAChB,WAAS,IAAI,GAAG,IAAI,WAAW,KAAK,GAAG;AACrC,QAAI,gBAAgB,eAAe,SAAS;AAAI,mBAAa;AAAA,EAC/D;AAGA,QAAM,kBAA+B,CAAC,CAAC,KAAK,CAAC,CAAC;AA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AAC1C,cAAU,CAAC;AAAA,EACb,GACA,CAAC,SAAS,CACZ;AAEA,QAAM,aAAa,YACjB,CAAC,MAAM;AACL,aAAS,KAAK;AACd,WAAO,CAAC;AAAA,EACV,GACA,CAAC,MAAM,CACT;AAEA,SACE,qCAAC,4CACK,OADL;AAAA,IAEC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,CAAC,QAAQ;AACjB,eAAS,UAAU;AACnB,UAAI,YAAY,OAAO,aAAa;AAAY,iBAAS,GAAG;AAAA,IAC9D;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACT;AAEJ;AAGA,IAAO,iCAAQ;",
6
6
  "names": []
7
7
  }
@@ -33,7 +33,8 @@ const inputProps = {
33
33
  mask: PropTypes.oneOfType([
34
34
  PropTypes.array,
35
35
  PropTypes.string,
36
- PropTypes.func
36
+ PropTypes.func,
37
+ PropTypes.object
37
38
  ]).description("Mask that has to match with the input information entered. ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT', 'ZIP_CODE_SEARCH']"),
38
39
  pipe: PropTypes.func.description("Expects pipe functions. i.e. autoCorrectedDatePipe"),
39
40
  useSubfix: PropTypes.string.description("Put a sufix after the input mask"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputMask/props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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('_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;AAAA,EAIA,eAAe,UAAU,KAAK,YAC5B,sDACF;AAAA,EAIA,gBAAgB,UAAU,KAAK,YAC7B,sDACF;AAAA,EAKA,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YACD,kKACF;AAAA,EAKA,MAAM,UAAU,KAAK,YACnB,oDACF;AAAA,EAIA,WAAW,UAAU,OAAO,YAAY,kCAAkC;AAAA,EAK1E,iBAAiB,UAAU,OACxB,YACC;AAAA,qDAEF,EACC,aAAa,GAAG;AACrB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 PropTypes.object,\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"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,aAAa;AAAA,EAExB,WAAW,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI5E,OAAO,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,UAAU,UAAU,KAAK,YACvB,2CACF;AAAA,EAEA,gBAAgB,UAAU,KACvB,YAAY,yDAAyD,EACrE,aAAa,IAAI;AAAA,EAEpB,WAAW,UAAU,OAAO,YAAY,WAAW;AAAA,EAEnD,MAAM,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAI5D,WAAW,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAIvE,WAAW,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAIvE,YAAY,UAAU,KAAK,YACzB,wEACF;AAAA,EAEA,qBAAqB,UAAU,KAC5B,YACC,gEACF,EACC,aAAa,IAAI;AAAA,EAIpB,aAAa,UAAU,KAAK,YAC1B,qCACF;AAAA,EAIA,WAAW,UAAU,KAAK,YACxB,iEACF;AAAA,EAIA,SAAS,UAAU,KAAK,YACtB,oEACF;AAAA,EAIA,UAAU,UAAU,KAAK,YACvB,iEACF;AAAA,EAIA,SAAS,UAAU,KAAK,YACtB,oEACF;AAAA,EAIA,QAAQ,UAAU,KAAK,YACrB,qEACF;AAAA,EAIA,SAAS,UAAU,KAAK,YACtB,mEACF;AAAA,EAIA,SAAS,UAAU,KAAK,YACtB,uFACF;AAAA,EAIA,OAAO,UAAU,OAAO,YACtB,iDACF;AAAA,EAIA,UAAU,UAAU,KAAK,YACvB,yCACF;AAAA,EAIA,UAAU,UAAU,KAAK,YACvB,4CACF;AAAA,EACA,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC;AAAA,EAC5C,CAAC,EAAE,YAAY,4CAA4C;AAAA,EAI3D,MAAM,UAAU,OAAO,YAAY,2BAA2B;AAAA,EAI9D,WAAW,UAAU,KAAK,YACxB,4CACF;AAAA,EAIA,eAAe,UAAU,KAAK,YAC5B,sDACF;AAAA,EAIA,gBAAgB,UAAU,KAAK,YAC7B,sDACF;AAAA,EAKA,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YACD,kKACF;AAAA,EAKA,MAAM,UAAU,KAAK,YACnB,oDACF;AAAA,EAIA,WAAW,UAAU,OAAO,YAAY,kCAAkC;AAAA,EAK1E,iBAAiB,UAAU,OACxB,YACC;AAAA,qDAEF,EACC,aAAa,GAAG;AACrB;",
6
6
  "names": []
7
7
  }
@@ -14,8 +14,10 @@ const inputProtectedProps = {
14
14
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("input s value"),
15
15
  readOnly: PropTypes.bool.description("Whether the input is read-only or not").defaultValue(false),
16
16
  mask: PropTypes.oneOfType([
17
- PropTypes.arrayOf(PropTypes.string),
18
- PropTypes.func
17
+ PropTypes.array,
18
+ PropTypes.func,
19
+ PropTypes.object,
20
+ PropTypes.string
19
21
  ]).description("mask to apply"),
20
22
  type: PropTypes.oneOf(["password", "number", "text"]).description("type of input"),
21
23
  placeholderChar: PropTypes.string.description(`The placeholder character represents the fillable spot in the mask.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputProtected/props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,sBAAsB;AAAA,EACjC,WAAW,UAAU,MAAM;AAAA,IACzB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,EACrB,CAAC,EAAE,YAAY,iCAAiC;AAAA,EAChD,YAAY,UAAU,MAAM;AAAA,IAC1B,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,EACtB,CAAC,EACE,YAAY,kCAAkC,EAC9C,aAAa,oBAAoB,aAAa;AAAA,EACjD,UAAU,UAAU,KAAK,YACvB,8CACF;AAAA,EACA,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,eACF;AAAA,EACA,UAAU,UAAU,KACjB,YAAY,uCAAuC,EACnD,aAAa,KAAK;AAAA,EACrB,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU,QAAQ,UAAU,MAAM;AAAA,IAClC,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,eAAe;AAAA,EAC9B,MAAM,UAAU,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,EAAE,YACpD,eACF;AAAA,EAKA,iBAAiB,UAAU,OAAO,YAChC;AAAA,wDAEF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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.array,\n PropTypes.func,\n PropTypes.object,\n PropTypes.string,\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"],
5
+ "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,sBAAsB;AAAA,EACjC,WAAW,UAAU,MAAM;AAAA,IACzB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,EACrB,CAAC,EAAE,YAAY,iCAAiC;AAAA,EAChD,YAAY,UAAU,MAAM;AAAA,IAC1B,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,EACtB,CAAC,EACE,YAAY,kCAAkC,EAC9C,aAAa,oBAAoB,aAAa;AAAA,EACjD,UAAU,UAAU,KAAK,YACvB,8CACF;AAAA,EACA,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,eACF;AAAA,EACA,UAAU,UAAU,KACjB,YAAY,uCAAuC,EACnD,aAAa,KAAK;AAAA,EACrB,MAAM,UAAU,UAAU;AAAA,IACxB,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,eAAe;AAAA,EAC9B,MAAM,UAAU,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,EAAE,YACpD,eACF;AAAA,EAKA,iBAAiB,UAAU,OAAO,YAChC;AAAA,wDAEF;AACF;",
6
6
  "names": []
7
7
  }
@@ -49,7 +49,8 @@ const DSRadio = (_a) => {
49
49
  name,
50
50
  onChange,
51
51
  children,
52
- tabIndex
52
+ tabIndex,
53
+ innerRef
53
54
  } = _b, otherProps = __objRest(_b, [
54
55
  "containerProps",
55
56
  "className",
@@ -64,7 +65,8 @@ const DSRadio = (_a) => {
64
65
  "name",
65
66
  "onChange",
66
67
  "children",
67
- "tabIndex"
68
+ "tabIndex",
69
+ "innerRef"
68
70
  ]);
69
71
  const { cssClassName, classNameElement } = convertPropToCssClassName("form-element-radio", className, {
70
72
  hasError,
@@ -94,7 +96,7 @@ const DSRadio = (_a) => {
94
96
  type: "radio",
95
97
  value
96
98
  })), /* @__PURE__ */ React2.createElement("span", {
97
- ref: otherProps.innerRef,
99
+ ref: innerRef,
98
100
  "aria-checked": checked,
99
101
  "aria-disabled": disabled,
100
102
  className: classNameElement("input-button"),
@@ -145,7 +147,7 @@ const radioProps = {
145
147
  onChange: PropTypes.func.description("Allows a function that is triggered once the radio changes"),
146
148
  children: PropTypes.node.description("Optional, if you want a checkbox customized"),
147
149
  tabIndex: PropTypes.number.description("HTML tabindex to manage focus"),
148
- style: PropTypes.number.description("style override object")
150
+ style: PropTypes.object.description("style override object")
149
151
  };
150
152
  DSRadio.propTypes = radioProps;
151
153
  DSRadio.displayName = "DSRadio";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Radio/DSRadio.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AAEA;AACA;AACA;AAsBA,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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,EACjB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,UAAU;AACZ;AAEA,MAAM,aAAa;AAAA,EAEjB,gBAAgB,UAAU,OAAO,YAAY,gDAAgD;AAAA,EAE7F,WAAW,UAAU,OAAO,YAAY,gBAAgB;AAAA,EAExD,MAAM,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAIjE,WAAW,UAAU,OAAO,YAAY,iCAAiC;AAAA,EAEzE,SAAS,UAAU,QAAQ,YAAY,iCAAiC;AAAA,EAIxE,UAAU,UAAU,KAAK,YAAY,oCAAoC;AAAA,EAIzE,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,UAAU,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI3E,SAAS,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAIzE,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YACjF,gDACF,EAAE;AAAA,EAIF,UAAU,UAAU,KAAK,YAAY,4DAA4D;AAAA,EAIjG,UAAU,UAAU,KAAK,YAAY,6CAA6C;AAAA,EAElF,UAAU,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAEtE,OAAO,UAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\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?: 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"],
5
+ "mappings": ";;;;;;;;;;;;;;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EAElF,UAAU,UAAU,OAAO,YAAY,+BAA+B;AAAA,EAEtE,OAAO,UAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggleImpl.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from './toggleHelper';\nimport { DSToggleRender } from './DSToggleRender';\nimport { togglePropTypes } from './props';\n\nclass DSToggleImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: props.checked || false,\n inside: false,\n isDragging: false,\n // prevent draw of toggle before drag handle positioning calculations\n hide: true,\n drag: null,\n startPoint: null,\n circleWidth: null,\n boxWidth: null,\n };\n this.circle = React.createRef();\n this.box = React.createRef();\n\n this.setDragOnChange = this.setDragOnChange.bind(this);\n this.verifyElements = this.verifyElements.bind(this);\n }\n\n componentDidMount() {\n this.verifyElements();\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (\n this.state.hide &&\n this.state.circleWidth &&\n this.state.boxWidth &&\n prevState.hide &&\n this.state.drag !== null\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ hide: false });\n }\n if (snapshot) {\n this.verifyElements();\n }\n }\n\n /**\n * ******************************************************\n * Drag\n * ****************************************************** *\n *\n * @param clientX\n */\n onDragStart = (clientX) => {\n const { startPoint, checked, isDragging, boxWidth, circleWidth } = this.state;\n // const { checked: checkedProp, } = this.props\n const drag = calculateDrag(clientX, {\n startPoint,\n checked,\n isDragging,\n boxWidth,\n circleWidth,\n });\n if (drag) this.setState({ drag });\n // else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n else this.setDragOnChange(checked); // set initial position\n };\n\n onDragStop = (e) => {\n const { checked } = this.state;\n // const { checked: checkedProp, } = this.props\n if (isValidDrag(this.state)) {\n this.onChange(e);\n this.setState(cleanDrag);\n // } else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n } else this.setDragOnChange(checked); // set initial position\n };\n\n /**\n * ******************************************************\n * StandardEvents\n * ****************************************************** *\n *\n * @param e\n */\n onBlur = (e) => {\n const { onBlur, id } = this.props;\n if (onBlur) onBlur(e, id);\n };\n\n onFocus = (e) => {\n const { onFocus, id } = this.props;\n if (onFocus) onFocus(e, id);\n };\n\n onChange = (e) => {\n const { checked } = this.state;\n const {\n onChange,\n id,\n value,\n // checked: checkedProp,\n } = this.props;\n const newCheck = !checked;\n // this.setState({\n // checked: checkedProp != null ? checkedProp : newCheck,\n // })\n this.setState({\n checked: newCheck,\n });\n e.target.value = value;\n e.target.checked = newCheck;\n e.checked = newCheck;\n onChange(e, id);\n // this.setDragOnChange(checkedProp != null ? checkedProp : newCheck) // set new position\n this.setDragOnChange(newCheck); // set new position\n };\n\n /** ******************************************************\n MouseEvents\n ******************************************************* * */\n onMouseEnter = () => {\n this.setState({ inside: true });\n };\n\n onMouseLeave = () => {\n this.setState({ inside: false });\n };\n\n onMouseMove = (event) => {\n event.preventDefault();\n this.onDragStart(event.clientX);\n };\n\n onMouseDown = (event) => {\n this.onDragStart(event.clientX);\n this.setState({ startPoint: event.clientX, isDragging: true });\n window.addEventListener('mousemove', this.onMouseMove);\n window.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseUp = (event) => {\n this.onDragStop(event);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n };\n\n /** ******************************************************\n Touch\n ******************************************************* * */\n onTouchCancel = () => {\n this.setState({ inside: false });\n };\n\n onTouchEnd = (event) => {\n event.preventDefault();\n this.onDragStop(event);\n };\n\n onTouchMove = (event) => {\n this.onDragStart(event.touches[0].clientX);\n };\n\n onTouchStart = (event) => {\n this.onDragStart(event.touches[0].clientX);\n this.setState({ startPoint: event.touches[0].clientX, isDragging: true });\n };\n\n static getDerivedStateFromProps(props, state) {\n if (props.checked === true || props.checked === false) {\n return {\n checked: props.checked,\n ...dragStartingPoints(props.checked)(state),\n };\n }\n return null;\n }\n\n getSnapshotBeforeUpdate(prevProps) {\n const { size } = this.props;\n if (prevProps.size !== size) {\n return true;\n }\n return false;\n }\n\n /**\n * ******************************************************\n * other\n * ****************************************************** *\n *\n * @param currentCheckState\n */\n setDragOnChange(currentCheckState) {\n this.setState(dragStartingPoints(currentCheckState));\n }\n\n verifyElements() {\n const { checked } = this.state;\n const { checked: checkedProp } = this.props;\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n if (!this.circle || !this.box || !this.circle.current || !this.box.current) return;\n const {\n current: { clientWidth: circleWidth },\n } = this.circle;\n const {\n current: { clientWidth: boxWidth },\n } = this.box;\n if (!circleWidth || !boxWidth || circleWidth === boxWidth) return;\n this.setState({\n boxWidth,\n circleWidth,\n });\n this.setDragOnChange(checkedProp != null ? checkedProp : checked);\n // this.setDragOnChange(checked)\n clearInterval(nodesInterval);\n }, 5);\n }\n\n render() {\n const { checked, drag, inside, hide } = this.state;\n const dragStyle = drag !== null || checked || this.props.checked ? { left: `${drag}px` } : null;\n return (\n <DSToggleRender\n {...this.props}\n defaultState={this.props.checked}\n checked={checked}\n containerRef={this.box}\n hide={hide}\n dragStyle={dragStyle}\n handRef={this.circle}\n inside={inside}\n onBlur={this.onBlur}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onMouseDown={this.onMouseDown}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n onTouchCancel={this.onTouchCancel}\n onTouchEnd={this.onTouchEnd}\n onTouchMove={this.onTouchMove}\n onTouchStart={this.onTouchStart}\n />\n );\n }\n}\n\nDSToggleImpl.propTypes = togglePropTypes;\n\nexport {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AAAA,MACjB,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,MACrB;AAAA,EAEJ;AACF;AAEA,aAAa,YAAY;AAGzB,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form",
3
- "version": "3.1.5-rc.9",
3
+ "version": "3.2.0-rc.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Form",
6
6
  "files": [
@@ -475,38 +475,37 @@
475
475
  "indent": 4
476
476
  },
477
477
  "dependencies": {
478
- "@elliemae/ds-button": "3.1.5-rc.9",
479
- "@elliemae/ds-classnames": "3.1.5-rc.9",
480
- "@elliemae/ds-common": "3.1.5-rc.9",
481
- "@elliemae/ds-grid": "3.1.5-rc.9",
482
- "@elliemae/ds-icons": "3.1.5-rc.9",
483
- "@elliemae/ds-shared": "3.1.5-rc.9",
484
- "@elliemae/ds-system": "3.1.5-rc.9",
485
- "@elliemae/ds-text-wrapper": "3.1.5-rc.9",
486
- "@elliemae/ds-tooltip": "3.1.5-rc.9",
487
- "@elliemae/ds-truncated-tooltip-text": "3.1.5-rc.9",
488
- "@elliemae/ds-utilities": "3.1.5-rc.9",
489
- "csstype": "~3.0.11",
490
- "memoize-one": "~5.1.1",
491
- "moment": "~2.29.1",
478
+ "@elliemae/ds-button": "3.2.0-rc.3",
479
+ "@elliemae/ds-classnames": "3.2.0-rc.3",
480
+ "@elliemae/ds-common": "3.2.0-rc.3",
481
+ "@elliemae/ds-grid": "3.2.0-rc.3",
482
+ "@elliemae/ds-icons": "3.2.0-rc.3",
483
+ "@elliemae/ds-shared": "3.2.0-rc.3",
484
+ "@elliemae/ds-system": "3.2.0-rc.3",
485
+ "@elliemae/ds-text-wrapper": "3.2.0-rc.3",
486
+ "@elliemae/ds-tooltip": "3.2.0-rc.3",
487
+ "@elliemae/ds-truncated-tooltip-text": "3.2.0-rc.3",
488
+ "@elliemae/ds-utilities": "3.2.0-rc.3",
489
+ "memoize-one": "~6.0.0",
490
+ "moment": "~2.29.3",
492
491
  "prop-types": "~15.8.1",
493
492
  "react-select": "~4.3.1",
494
493
  "resize-observer": "~1.0.4",
495
494
  "text-mask-core": "5.1.2"
496
495
  },
497
496
  "devDependencies": {
498
- "@testing-library/dom": "~8.11.3",
499
- "@testing-library/jest-dom": "~5.16.2",
500
- "@testing-library/react": "~12.1.2",
497
+ "@testing-library/dom": "~8.13.0",
498
+ "@testing-library/jest-dom": "~5.16.4",
499
+ "@testing-library/react": "~12.1.3",
501
500
  "@testing-library/user-event": "~13.5.0",
502
- "styled-components": "~5.3.3",
501
+ "styled-components": "~5.3.5",
503
502
  "styled-system": "~5.1.5"
504
503
  },
505
504
  "peerDependencies": {
506
505
  "lodash": "^4.17.21",
507
506
  "react": "~17.0.2",
508
507
  "react-dom": "^17.0.2",
509
- "styled-components": "^5.3.3",
508
+ "styled-components": "^5.3.5",
510
509
  "styled-system": "^5.1.5"
511
510
  },
512
511
  "publishConfig": {