@reykjavik/hanna-react 0.10.56 → 0.10.59

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 (378) hide show
  1. package/{AccordionList.jsx → AccordionList.js} +5 -14
  2. package/ActionCards.d.ts +1 -1
  3. package/{ActionCards.jsx → ActionCards.js} +3 -4
  4. package/{Alert.jsx → Alert.js} +7 -9
  5. package/ArticleCards.d.ts +6 -0
  6. package/ArticleCards.js +9 -0
  7. package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
  8. package/ArticleCarousel/_ArticleCarouselCard.js +31 -0
  9. package/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
  10. package/ArticleMeta.d.ts +1 -0
  11. package/{ArticleMeta.jsx → ArticleMeta.js} +15 -10
  12. package/{Attention.jsx → Attention.js} +1 -1
  13. package/{BasicTable.jsx → BasicTable.js} +11 -12
  14. package/BgBox.d.ts +8 -0
  15. package/BgBox.js +14 -0
  16. package/{Bling.jsx → Bling.js} +2 -2
  17. package/{BlockBreak.jsx → BlockBreak.js} +1 -1
  18. package/{BlockQuote.jsx → BlockQuote.js} +1 -1
  19. package/BreadCrumbs.js +33 -0
  20. package/ButtonBack.d.ts +1 -1
  21. package/{ButtonBack.jsx → ButtonBack.js} +2 -2
  22. package/{ButtonBar.jsx → ButtonBar.js} +2 -4
  23. package/ButtonPrimary.d.ts +1 -1
  24. package/{ButtonPrimary.jsx → ButtonPrimary.js} +2 -2
  25. package/ButtonSecondary.d.ts +1 -1
  26. package/{ButtonSecondary.jsx → ButtonSecondary.js} +2 -2
  27. package/ButtonTertiary.d.ts +1 -1
  28. package/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
  29. package/CHANGELOG.md +12 -1
  30. package/{Carousel.jsx → Carousel.js} +1 -1
  31. package/{CarouselStepper.jsx → CarouselStepper.js} +1 -1
  32. package/{CenterColumn.jsx → CenterColumn.js} +1 -3
  33. package/Checkbox.d.ts +1 -1
  34. package/{Checkbox.jsx → Checkbox.js} +2 -2
  35. package/CheckboxButtonsGroup.d.ts +1 -1
  36. package/{CheckboxButtonsGroup.jsx → CheckboxButtonsGroup.js} +4 -4
  37. package/CheckboxGroup.d.ts +1 -1
  38. package/{CheckboxGroup.jsx → CheckboxGroup.js} +2 -2
  39. package/CityBlock.d.ts +1 -1
  40. package/{CityBlock.jsx → CityBlock.js} +1 -1
  41. package/{ContactBubble.jsx → ContactBubble.js} +13 -27
  42. package/{ContentArticle.jsx → ContentArticle.js} +9 -12
  43. package/ContentImage.d.ts +1 -1
  44. package/ContentImage.js +23 -0
  45. package/{Datepicker.jsx → Datepicker.js} +17 -18
  46. package/ExtraLinks.d.ts +1 -1
  47. package/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
  48. package/FeatureList.js +21 -0
  49. package/{FieldGroup.jsx → FieldGroup.js} +3 -4
  50. package/{FileInput.jsx → FileInput.js} +22 -25
  51. package/{Foonote.jsx → Foonote.js} +0 -0
  52. package/FooterBadges.js +17 -0
  53. package/FooterInfo.js +14 -0
  54. package/{Footnote.jsx → Footnote.js} +1 -1
  55. package/{Form.jsx → Form.js} +2 -4
  56. package/{FormField.jsx → FormField.js} +20 -22
  57. package/Gallery/_GalleryItem.d.ts +1 -1
  58. package/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
  59. package/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
  60. package/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
  61. package/{Gallery.jsx → Gallery.js} +3 -4
  62. package/GridBlocks.d.ts +2 -2
  63. package/GridBlocks.js +29 -0
  64. package/Heading.d.ts +1 -1
  65. package/{Heading.jsx → Heading.js} +3 -5
  66. package/HeroBlock.d.ts +2 -2
  67. package/{HeroBlock.jsx → HeroBlock.js} +9 -10
  68. package/{IframeBlock.jsx → IframeBlock.js} +6 -6
  69. package/Illustration.d.ts +1 -1
  70. package/{Illustration.jsx → Illustration.js} +2 -2
  71. package/ImageCards.d.ts +1 -1
  72. package/{ImageCards.jsx → ImageCards.js} +3 -4
  73. package/InfoBlock.js +18 -0
  74. package/InfoHero.d.ts +2 -2
  75. package/{InfoHero.jsx → InfoHero.js} +10 -16
  76. package/IslandBlock.d.ts +1 -1
  77. package/{IslandBlock.jsx → IslandBlock.js} +1 -1
  78. package/IslandPageBlock.d.ts +1 -1
  79. package/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
  80. package/LabeledTextBlock.d.ts +1 -1
  81. package/{LabeledTextBlock.jsx → LabeledTextBlock.js} +5 -7
  82. package/Layout.js +58 -0
  83. package/MainMenu/_Auxiliary.js +20 -0
  84. package/MainMenu/_PrimaryPanel.js +29 -0
  85. package/{MainMenu.jsx → MainMenu.js} +28 -41
  86. package/MiniMetrics.d.ts +1 -1
  87. package/{MiniMetrics.jsx → MiniMetrics.js} +6 -5
  88. package/Modal.js +19 -0
  89. package/{NameCard.jsx → NameCard.js} +19 -24
  90. package/{NameCards.jsx → NameCards.js} +1 -3
  91. package/NewsHero.d.ts +1 -1
  92. package/{NewsHero.jsx → NewsHero.js} +8 -10
  93. package/{PageFilter.jsx → PageFilter.js} +6 -7
  94. package/{PageHeading.jsx → PageHeading.js} +2 -4
  95. package/Picture.d.ts +7 -0
  96. package/Picture.js +13 -0
  97. package/ProcessOverview.js +22 -0
  98. package/{PullQuote.jsx → PullQuote.js} +1 -1
  99. package/RadioButtonsGroup.d.ts +1 -1
  100. package/{RadioButtonsGroup.jsx → RadioButtonsGroup.js} +4 -4
  101. package/RadioGroup.d.ts +2 -2
  102. package/RadioGroup.js +12 -0
  103. package/RelatedLinks.js +31 -0
  104. package/{RowBlock.jsx → RowBlock.js} +1 -3
  105. package/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
  106. package/{SearchInput.jsx → SearchInput.js} +4 -6
  107. package/SearchResults/_SearchResultsItem.js +20 -0
  108. package/{SearchResults.jsx → SearchResults.js} +27 -36
  109. package/{SeenEffect.jsx → SeenEffect.js} +1 -1
  110. package/{Selectbox.jsx → Selectbox.js} +1 -1
  111. package/{ShareButtons.jsx → ShareButtons.js} +7 -13
  112. package/{Sharpie.jsx → Sharpie.js} +1 -1
  113. package/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
  114. package/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
  115. package/SiteSearchInput.d.ts +1 -1
  116. package/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
  117. package/{Skeleton.jsx → Skeleton.js} +5 -5
  118. package/{SubHeading.jsx → SubHeading.js} +2 -4
  119. package/{Tabs.jsx → Tabs.js} +12 -12
  120. package/TagPill.d.ts +1 -1
  121. package/{TagPill.jsx → TagPill.js} +12 -17
  122. package/{TextBlock.jsx → TextBlock.js} +2 -4
  123. package/TextButton.d.ts +1 -1
  124. package/{TextButton.jsx → TextButton.js} +2 -2
  125. package/{TextInput.jsx → TextInput.js} +1 -1
  126. package/{VSpacer.jsx → VSpacer.js} +1 -1
  127. package/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
  128. package/WizardLayout.js +35 -0
  129. package/WizardLayoutClose.d.ts +1 -1
  130. package/{WizardLayoutClose.jsx → WizardLayoutClose.js} +2 -2
  131. package/WizardStepper.js +30 -0
  132. package/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
  133. package/_abstract/{_Blings.jsx → _Blings.js} +1 -3
  134. package/_abstract/_Block.d.ts +2 -2
  135. package/_abstract/_Block.js +29 -0
  136. package/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
  137. package/_abstract/{Button.jsx → _Button.js} +3 -7
  138. package/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
  139. package/_abstract/_CardList.js +45 -0
  140. package/{esm/_abstract/Image.d.ts → _abstract/_Image.d.ts} +9 -5
  141. package/_abstract/{Image.jsx → _Image.js} +11 -13
  142. package/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
  143. package/_abstract/{Link.jsx → _Link.js} +0 -0
  144. package/_abstract/_Quote.js +15 -0
  145. package/{esm/_abstract/TogglerGroup.d.ts → _abstract/_TogglerGroup.d.ts} +1 -1
  146. package/_abstract/_TogglerGroup.js +34 -0
  147. package/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
  148. package/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
  149. package/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
  150. package/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
  151. package/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
  152. package/esm/AccordionList.js +24 -0
  153. package/esm/ActionCards.d.ts +1 -1
  154. package/esm/ActionCards.js +9 -0
  155. package/esm/{Alert.jsx → Alert.js} +7 -9
  156. package/esm/ArticleCards.d.ts +6 -0
  157. package/esm/ArticleCards.js +4 -0
  158. package/esm/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
  159. package/esm/ArticleCarousel/_ArticleCarouselCard.js +24 -0
  160. package/esm/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
  161. package/esm/ArticleMeta.d.ts +1 -0
  162. package/esm/ArticleMeta.js +19 -0
  163. package/esm/Attention.js +4 -0
  164. package/esm/{BasicTable.jsx → BasicTable.js} +11 -12
  165. package/esm/BgBox.d.ts +8 -0
  166. package/esm/BgBox.js +9 -0
  167. package/esm/{Bling.jsx → Bling.js} +2 -2
  168. package/esm/BlockBreak.js +6 -0
  169. package/esm/BlockQuote.js +4 -0
  170. package/esm/BreadCrumbs.js +28 -0
  171. package/esm/ButtonBack.d.ts +1 -1
  172. package/esm/ButtonBack.js +4 -0
  173. package/esm/{ButtonBar.jsx → ButtonBar.js} +2 -4
  174. package/esm/ButtonPrimary.d.ts +1 -1
  175. package/esm/ButtonPrimary.js +4 -0
  176. package/esm/ButtonSecondary.d.ts +1 -1
  177. package/esm/ButtonSecondary.js +4 -0
  178. package/esm/ButtonTertiary.d.ts +1 -1
  179. package/esm/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
  180. package/esm/Carousel.js +4 -0
  181. package/esm/CarouselStepper.js +4 -0
  182. package/esm/CenterColumn.js +7 -0
  183. package/esm/Checkbox.d.ts +1 -1
  184. package/esm/Checkbox.js +4 -0
  185. package/esm/CheckboxButtonsGroup.d.ts +1 -1
  186. package/esm/CheckboxButtonsGroup.js +14 -0
  187. package/esm/CheckboxGroup.d.ts +1 -1
  188. package/esm/CheckboxGroup.js +7 -0
  189. package/esm/CityBlock.d.ts +1 -1
  190. package/esm/{CityBlock.jsx → CityBlock.js} +1 -1
  191. package/esm/{ContactBubble.jsx → ContactBubble.js} +13 -27
  192. package/esm/ContentArticle.js +21 -0
  193. package/esm/ContentImage.d.ts +1 -1
  194. package/esm/ContentImage.js +18 -0
  195. package/esm/{Datepicker.jsx → Datepicker.js} +17 -18
  196. package/esm/ExtraLinks.d.ts +1 -1
  197. package/esm/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
  198. package/esm/FeatureList.js +16 -0
  199. package/esm/FieldGroup.js +9 -0
  200. package/esm/{FileInput.jsx → FileInput.js} +22 -25
  201. package/esm/{Foonote.jsx → Foonote.js} +0 -0
  202. package/esm/FooterBadges.js +12 -0
  203. package/esm/FooterInfo.js +9 -0
  204. package/esm/Footnote.js +3 -0
  205. package/esm/{Form.jsx → Form.js} +2 -4
  206. package/esm/{FormField.jsx → FormField.js} +20 -22
  207. package/esm/Gallery/_GalleryItem.d.ts +1 -1
  208. package/esm/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
  209. package/esm/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
  210. package/esm/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
  211. package/esm/{Gallery.jsx → Gallery.js} +3 -4
  212. package/esm/GridBlocks.d.ts +2 -2
  213. package/esm/GridBlocks.js +24 -0
  214. package/esm/Heading.d.ts +1 -1
  215. package/esm/{Heading.jsx → Heading.js} +3 -5
  216. package/esm/HeroBlock.d.ts +2 -2
  217. package/esm/HeroBlock.js +21 -0
  218. package/esm/{IframeBlock.jsx → IframeBlock.js} +6 -6
  219. package/esm/Illustration.d.ts +1 -1
  220. package/esm/{Illustration.jsx → Illustration.js} +2 -2
  221. package/esm/ImageCards.d.ts +1 -1
  222. package/esm/{ImageCards.jsx → ImageCards.js} +3 -4
  223. package/esm/InfoBlock.js +13 -0
  224. package/esm/InfoHero.d.ts +2 -2
  225. package/esm/{InfoHero.jsx → InfoHero.js} +10 -16
  226. package/esm/IslandBlock.d.ts +1 -1
  227. package/esm/{IslandBlock.jsx → IslandBlock.js} +1 -1
  228. package/esm/IslandPageBlock.d.ts +1 -1
  229. package/esm/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
  230. package/esm/LabeledTextBlock.d.ts +1 -1
  231. package/esm/LabeledTextBlock.js +14 -0
  232. package/esm/Layout.js +52 -0
  233. package/esm/MainMenu/_Auxiliary.js +13 -0
  234. package/esm/MainMenu/_PrimaryPanel.js +22 -0
  235. package/esm/{MainMenu.jsx → MainMenu.js} +28 -41
  236. package/esm/MiniMetrics.d.ts +1 -1
  237. package/esm/MiniMetrics.js +12 -0
  238. package/esm/Modal.js +14 -0
  239. package/esm/{NameCard.jsx → NameCard.js} +19 -24
  240. package/esm/NameCards.js +7 -0
  241. package/esm/NewsHero.d.ts +1 -1
  242. package/esm/{NewsHero.jsx → NewsHero.js} +8 -10
  243. package/esm/PageFilter.js +15 -0
  244. package/esm/{PageHeading.jsx → PageHeading.js} +2 -4
  245. package/esm/Picture.d.ts +7 -0
  246. package/esm/Picture.js +8 -0
  247. package/esm/ProcessOverview.js +17 -0
  248. package/esm/PullQuote.js +4 -0
  249. package/esm/RadioButtonsGroup.d.ts +1 -1
  250. package/esm/RadioButtonsGroup.js +14 -0
  251. package/esm/RadioGroup.d.ts +2 -2
  252. package/esm/RadioGroup.js +7 -0
  253. package/esm/RelatedLinks.js +26 -0
  254. package/esm/{RowBlock.jsx → RowBlock.js} +1 -3
  255. package/esm/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
  256. package/esm/{SearchInput.jsx → SearchInput.js} +4 -6
  257. package/esm/SearchResults/_SearchResultsItem.js +15 -0
  258. package/esm/{SearchResults.jsx → SearchResults.js} +27 -36
  259. package/esm/{SeenEffect.jsx → SeenEffect.js} +1 -1
  260. package/esm/{Selectbox.jsx → Selectbox.js} +1 -1
  261. package/esm/{ShareButtons.jsx → ShareButtons.js} +7 -13
  262. package/esm/{Sharpie.jsx → Sharpie.js} +1 -1
  263. package/esm/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
  264. package/esm/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
  265. package/esm/SiteSearchInput.d.ts +1 -1
  266. package/esm/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
  267. package/esm/{Skeleton.jsx → Skeleton.js} +5 -5
  268. package/esm/{SubHeading.jsx → SubHeading.js} +2 -4
  269. package/esm/{Tabs.jsx → Tabs.js} +12 -12
  270. package/esm/TagPill.d.ts +1 -1
  271. package/esm/{TagPill.jsx → TagPill.js} +12 -17
  272. package/esm/{TextBlock.jsx → TextBlock.js} +2 -4
  273. package/esm/TextButton.d.ts +1 -1
  274. package/esm/{TextButton.jsx → TextButton.js} +2 -2
  275. package/esm/{TextInput.jsx → TextInput.js} +1 -1
  276. package/esm/{VSpacer.jsx → VSpacer.js} +1 -1
  277. package/esm/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
  278. package/esm/WizardLayout.js +30 -0
  279. package/esm/WizardLayoutClose.d.ts +1 -1
  280. package/esm/WizardLayoutClose.js +4 -0
  281. package/esm/WizardStepper.js +25 -0
  282. package/esm/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
  283. package/esm/_abstract/_Blings.js +12 -0
  284. package/esm/_abstract/_Block.d.ts +2 -2
  285. package/esm/_abstract/_Block.js +24 -0
  286. package/esm/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
  287. package/esm/_abstract/{Button.jsx → _Button.js} +3 -7
  288. package/esm/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
  289. package/esm/_abstract/_CardList.js +38 -0
  290. package/{_abstract/Image.d.ts → esm/_abstract/_Image.d.ts} +9 -5
  291. package/esm/_abstract/_Image.js +27 -0
  292. package/esm/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
  293. package/esm/_abstract/{Link.jsx → _Link.js} +0 -0
  294. package/esm/_abstract/_Quote.js +8 -0
  295. package/{_abstract/TogglerGroup.d.ts → esm/_abstract/_TogglerGroup.d.ts} +1 -1
  296. package/esm/_abstract/_TogglerGroup.js +29 -0
  297. package/esm/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
  298. package/esm/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
  299. package/esm/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
  300. package/esm/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
  301. package/esm/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
  302. package/esm/utils/seenEffect.d.ts +2 -2
  303. package/esm/utils/seenEffect.js +1 -1
  304. package/package.json +106 -91
  305. package/utils/seenEffect.d.ts +2 -2
  306. package/utils/seenEffect.js +1 -1
  307. package/ArticleCarousel/_ArticleCarouselCard.jsx +0 -32
  308. package/BreadCrumbs.jsx +0 -36
  309. package/ContentImage.jsx +0 -18
  310. package/FeatureList.jsx +0 -28
  311. package/FooterBadges.jsx +0 -21
  312. package/FooterInfo.jsx +0 -19
  313. package/GridBlocks.jsx +0 -40
  314. package/InfoBlock.jsx +0 -23
  315. package/Layout.jsx +0 -69
  316. package/MainMenu/_Auxiliary.jsx +0 -26
  317. package/MainMenu/_PrimaryPanel.jsx +0 -37
  318. package/Modal.jsx +0 -21
  319. package/ProcessOverview.jsx +0 -25
  320. package/RadioGroup.jsx +0 -12
  321. package/RelatedLinks.jsx +0 -35
  322. package/SearchResults/_SearchResultsItem.jsx +0 -24
  323. package/WizardLayout.jsx +0 -44
  324. package/WizardStepper.jsx +0 -34
  325. package/_abstract/CardList.jsx +0 -46
  326. package/_abstract/TogglerGroup.jsx +0 -36
  327. package/_abstract/_Block.jsx +0 -32
  328. package/_abstract/_Quote.jsx +0 -18
  329. package/esm/AccordionList.jsx +0 -33
  330. package/esm/ActionCards.jsx +0 -10
  331. package/esm/ArticleCarousel/_ArticleCarouselCard.jsx +0 -25
  332. package/esm/ArticleMeta.jsx +0 -17
  333. package/esm/Attention.jsx +0 -4
  334. package/esm/BlockBreak.jsx +0 -6
  335. package/esm/BlockQuote.jsx +0 -4
  336. package/esm/BreadCrumbs.jsx +0 -31
  337. package/esm/ButtonBack.jsx +0 -4
  338. package/esm/ButtonPrimary.jsx +0 -4
  339. package/esm/ButtonSecondary.jsx +0 -4
  340. package/esm/Carousel.jsx +0 -4
  341. package/esm/CarouselStepper.jsx +0 -4
  342. package/esm/CenterColumn.jsx +0 -9
  343. package/esm/Checkbox.jsx +0 -4
  344. package/esm/CheckboxButtonsGroup.jsx +0 -14
  345. package/esm/CheckboxGroup.jsx +0 -7
  346. package/esm/ContentArticle.jsx +0 -24
  347. package/esm/ContentImage.jsx +0 -13
  348. package/esm/FeatureList.jsx +0 -23
  349. package/esm/FieldGroup.jsx +0 -10
  350. package/esm/FooterBadges.jsx +0 -16
  351. package/esm/FooterInfo.jsx +0 -14
  352. package/esm/Footnote.jsx +0 -3
  353. package/esm/GridBlocks.jsx +0 -35
  354. package/esm/HeroBlock.jsx +0 -22
  355. package/esm/InfoBlock.jsx +0 -18
  356. package/esm/LabeledTextBlock.jsx +0 -16
  357. package/esm/Layout.jsx +0 -63
  358. package/esm/MainMenu/_Auxiliary.jsx +0 -19
  359. package/esm/MainMenu/_PrimaryPanel.jsx +0 -30
  360. package/esm/MiniMetrics.jsx +0 -11
  361. package/esm/Modal.jsx +0 -16
  362. package/esm/NameCards.jsx +0 -9
  363. package/esm/PageFilter.jsx +0 -16
  364. package/esm/ProcessOverview.jsx +0 -20
  365. package/esm/PullQuote.jsx +0 -4
  366. package/esm/RadioButtonsGroup.jsx +0 -14
  367. package/esm/RadioGroup.jsx +0 -7
  368. package/esm/RelatedLinks.jsx +0 -30
  369. package/esm/SearchResults/_SearchResultsItem.jsx +0 -19
  370. package/esm/WizardLayout.jsx +0 -39
  371. package/esm/WizardLayoutClose.jsx +0 -4
  372. package/esm/WizardStepper.jsx +0 -29
  373. package/esm/_abstract/CardList.jsx +0 -39
  374. package/esm/_abstract/Image.jsx +0 -29
  375. package/esm/_abstract/TogglerGroup.jsx +0 -31
  376. package/esm/_abstract/_Blings.jsx +0 -14
  377. package/esm/_abstract/_Block.jsx +0 -27
  378. package/esm/_abstract/_Quote.jsx +0 -11
