@bigbinary/neetoui 6.5.17 → 6.5.18-beta
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/ActionDropdown.js +1 -2
- package/dist/ActionDropdown.js.map +1 -1
- package/dist/Alert.js +2 -3
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.js +1125 -19
- package/dist/Avatar.js.map +1 -1
- package/dist/Checkbox.js +1 -2
- package/dist/Checkbox.js.map +1 -1
- package/dist/ColorPicker.js +1 -2
- package/dist/ColorPicker.js.map +1 -1
- package/dist/DatePicker.js +1 -2
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateTimePicker.js +2 -3
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Dropdown.js +1 -2
- package/dist/Dropdown.js.map +1 -1
- package/dist/Input.js +1 -2
- package/dist/Input.js.map +1 -1
- package/dist/Modal.js +2 -3
- package/dist/Modal.js.map +1 -1
- package/dist/MultiEmailInput.js +1 -2
- package/dist/MultiEmailInput.js.map +1 -1
- package/dist/Pagination.js +2 -3
- package/dist/Pagination.js.map +1 -1
- package/dist/Pane.js +2 -3
- package/dist/Pane.js.map +1 -1
- package/dist/Radio.js +1 -2
- package/dist/Radio.js.map +1 -1
- package/dist/Select.js +1 -2
- package/dist/Select.js.map +1 -1
- package/dist/Sidebar.js +1 -2
- package/dist/Sidebar.js.map +1 -1
- package/dist/Slider.js +1 -2
- package/dist/Slider.js.map +1 -1
- package/dist/Switch.js +1 -2
- package/dist/Switch.js.map +1 -1
- package/dist/Table.js +2 -3
- package/dist/Table.js.map +1 -1
- package/dist/Textarea.js +1 -2
- package/dist/Textarea.js.map +1 -1
- package/dist/TimePicker.js +1 -2
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerInput.js +2 -3
- package/dist/TimePickerInput.js.map +1 -1
- package/dist/Toastr.js +1 -2
- package/dist/Toastr.js.map +1 -1
- package/dist/Tree.js +1 -2
- package/dist/Tree.js.map +1 -1
- package/dist/TreeSelect.js +1 -2
- package/dist/TreeSelect.js.map +1 -1
- package/dist/cjs/ActionDropdown.js +1 -2
- package/dist/cjs/ActionDropdown.js.map +1 -1
- package/dist/cjs/Alert.js +2 -3
- package/dist/cjs/Alert.js.map +1 -1
- package/dist/cjs/Avatar.js +1124 -18
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/Checkbox.js +1 -2
- package/dist/cjs/Checkbox.js.map +1 -1
- package/dist/cjs/ColorPicker.js +1 -2
- package/dist/cjs/ColorPicker.js.map +1 -1
- package/dist/cjs/DatePicker.js +1 -2
- package/dist/cjs/DatePicker.js.map +1 -1
- package/dist/cjs/DateTimePicker.js +2 -3
- package/dist/cjs/DateTimePicker.js.map +1 -1
- package/dist/cjs/Dropdown.js +1 -2
- package/dist/cjs/Dropdown.js.map +1 -1
- package/dist/cjs/Input.js +1 -2
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Modal.js +2 -3
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/MultiEmailInput.js +1 -2
- package/dist/cjs/MultiEmailInput.js.map +1 -1
- package/dist/cjs/Pagination.js +2 -3
- package/dist/cjs/Pagination.js.map +1 -1
- package/dist/cjs/Pane.js +2 -3
- package/dist/cjs/Pane.js.map +1 -1
- package/dist/cjs/Radio.js +1 -2
- package/dist/cjs/Radio.js.map +1 -1
- package/dist/cjs/Select.js +1 -2
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -2
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/Slider.js +1 -2
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Switch.js +1 -2
- package/dist/cjs/Switch.js.map +1 -1
- package/dist/cjs/Table.js +3 -4
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/Textarea.js +1 -2
- package/dist/cjs/Textarea.js.map +1 -1
- package/dist/cjs/TimePicker.js +1 -2
- package/dist/cjs/TimePicker.js.map +1 -1
- package/dist/cjs/TimePickerInput.js +2 -3
- package/dist/cjs/TimePickerInput.js.map +1 -1
- package/dist/cjs/Toastr.js +1 -2
- package/dist/cjs/Toastr.js.map +1 -1
- package/dist/cjs/Tree.js +1 -2
- package/dist/cjs/Tree.js.map +1 -1
- package/dist/cjs/TreeSelect.js +1 -2
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/BlockNavigation.js +2 -3
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Checkbox.js +1 -2
- package/dist/cjs/formik/Checkbox.js.map +1 -1
- package/dist/cjs/formik/Input.js +1 -2
- package/dist/cjs/formik/Input.js.map +1 -1
- package/dist/cjs/formik/MultiEmailInput.js +1 -2
- package/dist/cjs/formik/MultiEmailInput.js.map +1 -1
- package/dist/cjs/formik/Radio.js +1 -2
- package/dist/cjs/formik/Radio.js.map +1 -1
- package/dist/cjs/formik/Select.js +1 -2
- package/dist/cjs/formik/Select.js.map +1 -1
- package/dist/cjs/formik/Slider.js +1 -2
- package/dist/cjs/formik/Slider.js.map +1 -1
- package/dist/cjs/formik/Switch.js +1 -2
- package/dist/cjs/formik/Switch.js.map +1 -1
- package/dist/cjs/formik/Textarea.js +1 -2
- package/dist/cjs/formik/Textarea.js.map +1 -1
- package/dist/cjs/formik/TreeSelect.js +1 -2
- package/dist/cjs/formik/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/index.js +2 -3
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/{index-68589e5c.js → index-16ef19ed.js} +31 -7
- package/dist/cjs/index-16ef19ed.js.map +1 -0
- package/dist/cjs/{index-448557c0.js → index-e722fedf.js} +110 -111
- package/dist/cjs/{index-448557c0.js.map → index-e722fedf.js.map} +1 -1
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts.js +1 -2
- package/dist/cjs/layouts.js.map +1 -1
- package/dist/cjs/{useOverlayManager-b8f5f220.js → useOverlayManager-53380ba5.js} +2 -2
- package/dist/cjs/{useOverlayManager-b8f5f220.js.map → useOverlayManager-53380ba5.js.map} +1 -1
- package/dist/cjs/{useQueryParams-dcfba9f0.js → useQueryParams-3ddcf459.js} +2 -2
- package/dist/cjs/{useQueryParams-dcfba9f0.js.map → useQueryParams-3ddcf459.js.map} +1 -1
- package/dist/formik/BlockNavigation.js +2 -3
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Checkbox.js +1 -2
- package/dist/formik/Checkbox.js.map +1 -1
- package/dist/formik/Input.js +1 -2
- package/dist/formik/Input.js.map +1 -1
- package/dist/formik/MultiEmailInput.js +1 -2
- package/dist/formik/MultiEmailInput.js.map +1 -1
- package/dist/formik/Radio.js +1 -2
- package/dist/formik/Radio.js.map +1 -1
- package/dist/formik/Select.js +1 -2
- package/dist/formik/Select.js.map +1 -1
- package/dist/formik/Slider.js +1 -2
- package/dist/formik/Slider.js.map +1 -1
- package/dist/formik/Switch.js +1 -2
- package/dist/formik/Switch.js.map +1 -1
- package/dist/formik/Textarea.js +1 -2
- package/dist/formik/Textarea.js.map +1 -1
- package/dist/formik/TreeSelect.js +1 -2
- package/dist/formik/TreeSelect.js.map +1 -1
- package/dist/formik/index.js +2 -3
- package/dist/formik/index.js.map +1 -1
- package/dist/{index-c3d336a5.js → index-26f3deee.js} +25 -3
- package/dist/index-26f3deee.js.map +1 -0
- package/dist/{index-72592f57.js → index-8ff7d9a1.js} +2 -3
- package/dist/{index-72592f57.js.map → index-8ff7d9a1.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/layouts.js +1 -2
- package/dist/layouts.js.map +1 -1
- package/dist/{useOverlayManager-8651b46d.js → useOverlayManager-e76af01f.js} +2 -2
- package/dist/{useOverlayManager-8651b46d.js.map → useOverlayManager-e76af01f.js.map} +1 -1
- package/dist/{useQueryParams-5059df24.js → useQueryParams-4731dc94.js} +2 -2
- package/dist/{useQueryParams-5059df24.js.map → useQueryParams-4731dc94.js.map} +1 -1
- package/package.json +2 -2
- package/types/ColorPicker.d.ts +4 -1
- package/dist/_commonjsHelpers-ced4e05c.js +0 -29
- package/dist/_commonjsHelpers-ced4e05c.js.map +0 -1
- package/dist/cjs/_commonjsHelpers-44e4a143.js +0 -33
- package/dist/cjs/_commonjsHelpers-44e4a143.js.map +0 -1
- package/dist/cjs/index-68589e5c.js.map +0 -1
- package/dist/index-c3d336a5.js.map +0 -1
package/dist/cjs/Tree.js
CHANGED
|
@@ -6,12 +6,11 @@ var _extends = require('./extends-1b35a664.js');
|
|
|
6
6
|
var defineProperty = require('./defineProperty-ee86604b.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var index = require('./index-302c3d37.js');
|
|
9
|
-
var index$1 = require('./index-
|
|
9
|
+
var index$1 = require('./index-16ef19ed.js');
|
|
10
10
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
11
11
|
require('./toPropertyKey-bfa2e465.js');
|
|
12
12
|
require('./slicedToArray-732a2048.js');
|
|
13
13
|
require('./createClass-80e17c6a.js');
|
|
14
|
-
require('./_commonjsHelpers-44e4a143.js');
|
|
15
14
|
require('@bigbinary/neeto-cist');
|
|
16
15
|
require('util');
|
|
17
16
|
require('ramda');
|
package/dist/cjs/Tree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.js","sources":["../../src/components/Tree/SwitcherIcon.jsx","../../src/components/Tree/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Down, Right } from \"neetoicons\";\n\nconst SwitcherIcon = ({ expanded }) =>\n expanded ? <Down size={16} /> : <Right size={16} />;\n\nexport default SwitcherIcon;\n","import React from \"react\";\n\nimport { ConfigProvider, Tree as TreeComponent } from \"antd\";\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = props => (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n Tree: {\n directoryNodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n directoryNodeSelectedColor: \"rgb(var(--neeto-ui-white))\",\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-100))\",\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n);\n\nTree.propTypes = {\n /**\n * Whether to allow dropping on the node\n */\n allowDrop: PropTypes.bool,\n /**\n * Whether to automatically expand a parent treeNode\n */\n autoExpandParent: PropTypes.bool,\n /**\n * Whether treeNode fill remaining horizontal space\n */\n blockNode: PropTypes.bool,\n /**\n * Add a Checkbox before the treeNodes.\n */\n checkable: PropTypes.bool,\n /**\n * Specifies the keys of the checked treeNodes\n */\n checkedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Check treeNode precisely; parent treeNode and children treeNodes are not associated\n */\n checkStrictly: PropTypes.bool,\n /**\n * Specifies the keys of the default checked treeNodes.\n */\n defaultCheckedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specify the keys of the default expanded treeNodes.\n */\n defaultExpandedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specifies the keys of the default selected treeNodes.\n */\n defaultSelectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Callback function for when the onCheck event occurs.\n */\n onCheck: PropTypes.func,\n /**\n * Whether disabled the tree\n */\n disabled: PropTypes.bool,\n /**\n * The treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array).\n */\n treeData: PropTypes.array,\n /**\n * Callback function for when the user clicks a treeNode.\n */\n onSelect: PropTypes.func,\n /**\n * Shows a connecting line.\n */\n showLine: PropTypes.bool,\n /**\n * Config virtual scroll height. Will not support horizontal scroll when enable this.\n */\n height: PropTypes.number,\n /**\n * Specifies whether this Tree or the node is draggable.\n */\n draggable: PropTypes.bool,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnter: PropTypes.func,\n /**\n * Callback function for when the onDragStart event occurs\n */\n onDragStart: PropTypes.func,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnd: PropTypes.func,\n /**\n * Callback function for when the onDragLeave event occurs\n */\n onDragLeave: PropTypes.func,\n /**\n * Callback function for when the onDragOver event occurs\n */\n onDragOver: PropTypes.func,\n /**\n * Callback function for when the onDrop event occurs\n */\n onDrop: PropTypes.func,\n /**\n * Defines a function to filter (highlight) treeNodes. When the function returns true, the corresponding treeNode will be highlighted\n */\n filterTreeNode: PropTypes.func,\n /**\n * Load data asynchronously\n */\n loadData: PropTypes.func,\n /**\n * Set loaded tree nodes. Need work with loadData\n */\n loadedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Whether can be selected\n */\n selectable: PropTypes.bool,\n /**\n * Specifies the keys of the selected treeNodes, multiple selection needs to set multiple to true\n */\n selectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Allows selecting multiple treeNodes\n */\n multiple: PropTypes.bool,\n /**\n * Customize tree node title render\n */\n titleRender: PropTypes.func,\n /**\n * Disable virtual scroll when set to false\n */\n virtual: PropTypes.bool,\n /**\n * Callback function for when a treeNode is expanded or collapsed\n */\n onExpand: PropTypes.func,\n /**\n * Callback function for when a treeNode is loaded\n */\n onLoad: PropTypes.func,\n /**\n * Customize collapse/expand icon of tree node\n */\n switcherIcon: PropTypes.node,\n};\n\nexport default Tree;\n"],"names":["SwitcherIcon","_ref","expanded","React","createElement","Down","size","Right","Tree","props","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","directoryNodeSelectedBg","directoryNodeSelectedColor","nodeHoverBg","nodeSelectedBg","_Tree","_extends","switcherIcon","className","classnames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tree.js","sources":["../../src/components/Tree/SwitcherIcon.jsx","../../src/components/Tree/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Down, Right } from \"neetoicons\";\n\nconst SwitcherIcon = ({ expanded }) =>\n expanded ? <Down size={16} /> : <Right size={16} />;\n\nexport default SwitcherIcon;\n","import React from \"react\";\n\nimport { ConfigProvider, Tree as TreeComponent } from \"antd\";\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = props => (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n Tree: {\n directoryNodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n directoryNodeSelectedColor: \"rgb(var(--neeto-ui-white))\",\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-100))\",\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n);\n\nTree.propTypes = {\n /**\n * Whether to allow dropping on the node\n */\n allowDrop: PropTypes.bool,\n /**\n * Whether to automatically expand a parent treeNode\n */\n autoExpandParent: PropTypes.bool,\n /**\n * Whether treeNode fill remaining horizontal space\n */\n blockNode: PropTypes.bool,\n /**\n * Add a Checkbox before the treeNodes.\n */\n checkable: PropTypes.bool,\n /**\n * Specifies the keys of the checked treeNodes\n */\n checkedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Check treeNode precisely; parent treeNode and children treeNodes are not associated\n */\n checkStrictly: PropTypes.bool,\n /**\n * Specifies the keys of the default checked treeNodes.\n */\n defaultCheckedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specify the keys of the default expanded treeNodes.\n */\n defaultExpandedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specifies the keys of the default selected treeNodes.\n */\n defaultSelectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Callback function for when the onCheck event occurs.\n */\n onCheck: PropTypes.func,\n /**\n * Whether disabled the tree\n */\n disabled: PropTypes.bool,\n /**\n * The treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array).\n */\n treeData: PropTypes.array,\n /**\n * Callback function for when the user clicks a treeNode.\n */\n onSelect: PropTypes.func,\n /**\n * Shows a connecting line.\n */\n showLine: PropTypes.bool,\n /**\n * Config virtual scroll height. Will not support horizontal scroll when enable this.\n */\n height: PropTypes.number,\n /**\n * Specifies whether this Tree or the node is draggable.\n */\n draggable: PropTypes.bool,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnter: PropTypes.func,\n /**\n * Callback function for when the onDragStart event occurs\n */\n onDragStart: PropTypes.func,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnd: PropTypes.func,\n /**\n * Callback function for when the onDragLeave event occurs\n */\n onDragLeave: PropTypes.func,\n /**\n * Callback function for when the onDragOver event occurs\n */\n onDragOver: PropTypes.func,\n /**\n * Callback function for when the onDrop event occurs\n */\n onDrop: PropTypes.func,\n /**\n * Defines a function to filter (highlight) treeNodes. When the function returns true, the corresponding treeNode will be highlighted\n */\n filterTreeNode: PropTypes.func,\n /**\n * Load data asynchronously\n */\n loadData: PropTypes.func,\n /**\n * Set loaded tree nodes. Need work with loadData\n */\n loadedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Whether can be selected\n */\n selectable: PropTypes.bool,\n /**\n * Specifies the keys of the selected treeNodes, multiple selection needs to set multiple to true\n */\n selectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Allows selecting multiple treeNodes\n */\n multiple: PropTypes.bool,\n /**\n * Customize tree node title render\n */\n titleRender: PropTypes.func,\n /**\n * Disable virtual scroll when set to false\n */\n virtual: PropTypes.bool,\n /**\n * Callback function for when a treeNode is expanded or collapsed\n */\n onExpand: PropTypes.func,\n /**\n * Callback function for when a treeNode is loaded\n */\n onLoad: PropTypes.func,\n /**\n * Customize collapse/expand icon of tree node\n */\n switcherIcon: PropTypes.node,\n};\n\nexport default Tree;\n"],"names":["SwitcherIcon","_ref","expanded","React","createElement","Down","size","Right","Tree","props","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","directoryNodeSelectedBg","directoryNodeSelectedColor","nodeHoverBg","nodeSelectedBg","_Tree","_extends","switcherIcon","className","classnames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;AAAA,EAAA,OAC9BA,QAAQ,gBAAGC,yBAAA,CAAAC,aAAA,CAACC,eAAI,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAAGH,yBAAA,CAAAC,aAAA,CAACG,gBAAK,EAAA;AAACD,IAAAA,IAAI,EAAE,EAAA;GAAM,CAAA,CAAA;AAAA,CAAA;;;;ACKrD,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAGC,KAAK,EAAA;AAAA,EAAA,oBAChBN,yBAAA,CAAAC,aAAA,CAAAM,mCAAA,EAAA;AACEC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,yCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVP,QAAAA,IAAI,EAAE;AACJQ,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAClB,SAAA;AACF,OAAA;AACF,KAAA;AAAE,GAAA,eAEFhB,yBAAA,CAAAC,aAAA,CAAAgB,yBAAA,EAAAC,iBAAA,CAAA;AACEC,IAAAA,YAAY,EAAEtB,YAAAA;AAAa,GAAA,EACvBS,KAAK,EAAA;AACTc,IAAAA,SAAS,EAAEC,gBAAU,CAAC,eAAe,EAAEf,KAAK,CAACc,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAAA;;;;"}
|
package/dist/cjs/TreeSelect.js
CHANGED
|
@@ -8,12 +8,11 @@ var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var index = require('./index-302c3d37.js');
|
|
10
10
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
11
|
-
var index$1 = require('./index-
|
|
11
|
+
var index$1 = require('./index-16ef19ed.js');
|
|
12
12
|
var Label = require('./Label.js');
|
|
13
13
|
require('./toPropertyKey-bfa2e465.js');
|
|
14
14
|
require('./slicedToArray-732a2048.js');
|
|
15
15
|
require('./createClass-80e17c6a.js');
|
|
16
|
-
require('./_commonjsHelpers-44e4a143.js');
|
|
17
16
|
require('@bigbinary/neeto-cist');
|
|
18
17
|
require('util');
|
|
19
18
|
require('ramda');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelect.js","sources":["../../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n ...otherProps\n },\n ref\n ) => {\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n popupClassName=\"neeto-ui-tree-select-dropdown\"\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n No options\n </div>\n }\n switcherIcon={props => (\n <div {...props}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.node,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.node,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","otherProps","_objectWithoutProperties","_excluded","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","popupClassName","treeNodeFilterProp","undefined","classnames","notFoundContent","props","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeSelect.js","sources":["../../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n ...otherProps\n },\n ref\n ) => {\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n popupClassName=\"neeto-ui-tree-select-dropdown\"\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n No options\n </div>\n }\n switcherIcon={props => (\n <div {...props}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.node,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.node,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","otherProps","_objectWithoutProperties","_excluded","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","popupClassName","treeNodeFilterProp","undefined","classnames","notFoundContent","props","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWMA,IAAAA,UAAU,gBAAGC,gBAAU,CAC3B,UAAAC,IAAA,EAoBEC,GAAG,EACA;AAAA,EAAA,IAAAC,iBAAA,CAAA;AAAA,EAAA,IAnBDC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,SAAS,GAAAJ,IA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
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
10
|
require('../index-a8cc581e.js');
|
|
11
11
|
require('../overlayManager.js');
|
|
12
|
-
require('../index-
|
|
12
|
+
require('../index-16ef19ed.js');
|
|
13
13
|
require('../Button.js');
|
|
14
14
|
require('../defineProperty-ee86604b.js');
|
|
15
15
|
require('../toPropertyKey-bfa2e465.js');
|
|
@@ -19,12 +19,11 @@ require('../index-0e68cfff.js');
|
|
|
19
19
|
require('react-dom');
|
|
20
20
|
require('../Modal.js');
|
|
21
21
|
require('@bigbinary/neeto-icons');
|
|
22
|
-
require('../useOverlayManager-
|
|
22
|
+
require('../useOverlayManager-53380ba5.js');
|
|
23
23
|
require('../index-63580e68.js');
|
|
24
24
|
require('ramda');
|
|
25
25
|
require('../Typography.js');
|
|
26
26
|
require('../createClass-80e17c6a.js');
|
|
27
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
28
27
|
require('@bigbinary/neeto-cist');
|
|
29
28
|
require('util');
|
|
30
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNavigation.js","sources":["../../../src/hooks/useNavPrompt.js","../../../src/formik/BlockNavigation.jsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport { useHistory } from \"react-router-dom\";\n\nconst useNavPrompt = ({ shouldBlock = true }) => {\n const [isBlocked, setIsBlocked] = useState(false);\n\n const history = useHistory();\n const unblockRef = useRef();\n const navRef = useRef();\n\n const continueNavigation = () => {\n if (isBlocked && unblockRef.current) {\n unblockRef.current?.();\n setIsBlocked(false);\n if (navRef.current) {\n const { action, transition } = navRef.current;\n handleNavigation(action, transition);\n }\n }\n };\n\n const hidePrompt = () => setIsBlocked(false);\n\n const handleNavigation = (action, transition) => {\n switch (action) {\n case \"PUSH\":\n history.push(transition);\n break;\n case \"REPLACE\":\n history.replace(transition);\n break;\n case \"POP\":\n history.goBack();\n break;\n }\n };\n\n useEffect(() => {\n if (shouldBlock) {\n unblockRef.current = history.block((transition, action) => {\n setIsBlocked(true);\n navRef.current = { transition, action };\n\n return false;\n });\n\n return () => {\n if (unblockRef.current) {\n unblockRef.current();\n }\n };\n }\n\n return undefined;\n }, [shouldBlock]);\n\n return { isBlocked, continueNavigation, hidePrompt };\n};\n\nexport default useNavPrompt;\n","import React from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Alert from \"components/Alert\";\nimport { useNavPrompt } from \"hooks\";\n\nconst BlockNavigation = ({ isDirty = false, ...otherProps }) => {\n const formikContext = useFormikContext();\n const shouldBlock =\n isDirty || (Boolean(formikContext) && Boolean(formikContext.dirty));\n\n const { isBlocked, continueNavigation, hidePrompt } = useNavPrompt({\n shouldBlock,\n });\n\n const continueAction = () => {\n if (formikContext) formikContext.resetForm();\n continueNavigation();\n };\n\n return (\n <Alert\n isOpen={isBlocked}\n message=\"All of your unsaved changes will be lost. This can't be undone.\"\n submitButtonLabel=\"Discard changes\"\n title=\"You have unsaved changes\"\n onClose={hidePrompt}\n onSubmit={continueAction}\n {...otherProps}\n />\n );\n};\n\nBlockNavigation.propTypes = {\n isDirty: PropTypes.bool,\n message: PropTypes.string,\n title: PropTypes.string,\n submitButtonLabel: PropTypes.string,\n};\n\nexport default BlockNavigation;\n"],"names":["useNavPrompt","_ref","_ref$shouldBlock","shouldBlock","_useState","useState","_useState2","_slicedToArray","isBlocked","setIsBlocked","history","useHistory","unblockRef","useRef","navRef","continueNavigation","current","_unblockRef$current","call","_navRef$current","action","transition","handleNavigation","hidePrompt","push","replace","goBack","useEffect","block","undefined","BlockNavigation","_ref$isDirty","isDirty","otherProps","_objectWithoutProperties","_excluded","formikContext","useFormikContext","Boolean","dirty","_useNavPrompt","continueAction","resetForm","React","createElement","Alert","_extends","isOpen","message","submitButtonLabel","title","onClose","onSubmit"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlockNavigation.js","sources":["../../../src/hooks/useNavPrompt.js","../../../src/formik/BlockNavigation.jsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport { useHistory } from \"react-router-dom\";\n\nconst useNavPrompt = ({ shouldBlock = true }) => {\n const [isBlocked, setIsBlocked] = useState(false);\n\n const history = useHistory();\n const unblockRef = useRef();\n const navRef = useRef();\n\n const continueNavigation = () => {\n if (isBlocked && unblockRef.current) {\n unblockRef.current?.();\n setIsBlocked(false);\n if (navRef.current) {\n const { action, transition } = navRef.current;\n handleNavigation(action, transition);\n }\n }\n };\n\n const hidePrompt = () => setIsBlocked(false);\n\n const handleNavigation = (action, transition) => {\n switch (action) {\n case \"PUSH\":\n history.push(transition);\n break;\n case \"REPLACE\":\n history.replace(transition);\n break;\n case \"POP\":\n history.goBack();\n break;\n }\n };\n\n useEffect(() => {\n if (shouldBlock) {\n unblockRef.current = history.block((transition, action) => {\n setIsBlocked(true);\n navRef.current = { transition, action };\n\n return false;\n });\n\n return () => {\n if (unblockRef.current) {\n unblockRef.current();\n }\n };\n }\n\n return undefined;\n }, [shouldBlock]);\n\n return { isBlocked, continueNavigation, hidePrompt };\n};\n\nexport default useNavPrompt;\n","import React from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Alert from \"components/Alert\";\nimport { useNavPrompt } from \"hooks\";\n\nconst BlockNavigation = ({ isDirty = false, ...otherProps }) => {\n const formikContext = useFormikContext();\n const shouldBlock =\n isDirty || (Boolean(formikContext) && Boolean(formikContext.dirty));\n\n const { isBlocked, continueNavigation, hidePrompt } = useNavPrompt({\n shouldBlock,\n });\n\n const continueAction = () => {\n if (formikContext) formikContext.resetForm();\n continueNavigation();\n };\n\n return (\n <Alert\n isOpen={isBlocked}\n message=\"All of your unsaved changes will be lost. This can't be undone.\"\n submitButtonLabel=\"Discard changes\"\n title=\"You have unsaved changes\"\n onClose={hidePrompt}\n onSubmit={continueAction}\n {...otherProps}\n />\n );\n};\n\nBlockNavigation.propTypes = {\n isDirty: PropTypes.bool,\n message: PropTypes.string,\n title: PropTypes.string,\n submitButtonLabel: PropTypes.string,\n};\n\nexport default BlockNavigation;\n"],"names":["useNavPrompt","_ref","_ref$shouldBlock","shouldBlock","_useState","useState","_useState2","_slicedToArray","isBlocked","setIsBlocked","history","useHistory","unblockRef","useRef","navRef","continueNavigation","current","_unblockRef$current","call","_navRef$current","action","transition","handleNavigation","hidePrompt","push","replace","goBack","useEffect","block","undefined","BlockNavigation","_ref$isDirty","isDirty","otherProps","_objectWithoutProperties","_excluded","formikContext","useFormikContext","Boolean","dirty","_useNavPrompt","continueAction","resetForm","React","createElement","Alert","_extends","isOpen","message","submitButtonLabel","title","onClose","onSubmit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAA+B;AAAA,EAAA,IAAAC,gBAAA,GAAAD,IAAA,CAAzBE,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA,CAAA;AACxC,EAAA,IAAAE,SAAA,GAAkCC,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,4BAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA1CI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;EAE9B,IAAMI,OAAO,GAAGC,yBAAU,EAAE,CAAA;EAC5B,IAAMC,UAAU,GAAGC,YAAM,EAAE,CAAA;EAC3B,IAAMC,MAAM,GAAGD,YAAM,EAAE,CAAA;AAEvB,EAAA,IAAME,kBAAkB,GAAG,SAArBA,kBAAkBA,GAAS;AAC/B,IAAA,IAAIP,SAAS,IAAII,UAAU,CAACI,OAAO,EAAE;AAAA,MAAA,IAAAC,mBAAA,CAAA;AACnC,MAAA,CAAAA,mBAAA,GAAAL,UAAU,CAACI,OAAO,MAAA,IAAA,IAAAC,mBAAA,KAA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A,CAAAC,aAAA,CAACC,KAAK,EAAAC,iBAAA,CAAA;AACJC,IAAAA,MAAM,EAAEvC,SAAU;AAClBwC,IAAAA,OAAO,EAAC,iEAAiE;AACzEC,IAAAA,iBAAiB,EAAC,iBAAiB;AACnCC,IAAAA,KAAK,EAAC,0BAA0B;AAChCC,IAAAA,OAAO,EAAE5B,UAAW;AACpB6B,IAAAA,QAAQ,EAAEX,cAAAA;AAAe,GAAA,EACrBR,UAAU,CACd,CAAA,CAAA;AAEN;;;;"}
|
|
@@ -15,9 +15,8 @@ require('../index-a8cc581e.js');
|
|
|
15
15
|
require('ramda');
|
|
16
16
|
require('../overlayManager.js');
|
|
17
17
|
require('../createClass-80e17c6a.js');
|
|
18
|
-
require('../index-
|
|
18
|
+
require('../index-16ef19ed.js');
|
|
19
19
|
require('../slicedToArray-732a2048.js');
|
|
20
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
21
20
|
require('@bigbinary/neeto-cist');
|
|
22
21
|
require('util');
|
|
23
22
|
require('../Label.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../src/formik/Checkbox.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport CheckboxField from \"components/Checkbox\";\n\nconst Checkbox = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <CheckboxField\n checked={field.value}\n {...{ ...field, ref }}\n error={meta.touched ? meta.error : \"\"}\n {...rest}\n />\n )}\n </Field>\n));\n\nCheckbox.displayName = \"Checkbox\";\n\nCheckbox.propTypes = {\n /**\n * The name of the Checkbox.\n */\n name: PropTypes.string,\n};\n\nexport default Checkbox;\n"],"names":["Checkbox","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","CheckboxField","_extends","checked","value","_objectSpread","error","touched","displayName","propTypes","PropTypes","string"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../src/formik/Checkbox.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport CheckboxField from \"components/Checkbox\";\n\nconst Checkbox = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <CheckboxField\n checked={field.value}\n {...{ ...field, ref }}\n error={meta.touched ? meta.error : \"\"}\n {...rest}\n />\n )}\n </Field>\n));\n\nCheckbox.displayName = \"Checkbox\";\n\nCheckbox.propTypes = {\n /**\n * The name of the Checkbox.\n */\n name: PropTypes.string,\n};\n\nexport default Checkbox;\n"],"names":["Checkbox","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","CheckboxField","_extends","checked","value","_objectSpread","error","touched","displayName","propTypes","PropTypes","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,QAAQ,gBAAGC,gBAAU,CAAC,UAAAC,IAAA,EAAoBC,GAAG,EAAA;AAAA,EAAA,IAApBC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,IAAI,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAAA,EAAA,oBAC1CC,yBAAA,CAAAC,aAAA,CAACC,YAAK,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,yBAAA,CAAAC,aAAA,CAACK,UAAa,EAAAC,iBAAA,CAAA;MACZC,OAAO,EAAEJ,KAAK,CAACK,KAAAA;AAAM,KAAA,EAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACZN,KAAK,CAAA,EAAA,EAAA,EAAA;AAAET,MAAAA,GAAG,EAAHA,GAAAA;AAAG,KAAA,CAAA,EAAA;MACnBgB,KAAK,EAAEN,IAAI,CAACO,OAAO,GAAGP,IAAI,CAACM,KAAK,GAAG,EAAA;AAAG,KAAA,EAClCd,IAAI,CACR,CAAA,CAAA;AAAA,GACH,CACK,CAAA;AAAA,CACT,EAAC;AAEFL,QAAQ,CAACqB,WAAW,GAAG,UAAU,CAAA;AAEjCrB,QAAQ,CAACsB,SAAS,GAAG;AACnB;AACF;AACA;EACElB,IAAI,EAAEmB,uBAAS,CAACC,MAAAA;AAClB,CAAC;;;;"}
|
package/dist/cjs/formik/Input.js
CHANGED
|
@@ -16,8 +16,7 @@ require('react-router-dom');
|
|
|
16
16
|
require('../index-a8cc581e.js');
|
|
17
17
|
require('../overlayManager.js');
|
|
18
18
|
require('../createClass-80e17c6a.js');
|
|
19
|
-
require('../index-
|
|
20
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
19
|
+
require('../index-16ef19ed.js');
|
|
21
20
|
require('@bigbinary/neeto-cist');
|
|
22
21
|
require('util');
|
|
23
22
|
require('../Label.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../src/formik/Input.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Input from \"components/Input\";\n\nconst FormikInput = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <Input\n {...{ ref, ...field }}\n error={meta.touched ? meta.error : \"\"}\n {...rest}\n />\n )}\n </Field>\n));\n\nFormikInput.displayName = \"FormikInput\";\n\nFormikInput.propTypes = {\n /**\n * The name of the input field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikInput;\n"],"names":["FormikInput","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","Input","_extends","_objectSpread","error","touched","displayName","propTypes","PropTypes","string"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../src/formik/Input.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { Field } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport Input from \"components/Input\";\n\nconst FormikInput = forwardRef(({ name, ...rest }, ref) => (\n <Field {...{ name }}>\n {({ field, meta }) => (\n <Input\n {...{ ref, ...field }}\n error={meta.touched ? meta.error : \"\"}\n {...rest}\n />\n )}\n </Field>\n));\n\nFormikInput.displayName = \"FormikInput\";\n\nFormikInput.propTypes = {\n /**\n * The name of the input field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikInput;\n"],"names":["FormikInput","forwardRef","_ref","ref","name","rest","_objectWithoutProperties","_excluded","React","createElement","Field","_ref2","field","meta","Input","_extends","_objectSpread","error","touched","displayName","propTypes","PropTypes","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,WAAW,gBAAGC,gBAAU,CAAC,UAAAC,IAAA,EAAoBC,GAAG,EAAA;AAAA,EAAA,IAApBC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,IAAI,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAAA,EAAA,oBAC7CC,yBAAA,CAAAC,aAAA,CAACC,YAAK,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;IAAA,oBACbL,yBAAA,CAAAC,aAAA,CAACK,KAAK,EAAAC,iBAAA,KAAAC,aAAA,CAAA;AACEb,MAAAA,GAAG,EAAHA,GAAAA;AAAG,KAAA,EAAKS,KAAK,CAAA,EAAA;MACnBK,KAAK,EAAEJ,IAAI,CAACK,OAAO,GAAGL,IAAI,CAACI,KAAK,GAAG,EAAA;AAAG,KAAA,EAClCZ,IAAI,CACR,CAAA,CAAA;AAAA,GACH,CACK,CAAA;AAAA,CACT,EAAC;AAEFL,WAAW,CAACmB,WAAW,GAAG,aAAa,CAAA;AAEvCnB,WAAW,CAACoB,SAAS,GAAG;AACtB;AACF;AACA;EACEhB,IAAI,EAAEiB,uBAAS,CAACC,MAAAA;AAClB,CAAC;;;;"}
|
|
@@ -13,9 +13,8 @@ require('../index-302c3d37.js');
|
|
|
13
13
|
require('ramda');
|
|
14
14
|
require('../react-select-creatable.esm-b39742a3.js');
|
|
15
15
|
require('react-dom');
|
|
16
|
-
require('../index-
|
|
16
|
+
require('../index-16ef19ed.js');
|
|
17
17
|
require('../createClass-80e17c6a.js');
|
|
18
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
19
18
|
require('@bigbinary/neeto-cist');
|
|
20
19
|
require('util');
|
|
21
20
|
require('@bigbinary/neeto-icons');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiEmailInput.js","sources":["../../../src/formik/MultiEmailInput.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport EmailInput from \"components/MultiEmailInput\";\n\nconst FormikMultiEmailInput = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <EmailInput\n {...{ ref }}\n error={meta.touched ? 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\nFormikMultiEmailInput.displayName = \"FormikMultiEmailInput\";\n\nFormikMultiEmailInput.propTypes = {\n /**\n * The name of the email input field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikMultiEmailInput;\n"],"names":["FormikMultiEmailInput","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","EmailInput","_extends","error","touched","value","onBlur","onChange","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiEmailInput.js","sources":["../../../src/formik/MultiEmailInput.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { useField } from \"formik\";\nimport PropTypes from \"prop-types\";\n\nimport EmailInput from \"components/MultiEmailInput\";\n\nconst FormikMultiEmailInput = forwardRef(({ name, ...otherProps }, ref) => {\n const [field, meta, { setValue, setTouched }] = useField(name);\n\n return (\n <EmailInput\n {...{ ref }}\n error={meta.touched ? 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\nFormikMultiEmailInput.displayName = \"FormikMultiEmailInput\";\n\nFormikMultiEmailInput.propTypes = {\n /**\n * The name of the email input field.\n */\n name: PropTypes.string,\n};\n\nexport default FormikMultiEmailInput;\n"],"names":["FormikMultiEmailInput","forwardRef","_ref","ref","name","otherProps","_objectWithoutProperties","_excluded","_useField","useField","_useField2","_slicedToArray","field","meta","_useField2$","setValue","setTouched","React","createElement","EmailInput","_extends","error","touched","value","onBlur","onChange","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOMA,IAAAA,qBAAqB,gBAAGC,gBAAU,CAAC,UAAAC,IAAA,EAA0BC,GAAG,EAAK;AAAA,EAAA,IAA/BC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,UAAU,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAC7D,EAAA,IAAAC,SAAA,GAAgDC,eAAQ,CAACL,IAAI,CAAC;IAAAM,UAAA,GAAAC,4BAAA,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,yBAAA,CAAAC,aAAA,CAACC,eAAU,EAAAC,iBAAA,CAAA;AACHjB,IAAAA,GAAG,EAAHA,GAAG;IACTkB,KAAK,EAAER,IAAI,CAACS,OAAO,GAAGT,IAAI,CAACQ,KAAK,GAAG,EAAG;IACtCjB,IAAI,EAAEQ,KAAK,CAACR,IAAK;IACjBmB,KAAK,EAAEX,KAAK,CAACW,KAAM;IACnBC,MAAM,EAAE,SAAAA,MAAA,GAAA;MAAA,OAAMR,UAAU,CAAC,IAAI,CAAC,CAAA;KAAC;IAC/BS,QAAQ,EAAE,SAAAA,QAAAA,CAAAF,KAAK,EAAA;MAAA,OAAIR,QAAQ,CAACQ,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BlB,UAAU,CACd,CAAA,CAAA;AAEN,CAAC,EAAC;AAEFL,qBAAqB,CAAC0B,WAAW,GAAG,uBAAuB;;;;"}
|
package/dist/cjs/formik/Radio.js
CHANGED
|
@@ -19,8 +19,7 @@ require('../index-a8cc581e.js');
|
|
|
19
19
|
require('ramda');
|
|
20
20
|
require('../overlayManager.js');
|
|
21
21
|
require('../createClass-80e17c6a.js');
|
|
22
|
-
require('../index-
|
|
23
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
22
|
+
require('../index-16ef19ed.js');
|
|
24
23
|
require('@bigbinary/neeto-cist');
|
|
25
24
|
require('util');
|
|
26
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../../src/formik/Radio.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useField, useFormikContext } from \"formik\";\n\nimport Radio from \"components/Radio\";\n\nconst RadioGroup = ({ label, name, className = \"\", ...props }) => {\n const { setFieldValue } = useFormikContext();\n const [field, meta] = useField({ name });\n\n return (\n <Radio\n error={meta.touched ? meta.error : \"\"}\n onChange={event => setFieldValue(name, event.target.value)}\n {...{ className, label, ...field, ...props }}\n />\n );\n};\n\nRadioGroup.Item = Radio.Item;\n\nRadioGroup.propTypes = Radio.propTypes;\n\nexport default RadioGroup;\n"],"names":["RadioGroup","_ref","label","name","_ref$className","className","props","_objectWithoutProperties","_excluded","_useFormikContext","useFormikContext","setFieldValue","_useField","useField","_useField2","_slicedToArray","field","meta","React","createElement","Radio","_extends","error","touched","onChange","event","target","value","_objectSpread","Item"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":["../../../src/formik/Radio.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { useField, useFormikContext } from \"formik\";\n\nimport Radio from \"components/Radio\";\n\nconst RadioGroup = ({ label, name, className = \"\", ...props }) => {\n const { setFieldValue } = useFormikContext();\n const [field, meta] = useField({ name });\n\n return (\n <Radio\n error={meta.touched ? meta.error : \"\"}\n onChange={event => setFieldValue(name, event.target.value)}\n {...{ className, label, ...field, ...props }}\n />\n );\n};\n\nRadioGroup.Item = Radio.Item;\n\nRadioGroup.propTypes = Radio.propTypes;\n\nexport default RadioGroup;\n"],"names":["RadioGroup","_ref","label","name","_ref$className","className","props","_objectWithoutProperties","_excluded","_useFormikContext","useFormikContext","setFieldValue","_useField","useField","_useField2","_slicedToArray","field","meta","React","createElement","Radio","_extends","error","touched","onChange","event","target","value","_objectSpread","Item"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAkD;AAAA,EAAA,IAA5CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,cAAA,GAAAH,IAAA,CAAEI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;AAAKE,IAAAA,KAAK,GAAAC,gDAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;EACzD,IAAAC,iBAAA,GAA0BC,uBAAgB,EAAE;IAApCC,aAAa,GAAAF,iBAAA,CAAbE,aAAa,CAAA;EACrB,IAAAC,SAAA,GAAsBC,eAAQ,CAAC;AAAEV,MAAAA,IAAI,EAAJA,IAAAA;AAAK,KAAC,CAAC;IAAAW,UAAA,GAAAC,4BAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAjCI,IAAAA,KAAK,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,IAAI,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAElB,EAAA,oBACEI,yBAAA,CAAAC,aAAA,CAACC,KAAK,EAAAC,iBAAA,CAAA;IACJC,KAAK,EAAEL,IAAI,CAACM,OAAO,GAAGN,IAAI,CAACK,KAAK,GAAG,EAAG;IACtCE,QAAQ,EAAE,SAAAA,QAAAA,CAAAC,KAAK,EAAA;MAAA,OAAId,aAAa,CAACR,IAAI,EAAEsB,KAAK,CAACC,MAAM,CAACC,KAAK,CAAC,CAAA;AAAA,KAAA;GAACC,EAAAA,aAAA,CAAAA,aAAA,CAAA;AACrDvB,IAAAA,SAAS,EAATA,SAAS;AAAEH,IAAAA,KAAK,EAALA,KAAAA;GAAUc,EAAAA,KAAK,CAAKV,EAAAA,KAAK,CAC1C,CAAA,CAAA,CAAA;AAEN,EAAC;AAEDN,UAAU,CAAC6B,IAAI,GAAGT,KAAK,CAACS,IAAI;;;;"}
|
|
@@ -19,8 +19,7 @@ require('react-router-dom');
|
|
|
19
19
|
require('../index-a8cc581e.js');
|
|
20
20
|
require('../overlayManager.js');
|
|
21
21
|
require('../createClass-80e17c6a.js');
|
|
22
|
-
require('../index-
|
|
23
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
22
|
+
require('../index-16ef19ed.js');
|
|
24
23
|
require('util');
|
|
25
24
|
require('../Label.js');
|
|
26
25
|
require('../index-0e68cfff.js');
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQMA,IAAAA,WAAW,gBAAGC,gBAAU,CAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC7C,EAAA,IAAAC,WAAA,GAMIF,KAAK,CALPG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,WAAA;IAAAE,cAAA,GAKPJ,KAAK,CAJPK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,qBAAA,GAIVN,KAAK,CAHPO,cAAc;AAAdA,IAAAA,cAAc,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;IAAAE,cAAA,GAGnBR,KAA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GAAG,KAAK,CAAA;AAC1B,MAAA,CAAAI,qBAAA,GAAA3C,UAAU,CAAC0C,WAAW,MAAA,IAAA,IAAAC,qBAAA,KAAA,KAAA,CAAA,IAAtBA,qBAAA,CAAAF,IAAA,CAAAzC,UAAU,CAAgB,CAAA;KAC1B;IACF4C,UAAU,EAAE,SAAAA,UAAAA,GAAM;AAAA,MAAA,IAAAC,qBAAA,CAAA;MAChBjC,UAAU,CAAC2B,OAAO,GAAG,IAAI,CAAA;AACzB,MAAA,CAAAM,qBAAA,GAAA7C,UAAU,CAAC4C,UAAU,MAAA,IAAA,IAAAC,qBAAA,KAAA,KAAA,CAAA,IAArBA,qBAAA,CAAAJ,IAAA,CAAAzC,UAAU,CAAe,CAAA;AAC3B,KAAA;GACA,CAAA,CAAA,CAAA;AAEN,CAAC,EAAC;AAEFZ,WAAW,CAAC0D,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -21,8 +21,7 @@ require('../index-a8cc581e.js');
|
|
|
21
21
|
require('ramda');
|
|
22
22
|
require('../overlayManager.js');
|
|
23
23
|
require('../createClass-80e17c6a.js');
|
|
24
|
-
require('../index-
|
|
25
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
24
|
+
require('../index-16ef19ed.js');
|
|
26
25
|
require('@bigbinary/neeto-cist');
|
|
27
26
|
require('util');
|
|
28
27
|
|
|
@@ -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,gBAAU,CAAC,UAAAC,IAAA,EAA0BC,GAAG,EAAK;AAAA,EAAA,IAA/BC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,UAAU,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AACpD,EAAA,IAAAC,SAAA,GAAgDC,eAAQ,CAACL,IAAI,CAAC;IAAAM,UAAA,GAAAC,4BAAA,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,yBAAA,CAAAC,aAAA,CAACC,MAAM,EAAAC,iBAAA,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;;;;"}
|
|
@@ -15,9 +15,8 @@ require('../index-a8cc581e.js');
|
|
|
15
15
|
require('ramda');
|
|
16
16
|
require('../overlayManager.js');
|
|
17
17
|
require('../createClass-80e17c6a.js');
|
|
18
|
-
require('../index-
|
|
18
|
+
require('../index-16ef19ed.js');
|
|
19
19
|
require('../slicedToArray-732a2048.js');
|
|
20
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
21
20
|
require('@bigbinary/neeto-cist');
|
|
22
21
|
require('util');
|
|
23
22
|
require('../Label.js');
|
|
@@ -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,gDAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAAA,EAAA,oBACnCC,yBAAA,CAAAC,aAAA,CAACC,YAAK,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,yBAAA,CAAAC,aAAA,CAACM,MAAM,EAAAC,iBAAA,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;;;;"}
|
|
@@ -16,8 +16,7 @@ require('../index-a8cc581e.js');
|
|
|
16
16
|
require('ramda');
|
|
17
17
|
require('../overlayManager.js');
|
|
18
18
|
require('../createClass-80e17c6a.js');
|
|
19
|
-
require('../index-
|
|
20
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
19
|
+
require('../index-16ef19ed.js');
|
|
21
20
|
require('@bigbinary/neeto-cist');
|
|
22
21
|
require('util');
|
|
23
22
|
require('../useSyncedRef-9c3dcd03.js');
|
|
@@ -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,gBAAU,CAAC,UAAAC,IAAA,EAAoBC,GAAG,EAAA;AAAA,EAAA,IAApBC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,IAAI,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAAA,EAAA,oBAChDC,yBAAA,CAAAC,aAAA,CAACC,YAAK,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,yBAAA,CAAAC,aAAA,CAACK,QAAQ,EAAAC,iBAAA,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,uBAAS,CAACC,MAAAA;AAClB,CAAC;;;;"}
|
|
@@ -12,9 +12,8 @@ require('../defineProperty-ee86604b.js');
|
|
|
12
12
|
require('../toPropertyKey-bfa2e465.js');
|
|
13
13
|
require('../index-302c3d37.js');
|
|
14
14
|
require('@bigbinary/neeto-icons');
|
|
15
|
-
require('../index-
|
|
15
|
+
require('../index-16ef19ed.js');
|
|
16
16
|
require('../createClass-80e17c6a.js');
|
|
17
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
18
17
|
require('@bigbinary/neeto-cist');
|
|
19
18
|
require('util');
|
|
20
19
|
require('ramda');
|
|
@@ -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,gBAAU,CAAC,UAAAC,IAAA,EAA0BC,GAAG,EAAK;AAAA,EAAA,IAA/BC,IAAI,GAAAF,IAAA,CAAJE,IAAI;AAAKC,IAAAA,UAAU,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AACxD,EAAA,IAAAC,SAAA,GAAgDC,eAAQ,CAACL,IAAI,CAAC;IAAAM,UAAA,GAAAC,4BAAA,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,yBAAA,CAAAC,aAAA,CAACC,UAAU,EAAAC,iBAAA,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/cjs/formik/index.js
CHANGED
|
@@ -31,14 +31,13 @@ require('react-dom');
|
|
|
31
31
|
require('../Alert.js');
|
|
32
32
|
require('../Modal.js');
|
|
33
33
|
require('@bigbinary/neeto-icons');
|
|
34
|
-
require('../useOverlayManager-
|
|
34
|
+
require('../useOverlayManager-53380ba5.js');
|
|
35
35
|
require('../index-63580e68.js');
|
|
36
36
|
require('ramda');
|
|
37
37
|
require('../index-a8cc581e.js');
|
|
38
38
|
require('../overlayManager.js');
|
|
39
39
|
require('../createClass-80e17c6a.js');
|
|
40
|
-
require('../index-
|
|
41
|
-
require('../_commonjsHelpers-44e4a143.js');
|
|
40
|
+
require('../index-16ef19ed.js');
|
|
42
41
|
require('@bigbinary/neeto-cist');
|
|
43
42
|
require('util');
|
|
44
43
|
require('../Typography.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|