@hitachivantara/uikit-react-core 5.8.0 → 5.8.1
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/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs +2 -2
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js +2 -2
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
- package/package.json +2 -2
|
@@ -30,9 +30,9 @@ const HvVerticalNavigationSlider = ({
|
|
|
30
30
|
"aria-label": item.label,
|
|
31
31
|
"aria-current": selected === item.id ? item.href ? "page" : true : void 0,
|
|
32
32
|
selected: selected === item.id,
|
|
33
|
-
startAdornment: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33
|
+
startAdornment: item.icon ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34
34
|
children: item.icon
|
|
35
|
-
}),
|
|
35
|
+
}) : void 0,
|
|
36
36
|
endAdornment: item.data && item.data.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Button.HvButton, {
|
|
37
37
|
variant: "secondaryGhost",
|
|
38
38
|
icon: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSlider.cjs","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { clsx } from \"clsx\";\nimport {\n HvButton,\n HvListContainer,\n HvOverflowTooltip,\n NavigationData,\n} from \"@core/components\";\nimport { StyledListItem } from \"./NavigationSlider.styles\";\nimport verticalNavigationSliderClasses, {\n HvVerticalNavigationSliderClasses,\n} from \"./navigationSliderClasses\";\n\nexport interface HvVerticalNavigationSliderProps {\n /**\n * Id to be applied to the root node of the panel.\n */\n id?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationSliderClasses;\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon react element\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data?: NavigationData[];\n /**\n * The selected item id.\n */\n selected?: string;\n /**\n * Triggered when the item is clicked.\n */\n onNavigateToTarget?: (\n event: React.MouseEvent<HTMLLIElement>,\n item: NavigationData\n ) => void;\n /**\n * Triggered when the navigate to child button is clicked.\n */\n onNavigateToChild?: (\n event: React.MouseEvent<HTMLButtonElement>,\n item: NavigationData\n ) => void;\n}\n\nexport const HvVerticalNavigationSlider = ({\n id,\n classes,\n data,\n selected,\n onNavigateToTarget,\n onNavigateToChild,\n}: HvVerticalNavigationSliderProps) => {\n return (\n <HvListContainer interactive id={id}>\n {data &&\n data.map((item) => (\n <StyledListItem\n key={item.id}\n classes={{\n root: classes?.root,\n selected: clsx(\n classes?.listItemSelected,\n verticalNavigationSliderClasses.listItemSelected\n ),\n }}\n onClick={(event) => {\n onNavigateToTarget?.(event, item);\n }}\n aria-label={item.label}\n aria-current={\n selected === item.id ? (item.href ? \"page\" : true) : undefined\n }\n selected={selected === item.id}\n startAdornment={<div>{item.icon}</div>}\n endAdornment={\n item.data && item.data.length > 0 ? (\n <HvButton\n variant=\"secondaryGhost\"\n icon\n onClick={(event) => {\n onNavigateToChild?.(event, item);\n }}\n >\n <DropRightXS />\n </HvButton>\n ) : undefined\n }\n >\n <HvOverflowTooltip data={item.label} />\n </StyledListItem>\n ))}\n </HvListContainer>\n );\n};\n"],"names":["HvVerticalNavigationSlider","id","classes","data","selected","onNavigateToTarget","onNavigateToChild","HvListContainer","interactive","children","map","item","StyledListItem","root","clsx","listItemSelected","verticalNavigationSliderClasses","onClick","event","label","href","undefined","startAdornment","icon","endAdornment","length","HvButton","variant","
|
|
1
|
+
{"version":3,"file":"NavigationSlider.cjs","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { clsx } from \"clsx\";\nimport {\n HvButton,\n HvListContainer,\n HvOverflowTooltip,\n NavigationData,\n} from \"@core/components\";\nimport { StyledListItem } from \"./NavigationSlider.styles\";\nimport verticalNavigationSliderClasses, {\n HvVerticalNavigationSliderClasses,\n} from \"./navigationSliderClasses\";\n\nexport interface HvVerticalNavigationSliderProps {\n /**\n * Id to be applied to the root node of the panel.\n */\n id?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationSliderClasses;\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon react element\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data?: NavigationData[];\n /**\n * The selected item id.\n */\n selected?: string;\n /**\n * Triggered when the item is clicked.\n */\n onNavigateToTarget?: (\n event: React.MouseEvent<HTMLLIElement>,\n item: NavigationData\n ) => void;\n /**\n * Triggered when the navigate to child button is clicked.\n */\n onNavigateToChild?: (\n event: React.MouseEvent<HTMLButtonElement>,\n item: NavigationData\n ) => void;\n}\n\nexport const HvVerticalNavigationSlider = ({\n id,\n classes,\n data,\n selected,\n onNavigateToTarget,\n onNavigateToChild,\n}: HvVerticalNavigationSliderProps) => {\n return (\n <HvListContainer interactive id={id}>\n {data &&\n data.map((item) => (\n <StyledListItem\n key={item.id}\n classes={{\n root: classes?.root,\n selected: clsx(\n classes?.listItemSelected,\n verticalNavigationSliderClasses.listItemSelected\n ),\n }}\n onClick={(event) => {\n onNavigateToTarget?.(event, item);\n }}\n aria-label={item.label}\n aria-current={\n selected === item.id ? (item.href ? \"page\" : true) : undefined\n }\n selected={selected === item.id}\n startAdornment={item.icon ? <div>{item.icon}</div> : undefined}\n endAdornment={\n item.data && item.data.length > 0 ? (\n <HvButton\n variant=\"secondaryGhost\"\n icon\n onClick={(event) => {\n onNavigateToChild?.(event, item);\n }}\n >\n <DropRightXS />\n </HvButton>\n ) : undefined\n }\n >\n <HvOverflowTooltip data={item.label} />\n </StyledListItem>\n ))}\n </HvListContainer>\n );\n};\n"],"names":["HvVerticalNavigationSlider","id","classes","data","selected","onNavigateToTarget","onNavigateToChild","HvListContainer","interactive","children","map","item","StyledListItem","root","clsx","listItemSelected","verticalNavigationSliderClasses","onClick","event","label","href","undefined","startAdornment","icon","_jsx","endAdornment","length","HvButton","variant","DropRightXS","HvOverflowTooltip"],"mappings":";;;;;;;;;;AAqDO,MAAMA,6BAA6BA,CAAC;AAAA,EACzCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAC+B,MAAM;AACrC,wCACGC,cAAAA,iBAAe;AAAA,IAACC,aAAW;AAAA,IAACP;AAAAA,IAAOQ,UACjCN,QACCA,KAAKO,IAAKC,CAAAA,wCACPC,wCAAc;AAAA,MAEbV,SAAS;AAAA,QACPW,MAAMX,mCAASW;AAAAA,QACfT,UAAUU,KAAAA,KACRZ,mCAASa,kBACTC,wBAAAA,QAAgCD,gBAAgB;AAAA,MAEpD;AAAA,MACAE,SAAUC,CAAU,UAAA;AAClBb,iEAAqBa,OAAOP;AAAAA,MAC9B;AAAA,MACA,cAAYA,KAAKQ;AAAAA,MACjB,gBACEf,aAAaO,KAAKV,KAAMU,KAAKS,OAAO,SAAS,OAAQC;AAAAA,MAEvDjB,UAAUA,aAAaO,KAAKV;AAAAA,MAC5BqB,gBAAgBX,KAAKY,OAAOC,2BAAAA,IAAA,OAAA;AAAA,QAAAf,UAAME,KAAKY;AAAAA,MAAI,CAAA,IAAUF;AAAAA,MACrDI,cACEd,KAAKR,QAAQQ,KAAKR,KAAKuB,SAAS,mCAC7BC,iBAAQ;AAAA,QACPC,SAAQ;AAAA,QACRL,MAAI;AAAA,QACJN,SAAUC,CAAU,UAAA;AAClBZ,iEAAoBY,OAAOP;AAAAA,QAC7B;AAAA,QAAEF,UAEFe,2BAAAA,IAACK,gBAAW,aAAA,EAAA;AAAA,MAAG,CAAA,IAEfR;AAAAA,MACLZ,yCAEAqB,mCAAiB;AAAA,QAAC3B,MAAMQ,KAAKQ;AAAAA,MAAAA,CAAM;AAAA,IAAA,GA/B/BR,KAAKV,EAAE,CAiCf;AAAA,EAAA,CACa;AAEtB;;"}
|
|
@@ -28,9 +28,9 @@ const HvVerticalNavigationSlider = ({
|
|
|
28
28
|
"aria-label": item.label,
|
|
29
29
|
"aria-current": selected === item.id ? item.href ? "page" : true : void 0,
|
|
30
30
|
selected: selected === item.id,
|
|
31
|
-
startAdornment: /* @__PURE__ */ jsx("div", {
|
|
31
|
+
startAdornment: item.icon ? /* @__PURE__ */ jsx("div", {
|
|
32
32
|
children: item.icon
|
|
33
|
-
}),
|
|
33
|
+
}) : void 0,
|
|
34
34
|
endAdornment: item.data && item.data.length > 0 ? /* @__PURE__ */ jsx(HvButton, {
|
|
35
35
|
variant: "secondaryGhost",
|
|
36
36
|
icon: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSlider.js","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { clsx } from \"clsx\";\nimport {\n HvButton,\n HvListContainer,\n HvOverflowTooltip,\n NavigationData,\n} from \"@core/components\";\nimport { StyledListItem } from \"./NavigationSlider.styles\";\nimport verticalNavigationSliderClasses, {\n HvVerticalNavigationSliderClasses,\n} from \"./navigationSliderClasses\";\n\nexport interface HvVerticalNavigationSliderProps {\n /**\n * Id to be applied to the root node of the panel.\n */\n id?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationSliderClasses;\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon react element\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data?: NavigationData[];\n /**\n * The selected item id.\n */\n selected?: string;\n /**\n * Triggered when the item is clicked.\n */\n onNavigateToTarget?: (\n event: React.MouseEvent<HTMLLIElement>,\n item: NavigationData\n ) => void;\n /**\n * Triggered when the navigate to child button is clicked.\n */\n onNavigateToChild?: (\n event: React.MouseEvent<HTMLButtonElement>,\n item: NavigationData\n ) => void;\n}\n\nexport const HvVerticalNavigationSlider = ({\n id,\n classes,\n data,\n selected,\n onNavigateToTarget,\n onNavigateToChild,\n}: HvVerticalNavigationSliderProps) => {\n return (\n <HvListContainer interactive id={id}>\n {data &&\n data.map((item) => (\n <StyledListItem\n key={item.id}\n classes={{\n root: classes?.root,\n selected: clsx(\n classes?.listItemSelected,\n verticalNavigationSliderClasses.listItemSelected\n ),\n }}\n onClick={(event) => {\n onNavigateToTarget?.(event, item);\n }}\n aria-label={item.label}\n aria-current={\n selected === item.id ? (item.href ? \"page\" : true) : undefined\n }\n selected={selected === item.id}\n startAdornment={<div>{item.icon}</div>}\n endAdornment={\n item.data && item.data.length > 0 ? (\n <HvButton\n variant=\"secondaryGhost\"\n icon\n onClick={(event) => {\n onNavigateToChild?.(event, item);\n }}\n >\n <DropRightXS />\n </HvButton>\n ) : undefined\n }\n >\n <HvOverflowTooltip data={item.label} />\n </StyledListItem>\n ))}\n </HvListContainer>\n );\n};\n"],"names":["HvVerticalNavigationSlider","id","classes","data","selected","onNavigateToTarget","onNavigateToChild","HvListContainer","interactive","children","map","item","StyledListItem","root","clsx","listItemSelected","verticalNavigationSliderClasses","onClick","event","label","href","undefined","startAdornment","icon","endAdornment","length","HvButton","variant","
|
|
1
|
+
{"version":3,"file":"NavigationSlider.js","sources":["../../../../../src/components/VerticalNavigation/NavigationSlider/NavigationSlider.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { clsx } from \"clsx\";\nimport {\n HvButton,\n HvListContainer,\n HvOverflowTooltip,\n NavigationData,\n} from \"@core/components\";\nimport { StyledListItem } from \"./NavigationSlider.styles\";\nimport verticalNavigationSliderClasses, {\n HvVerticalNavigationSliderClasses,\n} from \"./navigationSliderClasses\";\n\nexport interface HvVerticalNavigationSliderProps {\n /**\n * Id to be applied to the root node of the panel.\n */\n id?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationSliderClasses;\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon react element\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data?: NavigationData[];\n /**\n * The selected item id.\n */\n selected?: string;\n /**\n * Triggered when the item is clicked.\n */\n onNavigateToTarget?: (\n event: React.MouseEvent<HTMLLIElement>,\n item: NavigationData\n ) => void;\n /**\n * Triggered when the navigate to child button is clicked.\n */\n onNavigateToChild?: (\n event: React.MouseEvent<HTMLButtonElement>,\n item: NavigationData\n ) => void;\n}\n\nexport const HvVerticalNavigationSlider = ({\n id,\n classes,\n data,\n selected,\n onNavigateToTarget,\n onNavigateToChild,\n}: HvVerticalNavigationSliderProps) => {\n return (\n <HvListContainer interactive id={id}>\n {data &&\n data.map((item) => (\n <StyledListItem\n key={item.id}\n classes={{\n root: classes?.root,\n selected: clsx(\n classes?.listItemSelected,\n verticalNavigationSliderClasses.listItemSelected\n ),\n }}\n onClick={(event) => {\n onNavigateToTarget?.(event, item);\n }}\n aria-label={item.label}\n aria-current={\n selected === item.id ? (item.href ? \"page\" : true) : undefined\n }\n selected={selected === item.id}\n startAdornment={item.icon ? <div>{item.icon}</div> : undefined}\n endAdornment={\n item.data && item.data.length > 0 ? (\n <HvButton\n variant=\"secondaryGhost\"\n icon\n onClick={(event) => {\n onNavigateToChild?.(event, item);\n }}\n >\n <DropRightXS />\n </HvButton>\n ) : undefined\n }\n >\n <HvOverflowTooltip data={item.label} />\n </StyledListItem>\n ))}\n </HvListContainer>\n );\n};\n"],"names":["HvVerticalNavigationSlider","id","classes","data","selected","onNavigateToTarget","onNavigateToChild","HvListContainer","interactive","children","map","item","StyledListItem","root","clsx","listItemSelected","verticalNavigationSliderClasses","onClick","event","label","href","undefined","startAdornment","icon","_jsx","endAdornment","length","HvButton","variant","DropRightXS","HvOverflowTooltip"],"mappings":";;;;;;;;AAqDO,MAAMA,6BAA6BA,CAAC;AAAA,EACzCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAC+B,MAAM;AACrC,6BACGC,iBAAe;AAAA,IAACC,aAAW;AAAA,IAACP;AAAAA,IAAOQ,UACjCN,QACCA,KAAKO,IAAKC,CAAAA,6BACPC,gBAAc;AAAA,MAEbV,SAAS;AAAA,QACPW,MAAMX,mCAASW;AAAAA,QACfT,UAAUU,KACRZ,mCAASa,kBACTC,gCAAgCD,gBAAgB;AAAA,MAEpD;AAAA,MACAE,SAAUC,CAAU,UAAA;AAClBb,iEAAqBa,OAAOP;AAAAA,MAC9B;AAAA,MACA,cAAYA,KAAKQ;AAAAA,MACjB,gBACEf,aAAaO,KAAKV,KAAMU,KAAKS,OAAO,SAAS,OAAQC;AAAAA,MAEvDjB,UAAUA,aAAaO,KAAKV;AAAAA,MAC5BqB,gBAAgBX,KAAKY,OAAOC,oBAAA,OAAA;AAAA,QAAAf,UAAME,KAAKY;AAAAA,MAAI,CAAA,IAAUF;AAAAA,MACrDI,cACEd,KAAKR,QAAQQ,KAAKR,KAAKuB,SAAS,wBAC7BC,UAAQ;AAAA,QACPC,SAAQ;AAAA,QACRL,MAAI;AAAA,QACJN,SAAUC,CAAU,UAAA;AAClBZ,iEAAoBY,OAAOP;AAAAA,QAC7B;AAAA,QAAEF,UAEFe,oBAACK,aAAW,EAAA;AAAA,MAAG,CAAA,IAEfR;AAAAA,MACLZ,8BAEAqB,mBAAiB;AAAA,QAAC3B,MAAMQ,KAAKQ;AAAAA,MAAAA,CAAM;AAAA,IAAA,GA/B/BR,KAAKV,EAAE,CAiCf;AAAA,EAAA,CACa;AAEtB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public",
|
|
59
59
|
"directory": "package"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "26926baeded1a7e543655d96170f985bad7c4cbe",
|
|
62
62
|
"main": "dist/cjs/index.cjs",
|
|
63
63
|
"exports": {
|
|
64
64
|
".": {
|