@elliemae/ds-form 3.12.0-next.0 → 3.12.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
  2. package/dist/cjs/ComboBox/index.js.map +1 -1
  3. package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +28 -30
  4. package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
  5. package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +2 -2
  6. package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +2 -2
  7. package/dist/cjs/DateInput/props.js +12 -33
  8. package/dist/cjs/DateInput/props.js.map +2 -2
  9. package/dist/cjs/DateInputV2/components/helpers.js.map +2 -2
  10. package/dist/cjs/DateInputV2/components/props.js +8 -25
  11. package/dist/cjs/DateInputV2/components/props.js.map +2 -2
  12. package/dist/cjs/DateInputV2/components/propsTypes.js +1 -4
  13. package/dist/cjs/DateInputV2/components/propsTypes.js.map +2 -2
  14. package/dist/cjs/DateInputV2/components/styled.js.map +2 -2
  15. package/dist/cjs/DateInputV2/components/utils.js +1 -4
  16. package/dist/cjs/DateInputV2/components/utils.js.map +2 -2
  17. package/dist/cjs/FloatingLabelInput/getSvgPath.js.map +2 -2
  18. package/dist/cjs/FormItem/Label/DSLabel.js +1 -9
  19. package/dist/cjs/FormItem/Label/DSLabel.js.map +2 -2
  20. package/dist/cjs/FormItem/Suffix/Suffix.js.map +2 -2
  21. package/dist/cjs/FormItem/ValidationFieldWrapper.js.map +2 -2
  22. package/dist/cjs/Input/index.js.map +1 -1
  23. package/dist/cjs/InputGroup/AddonWrapper.js +1 -7
  24. package/dist/cjs/InputGroup/AddonWrapper.js.map +2 -2
  25. package/dist/cjs/InputGroup/props.js +5 -12
  26. package/dist/cjs/InputGroup/props.js.map +2 -2
  27. package/dist/cjs/InputMask/DSInputMask.js +2 -6
  28. package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
  29. package/dist/cjs/InputMask/InputMaskContext.js.map +1 -1
  30. package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js +3 -12
  31. package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js.map +2 -2
  32. package/dist/cjs/InputMask/mask_types/DateInputMask.js +1 -5
  33. package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +2 -2
  34. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +1 -5
  35. package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
  36. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +1 -7
  37. package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
  38. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +1 -5
  39. package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  40. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +1 -5
  41. package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
  42. package/dist/cjs/InputMask/mask_types/SsnInputMask.js +1 -5
  43. package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +2 -2
  44. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -5
  45. package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
  46. package/dist/cjs/InputMask/mask_types/index.js.map +2 -2
  47. package/dist/cjs/InputMask/props.js +19 -59
  48. package/dist/cjs/InputMask/props.js.map +2 -2
  49. package/dist/cjs/InputProtected/props.js +8 -21
  50. package/dist/cjs/InputProtected/props.js.map +2 -2
  51. package/dist/cjs/LargeInputText/DSLargeInputText.js +13 -19
  52. package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
  53. package/dist/cjs/LargeInputText/props.js +13 -39
  54. package/dist/cjs/LargeInputText/props.js.map +2 -2
  55. package/dist/cjs/Radio/Circle.js.map +2 -2
  56. package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
  57. package/dist/cjs/TimeInput/DSTimeInput.js +8 -19
  58. package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
  59. package/dist/cjs/TimeInput/TimeInputImpl.js +1 -3
  60. package/dist/cjs/TimeInput/TimeInputImpl.js.map +2 -2
  61. package/dist/cjs/TimeInput/utils.js +4 -5
  62. package/dist/cjs/TimeInput/utils.js.map +3 -3
  63. package/dist/cjs/Toggle/DSToggleImpl.js.map +2 -2
  64. package/dist/cjs/Toggle/DSToggleRender.js +13 -15
  65. package/dist/cjs/Toggle/DSToggleRender.js.map +2 -2
  66. package/dist/cjs/Toggle/toggleHelper.js +1 -7
  67. package/dist/cjs/Toggle/toggleHelper.js.map +2 -2
  68. package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
  69. package/dist/esm/ComboBox/index.js.map +1 -1
  70. package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +28 -30
  71. package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
  72. package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +2 -2
  73. package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +2 -2
  74. package/dist/esm/DateInput/props.js +12 -33
  75. package/dist/esm/DateInput/props.js.map +2 -2
  76. package/dist/esm/DateInputV2/components/helpers.js.map +2 -2
  77. package/dist/esm/DateInputV2/components/props.js +8 -25
  78. package/dist/esm/DateInputV2/components/props.js.map +2 -2
  79. package/dist/esm/DateInputV2/components/propsTypes.js +1 -4
  80. package/dist/esm/DateInputV2/components/propsTypes.js.map +2 -2
  81. package/dist/esm/DateInputV2/components/styled.js.map +2 -2
  82. package/dist/esm/DateInputV2/components/utils.js +1 -4
  83. package/dist/esm/DateInputV2/components/utils.js.map +2 -2
  84. package/dist/esm/FloatingLabelInput/getSvgPath.js.map +2 -2
  85. package/dist/esm/FormItem/Label/DSLabel.js +1 -9
  86. package/dist/esm/FormItem/Label/DSLabel.js.map +2 -2
  87. package/dist/esm/FormItem/Suffix/Suffix.js.map +2 -2
  88. package/dist/esm/FormItem/ValidationFieldWrapper.js.map +2 -2
  89. package/dist/esm/Input/index.js.map +1 -1
  90. package/dist/esm/InputGroup/AddonWrapper.js +1 -7
  91. package/dist/esm/InputGroup/AddonWrapper.js.map +2 -2
  92. package/dist/esm/InputGroup/props.js +5 -12
  93. package/dist/esm/InputGroup/props.js.map +2 -2
  94. package/dist/esm/InputMask/DSInputMask.js +2 -6
  95. package/dist/esm/InputMask/DSInputMask.js.map +2 -2
  96. package/dist/esm/InputMask/InputMaskContext.js.map +1 -1
  97. package/dist/esm/InputMask/addons/AutoCorrectedDatePipe.js +3 -12
  98. package/dist/esm/InputMask/addons/AutoCorrectedDatePipe.js.map +2 -2
  99. package/dist/esm/InputMask/mask_types/DateInputMask.js +1 -5
  100. package/dist/esm/InputMask/mask_types/DateInputMask.js.map +2 -2
  101. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +1 -5
  102. package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
  103. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +1 -7
  104. package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
  105. package/dist/esm/InputMask/mask_types/PhoneInputMask.js +1 -5
  106. package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
  107. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +1 -5
  108. package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
  109. package/dist/esm/InputMask/mask_types/SsnInputMask.js +1 -5
  110. package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +2 -2
  111. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -5
  112. package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
  113. package/dist/esm/InputMask/mask_types/index.js.map +2 -2
  114. package/dist/esm/InputMask/props.js +19 -59
  115. package/dist/esm/InputMask/props.js.map +2 -2
  116. package/dist/esm/InputProtected/props.js +8 -21
  117. package/dist/esm/InputProtected/props.js.map +2 -2
  118. package/dist/esm/LargeInputText/DSLargeInputText.js +14 -23
  119. package/dist/esm/LargeInputText/DSLargeInputText.js.map +2 -2
  120. package/dist/esm/LargeInputText/props.js +13 -39
  121. package/dist/esm/LargeInputText/props.js.map +2 -2
  122. package/dist/esm/Radio/Circle.js.map +2 -2
  123. package/dist/esm/RadioGroup/DSRadioGroup.js.map +2 -2
  124. package/dist/esm/TimeInput/DSTimeInput.js +8 -19
  125. package/dist/esm/TimeInput/DSTimeInput.js.map +2 -2
  126. package/dist/esm/TimeInput/TimeInputImpl.js +1 -3
  127. package/dist/esm/TimeInput/TimeInputImpl.js.map +2 -2
  128. package/dist/esm/TimeInput/utils.js +1 -2
  129. package/dist/esm/TimeInput/utils.js.map +2 -2
  130. package/dist/esm/Toggle/DSToggleImpl.js.map +2 -2
  131. package/dist/esm/Toggle/DSToggleRender.js +13 -15
  132. package/dist/esm/Toggle/DSToggleRender.js.map +2 -2
  133. package/dist/esm/Toggle/toggleHelper.js +1 -7
  134. package/dist/esm/Toggle/toggleHelper.js.map +2 -2
  135. package/package.json +12 -12
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/RadioGroup/DSRadioGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-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;ADcjB;AAdN,mBAAkB;AAClB,0BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,mBAAwB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AAC,MAAM,UAAU,GAAG,KAAK;AAAA,SACtC;AAAA,QAEF;AAAA,MACF;AAAA,KACF;AAAA,GACF;AAGF,MAAI,cAAc,WAAW,WAAW;AACtC,WACE,4CAAC;AAAA,MACC,WAAW,GAAG;AAAA,MACb,GAAG;AAAA,MACJ,MAAK;AAAA,MAEL,sDAAC;AAAA,QACE,GAAG;AAAA,QACJ,gBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,OACF;AAAA,KACF;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,aAAa,YAAY,aAAAC;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY;AACpD,uBAAuB,YAAY,aAAAA;AAInC,IAAO,uBAAQ;",
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 className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops;\n\nexport { DSRadioGroup, DSRadioGroupWithSchema };\n\nexport default DSRadioGroup;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcjB;AAdN,mBAAkB;AAClB,0BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,mBAAwB;AACxB,mBAAgC;AAChC,0BAA6B;AAE7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,YAAY,CAAC,UACjB,4CAAC;AAAA,EACC,QAAQ,CAAC,YACP,4CAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS,QAAQ,gBAAgB,MAAM;AAAA,IACvC,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,GACpB;AAAA,CAEJ;AAGF,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,YAAY,CAAC;A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AAuB,YAAY,aAAAA;AAInC,IAAO,uBAAQ;",
6
6
  "names": ["React", "rprops"]
