@digigov/ui 1.0.0-480e3d97 → 1.0.0-60addd4a

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 (276) 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/layouts/Grid/Grid.stories.js +1 -0
  29. package/es/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
  30. package/es/navigation/Breadcrumbs/index.mdx +5 -0
  31. package/es/navigation/Drawer/__stories__/Default.js +25 -66
  32. package/es/navigation/Dropdown/__stories__/AlignRight.js +9 -8
  33. package/es/navigation/Dropdown/__stories__/Default.js +9 -8
  34. package/es/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
  35. package/es/navigation/Dropdown/index.mdx +0 -2
  36. package/es/navigation/Link/index.mdx +2 -0
  37. package/es/navigation/NavList/NavList.stories.playwright.json +2 -2
  38. package/es/navigation/NavList/NavListAuto/index.js +54 -0
  39. package/es/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
  40. package/es/navigation/NavList/__stories__/Default.js +12 -28
  41. package/es/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
  42. package/es/navigation/NavList/hooks/useNavList.js +2 -2
  43. package/es/navigation/NavList/hooks/useTogglableNav.js +33 -18
  44. package/es/navigation/NavList/index.js +16 -17
  45. package/es/navigation/NavList/types.js +1 -6
  46. package/es/navigation/Pagination/__stories__/Default.js +7 -65
  47. package/es/navigation/Pagination/index.mdx +1 -2
  48. package/es/navigation/Tabs/index.mdx +6 -0
  49. package/es/registry.js +4 -40
  50. package/es/typography/Hint/index.mdx +2 -0
  51. package/es/typography/NormalText/index.mdx +2 -0
  52. package/es/typography/Paragraph/index.mdx +1 -0
  53. package/esm/app/Footer/Footer.stories.playwright.json +2 -2
  54. package/esm/app/Header/Header.stories.playwright.json +1 -1
  55. package/esm/app/Header/__stories__/WithHeaderNavigation.js +13 -13
  56. package/esm/app/Header/__stories__/WithNavigation.js +9 -36
  57. package/esm/app/Masthead/Masthead.stories.playwright.json +1 -1
  58. package/esm/app/ThemeOptions/index.js +2 -2
  59. package/esm/content/Details/index.mdx +5 -0
  60. package/esm/content/Table/__stories__/WithFloatingScroll.js +5 -4
  61. package/esm/content/Table/index.js +7 -4
  62. package/esm/content/Table/index.mdx +1 -1
  63. package/esm/feedback/ServiceBadge/index.mdx +9 -5
  64. package/esm/form/Button/index.mdx +4 -4
  65. package/esm/form/Checkbox/index.mdx +5 -0
  66. package/esm/form/DateInputContainer/index.mdx +5 -0
  67. package/esm/form/FileUpload/index.mdx +2 -0
  68. package/esm/form/RadioContainer/index.mdx +5 -0
  69. package/esm/form/SelectContainer/index.mdx +6 -0
  70. package/esm/index.js +1 -1
  71. package/esm/layouts/Grid/Grid.stories.js +1 -0
  72. package/esm/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
  73. package/esm/navigation/Breadcrumbs/index.mdx +5 -0
  74. package/esm/navigation/Drawer/__stories__/Default.js +25 -66
  75. package/esm/navigation/Dropdown/__stories__/AlignRight.js +9 -8
  76. package/esm/navigation/Dropdown/__stories__/Default.js +9 -8
  77. package/esm/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
  78. package/esm/navigation/Dropdown/index.mdx +0 -2
  79. package/esm/navigation/Link/index.mdx +2 -0
  80. package/esm/navigation/NavList/NavList.stories.playwright.json +2 -2
  81. package/esm/navigation/NavList/NavListAuto/index.js +54 -0
  82. package/esm/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
  83. package/esm/navigation/NavList/__stories__/Default.js +12 -28
  84. package/esm/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
  85. package/esm/navigation/NavList/hooks/useNavList.js +2 -2
  86. package/esm/navigation/NavList/hooks/useTogglableNav.js +33 -18
  87. package/esm/navigation/NavList/index.js +16 -17
  88. package/esm/navigation/NavList/types.js +1 -6
  89. package/esm/navigation/Pagination/__stories__/Default.js +7 -65
  90. package/esm/navigation/Pagination/index.mdx +1 -2
  91. package/esm/navigation/Tabs/index.mdx +6 -0
  92. package/esm/registry.js +4 -40
  93. package/esm/typography/Hint/index.mdx +2 -0
  94. package/esm/typography/NormalText/index.mdx +2 -0
  95. package/esm/typography/Paragraph/index.mdx +1 -0
  96. package/feedback/ServiceBadge/index.mdx +9 -5
  97. package/form/Button/index.mdx +4 -4
  98. package/form/Checkbox/index.mdx +5 -0
  99. package/form/DateInputContainer/index.mdx +5 -0
  100. package/form/FileUpload/index.mdx +2 -0
  101. package/form/RadioContainer/index.mdx +5 -0
  102. package/form/SelectContainer/index.mdx +6 -0
  103. package/layouts/Basic/Content/index.d.ts +1 -1
  104. package/layouts/Basic/Side/index.d.ts +1 -1
  105. package/layouts/Grid/Grid.stories.d.ts +1 -0
  106. package/layouts/Grid/Grid.stories.js +14 -0
  107. package/layouts/Grid/__stories__/ResponsiveSpacing.d.ts +2 -0
  108. package/layouts/Grid/__stories__/ResponsiveSpacing.js +93 -0
  109. package/navigation/Breadcrumbs/index.mdx +5 -0
  110. package/navigation/Drawer/__stories__/Default.js +24 -68
  111. package/navigation/Dropdown/__stories__/AlignRight.js +9 -9
  112. package/navigation/Dropdown/__stories__/Default.js +9 -9
  113. package/navigation/Dropdown/__stories__/PlacementTop.js +9 -9
  114. package/navigation/Dropdown/index.mdx +0 -2
  115. package/navigation/Link/index.mdx +2 -0
  116. package/navigation/NavList/NavList.stories.playwright.json +2 -2
  117. package/navigation/NavList/NavListAuto/index.js +80 -0
  118. package/navigation/NavList/NavMenuContentList.d.ts +5 -0
  119. package/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +10 -10
  120. package/navigation/NavList/__stories__/Default.js +12 -28
  121. package/navigation/NavList/__stories__/NavVerticalLayout.js +12 -32
  122. package/navigation/NavList/hooks/useNavList.d.ts +1 -1
  123. package/navigation/NavList/hooks/useNavList.js +2 -2
  124. package/navigation/NavList/hooks/useTogglableNav.d.ts +1 -0
  125. package/navigation/NavList/hooks/useTogglableNav.js +33 -18
  126. package/navigation/NavList/index.d.ts +16 -17
  127. package/navigation/NavList/index.js +54 -96
  128. package/navigation/NavList/types.d.ts +14 -17
  129. package/navigation/NavList/types.js +1 -14
  130. package/navigation/Pagination/__stories__/Default.js +7 -65
  131. package/navigation/Pagination/index.mdx +1 -2
  132. package/navigation/Tabs/index.mdx +6 -0
  133. package/package.json +3 -3
  134. package/registry.d.ts +2 -20
  135. package/registry.js +4 -58
  136. package/src/app/Footer/Footer.stories.playwright.json +2 -2
  137. package/src/app/Header/Header.stories.playwright.json +1 -1
  138. package/src/app/Header/__stories__/WithHeaderNavigation.tsx +23 -35
  139. package/src/app/Header/__stories__/WithNavigation.tsx +13 -34
  140. package/src/app/Masthead/Masthead.stories.playwright.json +1 -1
  141. package/src/app/ThemeOptions/index.tsx +3 -3
  142. package/src/content/Details/index.mdx +5 -0
  143. package/src/content/Table/__stories__/WithFloatingScroll.tsx +5 -7
  144. package/src/content/Table/index.mdx +1 -1
  145. package/src/content/Table/index.tsx +9 -8
  146. package/src/feedback/ServiceBadge/index.mdx +9 -5
  147. package/src/form/Button/index.mdx +4 -4
  148. package/src/form/Checkbox/index.mdx +5 -0
  149. package/src/form/DateInputContainer/index.mdx +5 -0
  150. package/src/form/FileUpload/index.mdx +2 -0
  151. package/src/form/RadioContainer/index.mdx +5 -0
  152. package/src/form/SelectContainer/index.mdx +6 -0
  153. package/src/layouts/Grid/Grid.stories.js +1 -0
  154. package/src/layouts/Grid/__stories__/ResponsiveSpacing.tsx +43 -0
  155. package/src/navigation/Breadcrumbs/index.mdx +5 -0
  156. package/src/navigation/Drawer/__stories__/Default.tsx +31 -84
  157. package/src/navigation/Dropdown/__stories__/AlignRight.tsx +13 -12
  158. package/src/navigation/Dropdown/__stories__/Default.tsx +10 -11
  159. package/src/navigation/Dropdown/__stories__/PlacementTop.tsx +11 -11
  160. package/src/navigation/Dropdown/index.mdx +0 -2
  161. package/src/navigation/Link/index.mdx +2 -0
  162. package/src/navigation/NavList/NavList.stories.playwright.json +2 -2
  163. package/src/navigation/NavList/NavListAuto/index.tsx +68 -0
  164. package/src/navigation/NavList/{NavMenuContainerContentList.tsx → NavMenuContentList.tsx} +8 -8
  165. package/src/navigation/NavList/__stories__/Default.tsx +28 -40
  166. package/src/navigation/NavList/__stories__/NavVerticalLayout.tsx +25 -33
  167. package/src/navigation/NavList/hooks/useNavList.ts +3 -3
  168. package/src/navigation/NavList/hooks/useTogglableNav.tsx +31 -19
  169. package/src/navigation/NavList/index.tsx +16 -17
  170. package/src/navigation/NavList/types.tsx +16 -28
  171. package/src/navigation/Pagination/__stories__/Default.tsx +2 -76
  172. package/src/navigation/Pagination/index.mdx +1 -2
  173. package/src/navigation/Tabs/index.mdx +6 -0
  174. package/src/registry.js +4 -40
  175. package/src/typography/Hint/index.mdx +2 -0
  176. package/src/typography/NormalText/index.mdx +2 -0
  177. package/src/typography/Paragraph/index.mdx +1 -0
  178. package/typography/Hint/index.mdx +2 -0
  179. package/typography/NormalText/index.mdx +2 -0
  180. package/typography/Paragraph/index.mdx +1 -0
  181. package/es/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
  182. package/es/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
  183. package/es/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
  184. package/es/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
  185. package/es/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
  186. package/es/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
  187. package/es/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
  188. package/es/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
  189. package/es/navigation/NavList/NavListItem.js +0 -23
  190. package/es/navigation/NavList/NavListItemBase.js +0 -44
  191. package/es/navigation/NavList/NavListItemButton.js +0 -3
  192. package/es/navigation/NavList/NavListItemLink.js +0 -3
  193. package/es/navigation/NavList/NavMenu.js +0 -3
  194. package/es/navigation/NavList/NavMenuContainer.js +0 -3
  195. package/es/navigation/NavList/NavMenuContainerContent.js +0 -3
  196. package/es/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
  197. package/es/navigation/NavList/NavMenuContainerTitle.js +0 -3
  198. package/es/navigation/NavList/NavVertical.js +0 -3
  199. package/es/navigation/NavList/NavVerticalItem.js +0 -3
  200. package/esm/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
  201. package/esm/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
  202. package/esm/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
  203. package/esm/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
  204. package/esm/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
  205. package/esm/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
  206. package/esm/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
  207. package/esm/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
  208. package/esm/navigation/NavList/NavListItem.js +0 -23
  209. package/esm/navigation/NavList/NavListItemBase.js +0 -44
  210. package/esm/navigation/NavList/NavListItemButton.js +0 -3
  211. package/esm/navigation/NavList/NavListItemLink.js +0 -3
  212. package/esm/navigation/NavList/NavMenu.js +0 -3
  213. package/esm/navigation/NavList/NavMenuContainer.js +0 -3
  214. package/esm/navigation/NavList/NavMenuContainerContent.js +0 -3
  215. package/esm/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
  216. package/esm/navigation/NavList/NavMenuContainerTitle.js +0 -3
  217. package/esm/navigation/NavList/NavVertical.js +0 -3
  218. package/esm/navigation/NavList/NavVerticalItem.js +0 -3
  219. package/navigation/NavList/NavListAuto/NavListAuto.js +0 -48
  220. package/navigation/NavList/NavListAuto/NavListBaseAuto.d.ts +0 -3
  221. package/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -38
  222. package/navigation/NavList/NavListAuto/NavListContextAuto.d.ts +0 -29
  223. package/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -128
  224. package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.d.ts +0 -9
  225. package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -51
  226. package/navigation/NavList/NavListAuto/NavListItemAuto.d.ts +0 -8
  227. package/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -63
  228. package/navigation/NavList/NavListAuto/NavListItemButtonAuto.d.ts +0 -12
  229. package/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -48
  230. package/navigation/NavList/NavListAuto/NavListMenuAuto.d.ts +0 -11
  231. package/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -56
  232. package/navigation/NavList/NavListAuto/NavListSubMenuAuto.d.ts +0 -9
  233. package/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -44
  234. package/navigation/NavList/NavListItem.d.ts +0 -4
  235. package/navigation/NavList/NavListItem.js +0 -42
  236. package/navigation/NavList/NavListItemBase.d.ts +0 -15
  237. package/navigation/NavList/NavListItemBase.js +0 -68
  238. package/navigation/NavList/NavListItemButton.d.ts +0 -3
  239. package/navigation/NavList/NavListItemButton.js +0 -30
  240. package/navigation/NavList/NavListItemLink.d.ts +0 -3
  241. package/navigation/NavList/NavListItemLink.js +0 -30
  242. package/navigation/NavList/NavMenu.d.ts +0 -3
  243. package/navigation/NavList/NavMenu.js +0 -30
  244. package/navigation/NavList/NavMenuContainer.d.ts +0 -3
  245. package/navigation/NavList/NavMenuContainer.js +0 -30
  246. package/navigation/NavList/NavMenuContainerContent.d.ts +0 -3
  247. package/navigation/NavList/NavMenuContainerContent.js +0 -30
  248. package/navigation/NavList/NavMenuContainerContentList.d.ts +0 -5
  249. package/navigation/NavList/NavMenuContainerContentListItem.d.ts +0 -3
  250. package/navigation/NavList/NavMenuContainerContentListItem.js +0 -30
  251. package/navigation/NavList/NavMenuContainerTitle.d.ts +0 -3
  252. package/navigation/NavList/NavMenuContainerTitle.js +0 -30
  253. package/navigation/NavList/NavVertical.d.ts +0 -3
  254. package/navigation/NavList/NavVertical.js +0 -30
  255. package/navigation/NavList/NavVerticalItem.d.ts +0 -3
  256. package/navigation/NavList/NavVerticalItem.js +0 -30
  257. package/src/navigation/NavList/NavListAuto/NavListAuto.tsx +0 -34
  258. package/src/navigation/NavList/NavListAuto/NavListBaseAuto.tsx +0 -20
  259. package/src/navigation/NavList/NavListAuto/NavListContextAuto.tsx +0 -112
  260. package/src/navigation/NavList/NavListAuto/NavListItemAnchorAuto.tsx +0 -38
  261. package/src/navigation/NavList/NavListAuto/NavListItemAuto.tsx +0 -49
  262. package/src/navigation/NavList/NavListAuto/NavListItemButtonAuto.tsx +0 -53
  263. package/src/navigation/NavList/NavListAuto/NavListMenuAuto.tsx +0 -51
  264. package/src/navigation/NavList/NavListAuto/NavListSubMenuAuto.tsx +0 -32
  265. package/src/navigation/NavList/NavListItem.tsx +0 -46
  266. package/src/navigation/NavList/NavListItemBase.tsx +0 -63
  267. package/src/navigation/NavList/NavListItemButton.tsx +0 -3
  268. package/src/navigation/NavList/NavListItemLink.tsx +0 -3
  269. package/src/navigation/NavList/NavMenu.tsx +0 -3
  270. package/src/navigation/NavList/NavMenuContainer.tsx +0 -3
  271. package/src/navigation/NavList/NavMenuContainerContent.tsx +0 -3
  272. package/src/navigation/NavList/NavMenuContainerContentListItem.tsx +0 -3
  273. package/src/navigation/NavList/NavMenuContainerTitle.tsx +0 -3
  274. package/src/navigation/NavList/NavVertical.tsx +0 -3
  275. package/src/navigation/NavList/NavVerticalItem.tsx +0 -3
  276. /package/navigation/NavList/NavListAuto/{NavListAuto.d.ts → index.d.ts} +0 -0
