@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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TogglerGroupField from './_abstract/_TogglerGroupField';
|
|
3
|
+
import TogglerInput from './_abstract/_TogglerInput';
|
|
4
|
+
const CheckboxButton = (props) => (React.createElement(TogglerInput, Object.assign({ bem: "CheckboxButton" }, props, { type: "checkbox" })));
|
|
5
|
+
const CheckboxButtonsGroup = (props) => {
|
|
6
|
+
if (props.layout) {
|
|
7
|
+
console.warn('`CheckboxButtonsGroupProps.layout` is deprecated.');
|
|
8
|
+
}
|
|
9
|
+
if (props.columns) {
|
|
10
|
+
console.warn('`CheckboxButtonsGroupProps.columns` is deprecated.');
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement(TogglerGroupField, Object.assign({}, props, { bem: "CheckboxButtonsGroup", Toggler: CheckboxButton })));
|
|
13
|
+
};
|
|
14
|
+
export default CheckboxButtonsGroup;
|
package/esm/CheckboxGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/
|
|
1
|
+
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
2
|
export declare type CheckboxGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
layout?: 'inline';
|
|
4
4
|
value?: Array<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TogglerGroupField from './_abstract/_TogglerGroupField';
|
|
3
|
+
import Checkbox from './Checkbox';
|
|
4
|
+
const CheckboxGroup = (props) => {
|
|
5
|
+
return (React.createElement(TogglerGroupField, Object.assign({}, props, { bem: "CheckboxGroup", modifier: props.layout, Toggler: Checkbox })));
|
|
6
|
+
};
|
|
7
|
+
export default CheckboxGroup;
|
package/esm/CityBlock.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 types: {
|
|
@@ -13,6 +13,6 @@ const CityBlock = (props) => {
|
|
|
13
13
|
const imageProps = props.illustration != null
|
|
14
14
|
? { src: getIllustrationUrl(props.illustration) }
|
|
15
15
|
: props.image;
|
|
16
|
-
return (
|
|
16
|
+
return (React.createElement(Block, { bem: "CityBlock", modifier: modifier, content: props.content, image: imageProps, startSeen: props.startSeen }));
|
|
17
17
|
};
|
|
18
18
|
export default CityBlock;
|
|
@@ -4,7 +4,7 @@ import { useDomid, useIsBrowserSide } from '@hugsmidjan/react/hooks';
|
|
|
4
4
|
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
5
5
|
import { getPageScrollElm } from '@reykjavik/hanna-utils';
|
|
6
6
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
7
|
-
import { Link } from './_abstract/
|
|
7
|
+
import { Link } from './_abstract/_Link';
|
|
8
8
|
export const defaultTexts = {
|
|
9
9
|
is: {
|
|
10
10
|
lang: 'is',
|
|
@@ -116,10 +116,9 @@ const ContactBubble = (props) => {
|
|
|
116
116
|
if (links.length === 0) {
|
|
117
117
|
return null;
|
|
118
118
|
}
|
|
119
|
-
const menu = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{links.map((linkInfo, i) => {
|
|
119
|
+
const menu = (React.createElement("div", { className: "ContactBubble", id: isBrowser && domid, hidden: isBrowser && !open, "data-always-show": alwaysShow || undefined, "data-sprinkled": isBrowser },
|
|
120
|
+
React.createElement("h2", { className: "ContactBubble__title" }, title || txt.openBtn),
|
|
121
|
+
React.createElement("ul", { className: "ContactBubble__list" }, links.map((linkInfo, i) => {
|
|
123
122
|
const { href, label, extraLabel, target, onClick } = linkInfo;
|
|
124
123
|
const icon = ensureIcon(linkInfo.icon);
|
|
125
124
|
const itemClass = getBemClass('ContactBubble__item', icon && 'type--' + icon);
|
|
@@ -134,29 +133,16 @@ const ContactBubble = (props) => {
|
|
|
134
133
|
' ',
|
|
135
134
|
label,
|
|
136
135
|
'\n',
|
|
137
|
-
extraLabel &&
|
|
136
|
+
extraLabel && React.createElement("small", { key: "\uD83E\uDD21" }, extraLabel),
|
|
138
137
|
'\n',
|
|
139
138
|
];
|
|
140
|
-
return (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</ul>
|
|
149
|
-
{'\n\n'}
|
|
150
|
-
{isBrowser && (<button className="ContactBubble__closebtn" aria-controls={domid} aria-label={txt.closeBtnLong} onClick={() => closeBubble()} type="button">
|
|
151
|
-
{txt.closeBtn}
|
|
152
|
-
</button>)}
|
|
153
|
-
</div>);
|
|
154
|
-
return isBrowser ? (<div className="ContactBubble__wrapper" ref={wrapperRef}>
|
|
155
|
-
<button className="ContactBubble__openbtn" aria-controls={domid} aria-expanded={open} aria-label={txt.openBtnLong} onClick={open ? () => closeBubble() : openBubble} type="button">
|
|
156
|
-
{txt.openBtn}
|
|
157
|
-
</button>
|
|
158
|
-
{'\n\n'}
|
|
159
|
-
{menu}
|
|
160
|
-
</div>) : (menu);
|
|
139
|
+
return (React.createElement("li", { key: i, className: itemClass }, href && href !== '#' ? (React.createElement(Link, { className: "ContactBubble__link", href: href, onClick: onClickHandler, target: target }, content)) : (React.createElement("button", { className: "ContactBubble__link", onClick: onClickHandler, type: "button" }, content))));
|
|
140
|
+
})),
|
|
141
|
+
'\n\n',
|
|
142
|
+
isBrowser && (React.createElement("button", { className: "ContactBubble__closebtn", "aria-controls": domid, "aria-label": txt.closeBtnLong, onClick: () => closeBubble(), type: "button" }, txt.closeBtn))));
|
|
143
|
+
return isBrowser ? (React.createElement("div", { className: "ContactBubble__wrapper", ref: wrapperRef },
|
|
144
|
+
React.createElement("button", { className: "ContactBubble__openbtn", "aria-controls": domid, "aria-expanded": open, "aria-label": txt.openBtnLong, onClick: open ? () => closeBubble() : openBubble, type: "button" }, txt.openBtn),
|
|
145
|
+
'\n\n',
|
|
146
|
+
menu)) : (menu);
|
|
161
147
|
};
|
|
162
148
|
export default ContactBubble;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSeenEffect } from './utils/seenEffect';
|
|
3
|
+
import ArticleMeta from './ArticleMeta';
|
|
4
|
+
import ContentImage from './ContentImage';
|
|
5
|
+
import Heading from './Heading';
|
|
6
|
+
import RelatedLinks from './RelatedLinks';
|
|
7
|
+
import TextBlock from './TextBlock';
|
|
8
|
+
import VSpacer from './VSpacer';
|
|
9
|
+
const ContentArticle = (props) => {
|
|
10
|
+
const [ref] = useSeenEffect(props.startSeen);
|
|
11
|
+
return (React.createElement("div", { className: "ContentArticle", ref: ref },
|
|
12
|
+
React.createElement(ArticleMeta, { items: props.meta }),
|
|
13
|
+
React.createElement(Heading, null, props.headline),
|
|
14
|
+
React.createElement(TextBlock, { startSeen: true },
|
|
15
|
+
props.topImage && React.createElement(ContentImage, Object.assign({}, props.topImage)),
|
|
16
|
+
props.body),
|
|
17
|
+
React.createElement(VSpacer, { size: "small" },
|
|
18
|
+
React.createElement("hr", null)),
|
|
19
|
+
props.relatedLinks && React.createElement(RelatedLinks, Object.assign({}, props.relatedLinks))));
|
|
20
|
+
};
|
|
21
|
+
export default ContentArticle;
|
package/esm/ContentImage.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Image from './_abstract/_Image';
|
|
3
|
+
const ContentImage = (props) => {
|
|
4
|
+
const { image, caption, credit } = props;
|
|
5
|
+
return (React.createElement("figure", { className: "ContentImage" },
|
|
6
|
+
(caption || credit) && (React.createElement("figcaption", { className: "ContentImage__caption" },
|
|
7
|
+
caption && React.createElement("span", { className: "ContentImage__text" },
|
|
8
|
+
" ",
|
|
9
|
+
caption,
|
|
10
|
+
" "),
|
|
11
|
+
' ',
|
|
12
|
+
credit && React.createElement("small", { className: "ContentImage__credit" },
|
|
13
|
+
" ",
|
|
14
|
+
credit,
|
|
15
|
+
" "))),
|
|
16
|
+
React.createElement(Image, Object.assign({ className: "ContentImage__image" }, image))));
|
|
17
|
+
};
|
|
18
|
+
export default ContentImage;
|
|
@@ -38,27 +38,26 @@ const Datepicker = (props) => {
|
|
|
38
38
|
const txts = (localeCode && i18n[localeCode]) || {};
|
|
39
39
|
const filled = !!value;
|
|
40
40
|
const empty = !filled && !placeholder;
|
|
41
|
-
return (
|
|
42
|
-
return (
|
|
41
|
+
return (React.createElement(FormField, { className: getBemClass('Datepicker', [], className), ssr: ssr, label: label, small: small, assistText: assistText, hideLabel: hideLabel, invalid: invalid, required: required, reqText: reqText, disabled: disabled, readOnly: readOnly, filled: filled, empty: empty, errorMessage: errorMessage, renderInput: (className, inputProps, addFocusProps) => {
|
|
42
|
+
return (React.createElement("div", { className: className.input, ref: inputRef &&
|
|
43
43
|
((elm) => {
|
|
44
44
|
inputRef.current =
|
|
45
45
|
(elm === null || elm === void 0 ? void 0 : elm.querySelector('input')) || undefined;
|
|
46
46
|
return elm;
|
|
47
|
-
})}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}}/>);
|
|
47
|
+
}) },
|
|
48
|
+
React.createElement(ReactDatePicker, Object.assign({ id: domid, required: inputProps.required, disabled: inputProps.disabled, readOnly: inputProps.readOnly, selected: value, locale: localeCode, dateFormat: dateFormat, onChange: (date) => {
|
|
49
|
+
onChange(date || undefined);
|
|
50
|
+
const inputElm = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
|
|
51
|
+
if (inputElm) {
|
|
52
|
+
inputElm.dispatchEvent(new Event('change', { bubbles: true }));
|
|
53
|
+
}
|
|
54
|
+
}, placeholderText: placeholder,
|
|
55
|
+
// TODO: Implement this
|
|
56
|
+
// selectsRange
|
|
57
|
+
minDate: minDate, maxDate: maxDate, startDate: startDate, endDate: endDate, selectsStart: isStartDate, selectsEnd: isEndDate, formatWeekDay: (weekday) => {
|
|
58
|
+
// TODO: if we use costom locale we don't need this
|
|
59
|
+
return weekday.charAt(0).toUpperCase();
|
|
60
|
+
}, showYearDropdown: true, scrollableYearDropdown: true, yearDropdownItemNumber: 15, showMonthDropdown: true }, inputProps, txts, addFocusProps(datepickerExtraProps)))));
|
|
61
|
+
} }));
|
|
63
62
|
};
|
|
64
63
|
export default Datepicker;
|
package/esm/ExtraLinks.d.ts
CHANGED
|
@@ -11,32 +11,24 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
14
|
-
import { CardList } from './_abstract/
|
|
15
|
-
import { Link } from './_abstract/
|
|
14
|
+
import { CardList } from './_abstract/_CardList';
|
|
15
|
+
import { Link } from './_abstract/_Link';
|
|
16
16
|
import { useSeenEffect } from './utils/seenEffect';
|
|
17
17
|
const ExtraLinks__related = (props) => {
|
|
18
18
|
const { relatedTitle, relatedLinks } = props;
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<Link className={getBemClass('ExtraLinks__related__link', type)} href={href} target={blank ? '_blank' : ''} rel={blank ? 'noreferrer noopener' : ''}>
|
|
25
|
-
{label}
|
|
26
|
-
</Link>
|
|
27
|
-
</li>))}
|
|
28
|
-
</ul>
|
|
29
|
-
</div>);
|
|
19
|
+
return (React.createElement("div", { className: "ExtraLinks__related" },
|
|
20
|
+
relatedTitle && React.createElement("h3", { className: "ExtraLinks__related__title" }, relatedTitle),
|
|
21
|
+
React.createElement("ul", { className: "ExtraLinks__related__list" }, relatedLinks &&
|
|
22
|
+
relatedLinks.map(({ href, label, blank = false, type }, i) => (React.createElement("li", { className: "ExtraLinks__related__item", key: i },
|
|
23
|
+
React.createElement(Link, { className: getBemClass('ExtraLinks__related__link', type), href: href, target: blank ? '_blank' : '', rel: blank ? 'noreferrer noopener' : '' }, label)))))));
|
|
30
24
|
};
|
|
31
25
|
const ExtraLinks = (props) => {
|
|
32
26
|
const { relatedTitle, relatedLinks, className, startSeen } = props, cardListProps = __rest(props, ["relatedTitle", "relatedLinks", "className", "startSeen"]);
|
|
33
27
|
const hasRelated = !!(relatedLinks && relatedLinks.length);
|
|
34
28
|
const [ref] = useSeenEffect(startSeen);
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{hasRelated && (<ExtraLinks__related relatedTitle={relatedTitle} relatedLinks={relatedLinks}/>)}
|
|
40
|
-
</div>);
|
|
29
|
+
return (React.createElement("div", { className: getBemClass('ExtraLinks', hasRelated && 'related', className), ref: ref },
|
|
30
|
+
React.createElement("div", { className: "ExtraLinks__main" },
|
|
31
|
+
React.createElement(CardList, Object.assign({}, cardListProps, { bemPrefix: "ExtraLinks" }))),
|
|
32
|
+
hasRelated && (React.createElement(ExtraLinks__related, { relatedTitle: relatedTitle, relatedLinks: relatedLinks }))));
|
|
41
33
|
};
|
|
42
34
|
export default ExtraLinks;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSeenEffect } from './utils/seenEffect';
|
|
3
|
+
import Bling from './Bling';
|
|
4
|
+
const FeatureList = (props) => {
|
|
5
|
+
const { title, features, startSeen } = props;
|
|
6
|
+
const [ref] = useSeenEffect(startSeen);
|
|
7
|
+
const _features = features.length ? features : [{ name: '...' }];
|
|
8
|
+
return (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement(Bling, { type: "snake-large", align: "left", vertical: "down-ish" }),
|
|
10
|
+
React.createElement("div", { className: "FeatureList", ref: ref },
|
|
11
|
+
React.createElement("h2", { className: "FeatureList__title" }, title),
|
|
12
|
+
React.createElement("ul", { className: "FeatureList__list" }, _features.map(({ name, icon, iconUrl }, i) => (React.createElement("li", { key: i, className: "FeatureList__feature", style: iconUrl
|
|
13
|
+
? { '--efnistakn': `url("${iconUrl}")` }
|
|
14
|
+
: undefined, "data-efnistakn": !iconUrl ? icon : undefined }, name)))))));
|
|
15
|
+
};
|
|
16
|
+
export default FeatureList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
|
+
const FieldGroup = (props) => {
|
|
4
|
+
const { legend, children, className, disabled } = props;
|
|
5
|
+
return (React.createElement("fieldset", { className: getBemClass('FieldGroup', null, className), role: "group", disabled: disabled },
|
|
6
|
+
React.createElement("legend", { className: "FieldGroup__legend" }, legend),
|
|
7
|
+
children));
|
|
8
|
+
};
|
|
9
|
+
export default FieldGroup;
|
|
@@ -128,30 +128,27 @@ const FileInput = (props) => {
|
|
|
128
128
|
inputRef.current.files = arrayToFileList([]);
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
const filesList = files.map((file) => (
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{filesList.length ? <ul className="FileInput__filelist">{filesList}</ul> : ''}
|
|
154
|
-
</div>);
|
|
155
|
-
}}/>);
|
|
131
|
+
const filesList = files.map((file) => (React.createElement("li", { key: file.name, className: "FileInput__file" },
|
|
132
|
+
React.createElement("button", { className: "FileInput__file-remove", type: "button", onClick: () => removeFile(file.name), "aria-label": removeFileText }, removeFileText),
|
|
133
|
+
React.createElement("span", { className: "FileInput__fileinfo" },
|
|
134
|
+
showImagePreviews && file.preview && (React.createElement(React.Fragment, null,
|
|
135
|
+
React.createElement("span", { className: "FileInput__preview" },
|
|
136
|
+
React.createElement("img", { src: file.preview })),
|
|
137
|
+
' ')),
|
|
138
|
+
React.createElement("span", { className: "FileInput__filename" }, file.name),
|
|
139
|
+
showFileSize && (React.createElement("small", { className: "FileInput__filesize" },
|
|
140
|
+
" - (",
|
|
141
|
+
formatBytes(file.size),
|
|
142
|
+
")"))))));
|
|
143
|
+
return (React.createElement(FormField, { className: getBemClass('FileInput', [dropzoneProps.multiple && 'multi'], className), label: label, id: domid + '-fake', LabelTag: "h4", assistText: assistText, hideLabel: hideLabel, disabled: disabled, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, renderInput: (className, inputProps /* , addFocusProps */) => {
|
|
144
|
+
return (React.createElement("div", { className: className.control, ref: fileInputWrapper },
|
|
145
|
+
React.createElement("input", { className: "FileInput__input", name: inputElementProps.name, id: domid, ref: fileInput, type: "file", style: { display: 'none' }, multiple: dropzoneProps.multiple || undefined, required: inputProps.required }),
|
|
146
|
+
' ',
|
|
147
|
+
React.createElement("input", Object.assign({ className: "FileInput__input--fake" }, getInputProps(), { tabIndex: undefined, style: undefined, multiple: dropzoneProps.multiple || undefined }, inputProps, { required: undefined })),
|
|
148
|
+
' ',
|
|
149
|
+
React.createElement("div", Object.assign({ className: getBemClass('FileInput__dropzone', [isHover && 'highlight']) }, getRootProps({ isDragReject }), { tabIndex: undefined }),
|
|
150
|
+
React.createElement("p", { className: "FileInput__droptext" }, dropzoneText)),
|
|
151
|
+
filesList.length ? React.createElement("ul", { className: "FileInput__filelist" }, filesList) : ''));
|
|
152
|
+
} }));
|
|
156
153
|
};
|
|
157
154
|
export default FileInput;
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from './_abstract/_Link';
|
|
3
|
+
const FooterBadges = (props) => {
|
|
4
|
+
if (!props.badges.length) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
return (React.createElement("ul", { className: "FooterBadges" }, props.badges.map(({ altText, src, href }, i) => (React.createElement("li", { key: i, className: "FooterBadges__badge" }, href ? (React.createElement(Link, { href: href },
|
|
8
|
+
' ',
|
|
9
|
+
React.createElement("img", { src: src, alt: altText }),
|
|
10
|
+
' ')) : (React.createElement("img", { src: src, alt: altText })))))));
|
|
11
|
+
};
|
|
12
|
+
export default FooterBadges;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
|
+
const FooterInfo = (props) => {
|
|
4
|
+
const { boxes } = props;
|
|
5
|
+
return (React.createElement("div", { className: "FooterInfo" }, boxes.map((group, i) => (React.createElement("div", { className: getBemClass('FooterInfo__group', group.modifier), role: group.role, key: i },
|
|
6
|
+
React.createElement("h3", { className: "FooterInfo__grouptitle" }, group.title),
|
|
7
|
+
group.content ? (React.createElement("div", { className: getBemClass('FooterInfo__groupcontent', group.modifier) }, group.content)) : (React.createElement("div", { className: getBemClass('FooterInfo__groupcontent', group.modifier), dangerouslySetInnerHTML: { __html: group.html } })))))));
|
|
8
|
+
};
|
|
9
|
+
export default FooterInfo;
|
package/esm/Footnote.js
ADDED
package/esm/{Form.jsx → Form.js}
RENAMED
|
@@ -2,11 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
3
|
const Form = (props) => {
|
|
4
4
|
const { children, align, wide } = props;
|
|
5
|
-
return (
|
|
5
|
+
return (React.createElement("form", Object.assign({}, props, { className: getBemClass('Form', [
|
|
6
6
|
align === 'right' && 'align--' + align,
|
|
7
7
|
!align && wide && 'wide',
|
|
8
|
-
])}
|
|
9
|
-
{children}
|
|
10
|
-
</form>);
|
|
8
|
+
]) }), children));
|
|
11
9
|
};
|
|
12
10
|
export default Form;
|
|
@@ -50,11 +50,9 @@ const FormField = (props) => {
|
|
|
50
50
|
const errorId = errorMessage ? 'error:' + domid : undefined;
|
|
51
51
|
const assistTextId = assistText ? 'assist:' + domid : undefined;
|
|
52
52
|
const labelId = LabelTag ? 'label:' + domid : undefined;
|
|
53
|
-
const reqStar = required && reqText !== false && (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
</abbr>);
|
|
53
|
+
const reqStar = required && reqText !== false && (React.createElement("abbr", { className: 'FormField__label__reqstar',
|
|
54
|
+
// TODO: add mo-better i18n thinking
|
|
55
|
+
title: (reqText || 'Þarf að fylla út') + ': ' }, "*"));
|
|
58
56
|
const inputProps = {
|
|
59
57
|
id: domid,
|
|
60
58
|
disabled: disabled,
|
|
@@ -64,7 +62,7 @@ const FormField = (props) => {
|
|
|
64
62
|
'aria-describedby': assistTextId && errorId ? assistTextId + ' ' + errorId : assistTextId || errorId,
|
|
65
63
|
'aria-labelledby': labelId, // undefined if normalLabel
|
|
66
64
|
};
|
|
67
|
-
return (
|
|
65
|
+
return (React.createElement("div", { className: getBemClass('FormField', [
|
|
68
66
|
small && 'small',
|
|
69
67
|
hideLabel && 'nolabel',
|
|
70
68
|
isInvalid && 'invalid',
|
|
@@ -73,21 +71,21 @@ const FormField = (props) => {
|
|
|
73
71
|
isBrowser && empty && 'empty',
|
|
74
72
|
isBrowser && filled && 'filled',
|
|
75
73
|
isBrowser && focused && 'focused',
|
|
76
|
-
], className)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
], className), role: group ? 'group' : undefined, ref: props.wrapperRef },
|
|
75
|
+
LabelTag ? (React.createElement(LabelTag, { className: 'FormField__label', id: labelId },
|
|
76
|
+
' ',
|
|
77
|
+
reqStar,
|
|
78
|
+
" ",
|
|
79
|
+
label,
|
|
80
|
+
' ')) : (React.createElement("label", { className: 'FormField__label', htmlFor: domid },
|
|
81
|
+
' ',
|
|
82
|
+
reqStar,
|
|
83
|
+
" ",
|
|
84
|
+
label,
|
|
85
|
+
' ')),
|
|
86
|
+
' ',
|
|
87
|
+
renderInput(inputClassNames, inputProps, addFocusProps, isBrowser),
|
|
88
|
+
assistText && (React.createElement("div", { id: assistTextId, className: 'FormField__assist' }, assistText)),
|
|
89
|
+
errorMessage && (React.createElement("div", { id: errorId, className: 'FormField__error' }, errorMessage))));
|
|
92
90
|
};
|
|
93
91
|
export default FormField;
|
|
@@ -10,22 +10,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
|
-
import Button from '../_abstract/
|
|
14
|
-
import Image from '../_abstract/
|
|
13
|
+
import Button from '../_abstract/_Button';
|
|
14
|
+
import Image from '../_abstract/_Image';
|
|
15
15
|
import GalleryModalContext from './_GalleryModalContext';
|
|
16
16
|
const GalleryItem = (props) => {
|
|
17
17
|
const { caption, description, largeImageSrc } = props, image = __rest(props, ["caption", "description", "largeImageSrc"]);
|
|
18
18
|
const { setCurrentImage } = useContext(GalleryModalContext);
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return (React.createElement("figure", { className: "GalleryItem" },
|
|
20
|
+
React.createElement("figcaption", { className: "GalleryItem__caption" }, caption),
|
|
21
|
+
largeImageSrc ? (React.createElement(Button, { bem: "GalleryItem__button", href: largeImageSrc, onClick: (e) => {
|
|
22
22
|
e.preventDefault();
|
|
23
23
|
setCurrentImage(Object.assign(Object.assign({}, image), { caption, description, largeImageSrc }));
|
|
24
|
-
}}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</figure>);
|
|
24
|
+
} },
|
|
25
|
+
' ',
|
|
26
|
+
React.createElement(Image, Object.assign({ className: "GalleryItem__image" }, image)),
|
|
27
|
+
' ')) : (React.createElement(Image, Object.assign({ className: "GalleryItem__image" }, image))),
|
|
28
|
+
description && React.createElement("div", { className: "GalleryItem__description" }, description)));
|
|
30
29
|
};
|
|
31
30
|
export default GalleryItem;
|
|
@@ -38,21 +38,17 @@ const GalleryModal = (props) => {
|
|
|
38
38
|
// FIXME: This if weirdly inefficient. Either memoize,
|
|
39
39
|
// or do a simpler single-property comparison.
|
|
40
40
|
objectIsSame(objectClean(image), objectClean(item)));
|
|
41
|
-
return (
|
|
41
|
+
return (React.createElement(Modal, { open: true, onClosed: () => {
|
|
42
42
|
setCurrentImage(undefined);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
prev: texts.modalPrevLabel,
|
|
54
|
-
}}/>
|
|
55
|
-
</>
|
|
56
|
-
</Modal>);
|
|
43
|
+
}, startOpen: false, bem: "GalleryModal", texts: { closeButton: texts.modalCloseLabel } },
|
|
44
|
+
React.createElement(React.Fragment, null,
|
|
45
|
+
React.createElement(CSSTransition, { in: animated, timeout: 200, onEntered: () => {
|
|
46
|
+
setAnimated(!animated);
|
|
47
|
+
}, classNames: "GalleryModalItem--" },
|
|
48
|
+
React.createElement(GalleryModalItem, Object.assign({}, image))),
|
|
49
|
+
React.createElement(CarouselPaging, { bem: "GalleryModalPager", itemCount: items.length, current: imageIndex, setCurrent: updateImage, texts: {
|
|
50
|
+
next: texts.modalNextLabel,
|
|
51
|
+
prev: texts.modalPrevLabel,
|
|
52
|
+
} }))));
|
|
57
53
|
};
|
|
58
54
|
export default GalleryModal;
|
|
@@ -10,15 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import Image from '../_abstract/
|
|
13
|
+
import Image from '../_abstract/_Image';
|
|
14
14
|
const GalleryModalItem = (props) => {
|
|
15
15
|
const { caption, description } = props, image = __rest(props, ["caption", "description"]);
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<Image className="GalleryModalItem__image" src={image.largeImageSrc || image.src}/>
|
|
22
|
-
</div>);
|
|
16
|
+
return (React.createElement("div", { className: "GalleryModalItem" },
|
|
17
|
+
(caption || description) && (React.createElement("div", { className: "GalleryModalItem__text" },
|
|
18
|
+
React.createElement("div", { className: "GalleryModalItem__caption" }, caption),
|
|
19
|
+
React.createElement("div", { className: "GalleryModalItem__description" }, description))),
|
|
20
|
+
React.createElement(Image, { className: "GalleryModalItem__image", src: image.largeImageSrc || image.src })));
|
|
23
21
|
};
|
|
24
22
|
export default GalleryModalItem;
|
|
@@ -20,9 +20,8 @@ const Gallery = (props) => {
|
|
|
20
20
|
const { items, ssr, startSeen } = props;
|
|
21
21
|
const texts = getTexts(props, defaultTexts);
|
|
22
22
|
const [modalImage, setModalImage] = useState(undefined);
|
|
23
|
-
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</GalleryModalContext.Provider>);
|
|
23
|
+
return (React.createElement(GalleryModalContext.Provider, { value: { items, setCurrentImage: setModalImage, currentImage: modalImage } },
|
|
24
|
+
React.createElement(AbstractCarousel, { bem: "Gallery", items: items, Component: GalleryItem, ssr: ssr, startSeen: startSeen }),
|
|
25
|
+
React.createElement(GalleryModal, Object.assign({}, modalImage, { texts: texts }))));
|
|
27
26
|
};
|
|
28
27
|
export default Gallery;
|
package/esm/GridBlocks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Efnistakn } 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
|
export declare type GridBlockItem = {
|
|
6
6
|
title: string;
|