@reykjavik/hanna-react 0.10.70 → 0.10.72

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 (216) hide show
  1. package/AccordionList.d.ts +1 -1
  2. package/AccordionList.js +3 -1
  3. package/ActionCards.d.ts +1 -1
  4. package/ActionCards.js +3 -1
  5. package/Alert.d.ts +2 -3
  6. package/Alert.js +5 -4
  7. package/ArticleCards.d.ts +4 -2
  8. package/ArticleCards.js +3 -1
  9. package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
  10. package/ArticleCarousel/_ArticleCarouselCard.js +2 -2
  11. package/ArticleCarousel.d.ts +1 -1
  12. package/ArticleCarousel.js +5 -3
  13. package/ArticleMeta.d.ts +1 -1
  14. package/ArticleMeta.js +3 -1
  15. package/Attention.d.ts +1 -1
  16. package/Attention.js +3 -1
  17. package/BasicTable.d.ts +5 -3
  18. package/BasicTable.js +3 -1
  19. package/BgBox.d.ts +1 -1
  20. package/BgBox.js +3 -1
  21. package/Bling.d.ts +1 -1
  22. package/Bling.js +3 -1
  23. package/BlockBreak.d.ts +1 -1
  24. package/BlockBreak.js +3 -1
  25. package/BlockQuote.d.ts +1 -1
  26. package/BlockQuote.js +4 -2
  27. package/BreadCrumbs.d.ts +1 -1
  28. package/BreadCrumbs.js +3 -1
  29. package/ButtonBack.d.ts +1 -1
  30. package/ButtonBack.js +5 -3
  31. package/ButtonPrimary.d.ts +1 -1
  32. package/ButtonPrimary.js +5 -3
  33. package/ButtonSecondary.d.ts +1 -1
  34. package/ButtonSecondary.js +5 -3
  35. package/ButtonTertiary.d.ts +1 -1
  36. package/ButtonTertiary.js +5 -3
  37. package/CHANGELOG.md +41 -0
  38. package/Carousel.d.ts +1 -1
  39. package/Carousel.js +5 -3
  40. package/CarouselStepper.d.ts +1 -1
  41. package/CarouselStepper.js +3 -1
  42. package/CenterColumn.d.ts +1 -1
  43. package/CenterColumn.js +3 -1
  44. package/Checkbox.d.ts +1 -1
  45. package/Checkbox.js +5 -3
  46. package/CheckboxButtonsGroup.d.ts +3 -3
  47. package/CheckboxButtonsGroup.js +7 -5
  48. package/CheckboxGroup.d.ts +1 -1
  49. package/CheckboxGroup.js +5 -3
  50. package/CityBlock.d.ts +1 -1
  51. package/CityBlock.js +5 -3
  52. package/ContactBubble.d.ts +1 -1
  53. package/ContactBubble.js +3 -2
  54. package/ContentArticle.d.ts +2 -2
  55. package/ContentArticle.js +8 -5
  56. package/ContentImage.d.ts +1 -1
  57. package/ContentImage.js +5 -3
  58. package/Datepicker.d.ts +2 -1
  59. package/Datepicker.js +8 -7
  60. package/ExtraLinks.d.ts +1 -1
  61. package/ExtraLinks.js +3 -1
  62. package/FeatureList.d.ts +1 -1
  63. package/FeatureList.js +3 -1
  64. package/FieldGroup.d.ts +1 -1
  65. package/FieldGroup.js +3 -1
  66. package/FileInput/_FileInput.utils.d.ts +1 -1
  67. package/FileInput/_FileInput.utils.js +12 -5
  68. package/FileInput/_FileInputFileList.js +2 -2
  69. package/FileInput.d.ts +5 -5
  70. package/FileInput.js +19 -10
  71. package/Foonote.d.ts +1 -1
  72. package/Foonote.js +3 -2
  73. package/FooterBadges.d.ts +1 -1
  74. package/FooterBadges.js +3 -1
  75. package/FooterInfo.d.ts +4 -2
  76. package/FooterInfo.js +7 -2
  77. package/Footnote.d.ts +1 -1
  78. package/Footnote.js +3 -1
  79. package/Form.d.ts +1 -1
  80. package/Form.js +3 -1
  81. package/FormField.d.ts +1 -1
  82. package/FormField.js +3 -1
  83. package/Gallery/_GalleryItem.d.ts +1 -2
  84. package/Gallery/_GalleryItem.js +9 -8
  85. package/Gallery/_GalleryModal.d.ts +2 -2
  86. package/Gallery/_GalleryModal.js +6 -5
  87. package/Gallery/_GalleryModalContext.d.ts +2 -2
  88. package/Gallery/_GalleryModalContext.js +2 -2
  89. package/Gallery/_GalleryModalItem.d.ts +1 -2
  90. package/Gallery/_GalleryModalItem.js +4 -3
  91. package/Gallery.d.ts +1 -1
  92. package/Gallery.js +10 -8
  93. package/GridBlocks.d.ts +1 -1
  94. package/GridBlocks.js +5 -3
  95. package/Heading.d.ts +3 -2
  96. package/Heading.js +5 -2
  97. package/HeroBlock.d.ts +1 -1
  98. package/HeroBlock.js +5 -3
  99. package/IframeBlock.d.ts +3 -1
  100. package/IframeBlock.js +5 -3
  101. package/Illustration.d.ts +5 -8
  102. package/Illustration.js +5 -3
  103. package/ImageCards.d.ts +3 -3
  104. package/ImageCards.js +3 -1
  105. package/InfoBlock.d.ts +8 -12
  106. package/InfoBlock.js +4 -2
  107. package/InfoHero.d.ts +1 -1
  108. package/InfoHero.js +9 -7
  109. package/IslandBlock.d.ts +1 -1
  110. package/IslandBlock.js +5 -3
  111. package/IslandPageBlock.d.ts +1 -1
  112. package/IslandPageBlock.js +5 -3
  113. package/LabeledTextBlock.d.ts +1 -1
  114. package/LabeledTextBlock.js +3 -1
  115. package/Layout.d.ts +2 -2
  116. package/Layout.js +5 -4
  117. package/MainMenu.d.ts +1 -1
  118. package/MainMenu.js +10 -6
  119. package/MiniMetrics.d.ts +1 -1
  120. package/MiniMetrics.js +5 -3
  121. package/Modal.d.ts +2 -4
  122. package/Modal.js +3 -1
  123. package/NameCard.d.ts +1 -1
  124. package/NameCard.js +7 -5
  125. package/NameCards.d.ts +1 -1
  126. package/NameCards.js +3 -1
  127. package/NewsHero.d.ts +1 -1
  128. package/NewsHero.js +6 -4
  129. package/PageFilter.d.ts +1 -1
  130. package/PageFilter.js +3 -1
  131. package/PageHeading.d.ts +1 -1
  132. package/PageHeading.js +3 -1
  133. package/Picture.d.ts +1 -1
  134. package/Picture.js +5 -3
  135. package/ProcessOverview.d.ts +1 -1
  136. package/ProcessOverview.js +3 -1
  137. package/PullQuote.d.ts +1 -1
  138. package/PullQuote.js +3 -1
  139. package/README.md +6 -1
  140. package/RadioButtonsGroup.d.ts +3 -3
  141. package/RadioButtonsGroup.js +7 -5
  142. package/RadioGroup.d.ts +4 -2
  143. package/RadioGroup.js +9 -6
  144. package/RelatedLinks.d.ts +1 -1
  145. package/RelatedLinks.js +3 -1
  146. package/RowBlock.d.ts +1 -1
  147. package/RowBlock.js +3 -1
  148. package/RowBlockColumn.d.ts +1 -1
  149. package/RowBlockColumn.js +3 -1
  150. package/SearchInput.d.ts +2 -2
  151. package/SearchInput.js +4 -2
  152. package/SearchResults/_SearchResultsItem.d.ts +2 -2
  153. package/SearchResults/_SearchResultsItem.js +4 -3
  154. package/SearchResults.d.ts +1 -1
  155. package/SearchResults.js +7 -6
  156. package/SeenEffect.d.ts +1 -1
  157. package/SeenEffect.js +3 -1
  158. package/Selectbox.d.ts +1 -1
  159. package/Selectbox.js +15 -9
  160. package/ShareButtons.d.ts +2 -2
  161. package/ShareButtons.js +15 -8
  162. package/Sharpie.d.ts +1 -1
  163. package/Sharpie.js +3 -1
  164. package/SiteSearchAutocomplete.d.ts +2 -2
  165. package/SiteSearchAutocomplete.js +4 -3
  166. package/SiteSearchCurtain.d.ts +1 -1
  167. package/SiteSearchCurtain.js +3 -1
  168. package/SiteSearchInput.d.ts +2 -2
  169. package/SiteSearchInput.js +3 -2
  170. package/Skeleton.d.ts +1 -1
  171. package/Skeleton.js +5 -3
  172. package/SubHeading.d.ts +1 -1
  173. package/SubHeading.js +3 -1
  174. package/Tabs.d.ts +1 -1
  175. package/Tabs.js +4 -2
  176. package/TagPill.d.ts +1 -1
  177. package/TagPill.js +6 -4
  178. package/TextBlock.d.ts +1 -1
  179. package/TextBlock.js +3 -1
  180. package/TextButton.d.ts +1 -1
  181. package/TextButton.js +5 -3
  182. package/TextInput.d.ts +2 -2
  183. package/TextInput.js +3 -1
  184. package/VSpacer.d.ts +1 -1
  185. package/VSpacer.js +3 -1
  186. package/VerticalTabsTOC.d.ts +1 -1
  187. package/VerticalTabsTOC.js +3 -1
  188. package/WizardLayout.d.ts +4 -4
  189. package/WizardLayout.js +5 -3
  190. package/WizardLayoutClose.d.ts +1 -1
  191. package/WizardLayoutClose.js +5 -3
  192. package/WizardStepper.d.ts +2 -2
  193. package/WizardStepper.js +5 -2
  194. package/_abstract/_AbstractCarousel.d.ts +12 -5
  195. package/_abstract/_AbstractCarousel.js +8 -3
  196. package/_abstract/_Blings.d.ts +2 -2
  197. package/_abstract/_Blings.js +2 -1
  198. package/_abstract/_Block.d.ts +1 -2
  199. package/_abstract/_Block.js +6 -5
  200. package/_abstract/_Button.d.ts +2 -2
  201. package/_abstract/_Button.js +2 -1
  202. package/_abstract/_CardList.js +4 -4
  203. package/_abstract/_Image.d.ts +2 -2
  204. package/_abstract/_Image.js +2 -1
  205. package/_abstract/_TogglerGroup.d.ts +2 -3
  206. package/_abstract/_TogglerGroup.js +2 -1
  207. package/_abstract/_TogglerGroupField.d.ts +2 -2
  208. package/_abstract/_TogglerGroupField.js +4 -3
  209. package/_abstract/_TogglerInput.d.ts +3 -3
  210. package/_abstract/_TogglerInput.js +2 -1
  211. package/_abstract/breakOnNL.d.ts +1 -2
  212. package/_abstract/breakOnNL.js +2 -1
  213. package/assets.js +1 -1
  214. package/constants.d.ts +8 -28
  215. package/focus-visible.js +2 -0
  216. package/package.json +4 -4
