@navikt/ds-react 0.18.1 → 0.18.2-alpha.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 (438) hide show
  1. package/_docs.json +9165 -0
  2. package/cjs/accordion/Accordion.js +6 -5
  3. package/cjs/accordion/index.js +0 -15
  4. package/cjs/alert/Alert.js +3 -2
  5. package/cjs/alert/index.js +0 -15
  6. package/cjs/button/Button.js +3 -2
  7. package/cjs/button/index.js +0 -15
  8. package/cjs/card/index.js +0 -15
  9. package/cjs/form/ConfirmationPanel.js +3 -2
  10. package/cjs/form/Fieldset/Fieldset.js +3 -3
  11. package/cjs/form/Fieldset/index.js +2 -2
  12. package/cjs/form/Select.js +4 -3
  13. package/cjs/form/Switch.js +3 -2
  14. package/cjs/form/TextField.js +4 -3
  15. package/cjs/form/Textarea.js +3 -3
  16. package/cjs/form/checkbox/Checkbox.js +3 -2
  17. package/cjs/form/checkbox/CheckboxGroup.js +3 -3
  18. package/cjs/form/error-summary/ErrorSummary.js +4 -3
  19. package/cjs/form/error-summary/ErrorSummaryItem.js +3 -2
  20. package/cjs/form/error-summary/index.js +0 -15
  21. package/cjs/form/index.js +6 -6
  22. package/cjs/form/radio/Radio.js +3 -2
  23. package/cjs/form/radio/RadioGroup.js +3 -3
  24. package/cjs/form/radio/useRadio.js +12 -8
  25. package/cjs/form/search/Search.js +4 -4
  26. package/cjs/grid/Cell.js +3 -2
  27. package/cjs/grid/ContentContainer.js +3 -2
  28. package/cjs/grid/Grid.js +3 -2
  29. package/cjs/grid/index.js +0 -17
  30. package/cjs/guide-panel/GuidePanel.js +3 -2
  31. package/cjs/guide-panel/index.js +0 -15
  32. package/cjs/help-text/HelpText.js +3 -2
  33. package/cjs/help-text/index.js +0 -15
  34. package/cjs/link/Link.js +3 -2
  35. package/cjs/link/index.js +0 -15
  36. package/cjs/link-panel/LinkPanel.js +3 -2
  37. package/cjs/link-panel/index.js +0 -15
  38. package/cjs/loader/Loader.js +3 -2
  39. package/cjs/loader/index.js +0 -15
  40. package/cjs/menu/Menu.js +5 -4
  41. package/cjs/menu/MenuCollapse.js +3 -3
  42. package/cjs/menu/MenuItem.js +3 -2
  43. package/cjs/modal/Modal.js +5 -4
  44. package/cjs/modal/index.js +0 -15
  45. package/cjs/page-header/index.js +0 -15
  46. package/cjs/pagination/Pagination.js +3 -3
  47. package/cjs/pagination/index.js +0 -15
  48. package/cjs/panel/Panel.js +3 -2
  49. package/cjs/panel/index.js +0 -15
  50. package/cjs/popover/Popover.js +4 -3
  51. package/cjs/popover/index.js +0 -15
  52. package/cjs/read-more/ReadMore.js +3 -2
  53. package/cjs/read-more/index.js +0 -15
  54. package/cjs/speech-bubble/SpeechBubble.js +4 -3
  55. package/cjs/speech-bubble/index.js +0 -15
  56. package/cjs/step-indicator/Step.js +5 -4
  57. package/cjs/step-indicator/StepIndicator.js +4 -4
  58. package/cjs/step-indicator/index.js +0 -15
  59. package/cjs/stepper/Step.js +5 -4
  60. package/cjs/stepper/Stepper.js +4 -4
  61. package/cjs/stepper/index.js +0 -15
  62. package/cjs/table/Body.js +3 -2
  63. package/cjs/table/ColumnHeader.js +5 -4
  64. package/cjs/table/DataCell.js +5 -4
  65. package/cjs/table/ExpandableRow.js +3 -2
  66. package/cjs/table/Header.js +3 -2
  67. package/cjs/table/HeaderCell.js +5 -3
  68. package/cjs/table/Row.js +3 -2
  69. package/cjs/table/Table.js +10 -10
  70. package/cjs/table/index.js +0 -15
  71. package/cjs/tabs/Tab.js +3 -2
  72. package/cjs/tabs/TabList.js +3 -2
  73. package/cjs/tabs/TabPanel.js +2 -2
  74. package/cjs/tabs/Tabs.js +6 -6
  75. package/cjs/tag/Tag.js +3 -2
  76. package/cjs/tag/index.js +0 -15
  77. package/cjs/toggle-group/ToggleGroup.js +4 -4
  78. package/cjs/tooltip/Tooltip.js +3 -2
  79. package/cjs/tooltip/index.js +0 -15
  80. package/cjs/typography/BodyLong.js +3 -2
  81. package/cjs/typography/BodyShort.js +3 -2
  82. package/cjs/typography/Detail.js +3 -2
  83. package/cjs/typography/Heading.js +3 -2
  84. package/cjs/typography/Ingress.js +3 -2
  85. package/cjs/typography/Label.js +3 -2
  86. package/cjs/typography/index.js +5 -5
  87. package/esm/accordion/Accordion.d.ts +1 -1
  88. package/esm/accordion/Accordion.js +1 -1
  89. package/esm/accordion/Accordion.js.map +1 -1
  90. package/esm/accordion/AccordionHeader.d.ts +1 -1
  91. package/esm/accordion/AccordionItem.d.ts +2 -2
  92. package/esm/accordion/index.d.ts +1 -2
  93. package/esm/accordion/index.js +0 -1
  94. package/esm/accordion/index.js.map +1 -1
  95. package/esm/alert/Alert.d.ts +2 -2
  96. package/esm/alert/Alert.js +1 -1
  97. package/esm/alert/Alert.js.map +1 -1
  98. package/esm/alert/index.d.ts +1 -1
  99. package/esm/alert/index.js +0 -1
  100. package/esm/alert/index.js.map +1 -1
  101. package/esm/button/Button.d.ts +3 -3
  102. package/esm/button/Button.js +1 -1
  103. package/esm/button/Button.js.map +1 -1
  104. package/esm/button/index.d.ts +1 -1
  105. package/esm/button/index.js +0 -1
  106. package/esm/button/index.js.map +1 -1
  107. package/esm/card/index.d.ts +1 -1
  108. package/esm/card/index.js +0 -1
  109. package/esm/card/index.js.map +1 -1
  110. package/esm/form/ConfirmationPanel.d.ts +1 -1
  111. package/esm/form/ConfirmationPanel.js +1 -1
  112. package/esm/form/ConfirmationPanel.js.map +1 -1
  113. package/esm/form/Fieldset/Fieldset.d.ts +1 -1
  114. package/esm/form/Fieldset/Fieldset.js +1 -1
  115. package/esm/form/Fieldset/Fieldset.js.map +1 -1
  116. package/esm/form/Fieldset/index.d.ts +1 -1
  117. package/esm/form/Fieldset/index.js +1 -1
  118. package/esm/form/Fieldset/index.js.map +1 -1
  119. package/esm/form/Select.d.ts +1 -1
  120. package/esm/form/Select.js +2 -2
  121. package/esm/form/Select.js.map +1 -1
  122. package/esm/form/Switch.d.ts +1 -1
  123. package/esm/form/Switch.js +1 -1
  124. package/esm/form/Switch.js.map +1 -1
  125. package/esm/form/TextField.d.ts +1 -1
  126. package/esm/form/TextField.js +2 -2
  127. package/esm/form/TextField.js.map +1 -1
  128. package/esm/form/Textarea.d.ts +1 -1
  129. package/esm/form/Textarea.js +1 -1
  130. package/esm/form/Textarea.js.map +1 -1
  131. package/esm/form/checkbox/Checkbox.d.ts +1 -1
  132. package/esm/form/checkbox/Checkbox.js +1 -1
  133. package/esm/form/checkbox/Checkbox.js.map +1 -1
  134. package/esm/form/checkbox/CheckboxGroup.d.ts +1 -1
  135. package/esm/form/checkbox/CheckboxGroup.js +1 -1
  136. package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
  137. package/esm/form/error-summary/ErrorSummary.d.ts +1 -1
  138. package/esm/form/error-summary/ErrorSummary.js +1 -1
  139. package/esm/form/error-summary/ErrorSummary.js.map +1 -1
  140. package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
  141. package/esm/form/error-summary/ErrorSummaryItem.js +1 -1
  142. package/esm/form/error-summary/ErrorSummaryItem.js.map +1 -1
  143. package/esm/form/error-summary/index.d.ts +1 -1
  144. package/esm/form/error-summary/index.js +0 -1
  145. package/esm/form/error-summary/index.js.map +1 -1
  146. package/esm/form/index.d.ts +5 -5
  147. package/esm/form/index.js +3 -3
  148. package/esm/form/index.js.map +1 -1
  149. package/esm/form/radio/Radio.d.ts +1 -1
  150. package/esm/form/radio/Radio.js +1 -1
  151. package/esm/form/radio/Radio.js.map +1 -1
  152. package/esm/form/radio/RadioGroup.d.ts +1 -1
  153. package/esm/form/radio/RadioGroup.js +1 -1
  154. package/esm/form/radio/RadioGroup.js.map +1 -1
  155. package/esm/form/radio/useRadio.d.ts +1 -19
  156. package/esm/form/radio/useRadio.js +13 -9
  157. package/esm/form/radio/useRadio.js.map +1 -1
  158. package/esm/form/search/Search.d.ts +1 -1
  159. package/esm/form/search/Search.js +1 -1
  160. package/esm/form/search/Search.js.map +1 -1
  161. package/esm/grid/Cell.d.ts +1 -1
  162. package/esm/grid/Cell.js +1 -1
  163. package/esm/grid/Cell.js.map +1 -1
  164. package/esm/grid/ContentContainer.d.ts +1 -1
  165. package/esm/grid/ContentContainer.js +1 -1
  166. package/esm/grid/ContentContainer.js.map +1 -1
  167. package/esm/grid/Grid.d.ts +1 -1
  168. package/esm/grid/Grid.js +1 -1
  169. package/esm/grid/Grid.js.map +1 -1
  170. package/esm/grid/index.d.ts +3 -6
  171. package/esm/grid/index.js +1 -4
  172. package/esm/grid/index.js.map +1 -1
  173. package/esm/guide-panel/GuidePanel.d.ts +1 -1
  174. package/esm/guide-panel/GuidePanel.js +1 -1
  175. package/esm/guide-panel/GuidePanel.js.map +1 -1
  176. package/esm/guide-panel/index.d.ts +1 -2
  177. package/esm/guide-panel/index.js +0 -1
  178. package/esm/guide-panel/index.js.map +1 -1
  179. package/esm/help-text/HelpText.d.ts +1 -1
  180. package/esm/help-text/HelpText.js +1 -1
  181. package/esm/help-text/HelpText.js.map +1 -1
  182. package/esm/help-text/index.d.ts +1 -1
  183. package/esm/help-text/index.js +0 -1
  184. package/esm/help-text/index.js.map +1 -1
  185. package/esm/link/Link.d.ts +1 -1
  186. package/esm/link/Link.js +1 -1
  187. package/esm/link/Link.js.map +1 -1
  188. package/esm/link/index.d.ts +1 -1
  189. package/esm/link/index.js +0 -1
  190. package/esm/link/index.js.map +1 -1
  191. package/esm/link-panel/LinkPanel.d.ts +1 -0
  192. package/esm/link-panel/LinkPanel.js +1 -1
  193. package/esm/link-panel/LinkPanel.js.map +1 -1
  194. package/esm/link-panel/index.d.ts +1 -1
  195. package/esm/link-panel/index.js +0 -1
  196. package/esm/link-panel/index.js.map +1 -1
  197. package/esm/loader/Loader.d.ts +1 -1
  198. package/esm/loader/Loader.js +1 -1
  199. package/esm/loader/Loader.js.map +1 -1
  200. package/esm/loader/index.d.ts +1 -1
  201. package/esm/loader/index.js +0 -1
  202. package/esm/loader/index.js.map +1 -1
  203. package/esm/menu/Menu.d.ts +1 -1
  204. package/esm/menu/Menu.js +1 -1
  205. package/esm/menu/Menu.js.map +1 -1
  206. package/esm/menu/MenuCollapse.d.ts +1 -1
  207. package/esm/menu/MenuCollapse.js +1 -1
  208. package/esm/menu/MenuCollapse.js.map +1 -1
  209. package/esm/menu/MenuItem.d.ts +1 -1
  210. package/esm/menu/MenuItem.js +1 -1
  211. package/esm/menu/MenuItem.js.map +1 -1
  212. package/esm/modal/Modal.d.ts +1 -1
  213. package/esm/modal/Modal.js +1 -1
  214. package/esm/modal/Modal.js.map +1 -1
  215. package/esm/modal/index.d.ts +1 -2
  216. package/esm/modal/index.js +0 -1
  217. package/esm/modal/index.js.map +1 -1
  218. package/esm/page-header/index.d.ts +1 -1
  219. package/esm/page-header/index.js +0 -1
  220. package/esm/page-header/index.js.map +1 -1
  221. package/esm/pagination/Pagination.d.ts +2 -2
  222. package/esm/pagination/Pagination.js +1 -1
  223. package/esm/pagination/Pagination.js.map +1 -1
  224. package/esm/pagination/index.d.ts +1 -1
  225. package/esm/pagination/index.js +0 -1
  226. package/esm/pagination/index.js.map +1 -1
  227. package/esm/panel/Panel.d.ts +1 -1
  228. package/esm/panel/Panel.js +1 -1
  229. package/esm/panel/Panel.js.map +1 -1
  230. package/esm/panel/index.d.ts +1 -1
  231. package/esm/panel/index.js +0 -1
  232. package/esm/panel/index.js.map +1 -1
  233. package/esm/popover/Popover.d.ts +1 -1
  234. package/esm/popover/Popover.js +1 -1
  235. package/esm/popover/Popover.js.map +1 -1
  236. package/esm/popover/index.d.ts +1 -2
  237. package/esm/popover/index.js +0 -1
  238. package/esm/popover/index.js.map +1 -1
  239. package/esm/read-more/ReadMore.d.ts +1 -1
  240. package/esm/read-more/ReadMore.js +1 -1
  241. package/esm/read-more/ReadMore.js.map +1 -1
  242. package/esm/read-more/index.d.ts +1 -2
  243. package/esm/read-more/index.js +0 -1
  244. package/esm/read-more/index.js.map +1 -1
  245. package/esm/speech-bubble/SpeechBubble.d.ts +1 -1
  246. package/esm/speech-bubble/SpeechBubble.js +1 -1
  247. package/esm/speech-bubble/SpeechBubble.js.map +1 -1
  248. package/esm/speech-bubble/index.d.ts +1 -2
  249. package/esm/speech-bubble/index.js +0 -1
  250. package/esm/speech-bubble/index.js.map +1 -1
  251. package/esm/step-indicator/Step.d.ts +1 -0
  252. package/esm/step-indicator/Step.js +3 -3
  253. package/esm/step-indicator/Step.js.map +1 -1
  254. package/esm/step-indicator/StepIndicator.d.ts +1 -1
  255. package/esm/step-indicator/StepIndicator.js +3 -3
  256. package/esm/step-indicator/StepIndicator.js.map +1 -1
  257. package/esm/step-indicator/index.d.ts +1 -2
  258. package/esm/step-indicator/index.js +0 -1
  259. package/esm/step-indicator/index.js.map +1 -1
  260. package/esm/stepper/Step.d.ts +1 -0
  261. package/esm/stepper/Step.js +2 -2
  262. package/esm/stepper/Step.js.map +1 -1
  263. package/esm/stepper/Stepper.d.ts +1 -1
  264. package/esm/stepper/Stepper.js +1 -1
  265. package/esm/stepper/Stepper.js.map +1 -1
  266. package/esm/stepper/index.d.ts +1 -2
  267. package/esm/stepper/index.js +0 -1
  268. package/esm/stepper/index.js.map +1 -1
  269. package/esm/table/Body.d.ts +2 -2
  270. package/esm/table/Body.js +1 -1
  271. package/esm/table/Body.js.map +1 -1
  272. package/esm/table/ColumnHeader.d.ts +2 -2
  273. package/esm/table/ColumnHeader.js +2 -2
  274. package/esm/table/ColumnHeader.js.map +1 -1
  275. package/esm/table/DataCell.d.ts +2 -2
  276. package/esm/table/DataCell.js +2 -2
  277. package/esm/table/DataCell.js.map +1 -1
  278. package/esm/table/ExpandableRow.d.ts +2 -2
  279. package/esm/table/ExpandableRow.js +1 -1
  280. package/esm/table/ExpandableRow.js.map +1 -1
  281. package/esm/table/Header.d.ts +2 -2
  282. package/esm/table/Header.js +1 -1
  283. package/esm/table/Header.js.map +1 -1
  284. package/esm/table/HeaderCell.d.ts +1 -1
  285. package/esm/table/HeaderCell.js +3 -2
  286. package/esm/table/HeaderCell.js.map +1 -1
  287. package/esm/table/Row.d.ts +1 -1
  288. package/esm/table/Row.js +1 -1
  289. package/esm/table/Row.js.map +1 -1
  290. package/esm/table/Table.d.ts +1 -1
  291. package/esm/table/Table.js +1 -1
  292. package/esm/table/Table.js.map +1 -1
  293. package/esm/table/index.d.ts +8 -2
  294. package/esm/table/index.js +0 -1
  295. package/esm/table/index.js.map +1 -1
  296. package/esm/tabs/Tab.d.ts +1 -1
  297. package/esm/tabs/Tab.js +1 -1
  298. package/esm/tabs/Tab.js.map +1 -1
  299. package/esm/tabs/TabList.d.ts +4 -4
  300. package/esm/tabs/TabList.js +2 -2
  301. package/esm/tabs/TabList.js.map +1 -1
  302. package/esm/tabs/TabPanel.d.ts +4 -4
  303. package/esm/tabs/TabPanel.js +2 -2
  304. package/esm/tabs/TabPanel.js.map +1 -1
  305. package/esm/tabs/Tabs.d.ts +5 -5
  306. package/esm/tabs/Tabs.js +5 -5
  307. package/esm/tabs/Tabs.js.map +1 -1
  308. package/esm/tabs/index.d.ts +3 -1
  309. package/esm/tabs/index.js.map +1 -1
  310. package/esm/tag/Tag.d.ts +1 -1
  311. package/esm/tag/Tag.js +1 -1
  312. package/esm/tag/Tag.js.map +1 -1
  313. package/esm/tag/index.d.ts +1 -2
  314. package/esm/tag/index.js +0 -1
  315. package/esm/tag/index.js.map +1 -1
  316. package/esm/toggle-group/ToggleGroup.d.ts +1 -1
  317. package/esm/toggle-group/ToggleGroup.js +1 -1
  318. package/esm/toggle-group/ToggleGroup.js.map +1 -1
  319. package/esm/toggle-group/index.d.ts +2 -2
  320. package/esm/toggle-group/index.js.map +1 -1
  321. package/esm/tooltip/Tooltip.d.ts +1 -1
  322. package/esm/tooltip/Tooltip.js +1 -1
  323. package/esm/tooltip/Tooltip.js.map +1 -1
  324. package/esm/tooltip/index.d.ts +1 -2
  325. package/esm/tooltip/index.js +0 -1
  326. package/esm/tooltip/index.js.map +1 -1
  327. package/esm/typography/BodyLong.d.ts +1 -1
  328. package/esm/typography/BodyLong.js +1 -1
  329. package/esm/typography/BodyLong.js.map +1 -1
  330. package/esm/typography/BodyShort.d.ts +1 -1
  331. package/esm/typography/BodyShort.js +1 -1
  332. package/esm/typography/BodyShort.js.map +1 -1
  333. package/esm/typography/Detail.d.ts +1 -1
  334. package/esm/typography/Detail.js +1 -1
  335. package/esm/typography/Detail.js.map +1 -1
  336. package/esm/typography/Heading.d.ts +1 -1
  337. package/esm/typography/Heading.js +1 -1
  338. package/esm/typography/Heading.js.map +1 -1
  339. package/esm/typography/Ingress.d.ts +1 -1
  340. package/esm/typography/Ingress.js +1 -1
  341. package/esm/typography/Ingress.js.map +1 -1
  342. package/esm/typography/Label.d.ts +1 -1
  343. package/esm/typography/Label.js +1 -1
  344. package/esm/typography/Label.js.map +1 -1
  345. package/esm/typography/index.d.ts +6 -6
  346. package/esm/typography/index.js +2 -2
  347. package/esm/typography/index.js.map +1 -1
  348. package/package.json +10 -6
  349. package/src/accordion/Accordion.tsx +1 -1
  350. package/src/accordion/AccordionHeader.tsx +1 -1
  351. package/src/accordion/AccordionItem.tsx +2 -2
  352. package/src/accordion/index.ts +1 -2
  353. package/src/alert/Alert.tsx +2 -2
  354. package/src/alert/index.ts +1 -1
  355. package/src/button/Button.tsx +6 -3
  356. package/src/button/index.ts +1 -1
  357. package/src/card/index.ts +1 -1
  358. package/src/form/ConfirmationPanel.tsx +25 -24
  359. package/src/form/Fieldset/Fieldset.tsx +2 -1
  360. package/src/form/Fieldset/index.ts +5 -1
  361. package/src/form/Select.tsx +72 -68
  362. package/src/form/Switch.tsx +82 -80
  363. package/src/form/TextField.tsx +86 -82
  364. package/src/form/Textarea.tsx +1 -1
  365. package/src/form/checkbox/Checkbox.tsx +63 -61
  366. package/src/form/checkbox/CheckboxGroup.tsx +4 -1
  367. package/src/form/error-summary/ErrorSummary.tsx +1 -1
  368. package/src/form/error-summary/ErrorSummaryItem.tsx +1 -1
  369. package/src/form/error-summary/index.ts +1 -1
  370. package/src/form/index.ts +7 -11
  371. package/src/form/radio/Radio.tsx +1 -1
  372. package/src/form/radio/RadioGroup.tsx +1 -1
  373. package/src/form/radio/useRadio.ts +27 -21
  374. package/src/form/search/Search.tsx +130 -128
  375. package/src/grid/Cell.tsx +1 -1
  376. package/src/grid/ContentContainer.tsx +10 -9
  377. package/src/grid/Grid.tsx +2 -1
  378. package/src/grid/index.ts +6 -6
  379. package/src/guide-panel/GuidePanel.tsx +1 -1
  380. package/src/guide-panel/index.ts +1 -2
  381. package/src/help-text/HelpText.tsx +1 -1
  382. package/src/help-text/index.ts +1 -1
  383. package/src/link/Link.tsx +1 -1
  384. package/src/link/index.ts +1 -1
  385. package/src/link-panel/LinkPanel.tsx +1 -1
  386. package/src/link-panel/index.ts +1 -1
  387. package/src/loader/Loader.tsx +1 -1
  388. package/src/loader/index.ts +1 -1
  389. package/src/menu/Menu.tsx +1 -1
  390. package/src/menu/MenuCollapse.tsx +1 -1
  391. package/src/menu/MenuItem.tsx +1 -1
  392. package/src/modal/Modal.tsx +1 -1
  393. package/src/modal/index.ts +1 -2
  394. package/src/page-header/index.ts +1 -1
  395. package/src/pagination/Pagination.tsx +2 -2
  396. package/src/pagination/index.ts +1 -1
  397. package/src/panel/Panel.tsx +1 -1
  398. package/src/panel/index.ts +1 -1
  399. package/src/popover/Popover.tsx +1 -1
  400. package/src/popover/index.ts +1 -2
  401. package/src/read-more/ReadMore.tsx +1 -1
  402. package/src/read-more/index.ts +1 -2
  403. package/src/speech-bubble/SpeechBubble.tsx +1 -1
  404. package/src/speech-bubble/index.ts +1 -2
  405. package/src/step-indicator/Step.tsx +3 -3
  406. package/src/step-indicator/StepIndicator.tsx +6 -3
  407. package/src/step-indicator/index.ts +1 -2
  408. package/src/stepper/Step.tsx +2 -2
  409. package/src/stepper/Stepper.tsx +4 -1
  410. package/src/stepper/index.ts +1 -2
  411. package/src/table/Body.tsx +3 -2
  412. package/src/table/ColumnHeader.tsx +3 -3
  413. package/src/table/DataCell.tsx +4 -3
  414. package/src/table/ExpandableRow.tsx +2 -2
  415. package/src/table/Header.tsx +3 -2
  416. package/src/table/HeaderCell.tsx +3 -2
  417. package/src/table/Row.tsx +1 -1
  418. package/src/table/Table.tsx +1 -1
  419. package/src/table/index.ts +8 -2
  420. package/src/tabs/Tab.tsx +1 -1
  421. package/src/tabs/TabList.tsx +6 -6
  422. package/src/tabs/TabPanel.tsx +6 -6
  423. package/src/tabs/Tabs.tsx +7 -7
  424. package/src/tabs/index.ts +3 -1
  425. package/src/tag/Tag.tsx +1 -1
  426. package/src/tag/index.ts +1 -2
  427. package/src/toggle-group/ToggleGroup.tsx +1 -1
  428. package/src/toggle-group/index.ts +2 -2
  429. package/src/tooltip/Tooltip.tsx +1 -1
  430. package/src/tooltip/index.ts +1 -2
  431. package/src/typography/BodyLong.tsx +1 -1
  432. package/src/typography/BodyShort.tsx +1 -1
  433. package/src/typography/Detail.tsx +1 -1
  434. package/src/typography/Heading.tsx +1 -1
  435. package/src/typography/Ingress.tsx +1 -1
  436. package/src/typography/Label.tsx +1 -1
  437. package/src/typography/index.ts +6 -6
  438. package/LICENCE +0 -31
