@bigbinary/neeto-molecules 4.0.144 → 4.0.145

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.
@@ -1,45 +1,62 @@
1
1
  import classnames from 'classnames';
2
+ import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
2
3
  import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
3
4
  import Typography from '@bigbinary/neetoui/Typography';
4
5
  import { Link } from 'react-router-dom';
5
6
  import { n } from './inject-css-C2dztUxs.js';
6
7
  import { jsx, jsxs } from 'react/jsx-runtime';
7
8
 
8
- var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}";
9
+ var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}.neeto-molecules-breadcrumbs-list{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}";
9
10
  n(css,{});
10
11
 
11
- var Breadcrumbs = function Breadcrumbs(_ref) {
12
- var breadcrumbs = _ref.breadcrumbs,
12
+ var Breadcrumbs = withT(function (_ref) {
13
+ var t = _ref.t,
14
+ breadcrumbs = _ref.breadcrumbs,
13
15
  _ref$hasTrailingSepar = _ref.hasTrailingSeparator,
14
16
  hasTrailingSeparator = _ref$hasTrailingSepar === void 0 ? false : _ref$hasTrailingSepar,
15
17
  className = _ref.className;
16
- return /*#__PURE__*/jsx("div", {
18
+ return /*#__PURE__*/jsx("nav", {
19
+ "aria-label": t("neetoMolecules.breadcrumbs.breadcrumbAriaLabel"),
17
20
  className: classnames("neeto-molecules-breadcrumbs-wrap", className),
18
- children: breadcrumbs.map(function (_ref2, index) {
19
- var text = _ref2.text,
20
- _ref2$link = _ref2.link,
21
- link = _ref2$link === void 0 ? "#" : _ref2$link;
22
- return /*#__PURE__*/jsxs("div", {
23
- className: "neeto-molecules-breadcrumb",
24
- "data-testid": "header-breadcrumb",
25
- children: [/*#__PURE__*/jsx(Link, {
26
- to: link,
27
- children: /*#__PURE__*/jsx(Typography, {
28
- className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
21
+ children: /*#__PURE__*/jsx("ol", {
22
+ className: "neeto-molecules-breadcrumbs-list",
23
+ children: breadcrumbs.map(function (_ref2, index) {
24
+ var text = _ref2.text,
25
+ _ref2$link = _ref2.link,
26
+ link = _ref2$link === void 0 ? "#" : _ref2$link;
27
+ var isLast = index + 1 === breadcrumbs.length;
28
+ var isCurrentPage = isLast && !hasTrailingSeparator;
29
+ return /*#__PURE__*/jsxs("li", {
30
+ className: "neeto-molecules-breadcrumb",
31
+ "data-testid": "header-breadcrumb",
32
+ children: [isCurrentPage ? /*#__PURE__*/jsx(Typography, {
33
+ "aria-current": "page",
34
+ className: "neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link",
29
35
  component: "span",
30
36
  "data-testid": "".concat(hyphenize(text), "-breadcrumb"),
31
37
  style: "body2",
32
38
  weight: "normal",
33
39
  children: text
34
- })
35
- }), (index + 1 !== breadcrumbs.length || hasTrailingSeparator) && /*#__PURE__*/jsx("span", {
36
- className: "neeto-molecules-breadcrumb-separator neeto-ui-text-black",
37
- children: "/"
38
- })]
39
- }, index);
40
+ }) : /*#__PURE__*/jsx(Link, {
41
+ to: link,
42
+ children: /*#__PURE__*/jsx(Typography, {
43
+ className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
44
+ component: "span",
45
+ "data-testid": "".concat(hyphenize(text), "-breadcrumb"),
46
+ style: "body2",
47
+ weight: "normal",
48
+ children: text
49
+ })
50
+ }), !isCurrentPage && /*#__PURE__*/jsx("span", {
51
+ "aria-hidden": "true",
52
+ className: "neeto-molecules-breadcrumb-separator neeto-ui-text-black",
53
+ children: "/"
54
+ })]
55
+ }, index);
56
+ })
40
57
  })
41
58
  });
42
- };
59
+ });
43
60
 
44
61
  export { Breadcrumbs as default };
45
62
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-testid=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `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\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","_jsx","classNames","children","map","_ref2","index","text","_ref2$link","link","_jsxs","Link","to","Typography","component","concat","hyphenize","style","weight","length"],"mappings":";;;;;;;;;;AAQA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACfC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAAC,qBAAA,GAAAF,IAAA,CACXG,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAC5BE,SAAS,GAAAJ,IAAA,CAATI,SAAS;AAAA,EAAA,oBAETC,GAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAEE,UAAU,CAAC,kCAAkC,EAAEF,SAAS,CAAE;IAAAG,QAAA,EACvEN,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAA;AAAA,MAAA,IAAzBC,IAAI,GAAAF,KAAA,CAAJE,IAAI;QAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,QAAAA,IAAI,GAAAD,UAAA,KAAA,MAAA,GAAG,GAAG,GAAAA,UAAA;AAAA,MAAA,oBAClCE,IAAA,CAAA,KAAA,EAAA;AACEV,QAAAA,SAAS,EAAC,4BAA4B;AACtC,QAAA,aAAA,EAAY,mBAAmB;QAAAG,QAAA,EAAA,cAG/BF,GAAA,CAACU,IAAI,EAAA;AAACC,UAAAA,EAAE,EAAEH,IAAK;UAAAN,QAAA,eACbF,GAAA,CAACY,UAAU,EAAA;AACTb,YAAAA,SAAS,EAAC,qFAAqF;AAC/Fc,YAAAA,SAAS,EAAC,MAAM;AAChB,YAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,SAAS,CAACT,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CU,YAAAA,KAAK,EAAC,OAAO;AACbC,YAAAA,MAAM,EAAC,QAAQ;AAAAf,YAAAA,QAAA,EAEdI;WACS;AAAC,SACT,CAAC,EACN,CAACD,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACsB,MAAM,IAAIpB,oBAAoB,kBACxDE,GAAA,CAAA,MAAA,EAAA;AAAMD,UAAAA,SAAS,EAAC,0DAA0D;AAAAG,UAAAA,QAAA,EAAC;AAE3E,SAAM,CACP;AAAA,OAAA,EAjBIG,KAkBF,CAAC;IAAA,CACP;AAAC,GACC,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = withT(\n ({ t, breadcrumbs, hasTrailingSeparator = false, className }) => (\n <nav\n aria-label={t(\"neetoMolecules.breadcrumbs.breadcrumbAriaLabel\")}\n className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}\n >\n <ol className=\"neeto-molecules-breadcrumbs-list\">\n {breadcrumbs.map(({ text, link = \"#\" }, index) => {\n const isLast = index + 1 === breadcrumbs.length;\n const isCurrentPage = isLast && !hasTrailingSeparator;\n\n return (\n <li\n className=\"neeto-molecules-breadcrumb\"\n data-testid=\"header-breadcrumb\"\n key={index}\n >\n {isCurrentPage ? (\n <Typography\n aria-current=\"page\"\n className=\"neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n ) : (\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n )}\n {!isCurrentPage && (\n <span\n aria-hidden=\"true\"\n className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\"\n >\n /\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n )\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `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\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","withT","_ref","t","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","_jsx","classNames","children","map","_ref2","index","text","_ref2$link","link","isLast","length","isCurrentPage","_jsxs","Typography","component","concat","hyphenize","style","weight","Link","to"],"mappings":";;;;;;;;;;;AASA,IAAMA,WAAW,GAAGC,KAAK,CACvB,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAC,qBAAA,GAAAH,IAAA,CAAEI,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAEE,SAAS,GAAAL,IAAA,CAATK,SAAS;AAAA,EAAA,oBACxDC,GAAA,CAAA,KAAA,EAAA;IACE,YAAA,EAAYL,CAAC,CAAC,gDAAgD,CAAE;AAChEI,IAAAA,SAAS,EAAEE,UAAU,CAAC,kCAAkC,EAAEF,SAAS,CAAE;AAAAG,IAAAA,QAAA,eAErEF,GAAA,CAAA,IAAA,EAAA;AAAID,MAAAA,SAAS,EAAC,kCAAkC;MAAAG,QAAA,EAC7CN,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAK;AAAA,QAAA,IAA9BC,IAAI,GAAAF,KAAA,CAAJE,IAAI;UAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,UAAAA,IAAI,GAAAD,UAAA,KAAA,MAAA,GAAG,GAAG,GAAAA,UAAA;QAClC,IAAME,MAAM,GAAGJ,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACc,MAAM;AAC/C,QAAA,IAAMC,aAAa,GAAGF,MAAM,IAAI,CAACX,oBAAoB;AAErD,QAAA,oBACEc,IAAA,CAAA,IAAA,EAAA;AACEb,UAAAA,SAAS,EAAC,4BAA4B;AACtC,UAAA,aAAA,EAAY,mBAAmB;AAAAG,UAAAA,QAAA,EAAA,CAG9BS,aAAa,gBACZX,GAAA,CAACa,UAAU,EAAA;AACT,YAAA,cAAA,EAAa,MAAM;AACnBd,YAAAA,SAAS,EAAC,wDAAwD;AAClEe,YAAAA,SAAS,EAAC,MAAM;AAChB,YAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,SAAS,CAACV,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CW,YAAAA,KAAK,EAAC,OAAO;AACbC,YAAAA,MAAM,EAAC,QAAQ;AAAAhB,YAAAA,QAAA,EAEdI;AAAI,WACK,CAAC,gBAEbN,GAAA,CAACmB,IAAI,EAAA;AAACC,YAAAA,EAAE,EAAEZ,IAAK;YAAAN,QAAA,eACbF,GAAA,CAACa,UAAU,EAAA;AACTd,cAAAA,SAAS,EAAC,qFAAqF;AAC/Fe,cAAAA,SAAS,EAAC,MAAM;AAChB,cAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,SAAS,CAACV,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CW,cAAAA,KAAK,EAAC,OAAO;AACbC,cAAAA,MAAM,EAAC,QAAQ;AAAAhB,cAAAA,QAAA,EAEdI;aACS;AAAC,WACT,CACP,EACA,CAACK,aAAa,iBACbX,GAAA,CAAA,MAAA,EAAA;AACE,YAAA,aAAA,EAAY,MAAM;AAClBD,YAAAA,SAAS,EAAC,0DAA0D;AAAAG,YAAAA,QAAA,EACrE;AAED,WAAM,CACP;AAAA,SAAA,EAjCIG,KAkCH,CAAC;MAET,CAAC;KACC;AAAC,GACF,CAAC;AAAA,CAEV;;;;"}
package/dist/EmailForm.js CHANGED
@@ -47,6 +47,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
47
47
  import '@bigbinary/neeto-icons/Braces';
48
48
  import '@bigbinary/neetoui/Dropdown';
49
49
  import './Breadcrumbs.js';
50
+ import '@bigbinary/neeto-commons-frontend/react-utils';
50
51
  import 'react-router-dom';
51
52
  import './HelpPopover.js';
52
53
  import '@bigbinary/neeto-icons/Help';
@@ -54,7 +55,6 @@ import '@bigbinary/neetoui/Popover';
54
55
  import './MoreDropdown.js';
55
56
  import '@bigbinary/neeto-icons/MenuHorizontal';
56
57
  import '@bigbinary/neeto-icons/MenuVertical';
57
- import '@bigbinary/neeto-commons-frontend/react-utils';
58
58
  import './Search.js';
59
59
  import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
60
60
  import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
package/dist/Header.js CHANGED
@@ -10,6 +10,7 @@ import MoreDropdown from './MoreDropdown.js';
10
10
  import Search from './Search.js';
11
11
  import { n } from './inject-css-C2dztUxs.js';
12
12
  import { jsxs, jsx } from 'react/jsx-runtime';
13
+ import '@bigbinary/neeto-commons-frontend/react-utils';
13
14
  import '@bigbinary/neeto-commons-frontend/utils/general';
14
15
  import 'react-router-dom';
15
16
  import '@bigbinary/neeto-icons/Help';
@@ -21,7 +22,6 @@ import '@bigbinary/neeto-icons/MenuVertical';
21
22
  import '@bigbinary/neetoui/Dropdown';
22
23
  import '@bigbinary/neetoui/Tooltip';
23
24
  import 'ramda';
24
- import '@bigbinary/neeto-commons-frontend/react-utils';
25
25
  import '@babel/runtime/helpers/slicedToArray';
26
26
  import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
27
27
  import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
@@ -22,13 +22,13 @@ import '@babel/runtime/helpers/slicedToArray';
22
22
  import '@bigbinary/neeto-commons-frontend/react-utils/useOnClickOutside';
23
23
  import '@bigbinary/neeto-commons-frontend/react-utils/useStateWithDependency';
24
24
  import './Breadcrumbs.js';
25
+ import '@bigbinary/neeto-commons-frontend/react-utils';
25
26
  import '@bigbinary/neeto-hotkeys';
26
27
  import '@bigbinary/neeto-icons/Check';
27
28
  import '@bigbinary/neeto-icons/Close';
28
29
  import '@bigbinary/neetoui/Button';
29
30
  import '@bigbinary/neetoui/Input';
30
31
  import '@babel/runtime/helpers/toConsumableArray';
31
- import '@bigbinary/neeto-commons-frontend/react-utils';
32
32
  import '@bigbinary/neeto-icons/MenuHorizontal';
33
33
  import '@bigbinary/neeto-icons/MenuVertical';
34
34
  import '@bigbinary/neeto-commons-frontend/react-utils/withT';
package/dist/Taxonomy.js CHANGED
@@ -34,6 +34,7 @@ import './_commonjsHelpers-BFTU3MAI.js';
34
34
  import './inject-css-C2dztUxs.js';
35
35
  import '@babel/runtime/helpers/objectWithoutProperties';
36
36
  import './Breadcrumbs.js';
37
+ import '@bigbinary/neeto-commons-frontend/react-utils';
37
38
  import '@bigbinary/neeto-commons-frontend/utils/general';
38
39
  import 'react-router-dom';
39
40
  import './HelpPopover.js';
@@ -49,7 +50,6 @@ import '@bigbinary/neetoui/Input';
49
50
  import '@bigbinary/neeto-icons/MenuHorizontal';
50
51
  import '@bigbinary/neeto-icons/MenuVertical';
51
52
  import '@bigbinary/neetoui/Tooltip';
52
- import '@bigbinary/neeto-commons-frontend/react-utils';
53
53
  import '@bigbinary/neeto-icons/Column';
54
54
  import './Columns-D51hN86M.js';
55
55
  import '@dnd-kit/core';
@@ -1,47 +1,64 @@
1
1
  'use strict';
2
2
 
3
3
  var classnames = require('classnames');
4
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
4
5
  var general = require('@bigbinary/neeto-commons-frontend/utils/general');
5
6
  var Typography = require('@bigbinary/neetoui/Typography');
6
7
  var reactRouterDom = require('react-router-dom');
7
8
  var injectCss = require('./inject-css-B6qYtOJe.js');
8
9
  var jsxRuntime = require('react/jsx-runtime');
9
10
 
10
- var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}";
11
+ var css = ".neeto-molecules-breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-breadcrumb a{transition:none}}.neeto-molecules-breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-breadcrumb-separator{font-size:.75rem;line-height:1rem;margin-inline:.75rem}.neeto-molecules-breadcrumbs-wrap{display:flex;flex-wrap:wrap;gap:.375rem 0;margin-block-end:2.5rem}@media screen and (max-width:768px){.neeto-molecules-breadcrumbs-wrap{margin-block-end:1rem}}.neeto-molecules-breadcrumbs-list{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}";
11
12
  injectCss.n(css,{});
12
13
 
13
- var Breadcrumbs = function Breadcrumbs(_ref) {
14
- var breadcrumbs = _ref.breadcrumbs,
14
+ var Breadcrumbs = reactUtils.withT(function (_ref) {
15
+ var t = _ref.t,
16
+ breadcrumbs = _ref.breadcrumbs,
15
17
  _ref$hasTrailingSepar = _ref.hasTrailingSeparator,
16
18
  hasTrailingSeparator = _ref$hasTrailingSepar === void 0 ? false : _ref$hasTrailingSepar,
17
19
  className = _ref.className;
18
- return /*#__PURE__*/jsxRuntime.jsx("div", {
20
+ return /*#__PURE__*/jsxRuntime.jsx("nav", {
21
+ "aria-label": t("neetoMolecules.breadcrumbs.breadcrumbAriaLabel"),
19
22
  className: classnames("neeto-molecules-breadcrumbs-wrap", className),
20
- children: breadcrumbs.map(function (_ref2, index) {
21
- var text = _ref2.text,
22
- _ref2$link = _ref2.link,
23
- link = _ref2$link === void 0 ? "#" : _ref2$link;
24
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
25
- className: "neeto-molecules-breadcrumb",
26
- "data-testid": "header-breadcrumb",
27
- children: [/*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Link, {
28
- to: link,
29
- children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
30
- className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
23
+ children: /*#__PURE__*/jsxRuntime.jsx("ol", {
24
+ className: "neeto-molecules-breadcrumbs-list",
25
+ children: breadcrumbs.map(function (_ref2, index) {
26
+ var text = _ref2.text,
27
+ _ref2$link = _ref2.link,
28
+ link = _ref2$link === void 0 ? "#" : _ref2$link;
29
+ var isLast = index + 1 === breadcrumbs.length;
30
+ var isCurrentPage = isLast && !hasTrailingSeparator;
31
+ return /*#__PURE__*/jsxRuntime.jsxs("li", {
32
+ className: "neeto-molecules-breadcrumb",
33
+ "data-testid": "header-breadcrumb",
34
+ children: [isCurrentPage ? /*#__PURE__*/jsxRuntime.jsx(Typography, {
35
+ "aria-current": "page",
36
+ className: "neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link",
31
37
  component: "span",
32
38
  "data-testid": "".concat(general.hyphenize(text), "-breadcrumb"),
33
39
  style: "body2",
34
40
  weight: "normal",
35
41
  children: text
36
- })
37
- }), (index + 1 !== breadcrumbs.length || hasTrailingSeparator) && /*#__PURE__*/jsxRuntime.jsx("span", {
38
- className: "neeto-molecules-breadcrumb-separator neeto-ui-text-black",
39
- children: "/"
40
- })]
41
- }, index);
42
+ }) : /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Link, {
43
+ to: link,
44
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
45
+ className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
46
+ component: "span",
47
+ "data-testid": "".concat(general.hyphenize(text), "-breadcrumb"),
48
+ style: "body2",
49
+ weight: "normal",
50
+ children: text
51
+ })
52
+ }), !isCurrentPage && /*#__PURE__*/jsxRuntime.jsx("span", {
53
+ "aria-hidden": "true",
54
+ className: "neeto-molecules-breadcrumb-separator neeto-ui-text-black",
55
+ children: "/"
56
+ })]
57
+ }, index);
58
+ })
42
59
  })
43
60
  });
44
- };
61
+ });
45
62
 