@@ -21,5 +21,5 @@ export declare type AccordionListProps = {
21
21
  wide?: boolean;
22
22
  ssr?: SSRSupport;
23
23
  } & SeenProp;
24
- declare const AccordionList: (props: AccordionListProps) => JSX.Element;
24
+ export declare const AccordionList: (props: AccordionListProps) => JSX.Element;
25
25
  export default AccordionList;
package/AccordionList.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccordionList = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importStar(require("react"));
5
6
  const hooks_1 = require("@hugsmidjan/react/hooks");
@@ -32,4 +33,5 @@ const AccordionList = (props) => {
32
33
  };
33
34
  return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('AccordionList', [wide && 'wide']), ref: ref }, items.map((item, i) => (react_1.default.createElement(AccordionListItem, Object.assign({ key: i }, item, { ssr: ssr, open: open.includes(i), onToggle: () => onToggle(i), defaultOpen: defaultOpen && defaultOpen.includes(i) }))))));
34
35
  };
35
- exports.default = AccordionList;
36
+ exports.AccordionList = AccordionList;
37
+ exports.default = exports.AccordionList;
package/ActionCards.d.ts CHANGED
@@ -2,5 +2,5 @@ import { CardListSummaryProps, TextCardListProps, TextCardProps } from './_abstr
2
2
  import { SeenProp } from './utils/seenEffect';
