@digigov/ui 1.0.0-480e3d97 → 1.0.0-55e4210c

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 (286) hide show
  1. package/app/Footer/Footer.stories.playwright.json +2 -2
  2. package/app/Header/Header.stories.playwright.json +1 -1
  3. package/app/Header/__stories__/WithHeaderNavigation.js +13 -21
  4. package/app/Header/__stories__/WithNavigation.js +8 -40
  5. package/app/Masthead/Masthead.stories.playwright.json +1 -1
  6. package/app/ThemeOptions/index.js +2 -2
  7. package/content/Details/index.mdx +5 -0
  8. package/content/Table/__stories__/WithFloatingScroll.js +10 -4
  9. package/content/Table/index.js +7 -5
  10. package/content/Table/index.mdx +1 -1
  11. package/es/app/Footer/Footer.stories.playwright.json +2 -2
  12. package/es/app/Header/Header.stories.playwright.json +1 -1
  13. package/es/app/Header/__stories__/WithHeaderNavigation.js +13 -13
  14. package/es/app/Header/__stories__/WithNavigation.js +9 -36
  15. package/es/app/Masthead/Masthead.stories.playwright.json +1 -1
  16. package/es/app/ThemeOptions/index.js +2 -2
  17. package/es/content/Details/index.mdx +5 -0
  18. package/es/content/Table/__stories__/WithFloatingScroll.js +5 -4
  19. package/es/content/Table/index.js +7 -4
  20. package/es/content/Table/index.mdx +1 -1
  21. package/es/feedback/ServiceBadge/index.mdx +9 -5
  22. package/es/form/Button/index.mdx +4 -4
  23. package/es/form/Checkbox/index.mdx +5 -0
  24. package/es/form/DateInputContainer/index.mdx +5 -0
  25. package/es/form/FileUpload/index.mdx +2 -0
  26. package/es/form/RadioContainer/index.mdx +5 -0
  27. package/es/form/SelectContainer/index.mdx +6 -0
  28. package/es/icons/Icon/index.js +2 -2
  29. package/es/layouts/Grid/Grid.stories.js +1 -0
  30. package/es/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
  31. package/es/navigation/Breadcrumbs/index.mdx +5 -0
  32. package/es/navigation/Drawer/__stories__/Default.js +25 -66
  33. package/es/navigation/Dropdown/__stories__/AlignRight.js +9 -8
  34. package/es/navigation/Dropdown/__stories__/Default.js +9 -8
  35. package/es/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
  36. package/es/navigation/Dropdown/index.mdx +0 -2
  37. package/es/navigation/Link/index.js +21 -1
  38. package/es/navigation/Link/index.mdx +2 -0
  39. package/es/navigation/NavList/NavList.stories.playwright.json +2 -2
  40. package/es/navigation/NavList/NavListAuto/index.js +54 -0
  41. package/es/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
  42. package/es/navigation/NavList/__stories__/Default.js +12 -28
  43. package/es/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
  44. package/es/navigation/NavList/hooks/useNavList.js +2 -2
  45. package/es/navigation/NavList/hooks/useTogglableNav.js +33 -18
  46. package/es/navigation/NavList/index.js +16 -17
  47. package/es/navigation/NavList/types.js +1 -6
  48. package/es/navigation/Pagination/__stories__/Default.js +7 -65
  49. package/es/navigation/Pagination/index.mdx +1 -2
  50. package/es/navigation/Tabs/index.mdx +6 -0
  51. package/es/registry.js +4 -40
  52. package/es/typography/Hint/index.mdx +2 -0
  53. package/es/typography/NormalText/index.mdx +2 -0
  54. package/es/typography/Paragraph/index.mdx +1 -0
  55. package/esm/app/Footer/Footer.stories.playwright.json +2 -2
  56. package/esm/app/Header/Header.stories.playwright.json +1 -1
  57. package/esm/app/Header/__stories__/WithHeaderNavigation.js +13 -13
  58. package/esm/app/Header/__stories__/WithNavigation.js +9 -36
  59. package/esm/app/Masthead/Masthead.stories.playwright.json +1 -1
  60. package/esm/app/ThemeOptions/index.js +2 -2
  61. package/esm/content/Details/index.mdx +5 -0
  62. package/esm/content/Table/__stories__/WithFloatingScroll.js +5 -4
  63. package/esm/content/Table/index.js +7 -4
  64. package/esm/content/Table/index.mdx +1 -1
  65. package/esm/feedback/ServiceBadge/index.mdx +9 -5
  66. package/esm/form/Button/index.mdx +4 -4
  67. package/esm/form/Checkbox/index.mdx +5 -0
  68. package/esm/form/DateInputContainer/index.mdx +5 -0
  69. package/esm/form/FileUpload/index.mdx +2 -0
  70. package/esm/form/RadioContainer/index.mdx +5 -0
  71. package/esm/form/SelectContainer/index.mdx +6 -0
  72. package/esm/icons/Icon/index.js +2 -2
  73. package/esm/index.js +1 -1
  74. package/esm/layouts/Grid/Grid.stories.js +1 -0
  75. package/esm/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
  76. package/esm/navigation/Breadcrumbs/index.mdx +5 -0
  77. package/esm/navigation/Drawer/__stories__/Default.js +25 -66
  78. package/esm/navigation/Dropdown/__stories__/AlignRight.js +9 -8
  79. package/esm/navigation/Dropdown/__stories__/Default.js +9 -8
  80. package/esm/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
  81. package/esm/navigation/Dropdown/index.mdx +0 -2
  82. package/esm/navigation/Link/index.js +21 -1
  83. package/esm/navigation/Link/index.mdx +2 -0
  84. package/esm/navigation/NavList/NavList.stories.playwright.json +2 -2
  85. package/esm/navigation/NavList/NavListAuto/index.js +54 -0
  86. package/esm/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
  87. package/esm/navigation/NavList/__stories__/Default.js +12 -28
  88. package/esm/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
  89. package/esm/navigation/NavList/hooks/useNavList.js +2 -2
  90. package/esm/navigation/NavList/hooks/useTogglableNav.js +33 -18
  91. package/esm/navigation/NavList/index.js +16 -17
  92. package/esm/navigation/NavList/types.js +1 -6
  93. package/esm/navigation/Pagination/__stories__/Default.js +7 -65
  94. package/esm/navigation/Pagination/index.mdx +1 -2
  95. package/esm/navigation/Tabs/index.mdx +6 -0
  96. package/esm/registry.js +4 -40
  97. package/esm/typography/Hint/index.mdx +2 -0
  98. package/esm/typography/NormalText/index.mdx +2 -0
  99. package/esm/typography/Paragraph/index.mdx +1 -0
  100. package/feedback/ServiceBadge/index.mdx +9 -5
  101. package/form/Button/index.mdx +4 -4
  102. package/form/Checkbox/index.mdx +5 -0
  103. package/form/DateInputContainer/index.mdx +5 -0
  104. package/form/FileUpload/index.mdx +2 -0
  105. package/form/RadioContainer/index.mdx +5 -0
  106. package/form/SelectContainer/index.mdx +6 -0
  107. package/icons/Icon/index.d.ts +2 -2
  108. package/icons/Icon/index.js +1 -1
  109. package/layouts/Basic/Content/index.d.ts +1 -1
  110. package/layouts/Basic/Side/index.d.ts +1 -1
  111. package/layouts/Grid/Grid.stories.d.ts +1 -0
  112. package/layouts/Grid/Grid.stories.js +14 -0
  113. package/layouts/Grid/__stories__/ResponsiveSpacing.d.ts +2 -0
  114. package/layouts/Grid/__stories__/ResponsiveSpacing.js +93 -0
  115. package/navigation/Breadcrumbs/index.mdx +5 -0
  116. package/navigation/Drawer/__stories__/Default.js +24 -68
  117. package/navigation/Dropdown/__stories__/AlignRight.js +9 -9
  118. package/navigation/Dropdown/__stories__/Default.js +9 -9
  119. package/navigation/Dropdown/__stories__/PlacementTop.js +9 -9
  120. package/navigation/Dropdown/index.mdx +0 -2
  121. package/navigation/Link/index.d.ts +1 -1
  122. package/navigation/Link/index.js +32 -7
  123. package/navigation/Link/index.mdx +2 -0
  124. package/navigation/NavList/NavList.stories.playwright.json +2 -2
  125. package/navigation/NavList/NavListAuto/index.js +80 -0
  126. package/navigation/NavList/NavMenuContentList.d.ts +5 -0
  127. package/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +10 -10
  128. package/navigation/NavList/__stories__/Default.js +12 -28
  129. package/navigation/NavList/__stories__/NavVerticalLayout.js +12 -32
  130. package/navigation/NavList/hooks/useNavList.d.ts +1 -1
  131. package/navigation/NavList/hooks/useNavList.js +2 -2
  132. package/navigation/NavList/hooks/useTogglableNav.d.ts +1 -0
  133. package/navigation/NavList/hooks/useTogglableNav.js +33 -18
  134. package/navigation/NavList/index.d.ts +16 -17
  135. package/navigation/NavList/index.js +54 -96
  136. package/navigation/NavList/types.d.ts +14 -17
  137. package/navigation/NavList/types.js +1 -14
  138. package/navigation/Pagination/__stories__/Default.js +7 -65
  139. package/navigation/Pagination/index.mdx +1 -2
  140. package/navigation/Tabs/index.mdx +6 -0
  141. package/package.json +3 -3
  142. package/registry.d.ts +2 -20
  143. package/registry.js +4 -58
  144. package/src/app/Footer/Footer.stories.playwright.json +2 -2
  145. package/src/app/Header/Header.stories.playwright.json +1 -1
  146. package/src/app/Header/__stories__/WithHeaderNavigation.tsx +23 -35
  147. package/src/app/Header/__stories__/WithNavigation.tsx +13 -34
  148. package/src/app/Masthead/Masthead.stories.playwright.json +1 -1
  149. package/src/app/ThemeOptions/index.tsx +3 -3
  150. package/src/content/Details/index.mdx +5 -0
  151. package/src/content/Table/__stories__/WithFloatingScroll.tsx +5 -7
  152. package/src/content/Table/index.mdx +1 -1
  153. package/src/content/Table/index.tsx +9 -8
  154. package/src/feedback/ServiceBadge/index.mdx +9 -5
  155. package/src/form/Button/index.mdx +4 -4
  156. package/src/form/Checkbox/index.mdx +5 -0
  157. package/src/form/DateInputContainer/index.mdx +5 -0
  158. package/src/form/FileUpload/index.mdx +2 -0
  159. package/src/form/RadioContainer/index.mdx +5 -0
  160. package/src/form/SelectContainer/index.mdx +6 -0
  161. package/src/icons/Icon/index.tsx +2 -2
  162. package/src/layouts/Grid/Grid.stories.js +1 -0
  163. package/src/layouts/Grid/__stories__/ResponsiveSpacing.tsx +43 -0
  164. package/src/navigation/Breadcrumbs/index.mdx +5 -0
  165. package/src/navigation/Drawer/__stories__/Default.tsx +31 -84
  166. package/src/navigation/Dropdown/__stories__/AlignRight.tsx +13 -12
  167. package/src/navigation/Dropdown/__stories__/Default.tsx +10 -11
  168. package/src/navigation/Dropdown/__stories__/PlacementTop.tsx +11 -11
  169. package/src/navigation/Dropdown/index.mdx +0 -2
  170. package/src/navigation/Link/index.mdx +2 -0
  171. package/src/navigation/Link/index.tsx +18 -1
  172. package/src/navigation/NavList/NavList.stories.playwright.json +2 -2
  173. package/src/navigation/NavList/NavListAuto/index.tsx +68 -0
  174. package/src/navigation/NavList/{NavMenuContainerContentList.tsx → NavMenuContentList.tsx} +8 -8
  175. package/src/navigation/NavList/__stories__/Default.tsx +28 -40
  176. package/src/navigation/NavList/__stories__/NavVerticalLayout.tsx +25 -33
  177. package/src/navigation/NavList/hooks/useNavList.ts +3 -3
  178. package/src/navigation/NavList/hooks/useTogglableNav.tsx +31 -19
  179. package/src/navigation/NavList/index.tsx +16 -17
  180. package/src/navigation/NavList/types.tsx +16 -28
  181. package/src/navigation/Pagination/__stories__/Default.tsx +2 -76
  182. package/src/navigation/Pagination/index.mdx +1 -2
  183. package/src/navigation/Tabs/index.mdx +6 -0
  184. package/src/registry.js +4 -40
  185. package/src/typography/Hint/index.mdx +2 -0
  186. package/src/typography/NormalText/index.mdx +2 -0
  187. package/src/typography/Paragraph/index.mdx +1 -0
  188. package/typography/Hint/index.mdx +2 -0
  189. package/typography/NormalText/index.mdx +2 -0
  190. package/typography/Paragraph/index.mdx +1 -0
  191. package/es/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
  192. package/es/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
  193. package/es/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
  194. package/es/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
  195. package/es/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
  196. package/es/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
  197. package/es/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
  198. package/es/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
  199. package/es/navigation/NavList/NavListItem.js +0 -23
  200. package/es/navigation/NavList/NavListItemBase.js +0 -44
  201. package/es/navigation/NavList/NavListItemButton.js +0 -3
  202. package/es/navigation/NavList/NavListItemLink.js +0 -3
  203. package/es/navigation/NavList/NavMenu.js +0 -3
  204. package/es/navigation/NavList/NavMenuContainer.js +0 -3
  205. package/es/navigation/NavList/NavMenuContainerContent.js +0 -3
  206. package/es/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
  207. package/es/navigation/NavList/NavMenuContainerTitle.js +0 -3
  208. package/es/navigation/NavList/NavVertical.js +0 -3
  209. package/es/navigation/NavList/NavVerticalItem.js +0 -3
  210. package/esm/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
  211. package/esm/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
  212. package/esm/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
  213. package/esm/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
  214. package/esm/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
  215. package/esm/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
  216. package/esm/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
  217. package/esm/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
  218. package/esm/navigation/NavList/NavListItem.js +0 -23
  219. package/esm/navigation/NavList/NavListItemBase.js +0 -44
  220. package/esm/navigation/NavList/NavListItemButton.js +0 -3
  221. package/esm/navigation/NavList/NavListItemLink.js +0 -3
  222. package/esm/navigation/NavList/NavMenu.js +0 -3
  223. package/esm/navigation/NavList/NavMenuContainer.js +0 -3
  224. package/esm/navigation/NavList/NavMenuContainerContent.js +0 -3
  225. package/esm/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
  226. package/esm/navigation/NavList/NavMenuContainerTitle.js +0 -3
  227. package/esm/navigation/NavList/NavVertical.js +0 -3
  228. package/esm/navigation/NavList/NavVerticalItem.js +0 -3
  229. package/navigation/NavList/NavListAuto/NavListAuto.js +0 -48
  230. package/navigation/NavList/NavListAuto/NavListBaseAuto.d.ts +0 -3
  231. package/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -38
  232. package/navigation/NavList/NavListAuto/NavListContextAuto.d.ts +0 -29
  233. package/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -128
  234. package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.d.ts +0 -9
  235. package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -51
  236. package/navigation/NavList/NavListAuto/NavListItemAuto.d.ts +0 -8
  237. package/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -63
  238. package/navigation/NavList/NavListAuto/NavListItemButtonAuto.d.ts +0 -12
  239. package/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -48
  240. package/navigation/NavList/NavListAuto/NavListMenuAuto.d.ts +0 -11
  241. package/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -56
  242. package/navigation/NavList/NavListAuto/NavListSubMenuAuto.d.ts +0 -9
  243. package/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -44
  244. package/navigation/NavList/NavListItem.d.ts +0 -4
  245. package/navigation/NavList/NavListItem.js +0 -42
  246. package/navigation/NavList/NavListItemBase.d.ts +0 -15
  247. package/navigation/NavList/NavListItemBase.js +0 -68
  248. package/navigation/NavList/NavListItemButton.d.ts +0 -3
  249. package/navigation/NavList/NavListItemButton.js +0 -30
  250. package/navigation/NavList/NavListItemLink.d.ts +0 -3
  251. package/navigation/NavList/NavListItemLink.js +0 -30
  252. package/navigation/NavList/NavMenu.d.ts +0 -3
  253. package/navigation/NavList/NavMenu.js +0 -30
  254. package/navigation/NavList/NavMenuContainer.d.ts +0 -3
  255. package/navigation/NavList/NavMenuContainer.js +0 -30
  256. package/navigation/NavList/NavMenuContainerContent.d.ts +0 -3
  257. package/navigation/NavList/NavMenuContainerContent.js +0 -30
  258. package/navigation/NavList/NavMenuContainerContentList.d.ts +0 -5
  259. package/navigation/NavList/NavMenuContainerContentListItem.d.ts +0 -3
  260. package/navigation/NavList/NavMenuContainerContentListItem.js +0 -30
  261. package/navigation/NavList/NavMenuContainerTitle.d.ts +0 -3
  262. package/navigation/NavList/NavMenuContainerTitle.js +0 -30
  263. package/navigation/NavList/NavVertical.d.ts +0 -3
  264. package/navigation/NavList/NavVertical.js +0 -30
  265. package/navigation/NavList/NavVerticalItem.d.ts +0 -3
  266. package/navigation/NavList/NavVerticalItem.js +0 -30
  267. package/src/navigation/NavList/NavListAuto/NavListAuto.tsx +0 -34
  268. package/src/navigation/NavList/NavListAuto/NavListBaseAuto.tsx +0 -20
  269. package/src/navigation/NavList/NavListAuto/NavListContextAuto.tsx +0 -112
  270. package/src/navigation/NavList/NavListAuto/NavListItemAnchorAuto.tsx +0 -38
  271. package/src/navigation/NavList/NavListAuto/NavListItemAuto.tsx +0 -49
  272. package/src/navigation/NavList/NavListAuto/NavListItemButtonAuto.tsx +0 -53
  273. package/src/navigation/NavList/NavListAuto/NavListMenuAuto.tsx +0 -51
  274. package/src/navigation/NavList/NavListAuto/NavListSubMenuAuto.tsx +0 -32
  275. package/src/navigation/NavList/NavListItem.tsx +0 -46
  276. package/src/navigation/NavList/NavListItemBase.tsx +0 -63
  277. package/src/navigation/NavList/NavListItemButton.tsx +0 -3
  278. package/src/navigation/NavList/NavListItemLink.tsx +0 -3
  279. package/src/navigation/NavList/NavMenu.tsx +0 -3
  280. package/src/navigation/NavList/NavMenuContainer.tsx +0 -3
  281. package/src/navigation/NavList/NavMenuContainerContent.tsx +0 -3
  282. package/src/navigation/NavList/NavMenuContainerContentListItem.tsx +0 -3
  283. package/src/navigation/NavList/NavMenuContainerTitle.tsx +0 -3
  284. package/src/navigation/NavList/NavVertical.tsx +0 -3
  285. package/src/navigation/NavList/NavVerticalItem.tsx +0 -3
  286. /package/navigation/NavList/NavListAuto/{NavListAuto.d.ts → index.d.ts} +0 -0
