@bigbinary/neetoui 6.7.4 → 6.8.0

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 (296) hide show
  1. package/dist/Accordion.js +5 -6
  2. package/dist/Accordion.js.map +1 -1
  3. package/dist/ActionDropdown.js +16 -11
  4. package/dist/ActionDropdown.js.map +1 -1
  5. package/dist/Alert.js +23 -13
  6. package/dist/Alert.js.map +1 -1
  7. package/dist/Avatar.js +6 -6
  8. package/dist/Button.js +7 -8
  9. package/dist/Button.js.map +1 -1
  10. package/dist/Callout.js +4 -5
  11. package/dist/Callout.js.map +1 -1
  12. package/dist/Checkbox.js +22 -13
  13. package/dist/Checkbox.js.map +1 -1
  14. package/dist/ColorPicker.js +20 -14
  15. package/dist/ColorPicker.js.map +1 -1
  16. package/dist/DatePicker.js +21 -12
  17. package/dist/DatePicker.js.map +1 -1
  18. package/dist/DateTimePicker.js +27 -17
  19. package/dist/DateTimePicker.js.map +1 -1
  20. package/dist/Dropdown.js +18 -13
  21. package/dist/Dropdown.js.map +1 -1
  22. package/dist/Input.js +21 -12
  23. package/dist/Input.js.map +1 -1
  24. package/dist/Kbd.js +6 -6
  25. package/dist/Label.js +54 -18
  26. package/dist/Label.js.map +1 -1
  27. package/dist/Modal.js +23 -13
  28. package/dist/Modal.js.map +1 -1
  29. package/dist/MultiEmailInput.js +41 -16
  30. package/dist/MultiEmailInput.js.map +1 -1
  31. package/dist/NoData.js +7 -8
  32. package/dist/NoData.js.map +1 -1
  33. package/dist/Pagination.js +15 -10
  34. package/dist/Pagination.js.map +1 -1
  35. package/dist/Pane.js +23 -13
  36. package/dist/Pane.js.map +1 -1
  37. package/dist/Popover.js +7 -8
  38. package/dist/Popover.js.map +1 -1
  39. package/dist/ProgressBar.js +1 -1
  40. package/dist/Radio.js +22 -13
  41. package/dist/Radio.js.map +1 -1
  42. package/dist/Select.js +42 -14
  43. package/dist/Select.js.map +1 -1
  44. package/dist/Sidebar.js +16 -11
  45. package/dist/Sidebar.js.map +1 -1
  46. package/dist/Slider.js +22 -13
  47. package/dist/Slider.js.map +1 -1
  48. package/dist/Spinner.js +1 -1
  49. package/dist/Stepper.js +1 -1
  50. package/dist/Switch.js +22 -13
  51. package/dist/Switch.js.map +1 -1
  52. package/dist/Tab.js +4 -5
  53. package/dist/Tab.js.map +1 -1
  54. package/dist/Table.js +19 -14
  55. package/dist/Table.js.map +1 -1
  56. package/dist/Tag.js +3 -3
  57. package/dist/Textarea.js +22 -13
  58. package/dist/Textarea.js.map +1 -1
  59. package/dist/TimePicker.js +22 -13
  60. package/dist/TimePicker.js.map +1 -1
  61. package/dist/TimePickerInput.js +258 -21
  62. package/dist/TimePickerInput.js.map +1 -1
  63. package/dist/Toastr.js +15 -126
  64. package/dist/Toastr.js.map +1 -1
  65. package/dist/Tooltip.js +73 -7
  66. package/dist/Tooltip.js.map +1 -1
  67. package/dist/Tree.js +13 -8
  68. package/dist/Tree.js.map +1 -1
  69. package/dist/TreeSelect.js +21 -11
  70. package/dist/TreeSelect.js.map +1 -1
  71. package/dist/Typography.js +4 -5
  72. package/dist/Typography.js.map +1 -1
  73. package/dist/cjs/Accordion.js +25 -21
  74. package/dist/cjs/Accordion.js.map +1 -1
  75. package/dist/cjs/ActionDropdown.js +24 -16
  76. package/dist/cjs/ActionDropdown.js.map +1 -1
  77. package/dist/cjs/Alert.js +25 -14
  78. package/dist/cjs/Alert.js.map +1 -1
  79. package/dist/cjs/Avatar.js +17 -13
  80. package/dist/cjs/Avatar.js.map +1 -1
  81. package/dist/cjs/Button.js +17 -14
  82. package/dist/cjs/Button.js.map +1 -1
  83. package/dist/cjs/Callout.js +11 -8
  84. package/dist/cjs/Callout.js.map +1 -1
  85. package/dist/cjs/Checkbox.js +32 -20
  86. package/dist/cjs/Checkbox.js.map +1 -1
  87. package/dist/cjs/ColorPicker.js +33 -22
  88. package/dist/cjs/ColorPicker.js.map +1 -1
  89. package/dist/cjs/DatePicker.js +35 -21
  90. package/dist/cjs/DatePicker.js.map +1 -1
  91. package/dist/cjs/DateTimePicker.js +45 -29
  92. package/dist/cjs/DateTimePicker.js.map +1 -1
  93. package/dist/cjs/Dropdown.js +50 -39
  94. package/dist/cjs/Dropdown.js.map +1 -1
  95. package/dist/cjs/Input.js +39 -25
  96. package/dist/cjs/Input.js.map +1 -1
  97. package/dist/cjs/Kbd.js +13 -10
  98. package/dist/cjs/Kbd.js.map +1 -1
  99. package/dist/cjs/Label.js +61 -21
  100. package/dist/cjs/Label.js.map +1 -1
  101. package/dist/cjs/Modal.js +36 -21
  102. package/dist/cjs/Modal.js.map +1 -1
  103. package/dist/cjs/MultiEmailInput.js +71 -39
  104. package/dist/cjs/MultiEmailInput.js.map +1 -1
  105. package/dist/cjs/NoData.js +15 -13
  106. package/dist/cjs/NoData.js.map +1 -1
  107. package/dist/cjs/Pagination.js +24 -17
  108. package/dist/cjs/Pagination.js.map +1 -1
  109. package/dist/cjs/Pane.js +36 -21
  110. package/dist/cjs/Pane.js.map +1 -1
  111. package/dist/cjs/Popover.js +14 -12
  112. package/dist/cjs/Popover.js.map +1 -1
  113. package/dist/cjs/ProgressBar.js +3 -2
  114. package/dist/cjs/ProgressBar.js.map +1 -1
  115. package/dist/cjs/Radio.js +39 -25
  116. package/dist/cjs/Radio.js.map +1 -1
  117. package/dist/cjs/Select.js +91 -54
  118. package/dist/cjs/Select.js.map +1 -1
  119. package/dist/cjs/Sidebar.js +38 -28
  120. package/dist/cjs/Sidebar.js.map +1 -1
  121. package/dist/cjs/Slider.js +29 -17
  122. package/dist/cjs/Slider.js.map +1 -1
  123. package/dist/cjs/Spinner.js +3 -2
  124. package/dist/cjs/Spinner.js.map +1 -1
  125. package/dist/cjs/Stepper.js +7 -6
  126. package/dist/cjs/Stepper.js.map +1 -1
  127. package/dist/cjs/Switch.js +35 -23
  128. package/dist/cjs/Switch.js.map +1 -1
  129. package/dist/cjs/Tab.js +15 -12
  130. package/dist/cjs/Tab.js.map +1 -1
  131. package/dist/cjs/Table.js +55 -44
  132. package/dist/cjs/Table.js.map +1 -1
  133. package/dist/cjs/Tag.js +10 -7
  134. package/dist/cjs/Tag.js.map +1 -1
  135. package/dist/cjs/Textarea.js +38 -24
  136. package/dist/cjs/Textarea.js.map +1 -1
  137. package/dist/cjs/TimePicker.js +31 -18
  138. package/dist/cjs/TimePicker.js.map +1 -1
  139. package/dist/cjs/TimePickerInput.js +268 -22
  140. package/dist/cjs/TimePickerInput.js.map +1 -1
  141. package/dist/cjs/Toastr.js +32 -155
  142. package/dist/cjs/Toastr.js.map +1 -1
  143. package/dist/cjs/Tooltip.js +78 -8
  144. package/dist/cjs/Tooltip.js.map +1 -1
  145. package/dist/cjs/Tree.js +20 -12
  146. package/dist/cjs/Tree.js.map +1 -1
  147. package/dist/cjs/TreeSelect.js +30 -16
  148. package/dist/cjs/TreeSelect.js.map +1 -1
  149. package/dist/cjs/Typography.js +11 -8
  150. package/dist/cjs/Typography.js.map +1 -1
  151. package/dist/cjs/formik/ActionBlock.js +12 -11
  152. package/dist/cjs/formik/ActionBlock.js.map +1 -1
  153. package/dist/cjs/formik/BlockNavigation.js +29 -16
  154. package/dist/cjs/formik/BlockNavigation.js.map +1 -1
  155. package/dist/cjs/formik/Button.js +11 -10
  156. package/dist/cjs/formik/Button.js.map +1 -1
  157. package/dist/cjs/formik/Checkbox.js +28 -16
  158. package/dist/cjs/formik/Checkbox.js.map +1 -1
  159. package/dist/cjs/formik/Form.js +29 -24
  160. package/dist/cjs/formik/Form.js.map +1 -1
  161. package/dist/cjs/formik/Input.js +27 -15
  162. package/dist/cjs/formik/Input.js.map +1 -1
  163. package/dist/cjs/formik/MultiEmailInput.js +47 -15
  164. package/dist/cjs/formik/MultiEmailInput.js.map +1 -1
  165. package/dist/cjs/formik/Radio.js +31 -18
  166. package/dist/cjs/formik/Radio.js.map +1 -1
  167. package/dist/cjs/formik/Select.js +48 -16
  168. package/dist/cjs/formik/Select.js.map +1 -1
  169. package/dist/cjs/formik/Slider.js +31 -18
  170. package/dist/cjs/formik/Slider.js.map +1 -1
  171. package/dist/cjs/formik/Switch.js +28 -16
  172. package/dist/cjs/formik/Switch.js.map +1 -1
  173. package/dist/cjs/formik/Textarea.js +28 -16
  174. package/dist/cjs/formik/Textarea.js.map +1 -1
  175. package/dist/cjs/formik/TreeSelect.js +27 -14
  176. package/dist/cjs/formik/TreeSelect.js.map +1 -1
  177. package/dist/cjs/formik/index.js +45 -16
  178. package/dist/cjs/formik/index.js.map +1 -1
  179. package/dist/cjs/index-f2e36d91.js +167 -0
  180. package/dist/cjs/index-f2e36d91.js.map +1 -0
  181. package/dist/cjs/index.css +1 -1
  182. package/dist/cjs/index.js +49 -20
  183. package/dist/cjs/index.js.map +1 -1
  184. package/dist/cjs/layouts.js +16 -11
  185. package/dist/cjs/layouts.js.map +1 -1
  186. package/dist/cjs/managers.js +2 -2
  187. package/dist/cjs/overlayManager.js +9 -4
  188. package/dist/cjs/overlayManager.js.map +1 -1
  189. package/dist/cjs/{react-select-creatable.esm-b39742a3.js → react-select-creatable.esm-23eddf9f.js} +130 -367
  190. package/dist/cjs/react-select-creatable.esm-23eddf9f.js.map +1 -0
  191. package/dist/cjs/{useOverlayManager-359ed795.js → useOverlayManager-1de0435e.js} +37 -75
  192. package/dist/cjs/useOverlayManager-1de0435e.js.map +1 -0
  193. package/dist/cjs/{useQueryParams-14f054b3.js → useQueryParams-a8ee2f76.js} +9 -5
  194. package/dist/cjs/useQueryParams-a8ee2f76.js.map +1 -0
  195. package/dist/formik/ActionBlock.js +7 -8
  196. package/dist/formik/ActionBlock.js.map +1 -1
  197. package/dist/formik/BlockNavigation.js +23 -13
  198. package/dist/formik/BlockNavigation.js.map +1 -1
  199. package/dist/formik/Button.js +7 -8
  200. package/dist/formik/Button.js.map +1 -1
  201. package/dist/formik/Checkbox.js +22 -13
  202. package/dist/formik/Checkbox.js.map +1 -1
  203. package/dist/formik/Form.js +13 -14
  204. package/dist/formik/Form.js.map +1 -1
  205. package/dist/formik/Input.js +21 -12
  206. package/dist/formik/Input.js.map +1 -1
  207. package/dist/formik/MultiEmailInput.js +41 -12
  208. package/dist/formik/MultiEmailInput.js.map +1 -1
  209. package/dist/formik/Radio.js +23 -14
  210. package/dist/formik/Radio.js.map +1 -1
  211. package/dist/formik/Select.js +40 -12
  212. package/dist/formik/Select.js.map +1 -1
  213. package/dist/formik/Slider.js +23 -14
  214. package/dist/formik/Slider.js.map +1 -1
  215. package/dist/formik/Switch.js +22 -13
  216. package/dist/formik/Switch.js.map +1 -1
  217. package/dist/formik/Textarea.js +22 -13
  218. package/dist/formik/Textarea.js.map +1 -1
  219. package/dist/formik/TreeSelect.js +21 -11
  220. package/dist/formik/TreeSelect.js.map +1 -1
  221. package/dist/formik/index.js +45 -16
  222. package/dist/formik/index.js.map +1 -1
  223. package/dist/index-9d5142b4.js +145 -0
  224. package/dist/index-9d5142b4.js.map +1 -0
  225. package/dist/index.css +1 -1
  226. package/dist/index.js +47 -18
  227. package/dist/index.js.map +1 -1
  228. package/dist/layouts.js +16 -11
  229. package/dist/layouts.js.map +1 -1
  230. package/dist/managers.js +2 -2
  231. package/dist/overlayManager.js +2 -2
  232. package/dist/{react-select-creatable.esm-93affeca.js → react-select-creatable.esm-ad71b0c0.js} +43 -289
  233. package/dist/react-select-creatable.esm-ad71b0c0.js.map +1 -0
  234. package/dist/{useOverlayManager-95a474d5.js → useOverlayManager-9d385819.js} +9 -54
  235. package/dist/useOverlayManager-9d385819.js.map +1 -0
  236. package/dist/{useQueryParams-4e7ddcf8.js → useQueryParams-dcb34865.js} +4 -4
  237. package/dist/{useQueryParams-4e7ddcf8.js.map → useQueryParams-dcb34865.js.map} +1 -1
  238. package/package.json +13 -6
  239. package/types/Label.d.ts +7 -0
  240. package/dist/cjs/createClass-80e17c6a.js +0 -31
  241. package/dist/cjs/createClass-80e17c6a.js.map +0 -1
  242. package/dist/cjs/defineProperty-ee86604b.js +0 -21
  243. package/dist/cjs/defineProperty-ee86604b.js.map +0 -1
  244. package/dist/cjs/extends-1b35a664.js +0 -19
  245. package/dist/cjs/extends-1b35a664.js.map +0 -1
  246. package/dist/cjs/index-302c3d37.js +0 -58
  247. package/dist/cjs/index-302c3d37.js.map +0 -1
  248. package/dist/cjs/index-5d74cfeb.js +0 -375
  249. package/dist/cjs/index-5d74cfeb.js.map +0 -1
  250. package/dist/cjs/index-6e09c7bc.js +0 -2211
  251. package/dist/cjs/index-6e09c7bc.js.map +0 -1
  252. package/dist/cjs/index-773961dd.js +0 -453
  253. package/dist/cjs/index-773961dd.js.map +0 -1
  254. package/dist/cjs/index-a8cc581e.js +0 -2383
  255. package/dist/cjs/index-a8cc581e.js.map +0 -1
  256. package/dist/cjs/index-becc6543.js +0 -262
  257. package/dist/cjs/index-becc6543.js.map +0 -1
  258. package/dist/cjs/objectWithoutProperties-2fed2d7d.js +0 -33
  259. package/dist/cjs/objectWithoutProperties-2fed2d7d.js.map +0 -1
  260. package/dist/cjs/react-select-creatable.esm-b39742a3.js.map +0 -1
  261. package/dist/cjs/slicedToArray-732a2048.js +0 -63
  262. package/dist/cjs/slicedToArray-732a2048.js.map +0 -1
  263. package/dist/cjs/toConsumableArray-418424fc.js +0 -23
  264. package/dist/cjs/toConsumableArray-418424fc.js.map +0 -1
  265. package/dist/cjs/toPropertyKey-bfa2e465.js +0 -31
  266. package/dist/cjs/toPropertyKey-bfa2e465.js.map +0 -1
  267. package/dist/cjs/useOverlayManager-359ed795.js.map +0 -1
  268. package/dist/cjs/useQueryParams-14f054b3.js.map +0 -1
  269. package/dist/createClass-601a36b2.js +0 -28
  270. package/dist/createClass-601a36b2.js.map +0 -1
  271. package/dist/defineProperty-e5245270.js +0 -19
  272. package/dist/defineProperty-e5245270.js.map +0 -1
  273. package/dist/extends-093996c9.js +0 -17
  274. package/dist/extends-093996c9.js.map +0 -1
  275. package/dist/index-34956d66.js +0 -372
  276. package/dist/index-34956d66.js.map +0 -1
  277. package/dist/index-3659771d.js +0 -56
  278. package/dist/index-3659771d.js.map +0 -1
  279. package/dist/index-661b9fd6.js +0 -253
  280. package/dist/index-661b9fd6.js.map +0 -1
  281. package/dist/index-7fae3611.js +0 -2381
  282. package/dist/index-7fae3611.js.map +0 -1
  283. package/dist/index-c442518b.js +0 -445
  284. package/dist/index-c442518b.js.map +0 -1
  285. package/dist/index-c8d9113c.js +0 -2193
  286. package/dist/index-c8d9113c.js.map +0 -1
  287. package/dist/objectWithoutProperties-a0edb288.js +0 -31
  288. package/dist/objectWithoutProperties-a0edb288.js.map +0 -1
  289. package/dist/react-select-creatable.esm-93affeca.js.map +0 -1
  290. package/dist/slicedToArray-45fa766e.js +0 -57
  291. package/dist/slicedToArray-45fa766e.js.map +0 -1
  292. package/dist/toConsumableArray-1186e144.js +0 -20
  293. package/dist/toConsumableArray-1186e144.js.map +0 -1
  294. package/dist/toPropertyKey-bdc24cb9.js +0 -28
  295. package/dist/toPropertyKey-bdc24cb9.js.map +0 -1
  296. package/dist/useOverlayManager-95a474d5.js.map +0 -1
