@bigbinary/neetoui 8.2.75 → 8.2.76

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/Tree.js CHANGED
@@ -33,8 +33,10 @@ import 'dayjs/plugin/weekOfYear';
33
33
  var SwitcherIcon = function SwitcherIcon(_ref) {
34
34
  var expanded = _ref.expanded;
35
35
  return expanded ? /*#__PURE__*/React__default.createElement(Down, {
36
+ className: "neeto-ui-relative",
36
37
  size: 16
37
38
  }) : /*#__PURE__*/React__default.createElement(Right, {
39
+ className: "neeto-ui-relative",
38
40
  size: 16
39
41
  });
40
42
  };
package/dist/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\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = ({ componentToken, ...props }) => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\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 ...componentToken,\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n );\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 * Object to override default theme styles for the component\n */\n componentToken: PropTypes.object,\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","componentToken","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","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,cAAA,CAAAC,aAAA,CAACC,IAAI,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAAGH,cAAA,CAAAC,aAAA,CAACG,KAAK,EAAA;AAACD,IAAAA,IAAI,EAAE,EAAA;GAAM,CAAA,CAAA;AAAA,CAAA;;;;;ACOrD,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAAP,IAAA,EAAqC;AAAA,EAAA,IAA/BQ,cAAc,GAAAR,IAAA,CAAdQ,cAAc;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;EACtC,IAAAC,eAAA,GAAiBC,cAAc,EAAE;IAAzBC,IAAI,GAAAF,eAAA,CAAJE,IAAI,CAAA;AAEZ,EAAA,oBACEZ,cAAA,CAAAC,aAAA,CAAAY,eAAA,EAAA;IACEC,MAAM,EAAEC,WAAW,CAACH,IAAI,CAACI,QAAQ,IAAI,IAAI,CAAE;AAC3CC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,iCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVhB,QAAAA,IAAI,EAAAc,aAAA,CAAA;AACFG,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAAkC,SAAA,EAC/CnB,cAAc,CAAA;AAErB,OAAA;AACF,KAAA;AAAE,GAAA,eAEFN,cAAA,CAAAC,aAAA,CAAAyB,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,YAAY,EAAE/B,YAAAA;AAAa,GAAA,EACvBU,KAAK,EAAA;AACTsB,IAAAA,SAAS,EAAEC,UAAU,CAAC,eAAe,EAAEvB,KAAK,CAACsB,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAErB;;;;"}
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 ? (\n <Down className=\"neeto-ui-relative\" size={16} />\n ) : (\n <Right className=\"neeto-ui-relative\" size={16} />\n );\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\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = ({ componentToken, ...props }) => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\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 ...componentToken,\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n );\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 * Object to override default theme styles for the component\n */\n componentToken: PropTypes.object,\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","className","size","Right","Tree","componentToken","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","directoryNodeSelectedBg","directoryNodeSelectedColor","nodeHoverBg","nodeSelectedBg","_Tree","_extends","switcherIcon","classnames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;AAAA,EAAA,OAC9BA,QAAQ,gBACNC,cAAA,CAAAC,aAAA,CAACC,IAAI,EAAA;AAACC,IAAAA,SAAS,EAAC,mBAAmB;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAEhDJ,cAAA,CAAAC,aAAA,CAACI,KAAK,EAAA;AAACF,IAAAA,SAAS,EAAC,mBAAmB;AAACC,IAAAA,IAAI,EAAE,EAAA;GAC5C,CAAA,CAAA;AAAA,CAAA;;;;;ACGH,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAAR,IAAA,EAAqC;AAAA,EAAA,IAA/BS,cAAc,GAAAT,IAAA,CAAdS,cAAc;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAX,IAAA,EAAAY,SAAA,CAAA,CAAA;EACtC,IAAAC,eAAA,GAAiBC,cAAc,EAAE;IAAzBC,IAAI,GAAAF,eAAA,CAAJE,IAAI,CAAA;AAEZ,EAAA,oBACEb,cAAA,CAAAC,aAAA,CAAAa,eAAA,EAAA;IACEC,MAAM,EAAEC,WAAW,CAACH,IAAI,CAACI,QAAQ,IAAI,IAAI,CAAE;AAC3CC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,iCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVhB,QAAAA,IAAI,EAAAc,aAAA,CAAA;AACFG,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAAkC,SAAA,EAC/CnB,cAAc,CAAA;AAErB,OAAA;AACF,KAAA;AAAE,GAAA,eAEFP,cAAA,CAAAC,aAAA,CAAA0B,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,YAAY,EAAEhC,YAAAA;AAAa,GAAA,EACvBW,KAAK,EAAA;AACTL,IAAAA,SAAS,EAAE2B,UAAU,CAAC,eAAe,EAAEtB,KAAK,CAACL,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAErB;;;;"}
package/dist/cjs/Tree.js CHANGED
@@ -35,8 +35,10 @@ require('dayjs/plugin/weekOfYear');
35
35
  var SwitcherIcon = function SwitcherIcon(_ref) {
36
36
  var expanded = _ref.expanded;
37
37
  return expanded ? /*#__PURE__*/React.createElement(neetoIcons.Down, {
38
+ className: "neeto-ui-relative",
38
39
  size: 16
39
40
  }) : /*#__PURE__*/React.createElement(neetoIcons.Right, {
41
+ className: "neeto-ui-relative",
40
42
  size: 16
41
43
  });
42
44
  };