46
63
  module.exports = Breadcrumbs;
47
64
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","sources":["../../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-testid=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `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\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","_jsx","classNames","children","map","_ref2","index","text","_ref2$link","link","_jsxs","Link","to","Typography","component","concat","hyphenize","style","weight","length"],"mappings":";;;;;;;;;;;;AAQA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACfC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAAC,qBAAA,GAAAF,IAAA,CACXG,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAC5BE,SAAS,GAAAJ,IAAA,CAATI,SAAS;AAAA,EAAA,oBAETC,cAAA,CAAA,KAAA,EAAA;AAAKD,IAAAA,SAAS,EAAEE,UAAU,CAAC,kCAAkC,EAAEF,SAAS,CAAE;IAAAG,QAAA,EACvEN,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAA;AAAA,MAAA,IAAzBC,IAAI,GAAAF,KAAA,CAAJE,IAAI;QAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,QAAAA,IAAI,GAAAD,UAAA,KAAA,MAAA,GAAG,GAAG,GAAAA,UAAA;AAAA,MAAA,oBAClCE,eAAA,CAAA,KAAA,EAAA;AACEV,QAAAA,SAAS,EAAC,4BAA4B;AACtC,QAAA,aAAA,EAAY,mBAAmB;QAAAG,QAAA,EAAA,cAG/BF,cAAA,CAACU,mBAAI,EAAA;AAACC,UAAAA,EAAE,EAAEH,IAAK;UAAAN,QAAA,eACbF,cAAA,CAACY,UAAU,EAAA;AACTb,YAAAA,SAAS,EAAC,qFAAqF;AAC/Fc,YAAAA,SAAS,EAAC,MAAM;AAChB,YAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,iBAAS,CAACT,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CU,YAAAA,KAAK,EAAC,OAAO;AACbC,YAAAA,MAAM,EAAC,QAAQ;AAAAf,YAAAA,QAAA,EAEdI;WACS;AAAC,SACT,CAAC,EACN,CAACD,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACsB,MAAM,IAAIpB,oBAAoB,kBACxDE,cAAA,CAAA,MAAA,EAAA;AAAMD,UAAAA,SAAS,EAAC,0DAA0D;AAAAG,UAAAA,QAAA,EAAC;AAE3E,SAAM,CACP;AAAA,OAAA,EAjBIG,KAkBF,CAAC;IAAA,CACP;AAAC,GACC,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"Breadcrumbs.js","sources":["../../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = withT(\n ({ t, breadcrumbs, hasTrailingSeparator = false, className }) => (\n <nav\n aria-label={t(\"neetoMolecules.breadcrumbs.breadcrumbAriaLabel\")}\n className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}\n >\n <ol className=\"neeto-molecules-breadcrumbs-list\">\n {breadcrumbs.map(({ text, link = \"#\" }, index) => {\n const isLast = index + 1 === breadcrumbs.length;\n const isCurrentPage = isLast && !hasTrailingSeparator;\n\n return (\n <li\n className=\"neeto-molecules-breadcrumb\"\n data-testid=\"header-breadcrumb\"\n key={index}\n >\n {isCurrentPage ? (\n <Typography\n aria-current=\"page\"\n className=\"neeto-ui-text-gray-700 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n ) : (\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-testid={`${hyphenize(text)}-breadcrumb`}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n )}\n {!isCurrentPage && (\n <span\n aria-hidden=\"true\"\n className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\"\n >\n /\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n )\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `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\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","withT","_ref","t","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","_jsx","classNames","children","map","_ref2","index","text","_ref2$link","link","isLast","length","isCurrentPage","_jsxs","Typography","component","concat","hyphenize","style","weight","Link","to"],"mappings":";;;;;;;;;;;;;AASA,IAAMA,WAAW,GAAGC,gBAAK,CACvB,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAC,qBAAA,GAAAH,IAAA,CAAEI,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAEE,SAAS,GAAAL,IAAA,CAATK,SAAS;AAAA,EAAA,oBACxDC,cAAA,CAAA,KAAA,EAAA;IACE,YAAA,EAAYL,CAAC,CAAC,gDAAgD,CAAE;AAChEI,IAAAA,SAAS,EAAEE,UAAU,CAAC,kCAAkC,EAAEF,SAAS,CAAE;AAAAG,IAAAA,QAAA,eAErEF,cAAA,CAAA,IAAA,EAAA;AAAID,MAAAA,SAAS,EAAC,kCAAkC;MAAAG,QAAA,EAC7CN,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAK;AAAA,QAAA,IAA9BC,IAAI,GAAAF,KAAA,CAAJE,IAAI;UAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,UAAAA,IAAI,GAAAD,UAAA,KAAA,MAAA,GAAG,GAAG,GAAAA,UAAA;QAClC,IAAME,MAAM,GAAGJ,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACc,MAAM;AAC/C,QAAA,IAAMC,aAAa,GAAGF,MAAM,IAAI,CAACX,oBAAoB;AAErD,QAAA,oBACEc,eAAA,CAAA,IAAA,EAAA;AACEb,UAAAA,SAAS,EAAC,4BAA4B;AACtC,UAAA,aAAA,EAAY,mBAAmB;AAAAG,UAAAA,QAAA,EAAA,CAG9BS,aAAa,gBACZX,cAAA,CAACa,UAAU,EAAA;AACT,YAAA,cAAA,EAAa,MAAM;AACnBd,YAAAA,SAAS,EAAC,wDAAwD;AAClEe,YAAAA,SAAS,EAAC,MAAM;AAChB,YAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,iBAAS,CAACV,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CW,YAAAA,KAAK,EAAC,OAAO;AACbC,YAAAA,MAAM,EAAC,QAAQ;AAAAhB,YAAAA,QAAA,EAEdI;AAAI,WACK,CAAC,gBAEbN,cAAA,CAACmB,mBAAI,EAAA;AAACC,YAAAA,EAAE,EAAEZ,IAAK;YAAAN,QAAA,eACbF,cAAA,CAACa,UAAU,EAAA;AACTd,cAAAA,SAAS,EAAC,qFAAqF;AAC/Fe,cAAAA,SAAS,EAAC,MAAM;AAChB,cAAA,aAAA,EAAA,EAAA,CAAAC,MAAA,CAAgBC,iBAAS,CAACV,IAAI,CAAC,EAAA,aAAA,CAAc;AAC7CW,cAAAA,KAAK,EAAC,OAAO;AACbC,cAAAA,MAAM,EAAC,QAAQ;AAAAhB,cAAAA,QAAA,EAEdI;aACS;AAAC,WACT,CACP,EACA,CAACK,aAAa,iBACbX,cAAA,CAAA,MAAA,EAAA;AACE,YAAA,aAAA,EAAY,MAAM;AAClBD,YAAAA,SAAS,EAAC,0DAA0D;AAAAG,YAAAA,QAAA,EACrE;AAED,WAAM,CACP;AAAA,SAAA,EAjCIG,KAkCH,CAAC;MAET,CAAC;KACC;AAAC,GACF,CAAC;AAAA,CAEV;;;;"}
@@ -51,6 +51,7 @@ require('@babel/runtime/helpers/objectWithoutProperties');
51
51
  require('@bigbinary/neeto-icons/Braces');
