@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.
- package/{AccordionList.jsx → AccordionList.js} +5 -14
- package/ActionCards.d.ts +1 -1
- package/{ActionCards.jsx → ActionCards.js} +3 -4
- package/{Alert.jsx → Alert.js} +7 -9
- package/ArticleCards.d.ts +6 -0
- package/ArticleCards.js +9 -0
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.js +31 -0
- package/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/ArticleMeta.d.ts +1 -0
- package/{ArticleMeta.jsx → ArticleMeta.js} +15 -10
- package/{Attention.jsx → Attention.js} +1 -1
- package/{BasicTable.jsx → BasicTable.js} +11 -12
- package/BgBox.d.ts +8 -0
- package/BgBox.js +14 -0
- package/{Bling.jsx → Bling.js} +2 -2
- package/{BlockBreak.jsx → BlockBreak.js} +1 -1
- package/{BlockQuote.jsx → BlockQuote.js} +1 -1
- package/BreadCrumbs.js +33 -0
- package/ButtonBack.d.ts +1 -1
- package/{ButtonBack.jsx → ButtonBack.js} +2 -2
- package/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/ButtonPrimary.d.ts +1 -1
- package/{ButtonPrimary.jsx → ButtonPrimary.js} +2 -2
- package/ButtonSecondary.d.ts +1 -1
- package/{ButtonSecondary.jsx → ButtonSecondary.js} +2 -2
- package/ButtonTertiary.d.ts +1 -1
- package/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
- package/CHANGELOG.md +12 -1
- package/{Carousel.jsx → Carousel.js} +1 -1
- package/{CarouselStepper.jsx → CarouselStepper.js} +1 -1
- package/{CenterColumn.jsx → CenterColumn.js} +1 -3
- package/Checkbox.d.ts +1 -1
- package/{Checkbox.jsx → Checkbox.js} +2 -2
- package/CheckboxButtonsGroup.d.ts +1 -1
- package/{CheckboxButtonsGroup.jsx → CheckboxButtonsGroup.js} +4 -4
- package/CheckboxGroup.d.ts +1 -1
- package/{CheckboxGroup.jsx → CheckboxGroup.js} +2 -2
- package/CityBlock.d.ts +1 -1
- package/{CityBlock.jsx → CityBlock.js} +1 -1
- package/{ContactBubble.jsx → ContactBubble.js} +13 -27
- package/{ContentArticle.jsx → ContentArticle.js} +9 -12
- package/ContentImage.d.ts +1 -1
- package/ContentImage.js +23 -0
- package/{Datepicker.jsx → Datepicker.js} +17 -18
- package/ExtraLinks.d.ts +1 -1
- package/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
- package/FeatureList.js +21 -0
- package/{FieldGroup.jsx → FieldGroup.js} +3 -4
- package/{FileInput.jsx → FileInput.js} +22 -25
- package/{Foonote.jsx → Foonote.js} +0 -0
- package/FooterBadges.js +17 -0
- package/FooterInfo.js +14 -0
- package/{Footnote.jsx → Footnote.js} +1 -1
- package/{Form.jsx → Form.js} +2 -4
- package/{FormField.jsx → FormField.js} +20 -22
- package/Gallery/_GalleryItem.d.ts +1 -1
- package/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
- package/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
- package/{Gallery.jsx → Gallery.js} +3 -4
- package/GridBlocks.d.ts +2 -2
- package/GridBlocks.js +29 -0
- package/Heading.d.ts +1 -1
- package/{Heading.jsx → Heading.js} +3 -5
- package/HeroBlock.d.ts +2 -2
- package/{HeroBlock.jsx → HeroBlock.js} +9 -10
- package/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/Illustration.d.ts +1 -1
- package/{Illustration.jsx → Illustration.js} +2 -2
- package/ImageCards.d.ts +1 -1
- package/{ImageCards.jsx → ImageCards.js} +3 -4
- package/InfoBlock.js +18 -0
- package/InfoHero.d.ts +2 -2
- package/{InfoHero.jsx → InfoHero.js} +10 -16
- package/IslandBlock.d.ts +1 -1
- package/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/IslandPageBlock.d.ts +1 -1
- package/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
- package/LabeledTextBlock.d.ts +1 -1
- package/{LabeledTextBlock.jsx → LabeledTextBlock.js} +5 -7
- package/Layout.js +58 -0
- package/MainMenu/_Auxiliary.js +20 -0
- package/MainMenu/_PrimaryPanel.js +29 -0
- package/{MainMenu.jsx → MainMenu.js} +28 -41
- package/MiniMetrics.d.ts +1 -1
- package/{MiniMetrics.jsx → MiniMetrics.js} +6 -5
- package/Modal.js +19 -0
- package/{NameCard.jsx → NameCard.js} +19 -24
- package/{NameCards.jsx → NameCards.js} +1 -3
- package/NewsHero.d.ts +1 -1
- package/{NewsHero.jsx → NewsHero.js} +8 -10
- package/{PageFilter.jsx → PageFilter.js} +6 -7
- package/{PageHeading.jsx → PageHeading.js} +2 -4
- package/Picture.d.ts +7 -0
- package/Picture.js +13 -0
- package/ProcessOverview.js +22 -0
- package/{PullQuote.jsx → PullQuote.js} +1 -1
- package/RadioButtonsGroup.d.ts +1 -1
- package/{RadioButtonsGroup.jsx → RadioButtonsGroup.js} +4 -4
- package/RadioGroup.d.ts +2 -2
- package/RadioGroup.js +12 -0
- package/RelatedLinks.js +31 -0
- package/{RowBlock.jsx → RowBlock.js} +1 -3
- package/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
- package/{SearchInput.jsx → SearchInput.js} +4 -6
- package/SearchResults/_SearchResultsItem.js +20 -0
- package/{SearchResults.jsx → SearchResults.js} +27 -36
- package/{SeenEffect.jsx → SeenEffect.js} +1 -1
- package/{Selectbox.jsx → Selectbox.js} +1 -1
- package/{ShareButtons.jsx → ShareButtons.js} +7 -13
- package/{Sharpie.jsx → Sharpie.js} +1 -1
- package/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
- package/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
- package/SiteSearchInput.d.ts +1 -1
- package/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
- package/{Skeleton.jsx → Skeleton.js} +5 -5
- package/{SubHeading.jsx → SubHeading.js} +2 -4
- package/{Tabs.jsx → Tabs.js} +12 -12
- package/TagPill.d.ts +1 -1
- package/{TagPill.jsx → TagPill.js} +12 -17
- package/{TextBlock.jsx → TextBlock.js} +2 -4
- package/TextButton.d.ts +1 -1
- package/{TextButton.jsx → TextButton.js} +2 -2
- package/{TextInput.jsx → TextInput.js} +1 -1
- package/{VSpacer.jsx → VSpacer.js} +1 -1
- package/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
- package/WizardLayout.js +35 -0
- package/WizardLayoutClose.d.ts +1 -1
- package/{WizardLayoutClose.jsx → WizardLayoutClose.js} +2 -2
- package/WizardStepper.js +30 -0
- package/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/_abstract/{_Blings.jsx → _Blings.js} +1 -3
- package/_abstract/_Block.d.ts +2 -2
- package/_abstract/_Block.js +29 -0
- package/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
- package/_abstract/{Button.jsx → _Button.js} +3 -7
- package/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
- package/_abstract/_CardList.js +45 -0
- package/{esm/_abstract/Image.d.ts → _abstract/_Image.d.ts} +9 -5
- package/_abstract/{Image.jsx → _Image.js} +11 -13
- package/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
- package/_abstract/{Link.jsx → _Link.js} +0 -0
- package/_abstract/_Quote.js +15 -0
- package/{esm/_abstract/TogglerGroup.d.ts → _abstract/_TogglerGroup.d.ts} +1 -1
- package/_abstract/_TogglerGroup.js +34 -0
- package/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
- package/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
- package/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
- package/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
- package/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/esm/AccordionList.js +24 -0
- package/esm/ActionCards.d.ts +1 -1
- package/esm/ActionCards.js +9 -0
- package/esm/{Alert.jsx → Alert.js} +7 -9
- package/esm/ArticleCards.d.ts +6 -0
- package/esm/ArticleCards.js +4 -0
- package/esm/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +24 -0
- package/esm/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/esm/ArticleMeta.d.ts +1 -0
- package/esm/ArticleMeta.js +19 -0
- package/esm/Attention.js +4 -0
- package/esm/{BasicTable.jsx → BasicTable.js} +11 -12
- package/esm/BgBox.d.ts +8 -0
- package/esm/BgBox.js +9 -0
- package/esm/{Bling.jsx → Bling.js} +2 -2
- package/esm/BlockBreak.js +6 -0
- package/esm/BlockQuote.js +4 -0
- package/esm/BreadCrumbs.js +28 -0
- package/esm/ButtonBack.d.ts +1 -1
- package/esm/ButtonBack.js +4 -0
- package/esm/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/esm/ButtonPrimary.d.ts +1 -1
- package/esm/ButtonPrimary.js +4 -0
- package/esm/ButtonSecondary.d.ts +1 -1
- package/esm/ButtonSecondary.js +4 -0
- package/esm/ButtonTertiary.d.ts +1 -1
- package/esm/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
- package/esm/Carousel.js +4 -0
- package/esm/CarouselStepper.js +4 -0
- package/esm/CenterColumn.js +7 -0
- package/esm/Checkbox.d.ts +1 -1
- package/esm/Checkbox.js +4 -0
- package/esm/CheckboxButtonsGroup.d.ts +1 -1
- package/esm/CheckboxButtonsGroup.js +14 -0
- package/esm/CheckboxGroup.d.ts +1 -1
- package/esm/CheckboxGroup.js +7 -0
- package/esm/CityBlock.d.ts +1 -1
- package/esm/{CityBlock.jsx → CityBlock.js} +1 -1
- package/esm/{ContactBubble.jsx → ContactBubble.js} +13 -27
- package/esm/ContentArticle.js +21 -0
- package/esm/ContentImage.d.ts +1 -1
- package/esm/ContentImage.js +18 -0
- package/esm/{Datepicker.jsx → Datepicker.js} +17 -18
- package/esm/ExtraLinks.d.ts +1 -1
- package/esm/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
- package/esm/FeatureList.js +16 -0
- package/esm/FieldGroup.js +9 -0
- package/esm/{FileInput.jsx → FileInput.js} +22 -25
- package/esm/{Foonote.jsx → Foonote.js} +0 -0
- package/esm/FooterBadges.js +12 -0
- package/esm/FooterInfo.js +9 -0
- package/esm/Footnote.js +3 -0
- package/esm/{Form.jsx → Form.js} +2 -4
- package/esm/{FormField.jsx → FormField.js} +20 -22
- package/esm/Gallery/_GalleryItem.d.ts +1 -1
- package/esm/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
- package/esm/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/esm/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
- package/esm/{Gallery.jsx → Gallery.js} +3 -4
- package/esm/GridBlocks.d.ts +2 -2
- package/esm/GridBlocks.js +24 -0
- package/esm/Heading.d.ts +1 -1
- package/esm/{Heading.jsx → Heading.js} +3 -5
- package/esm/HeroBlock.d.ts +2 -2
- package/esm/HeroBlock.js +21 -0
- package/esm/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/esm/Illustration.d.ts +1 -1
- package/esm/{Illustration.jsx → Illustration.js} +2 -2
- package/esm/ImageCards.d.ts +1 -1
- package/esm/{ImageCards.jsx → ImageCards.js} +3 -4
- package/esm/InfoBlock.js +13 -0
- package/esm/InfoHero.d.ts +2 -2
- package/esm/{InfoHero.jsx → InfoHero.js} +10 -16
- package/esm/IslandBlock.d.ts +1 -1
- package/esm/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/esm/IslandPageBlock.d.ts +1 -1
- package/esm/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
- package/esm/LabeledTextBlock.d.ts +1 -1
- package/esm/LabeledTextBlock.js +14 -0
- package/esm/Layout.js +52 -0
- package/esm/MainMenu/_Auxiliary.js +13 -0
- package/esm/MainMenu/_PrimaryPanel.js +22 -0
- package/esm/{MainMenu.jsx → MainMenu.js} +28 -41
- package/esm/MiniMetrics.d.ts +1 -1
- package/esm/MiniMetrics.js +12 -0
- package/esm/Modal.js +14 -0
- package/esm/{NameCard.jsx → NameCard.js} +19 -24
- package/esm/NameCards.js +7 -0
- package/esm/NewsHero.d.ts +1 -1
- package/esm/{NewsHero.jsx → NewsHero.js} +8 -10
- package/esm/PageFilter.js +15 -0
- package/esm/{PageHeading.jsx → PageHeading.js} +2 -4
- package/esm/Picture.d.ts +7 -0
- package/esm/Picture.js +8 -0
- package/esm/ProcessOverview.js +17 -0
- package/esm/PullQuote.js +4 -0
- package/esm/RadioButtonsGroup.d.ts +1 -1
- package/esm/RadioButtonsGroup.js +14 -0
- package/esm/RadioGroup.d.ts +2 -2
- package/esm/RadioGroup.js +7 -0
- package/esm/RelatedLinks.js +26 -0
- package/esm/{RowBlock.jsx → RowBlock.js} +1 -3
- package/esm/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
- package/esm/{SearchInput.jsx → SearchInput.js} +4 -6
- package/esm/SearchResults/_SearchResultsItem.js +15 -0
- package/esm/{SearchResults.jsx → SearchResults.js} +27 -36
- package/esm/{SeenEffect.jsx → SeenEffect.js} +1 -1
- package/esm/{Selectbox.jsx → Selectbox.js} +1 -1
- package/esm/{ShareButtons.jsx → ShareButtons.js} +7 -13
- package/esm/{Sharpie.jsx → Sharpie.js} +1 -1
- package/esm/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
- package/esm/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
- package/esm/SiteSearchInput.d.ts +1 -1
- package/esm/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
- package/esm/{Skeleton.jsx → Skeleton.js} +5 -5
- package/esm/{SubHeading.jsx → SubHeading.js} +2 -4
- package/esm/{Tabs.jsx → Tabs.js} +12 -12
- package/esm/TagPill.d.ts +1 -1
- package/esm/{TagPill.jsx → TagPill.js} +12 -17
- package/esm/{TextBlock.jsx → TextBlock.js} +2 -4
- package/esm/TextButton.d.ts +1 -1
- package/esm/{TextButton.jsx → TextButton.js} +2 -2
- package/esm/{TextInput.jsx → TextInput.js} +1 -1
- package/esm/{VSpacer.jsx → VSpacer.js} +1 -1
- package/esm/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
- package/esm/WizardLayout.js +30 -0
- package/esm/WizardLayoutClose.d.ts +1 -1
- package/esm/WizardLayoutClose.js +4 -0
- package/esm/WizardStepper.js +25 -0
- package/esm/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/esm/_abstract/_Blings.js +12 -0
- package/esm/_abstract/_Block.d.ts +2 -2
- package/esm/_abstract/_Block.js +24 -0
- package/esm/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
- package/esm/_abstract/{Button.jsx → _Button.js} +3 -7
- package/esm/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
- package/esm/_abstract/_CardList.js +38 -0
- package/{_abstract/Image.d.ts → esm/_abstract/_Image.d.ts} +9 -5
- package/esm/_abstract/_Image.js +27 -0
- package/esm/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
- package/esm/_abstract/{Link.jsx → _Link.js} +0 -0
- package/esm/_abstract/_Quote.js +8 -0
- package/{_abstract/TogglerGroup.d.ts → esm/_abstract/_TogglerGroup.d.ts} +1 -1
- package/esm/_abstract/_TogglerGroup.js +29 -0
- package/esm/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
- package/esm/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
- package/esm/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
- package/esm/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
- package/esm/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/esm/utils/seenEffect.d.ts +2 -2
- package/esm/utils/seenEffect.js +1 -1
- package/package.json +106 -91
- package/utils/seenEffect.d.ts +2 -2
- package/utils/seenEffect.js +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.jsx +0 -32
- package/BreadCrumbs.jsx +0 -36
- package/ContentImage.jsx +0 -18
- package/FeatureList.jsx +0 -28
- package/FooterBadges.jsx +0 -21
- package/FooterInfo.jsx +0 -19
- package/GridBlocks.jsx +0 -40
- package/InfoBlock.jsx +0 -23
- package/Layout.jsx +0 -69
- package/MainMenu/_Auxiliary.jsx +0 -26
- package/MainMenu/_PrimaryPanel.jsx +0 -37
- package/Modal.jsx +0 -21
- package/ProcessOverview.jsx +0 -25
- package/RadioGroup.jsx +0 -12
- package/RelatedLinks.jsx +0 -35
- package/SearchResults/_SearchResultsItem.jsx +0 -24
- package/WizardLayout.jsx +0 -44
- package/WizardStepper.jsx +0 -34
- package/_abstract/CardList.jsx +0 -46
- package/_abstract/TogglerGroup.jsx +0 -36
- package/_abstract/_Block.jsx +0 -32
- package/_abstract/_Quote.jsx +0 -18
- package/esm/AccordionList.jsx +0 -33
- package/esm/ActionCards.jsx +0 -10
- package/esm/ArticleCarousel/_ArticleCarouselCard.jsx +0 -25
- package/esm/ArticleMeta.jsx +0 -17
- package/esm/Attention.jsx +0 -4
- package/esm/BlockBreak.jsx +0 -6
- package/esm/BlockQuote.jsx +0 -4
- package/esm/BreadCrumbs.jsx +0 -31
- package/esm/ButtonBack.jsx +0 -4
- package/esm/ButtonPrimary.jsx +0 -4
- package/esm/ButtonSecondary.jsx +0 -4
- package/esm/Carousel.jsx +0 -4
- package/esm/CarouselStepper.jsx +0 -4
- package/esm/CenterColumn.jsx +0 -9
- package/esm/Checkbox.jsx +0 -4
- package/esm/CheckboxButtonsGroup.jsx +0 -14
- package/esm/CheckboxGroup.jsx +0 -7
- package/esm/ContentArticle.jsx +0 -24
- package/esm/ContentImage.jsx +0 -13
- package/esm/FeatureList.jsx +0 -23
- package/esm/FieldGroup.jsx +0 -10
- package/esm/FooterBadges.jsx +0 -16
- package/esm/FooterInfo.jsx +0 -14
- package/esm/Footnote.jsx +0 -3
- package/esm/GridBlocks.jsx +0 -35
- package/esm/HeroBlock.jsx +0 -22
- package/esm/InfoBlock.jsx +0 -18
- package/esm/LabeledTextBlock.jsx +0 -16
- package/esm/Layout.jsx +0 -63
- package/esm/MainMenu/_Auxiliary.jsx +0 -19
- package/esm/MainMenu/_PrimaryPanel.jsx +0 -30
- package/esm/MiniMetrics.jsx +0 -11
- package/esm/Modal.jsx +0 -16
- package/esm/NameCards.jsx +0 -9
- package/esm/PageFilter.jsx +0 -16
- package/esm/ProcessOverview.jsx +0 -20
- package/esm/PullQuote.jsx +0 -4
- package/esm/RadioButtonsGroup.jsx +0 -14
- package/esm/RadioGroup.jsx +0 -7
- package/esm/RelatedLinks.jsx +0 -30
- package/esm/SearchResults/_SearchResultsItem.jsx +0 -19
- package/esm/WizardLayout.jsx +0 -39
- package/esm/WizardLayoutClose.jsx +0 -4
- package/esm/WizardStepper.jsx +0 -29
- package/esm/_abstract/CardList.jsx +0 -39
- package/esm/_abstract/Image.jsx +0 -29
- package/esm/_abstract/TogglerGroup.jsx +0 -31
- package/esm/_abstract/_Blings.jsx +0 -14
- package/esm/_abstract/_Block.jsx +0 -27
- package/esm/_abstract/_Quote.jsx +0 -11
package/GridBlocks.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
+
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
9
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
10
|
+
const _Link_1 = require("./_abstract/_Link");
|
|
11
|
+
const seenEffect_1 = require("./utils/seenEffect");
|
|
12
|
+
const ButtonTertiary_1 = __importDefault(require("./ButtonTertiary"));
|
|
13
|
+
const GridBlocks = (props) => {
|
|
14
|
+
const { blocks, twocol, startSeen } = props;
|
|
15
|
+
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
16
|
+
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) => {
|
|
17
|
+
const imageProps = icon ? { src: (0, assets_1.getEfnistaknUrl)(icon) } : image;
|
|
18
|
+
return (react_1.default.createElement("div", { key: i, className: "GridBlocks__item" },
|
|
19
|
+
imageProps && react_1.default.createElement(_Image_1.default, Object.assign({ className: "GridBlocks__illustration" }, imageProps)),
|
|
20
|
+
react_1.default.createElement("div", { className: "GridBlocks__textwrap" },
|
|
21
|
+
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)),
|
|
22
|
+
react_1.default.createElement("div", { className: "GridBlocks__item__summary" }, summary),
|
|
23
|
+
react_1.default.createElement("ul", { className: "GridBlocks__links" }, links.map((link, i) => {
|
|
24
|
+
return (react_1.default.createElement("li", { key: i, className: "GridBlocks__link" },
|
|
25
|
+
react_1.default.createElement(ButtonTertiary_1.default, Object.assign({}, link))));
|
|
26
|
+
})))));
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
exports.default = GridBlocks;
|
package/Heading.d.ts
CHANGED
|
@@ -8,17 +8,15 @@ const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemCla
|
|
|
8
8
|
const sizes = {
|
|
9
9
|
small: 'small',
|
|
10
10
|
/** Default value */
|
|
11
|
-
normal: '
|
|
11
|
+
normal: '',
|
|
12
12
|
large: 'large',
|
|
13
13
|
};
|
|
14
14
|
const Heading = (props) => {
|
|
15
15
|
const { size = 'normal', Tag = 'h2', align, wide, children } = props;
|
|
16
|
-
return (
|
|
16
|
+
return (react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('Heading', [
|
|
17
17
|
sizes[size],
|
|
18
18
|
align === 'right' && 'align--' + align,
|
|
19
19
|
!align && wide && 'wide',
|
|
20
|
-
])}
|
|
21
|
-
{children}
|
|
22
|
-
</Tag>);
|
|
20
|
+
]) }, children));
|
|
23
21
|
};
|
|
24
22
|
exports.default = Heading;
|
package/HeroBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
2
|
-
import { ButtonProps } from './_abstract/
|
|
3
|
-
import { ImageProps } from './_abstract/
|
|
2
|
+
import { ButtonProps } from './_abstract/_Button';
|
|
3
|
+
import { ImageProps } from './_abstract/_Image';
|
|
4
4
|
import { SeenProp } from './utils/seenEffect';
|
|
5
5
|
declare type HeroBlockImageProps = {
|
|
6
6
|
illustration: Illustration;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
8
|
-
const
|
|
8
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
9
9
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
10
10
|
const ButtonPrimary_1 = __importDefault(require("./ButtonPrimary"));
|
|
11
11
|
const ButtonTertiary_1 = __importDefault(require("./ButtonTertiary"));
|
|
@@ -14,14 +14,13 @@ const HeroBlock = (props) => {
|
|
|
14
14
|
const hasButtons = Boolean(primaryButton || secondaryButton);
|
|
15
15
|
const imgProps = illustration ? { src: (0, assets_1.getIllustrationUrl)(illustration) } : image;
|
|
16
16
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</div>);
|
|
17
|
+
return (react_1.default.createElement("div", { className: "HeroBlock", ref: ref },
|
|
18
|
+
react_1.default.createElement("h1", { className: "HeroBlock__title" }, title),
|
|
19
|
+
react_1.default.createElement(_Image_1.default, Object.assign({ className: "HeroBlock__image" }, imgProps)),
|
|
20
|
+
react_1.default.createElement("div", { className: "HeroBlock__summary" }, summary),
|
|
21
|
+
hasButtons && (react_1.default.createElement("div", { className: "HeroBlock__buttons" },
|
|
22
|
+
primaryButton && react_1.default.createElement(ButtonPrimary_1.default, Object.assign({}, primaryButton)),
|
|
23
|
+
' ',
|
|
24
|
+
secondaryButton && react_1.default.createElement(ButtonTertiary_1.default, Object.assign({}, secondaryButton))))));
|
|
26
25
|
};
|
|
27
26
|
exports.default = HeroBlock;
|
|
@@ -21,11 +21,11 @@ const IframeBlock = (props) => {
|
|
|
21
21
|
compact && 'compact',
|
|
22
22
|
align === 'right' && 'align--' + align,
|
|
23
23
|
]);
|
|
24
|
-
return height === 'auto' ? (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
return height === 'auto' ? (react_1.default.createElement(iframe_resizer_react_1.default, { className: className, src: src })) : (react_1.default.createElement("iframe", { className: className, src: src,
|
|
25
|
+
// hidden tiger: pass negative height to disable iframe-resizer but not set height explicitly
|
|
26
|
+
// (Silly hack, don't rely on this)
|
|
27
|
+
height: height < 0 ? undefined : height,
|
|
28
|
+
// allow undefined to suppress scrolling attribute
|
|
29
|
+
scrolling: scrolling === true ? 'yes' : scrolling === false ? 'no' : scrolling }));
|
|
30
30
|
};
|
|
31
31
|
exports.default = IframeBlock;
|
package/Illustration.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
8
|
-
const
|
|
8
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
9
9
|
const Illustration = (props) => {
|
|
10
10
|
const imgProps = props.type ? { src: (0, assets_1.getIllustrationUrl)(props.type) } : props.image;
|
|
11
|
-
return
|
|
11
|
+
return react_1.default.createElement(_Image_1.default, Object.assign({ className: "Illustration" }, imgProps));
|
|
12
12
|
};
|
|
13
13
|
exports.default = Illustration;
|
package/ImageCards.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImageCardListProps, ImageCardProps as ICP } from './_abstract/
|
|
1
|
+
import { ImageCardListProps, ImageCardProps as ICP } from './_abstract/_CardList';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
3
|
export declare type ImageCardProps = ICP;
|
|
4
4
|
declare type _ImageCardProps = ImageCardListProps & {
|
|
@@ -16,13 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
19
|
-
const
|
|
19
|
+
const _CardList_1 = require("./_abstract/_CardList");
|
|
20
20
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
21
21
|
const ImageCards = (props) => {
|
|
22
22
|
const { background, startSeen } = props, cardListProps = __rest(props, ["background", "startSeen"]);
|
|
23
23
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
</div>);
|
|
24
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('ImageCards', background && 'background'), ref: ref },
|
|
25
|
+
react_1.default.createElement(_CardList_1.CardList, Object.assign({}, cardListProps, { bemPrefix: "ImageCards", imgPlaceholder: props.imgPlaceholder || true }))));
|
|
27
26
|
};
|
|
28
27
|
exports.default = ImageCards;
|
package/InfoBlock.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const seenEffect_1 = require("./utils/seenEffect");
|
|
8
|
+
const InfoBlock = (props) => {
|
|
9
|
+
const { title, subtitle, items, startSeen } = props;
|
|
10
|
+
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
11
|
+
return (react_1.default.createElement("div", { className: "InfoBlock", ref: ref },
|
|
12
|
+
react_1.default.createElement("h2", { className: "InfoBlock__title" }, title),
|
|
13
|
+
react_1.default.createElement("div", { className: "InfoBlock__subtitle" }, subtitle),
|
|
14
|
+
react_1.default.createElement("ul", { className: "InfoBlock__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "InfoBlock__item" }, item)))),
|
|
15
|
+
'extraInfo' in props && (react_1.default.createElement("div", { className: "InfoBlock__extrainfo" }, props.extraInfo)),
|
|
16
|
+
'attention' in props && (react_1.default.createElement("div", { className: "InfoBlock__attention" }, props.attention))));
|
|
17
|
+
};
|
|
18
|
+
exports.default = InfoBlock;
|
package/InfoHero.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from './_abstract/
|
|
2
|
-
import { ImageProps } from './_abstract/
|
|
1
|
+
import { ButtonProps } from './_abstract/_Button';
|
|
2
|
+
import { ImageProps } from './_abstract/_Image';
|
|
3
3
|
import { Alignment } from './constants';
|
|
4
4
|
declare type BlingOptions = 'waves' | 'sunny-waves' | 'triangles' | 'circles';
|
|
5
5
|
export declare type InfoHeroProps = {
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
8
|
const _Blings_1 = __importDefault(require("./_abstract/_Blings"));
|
|
9
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
9
10
|
const breakOnNL_1 = __importDefault(require("./_abstract/breakOnNL"));
|
|
10
|
-
const Image_1 = __importDefault(require("./_abstract/Image"));
|
|
11
11
|
const ButtonTertiary_1 = __importDefault(require("./ButtonTertiary"));
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
13
|
const blingOptions = {
|
|
@@ -74,20 +74,14 @@ const InfoHero = (props) => {
|
|
|
74
74
|
const alignment = align && constants_1.aligns[align] ? align : 'right';
|
|
75
75
|
const blings = (blingType && blingOptions[blingType]) ||
|
|
76
76
|
blingOptions.waves; // default to `waves`
|
|
77
|
-
return (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
{buttons.map((buttonProps, i) => (<ButtonTertiary_1.default key={i} {...buttonProps}/>))}
|
|
87
|
-
</div>)}
|
|
88
|
-
</div>
|
|
89
|
-
<Image_1.default className="InfoHero__image" altText={title} {...image} placeholder/>
|
|
90
|
-
<_Blings_1.default blings={blings} mirror={alignment === 'right'}/>
|
|
91
|
-
</div>);
|
|
77
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('InfoHero', 'align--' + alignment) },
|
|
78
|
+
react_1.default.createElement("div", { className: "InfoHero__content" },
|
|
79
|
+
react_1.default.createElement("h1", { className: "InfoHero__title" }, title),
|
|
80
|
+
titleBlurb && react_1.default.createElement("div", { className: "InfoHero__titleblurb" }, titleBlurb),
|
|
81
|
+
subTitle && react_1.default.createElement("div", { className: "InfoHero__subtitle" }, (0, breakOnNL_1.default)(subTitle)),
|
|
82
|
+
blurb && react_1.default.createElement("div", { className: "InfoHero__blurb" }, blurb),
|
|
83
|
+
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))))))),
|
|
84
|
+
react_1.default.createElement(_Image_1.default, Object.assign({ className: "InfoHero__image", altText: title }, image, { placeholder: true })),
|
|
85
|
+
react_1.default.createElement(_Blings_1.default, { blings: blings, mirror: alignment === 'right' })));
|
|
92
86
|
};
|
|
93
87
|
exports.default = InfoHero;
|
package/IslandBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Formheimur } from '@reykjavik/hanna-utils/assets';
|
|
2
2
|
import { BlockItem } from './_abstract/_Block';
|
|
3
|
-
import { ImageProps } from './_abstract/
|
|
3
|
+
import { ImageProps } from './_abstract/_Image';
|
|
4
4
|
import { SeenProp } from './utils/seenEffect';
|
|
5
5
|
import { Alignment } from './constants';
|
|
6
6
|
declare type IslandBaseBlockProps = {
|
|
@@ -16,6 +16,6 @@ const IslandBlock = (props) => {
|
|
|
16
16
|
content,
|
|
17
17
|
image: shapes ? { src: (0, assets_1.getFormheimurUrl)(shapes), inline: true } : image || {},
|
|
18
18
|
};
|
|
19
|
-
return (
|
|
19
|
+
return (react_1.default.createElement(_Block_1.default, Object.assign({ bem: "IslandBlock", modifier: 'align--' + alignment }, blockProps, { startSeen: startSeen })));
|
|
20
20
|
};
|
|
21
21
|
exports.default = IslandBlock;
|
package/IslandPageBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
2
2
|
import { BlockItem } from './_abstract/_Block';
|
|
3
|
-
import { ImageProps } from './_abstract/
|
|
3
|
+
import { ImageProps } from './_abstract/_Image';
|
|
4
4
|
import { SeenProp } from './utils/seenEffect';
|
|
5
5
|
import { Alignment } from './constants';
|
|
6
6
|
declare const backgrounds: {
|
|
@@ -16,6 +16,6 @@ const IslandPageBlock = (props) => {
|
|
|
16
16
|
const { title, summary, buttons, illustration, image, align, background, startSeen } = props;
|
|
17
17
|
const alignment = align && constants_1.aligns[align] ? align : 'right';
|
|
18
18
|
const bg = backgrounds[background || 'none'];
|
|
19
|
-
return (
|
|
19
|
+
return (react_1.default.createElement(_Block_1.default, { bem: "IslandPageBlock", modifier: ['align--' + alignment, bg && 'background--' + bg], content: { title, summary, buttons }, image: illustration ? { src: (0, assets_1.getIllustrationUrl)(illustration) } : image || {}, startSeen: startSeen }));
|
|
20
20
|
};
|
|
21
21
|
exports.default = IslandPageBlock;
|
package/LabeledTextBlock.d.ts
CHANGED
|
@@ -10,12 +10,10 @@ const ButtonTertiary_1 = __importDefault(require("./ButtonTertiary"));
|
|
|
10
10
|
const LabeledTextBlock = (props) => {
|
|
11
11
|
const { label, summary, wide, buttons = [], startSeen } = props;
|
|
12
12
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</div>
|
|
19
|
-
</div>);
|
|
13
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('LabeledTextBlock', wide && 'wide'), ref: ref },
|
|
14
|
+
react_1.default.createElement("h2", { className: "LabeledTextBlock__label" }, label),
|
|
15
|
+
react_1.default.createElement("div", { className: "LabeledTextBlock__summary" },
|
|
16
|
+
summary,
|
|
17
|
+
buttons.map((button, i) => (react_1.default.createElement(ButtonTertiary_1.default, Object.assign({ key: i }, button)))))));
|
|
20
18
|
};
|
|
21
19
|
exports.default = LabeledTextBlock;
|
package/Layout.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.defaultLayoutTexts = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
9
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
10
|
+
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
11
|
+
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
12
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
13
|
+
const _Link_1 = require("./_abstract/_Link");
|
|
14
|
+
const useMenuToggling_1 = require("./utils/useMenuToggling");
|
|
15
|
+
const useScrollbarWidthCSSVar_1 = require("./utils/useScrollbarWidthCSSVar");
|
|
16
|
+
exports.defaultLayoutTexts = {
|
|
17
|
+
is: {
|
|
18
|
+
lang: 'is',
|
|
19
|
+
skipLinkLabel: 'Valmynd',
|
|
20
|
+
closeMenuLabel: 'Loka',
|
|
21
|
+
closeMenuLabelLong: 'Loka valmynd',
|
|
22
|
+
},
|
|
23
|
+
en: {
|
|
24
|
+
lang: 'en',
|
|
25
|
+
skipLinkLabel: 'Skip to navigation',
|
|
26
|
+
closeMenuLabel: 'Close',
|
|
27
|
+
closeMenuLabelLong: 'Close menu',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const Layout = (props) => {
|
|
31
|
+
(0, useScrollbarWidthCSSVar_1.useScrollbarWidthCSSVar)();
|
|
32
|
+
const { ssr, globalAlerts, mainChildren, navChildren, footerChildren, colorTheme, children, siteName = 'Reykjavík', logoLink = '/', } = props;
|
|
33
|
+
const { isMenuActive, closeMenu, toggleMenu } = (0, useMenuToggling_1.useMenuToggling)(ssr !== 'ssr-only');
|
|
34
|
+
const isBrowser = (0, hooks_1.useIsBrowserSide)( /* ssr */);
|
|
35
|
+
const txt = (0, i18n_1.getTexts)(props, exports.defaultLayoutTexts);
|
|
36
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Layout', props.modifier), "data-sprinkled": isBrowser, "data-color-theme": colorTheme },
|
|
37
|
+
globalAlerts && (react_1.default.createElement("div", { className: "Layout__alerts", role: "alert" }, globalAlerts)),
|
|
38
|
+
react_1.default.createElement("div", { className: "Layout__content" },
|
|
39
|
+
react_1.default.createElement("div", { className: "Layout__header", role: "banner" },
|
|
40
|
+
react_1.default.createElement(_Link_1.Link, { className: "Layout__header__logo", href: logoLink },
|
|
41
|
+
' ',
|
|
42
|
+
react_1.default.createElement(_Image_1.default, { className: undefined, inline: true, src: (0, assets_1.getAssetUrl)('reykjavik-logo.svg') }),
|
|
43
|
+
' ',
|
|
44
|
+
siteName,
|
|
45
|
+
' '),
|
|
46
|
+
' ',
|
|
47
|
+
navChildren && (react_1.default.createElement(_Link_1.Link, { className: "Layout__header__skiplink", href: "#pagenav", onClick: isMenuActive &&
|
|
48
|
+
((e) => {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
toggleMenu();
|
|
51
|
+
}), "aria-label": txt.skipLinkLabel }, txt.skipLinkLabel))),
|
|
52
|
+
react_1.default.createElement("div", { className: "Layout__main", role: "main" }, mainChildren || children),
|
|
53
|
+
navChildren && (react_1.default.createElement("div", { className: "Layout__nav", id: "pagenav", role: "navigation" },
|
|
54
|
+
navChildren,
|
|
55
|
+
isMenuActive && (react_1.default.createElement("button", { className: "Layout__nav__closebutton", onClick: closeMenu, "aria-label": txt.closeMenuLabelLong, type: "button" }, txt.closeMenuLabel)))),
|
|
56
|
+
react_1.default.createElement("div", { className: "Layout__footer", role: "complementary" }, footerChildren))));
|
|
57
|
+
};
|
|
58
|
+
exports.default = Layout;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AuxiliaryPanel = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
9
|
+
const _Link_1 = require("../_abstract/_Link");
|
|
10
|
+
const AuxiliaryPanel = (props) => {
|
|
11
|
+
const { title, id, items, image } = props;
|
|
12
|
+
const imageUrl = image ? (0, assets_1.getIllustrationUrl)(image) : image;
|
|
13
|
+
return (react_1.default.createElement("li", { className: "AuxiliaryPanel", id: id, style: imageUrl
|
|
14
|
+
? { '--menu-auxiliary-image': `url(${imageUrl})` }
|
|
15
|
+
: undefined },
|
|
16
|
+
react_1.default.createElement("h3", { className: "AuxiliaryPanel__title" }, title),
|
|
17
|
+
react_1.default.createElement("ul", { className: "AuxiliaryPanel__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "AuxiliaryPanel__item", "aria-current": item.current || undefined },
|
|
18
|
+
react_1.default.createElement(_Link_1.Link, { className: "AuxiliaryPanel__link", href: item.href, target: item.target, lang: item.lang }, item.label)))))));
|
|
19
|
+
};
|
|
20
|
+
exports.AuxiliaryPanel = AuxiliaryPanel;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PrimaryPanel = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
|
+
const _Link_1 = require("../_abstract/_Link");
|
|
10
|
+
const PrimaryPanel = (props) => {
|
|
11
|
+
const { setActivePanel, panel, isParent, isActive, isBrowser, texts } = props;
|
|
12
|
+
const { items } = panel;
|
|
13
|
+
return (react_1.default.createElement("li", { ref: isActive ? props.activeRef : undefined, className: (0, getBemClass_1.default)('PrimaryPanel', [
|
|
14
|
+
isParent && 'parent',
|
|
15
|
+
isActive && 'active',
|
|
16
|
+
items.length > 5 && 'twocol', // TODO: allow setting twocol manually?
|
|
17
|
+
]), id: panel.id },
|
|
18
|
+
react_1.default.createElement("h3", { className: "PrimaryPanel__title" },
|
|
19
|
+
' ',
|
|
20
|
+
isBrowser && !isActive ? (react_1.default.createElement("button", { className: "MainMenu__mega__title-toggler", "aria-controls": panel.id, onClick: () => setActivePanel(panel, false), "aria-pressed": isActive, type: "button" }, panel.title)) : (panel.title)),
|
|
21
|
+
react_1.default.createElement("ul", { className: "PrimaryPanel__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "PrimaryPanel__item", "aria-current": item.current || undefined },
|
|
22
|
+
react_1.default.createElement(_Link_1.Link, { className: "PrimaryPanel__link", href: item.href, target: item.target, lang: item.lang },
|
|
23
|
+
react_1.default.createElement("span", { className: "PrimaryPanel__linkTitle" }, item.label),
|
|
24
|
+
' ',
|
|
25
|
+
react_1.default.createElement("small", { className: "PrimaryPanel__summary" }, item.summary),
|
|
26
|
+
' '))))),
|
|
27
|
+
isBrowser && isActive && (react_1.default.createElement("button", { className: "MainMenu__megapanel__backtomenu", "aria-controls": panel.id, "aria-label": texts.backToMenuLong, onClick: () => setActivePanel(undefined), type: "button" }, texts.backToMenu))));
|
|
28
|
+
};
|
|
29
|
+
exports.PrimaryPanel = PrimaryPanel;
|
|
@@ -34,7 +34,7 @@ const useShortState_1 = __importDefault(require("@hugsmidjan/react/hooks/useShor
|
|
|
34
34
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
35
35
|
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
36
36
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
37
|
-
const
|
|
37
|
+
const _Link_1 = require("./_abstract/_Link");
|
|
38
38
|
const _Auxiliary_1 = require("./MainMenu/_Auxiliary");
|
|
39
39
|
const _PrimaryPanel_1 = require("./MainMenu/_PrimaryPanel");
|
|
40
40
|
const useFormatMonitor_1 = require("./utils/useFormatMonitor");
|
|
@@ -130,49 +130,36 @@ const MainMenu = (props) => {
|
|
|
130
130
|
if (menuItems.length === 0) {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
|
-
return (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{menuItems.map((item, i) => {
|
|
133
|
+
return (react_1.default.createElement("nav", { className: "MainMenu", "aria-label": title, "data-sprinkled": isBrowser, ref: menuElmRef },
|
|
134
|
+
react_1.default.createElement("h2", { className: "MainMenu__title" }, title),
|
|
135
|
+
react_1.default.createElement("ul", { className: "MainMenu__items" }, menuItems.map((item, i) => {
|
|
137
136
|
if (item === '---') {
|
|
138
|
-
return
|
|
137
|
+
return react_1.default.createElement("li", { key: i, className: "MainMenu__separator", "aria-hidden": "true" });
|
|
139
138
|
}
|
|
140
139
|
const { label, labelLong, lang, controlsId, onClick } = item;
|
|
141
140
|
const pressed = (activePanel && controlsId === activePanel.id) || undefined;
|
|
142
|
-
return (
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
{megaPanels.map((panel, i) => {
|
|
166
|
-
if (!panel.items.length) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
const isActive = activePanel === panel || laggyActivePanel === panel || undefined;
|
|
170
|
-
const isParent = !!panel.items.find((item) => item.current);
|
|
171
|
-
return (<_PrimaryPanel_1.PrimaryPanel key={i} isParent={isParent} isActive={isActive} panel={panel} isBrowser={isBrowser} setActivePanel={setActivePanel} texts={(0, i18n_1.getTexts)(props, exports.defaultMainMenuTexts)} activeRef={activePanelRef}/>);
|
|
172
|
-
})}
|
|
173
|
-
{auxiliaryPanel && <_Auxiliary_1.AuxiliaryPanel {...auxiliaryPanel}/>}
|
|
174
|
-
</ul>
|
|
175
|
-
</div>)}
|
|
176
|
-
</nav>);
|
|
141
|
+
return (react_1.default.createElement("li", { key: i, className: (0, getBemClass_1.default)('MainMenu__item', item.modifier), "aria-current": item.current || undefined }, onClick || (!!item.megaPanel && (isBrowser || item.href != null)) ? (
|
|
142
|
+
// only print script-driven buttons in the browser
|
|
143
|
+
react_1.default.createElement("button", { className: "MainMenu__link", onClick: () => {
|
|
144
|
+
item.megaPanel && setActivePanel(item.megaPanel);
|
|
145
|
+
onClick && onClick(i, item);
|
|
146
|
+
onItemClick && onItemClick(i, item);
|
|
147
|
+
}, ref: pressed && pressedLinkRef, "aria-pressed": pressed, "aria-controls": controlsId, "aria-label": labelLong, title: labelLong, lang: lang, type: "button" }, label)) : item.href != null ? (
|
|
148
|
+
// always render links server-side
|
|
149
|
+
react_1.default.createElement(_Link_1.Link, { className: "MainMenu__link", href: item.href, "aria-label": labelLong, title: labelLong, onClick: onItemClick && (() => onItemClick(i, item)), lang: lang }, label)) : undefined // skip rendering non-link menu items server side
|
|
150
|
+
));
|
|
151
|
+
})),
|
|
152
|
+
'\n\n',
|
|
153
|
+
megaPanels.length > 0 && (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('MainMenu__panelsWrap', [activePanel && 'active']) },
|
|
154
|
+
react_1.default.createElement("ul", { className: "MainMenu__panels" },
|
|
155
|
+
megaPanels.map((panel, i) => {
|
|
156
|
+
if (!panel.items.length) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const isActive = activePanel === panel || laggyActivePanel === panel || undefined;
|
|
160
|
+
const isParent = !!panel.items.find((item) => item.current);
|
|
161
|
+
return (react_1.default.createElement(_PrimaryPanel_1.PrimaryPanel, { key: i, isParent: isParent, isActive: isActive, panel: panel, isBrowser: isBrowser, setActivePanel: setActivePanel, texts: (0, i18n_1.getTexts)(props, exports.defaultMainMenuTexts), activeRef: activePanelRef }));
|
|
162
|
+
}),
|
|
163
|
+
auxiliaryPanel && react_1.default.createElement(_Auxiliary_1.AuxiliaryPanel, Object.assign({}, auxiliaryPanel)))))));
|
|
177
164
|
};
|
|
178
165
|
exports.default = MainMenu;
|
package/MiniMetrics.d.ts
CHANGED
|
@@ -4,13 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const
|
|
7
|
+
const _Button_1 = __importDefault(require("./_abstract/_Button"));
|
|
8
8
|
const SeenEffect_1 = __importDefault(require("./SeenEffect"));
|
|
9
9
|
const MiniMetrics = (props) => {
|
|
10
10
|
const { text, moreButton, startSeen } = props;
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
return (react_1.default.createElement(SeenEffect_1.default, { className: "MiniMetrics", startSeen: startSeen },
|
|
12
|
+
react_1.default.createElement("strong", { className: "MiniMetrics__text" }, text),
|
|
13
|
+
" ",
|
|
14
|
+
'\n',
|
|
15
|
+
react_1.default.createElement(_Button_1.default, Object.assign({ bem: "MiniMetrics__more" }, moreButton))));
|
|
15
16
|
};
|
|
16
17
|
exports.default = MiniMetrics;
|
package/Modal.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const Modal_1 = __importDefault(require("@hugsmidjan/react/Modal"));
|
|
8
|
+
const Modal = (props) => {
|
|
9
|
+
const { closeDelay = 500, texts = {
|
|
10
|
+
closeButton: 'Loka ',
|
|
11
|
+
}, bling, children, render = () => children, } = props;
|
|
12
|
+
return (react_1.default.createElement(Modal_1.default, Object.assign({}, props, { bodyWrap: false, bem: "Modal", closeDelay: closeDelay, texts: texts, render: (args) => bling ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13
|
+
render(args),
|
|
14
|
+
react_1.default.createElement("div", { className: "Modal__blings" },
|
|
15
|
+
react_1.default.createElement("div", { className: "Modal__blings__inner" }, bling)))) : (render(args)),
|
|
16
|
+
// eslint-disable-next-line react/no-children-prop
|
|
17
|
+
children: undefined })));
|
|
18
|
+
};
|
|
19
|
+
exports.default = Modal;
|