3
3
  export declare type ActionCardsProps = TextCardListProps & CardListSummaryProps & SeenProp;
4
4
  export declare type ActionCardsItemProps = TextCardProps;
5
- declare const ActionCards: (props: ActionCardsProps) => JSX.Element;
5
+ export declare const ActionCards: (props: ActionCardsProps) => JSX.Element;
6
6
  export default ActionCards;
package/ActionCards.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionCards = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const _CardList_1 = require("./_abstract/_CardList");
@@ -9,4 +10,5 @@ const ActionCards = (props) => {
9
10
  return (react_1.default.createElement("div", { className: "ActionCards", ref: ref },
10
11
  react_1.default.createElement(_CardList_1.CardList, Object.assign({}, props, { bemPrefix: "ActionCards" }))));
11
12
  };
12
- exports.default = ActionCards;
13
+ exports.ActionCards = ActionCards;
14
+ exports.default = exports.ActionCards;
package/Alert.d.ts CHANGED
@@ -36,8 +36,7 @@ export declare type AlertProps = {
36
36
  /** Callback that fires when the alert has closed/transitoned out */
37
37
  onClosed: () => void;
38
38
  }, {
39
- /**
40
- * @deprecated This signature with the `event` argument will be removed in hanna-react v0.9
39
+ /** @deprecated This signature with the `event` argument will be removed in hanna-react v0.11
41
40
  *
42
41
  * Return `false` to prevent the alert from closing
43
42
  */
@@ -45,5 +44,5 @@ export declare type AlertProps = {
45
44
  /** Callback that fires after the alert has closed/transitoned out */
46
45
  onClosed?(): void;
47
46
  }>;
48
- declare const Alert: (props: AlertProps) => JSX.Element;
47
+ export declare const Alert: (props: AlertProps) => JSX.Element;
49
48
  export default Alert;
package/Alert.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.alertTypes = exports.defaultAlertTexts = void 0;
3
+ exports.Alert = exports.alertTypes = exports.defaultAlertTexts = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const hooks_1 = require("@hugsmidjan/react/hooks");
7
7
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
8
8
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
9
- const _Button_1 = tslib_1.__importDefault(require("./_abstract/_Button"));
9
+ const _Button_1 = require("./_abstract/_Button");
10
10
  const env_1 = require("./utils/env");
11
11
  // FIXME: Eventually import from @reykjavik/hanna-css
12
12
  const AlertCloseTransitionDuration = 400;
@@ -87,8 +87,9 @@ const Alert = (props) => {
87
87
  ]), role: "alert", hidden: !open || undefined }, autoClosingProps),
