@navikt/ds-react 0.19.25 → 1.0.0-rc.3

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 (430) hide show
  1. package/README.md +43 -0
  2. package/_docs.json +364 -520
  3. package/cjs/accordion/Accordion.js +2 -2
  4. package/cjs/accordion/AccordionContent.js +5 -9
  5. package/cjs/accordion/AccordionHeader.js +5 -10
  6. package/cjs/accordion/AccordionItem.js +3 -7
  7. package/cjs/alert/Alert.js +2 -2
  8. package/cjs/button/Button.js +9 -7
  9. package/cjs/{speech-bubble → chat}/Bubble.js +7 -4
  10. package/cjs/{speech-bubble/SpeechBubble.js → chat/Chat.js} +11 -10
  11. package/cjs/{menu → chat}/index.js +3 -3
  12. package/cjs/chat/package.json +6 -0
  13. package/cjs/form/ConfirmationPanel.js +3 -3
  14. package/cjs/form/Fieldset/Fieldset.js +6 -6
  15. package/cjs/form/Select.js +6 -6
  16. package/cjs/form/Switch.js +4 -4
  17. package/cjs/form/TextField.js +6 -6
  18. package/cjs/form/Textarea.js +14 -14
  19. package/cjs/form/checkbox/Checkbox.js +3 -3
  20. package/cjs/form/checkbox/CheckboxGroup.js +2 -2
  21. package/cjs/form/error-summary/ErrorSummary.js +3 -3
  22. package/cjs/form/error-summary/ErrorSummaryItem.js +2 -2
  23. package/cjs/form/radio/Radio.js +2 -2
  24. package/cjs/form/radio/RadioGroup.js +2 -2
  25. package/cjs/form/search/Search.js +6 -7
  26. package/cjs/form/search/SearchButton.js +2 -4
  27. package/cjs/form/useFormField.js +2 -2
  28. package/cjs/grid/Cell.js +2 -2
  29. package/cjs/grid/ContentContainer.js +2 -2
  30. package/cjs/grid/Grid.js +2 -2
  31. package/cjs/guide-panel/Guide.js +3 -3
  32. package/cjs/guide-panel/GuidePanel.js +2 -2
  33. package/cjs/help-text/HelpText.js +5 -5
  34. package/cjs/index.js +1 -6
  35. package/cjs/link/Link.js +2 -2
  36. package/cjs/link-panel/LinkPanel.js +2 -2
  37. package/cjs/link-panel/LinkPanelDescription.js +2 -2
  38. package/cjs/link-panel/LinkPanelTitle.js +2 -2
  39. package/cjs/loader/Loader.js +2 -2
  40. package/cjs/modal/Modal.js +5 -7
  41. package/cjs/modal/ModalContent.js +2 -2
  42. package/cjs/pagination/Pagination.js +18 -23
  43. package/cjs/{menu/MenuItem.js → pagination/PaginationItem.js} +5 -4
  44. package/cjs/panel/Panel.js +2 -2
  45. package/cjs/popover/Popover.js +55 -45
  46. package/cjs/popover/PopoverContent.js +2 -2
  47. package/cjs/read-more/ReadMore.js +7 -11
  48. package/cjs/stepper/Step.js +2 -2
  49. package/cjs/stepper/Stepper.js +3 -3
  50. package/cjs/table/Body.js +2 -2
  51. package/cjs/table/DataCell.js +2 -2
  52. package/cjs/table/ExpandableRow.js +9 -12
  53. package/cjs/table/Header.js +2 -2
  54. package/cjs/table/HeaderCell.js +2 -2
  55. package/cjs/table/Row.js +2 -2
  56. package/cjs/table/Table.js +2 -2
  57. package/cjs/tabs/Tab.js +4 -4
  58. package/cjs/tabs/TabList.js +8 -7
  59. package/cjs/tabs/TabPanel.js +2 -2
  60. package/cjs/tabs/Tabs.js +5 -3
  61. package/cjs/tag/Tag.js +2 -2
  62. package/cjs/toggle-group/ToggleGroup.js +5 -5
  63. package/cjs/toggle-group/ToggleItem.js +2 -2
  64. package/cjs/tooltip/Tooltip.js +45 -92
  65. package/cjs/typography/BodyLong.js +2 -2
  66. package/cjs/typography/BodyShort.js +2 -2
  67. package/cjs/typography/Detail.js +2 -2
  68. package/cjs/typography/ErrorMessage.js +2 -2
  69. package/cjs/typography/Heading.js +2 -2
  70. package/cjs/typography/Ingress.js +2 -2
  71. package/cjs/typography/Label.js +2 -2
  72. package/cjs/util/AnimateHeight.js +204 -0
  73. package/cjs/util/TextareaAutoSize.js +174 -0
  74. package/cjs/util/debounce.js +18 -0
  75. package/cjs/util/index.js +14 -1
  76. package/cjs/util/mergeRefs.js +16 -0
  77. package/cjs/util/useId.js +60 -17
  78. package/esm/accordion/Accordion.js +1 -1
  79. package/esm/accordion/Accordion.js.map +1 -1
  80. package/esm/accordion/AccordionContent.d.ts +0 -2
  81. package/esm/accordion/AccordionContent.js +5 -9
  82. package/esm/accordion/AccordionContent.js.map +1 -1
  83. package/esm/accordion/AccordionHeader.js +5 -10
  84. package/esm/accordion/AccordionHeader.js.map +1 -1
  85. package/esm/accordion/AccordionItem.d.ts +0 -8
  86. package/esm/accordion/AccordionItem.js +2 -6
  87. package/esm/accordion/AccordionItem.js.map +1 -1
  88. package/esm/alert/Alert.d.ts +1 -1
  89. package/esm/alert/Alert.js +1 -1
  90. package/esm/alert/Alert.js.map +1 -1
  91. package/esm/button/Button.d.ts +10 -1
  92. package/esm/button/Button.js +10 -8
  93. package/esm/button/Button.js.map +1 -1
  94. package/esm/{speech-bubble → chat}/Bubble.d.ts +7 -3
  95. package/esm/{speech-bubble → chat}/Bubble.js +7 -4
  96. package/esm/chat/Bubble.js.map +1 -0
  97. package/esm/chat/Chat.d.ts +38 -0
  98. package/esm/chat/Chat.js +28 -0
  99. package/esm/chat/Chat.js.map +1 -0
  100. package/esm/chat/index.d.ts +1 -0
  101. package/esm/chat/index.js +2 -0
  102. package/esm/chat/index.js.map +1 -0
  103. package/esm/form/ConfirmationPanel.d.ts +1 -1
  104. package/esm/form/ConfirmationPanel.js +3 -3
  105. package/esm/form/ConfirmationPanel.js.map +1 -1
  106. package/esm/form/Fieldset/Fieldset.js +1 -1
  107. package/esm/form/Fieldset/Fieldset.js.map +1 -1
  108. package/esm/form/Select.js +1 -1
  109. package/esm/form/Select.js.map +1 -1
  110. package/esm/form/Switch.js +1 -1
  111. package/esm/form/Switch.js.map +1 -1
  112. package/esm/form/TextField.js +1 -1
  113. package/esm/form/TextField.js.map +1 -1
  114. package/esm/form/Textarea.js +6 -6
  115. package/esm/form/Textarea.js.map +1 -1
  116. package/esm/form/checkbox/Checkbox.js +1 -1
  117. package/esm/form/checkbox/Checkbox.js.map +1 -1
  118. package/esm/form/checkbox/CheckboxGroup.js +1 -1
  119. package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
  120. package/esm/form/error-summary/ErrorSummary.js +3 -3
  121. package/esm/form/error-summary/ErrorSummary.js.map +1 -1
  122. package/esm/form/error-summary/ErrorSummaryItem.js +1 -1
  123. package/esm/form/error-summary/ErrorSummaryItem.js.map +1 -1
  124. package/esm/form/radio/Radio.js +1 -1
  125. package/esm/form/radio/Radio.js.map +1 -1
  126. package/esm/form/radio/RadioGroup.js +1 -1
  127. package/esm/form/radio/RadioGroup.js.map +1 -1
  128. package/esm/form/search/Search.js +4 -5
  129. package/esm/form/search/Search.js.map +1 -1
  130. package/esm/form/search/SearchButton.d.ts +1 -1
  131. package/esm/form/search/SearchButton.js +2 -4
  132. package/esm/form/search/SearchButton.js.map +1 -1
  133. package/esm/form/useFormField.js +1 -1
  134. package/esm/form/useFormField.js.map +1 -1
  135. package/esm/grid/Cell.js +1 -1
  136. package/esm/grid/Cell.js.map +1 -1
  137. package/esm/grid/ContentContainer.js +1 -1
  138. package/esm/grid/ContentContainer.js.map +1 -1
  139. package/esm/grid/Grid.js +1 -1
  140. package/esm/grid/Grid.js.map +1 -1
  141. package/esm/guide-panel/Guide.js +1 -1
  142. package/esm/guide-panel/Guide.js.map +1 -1
  143. package/esm/guide-panel/GuidePanel.js +1 -1
  144. package/esm/guide-panel/GuidePanel.js.map +1 -1
  145. package/esm/help-text/HelpText.d.ts +1 -2
  146. package/esm/help-text/HelpText.js +7 -7
  147. package/esm/help-text/HelpText.js.map +1 -1
  148. package/esm/index.d.ts +1 -5
  149. package/esm/index.js +1 -6
  150. package/esm/index.js.map +1 -1
  151. package/esm/link/Link.js +1 -1
  152. package/esm/link/Link.js.map +1 -1
  153. package/esm/link-panel/LinkPanel.js +1 -1
  154. package/esm/link-panel/LinkPanel.js.map +1 -1
  155. package/esm/link-panel/LinkPanelDescription.js +1 -1
  156. package/esm/link-panel/LinkPanelDescription.js.map +1 -1
  157. package/esm/link-panel/LinkPanelTitle.js +1 -1
  158. package/esm/link-panel/LinkPanelTitle.js.map +1 -1
  159. package/esm/loader/Loader.js +1 -1
  160. package/esm/loader/Loader.js.map +1 -1
  161. package/esm/modal/Modal.js +5 -7
  162. package/esm/modal/Modal.js.map +1 -1
  163. package/esm/modal/ModalContent.js +1 -1
  164. package/esm/modal/ModalContent.js.map +1 -1
  165. package/esm/pagination/Pagination.d.ts +12 -3
  166. package/esm/pagination/Pagination.js +17 -22
  167. package/esm/pagination/Pagination.js.map +1 -1
  168. package/esm/pagination/PaginationItem.d.ts +22 -0
  169. package/esm/{menu/MenuItem.js → pagination/PaginationItem.js} +6 -5
  170. package/esm/pagination/PaginationItem.js.map +1 -0
  171. package/esm/pagination/index.d.ts +1 -2
  172. package/esm/pagination/index.js.map +1 -1
  173. package/esm/panel/Panel.js +1 -1
  174. package/esm/panel/Panel.js.map +1 -1
  175. package/esm/popover/Popover.d.ts +2 -3
  176. package/esm/popover/Popover.js +56 -46
  177. package/esm/popover/Popover.js.map +1 -1
  178. package/esm/popover/PopoverContent.js +1 -1
  179. package/esm/popover/PopoverContent.js.map +1 -1
  180. package/esm/read-more/ReadMore.d.ts +0 -5
  181. package/esm/read-more/ReadMore.js +7 -11
  182. package/esm/read-more/ReadMore.js.map +1 -1
  183. package/esm/stepper/Step.js +1 -1
  184. package/esm/stepper/Step.js.map +1 -1
  185. package/esm/stepper/Stepper.js +1 -1
  186. package/esm/stepper/Stepper.js.map +1 -1
  187. package/esm/table/Body.js +1 -1
  188. package/esm/table/Body.js.map +1 -1
  189. package/esm/table/DataCell.js +1 -1
  190. package/esm/table/DataCell.js.map +1 -1
  191. package/esm/table/ExpandableRow.js +7 -10
  192. package/esm/table/ExpandableRow.js.map +1 -1
  193. package/esm/table/Header.js +1 -1
  194. package/esm/table/Header.js.map +1 -1
  195. package/esm/table/HeaderCell.js +1 -1
  196. package/esm/table/HeaderCell.js.map +1 -1
  197. package/esm/table/Row.js +1 -1
  198. package/esm/table/Row.js.map +1 -1
  199. package/esm/table/Table.js +1 -1
  200. package/esm/table/Table.js.map +1 -1
  201. package/esm/tabs/Tab.d.ts +0 -5
  202. package/esm/tabs/Tab.js +5 -5
  203. package/esm/tabs/Tab.js.map +1 -1
  204. package/esm/tabs/TabList.d.ts +0 -4
  205. package/esm/tabs/TabList.js +7 -6
  206. package/esm/tabs/TabList.js.map +1 -1
  207. package/esm/tabs/TabPanel.js +1 -1
  208. package/esm/tabs/TabPanel.js.map +1 -1
  209. package/esm/tabs/Tabs.d.ts +12 -0
  210. package/esm/tabs/Tabs.js +4 -2
  211. package/esm/tabs/Tabs.js.map +1 -1
  212. package/esm/tag/Tag.js +1 -1
  213. package/esm/tag/Tag.js.map +1 -1
  214. package/esm/toggle-group/ToggleGroup.js +3 -3
  215. package/esm/toggle-group/ToggleGroup.js.map +1 -1
  216. package/esm/toggle-group/ToggleItem.js +1 -1
  217. package/esm/toggle-group/ToggleItem.js.map +1 -1
  218. package/esm/tooltip/Tooltip.js +44 -91
  219. package/esm/tooltip/Tooltip.js.map +1 -1
  220. package/esm/typography/BodyLong.js +1 -1
  221. package/esm/typography/BodyLong.js.map +1 -1
  222. package/esm/typography/BodyShort.js +1 -1
  223. package/esm/typography/BodyShort.js.map +1 -1
  224. package/esm/typography/Detail.js +1 -1
  225. package/esm/typography/Detail.js.map +1 -1
  226. package/esm/typography/ErrorMessage.js +1 -1
  227. package/esm/typography/ErrorMessage.js.map +1 -1
  228. package/esm/typography/Heading.js +1 -1
  229. package/esm/typography/Heading.js.map +1 -1
  230. package/esm/typography/Ingress.js +1 -1
  231. package/esm/typography/Ingress.js.map +1 -1
  232. package/esm/typography/Label.js +1 -1
  233. package/esm/typography/Label.js.map +1 -1
  234. package/esm/util/AnimateHeight.d.ts +10 -0
  235. package/esm/util/AnimateHeight.js +180 -0
  236. package/esm/util/AnimateHeight.js.map +1 -0
  237. package/esm/util/TextareaAutoSize.d.ts +14 -0
  238. package/esm/util/TextareaAutoSize.js +150 -0
  239. package/esm/util/TextareaAutoSize.js.map +1 -0
  240. package/esm/util/debounce.d.ts +4 -0
  241. package/esm/util/debounce.js +16 -0
  242. package/esm/util/debounce.js.map +1 -0
  243. package/esm/util/index.d.ts +4 -0
  244. package/esm/util/index.js +9 -1
  245. package/esm/util/index.js.map +1 -1
  246. package/esm/util/mergeRefs.d.ts +2 -0
  247. package/esm/util/mergeRefs.js +14 -0
  248. package/esm/util/mergeRefs.js.map +1 -0
  249. package/esm/util/useId.d.ts +7 -3
  250. package/esm/util/useId.js +36 -16
  251. package/esm/util/useId.js.map +1 -1
  252. package/package.json +13 -15
  253. package/src/accordion/Accordion.tsx +1 -1
  254. package/src/accordion/AccordionContent.tsx +13 -19
  255. package/src/accordion/AccordionHeader.tsx +11 -18
  256. package/src/accordion/AccordionItem.tsx +2 -23
  257. package/src/accordion/accordion.stories.tsx +30 -31
  258. package/src/alert/Alert.tsx +2 -2
  259. package/src/alert/alert.stories.tsx +7 -0
  260. package/src/button/Button.tsx +39 -14
  261. package/src/button/button.stories.tsx +55 -28
  262. package/src/chat/Bubble.tsx +52 -0
  263. package/src/chat/Chat.tsx +96 -0
  264. package/src/chat/chat.stories.tsx +202 -0
  265. package/src/chat/index.ts +1 -0
  266. package/src/form/ConfirmationPanel.tsx +9 -4
  267. package/src/form/Fieldset/Fieldset.tsx +1 -1
  268. package/src/form/Select.tsx +1 -1
  269. package/src/form/Switch.tsx +1 -1
  270. package/src/form/TextField.tsx +1 -1
  271. package/src/form/Textarea.tsx +6 -6
  272. package/src/form/checkbox/Checkbox.test.tsx +20 -17
  273. package/src/form/checkbox/Checkbox.tsx +1 -1
  274. package/src/form/checkbox/CheckboxGroup.tsx +1 -1
  275. package/src/form/error-summary/ErrorSummary.tsx +3 -3
  276. package/src/form/error-summary/ErrorSummaryItem.tsx +1 -1
  277. package/src/form/radio/Radio.tsx +1 -1
  278. package/src/form/radio/RadioGroup.tsx +1 -1
  279. package/src/form/search/Search.tsx +11 -4
  280. package/src/form/search/SearchButton.tsx +8 -4
  281. package/src/form/useFormField.ts +1 -1
  282. package/src/grid/Cell.tsx +1 -1
  283. package/src/grid/ContentContainer.tsx +1 -1
  284. package/src/grid/Grid.tsx +1 -1
  285. package/src/grid/grid.stories.tsx +68 -0
  286. package/src/guide-panel/Guide.tsx +1 -1
  287. package/src/guide-panel/GuidePanel.tsx +1 -1
  288. package/src/help-text/HelpText.tsx +22 -8
  289. package/src/help-text/help-text.stories.tsx +12 -16
  290. package/src/index.ts +1 -7
  291. package/src/link/Link.tsx +1 -1
  292. package/src/link-panel/LinkPanel.tsx +1 -1
  293. package/src/link-panel/LinkPanelDescription.tsx +1 -1
  294. package/src/link-panel/LinkPanelTitle.tsx +1 -1
  295. package/src/loader/Loader.tsx +1 -1
  296. package/src/modal/Modal.tsx +6 -8
  297. package/src/modal/ModalContent.tsx +1 -1
  298. package/src/pagination/Pagination.tsx +87 -72
  299. package/src/pagination/PaginationItem.tsx +56 -0
  300. package/src/pagination/index.ts +1 -2
  301. package/src/pagination/pagination.stories.tsx +90 -16
  302. package/src/panel/Panel.tsx +1 -1
  303. package/src/popover/Popover.test.tsx +143 -0
  304. package/src/popover/Popover.tsx +107 -73
  305. package/src/popover/PopoverContent.tsx +1 -1
  306. package/src/popover/popover.stories.tsx +22 -27
  307. package/src/read-more/ReadMore.tsx +19 -30
  308. package/src/read-more/readmore.stories.tsx +3 -10
  309. package/src/stepper/Step.tsx +1 -1
  310. package/src/stepper/Stepper.tsx +1 -1
  311. package/src/table/Body.tsx +1 -1
  312. package/src/table/DataCell.tsx +1 -1
  313. package/src/table/ExpandableRow.tsx +12 -13
  314. package/src/table/Header.tsx +1 -1
  315. package/src/table/HeaderCell.tsx +1 -1
  316. package/src/table/Row.tsx +1 -1
  317. package/src/table/Table.tsx +1 -1
  318. package/src/tabs/Tab.tsx +6 -19
  319. package/src/tabs/TabList.tsx +14 -9
  320. package/src/tabs/TabPanel.tsx +1 -1
  321. package/src/tabs/Tabs.stories.tsx +94 -117
  322. package/src/tabs/Tabs.tsx +17 -1
  323. package/src/tag/Tag.tsx +1 -1
  324. package/src/toggle-group/ToggleGroup.tsx +3 -3
  325. package/src/toggle-group/ToggleItem.tsx +1 -1
  326. package/src/tooltip/Tooltip.test.tsx +167 -0
  327. package/src/tooltip/Tooltip.tsx +106 -173
  328. package/src/tooltip/tooltip.stories.tsx +15 -1
  329. package/src/typography/BodyLong.tsx +1 -1
  330. package/src/typography/BodyShort.tsx +1 -1
  331. package/src/typography/Detail.tsx +1 -1
  332. package/src/typography/ErrorMessage.tsx +1 -1
  333. package/src/typography/Heading.tsx +1 -1
  334. package/src/typography/Ingress.tsx +1 -1
  335. package/src/typography/Label.tsx +1 -1
  336. package/src/util/AnimateHeight.tsx +240 -0
  337. package/src/util/TextareaAutoSize.tsx +224 -0
  338. package/src/util/debounce.ts +17 -0
  339. package/src/util/index.ts +14 -2
  340. package/src/util/mergeRefs.tsx +14 -0
  341. package/src/util/useId.ts +37 -20
  342. package/cjs/card/MicroCard.js +0 -47
  343. package/cjs/card/index.js +0 -8
  344. package/cjs/card/package.json +0 -6
  345. package/cjs/menu/Menu.js +0 -53
  346. package/cjs/menu/MenuCollapse.js +0 -65
  347. package/cjs/menu/MenuItems.js +0 -23
  348. package/cjs/menu/package.json +0 -6
  349. package/cjs/page-header/PageHeader.js +0 -51
  350. package/cjs/page-header/index.js +0 -8
  351. package/cjs/page-header/package.json +0 -6
  352. package/cjs/speech-bubble/index.js +0 -8
  353. package/cjs/speech-bubble/package.json +0 -6
  354. package/cjs/step-indicator/Step.js +0 -67
  355. package/cjs/step-indicator/StepIndicator.js +0 -80
  356. package/cjs/step-indicator/index.js +0 -8
  357. package/cjs/step-indicator/package.json +0 -6
  358. package/esm/card/MicroCard.d.ts +0 -10
  359. package/esm/card/MicroCard.js +0 -19
  360. package/esm/card/MicroCard.js.map +0 -1
  361. package/esm/card/index.d.ts +0 -2
  362. package/esm/card/index.js +0 -2
  363. package/esm/card/index.js.map +0 -1
  364. package/esm/menu/Menu.d.ts +0 -12
  365. package/esm/menu/Menu.js +0 -25
  366. package/esm/menu/Menu.js.map +0 -1
  367. package/esm/menu/MenuCollapse.d.ts +0 -12
  368. package/esm/menu/MenuCollapse.js +0 -37
  369. package/esm/menu/MenuCollapse.js.map +0 -1
  370. package/esm/menu/MenuItem.d.ts +0 -13
  371. package/esm/menu/MenuItem.js.map +0 -1
  372. package/esm/menu/MenuItems.d.ts +0 -6
  373. package/esm/menu/MenuItems.js +0 -19
  374. package/esm/menu/MenuItems.js.map +0 -1
  375. package/esm/menu/index.d.ts +0 -3
  376. package/esm/menu/index.js +0 -2
  377. package/esm/menu/index.js.map +0 -1
  378. package/esm/page-header/PageHeader.d.ts +0 -27
  379. package/esm/page-header/PageHeader.js +0 -24
  380. package/esm/page-header/PageHeader.js.map +0 -1
  381. package/esm/page-header/index.d.ts +0 -2
  382. package/esm/page-header/index.js +0 -2
  383. package/esm/page-header/index.js.map +0 -1
  384. package/esm/speech-bubble/Bubble.js.map +0 -1
  385. package/esm/speech-bubble/SpeechBubble.d.ts +0 -34
  386. package/esm/speech-bubble/SpeechBubble.js +0 -27
  387. package/esm/speech-bubble/SpeechBubble.js.map +0 -1
  388. package/esm/speech-bubble/index.d.ts +0 -1
  389. package/esm/speech-bubble/index.js +0 -2
  390. package/esm/speech-bubble/index.js.map +0 -1
  391. package/esm/step-indicator/Step.d.ts +0 -23
  392. package/esm/step-indicator/Step.js +0 -39
  393. package/esm/step-indicator/Step.js.map +0 -1
  394. package/esm/step-indicator/StepIndicator.d.ts +0 -41
  395. package/esm/step-indicator/StepIndicator.js +0 -52
  396. package/esm/step-indicator/StepIndicator.js.map +0 -1
  397. package/esm/step-indicator/index.d.ts +0 -1
  398. package/esm/step-indicator/index.js +0 -2
  399. package/esm/step-indicator/index.js.map +0 -1
  400. package/src/card/MicroCard.tsx +0 -32
  401. package/src/card/index.ts +0 -2
  402. package/src/card/stories/card.stories.mdx +0 -26
  403. package/src/card/stories/card.stories.tsx +0 -16
  404. package/src/grid/stories/grid.stories.mdx +0 -79
  405. package/src/grid/stories/grid.stories.tsx +0 -51
  406. package/src/grid/stories/styles.css +0 -21
  407. package/src/menu/Menu.tsx +0 -36
  408. package/src/menu/MenuCollapse.tsx +0 -80
  409. package/src/menu/MenuItem.tsx +0 -39
  410. package/src/menu/MenuItems.tsx +0 -21
  411. package/src/menu/index.ts +0 -3
  412. package/src/menu/stories/menu.stories.mdx +0 -93
  413. package/src/menu/stories/menu.stories.tsx +0 -139
  414. package/src/page-header/PageHeader.tsx +0 -72
  415. package/src/page-header/index.ts +0 -2
  416. package/src/page-header/stories/header.stories.mdx +0 -81
  417. package/src/page-header/stories/header.stories.tsx +0 -61
  418. package/src/page-header/stories/pictogram.tsx +0 -14
  419. package/src/speech-bubble/Bubble.tsx +0 -48
  420. package/src/speech-bubble/SpeechBubble.tsx +0 -93
  421. package/src/speech-bubble/index.ts +0 -1
  422. package/src/speech-bubble/stories/illustration.tsx +0 -66
  423. package/src/speech-bubble/stories/speechbubble.stories.mdx +0 -184
  424. package/src/speech-bubble/stories/speechbubble.stories.tsx +0 -104
  425. package/src/step-indicator/Step.tsx +0 -81
  426. package/src/step-indicator/StepIndicator.tsx +0 -148
  427. package/src/step-indicator/index.ts +0 -1
  428. package/src/step-indicator/stories/Example.tsx +0 -23
  429. package/src/step-indicator/stories/step-indicator.stories.mdx +0 -122
  430. package/src/step-indicator/stories/step-indicator.stories.tsx +0 -104