@@ -32,10 +32,13 @@ const renderTab = (tabProps, index, listProps) => {
32
32
  }
33
33
  : { href };
34
34
  return [
35
- <Tag key={index} className="Tabs__tab" data-active={isActive} {...tagProps} onClick={handleClick} onFocus={handleFocus} aria-label={longLabel} title={longLabel} // make custom aria-labels visible
36
- >
37
- {label} {badge != null && <small className="Tabs__tab__badge">({badge})</small>}
38
- </Tag>,
35
+ React.createElement(Tag, Object.assign({ key: index, className: "Tabs__tab", "data-active": isActive }, tagProps, { onClick: handleClick, onFocus: handleFocus, "aria-label": longLabel, title: longLabel }),
36
+ label,
37
+ " ",
38
+ badge != null && React.createElement("small", { className: "Tabs__tab__badge" },
39
+ "(",
40
+ badge,
41
+ ")")),
39
42
  ' ',
40
43
  ];
41
44
  };
@@ -82,13 +85,10 @@ const Tabs = (props) => {
82
85
  listAriaControls,
83
86
  isBrowser,
84
87
  };
85
- return (<div className={getBemClass('Tabs', vertical && 'vertical')} role={tabRole && role} id={id}
86
- // aria-owns={tabIdList.join(' ')}
87
- aria-label={ariaLabel} aria-labelledby={ariaLabelledBy} onKeyDown={handleKeydown} data-sprinkled={isBrowser} ref={ref}>
88
- {tabs.map((tabProps, index) => renderTab(tabProps, index, listProps))}
89
- {subTabs && (<Tabs {...subTabs} role={'role' in subTabs ? subTabs.role : role} activateOnFocus={(_a = subTabs.activateOnFocus) !== null && _a !== void 0 ? _a : activateOnFocus} ssr={(_b = subTabs.ssr) !== null && _b !== void 0 ? _b : ssr} startSeen
90
- // just to be sure
91
- vertical={undefined} subTabs={undefined}/>)}
92
- </div>);
88
+ return (React.createElement("div", { className: getBemClass('Tabs', vertical && 'vertical'), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser, ref: ref },
89
+ tabs.map((tabProps, index) => renderTab(tabProps, index, listProps)),
90
+ subTabs && (React.createElement(Tabs, Object.assign({}, subTabs, { role: 'role' in subTabs ? subTabs.role : role, activateOnFocus: (_a = subTabs.activateOnFocus) !== null && _a !== void 0 ? _a : activateOnFocus, ssr: (_b = subTabs.ssr) !== null && _b !== void 0 ? _b : ssr, startSeen: true,
91
+ // just to be sure
92
+ vertical: undefined, subTabs: undefined })))));
93
93
  };
