@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
|
@@ -8,27 +8,25 @@ const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemCla
|
|
|
8
8
|
const useGetSVGtext_1 = require("../utils/useGetSVGtext");
|
|
9
9
|
// eslint-disable-next-line complexity
|
|
10
10
|
const Image = (props) => {
|
|
11
|
-
const { src, altText = '', sources = [], preloadSrc, className, inline, placeholder, } = props;
|
|
11
|
+
const { src, altText = '', sources = [], preloadSrc, className, inline, placeholder, focalPoint, } = props;
|
|
12
12
|
const _src = (sources.length && preloadSrc) || src;
|
|
13
13
|
const imageSrc = _src || (sources[0] != null ? sources[0].srcset.split(' ')[0] : undefined);
|
|
14
14
|
const imgLoading = preloadSrc ? 'eager' : 'lazy';
|
|
15
15
|
const inlineSvg = (0, useGetSVGtext_1.useGetSVGtext)(inline ? imageSrc : undefined);
|
|
16
16
|
if (!imageSrc) {
|
|
17
|
-
return placeholder ? (
|
|
18
|
-
{placeholder !== true && placeholder()}
|
|
19
|
-
</span>) : null;
|
|
17
|
+
return placeholder ? (react_1.default.createElement("span", { className: className && (0, getBemClass_1.default)(className, 'missing') }, placeholder !== true && placeholder())) : null;
|
|
20
18
|
}
|
|
21
19
|
if (inline && inlineSvg) {
|
|
22
20
|
const __html = inlineSvg.imageSrc === imageSrc ? inlineSvg.code : '';
|
|
23
|
-
return
|
|
21
|
+
return react_1.default.createElement("span", { className: className, dangerouslySetInnerHTML: { __html } });
|
|
24
22
|
}
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
return (react_1.default.createElement("picture", { className: className, style: focalPoint ? { '--focalPoint': focalPoint } : undefined },
|
|
24
|
+
' ',
|
|
25
|
+
sources.map((source, i) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
26
|
+
react_1.default.createElement("source", { key: i, srcSet: source.srcset, media: source.media }),
|
|
27
|
+
' '))),
|
|
28
|
+
' ',
|
|
29
|
+
react_1.default.createElement("img", { src: imageSrc, alt: altText, loading: imgLoading }),
|
|
30
|
+
' '));
|
|
33
31
|
};
|
|
34
32
|
exports.default = Image;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports._Quote = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const _Link_1 = require("./_Link");
|
|
9
|
+
const _Quote = (props) => {
|
|
10
|
+
const { bem, children, by, byHref } = props;
|
|
11
|
+
return (react_1.default.createElement("figure", { className: bem },
|
|
12
|
+
react_1.default.createElement("blockquote", { className: bem + '__quote' }, children),
|
|
13
|
+
by && (react_1.default.createElement("figcaption", { className: bem + '__by' }, byHref ? (react_1.default.createElement(_Link_1.Link, { href: byHref }, by)) : typeof by === 'string' ? (react_1.default.createElement("span", null, by)) : (by)))));
|
|
14
|
+
};
|
|
15
|
+
exports._Quote = _Quote;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 TogglerGroup = (props) => {
|
|
9
|
+
const {
|
|
10
|
+
// id,
|
|
11
|
+
className, bem, name, disabled, Toggler, onSelected, options, inputProps = {}, } = props;
|
|
12
|
+
const values = props.value || [];
|
|
13
|
+
return (react_1.default.createElement("ul", { className: (0, getBemClass_1.default)(bem, null, className), role: "group", "aria-labelledby": props['aria-labelledby'], "aria-describedby": props['aria-describedby'], "aria-required": props.required }, options.map((option, i) => {
|
|
14
|
+
const isDisabled = option.disabled != null
|
|
15
|
+
? option.disabled
|
|
16
|
+
: disabled && typeof disabled !== 'boolean'
|
|
17
|
+
? disabled.includes(i)
|
|
18
|
+
: disabled;
|
|
19
|
+
const isChecked = values.includes(option.value);
|
|
20
|
+
return (react_1.default.createElement(Toggler, Object.assign({ key: i }, inputProps, { className: bem + '__item', name: name, Wrapper: "li" }, option, { label: option.label || option.value, onChange: onSelected
|
|
21
|
+
? (e) => {
|
|
22
|
+
const { value } = option;
|
|
23
|
+
const checked = e.currentTarget.checked;
|
|
24
|
+
inputProps.onChange && inputProps.onChange(e);
|
|
25
|
+
const selectedValues = values.filter((val) => val !== value);
|
|
26
|
+
if (checked) {
|
|
27
|
+
selectedValues.push(value);
|
|
28
|
+
}
|
|
29
|
+
onSelected({ value, checked, option, selectedValues });
|
|
30
|
+
}
|
|
31
|
+
: inputProps.onChange, disabled: isDisabled, "aria-invalid": props['aria-invalid'], checked: isChecked })));
|
|
32
|
+
})));
|
|
33
|
+
};
|
|
34
|
+
exports.default = TogglerGroup;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
3
3
|
import { FormFieldGroupWrappingProps } from '../FormField';
|
|
4
|
-
import { TogglerGroupOption, TogglerGroupOptions, TogglerGroupProps } from './
|
|
5
|
-
import { TogglerInputProps } from './
|
|
4
|
+
import { TogglerGroupOption, TogglerGroupOptions, TogglerGroupProps } from './_TogglerGroup';
|
|
5
|
+
import { TogglerInputProps } from './_TogglerInput';
|
|
6
6
|
export declare type TogglerGroupFieldProps = {
|
|
7
7
|
className?: string;
|
|
8
8
|
} & FormFieldGroupWrappingProps & TogglerGroupProps;
|
|
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
19
19
|
const FormField_1 = __importDefault(require("../FormField"));
|
|
20
|
-
const
|
|
20
|
+
const _TogglerGroup_1 = __importDefault(require("./_TogglerGroup"));
|
|
21
21
|
const TogglerGroupField = (props) => {
|
|
22
22
|
const { bem, Toggler, className, modifier, label, LabelTag, assistText, hideLabel, disabled, readOnly, invalid, errorMessage, required, reqText, id, value } = props, togglerGroupProps = __rest(props, ["bem", "Toggler", "className", "modifier", "label", "LabelTag", "assistText", "hideLabel", "disabled", "readOnly", "invalid", "errorMessage", "required", "reqText", "id", "value"]);
|
|
23
|
-
return (
|
|
24
|
-
return (
|
|
25
|
-
}}
|
|
23
|
+
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)(bem, modifier, className), group: true, label: label, LabelTag: LabelTag, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps) => {
|
|
24
|
+
return (react_1.default.createElement(_TogglerGroup_1.default, Object.assign({ bem: className.options }, inputProps, togglerGroupProps, { value: Array.isArray(value) ? value : value != null ? [value] : undefined, Toggler: Toggler })));
|
|
25
|
+
} }));
|
|
26
26
|
};
|
|
27
27
|
exports.default = TogglerGroupField;
|
|
File without changes
|
|
@@ -21,20 +21,18 @@ const TogglerInput = (props) => {
|
|
|
21
21
|
const { bem, modifier, className, label, invalid, errorMessage, Wrapper = 'div', required, reqText, type, id } = props, inputProps = __rest(props, ["bem", "modifier", "className", "label", "invalid", "errorMessage", "Wrapper", "required", "reqText", "type", "id"]);
|
|
22
22
|
const domid = (0, hooks_1.useDomid)(id);
|
|
23
23
|
const errorId = errorMessage && 'error' + domid;
|
|
24
|
-
const reqStar = required && reqText !== false && (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>)}
|
|
38
|
-
</Wrapper>);
|
|
24
|
+
const reqStar = required && reqText !== false && (react_1.default.createElement("abbr", { className: bem + '__label__reqstar',
|
|
25
|
+
// TODO: add mo-better i18n thinking
|
|
26
|
+
title: (reqText || 'Þarf að haka í') + ': ' }, "*"));
|
|
27
|
+
return (react_1.default.createElement(Wrapper, { className: (0, getBemClass_1.default)(bem, modifier, className) },
|
|
28
|
+
react_1.default.createElement("input", Object.assign({ className: bem + '__input', type: type, id: domid, "aria-invalid": invalid || !!errorMessage || undefined, "aria-describedby": errorId }, inputProps)),
|
|
29
|
+
' ',
|
|
30
|
+
react_1.default.createElement("label", { className: bem + '__label', htmlFor: domid },
|
|
31
|
+
' ',
|
|
32
|
+
reqStar,
|
|
33
|
+
" ",
|
|
34
|
+
label,
|
|
35
|
+
' '),
|
|
36
|
+
errorMessage && (react_1.default.createElement("div", { className: bem + '__error', id: errorId }, errorMessage))));
|
|
39
37
|
};
|
|
40
38
|
exports.default = TogglerInput;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { useDomid, useIsBrowserSide } from '@hugsmidjan/react/hooks';
|
|
3
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
4
|
+
import { useSeenEffect } from './utils/seenEffect';
|
|
5
|
+
const AccordionListItem = (props) => {
|
|
6
|
+
const { title, content, id, disabled = false, defaultOpen, ssr } = props;
|
|
7
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
8
|
+
useEffect(() => setOpen(defaultOpen), [defaultOpen]);
|
|
9
|
+
const domid = useDomid();
|
|
10
|
+
const isBrowser = useIsBrowserSide(ssr);
|
|
11
|
+
const itemDisabled = (isBrowser && disabled) || !content;
|
|
12
|
+
return (React.createElement("div", { className: getBemClass('AccordionList__item', [itemDisabled && 'disabled']), id: id, "data-start-open": defaultOpen || undefined, "data-sprinkled": isBrowser },
|
|
13
|
+
React.createElement("h3", { className: "AccordionList__title" }, isBrowser ? (React.createElement("button", { type: "button", className: "AccordionList__button", "aria-controls": domid, "aria-expanded": open || undefined, onClick: () => {
|
|
14
|
+
setOpen(!open);
|
|
15
|
+
}, disabled: itemDisabled }, title)) : (title)),
|
|
16
|
+
React.createElement("div", { id: isBrowser && domid, className: "AccordionList__content", hidden: isBrowser && (!open || itemDisabled) }, content)));
|
|
17
|
+
};
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
const AccordionList = (props) => {
|
|
20
|
+
const { items, ssr, wide, defaultOpen, startSeen } = props;
|
|
21
|
+
const [ref] = useSeenEffect(startSeen);
|
|
22
|
+
return (React.createElement("div", { className: getBemClass('AccordionList', [wide && 'wide']), ref: ref }, items.map((item, i) => (React.createElement(AccordionListItem, Object.assign({ key: i }, item, { ssr: ssr, defaultOpen: defaultOpen && defaultOpen.includes(i) }))))));
|
|
23
|
+
};
|
|
24
|
+
export default AccordionList;
|
package/esm/ActionCards.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextCardListProps } from './_abstract/
|
|
1
|
+
import { TextCardListProps } from './_abstract/_CardList';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
3
|
export declare type ActionCardsProps = TextCardListProps & SeenProp;
|
|
4
4
|
declare const ActionCards: (props: ActionCardsProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardList } from './_abstract/_CardList';
|
|
3
|
+
import { useSeenEffect } from './utils/seenEffect';
|
|
4
|
+
const ActionCards = (props) => {
|
|
5
|
+
const [ref] = useSeenEffect(props.startSeen);
|
|
6
|
+
return (React.createElement("div", { className: "ActionCards", ref: ref },
|
|
7
|
+
React.createElement(CardList, Object.assign({}, props, { bemPrefix: "ActionCards" }))));
|
|
8
|
+
};
|
|
9
|
+
export default ActionCards;
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useRef, useState, } from 'react';
|
|
|
2
2
|
import { useIsBrowserSide, useOnMount } from '@hugsmidjan/react/hooks';
|
|
3
3
|
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
4
4
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
5
|
-
import Button from './_abstract/
|
|
5
|
+
import Button from './_abstract/_Button';
|
|
6
6
|
import { isPreact } from './utils/env';
|
|
7
7
|
// FIXME: Eventually import from @reykjavik/hanna-styles/constants
|
|
8
8
|
const AlertCloseTransitionDuration = 400;
|
|
@@ -79,16 +79,14 @@ const Alert = (props) => {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
}, [closeAlert, autoClosing, autoClose]);
|
|
82
|
-
return (
|
|
82
|
+
return (React.createElement("div", Object.assign({ className: getBemClass('Alert', [
|
|
83
83
|
!!alertTypes[type] && type,
|
|
84
84
|
closable && 'closable',
|
|
85
|
-
])
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
]), role: "alert", hidden: !open || undefined }, autoClosingProps),
|
|
86
|
+
childrenHTML ? (React.createElement("div", { dangerouslySetInnerHTML: { __html: childrenHTML } })) : (children),
|
|
87
|
+
' ',
|
|
88
|
+
showCloseButton && (React.createElement(Button, Object.assign({ bem: "Alert__close" }, (closeUrl != null ? { href: closeUrl } : { type: 'button' }), { onClick: (e) => {
|
|
88
89
|
closeAlert(e);
|
|
89
|
-
}
|
|
90
|
-
{closeLabel}
|
|
91
|
-
</Button>)}
|
|
92
|
-
</div>);
|
|
90
|
+
}, "aria-label": closeLabelLong, title: closeLabelLong || closeLabel }), closeLabel))));
|
|
93
91
|
};
|
|
94
92
|
export default Alert;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Resolve } from '@reykjavik/hanna-utils';
|
|
2
|
+
import { ImageCardListProps, ImageCardProps } from './_abstract/_CardList';
|
|
3
|
+
export declare type ArticleCardProps = ImageCardProps;
|
|
4
|
+
export declare type ArticleCardsProps = Resolve<Pick<ImageCardListProps, 'cards' | 'imgPlaceholder'>>;
|
|
5
|
+
declare const ArticleCards: (props: ArticleCardsProps) => JSX.Element;
|
|
6
|
+
export default ArticleCards;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardList } from './_abstract/_CardList';
|
|
3
|
+
const ArticleCards = (props) => (React.createElement(CardList, { bemPrefix: "ArticleCards", standalone: true, cards: props.cards, imgPlaceholder: props.imgPlaceholder || true }));
|
|
4
|
+
export default ArticleCards;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
2
2
|
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
3
|
-
import { ImageProps } from '../_abstract/
|
|
3
|
+
import { ImageProps } from '../_abstract/_Image';
|
|
4
4
|
import { ColorFamily } from '../constants';
|
|
5
5
|
export declare type ArticleCarouselImageProps = ImageProps & {
|
|
6
6
|
photo?: boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
|
+
import { getIllustrationUrl } from '@reykjavik/hanna-utils/assets';
|
|
4
|
+
import Image from '../_abstract/_Image';
|
|
5
|
+
import { Link } from '../_abstract/_Link';
|
|
6
|
+
import { colorFamilies, themeOptions } from '../constants';
|
|
7
|
+
export const ArticleCarouselCard = (props) => {
|
|
8
|
+
const { date, title, summary, href, moreLabel, color, theme, illustration, image } = props;
|
|
9
|
+
const photo = image === null || image === void 0 ? void 0 : image.photo;
|
|
10
|
+
const imageProps = illustration ? { src: getIllustrationUrl(illustration) } : image;
|
|
11
|
+
return (React.createElement("div", { className: "ArticleCarouselCard", "data-color": color && colorFamilies[color], "data-color-theme": !color ? theme && themeOptions[theme] : undefined },
|
|
12
|
+
React.createElement(Link, { className: "ArticleCarouselCard__link", href: href },
|
|
13
|
+
' ',
|
|
14
|
+
React.createElement(Image, Object.assign({ placeholder: true, className: getBemClass('ArticleCarouselCard__illustration', photo && 'photo') }, imageProps)),
|
|
15
|
+
React.createElement("h3", { className: "ArticleCarouselCard__title" }, title),
|
|
16
|
+
' '),
|
|
17
|
+
' ',
|
|
18
|
+
date && React.createElement("span", { className: "ArticleCarouselCard__date" }, date),
|
|
19
|
+
React.createElement("div", { className: "ArticleCarouselCard__summary" }, summary),
|
|
20
|
+
moreLabel && (React.createElement(Link, { className: "ArticleCarouselCard__morelink", href: href, "aria-label": title },
|
|
21
|
+
' ',
|
|
22
|
+
moreLabel,
|
|
23
|
+
' '))));
|
|
24
|
+
};
|
|
@@ -3,6 +3,6 @@ import AbstractCarousel from './_abstract/_AbstractCarousel';
|
|
|
3
3
|
import { ArticleCarouselCard, } from './ArticleCarousel/_ArticleCarouselCard';
|
|
4
4
|
const ArticleCarousel = (props) => {
|
|
5
5
|
const { title, items, moreLabel, ssr, startSeen } = props;
|
|
6
|
-
return (
|
|
6
|
+
return (React.createElement(AbstractCarousel, { bem: "ArticleCarousel", title: title, items: items, Component: ArticleCarouselCard, ComponentProps: { moreLabel }, ssr: ssr, startSeen: startSeen }));
|
|
7
7
|
};
|
|
8
8
|
export default ArticleCarousel;
|
package/esm/ArticleMeta.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
|
+
import { Link } from './_abstract/_Link';
|
|
4
|
+
const ArticleMeta = (props) => {
|
|
5
|
+
const { items, small } = props;
|
|
6
|
+
if (items.length === 0) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return (React.createElement("div", { className: getBemClass('ArticleMeta', small && 'small') }, items.map(({ label, href }, i) => (React.createElement(Fragment, { key: i },
|
|
10
|
+
href == null ? (React.createElement("span", { className: "ArticleMeta__item" },
|
|
11
|
+
" ",
|
|
12
|
+
label,
|
|
13
|
+
" ")) : (React.createElement(Link, { className: "ArticleMeta__item", href: href },
|
|
14
|
+
' ',
|
|
15
|
+
label,
|
|
16
|
+
' ')),
|
|
17
|
+
' ')))));
|
|
18
|
+
};
|
|
19
|
+
export default ArticleMeta;
|
package/esm/Attention.js
ADDED
|
@@ -10,21 +10,20 @@ const BasicTable = (props) => {
|
|
|
10
10
|
: { tbody: props.tbody || [] };
|
|
11
11
|
const modifier = props.modifier;
|
|
12
12
|
const [ref] = useSeenEffect(startSeen);
|
|
13
|
-
return (
|
|
13
|
+
return (React.createElement(TableWrapper, { modifier: [
|
|
14
14
|
'BasicTable',
|
|
15
15
|
modifier && 'BasicTable--' + modifier,
|
|
16
16
|
fullWidth && 'BasicTable--fullwidth',
|
|
17
17
|
align === 'right' && !fullWidth && 'BasicTable--align--' + align,
|
|
18
|
-
]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</TableWrapper>);
|
|
18
|
+
], wrapperRef: ref },
|
|
19
|
+
React.createElement(Table, Object.assign({ className: getBemClass('BasicTable', [
|
|
20
|
+
props.compact && 'compact',
|
|
21
|
+
modifier && modifier,
|
|
22
|
+
]) }, {
|
|
23
|
+
cols,
|
|
24
|
+
caption,
|
|
25
|
+
thead,
|
|
26
|
+
tfoot,
|
|
27
|
+
}, tbodyProps))));
|
|
29
28
|
};
|
|
30
29
|
export default BasicTable;
|
package/esm/BgBox.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EffectProp, SeenProp } from './utils/seenEffect';
|
|
3
|
+
export declare type BgBoxProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
} & SeenProp & EffectProp;
|
|
7
|
+
declare const BgBox: (props: BgBoxProps) => JSX.Element;
|
|
8
|
+
export default BgBox;
|
package/esm/BgBox.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
|
+
import { getEffectAttr, useSeenEffect } from './utils/seenEffect';
|
|
4
|
+
const BgBox = (props) => {
|
|
5
|
+
const { className, children, effectType, startSeen } = props;
|
|
6
|
+
const [ref] = useSeenEffect(startSeen);
|
|
7
|
+
return (React.createElement("div", Object.assign({ className: getBemClass('BgBox', undefined, className), ref: ref }, getEffectAttr(effectType)), children));
|
|
8
|
+
};
|
|
9
|
+
export default BgBox;
|
|
@@ -33,12 +33,12 @@ const Bling = (props) => {
|
|
|
33
33
|
const { align, vertical, color, overlay, type, blingUrl, parent, className } = props;
|
|
34
34
|
const imageUrl = type ? getBlingUrl(type) : blingUrl;
|
|
35
35
|
const inlineSvg = useGetSVGtext(imageUrl);
|
|
36
|
-
return (
|
|
36
|
+
return (React.createElement("div", { className: getBemClass('Bling', [
|
|
37
37
|
'align--' + (align && align in aligns ? align : 'left'),
|
|
38
38
|
vertical && vertical in valigns && 'vertical--' + vertical,
|
|
39
39
|
color && color in colors && 'color--' + color,
|
|
40
40
|
parent && parent in parentOffset && 'parent--' + parent,
|
|
41
41
|
overlay && 'overlay',
|
|
42
|
-
], className)
|
|
42
|
+
], className), "data-bling-type": type, "data-bling-image": !type ? blingUrl : undefined, dangerouslySetInnerHTML: inlineSvg && { __html: inlineSvg.code } }));
|
|
43
43
|
};
|
|
44
44
|
export default Bling;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from './_abstract/_Link';
|
|
3
|
+
const BreadCrumbs__item = (props) => {
|
|
4
|
+
const { link, current } = props;
|
|
5
|
+
return link.href != null ? (React.createElement(Link, { className: "BreadCrumbs__item", href: link.href, "aria-current": current || undefined }, link.label)) : (React.createElement("span", { className: "BreadCrumbs__item", "aria-current": current || undefined }, link.label));
|
|
6
|
+
};
|
|
7
|
+
const BreadCrumbs = (props) => {
|
|
8
|
+
const { title, trail } = props;
|
|
9
|
+
if (trail.length === 0) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const ancestors = trail.slice(0, -1);
|
|
13
|
+
const current = trail[trail.length - 1];
|
|
14
|
+
return (React.createElement("nav", { className: "BreadCrumbs", "aria-label": title },
|
|
15
|
+
React.createElement("span", { className: "BreadCrumbs__title" },
|
|
16
|
+
title,
|
|
17
|
+
":"),
|
|
18
|
+
' ',
|
|
19
|
+
ancestors.map((link, i) => {
|
|
20
|
+
return (React.createElement(React.Fragment, { key: i },
|
|
21
|
+
React.createElement(BreadCrumbs__item, { link: link }),
|
|
22
|
+
' ',
|
|
23
|
+
React.createElement("span", { className: "BreadCrumbs__separator", "aria-label": "" }, ">"),
|
|
24
|
+
' '));
|
|
25
|
+
}),
|
|
26
|
+
React.createElement(BreadCrumbs__item, { link: current, current: true })));
|
|
27
|
+
};
|
|
28
|
+
export default BreadCrumbs;
|
package/esm/ButtonBack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from './_abstract/
|
|
2
|
+
import { ButtonProps } from './_abstract/_Button';
|
|
3
3
|
export declare type ButtonBackProps = ButtonProps;
|
|
4
4
|
declare const ButtonBack: (props: ButtonBackProps & {
|
|
5
5
|
children?: ReactNode;
|
|
@@ -2,11 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
3
3
|
export const ButtonBar = (props) => {
|
|
4
4
|
const { align, children } = props;
|
|
5
|
-
return (
|
|
6
|
-
{children}
|
|
7
|
-
</div>);
|
|
5
|
+
return (React.createElement("div", { className: getBemClass('ButtonBar', align === 'right' && 'align--right') }, children));
|
|
8
6
|
};
|
|
9
|
-
ButtonBar.Split = () =>
|
|
7
|
+
ButtonBar.Split = () => React.createElement("span", { className: "ButtonBar__split" });
|
|
10
8
|
/**
|
|
11
9
|
* @deprecated Prefer using `ButtonBar.Split` instead.
|
|
12
10
|
*
|
package/esm/ButtonPrimary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
3
3
|
export declare type ButtonPrimaryProps = ButtonProps & ButtonVariantProps;
|
|
4
4
|
declare const ButtonPrimary: (props: ButtonPrimaryProps & {
|
|
5
5
|
children?: ReactNode;
|
package/esm/ButtonSecondary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
3
3
|
export declare type ButtonSecondaryProps = ButtonProps & ButtonVariantProps;
|
|
4
4
|
declare const ButtonSecondary: (props: ButtonSecondaryProps & {
|
|
5
5
|
children?: ReactNode;
|
package/esm/ButtonTertiary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
3
3
|
declare type TertiarySize = Extract<ButtonVariantProps['size'], 'normal' | 'small'>;
|
|
4
4
|
declare type TertiaryIcon = Extract<ButtonVariantProps['icon'], 'none' | 'go-back'>;
|
|
5
5
|
export declare type ButtonTertiaryProps = ButtonProps & Omit<ButtonVariantProps, 'icon' | 'size'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Button from './_abstract/
|
|
2
|
+
import Button from './_abstract/_Button';
|
|
3
3
|
const sizes = {
|
|
4
4
|
normal: 'normal',
|
|
5
5
|
small: 'small',
|
|
@@ -10,6 +10,6 @@ const icons = {
|
|
|
10
10
|
};
|
|
11
11
|
const ButtonTertiary = (props) => {
|
|
12
12
|
const { size = 'normal', icon = 'none' } = props;
|
|
13
|
-
return
|
|
13
|
+
return React.createElement(Button, Object.assign({ bem: "ButtonTertiary" }, props, { size: sizes[size], icon: icons[icon] }));
|
|
14
14
|
};
|
|
15
15
|
export default ButtonTertiary;
|
package/esm/Carousel.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SeenEffect from './SeenEffect';
|
|
3
|
+
const CenterColumn = (props) => {
|
|
4
|
+
const { children, startSeen, effectType } = props;
|
|
5
|
+
return startSeen == null ? (React.createElement("div", { className: "CenterColumn" }, children)) : (React.createElement(SeenEffect, { className: "CenterColumn", startSeen: startSeen, effectType: effectType }, children));
|
|
6
|
+
};
|
|
7
|
+
export default CenterColumn;
|
package/esm/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerInputProps } from './_abstract/
|
|
1
|
+
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
2
2
|
export declare type CheckboxProps = TogglerInputProps;
|
|
3
3
|
declare const Checkbox: (props: CheckboxProps) => JSX.Element;
|
|
4
4
|
export default Checkbox;
|
package/esm/Checkbox.js
ADDED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/
|
|
1
|
+
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
2
|
export declare type CheckboxButtonsGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
value?: Array<string>;
|
|
4
4
|
/** @deprecated (Will be removed in v0.9) */
|