7
7
  }
@@ -71,29 +71,18 @@ DSTimeInput.defaultProps = {
71
71
  clearable: true
72
72
  };
73
73
  const props = {
74
- containerProps: import_ds_utilities.PropTypes.object.description(
75
- "Injected props to wrapper element of component"
76
- ),
77
- onChange: import_ds_utilities.PropTypes.func.description(
78
- "Allows a function that is triggered once the time input changes"
79
- ),
74
+ containerProps: import_ds_utilities.PropTypes.object.description("Injected props to wrapper element of component"),
75
+ onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the time input changes"),
80
76
  "aria-label": import_ds_utilities.PropTypes.string.description("a11y aria label"),
81
77
  style: import_ds_utilities.PropTypes.object.description("style object for time input wrapper"),
82
- innerRef: import_ds_utilities.PropTypes.oneOfType([
83
- import_ds_utilities.PropTypes.func,
84
- import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })
85
- ]).description("inner ref for time input wrapper"),
78
+ innerRef: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.func, import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })]).description(
79
+ "inner ref for time input wrapper"
80
+ ),
86
81
  className: import_ds_utilities.PropTypes.string.description("class for time input"),
87
82
  format: import_ds_utilities.PropTypes.string.description("Valid time format"),
88
- value: import_ds_utilities.PropTypes.string.description(
89
- "Default value once the component is initialized"
90
- ),
91
- clearable: import_ds_utilities.PropTypes.bool.description(
92
- "Whether the time input is clearable or not"
93
- ),
94
- disabled: import_ds_utilities.PropTypes.bool.description(
95
- "Whether the time input is disabled or not"
96
- ),
83
+ value: import_ds_utilities.PropTypes.string.description("Default value once the component is initialized"),
84
+ clearable: import_ds_utilities.PropTypes.bool.description("Whether the time input is clearable or not"),
85
+ disabled: import_ds_utilities.PropTypes.bool.description("Whether the time input is disabled or not"),
97
86
  ariaLabel: import_ds_utilities.PropTypes.string.description("Aria label")
98
87
  };
