@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.
- package/dist/Accordion.js +5 -6
- package/dist/Accordion.js.map +1 -1
- package/dist/ActionDropdown.js +16 -11
- package/dist/ActionDropdown.js.map +1 -1
- package/dist/Alert.js +23 -13
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.js +6 -6
- package/dist/Button.js +7 -8
- package/dist/Button.js.map +1 -1
- package/dist/Callout.js +4 -5
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +22 -13
- package/dist/Checkbox.js.map +1 -1
- package/dist/ColorPicker.js +20 -14
- package/dist/ColorPicker.js.map +1 -1
- package/dist/DatePicker.js +21 -12
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateTimePicker.js +27 -17
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Dropdown.js +18 -13
- package/dist/Dropdown.js.map +1 -1
- package/dist/Input.js +21 -12
- package/dist/Input.js.map +1 -1
- package/dist/Kbd.js +6 -6
- package/dist/Label.js +54 -18
- package/dist/Label.js.map +1 -1
- package/dist/Modal.js +23 -13
- package/dist/Modal.js.map +1 -1
- package/dist/MultiEmailInput.js +41 -16
- package/dist/MultiEmailInput.js.map +1 -1
- package/dist/NoData.js +7 -8
- package/dist/NoData.js.map +1 -1
- package/dist/Pagination.js +15 -10
- package/dist/Pagination.js.map +1 -1
- package/dist/Pane.js +23 -13
- package/dist/Pane.js.map +1 -1
- package/dist/Popover.js +7 -8
- package/dist/Popover.js.map +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +22 -13
- package/dist/Radio.js.map +1 -1
- package/dist/Select.js +42 -14
- package/dist/Select.js.map +1 -1
- package/dist/Sidebar.js +16 -11
- package/dist/Sidebar.js.map +1 -1
- package/dist/Slider.js +22 -13
- package/dist/Slider.js.map +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Switch.js +22 -13
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +4 -5
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +19 -14
- package/dist/Table.js.map +1 -1
- package/dist/Tag.js +3 -3
- package/dist/Textarea.js +22 -13
- package/dist/Textarea.js.map +1 -1
- package/dist/TimePicker.js +22 -13
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerInput.js +258 -21
- package/dist/TimePickerInput.js.map +1 -1
- package/dist/Toastr.js +15 -126
- package/dist/Toastr.js.map +1 -1
- package/dist/Tooltip.js +73 -7
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tree.js +13 -8
- package/dist/Tree.js.map +1 -1
- package/dist/TreeSelect.js +21 -11
- package/dist/TreeSelect.js.map +1 -1
- package/dist/Typography.js +4 -5
- package/dist/Typography.js.map +1 -1
- package/dist/cjs/Accordion.js +25 -21
- package/dist/cjs/Accordion.js.map +1 -1
- package/dist/cjs/ActionDropdown.js +24 -16
- package/dist/cjs/ActionDropdown.js.map +1 -1
- package/dist/cjs/Alert.js +25 -14
- package/dist/cjs/Alert.js.map +1 -1
- package/dist/cjs/Avatar.js +17 -13
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/Button.js +17 -14
- package/dist/cjs/Button.js.map +1 -1
- package/dist/cjs/Callout.js +11 -8
- package/dist/cjs/Callout.js.map +1 -1
- package/dist/cjs/Checkbox.js +32 -20
- package/dist/cjs/Checkbox.js.map +1 -1
- package/dist/cjs/ColorPicker.js +33 -22
- package/dist/cjs/ColorPicker.js.map +1 -1
- package/dist/cjs/DatePicker.js +35 -21
- package/dist/cjs/DatePicker.js.map +1 -1
- package/dist/cjs/DateTimePicker.js +45 -29
- package/dist/cjs/DateTimePicker.js.map +1 -1
- package/dist/cjs/Dropdown.js +50 -39
- package/dist/cjs/Dropdown.js.map +1 -1
- package/dist/cjs/Input.js +39 -25
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Kbd.js +13 -10
- package/dist/cjs/Kbd.js.map +1 -1
- package/dist/cjs/Label.js +61 -21
- package/dist/cjs/Label.js.map +1 -1
- package/dist/cjs/Modal.js +36 -21
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/MultiEmailInput.js +71 -39
- package/dist/cjs/MultiEmailInput.js.map +1 -1
- package/dist/cjs/NoData.js +15 -13
- package/dist/cjs/NoData.js.map +1 -1
- package/dist/cjs/Pagination.js +24 -17
- package/dist/cjs/Pagination.js.map +1 -1
- package/dist/cjs/Pane.js +36 -21
- package/dist/cjs/Pane.js.map +1 -1
- package/dist/cjs/Popover.js +14 -12
- package/dist/cjs/Popover.js.map +1 -1
- package/dist/cjs/ProgressBar.js +3 -2
- package/dist/cjs/ProgressBar.js.map +1 -1
- package/dist/cjs/Radio.js +39 -25
- package/dist/cjs/Radio.js.map +1 -1
- package/dist/cjs/Select.js +91 -54
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Sidebar.js +38 -28
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/Slider.js +29 -17
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Spinner.js +3 -2
- package/dist/cjs/Spinner.js.map +1 -1
- package/dist/cjs/Stepper.js +7 -6
- package/dist/cjs/Stepper.js.map +1 -1
- package/dist/cjs/Switch.js +35 -23
- package/dist/cjs/Switch.js.map +1 -1
- package/dist/cjs/Tab.js +15 -12
- package/dist/cjs/Tab.js.map +1 -1
- package/dist/cjs/Table.js +55 -44
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/Tag.js +10 -7
- package/dist/cjs/Tag.js.map +1 -1
- package/dist/cjs/Textarea.js +38 -24
- package/dist/cjs/Textarea.js.map +1 -1
- package/dist/cjs/TimePicker.js +31 -18
- package/dist/cjs/TimePicker.js.map +1 -1
- package/dist/cjs/TimePickerInput.js +268 -22
- package/dist/cjs/TimePickerInput.js.map +1 -1
- package/dist/cjs/Toastr.js +32 -155
- package/dist/cjs/Toastr.js.map +1 -1
- package/dist/cjs/Tooltip.js +78 -8
- package/dist/cjs/Tooltip.js.map +1 -1
- package/dist/cjs/Tree.js +20 -12
- package/dist/cjs/Tree.js.map +1 -1
- package/dist/cjs/TreeSelect.js +30 -16
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/Typography.js +11 -8
- package/dist/cjs/Typography.js.map +1 -1
- package/dist/cjs/formik/ActionBlock.js +12 -11
- package/dist/cjs/formik/ActionBlock.js.map +1 -1
- package/dist/cjs/formik/BlockNavigation.js +29 -16
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Button.js +11 -10
- package/dist/cjs/formik/Button.js.map +1 -1
- package/dist/cjs/formik/Checkbox.js +28 -16
- package/dist/cjs/formik/Checkbox.js.map +1 -1
- package/dist/cjs/formik/Form.js +29 -24
- package/dist/cjs/formik/Form.js.map +1 -1
- package/dist/cjs/formik/Input.js +27 -15
- package/dist/cjs/formik/Input.js.map +1 -1
- package/dist/cjs/formik/MultiEmailInput.js +47 -15
- package/dist/cjs/formik/MultiEmailInput.js.map +1 -1
- package/dist/cjs/formik/Radio.js +31 -18
- package/dist/cjs/formik/Radio.js.map +1 -1
- package/dist/cjs/formik/Select.js +48 -16
- package/dist/cjs/formik/Select.js.map +1 -1
- package/dist/cjs/formik/Slider.js +31 -18
- package/dist/cjs/formik/Slider.js.map +1 -1
- package/dist/cjs/formik/Switch.js +28 -16
- package/dist/cjs/formik/Switch.js.map +1 -1
- package/dist/cjs/formik/Textarea.js +28 -16
- package/dist/cjs/formik/Textarea.js.map +1 -1
- package/dist/cjs/formik/TreeSelect.js +27 -14
- package/dist/cjs/formik/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/index.js +45 -16
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/index-f2e36d91.js +167 -0
- package/dist/cjs/index-f2e36d91.js.map +1 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +49 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts.js +16 -11
- package/dist/cjs/layouts.js.map +1 -1
- package/dist/cjs/managers.js +2 -2
- package/dist/cjs/overlayManager.js +9 -4
- package/dist/cjs/overlayManager.js.map +1 -1
- package/dist/cjs/{react-select-creatable.esm-b39742a3.js → react-select-creatable.esm-23eddf9f.js} +130 -367
- package/dist/cjs/react-select-creatable.esm-23eddf9f.js.map +1 -0
- package/dist/cjs/{useOverlayManager-359ed795.js → useOverlayManager-1de0435e.js} +37 -75
- package/dist/cjs/useOverlayManager-1de0435e.js.map +1 -0
- package/dist/cjs/{useQueryParams-14f054b3.js → useQueryParams-a8ee2f76.js} +9 -5
- package/dist/cjs/useQueryParams-a8ee2f76.js.map +1 -0
- package/dist/formik/ActionBlock.js +7 -8
- package/dist/formik/ActionBlock.js.map +1 -1
- package/dist/formik/BlockNavigation.js +23 -13
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Button.js +7 -8
- package/dist/formik/Button.js.map +1 -1
- package/dist/formik/Checkbox.js +22 -13
- package/dist/formik/Checkbox.js.map +1 -1
- package/dist/formik/Form.js +13 -14
- package/dist/formik/Form.js.map +1 -1
- package/dist/formik/Input.js +21 -12
- package/dist/formik/Input.js.map +1 -1
- package/dist/formik/MultiEmailInput.js +41 -12
- package/dist/formik/MultiEmailInput.js.map +1 -1
- package/dist/formik/Radio.js +23 -14
- package/dist/formik/Radio.js.map +1 -1
- package/dist/formik/Select.js +40 -12
- package/dist/formik/Select.js.map +1 -1
- package/dist/formik/Slider.js +23 -14
- package/dist/formik/Slider.js.map +1 -1
- package/dist/formik/Switch.js +22 -13
- package/dist/formik/Switch.js.map +1 -1
- package/dist/formik/Textarea.js +22 -13
- package/dist/formik/Textarea.js.map +1 -1
- package/dist/formik/TreeSelect.js +21 -11
- package/dist/formik/TreeSelect.js.map +1 -1
- package/dist/formik/index.js +45 -16
- package/dist/formik/index.js.map +1 -1
- package/dist/index-9d5142b4.js +145 -0
- package/dist/index-9d5142b4.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +47 -18
- package/dist/index.js.map +1 -1
- package/dist/layouts.js +16 -11
- package/dist/layouts.js.map +1 -1
- package/dist/managers.js +2 -2
- package/dist/overlayManager.js +2 -2
- package/dist/{react-select-creatable.esm-93affeca.js → react-select-creatable.esm-ad71b0c0.js} +43 -289
- package/dist/react-select-creatable.esm-ad71b0c0.js.map +1 -0
- package/dist/{useOverlayManager-95a474d5.js → useOverlayManager-9d385819.js} +9 -54
- package/dist/useOverlayManager-9d385819.js.map +1 -0
- package/dist/{useQueryParams-4e7ddcf8.js → useQueryParams-dcb34865.js} +4 -4
- package/dist/{useQueryParams-4e7ddcf8.js.map → useQueryParams-dcb34865.js.map} +1 -1
- package/package.json +13 -6
- package/types/Label.d.ts +7 -0
- package/dist/cjs/createClass-80e17c6a.js +0 -31
- package/dist/cjs/createClass-80e17c6a.js.map +0 -1
- package/dist/cjs/defineProperty-ee86604b.js +0 -21
- package/dist/cjs/defineProperty-ee86604b.js.map +0 -1
- package/dist/cjs/extends-1b35a664.js +0 -19
- package/dist/cjs/extends-1b35a664.js.map +0 -1
- package/dist/cjs/index-302c3d37.js +0 -58
- package/dist/cjs/index-302c3d37.js.map +0 -1
- package/dist/cjs/index-5d74cfeb.js +0 -375
- package/dist/cjs/index-5d74cfeb.js.map +0 -1
- package/dist/cjs/index-6e09c7bc.js +0 -2211
- package/dist/cjs/index-6e09c7bc.js.map +0 -1
- package/dist/cjs/index-773961dd.js +0 -453
- package/dist/cjs/index-773961dd.js.map +0 -1
- package/dist/cjs/index-a8cc581e.js +0 -2383
- package/dist/cjs/index-a8cc581e.js.map +0 -1
- package/dist/cjs/index-becc6543.js +0 -262
- package/dist/cjs/index-becc6543.js.map +0 -1
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js +0 -33
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js.map +0 -1
- package/dist/cjs/react-select-creatable.esm-b39742a3.js.map +0 -1
- package/dist/cjs/slicedToArray-732a2048.js +0 -63
- package/dist/cjs/slicedToArray-732a2048.js.map +0 -1
- package/dist/cjs/toConsumableArray-418424fc.js +0 -23
- package/dist/cjs/toConsumableArray-418424fc.js.map +0 -1
- package/dist/cjs/toPropertyKey-bfa2e465.js +0 -31
- package/dist/cjs/toPropertyKey-bfa2e465.js.map +0 -1
- package/dist/cjs/useOverlayManager-359ed795.js.map +0 -1
- package/dist/cjs/useQueryParams-14f054b3.js.map +0 -1
- package/dist/createClass-601a36b2.js +0 -28
- package/dist/createClass-601a36b2.js.map +0 -1
- package/dist/defineProperty-e5245270.js +0 -19
- package/dist/defineProperty-e5245270.js.map +0 -1
- package/dist/extends-093996c9.js +0 -17
- package/dist/extends-093996c9.js.map +0 -1
- package/dist/index-34956d66.js +0 -372
- package/dist/index-34956d66.js.map +0 -1
- package/dist/index-3659771d.js +0 -56
- package/dist/index-3659771d.js.map +0 -1
- package/dist/index-661b9fd6.js +0 -253
- package/dist/index-661b9fd6.js.map +0 -1
- package/dist/index-7fae3611.js +0 -2381
- package/dist/index-7fae3611.js.map +0 -1
- package/dist/index-c442518b.js +0 -445
- package/dist/index-c442518b.js.map +0 -1
- package/dist/index-c8d9113c.js +0 -2193
- package/dist/index-c8d9113c.js.map +0 -1
- package/dist/objectWithoutProperties-a0edb288.js +0 -31
- package/dist/objectWithoutProperties-a0edb288.js.map +0 -1
- package/dist/react-select-creatable.esm-93affeca.js.map +0 -1
- package/dist/slicedToArray-45fa766e.js +0 -57
- package/dist/slicedToArray-45fa766e.js.map +0 -1
- package/dist/toConsumableArray-1186e144.js +0 -20
- package/dist/toConsumableArray-1186e144.js.map +0 -1
- package/dist/toPropertyKey-bdc24cb9.js +0 -28
- package/dist/toPropertyKey-bdc24cb9.js.map +0 -1
- package/dist/useOverlayManager-95a474d5.js.map +0 -1
package/dist/formik/Select.js
CHANGED
|
@@ -1,27 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
3
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import React__default, { forwardRef, useRef, startTransition } from 'react';
|
|
6
6
|
import { useField } from 'formik';
|
|
7
7
|
import { prop, either, isNil, isEmpty } from 'ramda';
|
|
8
8
|
import Select from '../Select.js';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
10
|
+
import 'classnames';
|
|
11
11
|
import '@bigbinary/neeto-cist';
|
|
12
12
|
import '@bigbinary/neeto-icons';
|
|
13
|
-
import '../react-select-creatable.esm-
|
|
13
|
+
import '../react-select-creatable.esm-ad71b0c0.js';
|
|
14
|
+
import '@babel/runtime/helpers/esm/extends';
|
|
15
|
+
import '@babel/runtime/helpers/esm/objectSpread2';
|
|
16
|
+
import '@babel/runtime/helpers/esm/classCallCheck';
|
|
17
|
+
import '@babel/runtime/helpers/esm/createClass';
|
|
18
|
+
import '@babel/runtime/helpers/esm/inherits';
|
|
19
|
+
import '@babel/runtime/helpers/esm/createSuper';
|
|
20
|
+
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
21
|
+
import '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
22
|
+
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
23
|
+
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
24
|
+
import '@babel/runtime/helpers/esm/typeof';
|
|
25
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
14
26
|
import 'react-dom';
|
|
27
|
+
import '@babel/runtime/helpers/objectSpread2';
|
|
28
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
29
|
+
import '@babel/runtime/helpers/createClass';
|
|
30
|
+
import '@babel/runtime/helpers/inherits';
|
|
31
|
+
import '@babel/runtime/helpers/createSuper';
|
|
32
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
33
|
+
import '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
15
34
|
import '../useId-c1d20bba.js';
|
|
16
35
|
import 'react-router-dom';
|
|
17
|
-
import '
|
|
36
|
+
import '@bigbinary/neeto-hotkeys';
|
|
18
37
|
import '../overlayManager.js';
|
|
19
|
-
import '../
|
|
20
|
-
import '
|
|
21
|
-
import '
|
|
38
|
+
import '../index-9d5142b4.js';
|
|
39
|
+
import 'dayjs';
|
|
40
|
+
import 'dayjs/plugin/localeData';
|
|
41
|
+
import 'dayjs/plugin/utc';
|
|
42
|
+
import 'dayjs/plugin/weekday';
|
|
43
|
+
import 'dayjs/plugin/weekOfYear';
|
|
44
|
+
import 'qs';
|
|
22
45
|
import '../Label.js';
|
|
23
|
-
import '../
|
|
46
|
+
import '../Button.js';
|
|
47
|
+
import '../motion-087daf52.js';
|
|
48
|
+
import '../Tooltip.js';
|
|
49
|
+
import '@tippyjs/react';
|
|
24
50
|
import 'tippy.js';
|
|
51
|
+
import '../Popover.js';
|
|
52
|
+
import '../Typography.js';
|
|
25
53
|
import '../Spinner.js';
|
|
26
54
|
|
|
27
55
|
var _excluded = ["name", "options", "getOptionValue", "isMulti"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/formik/Select.jsx"],"sourcesContent":["import React, { forwardRef, useRef, startTransition } from \"react\";\n\nimport { useField } from \"formik\";\nimport PropTypes from \"prop-types\";\nimport { prop, either, isNil, isEmpty } from \"ramda\";\n\nimport Select from \"components/Select\";\n\nconst SelectField = forwardRef((props, ref) => {\n const {\n name = \"\",\n options = [],\n getOptionValue = null,\n isMulti = false,\n ...otherProps\n } = props;\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n const isMenuOpen = useRef(otherProps.defaultMenuIsOpen);\n\n const getRealOptionValue = option => {\n if (typeof getOptionValue !== \"function\") {\n return option.value;\n }\n\n return getOptionValue(option);\n };\n\n const buildValueObj = (value, options) => {\n if (typeof value === \"object\") return value;\n\n return options.filter(option => getRealOptionValue(option) === value)[0];\n };\n\n return (\n <Select\n {...{ options }}\n error={meta.touched ? meta.error : \"\"}\n getOptionValue={getOptionValue || prop(\"value\")}\n innerRef={ref}\n isMulti={!!isMulti}\n name={field.name}\n value={\n either(isNil, isEmpty)(field.value)\n ? null\n : buildValueObj(field.value, options)\n }\n onChange={value => setValue(value)}\n onBlur={() =>\n startTransition(() => {\n setTouched(true);\n })\n }\n {...otherProps}\n onKeyDown={event => {\n if (event.key === \"Enter\" && isMenuOpen.current) {\n event.stopPropagation();\n }\n otherProps.onKeyDown?.(event);\n }}\n onMenuClose={() => {\n isMenuOpen.current = false;\n otherProps.onMenuClose?.();\n }}\n onMenuOpen={() => {\n isMenuOpen.current = true;\n otherProps.onMenuOpen?.();\n }}\n />\n );\n});\n\nSelectField.displayName = \"SelectField\";\n\nSelectField.propTypes = {\n /**\n * The name of the select input.\n */\n name: PropTypes.string,\n /**\n * To provide the options to be displayed in the select component.\n */\n options: PropTypes.array,\n /**\n * To provide the function to get the value of the option.\n */\n getOptionValue: PropTypes.string,\n /**\n * To specify whether multiple options can be selected.\n */\n isMulti: PropTypes.bool,\n};\n\nexport default SelectField;\n"],"names":["SelectField","forwardRef","props","ref","_props$name","name","_props$options","options","_props$getOptionValue","getOptionValue","_props$isMulti","isMulti","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","isMenuOpen","useRef","defaultMenuIsOpen","getRealOptionValue","option","value","buildValueObj","_typeof","filter","React","createElement","Select","_extends","error","touched","prop","innerRef","either","isNil","isEmpty","onChange","onBlur","startTransition","onKeyDown","event","_otherProps$onKeyDown","key","current","stopPropagation","call","onMenuClose","_otherProps$onMenuClo","onMenuOpen","_otherProps$onMenuOpe","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/formik/Select.jsx"],"sourcesContent":["import React, { forwardRef, useRef, startTransition } from \"react\";\n\nimport { useField } from \"formik\";\nimport PropTypes from \"prop-types\";\nimport { prop, either, isNil, isEmpty } from \"ramda\";\n\nimport Select from \"components/Select\";\n\nconst SelectField = forwardRef((props, ref) => {\n const {\n name = \"\",\n options = [],\n getOptionValue = null,\n isMulti = false,\n ...otherProps\n } = props;\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n const isMenuOpen = useRef(otherProps.defaultMenuIsOpen);\n\n const getRealOptionValue = option => {\n if (typeof getOptionValue !== \"function\") {\n return option.value;\n }\n\n return getOptionValue(option);\n };\n\n const buildValueObj = (value, options) => {\n if (typeof value === \"object\") return value;\n\n return options.filter(option => getRealOptionValue(option) === value)[0];\n };\n\n return (\n <Select\n {...{ options }}\n error={meta.touched ? meta.error : \"\"}\n getOptionValue={getOptionValue || prop(\"value\")}\n innerRef={ref}\n isMulti={!!isMulti}\n name={field.name}\n value={\n either(isNil, isEmpty)(field.value)\n ? null\n : buildValueObj(field.value, options)\n }\n onChange={value => setValue(value)}\n onBlur={() =>\n startTransition(() => {\n setTouched(true);\n })\n }\n {...otherProps}\n onKeyDown={event => {\n if (event.key === \"Enter\" && isMenuOpen.current) {\n event.stopPropagation();\n }\n otherProps.onKeyDown?.(event);\n }}\n onMenuClose={() => {\n isMenuOpen.current = false;\n otherProps.onMenuClose?.();\n }}\n onMenuOpen={() => {\n isMenuOpen.current = true;\n otherProps.onMenuOpen?.();\n }}\n />\n );\n});\n\nSelectField.displayName = \"SelectField\";\n\nSelectField.propTypes = {\n /**\n * The name of the select input.\n */\n name: PropTypes.string,\n /**\n * To provide the options to be displayed in the select component.\n */\n options: PropTypes.array,\n /**\n * To provide the function to get the value of the option.\n */\n getOptionValue: PropTypes.string,\n /**\n * To specify whether multiple options can be selected.\n */\n isMulti: PropTypes.bool,\n};\n\nexport default SelectField;\n"],"names":["SelectField","forwardRef","props","ref","_props$name","name","_props$options","options","_props$getOptionValue","getOptionValue","_props$isMulti","isMulti","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","isMenuOpen","useRef","defaultMenuIsOpen","getRealOptionValue","option","value","buildValueObj","_typeof","filter","React","createElement","Select","_extends","error","touched","prop","innerRef","either","isNil","isEmpty","onChange","onBlur","startTransition","onKeyDown","event","_otherProps$onKeyDown","key","current","stopPropagation","call","onMenuClose","_otherProps$onMenuClo","onMenuOpen","_otherProps$onMenuOpe","displayName"],"mappings":"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"}
|
package/dist/formik/Slider.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import React__default, { forwardRef } from 'react';
|
|
6
6
|
import { useField } from 'formik';
|
|
7
7
|
import Slider from '../Slider.js';
|
|
8
|
-
import '../toPropertyKey-bdc24cb9.js';
|
|
9
8
|
import 'antd/lib/config-provider';
|
|
10
9
|
import 'antd/lib/slider';
|
|
11
10
|
import '../Label.js';
|
|
12
|
-
import '
|
|
11
|
+
import 'classnames';
|
|
13
12
|
import '@bigbinary/neeto-icons';
|
|
14
|
-
import '../
|
|
13
|
+
import '../Button.js';
|
|
14
|
+
import 'react-router-dom';
|
|
15
|
+
import '../motion-087daf52.js';
|
|
16
|
+
import '../Tooltip.js';
|
|
17
|
+
import '@tippyjs/react';
|
|
15
18
|
import 'tippy.js';
|
|
16
|
-
import '
|
|
19
|
+
import '../Popover.js';
|
|
20
|
+
import '../Typography.js';
|
|
17
21
|
import '../useId-c1d20bba.js';
|
|
18
|
-
import '
|
|
19
|
-
import '../index-7fae3611.js';
|
|
20
|
-
import 'ramda';
|
|
22
|
+
import '@bigbinary/neeto-hotkeys';
|
|
21
23
|
import '../overlayManager.js';
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
25
|
+
import '@babel/runtime/helpers/createClass';
|
|
26
|
+
import '../index-9d5142b4.js';
|
|
27
|
+
import 'dayjs';
|
|
28
|
+
import 'dayjs/plugin/localeData';
|
|
29
|
+
import 'dayjs/plugin/utc';
|
|
30
|
+
import 'dayjs/plugin/weekday';
|
|
31
|
+
import 'dayjs/plugin/weekOfYear';
|
|
24
32
|
import '@bigbinary/neeto-cist';
|
|
25
|
-
import '
|
|
33
|
+
import 'qs';
|
|
34
|
+
import 'ramda';
|
|
26
35
|
|
|
27
36
|
var _excluded = ["name"];
|
|
28
37
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../src/formik/Slider.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\n\nimport Slider from \"components/Slider\";\n\nconst FormikSlider = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <Slider\n error={meta.error || \"\"}\n {...{ ref, ...field, name }}\n onBlur={() => setTouched(true)}\n onChange={value => setValue(value)}\n {...otherProps}\n />\n );\n});\n\nFormikSlider.displayName = \"Slider\";\n\nexport default FormikSlider;\n"],"names":["FormikSlider","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","Slider","_extends","error","_objectSpread","onBlur","onChange","value","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../src/formik/Slider.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\n\nimport Slider from \"components/Slider\";\n\nconst FormikSlider = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <Slider\n error={meta.error || \"\"}\n {...{ ref, ...field, name }}\n onBlur={() => setTouched(true)}\n onChange={value => setValue(value)}\n {...otherProps}\n />\n );\n});\n\nFormikSlider.displayName = \"Slider\";\n\nexport default FormikSlider;\n"],"names":["FormikSlider","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","Slider","_extends","error","_objectSpread","onBlur","onChange","value","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMMA,IAAAA,YAAY,gBAAGC,UAAU,CAAC,UAAAC,IAAA,EAA0BC,GAAG,EAAK;AAAA,EAAA,IAA/BC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AACpD,EAAA,IAAAC,SAAA,GAAgDC,QAAQ,CAACL,IAAI,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,KAAK,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,IAAI,GAAAH,UAAA,CAAA,CAAA,CAAA;AAAAI,IAAAA,WAAA,GAAAJ,UAAA,CAAA,CAAA,CAAA;IAAIK,QAAQ,GAAAD,WAAA,CAARC,QAAQ;IAAEC,UAAU,GAAAF,WAAA,CAAVE,UAAU,CAAA;AAE1C,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,MAAM,EAAAC,QAAA,CAAA;AACLC,IAAAA,KAAK,EAAER,IAAI,CAACQ,KAAK,IAAI,EAAA;GAAGC,EAAAA,aAAA,CAAAA,aAAA,CAAA;AAClBnB,IAAAA,GAAG,EAAHA,GAAAA;AAAG,GAAA,EAAKS,KAAK,CAAA,EAAA,EAAA,EAAA;AAAER,IAAAA,IAAI,EAAJA,IAAAA;AAAI,GAAA,CAAA,EAAA;IACzBmB,MAAM,EAAE,SAAAA,MAAA,GAAA;MAAA,OAAMP,UAAU,CAAC,IAAI,CAAC,CAAA;KAAC;IAC/BQ,QAAQ,EAAE,SAAAA,QAAAA,CAAAC,KAAK,EAAA;MAAA,OAAIV,QAAQ,CAACU,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BpB,UAAU,CACd,CAAA,CAAA;AAEN,CAAC,EAAC;AAEFL,YAAY,CAAC0B,WAAW,GAAG,QAAQ;;;;"}
|
package/dist/formik/Switch.js
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { Field } from 'formik';
|
|
6
6
|
import Switch from '../Switch.js';
|
|
7
|
-
import '
|
|
8
|
-
import '../index-3659771d.js';
|
|
7
|
+
import 'classnames';
|
|
9
8
|
import '@bigbinary/neeto-icons';
|
|
10
9
|
import '../useId-c1d20bba.js';
|
|
10
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
11
|
import 'react-router-dom';
|
|
12
|
-
import '
|
|
13
|
-
import 'ramda';
|
|
12
|
+
import '@bigbinary/neeto-hotkeys';
|
|
14
13
|
import '../overlayManager.js';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '../
|
|
14
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
15
|
+
import '@babel/runtime/helpers/createClass';
|
|
16
|
+
import '../index-9d5142b4.js';
|
|
17
|
+
import 'dayjs';
|
|
18
|
+
import 'dayjs/plugin/localeData';
|
|
19
|
+
import 'dayjs/plugin/utc';
|
|
20
|
+
import 'dayjs/plugin/weekday';
|
|
21
|
+
import 'dayjs/plugin/weekOfYear';
|
|
18
22
|
import '@bigbinary/neeto-cist';
|
|
19
|
-
import '
|
|
23
|
+
import 'qs';
|
|
24
|
+
import 'ramda';
|
|
20
25
|
import '../Label.js';
|
|
21
|
-
import '../
|
|
26
|
+
import '../Button.js';
|
|
27
|
+
import '../motion-087daf52.js';
|
|
28
|
+
import '../Tooltip.js';
|
|
29
|
+
import '@tippyjs/react';
|
|
22
30
|
import 'tippy.js';
|
|
23
|
-
import '
|
|
31
|
+
import '../Popover.js';
|
|
32
|
+
import '../Typography.js';
|
|
24
33
|
|
|
25
34
|
var _excluded = ["name"];
|
|
26
35
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sources":["../../src/formik/Switch.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Switch from \"components/Switch\";\n\nconst FormikSwitch = ({ name, ...rest }) => (\n <Field {...{ name }}>\n {({ field, meta: { error } }) => (\n <Switch checked={field.value} {...{ error, name, ...field, ...rest }} />\n )}\n </Field>\n);\n\nFormikSwitch.propTypes = {\n /**\n * The name of the switch.\n */\n name: PropTypes.string,\n};\n\nexport default FormikSwitch;\n"],"names":["FormikSwitch","_ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","error","meta","Switch","_extends","checked","value","_objectSpread"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../src/formik/Switch.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Switch from \"components/Switch\";\n\nconst FormikSwitch = ({ name, ...rest }) => (\n <Field {...{ name }}>\n {({ field, meta: { error } }) => (\n <Switch checked={field.value} {...{ error, name, ...field, ...rest }} />\n )}\n </Field>\n);\n\nFormikSwitch.propTypes = {\n /**\n * The name of the switch.\n */\n name: PropTypes.string,\n};\n\nexport default FormikSwitch;\n"],"names":["FormikSwitch","_ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","error","meta","Switch","_extends","checked","value","_objectSpread"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAAA,EAAA,oBACnCC,cAAA,CAAAC,aAAA,CAACC,KAAK,EAAA;AAAON,IAAAA,IAAI,EAAJA,IAAAA;AAAI,GAAA,EACd,UAAAO,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;AAAUC,MAAAA,KAAK,GAAAF,KAAA,CAAbG,IAAI,CAAID,KAAK,CAAA;AAAA,IAAA,oBACtBL,cAAA,CAAAC,aAAA,CAACM,MAAM,EAAAC,QAAA,CAAA;MAACC,OAAO,EAAEL,KAAK,CAACM,KAAAA;KAAMC,EAAAA,aAAA,CAAAA,aAAA,CAAA;AAAON,MAAAA,KAAK,EAALA,KAAK;AAAET,MAAAA,IAAI,EAAJA,IAAAA;KAASQ,EAAAA,KAAK,CAAKP,EAAAA,IAAI,CAAM,CAAA,CAAA,CAAA;AAAA,GACzE,CACK,CAAA;AAAA;;;;"}
|
package/dist/formik/Textarea.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import React__default, { forwardRef } from 'react';
|
|
5
5
|
import { Field } from 'formik';
|
|
6
6
|
import { p as propTypes } from '../index-283bc6a6.js';
|
|
7
7
|
import Textarea from '../Textarea.js';
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '../index-3659771d.js';
|
|
8
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
9
|
+
import 'classnames';
|
|
11
10
|
import '../useId-c1d20bba.js';
|
|
12
11
|
import 'react-router-dom';
|
|
13
|
-
import '
|
|
14
|
-
import 'ramda';
|
|
12
|
+
import '@bigbinary/neeto-hotkeys';
|
|
15
13
|
import '../overlayManager.js';
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
14
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
15
|
+
import '@babel/runtime/helpers/createClass';
|
|
16
|
+
import '../index-9d5142b4.js';
|
|
17
|
+
import 'dayjs';
|
|
18
|
+
import 'dayjs/plugin/localeData';
|
|
19
|
+
import 'dayjs/plugin/utc';
|
|
20
|
+
import 'dayjs/plugin/weekday';
|
|
21
|
+
import 'dayjs/plugin/weekOfYear';
|
|
18
22
|
import '@bigbinary/neeto-cist';
|
|
19
|
-
import '
|
|
23
|
+
import 'qs';
|
|
24
|
+
import 'ramda';
|
|
20
25
|
import '../useSyncedRef-226a3dbc.js';
|
|
21
26
|
import '../Label.js';
|
|
22
27
|
import '@bigbinary/neeto-icons';
|
|
23
|
-
import '../
|
|
28
|
+
import '../Button.js';
|
|
29
|
+
import '../motion-087daf52.js';
|
|
30
|
+
import '../Tooltip.js';
|
|
31
|
+
import '@tippyjs/react';
|
|
24
32
|
import 'tippy.js';
|
|
25
|
-
import '
|
|
33
|
+
import '../Popover.js';
|
|
34
|
+
import '../Typography.js';
|
|
26
35
|
|
|
27
36
|
var _excluded = ["name"];
|
|
28
37
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sources":["../../src/formik/Textarea.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Textarea from \"components/Textarea\";\n\nconst FormikTextarea = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <Textarea\n error={meta.touched ? meta.error : \"\"}\n {...{ ref, ...field, ...rest }}\n />\n )}\n </Field>\n));\n\nFormikTextarea.displayName = \"FormikTextarea\";\n\nFormikTextarea.propTypes = {\n /**\n * The name of the textarea field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikTextarea;\n"],"names":["FormikTextarea","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","Textarea","_extends","error","touched","_objectSpread","displayName","propTypes","PropTypes","string"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Textarea.js","sources":["../../src/formik/Textarea.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Textarea from \"components/Textarea\";\n\nconst FormikTextarea = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <Textarea\n error={meta.touched ? meta.error : \"\"}\n {...{ ref, ...field, ...rest }}\n />\n )}\n </Field>\n));\n\nFormikTextarea.displayName = \"FormikTextarea\";\n\nFormikTextarea.propTypes = {\n /**\n * The name of the textarea field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikTextarea;\n"],"names":["FormikTextarea","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","Textarea","_extends","error","touched","_objectSpread","displayName","propTypes","PropTypes","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,cAAc,gBAAGC,UAAU,CAAC,UAAAC,IAAA,EAAoBC,GAAG,EAAA;AAAA,EAAA,IAApBC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAAA,EAAA,oBAChDC,cAAA,CAAAC,aAAA,CAACC,KAAK,EAAA;AAAON,IAAAA,IAAI,EAAJA,IAAAA;AAAI,GAAA,EACd,UAAAO,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;MAAEC,IAAI,GAAAF,KAAA,CAAJE,IAAI,CAAA;AAAA,IAAA,oBACbL,cAAA,CAAAC,aAAA,CAACK,QAAQ,EAAAC,QAAA,CAAA;MACPC,KAAK,EAAEH,IAAI,CAACI,OAAO,GAAGJ,IAAI,CAACG,KAAK,GAAG,EAAA;KAAGE,EAAAA,aAAA,CAAAA,aAAA,CAAA;AAChCf,MAAAA,GAAG,EAAHA,GAAAA;KAAQS,EAAAA,KAAK,CAAKP,EAAAA,IAAI,CAC5B,CAAA,CAAA,CAAA;AAAA,GACH,CACK,CAAA;AAAA,CACT,EAAC;AAEFL,cAAc,CAACmB,WAAW,GAAG,gBAAgB,CAAA;AAE7CnB,cAAc,CAACoB,SAAS,GAAG;AACzB;AACF;AACA;EACEhB,IAAI,EAAEiB,iBAAS,CAACC,MAAAA;AAClB,CAAC;;;;"}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import React__default, { forwardRef } from 'react';
|
|
5
5
|
import { useField } from 'formik';
|
|
6
6
|
import TreeSelect from '../TreeSelect.js';
|
|
7
7
|
import 'antd/lib/config-provider';
|
|
8
8
|
import 'antd/lib/tree-select';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import '../index-3659771d.js';
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
10
|
+
import 'classnames';
|
|
12
11
|
import '@bigbinary/neeto-icons';
|
|
13
|
-
import '../index-
|
|
14
|
-
import '
|
|
12
|
+
import '../index-9d5142b4.js';
|
|
13
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
14
|
+
import '@babel/runtime/helpers/createClass';
|
|
15
|
+
import 'dayjs';
|
|
16
|
+
import 'dayjs/plugin/localeData';
|
|
17
|
+
import 'dayjs/plugin/utc';
|
|
18
|
+
import 'dayjs/plugin/weekday';
|
|
19
|
+
import 'dayjs/plugin/weekOfYear';
|
|
15
20
|
import '@bigbinary/neeto-cist';
|
|
16
|
-
import '
|
|
21
|
+
import 'qs';
|
|
17
22
|
import 'ramda';
|
|
18
23
|
import '../Label.js';
|
|
19
|
-
import '../
|
|
24
|
+
import '../Button.js';
|
|
25
|
+
import 'react-router-dom';
|
|
26
|
+
import '../motion-087daf52.js';
|
|
27
|
+
import '../Tooltip.js';
|
|
28
|
+
import '@tippyjs/react';
|
|
20
29
|
import 'tippy.js';
|
|
21
|
-
import '
|
|
30
|
+
import '../Popover.js';
|
|
31
|
+
import '../Typography.js';
|
|
22
32
|
|
|
23
33
|
var _excluded = ["name"];
|
|
24
34
|
var FormikTreeSelect = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelect.js","sources":["../../src/formik/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\n\nimport TreeSelect from \"components/TreeSelect\";\n\nconst FormikTreeSelect = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <TreeSelect\n {...{ ref }}\n error={meta.error || \"\"}\n name={field.name}\n value={field.value}\n onBlur={() => setTouched(true)}\n onChange={value => setValue(value)}\n {...otherProps}\n />\n );\n});\n\nFormikTreeSelect.displayName = \"TreeSelect\";\n\nexport default FormikTreeSelect;\n"],"names":["FormikTreeSelect","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","TreeSelect","_extends","error","value","onBlur","onChange","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeSelect.js","sources":["../../src/formik/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\n\nimport TreeSelect from \"components/TreeSelect\";\n\nconst FormikTreeSelect = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <TreeSelect\n {...{ ref }}\n error={meta.error || \"\"}\n name={field.name}\n value={field.value}\n onBlur={() => setTouched(true)}\n onChange={value => setValue(value)}\n {...otherProps}\n />\n );\n});\n\nFormikTreeSelect.displayName = \"TreeSelect\";\n\nexport default FormikTreeSelect;\n"],"names":["FormikTreeSelect","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","TreeSelect","_extends","error","value","onBlur","onChange","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMMA,IAAAA,gBAAgB,gBAAGC,UAAU,CAAC,UAAAC,IAAA,EAA0BC,GAAG,EAAK;AAAA,EAAA,IAA/BC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AACxD,EAAA,IAAAC,SAAA,GAAgDC,QAAQ,CAACL,IAAI,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,KAAK,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,IAAI,GAAAH,UAAA,CAAA,CAAA,CAAA;AAAAI,IAAAA,WAAA,GAAAJ,UAAA,CAAA,CAAA,CAAA;IAAIK,QAAQ,GAAAD,WAAA,CAARC,QAAQ;IAAEC,UAAU,GAAAF,WAAA,CAAVE,UAAU,CAAA;AAE1C,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,UAAU,EAAAC,QAAA,CAAA;AACHjB,IAAAA,GAAG,EAAHA,GAAG;AACTkB,IAAAA,KAAK,EAAER,IAAI,CAACQ,KAAK,IAAI,EAAG;IACxBjB,IAAI,EAAEQ,KAAK,CAACR,IAAK;IACjBkB,KAAK,EAAEV,KAAK,CAACU,KAAM;IACnBC,MAAM,EAAE,SAAAA,MAAA,GAAA;MAAA,OAAMP,UAAU,CAAC,IAAI,CAAC,CAAA;KAAC;IAC/BQ,QAAQ,EAAE,SAAAA,QAAAA,CAAAF,KAAK,EAAA;MAAA,OAAIP,QAAQ,CAACO,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BjB,UAAU,CACd,CAAA,CAAA;AAEN,CAAC,EAAC;AAEFL,gBAAgB,CAACyB,WAAW,GAAG,YAAY;;;;"}
|
package/dist/formik/index.js
CHANGED
|
@@ -11,41 +11,70 @@ export { default as Slider } from './Slider.js';
|
|
|
11
11
|
export { default as Switch } from './Switch.js';
|
|
12
12
|
export { default as Textarea } from './Textarea.js';
|
|
13
13
|
export { default as TreeSelect } from './TreeSelect.js';
|
|
14
|
-
import '
|
|
14
|
+
import '@babel/runtime/helpers/extends';
|
|
15
15
|
import 'react';
|
|
16
|
-
import '
|
|
16
|
+
import 'classnames';
|
|
17
17
|
import 'formik';
|
|
18
18
|
import '../Button.js';
|
|
19
|
-
import '
|
|
20
|
-
import '
|
|
21
|
-
import '../objectWithoutProperties-a0edb288.js';
|
|
19
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
20
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
22
21
|
import 'react-router-dom';
|
|
23
22
|
import '../motion-087daf52.js';
|
|
24
|
-
import '../
|
|
25
|
-
import '
|
|
23
|
+
import '../Tooltip.js';
|
|
24
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
25
|
+
import '@tippyjs/react';
|
|
26
26
|
import 'tippy.js';
|
|
27
|
-
import 'react-dom';
|
|
28
27
|
import '../Alert.js';
|
|
29
28
|
import '../Modal.js';
|
|
30
29
|
import '@bigbinary/neeto-icons';
|
|
31
|
-
import '../useOverlayManager-
|
|
30
|
+
import '../useOverlayManager-9d385819.js';
|
|
31
|
+
import '@babel/runtime/helpers/esm/extends';
|
|
32
|
+
import '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
|
33
|
+
import '@babel/runtime/helpers/esm/inheritsLoose';
|
|
32
34
|
import '../index-283bc6a6.js';
|
|
35
|
+
import 'react-dom';
|
|
36
|
+
import '@babel/runtime/helpers/esm/assertThisInitialized';
|
|
33
37
|
import 'ramda';
|
|
34
|
-
import '
|
|
38
|
+
import '@bigbinary/neeto-hotkeys';
|
|
35
39
|
import '../overlayManager.js';
|
|
36
|
-
import '
|
|
37
|
-
import '
|
|
40
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
41
|
+
import '@babel/runtime/helpers/createClass';
|
|
42
|
+
import '../index-9d5142b4.js';
|
|
43
|
+
import 'dayjs';
|
|
44
|
+
import 'dayjs/plugin/localeData';
|
|
45
|
+
import 'dayjs/plugin/utc';
|
|
46
|
+
import 'dayjs/plugin/weekday';
|
|
47
|
+
import 'dayjs/plugin/weekOfYear';
|
|
38
48
|
import '@bigbinary/neeto-cist';
|
|
39
|
-
import '
|
|
49
|
+
import 'qs';
|
|
40
50
|
import '../Typography.js';
|
|
41
51
|
import '../Checkbox.js';
|
|
42
52
|
import '../useId-c1d20bba.js';
|
|
43
53
|
import '../Label.js';
|
|
44
|
-
import '../
|
|
45
|
-
import '
|
|
54
|
+
import '../Popover.js';
|
|
55
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
56
|
+
import '@babel/runtime/regenerator';
|
|
57
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
46
58
|
import '../Input.js';
|
|
47
59
|
import '../MultiEmailInput.js';
|
|
48
|
-
import '../react-select-creatable.esm-
|
|
60
|
+
import '../react-select-creatable.esm-ad71b0c0.js';
|
|
61
|
+
import '@babel/runtime/helpers/esm/objectSpread2';
|
|
62
|
+
import '@babel/runtime/helpers/esm/classCallCheck';
|
|
63
|
+
import '@babel/runtime/helpers/esm/createClass';
|
|
64
|
+
import '@babel/runtime/helpers/esm/inherits';
|
|
65
|
+
import '@babel/runtime/helpers/esm/createSuper';
|
|
66
|
+
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
67
|
+
import '@babel/runtime/helpers/esm/taggedTemplateLiteral';
|
|
68
|
+
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
69
|
+
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
70
|
+
import '@babel/runtime/helpers/esm/typeof';
|
|
71
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
72
|
+
import '@babel/runtime/helpers/objectSpread2';
|
|
73
|
+
import '@babel/runtime/helpers/inherits';
|
|
74
|
+
import '@babel/runtime/helpers/createSuper';
|
|
75
|
+
import '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
76
|
+
import '@babel/runtime/helpers/typeof';
|
|
77
|
+
import '@babel/runtime/helpers/toArray';
|
|
49
78
|
import '../Tag.js';
|
|
50
79
|
import '../Radio.js';
|
|
51
80
|
import '../Select.js';
|
package/dist/formik/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
4
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
|
+
import dayjs from 'dayjs';
|
|
6
|
+
import localeData from 'dayjs/plugin/localeData';
|
|
7
|
+
import utc from 'dayjs/plugin/utc';
|
|
8
|
+
import weekday from 'dayjs/plugin/weekday';
|
|
9
|
+
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
|
10
|
+
import { preprocessForSerialization } from '@bigbinary/neeto-cist';
|
|
11
|
+
import { stringify } from 'qs';
|
|
12
|
+
import { equals, complement, toPairs, pipe, omit, isEmpty } from 'ramda';
|
|
13
|
+
|
|
14
|
+
dayjs.extend(weekOfYear);
|
|
15
|
+
dayjs.extend(weekday);
|
|
16
|
+
dayjs.extend(localeData);
|
|
17
|
+
dayjs.extend(utc);
|
|
18
|
+
var getScrollbarWidth = function getScrollbarWidth() {
|
|
19
|
+
var _parentDiv$parentNode;
|
|
20
|
+
var parentDiv = document.createElement("div");
|
|
21
|
+
parentDiv.style.visibility = "hidden";
|
|
22
|
+
parentDiv.style.overflow = "scroll";
|
|
23
|
+
document.body.appendChild(parentDiv);
|
|
24
|
+
var childDiv = document.createElement("div");
|
|
25
|
+
parentDiv.appendChild(childDiv);
|
|
26
|
+
var scrollbarWidth = parentDiv.offsetWidth - childDiv.offsetWidth;
|
|
27
|
+
parentDiv === null || parentDiv === void 0 || (_parentDiv$parentNode = parentDiv.parentNode) === null || _parentDiv$parentNode === void 0 || _parentDiv$parentNode.removeChild(parentDiv);
|
|
28
|
+
return scrollbarWidth;
|
|
29
|
+
};
|
|
30
|
+
var noop = function noop() {};
|
|
31
|
+
var hyphenize = function hyphenize(input) {
|
|
32
|
+
var fallbackString = "nui";
|
|
33
|
+
if (typeof input === "number") return String(input);
|
|
34
|
+
if (input && typeof input === "string" && input.replace) {
|
|
35
|
+
return input.replace(/[\s_]/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/-+/g, "-").toLowerCase();
|
|
36
|
+
}
|
|
37
|
+
return fallbackString;
|
|
38
|
+
};
|
|
39
|
+
var convertToDayjsObjects = function convertToDayjsObjects(value) {
|
|
40
|
+
return value instanceof Array ? value.map(function (date) {
|
|
41
|
+
return date ? dayjs(date) : date;
|
|
42
|
+
}) : value && dayjs(value);
|
|
43
|
+
};
|
|
44
|
+
var UniqueArray = /*#__PURE__*/function () {
|
|
45
|
+
function UniqueArray() {
|
|
46
|
+
_classCallCheck(this, UniqueArray);
|
|
47
|
+
this.array = [];
|
|
48
|
+
}
|
|
49
|
+
_createClass(UniqueArray, [{
|
|
50
|
+
key: "add",
|
|
51
|
+
value: function add(item) {
|
|
52
|
+
if (this.array.some(equals(item))) return false;
|
|
53
|
+
this.array.push(item);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "remove",
|
|
58
|
+
value: function remove(item) {
|
|
59
|
+
this.array = this.array.filter(complement(equals(item)));
|
|
60
|
+
}
|
|
61
|
+
}]);
|
|
62
|
+
return UniqueArray;
|
|
63
|
+
}();
|
|
64
|
+
var trapFocusOnFocusableElements = function trapFocusOnFocusableElements(ref) {
|
|
65
|
+
var _ref$current, _ref$current2;
|
|
66
|
+
var focusableElements = 'button,[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
67
|
+
var firstFocusableElement = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelectorAll(focusableElements)[0];
|
|
68
|
+
var focusableContent = ref === null || ref === void 0 || (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.querySelectorAll(focusableElements);
|
|
69
|
+
var lastFocusableElement = focusableContent[(focusableContent === null || focusableContent === void 0 ? void 0 : focusableContent.length) - 1];
|
|
70
|
+
var onKeyDown = function onKeyDown(e) {
|
|
71
|
+
var isTabPressed = e.key === "Tab" || e.keyCode === 9;
|
|
72
|
+
if (!isTabPressed) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (e.shiftKey) {
|
|
76
|
+
if (document.activeElement === firstFocusableElement) {
|
|
77
|
+
lastFocusableElement.focus();
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
if (document.activeElement === lastFocusableElement) {
|
|
82
|
+
firstFocusableElement.focus();
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
document.addEventListener("keydown", onKeyDown);
|
|
88
|
+
return function () {
|
|
89
|
+
return document.removeEventListener("keydown", onKeyDown);
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
var focusFirstFocusableElement = function focusFirstFocusableElement(ref) {
|
|
93
|
+
var _ref$current3;
|
|
94
|
+
var focusableElements = 'button,[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
95
|
+
var firstFocusableElement = ref === null || ref === void 0 || (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.querySelectorAll(focusableElements)[0];
|
|
96
|
+
firstFocusableElement === null || firstFocusableElement === void 0 || firstFocusableElement.focus();
|
|
97
|
+
};
|
|
98
|
+
var hideScrollAndAddMargin = function hideScrollAndAddMargin() {
|
|
99
|
+
var scrollbarWidth = getScrollbarWidth();
|
|
100
|
+
document.body.style.overflow = "hidden";
|
|
101
|
+
document.body.style.marginRight = "".concat(scrollbarWidth, "px");
|
|
102
|
+
};
|
|
103
|
+
var showScrollAndRemoveMargin = function showScrollAndRemoveMargin() {
|
|
104
|
+
document.body.style.overflow = "auto";
|
|
105
|
+
document.body.style.marginRight = "0px";
|
|
106
|
+
};
|
|
107
|
+
var ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES = {
|
|
108
|
+
colorBgContainer: "rgb(var(--neeto-ui-white))",
|
|
109
|
+
colorBorder: "rgb(var(--neeto-ui-gray-300))",
|
|
110
|
+
colorBorderSecondary: "rgb(var(--neeto-ui-gray-200))",
|
|
111
|
+
colorFillAlter: "rgb(var(--neeto-ui-gray-100))",
|
|
112
|
+
colorFillContent: "rgb(var(--neeto-ui-gray-100))",
|
|
113
|
+
colorFillSecondary: "rgb(var(--neeto-ui-gray-100))",
|
|
114
|
+
colorIcon: "rgb(var(--neeto-ui-gray-700))",
|
|
115
|
+
colorIconHover: "rgb(var(--neeto-ui-gray-800))",
|
|
116
|
+
colorLink: "rgb(var(--neeto-ui-primary-500))",
|
|
117
|
+
colorLinkActive: "rgb(var(--neeto-ui-primary-800))",
|
|
118
|
+
colorLinkHover: "rgb(var(--neeto-ui-primary-600))",
|
|
119
|
+
colorPrimary: "rgb(var(--neeto-ui-primary-500))",
|
|
120
|
+
colorSplit: "rgb(var(--neeto-ui-gray-100))",
|
|
121
|
+
colorText: "rgb(var(--neeto-ui-gray-800))",
|
|
122
|
+
colorTextDescription: "rgb(var(--neeto-ui-gray-700))",
|
|
123
|
+
colorTextDisabled: "rgb(var(--neeto-ui-gray-600))",
|
|
124
|
+
colorTextHeading: "rgb(var(--neeto-ui-black))",
|
|
125
|
+
colorTextPlaceholder: "rgb(var(--neeto-ui-gray-500))",
|
|
126
|
+
controlItemBgActive: "rgb(var(--neeto-ui-primary-100))",
|
|
127
|
+
controlItemBgActiveHover: "rgb(var(--neeto-ui-pastel-purple))",
|
|
128
|
+
controlItemBgHover: "rgb(var(--neeto-ui-gray-100))"
|
|
129
|
+
};
|
|
130
|
+
var buildUrl = function buildUrl(route, params) {
|
|
131
|
+
var placeHolders = [];
|
|
132
|
+
toPairs(params).forEach(function (_ref) {
|
|
133
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
134
|
+
key = _ref2[0],
|
|
135
|
+
value = _ref2[1];
|
|
136
|
+
if (!route.includes(":".concat(key))) return;
|
|
137
|
+
placeHolders.push(key);
|
|
138
|
+
route = route.replace(":".concat(key), encodeURIComponent(value));
|
|
139
|
+
});
|
|
140
|
+
var queryParams = pipe(omit(placeHolders), preprocessForSerialization, stringify)(params);
|
|
141
|
+
return isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES as A, UniqueArray as U, hideScrollAndAddMargin as a, buildUrl as b, convertToDayjsObjects as c, focusFirstFocusableElement as f, hyphenize as h, noop as n, showScrollAndRemoveMargin as s, trapFocusOnFocusableElements as t };
|
|
145
|
+
//# sourceMappingURL=index-9d5142b4.js.map
|