@reykjavik/hanna-react 0.10.53
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/CHANGELOG.md +795 -0
- package/README.md +69 -0
- package/lib/AccordionList.cjs +91 -0
- package/lib/AccordionList.mjs +69 -0
- package/lib/ActionCards.cjs +57 -0
- package/lib/ActionCards.mjs +35 -0
- package/lib/Alert.cjs +159 -0
- package/lib/Alert.mjs +139 -0
- package/lib/ArticleCarousel/_ArticleCarouselCard.cjs +75 -0
- package/lib/ArticleCarousel/_ArticleCarouselCard.mjs +51 -0
- package/lib/ArticleCarousel.cjs +43 -0
- package/lib/ArticleCarousel.mjs +21 -0
- package/lib/ArticleMeta.cjs +46 -0
- package/lib/ArticleMeta.mjs +22 -0
- package/lib/Attention.cjs +33 -0
- package/lib/Attention.mjs +9 -0
- package/lib/BasicTable.cjs +72 -0
- package/lib/BasicTable.mjs +50 -0
- package/lib/Bling.cjs +76 -0
- package/lib/Bling.mjs +52 -0
- package/lib/BlockBreak.cjs +32 -0
- package/lib/BlockBreak.mjs +8 -0
- package/lib/BlockQuote.cjs +47 -0
- package/lib/BlockQuote.mjs +25 -0
- package/lib/BreadCrumbs.cjs +67 -0
- package/lib/BreadCrumbs.mjs +43 -0
- package/lib/ButtonBack.cjs +47 -0
- package/lib/ButtonBack.mjs +25 -0
- package/lib/ButtonBar.cjs +45 -0
- package/lib/ButtonBar.mjs +18 -0
- package/lib/ButtonPrimary.cjs +47 -0
- package/lib/ButtonPrimary.mjs +25 -0
- package/lib/ButtonSecondary.cjs +47 -0
- package/lib/ButtonSecondary.mjs +25 -0
- package/lib/ButtonTertiary.cjs +64 -0
- package/lib/ButtonTertiary.mjs +42 -0
- package/lib/Carousel.cjs +52 -0
- package/lib/Carousel.mjs +30 -0
- package/lib/CarouselStepper.cjs +51 -0
- package/lib/CarouselStepper.mjs +29 -0
- package/lib/CenterColumn.cjs +40 -0
- package/lib/CenterColumn.mjs +16 -0
- package/lib/Checkbox.cjs +52 -0
- package/lib/Checkbox.mjs +30 -0
- package/lib/CheckboxButtonsGroup.cjs +65 -0
- package/lib/CheckboxButtonsGroup.mjs +43 -0
- package/lib/CheckboxGroup.cjs +55 -0
- package/lib/CheckboxGroup.mjs +33 -0
- package/lib/CityBlock.cjs +49 -0
- package/lib/CityBlock.mjs +25 -0
- package/lib/ContactBubble.cjs +200 -0
- package/lib/ContactBubble.mjs +173 -0
- package/lib/ContentArticle.cjs +63 -0
- package/lib/ContentArticle.mjs +41 -0
- package/lib/ContentImage.cjs +58 -0
- package/lib/ContentImage.mjs +36 -0
- package/lib/Datepicker.cjs +164 -0
- package/lib/Datepicker.mjs +142 -0
- package/lib/ExtraLinks.cjs +96 -0
- package/lib/ExtraLinks.mjs +74 -0
- package/lib/FeatureList.cjs +53 -0
- package/lib/FeatureList.mjs +29 -0
- package/lib/FieldGroup.cjs +40 -0
- package/lib/FieldGroup.mjs +16 -0
- package/lib/FileInput.cjs +256 -0
- package/lib/FileInput.mjs +234 -0
- package/lib/Foonote.cjs +30 -0
- package/lib/Foonote.mjs +6 -0
- package/lib/FooterBadges.cjs +49 -0
- package/lib/FooterBadges.mjs +25 -0
- package/lib/FooterInfo.cjs +47 -0
- package/lib/FooterInfo.mjs +23 -0
- package/lib/Footnote.cjs +32 -0
- package/lib/Footnote.mjs +8 -0
- package/lib/Form.cjs +56 -0
- package/lib/Form.mjs +34 -0
- package/lib/FormField.cjs +153 -0
- package/lib/FormField.mjs +131 -0
- package/lib/Gallery/_GalleryItem.cjs +83 -0
- package/lib/Gallery/_GalleryItem.mjs +61 -0
- package/lib/Gallery/_GalleryModal.cjs +104 -0
- package/lib/Gallery/_GalleryModal.mjs +82 -0
- package/lib/Gallery/_GalleryModalContext.cjs +30 -0
- package/lib/Gallery/_GalleryModalContext.mjs +6 -0
- package/lib/Gallery/_GalleryModalItem.cjs +59 -0
- package/lib/Gallery/_GalleryModalItem.mjs +36 -0
- package/lib/Gallery.cjs +79 -0
- package/lib/Gallery.mjs +57 -0
- package/lib/GridBlocks.cjs +81 -0
- package/lib/GridBlocks.mjs +59 -0
- package/lib/Heading.cjs +45 -0
- package/lib/Heading.mjs +21 -0
- package/lib/HeroBlock.cjs +74 -0
- package/lib/HeroBlock.mjs +52 -0
- package/lib/IframeBlock.cjs +48 -0
- package/lib/IframeBlock.mjs +24 -0
- package/lib/Illustration.cjs +51 -0
- package/lib/Illustration.mjs +31 -0
- package/lib/ImageCards.cjs +72 -0
- package/lib/ImageCards.mjs +52 -0
- package/lib/InfoBlock.cjs +51 -0
- package/lib/InfoBlock.mjs +27 -0
- package/lib/InfoHero.cjs +150 -0
- package/lib/InfoHero.mjs +128 -0
- package/lib/IslandBlock.cjs +63 -0
- package/lib/IslandBlock.mjs +41 -0
- package/lib/IslandPageBlock.cjs +49 -0
- package/lib/IslandPageBlock.mjs +25 -0
- package/lib/LabeledTextBlock.cjs +60 -0
- package/lib/LabeledTextBlock.mjs +38 -0
- package/lib/Layout.cjs +113 -0
- package/lib/Layout.mjs +87 -0
- package/lib/MainMenu/_Auxiliary.cjs +54 -0
- package/lib/MainMenu/_Auxiliary.mjs +28 -0
- package/lib/MainMenu/_PrimaryPanel.cjs +74 -0
- package/lib/MainMenu/_PrimaryPanel.mjs +48 -0
- package/lib/MainMenu.cjs +209 -0
- package/lib/MainMenu.mjs +187 -0
- package/lib/MiniMetrics.cjs +56 -0
- package/lib/MiniMetrics.mjs +34 -0
- package/lib/Modal.cjs +70 -0
- package/lib/Modal.mjs +48 -0
- package/lib/NameCard.cjs +115 -0
- package/lib/NameCard.mjs +91 -0
- package/lib/NameCards.cjs +52 -0
- package/lib/NameCards.mjs +30 -0
- package/lib/NewsHero.cjs +136 -0
- package/lib/NewsHero.mjs +114 -0
- package/lib/PageFilter.cjs +48 -0
- package/lib/PageFilter.mjs +24 -0
- package/lib/PageHeading.cjs +42 -0
- package/lib/PageHeading.mjs +18 -0
- package/lib/ProcessOverview.cjs +52 -0
- package/lib/ProcessOverview.mjs +28 -0
- package/lib/PullQuote.cjs +47 -0
- package/lib/PullQuote.mjs +25 -0
- package/lib/RadioButtonsGroup.cjs +64 -0
- package/lib/RadioButtonsGroup.mjs +42 -0
- package/lib/RadioGroup.cjs +58 -0
- package/lib/RadioGroup.mjs +36 -0
- package/lib/RelatedLinks.cjs +61 -0
- package/lib/RelatedLinks.mjs +37 -0
- package/lib/RowBlock.cjs +39 -0
- package/lib/RowBlock.mjs +15 -0
- package/lib/RowBlockColumn.cjs +40 -0
- package/lib/RowBlockColumn.mjs +16 -0
- package/lib/SearchInput.cjs +136 -0
- package/lib/SearchInput.mjs +114 -0
- package/lib/SearchResults/_SearchResultsItem.cjs +54 -0
- package/lib/SearchResults/_SearchResultsItem.mjs +30 -0
- package/lib/SearchResults.cjs +172 -0
- package/lib/SearchResults.mjs +150 -0
- package/lib/SeenEffect.cjs +66 -0
- package/lib/SeenEffect.mjs +44 -0
- package/lib/Selectbox.cjs +144 -0
- package/lib/Selectbox.mjs +122 -0
- package/lib/ShareButtons.cjs +101 -0
- package/lib/ShareButtons.mjs +83 -0
- package/lib/Sharpie.cjs +51 -0
- package/lib/Sharpie.mjs +27 -0
- package/lib/SiteSearchAutocomplete.cjs +150 -0
- package/lib/SiteSearchAutocomplete.mjs +126 -0
- package/lib/SiteSearchCurtain.cjs +78 -0
- package/lib/SiteSearchCurtain.mjs +56 -0
- package/lib/SiteSearchInput.cjs +119 -0
- package/lib/SiteSearchInput.mjs +97 -0
- package/lib/Skeleton.cjs +63 -0
- package/lib/Skeleton.mjs +39 -0
- package/lib/SubHeading.cjs +43 -0
- package/lib/SubHeading.mjs +19 -0
- package/lib/Tabs.cjs +166 -0
- package/lib/Tabs.mjs +144 -0
- package/lib/TagPill.cjs +113 -0
- package/lib/TagPill.mjs +91 -0
- package/lib/TextBlock.cjs +45 -0
- package/lib/TextBlock.mjs +21 -0
- package/lib/TextButton.cjs +55 -0
- package/lib/TextButton.mjs +33 -0
- package/lib/TextInput.cjs +136 -0
- package/lib/TextInput.mjs +114 -0
- package/lib/VSpacer.cjs +70 -0
- package/lib/VSpacer.mjs +46 -0
- package/lib/VerticalTabsTOC.cjs +123 -0
- package/lib/VerticalTabsTOC.mjs +101 -0
- package/lib/WizardLayout.cjs +79 -0
- package/lib/WizardLayout.mjs +55 -0
- package/lib/WizardLayoutClose.cjs +47 -0
- package/lib/WizardLayoutClose.mjs +25 -0
- package/lib/WizardStepper.cjs +55 -0
- package/lib/WizardStepper.mjs +31 -0
- package/lib/_abstract/Button.cjs +114 -0
- package/lib/_abstract/Button.mjs +92 -0
- package/lib/_abstract/CardList.cjs +100 -0
- package/lib/_abstract/CardList.mjs +76 -0
- package/lib/_abstract/Image.cjs +75 -0
- package/lib/_abstract/Image.mjs +51 -0
- package/lib/_abstract/Link.cjs +37 -0
- package/lib/_abstract/Link.mjs +10 -0
- package/lib/_abstract/TogglerGroup.cjs +92 -0
- package/lib/_abstract/TogglerGroup.mjs +70 -0
- package/lib/_abstract/TogglerGroupField.cjs +121 -0
- package/lib/_abstract/TogglerGroupField.mjs +99 -0
- package/lib/_abstract/TogglerInput.cjs +105 -0
- package/lib/_abstract/TogglerInput.mjs +83 -0
- package/lib/_abstract/_AbstractCarousel.cjs +170 -0
- package/lib/_abstract/_AbstractCarousel.mjs +152 -0
- package/lib/_abstract/_Blings.cjs +47 -0
- package/lib/_abstract/_Blings.mjs +23 -0
- package/lib/_abstract/_Block.cjs +73 -0
- package/lib/_abstract/_Block.mjs +51 -0
- package/lib/_abstract/_Quote.cjs +43 -0
- package/lib/_abstract/_Quote.mjs +17 -0
- package/lib/_abstract/breakOnNL.cjs +30 -0
- package/lib/_abstract/breakOnNL.mjs +6 -0
- package/lib/assets.cjs +77 -0
- package/lib/assets.mjs +53 -0
- package/lib/constants.cjs +49 -0
- package/lib/constants.mjs +24 -0
- package/lib/focus-visible.cjs +1 -0
- package/lib/focus-visible.mjs +1 -0
- package/lib/utils/config.cjs +27 -0
- package/lib/utils/config.mjs +4 -0
- package/lib/utils/detectEdgeScroll.cjs +95 -0
- package/lib/utils/detectEdgeScroll.mjs +71 -0
- package/lib/utils/env.cjs +31 -0
- package/lib/utils/env.mjs +5 -0
- package/lib/utils/seenEffect.cjs +93 -0
- package/lib/utils/seenEffect.mjs +65 -0
- package/lib/utils/useFormatMonitor.cjs +29 -0
- package/lib/utils/useFormatMonitor.mjs +6 -0
- package/lib/utils/useGetSVGtext.cjs +44 -0
- package/lib/utils/useGetSVGtext.mjs +21 -0
- package/lib/utils/useMenuToggling.cjs +83 -0
- package/lib/utils/useMenuToggling.mjs +60 -0
- package/lib/utils/useScrollbarWidthCSSVar.cjs +32 -0
- package/lib/utils/useScrollbarWidthCSSVar.mjs +6 -0
- package/lib/utils.cjs +18 -0
- package/lib/utils.mjs +2 -0
- package/package.json +491 -0
- package/types/AccordionList.d.ts +17 -0
- package/types/ActionCards.d.ts +5 -0
- package/types/Alert.d.ts +49 -0
- package/types/ArticleCarousel/_ArticleCarouselCard.d.ts +27 -0
- package/types/ArticleCarousel.d.ts +12 -0
- package/types/ArticleMeta.d.ts +9 -0
- package/types/Attention.d.ts +7 -0
- package/types/BasicTable.d.ts +12 -0
- package/types/Bling.d.ts +81 -0
- package/types/BlockBreak.d.ts +2 -0
- package/types/BlockQuote.d.ts +4 -0
- package/types/BreadCrumbs.d.ts +11 -0
- package/types/ButtonBack.d.ts +7 -0
- package/types/ButtonBar.d.ts +16 -0
- package/types/ButtonPrimary.d.ts +7 -0
- package/types/ButtonSecondary.d.ts +7 -0
- package/types/ButtonTertiary.d.ts +12 -0
- package/types/Carousel.d.ts +4 -0
- package/types/CarouselStepper.d.ts +4 -0
- package/types/CenterColumn.d.ts +7 -0
- package/types/Checkbox.d.ts +4 -0
- package/types/CheckboxButtonsGroup.d.ts +11 -0
- package/types/CheckboxGroup.d.ts +9 -0
- package/types/CityBlock.d.ts +23 -0
- package/types/ContactBubble.d.ts +58 -0
- package/types/ContentArticle.d.ts +15 -0
- package/types/ContentImage.d.ts +8 -0
- package/types/Datepicker.d.ts +39 -0
- package/types/ExtraLinks.d.ts +18 -0
- package/types/FeatureList.d.ts +12 -0
- package/types/FieldGroup.d.ts +9 -0
- package/types/FileInput.d.ts +17 -0
- package/types/Foonote.d.ts +12 -0
- package/types/FooterBadges.d.ts +9 -0
- package/types/FooterInfo.d.ts +18 -0
- package/types/Footnote.d.ts +6 -0
- package/types/Form.d.ts +7 -0
- package/types/FormField.d.ts +65 -0
- package/types/Gallery/_GalleryItem.d.ts +8 -0
- package/types/Gallery/_GalleryModal.d.ts +6 -0
- package/types/Gallery/_GalleryModalContext.d.ts +9 -0
- package/types/Gallery/_GalleryModalItem.d.ts +3 -0
- package/types/Gallery.d.ts +17 -0
- package/types/GridBlocks.d.ts +26 -0
- package/types/Heading.d.ts +16 -0
- package/types/HeroBlock.d.ts +19 -0
- package/types/IframeBlock.d.ts +23 -0
- package/types/Illustration.d.ts +13 -0
- package/types/ImageCards.d.ts +8 -0
- package/types/InfoBlock.d.ts +17 -0
- package/types/InfoHero.d.ts +17 -0
- package/types/IslandBlock.d.ts +25 -0
- package/types/IslandPageBlock.d.ts +24 -0
- package/types/LabeledTextBlock.d.ts +11 -0
- package/types/Layout.d.ts +33 -0
- package/types/MainMenu/_Auxiliary.d.ts +6 -0
- package/types/MainMenu/_PrimaryPanel.d.ts +13 -0
- package/types/MainMenu.d.ts +48 -0
- package/types/MiniMetrics.d.ts +8 -0
- package/types/Modal.d.ts +10 -0
- package/types/NameCard.d.ts +64 -0
- package/types/NameCards.d.ts +6 -0
- package/types/NewsHero.d.ts +14 -0
- package/types/PageFilter.d.ts +17 -0
- package/types/PageHeading.d.ts +10 -0
- package/types/ProcessOverview.d.ts +13 -0
- package/types/PullQuote.d.ts +4 -0
- package/types/RadioButtonsGroup.d.ts +11 -0
- package/types/RadioGroup.d.ts +13 -0
- package/types/RelatedLinks.d.ts +20 -0
- package/types/RowBlock.d.ts +12 -0
- package/types/RowBlockColumn.d.ts +8 -0
- package/types/SearchInput.d.ts +18 -0
- package/types/SearchResults/_SearchResultsItem.d.ts +18 -0
- package/types/SearchResults.d.ts +33 -0
- package/types/SeenEffect.d.ts +4 -0
- package/types/Selectbox.d.ts +8 -0
- package/types/ShareButtons.d.ts +9 -0
- package/types/Sharpie.d.ts +23 -0
- package/types/SiteSearchAutocomplete.d.ts +40 -0
- package/types/SiteSearchCurtain.d.ts +6 -0
- package/types/SiteSearchInput.d.ts +24 -0
- package/types/Skeleton.d.ts +25 -0
- package/types/SubHeading.d.ts +10 -0
- package/types/Tabs.d.ts +35 -0
- package/types/TagPill.d.ts +27 -0
- package/types/TextBlock.d.ts +15 -0
- package/types/TextButton.d.ts +9 -0
- package/types/TextInput.d.ts +16 -0
- package/types/VSpacer.d.ts +24 -0
- package/types/VerticalTabsTOC.d.ts +14 -0
- package/types/WizardLayout.d.ts +15 -0
- package/types/WizardLayoutClose.d.ts +3 -0
- package/types/WizardStepper.d.ts +36 -0
- package/types/_abstract/Button.d.ts +40 -0
- package/types/_abstract/CardList.d.ts +29 -0
- package/types/_abstract/Image.d.ts +32 -0
- package/types/_abstract/Link.d.ts +27 -0
- package/types/_abstract/TogglerGroup.d.ts +31 -0
- package/types/_abstract/TogglerGroupField.d.ts +17 -0
- package/types/_abstract/TogglerInput.d.ts +22 -0
- package/types/_abstract/_AbstractCarousel.d.ts +25 -0
- package/types/_abstract/_Blings.d.ts +11 -0
- package/types/_abstract/_Block.d.ts +22 -0
- package/types/_abstract/_Quote.d.ts +9 -0
- package/types/_abstract/breakOnNL.d.ts +2 -0
- package/types/assets.d.ts +42 -0
- package/types/constants.d.ts +39 -0
- package/types/focus-visible.d.ts +1 -0
- package/types/utils/config.d.ts +2 -0
- package/types/utils/detectEdgeScroll.d.ts +52 -0
- package/types/utils/env.d.ts +1 -0
- package/types/utils/seenEffect.d.ts +28 -0
- package/types/utils/useFormatMonitor.d.ts +38 -0
- package/types/utils/useGetSVGtext.d.ts +6 -0
- package/types/utils/useMenuToggling.d.ts +8 -0
- package/types/utils/useScrollbarWidthCSSVar.d.ts +1 -0
- package/types/utils.d.ts +2 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __objRest = (source, exclude) => {
|
|
10
|
+
var target = {};
|
|
11
|
+
for (var prop in source)
|
|
12
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13
|
+
target[prop] = source[prop];
|
|
14
|
+
if (source != null && __getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
16
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
17
|
+
target[prop] = source[prop];
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var GalleryModalItem_exports = {};
|
|
36
|
+
__export(GalleryModalItem_exports, {
|
|
37
|
+
default: () => GalleryModalItem_default
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(GalleryModalItem_exports);
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_Image = __toESM(require("../_abstract/Image"));
|
|
42
|
+
const GalleryModalItem = (props) => {
|
|
43
|
+
const _a = props, { caption, description } = _a, image = __objRest(_a, ["caption", "description"]);
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
45
|
+
className: "GalleryModalItem"
|
|
46
|
+
}, (caption || description) && /* @__PURE__ */ import_react.default.createElement("div", {
|
|
47
|
+
className: "GalleryModalItem__text"
|
|
48
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
49
|
+
className: "GalleryModalItem__caption"
|
|
50
|
+
}, caption), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
51
|
+
className: "GalleryModalItem__description"
|
|
52
|
+
}, description)), /* @__PURE__ */ import_react.default.createElement(import_Image.default, {
|
|
53
|
+
className: "GalleryModalItem__image",
|
|
54
|
+
src: image.largeImageSrc || image.src
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
var GalleryModalItem_default = GalleryModalItem;
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var __objRest = (source, exclude) => {
|
|
5
|
+
var target = {};
|
|
6
|
+
for (var prop in source)
|
|
7
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8
|
+
target[prop] = source[prop];
|
|
9
|
+
if (source != null && __getOwnPropSymbols)
|
|
10
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
11
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
12
|
+
target[prop] = source[prop];
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
import React from "react";
|
|
17
|
+
import Image from "../_abstract/Image";
|
|
18
|
+
const GalleryModalItem = (props) => {
|
|
19
|
+
const _a = props, { caption, description } = _a, image = __objRest(_a, ["caption", "description"]);
|
|
20
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
21
|
+
className: "GalleryModalItem"
|
|
22
|
+
}, (caption || description) && /* @__PURE__ */ React.createElement("div", {
|
|
23
|
+
className: "GalleryModalItem__text"
|
|
24
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
25
|
+
className: "GalleryModalItem__caption"
|
|
26
|
+
}, caption), /* @__PURE__ */ React.createElement("div", {
|
|
27
|
+
className: "GalleryModalItem__description"
|
|
28
|
+
}, description)), /* @__PURE__ */ React.createElement(Image, {
|
|
29
|
+
className: "GalleryModalItem__image",
|
|
30
|
+
src: image.largeImageSrc || image.src
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
var GalleryModalItem_default = GalleryModalItem;
|
|
34
|
+
export {
|
|
35
|
+
GalleryModalItem_default as default
|
|
36
|
+
};
|
package/lib/Gallery.cjs
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var Gallery_exports = {};
|
|
39
|
+
__export(Gallery_exports, {
|
|
40
|
+
default: () => Gallery_default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(Gallery_exports);
|
|
43
|
+
var import_react = __toESM(require("react"));
|
|
44
|
+
var import_i18n = require("@reykjavik/hanna-utils/i18n");
|
|
45
|
+
var import_AbstractCarousel = __toESM(require("./_abstract/_AbstractCarousel"));
|
|
46
|
+
var import_GalleryItem = __toESM(require("./Gallery/_GalleryItem"));
|
|
47
|
+
var import_GalleryModal = __toESM(require("./Gallery/_GalleryModal"));
|
|
48
|
+
var import_GalleryModalContext = __toESM(require("./Gallery/_GalleryModalContext"));
|
|
49
|
+
const defaultTexts = {
|
|
50
|
+
en: {
|
|
51
|
+
modalNextLabel: "Next image",
|
|
52
|
+
modalPrevLabel: "Previous image",
|
|
53
|
+
modalCloseLabel: "Back to article"
|
|
54
|
+
},
|
|
55
|
+
is: {
|
|
56
|
+
modalNextLabel: "N\xE6sta mynd",
|
|
57
|
+
modalPrevLabel: "Fyrri mynd",
|
|
58
|
+
modalCloseLabel: "Til baka \xED grein"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const Gallery = (props) => {
|
|
62
|
+
const { items, ssr, startSeen } = props;
|
|
63
|
+
const texts = (0, import_i18n.getTexts)(props, defaultTexts);
|
|
64
|
+
const [modalImage, setModalImage] = (0, import_react.useState)(void 0);
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(import_GalleryModalContext.default.Provider, {
|
|
66
|
+
value: { items, setCurrentImage: setModalImage, currentImage: modalImage }
|
|
67
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_AbstractCarousel.default, {
|
|
68
|
+
bem: "Gallery",
|
|
69
|
+
items,
|
|
70
|
+
Component: import_GalleryItem.default,
|
|
71
|
+
ssr,
|
|
72
|
+
startSeen
|
|
73
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_GalleryModal.default, __spreadProps(__spreadValues({}, modalImage), {
|
|
74
|
+
texts
|
|
75
|
+
})));
|
|
76
|
+
};
|
|
77
|
+
var Gallery_default = Gallery;
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {});
|
package/lib/Gallery.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import React, { useState } from "react";
|
|
21
|
+
import { getTexts } from "@reykjavik/hanna-utils/i18n";
|
|
22
|
+
import AbstractCarousel from "./_abstract/_AbstractCarousel";
|
|
23
|
+
import GalleryItem from "./Gallery/_GalleryItem";
|
|
24
|
+
import GalleryModal from "./Gallery/_GalleryModal";
|
|
25
|
+
import GalleryModalContext from "./Gallery/_GalleryModalContext";
|
|
26
|
+
const defaultTexts = {
|
|
27
|
+
en: {
|
|
28
|
+
modalNextLabel: "Next image",
|
|
29
|
+
modalPrevLabel: "Previous image",
|
|
30
|
+
modalCloseLabel: "Back to article"
|
|
31
|
+
},
|
|
32
|
+
is: {
|
|
33
|
+
modalNextLabel: "N\xE6sta mynd",
|
|
34
|
+
modalPrevLabel: "Fyrri mynd",
|
|
35
|
+
modalCloseLabel: "Til baka \xED grein"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const Gallery = (props) => {
|
|
39
|
+
const { items, ssr, startSeen } = props;
|
|
40
|
+
const texts = getTexts(props, defaultTexts);
|
|
41
|
+
const [modalImage, setModalImage] = useState(void 0);
|
|
42
|
+
return /* @__PURE__ */ React.createElement(GalleryModalContext.Provider, {
|
|
43
|
+
value: { items, setCurrentImage: setModalImage, currentImage: modalImage }
|
|
44
|
+
}, /* @__PURE__ */ React.createElement(AbstractCarousel, {
|
|
45
|
+
bem: "Gallery",
|
|
46
|
+
items,
|
|
47
|
+
Component: GalleryItem,
|
|
48
|
+
ssr,
|
|
49
|
+
startSeen
|
|
50
|
+
}), /* @__PURE__ */ React.createElement(GalleryModal, __spreadProps(__spreadValues({}, modalImage), {
|
|
51
|
+
texts
|
|
52
|
+
})));
|
|
53
|
+
};
|
|
54
|
+
var Gallery_default = Gallery;
|
|
55
|
+
export {
|
|
56
|
+
Gallery_default as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var GridBlocks_exports = {};
|
|
36
|
+
__export(GridBlocks_exports, {
|
|
37
|
+
default: () => GridBlocks_default
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(GridBlocks_exports);
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_getBemClass = __toESM(require("@hugsmidjan/react/utils/getBemClass"));
|
|
42
|
+
var import_assets = require("@reykjavik/hanna-utils/assets");
|
|
43
|
+
var import_Image = __toESM(require("./_abstract/Image"));
|
|
44
|
+
var import_Link = require("./_abstract/Link");
|
|
45
|
+
var import_seenEffect = require("./utils/seenEffect");
|
|
46
|
+
var import_ButtonTertiary = __toESM(require("./ButtonTertiary"));
|
|
47
|
+
const GridBlocks = (props) => {
|
|
48
|
+
const { blocks, twocol, startSeen } = props;
|
|
49
|
+
const [ref] = (0, import_seenEffect.useSeenEffect)(startSeen);
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
51
|
+
className: (0, import_getBemClass.default)("GridBlocks", [twocol && "twocol"]),
|
|
52
|
+
ref
|
|
53
|
+
}, blocks.map(({ title, summary, href, links = [], icon, image }, i) => {
|
|
54
|
+
const imageProps = icon ? { src: (0, import_assets.getEfnistaknUrl)(icon) } : image;
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
56
|
+
key: i,
|
|
57
|
+
className: "GridBlocks__item"
|
|
58
|
+
}, imageProps && /* @__PURE__ */ import_react.default.createElement(import_Image.default, __spreadValues({
|
|
59
|
+
className: "GridBlocks__illustration"
|
|
60
|
+
}, imageProps)), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
61
|
+
className: "GridBlocks__textwrap"
|
|
62
|
+
}, /* @__PURE__ */ import_react.default.createElement("h3", {
|
|
63
|
+
className: "GridBlocks__item__title"
|
|
64
|
+
}, href != null ? /* @__PURE__ */ import_react.default.createElement(import_Link.Link, {
|
|
65
|
+
className: "GridBlocks__item__titlelink",
|
|
66
|
+
href
|
|
67
|
+
}, title) : title), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
68
|
+
className: "GridBlocks__item__summary"
|
|
69
|
+
}, summary), /* @__PURE__ */ import_react.default.createElement("ul", {
|
|
70
|
+
className: "GridBlocks__links"
|
|
71
|
+
}, links.map((link, i2) => {
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement("li", {
|
|
73
|
+
key: i2,
|
|
74
|
+
className: "GridBlocks__link"
|
|
75
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ButtonTertiary.default, __spreadValues({}, link)));
|
|
76
|
+
}))));
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
79
|
+
var GridBlocks_default = GridBlocks;
|
|
80
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import React from "react";
|
|
18
|
+
import getBemClass from "@hugsmidjan/react/utils/getBemClass";
|
|
19
|
+
import { getEfnistaknUrl } from "@reykjavik/hanna-utils/assets";
|
|
20
|
+
import Image from "./_abstract/Image";
|
|
21
|
+
import { Link } from "./_abstract/Link";
|
|
22
|
+
import { useSeenEffect } from "./utils/seenEffect";
|
|
23
|
+
import ButtonTertiary from "./ButtonTertiary";
|
|
24
|
+
const GridBlocks = (props) => {
|
|
25
|
+
const { blocks, twocol, startSeen } = props;
|
|
26
|
+
const [ref] = useSeenEffect(startSeen);
|
|
27
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
28
|
+
className: getBemClass("GridBlocks", [twocol && "twocol"]),
|
|
29
|
+
ref
|
|
30
|
+
}, blocks.map(({ title, summary, href, links = [], icon, image }, i) => {
|
|
31
|
+
const imageProps = icon ? { src: getEfnistaknUrl(icon) } : image;
|
|
32
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
33
|
+
key: i,
|
|
34
|
+
className: "GridBlocks__item"
|
|
35
|
+
}, imageProps && /* @__PURE__ */ React.createElement(Image, __spreadValues({
|
|
36
|
+
className: "GridBlocks__illustration"
|
|
37
|
+
}, imageProps)), /* @__PURE__ */ React.createElement("div", {
|
|
38
|
+
className: "GridBlocks__textwrap"
|
|
39
|
+
}, /* @__PURE__ */ React.createElement("h3", {
|
|
40
|
+
className: "GridBlocks__item__title"
|
|
41
|
+
}, href != null ? /* @__PURE__ */ React.createElement(Link, {
|
|
42
|
+
className: "GridBlocks__item__titlelink",
|
|
43
|
+
href
|
|
44
|
+
}, title) : title), /* @__PURE__ */ React.createElement("div", {
|
|
45
|
+
className: "GridBlocks__item__summary"
|
|
46
|
+
}, summary), /* @__PURE__ */ React.createElement("ul", {
|
|
47
|
+
className: "GridBlocks__links"
|
|
48
|
+
}, links.map((link, i2) => {
|
|
49
|
+
return /* @__PURE__ */ React.createElement("li", {
|
|
50
|
+
key: i2,
|
|
51
|
+
className: "GridBlocks__link"
|
|
52
|
+
}, /* @__PURE__ */ React.createElement(ButtonTertiary, __spreadValues({}, link)));
|
|
53
|
+
}))));
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
var GridBlocks_default = GridBlocks;
|
|
57
|
+
export {
|
|
58
|
+
GridBlocks_default as default
|
|
59
|
+
};
|
package/lib/Heading.cjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var Heading_exports = {};
|
|
22
|
+
__export(Heading_exports, {
|
|
23
|
+
default: () => Heading_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Heading_exports);
|
|
26
|
+
var import_react = __toESM(require("react"));
|
|
27
|
+
var import_getBemClass = __toESM(require("@hugsmidjan/react/utils/getBemClass"));
|
|
28
|
+
const sizes = {
|
|
29
|
+
small: "small",
|
|
30
|
+
normal: "normal",
|
|
31
|
+
large: "large"
|
|
32
|
+
};
|
|
33
|
+
const Heading = (props) => {
|
|
34
|
+
const { size = "normal", Tag = "h2", align, wide, children } = props;
|
|
35
|
+
return /* @__PURE__ */ import_react.default.createElement(Tag, {
|
|
36
|
+
className: (0, import_getBemClass.default)("Heading", [
|
|
37
|
+
sizes[size],
|
|
38
|
+
align === "right" && "align--" + align,
|
|
39
|
+
!align && wide && "wide"
|
|
40
|
+
])
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
43
|
+
var Heading_default = Heading;
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {});
|
package/lib/Heading.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import getBemClass from "@hugsmidjan/react/utils/getBemClass";
|
|
3
|
+
const sizes = {
|
|
4
|
+
small: "small",
|
|
5
|
+
normal: "normal",
|
|
6
|
+
large: "large"
|
|
7
|
+
};
|
|
8
|
+
const Heading = (props) => {
|
|
9
|
+
const { size = "normal", Tag = "h2", align, wide, children } = props;
|
|
10
|
+
return /* @__PURE__ */ React.createElement(Tag, {
|
|
11
|
+
className: getBemClass("Heading", [
|
|
12
|
+
sizes[size],
|
|
13
|
+
align === "right" && "align--" + align,
|
|
14
|
+
!align && wide && "wide"
|
|
15
|
+
])
|
|
16
|
+
}, children);
|
|
17
|
+
};
|
|
18
|
+
var Heading_default = Heading;
|
|
19
|
+
export {
|
|
20
|
+
Heading_default as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var HeroBlock_exports = {};
|
|
36
|
+
__export(HeroBlock_exports, {
|
|
37
|
+
default: () => HeroBlock_default
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(HeroBlock_exports);
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_assets = require("@reykjavik/hanna-utils/assets");
|
|
42
|
+
var import_Image = __toESM(require("./_abstract/Image"));
|
|
43
|
+
var import_seenEffect = require("./utils/seenEffect");
|
|
44
|
+
var import_ButtonPrimary = __toESM(require("./ButtonPrimary"));
|
|
45
|
+
var import_ButtonTertiary = __toESM(require("./ButtonTertiary"));
|
|
46
|
+
const HeroBlock = (props) => {
|
|
47
|
+
const {
|
|
48
|
+
title,
|
|
49
|
+
summary,
|
|
50
|
+
illustration,
|
|
51
|
+
image,
|
|
52
|
+
primaryButton,
|
|
53
|
+
secondaryButton,
|
|
54
|
+
startSeen
|
|
55
|
+
} = props;
|
|
56
|
+
const hasButtons = Boolean(primaryButton || secondaryButton);
|
|
57
|
+
const imgProps = illustration ? { src: (0, import_assets.getIllustrationUrl)(illustration) } : image;
|
|
58
|
+
const [ref] = (0, import_seenEffect.useSeenEffect)(startSeen);
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
60
|
+
className: "HeroBlock",
|
|
61
|
+
ref
|
|
62
|
+
}, /* @__PURE__ */ import_react.default.createElement("h1", {
|
|
63
|
+
className: "HeroBlock__title"
|
|
64
|
+
}, title), /* @__PURE__ */ import_react.default.createElement(import_Image.default, __spreadValues({
|
|
65
|
+
className: "HeroBlock__image"
|
|
66
|
+
}, imgProps)), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
67
|
+
className: "HeroBlock__summary"
|
|
68
|
+
}, summary), hasButtons && /* @__PURE__ */ import_react.default.createElement("div", {
|
|
69
|
+
className: "HeroBlock__buttons"
|
|
70
|
+
}, primaryButton && /* @__PURE__ */ import_react.default.createElement(import_ButtonPrimary.default, __spreadValues({}, primaryButton)), " ", secondaryButton && /* @__PURE__ */ import_react.default.createElement(import_ButtonTertiary.default, __spreadValues({}, secondaryButton))));
|
|
71
|
+
};
|
|
72
|
+
var HeroBlock_default = HeroBlock;
|
|
73
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { getIllustrationUrl } from "@reykjavik/hanna-utils/assets";
|
|
19
|
+
import Image from "./_abstract/Image";
|
|
20
|
+
import { useSeenEffect } from "./utils/seenEffect";
|
|
21
|
+
import ButtonPrimary from "./ButtonPrimary";
|
|
22
|
+
import ButtonTertiary from "./ButtonTertiary";
|
|
23
|
+
const HeroBlock = (props) => {
|
|
24
|
+
const {
|
|
25
|
+
title,
|
|
26
|
+
summary,
|
|
27
|
+
illustration,
|
|
28
|
+
image,
|
|
29
|
+
primaryButton,
|
|
30
|
+
secondaryButton,
|
|
31
|
+
startSeen
|
|
32
|
+
} = props;
|
|
33
|
+
const hasButtons = Boolean(primaryButton || secondaryButton);
|
|
34
|
+
const imgProps = illustration ? { src: getIllustrationUrl(illustration) } : image;
|
|
35
|
+
const [ref] = useSeenEffect(startSeen);
|
|
36
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
37
|
+
className: "HeroBlock",
|
|
38
|
+
ref
|
|
39
|
+
}, /* @__PURE__ */ React.createElement("h1", {
|
|
40
|
+
className: "HeroBlock__title"
|
|
41
|
+
}, title), /* @__PURE__ */ React.createElement(Image, __spreadValues({
|
|
42
|
+
className: "HeroBlock__image"
|
|
43
|
+
}, imgProps)), /* @__PURE__ */ React.createElement("div", {
|
|
44
|
+
className: "HeroBlock__summary"
|
|
45
|
+
}, summary), hasButtons && /* @__PURE__ */ React.createElement("div", {
|
|
46
|
+
className: "HeroBlock__buttons"
|
|
47
|
+
}, primaryButton && /* @__PURE__ */ React.createElement(ButtonPrimary, __spreadValues({}, primaryButton)), " ", secondaryButton && /* @__PURE__ */ React.createElement(ButtonTertiary, __spreadValues({}, secondaryButton))));
|
|
48
|
+
};
|
|
49
|
+
var HeroBlock_default = HeroBlock;
|
|
50
|
+
export {
|
|
51
|
+
HeroBlock_default as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var IframeBlock_exports = {};
|
|
22
|
+
__export(IframeBlock_exports, {
|
|
23
|
+
default: () => IframeBlock_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(IframeBlock_exports);
|
|
26
|
+
var import_react = __toESM(require("react"));
|
|
27
|
+
var import_getBemClass = __toESM(require("@hugsmidjan/react/utils/getBemClass"));
|
|
28
|
+
var import_iframe_resizer_react = __toESM(require("iframe-resizer-react"));
|
|
29
|
+
const IframeBlock = (props) => {
|
|
30
|
+
const { src, framed, compact, scrolling, height = "auto", align } = props;
|
|
31
|
+
const className = (0, import_getBemClass.default)("IframeBlock", [
|
|
32
|
+
framed && "framed",
|
|
33
|
+
compact && "compact",
|
|
34
|
+
align === "right" && "align--" + align
|
|
35
|
+
]);
|
|
36
|
+
return height === "auto" ? /* @__PURE__ */ import_react.default.createElement(import_iframe_resizer_react.default, {
|
|
37
|
+
className,
|
|
38
|
+
src
|
|
39
|
+
}) : /* @__PURE__ */ import_react.default.createElement("iframe", {
|
|
40
|
+
className,
|
|
41
|
+
src,
|
|
42
|
+
height: height < 0 ? void 0 : height,
|
|
43
|
+
scrolling: scrolling === true ? "yes" : scrolling === false ? "no" : scrolling
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var IframeBlock_default = IframeBlock;
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import getBemClass from "@hugsmidjan/react/utils/getBemClass";
|
|
3
|
+
import IframeResizer from "iframe-resizer-react";
|
|
4
|
+
const IframeBlock = (props) => {
|
|
5
|
+
const { src, framed, compact, scrolling, height = "auto", align } = props;
|
|
6
|
+
const className = getBemClass("IframeBlock", [
|
|
7
|
+
framed && "framed",
|
|
8
|
+
compact && "compact",
|
|
9
|
+
align === "right" && "align--" + align
|
|
10
|
+
]);
|
|
11
|
+
return height === "auto" ? /* @__PURE__ */ React.createElement(IframeResizer, {
|
|
12
|
+
className,
|
|
13
|
+
src
|
|
14
|
+
}) : /* @__PURE__ */ React.createElement("iframe", {
|
|
15
|
+
className,
|
|
16
|
+
src,
|
|
17
|
+
height: height < 0 ? void 0 : height,
|
|
18
|
+
scrolling: scrolling === true ? "yes" : scrolling === false ? "no" : scrolling
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var IframeBlock_default = IframeBlock;
|
|
22
|
+
export {
|
|
23
|
+
IframeBlock_default as default
|
|
24
|
+
};
|