52
52
  require('@bigbinary/neetoui/Dropdown');
53
53
  require('./Breadcrumbs.js');
54
+ require('@bigbinary/neeto-commons-frontend/react-utils');
54
55
  require('react-router-dom');
55
56
  require('./HelpPopover.js');
56
57
  require('@bigbinary/neeto-icons/Help');
@@ -58,7 +59,6 @@ require('@bigbinary/neetoui/Popover');
58
59
  require('./MoreDropdown.js');
59
60
  require('@bigbinary/neeto-icons/MenuHorizontal');
60
61
  require('@bigbinary/neeto-icons/MenuVertical');
61
- require('@bigbinary/neeto-commons-frontend/react-utils');
62
62
  require('./Search.js');
63
63
  require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
64
64
  require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
@@ -12,6 +12,7 @@ var MoreDropdown = require('./MoreDropdown.js');
12
12
  var Search = require('./Search.js');
13
13
  var injectCss = require('./inject-css-B6qYtOJe.js');
14
14
  var jsxRuntime = require('react/jsx-runtime');
15
+ require('@bigbinary/neeto-commons-frontend/react-utils');
15
16
  require('@bigbinary/neeto-commons-frontend/utils/general');
16
17
  require('react-router-dom');
17
18
  require('@bigbinary/neeto-icons/Help');
