@hitachivantara/uikit-react-core 5.0.2 → 5.1.0

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.
Files changed (110) hide show
  1. package/dist/cjs/components/Dropdown/dropdownClasses.cjs +1 -1
  2. package/dist/cjs/components/Dropdown/dropdownClasses.cjs.map +1 -1
  3. package/dist/cjs/components/Pagination/Pagination.cjs +1 -1
  4. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  5. package/dist/cjs/components/Slider/Slider.cjs +301 -0
  6. package/dist/cjs/components/Slider/Slider.cjs.map +1 -0
  7. package/dist/cjs/components/Slider/Slider.styles.cjs +334 -0
  8. package/dist/cjs/components/Slider/Slider.styles.cjs.map +1 -0
  9. package/dist/cjs/components/Slider/SliderInput/SliderInput.cjs +66 -0
  10. package/dist/cjs/components/Slider/SliderInput/SliderInput.cjs.map +1 -0
  11. package/dist/cjs/components/Slider/SliderInput/SliderInput.styles.cjs +55 -0
  12. package/dist/cjs/components/Slider/SliderInput/SliderInput.styles.cjs.map +1 -0
  13. package/dist/cjs/components/Slider/SliderInput/sliderInputClasses.cjs +8 -0
  14. package/dist/cjs/components/Slider/SliderInput/sliderInputClasses.cjs.map +1 -0
  15. package/dist/cjs/components/Slider/base.cjs +251 -0
  16. package/dist/cjs/components/Slider/base.cjs.map +1 -0
  17. package/dist/cjs/components/Slider/sliderClasses.cjs +8 -0
  18. package/dist/cjs/components/Slider/sliderClasses.cjs.map +1 -0
  19. package/dist/cjs/components/Slider/utils.cjs +217 -0
  20. package/dist/cjs/components/Slider/utils.cjs.map +1 -0
  21. package/dist/cjs/components/Table/TableBody/tableBodyClasses.cjs.map +1 -1
  22. package/dist/cjs/components/Table/TableCell/tableCellClasses.cjs.map +1 -1
  23. package/dist/cjs/components/Table/TableContainer/tableContainerClasses.cjs.map +1 -1
  24. package/dist/cjs/components/Table/TableHead/tableHeadClasses.cjs.map +1 -1
  25. package/dist/cjs/components/Table/TableHeader/tableHeaderClasses.cjs.map +1 -1
  26. package/dist/cjs/components/Table/TableRow/tableRowClasses.cjs.map +1 -1
  27. package/dist/cjs/components/Table/tableClasses.cjs.map +1 -1
  28. package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs +76 -17
  29. package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs.map +1 -1
  30. package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.styles.cjs +4 -1
  31. package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.styles.cjs.map +1 -1
  32. package/dist/cjs/components/VerticalNavigation/Navigation/navigationClasses.cjs +1 -1
  33. package/dist/cjs/components/VerticalNavigation/Navigation/navigationClasses.cjs.map +1 -1
  34. package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.cjs +58 -0
  35. package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.cjs.map +1 -0
  36. package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.cjs +16 -0
  37. package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.cjs.map +1 -0
  38. package/dist/cjs/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.cjs +41 -0
  39. package/dist/cjs/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.cjs.map +1 -0
  40. package/dist/cjs/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.styles.cjs +42 -0
  41. package/dist/cjs/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.styles.cjs.map +1 -0
  42. package/dist/cjs/components/VerticalNavigation/TreeView/TooltipWrapper/TooltipWrapper.cjs +24 -0
  43. package/dist/cjs/components/VerticalNavigation/TreeView/TooltipWrapper/TooltipWrapper.cjs.map +1 -0
  44. package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs +42 -44
  45. package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs.map +1 -1
  46. package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs +6 -2
  47. package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs.map +1 -1
  48. package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs +6 -4
  49. package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs.map +1 -1
  50. package/dist/cjs/components/VerticalNavigation/VerticalNavigationContext.cjs.map +1 -1
  51. package/dist/cjs/components/VerticalNavigation/utils/VerticalNavigation.utils.cjs +7 -0
  52. package/dist/cjs/components/VerticalNavigation/utils/VerticalNavigation.utils.cjs.map +1 -0
  53. package/dist/cjs/index.cjs +4 -0
  54. package/dist/cjs/index.cjs.map +1 -1
  55. package/dist/esm/components/Dropdown/dropdownClasses.js +1 -1
  56. package/dist/esm/components/Dropdown/dropdownClasses.js.map +1 -1
  57. package/dist/esm/components/Pagination/Pagination.js +1 -1
  58. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  59. package/dist/esm/components/Slider/Slider.js +299 -0
  60. package/dist/esm/components/Slider/Slider.js.map +1 -0
  61. package/dist/esm/components/Slider/Slider.styles.js +330 -0
  62. package/dist/esm/components/Slider/Slider.styles.js.map +1 -0
  63. package/dist/esm/components/Slider/SliderInput/SliderInput.js +64 -0
  64. package/dist/esm/components/Slider/SliderInput/SliderInput.js.map +1 -0
  65. package/dist/esm/components/Slider/SliderInput/SliderInput.styles.js +53 -0
  66. package/dist/esm/components/Slider/SliderInput/SliderInput.styles.js.map +1 -0
  67. package/dist/esm/components/Slider/SliderInput/sliderInputClasses.js +8 -0
  68. package/dist/esm/components/Slider/SliderInput/sliderInputClasses.js.map +1 -0
  69. package/dist/esm/components/Slider/base.js +251 -0
  70. package/dist/esm/components/Slider/base.js.map +1 -0
  71. package/dist/esm/components/Slider/sliderClasses.js +8 -0
  72. package/dist/esm/components/Slider/sliderClasses.js.map +1 -0
  73. package/dist/esm/components/Slider/utils.js +217 -0
  74. package/dist/esm/components/Slider/utils.js.map +1 -0
  75. package/dist/esm/components/Table/TableBody/tableBodyClasses.js.map +1 -1
  76. package/dist/esm/components/Table/TableCell/tableCellClasses.js.map +1 -1
  77. package/dist/esm/components/Table/TableContainer/tableContainerClasses.js.map +1 -1
  78. package/dist/esm/components/Table/TableHead/tableHeadClasses.js.map +1 -1
  79. package/dist/esm/components/Table/TableHeader/tableHeaderClasses.js.map +1 -1
  80. package/dist/esm/components/Table/TableRow/tableRowClasses.js.map +1 -1
  81. package/dist/esm/components/Table/tableClasses.js.map +1 -1
  82. package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js +77 -19
  83. package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js.map +1 -1
  84. package/dist/esm/components/VerticalNavigation/Navigation/Navigation.styles.js +4 -1
  85. package/dist/esm/components/VerticalNavigation/Navigation/Navigation.styles.js.map +1 -1
  86. package/dist/esm/components/VerticalNavigation/Navigation/navigationClasses.js +1 -1
  87. package/dist/esm/components/VerticalNavigation/Navigation/navigationClasses.js.map +1 -1
  88. package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.js +56 -0
  89. package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.js.map +1 -0
  90. package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.js +14 -0
  91. package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.js.map +1 -0
  92. package/dist/esm/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.js +41 -0
  93. package/dist/esm/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.js.map +1 -0
  94. package/dist/esm/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.styles.js +40 -0
  95. package/dist/esm/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.styles.js.map +1 -0
  96. package/dist/esm/components/VerticalNavigation/TreeView/TooltipWrapper/TooltipWrapper.js +24 -0
  97. package/dist/esm/components/VerticalNavigation/TreeView/TooltipWrapper/TooltipWrapper.js.map +1 -0
  98. package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js +42 -44
  99. package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
  100. package/dist/esm/components/VerticalNavigation/VerticalNavigation.js +6 -2
  101. package/dist/esm/components/VerticalNavigation/VerticalNavigation.js.map +1 -1
  102. package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js +6 -4
  103. package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js.map +1 -1
  104. package/dist/esm/components/VerticalNavigation/VerticalNavigationContext.js.map +1 -1
  105. package/dist/esm/components/VerticalNavigation/utils/VerticalNavigation.utils.js +7 -0
  106. package/dist/esm/components/VerticalNavigation/utils/VerticalNavigation.utils.js.map +1 -0
  107. package/dist/esm/index.js +22 -18
  108. package/dist/esm/index.js.map +1 -1
  109. package/dist/types/index.d.ts +201 -14
  110. package/package.json +7 -5