@@ -1,2 +1 @@
1
- export { default as Stepper } from "./Stepper";
2
- export * from "./Stepper";
1
+ export { default as Stepper, StepperProps } from "./Stepper";
@@ -1,14 +1,15 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import cl from "classnames";
3
3
 
4
- interface BodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {}
4
+ export interface BodyProps
5
+ extends React.HTMLAttributes<HTMLTableSectionElement> {}
5
6
 
6
7
  export interface BodyType
7
8
  extends React.ForwardRefExoticComponent<
8
9
  BodyProps & React.RefAttributes<HTMLTableSectionElement>
9
10
  > {}
10
11
 
11
- const Body: BodyType = forwardRef(({ className, ...rest }, ref) => (
12
+ export const Body: BodyType = forwardRef(({ className, ...rest }, ref) => (
12
13
  <tbody {...rest} ref={ref} className={cl("navds-table__body", className)} />
13
14
  ));
14
15
 
@@ -1,9 +1,9 @@
1
1
  import React, { forwardRef, useContext } from "react";
2
2
  import { Down, Up, UpDown } from "@navikt/ds-icons";
3
- import { TableContext } from "..";
3
+ import { TableContext } from "./Table";
4
4
  import HeaderCell, { HeaderCellProps } from "./HeaderCell";
5
5
 
6
- interface ColumnHeaderProps extends HeaderCellProps {
6
+ export interface ColumnHeaderProps extends HeaderCellProps {
7
7
  /**
8
8
  * Key to sort by
9
9
  */
@@ -20,7 +20,7 @@ export interface ColumnHeaderType
20
20
  ColumnHeaderProps & React.RefAttributes<HTMLTableCellElement>
21
21
  > {}
22
22
 
23
- const ColumnHeader: ColumnHeaderType = forwardRef(
23
+ export const ColumnHeader: ColumnHeaderType = forwardRef(
24
24
  ({ className, children, sortable = false, sortKey, ...rest }, ref) => {
25
25
  const context = useContext(TableContext);
26
26
 
@@ -1,9 +1,10 @@
1
1
  import React, { forwardRef, useContext } from "react";
2
2
  import cl from "classnames";
3
3
  import { BodyShort } from "..";
4
- import { TableContext } from ".";
4
+ import { TableContext } from "./Table";
5
5
 
6
- interface DataCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
6
+ export interface DataCellProps
7
+ extends React.TdHTMLAttributes<HTMLTableCellElement> {
7
8
  /**
8
9
  * Content alignment
9
10
  * @default "left"
@@ -16,7 +17,7 @@ export interface DataCellType
16
17
  DataCellProps & React.RefAttributes<HTMLTableCellElement>
17
18
  > {}
18
19
 
19
- const DataCell: DataCellType = forwardRef(
20
+ export const DataCell: DataCellType = forwardRef(
20
21
  ({ className, children = "", align, ...rest }, ref) => {
21
22
  const context = useContext(TableContext);
22
23
 
@@ -6,7 +6,7 @@ import { UnmountClosed } from "react-collapse";
6
6
  import { Expand, ExpandFilled } from "@navikt/ds-icons";
7
7
  import { useId } from "..";
8
8
 
9
- interface ExpandableRowProps extends RowProps {
9
+ export interface ExpandableRowProps extends RowProps {
10
10
  /**
11
11
  * Content of the expanded row
12
12
  */
@@ -42,7 +42,7 @@ export interface ExpandableRowType
42
42
  ExpandableRowProps & React.RefAttributes<HTMLTableRowElement>
43
43
  > {}
44
44
 
45
- const ExpandableRow: ExpandableRowType = forwardRef(
45
+ export const ExpandableRow: ExpandableRowType = forwardRef(
46
46
  (
47
47
  {
48
48
  className,
@@ -1,14 +1,15 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import cl from "classnames";
3
3
 
4
- interface HeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {}
4
+ export interface HeaderProps
5
+ extends React.HTMLAttributes<HTMLTableSectionElement> {}
5
6
 
6
7
  export interface HeaderType
7
8
  extends React.ForwardRefExoticComponent<
8
9
  HeaderProps & React.RefAttributes<HTMLTableSectionElement>
9
10
  > {}
10
11
 
11
- const Header: HeaderType = forwardRef(({ className, ...rest }, ref) => (
12
+ export const Header: HeaderType = forwardRef(({ className, ...rest }, ref) => (
12
13
  <thead {...rest} ref={ref} className={cl("navds-table__header", className)} />
13
14
  ));
14
15
 
@@ -1,6 +1,7 @@
1
1
  import React, { forwardRef, useContext } from "react";
2
2
  import cl from "classnames";
3
- import { Label, TableContext } from "..";
3
+ import { Label } from "..";
4
+ import { TableContext } from "./Table";
4
5
 
5
6
  export interface HeaderCellProps
6
7
  extends React.ThHTMLAttributes<HTMLTableCellElement> {
@@ -17,7 +18,7 @@ export interface HeaderCellType
17
18
  HeaderCellProps & React.RefAttributes<HTMLTableCellElement>
18
19
  > {}
19
20
 
20
- const HeaderCell: HeaderCellType = forwardRef(
21
+ export const HeaderCell: HeaderCellType = forwardRef(
21
22
  ({ className, children, align, ...rest }, ref) => {
22
23
  const context = useContext(TableContext);
23
24
 
package/src/table/Row.tsx CHANGED
@@ -14,7 +14,7 @@ export interface RowType
14
14
  RowProps & React.RefAttributes<HTMLTableRowElement>
15
15
  > {}
16
16
 
17
- const Row: RowType = forwardRef(
17
+ export const Row: RowType = forwardRef(
18
18
  ({ className, selected = false, ...rest }, ref) => (
19
19
  <tr
20
20
  {...rest}
@@ -56,7 +56,7 @@ export interface TableContextProps {
56
56
 
57
57
  export const TableContext = createContext<TableContextProps | null>(null);
58
58
 
59
- const Table = forwardRef(
59
+ export const Table = forwardRef(
60
60
  (
61
61
  {
62
62
  className,
@@ -1,2 +1,8 @@
1
- export { default as Table } from "./Table";
2
- export * from "./Table";
1
+ export { BodyProps } from "./Body";
2
+ export { ColumnHeaderProps } from "./ColumnHeader";
3
+ export { DataCellProps } from "./DataCell";
4
+ export { ExpandableRowProps } from "./ExpandableRow";
5
+ export { HeaderProps } from "./Header";
6
+ export { HeaderCellProps } from "./HeaderCell";
7
+ export { RowProps } from "./Row";
8
+ export { default as Table, TableProps } from "./Table";
package/src/tabs/Tab.tsx CHANGED
@@ -27,7 +27,7 @@ export interface TabProps
27
27
 
28
28
  export type TabType = OverridableComponent<TabProps, HTMLButtonElement>;
29
29
 
30
- const Tab: TabType = forwardRef(
30
+ export const Tab: TabType = forwardRef(
31
31
  (
32
32
  {
33
33
  className,
@@ -5,7 +5,7 @@ import cl from "classnames";
5
5
  import React, { forwardRef, useEffect, useMemo, useRef, useState } from "react";
6
6
  import mergeRefs from "react-merge-refs";
7
7
 
8
- export interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ export interface TabListProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  /**
10
10
  * Tab elements
11
11
  */
@@ -16,11 +16,11 @@ export interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
16
16
  loop?: boolean;
17
17
  }
18
18
 
19
- export type ListType = React.ForwardRefExoticComponent<
20
- ListProps & React.RefAttributes<HTMLDivElement>
19
+ export type TabListType = React.ForwardRefExoticComponent<
20
+ TabListProps & React.RefAttributes<HTMLDivElement>
21
21
  >;
22
22
 
23
- const List = forwardRef<HTMLDivElement, ListProps>(
23
+ export const TabList = forwardRef<HTMLDivElement, TabListProps>(
24
24
  ({ className, ...rest }, ref) => {
25
25
  const listRef = useRef<HTMLDivElement | null>(null);
26
26
  const mergedRef = mergeRefs([listRef, ref]);
@@ -122,6 +122,6 @@ const List = forwardRef<HTMLDivElement, ListProps>(
122
122
  </div>
123
123
  );
124
124
  }
125
- ) as ListType;
125
+ ) as TabListType;
126
126
 
127
- export default List;
127
+ export default TabList;
@@ -2,7 +2,7 @@ import { TabsContent } from "@radix-ui/react-tabs";
2
2
  import cl from "classnames";
3
3
  import React, { forwardRef } from "react";
4
4
 
5
- export interface PanelProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ export interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  /**
7
7
  * Tab panel
8
8
  */
@@ -13,11 +13,11 @@ export interface PanelProps extends React.HTMLAttributes<HTMLDivElement> {
13
13
  value: string;
14
14
  }
15
15
 
16
- export type PanelType = React.ForwardRefExoticComponent<
17
- PanelProps & React.RefAttributes<HTMLDivElement>
16
+ export type TabPanelType = React.ForwardRefExoticComponent<
17
+ TabPanelProps & React.RefAttributes<HTMLDivElement>
18
18
  >;
19
19
 
20
- const Panel = forwardRef<HTMLDivElement, PanelProps>(
20
+ const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(
21
21
  ({ className, ...rest }, ref) => (
22
22
  <TabsContent
23
23
  {...rest}
@@ -25,6 +25,6 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(
25
25
  className={cl("navds-tabs__tabpanel", className)}
26
26
  />
27
27
  )
28
- ) as PanelType;
28
+ ) as TabPanelType;
29
29
 
30
- export default Panel;
30
+ export default TabPanel;
package/src/tabs/Tabs.tsx CHANGED
@@ -2,8 +2,8 @@ import cl from "classnames";
2
2
  import React, { createContext, forwardRef, HTMLAttributes } from "react";
3
3
  import * as RadixTabs from "@radix-ui/react-tabs";
4
4
  import Tab, { TabType } from "./Tab";
5
- import List, { ListType } from "./TabList";
6
- import Panel, { PanelType } from "./TabPanel";
5
+ import TabList, { TabListType } from "./TabList";
6
+ import TabPanel, { TabPanelType } from "./TabPanel";
7
7
 
8
8
  export interface TabsProps
9
9
  extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "dir"> {
@@ -40,8 +40,8 @@ interface TabsComponent
40
40
  TabsProps & React.RefAttributes<HTMLDivElement>
41
41
  > {
42
42
  Tab: TabType;
43
- List: ListType;
44
- Panel: PanelType;
43
+ List: TabListType;
44
+ Panel: TabPanelType;
45
45
  }
46
46
 
47
47
  interface TabsContextProps {
@@ -50,7 +50,7 @@ interface TabsContextProps {
50
50
 
51
51
  export const TabsContext = createContext<TabsContextProps | null>(null);
52
52
 
53
- const Tabs = forwardRef<HTMLDivElement, TabsProps>(
53
+ export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
54
54
  (
55
55
  {
56
56
  className,
@@ -83,7 +83,7 @@ const Tabs = forwardRef<HTMLDivElement, TabsProps>(
83
83
  ) as TabsComponent;
84
84
 
85
85
  Tabs.Tab = Tab;
86
- Tabs.List = List;
87
- Tabs.Panel = Panel;
86
+ Tabs.List = TabList;
87
+ Tabs.Panel = TabPanel;
88
88
 
89
89
  export default Tabs;
package/src/tabs/index.ts CHANGED
@@ -1,2 +1,4 @@
1
- export { default as Tabs, TabsProps } from "./Tabs";
2
1
  export { TabProps } from "./Tab";
2
+ export { TabListProps } from "./TabList";
3
+ export { TabPanelProps } from "./TabPanel";
4
+ export { default as Tabs, TabsProps } from "./Tabs";
package/src/tag/Tag.tsx CHANGED
@@ -19,7 +19,7 @@ export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
19
19
  size?: "medium" | "small";
20
20
  }
21
21
 
22
- const Tag = forwardRef<HTMLSpanElement, TagProps>(
22
+ export const Tag = forwardRef<HTMLSpanElement, TagProps>(
23
23
  ({ className, variant, size = "medium", ...rest }, ref) => {
24
24
  const Component = size === "medium" ? BodyShort : Detail;
25
25
 
package/src/tag/index.ts CHANGED
@@ -1,2 +1 @@
1
- export { default as Tag } from "./Tag";
2
- export * from "./Tag";
1
+ export { default as Tag, TagProps } from "./Tag";
@@ -53,7 +53,7 @@ export const ToggleGroupContext = createContext<ToggleContextProps | null>(
53
53
  null
54
54
  );
55
55
 
56
- const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(
56
+ export const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(
57
57
  (
58
58
  {
59
59
  className,
@@ -1,2 +1,2 @@
1
- export { default as ToggleGroup } from "./ToggleGroup";
2
- export { ToggleGroupProps } from "./ToggleGroup";
1
+ export { default as ToggleGroup, ToggleGroupProps } from "./ToggleGroup";
2
+ export { ToggleItemProps } from "./ToggleItem";
@@ -71,7 +71,7 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
71
71
  keys?: string[];
72
72
  }
73
73
 
74
- const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
74
+ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
75
75
  (
76
76
  {
77
77
  children,
@@ -1,2 +1 @@
1
- export { default as Tooltip } from "./Tooltip";
2
- export * from "./Tooltip";
1
+ export { default as Tooltip, TooltipProps } from "./Tooltip";
@@ -19,7 +19,7 @@ export interface BodyLongProps
19
19
  spacing?: boolean;
20
20
  }
21
21
 
22
- const BodyLong: OverridableComponent<
22
+ export const BodyLong: OverridableComponent<
23
23
  BodyLongProps,
24
24
  HTMLParagraphElement
25
25
  > = forwardRef(
@@ -19,7 +19,7 @@ export interface BodyShortProps
19
19
  spacing?: boolean;
20
20
  }
21
21
 
22
- const BodyShort: OverridableComponent<
22
+ export const BodyShort: OverridableComponent<
23
23
  BodyShortProps,
24
24
  HTMLParagraphElement
25
25
  > = forwardRef(
@@ -19,7 +19,7 @@ export interface DetailProps
19
19
  spacing?: boolean;
20
20
  }
21
21
 
22
- const Detail: OverridableComponent<
22
+ export const Detail: OverridableComponent<
23
23
  DetailProps,
24
24
  HTMLParagraphElement
25
25
  > = forwardRef(
@@ -23,7 +23,7 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
23
23
  spacing?: boolean;
24
24
  }
25
25
 
26
- const Heading: OverridableComponent<
26
+ export const Heading: OverridableComponent<
27
27
  HeadingProps,
28
28
  HTMLHeadingElement
29
29
  > = forwardRef(
@@ -14,7 +14,7 @@ export interface IngressProps
14
14
  spacing?: boolean;
15
15
  }
16
16
 
17
- const Ingress: OverridableComponent<
17
+ export const Ingress: OverridableComponent<
18
18
  IngressProps,
19
19
  HTMLParagraphElement
20
20
  > = forwardRef(({ className, spacing, as: Component = "p", ...rest }, ref) => (
@@ -18,7 +18,7 @@ export interface LabelProps extends React.HTMLAttributes<HTMLParagraphElement> {
18
18
  spacing?: boolean;
19
19
  }
20
20
 
21
- const Label: OverridableComponent<
21
+ export const Label: OverridableComponent<
22
22
  LabelProps,
23
23
  HTMLParagraphElement
24
24
  > = forwardRef(
@@ -1,6 +1,6 @@
1
- export { default as Heading } from "./Heading";
2
- export { default as Ingress } from "./Ingress";
3
- export { default as BodyLong } from "./BodyLong";
4
- export { default as BodyShort } from "./BodyShort";
5
- export { default as Detail } from "./Detail";
6
- export { default as Label } from "./Label";
1
+ export { BodyLongProps, default as BodyLong } from "./BodyLong";
2
+ export { BodyShortProps, default as BodyShort } from "./BodyShort";
3
+ export { default as Detail, DetailProps } from "./Detail";
4
+ export { default as Heading, HeadingProps } from "./Heading";
5
+ export { default as Ingress, IngressProps } from "./Ingress";
6
+ export { default as Label, LabelProps } from "./Label";
package/LICENCE DELETED
@@ -1,31 +0,0 @@
1
- Font License
2
-
3
- The Source Sans Pro font files in packages/node_modules/nav-frontend-typografi-style/assets are a subset of Source Sans Pro, licensed under the SIL Open Font License, and copyright Adobe Systems Incorporated, with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
4
-
5
- Icon License
6
-
7
- This project uses Streamline Icons. If you use nav-frontend-moduler in your project please adhere to the Streamline Icons license agreement found here: https://streamlineicons.com/ux/extended-license.html
8
-
9
- The rest of the codebase (excluding 3rd party dependencies):
10
-
11
- # The MIT License
12
-
13
- Copyright 2019 NAV (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration
14
-
15
- Permission is hereby granted, free of charge, to any person obtaining
16
- a copy of this software and associated documentation files (the "Software"),
17
- to deal in the Software without restriction, including without limitation
18
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
19
- and/or sell copies of the Software, and to permit persons to whom the
20
- Software is furnished to do so, subject to the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be included
23
- in all copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
29
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
30
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
31
- USE OR OTHER DEALINGS IN THE SOFTWARE.