@@ -23,7 +24,6 @@ require('@bigbinary/neeto-icons/MenuVertical');
23
24
  require('@bigbinary/neetoui/Dropdown');
24
25
  require('@bigbinary/neetoui/Tooltip');
25
26
  require('ramda');
26
- require('@bigbinary/neeto-commons-frontend/react-utils');
27
27
  require('@babel/runtime/helpers/slicedToArray');
28
28
  require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
29
29
  require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
@@ -24,13 +24,13 @@ require('@babel/runtime/helpers/slicedToArray');
24
24
  require('@bigbinary/neeto-commons-frontend/react-utils/useOnClickOutside');
25
25
  require('@bigbinary/neeto-commons-frontend/react-utils/useStateWithDependency');
26
26
  require('./Breadcrumbs.js');
27
+ require('@bigbinary/neeto-commons-frontend/react-utils');
27
28
  require('@bigbinary/neeto-hotkeys');
28
29
  require('@bigbinary/neeto-icons/Check');
29
30
  require('@bigbinary/neeto-icons/Close');
30
31
  require('@bigbinary/neetoui/Button');
31
32
  require('@bigbinary/neetoui/Input');
32
33
  require('@babel/runtime/helpers/toConsumableArray');
33
- require('@bigbinary/neeto-commons-frontend/react-utils');
34
34
  require('@bigbinary/neeto-icons/MenuHorizontal');