88
88
  childrenHTML ? (react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: childrenHTML } })) : (children),
89
89
  ' ',
90
- showCloseButton && (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "Alert__close" }, (closeUrl != null ? { href: closeUrl } : { type: 'button' }), { onClick: (e) => {
90
+ showCloseButton && (react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "Alert__close" }, (closeUrl != null ? { href: closeUrl } : { type: 'button' }), { onClick: (e) => {
91
91
  closeAlert(e);
92
92
  }, "aria-label": closeLabelLong, title: closeLabelLong || closeLabel }), closeLabel))));
93
93
  };
94
- exports.default = Alert;
94
+ exports.Alert = Alert;
95
+ exports.default = exports.Alert;
package/ArticleCards.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { Cleanup } from '@reykjavik/hanna-utils';
2
2
  import { ImageCardListProps, ImageCardProps } from './_abstract/_CardList';
3
- export declare type ArticleCardProps = ImageCardProps;
3
+ export declare type ArticleCardsItemProps = ImageCardProps;
4
+ /** @deprecated Use `ArticleCardsItemProps` instead (Remove in v0.11) */
5
+ export declare type ArticleCardProps = ArticleCardsItemProps;
4
6
  export declare type ArticleCardsProps = Cleanup<Pick<ImageCardListProps, 'cards' | 'imgPlaceholder'>>;
5
- declare const ArticleCards: (props: ArticleCardsProps) => JSX.Element;
7
+ export declare const ArticleCards: (props: ArticleCardsProps) => JSX.Element;
6
8
  export default ArticleCards;
package/ArticleCards.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArticleCards = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const _CardList_1 = require("./_abstract/_CardList");
6
7
  const ArticleCards = (props) => (react_1.default.createElement(_CardList_1.CardList, { bemPrefix: "ArticleCards", standalone: true, cards: props.cards, imgPlaceholder: props.imgPlaceholder || true }));
7
- exports.default = ArticleCards;
8
+ exports.ArticleCards = ArticleCards;
9
+ exports.default = exports.ArticleCards;
@@ -1,4 +1,4 @@
1
- import { HannaColorTheme } from '@reykjavik/hanna-css';
1
+ import type { HannaColorTheme } from '@reykjavik/hanna-css';
2
2
  import { Illustration } from '@reykjavik/hanna-utils/assets';
3
3
  import { ImageProps } from '../_abstract/_Image';
4
4
  import { ColorFamily } from '../constants';
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
7
7
  const assets_1 = require("@reykjavik/hanna-utils/assets");
8
- const _Image_1 = tslib_1.__importDefault(require("../_abstract/_Image"));
8
+ const _Image_1 = require("../_abstract/_Image");
9
9
  const _Link_1 = require("../_abstract/_Link");
10
10
  const constants_1 = require("../constants");
11
11
  const ArticleCarouselCard = (props) => {
@@ -15,7 +15,7 @@ const ArticleCarouselCard = (props) => {
15
15
  return (react_1.default.createElement("div", { className: "ArticleCarouselCard", "data-color": color && constants_1.colorFamilies[color], "data-color-theme": !color ? theme && constants_1.themeOptions[theme] : undefined },
16
16
  react_1.default.createElement(_Link_1.Link, { className: "ArticleCarouselCard__link", href: href, target: target },
17
17
  ' ',
18
- react_1.default.createElement(_Image_1.default, Object.assign({ placeholder: true, className: (0, getBemClass_1.default)('ArticleCarouselCard__illustration', photo && 'photo') }, imageProps)),
18
+ react_1.default.createElement(_Image_1.Image, Object.assign({ placeholder: true, className: (0, getBemClass_1.default)('ArticleCarouselCard__illustration', photo && 'photo') }, imageProps)),
19
19
  react_1.default.createElement("h3", { className: "ArticleCarouselCard__title" }, title),
20
20
  ' '),
21
21
  ' ',
@@ -8,5 +8,5 @@ export declare type ArticleCarouselProps = {
8
8
  ssr?: SSRSupport;
9
9
  } & SeenProp;
10
10
  export type { ArticleCarouselCardProps, ArticleCarouselImageProps };
11
- declare const ArticleCarousel: (props: ArticleCarouselProps) => JSX.Element;
11
+ export declare const ArticleCarousel: (props: ArticleCarouselProps) => JSX.Element;
12
12
  export default ArticleCarousel;
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArticleCarousel = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _AbstractCarousel_1 = tslib_1.__importDefault(require("./_abstract/_AbstractCarousel"));
6
+ const _AbstractCarousel_1 = require("./_abstract/_AbstractCarousel");
6
7
  const _ArticleCarouselCard_1 = require("./ArticleCarousel/_ArticleCarouselCard");
7
8
  const ArticleCarousel = (props) => {
8
9
  const { title, items, moreLabel, ssr, startSeen } = props;
9
- return (react_1.default.createElement(_AbstractCarousel_1.default, { bem: "ArticleCarousel", title: title, items: items, Component: _ArticleCarouselCard_1.ArticleCarouselCard, ComponentProps: { moreLabel }, ssr: ssr, startSeen: startSeen }));
10
+ return (react_1.default.createElement(_AbstractCarousel_1.AbstractCarousel, { bem: "ArticleCarousel", title: title, items: items, Component: _ArticleCarouselCard_1.ArticleCarouselCard, ComponentProps: { moreLabel }, ssr: ssr, startSeen: startSeen }));
10
11
  };
11
- exports.default = ArticleCarousel;
12
+ exports.ArticleCarousel = ArticleCarousel;
13
+ exports.default = exports.ArticleCarousel;
package/ArticleMeta.d.ts CHANGED
@@ -6,5 +6,5 @@ export declare type ArticleMetaProps = {
6
6
  items: Array<ArticleMetaItem>;
7
7
  small?: boolean;
8
8
  };
9
- declare const ArticleMeta: (props: ArticleMetaProps) => JSX.Element | null;
9
+ export declare const ArticleMeta: (props: ArticleMetaProps) => JSX.Element | null;
10
10
  export default ArticleMeta;
package/ArticleMeta.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArticleMeta = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importStar(require("react"));
5
6
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
@@ -19,4 +20,5 @@ const ArticleMeta = (props) => {
19
20
  ' ')),
20
21
  ' ')))));