@@ -6,8 +6,7 @@ import Table from '@digigov/react-core/Table';
6
6
  import TableSortIconContainer from '@digigov/react-core/TableSortIconContainer';
7
7
  import { CaretIcon } from '@digigov/ui/icons';
8
8
  import { Dropdown, DropdownButton, DropdownContent } from '@digigov/ui/navigation/Dropdown';
9
- import { NavVertical } from '@digigov/ui/navigation/NavList/NavVertical';
10
- import { NavVerticalItem } from '@digigov/ui/navigation/NavList/NavVerticalItem';
9
+ import { NavList, NavListItemAction } from '@digigov/ui/navigation/NavList';
11
10
 
12
11
  var _ref2 = /*#__PURE__*/React.createElement(CaretIcon, {
13
12
  direction: 'up',
@@ -56,9 +55,12 @@ export var TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabe
56
55
  direction: 'down',
57
56
  size: "sm",
58
57
  variant: direction === -1 ? 'dark' : 'gray'
59
- }))), /*#__PURE__*/React.createElement(DropdownContent, null, /*#__PURE__*/React.createElement(NavVertical, null, /*#__PURE__*/React.createElement(NavVerticalItem, {
58
+ }))), /*#__PURE__*/React.createElement(DropdownContent, null, /*#__PURE__*/React.createElement(NavList, {
59
+ layout: "vertical"
60
+ }, /*#__PURE__*/React.createElement(NavListItemAction, {
60
61
  active: direction === 1,
61
62
  tabIndex: 0,
63
+ arrow: false,
62
64
  onClick: function onClick() {
63
65
  onSort(1);
64
66
  dropdownRef.current && (dropdownRef.current.open = false);
@@ -69,9 +71,10 @@ export var TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabe
69
71
  dropdownRef.current && (dropdownRef.current.open = false);
70
72
  }
71
73
  }
72
- }, _ref2, labels.asc), /*#__PURE__*/React.createElement(NavVerticalItem, {
74
+ }, _ref2, labels.asc), /*#__PURE__*/React.createElement(NavListItemAction, {
73
75
  active: direction === -1,
74
76
  tabIndex: 0,
77
+ arrow: false,
75
78
  onClick: function onClick() {
76
79
  onSort(-1);
77
80
  dropdownRef.current && (dropdownRef.current.open = false);
@@ -69,7 +69,7 @@ The prop `color='primary'` or `color='secondary'` is only functional when Table
69
69
  ## Accessibility
70
70
 
71
71
  You can read more about the accessibility patterns used in our Table
72
- implementation in the ARIA Authoring Practices Guide (APG) at
72
+ implementation in the ARIA Authoring Practices Guide (APG) at [Table](https://www.w3.org/WAI/ARIA/apg/patterns/table/) section.
73
73
 
74
74
  ## API
75
75
 
@@ -5,17 +5,21 @@ parent: docs/ui/component
5
5
  ---
6
6
 
7
7
  import ServiceBadge from '@digigov/ui/feedback/ServiceBadge';
8
- import Header, { HeaderTitle } from '@digigov/ui/app/Header';
8
+ import Header, { HeaderContent, HeaderSection, HeaderTitle } from '@digigov/ui/app/Header';
9
9
  import GovGRLogo from '@digigov/ui/govgr/GovGRLogo';
10
10
 
11
11
  ## Example
12
12
 
13
13
  <Header>
14
- <GovGRLogo />
15
- <HeaderTitle>
16
- Service Name <ServiceBadge label="ALPHA" />
17
- </HeaderTitle>
14
+ <HeaderContent>
15
+ <HeaderSection>
16
+ <GovGRLogo />
17
+ <HeaderTitle>Service Name </HeaderTitle>
18
+ <ServiceBadge label="ALPHA" />
19
+ </HeaderSection>
20
+ </HeaderContent>
18
21
  </Header>
22
+ <br/>
19
23
 
20
24
  ## How to use
21
25
 
@@ -55,7 +55,7 @@ Any links within a button group will automatically align with the buttons.
55
55
  <Story packageName="@digigov/ui" component="form/Button" story="GroupingButtonsAndLinks.tsx" />
56
56
 
57
57
  Write button text in sentence case, describing the action it performs. For
58
- example:'
58
+ example:
59
59
 
60
60
  - `Start now` at the [start of the service](https://guide.services.gov.gr/docs/start-pages)
61
61
  - `Sign in` to an account a user has already created
@@ -85,12 +85,12 @@ to do next.
85
85
 
86
86
  ## API Docs
87
87
 
88
- Read more about [how to use the React types](/docs/api/Button)
88
+ Read more about [how to use the React types](/docs/api/Button).
89
89
 
90
90
  ## Accessibility
91
91
 
92
- You can read more about the accessibility patterns used in our Select
93
- implementation in the ARIA Authoring Practices Guide (APG) at
92
+ You can read more about the accessibility patterns used in our Button
93
+ implementation in the ARIA Authoring Practices Guide (APG) at [button](https://www.w3.org/WAI/ARIA/apg/patterns/button/) section.
94
94
 
95
95
  ## API
96
96
 
@@ -47,6 +47,11 @@ This might make 2 related questions easier to answer by grouping them on the sam
47
47
 
48
48
  <Story packageName="@digigov/ui" component="form/Checkbox" story="ConditionalReveal.tsx" />
49
49
 
50
+ ## Accessibility
51
+
52
+ You can read more about the accessibility patterns used in our Checkbox
53
+ implementation in the ARIA Authoring Practices Guide (APG) at [Checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/) section.
54
+
50
55
  ## API
51
56
 
52
57
  <PropTypes packageName="@digigov/ui" component="Checkbox" />
@@ -26,3 +26,8 @@ If you’re highlighting the whole date, style all the fields like this:
26
26
  If you’re highlighting just one field - either the day, month or year - only style the field that has an error. The error message must say which field has an error, like this:
27
27
 
28
28
  <Story packageName="@digigov/ui" component="form/DateInputContainer"story="WithErrorMessageForSingleField.tsx" />
29
+
30
+
31
+ ## API
32
+
33
+ <PropTypes packageName="@digigov/ui" component="DateInputContainer" />
@@ -17,6 +17,8 @@ import FileUpload from '@digigov/ui/form/FileUpload';
17
17
 
18
18
  Error messages should be styled like this:
19
19
 
20
+ <Story packageName="@digigov/ui" component="form/FileUpload" story="WithErrorMessage.tsx" />
21
+
20
22
  ## API
21
23
 
22
24
  <PropTypes packageName="@digigov/ui" component="FileUpload" />
@@ -48,6 +48,11 @@ Error messages should be styled like this:
48
48
 
49
49
  <Story packageName="@digigov/ui" component="form/RadioContainer" story="WithErrorMessage.tsx" />
50
50
 
51
+ ## Accessibility
52
+
53
+ You can read more about the accessibility patterns used in our Radio
54
+ implementation in the ARIA Authoring Practices Guide (APG) at [Radio](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) section.
55
+
51
56
  ## API
52
57
 
53
58
  ### RadioContainer
@@ -25,6 +25,12 @@ Error messages should be styled like this:
25
25
 
26
26
  <Story packageName="@digigov/ui" component="form/SelectContainer" story="DisabledInput.tsx" />
27
27
 
28
+ ## Accessibility
29
+
28
30
  You can read more about the accessibility patterns used in our SelectContainer
29
31
  implementation in the ARIA Authoring Practices Guide (APG) at
30
32
  [Combobox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) section.
33
+
34
+ ## API
35
+
36
+ <PropTypes packageName="@digigov/ui" component="SelectContainer" />
@@ -1,5 +1,5 @@
1
- export * from '@digigov/react-core/Icon';
1
+ export * from '@digigov/react-icons/Icon';
2
2
  export * from '@digigov/react-icons';
3
3
  export * from '@digigov/react-icons/icons';
4
- import Icon from '@digigov/react-core/Icon';
4
+ import Icon from '@digigov/react-icons/Icon';
5
5
  export default Icon;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v1.0.0-480e3d97
1
+ /** @license Digigov v1.0.0-55e4210c
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -5,4 +5,5 @@ export default {
5
5
  displayName: 'Grid'
6
6
  };
7
7
  export * from '@digigov/ui/layouts/Grid/__stories__/Default';
8
+ export * from '@digigov/ui/layouts/Grid/__stories__/ResponsiveSpacing';
8
9
  export * from '@digigov/ui/layouts/Grid/__stories__/Inline';
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { Card } from '@digigov/ui/content/Card';
3
+ import { Grid } from '@digigov/ui/layouts/Grid';
4
+
5
+ var _ref = /*#__PURE__*/React.createElement(Grid, {
6
+ role: "row",
7
+ xs: 12,
8
+ sm: 6,
9
+ md: 4
10
+ }, /*#__PURE__*/React.createElement(Card, {
11
+ variant: "border",
12
+ role: "gridcell"
13
+ }, "1"));
14
+
15
+ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
16
+ role: "row",
17
+ xs: 12,
18
+ sm: 6,
19
+ md: 4
20
+ }, /*#__PURE__*/React.createElement(Card, {
21
+ variant: "border",
22
+ role: "gridcell"
23
+ }, "1"));
24
+
25
+ var _ref3 = /*#__PURE__*/React.createElement(Grid, {
26
+ role: "row",
27
+ xs: 12,
28
+ sm: 6,
29
+ md: 4
30
+ }, /*#__PURE__*/React.createElement(Card, {
31
+ variant: "border",
32
+ role: "gridcell"
33
+ }, "1"));
34
+
35
+ var _ref4 = /*#__PURE__*/React.createElement(Grid, {
36
+ role: "row",
37
+ xs: 12,
38
+ sm: 6,
39
+ md: 4
40
+ }, /*#__PURE__*/React.createElement(Card, {
41
+ variant: "border",
42
+ role: "gridcell"
43
+ }, "1"));
44
+
45
+ var _ref5 = /*#__PURE__*/React.createElement(Grid, {
46
+ role: "row",
47
+ xs: 12,
48
+ sm: 6,
49
+ md: 4
50
+ }, /*#__PURE__*/React.createElement(Card, {
51
+ variant: "border",
52
+ role: "gridcell"
53
+ }, "1"));
54
+
55
+ var _ref6 = /*#__PURE__*/React.createElement(Grid, {
56
+ role: "row",
57
+ xs: 12,
58
+ sm: 6,
59
+ md: 4
60
+ }, /*#__PURE__*/React.createElement(Card, {
61
+ variant: "border",
62
+ role: "gridcell"
63
+ }, "1"));
64
+
65
+ export var ResponsiveSpacing = function ResponsiveSpacing() {
66
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Grid, {
67
+ role: "grid",
68
+ "aria-label": "grid-example",
69
+ container: true,
70
+ spacing: {
71
+ xs: 1,
72
+ sm: 4,
73
+ md: 6,
74
+ lg: 8,
75
+ xl: 12
76
+ }
77
+ }, _ref, _ref2, _ref3, _ref4, _ref5, _ref6));
78
+ };
79
+ export default ResponsiveSpacing;
@@ -17,6 +17,11 @@ import Breadcrumbs from '@digigov/ui/navigation/Breadcrumbs';
17
17
 
18
18
  <Story packageName="@digigov/ui" component="navigation/Breadcrumbs" story="Default.tsx" />
19
19
 
20
+ ## Accessibility
21
+
22
+ You can read more about the accessibility patterns used in our Breadcrumbs
23
+ implementation in the ARIA Authoring Practices Guide (APG) at [Breadcrumbs](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/) section.
24
+
20
25
  ## API
21
26
 
22
27
  <PropTypes packageName="@digigov/ui" component="Breadcrumbs" />
@@ -1,11 +1,8 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
  import React, { useState } from 'react';
4
3
  import { Drawer } from '@digigov/ui/navigation/Drawer';
5
4
  import { DrawerHeading } from '@digigov/ui/navigation/Drawer';
6
- import { Link } from '@digigov/ui/navigation/Link';
7
- import { isNavListItemLinkInterface, NavListAuto, NavListItem, NavMenu, NavMenuContainer, NavMenuContainerContent, NavMenuContainerContentList, NavMenuContainerContentListItem, NavMenuContainerTitle } from '@digigov/ui/navigation/NavList';
8
- import { useNavList } from '@digigov/ui/navigation/NavList/hooks/useNavList';
5
+ import { NavListAuto } from '@digigov/ui/navigation/NavList';
9
6
  import { Title } from '@digigov/ui/typography/Title';
10
7
 
11
8
  function useDrawer() {
@@ -28,27 +25,29 @@ var links = [{
28
25
  }, {
29
26
  name: 'educational',
30
27
  label: 'Εκπαιδευτικό υλικό',
31
- subMenu: [{
32
- name: 'elearning',
33
- href: '#elearning',
34
- label: 'Εκπαιδευτική πλατφόρμα'
35
- }, {
36
- name: 'videos',
37
- href: '#videos',
38
- label: 'Βίντεο'
39
- }, {
40
- name: 'presentations',
41
- href: '#presentations',
42
- label: 'Παρουσιάσεις'
43
- }, {
44
- name: 'promoting',
45
- href: '#promoting',
46
- label: 'Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά'
47
- }, {
48
- name: 'other-texts',
49
- href: '#other-texts',
50
- label: 'Άλλα κείμενα'
51
- }]
28
+ menu: {
29
+ links: [{
30
+ name: 'elearning',
31
+ href: '#elearning',
32
+ label: 'Εκπαιδευτική πλατφόρμα'
33
+ }, {
34
+ name: 'videos',
35
+ href: '#videos',
36
+ label: 'Βίντεο'
37
+ }, {
38
+ name: 'presentations',
39
+ href: '#presentations',
40
+ label: 'Παρουσιάσεις'
41
+ }, {
42
+ name: 'promoting',
43
+ href: '#promoting',
44
+ label: 'Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά'
45
+ }, {
46
+ name: 'other-texts',
47
+ href: '#other-texts',
48
+ label: 'Άλλα κείμενα'
49
+ }]
50
+ }
52
51
  }, {
53
52
  name: 'news',
54
53
  href: '#news',
@@ -65,19 +64,6 @@ export var Default = function Default() {
65
64
  open = _useDrawer2[0],
66
65
  toggleDrawer = _useDrawer2[1];
67
66
 
68
- var _useNavList = useNavList(),
69
- container = _useNavList.container,
70
- registerButton = _useNavList.registerButton,
71
- registerLink = _useNavList.registerLink;
72
-
73
- var setRegisterButton = function setRegisterButton(name) {
74
- return _extends({}, registerButton(name));
75
- };
76
-
77
- var setRegisterLink = function setRegisterLink(name) {
78
- return _extends({}, registerLink(name));
79
- };
80
-
81
67
  var layout = 'vertical';
82
68
  var border = false;
83
69
  var fixed = false;
@@ -95,33 +81,6 @@ export var Default = function Default() {
95
81
  border: border,
96
82
  fixed: fixed,
97
83
  "aria-label": "Nav list"
98
- }, links.map(function (item, key) {
99
- var _item$subMenu;
100
-
101
- return /*#__PURE__*/React.createElement(React.Fragment, {
102
- key: key
103
- }, /*#__PURE__*/React.createElement(NavListItem, {
104
- link: item,
105
- setRegisterButton: setRegisterButton,
106
- setRegisterLink: setRegisterLink
107
- }), /*#__PURE__*/React.createElement(NavMenu, _extends({
108
- layout: layout
109
- }, container(item.name)), /*#__PURE__*/React.createElement(NavMenuContainer, {
110
- layout: layout,
111
- paddingLeft: 5,
112
- paddingRight: 5
113
- }, /*#__PURE__*/React.createElement(NavMenuContainerTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContainerContent, null, /*#__PURE__*/React.createElement(NavMenuContainerContentList, {
114
- role: "menu"
115
- }, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
116
- return isNavListItemLinkInterface(subMenu) && /*#__PURE__*/React.createElement(NavMenuContainerContentListItem, {
117
- key: menuIndex,
118
- role: "presentation"
119
- }, /*#__PURE__*/React.createElement(Link, {
120
- role: "menuitem",
121
- id: subMenu.name,
122
- href: subMenu.href
123
- }, subMenu.label));
124
- }))))));
125
- })));
84
+ }));
126
85
  };