94
94
  export default Tabs;
package/esm/TagPill.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ButtonProps } from './_abstract/Button';
2
+ import { ButtonProps } from './_abstract/_Button';
3
3
  declare const colors: {
4
4
  readonly normal: "";
5
5
  readonly green: "color--green";
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import React from 'react';
13
13
  import getBemClass from '@hugsmidjan/react/utils/getBemClass';
14
- import Button from './_abstract/Button';
14
+ import Button from './_abstract/_Button';
15
15
  const colors = {
16
16
  normal: '',
17
17
  green: 'color--green',
@@ -28,21 +28,16 @@ const TagPill = (props) => {
28
28
  !onRemove &&
29
29
  console.warn('static (non-button) `TagPill`s must not be removable');
30
30
  const modifiers = [modifier, large && 'large', colors[color]];
31
- const removeBtn = removable && (<button className="TagPill__remove" onClick={onRemove && (() => onRemove())} aria-label={removeLabelLong} type="button">
32
- {removeLabel}
33
- </button>);
34
- return isStatic ? (<span className={getBemClass('TagPill', modifiers)}>
35
- {label} {removeBtn}
36
- </span>) : onRemove ? (<span className={getBemClass('TagPill', modifiers)}>
37
- <Button bem="TagPill__button" {...buttonProps}>
38
- {label}
39
- </Button>{' '}
40
- {removeBtn}
41
- </span>) : (<Button bem="TagPill" {...buttonProps} modifier={modifiers}>
42
- {label}{' '}
43
- {removable && (<span className="TagPill__remove" aria-label={removeLabelLong}>
44
- {removeLabel}
45
- </span>)}
46
- </Button>);
31
+ const removeBtn = removable && (React.createElement("button", { className: "TagPill__remove", onClick: onRemove && (() => onRemove()), "aria-label": removeLabelLong, type: "button" }, removeLabel));
32
+ return isStatic ? (React.createElement("span", { className: getBemClass('TagPill', modifiers) },
33
+ label,
34
+ " ",
35
+ removeBtn)) : onRemove ? (React.createElement("span", { className: getBemClass('TagPill', modifiers) },
36
+ React.createElement(Button, Object.assign({ bem: "TagPill__button" }, buttonProps), label),
37
+ ' ',
38
+ removeBtn)) : (React.createElement(Button, Object.assign({ bem: "TagPill" }, buttonProps, { modifier: modifiers }),
39
+ label,
40
+ ' ',
41
+ removable && (React.createElement("span", { className: "TagPill__remove", "aria-label": removeLabelLong }, removeLabel))));
47
42
  };
48
43
  export default TagPill;
@@ -5,13 +5,11 @@ const TextBlock = (props) => {
5
5
  const { children, align, labelled, wide, small, startSeen } = props;
6
6
  const rightAligned = align === 'right' || labelled;
7
7
  const [ref] = useSeenEffect(startSeen);
8
- return (<div className={getBemClass('TextBlock', [
8
+ return (React.createElement("div", { className: getBemClass('TextBlock', [
9
9
  labelled && 'labelled',
10
10
  rightAligned && 'align--right',
11
11
  wide && !rightAligned && 'wide',
12
12
  small && !labelled && 'small',
13
- ])} ref={ref}>
14
- {children}
15
- </div>);
13
+ ]), ref: ref }, children));
16
14
  };
17
15
  export default TextBlock;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ButtonProps } from './_abstract/Button';
2
+ import { ButtonProps } from './_abstract/_Button';
3
3
  export declare type TextButtonProps = ButtonProps & {
4
4
  disabled?: never;
5
5
  };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import Button from './_abstract/Button';
2
+ import Button from './_abstract/_Button';
3
3
  const TextButton = (props) => {
4
4
  if ('disabled' in props) {
5
5
  props = Object.assign(Object.assign({}, props), { disabled: undefined });
6
6
  }
7
- return <Button bem="TextButton" {...props}/>;
7
+ return React.createElement(Button, Object.assign({ bem: "TextButton" }, props));
8
8
  };
9
9
  export default TextButton;
@@ -30,6 +30,6 @@ const TextInput = (props) => {
30
30
  // TypeScript is silly sometimes.
31
31
  e);
32
32
  };
