@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.
- package/AccordionList.d.ts +1 -1
- package/AccordionList.js +3 -1
- package/ActionCards.d.ts +1 -1
- package/ActionCards.js +3 -1
- package/Alert.d.ts +2 -3
- package/Alert.js +5 -4
- package/ArticleCards.d.ts +4 -2
- package/ArticleCards.js +3 -1
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.js +2 -2
- package/ArticleCarousel.d.ts +1 -1
- package/ArticleCarousel.js +5 -3
- package/ArticleMeta.d.ts +1 -1
- package/ArticleMeta.js +3 -1
- package/Attention.d.ts +1 -1
- package/Attention.js +3 -1
- package/BasicTable.d.ts +5 -3
- package/BasicTable.js +3 -1
- package/BgBox.d.ts +1 -1
- package/BgBox.js +3 -1
- package/Bling.d.ts +1 -1
- package/Bling.js +3 -1
- package/BlockBreak.d.ts +1 -1
- package/BlockBreak.js +3 -1
- package/BlockQuote.d.ts +1 -1
- package/BlockQuote.js +4 -2
- package/BreadCrumbs.d.ts +1 -1
- package/BreadCrumbs.js +3 -1
- package/ButtonBack.d.ts +1 -1
- package/ButtonBack.js +5 -3
- package/ButtonPrimary.d.ts +1 -1
- package/ButtonPrimary.js +5 -3
- package/ButtonSecondary.d.ts +1 -1
- package/ButtonSecondary.js +5 -3
- package/ButtonTertiary.d.ts +1 -1
- package/ButtonTertiary.js +5 -3
- package/CHANGELOG.md +41 -0
- package/Carousel.d.ts +1 -1
- package/Carousel.js +5 -3
- package/CarouselStepper.d.ts +1 -1
- package/CarouselStepper.js +3 -1
- package/CenterColumn.d.ts +1 -1
- package/CenterColumn.js +3 -1
- package/Checkbox.d.ts +1 -1
- package/Checkbox.js +5 -3
- package/CheckboxButtonsGroup.d.ts +3 -3
- package/CheckboxButtonsGroup.js +7 -5
- package/CheckboxGroup.d.ts +1 -1
- package/CheckboxGroup.js +5 -3
- package/CityBlock.d.ts +1 -1
- package/CityBlock.js +5 -3
- package/ContactBubble.d.ts +1 -1
- package/ContactBubble.js +3 -2
- package/ContentArticle.d.ts +2 -2
- package/ContentArticle.js +8 -5
- package/ContentImage.d.ts +1 -1
- package/ContentImage.js +5 -3
- package/Datepicker.d.ts +2 -1
- package/Datepicker.js +8 -7
- package/ExtraLinks.d.ts +1 -1
- package/ExtraLinks.js +3 -1
- package/FeatureList.d.ts +1 -1
- package/FeatureList.js +3 -1
- package/FieldGroup.d.ts +1 -1
- package/FieldGroup.js +3 -1
- package/FileInput/_FileInput.utils.d.ts +1 -1
- package/FileInput/_FileInput.utils.js +12 -5
- package/FileInput/_FileInputFileList.js +2 -2
- package/FileInput.d.ts +5 -5
- package/FileInput.js +19 -10
- package/Foonote.d.ts +1 -1
- package/Foonote.js +3 -2
- package/FooterBadges.d.ts +1 -1
- package/FooterBadges.js +3 -1
- package/FooterInfo.d.ts +4 -2
- package/FooterInfo.js +7 -2
- package/Footnote.d.ts +1 -1
- package/Footnote.js +3 -1
- package/Form.d.ts +1 -1
- package/Form.js +3 -1
- package/FormField.d.ts +1 -1
- package/FormField.js +3 -1
- package/Gallery/_GalleryItem.d.ts +1 -2
- package/Gallery/_GalleryItem.js +9 -8
- package/Gallery/_GalleryModal.d.ts +2 -2
- package/Gallery/_GalleryModal.js +6 -5
- package/Gallery/_GalleryModalContext.d.ts +2 -2
- package/Gallery/_GalleryModalContext.js +2 -2
- package/Gallery/_GalleryModalItem.d.ts +1 -2
- package/Gallery/_GalleryModalItem.js +4 -3
- package/Gallery.d.ts +1 -1
- package/Gallery.js +10 -8
- package/GridBlocks.d.ts +1 -1
- package/GridBlocks.js +5 -3
- package/Heading.d.ts +3 -2
- package/Heading.js +5 -2
- package/HeroBlock.d.ts +1 -1
- package/HeroBlock.js +5 -3
- package/IframeBlock.d.ts +3 -1
- package/IframeBlock.js +5 -3
- package/Illustration.d.ts +5 -8
- package/Illustration.js +5 -3
- package/ImageCards.d.ts +3 -3
- package/ImageCards.js +3 -1
- package/InfoBlock.d.ts +8 -12
- package/InfoBlock.js +4 -2
- package/InfoHero.d.ts +1 -1
- package/InfoHero.js +9 -7
- package/IslandBlock.d.ts +1 -1
- package/IslandBlock.js +5 -3
- package/IslandPageBlock.d.ts +1 -1
- package/IslandPageBlock.js +5 -3
- package/LabeledTextBlock.d.ts +1 -1
- package/LabeledTextBlock.js +3 -1
- package/Layout.d.ts +2 -2
- package/Layout.js +5 -4
- package/MainMenu.d.ts +1 -1
- package/MainMenu.js +10 -6
- package/MiniMetrics.d.ts +1 -1
- package/MiniMetrics.js +5 -3
- package/Modal.d.ts +2 -4
- package/Modal.js +3 -1
- package/NameCard.d.ts +1 -1
- package/NameCard.js +7 -5
- package/NameCards.d.ts +1 -1
- package/NameCards.js +3 -1
- package/NewsHero.d.ts +1 -1
- package/NewsHero.js +6 -4
- package/PageFilter.d.ts +1 -1
- package/PageFilter.js +3 -1
- package/PageHeading.d.ts +1 -1
- package/PageHeading.js +3 -1
- package/Picture.d.ts +1 -1
- package/Picture.js +5 -3
- package/ProcessOverview.d.ts +1 -1
- package/ProcessOverview.js +3 -1
- package/PullQuote.d.ts +1 -1
- package/PullQuote.js +3 -1
- package/README.md +6 -1
- package/RadioButtonsGroup.d.ts +3 -3
- package/RadioButtonsGroup.js +7 -5
- package/RadioGroup.d.ts +4 -2
- package/RadioGroup.js +9 -6
- package/RelatedLinks.d.ts +1 -1
- package/RelatedLinks.js +3 -1
- package/RowBlock.d.ts +1 -1
- package/RowBlock.js +3 -1
- package/RowBlockColumn.d.ts +1 -1
- package/RowBlockColumn.js +3 -1
- package/SearchInput.d.ts +2 -2
- package/SearchInput.js +4 -2
- package/SearchResults/_SearchResultsItem.d.ts +2 -2
- package/SearchResults/_SearchResultsItem.js +4 -3
- package/SearchResults.d.ts +1 -1
- package/SearchResults.js +7 -6
- package/SeenEffect.d.ts +1 -1
- package/SeenEffect.js +3 -1
- package/Selectbox.d.ts +1 -1
- package/Selectbox.js +15 -9
- package/ShareButtons.d.ts +2 -2
- package/ShareButtons.js +15 -8
- package/Sharpie.d.ts +1 -1
- package/Sharpie.js +3 -1
- package/SiteSearchAutocomplete.d.ts +2 -2
- package/SiteSearchAutocomplete.js +4 -3
- package/SiteSearchCurtain.d.ts +1 -1
- package/SiteSearchCurtain.js +3 -1
- package/SiteSearchInput.d.ts +2 -2
- package/SiteSearchInput.js +3 -2
- package/Skeleton.d.ts +1 -1
- package/Skeleton.js +5 -3
- package/SubHeading.d.ts +1 -1
- package/SubHeading.js +3 -1
- package/Tabs.d.ts +1 -1
- package/Tabs.js +4 -2
- package/TagPill.d.ts +1 -1
- package/TagPill.js +6 -4
- package/TextBlock.d.ts +1 -1
- package/TextBlock.js +3 -1
- package/TextButton.d.ts +1 -1
- package/TextButton.js +5 -3
- package/TextInput.d.ts +2 -2
- package/TextInput.js +3 -1
- package/VSpacer.d.ts +1 -1
- package/VSpacer.js +3 -1
- package/VerticalTabsTOC.d.ts +1 -1
- package/VerticalTabsTOC.js +3 -1
- package/WizardLayout.d.ts +4 -4
- package/WizardLayout.js +5 -3
- package/WizardLayoutClose.d.ts +1 -1
- package/WizardLayoutClose.js +5 -3
- package/WizardStepper.d.ts +2 -2
- package/WizardStepper.js +5 -2
- package/_abstract/_AbstractCarousel.d.ts +12 -5
- package/_abstract/_AbstractCarousel.js +8 -3
- package/_abstract/_Blings.d.ts +2 -2
- package/_abstract/_Blings.js +2 -1
- package/_abstract/_Block.d.ts +1 -2
- package/_abstract/_Block.js +6 -5
- package/_abstract/_Button.d.ts +2 -2
- package/_abstract/_Button.js +2 -1
- package/_abstract/_CardList.js +4 -4
- package/_abstract/_Image.d.ts +2 -2
- package/_abstract/_Image.js +2 -1
- package/_abstract/_TogglerGroup.d.ts +2 -3
- package/_abstract/_TogglerGroup.js +2 -1
- package/_abstract/_TogglerGroupField.d.ts +2 -2
- package/_abstract/_TogglerGroupField.js +4 -3
- package/_abstract/_TogglerInput.d.ts +3 -3
- package/_abstract/_TogglerInput.js +2 -1
- package/_abstract/breakOnNL.d.ts +1 -2
- package/_abstract/breakOnNL.js +2 -1
- package/assets.js +1 -1
- package/constants.d.ts +8 -28
- package/focus-visible.js +2 -0
- package/package.json +4 -4
package/Gallery/_GalleryItem.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryItem = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
const _Button_1 =
|
|
6
|
-
const _Image_1 =
|
|
7
|
-
const _GalleryModalContext_1 =
|
|
6
|
+
const _Button_1 = require("../_abstract/_Button");
|
|
7
|
+
const _Image_1 = require("../_abstract/_Image");
|
|
8
|
+
const _GalleryModalContext_1 = require("./_GalleryModalContext");
|
|
8
9
|
const GalleryItem = (props) => {
|
|
9
10
|
const { caption, description, largeImageSrc } = props, image = tslib_1.__rest(props, ["caption", "description", "largeImageSrc"]);
|
|
10
|
-
const { setCurrentImage } = (0, react_1.useContext)(_GalleryModalContext_1.
|
|
11
|
+
const { setCurrentImage } = (0, react_1.useContext)(_GalleryModalContext_1.GalleryModalContext);
|
|
11
12
|
return (react_1.default.createElement("figure", { className: "GalleryItem" },
|
|
12
13
|
react_1.default.createElement("figcaption", { className: "GalleryItem__caption" }, caption),
|
|
13
|
-
largeImageSrc ? (react_1.default.createElement(_Button_1.
|
|
14
|
+
largeImageSrc ? (react_1.default.createElement(_Button_1.Button, { bem: "GalleryItem__button", href: largeImageSrc, onClick: (e) => {
|
|
14
15
|
e.preventDefault();
|
|
15
16
|
setCurrentImage(Object.assign(Object.assign({}, image), { caption, description, largeImageSrc }));
|
|
16
17
|
} },
|
|
17
18
|
' ',
|
|
18
|
-
react_1.default.createElement(_Image_1.
|
|
19
|
-
' ')) : (react_1.default.createElement(_Image_1.
|
|
19
|
+
react_1.default.createElement(_Image_1.Image, Object.assign({ className: "GalleryItem__image" }, image)),
|
|
20
|
+
' ')) : (react_1.default.createElement(_Image_1.Image, Object.assign({ className: "GalleryItem__image" }, image))),
|
|
20
21
|
description && react_1.default.createElement("div", { className: "GalleryItem__description" }, description)));
|
|
21
22
|
};
|
|
22
|
-
exports.
|
|
23
|
+
exports.GalleryItem = GalleryItem;
|
|
@@ -2,5 +2,5 @@ import { GalleryI18n } from '../Gallery';
|
|
|
2
2
|
declare type GalleryModalProps = {
|
|
3
3
|
texts: Readonly<GalleryI18n>;
|
|
4
4
|
};
|
|
5
|
-
declare const GalleryModal: (props: GalleryModalProps) => JSX.Element | null;
|
|
6
|
-
export
|
|
5
|
+
export declare const GalleryModal: (props: GalleryModalProps) => JSX.Element | null;
|
|
6
|
+
export {};
|
package/Gallery/_GalleryModal.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryModal = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const react_transition_group_1 = require("react-transition-group");
|
|
6
7
|
const object_1 = require("@hugsmidjan/qj/object");
|
|
7
8
|
const CarouselPaging_1 = tslib_1.__importDefault(require("@hugsmidjan/react/CarouselPaging"));
|
|
8
9
|
const Modal_1 = tslib_1.__importDefault(require("@hugsmidjan/react/Modal"));
|
|
9
|
-
const _GalleryModalContext_1 =
|
|
10
|
-
const _GalleryModalItem_1 =
|
|
10
|
+
const _GalleryModalContext_1 = require("./_GalleryModalContext");
|
|
11
|
+
const _GalleryModalItem_1 = require("./_GalleryModalItem");
|
|
11
12
|
const GalleryModal = (props) => {
|
|
12
13
|
const { texts } = props;
|
|
13
|
-
const { currentImage, items, setCurrentImage } = (0, react_1.useContext)(_GalleryModalContext_1.
|
|
14
|
+
const { currentImage, items, setCurrentImage } = (0, react_1.useContext)(_GalleryModalContext_1.GalleryModalContext);
|
|
14
15
|
const [image, setImage] = (0, react_1.useState)(currentImage);
|
|
15
16
|
const [animated, setAnimated] = (0, react_1.useState)(false);
|
|
16
17
|
const updateImage = (index) => {
|
|
@@ -48,10 +49,10 @@ const GalleryModal = (props) => {
|
|
|
48
49
|
react_1.default.createElement(react_transition_group_1.CSSTransition, { in: animated, timeout: 200, onEntered: () => {
|
|
49
50
|
setAnimated(!animated);
|
|
50
51
|
}, classNames: "GalleryModalItem--" },
|
|
51
|
-
react_1.default.createElement(_GalleryModalItem_1.
|
|
52
|
+
react_1.default.createElement(_GalleryModalItem_1.GalleryModalItem, Object.assign({}, image))),
|
|
52
53
|
react_1.default.createElement(CarouselPaging_1.default, { bem: "GalleryModalPager", itemCount: items.length, current: imageIndex, setCurrent: updateImage, texts: {
|
|
53
54
|
next: texts.modalNextLabel,
|
|
54
55
|
prev: texts.modalPrevLabel,
|
|
55
56
|
} }))));
|
|
56
57
|
};
|
|
57
|
-
exports.
|
|
58
|
+
exports.GalleryModal = GalleryModal;
|
|
@@ -5,5 +5,5 @@ declare type ModalContextProps = {
|
|
|
5
5
|
setCurrentImage: (item: GalleryItemProps | undefined) => void;
|
|
6
6
|
currentImage: GalleryItemProps | undefined;
|
|
7
7
|
} & GalleryProps;
|
|
8
|
-
declare const GalleryModalContext: React.Context<ModalContextProps>;
|
|
9
|
-
export
|
|
8
|
+
export declare const GalleryModalContext: React.Context<ModalContextProps>;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryModalContext = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
|
|
6
|
-
exports.default = GalleryModalContext;
|
|
6
|
+
exports.GalleryModalContext = react_1.default.createContext({});
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryModalItem = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const _Image_1 =
|
|
6
|
+
const _Image_1 = require("../_abstract/_Image");
|
|
6
7
|
const GalleryModalItem = (props) => {
|
|
7
8
|
const { caption, description } = props, image = tslib_1.__rest(props, ["caption", "description"]);
|
|
8
9
|
return (react_1.default.createElement("div", { className: "GalleryModalItem" },
|
|
9
10
|
(caption || description) && (react_1.default.createElement("div", { className: "GalleryModalItem__text" },
|
|
10
11
|
react_1.default.createElement("div", { className: "GalleryModalItem__caption" }, caption),
|
|
11
12
|
react_1.default.createElement("div", { className: "GalleryModalItem__description" }, description))),
|
|
12
|
-
react_1.default.createElement(_Image_1.
|
|
13
|
+
react_1.default.createElement(_Image_1.Image, { className: "GalleryModalItem__image", src: image.largeImageSrc || image.src })));
|
|
13
14
|
};
|
|
14
|
-
exports.
|
|
15
|
+
exports.GalleryModalItem = GalleryModalItem;
|
package/Gallery.d.ts
CHANGED
package/Gallery.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Gallery = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
6
|
-
const _AbstractCarousel_1 =
|
|
7
|
-
const _GalleryItem_1 =
|
|
8
|
-
const _GalleryModal_1 =
|
|
9
|
-
const _GalleryModalContext_1 =
|
|
7
|
+
const _AbstractCarousel_1 = require("./_abstract/_AbstractCarousel");
|
|
8
|
+
const _GalleryItem_1 = require("./Gallery/_GalleryItem");
|
|
9
|
+
const _GalleryModal_1 = require("./Gallery/_GalleryModal");
|
|
10
|
+
const _GalleryModalContext_1 = require("./Gallery/_GalleryModalContext");
|
|
10
11
|
const defaultTexts = {
|
|
11
12
|
en: {
|
|
12
13
|
modalNextLabel: 'Next image',
|
|
@@ -23,8 +24,9 @@ const Gallery = (props) => {
|
|
|
23
24
|
const { items, ssr, startSeen } = props;
|
|
24
25
|
const texts = (0, i18n_1.getTexts)(props, defaultTexts);
|
|
25
26
|
const [modalImage, setModalImage] = (0, react_1.useState)(undefined);
|
|
26
|
-
return (react_1.default.createElement(_GalleryModalContext_1.
|
|
27
|
-
react_1.default.createElement(_AbstractCarousel_1.
|
|
28
|
-
react_1.default.createElement(_GalleryModal_1.
|
|
27
|
+
return (react_1.default.createElement(_GalleryModalContext_1.GalleryModalContext.Provider, { value: { items, setCurrentImage: setModalImage, currentImage: modalImage } },
|
|
28
|
+
react_1.default.createElement(_AbstractCarousel_1.AbstractCarousel, { bem: "Gallery", items: items, Component: _GalleryItem_1.GalleryItem, ssr: ssr, startSeen: startSeen }),
|
|
29
|
+
react_1.default.createElement(_GalleryModal_1.GalleryModal, Object.assign({}, modalImage, { texts: texts }))));
|
|
29
30
|
};
|
|
30
|
-
exports.
|
|
31
|
+
exports.Gallery = Gallery;
|
|
32
|
+
exports.default = exports.Gallery;
|
package/GridBlocks.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ export declare type GridBlocksProp1s = {
|
|
|
22
22
|
blocks: Array<GridBlockItem>;
|
|
23
23
|
twocol?: boolean;
|
|
24
24
|
};
|
|
25
|
-
declare const GridBlocks: (props: GridBlocksProps) => JSX.Element;
|
|
25
|
+
export declare const GridBlocks: (props: GridBlocksProps) => JSX.Element;
|
|
26
26
|
export default GridBlocks;
|
package/GridBlocks.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridBlocks = 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 assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
7
|
-
const _Image_1 =
|
|
8
|
+
const _Image_1 = require("./_abstract/_Image");
|
|
8
9
|
const _Link_1 = require("./_abstract/_Link");
|
|
9
10
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
10
11
|
const ButtonTertiary_1 = tslib_1.__importDefault(require("./ButtonTertiary"));
|
|
@@ -14,7 +15,7 @@ const GridBlocks = (props) => {
|
|
|
14
15
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('GridBlocks', [twocol && 'twocol']), ref: ref }, blocks.map(({ title, summary, href, links = [], icon, image }, i) => {
|
|
15
16
|
const imageProps = icon ? { src: (0, assets_1.getEfnistaknUrl)(icon) } : image;
|
|
16
17
|
return (react_1.default.createElement("div", { key: i, className: "GridBlocks__item" },
|
|
17
|
-
imageProps && react_1.default.createElement(_Image_1.
|
|
18
|
+
imageProps && react_1.default.createElement(_Image_1.Image, Object.assign({ className: "GridBlocks__illustration" }, imageProps)),
|
|
18
19
|
react_1.default.createElement("div", { className: "GridBlocks__textwrap" },
|
|
19
20
|
react_1.default.createElement("h3", { className: "GridBlocks__item__title" }, href != null ? (react_1.default.createElement(_Link_1.Link, { className: "GridBlocks__item__titlelink", href: href }, title)) : (title)),
|
|
20
21
|
react_1.default.createElement("div", { className: "GridBlocks__item__summary" }, summary),
|
|
@@ -24,4 +25,5 @@ const GridBlocks = (props) => {
|
|
|
24
25
|
})))));
|
|
25
26
|
})));
|
|
26
27
|
};
|
|
27
|
-
exports.
|
|
28
|
+
exports.GridBlocks = GridBlocks;
|
|
29
|
+
exports.default = exports.GridBlocks;
|
package/Heading.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ export declare type HeadingProps = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Make an exception and render a `<h1/>` element.
|
|
16
16
|
*
|
|
17
|
-
* This prop is ignore if the `Tag` prop is defined.
|
|
17
|
+
* This prop is ignore if the `Tag` prop is defined.
|
|
18
|
+
*/
|
|
18
19
|
forceH1?: boolean;
|
|
19
20
|
} & ComponentLayoutProps;
|
|
20
|
-
declare const Heading: (props: HeadingProps) => JSX.Element;
|
|
21
|
+
export declare const Heading: (props: HeadingProps) => JSX.Element;
|
|
21
22
|
export default Heading;
|
package/Heading.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Heading = 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"));
|
|
@@ -12,10 +13,12 @@ const sizes = {
|
|
|
12
13
|
const Heading = (props) => {
|
|
13
14
|
const { size = 'normal', align, wide, children } = props;
|
|
14
15
|
const Tag = props.Tag || (props.forceH1 ? 'h1' : 'h2');
|
|
15
|
-
|
|
16
|
+
const suppressWarning = process.env.NODE_ENV !== 'production' && Tag === 'h1' ? true : undefined;
|
|
17
|
+
return (react_1.default.createElement(Tag, { "data-dev-forcedH1": suppressWarning, className: (0, getBemClass_1.default)('Heading', [
|
|
16
18
|
sizes[size],
|
|
17
19
|
align === 'right' && 'align--' + align,
|
|
18
20
|
!align && wide && 'wide',
|
|
19
21
|
]) }, children));
|
|
20
22
|
};
|
|
21
|
-
exports.
|
|
23
|
+
exports.Heading = Heading;
|
|
24
|
+
exports.default = exports.Heading;
|
package/HeroBlock.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export declare type HeroBlockProps = {
|
|
|
15
15
|
primaryButton?: ButtonProps;
|
|
16
16
|
secondaryButton?: ButtonProps;
|
|
17
17
|
} & HeroBlockImageProps & SeenProp;
|
|
18
|
-
declare const HeroBlock: (props: HeroBlockProps) => JSX.Element;
|
|
18
|
+
export declare const HeroBlock: (props: HeroBlockProps) => JSX.Element;
|
|
19
19
|
export default HeroBlock;
|
package/HeroBlock.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeroBlock = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
6
|
-
const _Image_1 =
|
|
7
|
+
const _Image_1 = require("./_abstract/_Image");
|
|
7
8
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
8
9
|
const ButtonPrimary_1 = tslib_1.__importDefault(require("./ButtonPrimary"));
|
|
9
10
|
const ButtonTertiary_1 = tslib_1.__importDefault(require("./ButtonTertiary"));
|
|
@@ -14,11 +15,12 @@ const HeroBlock = (props) => {
|
|
|
14
15
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
15
16
|
return (react_1.default.createElement("div", { className: "HeroBlock", ref: ref },
|
|
16
17
|
react_1.default.createElement("h1", { className: "HeroBlock__title" }, title),
|
|
17
|
-
react_1.default.createElement(_Image_1.
|
|
18
|
+
react_1.default.createElement(_Image_1.Image, Object.assign({ className: "HeroBlock__image" }, imgProps)),
|
|
18
19
|
react_1.default.createElement("div", { className: "HeroBlock__summary" }, summary),
|
|
19
20
|
hasButtons && (react_1.default.createElement("div", { className: "HeroBlock__buttons" },
|
|
20
21
|
primaryButton && react_1.default.createElement(ButtonPrimary_1.default, Object.assign({}, primaryButton)),
|
|
21
22
|
' ',
|
|
22
23
|
secondaryButton && react_1.default.createElement(ButtonTertiary_1.default, Object.assign({}, secondaryButton))))));
|
|
23
24
|
};
|
|
24
|
-
exports.
|
|
25
|
+
exports.HeroBlock = HeroBlock;
|
|
26
|
+
exports.default = exports.HeroBlock;
|
package/IframeBlock.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { EitherObj } from '@reykjavik/hanna-utils';
|
|
|
2
2
|
import { ResizerOptions } from 'iframe-resizer-react';
|
|
3
3
|
export declare type IframeBlockProps = {
|
|
4
4
|
src: string;
|
|
5
|
+
/** Accessible title attribute for the iframe (similar to alt="" on images) */
|
|
6
|
+
title: string;
|
|
5
7
|
framed?: boolean;
|
|
6
8
|
compact?: boolean;
|
|
7
9
|
align?: 'right';
|
|
@@ -22,5 +24,5 @@ export declare type IframeBlockProps = {
|
|
|
22
24
|
* <script src="https://styles.reykjavik.is/assets/scripts/iframeResizer.contentWindow@4.js"></script>
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
|
-
declare const IframeBlock: (props: IframeBlockProps) => JSX.Element;
|
|
27
|
+
export declare const IframeBlock: (props: IframeBlockProps) => JSX.Element;
|
|
26
28
|
export default IframeBlock;
|
package/IframeBlock.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IframeBlock = 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"));
|
|
@@ -13,17 +14,18 @@ const iframe_resizer_react_1 = tslib_1.__importDefault(require("iframe-resizer-r
|
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
16
|
const IframeBlock = (props) => {
|
|
16
|
-
const { src, framed, compact, scrolling, height = 'auto', align, checkOrigin = false, } = props;
|
|
17
|
+
const { title, src, framed, compact, scrolling, height = 'auto', align, checkOrigin = false, } = props;
|
|
17
18
|
const className = (0, getBemClass_1.default)('IframeBlock', [
|
|
18
19
|
framed && 'framed',
|
|
19
20
|
compact && 'compact',
|
|
20
21
|
align === 'right' && 'align--' + align,
|
|
21
22
|
]);
|
|
22
|
-
return height === 'auto' ? (react_1.default.createElement(iframe_resizer_react_1.default, { className: className, src: src, checkOrigin: checkOrigin })) : (react_1.default.createElement("iframe", { className: className, src: src,
|
|
23
|
+
return height === 'auto' ? (react_1.default.createElement(iframe_resizer_react_1.default, { className: className, title: title, src: src, checkOrigin: checkOrigin })) : (react_1.default.createElement("iframe", { className: className, title: title, src: src,
|
|
23
24
|
// hidden tiger: pass negative height to disable iframe-resizer but not set height explicitly
|
|
24
25
|
// (Silly hack, don't rely on this)
|
|
25
26
|
height: height < 0 ? undefined : height,
|
|
26
27
|
// allow undefined to suppress scrolling attribute
|
|
27
28
|
scrolling: scrolling === true ? 'yes' : scrolling === false ? 'no' : scrolling }));
|
|
28
29
|
};
|
|
29
|
-
exports.
|
|
30
|
+
exports.IframeBlock = IframeBlock;
|
|
31
|
+
exports.default = exports.IframeBlock;
|
package/Illustration.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
1
2
|
import { Illustration as IllustrationName } from '@reykjavik/hanna-utils/assets';
|
|
2
3
|
import { ImageProps } from './_abstract/_Image';
|
|
3
|
-
declare type IllustrationProps = {
|
|
4
|
-
children?: undefined;
|
|
5
|
-
} & ({
|
|
4
|
+
declare type IllustrationProps = EitherObj<{
|
|
6
5
|
type: IllustrationName;
|
|
7
|
-
|
|
8
|
-
} | {
|
|
6
|
+
}, {
|
|
9
7
|
image: ImageProps;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const Illustration: (props: IllustrationProps) => JSX.Element;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Illustration: (props: IllustrationProps) => JSX.Element;
|
|
13
10
|
export default Illustration;
|
package/Illustration.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Illustration = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
6
|
-
const _Image_1 =
|
|
7
|
+
const _Image_1 = require("./_abstract/_Image");
|
|
7
8
|
const Illustration = (props) => {
|
|
8
9
|
const imgProps = props.type ? { src: (0, assets_1.getIllustrationUrl)(props.type) } : props.image;
|
|
9
|
-
return react_1.default.createElement(_Image_1.
|
|
10
|
+
return react_1.default.createElement(_Image_1.Image, Object.assign({ className: "Illustration" }, imgProps));
|
|
10
11
|
};
|
|
11
|
-
exports.
|
|
12
|
+
exports.Illustration = Illustration;
|
|
13
|
+
exports.default = exports.Illustration;
|
package/ImageCards.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CardListSummaryProps, ImageCardListProps, ImageCardProps as _ImageCardProps } from './_abstract/_CardList';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
|
-
/** @deprecated Use `ImageCard` instead. (Will be removed in v0.11) */
|
|
4
|
-
export declare type ImageCardProps = _ImageCardProps;
|
|
5
3
|
export declare type ImageCardsItemProps = _ImageCardProps;
|
|
4
|
+
/** @deprecated Use `ImageCardsItemProps` instead. (Will be removed in v0.11) */
|
|
5
|
+
export declare type ImageCardProps = ImageCardsItemProps;
|
|
6
6
|
export declare type ImageCardsProps = ImageCardListProps & CardListSummaryProps & {
|
|
7
7
|
background?: boolean;
|
|
8
8
|
} & SeenProp;
|
|
9
|
-
declare const ImageCards: (props: ImageCardsProps) => JSX.Element;
|
|
9
|
+
export declare const ImageCards: (props: ImageCardsProps) => JSX.Element;
|
|
10
10
|
export default ImageCards;
|
package/ImageCards.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageCards = 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"));
|
|
@@ -11,4 +12,5 @@ const ImageCards = (props) => {
|
|
|
11
12
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('ImageCards', background && 'background'), ref: ref },
|
|
12
13
|
react_1.default.createElement(_CardList_1.CardList, Object.assign({}, cardListProps, { bemPrefix: "ImageCards", imgPlaceholder: props.imgPlaceholder || true }))));
|
|
13
14
|
};
|
|
14
|
-
exports.
|
|
15
|
+
exports.ImageCards = ImageCards;
|
|
16
|
+
exports.default = exports.ImageCards;
|
package/InfoBlock.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
1
2
|
import { SeenProp } from './utils/seenEffect';
|
|
2
3
|
export declare type InfoBlockProps = {
|
|
3
4
|
title: string;
|
|
4
|
-
subtitle
|
|
5
|
+
subtitle?: string | JSX.Element;
|
|
5
6
|
items: Array<string | JSX.Element>;
|
|
6
|
-
} &
|
|
7
|
-
attention?:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} | {
|
|
13
|
-
extraInfo: string | JSX.Element;
|
|
14
|
-
attention?: undefined;
|
|
15
|
-
}) & SeenProp;
|
|
16
|
-
declare const InfoBlock: (props: InfoBlockProps) => JSX.Element;
|
|
7
|
+
} & EitherObj<{
|
|
8
|
+
attention?: string | JSX.Element;
|
|
9
|
+
}, {
|
|
10
|
+
extraInfo?: string | JSX.Element;
|
|
11
|
+
}> & SeenProp;
|
|
12
|
+
export declare const InfoBlock: (props: InfoBlockProps) => JSX.Element;
|
|
17
13
|
export default InfoBlock;
|
package/InfoBlock.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoBlock = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
@@ -8,9 +9,10 @@ const InfoBlock = (props) => {
|
|
|
8
9
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
9
10
|
return (react_1.default.createElement("div", { className: "InfoBlock", ref: ref },
|
|
10
11
|
react_1.default.createElement("h2", { className: "InfoBlock__title" }, title),
|
|
11
|
-
react_1.default.createElement("div", { className: "InfoBlock__subtitle" }, subtitle),
|
|
12
|
+
subtitle && react_1.default.createElement("div", { className: "InfoBlock__subtitle" }, subtitle),
|
|
12
13
|
react_1.default.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "InfoBlock__item" }, item)))),
|
|
13
14
|
'extraInfo' in props && (react_1.default.createElement("div", { className: "InfoBlock__extrainfo" }, props.extraInfo)),
|
|
14
15
|
'attention' in props && (react_1.default.createElement("div", { className: "InfoBlock__attention" }, props.attention))));
|
|
15
16
|
};
|
|
16
|
-
exports.
|
|
17
|
+
exports.InfoBlock = InfoBlock;
|
|
18
|
+
exports.default = exports.InfoBlock;
|
package/InfoHero.d.ts
CHANGED
package/InfoHero.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoHero = 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
|
-
const _Blings_1 =
|
|
7
|
-
const _Image_1 =
|
|
8
|
-
const breakOnNL_1 =
|
|
7
|
+
const _Blings_1 = require("./_abstract/_Blings");
|
|
8
|
+
const _Image_1 = require("./_abstract/_Image");
|
|
9
|
+
const breakOnNL_1 = require("./_abstract/breakOnNL");
|
|
9
10
|
const ButtonTertiary_1 = tslib_1.__importDefault(require("./ButtonTertiary"));
|
|
10
11
|
const constants_1 = require("./constants");
|
|
11
12
|
const blingOptions = {
|
|
@@ -76,10 +77,11 @@ const InfoHero = (props) => {
|
|
|
76
77
|
react_1.default.createElement("div", { className: "InfoHero__content" },
|
|
77
78
|
react_1.default.createElement("h1", { className: "InfoHero__title" }, title),
|
|
78
79
|
titleBlurb && react_1.default.createElement("div", { className: "InfoHero__titleblurb" }, titleBlurb),
|
|
79
|
-
subTitle && react_1.default.createElement("div", { className: "InfoHero__subtitle" }, (0, breakOnNL_1.
|
|
80
|
+
subTitle && react_1.default.createElement("div", { className: "InfoHero__subtitle" }, (0, breakOnNL_1.breakOnNL)(subTitle)),
|
|
80
81
|
blurb && react_1.default.createElement("div", { className: "InfoHero__blurb" }, blurb),
|
|
81
82
|
showButtons && (react_1.default.createElement("div", { className: "InfoHero__buttons" }, buttons.map((buttonProps, i) => (react_1.default.createElement(ButtonTertiary_1.default, Object.assign({ key: i }, buttonProps))))))),
|
|
82
|
-
react_1.default.createElement(_Image_1.
|
|
83
|
-
react_1.default.createElement(_Blings_1.
|
|
83
|
+
react_1.default.createElement(_Image_1.Image, Object.assign({ className: "InfoHero__image", altText: title }, image, { placeholder: true })),
|
|
84
|
+
react_1.default.createElement(_Blings_1.Blings, { blings: blings, mirror: alignment === 'right' })));
|
|
84
85
|
};
|
|
85
|
-
exports.
|
|
86
|
+
exports.InfoHero = InfoHero;
|
|
87
|
+
exports.default = exports.InfoHero;
|
package/IslandBlock.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ declare type IslandContentBlocks = {
|
|
|
21
21
|
image?: undefined;
|
|
22
22
|
};
|
|
23
23
|
export declare type IslandBlockProps = IslandBaseBlockProps & (IslandContentBlocks | IslandImageBlock) & SeenProp;
|
|
24
|
-
declare const IslandBlock: (props: IslandBlockProps) => JSX.Element;
|
|
24
|
+
export declare const IslandBlock: (props: IslandBlockProps) => JSX.Element;
|
|
25
25
|
export default IslandBlock;
|
package/IslandBlock.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IslandBlock = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
6
|
-
const _Block_1 =
|
|
7
|
+
const _Block_1 = require("./_abstract/_Block");
|
|
7
8
|
const constants_1 = require("./constants");
|
|
8
9
|
const IslandBlock = (props) => {
|
|
9
10
|
const { align, content, shapes, image, startSeen } = props;
|
|
@@ -14,6 +15,7 @@ const IslandBlock = (props) => {
|
|
|
14
15
|
content,
|
|
15
16
|
image: shapes ? { src: (0, assets_1.getFormheimurUrl)(shapes), inline: true } : image || {},
|
|
16
17
|
};
|
|
17
|
-
return (react_1.default.createElement(_Block_1.
|
|
18
|
+
return (react_1.default.createElement(_Block_1.Block, Object.assign({ bem: "IslandBlock", modifier: 'align--' + alignment }, blockProps, { startSeen: startSeen })));
|
|
18
19
|
};
|
|
19
|
-
exports.
|
|
20
|
+
exports.IslandBlock = IslandBlock;
|
|
21
|
+
exports.default = exports.IslandBlock;
|
package/IslandPageBlock.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export declare type IslandPageBlockProps = BlockItem & IslandPageImageProps & {
|
|
|
20
20
|
align?: Alignment;
|
|
21
21
|
background?: Background;
|
|
22
22
|
} & SeenProp;
|
|
23
|
-
declare const IslandPageBlock: (props: IslandPageBlockProps) => JSX.Element;
|
|
23
|
+
export declare const IslandPageBlock: (props: IslandPageBlockProps) => JSX.Element;
|
|
24
24
|
export default IslandPageBlock;
|
package/IslandPageBlock.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IslandPageBlock = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
6
|
-
const _Block_1 =
|
|
7
|
+
const _Block_1 = require("./_abstract/_Block");
|
|
7
8
|
const constants_1 = require("./constants");
|
|
8
9
|
const backgrounds = {
|
|
9
10
|
none: undefined,
|
|
@@ -14,6 +15,7 @@ const IslandPageBlock = (props) => {
|
|
|
14
15
|
const { title, summary, buttons, illustration, image, align, background, startSeen } = props;
|
|
15
16
|
const alignment = align && constants_1.aligns[align] ? align : 'right';
|
|
16
17
|
const bg = backgrounds[background || 'none'];
|
|
17
|
-
return (react_1.default.createElement(_Block_1.
|
|
18
|
+
return (react_1.default.createElement(_Block_1.Block, { bem: "IslandPageBlock", modifier: ['align--' + alignment, bg && 'background--' + bg], content: { title, summary, buttons }, image: illustration ? { src: (0, assets_1.getIllustrationUrl)(illustration) } : image || {}, startSeen: startSeen }));
|
|
18
19
|
};
|
|
19
|
-
exports.
|
|
20
|
+
exports.IslandPageBlock = IslandPageBlock;
|
|
21
|
+
exports.default = exports.IslandPageBlock;
|
package/LabeledTextBlock.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export declare type LabeledTextBlockProps = {
|
|
|
7
7
|
wide?: boolean;
|
|
8
8
|
buttons?: Array<ButtonProps>;
|
|
9
9
|
} & SeenProp;
|
|
10
|
-
declare const LabeledTextBlock: (props: LabeledTextBlockProps) => JSX.Element;
|
|
10
|
+
export declare const LabeledTextBlock: (props: LabeledTextBlockProps) => JSX.Element;
|
|
11
11
|
export default LabeledTextBlock;
|
package/LabeledTextBlock.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LabeledTextBlock = 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"));
|
|
@@ -14,4 +15,5 @@ const LabeledTextBlock = (props) => {
|
|
|
14
15
|
summary,
|
|
15
16
|
buttons.map((button, i) => (react_1.default.createElement(ButtonTertiary_1.default, Object.assign({ key: i }, button)))))));
|
|
16
17
|
};
|
|
17
|
-
exports.
|
|
18
|
+
exports.LabeledTextBlock = LabeledTextBlock;
|
|
19
|
+
exports.default = exports.LabeledTextBlock;
|
package/Layout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
3
3
|
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
4
|
-
import { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
4
|
+
import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
5
5
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
6
6
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
7
7
|
export declare type LayoutI18n = {
|
|
@@ -28,5 +28,5 @@ declare type LayoutProps = {
|
|
|
28
28
|
}, {
|
|
29
29
|
children: ReactNode;
|
|
30
30
|
}>;
|
|
31
|
-
declare const Layout: (props: LayoutProps) => JSX.Element;
|
|
31
|
+
export declare const Layout: (props: LayoutProps) => JSX.Element;
|
|
32
32
|
export default Layout;
|
package/Layout.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultLayoutTexts = void 0;
|
|
3
|
+
exports.Layout = exports.defaultLayoutTexts = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(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 assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
9
9
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
10
|
-
const _Image_1 =
|
|
10
|
+
const _Image_1 = require("./_abstract/_Image");
|
|
11
11
|
const _Link_1 = require("./_abstract/_Link");
|
|
12
12
|
const useMenuToggling_1 = require("./utils/useMenuToggling");
|
|
13
13
|
const useScrollbarWidthCSSVar_1 = require("./utils/useScrollbarWidthCSSVar");
|
|
@@ -37,7 +37,7 @@ const Layout = (props) => {
|
|
|
37
37
|
react_1.default.createElement("div", { className: "Layout__header", role: "banner" },
|
|
38
38
|
react_1.default.createElement(_Link_1.Link, { className: "Layout__header__logo", href: logoLink },
|
|
39
39
|
' ',
|
|
40
|
-
react_1.default.createElement(_Image_1.
|
|
40
|
+
react_1.default.createElement(_Image_1.Image, { className: undefined, inline: true, src: (0, assets_1.getAssetUrl)('reykjavik-logo.svg') }),
|
|
41
41
|
' ',
|
|
42
42
|
siteName,
|
|
43
43
|
' '),
|
|
@@ -53,4 +53,5 @@ const Layout = (props) => {
|
|
|
53
53
|
isMenuActive && (react_1.default.createElement("button", { className: "Layout__nav__closebutton", onClick: closeMenu, "aria-label": txt.closeMenuLabelLong, type: "button" }, txt.closeMenuLabel)))),
|
|
54
54
|
react_1.default.createElement("div", { className: "Layout__footer", role: "complementary" }, footerChildren))));
|
|
55
55
|
};
|
|
56
|
-
exports.
|
|
56
|
+
exports.Layout = Layout;
|
|
57
|
+
exports.default = exports.Layout;
|
package/MainMenu.d.ts
CHANGED