@@ -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\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = ({ componentToken, ...props }) => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\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 ...componentToken,\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n );\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 * Object to override default theme styles for the component\n */\n componentToken: PropTypes.object,\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","componentToken","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","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,KAAA,CAAAC,aAAA,CAACC,eAAI,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAAGH,KAAA,CAAAC,aAAA,CAACG,gBAAK,EAAA;AAACD,IAAAA,IAAI,EAAE,EAAA;GAAM,CAAA,CAAA;AAAA,CAAA;;;;;ACOrD,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAAP,IAAA,EAAqC;AAAA,EAAA,IAA/BQ,cAAc,GAAAR,IAAA,CAAdQ,cAAc;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;EACtC,IAAAC,eAAA,GAAiBC,2BAAc,EAAE;IAAzBC,IAAI,GAAAF,eAAA,CAAJE,IAAI,CAAA;AAEZ,EAAA,oBACEZ,KAAA,CAAAC,aAAA,CAAAY,eAAA,EAAA;IACEC,MAAM,EAAEC,qBAAW,CAACH,IAAI,CAACI,QAAQ,IAAI,IAAI,CAAE;AAC3CC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,uCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVhB,QAAAA,IAAI,EAAAc,aAAA,CAAA;AACFG,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAAkC,SAAA,EAC/CnB,cAAc,CAAA;AAErB,OAAA;AACF,KAAA;AAAE,GAAA,eAEFN,KAAA,CAAAC,aAAA,CAAAyB,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,YAAY,EAAE/B,YAAAA;AAAa,GAAA,EACvBU,KAAK,EAAA;AACTsB,IAAAA,SAAS,EAAEC,UAAU,CAAC,eAAe,EAAEvB,KAAK,CAACsB,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAErB;;;;"}
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 ? (\n <Down className=\"neeto-ui-relative\" size={16} />\n ) : (\n <Right className=\"neeto-ui-relative\" size={16} />\n );\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\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = ({ componentToken, ...props }) => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\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 ...componentToken,\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n );\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 * Object to override default theme styles for the component\n */\n componentToken: PropTypes.object,\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","className","size","Right","Tree","componentToken","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","directoryNodeSelectedBg","directoryNodeSelectedColor","nodeHoverBg","nodeSelectedBg","_Tree","_extends","switcherIcon","classnames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;AAAA,EAAA,OAC9BA,QAAQ,gBACNC,KAAA,CAAAC,aAAA,CAACC,eAAI,EAAA;AAACC,IAAAA,SAAS,EAAC,mBAAmB;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAEhDJ,KAAA,CAAAC,aAAA,CAACI,gBAAK,EAAA;AAACF,IAAAA,SAAS,EAAC,mBAAmB;AAACC,IAAAA,IAAI,EAAE,EAAA;GAC5C,CAAA,CAAA;AAAA,CAAA;;;;;ACGH,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAAR,IAAA,EAAqC;AAAA,EAAA,IAA/BS,cAAc,GAAAT,IAAA,CAAdS,cAAc;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAX,IAAA,EAAAY,SAAA,CAAA,CAAA;EACtC,IAAAC,eAAA,GAAiBC,2BAAc,EAAE;IAAzBC,IAAI,GAAAF,eAAA,CAAJE,IAAI,CAAA;AAEZ,EAAA,oBACEb,KAAA,CAAAC,aAAA,CAAAa,eAAA,EAAA;IACEC,MAAM,EAAEC,qBAAW,CAACH,IAAI,CAACI,QAAQ,IAAI,IAAI,CAAE;AAC3CC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,uCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVhB,QAAAA,IAAI,EAAAc,aAAA,CAAA;AACFG,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAAkC,SAAA,EAC/CnB,cAAc,CAAA;AAErB,OAAA;AACF,KAAA;AAAE,GAAA,eAEFP,KAAA,CAAAC,aAAA,CAAA0B,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,YAAY,EAAEhC,YAAAA;AAAa,GAAA,EACvBW,KAAK,EAAA;AACTL,IAAAA,SAAS,EAAE2B,UAAU,CAAC,eAAe,EAAEtB,KAAK,CAACL,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAErB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neetoui",
3
- "version": "8.2.75",
3
+ "version": "8.2.76",
4
4
  "author": "BigBinary",
5
5
  "license": "MIT",
6
6
  "description": "neetoUI drives the experience at all neeto products",