33
- return (<FormField className={getBemClass('TextInput', modifiers, className)} ssr={ssr} small={small} label={label} empty={empty} filled={filled} assistText={assistText} hideLabel={hideLabel} disabled={disabled} readOnly={readOnly} invalid={invalid} errorMessage={errorMessage} required={required} reqText={reqText} id={id} renderInput={(className, inputProps, addFocusProps) => multiline ? (<textarea className={className.input} onChange={_onChange} {...inputProps} {...addFocusProps(inputElementProps)} ref={inputRef}/>) : (<input className={className.input} onChange={_onChange} type={type} {...inputProps} {...addFocusProps(inputElementProps)} ref={inputRef}/>)}/>);
33
+ return (React.createElement(FormField, { className: getBemClass('TextInput', modifiers, className), ssr: ssr, small: small, label: label, empty: empty, filled: filled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => multiline ? (React.createElement("textarea", Object.assign({ className: className.input, onChange: _onChange }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) : (React.createElement("input", Object.assign({ className: className.input, onChange: _onChange, type: type }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) }));
34
34
  };
35
35
  export default TextInput;
@@ -36,6 +36,6 @@ const VSpacer = (props) => {
36
36
  topVal && 'top--' + topVal,
37
37
  bottomVal && 'bottom--' + bottomVal,
38
38
  ]);
39
- return isWrapper ? (<div className={className}>{children}</div>) : (<hr className={className}/>);
39
+ return isWrapper ? (React.createElement("div", { className: className }, children)) : (React.createElement("hr", { className: className }));
40
40
  };
41
41
  export default VSpacer;
@@ -58,11 +58,11 @@ const VerticalTabsTOC = (props) => {
58
58
  window.addEventListener('hashchange', handleHash);
59
59
  return () => window.removeEventListener('hashchange', handleHash);
60
60
  }, [itemsById, onItemSelect]);
