@reykjavik/hanna-react 0.10.56 → 0.10.57
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.jsx → ActionCards.js} +2 -3
- package/{Alert.jsx → Alert.js} +6 -8
- package/ArticleCarousel/_ArticleCarouselCard.js +31 -0
- package/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/{ArticleMeta.jsx → ArticleMeta.js} +9 -8
- package/{Attention.jsx → Attention.js} +1 -1
- package/{BasicTable.jsx → BasicTable.js} +11 -12
- 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.jsx → ButtonBack.js} +1 -1
- package/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/{ButtonPrimary.jsx → ButtonPrimary.js} +1 -1
- package/{ButtonSecondary.jsx → ButtonSecondary.js} +1 -1
- package/{ButtonTertiary.jsx → ButtonTertiary.js} +1 -1
- package/CHANGELOG.md +1 -1
- package/{Carousel.jsx → Carousel.js} +1 -1
- package/{CarouselStepper.jsx → CarouselStepper.js} +1 -1
- package/{CenterColumn.jsx → CenterColumn.js} +1 -3
- package/{Checkbox.jsx → Checkbox.js} +1 -1
- package/{CheckboxButtonsGroup.jsx → CheckboxButtonsGroup.js} +2 -2
- package/{CheckboxGroup.jsx → CheckboxGroup.js} +1 -1
- package/{CityBlock.jsx → CityBlock.js} +1 -1
- package/{ContactBubble.jsx → ContactBubble.js} +12 -26
- package/{ContentArticle.jsx → ContentArticle.js} +9 -12
- package/ContentImage.js +23 -0
- package/{Datepicker.jsx → Datepicker.js} +17 -18
- package/{ExtraLinks.jsx → ExtraLinks.js} +9 -17
- 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.jsx → _GalleryItem.js} +8 -9
- package/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +5 -7
- package/{Gallery.jsx → Gallery.js} +3 -4
- package/GridBlocks.js +29 -0
- package/{Heading.jsx → Heading.js} +2 -4
- package/{HeroBlock.jsx → HeroBlock.js} +8 -9
- package/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/{Illustration.jsx → Illustration.js} +1 -1
- package/{ImageCards.jsx → ImageCards.js} +2 -3
- package/InfoBlock.js +18 -0
- package/{InfoHero.jsx → InfoHero.js} +9 -15
- package/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
- package/{LabeledTextBlock.jsx → LabeledTextBlock.js} +5 -7
- package/Layout.js +58 -0
- package/MainMenu/{_Auxiliary.jsx → _Auxiliary.js} +5 -11
- package/MainMenu/_PrimaryPanel.js +29 -0
- package/{MainMenu.jsx → MainMenu.js} +27 -40
- package/{MiniMetrics.jsx → MiniMetrics.js} +5 -4
- package/Modal.js +19 -0
- package/{NameCard.jsx → NameCard.js} +18 -23
- package/{NameCards.jsx → NameCards.js} +1 -3
- package/{NewsHero.jsx → NewsHero.js} +7 -9
- package/{PageFilter.jsx → PageFilter.js} +6 -7
- package/{PageHeading.jsx → PageHeading.js} +2 -4
- package/ProcessOverview.js +22 -0
- package/{PullQuote.jsx → PullQuote.js} +1 -1
- package/{RadioButtonsGroup.jsx → RadioButtonsGroup.js} +2 -2
- package/{RadioGroup.jsx → RadioGroup.js} +2 -2
- package/{RelatedLinks.jsx → RelatedLinks.js} +9 -13
- 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} +6 -12
- package/{Sharpie.jsx → Sharpie.js} +1 -1
- package/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
- package/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
- 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.jsx → TagPill.js} +11 -16
- package/{TextBlock.jsx → TextBlock.js} +2 -4
- package/{TextButton.jsx → TextButton.js} +1 -1
- 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.jsx → WizardLayoutClose.js} +1 -1
- package/WizardStepper.js +30 -0
- package/_abstract/{Button.jsx → Button.js} +2 -6
- package/_abstract/CardList.js +43 -0
- package/_abstract/{Image.jsx → Image.js} +10 -12
- package/_abstract/{Link.jsx → Link.js} +0 -0
- package/_abstract/TogglerGroup.js +34 -0
- package/_abstract/{TogglerGroupField.jsx → TogglerGroupField.js} +3 -3
- package/_abstract/{TogglerInput.jsx → TogglerInput.js} +13 -15
- package/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/_abstract/{_Blings.jsx → _Blings.js} +1 -3
- package/_abstract/_Block.js +29 -0
- package/_abstract/{_Quote.jsx → _Quote.js} +3 -6
- package/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/esm/AccordionList.js +24 -0
- package/esm/{ActionCards.jsx → ActionCards.js} +2 -3
- package/esm/{Alert.jsx → Alert.js} +6 -8
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +24 -0
- package/esm/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/esm/ArticleMeta.js +18 -0
- package/esm/Attention.js +4 -0
- package/esm/{BasicTable.jsx → BasicTable.js} +11 -12
- 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.js +4 -0
- package/esm/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/esm/ButtonPrimary.js +4 -0
- package/esm/ButtonSecondary.js +4 -0
- package/esm/{ButtonTertiary.jsx → ButtonTertiary.js} +1 -1
- package/esm/Carousel.js +4 -0
- package/esm/CarouselStepper.js +4 -0
- package/esm/CenterColumn.js +7 -0
- package/esm/Checkbox.js +4 -0
- package/esm/{CheckboxButtonsGroup.jsx → CheckboxButtonsGroup.js} +2 -2
- package/esm/{CheckboxGroup.jsx → CheckboxGroup.js} +1 -1
- package/esm/{CityBlock.jsx → CityBlock.js} +1 -1
- package/esm/{ContactBubble.jsx → ContactBubble.js} +12 -26
- package/esm/ContentArticle.js +21 -0
- package/esm/ContentImage.js +18 -0
- package/esm/{Datepicker.jsx → Datepicker.js} +17 -18
- package/esm/{ExtraLinks.jsx → ExtraLinks.js} +9 -17
- 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.jsx → _GalleryItem.js} +8 -9
- package/esm/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/esm/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +5 -7
- package/esm/{Gallery.jsx → Gallery.js} +3 -4
- package/esm/GridBlocks.js +24 -0
- package/esm/{Heading.jsx → Heading.js} +2 -4
- package/esm/HeroBlock.js +21 -0
- package/esm/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/esm/{Illustration.jsx → Illustration.js} +1 -1
- package/esm/{ImageCards.jsx → ImageCards.js} +2 -3
- package/esm/InfoBlock.js +13 -0
- package/esm/{InfoHero.jsx → InfoHero.js} +9 -15
- package/esm/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/esm/{IslandPageBlock.jsx → IslandPageBlock.js} +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} +27 -40
- package/esm/MiniMetrics.js +12 -0
- package/esm/Modal.js +14 -0
- package/esm/{NameCard.jsx → NameCard.js} +18 -23
- package/esm/NameCards.js +7 -0
- package/esm/{NewsHero.jsx → NewsHero.js} +7 -9
- package/esm/PageFilter.js +15 -0
- package/esm/{PageHeading.jsx → PageHeading.js} +2 -4
- package/esm/ProcessOverview.js +17 -0
- package/esm/PullQuote.js +4 -0
- package/esm/{RadioButtonsGroup.jsx → RadioButtonsGroup.js} +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} +6 -12
- 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.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.jsx → TagPill.js} +11 -16
- package/esm/{TextBlock.jsx → TextBlock.js} +2 -4
- package/esm/{TextButton.jsx → TextButton.js} +1 -1
- 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.js +4 -0
- package/esm/WizardStepper.js +25 -0
- package/esm/_abstract/{Button.jsx → Button.js} +2 -6
- package/esm/_abstract/CardList.js +36 -0
- package/esm/_abstract/{Image.jsx → Image.js} +10 -12
- package/esm/_abstract/{Link.jsx → Link.js} +0 -0
- package/esm/_abstract/TogglerGroup.js +29 -0
- package/esm/_abstract/{TogglerGroupField.jsx → TogglerGroupField.js} +3 -3
- package/esm/_abstract/{TogglerInput.jsx → TogglerInput.js} +13 -15
- package/esm/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/esm/_abstract/_Blings.js +12 -0
- package/esm/_abstract/_Block.js +24 -0
- package/esm/_abstract/_Quote.js +8 -0
- package/esm/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/package.json +91 -91
- 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/_PrimaryPanel.jsx +0 -37
- package/Modal.jsx +0 -21
- package/ProcessOverview.jsx +0 -25
- 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/esm/AccordionList.jsx +0 -33
- 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/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/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/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
|
@@ -37,25 +37,16 @@ const AccordionListItem = (props) => {
|
|
|
37
37
|
const domid = (0, hooks_1.useDomid)();
|
|
38
38
|
const isBrowser = (0, hooks_1.useIsBrowserSide)(ssr);
|
|
39
39
|
const itemDisabled = (isBrowser && disabled) || !content;
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
{isBrowser ? (<button type="button" className="AccordionList__button" aria-controls={domid} aria-expanded={open || undefined} onClick={() => {
|
|
40
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('AccordionList__item', [itemDisabled && 'disabled']), id: id, "data-start-open": defaultOpen || undefined, "data-sprinkled": isBrowser },
|
|
41
|
+
react_1.default.createElement("h3", { className: "AccordionList__title" }, isBrowser ? (react_1.default.createElement("button", { type: "button", className: "AccordionList__button", "aria-controls": domid, "aria-expanded": open || undefined, onClick: () => {
|
|
43
42
|
setOpen(!open);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
</button>) : (title)}
|
|
47
|
-
</h3>
|
|
48
|
-
<div id={isBrowser && domid} className="AccordionList__content" hidden={isBrowser && (!open || itemDisabled)}>
|
|
49
|
-
{content}
|
|
50
|
-
</div>
|
|
51
|
-
</div>);
|
|
43
|
+
}, disabled: itemDisabled }, title)) : (title)),
|
|
44
|
+
react_1.default.createElement("div", { id: isBrowser && domid, className: "AccordionList__content", hidden: isBrowser && (!open || itemDisabled) }, content)));
|
|
52
45
|
};
|
|
53
46
|
// ---------------------------------------------------------------------------
|
|
54
47
|
const AccordionList = (props) => {
|
|
55
48
|
const { items, ssr, wide, defaultOpen, startSeen } = props;
|
|
56
49
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
57
|
-
return (
|
|
58
|
-
{items.map((item, i) => (<AccordionListItem key={i} {...item} ssr={ssr} defaultOpen={defaultOpen && defaultOpen.includes(i)}/>))}
|
|
59
|
-
</div>);
|
|
50
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('AccordionList', [wide && 'wide']), ref: ref }, items.map((item, i) => (react_1.default.createElement(AccordionListItem, Object.assign({ key: i }, item, { ssr: ssr, defaultOpen: defaultOpen && defaultOpen.includes(i) }))))));
|
|
60
51
|
};
|
|
61
52
|
exports.default = AccordionList;
|
|
@@ -8,8 +8,7 @@ const CardList_1 = require("./_abstract/CardList");
|
|
|
8
8
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
9
9
|
const ActionCards = (props) => {
|
|
10
10
|
const [ref] = (0, seenEffect_1.useSeenEffect)(props.startSeen);
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
</div>);
|
|
11
|
+
return (react_1.default.createElement("div", { className: "ActionCards", ref: ref },
|
|
12
|
+
react_1.default.createElement(CardList_1.CardList, Object.assign({}, props, { bemPrefix: "ActionCards" }))));
|
|
14
13
|
};
|
|
15
14
|
exports.default = ActionCards;
|
package/{Alert.jsx → Alert.js}
RENAMED
|
@@ -108,16 +108,14 @@ const Alert = (props) => {
|
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
}, [closeAlert, autoClosing, autoClose]);
|
|
111
|
-
return (
|
|
111
|
+
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('Alert', [
|
|
112
112
|
!!exports.alertTypes[type] && type,
|
|
113
113
|
closable && 'closable',
|
|
114
|
-
])
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
]), role: "alert", hidden: !open || undefined }, autoClosingProps),
|
|
115
|
+
childrenHTML ? (react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: childrenHTML } })) : (children),
|
|
116
|
+
' ',
|
|
117
|
+
showCloseButton && (react_1.default.createElement(Button_1.default, Object.assign({ bem: "Alert__close" }, (closeUrl != null ? { href: closeUrl } : { type: 'button' }), { onClick: (e) => {
|
|
117
118
|
closeAlert(e);
|
|
118
|
-
}
|
|
119
|
-
{closeLabel}
|
|
120
|
-
</Button_1.default>)}
|
|
121
|
-
</div>);
|
|
119
|
+
}, "aria-label": closeLabelLong, title: closeLabelLong || closeLabel }), closeLabel))));
|
|
122
120
|
};
|
|
123
121
|
exports.default = Alert;
|
|
@@ -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
|
+
exports.ArticleCarouselCard = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
|
+
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
10
|
+
const Image_1 = __importDefault(require("../_abstract/Image"));
|
|
11
|
+
const Link_1 = require("../_abstract/Link");
|
|
12
|
+
const constants_1 = require("../constants");
|
|
13
|
+
const ArticleCarouselCard = (props) => {
|
|
14
|
+
const { date, title, summary, href, moreLabel, color, theme, illustration, image } = props;
|
|
15
|
+
const photo = image === null || image === void 0 ? void 0 : image.photo;
|
|
16
|
+
const imageProps = illustration ? { src: (0, assets_1.getIllustrationUrl)(illustration) } : image;
|
|
17
|
+
return (react_1.default.createElement("div", { className: "ArticleCarouselCard", "data-color": color && constants_1.colorFamilies[color], "data-color-theme": !color ? theme && constants_1.themeOptions[theme] : undefined },
|
|
18
|
+
react_1.default.createElement(Link_1.Link, { className: "ArticleCarouselCard__link", href: href },
|
|
19
|
+
' ',
|
|
20
|
+
react_1.default.createElement(Image_1.default, Object.assign({ placeholder: true, className: (0, getBemClass_1.default)('ArticleCarouselCard__illustration', photo && 'photo') }, imageProps)),
|
|
21
|
+
react_1.default.createElement("h3", { className: "ArticleCarouselCard__title" }, title),
|
|
22
|
+
' '),
|
|
23
|
+
' ',
|
|
24
|
+
date && react_1.default.createElement("span", { className: "ArticleCarouselCard__date" }, date),
|
|
25
|
+
react_1.default.createElement("div", { className: "ArticleCarouselCard__summary" }, summary),
|
|
26
|
+
moreLabel && (react_1.default.createElement(Link_1.Link, { className: "ArticleCarouselCard__morelink", href: href, "aria-label": title },
|
|
27
|
+
' ',
|
|
28
|
+
moreLabel,
|
|
29
|
+
' '))));
|
|
30
|
+
};
|
|
31
|
+
exports.ArticleCarouselCard = ArticleCarouselCard;
|
|
@@ -8,6 +8,6 @@ const _AbstractCarousel_1 = __importDefault(require("./_abstract/_AbstractCarous
|
|
|
8
8
|
const _ArticleCarouselCard_1 = require("./ArticleCarousel/_ArticleCarouselCard");
|
|
9
9
|
const ArticleCarousel = (props) => {
|
|
10
10
|
const { title, items, moreLabel, ssr, startSeen } = props;
|
|
11
|
-
return (
|
|
11
|
+
return (react_1.default.createElement(_AbstractCarousel_1.default, { bem: "ArticleCarousel", title: title, items: items, Component: _ArticleCarouselCard_1.ArticleCarouselCard, ComponentProps: { moreLabel }, ssr: ssr, startSeen: startSeen }));
|
|
12
12
|
};
|
|
13
13
|
exports.default = ArticleCarousel;
|
|
@@ -30,13 +30,14 @@ const ArticleMeta = (props) => {
|
|
|
30
30
|
if (items.length === 0) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
return (react_1.default.createElement("div", { className: "ArticleMeta" }, items.map(({ label, href }, i) => (react_1.default.createElement(react_1.Fragment, { key: i },
|
|
34
|
+
href == null ? (react_1.default.createElement("span", { className: "ArticleMeta__item" },
|
|
35
|
+
" ",
|
|
36
|
+
label,
|
|
37
|
+
" ")) : (react_1.default.createElement(Link_1.Link, { className: "ArticleMeta__item", href: href },
|
|
38
|
+
' ',
|
|
39
|
+
label,
|
|
40
|
+
' ')),
|
|
41
|
+
' ')))));
|
|
41
42
|
};
|
|
42
43
|
exports.default = ArticleMeta;
|
|
@@ -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 getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
-
const Attention = (props) => (
|
|
8
|
+
const Attention = (props) => (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Attention', props.small && 'small') }, props.children));
|
|
9
9
|
exports.default = Attention;
|
|
@@ -15,21 +15,20 @@ const BasicTable = (props) => {
|
|
|
15
15
|
: { tbody: props.tbody || [] };
|
|
16
16
|
const modifier = props.modifier;
|
|
17
17
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
18
|
-
return (
|
|
18
|
+
return (react_1.default.createElement(TableWrapper_1.default, { modifier: [
|
|
19
19
|
'BasicTable',
|
|
20
20
|
modifier && 'BasicTable--' + modifier,
|
|
21
21
|
fullWidth && 'BasicTable--fullwidth',
|
|
22
22
|
align === 'right' && !fullWidth && 'BasicTable--align--' + align,
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</TableWrapper_1.default>);
|
|
23
|
+
], wrapperRef: ref },
|
|
24
|
+
react_1.default.createElement(Table_1.default, Object.assign({ className: (0, getBemClass_1.default)('BasicTable', [
|
|
25
|
+
props.compact && 'compact',
|
|
26
|
+
modifier && modifier,
|
|
27
|
+
]) }, {
|
|
28
|
+
cols,
|
|
29
|
+
caption,
|
|
30
|
+
thead,
|
|
31
|
+
tfoot,
|
|
32
|
+
}, tbodyProps))));
|
|
34
33
|
};
|
|
35
34
|
exports.default = BasicTable;
|
package/{Bling.jsx → Bling.js}
RENAMED
|
@@ -38,12 +38,12 @@ const Bling = (props) => {
|
|
|
38
38
|
const { align, vertical, color, overlay, type, blingUrl, parent, className } = props;
|
|
39
39
|
const imageUrl = type ? (0, assets_1.getBlingUrl)(type) : blingUrl;
|
|
40
40
|
const inlineSvg = (0, useGetSVGtext_1.useGetSVGtext)(imageUrl);
|
|
41
|
-
return (
|
|
41
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Bling', [
|
|
42
42
|
'align--' + (align && align in aligns ? align : 'left'),
|
|
43
43
|
vertical && vertical in valigns && 'vertical--' + vertical,
|
|
44
44
|
color && color in colors && 'color--' + color,
|
|
45
45
|
parent && parent in parentOffset && 'parent--' + parent,
|
|
46
46
|
overlay && 'overlay',
|
|
47
|
-
], className)
|
|
47
|
+
], className), "data-bling-type": type, "data-bling-image": !type ? blingUrl : undefined, dangerouslySetInnerHTML: inlineSvg && { __html: inlineSvg.code } }));
|
|
48
48
|
};
|
|
49
49
|
exports.default = Bling;
|
|
@@ -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 BlockQuote = (props) =>
|
|
8
|
+
const BlockQuote = (props) => react_1.default.createElement(_Quote_1._Quote, Object.assign({ bem: "BlockQuote" }, props));
|
|
9
9
|
exports.default = BlockQuote;
|
package/BreadCrumbs.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
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 BreadCrumbs__item = (props) => {
|
|
9
|
+
const { link, current } = props;
|
|
10
|
+
return link.href != null ? (react_1.default.createElement(Link_1.Link, { className: "BreadCrumbs__item", href: link.href, "aria-current": current || undefined }, link.label)) : (react_1.default.createElement("span", { className: "BreadCrumbs__item", "aria-current": current || undefined }, link.label));
|
|
11
|
+
};
|
|
12
|
+
const BreadCrumbs = (props) => {
|
|
13
|
+
const { title, trail } = props;
|
|
14
|
+
if (trail.length === 0) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const ancestors = trail.slice(0, -1);
|
|
18
|
+
const current = trail[trail.length - 1];
|
|
19
|
+
return (react_1.default.createElement("nav", { className: "BreadCrumbs", "aria-label": title },
|
|
20
|
+
react_1.default.createElement("span", { className: "BreadCrumbs__title" },
|
|
21
|
+
title,
|
|
22
|
+
":"),
|
|
23
|
+
' ',
|
|
24
|
+
ancestors.map((link, i) => {
|
|
25
|
+
return (react_1.default.createElement(react_1.default.Fragment, { key: i },
|
|
26
|
+
react_1.default.createElement(BreadCrumbs__item, { link: link }),
|
|
27
|
+
' ',
|
|
28
|
+
react_1.default.createElement("span", { className: "BreadCrumbs__separator", "aria-label": "" }, ">"),
|
|
29
|
+
' '));
|
|
30
|
+
}),
|
|
31
|
+
react_1.default.createElement(BreadCrumbs__item, { link: current, current: true })));
|
|
32
|
+
};
|
|
33
|
+
exports.default = BreadCrumbs;
|
|
@@ -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 Button_1 = __importDefault(require("./_abstract/Button"));
|
|
8
|
-
const ButtonBack = (props) => (
|
|
8
|
+
const ButtonBack = (props) => (react_1.default.createElement(Button_1.default, Object.assign({ bem: "ButtonBack" }, props)));
|
|
9
9
|
exports.default = ButtonBack;
|
|
@@ -8,12 +8,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
9
|
const ButtonBar = (props) => {
|
|
10
10
|
const { align, children } = props;
|
|
11
|
-
return (
|
|
12
|
-
{children}
|
|
13
|
-
</div>);
|
|
11
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('ButtonBar', align === 'right' && 'align--right') }, children));
|
|
14
12
|
};
|
|
15
13
|
exports.ButtonBar = ButtonBar;
|
|
16
|
-
exports.ButtonBar.Split = () =>
|
|
14
|
+
exports.ButtonBar.Split = () => react_1.default.createElement("span", { className: "ButtonBar__split" });
|
|
17
15
|
/**
|
|
18
16
|
* @deprecated Prefer using `ButtonBar.Split` instead.
|
|
19
17
|
*
|
|
@@ -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 Button_1 = __importDefault(require("./_abstract/Button"));
|
|
8
|
-
const ButtonPrimary = (props) => (
|
|
8
|
+
const ButtonPrimary = (props) => (react_1.default.createElement(Button_1.default, Object.assign({ bem: "ButtonPrimary" }, props)));
|
|
9
9
|
exports.default = ButtonPrimary;
|
|
@@ -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 Button_1 = __importDefault(require("./_abstract/Button"));
|
|
8
|
-
const ButtonSecondary = (props) => (
|
|
8
|
+
const ButtonSecondary = (props) => (react_1.default.createElement(Button_1.default, Object.assign({ bem: "ButtonSecondary" }, props)));
|
|
9
9
|
exports.default = ButtonSecondary;
|
|
@@ -15,6 +15,6 @@ const icons = {
|
|
|
15
15
|
};
|
|
16
16
|
const ButtonTertiary = (props) => {
|
|
17
17
|
const { size = 'normal', icon = 'none' } = props;
|
|
18
|
-
return
|
|
18
|
+
return react_1.default.createElement(Button_1.default, Object.assign({ bem: "ButtonTertiary" }, props, { size: sizes[size], icon: icons[icon] }));
|
|
19
19
|
};
|
|
20
20
|
exports.default = ButtonTertiary;
|
package/CHANGELOG.md
CHANGED
|
@@ -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 _AbstractCarousel_1 = __importDefault(require("./_abstract/_AbstractCarousel"));
|
|
8
|
-
const Carousel = (props) => (
|
|
8
|
+
const Carousel = (props) => (react_1.default.createElement(_AbstractCarousel_1.default, Object.assign({}, props, { bem: undefined, modifier: undefined, title: undefined })));
|
|
9
9
|
exports.default = Carousel;
|
|
@@ -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 CarouselStepper_1 = __importDefault(require("@hugsmidjan/react/CarouselStepper"));
|
|
8
|
-
const CarouselStepper = (props) => (
|
|
8
|
+
const CarouselStepper = (props) => (react_1.default.createElement(CarouselStepper_1.default, Object.assign({}, props, { bem: undefined, modifier: undefined })));
|
|
9
9
|
exports.default = CarouselStepper;
|
|
@@ -7,8 +7,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const SeenEffect_1 = __importDefault(require("./SeenEffect"));
|
|
8
8
|
const CenterColumn = (props) => {
|
|
9
9
|
const { children, startSeen, effectType } = props;
|
|
10
|
-
return startSeen == null ? (
|
|
11
|
-
{children}
|
|
12
|
-
</SeenEffect_1.default>);
|
|
10
|
+
return startSeen == null ? (react_1.default.createElement("div", { className: "CenterColumn" }, children)) : (react_1.default.createElement(SeenEffect_1.default, { className: "CenterColumn", startSeen: startSeen, effectType: effectType }, children));
|
|
13
11
|
};
|
|
14
12
|
exports.default = CenterColumn;
|
|
@@ -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 TogglerInput_1 = __importDefault(require("./_abstract/TogglerInput"));
|
|
8
|
-
const Checkbox = (props) => (
|
|
8
|
+
const Checkbox = (props) => (react_1.default.createElement(TogglerInput_1.default, Object.assign({ bem: "Checkbox" }, props, { type: "checkbox" })));
|
|
9
9
|
exports.default = Checkbox;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const TogglerGroupField_1 = __importDefault(require("./_abstract/TogglerGroupField"));
|
|
8
8
|
const TogglerInput_1 = __importDefault(require("./_abstract/TogglerInput"));
|
|
9
|
-
const CheckboxButton = (props) => (
|
|
9
|
+
const CheckboxButton = (props) => (react_1.default.createElement(TogglerInput_1.default, Object.assign({ bem: "CheckboxButton" }, props, { type: "checkbox" })));
|
|
10
10
|
const CheckboxButtonsGroup = (props) => {
|
|
11
11
|
if (props.layout) {
|
|
12
12
|
console.warn('`CheckboxButtonsGroupProps.layout` is deprecated.');
|
|
@@ -14,6 +14,6 @@ const CheckboxButtonsGroup = (props) => {
|
|
|
14
14
|
if (props.columns) {
|
|
15
15
|
console.warn('`CheckboxButtonsGroupProps.columns` is deprecated.');
|
|
16
16
|
}
|
|
17
|
-
return (
|
|
17
|
+
return (react_1.default.createElement(TogglerGroupField_1.default, Object.assign({}, props, { bem: "CheckboxButtonsGroup", Toggler: CheckboxButton })));
|
|
18
18
|
};
|
|
19
19
|
exports.default = CheckboxButtonsGroup;
|
|
@@ -7,6 +7,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const TogglerGroupField_1 = __importDefault(require("./_abstract/TogglerGroupField"));
|
|
8
8
|
const Checkbox_1 = __importDefault(require("./Checkbox"));
|
|
9
9
|
const CheckboxGroup = (props) => {
|
|
10
|
-
return (
|
|
10
|
+
return (react_1.default.createElement(TogglerGroupField_1.default, Object.assign({}, props, { bem: "CheckboxGroup", modifier: props.layout, Toggler: Checkbox_1.default })));
|
|
11
11
|
};
|
|
12
12
|
exports.default = CheckboxGroup;
|
|
@@ -18,6 +18,6 @@ const CityBlock = (props) => {
|
|
|
18
18
|
const imageProps = props.illustration != null
|
|
19
19
|
? { src: (0, assets_1.getIllustrationUrl)(props.illustration) }
|
|
20
20
|
: props.image;
|
|
21
|
-
return (
|
|
21
|
+
return (react_1.default.createElement(_Block_1.default, { bem: "CityBlock", modifier: modifier, content: props.content, image: imageProps, startSeen: props.startSeen }));
|
|
22
22
|
};
|
|
23
23
|
exports.default = CityBlock;
|
|
@@ -146,10 +146,9 @@ const ContactBubble = (props) => {
|
|
|
146
146
|
if (links.length === 0) {
|
|
147
147
|
return null;
|
|
148
148
|
}
|
|
149
|
-
const menu = (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
{links.map((linkInfo, i) => {
|
|
149
|
+
const menu = (react_1.default.createElement("div", { className: "ContactBubble", id: isBrowser && domid, hidden: isBrowser && !open, "data-always-show": alwaysShow || undefined, "data-sprinkled": isBrowser },
|
|
150
|
+
react_1.default.createElement("h2", { className: "ContactBubble__title" }, title || txt.openBtn),
|
|
151
|
+
react_1.default.createElement("ul", { className: "ContactBubble__list" }, links.map((linkInfo, i) => {
|
|
153
152
|
const { href, label, extraLabel, target, onClick } = linkInfo;
|
|
154
153
|
const icon = (0, exports.ensureIcon)(linkInfo.icon);
|
|
155
154
|
const itemClass = (0, getBemClass_1.default)('ContactBubble__item', icon && 'type--' + icon);
|
|
@@ -164,29 +163,16 @@ const ContactBubble = (props) => {
|
|
|
164
163
|
' ',
|
|
165
164
|
label,
|
|
166
165
|
'\n',
|
|
167
|
-
extraLabel &&
|
|
166
|
+
extraLabel && react_1.default.createElement("small", { key: "\uD83E\uDD21" }, extraLabel),
|
|
168
167
|
'\n',
|
|
169
168
|
];
|
|
170
|
-
return (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
</ul>
|
|
179
|
-
{'\n\n'}
|
|
180
|
-
{isBrowser && (<button className="ContactBubble__closebtn" aria-controls={domid} aria-label={txt.closeBtnLong} onClick={() => closeBubble()} type="button">
|
|
181
|
-
{txt.closeBtn}
|
|
182
|
-
</button>)}
|
|
183
|
-
</div>);
|
|
184
|
-
return isBrowser ? (<div className="ContactBubble__wrapper" ref={wrapperRef}>
|
|
185
|
-
<button className="ContactBubble__openbtn" aria-controls={domid} aria-expanded={open} aria-label={txt.openBtnLong} onClick={open ? () => closeBubble() : openBubble} type="button">
|
|
186
|
-
{txt.openBtn}
|
|
187
|
-
</button>
|
|
188
|
-
{'\n\n'}
|
|
189
|
-
{menu}
|
|
190
|
-
</div>) : (menu);
|
|
169
|
+
return (react_1.default.createElement("li", { key: i, className: itemClass }, href && href !== '#' ? (react_1.default.createElement(Link_1.Link, { className: "ContactBubble__link", href: href, onClick: onClickHandler, target: target }, content)) : (react_1.default.createElement("button", { className: "ContactBubble__link", onClick: onClickHandler, type: "button" }, content))));
|
|
170
|
+
})),
|
|
171
|
+
'\n\n',
|
|
172
|
+
isBrowser && (react_1.default.createElement("button", { className: "ContactBubble__closebtn", "aria-controls": domid, "aria-label": txt.closeBtnLong, onClick: () => closeBubble(), type: "button" }, txt.closeBtn))));
|
|
173
|
+
return isBrowser ? (react_1.default.createElement("div", { className: "ContactBubble__wrapper", ref: wrapperRef },
|
|
174
|
+
react_1.default.createElement("button", { className: "ContactBubble__openbtn", "aria-controls": domid, "aria-expanded": open, "aria-label": txt.openBtnLong, onClick: open ? () => closeBubble() : openBubble, type: "button" }, txt.openBtn),
|
|
175
|
+
'\n\n',
|
|
176
|
+
menu)) : (menu);
|
|
191
177
|
};
|
|
192
178
|
exports.default = ContactBubble;
|
|
@@ -13,17 +13,14 @@ const TextBlock_1 = __importDefault(require("./TextBlock"));
|
|
|
13
13
|
const VSpacer_1 = __importDefault(require("./VSpacer"));
|
|
14
14
|
const ContentArticle = (props) => {
|
|
15
15
|
const [ref] = (0, seenEffect_1.useSeenEffect)(props.startSeen);
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</VSpacer_1.default>
|
|
26
|
-
{props.relatedLinks && <RelatedLinks_1.default {...props.relatedLinks}/>}
|
|
27
|
-
</div>);
|
|
16
|
+
return (react_1.default.createElement("div", { className: "ContentArticle", ref: ref },
|
|
17
|
+
react_1.default.createElement(ArticleMeta_1.default, { items: props.meta }),
|
|
18
|
+
react_1.default.createElement(Heading_1.default, null, props.headline),
|
|
19
|
+
react_1.default.createElement(TextBlock_1.default, { startSeen: true },
|
|
20
|
+
props.topImage && react_1.default.createElement(ContentImage_1.default, Object.assign({}, props.topImage)),
|
|
21
|
+
props.body),
|
|
22
|
+
react_1.default.createElement(VSpacer_1.default, { size: "small" },
|
|
23
|
+
react_1.default.createElement("hr", null)),
|
|
24
|
+
props.relatedLinks && react_1.default.createElement(RelatedLinks_1.default, Object.assign({}, props.relatedLinks))));
|
|
28
25
|
};
|
|
29
26
|
exports.default = ContentArticle;
|
package/ContentImage.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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 ContentImage = (props) => {
|
|
9
|
+
const { image, caption, credit } = props;
|
|
10
|
+
return (react_1.default.createElement("figure", { className: "ContentImage" },
|
|
11
|
+
(caption || credit) && (react_1.default.createElement("figcaption", { className: "ContentImage__caption" },
|
|
12
|
+
caption && react_1.default.createElement("span", { className: "ContentImage__text" },
|
|
13
|
+
" ",
|
|
14
|
+
caption,
|
|
15
|
+
" "),
|
|
16
|
+
' ',
|
|
17
|
+
credit && react_1.default.createElement("small", { className: "ContentImage__credit" },
|
|
18
|
+
" ",
|
|
19
|
+
credit,
|
|
20
|
+
" "))),
|
|
21
|
+
react_1.default.createElement(Image_1.default, Object.assign({ className: "ContentImage__image" }, image))));
|
|
22
|
+
};
|
|
23
|
+
exports.default = ContentImage;
|
|
@@ -66,27 +66,26 @@ const Datepicker = (props) => {
|
|
|
66
66
|
const txts = (localeCode && i18n[localeCode]) || {};
|
|
67
67
|
const filled = !!value;
|
|
68
68
|
const empty = !filled && !placeholder;
|
|
69
|
-
return (
|
|
70
|
-
return (
|
|
69
|
+
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)('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) => {
|
|
70
|
+
return (react_1.default.createElement("div", { className: className.input, ref: inputRef &&
|
|
71
71
|
((elm) => {
|
|
72
72
|
inputRef.current =
|
|
73
73
|
(elm === null || elm === void 0 ? void 0 : elm.querySelector('input')) || undefined;
|
|
74
74
|
return elm;
|
|
75
|
-
})}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}}/>);
|
|
75
|
+
}) },
|
|
76
|
+
react_1.default.createElement(react_datepicker_1.default, Object.assign({ id: domid, required: inputProps.required, disabled: inputProps.disabled, readOnly: inputProps.readOnly, selected: value, locale: localeCode, dateFormat: dateFormat, onChange: (date) => {
|
|
77
|
+
onChange(date || undefined);
|
|
78
|
+
const inputElm = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current;
|
|
79
|
+
if (inputElm) {
|
|
80
|
+
inputElm.dispatchEvent(new Event('change', { bubbles: true }));
|
|
81
|
+
}
|
|
82
|
+
}, placeholderText: placeholder,
|
|
83
|
+
// TODO: Implement this
|
|
84
|
+
// selectsRange
|
|
85
|
+
minDate: minDate, maxDate: maxDate, startDate: startDate, endDate: endDate, selectsStart: isStartDate, selectsEnd: isEndDate, formatWeekDay: (weekday) => {
|
|
86
|
+
// TODO: if we use costom locale we don't need this
|
|
87
|
+
return weekday.charAt(0).toUpperCase();
|
|
88
|
+
}, showYearDropdown: true, scrollableYearDropdown: true, yearDropdownItemNumber: 15, showMonthDropdown: true }, inputProps, txts, addFocusProps(datepickerExtraProps)))));
|
|
89
|
+
} }));
|
|
91
90
|
};
|
|
92
91
|
exports.default = Datepicker;
|
|
@@ -21,27 +21,19 @@ const Link_1 = require("./_abstract/Link");
|
|
|
21
21
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
22
22
|
const ExtraLinks__related = (props) => {
|
|
23
23
|
const { relatedTitle, relatedLinks } = props;
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<Link_1.Link className={(0, getBemClass_1.default)('ExtraLinks__related__link', type)} href={href} target={blank ? '_blank' : ''} rel={blank ? 'noreferrer noopener' : ''}>
|
|
30
|
-
{label}
|
|
31
|
-
</Link_1.Link>
|
|
32
|
-
</li>))}
|
|
33
|
-
</ul>
|
|
34
|
-
</div>);
|
|
24
|
+
return (react_1.default.createElement("div", { className: "ExtraLinks__related" },
|
|
25
|
+
relatedTitle && react_1.default.createElement("h3", { className: "ExtraLinks__related__title" }, relatedTitle),
|
|
26
|
+
react_1.default.createElement("ul", { className: "ExtraLinks__related__list" }, relatedLinks &&
|
|
27
|
+
relatedLinks.map(({ href, label, blank = false, type }, i) => (react_1.default.createElement("li", { className: "ExtraLinks__related__item", key: i },
|
|
28
|
+
react_1.default.createElement(Link_1.Link, { className: (0, getBemClass_1.default)('ExtraLinks__related__link', type), href: href, target: blank ? '_blank' : '', rel: blank ? 'noreferrer noopener' : '' }, label)))))));
|
|
35
29
|
};
|
|
36
30
|
const ExtraLinks = (props) => {
|
|
37
31
|
const { relatedTitle, relatedLinks, className, startSeen } = props, cardListProps = __rest(props, ["relatedTitle", "relatedLinks", "className", "startSeen"]);
|
|
38
32
|
const hasRelated = !!(relatedLinks && relatedLinks.length);
|
|
39
33
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{hasRelated && (<ExtraLinks__related relatedTitle={relatedTitle} relatedLinks={relatedLinks}/>)}
|
|
45
|
-
</div>);
|
|
34
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('ExtraLinks', hasRelated && 'related', className), ref: ref },
|
|
35
|
+
react_1.default.createElement("div", { className: "ExtraLinks__main" },
|
|
36
|
+
react_1.default.createElement(CardList_1.CardList, Object.assign({}, cardListProps, { bemPrefix: "ExtraLinks" }))),
|
|
37
|
+
hasRelated && (react_1.default.createElement(ExtraLinks__related, { relatedTitle: relatedTitle, relatedLinks: relatedLinks }))));
|
|
46
38
|
};
|
|
47
39
|
exports.default = ExtraLinks;
|