127
86
  export default Default;
@@ -6,8 +6,7 @@ import { LabelTitle } from '@digigov/ui/form/LabelContainer';
6
6
  import { TextInput } from '@digigov/ui/form/TextInput';
7
7
  import { SectionBreak } from '@digigov/ui/layouts/SectionBreak';
8
8
  import { Dropdown, DropdownButton, DropdownContent } from '@digigov/ui/navigation/Dropdown';
9
- import { NavVertical } from '@digigov/ui/navigation/NavList/NavVertical';
10
- import { NavVerticalItem } from '@digigov/ui/navigation/NavList/NavVerticalItem';
9
+ import { NavList, NavListItemAction } from '@digigov/ui/navigation/NavList';
11
10
 
12
11
  var _ref = /*#__PURE__*/React.createElement(Dropdown, {
13
12
  align: "right"
@@ -24,16 +23,18 @@ var _ref = /*#__PURE__*/React.createElement(Dropdown, {
24
23
  }, /*#__PURE__*/React.createElement(LabelContainer, null, /*#__PURE__*/React.createElement(LabelTitle, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B5\u03B4\u03AF\u03BF\u03C5"), /*#__PURE__*/React.createElement(TextInput, {
25
24
  name: "input-name"
26
25
  }))), /*#__PURE__*/React.createElement(SectionBreak, {
27
- role: "separator"
28
- }), /*#__PURE__*/React.createElement(NavVertical, {
29
- role: "menu"
30
- }, /*#__PURE__*/React.createElement(NavVerticalItem, {
26
+ role: "separator",
27
+ paddingBottom: 0,
28
+ paddingTop: 0
29
+ }), /*#__PURE__*/React.createElement(NavList, {
30
+ layout: "vertical"
31
+ }, /*#__PURE__*/React.createElement(NavListItemAction, {
31
32
  role: "menuitem",
32
33
  href: "#"
33
- }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavVerticalItem, {
34
+ }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavListItemAction, {
34
35
  role: "menuitem",
35
36
  href: "#"
36
- }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavVerticalItem, {
37
+ }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavListItemAction, {
37
38
  role: "menuitem",
38
39
  href: "#"
39
40
  }, "\u039F\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE")), /*#__PURE__*/React.createElement(SectionBreak, {
@@ -6,8 +6,7 @@ import { LabelTitle } from '@digigov/ui/form/LabelContainer';
6
6
  import { TextInput } from '@digigov/ui/form/TextInput';
7
7
  import { SectionBreak } from '@digigov/ui/layouts/SectionBreak';
8
8
  import { Dropdown, DropdownButton, DropdownContent } from '@digigov/ui/navigation/Dropdown';
9
- import { NavVertical } from '@digigov/ui/navigation/NavList/NavVertical';
10
- import { NavVerticalItem } from '@digigov/ui/navigation/NavList/NavVerticalItem';
9
+ import { NavListItemAction, NavList } from '@digigov/ui/navigation/NavList';
11
10
 
12
11
  var _ref = /*#__PURE__*/React.createElement(Dropdown, null, /*#__PURE__*/React.createElement(DropdownButton, {
13
12
  role: "button",
@@ -22,16 +21,18 @@ var _ref = /*#__PURE__*/React.createElement(Dropdown, null, /*#__PURE__*/React.c
22
21
  }, /*#__PURE__*/React.createElement(LabelContainer, null, /*#__PURE__*/React.createElement(LabelTitle, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B5\u03B4\u03AF\u03BF\u03C5"), /*#__PURE__*/React.createElement(TextInput, {
23
22
  name: "input-name"
24
23
  }))), /*#__PURE__*/React.createElement(SectionBreak, {
25
- role: "separator"
26
- }), /*#__PURE__*/React.createElement(NavVertical, {
27
- role: "menu"
28
- }, /*#__PURE__*/React.createElement(NavVerticalItem, {
24
+ role: "separator",
25
+ paddingBottom: 0,
26
+ paddingTop: 0
27
+ }), /*#__PURE__*/React.createElement(NavList, {
28
+ layout: "vertical"
29
+ }, /*#__PURE__*/React.createElement(NavListItemAction, {
29
30
  role: "menuitem",
30
31
  href: "#"
31
- }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavVerticalItem, {
32
+ }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavListItemAction, {
32
33
  role: "menuitem",
33
34
  href: "#"
34
- }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavVerticalItem, {
35
+ }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavListItemAction, {
35
36
  role: "menuitem",
36
37
  href: "#"
37
38
  }, "\u039F\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE")), /*#__PURE__*/React.createElement(SectionBreak, {
@@ -6,8 +6,7 @@ import { LabelTitle } from '@digigov/ui/form/LabelContainer';
6
6
  import { TextInput } from '@digigov/ui/form/TextInput';
7
7
  import { SectionBreak } from '@digigov/ui/layouts/SectionBreak';
8
8
  import { Dropdown, DropdownButton, DropdownContent } from '@digigov/ui/navigation/Dropdown';
9
- import { NavVertical } from '@digigov/ui/navigation/NavList/NavVertical';
10
- import { NavVerticalItem } from '@digigov/ui/navigation/NavList/NavVerticalItem';
9
+ import { NavListItemAction, NavList } from '@digigov/ui/navigation/NavList';
11
10
 
12
11
  var _ref = /*#__PURE__*/React.createElement(DropdownButton, {
13
12
  role: "button",
@@ -24,16 +23,18 @@ var _ref2 = /*#__PURE__*/React.createElement(DropdownContent, {
24
23
  }, /*#__PURE__*/React.createElement(LabelContainer, null, /*#__PURE__*/React.createElement(LabelTitle, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B5\u03B4\u03AF\u03BF\u03C5"), /*#__PURE__*/React.createElement(TextInput, {
25
24
  name: "input-name"
26
25
  }))), /*#__PURE__*/React.createElement(SectionBreak, {
27
- role: "separator"
28
- }), /*#__PURE__*/React.createElement(NavVertical, {
29
- role: "menu"
30
- }, /*#__PURE__*/React.createElement(NavVerticalItem, {
26
+ role: "separator",
27
+ paddingBottom: 0,
28
+ paddingTop: 0
29
+ }), /*#__PURE__*/React.createElement(NavList, {
30
+ layout: "vertical"
31
+ }, /*#__PURE__*/React.createElement(NavListItemAction, {
31
32
  role: "menuitem",
32
33
  href: "#"
33
- }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavVerticalItem, {
34
+ }, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/React.createElement(NavListItemAction, {
34
35
  role: "menuitem",
35
36
  href: "#"
36
- }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavVerticalItem, {
37
+ }, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/React.createElement(NavListItemAction, {
37
38
  role: "menuitem",
38
39
  href: "#"
39
40
  }, "\u039F\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE")), /*#__PURE__*/React.createElement(SectionBreak, {
@@ -25,8 +25,6 @@ You can display the dropdown menu to the top of the `Dropdown` button.
25
25
 
26
26
  <Story packageName="@digigov/ui" component="navigation/Dropdown" story="PlacementTop.tsx" />
27
27
 
28
- You can read more about the accessibility patterns used in our Dropdown
29
- implementation in the ARIA Authoring Practices Guide (APG) at
30
28
 
31
29
  ## API
32
30
 
@@ -1,13 +1,33 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["children", "href"];
4
- import * as React from 'react';
4
+ import React, { useEffect } from 'react';
5
5
  import LinkBase from '@digigov/react-core/LinkBase';
6
6
  export var CommonLink = function CommonLink(props) {
7
7
  return /*#__PURE__*/React.createElement(LinkBase, props, props.children);
8
8
  };
9
9
  var LinkComponentContext = /*#__PURE__*/React.createContext(LinkBase);
10
10
  export var LinkProvider = function LinkProvider(props) {
11
+ useEffect(function () {
12
+ var path = window.location.hash;
13
+
14
+ if (path && path.includes("#")) {
15
+ setTimeout(function () {
16
+ var id = path.replace("#", "");
17
+ var el = window.document.getElementById(id);
18
+ var r = el === null || el === void 0 ? void 0 : el.getBoundingClientRect();
19
+
20
+ if (r) {
21
+ var _window$top;
22
+
23
+ (_window$top = window.top) === null || _window$top === void 0 ? void 0 : _window$top.scroll({
24
+ top: scrollY + r.top,
25
+ behavior: "smooth"
26
+ });
27
+ }
28
+ }, 600);
29
+ }
30
+ });
11
31
  return /*#__PURE__*/React.createElement(LinkComponentContext.Provider, {
12
32
  value: props.component
13
33
  }, props.children);
@@ -29,6 +29,8 @@ import Link from '@digigov/ui/navigation/Link';
29
29
 
30
30
  <Story packageName="@digigov/ui" component="navigation/Link" story="DarkBackgroundNoUnderline.tsx" />
31
31
 
32
+ ### Accessibility
33
+
32
34
  You can read more about the accessibility patterns used in our Link
33
35
  implementation in the ARIA Authoring Practices Guide (APG) at
34
36
  [Link](https://www.w3.org/WAI/ARIA/apg/patterns/link/) section.
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "hover",
10
10
  "args": {
11
- "selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(3)>button"
11
+ "selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(2)>button"
12
12
  }
13
13
  }
14
14
  ],
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "name": "click",
22
22
  "args": {
23
- "selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(3)>button"
23
+ "selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(2)>button"
24
24
  }
25
25
  }
26
26
  ],
@@ -0,0 +1,54 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["layout", "border", "fixed", "links"];
4
+ import React from 'react';
5
+ import { useNavList } from '../hooks/useNavList';
6
+ import NavListItemAction from '@digigov/react-core/NavListItemAction';
7
+ import { Link } from '@digigov/ui/navigation/Link';
8
+ import Nav from '../Nav';
9
+ import NavList from '@digigov/react-core/NavList';
10
+ import NavMenuContainer from '@digigov/react-core/NavMenuContainer';
11
+ import NavMenuContent from '@digigov/react-core/NavMenuContent';
12
+ import NavMenuContentList from '@digigov/ui/navigation/NavList/NavMenuContentList';
13
+ import NavMenuContentListItem from '@digigov/react-core/NavMenuContentListItem';
14
+ import NavMenuTitle from '@digigov/react-core/NavMenuTitle';
15
+ export var NavListAuto = function NavListAuto(_ref) {
16
+ var layout = _ref.layout,
17
+ border = _ref.border,
18
+ fixed = _ref.fixed,
19
+ _ref$links = _ref.links,
20
+ links = _ref$links === void 0 ? [] : _ref$links,
21
+ props = _objectWithoutProperties(_ref, _excluded);
22
+
23
+ var _useNavList = useNavList(),
24
+ registerNavItemMenu = _useNavList.registerNavItemMenu,
25
+ registerNavItem = _useNavList.registerNavItem;
26
+
27
+ return /*#__PURE__*/React.createElement(Nav, _extends({
28
+ open: true,
29
+ border: border,
30
+ fixed: fixed
31
+ }, props), /*#__PURE__*/React.createElement(NavList, {
32
+ layout: layout
33
+ }, links.map(function (item, key) {
34
+ var _item$menu, _item$menu2, _item$menu$links;
35
+
36
+ return /*#__PURE__*/React.createElement(React.Fragment, {
37
+ key: key
38
+ }, /*#__PURE__*/React.createElement(NavListItemAction, registerNavItem(item), item.label), item.menu && /*#__PURE__*/React.createElement(NavMenuContainer, _extends({
39
+ layout: layout
40
+ }, registerNavItemMenu(item.name)), ((_item$menu = item.menu) === null || _item$menu === void 0 ? void 0 : _item$menu.title) && /*#__PURE__*/React.createElement(NavMenuTitle, null, (_item$menu2 = item.menu) === null || _item$menu2 === void 0 ? void 0 : _item$menu2.title), /*#__PURE__*/React.createElement(NavMenuContent, null, /*#__PURE__*/React.createElement(NavMenuContentList, {
41
+ role: "menu"
42
+ }, (_item$menu$links = item.menu.links) === null || _item$menu$links === void 0 ? void 0 : _item$menu$links.map(function (subMenu, menuIndex) {
43
+ return (subMenu === null || subMenu === void 0 ? void 0 : subMenu.href) && /*#__PURE__*/React.createElement(NavMenuContentListItem, {
44
+ key: menuIndex,
45
+ role: "presentation"
46
+ }, /*#__PURE__*/React.createElement(Link, {
47
+ role: "menuitem",
48
+ id: subMenu.name,
49
+ href: subMenu.href
50
+ }, subMenu.label));
51
+ })))));
52
+ })));
53
+ };
54
+ export default NavListAuto;