61
- return (<Tabs id={domid} vertical aria-label={props['aria-label']} onSetActive={(_, item) => {
61
+ return (React.createElement(Tabs, { id: domid, vertical: true, "aria-label": props['aria-label'], onSetActive: (_, item) => {
62
62
  var _a;
63
63
  const itemId = getItemId(item);
64
64
  const newId = itemId || getItemId((_a = itemsById[itemId].subTabs) === null || _a === void 0 ? void 0 : _a.tabs[0]);
65
65
  setFrag(newId);
66
- }} tabs={updatedItems} role="tablist" activeIdx={state.activeIdx} subTabs={state.subTabs}/>);
66
+ }, tabs: updatedItems, role: "tablist", activeIdx: state.activeIdx, subTabs: state.subTabs }));
67
67
  };
68
68
  export default VerticalTabsTOC;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { useIsBrowserSide } from '@hugsmidjan/react/hooks';
3
+ import { getAssetUrl } from '@reykjavik/hanna-utils/assets';
4
+ import Image from './_abstract/_Image';
5
+ import { Link } from './_abstract/_Link';
6
+ import { useScrollbarWidthCSSVar } from './utils/useScrollbarWidthCSSVar';
7
+ const WizardLayout = (props) => {
8
+ useScrollbarWidthCSSVar();
9
+ const {
10
+ // ssr,
11
+ wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName = 'Reykjavík', globalAlerts, } = props;
12
+ const isBrowser = useIsBrowserSide( /* ssr */);
13
+ return (React.createElement("div", { className: "WizardLayout", "data-sprinkled": isBrowser, "data-color-theme": colorTheme },
14
+ globalAlerts && (React.createElement("div", { className: "WizardLayout__alerts", role: "alert" }, globalAlerts)),
15
+ React.createElement("div", { className: "WizardLayout__content" },
16
+ React.createElement("div", { className: "WizardLayout__header", role: "banner" },
17
+ React.createElement(Link, { className: "WizardLayout__header__logo", href: logoLink },
18
+ ' ',
19
+ React.createElement(Image, { className: undefined, inline: true, src: getAssetUrl('reykjavik-logo.svg') }),
20
+ ' ',
21
+ siteName,
22
+ ' '),
23
+ ' '),
24
+ React.createElement("div", { className: "WizardLayout__wrap" },
25
+ wizardStepper && (React.createElement("div", { className: "WizardLayout__stepper", role: "navigation" }, wizardStepper)),
26
+ React.createElement("div", { className: "WizardLayout__main", role: "main" }, children),
27
+ React.createElement("div", { className: "WizardLayout__deco WizardLayout__deco--geometry" })),
28
+ React.createElement("div", { className: "WizardLayout__footer", role: "complementary" }, wizardFooter))));
29
+ };
30
+ export default WizardLayout;
@@ -1,3 +1,3 @@
1
- import { ButtonProps } from './_abstract/Button';
1
+ import { ButtonProps } from './_abstract/_Button';
2
2
  declare const WizardLayoutClose: (props: ButtonProps) => JSX.Element;
3
3
  export default WizardLayoutClose;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import Button from './_abstract/_Button';
