@bigbinary/neetoui 8.2.23 → 8.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/ActionDropdown.js +2 -2
- package/dist/Alert.js +3 -4
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.js +1 -0
- package/dist/Avatar.js.map +1 -1
- package/dist/Checkbox.js +3 -3
- package/dist/ColorPicker.js +3 -3
- package/dist/ColorPicker.js.map +1 -1
- package/dist/DatePicker.js +15 -16
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/Input.js +3 -3
- package/dist/Kbd.js +1 -0
- package/dist/Kbd.js.map +1 -1
- package/dist/Label.js +72 -55
- package/dist/Label.js.map +1 -1
- package/dist/Modal.js +3 -4
- package/dist/Modal.js.map +1 -1
- package/dist/MultiEmailInput.js +15 -15
- package/dist/Pagination.js +3 -3
- package/dist/Pane.js +3 -4
- package/dist/Pane.js.map +1 -1
- package/dist/Radio.js +3 -3
- package/dist/Select.js +4 -4
- package/dist/Select.js.map +1 -1
- package/dist/Sidebar.js +3 -2
- package/dist/Sidebar.js.map +1 -1
- package/dist/Slider.js +3 -3
- package/dist/Switch.js +3 -3
- package/dist/Table.js +4 -7
- package/dist/Table.js.map +1 -1
- package/dist/{Textarea-afac4a3e.js → Textarea-BcglKMaG.js} +3 -3
- package/dist/{Textarea-afac4a3e.js.map → Textarea-BcglKMaG.js.map} +1 -1
- package/dist/Textarea.js +4 -4
- package/dist/TimePicker.js +15 -16
- package/dist/TimePicker.js.map +1 -1
- package/dist/Toastr.js +2 -2
- package/dist/Tooltip.js +15 -10
- package/dist/Tooltip.js.map +1 -1
- package/dist/TranslationProvider.js +3 -1
- package/dist/TranslationProvider.js.map +1 -1
- package/dist/Tree.js +2 -2
- package/dist/TreeSelect.js +15 -4
- package/dist/TreeSelect.js.map +1 -1
- package/dist/cjs/Accordion.js +18 -27
- package/dist/cjs/Accordion.js.map +1 -1
- package/dist/cjs/ActionDropdown.js +8 -16
- package/dist/cjs/ActionDropdown.js.map +1 -1
- package/dist/cjs/Alert.js +9 -15
- package/dist/cjs/Alert.js.map +1 -1
- package/dist/cjs/Avatar.js +11 -19
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/Button.js +13 -21
- package/dist/cjs/Button.js.map +1 -1
- package/dist/cjs/Callout.js +5 -13
- package/dist/cjs/Callout.js.map +1 -1
- package/dist/cjs/Checkbox.js +10 -17
- package/dist/cjs/Checkbox.js.map +1 -1
- package/dist/cjs/ColorPicker.js +30 -40
- package/dist/cjs/ColorPicker.js.map +1 -1
- package/dist/cjs/DatePicker.js +15 -16
- package/dist/cjs/DatePicker.js.map +1 -1
- package/dist/cjs/Dropdown.js +30 -40
- package/dist/cjs/Dropdown.js.map +1 -1
- package/dist/cjs/Input.js +20 -29
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Kbd.js +5 -11
- package/dist/cjs/Kbd.js.map +1 -1
- package/dist/cjs/Label.js +71 -62
- package/dist/cjs/Label.js.map +1 -1
- package/dist/cjs/Modal.js +22 -32
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/MultiEmailInput.js +51 -62
- package/dist/cjs/MultiEmailInput.js.map +1 -1
- package/dist/cjs/NoData.js +14 -21
- package/dist/cjs/NoData.js.map +1 -1
- package/dist/cjs/Pagination.js +19 -25
- package/dist/cjs/Pagination.js.map +1 -1
- package/dist/cjs/Pane.js +19 -29
- package/dist/cjs/Pane.js.map +1 -1
- package/dist/cjs/Popover.js +5 -12
- package/dist/cjs/Popover.js.map +1 -1
- package/dist/cjs/ProgressBar.js +3 -8
- package/dist/cjs/ProgressBar.js.map +1 -1
- package/dist/cjs/Radio.js +17 -26
- package/dist/cjs/Radio.js.map +1 -1
- package/dist/cjs/Select.js +49 -62
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Sidebar.js +69 -77
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/Slider.js +12 -21
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Spinner.js +2 -7
- package/dist/cjs/Spinner.js.map +1 -1
- package/dist/cjs/Stepper.js +6 -11
- package/dist/cjs/Stepper.js.map +1 -1
- package/dist/cjs/Switch.js +16 -23
- package/dist/cjs/Switch.js.map +1 -1
- package/dist/cjs/Tab.js +10 -18
- package/dist/cjs/Tab.js.map +1 -1
- package/dist/cjs/Table.js +54 -70
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/Tag.js +9 -16
- package/dist/cjs/Tag.js.map +1 -1
- package/dist/cjs/{Textarea-c6496fa2.js → Textarea-XjB9bG3I.js} +19 -28
- package/dist/cjs/{Textarea-c6496fa2.js.map → Textarea-XjB9bG3I.js.map} +1 -1
- package/dist/cjs/Textarea.js +4 -4
- package/dist/cjs/TimePicker.js +15 -16
- package/dist/cjs/TimePicker.js.map +1 -1
- package/dist/cjs/Toastr.js +24 -34
- package/dist/cjs/Toastr.js.map +1 -1
- package/dist/cjs/Tooltip.js +18 -21
- package/dist/cjs/Tooltip.js.map +1 -1
- package/dist/cjs/TranslationProvider.js +6 -9
- package/dist/cjs/TranslationProvider.js.map +1 -1
- package/dist/cjs/Tree.js +8 -17
- package/dist/cjs/Tree.js.map +1 -1
- package/dist/cjs/TreeSelect.js +26 -25
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/Typography.js +4 -12
- package/dist/cjs/Typography.js.map +1 -1
- package/dist/cjs/constants.js +7 -19
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/{en-c69be2fb.js → en-1dfvTYgC.js} +1 -1
- package/dist/cjs/en-1dfvTYgC.js.map +1 -0
- package/dist/cjs/formik/ActionBlock.js +7 -13
- package/dist/cjs/formik/ActionBlock.js.map +1 -1
- package/dist/cjs/formik/BlockNavigation.js +12 -20
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Button.js +2 -8
- package/dist/cjs/formik/Button.js.map +1 -1
- package/dist/cjs/formik/Checkbox.js +7 -14
- package/dist/cjs/formik/Checkbox.js.map +1 -1
- package/dist/cjs/formik/Form.js +13 -24
- package/dist/cjs/formik/Form.js.map +1 -1
- package/dist/cjs/formik/Input.js +7 -14
- package/dist/cjs/formik/Input.js.map +1 -1
- package/dist/cjs/formik/MultiEmailInput.js +6 -13
- package/dist/cjs/formik/MultiEmailInput.js.map +1 -1
- package/dist/cjs/formik/Radio.js +7 -15
- package/dist/cjs/formik/Radio.js.map +1 -1
- package/dist/cjs/formik/Select.js +8 -16
- package/dist/cjs/formik/Select.js.map +1 -1
- package/dist/cjs/formik/Slider.js +7 -15
- package/dist/cjs/formik/Slider.js.map +1 -1
- package/dist/cjs/formik/Switch.js +7 -14
- package/dist/cjs/formik/Switch.js.map +1 -1
- package/dist/cjs/formik/Textarea.js +8 -15
- package/dist/cjs/formik/Textarea.js.map +1 -1
- package/dist/cjs/formik/TreeSelect.js +5 -12
- package/dist/cjs/formik/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/index.js +6 -9
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/{index-3c44e0c7.js → index-CvMjRZDt.js} +19 -33
- package/dist/cjs/{index-3c44e0c7.js.map → index-CvMjRZDt.js.map} +1 -1
- package/dist/cjs/{index-87f2e2dc.js → index-E2IEf9Av.js} +53 -70
- package/dist/cjs/{index-87f2e2dc.js.map → index-E2IEf9Av.js.map} +1 -1
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +22 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts.js +2 -4
- package/dist/cjs/layouts.js.map +1 -1
- package/dist/cjs/managers.js +0 -2
- package/dist/cjs/managers.js.map +1 -1
- package/dist/cjs/overlayManager.js +2 -9
- package/dist/cjs/overlayManager.js.map +1 -1
- package/dist/cjs/{react-select-creatable.esm-23eddf9f.js → react-select-creatable.esm-Bdv9YAMt.js} +231 -140
- package/dist/cjs/{react-select-creatable.esm-23eddf9f.js.map → react-select-creatable.esm-Bdv9YAMt.js.map} +1 -1
- package/dist/cjs/tinycolor-C4a31PPv.js +1214 -0
- package/dist/cjs/tinycolor-C4a31PPv.js.map +1 -0
- package/dist/cjs/{useId-4e3deb5c.js → useId-DXHUzdxd.js} +1 -1
- package/dist/cjs/{useId-4e3deb5c.js.map → useId-DXHUzdxd.js.map} +1 -1
- package/dist/cjs/{useOverlayManager-b8134604.js → useOverlayManager-CXLC179x.js} +19 -741
- package/dist/cjs/useOverlayManager-CXLC179x.js.map +1 -0
- package/dist/cjs/{useQueryParams-a8ee2f76.js → useQueryParams-l5fJJYCR.js} +2 -6
- package/dist/cjs/useQueryParams-l5fJJYCR.js.map +1 -0
- package/dist/cjs/{useRestoreScrollPosition-26e8d203.js → useRestoreScrollPosition-Dmq0tlvp.js} +18 -22
- package/dist/cjs/{useRestoreScrollPosition-26e8d203.js.map → useRestoreScrollPosition-Dmq0tlvp.js.map} +1 -1
- package/dist/{en-2d3f9fc1.js → en-CJac0MnO.js} +1 -1
- package/dist/en-CJac0MnO.js.map +1 -0
- package/dist/formik/ActionBlock.js +2 -2
- package/dist/formik/BlockNavigation.js +3 -4
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Checkbox.js +3 -3
- package/dist/formik/Input.js +3 -3
- package/dist/formik/MultiEmailInput.js +3 -3
- package/dist/formik/Radio.js +3 -3
- package/dist/formik/Select.js +4 -4
- package/dist/formik/Slider.js +3 -3
- package/dist/formik/Switch.js +3 -3
- package/dist/formik/Textarea.js +4 -4
- package/dist/formik/TreeSelect.js +2 -2
- package/dist/formik/index.js +6 -7
- package/dist/formik/index.js.map +1 -1
- package/dist/{index-6e82a862.js → index-BojMT3ps.js} +3 -3
- package/dist/{index-6e82a862.js.map → index-BojMT3ps.js.map} +1 -1
- package/dist/{index-b037e9fc.js → index-DugGi20r.js} +6 -12
- package/dist/{index-b037e9fc.js.map → index-DugGi20r.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +22 -23
- package/dist/index.js.map +1 -1
- package/dist/layouts.js +2 -2
- package/dist/{react-select-creatable.esm-ad71b0c0.js → react-select-creatable.esm-Dx_vEnyD.js} +137 -31
- package/dist/{react-select-creatable.esm-ad71b0c0.js.map → react-select-creatable.esm-Dx_vEnyD.js.map} +1 -1
- package/dist/tinycolor-DX-kZ4bq.js +1212 -0
- package/dist/tinycolor-DX-kZ4bq.js.map +1 -0
- package/dist/{useId-c1d20bba.js → useId-Jj9hXm-g.js} +1 -1
- package/dist/{useId-c1d20bba.js.map → useId-Jj9hXm-g.js.map} +1 -1
- package/dist/{useOverlayManager-65f6d80a.js → useOverlayManager-Dyv5Y8Ug.js} +3 -713
- package/dist/useOverlayManager-Dyv5Y8Ug.js.map +1 -0
- package/dist/{useQueryParams-dcb34865.js → useQueryParams-b60CHFUx.js} +1 -1
- package/dist/{useQueryParams-dcb34865.js.map → useQueryParams-b60CHFUx.js.map} +1 -1
- package/dist/{useRestoreScrollPosition-631cf3e5.js → useRestoreScrollPosition-DnEaioaR.js} +2 -2
- package/dist/{useRestoreScrollPosition-631cf3e5.js.map → useRestoreScrollPosition-DnEaioaR.js.map} +1 -1
- package/package.json +11 -10
- package/dist/cjs/en-c69be2fb.js.map +0 -1
- package/dist/cjs/tinycolor-b1e9a7b2.js +0 -1202
- package/dist/cjs/tinycolor-b1e9a7b2.js.map +0 -1
- package/dist/cjs/useOverlayManager-b8134604.js.map +0 -1
- package/dist/cjs/useQueryParams-a8ee2f76.js.map +0 -1
- package/dist/en-2d3f9fc1.js.map +0 -1
- package/dist/tinycolor-282c618c.js +0 -1200
- package/dist/tinycolor-282c618c.js.map +0 -1
- package/dist/useOverlayManager-65f6d80a.js.map +0 -1
package/README.md
CHANGED
|
@@ -216,6 +216,7 @@ application to test out changes and see how your component behaves in the
|
|
|
216
216
|
storybook for **neetoUI**
|
|
217
217
|
|
|
218
218
|
- To see if tests associated with your components pass run `yarn test`.
|
|
219
|
+
> Tests will fail if there are some warnings or errors in the console.
|
|
219
220
|
- To see if **neetoUI** gets built and bundled after changes run `yarn bundle`.
|
|
220
221
|
- To see if the storybook gets built run `yarn build`.
|
|
221
222
|
|
package/dist/ActionDropdown.js
CHANGED
|
@@ -3,7 +3,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
-
import { n as noop } from './index-
|
|
6
|
+
import { n as noop } from './index-BojMT3ps.js';
|
|
7
7
|
import Button from './Button.js';
|
|
8
8
|
import Dropdown from './Dropdown.js';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -19,7 +19,7 @@ import 'dayjs/plugin/weekOfYear';
|
|
|
19
19
|
import '@bigbinary/neeto-cist';
|
|
20
20
|
import 'qs';
|
|
21
21
|
import 'ramda';
|
|
22
|
-
import './en-
|
|
22
|
+
import './en-CJac0MnO.js';
|
|
23
23
|
import 'react-router-dom';
|
|
24
24
|
import './Spinner.js';
|
|
25
25
|
import './Tooltip.js';
|
package/dist/Alert.js
CHANGED
|
@@ -13,18 +13,17 @@ import '@babel/runtime/helpers/slicedToArray';
|
|
|
13
13
|
import '@tippyjs/react';
|
|
14
14
|
import 'tippy.js';
|
|
15
15
|
import '@bigbinary/neeto-icons';
|
|
16
|
-
import './useOverlayManager-
|
|
16
|
+
import './useOverlayManager-Dyv5Y8Ug.js';
|
|
17
17
|
import '@babel/runtime/helpers/esm/extends';
|
|
18
18
|
import '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
|
19
19
|
import '@babel/runtime/helpers/esm/inheritsLoose';
|
|
20
20
|
import 'react-dom';
|
|
21
|
-
import '@babel/runtime/helpers/esm/assertThisInitialized';
|
|
22
21
|
import 'ramda';
|
|
23
22
|
import '@bigbinary/neeto-hotkeys';
|
|
24
23
|
import './overlayManager.js';
|
|
25
24
|
import '@babel/runtime/helpers/classCallCheck';
|
|
26
25
|
import '@babel/runtime/helpers/createClass';
|
|
27
|
-
import './index-
|
|
26
|
+
import './index-BojMT3ps.js';
|
|
28
27
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
29
28
|
import 'dayjs';
|
|
30
29
|
import 'dayjs/plugin/localeData';
|
|
@@ -34,7 +33,7 @@ import 'dayjs/plugin/weekday';
|
|
|
34
33
|
import 'dayjs/plugin/weekOfYear';
|
|
35
34
|
import '@bigbinary/neeto-cist';
|
|
36
35
|
import 'qs';
|
|
37
|
-
import './en-
|
|
36
|
+
import './en-CJac0MnO.js';
|
|
38
37
|
|
|
39
38
|
var SIZES = {
|
|
40
39
|
small: "small",
|
package/dist/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../src/components/Alert.jsx"],"sourcesContent":["import React, { useRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport Button from \"./Button\";\nimport Modal from \"./Modal\";\nimport Typography from \"./Typography\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst FOCUSABLE_ELEMENTS = { submit: \"submit\", cancel: \"cancel\" };\n\nconst Alert = ({\n size = SIZES.medium,\n isOpen = false,\n isSubmitting = false,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n closeOnOutsideClick = true,\n onClose = () => {},\n onSubmit = () => {},\n title = \"\",\n message = \"\",\n submitButtonLabel = \"Continue\",\n cancelButtonLabel = \"Cancel\",\n initialFocusRef,\n initialFocusElement,\n hideCancelButton = false,\n}) => {\n const submitButtonRef = useRef(null);\n const cancelButtonRef = useRef(null);\n\n const hasCustomFocusableElement = !!initialFocusRef || initialFocusElement;\n const initialFocusElementRef =\n initialFocusElement === FOCUSABLE_ELEMENTS.submit\n ? submitButtonRef\n : cancelButtonRef;\n\n return (\n <Modal\n {...{\n backdropClassName,\n className,\n closeButton,\n closeOnEsc,\n closeOnOutsideClick,\n isOpen,\n onClose,\n size,\n }}\n data-cy=\"alert-box\"\n {...(hasCustomFocusableElement && {\n initialFocusRef: initialFocusRef || initialFocusElementRef,\n })}\n >\n <Modal.Header>\n <Typography data-cy=\"alert-title\" style=\"h2\">\n {title}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Typography data-cy=\"alert-message\" lineHeight=\"normal\" style=\"body2\">\n {message}\n </Typography>\n </Modal.Body>\n <Modal.Footer className=\"neeto-ui-gap-2 neeto-ui-flex neeto-ui-justify-end neeto-ui-items-center\">\n {!hideCancelButton && (\n <Button\n data-cy=\"alert-cancel-button\"\n label={cancelButtonLabel}\n ref={cancelButtonRef}\n style=\"tertiary\"\n onClick={onClose}\n />\n )}\n <Button\n data-cy=\"alert-submit-button\"\n disabled={isSubmitting}\n label={submitButtonLabel}\n loading={isSubmitting}\n ref={submitButtonRef}\n style=\"danger\"\n onClick={onSubmit}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nAlert.propTypes = {\n /**\n * To specify the size of the Alert.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify whether the Alert is open or not.\n */\n isOpen: PropTypes.bool,\n /**\n * To specify the callback which will be invoked when the Alert is closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the callback which will be invoked when the Alert is submitted.\n */\n onSubmit: PropTypes.func,\n /**\n * To provide title to the Alert.\n */\n title: PropTypes.string,\n /**\n * To provide description to the Alert.\n */\n message: PropTypes.node,\n /**\n * To add loading state to submit button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To provide external classNames to the Alert.\n */\n className: PropTypes.string,\n /**\n * To close the Alert on pressing the `Esc` key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * To specify whether the close button of the Alert should be displayed or not.\n */\n closeButton: PropTypes.bool,\n /**\n * To provide label to the submit button.\n */\n submitButtonLabel: PropTypes.string,\n /**\n * To provide label to the cancel button.\n */\n cancelButtonLabel: PropTypes.string,\n /**\n * To add custom classes to Backdrop component.\n */\n backdropClassName: PropTypes.string,\n /**\n * To close on clicking outside the Alert content.\n */\n closeOnOutsideClick: PropTypes.bool,\n /**\n * To specify the ref of the element which will receive focus when the Alert is opened.\n * If not specified, the focus will be set to the submit button inside the Alert.\n * */\n initialFocusRef: PropTypes.object,\n /**\n * To specify the element which will receive focus when the Alert is opened.\n */\n initialFocusElement: PropTypes.oneOf(Object.values(FOCUSABLE_ELEMENTS)),\n /**\n * To hide the cancel button\n */\n hideCancelButton: PropTypes.bool,\n};\n\nexport default Alert;\n"],"names":["SIZES","small","medium","large","FOCUSABLE_ELEMENTS","submit","cancel","Alert","_ref","_ref$size","size","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$className","className","_ref$closeOnEsc","closeOnEsc","_ref$closeButton","closeButton","_ref$backdropClassNam","backdropClassName","_ref$closeOnOutsideCl","closeOnOutsideClick","_ref$onClose","onClose","_ref$onSubmit","onSubmit","_ref$title","title","_ref$message","message","_ref$submitButtonLabe","submitButtonLabel","_ref$cancelButtonLabe","cancelButtonLabel","initialFocusRef","initialFocusElement","_ref$hideCancelButton","hideCancelButton","submitButtonRef","useRef","cancelButtonRef","hasCustomFocusableElement","initialFocusElementRef","React","createElement","Modal","_extends","Header","Typography","style","Body","lineHeight","Footer","Button","label","ref","onClick","disabled","loading"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/components/Alert.jsx"],"sourcesContent":["import React, { useRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport Button from \"./Button\";\nimport Modal from \"./Modal\";\nimport Typography from \"./Typography\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst FOCUSABLE_ELEMENTS = { submit: \"submit\", cancel: \"cancel\" };\n\nconst Alert = ({\n size = SIZES.medium,\n isOpen = false,\n isSubmitting = false,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n closeOnOutsideClick = true,\n onClose = () => {},\n onSubmit = () => {},\n title = \"\",\n message = \"\",\n submitButtonLabel = \"Continue\",\n cancelButtonLabel = \"Cancel\",\n initialFocusRef,\n initialFocusElement,\n hideCancelButton = false,\n}) => {\n const submitButtonRef = useRef(null);\n const cancelButtonRef = useRef(null);\n\n const hasCustomFocusableElement = !!initialFocusRef || initialFocusElement;\n const initialFocusElementRef =\n initialFocusElement === FOCUSABLE_ELEMENTS.submit\n ? submitButtonRef\n : cancelButtonRef;\n\n return (\n <Modal\n {...{\n backdropClassName,\n className,\n closeButton,\n closeOnEsc,\n closeOnOutsideClick,\n isOpen,\n onClose,\n size,\n }}\n data-cy=\"alert-box\"\n {...(hasCustomFocusableElement && {\n initialFocusRef: initialFocusRef || initialFocusElementRef,\n })}\n >\n <Modal.Header>\n <Typography data-cy=\"alert-title\" style=\"h2\">\n {title}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Typography data-cy=\"alert-message\" lineHeight=\"normal\" style=\"body2\">\n {message}\n </Typography>\n </Modal.Body>\n <Modal.Footer className=\"neeto-ui-gap-2 neeto-ui-flex neeto-ui-justify-end neeto-ui-items-center\">\n {!hideCancelButton && (\n <Button\n data-cy=\"alert-cancel-button\"\n label={cancelButtonLabel}\n ref={cancelButtonRef}\n style=\"tertiary\"\n onClick={onClose}\n />\n )}\n <Button\n data-cy=\"alert-submit-button\"\n disabled={isSubmitting}\n label={submitButtonLabel}\n loading={isSubmitting}\n ref={submitButtonRef}\n style=\"danger\"\n onClick={onSubmit}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nAlert.propTypes = {\n /**\n * To specify the size of the Alert.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify whether the Alert is open or not.\n */\n isOpen: PropTypes.bool,\n /**\n * To specify the callback which will be invoked when the Alert is closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the callback which will be invoked when the Alert is submitted.\n */\n onSubmit: PropTypes.func,\n /**\n * To provide title to the Alert.\n */\n title: PropTypes.string,\n /**\n * To provide description to the Alert.\n */\n message: PropTypes.node,\n /**\n * To add loading state to submit button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To provide external classNames to the Alert.\n */\n className: PropTypes.string,\n /**\n * To close the Alert on pressing the `Esc` key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * To specify whether the close button of the Alert should be displayed or not.\n */\n closeButton: PropTypes.bool,\n /**\n * To provide label to the submit button.\n */\n submitButtonLabel: PropTypes.string,\n /**\n * To provide label to the cancel button.\n */\n cancelButtonLabel: PropTypes.string,\n /**\n * To add custom classes to Backdrop component.\n */\n backdropClassName: PropTypes.string,\n /**\n * To close on clicking outside the Alert content.\n */\n closeOnOutsideClick: PropTypes.bool,\n /**\n * To specify the ref of the element which will receive focus when the Alert is opened.\n * If not specified, the focus will be set to the submit button inside the Alert.\n * */\n initialFocusRef: PropTypes.object,\n /**\n * To specify the element which will receive focus when the Alert is opened.\n */\n initialFocusElement: PropTypes.oneOf(Object.values(FOCUSABLE_ELEMENTS)),\n /**\n * To hide the cancel button\n */\n hideCancelButton: PropTypes.bool,\n};\n\nexport default Alert;\n"],"names":["SIZES","small","medium","large","FOCUSABLE_ELEMENTS","submit","cancel","Alert","_ref","_ref$size","size","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$className","className","_ref$closeOnEsc","closeOnEsc","_ref$closeButton","closeButton","_ref$backdropClassNam","backdropClassName","_ref$closeOnOutsideCl","closeOnOutsideClick","_ref$onClose","onClose","_ref$onSubmit","onSubmit","_ref$title","title","_ref$message","message","_ref$submitButtonLabe","submitButtonLabel","_ref$cancelButtonLabe","cancelButtonLabel","initialFocusRef","initialFocusElement","_ref$hideCancelButton","hideCancelButton","submitButtonRef","useRef","cancelButtonRef","hasCustomFocusableElement","initialFocusElementRef","React","createElement","Modal","_extends","Header","Typography","style","Body","lineHeight","Footer","Button","label","ref","onClick","disabled","loading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,KAAK,EA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,EAAEf,eAAgB;AACrBS,IAAAA,KAAK,EAAC,UAAU;AAChBO,IAAAA,OAAO,EAAEjC,OAAAA;AAAQ,GAAA,CAEpB,eACDoB,cAAA,CAAAC,aAAA,CAACS,MAAM,EAAA;AACL,IAAA,SAAA,EAAQ,qBAAqB;AAC7BI,IAAAA,QAAQ,EAAE9C,YAAa;AACvB2C,IAAAA,KAAK,EAAEvB,iBAAkB;AACzB2B,IAAAA,OAAO,EAAE/C,YAAa;AACtB4C,IAAAA,GAAG,EAAEjB,eAAgB;AACrBW,IAAAA,KAAK,EAAC,QAAQ;AACdO,IAAAA,OAAO,EAAE/B,QAAAA;AAAS,GAAA,CAClB,CACW,CACT,CAAA;AAEZ;;;;"}
|
package/dist/Avatar.js
CHANGED
package/dist/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":";;;;;;;;;;;;;AASA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,MAAM,EAAE,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,UAAU,EAAE,EAAA;AAAG,CAAC,CAAA;AAIjE,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAGC,QAAQ,EAAI;EAC9B,IAAI,OAAOA,QAAQ,KAAK,QAAQ,IAAIC,OAAO,CAACD,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAA;EACjE,IAAME,QAAQ,GAAGF,QAAQ,CAACG,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAA;AAC3C,EAAA,IAAIF,QAAQ,CAACG,MAAM,KAAK,CAAC,EAAE,OAAOL,QAAQ,CAACM,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,WAAW,EAAE,CAAA;EAExE,OAAO,EAAA,CAAAC,MAAA,CAAGN,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAAM,MAAA,CAAGN,QAAQ,CAACA,QAAQ,CAACG,MAAM,GAAG,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el/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React__default, { forwardRef } from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { u as useId } from './useId-
|
|
5
|
+
import { u as useId } from './useId-Jj9hXm-g.js';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import 'react-router-dom';
|
|
8
8
|
import '@bigbinary/neeto-hotkeys';
|
|
9
9
|
import './overlayManager.js';
|
|
10
|
-
import { h as hyphenize } from './index-
|
|
10
|
+
import { h as hyphenize } from './index-BojMT3ps.js';
|
|
11
11
|
import '@babel/runtime/helpers/defineProperty';
|
|
12
12
|
import 'qs';
|
|
13
13
|
import Label from './Label.js';
|
|
@@ -22,7 +22,7 @@ import 'dayjs/plugin/weekday';
|
|
|
22
22
|
import 'dayjs/plugin/weekOfYear';
|
|
23
23
|
import '@bigbinary/neeto-cist';
|
|
24
24
|
import 'ramda';
|
|
25
|
-
import './en-
|
|
25
|
+
import './en-CJac0MnO.js';
|
|
26
26
|
import '@bigbinary/neeto-icons';
|
|
27
27
|
import './Button.js';
|
|
28
28
|
import './Spinner.js';
|
package/dist/ColorPicker.js
CHANGED
|
@@ -7,10 +7,10 @@ import React__default, { useMemo, useRef, useCallback, useEffect, useState } fro
|
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { Focus, Down } from '@bigbinary/neeto-icons';
|
|
9
9
|
import { HexColorInput, HexAlphaColorPicker, HexColorPicker } from 'react-colorful';
|
|
10
|
-
import { t as tinycolor } from './tinycolor-
|
|
10
|
+
import { t as tinycolor } from './tinycolor-DX-kZ4bq.js';
|
|
11
11
|
import Button from './Button.js';
|
|
12
12
|
import Dropdown from './Dropdown.js';
|
|
13
|
-
import { n as noop } from './index-
|
|
13
|
+
import { n as noop } from './index-BojMT3ps.js';
|
|
14
14
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
15
15
|
import 'react-router-dom';
|
|
16
16
|
import './Spinner.js';
|
|
@@ -29,7 +29,7 @@ import 'dayjs/plugin/utc';
|
|
|
29
29
|
import 'dayjs/plugin/weekday';
|
|
30
30
|
import 'dayjs/plugin/weekOfYear';
|
|
31
31
|
import 'qs';
|
|
32
|
-
import './en-
|
|
32
|
+
import './en-CJac0MnO.js';
|
|
33
33
|
|
|
34
34
|
const s=()=>"undefined"!=typeof window&&"EyeDropper"in window,i=()=>Promise.reject(new Error("Unsupported browser.")),c=()=>{const r=useRef(),[i,c]=useState(!1);useEffect(()=>(r.current=!0,c(s()),()=>{r.current=!1;}),[]);const u=useCallback(()=>i,[i]);return [r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return (n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=useMemo(()=>u(e),[e]),[i,p]=c(),a=useRef(),f=useCallback(()=>{void 0!==a.current&&a.current.abort();},[a]),d=useCallback(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener("abort",n);};for(const o of r){if(o.aborted){n();break}o.addEventListener("abort",n);}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}));}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return useEffect(()=>f,[f]),{open:d,close:f,isSupported:p}};
|
|
35
35
|
|
package/dist/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item\", {\n active: color && color.from === item.from && color.to === item.to,\n })}\n onClick={() => onChange(item.from, item.to)}\n >\n <div className={`bg-gradient-to-r from-${item.from} to-${item.to}`} />\n </div>\n ))}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, Focus } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = false,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={Focus}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\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 set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be hidden.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","index","key","classnames","active","from","to","onClick","concat","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","hex","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","style","backgroundColor","Down","Dropdown","_extends","closeOnSelect","customTarget","label","position","_objectSpread","Fragment","Button","icon","Focus","HexColorInput","alpha"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACA,MAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,QAAC,CAAC,CAAC,CAAC,CAAC,CAACC,SAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAACC,WAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,UAAU,CAAC,CAAC,C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ker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const s=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,i=()=>Promise.reject(new Error(\"Unsupported browser.\")),c=()=>{const r=o(),[i,c]=e(!1);t(()=>(r.current=!0,c(s()),()=>{r.current=!1}),[]);const u=n(()=>i,[i]);return[r,u]},u=r=>{const o=(r=>s()&&new EyeDropper(r))(r);var n;return(n=o)?EyeDropper.prototype.open.bind(n):i},p=e=>{const s=r(()=>u(e),[e]),[i,p]=c(),a=o(),f=n(()=>{void 0!==a.current&&a.current.abort()},[a]),d=n(function(r){void 0===r&&(r={});try{f();const{signal:o,...n}=r,t=new AbortController;a.current=t;const e=void 0!==o?(r=>{const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;return Promise.resolve(function(r,o){try{var t=Promise.resolve(s({...n,signal:e}))}catch(r){return o(r)}return t&&t.then?t.then(void 0,o):t}(0,function(r){throw i.current||(r.canceled=!0),r}))}catch(r){return Promise.reject(r)}},[a,i,f,s]);return t(()=>f,[f]),{open:d,close:f,isSupported:p}};export{p as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst Palette = ({ color, colorList = [], onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette\">\n {colorList.map((item, index) => (\n <div\n data-testid=\"color-palette-item\"\n key={index}\n className={classnames(\"neeto-ui-color-palette__item\", {\n active: color && color.from === item.from && color.to === item.to,\n })}\n onClick={() => onChange(item.from, item.to)}\n >\n <div className={`bg-gradient-to-r from-${item.from} to-${item.to}`} />\n </div>\n ))}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down, Focus } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport { noop } from \"utils\";\n\nimport Palette from \"./Palette\";\n\nconst TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n colorPaletteProps,\n dropdownProps,\n showEyeDropper = false,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n portalProps,\n}) => {\n const [colorInternal, setColorInternal] = useState(color);\n const isInputChanged = useRef(false);\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const onChangeInternal = onChange || setColorInternal;\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n return {\n hex: showTransparencyControl ? color.toHex8String() : color.toHexString(),\n rgb: color.toRgb(),\n };\n };\n\n const onColorInputChange = hex => {\n const color = tinycolor(hex);\n const rgb = color.toRgb();\n isInputChanged.current = true;\n\n onChangeInternal({ hex, rgb });\n };\n\n const onPickerChange = hex => onChangeInternal(getColor(hex));\n\n const onBlur = () => {\n // If input is not changed, don't call onChange on blur\n if (!isInputChanged.current) return;\n isInputChanged.current = false;\n onChangeInternal(getColor(colorValue));\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const colorHex = tinycolor(colorResponse.sRGBHex).toHexString();\n onPickerChange(colorHex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const Target = ({ size }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-400 border\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n );\n\n return (\n <Dropdown\n className=\"neeto-ui-colorpicker__dropdown\"\n closeOnSelect={false}\n customTarget={<Target {...{ size }} />}\n label={colorValue}\n position=\"bottom-start\"\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {colorPaletteProps && (\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\":\n !showPicker,\n })}\n >\n <Palette {...colorPaletteProps} />\n </div>\n )}\n {showPicker && (\n <>\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onPickerChange} />\n </div>\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-2 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={Focus}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n alpha={!!showTransparencyControl}\n color={colorValue}\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\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 set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the props to be passed to the Palette component.\n */\n colorPaletteProps: PropTypes.shape({\n color: PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n }),\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n from: PropTypes.string,\n to: PropTypes.string,\n })\n ),\n onChange: PropTypes.func,\n }),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be hidden.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n};\n\nexport default ColorPicker;\n"],"names":["o","e","t","n","r","Dropper","Palette","_ref","color","_ref$colorList","colorList","onChange","React","createElement","className","map","item","index","key","classnames","active","from","to","onClick","concat","TARGET_SIZES","large","medium","small","ColorPicker","_ref2","_ref$color","_ref$size","size","_ref$onChange","noop","colorPaletteProps","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","portalProps","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","isInputChanged","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","PickerComponent","HexAlphaColorPicker","HexColorPicker","colorValue","onChangeInternal","getColor","tinycolor","hex","toHex8String","toHexString","rgb","toRgb","onColorInputChange","current","onPickerChange","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","colorHex","wrap","_callee$","_context","prev","next","sent","sRGBHex","t0","stop","apply","arguments","Target","_ref4","type","style","backgroundColor","Down","Dropdown","_extends","closeOnSelect","customTarget","label","position","_objectSpread","Fragment","Button","icon","Focus","HexColorInput","alpha"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACA,MAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,QAAC,CAAC,CAAC,CAAC,CAAC,CAACC,SAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MA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MAAM,EAANA,MAAM;IACZsC,KAAK,EAAE,CAAC,CAACtE,uBAAwB;AACjCnC,IAAAA,KAAK,EAAEuD,UAAW;AAClBpD,IAAAA,QAAQ,EAAE6D,kBAAAA;AAAmB,GAAA,CAC7B,CACE,CACF,CACF,CAET,CACG,CACG,CAAA;AAEf;;;;","x_google_ignoreList":[0,1]}
|
package/dist/DatePicker.js
CHANGED
|
@@ -21,29 +21,25 @@ import './Checkbox.js';
|
|
|
21
21
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
22
22
|
import '@babel/runtime/regenerator';
|
|
23
23
|
import 'react-colorful';
|
|
24
|
-
import './tinycolor-
|
|
24
|
+
import './tinycolor-DX-kZ4bq.js';
|
|
25
25
|
import './Dropdown.js';
|
|
26
|
-
import './index-
|
|
27
|
-
export { D as default } from './index-
|
|
26
|
+
import './index-BojMT3ps.js';
|
|
27
|
+
export { D as default } from './index-DugGi20r.js';
|
|
28
28
|
import './Input.js';
|
|
29
29
|
import './Label.js';
|
|
30
30
|
import './MultiEmailInput.js';
|
|
31
31
|
import 'react-router-dom';
|
|
32
|
-
import './useId-
|
|
32
|
+
import './useId-Jj9hXm-g.js';
|
|
33
33
|
import '@bigbinary/neeto-hotkeys';
|
|
34
34
|
import './overlayManager.js';
|
|
35
35
|
import 'qs';
|
|
36
|
-
import './Textarea-
|
|
36
|
+
import './Textarea-BcglKMaG.js';
|
|
37
37
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
38
38
|
import './Pane.js';
|
|
39
39
|
import './Popover.js';
|
|
40
40
|
import 'framer-motion';
|
|
41
41
|
import './Radio.js';
|
|
42
|
-
import '@babel/runtime/helpers/esm/objectSpread2';
|
|
43
|
-
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
44
|
-
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
45
42
|
import '@babel/runtime/helpers/esm/extends';
|
|
46
|
-
import './react-select-creatable.esm-ad71b0c0.js';
|
|
47
43
|
import '@babel/runtime/helpers/objectSpread2';
|
|
48
44
|
import '@babel/runtime/helpers/classCallCheck';
|
|
49
45
|
import '@babel/runtime/helpers/createClass';
|
|
@@ -52,8 +48,6 @@ import '@babel/runtime/helpers/createSuper';
|
|
|
52
48
|
import '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
53
49
|
import '@babel/runtime/helpers/typeof';
|
|
54
50
|
import 'react-dom';
|
|
55
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
56
|
-
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
57
51
|
import 'antd/lib/config-provider';
|
|
58
52
|
import 'antd/lib/slider';
|
|
59
53
|
import 'react-i18next';
|
|
@@ -68,7 +62,7 @@ import './Switch.js';
|
|
|
68
62
|
import './Tab.js';
|
|
69
63
|
import 'antd/lib/table';
|
|
70
64
|
import 'react-drag-listview';
|
|
71
|
-
import './useRestoreScrollPosition-
|
|
65
|
+
import './useRestoreScrollPosition-DnEaioaR.js';
|
|
72
66
|
import 'react-resizable';
|
|
73
67
|
import './Tag.js';
|
|
74
68
|
import './Toastr.js';
|
|
@@ -81,21 +75,26 @@ import 'dayjs/plugin/timezone';
|
|
|
81
75
|
import 'dayjs/plugin/utc';
|
|
82
76
|
import 'dayjs/plugin/weekday';
|
|
83
77
|
import 'dayjs/plugin/weekOfYear';
|
|
84
|
-
import './en-
|
|
78
|
+
import './en-CJac0MnO.js';
|
|
85
79
|
import './Spinner.js';
|
|
86
80
|
import './Tooltip.js';
|
|
87
|
-
import './useOverlayManager-
|
|
81
|
+
import './useOverlayManager-Dyv5Y8Ug.js';
|
|
88
82
|
import '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
|
89
83
|
import '@babel/runtime/helpers/esm/inheritsLoose';
|
|
90
|
-
import '@babel/runtime/helpers/esm/assertThisInitialized';
|
|
91
84
|
import './constants.js';
|
|
92
|
-
import '
|
|
85
|
+
import './react-select-creatable.esm-Dx_vEnyD.js';
|
|
86
|
+
import '@babel/runtime/helpers/esm/objectSpread2';
|
|
93
87
|
import '@babel/runtime/helpers/esm/classCallCheck';
|
|
94
88
|
import '@babel/runtime/helpers/esm/createClass';
|
|
95
89
|
import '@babel/runtime/helpers/esm/inherits';
|
|
96
90
|
import '@babel/runtime/helpers/esm/createSuper';
|
|
91
|
+
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
97
92
|
import '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
93
|
+
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
94
|
+
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
98
95
|
import '@babel/runtime/helpers/esm/typeof';
|
|
96
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
97
|
+
import '@babel/runtime/helpers/toArray';
|
|
99
98
|
import 'zustand';
|
|
100
99
|
import 'react-toastify';
|
|
101
100
|
import 'linkify-react';
|
package/dist/DatePicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Dropdown.js
CHANGED
|
@@ -8,7 +8,7 @@ import classnames from 'classnames';
|
|
|
8
8
|
import { Down } from '@bigbinary/neeto-icons';
|
|
9
9
|
import { isNil } from 'ramda';
|
|
10
10
|
import Button from './Button.js';
|
|
11
|
-
import { h as hyphenize, n as noop } from './index-
|
|
11
|
+
import { h as hyphenize, n as noop } from './index-BojMT3ps.js';
|
|
12
12
|
import { isPresent } from '@bigbinary/neeto-cist';
|
|
13
13
|
import Tooltip from './Tooltip.js';
|
|
14
14
|
import { Link } from 'react-router-dom';
|
|
@@ -24,7 +24,7 @@ import 'dayjs/plugin/utc';
|
|
|
24
24
|
import 'dayjs/plugin/weekday';
|
|
25
25
|
import 'dayjs/plugin/weekOfYear';
|
|
26
26
|
import 'qs';
|
|
27
|
-
import './en-
|
|
27
|
+
import './en-CJac0MnO.js';
|
|
28
28
|
|
|
29
29
|
var Divider = function Divider(props) {
|
|
30
30
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
package/dist/Input.js
CHANGED
|
@@ -5,11 +5,11 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
5
5
|
import React__default, { forwardRef, useState } from 'react';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { replace } from 'ramda';
|
|
8
|
-
import { u as useId } from './useId-
|
|
8
|
+
import { u as useId } from './useId-Jj9hXm-g.js';
|
|
9
9
|
import 'react-router-dom';
|
|
10
10
|
import '@bigbinary/neeto-hotkeys';
|
|
11
11
|
import './overlayManager.js';
|
|
12
|
-
import { h as hyphenize } from './index-
|
|
12
|
+
import { h as hyphenize } from './index-BojMT3ps.js';
|
|
13
13
|
import 'qs';
|
|
14
14
|
import Label from './Label.js';
|
|
15
15
|
import '@babel/runtime/helpers/classCallCheck';
|
|
@@ -22,7 +22,7 @@ import 'dayjs/plugin/utc';
|
|
|
22
22
|
import 'dayjs/plugin/weekday';
|
|
23
23
|
import 'dayjs/plugin/weekOfYear';
|
|
24
24
|
import '@bigbinary/neeto-cist';
|
|
25
|
-
import './en-
|
|
25
|
+
import './en-CJac0MnO.js';
|
|
26
26
|
import '@bigbinary/neeto-icons';
|
|
27
27
|
import './Button.js';
|
|
28
28
|
import './Spinner.js';
|
package/dist/Kbd.js
CHANGED
|
@@ -3,6 +3,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import Tooltip from './Tooltip.js';
|
|
6
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
7
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
8
|
import '@tippyjs/react';
|
|
8
9
|
import 'tippy.js';
|
package/dist/Kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kbd.js","sources":["../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Kbd.js","sources":["../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":";;;;;;;;;;;AAOA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;AAAA,EAAA,oBAC5DC,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;AAACC,IAAAA,QAAQ,EAAE,CAACR,YAAAA;AAAa,GAAA,EAAKA,YAAY,CAChDI,eAAAA,cAAA,CAAAC,aAAA,SAAAE,QAAA,CAAA;AAAMR,IAAAA,SAAS,EAAEU,UAAU,CAAC,CAAC,cAAc,EAAEV,SAAS,CAAC,CAAA;AAAE,GAAA,EAAKE,UAAU,CAAA,EACrEH,OAAO,CACH,CACC,CAAA;AAAA;;;;"}
|