21
22
  };
22
- exports.default = ArticleMeta;
23
+ exports.ArticleMeta = ArticleMeta;
24
+ exports.default = exports.ArticleMeta;
package/Attention.d.ts CHANGED
@@ -3,5 +3,5 @@ export declare type AttentionProps = {
3
3
  small?: boolean;
4
4
  children: ReactNode;
5
5
  };
6
- declare const Attention: (props: AttentionProps) => JSX.Element;
6
+ export declare const Attention: (props: AttentionProps) => JSX.Element;
7
7
  export default Attention;
package/Attention.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Attention = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
6
7
  const Attention = (props) => (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Attention', props.small && 'small') }, props.children));
7
- exports.default = Attention;
8
+ exports.Attention = Attention;
9
+ exports.default = exports.Attention;
package/BasicTable.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { TableProps } from '@hugsmidjan/react/Table';
2
+ import { EitherObj } from '@reykjavik/hanna-utils';
2
3
  import { SeenProp } from './utils/seenEffect';
3
4
  export declare type BasicTableProps = {
4
5
  compact?: boolean;
5
6
  type?: 'text' | 'number';
6
- children?: undefined;
7
7
  modifier?: string;
8
+ } & EitherObj<{
8
9
  fullWidth?: boolean;
10
+ }, {
9
11
  align?: 'right';
10
- } & SeenProp & Omit<TableProps, 'className' | 'children'>;
11
- declare const BasicTable: (props: BasicTableProps) => JSX.Element;
12
+ }> & SeenProp & Omit<TableProps, 'className' | 'children'>;
13
+ export declare const BasicTable: (props: BasicTableProps) => JSX.Element;
12
14
  export default BasicTable;
package/BasicTable.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BasicTable = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const Table_1 = tslib_1.__importDefault(require("@hugsmidjan/react/Table"));
@@ -29,4 +30,5 @@ const BasicTable = (props) => {
29
30
  tfoot,
30
31
  }, tbodyProps))));
31
32
  };
32
- exports.default = BasicTable;
33
+ exports.BasicTable = BasicTable;
34
+ exports.default = exports.BasicTable;
package/BgBox.d.ts CHANGED
@@ -4,5 +4,5 @@ export declare type BgBoxProps = {
4
4
  className?: string;
5
5
  children: ReactNode;
6
6
  } & SeenProp & EffectProp;
7
- declare const BgBox: (props: BgBoxProps) => JSX.Element;
7
+ export declare const BgBox: (props: BgBoxProps) => JSX.Element;
8
8
  export default BgBox;
package/BgBox.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BgBox = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
@@ -9,4 +10,5 @@ const BgBox = (props) => {
9
10
  const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
10
11
  return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('BgBox', undefined, className), ref: ref }, (0, seenEffect_1.getEffectAttr)(effectType)), children));
11
12
  };
12
- exports.default = BgBox;
13
+ exports.BgBox = BgBox;
14
+ exports.default = exports.BgBox;
package/Bling.d.ts CHANGED
@@ -77,5 +77,5 @@ export declare type BlingProps = {
77
77
  /** Custom SVG URL to load (use sparingly) */
78
78
  blingUrl: string;
79
79
  });
80
- declare const Bling: (props: BlingProps) => JSX.Element;
80
+ export declare const Bling: (props: BlingProps) => JSX.Element;
81
81
  export default Bling;