3
+ const WizardLayoutClose = (props) => (React.createElement(Button, Object.assign({ bem: "WizardLayoutClose" }, props)));
4
+ export default WizardLayoutClose;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import getBemClass from '@hugsmidjan/react/utils/getBemClass';
3
+ const WizardStepper = (props) => {
4
+ const { steps, activeStep = -1, allowForwardSkip, disableBacktrack, onClick } = props;
5
+ return (React.createElement("div", { className: getBemClass('WizardStepper', activeStep === -1 && 'preview') }, steps.map((step, i) => {
6
+ const { label, clickable, done, neutral } = step;
7
+ const stepClass = getBemClass('WizardStepper__step', [
8
+ (done || (done == null && i < activeStep)) && 'done',
9
+ neutral && 'neutral',
10
+ ]);
11
+ const isClickable = clickable === 'always' ||
12
+ (clickable &&
13
+ (activeStep === i ||
14
+ (i > activeStep && allowForwardSkip) ||
15
+ (i < activeStep && !disableBacktrack)));
16
+ const ariaCurrent = activeStep === i ? 'step' : undefined;
17
+ return (React.createElement(React.Fragment, { key: i },
18
+ isClickable ? (React.createElement("button", { type: "button", className: stepClass, onClick: () => onClick(i), "aria-current": ariaCurrent }, label)) : (React.createElement("span", { className: stepClass, "aria-current": ariaCurrent },
19
+ ' ',
20
+ label,
21
+ ' ')),
22
+ ' '));
23
+ })));
24
+ };
25
+ export default WizardStepper;
@@ -117,17 +117,14 @@ const AbstractCarousel = (props) => {
117
117
  if (!itemCount) {
118
118
  return null;
119
119
  }
120
- return (<div className={getBemClass(bem, modifier, props.className)} ref={outerRef} data-sprinkled={isBrowser}>
121
- {title && <h2 className={bem + '__title'}>{title}</h2>}
122
- <div className={bem + '__itemlist'} style={leftOffset
123
- ? { '--Carousel--leftOffset': `${leftOffset}px` }
124
- : undefined} data-scroll-snapping={leftOffset ? 'true' : undefined} onMouseLeave={handleMouseLeave} ref={listRef}>
125
- {children ||
120
+ return (React.createElement("div", { className: getBemClass(bem, modifier, props.className), ref: outerRef, "data-sprinkled": isBrowser },
121
+ title && React.createElement("h2", { className: bem + '__title' }, title),
122
+ React.createElement("div", { className: bem + '__itemlist', style: leftOffset
123
+ ? { '--Carousel--leftOffset': `${leftOffset}px` }
124
+ : undefined, "data-scroll-snapping": leftOffset ? 'true' : undefined, onMouseLeave: handleMouseLeave, ref: listRef }, children ||
126
125
  items.map((item, i) => (
127
126
  // @ts-expect-error (Can't be arsed...)
128
- <Component key={i} {...ComponentProps} {...item}/>))}
129
- </div>
130
- {isBrowser && (<CarouselStepper itemCount={itemCount} setCurrent={scrollToItem} current={activeItem}/>)}
131
- </div>);
127
+ React.createElement(Component, Object.assign({ key: i }, ComponentProps, item))))),
128
+ isBrowser && (React.createElement(CarouselStepper, { itemCount: itemCount, setCurrent: scrollToItem, current: activeItem }))));
132
129
  };
133
130
  export default AbstractCarousel;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import Bling from '../Bling';
3
+ const inverseAlignments = {
4
+ left: 'right',
5
+ 'left-ish': 'right-ish',
6
+ 'left-center': 'right-center',
7
+ 'right-center': 'left-center',
8
+ 'right-ish': 'left-ish',
9
+ right: 'left',
10
+ };
11
+ const Blings = (props) => (React.createElement(React.Fragment, null, props.blings.map(({ type, align, vertical, color, overlay, parent }, i) => (React.createElement(Bling, { key: type + '-' + i, type: type, align: props.mirror ? inverseAlignments[align || 'left'] : align, vertical: vertical, color: color, overlay: overlay, parent: parent })))));
12
+ export default Blings;
@@ -1,7 +1,7 @@
1
1
  import { BemPropsModifier } from '@hugsmidjan/react/types';
2
2
  import { SeenProp } from '../utils/seenEffect';
