@bigbinary/neeto-molecules 1.0.77-beta → 1.0.77
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/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +26 -12
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +28 -14
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +25 -11
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +28 -14
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/ShareViaEmail.cjs.js +1 -0
- package/dist/ShareViaEmail.cjs.js.map +1 -1
- package/dist/ShareViaEmail.js +1 -0
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/Sidebar.cjs.js +95 -192
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +97 -194
- package/dist/Sidebar.js.map +1 -1
- package/package.json +3 -3
- package/src/translations/en.json +2 -6
- package/types/EmailForm.d.ts +7 -1
- package/types/EmailFormProvider.d.ts +10 -4
- package/types/PublishBlock.d.ts +2 -1
- package/types/Sidebar.d.ts +1 -1
package/dist/Header.cjs.js
CHANGED
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
5
5
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
6
6
|
var neetoui = require('@bigbinary/neetoui');
|
|
7
|
+
var ramda = require('ramda');
|
|
7
8
|
var reactI18next = require('react-i18next');
|
|
8
9
|
var reactRouterDom = require('react-router-dom');
|
|
9
10
|
|
|
@@ -89,7 +90,7 @@ var classnames = classnames$1.exports;
|
|
|
89
90
|
|
|
90
91
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
91
92
|
|
|
92
|
-
var css = ".neeto-molecules-header{align-items:
|
|
93
|
+
var css = ".neeto-molecules-header{align-items:center;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:var(--neeto-ui-main-header-height);padding:24px 0;width:100%}.neeto-molecules-header--has-breadcrumbs{min-height:var(--neeto-ui-main-header-with-breadcrumbs-height)}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{display:flex;flex-direction:row;width:100%}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{margin:0 4px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}";
|
|
93
94
|
n(css,{});
|
|
94
95
|
|
|
95
96
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
@@ -105,22 +106,27 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
105
106
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
106
107
|
to: link
|
|
107
108
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
108
|
-
className: "neeto-
|
|
109
|
+
className: "neeto-molecules-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link",
|
|
109
110
|
component: "span",
|
|
110
111
|
"data-cy": text,
|
|
111
112
|
"data-test-id": text,
|
|
112
113
|
style: "body2",
|
|
113
114
|
weight: "normal"
|
|
114
|
-
}, text)),
|
|
115
|
-
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-
|
|
116
|
-
|
|
115
|
+
}, text)), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Right, {
|
|
116
|
+
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-gray-400",
|
|
117
|
+
size: 16
|
|
118
|
+
}));
|
|
117
119
|
}));
|
|
118
120
|
};
|
|
119
121
|
var Breadcrumbs$1 = /*#__PURE__*/React__default["default"].memo(Breadcrumbs);
|
|
120
122
|
|
|
121
123
|
var Dropdown = function Dropdown(props) {
|
|
122
124
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends({
|
|
125
|
+
buttonProps: {
|
|
126
|
+
className: "ml-1.5"
|
|
127
|
+
},
|
|
123
128
|
buttonStyle: "text",
|
|
129
|
+
className: "ml-3",
|
|
124
130
|
icon: neetoIcons.MenuVertical,
|
|
125
131
|
position: "bottom-end"
|
|
126
132
|
}, props));
|
|
@@ -128,6 +134,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
128
134
|
|
|
129
135
|
var Header = function Header(_ref) {
|
|
130
136
|
var title = _ref.title,
|
|
137
|
+
menuBarToggle = _ref.menuBarToggle,
|
|
131
138
|
searchProps = _ref.searchProps,
|
|
132
139
|
_ref$className = _ref.className,
|
|
133
140
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
@@ -140,17 +147,24 @@ var Header = function Header(_ref) {
|
|
|
140
147
|
var _useTranslation = reactI18next.useTranslation(),
|
|
141
148
|
t = _useTranslation.t;
|
|
142
149
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
143
|
-
className: classnames(["neeto-molecules-header",
|
|
150
|
+
className: classnames(["neeto-molecules-header", {
|
|
151
|
+
"neeto-molecules-header--has-breadcrumbs": !ramda.isEmpty(breadcrumbs)
|
|
152
|
+
}, className])
|
|
144
153
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
145
154
|
className: "neeto-molecules-header__left"
|
|
146
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
155
|
+
}, menuBarToggle && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
156
|
+
"aria-label": "Toggle Menubar",
|
|
157
|
+
className: "neeto-molecules-header__toggle-menubar-btn",
|
|
158
|
+
"data-cy": "menubar-toggle-button",
|
|
159
|
+
icon: neetoIcons.HamburgerMenu,
|
|
160
|
+
style: "text",
|
|
161
|
+
onClick: menuBarToggle
|
|
162
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
147
163
|
className: "neeto-molecules-header__left-data-wrap"
|
|
148
|
-
},
|
|
164
|
+
}, breadcrumbs && /*#__PURE__*/React__default["default"].createElement(Breadcrumbs$1, {
|
|
149
165
|
breadcrumbs: breadcrumbs
|
|
150
166
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
151
|
-
className:
|
|
152
|
-
"neeto-molecules-header__page-title--has-breadcrumbs": pure.isNotEmpty(breadcrumbs)
|
|
153
|
-
})
|
|
167
|
+
className: "neeto-molecules-header__page-title"
|
|
154
168
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
155
169
|
"data-cy": "main-header",
|
|
156
170
|
"data-test-id": "main-header",
|
package/dist/Header.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.cjs.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/classnames/index.js","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/components/Header/Breadcrumbs.jsx","../src/components/Header/Dropdown.jsx","../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React from \"react\";\n\nimport { Typography } from \"neetoui\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./header.scss\";\n\nconst Breadcrumbs = ({ breadcrumbs }) => (\n <div className=\"neeto-molecules-header__breadcrumbs-wrap\">\n {breadcrumbs.map(({ text, link }, index) => (\n <div className=\"neeto-molecules-header__breadcrumb\" key={index}>\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {index + 1 !== breadcrumbs.length && (\n <span className=\"neeto-molecules-header__breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nexport default React.memo(Breadcrumbs);\n","import React from \"react\";\n\nimport { MenuVertical } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonStyle=\"text\"\n icon={MenuVertical}\n position=\"bottom-end\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","import React, { useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocommons/pure\";\nimport { Search } from \"neetoicons\";\nimport { Typography, Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Breadcrumbs from \"./Breadcrumbs\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n}) => {\n const searchRef = useRef(null);\n const { t } = useTranslation();\n\n return (\n <div className={classnames([\"neeto-molecules-header\", className])}>\n <div className=\"neeto-molecules-header__left\">\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {isNotEmpty(breadcrumbs) && <Breadcrumbs {...{ breadcrumbs }} />}\n <div\n className={classnames(\"neeto-molecules-header__page-title\", {\n \"neeto-molecules-header__page-title--has-breadcrumbs\":\n isNotEmpty(breadcrumbs),\n })}\n >\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(Dropdown)}\n </div>\n </div>\n </div>\n <div className=\"neeto-ui-gap-3 neeto-molecules-header__right\">\n {searchProps && (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<Search />}\n ref={searchRef}\n type=\"search\"\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add a search field to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * To provide the function to toggle the menu bar.\n */\n menuBarToggle: PropTypes.func,\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n};\n\nexport default Header;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","React","createElement","className","map","_ref2","index","text","link","key","Link","to","Typography","component","style","weight","length","memo","Dropdown","props","NeetoUIDropdown","_extends","buttonStyle","icon","MenuVertical","position","Header","title","searchProps","_ref$className","actionBlock","_ref$breadcrumbs","_ref$renderDropdown","renderDropdown","noop","searchRef","useRef","_useTranslation","useTranslation","t","classnames","isNotEmpty","lineHeight","Input","placeholder","prefix","Search","ref","type"],"mappings":";;;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CA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modules/@babel/runtime/helpers/esm/extends.js","../node_modules/classnames/index.js","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/components/Header/Breadcrumbs.jsx","../src/components/Header/Dropdown.jsx","../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React from \"react\";\n\nimport { Right } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./header.scss\";\n\nconst Breadcrumbs = ({ breadcrumbs }) => (\n <div className=\"neeto-molecules-header__breadcrumbs-wrap\">\n {breadcrumbs.map(({ text, link }, index) => (\n <div className=\"neeto-molecules-header__breadcrumb\" key={index}>\n <Link to={link}>\n <Typography\n className=\"neeto-molecules-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n <Right\n className=\"neeto-molecules-header__breadcrumb-separator neeto-ui-text-gray-400\"\n size={16}\n />\n </div>\n ))}\n </div>\n);\n\nexport default React.memo(Breadcrumbs);\n","import React from \"react\";\n\nimport { MenuVertical } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonProps={{ className: \"ml-1.5\" }}\n buttonStyle=\"text\"\n className=\"ml-3\"\n icon={MenuVertical}\n position=\"bottom-end\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","import React, { useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop } from \"neetocommons/pure\";\nimport { Search, HamburgerMenu } from \"neetoicons\";\nimport { Typography, Input, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Breadcrumbs from \"./Breadcrumbs\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n menuBarToggle,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n}) => {\n const searchRef = useRef(null);\n const { t } = useTranslation();\n\n return (\n <div\n className={classnames([\n \"neeto-molecules-header\",\n { \"neeto-molecules-header--has-breadcrumbs\": !isEmpty(breadcrumbs) },\n className,\n ])}\n >\n <div className=\"neeto-molecules-header__left\">\n {menuBarToggle && (\n <Button\n aria-label=\"Toggle Menubar\"\n className=\"neeto-molecules-header__toggle-menubar-btn\"\n data-cy=\"menubar-toggle-button\"\n icon={HamburgerMenu}\n style=\"text\"\n onClick={menuBarToggle}\n />\n )}\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {breadcrumbs && <Breadcrumbs {...{ breadcrumbs }} />}\n <div className=\"neeto-molecules-header__page-title\">\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(Dropdown)}\n </div>\n </div>\n </div>\n <div className=\"neeto-ui-gap-3 neeto-molecules-header__right\">\n {searchProps && (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<Search />}\n ref={searchRef}\n type=\"search\"\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add a search field to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * To provide the function to toggle the menu bar.\n */\n menuBarToggle: PropTypes.func,\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n};\n\nexport default Header;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","React","createElement","className","map","_ref2","index","text","link","key","Link","to","Typography","component","style","weight","Right","size","memo","Dropdown","props","NeetoUIDropdown","_extends","buttonProps","buttonStyle","icon","MenuVertical","position","Header","title","menuBarToggle","searchProps","_ref$className","actionBlock","_ref$breadcrumbs","_ref$renderDropdown","renderDropdown","noop","searchRef","useRef","_useTranslation","useTranslation","t","classnames","isEmpty","Button","HamburgerMenu","onClick","lineHeight","Input","placeholder","prefix","Search","ref","type"],"mappings":";;;;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG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A,SAAS,EAAC,8CAAA;GACZ4B,EAAAA,WAAW,iBACV9B,yBAAA,CAAAC,aAAA,CAAC+C,aAAK,EAAA3B,QAAA,CAAA;AACJ4B,IAAAA,WAAW,EAAER,CAAC,CAAC,sCAAsC,CAAE;AACvDS,IAAAA,MAAM,eAAElD,yBAAA,CAAAC,aAAA,CAACkD,iBAAM,EAAI,IAAA,CAAA;AACnBC,IAAAA,GAAG,EAAEf,SAAU;AACfgB,IAAAA,IAAI,EAAC,QAAQ;IACbnD,SAAS,EAAEwC,UAAU,CAAC,CACpB,sCAAsC,EACtCZ,WAAW,CAAC5B,SAAS,CACtB,CAAA;AAAE,GAAA,EACC4B,WAAW,CAAA,CAElB,EACAE,WAAW,CACR,CACF,CAAA;AAEV;;;;"}
|
package/dist/Header.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MenuVertical, Search } from '@bigbinary/neeto-icons';
|
|
4
|
-
import { Typography, Dropdown as Dropdown$1, Input } from '@bigbinary/neetoui';
|
|
2
|
+
import { noop } from '@bigbinary/neeto-commons-frontend/pure';
|
|
3
|
+
import { Right, MenuVertical, HamburgerMenu, Search } from '@bigbinary/neeto-icons';
|
|
4
|
+
import { Typography, Dropdown as Dropdown$1, Button, Input } from '@bigbinary/neetoui';
|
|
5
|
+
import { isEmpty } from 'ramda';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import { Link } from 'react-router-dom';
|
|
7
8
|
|
|
@@ -83,7 +84,7 @@ var classnames = classnames$1.exports;
|
|
|
83
84
|
|
|
84
85
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
85
86
|
|
|
86
|
-
var css = ".neeto-molecules-header{align-items:
|
|
87
|
+
var css = ".neeto-molecules-header{align-items:center;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:var(--neeto-ui-main-header-height);padding:24px 0;width:100%}.neeto-molecules-header--has-breadcrumbs{min-height:var(--neeto-ui-main-header-with-breadcrumbs-height)}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{display:flex;flex-direction:row;width:100%}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{margin:0 4px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}";
|
|
87
88
|
n(css,{});
|
|
88
89
|
|
|
89
90
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
@@ -99,22 +100,27 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
99
100
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
100
101
|
to: link
|
|
101
102
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
102
|
-
className: "neeto-
|
|
103
|
+
className: "neeto-molecules-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link",
|
|
103
104
|
component: "span",
|
|
104
105
|
"data-cy": text,
|
|
105
106
|
"data-test-id": text,
|
|
106
107
|
style: "body2",
|
|
107
108
|
weight: "normal"
|
|
108
|
-
}, text)),
|
|
109
|
-
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-
|
|
110
|
-
|
|
109
|
+
}, text)), /*#__PURE__*/React.createElement(Right, {
|
|
110
|
+
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-gray-400",
|
|
111
|
+
size: 16
|
|
112
|
+
}));
|
|
111
113
|
}));
|
|
112
114
|
};
|
|
113
115
|
var Breadcrumbs$1 = /*#__PURE__*/React.memo(Breadcrumbs);
|
|
114
116
|
|
|
115
117
|
var Dropdown = function Dropdown(props) {
|
|
116
118
|
return /*#__PURE__*/React.createElement(Dropdown$1, _extends({
|
|
119
|
+
buttonProps: {
|
|
120
|
+
className: "ml-1.5"
|
|
121
|
+
},
|
|
117
122
|
buttonStyle: "text",
|
|
123
|
+
className: "ml-3",
|
|
118
124
|
icon: MenuVertical,
|
|
119
125
|
position: "bottom-end"
|
|
120
126
|
}, props));
|
|
@@ -122,6 +128,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
122
128
|
|
|
123
129
|
var Header = function Header(_ref) {
|
|
124
130
|
var title = _ref.title,
|
|
131
|
+
menuBarToggle = _ref.menuBarToggle,
|
|
125
132
|
searchProps = _ref.searchProps,
|
|
126
133
|
_ref$className = _ref.className,
|
|
127
134
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
@@ -134,17 +141,24 @@ var Header = function Header(_ref) {
|
|
|
134
141
|
var _useTranslation = useTranslation(),
|
|
135
142
|
t = _useTranslation.t;
|
|
136
143
|
return /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
className: classnames(["neeto-molecules-header",
|
|
144
|
+
className: classnames(["neeto-molecules-header", {
|
|
145
|
+
"neeto-molecules-header--has-breadcrumbs": !isEmpty(breadcrumbs)
|
|
146
|
+
}, className])
|
|
138
147
|
}, /*#__PURE__*/React.createElement("div", {
|
|
139
148
|
className: "neeto-molecules-header__left"
|
|
140
|
-
}, /*#__PURE__*/React.createElement(
|
|
149
|
+
}, menuBarToggle && /*#__PURE__*/React.createElement(Button, {
|
|
150
|
+
"aria-label": "Toggle Menubar",
|
|
151
|
+
className: "neeto-molecules-header__toggle-menubar-btn",
|
|
152
|
+
"data-cy": "menubar-toggle-button",
|
|
153
|
+
icon: HamburgerMenu,
|
|
154
|
+
style: "text",
|
|
155
|
+
onClick: menuBarToggle
|
|
156
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
141
157
|
className: "neeto-molecules-header__left-data-wrap"
|
|
142
|
-
},
|
|
158
|
+
}, breadcrumbs && /*#__PURE__*/React.createElement(Breadcrumbs$1, {
|
|
143
159
|
breadcrumbs: breadcrumbs
|
|
144
160
|
}), /*#__PURE__*/React.createElement("div", {
|
|
145
|
-
className:
|
|
146
|
-
"neeto-molecules-header__page-title--has-breadcrumbs": isNotEmpty(breadcrumbs)
|
|
147
|
-
})
|
|
161
|
+
className: "neeto-molecules-header__page-title"
|
|
148
162
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
149
163
|
"data-cy": "main-header",
|
|
150
164
|
"data-test-id": "main-header",
|
package/dist/Header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/classnames/index.js","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/components/Header/Breadcrumbs.jsx","../src/components/Header/Dropdown.jsx","../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React from \"react\";\n\nimport { Typography } from \"neetoui\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./header.scss\";\n\nconst Breadcrumbs = ({ breadcrumbs }) => (\n <div className=\"neeto-molecules-header__breadcrumbs-wrap\">\n {breadcrumbs.map(({ text, link }, index) => (\n <div className=\"neeto-molecules-header__breadcrumb\" key={index}>\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {index + 1 !== breadcrumbs.length && (\n <span className=\"neeto-molecules-header__breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nexport default React.memo(Breadcrumbs);\n","import React from \"react\";\n\nimport { MenuVertical } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonStyle=\"text\"\n icon={MenuVertical}\n position=\"bottom-end\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","import React, { useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocommons/pure\";\nimport { Search } from \"neetoicons\";\nimport { Typography, Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Breadcrumbs from \"./Breadcrumbs\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n}) => {\n const searchRef = useRef(null);\n const { t } = useTranslation();\n\n return (\n <div className={classnames([\"neeto-molecules-header\", className])}>\n <div className=\"neeto-molecules-header__left\">\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {isNotEmpty(breadcrumbs) && <Breadcrumbs {...{ breadcrumbs }} />}\n <div\n className={classnames(\"neeto-molecules-header__page-title\", {\n \"neeto-molecules-header__page-title--has-breadcrumbs\":\n isNotEmpty(breadcrumbs),\n })}\n >\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(Dropdown)}\n </div>\n </div>\n </div>\n <div className=\"neeto-ui-gap-3 neeto-molecules-header__right\">\n {searchProps && (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<Search />}\n ref={searchRef}\n type=\"search\"\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add a search field to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * To provide the function to toggle the menu bar.\n */\n menuBarToggle: PropTypes.func,\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n};\n\nexport default Header;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","React","createElement","className","map","_ref2","index","text","link","key","Link","to","Typography","component","style","weight","length","memo","Dropdown","props","NeetoUIDropdown","_extends","buttonStyle","icon","MenuVertical","position","Header","title","searchProps","_ref$className","actionBlock","_ref$breadcrumbs","_ref$renderDropdown","renderDropdown","noop","searchRef","useRef","_useTranslation","useTranslation","t","classnames","isNotEmpty","lineHeight","Input","placeholder","prefix","Search","ref","type"],"mappings":";;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC;;;;;;;;;;;ACRA;AACA;AACA,C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AACzC,WAAW,CAAA;KACzB,CAAA;AAAE,GAAA,eAEHC,KAAA,CAAAC,aAAA,CAACU,UAAU,EAAA;AACT,IAAA,SAAA,EAAQ,aAAa;AACrB,IAAA,cAAA,EAAa,aAAa;AAC1B8B,IAAAA,UAAU,EAAC,OAAO;AAClB5B,IAAAA,KAAK,EAAC,IAAI;AACVC,IAAAA,MAAM,EAAC,UAAA;AAAU,GAAA,EAEhBY,KAAK,CACK,EACZM,cAAc,CAACf,QAAQ,CAAC,CACrB,CACF,CACF,eACNjB,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,8CAAA;GACZyB,EAAAA,WAAW,iBACV3B,KAAA,CAAAC,aAAA,CAACyC,KAAK,EAAAtB,QAAA,CAAA;AACJuB,IAAAA,WAAW,EAAEL,CAAC,CAAC,sCAAsC,CAAE;AACvDM,IAAAA,MAAM,eAAE5C,KAAA,CAAAC,aAAA,CAAC4C,MAAM,EAAI,IAAA,CAAA;AACnBC,IAAAA,GAAG,EAAEZ,SAAU;AACfa,IAAAA,IAAI,EAAC,QAAQ;IACb7C,SAAS,EAAEqC,UAAU,CAAC,CACpB,sCAAsC,EACtCZ,WAAW,CAACzB,SAAS,CACtB,CAAA;AAAE,GAAA,EACCyB,WAAW,CAAA,CAElB,EACAE,WAAW,CACR,CACF,CAAA;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/classnames/index.js","../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../src/components/Header/Breadcrumbs.jsx","../src/components/Header/Dropdown.jsx","../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import React from \"react\";\n\nimport { Right } from \"neetoicons\";\nimport { Typography } from \"neetoui\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./header.scss\";\n\nconst Breadcrumbs = ({ breadcrumbs }) => (\n <div className=\"neeto-molecules-header__breadcrumbs-wrap\">\n {breadcrumbs.map(({ text, link }, index) => (\n <div className=\"neeto-molecules-header__breadcrumb\" key={index}>\n <Link to={link}>\n <Typography\n className=\"neeto-molecules-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n <Right\n className=\"neeto-molecules-header__breadcrumb-separator neeto-ui-text-gray-400\"\n size={16}\n />\n </div>\n ))}\n </div>\n);\n\nexport default React.memo(Breadcrumbs);\n","import React from \"react\";\n\nimport { MenuVertical } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonProps={{ className: \"ml-1.5\" }}\n buttonStyle=\"text\"\n className=\"ml-3\"\n icon={MenuVertical}\n position=\"bottom-end\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","import React, { useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop } from \"neetocommons/pure\";\nimport { Search, HamburgerMenu } from \"neetoicons\";\nimport { Typography, Input, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Breadcrumbs from \"./Breadcrumbs\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n menuBarToggle,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n}) => {\n const searchRef = useRef(null);\n const { t } = useTranslation();\n\n return (\n <div\n className={classnames([\n \"neeto-molecules-header\",\n { \"neeto-molecules-header--has-breadcrumbs\": !isEmpty(breadcrumbs) },\n className,\n ])}\n >\n <div className=\"neeto-molecules-header__left\">\n {menuBarToggle && (\n <Button\n aria-label=\"Toggle Menubar\"\n className=\"neeto-molecules-header__toggle-menubar-btn\"\n data-cy=\"menubar-toggle-button\"\n icon={HamburgerMenu}\n style=\"text\"\n onClick={menuBarToggle}\n />\n )}\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {breadcrumbs && <Breadcrumbs {...{ breadcrumbs }} />}\n <div className=\"neeto-molecules-header__page-title\">\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(Dropdown)}\n </div>\n </div>\n </div>\n <div className=\"neeto-ui-gap-3 neeto-molecules-header__right\">\n {searchProps && (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<Search />}\n ref={searchRef}\n type=\"search\"\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add a search field to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * To provide the function to toggle the menu bar.\n */\n menuBarToggle: PropTypes.func,\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n};\n\nexport default Header;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","React","createElement","className","map","_ref2","index","text","link","key","Link","to","Typography","component","style","weight","Right","size","memo","Dropdown","props","NeetoUIDropdown","_extends","buttonProps","buttonStyle","icon","MenuVertical","position","Header","title","menuBarToggle","searchProps","_ref$className","actionBlock","_ref$breadcrumbs","_ref$renderDropdown","renderDropdown","noop","searchRef","useRef","_useTranslation","useTranslation","t","classnames","isEmpty","Button","HamburgerMenu","onClick","lineHeight","Input","placeholder","prefix","Search","ref","type"],"mappings":";;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAA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,SAAS,CACtB,CAAA;AAAE,GAAA,EACC4B,WAAW,CAAA,CAElB,EACAE,WAAW,CACR,CACF,CAAA;AAEV;;;;"}
|
package/dist/MenuBar.cjs.js
CHANGED
|
@@ -30871,7 +30871,7 @@ function _extends() {
|
|
|
30871
30871
|
|
|
30872
30872
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
30873
30873
|
|
|
30874
|
-
var css = ".neeto-molecules-menubar__wrapper{background-color:rgb(var(--neeto-ui-
|
|
30874
|
+
var css = ".neeto-molecules-menubar__wrapper{background-color:rgb(var(--neeto-ui-gray-100));flex-shrink:0;overflow:hidden;transition:all .3s}.neeto-molecules-menubar__container{height:100vh;overflow-y:auto;padding:24px;width:324px}.neeto-molecules-menubar__title{margin-bottom:16px}.neeto-molecules-menubar__search{align-items:center;display:flex;gap:4px;margin-bottom:20px}.neeto-molecules-menubar__subtitle{align-items:center;display:flex;justify-content:space-between;margin-bottom:20px;margin-top:20px}.neeto-molecules-menubar__subtitle-actions{align-items:center;display:flex;gap:4px}.neeto-molecules-menubar__add-new-wrap,.neeto-molecules-menubar__block{margin-bottom:8px;padding:7px 8px}.neeto-molecules-menubar__block{align-items:center;border:thin solid transparent;border-radius:var(--neeto-ui-rounded);cursor:pointer;display:flex;justify-content:space-between;text-align:left;transition:all .3s;width:100%}.neeto-molecules-menubar__block:active,.neeto-molecules-menubar__block:focus,.neeto-molecules-menubar__block:focus-visible,.neeto-molecules-menubar__block:hover{background-color:rgb(var(--neeto-ui-gray-200));outline:none;text-decoration:none}.neeto-molecules-menubar__block--active{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-300));box-shadow:var(--neeto-ui-shadow-xs)}.neeto-molecules-menubar__block--active:active,.neeto-molecules-menubar__block--active:focus,.neeto-molecules-menubar__block--active:focus-visible,.neeto-molecules-menubar__block--active:hover{background-color:rgb(var(--neeto-ui-white))}.neeto-molecules-menubar__block .neeto-molecules-menubar__block-label{align-items:center;display:flex}.neeto-molecules-menubar__block .neeto-molecules-menubar__block-icon{margin-right:4px}.neeto-molecules-menubar__item{border:thin solid transparent;border-radius:var(--neeto-ui-rounded);cursor:pointer;margin-bottom:8px;padding:12px;text-align:left;transition:all .3s;width:100%}.neeto-molecules-menubar__item:active,.neeto-molecules-menubar__item:focus,.neeto-molecules-menubar__item:focus-visible,.neeto-molecules-menubar__item:hover{background-color:rgb(var(--neeto-ui-gray-200));outline:none}.neeto-molecules-menubar__item--active{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-300));box-shadow:var(--neeto-ui-shadow-xs);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-menubar__item--active:active,.neeto-molecules-menubar__item--active:focus,.neeto-molecules-menubar__item--active:focus-visible,.neeto-molecules-menubar__item--active:hover{background-color:rgb(var(--neeto-ui-white))}.neeto-molecules-menubar-enter.neeto-molecules-menubar__wrapper{width:0}.neeto-molecules-menubar-enter-active.neeto-molecules-menubar__wrapper,.neeto-molecules-menubar-enter-done.neeto-molecules-menubar__wrapper,.neeto-molecules-menubar-exit.neeto-molecules-menubar__wrapper{width:324px}.neeto-molecules-menubar-exit-active.neeto-molecules-menubar__wrapper{width:0}";
|
|
30875
30875
|
n(css,{});
|
|
30876
30876
|
|
|
30877
30877
|
var _excluded$5 = ["label", "onClick"];
|
package/dist/MenuBar.js
CHANGED
|
@@ -30865,7 +30865,7 @@ function _extends() {
|
|
|
30865
30865
|
|
|
30866
30866
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
30867
30867
|
|
|
30868
|
-
var css = ".neeto-molecules-menubar__wrapper{background-color:rgb(var(--neeto-ui-
|
|
30868
|
+
var css = ".neeto-molecules-menubar__wrapper{background-color:rgb(var(--neeto-ui-gray-100));flex-shrink:0;overflow:hidden;transition:all .3s}.neeto-molecules-menubar__container{height:100vh;overflow-y:auto;padding:24px;width:324px}.neeto-molecules-menubar__title{margin-bottom:16px}.neeto-molecules-menubar__search{align-items:center;display:flex;gap:4px;margin-bottom:20px}.neeto-molecules-menubar__subtitle{align-items:center;display:flex;justify-content:space-between;margin-bottom:20px;margin-top:20px}.neeto-molecules-menubar__subtitle-actions{align-items:center;display:flex;gap:4px}.neeto-molecules-menubar__add-new-wrap,.neeto-molecules-menubar__block{margin-bottom:8px;padding:7px 8px}.neeto-molecules-menubar__block{align-items:center;border:thin solid transparent;border-radius:var(--neeto-ui-rounded);cursor:pointer;display:flex;justify-content:space-between;text-align:left;transition:all .3s;width:100%}.neeto-molecules-menubar__block:active,.neeto-molecules-menubar__block:focus,.neeto-molecules-menubar__block:focus-visible,.neeto-molecules-menubar__block:hover{background-color:rgb(var(--neeto-ui-gray-200));outline:none;text-decoration:none}.neeto-molecules-menubar__block--active{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-300));box-shadow:var(--neeto-ui-shadow-xs)}.neeto-molecules-menubar__block--active:active,.neeto-molecules-menubar__block--active:focus,.neeto-molecules-menubar__block--active:focus-visible,.neeto-molecules-menubar__block--active:hover{background-color:rgb(var(--neeto-ui-white))}.neeto-molecules-menubar__block .neeto-molecules-menubar__block-label{align-items:center;display:flex}.neeto-molecules-menubar__block .neeto-molecules-menubar__block-icon{margin-right:4px}.neeto-molecules-menubar__item{border:thin solid transparent;border-radius:var(--neeto-ui-rounded);cursor:pointer;margin-bottom:8px;padding:12px;text-align:left;transition:all .3s;width:100%}.neeto-molecules-menubar__item:active,.neeto-molecules-menubar__item:focus,.neeto-molecules-menubar__item:focus-visible,.neeto-molecules-menubar__item:hover{background-color:rgb(var(--neeto-ui-gray-200));outline:none}.neeto-molecules-menubar__item--active{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-300));box-shadow:var(--neeto-ui-shadow-xs);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-menubar__item--active:active,.neeto-molecules-menubar__item--active:focus,.neeto-molecules-menubar__item--active:focus-visible,.neeto-molecules-menubar__item--active:hover{background-color:rgb(var(--neeto-ui-white))}.neeto-molecules-menubar-enter.neeto-molecules-menubar__wrapper{width:0}.neeto-molecules-menubar-enter-active.neeto-molecules-menubar__wrapper,.neeto-molecules-menubar-enter-done.neeto-molecules-menubar__wrapper,.neeto-molecules-menubar-exit.neeto-molecules-menubar__wrapper{width:324px}.neeto-molecules-menubar-exit-active.neeto-molecules-menubar__wrapper{width:0}";
|
|
30869
30869
|
n(css,{});
|
|
30870
30870
|
|
|
30871
30871
|
var _excluded$5 = ["label", "onClick"];
|
|
@@ -2934,6 +2934,7 @@ var ShareViaEmail = function ShareViaEmail(_ref) {
|
|
|
2934
2934
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2935
2935
|
className: "mx-auto flex w-full max-w-7xl flex-col"
|
|
2936
2936
|
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Form, {
|
|
2937
|
+
scrollToErrorField: true,
|
|
2937
2938
|
formProps: {
|
|
2938
2939
|
noValidate: true
|
|
2939
2940
|
},
|