package/Bling.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Bling = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
@@ -44,4 +45,5 @@ const Bling = (props) => {
44
45
  overlay && 'overlay',
45
46
  ], className), "data-bling-type": type, "data-bling-image": !type ? blingUrl : undefined, dangerouslySetInnerHTML: inlineSvg && { __html: inlineSvg.code } }));
46
47
  };
47
- exports.default = Bling;
48
+ exports.Bling = Bling;
49
+ exports.default = exports.Bling;
package/BlockBreak.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const BlockBreak: () => JSX.Element;
1
+ export declare const BlockBreak: () => JSX.Element;
2
2
  export default BlockBreak;
package/BlockBreak.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlockBreak = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  /*
6
7
  TODO: Add story
7
8
  */
8
9
  const BlockBreak = () => react_1.default.createElement("div", { className: "BlockBreak" });
9
- exports.default = BlockBreak;
10
+ exports.BlockBreak = BlockBreak;
11
+ exports.default = exports.BlockBreak;
package/BlockQuote.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { QuoteProps } from './_abstract/_Quote';
2
2
  export declare type BlockQuoteProps = QuoteProps;
3
- declare const BlockQuote: (props: BlockQuoteProps) => JSX.Element;
3
+ export declare const BlockQuote: (props: BlockQuoteProps) => JSX.Element;
4
4
  export default BlockQuote;
package/BlockQuote.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlockQuote = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const _Quote_1 = require("./_abstract/_Quote");
6
- const BlockQuote = (props) => react_1.default.createElement(_Quote_1._Quote, Object.assign({ bem: "BlockQuote" }, props));
7
- exports.default = BlockQuote;
7
+ const BlockQuote = (props) => (react_1.default.createElement(_Quote_1._Quote, Object.assign({ bem: "BlockQuote" }, props)));
8
+ exports.BlockQuote = BlockQuote;
9
+ exports.default = exports.BlockQuote;
package/BreadCrumbs.d.ts CHANGED
@@ -7,5 +7,5 @@ export declare type BreadCrumbsProps = {
7
7
  title: string;
8
8
  trail: BreadCrumbTrail;
9
9
  };
10
- declare const BreadCrumbs: (props: BreadCrumbsProps) => JSX.Element | null;
10
+ export declare const BreadCrumbs: (props: BreadCrumbsProps) => JSX.Element | null;
11
11
  export default BreadCrumbs;
package/BreadCrumbs.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BreadCrumbs = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const _Link_1 = require("./_abstract/_Link");
@@ -28,4 +29,5 @@ const BreadCrumbs = (props) => {
28
29
  }),
29
30
  react_1.default.createElement(BreadCrumbs__item, { link: current, current: true })));
30
31
  };
31
- exports.default = BreadCrumbs;
32
+ exports.BreadCrumbs = BreadCrumbs;
33
+ exports.default = exports.BreadCrumbs;
package/ButtonBack.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonProps } from './_abstract/_Button';
3
3
  export declare type ButtonBackProps = ButtonProps;
4
- declare const ButtonBack: (props: ButtonBackProps & {
4
+ export declare const ButtonBack: (props: ButtonBackProps & {
5
5
  children?: ReactNode;
6
6
  }) => JSX.Element;
7
7
  export default ButtonBack;
package/ButtonBack.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonBack = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _Button_1 = tslib_1.__importDefault(require("./_abstract/_Button"));
6
- const ButtonBack = (props) => (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "ButtonBack" }, props)));
7
- exports.default = ButtonBack;
6
+ const _Button_1 = require("./_abstract/_Button");
7
+ const ButtonBack = (props) => (react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "ButtonBack" }, props)));
8
+ exports.ButtonBack = ButtonBack;
9
+ exports.default = exports.ButtonBack;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
3
3
  export declare type ButtonPrimaryProps = ButtonProps & ButtonVariantProps;
4
- declare const ButtonPrimary: (props: ButtonPrimaryProps & {
4
+ export declare const ButtonPrimary: (props: ButtonPrimaryProps & {
5
5
  children?: ReactNode;
6
6
  }) => JSX.Element;
7
7
  export default ButtonPrimary;
package/ButtonPrimary.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonPrimary = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _Button_1 = tslib_1.__importDefault(require("./_abstract/_Button"));
6
- const ButtonPrimary = (props) => (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "ButtonPrimary" }, props)));
7
- exports.default = ButtonPrimary;
6
+ const _Button_1 = require("./_abstract/_Button");
7
+ const ButtonPrimary = (props) => (react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "ButtonPrimary" }, props)));
8
+ exports.ButtonPrimary = ButtonPrimary;
9
+ exports.default = exports.ButtonPrimary;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
3
3
  export declare type ButtonSecondaryProps = ButtonProps & ButtonVariantProps;