3
- import { ButtonProps } from './Button';
4
- import { ImageProps } from './Image';
3
+ import { ButtonProps } from './_Button';
4
+ import { ImageProps } from './_Image';
5
5
  export declare type BlockItem = {
6
6
  title: string;
7
7
  summary?: string | JSX.Element;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import getBemClass from '@hugsmidjan/react/utils/getBemClass';
3
+ import { useSeenEffect } from '../utils/seenEffect';
4
+ import Button from './_Button';
5
+ import Image from './_Image';
6
+ const Block = (props) => {
7
+ const { image, modifier, bem, content, startSeen } = props;
8
+ const [ref] = useSeenEffect(startSeen);
9
+ const contentItems = Array.isArray(content) ? content : [content];
10
+ return (React.createElement("div", { className: getBemClass(bem, modifier), ref: ref },
11
+ contentItems.map(({ title, summary, buttons = [] }, i) => {
12
+ const hasSummary = summary && (typeof summary !== 'string' || !!summary.trim());
13
+ return (React.createElement("div", { key: i, className: `${bem}__content` },
14
+ React.createElement("h2", { className: `${bem}__title` }, title),
15
+ hasSummary && React.createElement("div", { className: `${bem}__summary` }, summary),
16
+ buttons.length > 0 && (React.createElement("div", { className: `${bem}__buttons` },
17
+ ' ',
18
+ buttons.map((buttonProps, i) => (React.createElement(React.Fragment, null,
19
+ React.createElement(Button, Object.assign({ bem: `${bem}__button`, key: i }, buttonProps)),
20
+ ' ')))))));
21
+ }),
22
+ image && React.createElement(Image, Object.assign({ className: `${bem}__image` }, image))));
23
+ };
24
+ export default Block;
File without changes
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import React from 'react';
13
13
  import getBemClass from '@hugsmidjan/react/utils/getBemClass';
14
- import { Link } from './Link';
14
+ import { Link } from './_Link';
15
15
  // ---------------------------------------------------------------------------
16
16
  const sizes = {
17
17
  normal: '',
@@ -38,14 +38,10 @@ const Button = (props) => {
38
38
  getBemClass(bem, [modifier, variants[variant], sizes[size], navigationFlags[icon]]);
39
39
  const iconProp = icons[icon] && { 'data-icon': icons[icon] };
40
40
  if (buttonProps.href != null) {
41
- return (<Link className={className} {...buttonProps} style={undefined} {...iconProp}>
42
- {label}
43
- </Link>);
41
+ return (React.createElement(Link, Object.assign({ className: className }, buttonProps, { style: undefined }, iconProp), label));
44
42
  }
45
43
  else {
46
- return (<button className={className} type="button" {...buttonProps} style={undefined} {...iconProp}>
47
- {label}
48
- </button>);
44
+ return (React.createElement("button", Object.assign({ className: className, type: "button" }, buttonProps, { style: undefined }, iconProp), label));
49
45
  }
50
46
  };
51
47
  export default Button;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { ImageProps } from './Image';
2
+ import { ImageProps } from './_Image';
3
3
  declare type BaseCardProps = {
4
4
  title: string;
5
5
  href: string;
@@ -24,6 +24,7 @@ export declare type TextCardListProps = CardListProps<TextCardProps>;
24
24
  declare type _CardListProps = CardListProps<BaseCardProps> & {
25
25
  bemPrefix: string;
26
26
  children?: ReactNode;
27
+ standalone?: boolean;
27
28
  };
28
29
  export declare const CardList: (props: _CardListProps) => JSX.Element;
29
30
  export {};
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import Button from './_Button';
3
+ import Image from './_Image';
4
+ const Card = (props) => {
5
+ const { bem, href, title, imgPlaceholder } = props;
6
+ const cardClass = `${bem}__card`;
7
+ const image = 'image' in props && props.image;
8
+ const meta = 'meta' in props && props.meta;
9
+ const summary = 'summary' in props && props.summary;
10
+ return (React.createElement(React.Fragment, null,
11
+ React.createElement(Button, { bem: cardClass, href: href },
12
+ ' ',
13
+ React.createElement(Image, Object.assign({ className: `${bem}__image` }, image, { placeholder: imgPlaceholder })),
14
+ React.createElement("span", { className: `${cardClass}__title` }, title),
15
+ ' ',
16
+ meta && React.createElement("span", { className: `${cardClass}__meta` }, meta),
17
+ ' ',
18
+ summary && React.createElement("span", { className: `${cardClass}__summary` }, summary),
19
+ ' '),
20
+ ' '));
21
+ };
22
+ export const CardList = (props) => {
23
+ const { bemPrefix, title, summaryElement, cards, titleTag = 'h2', children, imgPlaceholder, } = props;
24
+ const TitleTag = titleTag;
25
+ const fallbackImageUrl = (imgPlaceholder !== true && imgPlaceholder) || undefined;
26
+ const fallbackImageStyle = fallbackImageUrl
27
+ ? {
28
+ ['--' + bemPrefix + '--fallback']: `url("${fallbackImageUrl}")`,
29
+ }
30
+ : undefined;
31
+ return (React.createElement(React.Fragment, null,
32
+ summaryElement ? (React.createElement("div", { className: bemPrefix + '__summary' },
33
+ title && React.createElement(TitleTag, { className: bemPrefix + '__title' }, title),
34
+ summaryElement)) : (title && React.createElement(TitleTag, { className: bemPrefix + '__title' }, title)),
35
+ React.createElement("ul", { className: bemPrefix + (props.standalone ? '' : '__list'), style: fallbackImageStyle }, cards.map((card, i) => (React.createElement("li", { key: i, className: bemPrefix + '__item' },
36
+ React.createElement(Card, Object.assign({}, card, { bem: bemPrefix, imgPlaceholder: !!imgPlaceholder })))))),
37
+ children));
38
+ };
@@ -2,25 +2,29 @@ export declare type Source = {
2
2
  srcset: string;
3
3
  media: string;
4
4
  };
5
- export declare type ImageProps = {
5
+ export declare type ImagePropsLinked = {
6
6
  altText?: string;
7
- } & ({
8
7
  sources?: Array<Source>;
9
8
  /** The default image source to (lazy) load */
10
9
  src?: string;
11
10
  /** Eagerly-loaded placeholder/thunbnail to use until a `sources` item has been picked. */
12
11
  preloadSrc?: string;
13
12
  inline?: false;
14
- } | {
13
+ focalPoint?: string;
14
+ };
15
+ export declare type ImagePropsInlinedSvg = {
16
+ altText?: string;
15
17
  /** Should the image be fetched and inlined as <svg/> */
16
18
  inline: true;
17
19
  src: string;
18
20
  sources?: undefined;
19
21
  preloadSrc?: undefined;
20
- });
22
+ focalPoint?: undefined;
23
+ };
24
+ export declare type ImageProps = ImagePropsLinked | ImagePropsInlinedSvg;
21
25
  declare type _ImageProps = {
22
26
  /** container className */
23
- className?: string;
27
+ className: string | undefined;
24
28
  /** Controls if the container is rendered when image is missing/undefined.
25
29
  * (With a `--missing` className modifier added.)
26
30
  *
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import getBemClass from '@hugsmidjan/react/utils/getBemClass';
3
+ import { useGetSVGtext } from '../utils/useGetSVGtext';
4
+ // eslint-disable-next-line complexity
5
+ const Image = (props) => {
6
+ const { src, altText = '', sources = [], preloadSrc, className, inline, placeholder, focalPoint, } = props;
7
+ const _src = (sources.length && preloadSrc) || src;
8
+ const imageSrc = _src || (sources[0] != null ? sources[0].srcset.split(' ')[0] : undefined);
9
+ const imgLoading = preloadSrc ? 'eager' : 'lazy';
10
+ const inlineSvg = useGetSVGtext(inline ? imageSrc : undefined);
11
+ if (!imageSrc) {
12
+ return placeholder ? (React.createElement("span", { className: className && getBemClass(className, 'missing') }, placeholder !== true && placeholder())) : null;
13
+ }
14
+ if (inline && inlineSvg) {
15
+ const __html = inlineSvg.imageSrc === imageSrc ? inlineSvg.code : '';
16
+ return React.createElement("span", { className: className, dangerouslySetInnerHTML: { __html } });
17
+ }
18
+ return (React.createElement("picture", { className: className, style: focalPoint ? { '--focalPoint': focalPoint } : undefined },
19
+ ' ',
20
+ sources.map((source, i) => (React.createElement(React.Fragment, null,
21
+ React.createElement("source", { key: i, srcSet: source.srcset, media: source.media }),
22
+ ' '))),
23
+ ' ',
24
+ React.createElement("img", { src: imageSrc, alt: altText, loading: imgLoading }),
25
+ ' '));
26
+ };
27
+ export default Image;
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Link } from './_Link';
3
+ export const _Quote = (props) => {
4
+ const { bem, children, by, byHref } = props;
5
+ return (React.createElement("figure", { className: bem },
6
+ React.createElement("blockquote", { className: bem + '__quote' }, children),
7
+ by && (React.createElement("figcaption", { className: bem + '__by' }, byHref ? (React.createElement(Link, { href: byHref }, by)) : typeof by === 'string' ? (React.createElement("span", null, by)) : (by)))));
8
+ };
@@ -1,5 +1,5 @@
1
1
  import { FormFieldInputProps } from '../FormField';
2
- import { TogglerInputProps } from './TogglerInput';
2
+ import { TogglerInputProps } from './_TogglerInput';
3
3
  export declare type TogglerGroupOption = {
4
4
  value: string;
5
5
  label?: string | JSX.Element;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import getBemClass from '@hugsmidjan/react/utils/getBemClass';
3
+ const TogglerGroup = (props) => {
4
+ const {
5
+ // id,
6
+ className, bem, name, disabled, Toggler, onSelected, options, inputProps = {}, } = props;
7
+ const values = props.value || [];
8
+ return (React.createElement("ul", { className: getBemClass(bem, null, className), role: "group", "aria-labelledby": props['aria-labelledby'], "aria-describedby": props['aria-describedby'], "aria-required": props.required }, options.map((option, i) => {
9
+ const isDisabled = option.disabled != null
10
+ ? option.disabled
11
+ : disabled && typeof disabled !== 'boolean'
12
+ ? disabled.includes(i)
13
+ : disabled;
14
+ const isChecked = values.includes(option.value);
15
+ return (React.createElement(Toggler, Object.assign({ key: i }, inputProps, { className: bem + '__item', name: name, Wrapper: "li" }, option, { label: option.label || option.value, onChange: onSelected
16
+ ? (e) => {
17
+ const { value } = option;
18
+ const checked = e.currentTarget.checked;
19
+ inputProps.onChange && inputProps.onChange(e);
20
+ const selectedValues = values.filter((val) => val !== value);
21
+ if (checked) {
22
+ selectedValues.push(value);
23
+ }
24
+ onSelected({ value, checked, option, selectedValues });
25
+ }
26
+ : inputProps.onChange, disabled: isDisabled, "aria-invalid": props['aria-invalid'], checked: isChecked })));
27
+ })));
28
+ };
29
+ export default TogglerGroup;
@@ -1,8 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { BemPropsModifier } from '@hugsmidjan/react/types';
3
3
  import { FormFieldGroupWrappingProps } from '../FormField';
4
- import { TogglerGroupOption, TogglerGroupOptions, TogglerGroupProps } from './TogglerGroup';
5
- import { TogglerInputProps } from './TogglerInput';
4
+ import { TogglerGroupOption, TogglerGroupOptions, TogglerGroupProps } from './_TogglerGroup';
5
+ import { TogglerInputProps } from './_TogglerInput';
6
6
  export declare type TogglerGroupFieldProps = {
7
7
  className?: string;
8
8
  } & FormFieldGroupWrappingProps & TogglerGroupProps;
@@ -12,11 +12,11 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React from 'react';
13
13
  import getBemClass from '@hugsmidjan/react/utils/getBemClass';
14
14
  import FormField from '../FormField';
15
- import TogglerGroup from './TogglerGroup';
15
+ import TogglerGroup from './_TogglerGroup';
16
16
  const TogglerGroupField = (props) => {
17
17
  const { bem, Toggler, className, modifier, label, LabelTag, assistText, hideLabel, disabled, readOnly, invalid, errorMessage, required, reqText, id, value } = props, togglerGroupProps = __rest(props, ["bem", "Toggler", "className", "modifier", "label", "LabelTag", "assistText", "hideLabel", "disabled", "readOnly", "invalid", "errorMessage", "required", "reqText", "id", "value"]);
18
- return (<FormField className={getBemClass(bem, modifier, className)} group label={label} LabelTag={LabelTag} assistText={assistText} hideLabel={hideLabel} disabled={disabled} readOnly={readOnly} invalid={invalid} errorMessage={errorMessage} required={required} reqText={reqText} id={id} renderInput={(className, inputProps) => {
19
- return (<TogglerGroup bem={className.options} {...inputProps} {...togglerGroupProps} value={Array.isArray(value) ? value : value != null ? [value] : undefined} Toggler={Toggler}/>);
20
- }}/>);
18
+ return (React.createElement(FormField, { className: getBemClass(bem, modifier, className), group: true, label: label, LabelTag: LabelTag, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps) => {
19
+ return (React.createElement(TogglerGroup, Object.assign({ bem: className.options }, inputProps, togglerGroupProps, { value: Array.isArray(value) ? value : value != null ? [value] : undefined, Toggler: Toggler })));
20
+ } }));
21
21
  };
22
22
  export default TogglerGroupField;
@@ -16,20 +16,18 @@ const TogglerInput = (props) => {
16
16
  const { bem, modifier, className, label, invalid, errorMessage, Wrapper = 'div', required, reqText, type, id } = props, inputProps = __rest(props, ["bem", "modifier", "className", "label", "invalid", "errorMessage", "Wrapper", "required", "reqText", "type", "id"]);
17
17
  const domid = useDomid(id);
18
18
  const errorId = errorMessage && 'error' + domid;
19
- const reqStar = required && reqText !== false && (<abbr className={bem + '__label__reqstar'}
20
- // TODO: add mo-better i18n thinking
21
- title={(reqText || 'Þarf að haka í') + ': '}>
22
- *
23
- </abbr>);
24
- return (<Wrapper className={getBemClass(bem, modifier, className)}>
25
- <input className={bem + '__input'} type={type} id={domid} aria-invalid={invalid || !!errorMessage || undefined} aria-describedby={errorId} {...inputProps}/>{' '}
26
- <label className={bem + '__label'} htmlFor={domid}>
27
- {' '}
28
- {reqStar} {label}{' '}
29
- </label>
30
- {errorMessage && (<div className={bem + '__error'} id={errorId}>
31
- {errorMessage}
32
- </div>)}
33
- </Wrapper>);
19
+ const reqStar = required && reqText !== false && (React.createElement("abbr", { className: bem + '__label__reqstar',
20
+ // TODO: add mo-better i18n thinking
21
+ title: (reqText || 'Þarf að haka í') + ': ' }, "*"));
22
+ return (React.createElement(Wrapper, { className: getBemClass(bem, modifier, className) },
23
+ React.createElement("input", Object.assign({ className: bem + '__input', type: type, id: domid, "aria-invalid": invalid || !!errorMessage || undefined, "aria-describedby": errorId }, inputProps)),
24
+ ' ',
25
+ React.createElement("label", { className: bem + '__label', htmlFor: domid },
26
+ ' ',
27
+ reqStar,
28
+ " ",
29
+ label,
30
+ ' '),
31
+ errorMessage && (React.createElement("div", { className: bem + '__error', id: errorId }, errorMessage))));
34
32
  };
35
33
  export default TogglerInput;
@@ -4,5 +4,5 @@ const breakOnNL = (text) => text &&
4
4
  .trim()
5
5
  .replace(/(?:\n\s*)+/g, '\n\n')
6
6
  .split(/\n/)
7
- .map((bit) => bit || <br />);
7
+ .map((bit) => bit || React.createElement("br", null));
8
8
  export default breakOnNL;
@@ -13,12 +13,12 @@ declare const effects: {
13
13
  export declare type SeenEffectType = keyof typeof effects;
14
14
  export declare type EffectProp = {
15
15
  /** Should the component appear instantly, and not transition-in once seen */
16
- effectType?: SeenEffectType;
16
+ effectType?: SeenEffectType | 'none';
17
17
  };
18
18
  /** Asserts that a prop value is a SeenEffectType and returns undefined otherwise */
19
19
  export declare const assertEffectType: (maybeType?: string | undefined) => SeenEffectType | undefined;
20
20
  export declare const getEffectAttr: (maybeType?: string | undefined) => {
21
- 'data-seen-effect': string;
21
+ 'data-seen-effect': string | undefined;
22
22
  };
23
23
  export declare type SeenProp = {
24
24
  /** Should the component appear instantly, and not transition-in once seen */