@@ -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" />
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v1.0.0-480e3d97
1
+ /** @license Digigov v1.0.0-60addd4a
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
 
@@ -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;
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["children"];
4
4
  import React from 'react';
5
- import NavMenuContainerContentListWrapper from '@digigov/react-core/NavMenuContainerContentList';
6
- export * from '@digigov/react-core/NavMenuContainerContentList';
5
+ import NavMenuContentListBase from '@digigov/react-core/NavMenuContentListBase';
6
+ export * from '@digigov/react-core/NavMenuContentListBase';
7
7
 
8
8
  var focusNavListItem = function focusNavListItem(e, nextItemIndex) {
9
9
  var _document$activeEleme;
@@ -40,11 +40,11 @@ var focusNavListItem = function focusNavListItem(e, nextItemIndex) {
40
40
  }
41
41
  };
42
42
 
43
- export var NavMenuContainerContentList = function NavMenuContainerContentList(_ref) {
43
+ export var NavMenuContentList = function NavMenuContentList(_ref) {
44
44
  var children = _ref.children,
45
45
  props = _objectWithoutProperties(_ref, _excluded);
46
46
 
47
- return /*#__PURE__*/React.createElement(NavMenuContainerContentListWrapper, _extends({}, props, {
47
+ return /*#__PURE__*/React.createElement(NavMenuContentListBase, _extends({}, props, {
48
48
  onKeyDown: function onKeyDown(event) {
49
49
  switch (event.key) {
50
50
  case 'ArrowDown':
@@ -63,4 +63,4 @@ export var NavMenuContainerContentList = function NavMenuContainerContentList(_r
63
63
  }
64
64
  }), children);
65
65
  };
66
- export default NavMenuContainerContentList;
66
+ export default NavMenuContentList;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import NavList, { isNavListItemLinkInterface, Nav, NavListItem, NavMenu, NavMenuContainer, NavMenuContainerContent, NavMenuContainerContentList, NavMenuContainerContentListItem, NavMenuContainerTitle, useNavList } from '@digigov/ui/navigation/NavList';
2
+ import React, { Fragment } from 'react';
3
+ import { Nav, NavList, NavListItemAction, NavMenuContainer, NavMenuContent, NavMenuContentList, NavMenuContentListItem, NavMenuTitle, useNavList } from '@digigov/ui/navigation/NavList';
4
4
  import { Link } from '@digigov/ui/navigation/Link';
5
5
  var links = [{
6
6
  name: 'home',
@@ -40,42 +40,26 @@ export var Default = function Default() {
40
40
  var border = false;
41
41
 
42
42
  var _useNavList = useNavList(),
43
- container = _useNavList.container,
44
- registerButton = _useNavList.registerButton,
45
- registerLink = _useNavList.registerLink;
46
-
47
- var setRegisterButton = function setRegisterButton(name) {
48
- return _extends({}, registerButton(name));
49
- };
50
-
51
- var setRegisterLink = function setRegisterLink(name) {
52
- return _extends({}, registerLink(name));
53
- };
43
+ registerNavItemMenu = _useNavList.registerNavItemMenu,
44
+ registerNavItem = _useNavList.registerNavItem;
54
45
 
55
46
  return /*#__PURE__*/React.createElement(Nav, {
56
47
  open: true,
57
- layout: layout,
58
48
  border: border,
59
49
  "aria-orientation": layout
60
- }, /*#__PURE__*/React.createElement(NavList, null, links.map(function (item, key) {
50
+ }, /*#__PURE__*/React.createElement(NavList, {
51
+ layout: layout
52
+ }, links.map(function (item, key) {
61
53
  var _item$subMenu;
62
54
 
63
- return /*#__PURE__*/React.createElement(React.Fragment, {
55
+ return /*#__PURE__*/React.createElement(Fragment, {
64
56
  key: key
65
- }, /*#__PURE__*/React.createElement(NavListItem, {
66
- link: item,
67
- setRegisterButton: setRegisterButton,
68
- setRegisterLink: setRegisterLink
69
- }), /*#__PURE__*/React.createElement(NavMenu, _extends({
57
+ }, /*#__PURE__*/React.createElement(NavListItemAction, registerNavItem(item), item.label), item.subMenu && /*#__PURE__*/React.createElement(NavMenuContainer, _extends({
70
58
  layout: layout
71
- }, container(item.name)), /*#__PURE__*/React.createElement(NavMenuContainer, {
72
- layout: layout,
73
- paddingLeft: 5,
74
- paddingRight: 5
75
- }, /*#__PURE__*/React.createElement(NavMenuContainerTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContainerContent, null, /*#__PURE__*/React.createElement(NavMenuContainerContentList, {
59
+ }, registerNavItemMenu(item.name)), /*#__PURE__*/React.createElement(NavMenuTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContent, null, /*#__PURE__*/React.createElement(NavMenuContentList, {
76
60
  role: "menu"
77
61
  }, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
78
- return isNavListItemLinkInterface(subMenu) && /*#__PURE__*/React.createElement(NavMenuContainerContentListItem, {
62
+ return (subMenu === null || subMenu === void 0 ? void 0 : subMenu.href) && /*#__PURE__*/React.createElement(NavMenuContentListItem, {
79
63
  key: menuIndex,
80
64
  role: "presentation"
81
65
  }, /*#__PURE__*/React.createElement(Link, {
@@ -83,7 +67,7 @@ export var Default = function Default() {
83
67
  id: subMenu.name,
84
68
  href: subMenu.href
85
69
  }, subMenu.label));
86
- }))))));
70
+ })))));
87
71
  })));
88
72
  };
89
73
  export default Default;