99
88
  DSTimeInput.propTypes = props;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/TimeInput/DSTimeInput.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSInput } from '../Input';\nimport { TimeInputImpl } from './TimeInputImpl';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description(\n 'Injected props to wrapper element of component',\n ),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description(\n 'Allows a function that is triggered once the time input changes',\n ),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any }),\n ]).description('inner ref for time input wrapper'),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description(\n 'Default value once the component is initialized',\n ),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description(\n 'Whether the time input is clearable or not',\n ),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description(\n 'Whether the time input is disabled or not',\n ),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBjB;AArBN,0BAAoC;AACpC,mBAAwB;AACxB,2BAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW,MAAM;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AACd,MACE,4CAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC,EAAE,UAAU,kBAAkB,eAAe,MAC7D,4CAAC;AAAA,IACC,cAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,UAAU,CAAC,SAAS,cAAc,IAAI;AAAA,IACrC,GAAG;AAAA,IACJ;AAAA,GACF;AAAA,EAEF;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA,SAAS,MAAM,SAAS,IAAI;AAAA,EAC5B;AAAA,CACF;AAGF,YAAY,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AACb;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,8BAAU,OAAO;AAAA,IAC/B;AAAA,EACF;AAAA,EAIA,UAAU,8BAAU,KAAK;AAAA,IACvB;AAAA,EACF;AAAA,EAEA,cAAc,8BAAU,OAAO,YAAY,iBAAiB;AAAA,EAE5D,OAAO,8BAAU,OAAO,YAAY,qCAAqC;AAAA,EAEzE,UAAU,8BAAU,UAAU;AAAA,IAC5B,8BAAU;AAAA,IACV,8BAAU,MAAM,EAAE,SAAS,8BAAU,IAAI,CAAC;AAAA,EAC5C,CAAC,EAAE,YAAY,kCAAkC;AAAA,EAEjD,WAAW,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAI9D,QAAQ,8BAAU,OAAO,YAAY,mBAAmB;AAAA,EAIxD,OAAO,8BAAU,OAAO;AAAA,IACtB;AAAA,EACF;AAAA,EAIA,WAAW,8BAAU,KAAK;AAAA,IACxB;AAAA,EACF;AAAA,EAIA,UAAU,8BAAU,KAAK;AAAA,IACvB;AAAA,EACF;AAAA,EAIA,WAAW,8BAAU,OAAO,YAAY,YAAY;AACtD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,8BAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSInput } from '../Input';\nimport { TimeInputImpl } from './TimeInputImpl';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the time input changes'),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for time input wrapper',\n ),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the time input is clearable or not'),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the time input is disabled or not'),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBjB;AArBN,0BAAoC;AACpC,mBAAwB;AACxB,2BAA8B;AAE9B,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW,MAAM;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ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,7 @@ const TimeInputImpl = ({
48
48
  clearable,
49
49
  "arial-label": ariaLabel
50
50
  }) => {
51
- const getVisibleTimeInputs = (0, import_memoize_one.default)(
52
- (formatValue) => (0, import_ds_utilities.getVisibleTimeByFormat)(formatValue)
53
- );
51
+ const getVisibleTimeInputs = (0, import_memoize_one.default)((formatValue) => (0, import_ds_utilities.getVisibleTimeByFormat)(formatValue));
54
52
  let inputsContainer = (0, import_react.useRef)();
55
53
  const handleFocus = (e) => {
56
54
  if (!e.target.type) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/TimeInput/TimeInputImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getVisibleTimeByFormat } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { TimeInputs } from './TimeInputs';\n\nconst blockName = 'input-time';\n\nconst InputTimeContainer = aggregatedClasses('div')(blockName);\n\nconst TimeInputImpl = ({\n format,\n innerRef,\n onChange,\n className,\n value,\n disabled,\n clearable,\n 'arial-label': ariaLabel,\n}) => {\n const getVisibleTimeInputs = memoizeOne((formatValue) =>\n getVisibleTimeByFormat(formatValue),\n );\n let inputsContainer = useRef();\n\n const handleFocus = (e) => {\n if (!e.target.type) {\n inputsContainer.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeInputs(format));\n\n return (\n <InputTimeContainer\n className={className}\n disabled={disabled}\n innerRef={innerRef}\n onClick={handleFocus}\n >\n <TimeInputs\n aria-label={ariaLabel}\n clearable={clearable}\n disabled={disabled}\n format={format}\n innerRef={(node) => {\n inputsContainer = node;\n }}\n onChange={onChange}\n time={value}\n {...visibleInputs}\n />\n </InputTimeContainer>\n );\n};\n\nTimeInputImpl.propTypes = {\n containerProps: PropTypes.shape({}),\n /**\n * Inner reference to the input\n */\n innerRef: PropTypes.any,\n /**\n * Classes to add to the container\n */\n className: PropTypes.string,\n /**\n * Styles to add to the container\n */\n style: PropTypes.shape({}),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func,\n /**\n * Valid time format\n */\n format: PropTypes.string,\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string,\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool,\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Aria label to add to the container\n */\n 'aria-label': PropTypes.bool,\n 'arial-label': PropTypes.bool,\n};\n\nexport { TimeInputImpl };\nexport default TimeInputImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyCjB;AAzCN,mBAAuC;AACvC,wBAAsB;AACtB,0BAAuC;AACvC,yBAAuB;AACvB,2BAAkC;AAClC,wBAA2B;AAE3B,MAAM,YAAY;AAElB,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,SAAS;AAE7D,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,2BAAuB,mBAAAA;AAAA,IAAW,CAAC,oBACvC,4CAAuB,WAAW;AAAA,EACpC;AACA,MAAI,sBAAkB,qBAAO;AAE7B,QAAM,cAAc,CAAC,MAAM;AACzB,QAAI,CAAC,EAAE,OAAO,MAAM;AAClB,sBAAgB,cAAc,OAAO,EAAE,MAAM;AAAA,IAC/C;AAAA,EACF;AAEA,QAAM,oBAAgB,sBAAQ,MAAM,qBAAqB,MAAM,CAAC;AAEhE,SACE,4CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IAET,sDAAC;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,SAAS;AAClB,0BAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACL,GAAG;AAAA,KACN;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY;AAAA,EACxB,gBAAgB,kBAAAC,QAAU,MAAM,CAAC,CAAC;AAAA,EAIlC,UAAU,kBAAAA,QAAU;AAAA,EAIpB,WAAW,kBAAAA,QAAU;AAAA,EAIrB,OAAO,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAAA,EAIzB,UAAU,kBAAAA,QAAU;AAAA,EAIpB,QAAQ,kBAAAA,QAAU;AAAA,EAIlB,OAAO,kBAAAA,QAAU;AAAA,EAIjB,WAAW,kBAAAA,QAAU;AAAA,EAIrB,UAAU,kBAAAA,QAAU;AAAA,EAIpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,eAAe,kBAAAA,QAAU;AAC3B;AAGA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getVisibleTimeByFormat } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { TimeInputs } from './TimeInputs';\n\nconst blockName = 'input-time';\n\nconst InputTimeContainer = aggregatedClasses('div')(blockName);\n\nconst TimeInputImpl = ({\n format,\n innerRef,\n onChange,\n className,\n value,\n disabled,\n clearable,\n 'arial-label': ariaLabel,\n}) => {\n const getVisibleTimeInputs = memoizeOne((formatValue) => getVisibleTimeByFormat(formatValue));\n let inputsContainer = useRef();\n\n const handleFocus = (e) => {\n if (!e.target.type) {\n inputsContainer.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeInputs(format));\n\n return (\n <InputTimeContainer className={className} disabled={disabled} innerRef={innerRef} onClick={handleFocus}>\n <TimeInputs\n aria-label={ariaLabel}\n clearable={clearable}\n disabled={disabled}\n format={format}\n innerRef={(node) => {\n inputsContainer = node;\n }}\n onChange={onChange}\n time={value}\n {...visibleInputs}\n />\n </InputTimeContainer>\n );\n};\n\nTimeInputImpl.propTypes = {\n containerProps: PropTypes.shape({}),\n /**\n * Inner reference to the input\n */\n innerRef: PropTypes.any,\n /**\n * Classes to add to the container\n */\n className: PropTypes.string,\n /**\n * Styles to add to the container\n */\n style: PropTypes.shape({}),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func,\n /**\n * Valid time format\n */\n format: PropTypes.string,\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string,\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool,\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Aria label to add to the container\n */\n 'aria-label': PropTypes.bool,\n 'arial-label': PropTypes.bool,\n};\n\nexport { TimeInputImpl };\nexport default TimeInputImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkCjB;AAlCN,mBAAuC;AACvC,wBAAsB;AACtB,0BAAuC;AACvC,yBAAuB;AACvB,2BAAkC;AAClC,wBAA2B;AAE3B,MAAM,YAAY;AAElB,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,SAAS;AAE7D,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,2BAAuB,mBAAAA,SAAW,CAAC,oBAAgB,4CAAuB,WAAW,CAAC;AAC5F,MAAI,sBAAkB,qBAAO;AAE7B,QAAM,cAAc,CAAC,MAAM;AACzB,QAAI,CAAC,EAAE,OAAO,MAAM;AAClB,sBAAgB,cAAc,OAAO,EAAE,MAAM;AAAA,IAC/C;AAAA,EACF;AAEA,QAAM,oBAAgB,sBAAQ,MAAM,qBAAqB,MAAM,CAAC;AAEhE,SACE,4CAAC;AAAA,IAAmB;AAAA,IAAsB;AAAA,IAAoB;AAAA,IAAoB,SAAS;AAAA,IACzF,sDAAC;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,SAAS;AAClB,0BAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACL,GAAG;AAAA,KACN;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY;AAAA,EACxB,gBAAgB,kBAAAC,QAAU,MAAM,CAAC,CAAC;AAAA,EAIlC,UAAU,kBAAAA,QAAU;AAAA,EAIpB,WAAW,kBAAAA,QAAU;AAAA,EAIrB,OAAO,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAAA,EAIzB,UAAU,kBAAAA,QAAU;AAAA,EAIpB,QAAQ,kBAAAA,QAAU;AAAA,EAIlB,OAAO,kBAAAA,QAAU;AAAA,EAIjB,WAAW,kBAAAA,QAAU;AAAA,EAIrB,UAAU,kBAAAA,QAAU;AAAA,EAIpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,eAAe,kBAAAA,QAAU;AAC3B;AAGA,IAAO,wBAAQ;",
6
6
  "names": ["memoizeOne", "PropTypes"]
7
7
  }
@@ -43,7 +43,6 @@ __export(utils_exports, {
43
43
  module.exports = __toCommonJS(utils_exports);
44
44
  var React = __toESM(require("react"));
45
45
  var import_ds_utilities = require("@elliemae/ds-utilities");
46
- var import_ds_utilities2 = require("@elliemae/ds-utilities");
47
46
  var import_ds_shared = require("@elliemae/ds-shared");
48
47
  const isAM = (time) => time && time.hour() < 12;
49
48
  const isArrowIncrementDecrement = (key) => key === import_ds_shared.ARROW_DOWN || key === import_ds_shared.ARROW_UP || key === import_ds_shared.SHIFT;
@@ -99,8 +98,8 @@ const formatHour = (format, value) => {
99
98
  };
100
99
  const formatMeridiem = (format, value) => format.indexOf("A") > -1 ? value.toUpperCase() : value.toLowerCase();
101
100
  const parseTimeNumberFromText = (stringValue) => {
102
- const parsedInt = (0, import_ds_utilities2.parseInt)(stringValue);
103
- if ((0, import_ds_utilities2.isNaN)(parsedInt))
101
+ const parsedInt = (0, import_ds_utilities.parseInt)(stringValue);
102
+ if ((0, import_ds_utilities.isNaN)(parsedInt))
104
103
  return null;
105
104
  return parsedInt;
106
105
  };
@@ -120,8 +119,8 @@ const getValidTimeNumber = ({ min, max }, number, typed) => {
120
119
  if (number === void 0 || number === null)
121
120
  return null;
122
121
  if (number > max) {
123
- if ((0, import_ds_utilities2.isNaN)(typed))
124
- return (0, import_ds_utilities2.parseInt)(typed);
122
+ if ((0, import_ds_utilities.isNaN)(typed))
123
+ return (0, import_ds_utilities.parseInt)(typed);
125
124
  return max;
126
125
  }
127
126
  if (number < min)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/TimeInput/utils.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { addLeadingZeros } from '@elliemae/ds-utilities';\nimport { parseInt, isNaN } from '@elliemae/ds-utilities';\nimport { AM, PM, ARROW_UP, ARROW_DOWN, SHIFT, PLACEHOLDER_TIME } from '@elliemae/ds-shared';\n\nconst isAM = (time) => time && time.hour() < 12;\n\nexport const isArrowIncrementDecrement = (key) => key === ARROW_DOWN || key === ARROW_UP || key === SHIFT;\n\nexport const setNativeValue = (element, value) => {\n if (!Object.getOwnPropertyDescriptor(element, 'value')) return;\n const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set;\n const prototype = Object.getPrototypeOf(element);\n const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set;\n\n if (valueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n valueSetter.call(element, value);\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nexport const placeholderFormat = (position, format, use12Hours) => {\n if (position === PLACEHOLDER_TIME.hour) {\n return _placeholderHour(format, use12Hours);\n }\n if (position === PLACEHOLDER_TIME.minutes) {\n return format.indexOf('mm') > -1 ? 'mm' : 'm';\n }\n if (position === PLACEHOLDER_TIME.seconds) {\n return format.indexOf('ss') > -1 ? 'ss' : 's';\n }\n if (position === PLACEHOLDER_TIME.meridiem) {\n return format.indexOf('A') > -1 ? 'A' : 'a';\n }\n};\n\nconst _placeholderHour = (format, use12Hours) => {\n if (use12Hours) {\n return format.indexOf('hh') > -1 ? 'hh' : 'h';\n }\n return format.indexOf('HH') > -1 ? 'HH' : 'H';\n};\n\nconst formatTimeNumber = (value, shouldAddLeadingZeros) => {\n if (value === null || value === undefined) return '';\n return shouldAddLeadingZeros ? addLeadingZeros(2)(value) : String(value);\n};\n\nexport const formatMinutes = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('mm') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\nexport const formatSeconds = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('ss') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\nexport const formatHour = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('HH') > -1 || format.indexOf('hh') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\n\nexport const formatMeridiem = (format, value) => (format.indexOf('A') > -1 ? value.toUpperCase() : value.toLowerCase());\n\nexport const parseTimeNumberFromText = (stringValue) => {\n const parsedInt = parseInt(stringValue);\n if (isNaN(parsedInt)) return null;\n\n return parsedInt;\n};\n\nexport const focusNextInput = (currentEl) => {\n const nextElement = currentEl.nextElementSibling;\n if (nextElement && nextElement.nextElementSibling) {\n nextElement.nextElementSibling.focus();\n }\n};\n\nexport const focusPreviousInput = (currentEl) => {\n const previousElement = currentEl.previousElementSibling;\n if (previousElement && previousElement.previousElementSibling) {\n previousElement.previousElementSibling.focus();\n }\n};\n\nexport const getValidTimeNumber = ({ min, max }, number, typed) => {\n if (number === undefined || number === null) return null;\n if (number > max) {\n if (isNaN(typed)) return parseInt(typed);\n return max;\n }\n if (number < min) return min;\n return number;\n};\n\nexport const shouldFocusNextInput = (max, number = 0, stringValue) => {\n const safeString = String(stringValue);\n const cleanString = safeString.startsWith('00') ? safeString.slice(1) : safeString;\n return number * 10 > max || String(max).length === cleanString.length;\n};\n\nexport const getTimeValuesFromTime = (time, format, use12Hours) => {\n if (!time || !time.hour) return {};\n const hours = use12Hours ? time.hour() % 12 || 12 : time.hour();\n const minutes = time.minutes();\n const seconds = time.seconds();\n const meridiem = !isAM(time) ? PM : AM;\n\n return {\n hours: formatHour(format, hours),\n minutes: formatMinutes(format, minutes),\n seconds: formatSeconds(format, seconds),\n meridiem,\n };\n};\n\nexport const resetTimeValues = () => ({\n hours: '',\n minutes: '',\n seconds: '',\n meridiem: AM,\n});\n\nexport const commonInputProps = (onKeyDown, onInputFocus, onClick) => ({\n pattern: '[0-9]*',\n type: 'text',\n onKeyDown,\n onClick,\n onFocus: onInputFocus,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAgC;AAChC,IAAAA,uBAAgC;AAChC,uBAAsE;AAEtE,MAAM,OAAO,CAAC,SAAS,QAAQ,KAAK,KAAK,IAAI;AAEtC,MAAM,4BAA4B,CAAC,QAAQ,QAAQ,+BAAc,QAAQ,6BAAY,QAAQ;AAE7F,MAAM,iBAAiB,CAAC,SAAS,UAAU;AAChD,MAAI,CAAC,OAAO,yBAAyB,SAAS,OAAO;AAAG;AACxD,QAAM,cAAc,OAAO,yBAAyB,SAAS,OAAO,EAAE;AACtE,QAAM,YAAY,OAAO,eAAe,OAAO;AAC/C,QAAM,uBAAuB,OAAO,yBAAyB,WAAW,OAAO,EAAE;AAEjF,MAAI,eAAe,gBAAgB,sBAAsB;AACvD,yBAAqB,KA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AAK,QAAQ;AAC7B,QAAM,UAAU,KAAK,QAAQ;AAC7B,QAAM,WAAW,CAAC,KAAK,IAAI,IAAI,sBAAK;AAEpC,SAAO;AAAA,IACL,OAAO,WAAW,QAAQ,KAAK;AAAA,IAC/B,SAAS,cAAc,QAAQ,OAAO;AAAA,IACtC,SAAS,cAAc,QAAQ,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,MAAM,kBAAkB,OAAO;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAEO,MAAM,mBAAmB,CAAC,WAAW,cAAc,aAAa;AAAA,EACrE,SAAS;AAAA,EACT,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA,SAAS;AACX;",
6
- "names": ["import_ds_utilities"]
4
+ "sourcesContent": ["import { addLeadingZeros, parseInt, isNaN } from '@elliemae/ds-utilities';\nimport { AM, PM, ARROW_UP, ARROW_DOWN, SHIFT, PLACEHOLDER_TIME } from '@elliemae/ds-shared';\n\nconst isAM = (time) => time && time.hour() < 12;\n\nexport const isArrowIncrementDecrement = (key) => key === ARROW_DOWN || key === ARROW_UP || key === SHIFT;\n\nexport const setNativeValue = (element, value) => {\n if (!Object.getOwnPropertyDescriptor(element, 'value')) return;\n const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set;\n const prototype = Object.getPrototypeOf(element);\n const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set;\n\n if (valueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n valueSetter.call(element, value);\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nexport const placeholderFormat = (position, format, use12Hours) => {\n if (position === PLACEHOLDER_TIME.hour) {\n return _placeholderHour(format, use12Hours);\n }\n if (position === PLACEHOLDER_TIME.minutes) {\n return format.indexOf('mm') > -1 ? 'mm' : 'm';\n }\n if (position === PLACEHOLDER_TIME.seconds) {\n return format.indexOf('ss') > -1 ? 'ss' : 's';\n }\n if (position === PLACEHOLDER_TIME.meridiem) {\n return format.indexOf('A') > -1 ? 'A' : 'a';\n }\n};\n\nconst _placeholderHour = (format, use12Hours) => {\n if (use12Hours) {\n return format.indexOf('hh') > -1 ? 'hh' : 'h';\n }\n return format.indexOf('HH') > -1 ? 'HH' : 'H';\n};\n\nconst formatTimeNumber = (value, shouldAddLeadingZeros) => {\n if (value === null || value === undefined) return '';\n return shouldAddLeadingZeros ? addLeadingZeros(2)(value) : String(value);\n};\n\nexport const formatMinutes = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('mm') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\nexport const formatSeconds = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('ss') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\nexport const formatHour = (format, value) => {\n const shouldAddLeadingZeros = format.indexOf('HH') > -1 || format.indexOf('hh') > -1;\n return formatTimeNumber(value, shouldAddLeadingZeros);\n};\n\nexport const formatMeridiem = (format, value) => (format.indexOf('A') > -1 ? value.toUpperCase() : value.toLowerCase());\n\nexport const parseTimeNumberFromText = (stringValue) => {\n const parsedInt = parseInt(stringValue);\n if (isNaN(parsedInt)) return null;\n\n return parsedInt;\n};\n\nexport const focusNextInput = (currentEl) => {\n const nextElement = currentEl.nextElementSibling;\n if (nextElement && nextElement.nextElementSibling) {\n nextElement.nextElementSibling.focus();\n }\n};\n\nexport const focusPreviousInput = (currentEl) => {\n const previousElement = currentEl.previousElementSibling;\n if (previousElement && previousElement.previousElementSibling) {\n previousElement.previousElementSibling.focus();\n }\n};\n\nexport const getValidTimeNumber = ({ min, max }, number, typed) => {\n if (number === undefined || number === null) return null;\n if (number > max) {\n if (isNaN(typed)) return parseInt(typed);\n return max;\n }\n if (number < min) return min;\n return number;\n};\n\nexport const shouldFocusNextInput = (max, number = 0, stringValue) => {\n const safeString = String(stringValue);\n const cleanString = safeString.startsWith('00') ? safeString.slice(1) : safeString;\n return number * 10 > max || String(max).length === cleanString.length;\n};\n\nexport const getTimeValuesFromTime = (time, format, use12Hours) => {\n if (!time || !time.hour) return {};\n const hours = use12Hours ? time.hour() % 12 || 12 : time.hour();\n const minutes = time.minutes();\n const seconds = time.seconds();\n const meridiem = !isAM(time) ? PM : AM;\n\n return {\n hours: formatHour(format, hours),\n minutes: formatMinutes(format, minutes),\n seconds: formatSeconds(format, seconds),\n meridiem,\n };\n};\n\nexport const resetTimeValues = () => ({\n hours: '',\n minutes: '',\n seconds: '',\n meridiem: AM,\n});\n\nexport const commonInputProps = (onKeyDown, onInputFocus, onClick) => ({\n pattern: '[0-9]*',\n type: 'text',\n onKeyDown,\n onClick,\n onFocus: onInputFocus,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAiD;AACjD,uBAAsE;AAEtE,MAAM,OAAO,CAAC,SAAS,QAAQ,KAAK,KAAK,IAAI;AAEtC,MAAM,4BAA4B,CAAC,QAAQ,QAAQ,+BAAc,QAAQ,6BAAY,QAAQ;AAE7F,MAAM,iBAAiB,CAAC,SAAS,UAAU;AAChD,MAAI,CAAC,OAAO,yBAAyB,SAAS,OAAO;AAAG;AACxD,QAAM,cAAc,OAAO,yBAAyB,SAAS,OAAO,EAAE;AACtE,QAAM,YAAY,OAAO,eAAe,OAAO;AAC/C,QAAM,uBAAuB,OAAO,yBAAyB,WAAW,OAAO,EAAE;AAEjF,MAAI,eAAe,gBAAgB,sBAAsB;AACvD,yBAAqB,KAAK,SAAS,KAAK;AAAA,EAC1C,OAAO;AACL,gBAAY,KAAK,SAAS,KAAK;AAAA,EACjC;AACA,UAAQ,cAAc,IAAI,MAAM,SAAS,EAAE,SAAS,KAAK,CAAC,CAAC;AAC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AA,IAC/B,SAAS,cAAc,QAAQ,OAAO;AAAA,IACtC,SAAS,cAAc,QAAQ,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,MAAM,kBAAkB,OAAO;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAEO,MAAM,mBAAmB,CAAC,WAAW,cAAc,aAAa;AAAA,EACrE,SAAS;AAAA,EACT,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA,SAAS;AACX;",
6
+ "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Toggle/DSToggleImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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 { DSToggleImpl };\nexport default DSToggleImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiOjB;AAhON,mBAAiC;AACjC,0BAA0E;AAC1E,4BAA+B;AAC/B,mBAAgC;AAEhC,MAAM,qBAAqB,uBAAU;AAAA,EACnC,YAAY,OAAO;AACjB,UAAM,KAAK;AA8Cb,uBAAc,CAAC,YAAY;AACzB,YAAM,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,IAAI,KAAK;AAExE,YAAM,WAAO,mCAAc,SAAS;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AACD,UAAI;AAAM,aAAK,SAAS,EAAE,KAAK,CAAC;AAAA;AAE3B,aAAK,gBAAgB,OAAO;AAAA,IACnC;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAEzB,cAAI,iCAAY,KAAK,KAAK,GAAG;AAC3B,aAAK,SAAS,CAAC;AACf,aAAK,SAAS,6BAAS;AAAA,MAEzB;AAAO,aAAK,gBAAgB,OAAO;AAAA,IACrC;AASA,kBAAS,CAAC,MAAM;AACd,YAAM,EAAE,QAAQ,GAAG,IAAI,KAAK;AAC5B,UAAI;AAAQ,eAAO,GAAG,EAAE;AAAA,IAC1B;AAEA,mBAAU,CAAC,MAAM;AACf,YAAM,EAAE,SAAS,GAAG,IAAI,KAAK;AAC7B,UAAI;AAAS,gBAAQ,GAAG,EAAE;AAAA,IAC5B;AAEA,oBAAW,CAAC,MAAM;AAChB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,MAEF,IA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AK,OAAO,CAAC,KAAK,OAAO,WAAW,CAAC,KAAK,IAAI;AAAS;AAC5E,YAAM;AAAA,QACJ,SAAS,EAAE,aAAa,YAAY;AAAA,MACtC,IAAI,KAAK;AACT,YAAM;AAAA,QACJ,SAAS,EAAE,aAAa,SAAS;AAAA,MACnC,IAAI,KAAK;AACT,UAAI,CAAC,eAAe,CAAC,YAAY,gBAAgB;AAAU;AAC3D,WAAK,SAAS;AAAA,QACZ;AAAA,QACA;AAAA,MACF,CAAC;AACD,WAAK,gBAAgB,eAAe,OAAO,cAAc,OAAO;AAEhE,oBAAc,aAAa;AAAA,IAC7B,GAAG,CAAC;AAAA,EACN;AAAA,EAEA,SAAS;AACP,UAAM,EAAE,SAAS,MAAM,QAAQ,KAAK,IAAI,KAAK;AAC7C,UAAM,YAAY,SAAS,QAAQ,WAAW,KAAK,MAAM,UAAU,EAAE,MAAM,GAAG,SAAS,IAAI;AAC3F,WACE,4CAAC;AAAA,MACE,GAAG,KAAK;AAAA,MACT,cAAc,KAAK,MAAM;AAAA,MACzB;AAAA,MACA,cAAc,KAAK;AAAA,MACnB;AAAA,MACA;AAAA,MACA,SAAS,KAAK;AAAA,MACd;AAAA,MACA,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,MACnB,cAAc,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,YAAY,KAAK;AAAA,MACjB,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,KACrB;AAAA,EAEJ;AACF;AAEA,aAAa,YAAY;AAGzB,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/* 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 ******************************************************\n MouseEvents\n ******************************************************* *\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 ******************************************************\n Touch\n ******************************************************* *\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 { DSToggleImpl };\nexport default DSToggleImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqOjB;AApON,mBAAiC;AACjC,0BAA0E;AAC1E,4BAA+B;AAC/B,mBAAgC;AAEhC,MAAM,qBAAqB,uBAAU;AAAA,EACnC,YAAY,OAAO;AACjB,UAAM,KAAK;AA8Cb,uBAAc,CAAC,YAAY;AACzB,YAAM,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,IAAI,KAAK;AAExE,YAAM,WAAO,mCAAc,SAAS;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AACD,UAAI;AAAM,aAAK,SAAS,EAAE,KAAK,CAAC;AAAA;AAE3B,aA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AAAA,MACzB;AAAA,MACA,cAAc,KAAK;AAAA,MACnB;AAAA,MACA;AAAA,MACA,SAAS,KAAK;AAAA,MACd;AAAA,MACA,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,MACnB,cAAc,KAAK;AAAA,MACnB,eAAe,KAAK;AAAA,MACpB,YAAY,KAAK;AAAA,MACjB,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,KACrB;AAAA,EAEJ;AACF;AAEA,aAAa,YAAY;AAGzB,IAAO,uBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -63,18 +63,18 @@ const DSToggleRender = ({
63
63
  size = "s",
64
64
  defaultState
65
65
  }) => {
66
- const {
67
- cssClassName,
68
- classNameBlock,
69
- classNameElement
70
- } = (0, import_ds_classnames.convertPropToCssClassName)("form-element-toggle", className, {
71
- hasError,
72
- readOnly,
73
- disabled,
74
- checked,
75
- id,
76
- size
77
- });
66
+ const { cssClassName, classNameBlock, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)(
67
+ "form-element-toggle",
68
+ className,
69
+ {
70
+ hasError,
71
+ readOnly,
72
+ disabled,
73
+ checked,
74
+ id,
75
+ size
76
+ }
77
+ );
78
78
  const allowChange = disabled || readOnly;
79
79
  let label = checked ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
80
80
  className: classNameElement("icon-on"),
@@ -96,9 +96,7 @@ const DSToggleRender = ({
96
96
  "aria-disabled": disabled,
97
97
  defaultChecked: checked,
98
98
  defaultValue: value,
99
- ...(0, import_ds_utilities.onClickHandlerForNonInteractiveElements)(
100
- allowChange ? null : onChange
101
- ),
99
+ ...(0, import_ds_utilities.onClickHandlerForNonInteractiveElements)(allowChange ? null : onChange),
102
100
  ref: containerRef,
103
101
  className: `${cssClassName} ${defaultState ? "default-state-checked" : ""}${hide ? " ds-form-element-toggle-hide" : ""}`,
104
102
  onBlur,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Toggle/DSToggleRender.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { onClickHandlerForNonInteractiveElements } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSTooltip } from '@elliemae/ds-tooltip';\n\nconst DSToggleRender = ({\n containerProps,\n id,\n className = '',\n style = {},\n hasError = false,\n hide,\n readOnly = false,\n disabled = false,\n checked = false,\n onBlur = () => null,\n onFocus = () => null,\n onChange = () => null,\n onMouseDown = () => null,\n onMouseEnter = () => null,\n onMouseLeave = () => null,\n onTouchCancel = () => null,\n onTouchEnd = () => null,\n onTouchMove = () => null,\n onTouchStart = () => null,\n labelOn = 'ON',\n labelOff = 'OFF',\n dragStyle = {},\n containerRef = null,\n handRef = null,\n name = '',\n value = '',\n size = 's',\n defaultState,\n}) => {\n const {\n cssClassName,\n classNameBlock,\n classNameElement,\n } = convertPropToCssClassName('form-element-toggle', className, {\n hasError,\n readOnly,\n disabled,\n checked,\n id,\n size,\n });\n const allowChange = disabled || readOnly;\n\n let label = checked ? (\n <div className={classNameElement('icon-on')}>{labelOn}</div>\n ) : (\n <div className={classNameElement('icon-off')}>{labelOff}</div>\n );\n\n if (readOnly) {\n label = (\n <DSTooltip\n interactionType=\"hover\"\n title=\"Read Only\"\n triggerComponent={label}\n />\n );\n }\n\n return (\n <div\n data-testid=\"em-ds-toggle\"\n {...containerProps}\n aria-disabled={disabled}\n defaultChecked={checked}\n defaultValue={value}\n {...onClickHandlerForNonInteractiveElements(\n allowChange ? null : onChange,\n )}\n ref={containerRef}\n className={`${cssClassName} ${\n defaultState ? 'default-state-checked' : ''\n }${hide ? ' ds-form-element-toggle-hide' : ''}`}\n onBlur={onBlur}\n onFocus={onFocus}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n aria-checked={checked}\n role=\"checkbox\"\n tabIndex={0}\n >\n <div className={classNameBlock('box')}>{label}</div>\n <div\n ref={handRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={`${classNameElement('input')} ${\n defaultState ? 'default-state-checked' : ''\n }`}\n onMouseDown={allowChange ? null : onMouseDown}\n onMouseEnter={allowChange ? null : onMouseEnter}\n onMouseLeave={allowChange ? null : onMouseLeave}\n onTouchCancel={allowChange ? null : onTouchCancel}\n onTouchEnd={allowChange ? null : onTouchEnd}\n onTouchMove={allowChange ? null : onTouchMove}\n onTouchStart={allowChange ? null : onTouchStart}\n style={{\n ...style,\n ...dragStyle,\n }}\n />\n <input\n className={classNameElement('hidden-checkbox')}\n defaultChecked={checked}\n defaultValue={value}\n name={name}\n type=\"checkbox\"\n />\n </div>\n );\n};\n\nexport { DSToggleRender };\nexport default DSToggleRender;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoDnB;AAjDJ,0BAAwD;AACxD,2BAA0C;AAC1C,wBAA0B;AAE1B,MAAM,iBAAiB,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,eAAe,MAAM;AAAA,EACrB,gBAAgB,MAAM;AAAA,EACtB,aAAa,MAAM;AAAA,EACnB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY,CAAC;AAAA,EACb,eAAe;AAAA,EACf,UAAU;A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QACjC,aAAa,cAAc,OAAO;AAAA,QAClC,cAAc,cAAc,OAAO;AAAA,QACnC,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,OACF;AAAA,MACA,4CAAC;AAAA,QACC,WAAW,iBAAiB,iBAAiB;AAAA,QAC7C,gBAAgB;AAAA,QAChB,cAAc;AAAA,QACd;AAAA,QACA,MAAK;AAAA,OACP;AAAA;AAAA,GACF;AAEJ;AAGA,IAAO,yBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { onClickHandlerForNonInteractiveElements } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSTooltip } from '@elliemae/ds-tooltip';\n\nconst DSToggleRender = ({\n containerProps,\n id,\n className = '',\n style = {},\n hasError = false,\n hide,\n readOnly = false,\n disabled = false,\n checked = false,\n onBlur = () => null,\n onFocus = () => null,\n onChange = () => null,\n onMouseDown = () => null,\n onMouseEnter = () => null,\n onMouseLeave = () => null,\n onTouchCancel = () => null,\n onTouchEnd = () => null,\n onTouchMove = () => null,\n onTouchStart = () => null,\n labelOn = 'ON',\n labelOff = 'OFF',\n dragStyle = {},\n containerRef = null,\n handRef = null,\n name = '',\n value = '',\n size = 's',\n defaultState,\n}) => {\n const { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'form-element-toggle',\n className,\n {\n hasError,\n readOnly,\n disabled,\n checked,\n id,\n size,\n },\n );\n const allowChange = disabled || readOnly;\n\n let label = checked ? (\n <div className={classNameElement('icon-on')}>{labelOn}</div>\n ) : (\n <div className={classNameElement('icon-off')}>{labelOff}</div>\n );\n\n if (readOnly) {\n label = <DSTooltip interactionType=\"hover\" title=\"Read Only\" triggerComponent={label} />;\n }\n\n return (\n <div\n data-testid=\"em-ds-toggle\"\n {...containerProps}\n aria-disabled={disabled}\n defaultChecked={checked}\n defaultValue={value}\n {...onClickHandlerForNonInteractiveElements(allowChange ? null : onChange)}\n ref={containerRef}\n className={`${cssClassName} ${defaultState ? 'default-state-checked' : ''}${\n hide ? ' ds-form-element-toggle-hide' : ''\n }`}\n onBlur={onBlur}\n onFocus={onFocus}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n aria-checked={checked}\n role=\"checkbox\"\n tabIndex={0}\n >\n <div className={classNameBlock('box')}>{label}</div>\n <div\n ref={handRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={`${classNameElement('input')} ${defaultState ? 'default-state-checked' : ''}`}\n onMouseDown={allowChange ? null : onMouseDown}\n onMouseEnter={allowChange ? null : onMouseEnter}\n onMouseLeave={allowChange ? null : onMouseLeave}\n onTouchCancel={allowChange ? null : onTouchCancel}\n onTouchEnd={allowChange ? null : onTouchEnd}\n onTouchMove={allowChange ? null : onTouchMove}\n onTouchStart={allowChange ? null : onTouchStart}\n style={{\n ...style,\n ...dragStyle,\n }}\n />\n <input\n className={classNameElement('hidden-checkbox')}\n defaultChecked={checked}\n defaultValue={value}\n name={name}\n type=\"checkbox\"\n />\n </div>\n );\n};\n\nexport { DSToggleRender };\nexport default DSToggleRender;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoDnB;AAjDJ,0BAAwD;AACxD,2BAA0C;AAC1C,wBAA0B;AAE1B,MAAM,iBAAiB,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,eAAe,MAAM;AAAA,EACrB,gBAAgB,MAAM;AAAA,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AAA,QACpF,aAAa,cAAc,OAAO;AAAA,QAClC,cAAc,cAAc,OAAO;AAAA,QACnC,cAAc,cAAc,OAAO;AAAA,QACnC,eAAe,cAAc,OAAO;AAAA,QACpC,YAAY,cAAc,OAAO;AAAA,QACjC,aAAa,cAAc,OAAO;AAAA,QAClC,cAAc,cAAc,OAAO;AAAA,QACnC,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,OACF;AAAA,MACA,4CAAC;AAAA,QACC,WAAW,iBAAiB,iBAAiB;AAAA,QAC7C,gBAAgB;AAAA,QAChB,cAAc;AAAA,QACd;AAAA,QACA,MAAK;AAAA,OACP;AAAA;AAAA,GACF;AAEJ;AAGA,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
@@ -31,13 +31,7 @@ __export(toggleHelper_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(toggleHelper_exports);
33
33
  var React = __toESM(require("react"));
34
- const isValidDrag = ({
35
- inside,
36
- circleWidth,
37
- drag,
38
- checked,
39
- boxWidth
40
- }) => {
34
+ const isValidDrag = ({ inside, circleWidth, drag, checked, boxWidth }) => {
41
35
  const difference = boxWidth - circleWidth;
42
36
  return checked ? !inside && -drag > difference / 2 : !inside && drag > boxWidth / 3;
43
37
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Toggle/toggleHelper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const isValidDrag = ({\n inside,\n circleWidth,\n drag,\n checked,\n boxWidth,\n}) => {\n const difference = boxWidth - circleWidth;\n return checked\n ? !inside && -drag > difference / 2\n : !inside && drag > boxWidth / 3;\n};\n\nexport const cleanDrag = () => ({\n startPoint: null,\n isDragging: false,\n});\n\n// eslint-disable-next-line complexity\nexport const calculateDrag = (\n clientX,\n { startPoint, checked, isDragging, boxWidth, circleWidth },\n) => {\n if (!isDragging) return null;\n const move = startPoint - clientX;\n const drag = !checked ? clientX - startPoint : boxWidth - circleWidth - move;\n if (!checked && clientX > 0 && clientX > startPoint && drag < boxWidth * 0.7)\n return drag;\n if (checked && clientX > 0 && clientX < startPoint && move < boxWidth * 0.7)\n return drag;\n return null;\n};\n\nexport const dragStartingPoints = (checked) => ({ circleWidth, boxWidth }) => {\n if (checked) return { drag: boxWidth - circleWidth };\n return {\n drag: 0,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,aAAa,WAAW;AAC9B,SAAO,UACH,CAAC,UAAU,CAAC,OAAO,aAAa,IAChC,CAAC,UAAU,OAAO,WAAW;AACnC;AAEO,MAAM,YAAY,OAAO;AAAA,EAC9B,YAAY;AAAA,EACZ,YAAY;AACd;AAGO,MAAM,gBAAgB,CAC3B,SACA,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,MACtD;AACH,MAAI,CAAC;AAAY,WAAO;AACxB,QAAM,OAAO,aAAa;AAC1B,QAAM,OAAO,CAAC,UAAU,UAAU,aAAa,WAAW,cAAc;AACxE,MAAI,CAAC,WAAW,UAAU,KAAK,UAAU,cAAc,OAAO,WAAW;AACvE,WAAO;AACT,MAAI,WAAW,UAAU,KAAK,UAAU,cAAc,OAAO,WAAW;AACtE,WAAO;AACT,SAAO;AACT;AAEO,MAAM,qBAAqB,CAAC,YAAY,CAAC,EAAE,aAAa,SAAS,MAAM;AAC5E,MAAI;AAAS,WAAO,EAAE,MAAM,WAAW,YAAY;AACnD,SAAO;AAAA,IACL,MAAM;AAAA,EACR;AACF;",
4
+ "sourcesContent": ["export const isValidDrag = ({ inside, circleWidth, drag, checked, boxWidth }) => {\n const difference = boxWidth - circleWidth;\n return checked ? !inside && -drag > difference / 2 : !inside && drag > boxWidth / 3;\n};\n\nexport const cleanDrag = () => ({\n startPoint: null,\n isDragging: false,\n});\n\n// eslint-disable-next-line complexity\nexport const calculateDrag = (clientX, { startPoint, checked, isDragging, boxWidth, circleWidth }) => {\n if (!isDragging) return null;\n const move = startPoint - clientX;\n const drag = !checked ? clientX - startPoint : boxWidth - circleWidth - move;\n if (!checked && clientX > 0 && clientX > startPoint && drag < boxWidth * 0.7) return drag;\n if (checked && clientX > 0 && clientX < startPoint && move < boxWidth * 0.7) return drag;\n return null;\n};\n\nexport const dragStartingPoints =\n (checked) =>\n ({ circleWidth, boxWidth }) => {\n if (checked) return { drag: boxWidth - circleWidth };\n return {\n drag: 0,\n };\n };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,cAAc,CAAC,EAAE,QAAQ,aAAa,MAAM,SAAS,SAAS,MAAM;AAC/E,QAAM,aAAa,WAAW;AAC9B,SAAO,UAAU,CAAC,UAAU,CAAC,OAAO,aAAa,IAAI,CAAC,UAAU,OAAO,WAAW;AACpF;AAEO,MAAM,YAAY,OAAO;AAAA,EAC9B,YAAY;AAAA,EACZ,YAAY;AACd;AAGO,MAAM,gBAAgB,CAAC,SAAS,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,MAAM;AACpG,MAAI,CAAC;AAAY,WAAO;AACxB,QAAM,OAAO,aAAa;AAC1B,QAAM,OAAO,CAAC,UAAU,UAAU,aAAa,WAAW,cAAc;AACxE,MAAI,CAAC,WAAW,UAAU,KAAK,UAAU,cAAc,OAAO,WAAW;AAAK,WAAO;AACrF,MAAI,WAAW,UAAU,KAAK,UAAU,cAAc,OAAO,WAAW;AAAK,WAAO;AACpF,SAAO;AACT;AAEO,MAAM,qBACX,CAAC,YACC,CAAC,EAAE,aAAa,SAAS,MAAM;AAC7B,MAAI;AAAS,WAAO,EAAE,MAAM,WAAW,YAAY;AACnD,SAAO;AAAA,IACL,MAAM;AAAA,EACR;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/CheckboxGroup/DSCheckboxGroup.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSCheckbox } from '../Checkbox';\nimport { props as cprops } from './props';\nimport { defaultProps } from './defaultProps';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={\n context.activeValue && context.activeValue.indexOf(props.value) !== -1\n }\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSCheckboxGroup = ({\n onChange,\n activeValue,\n children,\n disabled,\n orientation,\n truncateText,\n labelProps,\n containerProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group\n activeValue={activeValue}\n disabled={disabled}\n multiple\n onChange={onChange}\n >\n <div\n className={`${baseClass} ${baseClass}--${orientation}`}\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <CheckboxItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div\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\nconst noop = () => null;\n\nDSCheckboxGroup.propTypes = cprops;\nDSCheckboxGroup.defaultProps = defaultProps;\nDSCheckboxGroup.displayName = 'DSCheckboxGroup';\nconst DSCheckboxGroupWithSchema = describe(DSCheckboxGroup);\nDSCheckboxGroupWithSchema.propTypes = cprops;\n\nCheckboxItem.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n};\n\nCheckboxItem.defaultProps = {\n checked: false,\n disabled: false,\n onChange: noop,\n};\n\nexport { DSCheckboxGroup, DSCheckboxGroupWithSchema };\n// export default DSCheckboxGroup;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACgBjB;AAhBN,OAAOA,YAAW;AAClB,OAAO,eAAe;AACtB,SAAS,gBAAgB;AACzB,SAAS,WAAW,aAAa;AACjC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,SAAS,cAAc;AAChC,SAAS,oBAAoB;AAG7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,eAAe,CAAC,UACpB,oBAAC;AAAA,EACC,QAAQ,CAAC,YACP,oBAAC;AAAA,IACE,GAAG;AAAA,IACJ,SACE,QAAQ,eAAe,QAAQ,YAAY,QAAQ,MAAM,KAAK,MAAM;AAAA,IAEtE,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,GACpB;AAAA,CAEJ;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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gB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;AAEtC,aAAa,YAAY;AAAA,EACvB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AACtB;AAEA,aAAa,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AACZ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSCheckbox } from '../Checkbox';\nimport { props as cprops } from './props';\nimport { defaultProps } from './defaultProps';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={context.activeValue && context.activeValue.indexOf(props.value) !== -1}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSCheckboxGroup = ({\n onChange,\n activeValue,\n children,\n disabled,\n orientation,\n truncateText,\n labelProps,\n containerProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} multiple onChange={onChange}>\n <div\n className={`${baseClass} ${baseClass}--${orientation}`}\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <CheckboxItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nconst noop = () => null;\n\nDSCheckboxGroup.propTypes = cprops;\nDSCheckboxGroup.defaultProps = defaultProps;\nDSCheckboxGroup.displayName = 'DSCheckboxGroup';\nconst DSCheckboxGroupWithSchema = describe(DSCheckboxGroup);\nDSCheckboxGroupWithSchema.propTypes = cprops;\n\nCheckboxItem.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n};\n\nCheckboxItem.defaultProps = {\n checked: false,\n disabled: false,\n onChange: noop,\n};\n\nexport { DSCheckboxGroup, DSCheckboxGroupWithSchema };\n// export default DSCheckboxGroup;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgBjB;AAhBN,OAAOA,YAAW;AAClB,OAAO,eAAe;AACtB,SAAS,gBAAgB;AACzB,SAAS,WAAW,aAAa;AACjC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,SAAS,cAAc;AAChC,SAAS,oBAAoB;AAG7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,eAAe,CAAC,UACpB,oBAAC;AAAA,EACC,QAAQ,CAAC,YACP,oBAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS,QAAQ,eAAe,QAAQ,YAAY,QAAQ,MAAM,KAAK,MAAM;AAAA,IAC7E,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,GACpB;AAAA,CAEJ;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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/B,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;AAEtC,aAAa,YAAY;AAAA,EACvB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AACtB;AAEA,aAAa,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AACZ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/ComboBox/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-common/ComboBox';"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-common/ComboBox';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -26,7 +26,7 @@ const customStyles = {
26
26
  "::-webkit-scrollbar": { display: "none" }
27
27
  })
28
28
  };
29
- function ComboBoxFreeSolo({
29
+ const ComboBoxFreeSolo = ({
30
30
  isMulti = false,
31
31
  options = {},
32
32
  value = [],
@@ -42,35 +42,33 @@ function ComboBoxFreeSolo({
42
42
  formatCreateLabel = (val) => `Create ${val}`,
43
43
  maxOptions = void 0,
44
44
  ...rest
45
- }) {
46
- return /* @__PURE__ */ jsx(DSComboBox2, {
47
- ...rest,
48
- isFreeSolo: true,
49
- clearable: true,
50
- isMulti,
51
- value,
52
- options,
53
- keepTypedValue: false,
54
- placeholder,
55
- disabled,
56
- menuIsOpen,
57
- formatCreateLabel,
58
- createOptionPosition: "first",
59
- onChange,
60
- onChangeV2,
61
- onInputChange,
62
- onFocus,
63
- onBlur,
64
- containerProps,
65
- maxOptions,
66
- components: {
67
- MultiValueLabel,
68
- MultiValueRemove,
69
- SingleValue
70
- },
71
- componentsStyle: customStyles
72
- });
73
- }
45
+ }) => /* @__PURE__ */ jsx(DSComboBox2, {
46
+ ...rest,
47
+ isFreeSolo: true,
48
+ clearable: true,
49
+ isMulti,
50
+ value,
51
+ options,
52
+ keepTypedValue: false,
53
+ placeholder,
54
+ disabled,
55
+ menuIsOpen,
56
+ formatCreateLabel,
57
+ createOptionPosition: "first",
58
+ onChange,
59
+ onChangeV2,
60
+ onInputChange,
61
+ onFocus,
62
+ onBlur,
63
+ containerProps,
64
+ maxOptions,
65
+ components: {
66
+ MultiValueLabel,
67
+ MultiValueRemove,
68
+ SingleValue
69
+ },
70
+ componentsStyle: customStyles
71
+ });
74
72
  ComboBoxFreeSolo.propTypes = {
75
73
  containerProps: PropTypes.object,
76
74
  onFocus: PropTypes.func,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/ComboBoxFreeSolo/ComboBoxFreeSolo.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox';\nimport { MultiValueLabel } from './components/MultiValueLabel';\nimport { MultiValueRemove } from './components/MultiValueRemove';\nimport { SingleValue } from './components/SingleValue';\nimport { SingleValueRemove } from './components/SingleValueRemove';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\nfunction ComboBoxFreeSolo({\n isMulti = false,\n options = {},\n value = [],\n onChange = noop,\n onChangeV2 = noop,\n onInputChange = noop,\n onFocus = noop,\n onBlur = noop,\n containerProps = {},\n disabled = false,\n menuIsOpen = false,\n placeholder = 'Select values',\n formatCreateLabel = (val) => `Create ${val}`,\n maxOptions = undefined,\n ...rest\n}) {\n return (\n <DSComboBox2\n {...rest}\n isFreeSolo\n clearable\n isMulti={isMulti}\n value={value}\n options={options}\n keepTypedValue={false}\n placeholder={placeholder}\n disabled={disabled}\n menuIsOpen={menuIsOpen}\n formatCreateLabel={formatCreateLabel}\n createOptionPosition=\"first\"\n onChange={onChange}\n onChangeV2={onChangeV2}\n onInputChange={onInputChange}\n onFocus={onFocus}\n onBlur={onBlur}\n containerProps={containerProps}\n maxOptions={maxOptions}\n components={{\n MultiValueLabel,\n MultiValueRemove,\n SingleValue,\n }}\n componentsStyle={customStyles}\n />\n );\n}\n\nComboBoxFreeSolo.propTypes = {\n containerProps: PropTypes.object,\n /**\n * Allows a function that is triggered once the combo box is focused\n */\n onFocus: PropTypes.func,\n /**\n * Allows a function that is triggered once the combo box loses focus\n */\n onBlur: PropTypes.func,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n */\n onChange: PropTypes.func.isRequired,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n * It will return the current options selected\n */\n onChangeV2: PropTypes.func,\n /**\n * Allows a function that is triggered once the input value changes (on every keystroke)\n */\n onInputChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * Value that the combo box has as default\n */\n options: PropTypes.arrayOf(PropTypes.object),\n /**\n * Whether the combo box is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Whether the combo box free solo is multi selectable or not\n */\n isMulti: PropTypes.bool,\n /**\n * Placeholder for the combo box\n */\n placeholder: PropTypes.string,\n /**\n * Whether the combo box menu is open or not\n */\n menuIsOpen: PropTypes.bool,\n /**\n * Whether to show the combo box menu inline or not\n */\n /**\n * function that reciveves the new value and returns the formatted value\n */\n formatCreateLabel: PropTypes.func,\n /**\n * Max options to be displayed on the menu list\n */\n maxOptions: PropTypes.number,\n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ACV;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,GACnB;AAEJ;AAEA,iBAAiB,YAAY;AAAA,EAC3B,gBAAgB,UAAU;AAAA,EAI1B,SAAS,UAAU;AAAA,EAInB,QAAQ,UAAU;AAAA,EAIlB,UAAU,UAAU,KAAK;AAAA,EAKzB,YAAY,UAAU;AAAA,EAItB,eAAe,UAAU;AAAA,EACzB,OAAO,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC;AAAA,EAI9D,SAAS,UAAU,QAAQ,UAAU,MAAM;AAAA,EAI3C,UAAU,UAAU;AAAA,EAIpB,SAAS,UAAU;AAAA,EAInB,aAAa,UAAU;AAAA,EAIvB,YAAY,UAAU;AAAA,EAOtB,mBAAmB,UAAU;AAAA,EAI7B,YAAY,UAAU;AACxB;AAGA,IAAO,2BAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox';\nimport { MultiValueLabel } from './components/MultiValueLabel';\nimport { MultiValueRemove } from './components/MultiValueRemove';\nimport { SingleValue } from './components/SingleValue';\nimport { SingleValueRemove } from './components/SingleValueRemove';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\nconst ComboBoxFreeSolo = ({\n isMulti = false,\n options = {},\n value = [],\n onChange = noop,\n onChangeV2 = noop,\n onInputChange = noop,\n onFocus = noop,\n onBlur = noop,\n containerProps = {},\n disabled = false,\n menuIsOpen = false,\n placeholder = 'Select values',\n formatCreateLabel = (val) => `Create ${val}`,\n maxOptions = undefined,\n ...rest\n}) => (\n <DSComboBox2\n {...rest}\n isFreeSolo\n clearable\n isMulti={isMulti}\n value={value}\n options={options}\n keepTypedValue={false}\n placeholder={placeholder}\n disabled={disabled}\n menuIsOpen={menuIsOpen}\n formatCreateLabel={formatCreateLabel}\n createOptionPosition=\"first\"\n onChange={onChange}\n onChangeV2={onChangeV2}\n onInputChange={onInputChange}\n onFocus={onFocus}\n onBlur={onBlur}\n containerProps={containerProps}\n maxOptions={maxOptions}\n components={{\n MultiValueLabel,\n MultiValueRemove,\n SingleValue,\n }}\n componentsStyle={customStyles}\n />\n);\n\nComboBoxFreeSolo.propTypes = {\n containerProps: PropTypes.object,\n /**\n * Allows a function that is triggered once the combo box is focused\n */\n onFocus: PropTypes.func,\n /**\n * Allows a function that is triggered once the combo box loses focus\n */\n onBlur: PropTypes.func,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n */\n onChange: PropTypes.func.isRequired,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n * It will return the current options selected\n */\n onChangeV2: PropTypes.func,\n /**\n * Allows a function that is triggered once the input value changes (on every keystroke)\n */\n onInputChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * Value that the combo box has as default\n */\n options: PropTypes.arrayOf(PropTypes.object),\n /**\n * Whether the combo box is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Whether the combo box free solo is multi selectable or not\n */\n isMulti: PropTypes.bool,\n /**\n * Placeholder for the combo box\n */\n placeholder: PropTypes.string,\n /**\n * Whether the combo box menu is open or not\n */\n menuIsOpen: PropTypes.bool,\n /**\n * Whether to show the combo box menu inline or not\n */\n /**\n * function that reciveves the new value and returns the formatted value\n */\n formatCreateLabel: PropTypes.func,\n /**\n * Max options to be displayed on the menu list\n */\n maxOptions: PropTypes.number,\n};\n\nexport { ComboBoxFreeSolo };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,EACF;AAAA,EACA,iBAAiB;AAAA,CACnB;AAGF,iBAAiB,YAAY;AAAA,EAC3B,gBAAgB,UAAU;AAAA,EAI1B,SAAS,UAAU;AAAA,EAInB,QAAQ,UAAU;AAAA,EAIlB,UAAU,UAAU,KAAK;AAAA,EAKzB,YAAY,UAAU;AAAA,EAItB,eAAe,UAAU;AAAA,EACzB,OAAO,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,MAAM,CAAC;AAAA,EAI9D,SAAS,UAAU,QAAQ,UAAU,MAAM;AAAA,EAI3C,UAAU,UAAU;AAAA,EAIpB,SAAS,UAAU;AAAA,EAInB,aAAa,UAAU;AAAA,EAIvB,YAAY,UAAU;AAAA,EAOtB,mBAAmB,UAAU;AAAA,EAI7B,YAAY,UAAU;AACxB;AAGA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/ComboBoxFreeSolo/components/MultiValueLabel.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst RemovablePillWrapper = styled.div`\n display: flex;\n align-items: center;\n outline: none;\n height: ${(props) => props.theme.space.xs};\n max-width: 90%;\n margin: 0;\n padding: 0 4px;\n background-color: ${(props) => props.theme.colors.brand[200]};\n border-top-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n & + div {\n border-top-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n }\n`;\n\nconst PillLabel = styled.span`\n margin: 0 4px;\n color: ${(props) => props.theme.colors.neutral[800]};\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst RemovablePill = ({ label, clear }) => (\n <>\n <RemovablePillWrapper data-testid=\"pill-wrapper\">\n <PillLabel>{label}</PillLabel>\n </RemovablePillWrapper>\n {clear}\n </>\n);\n\nconst MultiValueLabel = ({ children, clear }) => (\n <RemovablePill label={children} clear={clear} />\n);\n\nexport { MultiValueLabel };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8BrB,mBAEI,KAFJ;AA5BF,SAAS,cAAc;AAEvB,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,sBAInB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA,4BAC9B,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,+BACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,+BAEvC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,kCACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAIzE,MAAM,YAAY,OAAO;AAAA;AAAA,WAEd,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMjD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,MACpC;AAAA,EACE;AAAA,wBAAC;AAAA,MAAqB,eAAY;AAAA,MAChC,8BAAC;AAAA,QAAW;AAAA,OAAM;AAAA,KACpB;AAAA,IACC;AAAA;AAAA,CACH;AAGF,MAAM,kBAAkB,CAAC,EAAE,UAAU,MAAM,MACzC,oBAAC;AAAA,EAAc,OAAO;AAAA,EAAU;AAAA,CAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst RemovablePillWrapper = styled.div`\n display: flex;\n align-items: center;\n outline: none;\n height: ${(props) => props.theme.space.xs};\n max-width: 90%;\n margin: 0;\n padding: 0 4px;\n background-color: ${(props) => props.theme.colors.brand[200]};\n border-top-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n & + div {\n border-top-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n }\n`;\n\nconst PillLabel = styled.span`\n margin: 0 4px;\n color: ${(props) => props.theme.colors.neutral[800]};\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst RemovablePill = ({ label, clear }) => (\n <>\n <RemovablePillWrapper data-testid=\"pill-wrapper\">\n <PillLabel>{label}</PillLabel>\n </RemovablePillWrapper>\n {clear}\n </>\n);\n\nconst MultiValueLabel = ({ children, clear }) => <RemovablePill label={children} clear={clear} />;\n\nexport { MultiValueLabel };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8BrB,mBAEI,KAFJ;AA5BF,SAAS,cAAc;AAEvB,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,sBAInB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA,4BAC9B,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,+BACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,+BAEvC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,kCACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAIzE,MAAM,YAAY,OAAO;AAAA;AAAA,WAEd,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMjD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,MACpC;AAAA,EACE;AAAA,wBAAC;AAAA,MAAqB,eAAY;AAAA,MAChC,8BAAC;AAAA,QAAW;AAAA,OAAM;AAAA,KACpB;AAAA,IACC;AAAA;AAAA,CACH;AAGF,MAAM,kBAAkB,CAAC,EAAE,UAAU,MAAM,MAAM,oBAAC;AAAA,EAAc,OAAO;AAAA,EAAU;AAAA,CAAc;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/ComboBoxFreeSolo/components/SingleValue.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove';\nimport { MultiValueLabel } from './MultiValueLabel';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return (\n <MultiValueLabel clear={<SingleValueRemove {...props} />}>\n {children}\n </MultiValueLabel>\n );\n};\n\nexport { SingleValue };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACQK;AAP5B,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAEhC,MAAM,cAAc,CAAC,UAAU;AAE7B,QAAM,EAAE,SAAS,IAAI;AACrB,SACE,oBAAC;AAAA,IAAgB,OAAO,oBAAC;AAAA,MAAmB,GAAG;AAAA,KAAO;AAAA,IACnD;AAAA,GACH;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove';\nimport { MultiValueLabel } from './MultiValueLabel';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return <MultiValueLabel clear={<SingleValueRemove {...props} />}>{children}</MultiValueLabel>;\n};\n\nexport { SingleValue };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACOU;AANjC,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAEhC,MAAM,cAAc,CAAC,UAAU;AAE7B,QAAM,EAAE,SAAS,IAAI;AACrB,SAAO,oBAAC;AAAA,IAAgB,OAAO,oBAAC;AAAA,MAAmB,GAAG;AAAA,KAAO;AAAA,IAAK;AAAA,GAAS;AAC7E;",
6
6
  "names": []
7
7
  }