4
- declare const ButtonSecondary: (props: ButtonSecondaryProps & {
4
+ export declare const ButtonSecondary: (props: ButtonSecondaryProps & {
5
5
  children?: ReactNode;
6
6
  }) => JSX.Element;
7
7
  export default ButtonSecondary;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonSecondary = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _Button_1 = tslib_1.__importDefault(require("./_abstract/_Button"));
6
- const ButtonSecondary = (props) => (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "ButtonSecondary" }, props)));
7
- exports.default = ButtonSecondary;
6
+ const _Button_1 = require("./_abstract/_Button");
7
+ const ButtonSecondary = (props) => react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "ButtonSecondary" }, props));
8
+ exports.ButtonSecondary = ButtonSecondary;
9
+ exports.default = exports.ButtonSecondary;
@@ -6,7 +6,7 @@ export declare type ButtonTertiaryProps = ButtonProps & Omit<ButtonVariantProps,
6
6
  size?: TertiarySize;
7
7
  icon?: TertiaryIcon;
8
8
  };
9
- declare const ButtonTertiary: (props: ButtonTertiaryProps & {
9
+ export declare const ButtonTertiary: (props: ButtonTertiaryProps & {
10
10
  children?: ReactNode;
11
11
  }) => JSX.Element;
12
12
  export default ButtonTertiary;
package/ButtonTertiary.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonTertiary = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _Button_1 = tslib_1.__importDefault(require("./_abstract/_Button"));
6
+ const _Button_1 = require("./_abstract/_Button");
6
7
  const sizes = {
7
8
  normal: 'normal',
8
9
  small: 'small',
@@ -13,6 +14,7 @@ const icons = {
13
14
  };
14
15
  const ButtonTertiary = (props) => {
15
16
  const { size = 'normal', icon = 'none' } = props;
16
- return react_1.default.createElement(_Button_1.default, Object.assign({ bem: "ButtonTertiary" }, props, { size: sizes[size], icon: icons[icon] }));
17
+ return react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "ButtonTertiary" }, props, { size: sizes[size], icon: icons[icon] }));
17
18
  };
18
- exports.default = ButtonTertiary;
19
+ exports.ButtonTertiary = ButtonTertiary;
20
+ exports.default = exports.ButtonTertiary;
package/CHANGELOG.md CHANGED
@@ -4,6 +4,47 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
+ ## 0.10.72
8
+
9
+ _2022-12-07_
10
+
11
+ - feat: Add named exports to all component modules (heralds default export
12
+ deprecation)
13
+ - fix: Disable all non-selected options in `readOnly` `Selectbox`es
14
+ - fix: Update `Selectbox` filled/empty status when `options` arrive late
15
+ - fix: incorrect SSR markup generated by `MainMenu`
16
+
17
+ ## 0.10.71
18
+
19
+ _2022-11-23_
20
+
21
+ - feat: Add prop `onFilesRejected` to `FileInputProps`
22
+ - feat: Add prop `itemCount` for all Carousel-related components with
23
+ `children` — drop requirement for children to be an Array.
24
+ - feat(ts): Export `ArticleCardsItemProps`, deprecate `ArticleCardProps`
25
+ - feat(ts): Only allow either `align="right"` or `fullWidth` on `BasicTable`
26
+ - feat: Make `SiteSearchAutocompleteProps.renderSuggestion` optional
27
+ - feat: Add `FooterInfoGroup.main`, deprecate `FooterInfoGroup.role`
28
+ - `FileInput`:
29
+ - feat: Add prop `lang` (default: `'is'`)
30
+ - feat: Make prop `removeFileText` optional
31
+ - fix: File-sizes are now formatted based on `lang` prop
32
+ - `ShareButton`:
33
+ - fix: Add support for Polish
34
+ - fix: Make Icelandic the default/fallback locale
35
+ - fix: Swap in Icelandic and English `emailSubject`s
36
+ - fix: Lingering `--focus` state when keyboard navigating from `DatePicker`
37
+ - fix: Suppress Autocomplete suggestion container until suggestions arrive
38
+ - fix: Disable `button` element when `SearchInput` is disabled or readonly
39
+ - fix: Add missing `title` prop on `IframeBlock`
40
+ - fix: Set default value for empty `WizardStepper` step labels
41
+ - fix: Add missing prop `name` to `DatePicker`
42
+ - fix: Make `ContentArticleProps.meta` optional
43
+ - fix: Suppress `<hr>` in `ContentArticleProps` when `relatedLinks` is missing
44
+ - fix: Make `InfoBlockProps.subTitle` optional
45
+ - fix: Clicks inside `.Datepicker .FormField__input` div always focus `input`
46
+ - fix(ts): Remove unused (`never`) props from `ModalProps`
47
+
7
48
  ## 0.10.70
8
49
 
9
50
  _2022-09-28_
package/Carousel.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { CarouselProps } from './_abstract/_AbstractCarousel';
2
2
  export type { CarouselProps } from './_abstract/_AbstractCarousel';
3
- declare const Carousel: <I extends Record<string, unknown> = {}, P extends Record<string, unknown> | undefined = {}>(props: CarouselProps<I, P>) => JSX.Element;
3
+ export declare const Carousel: <I extends Record<string, unknown> = {}, P extends Record<string, unknown> | undefined = {}>(props: CarouselProps<I, P>) => JSX.Element;
4
4
  export default Carousel;