@@ -1 +1 @@
1
- {"version":3,"file":"tableCellClasses.cjs","sources":["../../../../../src/components/Table/TableCell/tableCellClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableCellClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the cell when it's in the table head. */\n head?: string;\n /** Styles applied to the cell when it's in the table body. */\n body?: string;\n /** Styles applied to the cell when it's in the table footer. */\n footer?: string;\n /** Styles applied to the cell when it's part of a sticky column. */\n stickyColumn?: string;\n /** Styles applied to the cell when it's part of the last sticky to the left column. */\n stickyColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the first right sticky column. */\n stickyColumnLeastRight?: string;\n /** Styles applied to the cell when it's part of the first column in the group. */\n groupColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the last column in the group. */\n groupColumnMostRight?: string;\n /** Styles applied to the cell when it's part of a sorted column. */\n sorted?: string;\n /** Styles applied to the sort icon. */\n sortIcon?: string;\n /** Styles applied to the component root when it is left aligned */\n alignLeft?: string;\n /** Styles applied to the component root when it is right aligned */\n alignRight?: string;\n /** Styles applied to the component root when it is center aligned */\n alignCenter?: string;\n /** Styles applied to the component root when it is justified */\n alignJustify?: string;\n /** Styles applied to the component root when its variant is checkbox */\n variantCheckbox?: string;\n /** Styles applied to the component root when its variant is expand */\n variantExpand?: string;\n /** Styles applied to the component root when its variant is actions */\n variantActions?: string;\n /** Styles applied to the component root when its variant is none */\n variantNone?: string;\n /** Styles applied to the component root when its variant is list */\n variantList?: string;\n /** Styles applied to the cell when its variant is list and actions. */\n variantListactions?: string;\n /** Styles applied to the cell when its variant is list and checkbox. */\n variantListcheckbox?: string;\n /** Styles applied to the cell when its variant is list and the type is head . */\n variantListHead?: string;\n /** Styles applied to the cell when it's part of a resizable column. */\n resizable?: string;\n /** Styles applied to the cell when it's part of a resizing column. */\n resizing?: string;\n};\n\nconst classKeys: string[] = [\n \"root\",\n \"head\",\n \"body\",\n \"footer\",\n \"stickyColumn\",\n \"stickyColumnMostLeft\",\n \"stickyColumnLeastRight\",\n \"groupColumnMostLeft\",\n \"groupColumnMostRight\",\n \"sorted\",\n \"sortIcon\",\n \"alignLeft\",\n \"alignRight\",\n \"alignCenter\",\n \"alignJustify\",\n \"variantCheckbox\",\n \"variantExpand\",\n \"variantActions\",\n \"variantNone\",\n \"variantList\",\n \"variantListactions\",\n \"variantListcheckbox\",\n \"variantListHead\",\n \"resizable\",\n \"resizing\",\n];\n\nconst tableCellClasses = getClasses<HvTableCellClasses>(\n classKeys,\n \"HvTableCell\"\n);\n\nexport default tableCellClasses;\n"],"names":["classKeys","tableCellClasses","getClasses"],"mappings":";;;AAuDA,MAAMA,YAAsB,CAC1B,QACA,QACA,QACA,UACA,gBACA,wBACA,0BACA,uBACA,wBACA,UACA,YACA,aACA,cACA,eACA,gBACA,mBACA,iBACA,kBACA,eACA,eACA,sBACA,uBACA,mBACA,aACA,UAAU;AAGZ,MAAMC,mBAAmBC,QACvBF,WAAAA,WACA,aAAa;AAGf,MAAA,qBAAeC;;"}
1
+ {"version":3,"file":"tableCellClasses.cjs","sources":["../../../../../src/components/Table/TableCell/tableCellClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableCellClasses {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the cell when it's in the table head. */\n head?: string;\n /** Styles applied to the cell when it's in the table body. */\n body?: string;\n /** Styles applied to the cell when it's in the table footer. */\n footer?: string;\n /** Styles applied to the cell when it's part of a sticky column. */\n stickyColumn?: string;\n /** Styles applied to the cell when it's part of the last sticky to the left column. */\n stickyColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the first right sticky column. */\n stickyColumnLeastRight?: string;\n /** Styles applied to the cell when it's part of the first column in the group. */\n groupColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the last column in the group. */\n groupColumnMostRight?: string;\n /** Styles applied to the cell when it's part of a sorted column. */\n sorted?: string;\n /** Styles applied to the sort icon. */\n sortIcon?: string;\n /** Styles applied to the component root when it is left aligned */\n alignLeft?: string;\n /** Styles applied to the component root when it is right aligned */\n alignRight?: string;\n /** Styles applied to the component root when it is center aligned */\n alignCenter?: string;\n /** Styles applied to the component root when it is justified */\n alignJustify?: string;\n /** Styles applied to the component root when its variant is checkbox */\n variantCheckbox?: string;\n /** Styles applied to the component root when its variant is expand */\n variantExpand?: string;\n /** Styles applied to the component root when its variant is actions */\n variantActions?: string;\n /** Styles applied to the component root when its variant is none */\n variantNone?: string;\n /** Styles applied to the component root when its variant is list */\n variantList?: string;\n /** Styles applied to the cell when its variant is list and actions. */\n variantListactions?: string;\n /** Styles applied to the cell when its variant is list and checkbox. */\n variantListcheckbox?: string;\n /** Styles applied to the cell when its variant is list and the type is head . */\n variantListHead?: string;\n /** Styles applied to the cell when it's part of a resizable column. */\n resizable?: string;\n /** Styles applied to the cell when it's part of a resizing column. */\n resizing?: string;\n}\n\nconst classKeys: string[] = [\n \"root\",\n \"head\",\n \"body\",\n \"footer\",\n \"stickyColumn\",\n \"stickyColumnMostLeft\",\n \"stickyColumnLeastRight\",\n \"groupColumnMostLeft\",\n \"groupColumnMostRight\",\n \"sorted\",\n \"sortIcon\",\n \"alignLeft\",\n \"alignRight\",\n \"alignCenter\",\n \"alignJustify\",\n \"variantCheckbox\",\n \"variantExpand\",\n \"variantActions\",\n \"variantNone\",\n \"variantList\",\n \"variantListactions\",\n \"variantListcheckbox\",\n \"variantListHead\",\n \"resizable\",\n \"resizing\",\n];\n\nconst tableCellClasses = getClasses<HvTableCellClasses>(\n classKeys,\n \"HvTableCell\"\n);\n\nexport default tableCellClasses;\n"],"names":["classKeys","tableCellClasses","getClasses"],"mappings":";;;AAuDA,MAAMA,YAAsB,CAC1B,QACA,QACA,QACA,UACA,gBACA,wBACA,0BACA,uBACA,wBACA,UACA,YACA,aACA,cACA,eACA,gBACA,mBACA,iBACA,kBACA,eACA,eACA,sBACA,uBACA,mBACA,aACA,UAAU;AAGZ,MAAMC,mBAAmBC,QACvBF,WAAAA,WACA,aAAa;AAGf,MAAA,qBAAeC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tableContainerClasses.cjs","sources":["../../../../../src/components/Table/TableContainer/tableContainerClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableContainerClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n};\n\nconst classKeys: string[] = [\"root\"];\n\nconst tableContainerClasses = getClasses<HvTableContainerClasses>(\n classKeys,\n \"HvTableContainer\"\n);\n\nexport default tableContainerClasses;\n"],"names":["classKeys","tableContainerClasses","getClasses"],"mappings":";;;AAOA,MAAMA,YAAsB,CAAC,MAAM;AAEnC,MAAMC,wBAAwBC,QAC5BF,WAAAA,WACA,kBAAkB;AAGpB,MAAA,0BAAeC;;"}
1
+ {"version":3,"file":"tableContainerClasses.cjs","sources":["../../../../../src/components/Table/TableContainer/tableContainerClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableContainerClasses {\n /** Styles applied to the component root class. */\n root?: string;\n}\n\nconst classKeys: string[] = [\"root\"];\n\nconst tableContainerClasses = getClasses<HvTableContainerClasses>(\n classKeys,\n \"HvTableContainer\"\n);\n\nexport default tableContainerClasses;\n"],"names":["classKeys","tableContainerClasses","getClasses"],"mappings":";;;AAOA,MAAMA,YAAsB,CAAC,MAAM;AAEnC,MAAMC,wBAAwBC,QAC5BF,WAAAA,WACA,kBAAkB;AAGpB,MAAA,0BAAeC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tableHeadClasses.cjs","sources":["../../../../../src/components/Table/TableHead/tableHeadClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableHeadClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied when the table has a sticky header. */\n stickyHeader?: string;\n};\n\nconst classKeys: string[] = [\"root\", \"stickyHeader\"];\n\nconst tableHeadClasses = getClasses<HvTableHeadClasses>(\n classKeys,\n \"HvTableHead\"\n);\n\nexport default tableHeadClasses;\n"],"names":["classKeys","tableHeadClasses","getClasses"],"mappings":";;;AASA,MAAMA,YAAsB,CAAC,QAAQ,cAAc;AAEnD,MAAMC,mBAAmBC,QACvBF,WAAAA,WACA,aAAa;AAGf,MAAA,qBAAeC;;"}
1
+ {"version":3,"file":"tableHeadClasses.cjs","sources":["../../../../../src/components/Table/TableHead/tableHeadClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableHeadClasses {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied when the table has a sticky header. */\n stickyHeader?: string;\n}\n\nconst classKeys: string[] = [\"root\", \"stickyHeader\"];\n\nconst tableHeadClasses = getClasses<HvTableHeadClasses>(\n classKeys,\n \"HvTableHead\"\n);\n\nexport default tableHeadClasses;\n"],"names":["classKeys","tableHeadClasses","getClasses"],"mappings":";;;AASA,MAAMA,YAAsB,CAAC,QAAQ,cAAc;AAEnD,MAAMC,mBAAmBC,QACvBF,WAAAA,WACA,aAAa;AAGf,MAAA,qBAAeC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tableHeaderClasses.cjs","sources":["../../../../../src/components/Table/TableHeader/tableHeaderClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableHeaderClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the cell when it's in the table head. */\n head?: string;\n /** Styles applied to the cell when it's in the table body. */\n body?: string;\n /** Styles applied to the cell when it's in the table footer. */\n footer?: string;\n /** Styles applied to the cell when it's part of a sticky column. */\n stickyColumn?: string;\n /** Styles applied to the cell when it's part of the last sticky to the left column. */\n stickyColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the first right sticky column. */\n stickyColumnLeastRight?: string;\n /** Styles applied to the cell when it's part of the first column in the group. */\n groupColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the last column in the group. */\n groupColumnMostRight?: string;\n /** Styles applied to the container of the header cell content. */\n headerContent?: string;\n /** Styles applied to the text of the header cell. */\n headerText?: string;\n /** Styles applied to the text of the header cell when it is a paragraph. */\n headerParagraph?: string;\n /** Styles applied to the text of the header cell when it is sorted. */\n sortableHeaderText?: string;\n /** Styles applied to the component root when it is sorted. */\n sorted?: string;\n /** Styles applied to the component root when it is sortable. */\n sortable?: string;\n /** Styles applied to the sort button component. */\n sortButton?: string;\n /** Styles applied to the sort icon component. */\n sortIcon?: string;\n /** Styles applied to the component root when it is left aligned */\n alignLeft?: string;\n /** Styles applied to the component root when it is right aligned */\n alignRight?: string;\n /** Styles applied to the component root when it is center aligned */\n alignCenter?: string;\n /** Styles applied to the component root when it is justified */\n alignJustify?: string;\n /** Styles applied to the header content when it is left aligned */\n alignFlexLeft?: string;\n /** Styles applied to the header content when it is right aligned */\n alignFlexRight?: string;\n /** Styles applied to the header content when it is center aligned */\n alignFlexCenter?: string;\n /** Styles applied to the header content when it is justified */\n alignFlexJustify?: string;\n /** Styles applied to the component root when its variant is checkbox */\n variantCheckbox?: string;\n /** Styles applied to the component root when its variant is expand */\n variantExpand?: string;\n /** Styles applied to the component root when its variant is actions */\n variantActions?: string;\n /** Styles applied to the component root when its variant is none */\n variantNone?: string;\n /** Styles applied to the component root when its variant is list row */\n variantList?: string;\n /** Styles applied to the cell when it's part of a resizable column. */\n resizable?: string;\n /** Styles applied to the cell when it's part of a resizing column. */\n resizing?: string;\n /** Styles applied to the resizer object when column is resizable. */\n resizer?: string;\n};\n\nconst classKeys: string[] = [\n \"root\",\n \"head\",\n \"body\",\n \"footer\",\n \"stickyColumn\",\n \"stickyColumnMostLeft\",\n \"stickyColumnLeastRight\",\n \"groupColumnMostLeft\",\n \"groupColumnMostRight\",\n \"headerContent\",\n \"headerText\",\n \"headerParagraph\",\n \"sortableHeaderText\",\n \"sorted\",\n \"sortable\",\n \"sortButton\",\n \"sortIcon\",\n \"alignLeft\",\n \"alignRight\",\n \"alignCenter\",\n \"alignJustify\",\n \"alignFlexLeft\",\n \"alignFlexRight\",\n \"alignFlexCenter\",\n \"alignFlexJustify\",\n \"variantCheckbox\",\n \"variantExpand\",\n \"variantActions\",\n \"variantNone\",\n \"variantList\",\n \"resizable\",\n \"resizing\",\n \"resizer\",\n];\n\nconst tableHeaderClasses = getClasses<HvTableHeaderClasses>(\n classKeys,\n \"HvTableHeader\"\n);\n\nexport default tableHeaderClasses;\n"],"names":["classKeys","tableHeaderClasses","getClasses"],"mappings":";;;AAuEA,MAAMA,YAAsB,CAC1B,QACA,QACA,QACA,UACA,gBACA,wBACA,0BACA,uBACA,wBACA,iBACA,cACA,mBACA,sBACA,UACA,YACA,cACA,YACA,aACA,cACA,eACA,gBACA,iBACA,kBACA,mBACA,oBACA,mBACA,iBACA,kBACA,eACA,eACA,aACA,YACA,SAAS;AAGX,MAAMC,qBAAqBC,QACzBF,WAAAA,WACA,eAAe;AAGjB,MAAA,uBAAeC;;"}
1
+ {"version":3,"file":"tableHeaderClasses.cjs","sources":["../../../../../src/components/Table/TableHeader/tableHeaderClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableHeaderClasses {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the cell when it's in the table head. */\n head?: string;\n /** Styles applied to the cell when it's in the table body. */\n body?: string;\n /** Styles applied to the cell when it's in the table footer. */\n footer?: string;\n /** Styles applied to the cell when it's part of a sticky column. */\n stickyColumn?: string;\n /** Styles applied to the cell when it's part of the last sticky to the left column. */\n stickyColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the first right sticky column. */\n stickyColumnLeastRight?: string;\n /** Styles applied to the cell when it's part of the first column in the group. */\n groupColumnMostLeft?: string;\n /** Styles applied to the cell when it's part of the last column in the group. */\n groupColumnMostRight?: string;\n /** Styles applied to the container of the header cell content. */\n headerContent?: string;\n /** Styles applied to the text of the header cell. */\n headerText?: string;\n /** Styles applied to the text of the header cell when it is a paragraph. */\n headerParagraph?: string;\n /** Styles applied to the text of the header cell when it is sorted. */\n sortableHeaderText?: string;\n /** Styles applied to the component root when it is sorted. */\n sorted?: string;\n /** Styles applied to the component root when it is sortable. */\n sortable?: string;\n /** Styles applied to the sort button component. */\n sortButton?: string;\n /** Styles applied to the sort icon component. */\n sortIcon?: string;\n /** Styles applied to the component root when it is left aligned */\n alignLeft?: string;\n /** Styles applied to the component root when it is right aligned */\n alignRight?: string;\n /** Styles applied to the component root when it is center aligned */\n alignCenter?: string;\n /** Styles applied to the component root when it is justified */\n alignJustify?: string;\n /** Styles applied to the header content when it is left aligned */\n alignFlexLeft?: string;\n /** Styles applied to the header content when it is right aligned */\n alignFlexRight?: string;\n /** Styles applied to the header content when it is center aligned */\n alignFlexCenter?: string;\n /** Styles applied to the header content when it is justified */\n alignFlexJustify?: string;\n /** Styles applied to the component root when its variant is checkbox */\n variantCheckbox?: string;\n /** Styles applied to the component root when its variant is expand */\n variantExpand?: string;\n /** Styles applied to the component root when its variant is actions */\n variantActions?: string;\n /** Styles applied to the component root when its variant is none */\n variantNone?: string;\n /** Styles applied to the component root when its variant is list row */\n variantList?: string;\n /** Styles applied to the cell when it's part of a resizable column. */\n resizable?: string;\n /** Styles applied to the cell when it's part of a resizing column. */\n resizing?: string;\n /** Styles applied to the resizer object when column is resizable. */\n resizer?: string;\n}\n\nconst classKeys: string[] = [\n \"root\",\n \"head\",\n \"body\",\n \"footer\",\n \"stickyColumn\",\n \"stickyColumnMostLeft\",\n \"stickyColumnLeastRight\",\n \"groupColumnMostLeft\",\n \"groupColumnMostRight\",\n \"headerContent\",\n \"headerText\",\n \"headerParagraph\",\n \"sortableHeaderText\",\n \"sorted\",\n \"sortable\",\n \"sortButton\",\n \"sortIcon\",\n \"alignLeft\",\n \"alignRight\",\n \"alignCenter\",\n \"alignJustify\",\n \"alignFlexLeft\",\n \"alignFlexRight\",\n \"alignFlexCenter\",\n \"alignFlexJustify\",\n \"variantCheckbox\",\n \"variantExpand\",\n \"variantActions\",\n \"variantNone\",\n \"variantList\",\n \"resizable\",\n \"resizing\",\n \"resizer\",\n];\n\nconst tableHeaderClasses = getClasses<HvTableHeaderClasses>(\n classKeys,\n \"HvTableHeader\"\n);\n\nexport default tableHeaderClasses;\n"],"names":["classKeys","tableHeaderClasses","getClasses"],"mappings":";;;AAuEA,MAAMA,YAAsB,CAC1B,QACA,QACA,QACA,UACA,gBACA,wBACA,0BACA,uBACA,wBACA,iBACA,cACA,mBACA,sBACA,UACA,YACA,cACA,YACA,aACA,cACA,eACA,gBACA,iBACA,kBACA,mBACA,oBACA,mBACA,iBACA,kBACA,eACA,eACA,aACA,YACA,SAAS;AAGX,MAAMC,qBAAqBC,QACzBF,WAAAA,WACA,eAAe;AAGjB,MAAA,uBAAeC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tableRowClasses.cjs","sources":["../../../../../src/components/Table/TableRow/tableRowClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableRowClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the component root when selected. */\n selected?: string;\n /** Styles applied to the component root when expanded. */\n expanded?: string;\n /** Styles applied to the component root when striped. */\n striped?: string;\n /** Styles applied to the component root on hover. */\n hover?: string;\n /** Styles applied to the component root when inside a `HvTableHead`. */\n head?: string;\n /** Styles applied to the component root when inside a `HvTableBody`. */\n body?: string;\n /** Styles applied to the component root when inside a `HvTableFooter`. */\n footer?: string;\n /** Styles applied to the component root when its table variant is list. */\n variantList?: string;\n /** Styles applied to the component root when its table variant is list. */\n variantListHead?: string;\n};\n\nconst classKeys: string[] = [\n \"root\",\n \"selected\",\n \"expanded\",\n \"striped\",\n \"hover\",\n \"head\",\n \"body\",\n \"footer\",\n \"variantList\",\n \"variantListHead\",\n];\n\nconst tableRowClasses = getClasses<HvTableRowClasses>(classKeys, \"HvTableRow\");\n\nexport default tableRowClasses;\n"],"names":["classKeys","tableRowClasses","getClasses"],"mappings":";;;AAyBA,MAAMA,YAAsB,CAC1B,QACA,YACA,YACA,WACA,SACA,QACA,QACA,UACA,eACA,iBAAiB;AAGnB,MAAMC,kBAAkBC,QAA8BF,WAAAA,WAAW,YAAY;AAE7E,MAAA,oBAAeC;;"}
1
+ {"version":3,"file":"tableRowClasses.cjs","sources":["../../../../../src/components/Table/TableRow/tableRowClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableRowClasses {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the component root when selected. */\n selected?: string;\n /** Styles applied to the component root when expanded. */\n expanded?: string;\n /** Styles applied to the component root when striped. */\n striped?: string;\n /** Styles applied to the component root on hover. */\n hover?: string;\n /** Styles applied to the component root when inside a `HvTableHead`. */\n head?: string;\n /** Styles applied to the component root when inside a `HvTableBody`. */\n body?: string;\n /** Styles applied to the component root when inside a `HvTableFooter`. */\n footer?: string;\n /** Styles applied to the component root when its table variant is list. */\n variantList?: string;\n /** Styles applied to the component root when its table variant is list. */\n variantListHead?: string;\n}\n\nconst classKeys: string[] = [\n \"root\",\n \"selected\",\n \"expanded\",\n \"striped\",\n \"hover\",\n \"head\",\n \"body\",\n \"footer\",\n \"variantList\",\n \"variantListHead\",\n];\n\nconst tableRowClasses = getClasses<HvTableRowClasses>(classKeys, \"HvTableRow\");\n\nexport default tableRowClasses;\n"],"names":["classKeys","tableRowClasses","getClasses"],"mappings":";;;AAyBA,MAAMA,YAAsB,CAC1B,QACA,YACA,YACA,WACA,SACA,QACA,QACA,UACA,eACA,iBAAiB;AAGnB,MAAMC,kBAAkBC,QAA8BF,WAAAA,WAAW,YAAY;AAE7E,MAAA,oBAAeC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tableClasses.cjs","sources":["../../../../src/components/Table/tableClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvTableClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the component root class when it has a sticky header. */\n stickyHeader?: string;\n /** Styles applied to the component root class when it has sticky columns. */\n stickyColumns?: string;\n /** Styles applied to the component root class when it has sticky columns. */\n listRow?: string;\n};\n\nconst classKeys: string[] = [\n \"root\",\n \"stickyHeader\",\n \"stickyColumns\",\n \"listRow\",\n];\n\nconst tableClasses = getClasses<HvTableClasses>(classKeys, \"HvTable\");\n\nexport default tableClasses;\n"],"names":["classKeys","tableClasses","getClasses"],"mappings":";;;AAaA,MAAMA,YAAsB,CAC1B,QACA,gBACA,iBACA,SAAS;AAGX,MAAMC,eAAeC,QAA2BF,WAAAA,WAAW,SAAS;AAEpE,MAAA,iBAAeC;;"}
1
+ {"version":3,"file":"tableClasses.cjs","sources":["../../../../src/components/Table/tableClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport interface HvTableClasses {\n /** Styles applied to the component root class. */\n root?: string;\n /** Styles applied to the component root class when it has a sticky header. */\n stickyHeader?: string;\n /** Styles applied to the component root class when it has sticky columns. */\n stickyColumns?: string;\n /** Styles applied to the component root class when it has sticky columns. */\n listRow?: string;\n}\n\nconst classKeys: string[] = [\n \"root\",\n \"stickyHeader\",\n \"stickyColumns\",\n \"listRow\",\n];\n\nconst tableClasses = getClasses<HvTableClasses>(classKeys, \"HvTable\");\n\nexport default tableClasses;\n"],"names":["classKeys","tableClasses","getClasses"],"mappings":";;;AAaA,MAAMA,YAAsB,CAC1B,QACA,gBACA,iBACA,SAAS;AAGX,MAAMC,eAAeC,QAA2BF,WAAAA,WAAW,SAAS;AAEpE,MAAA,iBAAeC;;"}
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const clsx = require("clsx");
5
+ const uniqueId = require("lodash/uniqueId");
5
6
  const navigationClasses = require("./navigationClasses.cjs");