package/dist/cjs/Label.js CHANGED
@@ -1,23 +1,33 @@
1
1
  'use strict';
2
2
 
3
- var _extends = require('./extends-1b35a664.js');
4
- var defineProperty = require('./defineProperty-ee86604b.js');
5
- var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
3
+ var _extends = require('@babel/runtime/helpers/extends');
4
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
6
  var React = require('react');
7
- var index = require('./index-302c3d37.js');
7
+ var classnames = require('classnames');
8
8
  var neetoIcons = require('@bigbinary/neeto-icons');
9
- var Tooltip = require('./index-773961dd.js');
10
- require('./toPropertyKey-bfa2e465.js');
11
- require('./slicedToArray-732a2048.js');
9
+ var Button = require('./Button.js');
10
+ var Popover = require('./Popover.js');
11
+ var Tooltip = require('./Tooltip.js');
12
+ var Typography = require('./Typography.js');
13
+ require('react-router-dom');
14
+ require('./motion-a1906aff.js');
15
+ require('@babel/runtime/helpers/slicedToArray');
16
+ require('@tippyjs/react');
12
17
  require('tippy.js');
13
- require('react-dom');
14
18
 
15
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
20
 
21
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
22
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
23
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
17
24
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
18
26
 
19
27
  var _excluded = ["children", "className", "required", "helpIconProps"],