35
35
  require('@bigbinary/neeto-icons/MenuVertical');
36
36
  require('@bigbinary/neeto-commons-frontend/react-utils/withT');
@@ -36,6 +36,7 @@ require('./_commonjsHelpers-BJu3ubxk.js');
36
36
  require('./inject-css-B6qYtOJe.js');
37
37
  require('@babel/runtime/helpers/objectWithoutProperties');
38
38
  require('./Breadcrumbs.js');
39
+ require('@bigbinary/neeto-commons-frontend/react-utils');
39
40
  require('@bigbinary/neeto-commons-frontend/utils/general');
40
41
  require('react-router-dom');
41
42
  require('./HelpPopover.js');
@@ -51,7 +52,6 @@ require('@bigbinary/neetoui/Input');
51
52
  require('@bigbinary/neeto-icons/MenuHorizontal');
52
53
  require('@bigbinary/neeto-icons/MenuVertical');
53
54
  require('@bigbinary/neetoui/Tooltip');
54
- require('@bigbinary/neeto-commons-frontend/react-utils');
55
55
  require('@bigbinary/neeto-icons/Column');
56
56
  require('./Columns-7xltEL2z.js');
57
57
  require('@dnd-kit/core');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "4.0.144",
3
+ "version": "4.0.145",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -920,6 +920,9 @@
920
920
  "paneTitle": "Version history",
921
921
  "publishedVersions": "Published versions",
922
922
  "refreshButtonTooltip": "Refresh version history"
923
+ },
924
+ "breadcrumbs": {
925
+ "breadcrumbAriaLabel": "Breadcrumb"
923
926
  }
924
927
  }
925
928
  }