6
7
  const Navigation_styles = require("./Navigation.styles.cjs");
7
8
  const VerticalNavigationContext = require("../VerticalNavigationContext.cjs");
9
+ const NavigationPopup = require("../NavigationPopup/NavigationPopup.cjs");
8
10
  const jsxRuntime = require("@emotion/react/jsx-runtime");
9
11
  const NavigationSlider = require("../NavigationSlider/NavigationSlider.cjs");
10
12
  const TreeView = require("../TreeView/TreeView.cjs");
@@ -14,7 +16,8 @@ const setId = require("../../../utils/setId.cjs");
14
16
  const wrapperTooltip = require("../../../utils/wrapperTooltip.cjs");
15
17
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
16
18
  const clsx__default = /* @__PURE__ */ _interopDefault(clsx);
17
- const createListHierarchy = (items, id, classes) => items.map((item) => {
19
+ const uniqueId__default = /* @__PURE__ */ _interopDefault(uniqueId);
20
+ const createListHierarchy = (items, id, classes, mouseEnterHandler, disableTooltip = false) => items.map((item) => {
18
21
  const {
19
22
  id: itemId,
20
23
  label: itemLabel,
@@ -26,6 +29,9 @@ const createListHierarchy = (items, id, classes) => items.map((item) => {
26
29
  target
27
30
  } = item;
28
31
  const ItemText = wrapperTooltip.wrapperTooltip(true, itemLabel, itemLabel);
32
+ const itemMouseEnterHandler = (event) => {
33
+ mouseEnterHandler == null ? void 0 : mouseEnterHandler(event, item);
34
+ };
29
35
  return /* @__PURE__ */ jsxRuntime.jsx(TreeViewItem.HvVerticalNavigationTreeViewItem, {
30
36
  id: setId.setId(id, itemId),
31
37
  className: classes == null ? void 0 : classes.listItem,
@@ -37,7 +43,9 @@ const createListHierarchy = (items, id, classes) => items.map((item) => {
37
43
  payload: item,
38
44
  selectable,
39
45
  disabled,
40
- children: children ? createListHierarchy(children, id, classes) : void 0
46
+ onMouseEnter: itemMouseEnterHandler,
47
+ disableTooltip,
48
+ children: children ? createListHierarchy(children, id, classes, mouseEnterHandler, disableTooltip) : void 0
41
49
  }, itemId);
42
50
  });
43
51
  const getAllParents = (items) => {
@@ -96,18 +104,6 @@ const HvVerticalNavigationTree = ({
96
104
  }
97
105
  return defaultExpanded;
98
106
  });
99
- const handleChange = React.useCallback((event, selectedId, selectedItem) => {
100
- setSelected(selectedId);
101
- if (onChange) {
102
- onChange(event, selectedItem);
103
- }
104
- }, [onChange, setSelected]);
105
- const handleToggle = React.useCallback((event, newExpanded) => {
106
- setExpanded(newExpanded);
107
- if (onToggle) {
108
- onToggle(event, newExpanded);
109
- }
110
- }, [onToggle, setExpanded]);
111
107
  const {
112
108
  isOpen,
113
109
  collapsedMode,
@@ -118,7 +114,53 @@ const HvVerticalNavigationTree = ({
118
114
  setParentData,
119
115
  setParentSelected
120
116
  } = React.useContext(VerticalNavigationContext.VerticalNavigationContext);
121
- const children = React.useMemo(() => data && createListHierarchy(data, id, classes), [classes, data, id]);
117
+ const [navigationPopup, setNavigationPopup] = React.useState(null);
118
+ const handleChange = React.useCallback((event, selectedId, selectedItem) => {
119
+ if (collapsedMode === "icon" && !isOpen && selectedItem.data) {
120
+ const currentEventTarget = event.currentTarget;
121
+ setNavigationPopup((prevState) => {
122
+ return (prevState == null ? void 0 : prevState.anchorEl) === currentEventTarget ? null : {
123
+ uniqueKey: uniqueId__default.default(),
124
+ anchorEl: currentEventTarget,
125
+ fixedMode: true,
126
+ data: selectedItem.data
127
+ };
128
+ });
129
+ event.stopPropagation();
130
+ } else {
131
+ setSelected(selectedId);
132
+ setNavigationPopup(null);
133
+ if (onChange) {
134
+ onChange(event, selectedItem);
135
+ }
136
+ }
137
+ }, [onChange, setSelected]);
138
+ const treeViewItemMouseEnterHandler = (event, item) => {
139
+ const isCollapsedMode = collapsedMode === "icon" && !isOpen;
140
+ if (isCollapsedMode && item.data && !(navigationPopup == null ? void 0 : navigationPopup.fixedMode)) {
141
+ const currentEventTarget = event.currentTarget;
142
+ setNavigationPopup == null ? void 0 : setNavigationPopup({
143
+ uniqueKey: uniqueId__default.default(),
144
+ anchorEl: currentEventTarget,
145
+ fixedMode: false,
146
+ data: item.data
147
+ });
148
+ } else if (isCollapsedMode && !item.data && !(navigationPopup == null ? void 0 : navigationPopup.fixedMode)) {
149
+ setNavigationPopup(null);
150
+ }
151
+ };
152
+ const handleToggle = React.useCallback((event, newExpanded) => {
153
+ setExpanded(newExpanded);
154
+ if (onToggle) {
155
+ onToggle(event, newExpanded);
156
+ }
157
+ }, [onToggle, setExpanded]);
158
+ const children = React.useMemo(() => data && createListHierarchy(data, id, classes, treeViewItemMouseEnterHandler, navigationPopup == null ? void 0 : navigationPopup.fixedMode), [classes, data, id, navigationPopup, isOpen]);
159
+ React.useEffect(() => {
160
+ if (!isOpen) {
161
+ setNavigationPopup == null ? void 0 : setNavigationPopup(null);
162
+ }
163
+ }, [isOpen]);
122
164
  React.useEffect(() => {
123
165
  if (setParentSelected)
124
166
  setParentSelected(selected);
@@ -130,16 +172,25 @@ const HvVerticalNavigationTree = ({
130
172
  const navigateToTargetHandler = (event, selectedItem) => {
131
173
  handleChange(event, selectedItem.id, selectedItem);
132
174
  };
175
+ const handleNavigationPopupClose = () => {
176
+ setNavigationPopup(null);
177
+ };
178
+ const handleStyledNavMouseLeave = () => {
179
+ if (collapsedMode === "icon" && !isOpen && !(navigationPopup == null ? void 0 : navigationPopup.fixedMode)) {
180
+ setNavigationPopup(null);
181
+ }
182
+ };
133
183
  return /* @__PURE__ */ jsxRuntime.jsx(Navigation_styles.StyledNav, {
134
184
  id,
135
185
  className: clsx__default.default(className, navigationClasses.default.root, classes == null ? void 0 : classes.root, !isOpen && collapsedMode == "simple" && clsx__default.default(navigationClasses.default.collapsed, classes == null ? void 0 : classes.collapsed)),
186
+ onMouseLeave: handleStyledNavMouseLeave,
136
187
  ...others,
137
188
  children: slider ? /* @__PURE__ */ jsxRuntime.jsx(NavigationSlider.HvVerticalNavigationSlider, {
138
189
  data: parentItem.data || withParentData,
139
190
  selected,
140
191
  onNavigateToTarget: navigateToTargetHandler,
141
192
  onNavigateToChild: navigateToChildHandler
142
- }) : /* @__PURE__ */ jsxRuntime.jsx(TreeView.HvVerticalNavigationTreeView, {
193
+ }) : /* @__PURE__ */ jsxRuntime.jsxs(TreeView.HvVerticalNavigationTreeView, {
143
194
  id: setId.setId(id, "tree"),
144
195
  className: clsx__default.default(navigationClasses.default.list, classes == null ? void 0 : classes.list),
145
196
  selectable: true,
@@ -149,7 +200,15 @@ const HvVerticalNavigationTree = ({
149
200
  onChange: handleChange,
150
201
  expanded,
151
202
  onToggle: handleToggle,
152
- children
203
+ children: [collapsedMode === "icon" && !isOpen && navigationPopup && /* @__PURE__ */ jsxRuntime.jsx(NavigationPopup.HvVerticalNavigationPopup, {
204
+ id: setId.setId(id, "navigation-popup"),
205
+ anchorEl: navigationPopup.anchorEl,
206
+ selected,
207
+ fixedMode: navigationPopup.fixedMode,
208
+ data: navigationPopup.data,
209
+ onClose: handleNavigationPopupClose,
210
+ onChange: handleChange
211
+ }, navigationPopup.uniqueKey), children]
153
212
  })
154
213
  });
155
214
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/Navigation.tsx"],"sourcesContent":["import { useCallback, useMemo, useContext, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { setId, wrapperTooltip } from \"~/utils\";\nimport { useControlled } from \"~/hooks\";\nimport {\n HvVerticalNavigationTreeView,\n HvVerticalNavigationTreeViewItem,\n} from \"../TreeView\";\nimport verticalNavigationTreeClasses, {\n HvVerticalNavigationTreeClasses,\n} from \"./navigationClasses\";\nimport { StyledNav } from \"./Navigation.styles\";\nimport { HvVerticalNavigationSlider } from \"../\";\nimport { HvBaseProps } from \"../../../types\";\nimport { VerticalNavigationContext } from \"../VerticalNavigationContext\";\n\nexport interface NavigationData {\n /**\n * the id to be applied to the root element.\n */\n id: string;\n /**\n * the label to be rendered on the menu item.\n */\n label: string;\n /**\n * The url for the link.\n */\n href?: string;\n /**\n * The behavior when opening a link.\n */\n target?: string;\n /**\n * Icon to be render.\n */\n icon?: React.ReactNode;\n /**\n * Data subset.\n */\n data?: NavigationData[];\n /**\n * if `true` the item is disabled and is not interactive.\n */\n disabled?: boolean;\n /**\n * if `true` the item doesn't have a selected state.\n */\n selectable?: boolean;\n /**\n * Any other properties.\n */\n [otherProperty: string]: any;\n}\n\nconst createListHierarchy = (\n items,\n id,\n classes?: HvVerticalNavigationTreeClasses\n) =>\n items.map((item) => {\n const {\n id: itemId,\n label: itemLabel,\n icon,\n data: children,\n selectable,\n disabled,\n href,\n target,\n } = item;\n\n const ItemText = wrapperTooltip(true, itemLabel, itemLabel);\n\n return (\n <HvVerticalNavigationTreeViewItem\n id={setId(id, itemId)}\n className={classes?.listItem}\n href={href}\n target={target}\n key={itemId}\n nodeId={itemId}\n label={<ItemText />}\n icon={icon}\n payload={item}\n selectable={selectable}\n disabled={disabled}\n >\n {children ? createListHierarchy(children, id, classes) : undefined}\n </HvVerticalNavigationTreeViewItem>\n );\n });\n\nconst getAllParents = (items) => {\n const parents = items.filter(\n (item) => item.data != null && item.data.length > 0\n );\n const childParents = parents.flatMap((item) => getAllParents(item.data));\n\n return [...parents, ...childParents];\n};\n\nfunction pathToElement(data, targetId) {\n const path: string[] = [];\n\n if (data != null && data.length > 0) {\n for (let i = 0; i !== data.length; ++i) {\n const item = data[i];\n if (item.id === targetId) {\n path.push(item.id);\n break;\n }\n\n const subPaths = pathToElement(item.data, targetId);\n if (subPaths.length > 0) {\n path.push(item.id);\n path.push(...subPaths);\n break;\n }\n }\n }\n\n return path;\n}\n\nexport const HvVerticalNavigationTree = ({\n id,\n\n className,\n classes,\n\n data,\n\n mode = \"navigation\",\n\n collapsible = false,\n expanded: expandedProp,\n defaultExpanded,\n onToggle,\n\n selected: selectedProp,\n defaultSelected,\n onChange,\n\n ...others\n}: HvVerticalNavigationTreeProps) => {\n const [selected, setSelected] = useControlled(selectedProp, defaultSelected);\n const [expanded, setExpanded] = useControlled(expandedProp, () => {\n if (defaultExpanded === true) {\n // all parent nodes will be expanded by default\n return getAllParents(data).map((item) => item.id);\n }\n\n if (defaultExpanded === false) {\n // all parent nodes will be collapsed by default\n return [];\n }\n\n if (defaultExpanded == null) {\n if (selected != null) {\n // the path to the selected node will be expanded (default behaviour)\n const path = pathToElement(data, selected);\n return path.slice(0, -1);\n }\n\n // nothing is expanded\n return [];\n }\n\n return defaultExpanded;\n });\n\n const handleChange = useCallback(\n (event, selectedId, selectedItem) => {\n setSelected(selectedId);\n\n if (onChange) {\n onChange(event, selectedItem);\n }\n },\n [onChange, setSelected]\n );\n\n const handleToggle = useCallback(\n (event, newExpanded) => {\n setExpanded(newExpanded);\n\n if (onToggle) {\n onToggle(event, newExpanded);\n }\n },\n [onToggle, setExpanded]\n );\n\n const {\n isOpen,\n collapsedMode,\n slider,\n\n parentItem,\n withParentData,\n navigateToChildHandler,\n\n setParentData,\n setParentSelected,\n } = useContext(VerticalNavigationContext);\n\n const children = useMemo(\n () => data && createListHierarchy(data, id, classes),\n [classes, data, id]\n );\n\n useEffect(() => {\n if (setParentSelected) setParentSelected(selected);\n }, [selected, setSelected]);\n\n useEffect(() => {\n if (setParentData) setParentData(data);\n }, [data]);\n\n //navigation slider\n const navigateToTargetHandler = (event, selectedItem) => {\n handleChange(event, selectedItem.id, selectedItem);\n };\n\n return (\n <StyledNav\n id={id}\n className={clsx(\n className,\n verticalNavigationTreeClasses.root,\n classes?.root,\n !isOpen &&\n collapsedMode == \"simple\" &&\n clsx(verticalNavigationTreeClasses.collapsed, classes?.collapsed)\n )}\n {...others}\n >\n {slider ? (\n <HvVerticalNavigationSlider\n data={parentItem.data || withParentData}\n selected={selected}\n onNavigateToTarget={navigateToTargetHandler}\n onNavigateToChild={navigateToChildHandler}\n />\n ) : (\n <HvVerticalNavigationTreeView\n id={setId(id, \"tree\")}\n className={clsx(verticalNavigationTreeClasses.list, classes?.list)}\n selectable\n mode={mode}\n collapsible={collapsible}\n selected={selected}\n onChange={handleChange}\n expanded={expanded}\n onToggle={handleToggle}\n >\n {children}\n </HvVerticalNavigationTreeView>\n )}\n </StyledNav>\n );\n};\n\nexport type HvVerticalNavigationTreeProps = HvBaseProps<\n HTMLDivElement,\n { onChange }\n> & {\n /**\n * Id to be applied to the root node.\n */\n id?: string;\n /**\n * Class names to be applied.\n */\n className?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationTreeClasses;\n /**\n * Modus operandi (role) of the widget instance.\n */\n mode?: NavigationMode;\n /**\n * Can non-leaf nodes be collapsed / expanded.\n */\n collapsible?: boolean;\n /**\n * The ID of the selected page.\n */\n selected?: string;\n /**\n * When uncontrolled, defines the initial selected page ID.\n */\n defaultSelected?: string;\n /**\n * Callback fired when a navigation item is selected.\n *\n * @param {object} event The event source of the callback.\n * @param {object} page The data of the selected page.\n */\n onChange?: (event, page) => void;\n /**\n * Expanded nodes' ids.\n */\n expanded?: string[];\n /**\n * When uncontrolled, defines the initial expanded nodes' ids.\n *\n * It also supports `true` for starting with all nodes expanded.\n * With `false` all nodes will be collapsed.\n *\n * By default it expands the needed nodes to display the current selection, if any.\n */\n defaultExpanded?: string[] | boolean;\n /**\n * Callback fired when tree items are expanded/collapsed.\n *\n * @param {object} event The event source of the callback.\n * @param {array} nodeIds The ids of the expanded nodes (old and new).\n */\n onToggle?: (event, nodeIds) => void;\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 * 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\nexport type NavigationMode = \"treeview\" | \"navigation\" | \"slider\";\n"],"names":["createListHierarchy","items","id","classes","map","item","itemId","label","itemLabel","icon","data","children","selectable","disabled","href","target","ItemText","wrapperTooltip","HvVerticalNavigationTreeViewItem","setId","className","listItem","nodeId","_jsx","payload","undefined","getAllParents","parents","filter","length","childParents","flatMap","pathToElement","targetId","path","i","push","subPaths","HvVerticalNavigationTree","mode","collapsible","expanded","expandedProp","defaultExpanded","onToggle","selected","selectedProp","defaultSelected","onChange","others","setSelected","useControlled","setExpanded","slice","handleChange","useCallback","event","selectedId","selectedItem","handleToggle","newExpanded","isOpen","collapsedMode","slider","parentItem","withParentData","navigateToChildHandler","setParentData","setParentSelected","useContext","VerticalNavigationContext","useMemo","useEffect","navigateToTargetHandler","StyledNav","clsx","verticalNavigationTreeClasses","root","collapsed","HvVerticalNavigationSlider","onNavigateToTarget","onNavigateToChild","HvVerticalNavigationTreeView","list"],"mappings":";;;;;;;;;;;;;;;;AAuDA,MAAMA,sBAAsBA,CAC1BC,OACAC,IACAC,YAEAF,MAAMG,IAAKC,CAAS,SAAA;AACZ,QAAA;AAAA,IACJH,IAAII;AAAAA,IACJC,OAAOC;AAAAA,IACPC;AAAAA,IACAC,MAAMC;AAAAA,IACNC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,EACEV,IAAAA;AAEJ,QAAMW,WAAWC,eAAAA,eAAe,MAAMT,WAAWA,SAAS;AAE1D,wCACGU,aAAAA,kCAAgC;AAAA,IAC/BhB,IAAIiB,MAAAA,MAAMjB,IAAII,MAAM;AAAA,IACpBc,WAAWjB,mCAASkB;AAAAA,IACpBP;AAAAA,IACAC;AAAAA,IAEAO,QAAQhB;AAAAA,IACRC,OAAOgB,2BAAAA,IAACP,UAAY,EAAA;AAAA,IACpBP;AAAAA,IACAe,SAASnB;AAAAA,IACTO;AAAAA,IACAC;AAAAA,IAAmBF,UAElBA,WAAWX,oBAAoBW,UAAUT,IAAIC,OAAO,IAAIsB;AAAAA,KARpDnB,MAAM;AAWjB,CAAC;AAEH,MAAMoB,gBAAiBzB,CAAU,UAAA;AACzB0B,QAAAA,U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GgB,kBAAAA,WAAS;AAAA,IACRxE;AAAAA,IACAkB,WAAWuD,cACTvD,QAAAA,WACAwD,kBAA8BC,QAAAA,MAC9B1E,mCAAS0E,MACT,CAAChB,UACCC,iBAAiB,YACjBa,sBAAKC,kBAAAA,QAA8BE,WAAW3E,mCAAS2E,SAAS,CAAC;AAAA,IACnE,GACE7B;AAAAA,IAAMtC,UAEToD,SACCxC,2BAAAA,IAACwD,6CAA0B;AAAA,MACzBrE,MAAMsD,WAAWtD,QAAQuD;AAAAA,MACzBpB;AAAAA,MACAmC,oBAAoBP;AAAAA,MACpBQ,mBAAmBf;AAAAA,IAAAA,CACnB,IAEF3C,2BAAAA,IAAC2D,uCAA4B;AAAA,MAC3BhF,IAAIiB,MAAAA,MAAMjB,IAAI,MAAM;AAAA,MACpBkB,WAAWuD,cAAAA,QAAKC,kBAAAA,QAA8BO,MAAMhF,mCAASgF,IAAI;AAAA,MACjEvE,YAAU;AAAA,MACV2B;AAAAA,MACAC;AAAAA,MACAK;AAAAA,MACAG,UAAUM;AAAAA,MACVb;AAAAA,MACAG,UAAUe;AAAAA,MAAahD;AAAAA,IAAAA,CAEd;AAAA,EAAA,CAGH;AAEhB;;"}
1
+ {"version":3,"file":"Navigation.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/Navigation.tsx"],"sourcesContent":["import { useCallback, useMemo, useContext, useEffect, useState } from \"react\";\nimport clsx from \"clsx\";\nimport uniqueId from \"lodash/uniqueId\";\nimport { setId, wrapperTooltip } from \"~/utils\";\nimport { useControlled } from \"~/hooks\";\nimport {\n HvVerticalNavigationTreeView,\n HvVerticalNavigationTreeViewItem,\n} from \"../TreeView\";\nimport verticalNavigationTreeClasses, {\n HvVerticalNavigationTreeClasses,\n} from \"./navigationClasses\";\nimport { StyledNav } from \"./Navigation.styles\";\nimport { HvVerticalNavigationSlider } from \"../\";\nimport { HvBaseProps } from \"../../../types\";\nimport { VerticalNavigationContext } from \"../VerticalNavigationContext\";\nimport { HvVerticalNavigationPopup } from \"../NavigationPopup/NavigationPopup\";\n\nexport interface NavigationData {\n /**\n * the id to be applied to the root element.\n */\n id: string;\n /**\n * the label to be rendered on the menu item.\n */\n label: string;\n /**\n * The url for the link.\n */\n href?: string;\n /**\n * The behavior when opening a link.\n */\n target?: string;\n /**\n * Icon to be render.\n */\n icon?: React.ReactNode;\n /**\n * Data subset.\n */\n data?: NavigationData[];\n /**\n * if `true` the item is disabled and is not interactive.\n */\n disabled?: boolean;\n /**\n * if `true` the item doesn't have a selected state.\n */\n selectable?: boolean;\n /**\n * Any other properties.\n */\n [otherProperty: string]: any;\n}\n\nconst createListHierarchy = (\n items,\n id,\n classes?: HvVerticalNavigationTreeClasses,\n mouseEnterHandler?: (event, item) => void,\n disableTooltip = false\n) =>\n items.map((item) => {\n const {\n id: itemId,\n label: itemLabel,\n icon,\n data: children,\n selectable,\n disabled,\n href,\n target,\n } = item;\n\n const ItemText = wrapperTooltip(true, itemLabel, itemLabel);\n\n const itemMouseEnterHandler = (event) => {\n mouseEnterHandler?.(event, item);\n };\n\n return (\n <HvVerticalNavigationTreeViewItem\n id={setId(id, itemId)}\n className={classes?.listItem}\n href={href}\n target={target}\n key={itemId}\n nodeId={itemId}\n label={<ItemText />}\n icon={icon}\n payload={item}\n selectable={selectable}\n disabled={disabled}\n onMouseEnter={itemMouseEnterHandler}\n disableTooltip={disableTooltip}\n >\n {children\n ? createListHierarchy(\n children,\n id,\n classes,\n mouseEnterHandler,\n disableTooltip\n )\n : undefined}\n </HvVerticalNavigationTreeViewItem>\n );\n });\n\nconst getAllParents = (items) => {\n const parents = items.filter(\n (item) => item.data != null && item.data.length > 0\n );\n const childParents = parents.flatMap((item) => getAllParents(item.data));\n\n return [...parents, ...childParents];\n};\n\nfunction pathToElement(data, targetId) {\n const path: string[] = [];\n\n if (data != null && data.length > 0) {\n for (let i = 0; i !== data.length; ++i) {\n const item = data[i];\n if (item.id === targetId) {\n path.push(item.id);\n break;\n }\n\n const subPaths = pathToElement(item.data, targetId);\n if (subPaths.length > 0) {\n path.push(item.id);\n path.push(...subPaths);\n break;\n }\n }\n }\n\n return path;\n}\n\nexport const HvVerticalNavigationTree = ({\n id,\n\n className,\n classes,\n\n data,\n\n mode = \"navigation\",\n\n collapsible = false,\n expanded: expandedProp,\n defaultExpanded,\n onToggle,\n\n selected: selectedProp,\n defaultSelected,\n onChange,\n\n ...others\n}: HvVerticalNavigationTreeProps) => {\n const [selected, setSelected] = useControlled(selectedProp, defaultSelected);\n const [expanded, setExpanded] = useControlled(expandedProp, () => {\n if (defaultExpanded === true) {\n // all parent nodes will be expanded by default\n return getAllParents(data).map((item) => item.id);\n }\n\n if (defaultExpanded === false) {\n // all parent nodes will be collapsed by default\n return [];\n }\n\n if (defaultExpanded == null) {\n if (selected != null) {\n // the path to the selected node will be expanded (default behaviour)\n const path = pathToElement(data, selected);\n return path.slice(0, -1);\n }\n\n // nothing is expanded\n return [];\n }\n\n return defaultExpanded;\n });\n\n const {\n isOpen,\n collapsedMode,\n slider,\n\n parentItem,\n withParentData,\n navigateToChildHandler,\n\n setParentData,\n setParentSelected,\n } = useContext(VerticalNavigationContext);\n\n const [navigationPopup, setNavigationPopup] = useState<{\n // This value is needed to guarantee that the NavigationPopup is fully re-rendered with keeping any previous values\n uniqueKey: string;\n anchorEl: HTMLButtonElement | null;\n fixedMode: boolean;\n data: NavigationData[];\n } | null>(null);\n\n const handleChange = useCallback(\n (event, selectedId, selectedItem) => {\n if (collapsedMode === \"icon\" && !isOpen && selectedItem.data) {\n const currentEventTarget = event.currentTarget;\n setNavigationPopup((prevState) => {\n // We want to close the popup in case the clicked element is the same as the previous one\n return prevState?.anchorEl === currentEventTarget\n ? null\n : {\n uniqueKey: uniqueId(),\n anchorEl: currentEventTarget,\n fixedMode: true,\n data: selectedItem.data,\n };\n });\n\n // We need this stopPropagation or else the Popup will close due to the clickaway being triggered\n event.stopPropagation();\n } else {\n setSelected(selectedId);\n setNavigationPopup(null);\n if (onChange) {\n onChange(event, selectedItem);\n }\n }\n },\n [onChange, setSelected]\n );\n\n const treeViewItemMouseEnterHandler = (event, item) => {\n const isCollapsedMode = collapsedMode === \"icon\" && !isOpen;\n\n if (isCollapsedMode && item.data && !navigationPopup?.fixedMode) {\n const currentEventTarget = event.currentTarget;\n\n setNavigationPopup?.({\n uniqueKey: uniqueId(),\n anchorEl: currentEventTarget,\n fixedMode: false,\n data: item.data,\n });\n } else if (isCollapsedMode && !item.data && !navigationPopup?.fixedMode) {\n setNavigationPopup(null);\n }\n };\n\n const handleToggle = useCallback(\n (event, newExpanded) => {\n setExpanded(newExpanded);\n\n if (onToggle) {\n onToggle(event, newExpanded);\n }\n },\n [onToggle, setExpanded]\n );\n\n const children = useMemo(\n () =>\n data &&\n createListHierarchy(\n data,\n id,\n classes,\n treeViewItemMouseEnterHandler,\n navigationPopup?.fixedMode\n ),\n [classes, data, id, navigationPopup, isOpen]\n );\n\n useEffect(() => {\n if (!isOpen) {\n setNavigationPopup?.(null);\n }\n }, [isOpen]);\n\n useEffect(() => {\n if (setParentSelected) setParentSelected(selected);\n }, [selected, setSelected]);\n\n useEffect(() => {\n if (setParentData) setParentData(data);\n }, [data]);\n\n //navigation slider\n const navigateToTargetHandler = (event, selectedItem) => {\n handleChange(event, selectedItem.id, selectedItem);\n };\n\n const handleNavigationPopupClose = () => {\n setNavigationPopup(null);\n };\n\n const handleStyledNavMouseLeave = () => {\n if (collapsedMode === \"icon\" && !isOpen && !navigationPopup?.fixedMode) {\n setNavigationPopup(null);\n }\n };\n\n return (\n <StyledNav\n id={id}\n className={clsx(\n className,\n verticalNavigationTreeClasses.root,\n classes?.root,\n !isOpen &&\n collapsedMode == \"simple\" &&\n clsx(verticalNavigationTreeClasses.collapsed, classes?.collapsed)\n )}\n onMouseLeave={handleStyledNavMouseLeave}\n {...others}\n >\n {slider ? (\n <HvVerticalNavigationSlider\n data={parentItem.data || withParentData}\n selected={selected}\n onNavigateToTarget={navigateToTargetHandler}\n onNavigateToChild={navigateToChildHandler}\n />\n ) : (\n <HvVerticalNavigationTreeView\n id={setId(id, \"tree\")}\n className={clsx(verticalNavigationTreeClasses.list, classes?.list)}\n selectable\n mode={mode}\n collapsible={collapsible}\n selected={selected}\n onChange={handleChange}\n expanded={expanded}\n onToggle={handleToggle}\n >\n {collapsedMode === \"icon\" && !isOpen && navigationPopup && (\n <HvVerticalNavigationPopup\n id={setId(id, \"navigation-popup\")}\n key={navigationPopup.uniqueKey}\n anchorEl={navigationPopup.anchorEl}\n selected={selected}\n fixedMode={navigationPopup.fixedMode}\n data={navigationPopup.data}\n onClose={handleNavigationPopupClose}\n onChange={handleChange}\n />\n )}\n {children}\n </HvVerticalNavigationTreeView>\n )}\n </StyledNav>\n );\n};\n\nexport type HvVerticalNavigationTreeProps = HvBaseProps<\n HTMLDivElement,\n { onChange }\n> & {\n /**\n * Id to be applied to the root node.\n */\n id?: string;\n /**\n * Class names to be applied.\n */\n className?: string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvVerticalNavigationTreeClasses;\n /**\n * Modus operandi (role) of the widget instance.\n */\n mode?: NavigationMode;\n /**\n * Can non-leaf nodes be collapsed / expanded.\n */\n collapsible?: boolean;\n /**\n * The ID of the selected page.\n */\n selected?: string;\n /**\n * When uncontrolled, defines the initial selected page ID.\n */\n defaultSelected?: string;\n /**\n * Callback fired when a navigation item is selected.\n *\n * @param {object} event The event source of the callback.\n * @param {object} page The data of the selected page.\n */\n onChange?: (event, page) => void;\n /**\n * Expanded nodes' ids.\n */\n expanded?: string[];\n /**\n * When uncontrolled, defines the initial expanded nodes' ids.\n *\n * It also supports `true` for starting with all nodes expanded.\n * With `false` all nodes will be collapsed.\n *\n * By default it expands the needed nodes to display the current selection, if any.\n */\n defaultExpanded?: string[] | boolean;\n /**\n * Callback fired when tree items are expanded/collapsed.\n *\n * @param {object} event The event source of the callback.\n * @param {array} nodeIds The ids of the expanded nodes (old and new).\n */\n onToggle?: (event, nodeIds) => void;\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 * 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\nexport type NavigationMode = \"treeview\" | \"navigation\" | \"slider\";\n"],"names":["createListHierarchy","items","id","classes","mouseEnterHandler","disableTooltip","map","item","itemId","label","itemLabel","icon","data","children","selectable","disabled","href","target","ItemText","wrapperTooltip","itemMouseEnterHandler","event","HvVerticalNavigationTreeViewItem","setId","className","listItem","nodeId","_jsx","payload","onMouseEnter","undefined","getAllParents","parents","filter","length","childParents","flatMap","pathToElement","targetId","path","i","push","subPaths","HvVerticalNavigationTree","mode","collapsible","expanded","expandedProp","defaultExpanded","onToggle","selected","selectedProp","defaultSelected","onChange","others","setSelected","useControlled","setExpanded","slice","isOpen","collapsedMode","slider","parentItem","withParentData","navigateToChildHandler","setParentData","setParentSelected","useContext","VerticalNavigationContext","navigationPopup","setNavigationPopup","useState","handleChange","useCallback","selectedId","selectedItem","currentEventTarget","currentTarget","prevState","anchorEl","uniqueKey","uniqueId","fixedMode","stopPropagation","treeViewItemMouseEnterHandler","isCollapsedMode","handleToggle","newExpanded","useMemo","useEffect","navigateToTargetHandler","handleNavigationPopupClose","handleStyledNavMouseLeave","StyledNav","clsx","verticalNavigationTreeClasses","root","collapsed","onMouseLeave","HvVerticalNavigationSlider","onNavigateToTarget","onNavigateToChild","_jsxs","HvVerticalNavigationTreeView","list","HvVerticalNavigationPopup","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;AAyDA,MAAMA,sBAAsBA,CAC1BC,OACAC,IACAC,SACAC,mBACAC,iBAAiB,UAEjBJ,MAAMK,IAAKC,CAAS,SAAA;AACZ,QAAA;AAAA,IACJL,IAAIM;AAAAA,IACJC,OAAOC;AAAAA,IACPC;AAAAA,IACAC,MAAMC;AAAAA,IACNC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,EACEV,IAAAA;AAEJ,QAAMW,WAAWC,eAAA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A,MACAC;AAAAA,MACAK;AAAAA,MACAG,UAAUmB;AAAAA,MACV1B;AAAAA,MACAG,UAAUqC;AAAAA,MAAazE,UAEtB+C,CAAAA,kBAAkB,UAAU,CAACD,UAAUU,kDACrCoC,2CAAyB;AAAA,QACxBvG,IAAIqB,MAAAA,MAAMrB,IAAI,kBAAkB;AAAA,QAEhC6E,UAAUV,gBAAgBU;AAAAA,QAC1B7B;AAAAA,QACAgC,WAAWb,gBAAgBa;AAAAA,QAC3BtE,MAAMyD,gBAAgBzD;AAAAA,QACtB8F,SAASf;AAAAA,QACTtC,UAAUmB;AAAAA,MAAAA,GANLH,gBAAgBW,SAAS,GASjCnE,QAAQ;AAAA,IAAA,CAAA;AAAA,EAAA,CAGH;AAEhB;;"}
@@ -16,7 +16,10 @@ const StyledNav = /* @__PURE__ */ _styled__default.default("nav", process.env.NO
16
16
  overflowY: "auto",
17
17
  [`&.${navigationClasses.default.collapsed}`]: {
18
18
  display: "none"
19
+ },
20
+ [`&.${navigationClasses.default.popup}`]: {
21
+ boxShadow: "inset 5px 0 5px -3px rgb(65 65 65 / 12%)"
19
22
  }
20
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL05hdmlnYXRpb24vTmF2aWdhdGlvbi5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl5QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9jb21wb25lbnRzL1ZlcnRpY2FsTmF2aWdhdGlvbi9OYXZpZ2F0aW9uL05hdmlnYXRpb24uc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tIFwiQGhpdGFjaGl2YW50YXJhL3Vpa2l0LXN0eWxlc1wiO1xuaW1wb3J0IG5hdmlnYXRpb25DbGFzc2VzIGZyb20gXCIuL25hdmlnYXRpb25DbGFzc2VzXCI7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWROYXYgPSBzdHlsZWQoXCJuYXZcIikoe1xuICBkaXNwbGF5OiBcImJsb2NrXCIsXG4gIGJhY2tncm91bmQ6IHRoZW1lLmNvbG9ycy5hdG1vMSxcblxuICBvdmVyZmxvd1k6IFwiYXV0b1wiLFxuXG4gIFtgJi4ke25hdmlnYXRpb25DbGFzc2VzLmNvbGxhcHNlZH1gXToge1xuICAgIGRpc3BsYXk6IFwibm9uZVwiLFxuICB9LFxufSk7XG4iXX0= */");
23
+ }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL05hdmlnYXRpb24vTmF2aWdhdGlvbi5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl5QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9jb21wb25lbnRzL1ZlcnRpY2FsTmF2aWdhdGlvbi9OYXZpZ2F0aW9uL05hdmlnYXRpb24uc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tIFwiQGhpdGFjaGl2YW50YXJhL3Vpa2l0LXN0eWxlc1wiO1xuaW1wb3J0IG5hdmlnYXRpb25DbGFzc2VzIGZyb20gXCIuL25hdmlnYXRpb25DbGFzc2VzXCI7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWROYXYgPSBzdHlsZWQoXCJuYXZcIikoe1xuICBkaXNwbGF5OiBcImJsb2NrXCIsXG4gIGJhY2tncm91bmQ6IHRoZW1lLmNvbG9ycy5hdG1vMSxcblxuICBvdmVyZmxvd1k6IFwiYXV0b1wiLFxuXG4gIFtgJi4ke25hdmlnYXRpb25DbGFzc2VzLmNvbGxhcHNlZH1gXToge1xuICAgIGRpc3BsYXk6IFwibm9uZVwiLFxuICB9LFxuXG4gIFtgJi4ke25hdmlnYXRpb25DbGFzc2VzLnBvcHVwfWBdOiB7XG4gICAgYm94U2hhZG93OiBcImluc2V0IDVweCAwIDVweCAtM3B4IHJnYig2NSA2NSA2NSAvIDEyJSlcIixcbiAgfSxcbn0pO1xuIl19 */");
21
24
  exports.StyledNav = StyledNav;
22
25
  //# sourceMappingURL=Navigation.styles.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.styles.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/Navigation.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport navigationClasses from \"./navigationClasses\";\n\nexport const StyledNav = styled(\"nav\")({\n display: \"block\",\n background: theme.colors.atmo1,\n\n overflowY: \"auto\",\n\n [`&.${navigationClasses.collapsed}`]: {\n display: \"none\",\n },\n});\n"],"names":["StyledNav","_styled","process","env","NODE_ENV","target","label","display","background","theme","colors","atmo1","overflowY","navigationClasses","collapsed"],"mappings":";;;;;;;AAIO,MAAMA,YAAmBC,iCAAA,QAAA,OAAKC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAE;AAAA,EACrCC,SAAS;AAAA,EACTC,YAAYC,YAAAA,MAAMC,OAAOC;AAAAA,EAEzBC,WAAW;AAAA,EAEX,CAAE,KAAIC,0BAAkBC,WAAW,GAAG;AAAA,IACpCP,SAAS;AAAA,EACX;AACF,GAACL,QAAAC,IAAAC,aAAC,eAAA,KAAA,y/BAAA;;"}
1
+ {"version":3,"file":"Navigation.styles.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/Navigation.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport navigationClasses from \"./navigationClasses\";\n\nexport const StyledNav = styled(\"nav\")({\n display: \"block\",\n background: theme.colors.atmo1,\n\n overflowY: \"auto\",\n\n [`&.${navigationClasses.collapsed}`]: {\n display: \"none\",\n },\n\n [`&.${navigationClasses.popup}`]: {\n boxShadow: \"inset 5px 0 5px -3px rgb(65 65 65 / 12%)\",\n },\n});\n"],"names":["StyledNav","_styled","process","env","NODE_ENV","target","label","display","background","theme","colors","atmo1","overflowY","navigationClasses","collapsed","popup","boxShadow"],"mappings":";;;;;;;AAIO,MAAMA,YAAmBC,iCAAA,QAAA,OAAKC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAE;AAAA,EACrCC,SAAS;AAAA,EACTC,YAAYC,YAAAA,MAAMC,OAAOC;AAAAA,EAEzBC,WAAW;AAAA,EAEX,CAAE,KAAIC,0BAAkBC,WAAW,GAAG;AAAA,IACpCP,SAAS;AAAA,EACX;AAAA,EAEA,CAAE,KAAIM,0BAAkBE,OAAO,GAAG;AAAA,IAChCC,WAAW;AAAA,EACb;AACF,GAACd,QAAAC,IAAAC,aAAC,eAAA,KAAA,yoCAAA;;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const classes = require("../../../utils/classes.cjs");
4
- const classKeys = ["root", "list", "listItem", "collapsed"];
4
+ const classKeys = ["root", "list", "listItem", "collapsed", "popup"];
5
5
  const verticalNavigationTreeClasses = classes.getClasses(classKeys, "HvVerticalNavigationTree");
6
6
  const verticalNavigationTreeClasses$1 = verticalNavigationTreeClasses;
7
7
  exports.default = verticalNavigationTreeClasses$1;
@@ -1 +1 @@
1
- {"version":3,"file":"navigationClasses.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/navigationClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvVerticalNavigationTreeClasses = {\n root?: string;\n list?: string;\n listItem?: string;\n collapsed?: string;\n};\n\nconst classKeys: string[] = [\"root\", \"list\", \"listItem\", \"collapsed\"];\n\nconst verticalNavigationTreeClasses =\n getClasses<HvVerticalNavigationTreeClasses>(\n classKeys,\n \"HvVerticalNavigationTree\"\n );\n\nexport default verticalNavigationTreeClasses;\n"],"names":["classKeys","verticalNavigationTreeClasses","getClasses"],"mappings":";;;AASA,MAAMA,YAAsB,CAAC,QAAQ,QAAQ,YAAY,WAAW;AAEpE,MAAMC,gCACJC,QACEF,WAAAA,WACA,0BAA0B;AAG9B,MAAA,kCAAeC;;"}
1
+ {"version":3,"file":"navigationClasses.cjs","sources":["../../../../../src/components/VerticalNavigation/Navigation/navigationClasses.ts"],"sourcesContent":["import { getClasses } from \"~/utils\";\n\nexport type HvVerticalNavigationTreeClasses = {\n root?: string;\n list?: string;\n listItem?: string;\n collapsed?: string;\n popup?: string;\n};\n\nconst classKeys: string[] = [\"root\", \"list\", \"listItem\", \"collapsed\", \"popup\"];\n\nconst verticalNavigationTreeClasses =\n getClasses<HvVerticalNavigationTreeClasses>(\n classKeys,\n \"HvVerticalNavigationTree\"\n );\n\nexport default verticalNavigationTreeClasses;\n"],"names":["classKeys","verticalNavigationTreeClasses","getClasses"],"mappings":";;;AAUA,MAAMA,YAAsB,CAAC,QAAQ,QAAQ,YAAY,aAAa,OAAO;AAE7E,MAAMC,gCACJC,QACEF,WAAAA,WACA,0BAA0B;AAG9B,MAAA,kCAAeC;;"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const material = require("@mui/material");
4
+ const clsx = require("clsx");
5
+ const NavigationPopup_styles = require("./NavigationPopup.styles.cjs");
6
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
7
+ const VerticalNavigation = require("../VerticalNavigation.cjs");
8
+ const Navigation = require("../Navigation/Navigation.cjs");
9
+ const navigationClasses = require("../Navigation/navigationClasses.cjs");
10
+ const setId = require("../../../utils/setId.cjs");
11
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
+ const clsx__default = /* @__PURE__ */ _interopDefault(clsx);
13
+ const HvVerticalNavigationPopup = ({
14
+ id,
15
+ anchorEl,
16
+ fixedMode,
17
+ onClose,
18
+ data,
19
+ selected,
20
+ onChange
21
+ }) => {
22
+ const handleClickAway = () => {
23
+ onClose == null ? void 0 : onClose();
24
+ };
25
+ const handleChange = (event, selectedItem) => {
26
+ onChange(event, selectedItem.id, selectedItem);
27
+ };
28
+ const handleMouseLeave = () => {
29
+ if (!fixedMode) {
30
+ onClose == null ? void 0 : onClose();
31
+ }
32
+ };
33
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Popper, {
34
+ open: true,
35
+ anchorEl,
36
+ placement: "right-start",
37
+ children: /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, {
38
+ onClickAway: handleClickAway,
39
+ children: /* @__PURE__ */ jsxRuntime.jsx(NavigationPopup_styles.StyledPopupContainer, {
40
+ children: /* @__PURE__ */ jsxRuntime.jsx(VerticalNavigation.HvVerticalNavigation, {
41
+ open: true,
42
+ children: /* @__PURE__ */ jsxRuntime.jsx(Navigation.HvVerticalNavigationTree, {
43
+ className: clsx__default.default(navigationClasses.default.popup),
44
+ id: setId.setId(id, "tree"),
45
+ collapsible: true,
46
+ defaultExpanded: true,
47
+ selected,
48
+ onChange: handleChange,
49
+ data,
50
+ onMouseLeave: handleMouseLeave
51
+ })
52
+ })
53
+ })
54
+ })
55
+ });
56
+ };
57
+ exports.HvVerticalNavigationPopup = HvVerticalNavigationPopup;
58
+ //# sourceMappingURL=NavigationPopup.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationPopup.cjs","sources":["../../../../../src/components/VerticalNavigation/NavigationPopup/NavigationPopup.tsx"],"sourcesContent":["import { Popper, ClickAwayListener } from \"@mui/material\";\nimport clsx from \"clsx\";\n\nimport {\n NavigationData,\n HvVerticalNavigationTree,\n HvVerticalNavigation,\n verticalNavigationTreeClasses,\n} from \"~/components\";\nimport { setId } from \"~/utils\";\n\nimport { StyledPopupContainer } from \"./NavigationPopup.styles\";\n\nexport type HvVerticalNavigationPopupProps = {\n id?: string;\n anchorEl?: HTMLElement | null;\n fixedMode?: boolean;\n data?: NavigationData[];\n selected?: string;\n onClose?: () => void;\n onChange?: any;\n};\n\nexport const HvVerticalNavigationPopup = ({\n id,\n anchorEl,\n fixedMode,\n onClose,\n data,\n selected,\n onChange,\n}: HvVerticalNavigationPopupProps) => {\n const handleClickAway = () => {\n onClose?.();\n };\n\n const handleChange = (event, selectedItem) => {\n onChange(event, selectedItem.id, selectedItem);\n };\n\n const handleMouseLeave = () => {\n if (!fixedMode) {\n onClose?.();\n }\n };\n\n return (\n <Popper open anchorEl={anchorEl} placement=\"right-start\">\n <ClickAwayListener onClickAway={handleClickAway}>\n <StyledPopupContainer>\n <HvVerticalNavigation open>\n <HvVerticalNavigationTree\n className={clsx(verticalNavigationTreeClasses.popup)}\n id={setId(id, \"tree\")}\n collapsible\n defaultExpanded\n selected={selected}\n onChange={handleChange}\n data={data}\n onMouseLeave={handleMouseLeave}\n />\n </HvVerticalNavigation>\n </StyledPopupContainer>\n </ClickAwayListener>\n </Popper>\n );\n};\n"],"names":["HvVerticalNavigationPopup","id","anchorEl","fixedMode","onClose","data","selected","onChange","handleClickAway","handleChange","event","selectedItem","handleMouseLeave","Popper","open","placement","children","ClickAwayListener","onClickAway","StyledPopupContainer","HvVerticalNavigation","HvVerticalNavigationTree","className","clsx","verticalNavigationTreeClasses","popup","setId","collapsible","defaultExpanded","onMouseLeave"],"mappings":";;;;;;;;;;;;AAuBO,MAAMA,4BAA4BA,CAAC;AAAA,EACxCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAC8B,MAAM;AACpC,QAAMC,kBAAkBA,MAAM;AACjB;AAAA,EAAA;AAGPC,QAAAA,eAAeA,CAACC,OAAOC,iBAAiB;AACnCD,aAAAA,OAAOC,aAAaV,IAAIU,YAAY;AAAA,EAAA;AAG/C,QAAMC,mBAAmBA,MAAM;AAC7B,QAAI,CAACT,WAAW;AACH;AAAA,IACb;AAAA,EAAA;AAGF,wCACGU,SAAAA,QAAM;AAAA,IAACC,MAAI;AAAA,IAACZ;AAAAA,IAAoBa,WAAU;AAAA,IAAaC,yCACrDC,4BAAiB;AAAA,MAACC,aAAaV;AAAAA,MAAgBQ,yCAC7CG,6CAAoB;AAAA,QAAAH,yCAClBI,yCAAoB;AAAA,UAACN,MAAI;AAAA,UAAAE,yCACvBK,qCAAwB;AAAA,YACvBC,WAAWC,cAAAA,QAAKC,kBAAAA,QAA8BC,KAAK;AAAA,YACnDxB,IAAIyB,MAAAA,MAAMzB,IAAI,MAAM;AAAA,YACpB0B,aAAW;AAAA,YACXC,iBAAe;AAAA,YACftB;AAAAA,YACAC,UAAUE;AAAAA,YACVJ;AAAAA,YACAwB,cAAcjB;AAAAA,UAAAA,CAAiB;AAAA,QAAA,CAC/B;AAAA,MAAA,CACmB;AAAA,IAAA,CACF;AAAA,EAAA,CAElB;AAEb;;"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("@emotion/styled/base");
4
+ const uikitStyles = require("@hitachivantara/uikit-styles");
5
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
6
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
7
+ const StyledPopupContainer = /* @__PURE__ */ _styled__default.default("div", process.env.NODE_ENV === "production" ? {
8
+ target: "es2o9lp0"
9
+ } : {
10
+ target: "es2o9lp0",
11
+ label: "StyledPopupContainer"
12
+ })({
13
+ marginLeft: uikitStyles.theme.spacing("xs")
14
+ }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL05hdmlnYXRpb25Qb3B1cC9OYXZpZ2F0aW9uUG9wdXAuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJb0MiLCJmaWxlIjoiL2hvbWUvcnVubmVyL3dvcmsvaHYtdWlraXQtcmVhY3QvaHYtdWlraXQtcmVhY3QvcGFja2FnZXMvY29yZS9zcmMvY29tcG9uZW50cy9WZXJ0aWNhbE5hdmlnYXRpb24vTmF2aWdhdGlvblBvcHVwL05hdmlnYXRpb25Qb3B1cC5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5cbmltcG9ydCB7IHRoZW1lIH0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS91aWtpdC1zdHlsZXNcIjtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFBvcHVwQ29udGFpbmVyID0gc3R5bGVkKFwiZGl2XCIpKHtcbiAgbWFyZ2luTGVmdDogdGhlbWUuc3BhY2luZyhcInhzXCIpLFxufSk7XG4iXX0= */");
15
+ exports.StyledPopupContainer = StyledPopupContainer;
16
+ //# sourceMappingURL=NavigationPopup.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationPopup.styles.cjs","sources":["../../../../../src/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const StyledPopupContainer = styled(\"div\")({\n marginLeft: theme.spacing(\"xs\"),\n});\n"],"names":["StyledPopupContainer","_styled","process","env","NODE_ENV","target","label","marginLeft","theme","spacing"],"mappings":";;;;;;AAIO,MAAMA,uBAA8BC,iCAAA,QAAA,OAAKC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAE;AAAA,EAChDC,YAAYC,YAAAA,MAAMC,QAAQ,IAAI;AAChC,GAACP,QAAAC,IAAAC,aAAC,eAAA,KAAA,yzBAAA;;"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
4
+ const React = require("react");
5
+ const IconWrapper_styles = require("./IconWrapper.styles.cjs");
6
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
7
+ const TooltipWrapper = require("../TooltipWrapper/TooltipWrapper.cjs");
8
+ const VerticalNavigationContext = require("../../VerticalNavigationContext.cjs");
9
+ const Avatar = require("../../../Avatar/Avatar.cjs");
10
+ const IconWrapper = ({
11
+ icon,
12
+ label,
13
+ hasChildren,
14
+ showAvatar,
15
+ isOpen,
16
+ disableTooltip
17
+ }) => {
18
+ const {
19
+ hasAnyChildWithData
20
+ } = React.useContext(VerticalNavigationContext.VerticalNavigationContext);
21
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipWrapper.TooltipWrapper, {
22
+ showTooltip: !hasChildren && !isOpen && !disableTooltip,
23
+ label,
24
+ children: /* @__PURE__ */ jsxRuntime.jsxs(IconWrapper_styles.StyledIconsContainer, {
25
+ hasAnyChildWithData,
26
+ children: [showAvatar ? /* @__PURE__ */ jsxRuntime.jsx(Avatar.HvAvatar, {
27
+ variant: "square",
28
+ size: "xs",
29
+ backgroundColor: "secondary_80",
30
+ style: {
31
+ fontSize: "15px"
32
+ },
33
+ children: label.substring(0, 1)
34
+ }) : icon, hasChildren && !isOpen ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Forwards, {
35
+ iconSize: "XS"
36
+ }) : hasAnyChildWithData && !isOpen && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper_styles.SpacerDiv, {})]
37
+ })
38
+ });
39
+ };
40
+ exports.IconWrapper = IconWrapper;
41
+ //# sourceMappingURL=IconWrapper.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconWrapper.cjs","sources":["../../../../../../src/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.tsx"],"sourcesContent":["import { Forwards } from \"@hitachivantara/uikit-react-icons\";\nimport { useContext } from \"react\";\n\nimport { HvAvatar, VerticalNavigationContext } from \"~/components\";\n\nimport { TooltipWrapper } from \"../TooltipWrapper\";\nimport { SpacerDiv, StyledIconsContainer } from \"./IconWrapper.styles\";\n\nexport const IconWrapper = ({\n icon,\n label,\n hasChildren,\n showAvatar,\n isOpen,\n disableTooltip,\n}) => {\n const { hasAnyChildWithData } = useContext(VerticalNavigationContext);\n return (\n <TooltipWrapper\n showTooltip={!hasChildren && !isOpen && !disableTooltip}\n label={label}\n >\n <StyledIconsContainer hasAnyChildWithData={hasAnyChildWithData}>\n {showAvatar ? (\n <HvAvatar\n variant=\"square\"\n size=\"xs\"\n backgroundColor=\"secondary_80\"\n style={{ fontSize: \"15px\" }}\n >\n {label.substring(0, 1)}\n </HvAvatar>\n ) : (\n icon\n )}\n\n {hasChildren && !isOpen ? (\n <Forwards iconSize=\"XS\" />\n ) : (\n hasAnyChildWithData && !isOpen && <SpacerDiv />\n )}\n </StyledIconsContainer>\n </TooltipWrapper>\n );\n};\n"],"names":["IconWrapper","icon","label","hasChildren","showAvatar","isOpen","disableTooltip","hasAnyChildWithData","useContext","VerticalNavigationContext","TooltipWrapper","showTooltip","children","StyledIconsContainer","_jsx","HvAvatar","variant","size","backgroundColor","style","fontSize","substring","Forwards","iconSize","SpacerDiv"],"mappings":";;;;;;;;;AAQO,MAAMA,cAAcA,CAAC;AAAA,EAC1BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AACF,MAAM;AACE,QAAA;AAAA,IAAEC;AAAAA,EAAAA,IAAwBC,MAAAA,WAAWC,0BAAAA,yBAAyB;AACpE,wCACGC,eAAAA,gBAAc;AAAA,IACbC,aAAa,CAACR,eAAe,CAACE,UAAU,CAACC;AAAAA,IACzCJ;AAAAA,IAAaU,0CAEZC,yCAAoB;AAAA,MAACN;AAAAA,MAAyCK,UAC5DR,CAAAA,aACCU,2BAAAA,IAACC,iBAAQ;AAAA,QACPC,SAAQ;AAAA,QACRC,MAAK;AAAA,QACLC,iBAAgB;AAAA,QAChBC,OAAO;AAAA,UAAEC,UAAU;AAAA,QAAO;AAAA,QAAER,UAE3BV,MAAMmB,UAAU,GAAG,CAAC;AAAA,MAAA,CACZ,IAEXpB,MAGDE,eAAe,CAACE,wCACdiB,gBAAAA,UAAQ;AAAA,QAACC,UAAS;AAAA,MAAA,CAAO,IAE1BhB,uBAAuB,CAACF,UAAWmB,2BAAAA,IAAAA,mBAAAA,WACpC,CAAA,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA,EAAA,CAEY;AAErB;;"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("@emotion/styled/base");
4
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
6
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() {
7
+ return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
8
+ }
9
+ const StyledIconsContainer = /* @__PURE__ */ _styled__default.default("div", process.env.NODE_ENV === "production" ? {
10
+ target: "emephz1"
11
+ } : {
12
+ target: "emephz1",
13
+ label: "StyledIconsContainer"
14
+ })(({
15
+ hasAnyChildWithData
16
+ }) => ({
17
+ display: "flex",
18
+ [`> div:first-of-type`]: {
19
+ marginLeft: hasAnyChildWithData ? "auto" : "unset"
20
+ },
21
+ [`> div:nth-of-type(2)`]: {
22
+ width: "14px",
23
+ marginLeft: "auto"
24
+ }
25
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL1RyZWVWaWV3L0ljb25XcmFwcGVyL0ljb25XcmFwcGVyLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTW9DIiwiZmlsZSI6Ii9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL1RyZWVWaWV3L0ljb25XcmFwcGVyL0ljb25XcmFwcGVyLnN0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcblxuaW50ZXJmYWNlIFN0eWxlZEljb25zQ29udGFpbmVyUHJvcHMge1xuICBoYXNBbnlDaGlsZFdpdGhEYXRhPzogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IFN0eWxlZEljb25zQ29udGFpbmVyID0gc3R5bGVkKFwiZGl2XCIpKFxuICAoeyBoYXNBbnlDaGlsZFdpdGhEYXRhIH06IFN0eWxlZEljb25zQ29udGFpbmVyUHJvcHMpID0+ICh7XG4gICAgZGlzcGxheTogXCJmbGV4XCIsXG5cbiAgICBbYD4gZGl2OmZpcnN0LW9mLXR5cGVgXToge1xuICAgICAgbWFyZ2luTGVmdDogaGFzQW55Q2hpbGRXaXRoRGF0YSA/IFwiYXV0b1wiIDogXCJ1bnNldFwiLFxuICAgIH0sXG5cbiAgICBbYD4gZGl2Om50aC1vZi10eXBlKDIpYF06IHtcbiAgICAgIHdpZHRoOiBcIjE0cHhcIixcbiAgICAgIG1hcmdpbkxlZnQ6IFwiYXV0b1wiLFxuICAgIH0sXG4gIH0pXG4pO1xuXG5leHBvcnQgY29uc3QgU3BhY2VyRGl2ID0gc3R5bGVkKFwiZGl2XCIpKHt9KTtcbiJdfQ== */");
26
+ const SpacerDiv = /* @__PURE__ */ _styled__default.default("div", process.env.NODE_ENV === "production" ? {
27
+ target: "emephz0"
28
+ } : {
29
+ target: "emephz0",
30
+ label: "SpacerDiv"
31
+ })(process.env.NODE_ENV === "production" ? {
32
+ name: "0",
33
+ styles: ""
34
+ } : {
35
+ name: "0",
36
+ styles: "",
37
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVmVydGljYWxOYXZpZ2F0aW9uL1RyZWVWaWV3L0ljb25XcmFwcGVyL0ljb25XcmFwcGVyLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUJ5QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9jb21wb25lbnRzL1ZlcnRpY2FsTmF2aWdhdGlvbi9UcmVlVmlldy9JY29uV3JhcHBlci9JY29uV3JhcHBlci5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5cbmludGVyZmFjZSBTdHlsZWRJY29uc0NvbnRhaW5lclByb3BzIHtcbiAgaGFzQW55Q2hpbGRXaXRoRGF0YT86IGJvb2xlYW47XG59XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJY29uc0NvbnRhaW5lciA9IHN0eWxlZChcImRpdlwiKShcbiAgKHsgaGFzQW55Q2hpbGRXaXRoRGF0YSB9OiBTdHlsZWRJY29uc0NvbnRhaW5lclByb3BzKSA9PiAoe1xuICAgIGRpc3BsYXk6IFwiZmxleFwiLFxuXG4gICAgW2A+IGRpdjpmaXJzdC1vZi10eXBlYF06IHtcbiAgICAgIG1hcmdpbkxlZnQ6IGhhc0FueUNoaWxkV2l0aERhdGEgPyBcImF1dG9cIiA6IFwidW5zZXRcIixcbiAgICB9LFxuXG4gICAgW2A+IGRpdjpudGgtb2YtdHlwZSgyKWBdOiB7XG4gICAgICB3aWR0aDogXCIxNHB4XCIsXG4gICAgICBtYXJnaW5MZWZ0OiBcImF1dG9cIixcbiAgICB9LFxuICB9KVxuKTtcblxuZXhwb3J0IGNvbnN0IFNwYWNlckRpdiA9IHN0eWxlZChcImRpdlwiKSh7fSk7XG4iXX0= */",
38
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
+ });
40
+ exports.SpacerDiv = SpacerDiv;
41
+ exports.StyledIconsContainer = StyledIconsContainer;
42
+ //# sourceMappingURL=IconWrapper.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconWrapper.styles.cjs","sources":["../../../../../../src/components/VerticalNavigation/TreeView/IconWrapper/IconWrapper.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\ninterface StyledIconsContainerProps {\n hasAnyChildWithData?: boolean;\n}\n\nexport const StyledIconsContainer = styled(\"div\")(\n ({ hasAnyChildWithData }: StyledIconsContainerProps) => ({\n display: \"flex\",\n\n [`> div:first-of-type`]: {\n marginLeft: hasAnyChildWithData ? \"auto\" : \"unset\",\n },\n\n [`> div:nth-of-type(2)`]: {\n width: \"14px\",\n marginLeft: \"auto\",\n },\n })\n);\n\nexport const SpacerDiv = styled(\"div\")({});\n"],"names":["StyledIconsContainer","_styled","process","env","NODE_ENV","target","label","hasAnyChildWithData","display","marginLeft","width","SpacerDiv","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"mappings":";;;;;;;;AAMO,MAAMA,uBAA8BC,iCAAA,QAAA,OAAKC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAC9C,CAAC;AAAA,EAAEC;AAA+C,OAAO;AAAA,EACvDC,SAAS;AAAA,EAET,CAAE,qBAAoB,GAAG;AAAA,IACvBC,YAAYF,sBAAsB,SAAS;AAAA,EAC7C;AAAA,EAEA,CAAE,sBAAqB,GAAG;AAAA,IACxBG,OAAO;AAAA,IACPD,YAAY;AAAA,EACd;AACF,IAAEP,QAAAC,IAAAC,aACH,eAAA,KAAA,yuCAAA;AAEM,MAAMO,YAAmBV,iCAAA,QAAA,OAAKC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAACJ,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAQ,MAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAD,MAAA;AAAA,EAAAC,QAAA;AAAA,EAAAC,KAAA;AAAA,EAAAC,UAAAC;AAAA,CAAI;;;"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const Tooltip = require("../../../Tooltip/Tooltip.cjs");
5
+ const Typography = require("../../../Typography/Typography.cjs");
6
+ const TooltipWrapper = ({
7
+ showTooltip,
8
+ label,
9
+ children,
10
+ placement = "right"
11
+ }) => {
12
+ if (showTooltip) {
13
+ return /* @__PURE__ */ jsxRuntime.jsx(Tooltip.HvTooltip, {
14
+ title: /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, {
15
+ children: label
16
+ }),
17
+ placement,
18
+ children
19
+ });
20
+ }
21
+ return children;
22
+ };
23
+ exports.TooltipWrapper = TooltipWrapper;
24
+ //# sourceMappingURL=TooltipWrapper.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipWrapper.cjs","sources":["../../../../../../src/components/VerticalNavigation/TreeView/TooltipWrapper/TooltipWrapper.tsx"],"sourcesContent":["import { HvTooltip, HvTooltipPlacementType, HvTypography } from \"~/components\";\n\ninterface TooltipWrapperProps {\n showTooltip: boolean;\n label: string;\n children: React.ReactElement;\n placement?: HvTooltipPlacementType;\n}\n\nexport const TooltipWrapper = ({\n showTooltip,\n label,\n children,\n placement = \"right\",\n}: TooltipWrapperProps) => {\n if (showTooltip) {\n return (\n <HvTooltip\n title={<HvTypography>{label}</HvTypography>}\n placement={placement}\n >\n {children}\n </HvTooltip>\n );\n }\n return children;\n};\n"],"names":["TooltipWrapper","showTooltip","label","children","placement","HvTooltip","title","HvTypography"],"mappings":";;;;;AASO,MAAMA,iBAAiBA,CAAC;AAAA,EAC7BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,YAAY;AACO,MAAM;AACzB,MAAIH,aAAa;AACf,0CACGI,QAAAA,WAAS;AAAA,MACRC,sCAAQC,yBAAY;AAAA,QAAAJ,UAAED;AAAAA,MAAAA,CAAsB;AAAA,MAC5CE;AAAAA,MAAqBD;AAAAA,IAAAA,CAGX;AAAA,EAEhB;AACOA,SAAAA;AACT;;"}