boreal-ui 0.0.22 → 0.0.23
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/core/{NavBar-C8zI9Lvt.cjs → NavBar-Dier3-3b.cjs} +22 -14
- package/dist/core/NavBar-Dier3-3b.cjs.map +1 -0
- package/dist/core/{NavBar-CNoWBQIV.js → NavBar-UpeebUNC.js} +22 -14
- package/dist/core/NavBar-UpeebUNC.js.map +1 -0
- package/dist/core/NavBar.cjs.js +1 -1
- package/dist/core/NavBar.js +1 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/style.css +4 -0
- package/dist/next/{NavBar-BL5qICdc.js → NavBar-CKo-nom2.js} +57 -49
- package/dist/next/NavBar-CKo-nom2.js.map +1 -0
- package/dist/next/{NavBar-Dj4sWT26.cjs → NavBar-CO4v6_28.cjs} +57 -49
- package/dist/next/NavBar-CO4v6_28.cjs.map +1 -0
- package/dist/next/NavBar.cjs.js +1 -1
- package/dist/next/NavBar.js +1 -1
- package/dist/next/index.cjs.js +1 -1
- package/dist/next/index.js +1 -1
- package/dist/next/style.css +54 -50
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/NavBar/NavBarBase.d.ts.map +1 -1
- package/dist/types/components/NavBar/core/NavBar.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/core/NavBar-C8zI9Lvt.cjs.map +0 -1
- package/dist/core/NavBar-CNoWBQIV.js.map +0 -1
- package/dist/next/NavBar-BL5qICdc.js.map +0 -1
- package/dist/next/NavBar-Dj4sWT26.cjs.map +0 -1
|
@@ -40,7 +40,7 @@ const BaseNavBar = ({
|
|
|
40
40
|
"Nav item className:",
|
|
41
41
|
classNames.combineClassNames(classMap.item, isActive && classMap.active)
|
|
42
42
|
);
|
|
43
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
44
|
LinkWrapper,
|
|
45
45
|
{
|
|
46
46
|
href: item.path,
|
|
@@ -51,18 +51,25 @@ const BaseNavBar = ({
|
|
|
51
51
|
),
|
|
52
52
|
testId: `${testId}-nav-item-${item.label.toLowerCase()}`,
|
|
53
53
|
"aria-current": isActive ? "page" : void 0,
|
|
54
|
-
children:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: classMap.linkContent,
|
|
58
|
+
style: { display: "flex", alignItems: "center" },
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
61
|
+
"span",
|
|
62
|
+
{
|
|
63
|
+
className: classMap.icon,
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
"data-testid": `${testId}-nav-icon-${item.label.toLowerCase()}`,
|
|
66
|
+
children: item.icon
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: classMap.label, children: item.label })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
66
73
|
},
|
|
67
74
|
`${item.label}-${index}`
|
|
68
75
|
);
|
|
@@ -76,6 +83,7 @@ const classes = {
|
|
|
76
83
|
"item--active": "nav_active",
|
|
77
84
|
icon: "nav_icon_container",
|
|
78
85
|
label: "nav_label",
|
|
86
|
+
linkContent: "nav_link_container",
|
|
79
87
|
primary: "nav_primary",
|
|
80
88
|
secondary: "nav_secondary",
|
|
81
89
|
tertiary: "nav_tertiary",
|
|
@@ -117,4 +125,4 @@ const NavBar = (props) => {
|
|
|
117
125
|
);
|
|
118
126
|
};
|
|
119
127
|
exports.NavBar = NavBar;
|
|
120
|
-
//# sourceMappingURL=NavBar-
|
|
128
|
+
//# sourceMappingURL=NavBar-Dier3-3b.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavBar-Dier3-3b.cjs","sources":["../../src/components/NavBar/NavBarBase.tsx","../../src/components/NavBar/core/NavBar.tsx"],"sourcesContent":["import React, { JSX, useMemo } from \"react\";\r\nimport { NavBarProps } from \"./NavBar.types\";\r\nimport { combineClassNames } from \"../../utils/classNames\";\r\nimport { capitalize } from \"../../utils/capitalize\";\r\nimport {\r\n getDefaultRounding,\r\n getDefaultShadow,\r\n getDefaultTheme,\r\n} from \"../../config/boreal-style-config\";\r\n\r\nexport interface BaseNavBarProps extends NavBarProps {\r\n currentPath: string;\r\n LinkWrapper: (props: {\r\n href: string;\r\n children: React.ReactNode;\r\n className: string;\r\n isActive: boolean;\r\n testId: string;\r\n \"aria-current\"?: \"page\";\r\n }) => JSX.Element;\r\n classMap: Record<string, string>;\r\n}\r\n\r\nconst BaseNavBar: React.FC<BaseNavBarProps> = ({\r\n items,\r\n currentPath,\r\n LinkWrapper,\r\n classMap,\r\n theme = getDefaultTheme(),\r\n rounding = getDefaultRounding(),\r\n shadow = getDefaultShadow(),\r\n className,\r\n \"data-testid\": testId = \"nav-bar\",\r\n}) => {\r\n const wrapperClass = useMemo(\r\n () => combineClassNames(classMap.container, classMap[theme], className),\r\n [classMap, theme]\r\n );\r\n\r\n const itemClass = useMemo(\r\n () =>\r\n combineClassNames(\r\n classMap.item,\r\n shadow && classMap[`shadow${capitalize(shadow)}`],\r\n rounding && classMap[`round${capitalize(rounding)}`]\r\n ),\r\n [classMap, shadow, rounding]\r\n );\r\n\r\n return (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"Main navigation\"\r\n className={wrapperClass}\r\n data-testid={`${testId}-nav-bar`}\r\n >\r\n {items.map((item, index) => {\r\n const isActive = currentPath === item.path;\r\n\r\n console.log(\r\n \"Nav item className:\",\r\n combineClassNames(classMap.item, isActive && classMap.active)\r\n );\r\n\r\n return (\r\n <LinkWrapper\r\n key={`${item.label}-${index}`}\r\n href={item.path}\r\n isActive={isActive}\r\n className={combineClassNames(\r\n itemClass,\r\n isActive && classMap[\"item--active\"]\r\n )}\r\n testId={`${testId}-nav-item-${item.label.toLowerCase()}`}\r\n aria-current={isActive ? \"page\" : undefined}\r\n >\r\n <span\r\n className={classMap.linkContent}\r\n style={{ display: \"flex\", alignItems: \"center\" }}\r\n >\r\n <span\r\n className={classMap.icon}\r\n aria-hidden=\"true\"\r\n data-testid={`${testId}-nav-icon-${item.label.toLowerCase()}`}\r\n >\r\n {item.icon}\r\n </span>\r\n <span className={classMap.label}>{item.label}</span>\r\n </span>\r\n </LinkWrapper>\r\n );\r\n })}\r\n </nav>\r\n );\r\n};\r\n\r\nexport default BaseNavBar;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport BaseNavBar from \"../NavBarBase\";\r\nimport \"./NavBar.scss\";\r\nimport { NavBarProps } from \"../NavBar.types\";\r\n\r\nconst classes = {\r\n container: \"nav\",\r\n item: \"nav_item\",\r\n \"item--active\": \"nav_active\",\r\n icon: \"nav_icon_container\",\r\n label: \"nav_label\",\r\n linkContent: \"nav_link_container\",\r\n\r\n primary: \"nav_primary\",\r\n secondary: \"nav_secondary\",\r\n tertiary: \"nav_tertiary\",\r\n quaternary: \"nav_quaternary\",\r\n clear: \"nav_clear\",\r\n\r\n shadowNone: \"nav_shadow-None\",\r\n shadowLight: \"nav_shadow-Light\",\r\n shadowMedium: \"nav_shadow-Medium\",\r\n shadowStrong: \"nav_shadow-Strong\",\r\n shadowIntense: \"nav_shadow-Intense\",\r\n\r\n roundNone: \"nav_round-None\",\r\n roundSmall: \"nav_round-Small\",\r\n roundMedium: \"nav_round-Medium\",\r\n roundLarge: \"nav_round-Large\",\r\n roundFull: \"nav_round-Full\",\r\n};\r\n\r\nconst NavBar: React.FC<NavBarProps> = (props) => {\r\n const [pathname, setPathname] = useState(\"\");\r\n\r\n useEffect(() => {\r\n setPathname(window.location.pathname);\r\n }, []);\r\n\r\n return (\r\n <BaseNavBar\r\n {...props}\r\n currentPath={pathname}\r\n LinkWrapper={({ href, children, className, isActive, testId }) => (\r\n <a\r\n href={href}\r\n className={className}\r\n aria-current={isActive ? \"page\" : undefined}\r\n data-testid={testId}\r\n >\r\n {children}\r\n </a>\r\n )}\r\n classMap={classes}\r\n />\r\n );\r\n};\r\n\r\nexport default NavBar;\r\n"],"names":["getDefaultTheme","getDefaultRounding","getDefaultShadow","useMemo","combineClassNames","capitalize","jsx","jsxs","useState","useEffect"],"mappings":";;;;;;AAuBA,MAAM,aAAwC,CAAC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQA,kBAAAA,gBAAA;AAAA,EACR,WAAWC,kBAAAA,mBAAA;AAAA,EACX,SAASC,kBAAAA,iBAAA;AAAA,EACT;AAAA,EACA,eAAe,SAAS;AAC1B,MAAM;AACJ,QAAM,eAAeC,MAAAA;AAAAA,IACnB,MAAMC,WAAAA,kBAAkB,SAAS,WAAW,SAAS,KAAK,GAAG,SAAS;AAAA,IACtE,CAAC,UAAU,KAAK;AAAA,EAAA;AAGlB,QAAM,YAAYD,MAAAA;AAAAA,IAChB,MACEC,WAAAA;AAAAA,MACE,SAAS;AAAA,MACT,UAAU,SAAS,SAASC,WAAAA,WAAW,MAAM,CAAC,EAAE;AAAA,MAChD,YAAY,SAAS,QAAQA,WAAAA,WAAW,QAAQ,CAAC,EAAE;AAAA,IAAA;AAAA,IAEvD,CAAC,UAAU,QAAQ,QAAQ;AAAA,EAAA;AAG7B,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAW;AAAA,MACX,eAAa,GAAG,MAAM;AAAA,MAErB,UAAA,MAAM,IAAI,CAAC,MAAM,UAAU;AAC1B,cAAM,WAAW,gBAAgB,KAAK;AAEtC,gBAAQ;AAAA,UACN;AAAA,UACAF,WAAAA,kBAAkB,SAAS,MAAM,YAAY,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EA,MAAM,SAAgC,CAAC,UAAU;AAC/C,QAAM,CAAC,UAAU,WAAW,IAAIE,MAAAA,SAAS,EAAE;AAE3CC,QAAAA,UAAU,MAAM;AACd,gBAAY,OAAO,SAAS,QAAQ;AAAA,EACtC,GAAG,CAAA,CAAE;AAEL,SACEH,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAa;AAAA,MACb,aAAa,CAAC,EAAE,MAAM,UAAU,WAAW,UAAU,aACnDA,2BAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,gBAAc,WAAW,SAAS;AAAA,UAClC,eAAa;AAAA,UAEZ;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,UAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;;"}
|
|
@@ -39,7 +39,7 @@ const BaseNavBar = ({
|
|
|
39
39
|
"Nav item className:",
|
|
40
40
|
combineClassNames(classMap.item, isActive && classMap.active)
|
|
41
41
|
);
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
43
|
LinkWrapper,
|
|
44
44
|
{
|
|
45
45
|
href: item.path,
|
|
@@ -50,18 +50,25 @@ const BaseNavBar = ({
|
|
|
50
50
|
),
|
|
51
51
|
testId: `${testId}-nav-item-${item.label.toLowerCase()}`,
|
|
52
52
|
"aria-current": isActive ? "page" : void 0,
|
|
53
|
-
children:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
children: /* @__PURE__ */ jsxs(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: classMap.linkContent,
|
|
57
|
+
style: { display: "flex", alignItems: "center" },
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
className: classMap.icon,
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
"data-testid": `${testId}-nav-icon-${item.label.toLowerCase()}`,
|
|
65
|
+
children: item.icon
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: classMap.label, children: item.label })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
)
|
|
65
72
|
},
|
|
66
73
|
`${item.label}-${index}`
|
|
67
74
|
);
|
|
@@ -75,6 +82,7 @@ const classes = {
|
|
|
75
82
|
"item--active": "nav_active",
|
|
76
83
|
icon: "nav_icon_container",
|
|
77
84
|
label: "nav_label",
|
|
85
|
+
linkContent: "nav_link_container",
|
|
78
86
|
primary: "nav_primary",
|
|
79
87
|
secondary: "nav_secondary",
|
|
80
88
|
tertiary: "nav_tertiary",
|
|
@@ -118,4 +126,4 @@ const NavBar = (props) => {
|
|
|
118
126
|
export {
|
|
119
127
|
NavBar as N
|
|
120
128
|
};
|
|
121
|
-
//# sourceMappingURL=NavBar-
|
|
129
|
+
//# sourceMappingURL=NavBar-UpeebUNC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavBar-UpeebUNC.js","sources":["../../src/components/NavBar/NavBarBase.tsx","../../src/components/NavBar/core/NavBar.tsx"],"sourcesContent":["import React, { JSX, useMemo } from \"react\";\r\nimport { NavBarProps } from \"./NavBar.types\";\r\nimport { combineClassNames } from \"../../utils/classNames\";\r\nimport { capitalize } from \"../../utils/capitalize\";\r\nimport {\r\n getDefaultRounding,\r\n getDefaultShadow,\r\n getDefaultTheme,\r\n} from \"../../config/boreal-style-config\";\r\n\r\nexport interface BaseNavBarProps extends NavBarProps {\r\n currentPath: string;\r\n LinkWrapper: (props: {\r\n href: string;\r\n children: React.ReactNode;\r\n className: string;\r\n isActive: boolean;\r\n testId: string;\r\n \"aria-current\"?: \"page\";\r\n }) => JSX.Element;\r\n classMap: Record<string, string>;\r\n}\r\n\r\nconst BaseNavBar: React.FC<BaseNavBarProps> = ({\r\n items,\r\n currentPath,\r\n LinkWrapper,\r\n classMap,\r\n theme = getDefaultTheme(),\r\n rounding = getDefaultRounding(),\r\n shadow = getDefaultShadow(),\r\n className,\r\n \"data-testid\": testId = \"nav-bar\",\r\n}) => {\r\n const wrapperClass = useMemo(\r\n () => combineClassNames(classMap.container, classMap[theme], className),\r\n [classMap, theme]\r\n );\r\n\r\n const itemClass = useMemo(\r\n () =>\r\n combineClassNames(\r\n classMap.item,\r\n shadow && classMap[`shadow${capitalize(shadow)}`],\r\n rounding && classMap[`round${capitalize(rounding)}`]\r\n ),\r\n [classMap, shadow, rounding]\r\n );\r\n\r\n return (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"Main navigation\"\r\n className={wrapperClass}\r\n data-testid={`${testId}-nav-bar`}\r\n >\r\n {items.map((item, index) => {\r\n const isActive = currentPath === item.path;\r\n\r\n console.log(\r\n \"Nav item className:\",\r\n combineClassNames(classMap.item, isActive && classMap.active)\r\n );\r\n\r\n return (\r\n <LinkWrapper\r\n key={`${item.label}-${index}`}\r\n href={item.path}\r\n isActive={isActive}\r\n className={combineClassNames(\r\n itemClass,\r\n isActive && classMap[\"item--active\"]\r\n )}\r\n testId={`${testId}-nav-item-${item.label.toLowerCase()}`}\r\n aria-current={isActive ? \"page\" : undefined}\r\n >\r\n <span\r\n className={classMap.linkContent}\r\n style={{ display: \"flex\", alignItems: \"center\" }}\r\n >\r\n <span\r\n className={classMap.icon}\r\n aria-hidden=\"true\"\r\n data-testid={`${testId}-nav-icon-${item.label.toLowerCase()}`}\r\n >\r\n {item.icon}\r\n </span>\r\n <span className={classMap.label}>{item.label}</span>\r\n </span>\r\n </LinkWrapper>\r\n );\r\n })}\r\n </nav>\r\n );\r\n};\r\n\r\nexport default BaseNavBar;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport BaseNavBar from \"../NavBarBase\";\r\nimport \"./NavBar.scss\";\r\nimport { NavBarProps } from \"../NavBar.types\";\r\n\r\nconst classes = {\r\n container: \"nav\",\r\n item: \"nav_item\",\r\n \"item--active\": \"nav_active\",\r\n icon: \"nav_icon_container\",\r\n label: \"nav_label\",\r\n linkContent: \"nav_link_container\",\r\n\r\n primary: \"nav_primary\",\r\n secondary: \"nav_secondary\",\r\n tertiary: \"nav_tertiary\",\r\n quaternary: \"nav_quaternary\",\r\n clear: \"nav_clear\",\r\n\r\n shadowNone: \"nav_shadow-None\",\r\n shadowLight: \"nav_shadow-Light\",\r\n shadowMedium: \"nav_shadow-Medium\",\r\n shadowStrong: \"nav_shadow-Strong\",\r\n shadowIntense: \"nav_shadow-Intense\",\r\n\r\n roundNone: \"nav_round-None\",\r\n roundSmall: \"nav_round-Small\",\r\n roundMedium: \"nav_round-Medium\",\r\n roundLarge: \"nav_round-Large\",\r\n roundFull: \"nav_round-Full\",\r\n};\r\n\r\nconst NavBar: React.FC<NavBarProps> = (props) => {\r\n const [pathname, setPathname] = useState(\"\");\r\n\r\n useEffect(() => {\r\n setPathname(window.location.pathname);\r\n }, []);\r\n\r\n return (\r\n <BaseNavBar\r\n {...props}\r\n currentPath={pathname}\r\n LinkWrapper={({ href, children, className, isActive, testId }) => (\r\n <a\r\n href={href}\r\n className={className}\r\n aria-current={isActive ? \"page\" : undefined}\r\n data-testid={testId}\r\n >\r\n {children}\r\n </a>\r\n )}\r\n classMap={classes}\r\n />\r\n );\r\n};\r\n\r\nexport default NavBar;\r\n"],"names":[],"mappings":";;;;;AAuBA,MAAM,aAAwC,CAAC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ,gBAAA;AAAA,EACR,WAAW,mBAAA;AAAA,EACX,SAAS,iBAAA;AAAA,EACT;AAAA,EACA,eAAe,SAAS;AAC1B,MAAM;AACJ,QAAM,eAAe;AAAA,IACnB,MAAM,kBAAkB,SAAS,WAAW,SAAS,KAAK,GAAG,SAAS;AAAA,IACtE,CAAC,UAAU,KAAK;AA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AAAA,QAAA;AAAA,MAyBjC,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP;ACzFA,MAAM,UAAU;AAAA,EACd,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,EAEb,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EAEP,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EAEf,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,MAAM,SAAgC,CAAC,UAAU;AAC/C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,YAAU,MAAM;AACd,gBAAY,OAAO,SAAS,QAAQ;AAAA,EACtC,GAAG,CAAA,CAAE;AAEL,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAa;AAAA,MACb,aAAa,CAAC,EAAE,MAAM,UAAU,WAAW,UAAU,aACnD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,gBAAc,WAAW,SAAS;AAAA,UAClC,eAAa;AAAA,UAEZ;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,UAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
|
package/dist/core/NavBar.cjs.js
CHANGED
package/dist/core/NavBar.js
CHANGED
package/dist/core/index.cjs.js
CHANGED
|
@@ -36,7 +36,7 @@ const Spinner = require("./Spinner-BTmQ7ZN9.cjs");
|
|
|
36
36
|
const Tooltip = require("./Tooltip-5SfsTZvz.cjs");
|
|
37
37
|
const MessagePopUp = require("./MessagePopUp-BUS6ICem.cjs");
|
|
38
38
|
const PopOver = require("./PopOver-BdZXa2hs.cjs");
|
|
39
|
-
const NavBar = require("./NavBar-
|
|
39
|
+
const NavBar = require("./NavBar-Dier3-3b.cjs");
|
|
40
40
|
const Breadcrumbs = require("./Breadcrumbs-xmUgcTXF.cjs");
|
|
41
41
|
const Tabs = require("./Tabs-DptKFvPK.cjs");
|
|
42
42
|
const Stepper = require("./Stepper-BkmPckKd.cjs");
|
package/dist/core/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import { S as S5 } from "./Spinner-DGF0pR7I.js";
|
|
|
35
35
|
import { T as T5 } from "./Tooltip-XfsZnGgV.js";
|
|
36
36
|
import { M as M2 } from "./MessagePopUp-CC7r9RHN.js";
|
|
37
37
|
import { P as P2 } from "./PopOver-C6AnRNop.js";
|
|
38
|
-
import { N } from "./NavBar-
|
|
38
|
+
import { N } from "./NavBar-UpeebUNC.js";
|
|
39
39
|
import { B as B3 } from "./Breadcrumbs-DhioJUB9.js";
|
|
40
40
|
import { T as T6 } from "./Tabs-gpyaJFUs.js";
|
|
41
41
|
import { S as S6 } from "./Stepper-PjUFCUBG.js";
|
package/dist/core/style.css
CHANGED
|
@@ -19040,6 +19040,10 @@ a:hover {
|
|
|
19040
19040
|
padding: 5px;
|
|
19041
19041
|
}
|
|
19042
19042
|
}
|
|
19043
|
+
.nav_link_container {
|
|
19044
|
+
display: flex;
|
|
19045
|
+
flex-direction: column;
|
|
19046
|
+
}
|
|
19043
19047
|
.nav_icon_container {
|
|
19044
19048
|
display: flex;
|
|
19045
19049
|
align-items: center;
|
|
@@ -41,7 +41,7 @@ const BaseNavBar = ({
|
|
|
41
41
|
"Nav item className:",
|
|
42
42
|
combineClassNames(classMap.item, isActive && classMap.active)
|
|
43
43
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
45
|
LinkWrapper,
|
|
46
46
|
{
|
|
47
47
|
href: item2.path,
|
|
@@ -52,18 +52,25 @@ const BaseNavBar = ({
|
|
|
52
52
|
),
|
|
53
53
|
testId: `${testId}-nav-item-${item2.label.toLowerCase()}`,
|
|
54
54
|
"aria-current": isActive ? "page" : void 0,
|
|
55
|
-
children:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
children: /* @__PURE__ */ jsxs(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
className: classMap.linkContent,
|
|
59
|
+
style: { display: "flex", alignItems: "center" },
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: classMap.icon,
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
"data-testid": `${testId}-nav-icon-${item2.label.toLowerCase()}`,
|
|
67
|
+
children: item2.icon
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: classMap.label, children: item2.label })
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
67
74
|
},
|
|
68
75
|
`${item2.label}-${index}`
|
|
69
76
|
);
|
|
@@ -71,32 +78,33 @@ const BaseNavBar = ({
|
|
|
71
78
|
}
|
|
72
79
|
);
|
|
73
80
|
};
|
|
74
|
-
const noScroll = "
|
|
75
|
-
const errorMessage = "
|
|
76
|
-
const loadingContainer = "
|
|
77
|
-
const hideScrollbar = "
|
|
78
|
-
const sr_only = "
|
|
79
|
-
const container = "
|
|
80
|
-
const primary = "
|
|
81
|
-
const item = "
|
|
82
|
-
const secondary = "
|
|
83
|
-
const tertiary = "
|
|
84
|
-
const quaternary = "
|
|
85
|
-
const clear = "
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const
|
|
81
|
+
const noScroll = "_noScroll_ilff1_91";
|
|
82
|
+
const errorMessage = "_errorMessage_ilff1_92";
|
|
83
|
+
const loadingContainer = "_loadingContainer_ilff1_93";
|
|
84
|
+
const hideScrollbar = "_hideScrollbar_ilff1_85";
|
|
85
|
+
const sr_only = "_sr_only_ilff1_94";
|
|
86
|
+
const container = "_container_ilff1_539";
|
|
87
|
+
const primary = "_primary_ilff1_566";
|
|
88
|
+
const item = "_item_ilff1_566";
|
|
89
|
+
const secondary = "_secondary_ilff1_578";
|
|
90
|
+
const tertiary = "_tertiary_ilff1_590";
|
|
91
|
+
const quaternary = "_quaternary_ilff1_602";
|
|
92
|
+
const clear = "_clear_ilff1_614";
|
|
93
|
+
const linkContent = "_linkContent_ilff1_646";
|
|
94
|
+
const icon = "_icon_ilff1_650";
|
|
95
|
+
const label = "_label_ilff1_661";
|
|
96
|
+
const roundNone = "_roundNone_ilff1_673";
|
|
97
|
+
const roundSmall = "_roundSmall_ilff1_677";
|
|
98
|
+
const roundMedium = "_roundMedium_ilff1_681";
|
|
99
|
+
const roundLarge = "_roundLarge_ilff1_685";
|
|
100
|
+
const roundFull = "_roundFull_ilff1_689";
|
|
101
|
+
const shadowNone = "_shadowNone_ilff1_693";
|
|
102
|
+
const shadowLight = "_shadowLight_ilff1_697";
|
|
103
|
+
const shadowMedium = "_shadowMedium_ilff1_701";
|
|
104
|
+
const shadowStrong = "_shadowStrong_ilff1_705";
|
|
105
|
+
const shadowIntense = "_shadowIntense_ilff1_709";
|
|
106
|
+
const spin = "_spin_ilff1_1";
|
|
107
|
+
const pulse = "_pulse_ilff1_1";
|
|
100
108
|
const styles = {
|
|
101
109
|
noScroll,
|
|
102
110
|
errorMessage,
|
|
@@ -106,11 +114,12 @@ const styles = {
|
|
|
106
114
|
container,
|
|
107
115
|
primary,
|
|
108
116
|
item,
|
|
109
|
-
"item--active": "_item--
|
|
117
|
+
"item--active": "_item--active_ilff1_573",
|
|
110
118
|
secondary,
|
|
111
119
|
tertiary,
|
|
112
120
|
quaternary,
|
|
113
121
|
clear,
|
|
122
|
+
linkContent,
|
|
114
123
|
icon,
|
|
115
124
|
label,
|
|
116
125
|
roundNone,
|
|
@@ -123,15 +132,15 @@ const styles = {
|
|
|
123
132
|
shadowMedium,
|
|
124
133
|
shadowStrong,
|
|
125
134
|
shadowIntense,
|
|
126
|
-
"fade-in": "_fade-
|
|
127
|
-
"slide-up": "_slide-
|
|
128
|
-
"spin-3d": "_spin-
|
|
135
|
+
"fade-in": "_fade-in_ilff1_1",
|
|
136
|
+
"slide-up": "_slide-up_ilff1_1",
|
|
137
|
+
"spin-3d": "_spin-3d_ilff1_1",
|
|
129
138
|
spin,
|
|
130
139
|
pulse,
|
|
131
|
-
"fade-in-up": "_fade-in-
|
|
132
|
-
"progress-grow": "_progress-
|
|
133
|
-
"indeterminate-move": "_indeterminate-
|
|
134
|
-
"skeleton-loading": "_skeleton-
|
|
140
|
+
"fade-in-up": "_fade-in-up_ilff1_1",
|
|
141
|
+
"progress-grow": "_progress-grow_ilff1_1",
|
|
142
|
+
"indeterminate-move": "_indeterminate-move_ilff1_1",
|
|
143
|
+
"skeleton-loading": "_skeleton-loading_ilff1_1"
|
|
135
144
|
};
|
|
136
145
|
const NavBar = ({
|
|
137
146
|
mockPath,
|
|
@@ -151,7 +160,6 @@ const NavBar = ({
|
|
|
151
160
|
className,
|
|
152
161
|
"aria-current": isActive ? "page" : void 0,
|
|
153
162
|
"data-testid": testId,
|
|
154
|
-
legacyBehavior: true,
|
|
155
163
|
children
|
|
156
164
|
}
|
|
157
165
|
),
|
|
@@ -162,4 +170,4 @@ const NavBar = ({
|
|
|
162
170
|
export {
|
|
163
171
|
NavBar as N
|
|
164
172
|
};
|
|
165
|
-
//# sourceMappingURL=NavBar-
|
|
173
|
+
//# sourceMappingURL=NavBar-CKo-nom2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavBar-CKo-nom2.js","sources":["../../src/components/NavBar/NavBarBase.tsx","../../src/components/NavBar/next/NavBar.tsx"],"sourcesContent":["import React, { JSX, useMemo } from \"react\";\r\nimport { NavBarProps } from \"./NavBar.types\";\r\nimport { combineClassNames } from \"../../utils/classNames\";\r\nimport { capitalize } from \"../../utils/capitalize\";\r\nimport {\r\n getDefaultRounding,\r\n getDefaultShadow,\r\n getDefaultTheme,\r\n} from \"../../config/boreal-style-config\";\r\n\r\nexport interface BaseNavBarProps extends NavBarProps {\r\n currentPath: string;\r\n LinkWrapper: (props: {\r\n href: string;\r\n children: React.ReactNode;\r\n className: string;\r\n isActive: boolean;\r\n testId: string;\r\n \"aria-current\"?: \"page\";\r\n }) => JSX.Element;\r\n classMap: Record<string, string>;\r\n}\r\n\r\nconst BaseNavBar: React.FC<BaseNavBarProps> = ({\r\n items,\r\n currentPath,\r\n LinkWrapper,\r\n classMap,\r\n theme = getDefaultTheme(),\r\n rounding = getDefaultRounding(),\r\n shadow = getDefaultShadow(),\r\n className,\r\n \"data-testid\": testId = \"nav-bar\",\r\n}) => {\r\n const wrapperClass = useMemo(\r\n () => combineClassNames(classMap.container, classMap[theme], className),\r\n [classMap, theme]\r\n );\r\n\r\n const itemClass = useMemo(\r\n () =>\r\n combineClassNames(\r\n classMap.item,\r\n shadow && classMap[`shadow${capitalize(shadow)}`],\r\n rounding && classMap[`round${capitalize(rounding)}`]\r\n ),\r\n [classMap, shadow, rounding]\r\n );\r\n\r\n return (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"Main navigation\"\r\n className={wrapperClass}\r\n data-testid={`${testId}-nav-bar`}\r\n >\r\n {items.map((item, index) => {\r\n const isActive = currentPath === item.path;\r\n\r\n console.log(\r\n \"Nav item className:\",\r\n combineClassNames(classMap.item, isActive && classMap.active)\r\n );\r\n\r\n return (\r\n <LinkWrapper\r\n key={`${item.label}-${index}`}\r\n href={item.path}\r\n isActive={isActive}\r\n className={combineClassNames(\r\n itemClass,\r\n isActive && classMap[\"item--active\"]\r\n )}\r\n testId={`${testId}-nav-item-${item.label.toLowerCase()}`}\r\n aria-current={isActive ? \"page\" : undefined}\r\n >\r\n <span\r\n className={classMap.linkContent}\r\n style={{ display: \"flex\", alignItems: \"center\" }}\r\n >\r\n <span\r\n className={classMap.icon}\r\n aria-hidden=\"true\"\r\n data-testid={`${testId}-nav-icon-${item.label.toLowerCase()}`}\r\n >\r\n {item.icon}\r\n </span>\r\n <span className={classMap.label}>{item.label}</span>\r\n </span>\r\n </LinkWrapper>\r\n );\r\n })}\r\n </nav>\r\n );\r\n};\r\n\r\nexport default BaseNavBar;\r\n","\"use client\";\r\n\r\nimport React from \"react\";\r\nimport BaseNavBar from \"../NavBarBase\";\r\nimport Link from \"next/link\";\r\nimport { usePathname } from \"next/navigation\";\r\nimport styles from \"./NavBar.module.scss\";\r\nimport { NavBarProps } from \"../NavBar.types\";\r\n\r\nconst NavBar: React.FC<NavBarProps & { mockPath?: string }> = ({\r\n mockPath,\r\n ...props\r\n}) => {\r\n const pathname = usePathname();\r\n const resolvedPath = mockPath ?? pathname;\r\n\r\n return (\r\n <BaseNavBar\r\n {...props}\r\n currentPath={resolvedPath || \"/\"}\r\n LinkWrapper={({ href, children, className, isActive, testId }) => (\r\n <Link\r\n href={href}\r\n className={className}\r\n aria-current={isActive ? \"page\" : undefined}\r\n data-testid={testId}\r\n >\r\n {children}\r\n </Link>\r\n )}\r\n classMap={styles}\r\n />\r\n );\r\n};\r\n\r\nexport default NavBar;\r\n"],"names":["item","usePathname"],"mappings":";;;;;;;AAuBA,MAAM,aAAwC,CAAC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ,gBAAA;AAAA,EACR,WAAW,mBAAA;AAAA,EACX,SAAS,iBAAA;AAAA,EACT;AAAA,EACA,eAAe,SAAS;AAC1B,MAAM;AACJ,QAAM,eAAe;AAAA,IACnB,MAAM,kBAAkB,SAAS,WAAW,SAAS,KAAK,GAAG,SAAS;AAAA,IACtE,CAAC,UAA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,KAAK,IAAI,KAAK;AAAA,QAAA;AAAA,MAyBjC,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrFA,MAAM,SAAwD,CAAC;AAAA,EAC7D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,WAAWC,WAAAA,YAAA;AACjB,QAAM,eAAe,YAAY;AAEjC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAa,gBAAgB;AAAA,MAC7B,aAAa,CAAC,EAAE,MAAM,UAAU,WAAW,UAAU,aACnD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,gBAAc,WAAW,SAAS;AAAA,UAClC,eAAa;AAAA,UAEZ;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,UAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
|
|
@@ -42,7 +42,7 @@ const BaseNavBar = ({
|
|
|
42
42
|
"Nav item className:",
|
|
43
43
|
classNames.combineClassNames(classMap.item, isActive && classMap.active)
|
|
44
44
|
);
|
|
45
|
-
return /* @__PURE__ */ require$$2.
|
|
45
|
+
return /* @__PURE__ */ require$$2.jsx(
|
|
46
46
|
LinkWrapper,
|
|
47
47
|
{
|
|
48
48
|
href: item2.path,
|
|
@@ -53,18 +53,25 @@ const BaseNavBar = ({
|
|
|
53
53
|
),
|
|
54
54
|
testId: `${testId}-nav-item-${item2.label.toLowerCase()}`,
|
|
55
55
|
"aria-current": isActive ? "page" : void 0,
|
|
56
|
-
children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
children: /* @__PURE__ */ require$$2.jsxs(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
className: classMap.linkContent,
|
|
60
|
+
style: { display: "flex", alignItems: "center" },
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ require$$2.jsx(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
className: classMap.icon,
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
"data-testid": `${testId}-nav-icon-${item2.label.toLowerCase()}`,
|
|
68
|
+
children: item2.icon
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ require$$2.jsx("span", { className: classMap.label, children: item2.label })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
)
|
|
68
75
|
},
|
|
69
76
|
`${item2.label}-${index}`
|
|
70
77
|
);
|
|
@@ -72,32 +79,33 @@ const BaseNavBar = ({
|
|
|
72
79
|
}
|
|
73
80
|
);
|
|
74
81
|
};
|
|
75
|
-
const noScroll = "
|
|
76
|
-
const errorMessage = "
|
|
77
|
-
const loadingContainer = "
|
|
78
|
-
const hideScrollbar = "
|
|
79
|
-
const sr_only = "
|
|
80
|
-
const container = "
|
|
81
|
-
const primary = "
|
|
82
|
-
const item = "
|
|
83
|
-
const secondary = "
|
|
84
|
-
const tertiary = "
|
|
85
|
-
const quaternary = "
|
|
86
|
-
const clear = "
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
const
|
|
82
|
+
const noScroll = "_noScroll_ilff1_91";
|
|
83
|
+
const errorMessage = "_errorMessage_ilff1_92";
|
|
84
|
+
const loadingContainer = "_loadingContainer_ilff1_93";
|
|
85
|
+
const hideScrollbar = "_hideScrollbar_ilff1_85";
|
|
86
|
+
const sr_only = "_sr_only_ilff1_94";
|
|
87
|
+
const container = "_container_ilff1_539";
|
|
88
|
+
const primary = "_primary_ilff1_566";
|
|
89
|
+
const item = "_item_ilff1_566";
|
|
90
|
+
const secondary = "_secondary_ilff1_578";
|
|
91
|
+
const tertiary = "_tertiary_ilff1_590";
|
|
92
|
+
const quaternary = "_quaternary_ilff1_602";
|
|
93
|
+
const clear = "_clear_ilff1_614";
|
|
94
|
+
const linkContent = "_linkContent_ilff1_646";
|
|
95
|
+
const icon = "_icon_ilff1_650";
|
|
96
|
+
const label = "_label_ilff1_661";
|
|
97
|
+
const roundNone = "_roundNone_ilff1_673";
|
|
98
|
+
const roundSmall = "_roundSmall_ilff1_677";
|
|
99
|
+
const roundMedium = "_roundMedium_ilff1_681";
|
|
100
|
+
const roundLarge = "_roundLarge_ilff1_685";
|
|
101
|
+
const roundFull = "_roundFull_ilff1_689";
|
|
102
|
+
const shadowNone = "_shadowNone_ilff1_693";
|
|
103
|
+
const shadowLight = "_shadowLight_ilff1_697";
|
|
104
|
+
const shadowMedium = "_shadowMedium_ilff1_701";
|
|
105
|
+
const shadowStrong = "_shadowStrong_ilff1_705";
|
|
106
|
+
const shadowIntense = "_shadowIntense_ilff1_709";
|
|
107
|
+
const spin = "_spin_ilff1_1";
|
|
108
|
+
const pulse = "_pulse_ilff1_1";
|
|
101
109
|
const styles = {
|
|
102
110
|
noScroll,
|
|
103
111
|
errorMessage,
|
|
@@ -107,11 +115,12 @@ const styles = {
|
|
|
107
115
|
container,
|
|
108
116
|
primary,
|
|
109
117
|
item,
|
|
110
|
-
"item--active": "_item--
|
|
118
|
+
"item--active": "_item--active_ilff1_573",
|
|
111
119
|
secondary,
|
|
112
120
|
tertiary,
|
|
113
121
|
quaternary,
|
|
114
122
|
clear,
|
|
123
|
+
linkContent,
|
|
115
124
|
icon,
|
|
116
125
|
label,
|
|
117
126
|
roundNone,
|
|
@@ -124,15 +133,15 @@ const styles = {
|
|
|
124
133
|
shadowMedium,
|
|
125
134
|
shadowStrong,
|
|
126
135
|
shadowIntense,
|
|
127
|
-
"fade-in": "_fade-
|
|
128
|
-
"slide-up": "_slide-
|
|
129
|
-
"spin-3d": "_spin-
|
|
136
|
+
"fade-in": "_fade-in_ilff1_1",
|
|
137
|
+
"slide-up": "_slide-up_ilff1_1",
|
|
138
|
+
"spin-3d": "_spin-3d_ilff1_1",
|
|
130
139
|
spin,
|
|
131
140
|
pulse,
|
|
132
|
-
"fade-in-up": "_fade-in-
|
|
133
|
-
"progress-grow": "_progress-
|
|
134
|
-
"indeterminate-move": "_indeterminate-
|
|
135
|
-
"skeleton-loading": "_skeleton-
|
|
141
|
+
"fade-in-up": "_fade-in-up_ilff1_1",
|
|
142
|
+
"progress-grow": "_progress-grow_ilff1_1",
|
|
143
|
+
"indeterminate-move": "_indeterminate-move_ilff1_1",
|
|
144
|
+
"skeleton-loading": "_skeleton-loading_ilff1_1"
|
|
136
145
|
};
|
|
137
146
|
const NavBar = ({
|
|
138
147
|
mockPath,
|
|
@@ -152,7 +161,6 @@ const NavBar = ({
|
|
|
152
161
|
className,
|
|
153
162
|
"aria-current": isActive ? "page" : void 0,
|
|
154
163
|
"data-testid": testId,
|
|
155
|
-
legacyBehavior: true,
|
|
156
164
|
children
|
|
157
165
|
}
|
|
158
166
|
),
|
|
@@ -161,4 +169,4 @@ const NavBar = ({
|
|
|
161
169
|
);
|
|
162
170
|
};
|
|
163
171
|
exports.NavBar = NavBar;
|
|
164
|
-
//# sourceMappingURL=NavBar-
|
|
172
|
+
//# sourceMappingURL=NavBar-CO4v6_28.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavBar-CO4v6_28.cjs","sources":["../../src/components/NavBar/NavBarBase.tsx","../../src/components/NavBar/next/NavBar.tsx"],"sourcesContent":["import React, { JSX, useMemo } from \"react\";\r\nimport { NavBarProps } from \"./NavBar.types\";\r\nimport { combineClassNames } from \"../../utils/classNames\";\r\nimport { capitalize } from \"../../utils/capitalize\";\r\nimport {\r\n getDefaultRounding,\r\n getDefaultShadow,\r\n getDefaultTheme,\r\n} from \"../../config/boreal-style-config\";\r\n\r\nexport interface BaseNavBarProps extends NavBarProps {\r\n currentPath: string;\r\n LinkWrapper: (props: {\r\n href: string;\r\n children: React.ReactNode;\r\n className: string;\r\n isActive: boolean;\r\n testId: string;\r\n \"aria-current\"?: \"page\";\r\n }) => JSX.Element;\r\n classMap: Record<string, string>;\r\n}\r\n\r\nconst BaseNavBar: React.FC<BaseNavBarProps> = ({\r\n items,\r\n currentPath,\r\n LinkWrapper,\r\n classMap,\r\n theme = getDefaultTheme(),\r\n rounding = getDefaultRounding(),\r\n shadow = getDefaultShadow(),\r\n className,\r\n \"data-testid\": testId = \"nav-bar\",\r\n}) => {\r\n const wrapperClass = useMemo(\r\n () => combineClassNames(classMap.container, classMap[theme], className),\r\n [classMap, theme]\r\n );\r\n\r\n const itemClass = useMemo(\r\n () =>\r\n combineClassNames(\r\n classMap.item,\r\n shadow && classMap[`shadow${capitalize(shadow)}`],\r\n rounding && classMap[`round${capitalize(rounding)}`]\r\n ),\r\n [classMap, shadow, rounding]\r\n );\r\n\r\n return (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"Main navigation\"\r\n className={wrapperClass}\r\n data-testid={`${testId}-nav-bar`}\r\n >\r\n {items.map((item, index) => {\r\n const isActive = currentPath === item.path;\r\n\r\n console.log(\r\n \"Nav item className:\",\r\n combineClassNames(classMap.item, isActive && classMap.active)\r\n );\r\n\r\n return (\r\n <LinkWrapper\r\n key={`${item.label}-${index}`}\r\n href={item.path}\r\n isActive={isActive}\r\n className={combineClassNames(\r\n itemClass,\r\n isActive && classMap[\"item--active\"]\r\n )}\r\n testId={`${testId}-nav-item-${item.label.toLowerCase()}`}\r\n aria-current={isActive ? \"page\" : undefined}\r\n >\r\n <span\r\n className={classMap.linkContent}\r\n style={{ display: \"flex\", alignItems: \"center\" }}\r\n >\r\n <span\r\n className={classMap.icon}\r\n aria-hidden=\"true\"\r\n data-testid={`${testId}-nav-icon-${item.label.toLowerCase()}`}\r\n >\r\n {item.icon}\r\n </span>\r\n <span className={classMap.label}>{item.label}</span>\r\n </span>\r\n </LinkWrapper>\r\n );\r\n })}\r\n </nav>\r\n );\r\n};\r\n\r\nexport default BaseNavBar;\r\n","\"use client\";\r\n\r\nimport React from \"react\";\r\nimport BaseNavBar from \"../NavBarBase\";\r\nimport Link from \"next/link\";\r\nimport { usePathname } from \"next/navigation\";\r\nimport styles from \"./NavBar.module.scss\";\r\nimport { NavBarProps } from \"../NavBar.types\";\r\n\r\nconst NavBar: React.FC<NavBarProps & { mockPath?: string }> = ({\r\n mockPath,\r\n ...props\r\n}) => {\r\n const pathname = usePathname();\r\n const resolvedPath = mockPath ?? pathname;\r\n\r\n return (\r\n <BaseNavBar\r\n {...props}\r\n currentPath={resolvedPath || \"/\"}\r\n LinkWrapper={({ href, children, className, isActive, testId }) => (\r\n <Link\r\n href={href}\r\n className={className}\r\n aria-current={isActive ? \"page\" : undefined}\r\n data-testid={testId}\r\n >\r\n {children}\r\n </Link>\r\n )}\r\n classMap={styles}\r\n />\r\n );\r\n};\r\n\r\nexport default NavBar;\r\n"],"names":["getDefaultTheme","getDefaultRounding","getDefaultShadow","useMemo","combineClassNames","capitalize","jsx","item","jsxs","usePathname","Link"],"mappings":";;;;;;;;AAuBA,MAAM,aAAwC,CAAC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQA,kBAAAA,gBAAA;AAAA,EACR,WAAWC,kBAAAA,mBAAA;AAAA,EACX,SAASC,kBAAAA,iBAAA;AAAA,EACT;AAAA,EACA,eAAe,SAAS;AAC1B,MAAM;AACJ,QAAM,eAAeC,MAAAA;AAAAA,IACnB,MAAMC,WAAAA,kBAAkB,SAAS,WAAW,SAAS,KAAK,GAAG,SAAS;AAAA,IACtE,CAAC,UAAU,KAAK;AAAA,EAAA;AAGlB,QAAM,YAAYD,MAAAA;AAAAA,IAChB,MACEC,WAAAA;AAAAA,MACE,SAAS;AAAA,MACT,UAAU,SAAS,SAASC,WAAAA,W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A,MAyBjC,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrFA,MAAM,SAAwD,CAAC;AAAA,EAC7D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,WAAWE,WAAAA,WAAAA,YAAA;AACjB,QAAM,eAAe,YAAY;AAEjC,SACEH,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAa,gBAAgB;AAAA,MAC7B,aAAa,CAAC,EAAE,MAAM,UAAU,WAAW,UAAU,aACnDA,2BAAAA;AAAAA,QAACI,KAAAA;AAAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,gBAAc,WAAW,SAAS;AAAA,UAClC,eAAa;AAAA,UAEZ;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,UAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;;"}
|
package/dist/next/NavBar.cjs.js
CHANGED
package/dist/next/NavBar.js
CHANGED
package/dist/next/index.cjs.js
CHANGED
|
@@ -35,7 +35,7 @@ const Spinner = require("./Spinner-Duq63bbK.cjs");
|
|
|
35
35
|
const Tooltip = require("./Tooltip-CIR-uUPY.cjs");
|
|
36
36
|
const MessagePopUp = require("./MessagePopUp-CRXKWJcY.cjs");
|
|
37
37
|
const PopOver = require("./PopOver-D2x2a4Jw.cjs");
|
|
38
|
-
const NavBar = require("./NavBar-
|
|
38
|
+
const NavBar = require("./NavBar-CO4v6_28.cjs");
|
|
39
39
|
const Breadcrumbs = require("./Breadcrumbs-CEHoh3s2.cjs");
|
|
40
40
|
const Tabs = require("./Tabs-CEFKDLm1.cjs");
|
|
41
41
|
const Stepper = require("./Stepper-JSC7kNUK.cjs");
|
package/dist/next/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import { S as S5 } from "./Spinner-N0I3bKh8.js";
|
|
|
35
35
|
import { T as T5 } from "./Tooltip-BLzis3b9.js";
|
|
36
36
|
import { M as M2 } from "./MessagePopUp-r4RzD_hc.js";
|
|
37
37
|
import { P as P2 } from "./PopOver-CAUFP1-Y.js";
|
|
38
|
-
import { N } from "./NavBar-
|
|
38
|
+
import { N } from "./NavBar-CKo-nom2.js";
|
|
39
39
|
import { B as B3 } from "./Breadcrumbs-LfCnghHj.js";
|
|
40
40
|
import { T as T6 } from "./Tabs-Dk0OQfLb.js";
|
|
41
41
|
import { S as S6 } from "./Stepper-DPIt2hlL.js";
|