package/Carousel.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Carousel = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _AbstractCarousel_1 = tslib_1.__importDefault(require("./_abstract/_AbstractCarousel"));
6
- const Carousel = (props) => (react_1.default.createElement(_AbstractCarousel_1.default, Object.assign({}, props, { bem: undefined, modifier: undefined, title: undefined })));
7
- exports.default = Carousel;
6
+ const _AbstractCarousel_1 = require("./_abstract/_AbstractCarousel");
7
+ const Carousel = (props) => (react_1.default.createElement(_AbstractCarousel_1.AbstractCarousel, Object.assign({}, props, { bem: undefined, modifier: undefined, title: undefined })));
8
+ exports.Carousel = Carousel;
9
+ exports.default = exports.Carousel;
@@ -1,4 +1,4 @@
1
1
  import { Props } from '@hugsmidjan/react/CarouselStepper';
2
2
  declare type CarouselStepperProps = Omit<Props, 'bem' | 'modifier'>;
3
- declare const CarouselStepper: (props: CarouselStepperProps) => JSX.Element;
3
+ export declare const CarouselStepper: (props: CarouselStepperProps) => JSX.Element;
4
4
  export default CarouselStepper;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CarouselStepper = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const CarouselStepper_1 = tslib_1.__importDefault(require("@hugsmidjan/react/CarouselStepper"));
6
7
  const CarouselStepper = (props) => (react_1.default.createElement(CarouselStepper_1.default, Object.assign({}, props, { bem: undefined, modifier: undefined })));
7
- exports.default = CarouselStepper;
8
+ exports.CarouselStepper = CarouselStepper;
9
+ exports.default = exports.CarouselStepper;
package/CenterColumn.d.ts CHANGED
@@ -3,5 +3,5 @@ import { EffectProp, SeenProp } from './utils/seenEffect';
3
3
  export declare type CenterColumnProps = {
4
4
  children: ReactNode;
5
5
  } & SeenProp & EffectProp;
6
- declare const CenterColumn: (props: CenterColumnProps) => JSX.Element;
6
+ export declare const CenterColumn: (props: CenterColumnProps) => JSX.Element;
7
7
  export default CenterColumn;
package/CenterColumn.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CenterColumn = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
6
  const SeenEffect_1 = tslib_1.__importDefault(require("./SeenEffect"));
@@ -7,4 +8,5 @@ const CenterColumn = (props) => {
7
8
  const { children, startSeen, effectType } = props;
8
9
  return startSeen == null ? (react_1.default.createElement("div", { className: "CenterColumn" }, children)) : (react_1.default.createElement(SeenEffect_1.default, { className: "CenterColumn", startSeen: startSeen, effectType: effectType }, children));
9
10
  };
10
- exports.default = CenterColumn;
11
+ exports.CenterColumn = CenterColumn;
12
+ exports.default = exports.CenterColumn;
package/Checkbox.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { TogglerInputProps } from './_abstract/_TogglerInput';
2
2
  export declare type CheckboxProps = TogglerInputProps;
3
- declare const Checkbox: (props: CheckboxProps) => JSX.Element;
3
+ export declare const Checkbox: (props: CheckboxProps) => JSX.Element;
4
4
  export default Checkbox;
package/Checkbox.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Checkbox = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const _TogglerInput_1 = tslib_1.__importDefault(require("./_abstract/_TogglerInput"));
6
- const Checkbox = (props) => (react_1.default.createElement(_TogglerInput_1.default, Object.assign({ bem: "Checkbox" }, props, { type: "checkbox" })));
7
- exports.default = Checkbox;
6
+ const _TogglerInput_1 = require("./_abstract/_TogglerInput");
7
+ const Checkbox = (props) => (react_1.default.createElement(_TogglerInput_1.TogglerInput, Object.assign({ bem: "Checkbox" }, props, { type: "checkbox" })));
8
+ exports.Checkbox = Checkbox;
9
+ exports.default = exports.Checkbox;
@@ -1,11 +1,11 @@
1
1
  import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
2
2
  export declare type CheckboxButtonsGroupProps = TogglerGroupFieldProps & {
3
3
  value?: Array<string>;
4
- /** @deprecated (Will be removed in v0.9) */
4
+ /** @deprecated (Will be removed in v0.11) */
5
5
  columns?: '2col' | '3col';
6
- /** @deprecated (Will be removed in v0.9) */
6
+ /** @deprecated (Will be removed in v0.11) */
7
7
  layout?: 'slim';
8
8
  };
9
9
  export declare type CheckboxButtonsGroupOptions = TogglerGroupFieldOptions;
10
- declare const CheckboxButtonsGroup: (props: CheckboxButtonsGroupProps) => JSX.Element;
10
+ export declare const CheckboxButtonsGroup: (props: CheckboxButtonsGroupProps) => JSX.Element;
11
11
  export default CheckboxButtonsGroup;