@@ -1,80 +0,0 @@
1
- import React, {
2
- createContext,
3
- forwardRef,
4
- HTMLAttributes,
5
- useContext,
6
- useState,
7
- } from "react";
8
- import cl from "classnames";
9
- import { Expand, ExpandFilled } from "@navikt/ds-icons";
10
- import MenuItems from "./MenuItems";
11
-
12
- export const NestingContext = createContext<{ depth: number }>({ depth: 1 });
13
-
14
- const NestingProvider = ({ children }) => {
15
- const context = useContext(NestingContext);
16
-
17
- return (
18
- <NestingContext.Provider
19
- value={{
20
- depth: context.depth + 1,
21
- }}
22
- >
23
- {children}
24
- </NestingContext.Provider>
25
- );
26
- };
27
-
28
- export interface MenuCollapseProps extends HTMLAttributes<HTMLDivElement> {
29
- title: string;
30
- defaultOpen?: boolean;
31
- children: React.ReactNode;
32
- }
33
-
34
- export type MenuCollapseType = React.ForwardRefExoticComponent<
35
- MenuCollapseProps & React.RefAttributes<HTMLDivElement>
36
- >;
37
-
38
- export const Collapse: MenuCollapseType = forwardRef(
39
- ({ children, defaultOpen = false, title, className, ...rest }, ref) => {
40
- const [isOpen, setIsOpen] = useState(defaultOpen);
41
- const context = useContext(NestingContext);
42
-
43
- return (
44
- <div
45
- {...rest}
46
- ref={ref}
47
- className={cl("navds-menu-collapse", className, {
48
- "navds-menu-collapse--open": isOpen,
49
- })}
50
- >
51
- <button
52
- onClick={() => setIsOpen(!isOpen)}
53
- className="navds-menu-collapse__button"
54
- >
55
- {title}
56
- <Expand
57
- title={isOpen ? "lukk navigasjons-skuff" : "åpne navigason-skuff"}
58
- className="navds-menu-collapse__expand-icon"
59
- />
60
- <ExpandFilled
61
- title={isOpen ? "lukk navigasjons-skuff" : "åpne navigason-skuff"}
62
- className="navds-menu-collapse__expand-icon navds-menu-collapse__expand-icon--filled"
63
- />
64
- </button>
65
- <NestingProvider>
66
- {isOpen && (
67
- <MenuItems
68
- data-depth={context.depth}
69
- className="navds-menu__list--inner"
70
- >
71
- {children}
72
- </MenuItems>
73
- )}
74
- </NestingProvider>
75
- </div>
76
- );
77
- }
78
- );
79
-
80
- export default Collapse;
@@ -1,39 +0,0 @@
1
- import React, { forwardRef } from "react";
2
- import { OverridableComponent } from "..";
3
- import cl from "classnames";
4
-
5
- export interface MenuItemProps
6
- extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
7
- children: React.ReactNode;
8
- /**
9
- * Sets active styling if true
10
- * @default false
11
- */
12
- active?: boolean;
13
- }
14
-
15
- export type MenuItemType = OverridableComponent<
16
- MenuItemProps,
17
- HTMLAnchorElement
18
- >;
19
-
20
- export const Item: MenuItemType = forwardRef(
21
- (
22
- { children, as: Component = "a", active = false, className, ...rest },
23
- ref
24
- ) => {
25
- return (
26
- <Component
27
- ref={ref}
28
- className={cl("navds-menu-item", className, {
29
- "navds-menu-item--active": active,
30
- })}
31
- {...rest}
32
- >
33
- {children}
34
- </Component>
35
- );
36
- }
37
- );
38
-
39
- export default Item;
@@ -1,21 +0,0 @@
1
- import cl from "classnames";
2
- import React from "react";
3
-
4
- const MenuItems = ({
5
- children,
6
- className,
7
- ...rest
8
- }: {
9
- children: React.ReactNode;
10
- className?: string;
11
- }) => (
12
- <ul {...rest} className={cl("navds-menu__list", className)}>
13
- {React.Children.toArray(children).map((child, i) => (
14
- <li key={i} className="navds-menu__list-item">
15
- {child}
16
- </li>
17
- ))}
18
- </ul>
19
- );
20
-
21
- export default MenuItems;
package/src/menu/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export { default as Menu, MenuProps } from "./Menu";
2
- export { MenuCollapseProps } from "./MenuCollapse";
3
- export { MenuItemProps } from "./MenuItem";
@@ -1,93 +0,0 @@
1
- import { Meta, Canvas } from "@storybook/addon-docs";
2
- import { Menu } from "../../index";
3
-
4
- <Meta title="ds-react/menu/intro" />
5
-
6
- # Hvordan ta i bruk Menu
7
-
8
- ```jsx
9
- <Menu>
10
- <Menu.Item href="#leo">Leo</Menu.Item>
11
- <Menu.Collapse title="Proin">
12
- <Menu.Item href="#nulla" active>
13
- Nulla
14
- </Menu.Item>
15
- <Menu.Item href="#luctus">Luctus</Menu.Item>
16
- </Menu.Collapse>
17
- <Menu.Collapse title="Accumsan">
18
- <Menu.Item href="#justo" aria-current="page">
19
- Justo
20
- </Menu.Item>
21
- <Menu.Collapse title="Proin">
22
- <Menu.Item href="#nulla">Nulla</Menu.Item>
23
- <Menu.Item href="#luctus">Luctus</Menu.Item>
24
- </Menu.Collapse>
25
- </Menu.Collapse>
26
- </Menu>
27
- ```
28
-
29
- <Canvas>
30
- <Menu>
31
- <Menu.Item href="#leo">Leo</Menu.Item>
32
- <Menu.Collapse title="Proin">
33
- <Menu.Item href="#nulla" active>
34
- Nulla
35
- </Menu.Item>
36
- <Menu.Item href="#luctus">Luctus</Menu.Item>
37
- </Menu.Collapse>
38
- <Menu.Collapse title="Accumsan">
39
- <Menu.Item href="#justo">Justo</Menu.Item>
40
- <Menu.Collapse title="Proin">
41
- <Menu.Item href="#nulla">Nulla</Menu.Item>
42
- <Menu.Item href="#luctus">Luctus</Menu.Item>
43
- </Menu.Collapse>
44
- </Menu.Collapse>
45
- </Menu>
46
- </Canvas>
47
-
48
- ## Elementer i menyen
49
-
50
- Menyen har to typer elementer man kan bruke: `Collapse` for nesting og `Item` for navigasjonslenker på siden.
51
-
52
- <Canvas>
53
- <div>
54
- <h2>Item</h2>
55
- <Menu>
56
- <Menu.Item href="#leo">Lenke</Menu.Item>
57
- <Menu.Item href="#leo">Lenke</Menu.Item>
58
- <Menu.Item href="#leo">Lenke</Menu.Item>
59
- <Menu.Item href="#leo">Lenke</Menu.Item>
60
- <Menu.Item href="#leo">Lenke</Menu.Item>
61
- </Menu>
62
- <h2>Collapses + Item</h2>
63
- <Menu>
64
- <Menu.Collapse title="Proin">
65
- <Menu.Item href="#nulla" active>
66
- Nulla
67
- </Menu.Item>
68
- <Menu.Item href="#luctus">Luctus</Menu.Item>
69
- </Menu.Collapse>
70
- <Menu.Collapse title="Accumsan">
71
- <Menu.Item href="#justo">Justo</Menu.Item>
72
- <Menu.Collapse title="Proin">
73
- <Menu.Item href="#nulla">Nulla</Menu.Item>
74
- <Menu.Item href="#luctus">Luctus</Menu.Item>
75
- </Menu.Collapse>
76
- </Menu.Collapse>
77
- <Menu.Item href="#leo">Lenke</Menu.Item>
78
- <Menu.Item href="#leo">Lenke</Menu.Item>
79
- </Menu>
80
- </div>
81
- </Canvas>
82
-
83
- `Menu.Item` er implementert med `OverridableComponent`, noe som
84
- gjør at man kan ta i bruk eks react-router slik:
85
-
86
- ```jsx
87
- <Menu.Item as={NavLink} activeClassName="navds-menu-item--active" to="/1">
88
- Lenketekst
89
- </Menu.Item>
90
- ```
91
-
92
- Her er `NavLink` fra `react-router-dom` brukt, og man får da
93
- samtidig bruke alle propsene til denne komponenten som da er `activeClassName` her.
@@ -1,139 +0,0 @@
1
- import * as React from "react";
2
- import cl from "classnames";
3
- import { Menu } from "../index";
4
- import { NavLink, HashRouter as Router } from "react-router-dom";
5
- import { MenuItemProps } from "../MenuItem";
6
-
7
- export default {
8
- title: "ds-react/menu",
9
- component: { Menu },
10
- };
11
-
12
- export const All = () => (
13
- <div
14
- style={{
15
- background: "white",
16
- maxWidth: 288,
17
- }}
18
- >
19
- <h2>Only Menu.Items</h2>
20
- <Menu>
21
- <Menu.Item href="#leo">Leo</Menu.Item>
22
-
23
- <Menu.Item href="#justo">Justo</Menu.Item>
24
- <Menu.Item href="#pariatur" active aria-current="page">
25
- Pariatur
26
- </Menu.Item>
27
- <Menu.Item href="#nulla">Nulla</Menu.Item>
28
- <Menu.Item href="#luctus">Luctus</Menu.Item>
29
- <Menu.Item href="#justo">Justo</Menu.Item>
30
- <Menu.Item href="#pariatur">Pariatur</Menu.Item>
31
- </Menu>
32
-
33
- <h2>With Collapse</h2>
34
- <Menu>
35
- <Menu.Item href="#leo">Leo</Menu.Item>
36
- <Menu.Collapse title="Proin">
37
- <Menu.Item href="#nulla" active>
38
- Nulla
39
- </Menu.Item>
40
- <Menu.Item href="#luctus">Luctus</Menu.Item>
41
- </Menu.Collapse>
42
- <Menu.Collapse title="Accumsan">
43
- <Menu.Item href="#justo" aria-current="page">
44
- Justo
45
- </Menu.Item>
46
- <Menu.Item href="#pariatur" active aria-current="page">
47
- Pariatur
48
- </Menu.Item>
49
- <Menu.Collapse title="Proin">
50
- <Menu.Item href="#nulla" active>
51
- Nulla
52
- </Menu.Item>
53
- <Menu.Collapse title="Proin">
54
- <Menu.Item href="#nulla" active>
55
- Nulla
56
- </Menu.Item>
57
- <Menu.Item href="#luctus">Luctus</Menu.Item>
58
- </Menu.Collapse>
59
- <Menu.Item href="#luctus">Luctus</Menu.Item>
60
- </Menu.Collapse>
61
- </Menu.Collapse>
62
- <Menu.Item href="#justo" active>
63
- Justo
64
- </Menu.Item>
65
- <Menu.Item href="#pariatur">Pariatur</Menu.Item>
66
- </Menu>
67
- </div>
68
- );
69
-
70
- export const ReactRouter = () => {
71
- const MenuItemLink = (props: MenuItemProps & { to: string }) => {
72
- const { to } = props;
73
-
74
- const CustomLink = React.useMemo(
75
- () => (props: MenuItemProps) => (
76
- <NavLink
77
- {...props}
78
- to={to}
79
- className={({ isActive }) =>
80
- cl(props.className, {
81
- "navds-menu-item--active": isActive,
82
- })
83
- }
84
- />
85
- ),
86
- [to]
87
- );
88
-
89
- return (
90
- <Menu.Item {...props} as={CustomLink}>
91
- Nivå 2 innrykk 2 rems
92
- </Menu.Item>
93
- );
94
- };
95
-
96
- return (
97
- <Menu>
98
- <Menu.Collapse title="Nivå 1 - 3 rems høy">
99
- <MenuItemLink to="/1">Nivå 2 innrykk 2 rems</MenuItemLink>
100
- <MenuItemLink to="/2">Subtitle 3</MenuItemLink>
101
- </Menu.Collapse>
102
- <Menu.Collapse title="Skjema og søknad">
103
- <Menu.Collapse title="Satser">
104
- <MenuItemLink to="/3">
105
- Nivå 3 - 3 rems innrykk Har du rett til dagpenger når du mottar
106
- annen økonomisk støtte fra NAV?
107
- </MenuItemLink>
108
- </Menu.Collapse>
109
- <MenuItemLink to="/4">Subtitle 2</MenuItemLink>
110
- <MenuItemLink to="/5">Subtitle 3</MenuItemLink>
111
- </Menu.Collapse>
112
- <Menu.Collapse title="Sakbehandlingstider">
113
- <Menu.Collapse title="Subtitle 4 Lang tittel på andre nivå lorem ipsum">
114
- <MenuItemLink to="/6">Subtitle 5</MenuItemLink>
115
- </Menu.Collapse>
116
- </Menu.Collapse>
117
- <MenuItemLink to="/7">Internasjonalt</MenuItemLink>
118
- <Menu.Collapse title="Meld fra om endringer lang tittel på første nivå">
119
- <MenuItemLink to="/8">Subtitle 6</MenuItemLink>
120
- </Menu.Collapse>
121
- <MenuItemLink to="/9">Nivå 1</MenuItemLink>
122
- </Menu>
123
- );
124
- };
125
-
126
- ReactRouter.decorators = [
127
- (Story) => (
128
- <Router>
129
- <div
130
- style={{
131
- background: "white",
132
- maxWidth: 288,
133
- }}
134
- >
135
- <Story />
136
- </div>
137
- </Router>
138
- ),
139
- ];
@@ -1,72 +0,0 @@
1
- import React, { forwardRef, HTMLAttributes } from "react";
2
- import cl from "classnames";
3
- import { BodyShort, Heading } from "..";
4
-
5
- export interface PageHeaderProps extends HTMLAttributes<HTMLDivElement> {
6
- /**
7
- * PageHeader title
8
- */
9
- children: string;
10
- /**
11
- * Pictogram placed in PageHeader
12
- */
13
- illustration?: React.ReactNode;
14
- /**
15
- * Short text placed under title
16
- */
17
- description?: string;
18
- /**
19
- * Predefined variants for PageHeader
20
- * @default "guide"
21
- */
22
- variant?: "situation" | "product" | "guide";
23
- /**
24
- * Decides how to align content
25
- * @default "left"
26
- */
27
- align?: "left" | "center";
28
- }
29
-
30
- const PageHeader = forwardRef<HTMLDivElement, PageHeaderProps>(
31
- (
32
- {
33
- children,
34
- className,
35
- illustration,
36
- description,
37
- variant = "guide",
38
- align = "left",
39
- ...rest
40
- },
41
- ref
42
- ) => {
43
- return (
44
- <div
45
- ref={ref}
46
- className={cl(
47
- "navds-page-header",
48
- className,
49
- `navds-page-header--${variant}`,
50
- `navds-page-header--${align}`
51
- )}
52
- {...rest}
53
- >
54
- {illustration && (
55
- <div className="navds-page-header__illustration">{illustration}</div>
56
- )}
57
- <div className="navds-page-header__wrapper">
58
- <Heading className="navds-page-header__title" size="xlarge" level="1">
59
- {children}
60
- </Heading>
61
- {description && (
62
- <BodyShort className="navds-page-header__description">
63
- {description}
64
- </BodyShort>
65
- )}
66
- </div>
67
- </div>
68
- );
69
- }
70
- );
71
-
72
- export default PageHeader;
@@ -1,2 +0,0 @@
1
- export { default as PageHeader } from "./PageHeader";
2
- export { PageHeaderProps } from "./PageHeader";
@@ -1,81 +0,0 @@
1
- import { Meta, Canvas } from "@storybook/addon-docs";
2
- import { PageHeader } from "../index";
3
- import { illustrationPictogram } from "./pictogram";
4
-
5
- <Meta title="ds-react(deprecated)/page-header/intro" />
6
-
7
- # Hvordan ta i bruk PageHeader
8
-
9
- Denne PageHeader-komponenten er utviklet i sammenheng med nye produktsider på NAV og
10
- vil sannsynligvis forgå en del endringer før de er ferdige.
11
-
12
- ```jsx
13
- <PageHeader description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE.">
14
- AUTE OFFICIA SINT SUNT FUGIAT
15
- </PageHeader>
16
- ```
17
-
18
- <Canvas>
19
- <PageHeader description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE.">
20
- AUTE OFFICIA SINT SUNT FUGIAT
21
- </PageHeader>
22
- </Canvas>
23
-
24
- ## Med illustrasjon
25
-
26
- Illustrasjonene brukt i PageHeader er "Pictogram" som er designet for den sepsifikke siden og
27
- man skal da ikke bare velge et fra figma vilkårlig.
28
-
29
- <Canvas>
30
- <PageHeader
31
- illustration={illustrationPictogram}
32
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
33
- >
34
- AUTE OFFICIA SINT SUNT FUGIAT
35
- </PageHeader>
36
- </Canvas>
37
-
38
- ## Temaer
39
-
40
- Headeren kommer i tre tema: `guide`, `product` og `situation`
41
-
42
- <Canvas>
43
- <PageHeader
44
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
45
- variant="guide"
46
- >
47
- AUTE OFFICIA SINT SUNT FUGIAT
48
- </PageHeader>
49
- <PageHeader
50
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
51
- variant="product"
52
- >
53
- AUTE OFFICIA SINT SUNT FUGIAT
54
- </PageHeader>
55
- <PageHeader
56
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
57
- variant="situation"
58
- >
59
- AUTE OFFICIA SINT SUNT FUGIAT
60
- </PageHeader>
61
- </Canvas>
62
-
63
- ## Sentrert
64
-
65
- Innhold kan sentreres med `align="center"`-prop
66
-
67
- <Canvas>
68
- <PageHeader
69
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
70
- align="center"
71
- >
72
- AUTE OFFICIA SINT SUNT FUGIAT
73
- </PageHeader>
74
- <PageHeader
75
- illustration={illustrationPictogram}
76
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
77
- align="center"
78
- >
79
- AUTE OFFICIA SINT SUNT FUGIAT
80
- </PageHeader>
81
- </Canvas>
@@ -1,61 +0,0 @@
1
- import React from "react";
2
- import { PageHeader } from "../index";
3
- import { Meta } from "@storybook/react/types-6-0";
4
- import { illustrationPictogram } from "./pictogram";
5
- export default {
6
- title: "ds-react(deprecated)/page-header",
7
- component: PageHeader,
8
- } as Meta;
9
-
10
- export const All = () => {
11
- return (
12
- <div>
13
- <h2>PageHeader</h2>
14
- <PageHeader description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE.">
15
- AUTE OFFICIA SINT SUNT FUGIAT
16
- </PageHeader>
17
- <br />
18
- <h2>PageHeader m/illustration</h2>
19
- <PageHeader
20
- illustration={illustrationPictogram}
21
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
22
- >
23
- AUTE OFFICIA SINT SUNT FUGIAT
24
- </PageHeader>
25
- <h2>PageHeader center</h2>
26
- <PageHeader
27
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
28
- align="center"
29
- >
30
- AUTE OFFICIA SINT SUNT FUGIAT
31
- </PageHeader>
32
- <h2>PageHeader center m/illustration</h2>
33
- <PageHeader
34
- illustration={illustrationPictogram}
35
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
36
- align="center"
37
- >
38
- AUTE OFFICIA SINT SUNT FUGIAT
39
- </PageHeader>
40
- <h2>PageHeader variants</h2>
41
- <PageHeader
42
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
43
- variant="guide"
44
- >
45
- AUTE OFFICIA SINT SUNT FUGIAT
46
- </PageHeader>
47
- <PageHeader
48
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
49
- variant="product"
50
- >
51
- AUTE OFFICIA SINT SUNT FUGIAT
52
- </PageHeader>
53
- <PageHeader
54
- description="LABORIS AUTE DESERUNT ID AUTE OFFICIA SINT SUNT FUGIAT EX ET CUPIDATAT CONSEQUAT DOLORE."
55
- variant="situation"
56
- >
57
- AUTE OFFICIA SINT SUNT FUGIAT
58
- </PageHeader>
59
- </div>
60
- );
61
- };
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- /* prettier-ignore */
3
- export const illustrationPictogram = <svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
4
- <path d="M37.6697 60.6469L9 31.9772L30.9772 10L59.6469 38.6697L72.1116 26.205L81 82L25.205 73.1116L37.6697 60.6469Z" fill="#FFECCC"/>
5
- <path d="M94.5 64.0584C94.5 72.104 88.003 78.6169 80 78.6169C71.997 78.6169 65.5 72.104 65.5 64.0584C65.5 56.0129 71.997 49.5 80 49.5C88.003 49.5 94.5 56.0129 94.5 64.0584Z" stroke="#262626" stroke-width="3"/>
6
- <path d="M91.9999 95.9999V95.9999C91.9999 89.3725 86.6274 83.9561 79.9999 83.9561V83.9561C73.3725 83.9561 67.9999 89.3725 67.9999 95.9999V95.9999" stroke="#262626" stroke-width="3"/>
7
- <ellipse cx="76.0001" cy="63.5566" rx="2" ry="2.00731" fill="#262626"/>
8
- <ellipse cx="84" cy="63.5566" rx="2" ry="2.00731" fill="#262626"/>
9
- <path d="M29 29.488V30C29 25.0515 25.866 22 22 22C18.134 22 15 25.0515 15 30V29.488" stroke="#262626" stroke-width="3"/>
10
- <circle cx="22" cy="15" r="5.5" stroke="#262626" stroke-width="3"/>
11
- <rect x="1.5" y="1.5" width="41" height="56" stroke="#262626" stroke-width="3"/>
12
- <path d="M10 37H27" stroke="#262626" stroke-width="3"/>
13
- <path d="M10 47H18.5" stroke="#262626" stroke-width="3"/>
14
- </svg>
@@ -1,48 +0,0 @@
1
- import React, { forwardRef, HTMLAttributes } from "react";
2
- import cl from "classnames";
3
-
4
- export interface BubbleProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * Bubble text
7
- */
8
- children: React.ReactNode;
9
- /**
10
- * User defined toptext, normally "name + date"
11
- */
12
- topText?: React.ReactNode;
13
- /**
14
- * Background color bubble
15
- */
16
- backgroundColor?: string;
17
- }
18
-
19
- export type BubbleType = React.ForwardRefExoticComponent<
20
- BubbleProps & React.RefAttributes<HTMLDivElement>
21
- >;
22
-
23
- const Bubble: BubbleType = forwardRef(
24
- ({ children, className, topText, backgroundColor, ...rest }, ref) => {
25
- return (
26
- <div
27
- ref={ref}
28
- className={cl(
29
- "navds-speechbubble__bubble",
30
- className,
31
- "navds-body-long"
32
- )}
33
- style={{ backgroundColor: backgroundColor }}
34
- tabIndex={0}
35
- {...rest}
36
- >
37
- {topText && (
38
- <span className="navds-speechbubble__top-text navds-detail">
39
- {topText}
40
- </span>
41
- )}
42
- {children}
43
- </div>
44
- );
45
- }
46
- );
47
-
48
- export default Bubble;