20
- _excluded2 = ["onClick", "icon", "tooltipProps", "className"];
28
+ _excluded2 = ["onClick", "icon", "tooltipProps", "popoverProps", "className"],
29
+ _excluded3 = ["title", "description", "helpLinkProps"];
30
+ var Title = Popover.Title;
21
31
  var Label = function Label(_ref) {
22
32
  var children = _ref.children,
23
33
  _ref$className = _ref.className,
@@ -26,26 +36,56 @@ var Label = function Label(_ref) {
26
36
  required = _ref$required === void 0 ? false : _ref$required,
27
37
  _ref$helpIconProps = _ref.helpIconProps,
28
38
  helpIconProps = _ref$helpIconProps === void 0 ? null : _ref$helpIconProps,
29
- otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
39
+ otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
30
40
  var _ref2 = helpIconProps || {},
31
41
  onClick = _ref2.onClick,
32
42
  icon = _ref2.icon,
33
43
  tooltipProps = _ref2.tooltipProps,
44
+ popoverProps = _ref2.popoverProps,
34
45
  helpIconClassName = _ref2.className,
35
- otherHelpIconProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
46
+ otherHelpIconProps = _objectWithoutProperties__default["default"](_ref2, _excluded2);
47
+ var _ref3 = popoverProps || {},
48
+ title = _ref3.title,
49
+ description = _ref3.description,
50
+ helpLinkProps = _ref3.helpLinkProps,
51
+ otherPopoverProps = _objectWithoutProperties__default["default"](_ref3, _excluded3);
36
52
  var HelpIcon = icon || neetoIcons.Help;
37
- return /*#__PURE__*/React__default["default"].createElement("label", _extends._extends({
38
- className: index.classnames("neeto-ui-label neeto-ui-flex neeto-ui-items-center", className)
53
+ var popoverReferenceElement = React.useRef();
54
+ var renderHelpIcon = function renderHelpIcon() {
55
+ return /*#__PURE__*/React__default["default"].createElement("span", {
56
+ onClick: onClick,
57
+ ref: popoverProps ? popoverReferenceElement : undefined,
58
+ className: classnames__default["default"]("neeto-ui-label__help-icon-wrap", _defineProperty__default["default"]({}, helpIconClassName, helpIconClassName))
59
+ }, /*#__PURE__*/React__default["default"].createElement(HelpIcon, _extends__default["default"]({
60
+ size: 16
61
+ }, otherHelpIconProps)));
62
+ };
63
+ return /*#__PURE__*/React__default["default"].createElement("label", _extends__default["default"]({
64
+ className: classnames__default["default"]("neeto-ui-label neeto-ui-flex neeto-ui-items-center", className)
39
65
  }, otherProps), children, required && /*#__PURE__*/React__default["default"].createElement("span", {
40
66
  "aria-hidden": true
41
- }, "*"), helpIconProps && /*#__PURE__*/React__default["default"].createElement(Tooltip.Tooltip, _extends._extends({}, tooltipProps, {
42
- disabled: !tooltipProps
43
- }), /*#__PURE__*/React__default["default"].createElement("span", {
44
- onClick: onClick,
45
- className: index.classnames("neeto-ui-label__help-icon-wrap", defineProperty._defineProperty({}, helpIconClassName, helpIconClassName))
46
- }, /*#__PURE__*/React__default["default"].createElement(HelpIcon, _extends._extends({
47
- size: 16
48
- }, otherHelpIconProps)))));
67
+ }, "*"), helpIconProps && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, tooltipProps ? /*#__PURE__*/React__default["default"].createElement(Tooltip, tooltipProps, renderHelpIcon()) : popoverProps ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, renderHelpIcon(), /*#__PURE__*/React__default["default"].createElement(Popover, _extends__default["default"]({
68
+ reference: popoverReferenceElement
69
+ }, otherPopoverProps), /*#__PURE__*/React__default["default"].createElement("div", {
70
+ className: "flex flex-col"
71
+ }, title && /*#__PURE__*/React__default["default"].createElement(Title, {
72
+ "data-cy": "help-popover-title",
73
+ "data-testid": "help-popover-title"
74
+ }, title), typeof description === "string" ? /*#__PURE__*/React__default["default"].createElement(Typography, {
75
+ "data-cy": "help-popover-description",
76
+ "data-testid": "help-popover-description",
77
+ lineHeight: "normal",
78
+ style: "body2",
79
+ weight: "normal"
80
+ }, description) : description, helpLinkProps && /*#__PURE__*/React__default["default"].createElement(Button, _extends__default["default"]({
81
+ className: "neeto-ui-mt-3",
82
+ "data-cy": "help-popover-link-button",
83
+ size: "small"
84
+ }, helpLinkProps, {
85
+ "data-testid": "help-popover-link-button",
86
+ style: "link",
87
+ target: "_blank"
88
+ }))))) : renderHelpIcon()));
49
89
  };
50
90
 
