@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
|
@@ -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 i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
9
|
+
const _Button_1 = __importDefault(require("./_abstract/_Button"));
|
|
9
10
|
const breakOnNL_1 = __importDefault(require("./_abstract/breakOnNL"));
|
|
10
|
-
const Button_1 = __importDefault(require("./_abstract/Button"));
|
|
11
11
|
const formatDate = (date) => {
|
|
12
12
|
return typeof date === 'string'
|
|
13
13
|
? date
|
|
@@ -48,16 +48,16 @@ const NameCard = (props) => {
|
|
|
48
48
|
}
|
|
49
49
|
const texts = (0, i18n_1.getTexts)(props, defaultTexts);
|
|
50
50
|
const { updatedLabel, availableLabel, unavailableLabel } = texts;
|
|
51
|
-
return (
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
return (react_1.default.createElement("div", { className: "NameCard__meta" },
|
|
52
|
+
available != null && (react_1.default.createElement("span", { className: (0, getBemClass_1.default)('NameCard__availability', available && 'available') },
|
|
53
|
+
available
|
|
54
54
|
? availableLabel || texts.vacancyLabel
|
|
55
|
-
: unavailableLabel || texts.noVacancyLabel
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
: unavailableLabel || texts.noVacancyLabel,
|
|
56
|
+
' ')),
|
|
57
|
+
updated != null && (react_1.default.createElement("span", { className: "NameCard__updated" },
|
|
58
|
+
updatedLabel,
|
|
59
|
+
" ",
|
|
60
|
+
formatDate(updated)))));
|
|
61
61
|
};
|
|
62
62
|
let contactInfo = props.contactInfo;
|
|
63
63
|
if (!contactInfo) {
|
|
@@ -74,19 +74,14 @@ const NameCard = (props) => {
|
|
|
74
74
|
}
|
|
75
75
|
return item;
|
|
76
76
|
});
|
|
77
|
-
return (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{location && <p className="NameCard__location">{renderContent(location)}</p>}
|
|
87
|
-
{hours && <p className="NameCard__hours">{renderContent(hours)}</p>}
|
|
88
|
-
{aboutText && <p className="NameCard__abouttext">{renderContent(aboutText)}</p>}
|
|
89
|
-
{renderMeta()}
|
|
90
|
-
</div>);
|
|
77
|
+
return (react_1.default.createElement("div", { className: "NameCard" },
|
|
78
|
+
react_1.default.createElement("div", { className: "NameCard__name" }, name),
|
|
79
|
+
contactInfo.length > 0 && (react_1.default.createElement("p", { className: "NameCard__contactinfo" }, cleanContactInfo.map((item, i) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
80
|
+
typeof item === 'string' ? (react_1.default.createElement("span", { className: "NameCard__contactinfo__item" }, item)) : (react_1.default.createElement(_Button_1.default, { key: i, bem: "NameCard__contactinfo__item", href: item.href, "aria-label": item.longLabel, title: item.longLabel }, item.label)),
|
|
81
|
+
' '))))),
|
|
82
|
+
location && react_1.default.createElement("p", { className: "NameCard__location" }, renderContent(location)),
|
|
83
|
+
hours && react_1.default.createElement("p", { className: "NameCard__hours" }, renderContent(hours)),
|
|
84
|
+
aboutText && react_1.default.createElement("p", { className: "NameCard__abouttext" }, renderContent(aboutText)),
|
|
85
|
+
renderMeta()));
|
|
91
86
|
};
|
|
92
87
|
exports.default = NameCard;
|
|
@@ -7,8 +7,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const NameCard_1 = __importDefault(require("./NameCard"));
|
|
8
8
|
const NameCards = (props) => {
|
|
9
9
|
const { items } = props;
|
|
10
|
-
return (
|
|
11
|
-
{items.map((item, i) => (<NameCard_1.default key={i} {...item}/>))}
|
|
12
|
-
</div>);
|
|
10
|
+
return (react_1.default.createElement("div", { className: "NameCards" }, items.map((item, i) => (react_1.default.createElement(NameCard_1.default, Object.assign({ key: i }, item))))));
|
|
13
11
|
};
|
|
14
12
|
exports.default = NameCards;
|
package/NewsHero.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImageProps } from './_abstract/
|
|
1
|
+
import { ImageProps } from './_abstract/_Image';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
3
|
declare type BlingOptions = 'interesting' | 'snake' | 'pentagon' | 'dome' | 'balls-small' | 'balls-large';
|
|
4
4
|
export declare type NewsHeroProps = {
|
|
@@ -7,7 +7,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
8
|
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
9
9
|
const _Blings_1 = __importDefault(require("./_abstract/_Blings"));
|
|
10
|
-
const
|
|
10
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
11
11
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
12
12
|
const ShareButtons_1 = __importDefault(require("./ShareButtons"));
|
|
13
13
|
const blingOptions = {
|
|
@@ -80,14 +80,12 @@ const NewsHero = (props) => {
|
|
|
80
80
|
const { title, sharing = true, meta, summary, image, blingType, startSeen } = props;
|
|
81
81
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
82
82
|
const blings = (blingType && blingOptions[blingType]) || (0, hanna_utils_1.getStableRandomItem)(blingOptions, title);
|
|
83
|
-
return (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{image ? (<Image_1.default className="NewsHero__image" {...image}/>) : (<_Blings_1.default blings={blings}/>)}
|
|
91
|
-
</div>);
|
|
83
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('NewsHero', [!image && 'align--right']), ref: ref },
|
|
84
|
+
react_1.default.createElement("div", { className: "NewsHero__content" },
|
|
85
|
+
react_1.default.createElement("h1", { className: "NewsHero__title" }, title),
|
|
86
|
+
meta && react_1.default.createElement("span", { className: "NewsHero__meta" }, meta),
|
|
87
|
+
react_1.default.createElement("div", { className: "NewsHero__summary" }, summary),
|
|
88
|
+
sharing === true ? react_1.default.createElement(ShareButtons_1.default, null) : sharing && sharing()),
|
|
89
|
+
image ? (react_1.default.createElement(_Image_1.default, Object.assign({ className: "NewsHero__image" }, image))) : (react_1.default.createElement(_Blings_1.default, { blings: blings }))));
|
|
92
90
|
};
|
|
93
91
|
exports.default = NewsHero;
|
|
@@ -10,12 +10,11 @@ const Footnote_1 = __importDefault(require("./Footnote"));
|
|
|
10
10
|
const PageFilter = (props) => {
|
|
11
11
|
const { title, summary, footnote, filters, children, buttonRow, underlap, startSeen } = props;
|
|
12
12
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
13
|
-
return (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</div>);
|
|
13
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('PageFilter', underlap && 'underlap'), ref: ref },
|
|
14
|
+
react_1.default.createElement("h2", { className: "PageFilter__title" }, title),
|
|
15
|
+
summary && react_1.default.createElement("div", { className: "PageFilter__summary" }, summary),
|
|
16
|
+
react_1.default.createElement("div", { className: "PageFilter__filters" }, filters || children),
|
|
17
|
+
react_1.default.createElement("div", { className: "PageFilter__buttons" }, buttonRow),
|
|
18
|
+
footnote && react_1.default.createElement(Footnote_1.default, null, footnote)));
|
|
20
19
|
};
|
|
21
20
|
exports.default = PageFilter;
|
|
@@ -9,11 +9,9 @@ const seenEffect_1 = require("./utils/seenEffect");
|
|
|
9
9
|
const PageHeading = (props) => {
|
|
10
10
|
const { Tag = 'h1', align, small, children, startSeen } = props;
|
|
11
11
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
12
|
-
return (
|
|
12
|
+
return (react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('PageHeading', [
|
|
13
13
|
small && 'small',
|
|
14
14
|
align === 'right' && 'align--' + align,
|
|
15
|
-
])
|
|
16
|
-
{children}
|
|
17
|
-
</Tag>);
|
|
15
|
+
]), ref: ref }, children));
|
|
18
16
|
};
|
|
19
17
|
exports.default = PageHeading;
|
package/Picture.d.ts
ADDED
package/Picture.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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 _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
9
|
+
const Picture = (props) => {
|
|
10
|
+
const { contain, className } = props;
|
|
11
|
+
return (react_1.default.createElement(_Image_1.default, Object.assign({}, props, { className: (0, getBemClass_1.default)('Picture', contain && 'contain', className) })));
|
|
12
|
+
};
|
|
13
|
+
exports.default = Picture;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 ProcessOverview = (props) => {
|
|
9
|
+
const { title, items, attention, transparent, narrow } = props;
|
|
10
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('ProcessOverview', [
|
|
11
|
+
transparent && 'transparent',
|
|
12
|
+
narrow && 'narrow',
|
|
13
|
+
]) },
|
|
14
|
+
react_1.default.createElement("h2", { className: "ProcessOverview__title" }, title),
|
|
15
|
+
items.map(({ title, content }, i) => {
|
|
16
|
+
return (react_1.default.createElement("div", { key: i, className: "ProcessOverview__item" },
|
|
17
|
+
react_1.default.createElement("h3", { className: "ProcessOverview__item__title" }, title),
|
|
18
|
+
react_1.default.createElement("div", { className: "ProcessOverview__item__content" }, content)));
|
|
19
|
+
}),
|
|
20
|
+
attention && react_1.default.createElement("div", { className: "ProcessOverview__attention" }, attention)));
|
|
21
|
+
};
|
|
22
|
+
exports.default = ProcessOverview;
|
|
@@ -5,5 +5,5 @@ 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 _Quote_1 = require("./_abstract/_Quote");
|
|
8
|
-
const PullQuote = (props) =>
|
|
8
|
+
const PullQuote = (props) => react_1.default.createElement(_Quote_1._Quote, Object.assign({ bem: "PullQuote" }, props));
|
|
9
9
|
exports.default = PullQuote;
|
package/RadioButtonsGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/
|
|
1
|
+
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
2
|
export declare type RadioButtonsGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
value?: string;
|
|
4
4
|
/** @deprecated (Will be removed in v0.9) */
|
|
@@ -4,9 +4,9 @@ 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
|
|
8
|
-
const
|
|
9
|
-
const RadioButton = (props) => (
|
|
7
|
+
const _TogglerGroupField_1 = __importDefault(require("./_abstract/_TogglerGroupField"));
|
|
8
|
+
const _TogglerInput_1 = __importDefault(require("./_abstract/_TogglerInput"));
|
|
9
|
+
const RadioButton = (props) => (react_1.default.createElement(_TogglerInput_1.default, Object.assign({}, props, { bem: "RadioButton", type: "radio" })));
|
|
10
10
|
const RadioButtonsGroup = (props) => {
|
|
11
11
|
if (props.layout) {
|
|
12
12
|
console.warn('`RadioButtonsGroupProps.layout` is deprecated.');
|
|
@@ -14,6 +14,6 @@ const RadioButtonsGroup = (props) => {
|
|
|
14
14
|
if (props.columns) {
|
|
15
15
|
console.warn('`RadioButtonsGroupProps.columns` is deprecated.');
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return react_1.default.createElement(_TogglerGroupField_1.default, Object.assign({}, props, { bem: "RadioButtonsGroup", Toggler: RadioButton }));
|
|
18
18
|
};
|
|
19
19
|
exports.default = RadioButtonsGroup;
|
package/RadioGroup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/
|
|
2
|
-
import { TogglerInputProps } from './_abstract/
|
|
1
|
+
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
|
+
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
3
3
|
export declare type RadioGroupProps = TogglerGroupFieldProps & {
|
|
4
4
|
layout?: 'inline';
|
|
5
5
|
value?: string;
|
package/RadioGroup.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 _TogglerGroupField_1 = __importDefault(require("./_abstract/_TogglerGroupField"));
|
|
8
|
+
const _TogglerInput_1 = __importDefault(require("./_abstract/_TogglerInput"));
|
|
9
|
+
const Radio = (props) => (react_1.default.createElement(_TogglerInput_1.default, Object.assign({}, props, { bem: "Radio", type: "radio" })));
|
|
10
|
+
const RadioGroup = (props) => (react_1.default.createElement(_TogglerGroupField_1.default, Object.assign({}, props, { bem: "RadioGroup", modifier: props.layout, Toggler: Radio })));
|
|
11
|
+
RadioGroup.__Radio = Radio;
|
|
12
|
+
exports.default = RadioGroup;
|
package/RelatedLinks.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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 _Link_1 = require("./_abstract/_Link");
|
|
8
|
+
const types = {
|
|
9
|
+
external: 1,
|
|
10
|
+
document: 1,
|
|
11
|
+
pdf: 1,
|
|
12
|
+
link: 0,
|
|
13
|
+
};
|
|
14
|
+
const RelatedLinks = (props) => {
|
|
15
|
+
const { title, links } = props;
|
|
16
|
+
if (links.length === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const TitleTag = props.titleTag || 'h3';
|
|
20
|
+
return (react_1.default.createElement("div", { className: "RelatedLinks" },
|
|
21
|
+
title && react_1.default.createElement(TitleTag, { className: "RelatedLinks__title" }, title),
|
|
22
|
+
react_1.default.createElement("ul", { className: "RelatedLinks__list" }, links.map(({ href, label, type, target }, i) => {
|
|
23
|
+
type = type && types[type] ? type : undefined;
|
|
24
|
+
return (react_1.default.createElement("li", { key: i, className: "RelatedLinks__item" },
|
|
25
|
+
react_1.default.createElement(_Link_1.Link, { className: "RelatedLinks__link", href: href, "data-type": type, target: target },
|
|
26
|
+
' ',
|
|
27
|
+
label,
|
|
28
|
+
' ')));
|
|
29
|
+
}))));
|
|
30
|
+
};
|
|
31
|
+
exports.default = RelatedLinks;
|
|
@@ -9,8 +9,6 @@ const seenEffect_1 = require("./utils/seenEffect");
|
|
|
9
9
|
const RowBlock = (props) => {
|
|
10
10
|
const { right, modifier, className, children, startSeen } = props;
|
|
11
11
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
12
|
-
return (
|
|
13
|
-
{children}
|
|
14
|
-
</div>);
|
|
12
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('RowBlock', [modifier, right && 'align--right'], className), ref: ref }, children));
|
|
15
13
|
};
|
|
16
14
|
exports.default = RowBlock;
|
|
@@ -7,12 +7,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
8
|
const RowBlockColumn = (props) => {
|
|
9
9
|
const { background, narrow, children } = props;
|
|
10
|
-
return (
|
|
10
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('RowBlockColumn', [
|
|
11
11
|
narrow && 'narrow',
|
|
12
12
|
background && 'background',
|
|
13
13
|
background === 'primary' && 'background--primary',
|
|
14
|
-
])}
|
|
15
|
-
{children}
|
|
16
|
-
</div>);
|
|
14
|
+
]) }, children));
|
|
17
15
|
};
|
|
18
16
|
exports.default = RowBlockColumn;
|
|
@@ -53,11 +53,9 @@ const SearchInput = (props) => {
|
|
|
53
53
|
setHasValue(!!e.target.value);
|
|
54
54
|
onChange && onChange(e);
|
|
55
55
|
};
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</button>)}
|
|
61
|
-
</div>)}/>);
|
|
56
|
+
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)('SearchInput', [], className), ssr: ssr, small: small, label: label, empty: empty, filled: filled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement("div", Object.assign({ className: className.input }, addFocusProps()),
|
|
57
|
+
react_1.default.createElement("input", Object.assign({ className: "SearchInput__input", onChange: _onChange }, inputProps, inputElementProps, { ref: props.inputRef })),
|
|
58
|
+
' ',
|
|
59
|
+
onButtonClick && (react_1.default.createElement("button", { className: "SearchInput__button", type: "button", onClick: onButtonClick, title: buttonText, ref: props.buttonRef }, buttonText)))) }));
|
|
62
60
|
};
|
|
63
61
|
exports.default = SearchInput;
|
|
@@ -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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const _Image_1 = __importDefault(require("../_abstract/_Image"));
|
|
8
|
+
const _Link_1 = require("../_abstract/_Link");
|
|
9
|
+
const SearchResultsItem = (props) => {
|
|
10
|
+
const { highlight, title, summary, href, meta, image } = props;
|
|
11
|
+
const bem = highlight ? 'SearchResultsHighlightItem' : 'SearchResultsItem';
|
|
12
|
+
const metaArr = (Array.isArray(meta) ? meta : [meta]);
|
|
13
|
+
return (react_1.default.createElement("li", { className: bem },
|
|
14
|
+
react_1.default.createElement(_Link_1.Link, { className: bem + '__link', href: href },
|
|
15
|
+
react_1.default.createElement("h3", { className: bem + '__title' }, title),
|
|
16
|
+
metaArr.length > 0 && (react_1.default.createElement("span", { className: bem + '__meta' }, metaArr.map((item, i) => typeof item === 'function' ? item() : item && react_1.default.createElement("span", { key: i }, item)))),
|
|
17
|
+
highlight && image && react_1.default.createElement(_Image_1.default, { className: bem + '__image', src: image }),
|
|
18
|
+
react_1.default.createElement("div", { className: bem + '__summary', dangerouslySetInnerHTML: { __html: summary } }))));
|
|
19
|
+
};
|
|
20
|
+
exports.default = SearchResultsItem;
|
|
@@ -36,11 +36,10 @@ const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
|
36
36
|
const _SearchResultsItem_1 = __importDefault(require("./SearchResults/_SearchResultsItem"));
|
|
37
37
|
const Alert_1 = __importDefault(require("./Alert"));
|
|
38
38
|
const Tabs_1 = __importDefault(require("./Tabs"));
|
|
39
|
-
const renderDefaultErrorText = () => (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Ef ekkert
|
|
43
|
-
</>);
|
|
39
|
+
const renderDefaultErrorText = () => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
40
|
+
"\u00DAps, \u00FEa\u00F0 hefur komi\u00F0 upp villa. M\u00E1 bj\u00F3\u00F0a \u00FE\u00E9r a\u00F0 pr\u00F3fa aftur a\u00F0 leita?",
|
|
41
|
+
react_1.default.createElement("br", null),
|
|
42
|
+
"Ef ekkert l\u00E1t er \u00E1 villunni \u00FE\u00E1 kunnum vi\u00F0 a\u00F0 meta a\u00F0 \u00FE\u00FA l\u00E1tir okkur vita."));
|
|
44
43
|
const defaultTexts = {
|
|
45
44
|
en: {
|
|
46
45
|
lang: 'en',
|
|
@@ -65,11 +64,9 @@ const SearchResults_Tabs = (props) => {
|
|
|
65
64
|
label,
|
|
66
65
|
badge: (0, prettyNum_1.prettyNum)(count, { lang }),
|
|
67
66
|
})), [filters, lang]);
|
|
68
|
-
return tabs.length ? (
|
|
67
|
+
return tabs.length ? (react_1.default.createElement(Tabs_1.default, { role: "tablist", "aria-controls": domid, tabs: tabs, activeIdx: activeIdx || 0, onSetActive: (i) => setFilter && setFilter(i) })) : null;
|
|
69
68
|
};
|
|
70
|
-
const LoadingScaffold = (props) => props.count ? (
|
|
71
|
-
{(0, range_1.default)(1, props.count).map((item, i) => (<_SearchResultsItem_1.default key={i} title="..." summary="" href=""/>))}
|
|
72
|
-
</ol>) : null;
|
|
69
|
+
const LoadingScaffold = (props) => props.count ? (react_1.default.createElement("ol", { className: "SearchResults__list SearchResults__list--loading" }, (0, range_1.default)(1, props.count).map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.default, { key: i, title: "...", summary: "", href: "" }))))) : null;
|
|
73
70
|
// ===========================================================================
|
|
74
71
|
const NUM_AUTOLOADS = 2;
|
|
75
72
|
const SearchResults__loadmore = (props) => {
|
|
@@ -89,58 +86,52 @@ const SearchResults__loadmore = (props) => {
|
|
|
89
86
|
}
|
|
90
87
|
}, [theEndIsNigh, loadMore]);
|
|
91
88
|
const moreAvailable = status === 'results' && moreCount && loadMore;
|
|
92
|
-
return status === 'loadingmore' ? (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
return status === 'loadingmore' ? (react_1.default.createElement(LoadingScaffold, { count: Math.min(pageSize, moreCount) })) : moreAvailable ? (react_1.default.createElement("button", { ref: refFn, className: "SearchResults__loadmore", type: "button", onClick: loadMore },
|
|
90
|
+
texts.loadMore,
|
|
91
|
+
' ',
|
|
92
|
+
react_1.default.createElement("span", { className: "SearchResults__loadmore__count" },
|
|
93
|
+
"(",
|
|
94
|
+
(0, prettyNum_1.prettyNum)(moreCount, { lang }),
|
|
95
|
+
")"))) : null;
|
|
98
96
|
};
|
|
99
97
|
// ===========================================================================
|
|
100
98
|
const renderTitle = (props, texts) => {
|
|
101
99
|
const { status, totalHits, query } = props;
|
|
102
100
|
const lang = texts.lang || props.lang || i18n_1.DEFAULT_LANG;
|
|
103
|
-
return (
|
|
104
|
-
|
|
101
|
+
return (react_1.default.createElement("h2", { className: "SearchResults__title" },
|
|
102
|
+
status === 'loadingquery'
|
|
105
103
|
? texts.loadQueryTitle
|
|
106
104
|
: totalHits
|
|
107
105
|
? (0, prettyNum_1.prettyNum)(totalHits, { lang: lang }) +
|
|
108
106
|
' ' +
|
|
109
107
|
texts.resultsTitle
|
|
110
|
-
: texts.noResultsTitle
|
|
111
|
-
|
|
112
|
-
</h2>);
|
|
108
|
+
: texts.noResultsTitle,
|
|
109
|
+
react_1.default.createElement("span", { className: "SearchResults__query" }, query)));
|
|
113
110
|
};
|
|
114
111
|
// ---------------------------------------------------------------------------
|
|
115
112
|
const renderResults = (props) => {
|
|
116
113
|
const { status, pageSize, items, hits } = props;
|
|
117
114
|
if (status === 'loadingquery' || status === 'loadingfilter') {
|
|
118
|
-
return
|
|
115
|
+
return react_1.default.createElement(LoadingScaffold, { count: Math.min(pageSize, hits || 999) });
|
|
119
116
|
}
|
|
120
|
-
return items && items.length ? (
|
|
121
|
-
{items.map((item, i) => (<_SearchResultsItem_1.default key={i} {...item}/>))}
|
|
122
|
-
</ol>) : null;
|
|
117
|
+
return items && items.length ? (react_1.default.createElement("ol", { className: "SearchResults__list" }, items.map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.default, Object.assign({ key: i }, item)))))) : null;
|
|
123
118
|
};
|
|
124
119
|
// ---------------------------------------------------------------------------
|
|
125
120
|
const renderLoadMore = (props, texts) => {
|
|
126
121
|
const { hits, items, status, pageSize, loadMore } = props;
|
|
127
|
-
return (
|
|
122
|
+
return (react_1.default.createElement(SearchResults__loadmore, { hits: hits, numItems: items && items.length, status: status, pageSize: pageSize, loadMore: loadMore, texts: texts }));
|
|
128
123
|
};
|
|
129
124
|
// TODO: add plural translation thingy for result string
|
|
130
125
|
const SearchResults = (props) => {
|
|
131
126
|
const { filters, activeFilterIdx, setFilter, status, errorText } = props;
|
|
132
127
|
const texts = (0, i18n_1.getTexts)(props, defaultTexts);
|
|
133
128
|
const domid = (0, hooks_1.useDomid)();
|
|
134
|
-
return (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
{status === 'error' && (<Alert_1.default type="error">{errorText || renderDefaultErrorText()}</Alert_1.default>)}
|
|
142
|
-
{renderLoadMore(props, texts)}
|
|
143
|
-
</div>
|
|
144
|
-
</div>);
|
|
129
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('SearchResults', status !== 'results' && status) },
|
|
130
|
+
renderTitle(props, texts),
|
|
131
|
+
react_1.default.createElement(SearchResults_Tabs, { domid: domid, filters: filters, activeIdx: activeFilterIdx, setFilter: setFilter, lang: texts.lang }),
|
|
132
|
+
react_1.default.createElement("div", { className: "SearchResults__results", id: domid },
|
|
133
|
+
renderResults(props),
|
|
134
|
+
status === 'error' && (react_1.default.createElement(Alert_1.default, { type: "error" }, errorText || renderDefaultErrorText())),
|
|
135
|
+
renderLoadMore(props, texts))));
|
|
145
136
|
};
|
|
146
137
|
exports.default = SearchResults;
|
|
@@ -19,6 +19,6 @@ const seenEffect_1 = require("./utils/seenEffect");
|
|
|
19
19
|
const SeenEffect = (props) => {
|
|
20
20
|
const { effectType, startSeen } = props, divProps = __rest(props, ["effectType", "startSeen"]);
|
|
21
21
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
22
|
-
return
|
|
22
|
+
return react_1.default.createElement("div", Object.assign({}, divProps, { ref: ref }, (0, seenEffect_1.getEffectAttr)(effectType)));
|
|
23
23
|
};
|
|
24
24
|
exports.default = SeenEffect;
|
|
@@ -69,6 +69,6 @@ const Selectbox = (props) => {
|
|
|
69
69
|
setIsEmpty(!((_a = selectElm.selectedOptions[0]) === null || _a === void 0 ? void 0 : _a.text));
|
|
70
70
|
onChange && onChange(e);
|
|
71
71
|
};
|
|
72
|
-
return (
|
|
72
|
+
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)('Selectbox', null, className), ssr: ssr, small: small, label: label, empty: isEmpty, filled: isFilled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement(Selectbox_1.default, Object.assign({ bem: className.input, ssr: ssr, onChange: _onChange }, inputProps, addFocusProps(selectProps), { selectRef: selectRef }))) }));
|
|
73
73
|
};
|
|
74
74
|
exports.default = Selectbox;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
27
|
const shareButtonsUtils_1 = require("@reykjavik/hanna-utils/shareButtonsUtils");
|
|
28
|
-
const
|
|
28
|
+
const _Link_1 = require("./_abstract/_Link");
|
|
29
29
|
const generateTypeList = (facebook, twitter, linkedin, email) => {
|
|
30
30
|
const listStr = ((facebook ? 'facebook,' : '') +
|
|
31
31
|
(twitter ? 'twitter,' : '') +
|
|
@@ -40,11 +40,8 @@ const ShareButtons__item = (props) => {
|
|
|
40
40
|
const { label, type, href } = props;
|
|
41
41
|
const buttonText = (0, shareButtonsUtils_1.getShareButtonLabel)(type, label);
|
|
42
42
|
const popup = type !== 'email';
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
{buttonText}
|
|
46
|
-
</Link_1.Link>
|
|
47
|
-
</li>);
|
|
43
|
+
return (react_1.default.createElement("li", { className: "ShareButtons__item" },
|
|
44
|
+
react_1.default.createElement(_Link_1.Link, { className: 'ShareButtons__link ShareButtons__link--' + type, href: href, title: buttonText, rel: "noopener noreferrer", target: popup ? '_blank' : undefined, onClick: popup ? shareButtonsUtils_1.openInPopup : undefined }, buttonText)));
|
|
48
45
|
};
|
|
49
46
|
const ShareButtons = (props) => {
|
|
50
47
|
const { texts, ssr, facebook = true, twitter = true, linkedin, email, } = props;
|
|
@@ -64,7 +61,7 @@ const ShareButtons = (props) => {
|
|
|
64
61
|
const { label, buttonLabel } = txt;
|
|
65
62
|
if (!docMeta || ssr === 'ssr-only') {
|
|
66
63
|
// Generate SSR markup for hanna-sprinkles to pick up on.
|
|
67
|
-
return (
|
|
64
|
+
return (react_1.default.createElement("div", { className: "ShareButtons", "data-button-types": generateTypeList(facebook, twitter, linkedin, email), "data-label": label, "data-buttonlabel": buttonLabel, "data-emailsubject": txt.emailSubject || undefined }));
|
|
68
65
|
}
|
|
69
66
|
const showTypes = {
|
|
70
67
|
facebook,
|
|
@@ -72,11 +69,8 @@ const ShareButtons = (props) => {
|
|
|
72
69
|
linkedin,
|
|
73
70
|
email,
|
|
74
71
|
};
|
|
75
|
-
return (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{shareButtonsUtils_1.shareButtonTypes.map((type) => showTypes[type] && (<ShareButtons__item key={type} type={type} label={buttonLabel || ''} href={docMeta.hrefs[type]}/>))}
|
|
79
|
-
</ul>
|
|
80
|
-
</div>);
|
|
72
|
+
return (react_1.default.createElement("div", { className: "ShareButtons", "aria-label": label, "data-sprinkled": "true" },
|
|
73
|
+
label && react_1.default.createElement("strong", { className: "ShareButtons__label" }, label),
|
|
74
|
+
react_1.default.createElement("ul", { className: "ShareButtons__list" }, shareButtonsUtils_1.shareButtonTypes.map((type) => showTypes[type] && (react_1.default.createElement(ShareButtons__item, { key: type, type: type, label: buttonLabel || '', href: docMeta.hrefs[type] }))))));
|
|
81
75
|
};
|
|
82
76
|
exports.default = ShareButtons;
|
|
@@ -22,6 +22,6 @@ const Sharpie = (props) => {
|
|
|
22
22
|
const { color, tag, children } = props;
|
|
23
23
|
const colorModifier = colors[color] ? color : 'green';
|
|
24
24
|
const Tag = tag && tags[tag] ? tag : 'span';
|
|
25
|
-
return
|
|
25
|
+
return react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('Sharpie', colorModifier) }, children);
|
|
26
26
|
};
|
|
27
27
|
exports.default = Sharpie;
|
|
@@ -63,7 +63,7 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
63
63
|
const [value, setValue] = (0, react_1.useState)('');
|
|
64
64
|
const inputRef = (0, react_1.createRef)();
|
|
65
65
|
const txt = (0, i18n_1.getTexts)(props, exports.defaultSiteSearchACTexts);
|
|
66
|
-
return (
|
|
66
|
+
return (react_1.default.createElement(react_autosuggest_1.default, { theme: {
|
|
67
67
|
container: bem,
|
|
68
68
|
containerOpen: bem + '--open',
|
|
69
69
|
suggestionsContainer: bem + '__container',
|
|
@@ -71,19 +71,17 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
71
71
|
suggestionsList: bem + '__list',
|
|
72
72
|
suggestion: bem + '__item',
|
|
73
73
|
suggestionHighlighted: bem + '__item--highlighted',
|
|
74
|
-
}
|
|
75
|
-
{children}
|
|
76
|
-
</div>)} inputProps={{
|
|
74
|
+
}, focusInputOnSuggestionClick: true, suggestions: suggestions, onSuggestionsClearRequested: () => setSuggestions([]), onSuggestionsFetchRequested: onSuggestionsFetchRequested, getSuggestionValue: getSuggestionValue, onSuggestionSelected: onSuggestionSelected, onSuggestionHighlighted: onSuggestionHighlighted, renderSuggestion: renderSuggestion, containerProps: { 'aria-label': txt.label }, renderSuggestionsContainer: ({ containerProps, children }) => (react_1.default.createElement("div", Object.assign({}, containerProps, { "aria-label": txt.suggestionsLabel }), children)), inputProps: {
|
|
77
75
|
ref: inputRef,
|
|
78
76
|
value: value,
|
|
79
77
|
onChange: (_, { newValue }) => {
|
|
80
78
|
setValue(newValue);
|
|
81
79
|
},
|
|
82
|
-
}
|
|
80
|
+
}, renderInputComponent: (inputProps) => {
|
|
83
81
|
/* prettier-ignore */
|
|
84
82
|
const { className, type, disabled, readOnly, required, children } = inputProps, //eslint-disable-line @typescript-eslint/no-unused-vars
|
|
85
83
|
siteSearchProps = __rest(inputProps, ["className", "type", "disabled", "readOnly", "required", "children"]);
|
|
86
|
-
return (
|
|
87
|
-
}}
|
|
84
|
+
return (react_1.default.createElement(SiteSearchInput_1.default, Object.assign({}, siteSearchProps, { label: props.label || txt.inputLabel, placeholder: txt.placeholder, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
|
|
85
|
+
} }));
|
|
88
86
|
};
|
|
89
87
|
exports.default = SiteSearchAutocomplete;
|