51
91
  module.exports = Label;
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sources":["../../src/components/Label.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Label = ({\n children,\n className = \"\",\n required = false,\n helpIconProps = null,\n ...otherProps\n}) => {\n const {\n onClick,\n icon,\n tooltipProps,\n className: helpIconClassName,\n ...otherHelpIconProps\n } = helpIconProps || {};\n\n const HelpIcon = icon || Help;\n\n return (\n <label\n className={classnames(\n \"neeto-ui-label neeto-ui-flex neeto-ui-items-center\",\n className\n )}\n {...otherProps}\n >\n {children}\n {required && <span aria-hidden>*</span>}\n {helpIconProps && (\n <Tooltip {...tooltipProps} disabled={!tooltipProps}>\n <span\n {...{ onClick }}\n className={classnames(\"neeto-ui-label__help-icon-wrap\", {\n [helpIconClassName]: helpIconClassName,\n })}\n >\n <HelpIcon size={16} {...otherHelpIconProps} />\n </span>\n </Tooltip>\n )}\n </label>\n );\n};\n\nLabel.propTypes = {\n /**\n * To specify the content to be rendered inside the Label.\n */\n children: PropTypes.node,\n /**\n * Provide external classnames to Label component.\n */\n className: PropTypes.string,\n /**\n * To specify whether to show the required asterisk.\n */\n required: PropTypes.bool,\n /**\n * Props for the help icon\n */\n helpIconProps: PropTypes.shape({\n onClick: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n tooltipProps: PropTypes.shape({ ...Tooltip.propTypes }),\n }),\n};\n\nexport default Label;\n"],"names":["Label","_ref","children","_ref$className","className","_ref$required","required","_ref$helpIconProps","helpIconProps","otherProps","_objectWithoutProperties","_excluded","_ref2","onClick","icon","tooltipProps","helpIconClassName","otherHelpIconProps","_excluded2","HelpIcon","Help","React","createElement","_extends","classnames","Tooltip","disabled","_defineProperty","size"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAML;AAAA,EAAA,IALJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,cAAA,GAAAF,IAAA,CACRG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,aAAA,GAAAJ,IAAA,CACdK,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,kBAAA,GAAAN,IAAA,CAChBO,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;AACjBE,IAAAA,UAAU,GAAAC,gDAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,KAAA,GAMIJ,aAAa,IAAI,EAAE;IALrBK,OAAO,GAAAD,KAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,KAAA,CAAJE,IAAI;IACJC,YAAY,GAAAH,KAAA,CAAZG,YAAY;IACDC,iBAAiB,GAAAJ,KAAA,CAA5BR,SAAS;AACNa,IAAAA,kBAAkB,GAAAP,gDAAA,CAAAE,KAAA,EAAAM,UAAA,CAAA,CAAA;AAGvB,EAAA,IAAMC,QAAQ,GAAGL,IAAI,IAAIM,eAAI,CAAA;AAE7B,EAAA,oBACEC,yBAAA,CAAAC,aAAA,CAAA,OAAA,EAAAC,iBAAA,CAAA;AACEnB,IAAAA,SAAS,EAAEoB,gBAAU,CACnB,oDAAoD,EACpDpB,SAAS,CAAA;GAEPK,EAAAA,UAAU,GAEbP,QAAQ,EACRI,QAAQ,iBAAIe,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,aAAA,EAAA,IAAA;AAAW,GAAA,EAAC,GAAC,CAAO,EACtCd,aAAa,iBACZa,yBAAA,CAAAC,aAAA,CAACG,eAAO,EAAAF,iBAAA,KAAKR,YAAY,EAAA;AAAEW,IAAAA,QAAQ,EAAE,CAACX,YAAAA;GACpCM,CAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACQT,IAAAA,OAAO,EAAPA,OAAO;IACbT,SAAS,EAAEoB,gBAAU,CAAC,gCAAgC,EAAAG,8BAAA,CAAA,EAAA,EACnDX,iBAAiB,EAAGA,iBAAiB,CAAA,CAAA;AACrC,GAAA,eAEHK,yBAAA,CAAAC,aAAA,CAACH,QAAQ,EAAAI,iBAAA,CAAA;AAACK,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,EAAKX,kBAAkB,CAAA,CAAI,CACzC,CAEV,CACK,CAAA;AAEZ;;;;"}
1
+ {"version":3,"file":"Label.js","sources":["../../src/components/Label.jsx"],"sourcesContent":["import React, { useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport Button from \"./Button\";\nimport Popover from \"./Popover\";\nimport Tooltip from \"./Tooltip\";\nimport Typography from \"./Typography\";\n\nconst { Title } = Popover;\n\nconst Label = ({\n children,\n className = \"\",\n required = false,\n helpIconProps = null,\n ...otherProps\n}) => {\n const {\n onClick,\n icon,\n tooltipProps,\n popoverProps,\n className: helpIconClassName,\n ...otherHelpIconProps\n } = helpIconProps || {};\n\n const { title, description, helpLinkProps, ...otherPopoverProps } =\n popoverProps || {};\n\n const HelpIcon = icon || Help;\n const popoverReferenceElement = useRef();\n\n const renderHelpIcon = () => (\n <span\n {...{ onClick }}\n ref={popoverProps ? popoverReferenceElement : undefined}\n className={classnames(\"neeto-ui-label__help-icon-wrap\", {\n [helpIconClassName]: helpIconClassName,\n })}\n >\n <HelpIcon size={16} {...otherHelpIconProps} />\n </span>\n );\n\n return (\n <label\n className={classnames(\n \"neeto-ui-label neeto-ui-flex neeto-ui-items-center\",\n className\n )}\n {...otherProps}\n >\n {children}\n {required && <span aria-hidden>*</span>}\n {helpIconProps && (\n <>\n {tooltipProps ? (\n <Tooltip {...tooltipProps}>{renderHelpIcon()}</Tooltip>\n ) : popoverProps ? (\n <>\n {renderHelpIcon()}\n <Popover\n reference={popoverReferenceElement}\n {...otherPopoverProps}\n >\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n ) : (\n renderHelpIcon()\n )}\n </>\n )}\n </label>\n );\n};\n\nLabel.propTypes = {\n /**\n * To specify the content to be rendered inside the Label.\n */\n children: PropTypes.node,\n /**\n * Provide external classnames to Label component.\n */\n className: PropTypes.string,\n /**\n * To specify whether to show the required asterisk.\n */\n required: PropTypes.bool,\n /**\n * Props for the help icon\n */\n helpIconProps: PropTypes.shape({\n onClick: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n tooltipProps: PropTypes.shape({ ...Tooltip.propTypes }),\n popoverProps: PropTypes.shape({\n title: PropTypes.node,\n description: PropTypes.node,\n helpLinkProps: PropTypes.shape({ ...Button.propTypes }),\n }),\n className: PropTypes.string,\n }),\n};\n\nexport default Label;\n"],"names":["Title","Popover","Label","_ref","children","_ref$className","className","_ref$required","required","_ref$helpIconProps","helpIconProps","otherProps","_objectWithoutProperties","_excluded","_ref2","onClick","icon","tooltipProps","popoverProps","helpIconClassName","otherHelpIconProps","_excluded2","_ref3","title","description","helpLinkProps","otherPopoverProps","_excluded3","HelpIcon","Help","popoverReferenceElement","useRef","renderHelpIcon","React","createElement","ref","undefined","classnames","_defineProperty","_extends","size","Fragment","Tooltip","reference","Typography","lineHeight","style","weight","Button","target"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAQA,KAAK,GAAKC,OAAO,CAAjBD,KAAK,CAAA;AAEb,IAAME,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAML;AAAA,EAAA,IALJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,cAAA,GAAAF,IAAA,CACRG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,aAAA,GAAAJ,IAAA,CACdK,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,kBAAA,GAAAN,IAAA,CAChBO,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;AACjBE,IAAAA,UAAU,GAAAC,4CAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,KAAA,GAOIJ,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Ae;AACzB,IAAA,SAAA,EAAQ,0BAA0B;AAClCkC,IAAAA,IAAI,EAAC,OAAA;AAAO,GAAA,EACRf,aAAa,EAAA;AACjB,IAAA,aAAA,EAAY,0BAA0B;AACtCqB,IAAAA,KAAK,EAAC,MAAM;AACZG,IAAAA,MAAM,EAAC,QAAA;AAAQ,GAAA,CAAA,CAElB,CACG,CACE,CACT,GAEHjB,cAAc,EACf,CAEJ,CACK,CAAA;AAEZ;;;;"}
package/dist/cjs/Modal.js CHANGED
@@ -1,40 +1,55 @@
1
1
  'use strict';
2
2
 
3
- var _extends = require('./extends-1b35a664.js');
4
- var defineProperty = require('./defineProperty-ee86604b.js');
5
- var slicedToArray = require('./slicedToArray-732a2048.js');
6
- var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
3
+ var _extends = require('@babel/runtime/helpers/extends');
4
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
6
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
7
  var React = require('react');
8
- var index = require('./index-302c3d37.js');
8
+ var classnames = require('classnames');
9
9
  var neetoIcons = require('@bigbinary/neeto-icons');
10
- var useOverlayManager = require('./useOverlayManager-359ed795.js');
10
+ var useOverlayManager = require('./useOverlayManager-1de0435e.js');
11
11
  var Button = require('./Button.js');
12
12
  require('react-router-dom');
13
- require('./index-6e09c7bc.js');
13
+ require('qs');
14
14
  var Typography = require('./Typography.js');
15
- require('./toPropertyKey-bfa2e465.js');
15
+ require('@babel/runtime/helpers/esm/extends');
16
+ require('@babel/runtime/helpers/esm/objectWithoutPropertiesLoose');
17
+ require('@babel/runtime/helpers/esm/inheritsLoose');
16
18
  require('./index-63580e68.js');
17
19
  require('react-dom');
20
+ require('@babel/runtime/helpers/esm/assertThisInitialized');
18
21
  require('ramda');
19
- require('./index-a8cc581e.js');
22
+ require('@bigbinary/neeto-hotkeys');
20
23
  require('./overlayManager.js');
21
- require('./createClass-80e17c6a.js');
24
+ require('@babel/runtime/helpers/classCallCheck');
25
+ require('@babel/runtime/helpers/createClass');
26
+ require('./index-f2e36d91.js');
27
+ require('dayjs');
28
+ require('dayjs/plugin/localeData');
29
+ require('dayjs/plugin/utc');
30
+ require('dayjs/plugin/weekday');
31
+ require('dayjs/plugin/weekOfYear');
32
+ require('@bigbinary/neeto-cist');
22
33
  require('./motion-a1906aff.js');
23
- require('./index-773961dd.js');
34
+ require('./Tooltip.js');
35
+ require('@tippyjs/react');
24
36
  require('tippy.js');
25
- require('@bigbinary/neeto-cist');
26
- require('util');
27
37
 
28
38
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
29
39
 
40
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
41
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
42
+ var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
43
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
30
44
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
45
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
31
46
 
32
47
  var Body = function Body(_ref) {
33
48
  var children = _ref.children,
34
49
  className = _ref.className,
35
50
  dataCy = _ref.dataCy;
36
51
  return /*#__PURE__*/React__default["default"].createElement("div", {
37
- className: index.classnames("neeto-ui-modal__body", className),
52
+ className: classnames__default["default"]("neeto-ui-modal__body", className),
38
53
  "data-cy": dataCy !== null && dataCy !== void 0 ? dataCy : "modal-body"
39
54
  }, children);
40
55
  };
@@ -44,7 +59,7 @@ var Footer = function Footer(_ref) {
44
59
  className = _ref.className,
45
60
  dataCy = _ref.dataCy;
46
61
  return /*#__PURE__*/React__default["default"].createElement("div", {
47
- className: index.classnames("neeto-ui-modal__footer", className),
62
+ className: classnames__default["default"]("neeto-ui-modal__footer", className),
48
63
  "data-cy": dataCy !== null && dataCy !== void 0 ? dataCy : "modal-footer"
49
64
  }, children);
50
65
  };
@@ -56,7 +71,7 @@ var Header = function Header(_ref) {
56
71
  className = _ref.className,
57
72
  dataCy = _ref.dataCy;
58
73
  return /*#__PURE__*/React__default["default"].createElement("div", {
59
- className: index.classnames("neeto-ui-modal__header", className),
74
+ className: classnames__default["default"]("neeto-ui-modal__header", className),
60
75
  "data-cy": dataCy !== null && dataCy !== void 0 ? dataCy : "modal-header"
61
76
  }, children, description && /*#__PURE__*/React__default["default"].createElement("div", {
62
77
  className: "neeto-ui-modal__header-desc",
@@ -96,9 +111,9 @@ var Modal = function Modal(_ref) {
96
111
  blockScrollOnMount = _ref$blockScrollOnMou === void 0 ? true : _ref$blockScrollOnMou,
97
112
  _ref$closeOnOutsideCl = _ref.closeOnOutsideClick,
98
113
  closeOnOutsideClick = _ref$closeOnOutsideCl === void 0 ? true : _ref$closeOnOutsideCl,
99
- otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
114
+ otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
100
115
  var _useState = React.useState(false),
101
- _useState2 = slicedToArray._slicedToArray(_useState, 2),
116
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
102
117
  hasTransitionCompleted = _useState2[0],
103
118
  setHasTransitionCompleted = _useState2[1];
104
119
  var modalWrapper = React.useRef(null);
@@ -137,15 +152,15 @@ var Modal = function Modal(_ref) {
137
152
  "data-testid": "backdrop",
138
153
  key: "modal-backdrop",
139
154
  ref: backdropRef,
140
- className: index.classnames("neeto-ui-modal__backdrop", {
155
+ className: classnames__default["default"]("neeto-ui-modal__backdrop", {
141
156
  "neeto-ui-modal__backdrop--fullscreen": isFullScreenModal
142
157
  }, backdropClassName)
143
- }, /*#__PURE__*/React__default["default"].createElement("div", _extends._extends({
158
+ }, /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
144
159
  "aria-modal": true,
145
160
  key: "modal-wrapper",
146
161
  ref: modalWrapper,
147
162
  role: "dialog",
148
- className: index.classnames("neeto-ui-modal__wrapper", defineProperty._defineProperty({
163
+ className: classnames__default["default"]("neeto-ui-modal__wrapper", _defineProperty__default["default"]({
149
164
  "neeto-ui-modal__wrapper--small": size === SIZES.small,
150
165
  "neeto-ui-modal__wrapper--medium": size === SIZES.medium,
151
166
  "neeto-ui-modal__wrapper--large": size === SIZES.large,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sources":["../../src/components/Modal/Body.jsx","../../src/components/Modal/Footer.jsx","../../src/components/Modal/Header.jsx","../../src/components/Modal/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Body = ({ children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__body\", className)}\n data-cy={dataCy ?? \"modal-body\"}\n >\n {children}\n </div>\n);\n\nBody.propTypes = {\n /**\n * To specify className to be applied to the Modal Body.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Body.\n */\n children: PropTypes.node,\n};\n\nexport default Body;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Footer = ({ children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__footer\", className)}\n data-cy={dataCy ?? \"modal-footer\"}\n >\n {children}\n </div>\n);\n\nFooter.propTypes = {\n /**\n * To specify className to be applied to the Modal Footer.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Footer.\n */\n children: PropTypes.node,\n};\n\nexport default Footer;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Typography from \"../Typography\";\n\nconst Header = ({ description = \"\", children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__header\", className)}\n data-cy={dataCy ?? \"modal-header\"}\n >\n {children}\n {description && (\n <div className=\"neeto-ui-modal__header-desc\" data-cy=\"modal-header-desc\">\n <Typography lineHeight=\"normal\" style=\"body2\">\n {description}\n </Typography>\n </div>\n )}\n </div>\n);\n\nHeader.propTypes = {\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify the short description of the Modal.\n */\n description: PropTypes.string,\n /**\n * To specify className to be applied to the Modal Header container.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Header.\n */\n children: PropTypes.node,\n};\n\nexport default Header;\n","import React, { useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Close } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { CSSTransition } from \"react-transition-group\";\n\nimport Backdrop from \"atoms/Backdrop\";\nimport Portal from \"atoms/Portal\";\nimport Button from \"components/Button\";\nimport { useOverlayManager, useOverlay } from \"hooks\";\n\nimport Body from \"./Body\";\nimport Footer from \"./Footer\";\nimport Header from \"./Header\";\n\nconst SIZES = {\n small: \"small\",\n medium: \"medium\",\n large: \"large\",\n fullScreen: \"fullScreen\",\n};\n\nconst Modal = ({\n size = SIZES.medium,\n isOpen = false,\n onClose = () => {},\n children,\n finalFocusRef,\n initialFocusRef,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n blockScrollOnMount = true,\n closeOnOutsideClick = true,\n ...otherProps\n}) => {\n const [hasTransitionCompleted, setHasTransitionCompleted] = useState(false);\n\n const modalWrapper = useRef(null);\n const backdropRef = useRef(null);\n\n useOverlayManager(modalWrapper, isOpen);\n\n const { handleOverlayClose, setFocusField } = useOverlay({\n isOpen,\n initialFocusRef,\n finalFocusRef,\n overlayWrapper: modalWrapper,\n onClose,\n backdropRef,\n closeOnOutsideClick,\n closeOnEsc,\n blockScrollOnMount,\n hasTransitionCompleted,\n });\n\n const isFullScreenModal = size === SIZES.fullScreen;\n\n return (\n <Portal rootId=\"neeto-ui-portal\">\n <CSSTransition\n unmountOnExit\n appear={isOpen}\n classNames=\"neeto-ui-modal\"\n in={isOpen}\n timeout={300}\n onEntered={() => setHasTransitionCompleted(true)}\n onExited={() => setHasTransitionCompleted(false)}\n >\n <Backdrop\n data-testid=\"backdrop\"\n key=\"modal-backdrop\"\n ref={backdropRef}\n className={classnames(\n \"neeto-ui-modal__backdrop\",\n {\n \"neeto-ui-modal__backdrop--fullscreen\": isFullScreenModal,\n },\n backdropClassName\n )}\n >\n <div\n aria-modal\n key=\"modal-wrapper\"\n ref={modalWrapper}\n role=\"dialog\"\n className={classnames(\"neeto-ui-modal__wrapper\", {\n \"neeto-ui-modal__wrapper--small\": size === SIZES.small,\n \"neeto-ui-modal__wrapper--medium\": size === SIZES.medium,\n \"neeto-ui-modal__wrapper--large\": size === SIZES.large,\n \"neeto-ui-modal__wrapper--fullscreen\": isFullScreenModal,\n [className]: className,\n })}\n {...otherProps}\n >\n {closeButton && (\n <Button\n aria-label=\"Close\"\n className=\"neeto-ui-modal__close\"\n data-cy=\"modal-close-button\"\n data-testid=\"close-button\"\n icon={Close}\n size={isFullScreenModal ? \"large\" : \"small\"}\n style={isFullScreenModal ? \"secondary\" : \"text\"}\n onClick={handleOverlayClose}\n />\n )}\n {typeof children === \"function\"\n ? children({ setFocusField })\n : children}\n </div>\n </Backdrop>\n </CSSTransition>\n </Portal>\n );\n};\n\nModal.propTypes = {\n /**\n * To specify the size of the Modal.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify whether the Modal is open or not.\n */\n isOpen: PropTypes.bool,\n /**\n * To specify the callback which will be invoked when the Modal is closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the content to be rendered inside the Modal component.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * To provide external classNames to the Modal.\n */\n className: PropTypes.string,\n /**\n * To close the Modal on pressing the Esc key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * To specify whether the close button of the Modal should be displayed or not.\n */\n closeButton: PropTypes.bool,\n /**\n * To add custom classes to backdrop component.\n */\n backdropClassName: PropTypes.string,\n /**\n * To close on clicking outside the Modal content.\n */\n closeOnOutsideClick: PropTypes.bool,\n /*\n * To specify the ref of the element which will receive focus when the Modal is closed.\n * If not specified, the focus will be set to the element which was focused when the Modal was opened.\n * If the Modal was opened by clicking on a button, then the focus will be set to the button.\n * */\n finalFocusRef: PropTypes.object,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify the ref of the element which will receive focus when the Modal is opened.\n * If not specified, the focus will be set to the first focusable element inside the Modal.\n * */\n initialFocusRef: PropTypes.object,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify whether the scroll should be blocked when the Modal is opened.\n * */\n blockScrollOnMount: PropTypes.bool,\n};\n\nModal.Header = Header;\nModal.Body = Body;\nModal.Footer = Footer;\n\nexport default Modal;\n"],"names":["Body","_ref","children","className","dataCy","React","createElement","classnames","Footer","Header","_ref$description","description","Typography","lineHeight","style","SIZES","small","medium","large","fullScreen","Modal","_ref$size","size","_ref$isOpen","isOpen","_ref$onClose","onClose","finalFocusRef","initialFocusRef","_ref$className","_ref$closeOnEsc","closeOnEsc","_ref$closeButton","closeButton","_ref$backdropClassNam","backdropClassName","_ref$blockScrollOnMou","blockScrollOnMount","_ref$closeOnOutsideCl","closeOnOutsideClick","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","hasTransitionCompleted","setHasTransitionCompleted","modalWrapper","useRef","backdropRef","useOverlayManager","_useOverlay","useOverlay","overlayWrapper","handleOverlayClose","setFocusField","isFullScreenModal","Portal","rootId","CSSTransition","unmountOnExit","appear","classNames","timeout","onEntered","onExited","Backdrop","key","ref","_extends","role","_defineProperty","Button","icon","Close","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,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AAC,CAAC,GAC3BvD,QAAQ,CACR,CACG,CACG,CACT,CAAA;AAEb,EAAC;AA8DDkB,KAAK,CAACX,MAAM,GAAGA,MAAM,CAAA;AACrBW,KAAK,CAACpB,IAAI,GAAGA,IAAI,CAAA;AACjBoB,KAAK,CAACZ,MAAM,GAAGA,MAAM;;;;"}
1
+ {"version":3,"file":"Modal.js","sources":["../../src/components/Modal/Body.jsx","../../src/components/Modal/Footer.jsx","../../src/components/Modal/Header.jsx","../../src/components/Modal/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Body = ({ children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__body\", className)}\n data-cy={dataCy ?? \"modal-body\"}\n >\n {children}\n </div>\n);\n\nBody.propTypes = {\n /**\n * To specify className to be applied to the Modal Body.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Body.\n */\n children: PropTypes.node,\n};\n\nexport default Body;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Footer = ({ children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__footer\", className)}\n data-cy={dataCy ?? \"modal-footer\"}\n >\n {children}\n </div>\n);\n\nFooter.propTypes = {\n /**\n * To specify className to be applied to the Modal Footer.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Footer.\n */\n children: PropTypes.node,\n};\n\nexport default Footer;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Typography from \"../Typography\";\n\nconst Header = ({ description = \"\", children, className, dataCy }) => (\n <div\n className={classnames(\"neeto-ui-modal__header\", className)}\n data-cy={dataCy ?? \"modal-header\"}\n >\n {children}\n {description && (\n <div className=\"neeto-ui-modal__header-desc\" data-cy=\"modal-header-desc\">\n <Typography lineHeight=\"normal\" style=\"body2\">\n {description}\n </Typography>\n </div>\n )}\n </div>\n);\n\nHeader.propTypes = {\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify the short description of the Modal.\n */\n description: PropTypes.string,\n /**\n * To specify className to be applied to the Modal Header container.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Modal Header.\n */\n children: PropTypes.node,\n};\n\nexport default Header;\n","import React, { useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Close } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { CSSTransition } from \"react-transition-group\";\n\nimport Backdrop from \"atoms/Backdrop\";\nimport Portal from \"atoms/Portal\";\nimport Button from \"components/Button\";\nimport { useOverlayManager, useOverlay } from \"hooks\";\n\nimport Body from \"./Body\";\nimport Footer from \"./Footer\";\nimport Header from \"./Header\";\n\nconst SIZES = {\n small: \"small\",\n medium: \"medium\",\n large: \"large\",\n fullScreen: \"fullScreen\",\n};\n\nconst Modal = ({\n size = SIZES.medium,\n isOpen = false,\n onClose = () => {},\n children,\n finalFocusRef,\n initialFocusRef,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n blockScrollOnMount = true,\n closeOnOutsideClick = true,\n ...otherProps\n}) => {\n const [hasTransitionCompleted, setHasTransitionCompleted] = useState(false);\n\n const modalWrapper = useRef(null);\n const backdropRef = useRef(null);\n\n useOverlayManager(modalWrapper, isOpen);\n\n const { handleOverlayClose, setFocusField } = useOverlay({\n isOpen,\n initialFocusRef,\n finalFocusRef,\n overlayWrapper: modalWrapper,\n onClose,\n backdropRef,\n closeOnOutsideClick,\n closeOnEsc,\n blockScrollOnMount,\n hasTransitionCompleted,\n });\n\n const isFullScreenModal = size === SIZES.fullScreen;\n\n return (\n <Portal rootId=\"neeto-ui-portal\">\n <CSSTransition\n unmountOnExit\n appear={isOpen}\n classNames=\"neeto-ui-modal\"\n in={isOpen}\n timeout={300}\n onEntered={() => setHasTransitionCompleted(true)}\n onExited={() => setHasTransitionCompleted(false)}\n >\n <Backdrop\n data-testid=\"backdrop\"\n key=\"modal-backdrop\"\n ref={backdropRef}\n className={classnames(\n \"neeto-ui-modal__backdrop\",\n {\n \"neeto-ui-modal__backdrop--fullscreen\": isFullScreenModal,\n },\n backdropClassName\n )}\n >\n <div\n aria-modal\n key=\"modal-wrapper\"\n ref={modalWrapper}\n role=\"dialog\"\n className={classnames(\"neeto-ui-modal__wrapper\", {\n \"neeto-ui-modal__wrapper--small\": size === SIZES.small,\n \"neeto-ui-modal__wrapper--medium\": size === SIZES.medium,\n \"neeto-ui-modal__wrapper--large\": size === SIZES.large,\n \"neeto-ui-modal__wrapper--fullscreen\": isFullScreenModal,\n [className]: className,\n })}\n {...otherProps}\n >\n {closeButton && (\n <Button\n aria-label=\"Close\"\n className=\"neeto-ui-modal__close\"\n data-cy=\"modal-close-button\"\n data-testid=\"close-button\"\n icon={Close}\n size={isFullScreenModal ? \"large\" : \"small\"}\n style={isFullScreenModal ? \"secondary\" : \"text\"}\n onClick={handleOverlayClose}\n />\n )}\n {typeof children === \"function\"\n ? children({ setFocusField })\n : children}\n </div>\n </Backdrop>\n </CSSTransition>\n </Portal>\n );\n};\n\nModal.propTypes = {\n /**\n * To specify the size of the Modal.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify whether the Modal is open or not.\n */\n isOpen: PropTypes.bool,\n /**\n * To specify the callback which will be invoked when the Modal is closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the content to be rendered inside the Modal component.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * To provide external classNames to the Modal.\n */\n className: PropTypes.string,\n /**\n * To close the Modal on pressing the Esc key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * To specify whether the close button of the Modal should be displayed or not.\n */\n closeButton: PropTypes.bool,\n /**\n * To add custom classes to backdrop component.\n */\n backdropClassName: PropTypes.string,\n /**\n * To close on clicking outside the Modal content.\n */\n closeOnOutsideClick: PropTypes.bool,\n /*\n * To specify the ref of the element which will receive focus when the Modal is closed.\n * If not specified, the focus will be set to the element which was focused when the Modal was opened.\n * If the Modal was opened by clicking on a button, then the focus will be set to the button.\n * */\n finalFocusRef: PropTypes.object,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify the ref of the element which will receive focus when the Modal is opened.\n * If not specified, the focus will be set to the first focusable element inside the Modal.\n * */\n initialFocusRef: PropTypes.object,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To specify whether the scroll should be blocked when the Modal is opened.\n * */\n blockScrollOnMount: PropTypes.bool,\n};\n\nModal.Header = Header;\nModal.Body = Body;\nModal.Footer = Footer;\n\nexport default Modal;\n"],"names":["Body","_ref","children","className","dataCy","React","createElement","classnames","Footer","Header","_ref$description","description","Typography","lineHeight","style","SIZES","small","medium","large","fullScreen","Modal","_ref$size","size","_ref$isOpen","isOpen","_ref$onClose","onClose","finalFocusRef","initialFocusRef","_ref$className","_ref$closeOnEsc","closeOnEsc","_ref$closeButton","closeButton","_ref$backdropClassNam","backdropClassName","_ref$blockScrollOnMou","blockScrollOnMount","_ref$closeOnOutsideCl","closeOnOutsideClick","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","hasTransitionCompleted","setHasTransitionCompleted","modalWrapper","useRef","backdropRef","useOverlayManager","_useOverlay","useOverlay","overlayWrapper","handleOverlayClose","setFocusField","isFullScreenModal","Portal","rootId","CSSTransition","unmountOnExit","appear","classNames","timeout","onEntered","onExited","Backdrop","key","ref","_extends","role","_defineProperty","Button","icon","Close","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAAA;AAAA,E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,QAAQ,CACR,CACG,CACG,CACT,CAAA;AAEb,EAAC;AA8DDkB,KAAK,CAACX,MAAM,GAAGA,MAAM,CAAA;AACrBW,KAAK,CAACpB,IAAI,GAAGA,IAAI,CAAA;AACjBoB,KAAK,CAACZ,MAAM,GAAGA,MAAM;;;;"}
@@ -1,38 +1,70 @@
1
1
  'use strict';
2
2
 
3
- var defineProperty = require('./defineProperty-ee86604b.js');
4
- var _extends = require('./extends-1b35a664.js');
5
- var toConsumableArray = require('./toConsumableArray-418424fc.js');
6
- var slicedToArray = require('./slicedToArray-732a2048.js');
7
- var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _extends = require('@babel/runtime/helpers/extends');
5
+ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
6
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
7
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8
8
  var React = require('react');
9
- var index$1 = require('./index-302c3d37.js');
9
+ var classnames = require('classnames');
10
10
  var ramda = require('ramda');
11
- var reactSelectCreatable_esm = require('./react-select-creatable.esm-b39742a3.js');
12
- var index = require('./index-6e09c7bc.js');
11
+ var reactSelectCreatable_esm = require('./react-select-creatable.esm-23eddf9f.js');
12
+ var index = require('./index-f2e36d91.js');
13
+ var _toArray = require('@babel/runtime/helpers/toArray');
13
14
  var neetoIcons = require('@bigbinary/neeto-icons');
15
+ require('@babel/runtime/helpers/esm/objectSpread2');
16
+ require('@babel/runtime/helpers/esm/slicedToArray');
17
+ require('@babel/runtime/helpers/esm/objectWithoutProperties');
18
+ require('@babel/runtime/helpers/esm/extends');
19
+ require('@babel/runtime/helpers/objectSpread2');
20
+ require('@babel/runtime/helpers/classCallCheck');
21
+ require('@babel/runtime/helpers/createClass');
22
+ require('@babel/runtime/helpers/inherits');
23
+ require('@babel/runtime/helpers/createSuper');
24
+ require('@babel/runtime/helpers/taggedTemplateLiteral');
25
+ require('@babel/runtime/helpers/typeof');
14
26
  require('react-dom');
15
27
  var Tag = require('./Tag.js');
16
28
  var Label = require('./Label.js');
17
- require('./toPropertyKey-bfa2e465.js');
18
- require('./createClass-80e17c6a.js');
29
+ require('@babel/runtime/helpers/esm/classCallCheck');
30
+ require('@babel/runtime/helpers/esm/createClass');
31
+ require('@babel/runtime/helpers/esm/inherits');
32
+ require('@babel/runtime/helpers/esm/createSuper');
33
+ require('@babel/runtime/helpers/esm/toConsumableArray');
34
+ require('@babel/runtime/helpers/esm/taggedTemplateLiteral');
35
+ require('@babel/runtime/helpers/esm/typeof');
36
+ require('@babel/runtime/helpers/esm/defineProperty');
37
+ require('dayjs');
38
+ require('dayjs/plugin/localeData');
39
+ require('dayjs/plugin/utc');
40
+ require('dayjs/plugin/weekday');
41
+ require('dayjs/plugin/weekOfYear');
19
42
  require('@bigbinary/neeto-cist');
20
- require('util');
21
- require('./index-773961dd.js');
43
+ require('qs');
44
+ require('./Button.js');
45
+ require('react-router-dom');
46
+ require('./motion-a1906aff.js');
47
+ require('./Tooltip.js');
48
+ require('@tippyjs/react');
22
49
  require('tippy.js');
50
+ require('./Popover.js');
51
+ require('./Typography.js');
23
52
 
24
53
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
54
 
55
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
56
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
57
+ var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
58
+ var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
59
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
26
60
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
27
-
28
- function _toArray(arr) {
29
- return slicedToArray._arrayWithHoles(arr) || toConsumableArray._iterableToArray(arr) || slicedToArray._unsupportedIterableToArray(arr) || slicedToArray._nonIterableRest();
30
- }
61
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
62
+ var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
31
63
 
32
64
  var _excluded$1 = ["children"],
33
65
  _excluded2 = ["children"];
34
66
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { defineProperty._defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
67
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36
68
  var STYLES = {
37
69
  border: {
38
70
  "default": "1px solid rgb(var(--neeto-ui-gray-400))",
@@ -45,7 +77,7 @@ var STYLES = {
45
77
  };
46
78
  var CustomControl = function CustomControl(_ref) {
47
79
  var children = _ref.children,
48
- props = objectWithoutProperties._objectWithoutProperties(_ref, _excluded$1);
80
+ props = _objectWithoutProperties__default["default"](_ref, _excluded$1);
49
81
  var prefix = props.selectProps.prefix;
50
82
  return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.Control, props, prefix && /*#__PURE__*/React__default["default"].createElement("div", {
51
83
  className: "neeto-ui-email-input__prefix"
@@ -58,46 +90,46 @@ var CustomDropdownIndicator = function CustomDropdownIndicator(props) {
58
90
  }, suffix)) : null;
59
91
  };
60
92
  var MultiValueRemove = function MultiValueRemove(props) {
61
- return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.MultiValueRemove, _extends._extends({}, props, {
62
- innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, defineProperty._defineProperty({}, "data-cy", "".concat(index.hyphenize(props.data.label), "-remove-icon")))
93
+ return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.MultiValueRemove, _extends__default["default"]({}, props, {
94
+ innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, _defineProperty__default["default"]({}, "data-cy", "".concat(index.hyphenize(props.data.label), "-remove-icon")))
63
95
  }), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Close, {
64
96
  size: 16
65
97
  }));
66
98
  };
67
99
  var CustomValueContainer = function CustomValueContainer(_ref2) {
68
100
  var children = _ref2.children,
69
- props = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
101
+ props = _objectWithoutProperties__default["default"](_ref2, _excluded2);
70
102
  var getValue = props.getValue,
71
103
  _props$selectProps = props.selectProps,
72
104
  isFocused = _props$selectProps.isFocused,
73
105
  visibleEmailsCount = _props$selectProps.visibleEmailsCount;
74
106
  var value = getValue();
75
- var _children = _toArray(children),
107
+ var _children = _toArray__default["default"](children),
76
108
  firstChild = _children[0],
77
109
  rest = _children.slice(1);
78
110
  var shouldCollapse = !isFocused && value.length > visibleEmailsCount;
79
- return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.ValueContainer, _extends._extends({}, props, {
80
- innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, defineProperty._defineProperty({}, "data-cy", "multi-email-input-container"))
111
+ return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.ValueContainer, _extends__default["default"]({}, props, {
112
+ innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, _defineProperty__default["default"]({}, "data-cy", "multi-email-input-container"))
81
113
  }), shouldCollapse ? firstChild.slice(0, visibleEmailsCount) : firstChild, shouldCollapse && /*#__PURE__*/React__default["default"].createElement(Tag, {
82
114
  label: "".concat(value.length - visibleEmailsCount, " more"),
83
115
  style: "secondary"
84
116
  }), rest);
85
117
  };
86
118
  var CustomClearIndicator = function CustomClearIndicator(props) {
87
- return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.ClearIndicator, _extends._extends({}, props, {
88
- innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, defineProperty._defineProperty({}, "data-cy", "clear-all-button"))
119
+ return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.ClearIndicator, _extends__default["default"]({}, props, {
120
+ innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, _defineProperty__default["default"]({}, "data-cy", "clear-all-button"))
89
121
  }), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Close, {
90
122
  className: "cursor-pointer",
91
123
  size: 16
92
124
  }));
93
125
  };
94
126
  var SelectContainer = function SelectContainer(props) {
95
- return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.SelectContainer, _extends._extends({}, props, {
96
- innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, defineProperty._defineProperty({}, "data-cy", "multi-email-select-container"))
127
+ return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.SelectContainer, _extends__default["default"]({}, props, {
128
+ innerProps: _objectSpread$1(_objectSpread$1({}, props.innerProps), {}, _defineProperty__default["default"]({}, "data-cy", "multi-email-select-container"))
97
129
  }));
98
130
  };
99
131
  var Input = function Input(props) {
100
- return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.Input, _extends._extends({}, props, {
132
+ return /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.components.Input, _extends__default["default"]({}, props, {
101
133
  "data-cy": "email-select-input-field"
102
134
  }));
103
135
  };
@@ -133,7 +165,7 @@ var formatEmailInputOptions = function formatEmailInputOptions(label) {
133
165
  };
134
166
  var pruneDuplicates = function pruneDuplicates(inputValues) {
135
167
  var values = ramda.pluck("value", inputValues);
136
- var uniqueValues = toConsumableArray._toConsumableArray(new Set(values));
168
+ var uniqueValues = _toConsumableArray__default["default"](new Set(values));
137
169
  return uniqueValues.map(function (email) {
138
170
  return formatEmailInputOptions(email);
139
171
  });
@@ -152,7 +184,7 @@ var renderDefaultText = function renderDefaultText(count) {
152
184
 
153
185
  var _excluded = ["label", "placeholder", "helpText", "value", "onChange", "error", "onBlur", "filterInvalidEmails", "counter", "disabled", "maxHeight", "required", "labelProps", "visibleEmailsCount", "isCreateable"];
154
186
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
155
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty._defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
187
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
156
188
  var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
157
189
  var _ref$label = _ref.label,
158
190
  label = _ref$label === void 0 ? "Email(s)" : _ref$label,
@@ -181,13 +213,13 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
181
213
  visibleEmailsCount = _ref$visibleEmailsCou === void 0 ? 3 : _ref$visibleEmailsCou,
182
214
  _ref$isCreateable = _ref.isCreateable,
183
215
  isCreateable = _ref$isCreateable === void 0 ? true : _ref$isCreateable,
184
- otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
216
+ otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
185
217
  var _useState = React.useState(""),
186
- _useState2 = slicedToArray._slicedToArray(_useState, 2),
218
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
187
219
  inputValue = _useState2[0],
188
220
  setInputValue = _useState2[1];
189
221
  var _useState3 = React.useState(false),
190
- _useState4 = slicedToArray._slicedToArray(_useState3, 2),
222
+ _useState4 = _slicedToArray__default["default"](_useState3, 2),
191
223
  isFocused = _useState4[0],
192
224
  setIsFocused = _useState4[1];
193
225
  var isCounterVisible = !!counter && (!counter.startsFrom || getValidEmailsCount(value) >= counter.startsFrom);
@@ -201,7 +233,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
201
233
  var emails = emailMatches.map(function (email) {
202
234
  return formatEmailInputOptions(email);
203
235
  });
204
- onChange(pruneDuplicates([].concat(toConsumableArray._toConsumableArray(value), toConsumableArray._toConsumableArray(emails))));
236
+ onChange(pruneDuplicates([].concat(_toConsumableArray__default["default"](value), _toConsumableArray__default["default"](emails))));
205
237
  setInputValue("");
206
238
  };
207
239
  var handleKeyDown = function handleKeyDown(event) {
@@ -227,7 +259,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
227
259
  var onCreateOption = function onCreateOption(input) {
228
260
  var _otherProps$onCreateO;
229
261
  var email = formatEmailInputOptions(input);
230
- onChange(pruneDuplicates([].concat(toConsumableArray._toConsumableArray(value), [email])));
262
+ onChange(pruneDuplicates([].concat(_toConsumableArray__default["default"](value), [email])));
231
263
  otherProps === null || otherProps === void 0 || (_otherProps$onCreateO = otherProps.onCreateOption) === null || _otherProps$onCreateO === void 0 || _otherProps$onCreateO.call(otherProps, input);
232
264
  };
233
265
  var handleBlur = function handleBlur(event) {
@@ -255,20 +287,20 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
255
287
  className: "neeto-ui-input__wrapper neeto-ui-email-input__wrapper"
256
288
  }, /*#__PURE__*/React__default["default"].createElement("div", {
257
289
  className: "neeto-ui-email-input__label-wrapper"
258
- }, label && /*#__PURE__*/React__default["default"].createElement(Label, _extends._extends({
290
+ }, label && /*#__PURE__*/React__default["default"].createElement(Label, _extends__default["default"]({
259
291
  required: required,
260
292
  className: "neeto-ui-email-input__label",
261
293
  "data-cy": "".concat(index.hyphenize(label), "-input-label")
262
294
  }, labelProps), label), isCounterVisible && /*#__PURE__*/React__default["default"].createElement("p", {
263
295
  className: "neeto-ui-email-input__counter",
264
296
  "data-cy": "".concat(index.hyphenize(label), "-email-counter")
265
- }, getValidEmailsCount(value), " ", counter.label ? counter.label : renderDefaultText(getValidEmailsCount(value)))), /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.CreatableSelect, _extends._extends({
297
+ }, getValidEmailsCount(value), " ", counter.label ? counter.label : renderDefaultText(getValidEmailsCount(value)))), /*#__PURE__*/React__default["default"].createElement(reactSelectCreatable_esm.CreatableSelect, _extends__default["default"]({
266
298
  isMulti: true,
267
299
  required: true,
268
300
  classNamePrefix: "neeto-ui-react-select",
269
301
  components: CUSTOM_COMPONENTS,
270
302
  isDisabled: disabled,
271
- className: index$1.classnames("neeto-ui-react-select__container neeto-ui-react-select__container--medium neeto-ui-email-input__select", {
303
+ className: classnames__default["default"]("neeto-ui-react-select__container neeto-ui-react-select__container--medium neeto-ui-email-input__select", {
272
304
  "neeto-ui-react-select__container--error": !!error
273
305
  }),
274
306
  styles: _objectSpread(_objectSpread({}, CUSTOM_STYLES), {}, {