@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
package/types/Bling.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { BlingType } from '@reykjavik/hanna-utils/assets';
|
|
2
|
+
declare const colors: {
|
|
3
|
+
tertiary: boolean;
|
|
4
|
+
secondary: boolean;
|
|
5
|
+
primary: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type BlingColor = keyof typeof colors;
|
|
8
|
+
declare const aligns: {
|
|
9
|
+
left: boolean;
|
|
10
|
+
'left-ish': boolean;
|
|
11
|
+
'left-center': boolean;
|
|
12
|
+
'right-center': boolean;
|
|
13
|
+
'right-ish': boolean;
|
|
14
|
+
right: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare type BlingAlignment = keyof typeof aligns;
|
|
17
|
+
declare const valigns: {
|
|
18
|
+
up: boolean;
|
|
19
|
+
'up-ish': boolean;
|
|
20
|
+
center: boolean;
|
|
21
|
+
'down-ish': boolean;
|
|
22
|
+
down: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare type BlingVAlignment = keyof typeof valigns;
|
|
25
|
+
declare const parentOffset: {
|
|
26
|
+
top: boolean;
|
|
27
|
+
'top-ish': boolean;
|
|
28
|
+
center: boolean;
|
|
29
|
+
'bottom-ish': boolean;
|
|
30
|
+
bottom: boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare type BlingParentOffset = keyof typeof parentOffset;
|
|
33
|
+
export declare type BlingProps = {
|
|
34
|
+
/**
|
|
35
|
+
* Horizontal alignment relative to the bling container's
|
|
36
|
+
* full width
|
|
37
|
+
*
|
|
38
|
+
* NOTE: Blings should always be placed in a layout context
|
|
39
|
+
* where they can stretch to a full (12 columns) width
|
|
40
|
+
*/
|
|
41
|
+
align?: BlingAlignment;
|
|
42
|
+
/**
|
|
43
|
+
* Vertical shift along the vertical insertion point
|
|
44
|
+
*
|
|
45
|
+
* Defult: `center`
|
|
46
|
+
*/
|
|
47
|
+
vertical?: BlingVAlignment;
|
|
48
|
+
/**
|
|
49
|
+
* Vertical positioning of the insertion point within
|
|
50
|
+
* the Bling's offset parent element.
|
|
51
|
+
*
|
|
52
|
+
* Default is the natural layout flow position of the
|
|
53
|
+
* Bling element (no vertical re-positioning)
|
|
54
|
+
*/
|
|
55
|
+
parent?: BlingParentOffset;
|
|
56
|
+
/**
|
|
57
|
+
* Theme color (combo) for the elelment
|
|
58
|
+
*
|
|
59
|
+
* Default: `tertiary`
|
|
60
|
+
*/
|
|
61
|
+
color?: BlingColor;
|
|
62
|
+
/**
|
|
63
|
+
* Gives the Bling a positive `z-index` value.
|
|
64
|
+
*
|
|
65
|
+
* By default Blings layer themselves *underneath* other page content.
|
|
66
|
+
*/
|
|
67
|
+
overlay?: boolean;
|
|
68
|
+
/** Additional className (use sparingly) */
|
|
69
|
+
className?: string;
|
|
70
|
+
} & ({
|
|
71
|
+
/** The name of the Bling shape to display */
|
|
72
|
+
type: BlingType;
|
|
73
|
+
/** Not allowed when `type` is set */
|
|
74
|
+
blingUrl?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
type?: undefined;
|
|
77
|
+
/** Custom SVG URL to load (use sparingly) */
|
|
78
|
+
blingUrl: string;
|
|
79
|
+
});
|
|
80
|
+
declare const Bling: (props: BlingProps) => JSX.Element;
|
|
81
|
+
export default Bling;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare type BreadCrumb = {
|
|
2
|
+
href?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type BreadCrumbTrail = Array<BreadCrumb>;
|
|
6
|
+
export declare type BreadCrumbsProps = {
|
|
7
|
+
title: string;
|
|
8
|
+
trail: BreadCrumbTrail;
|
|
9
|
+
};
|
|
10
|
+
declare const BreadCrumbs: (props: BreadCrumbsProps) => JSX.Element | null;
|
|
11
|
+
export default BreadCrumbs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from './_abstract/Button';
|
|
3
|
+
export declare type ButtonBackProps = ButtonProps;
|
|
4
|
+
declare const ButtonBack: (props: ButtonBackProps & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export default ButtonBack;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type ButtonBarProps = {
|
|
3
|
+
align?: 'right';
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const ButtonBar: {
|
|
7
|
+
(props: ButtonBarProps): JSX.Element;
|
|
8
|
+
Split(): JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Prefer using `ButtonBar.Split` instead.
|
|
12
|
+
*
|
|
13
|
+
* (This export token is only to aid discovery.)
|
|
14
|
+
*/
|
|
15
|
+
export declare const ButtonBar__split: () => JSX.Element;
|
|
16
|
+
export default ButtonBar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/Button';
|
|
3
|
+
export declare type ButtonPrimaryProps = ButtonProps & ButtonVariantProps;
|
|
4
|
+
declare const ButtonPrimary: (props: ButtonPrimaryProps & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export default ButtonPrimary;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/Button';
|
|
3
|
+
export declare type ButtonSecondaryProps = ButtonProps & ButtonVariantProps;
|
|
4
|
+
declare const ButtonSecondary: (props: ButtonSecondaryProps & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export default ButtonSecondary;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/Button';
|
|
3
|
+
declare type TertiarySize = Extract<ButtonVariantProps['size'], 'normal' | 'small'>;
|
|
4
|
+
declare type TertiaryIcon = Extract<ButtonVariantProps['icon'], 'none' | 'go-back'>;
|
|
5
|
+
export declare type ButtonTertiaryProps = ButtonProps & Omit<ButtonVariantProps, 'icon' | 'size'> & {
|
|
6
|
+
size?: TertiarySize;
|
|
7
|
+
icon?: TertiaryIcon;
|
|
8
|
+
};
|
|
9
|
+
declare const ButtonTertiary: (props: ButtonTertiaryProps & {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
export default ButtonTertiary;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CarouselProps } from './_abstract/_AbstractCarousel';
|
|
2
|
+
export type { CarouselProps } from './_abstract/_AbstractCarousel';
|
|
3
|
+
declare const Carousel: <I extends Record<string, unknown> = {}, P extends Record<string, unknown> | undefined = {}>(props: CarouselProps<I, P>) => JSX.Element;
|
|
4
|
+
export default Carousel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EffectProp, SeenProp } from './utils/seenEffect';
|
|
3
|
+
export declare type CenterColumnProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & SeenProp & EffectProp;
|
|
6
|
+
declare const CenterColumn: (props: CenterColumnProps) => JSX.Element;
|
|
7
|
+
export default CenterColumn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/TogglerGroupField';
|
|
2
|
+
export declare type CheckboxButtonsGroupProps = TogglerGroupFieldProps & {
|
|
3
|
+
value?: Array<string>;
|
|
4
|
+
/** @deprecated (Will be removed in v0.9) */
|
|
5
|
+
columns?: '2col' | '3col';
|
|
6
|
+
/** @deprecated (Will be removed in v0.9) */
|
|
7
|
+
layout?: 'slim';
|
|
8
|
+
};
|
|
9
|
+
export declare type CheckboxButtonsGroupOptions = TogglerGroupFieldOptions;
|
|
10
|
+
declare const CheckboxButtonsGroup: (props: CheckboxButtonsGroupProps) => JSX.Element;
|
|
11
|
+
export default CheckboxButtonsGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/TogglerGroupField';
|
|
2
|
+
export declare type CheckboxGroupProps = TogglerGroupFieldProps & {
|
|
3
|
+
layout?: 'inline';
|
|
4
|
+
value?: Array<string>;
|
|
5
|
+
};
|
|
6
|
+
export declare type CheckboxGroupOption = TogglerGroupFieldOption;
|
|
7
|
+
export declare type CheckboxGroupOptions = TogglerGroupFieldOptions;
|
|
8
|
+
declare const CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element;
|
|
9
|
+
export default CheckboxGroup;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
2
|
+
import { BlockItem } from './_abstract/_Block';
|
|
3
|
+
import { ImageProps } from './_abstract/Image';
|
|
4
|
+
import { SeenProp } from './utils/seenEffect';
|
|
5
|
+
import { Alignment } from './constants';
|
|
6
|
+
declare const types: {
|
|
7
|
+
largebox: boolean;
|
|
8
|
+
largeimage: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare type CityBlockImageProps = {
|
|
11
|
+
illustration: Illustration;
|
|
12
|
+
image?: never;
|
|
13
|
+
} | {
|
|
14
|
+
image: ImageProps;
|
|
15
|
+
illustration?: never;
|
|
16
|
+
};
|
|
17
|
+
export declare type CityBlockProps = {
|
|
18
|
+
align?: Alignment;
|
|
19
|
+
type?: keyof typeof types;
|
|
20
|
+
content: BlockItem;
|
|
21
|
+
} & CityBlockImageProps & SeenProp;
|
|
22
|
+
declare const CityBlock: (props: CityBlockProps) => JSX.Element;
|
|
23
|
+
export default CityBlock;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
2
|
+
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
3
|
+
export declare type ContactBubbleI18n = {
|
|
4
|
+
lang?: string;
|
|
5
|
+
openBtn: string;
|
|
6
|
+
openBtnLong?: string;
|
|
7
|
+
closeBtn: string;
|
|
8
|
+
closeBtnLong?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const defaultTexts: DefaultTexts<ContactBubbleI18n>;
|
|
11
|
+
declare const icons: {
|
|
12
|
+
readonly suggestions: 1;
|
|
13
|
+
readonly phone: 1;
|
|
14
|
+
readonly faq: 1;
|
|
15
|
+
readonly livechat: 1;
|
|
16
|
+
readonly other: 0;
|
|
17
|
+
};
|
|
18
|
+
export declare type ContactBubbleIcon = keyof typeof icons;
|
|
19
|
+
export declare const ensureIcon: (maybeIcon: string | undefined) => ContactBubbleIcon | undefined;
|
|
20
|
+
export declare type ContactBubbleItem = {
|
|
21
|
+
label: string;
|
|
22
|
+
extraLabel?: string;
|
|
23
|
+
icon?: ContactBubbleIcon;
|
|
24
|
+
} & ({
|
|
25
|
+
href: string;
|
|
26
|
+
/** Prevents default link behavior unless the handler function returns `true` */
|
|
27
|
+
onClick?: () => void | boolean;
|
|
28
|
+
target?: string;
|
|
29
|
+
} | {
|
|
30
|
+
onClick: () => void | boolean;
|
|
31
|
+
href?: undefined;
|
|
32
|
+
target?: undefined;
|
|
33
|
+
});
|
|
34
|
+
export declare type ContactBubbleProps = {
|
|
35
|
+
title?: string;
|
|
36
|
+
links: Array<ContactBubbleItem>;
|
|
37
|
+
/** By default the ContactBubble's toggler is hidden if the page
|
|
38
|
+
* is scrolled to near the top or the bottom.
|
|
39
|
+
*
|
|
40
|
+
* This means that on short pages (with hardly any scrolling)
|
|
41
|
+
* the ContactBubble **always** hidden.
|
|
42
|
+
*
|
|
43
|
+
* Set this prop to `true` if you want to disable this
|
|
44
|
+
* magic and always show the bubble toggler
|
|
45
|
+
*/
|
|
46
|
+
alwaysShow?: boolean;
|
|
47
|
+
texts?: ContactBubbleI18n;
|
|
48
|
+
lang?: string;
|
|
49
|
+
ssr?: SSRSupport;
|
|
50
|
+
} & ({
|
|
51
|
+
open?: boolean;
|
|
52
|
+
onToggle: (isOpen: boolean) => void;
|
|
53
|
+
} | {
|
|
54
|
+
open?: undefined;
|
|
55
|
+
onToggle?: (isOpen: boolean) => void;
|
|
56
|
+
});
|
|
57
|
+
declare const ContactBubble: (props: ContactBubbleProps) => JSX.Element | null;
|
|
58
|
+
export default ContactBubble;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect';
|
|
3
|
+
import { ArticleMetaProps } from './ArticleMeta';
|
|
4
|
+
import { ContentImageProps } from './ContentImage';
|
|
5
|
+
import { RelatedLinksProps } from './RelatedLinks';
|
|
6
|
+
export declare type ContentArticleProps = {
|
|
7
|
+
/** Date, author, etc. */
|
|
8
|
+
meta: ArticleMetaProps['items'];
|
|
9
|
+
headline: string;
|
|
10
|
+
topImage?: ContentImageProps;
|
|
11
|
+
body: ReactNode;
|
|
12
|
+
relatedLinks?: RelatedLinksProps;
|
|
13
|
+
} & SeenProp;
|
|
14
|
+
declare const ContentArticle: (props: ContentArticleProps) => JSX.Element;
|
|
15
|
+
export default ContentArticle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageProps } from './_abstract/Image';
|
|
2
|
+
export declare type ContentImageProps = {
|
|
3
|
+
image?: ImageProps;
|
|
4
|
+
caption?: string | JSX.Element;
|
|
5
|
+
credit?: string | JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
declare const ContentImage: (props: ContentImageProps) => JSX.Element;
|
|
8
|
+
export default ContentImage;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { FormFieldWrappingProps } from './FormField';
|
|
3
|
+
export declare type DatepickerProps = {
|
|
4
|
+
small?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value?: Date;
|
|
7
|
+
startDate?: Date;
|
|
8
|
+
endDate?: Date;
|
|
9
|
+
minDate?: Date;
|
|
10
|
+
maxDate?: Date;
|
|
11
|
+
localeCode?: 'is' | 'en';
|
|
12
|
+
dateFormat?: string;
|
|
13
|
+
isStartDate?: boolean;
|
|
14
|
+
isEndDate?: boolean;
|
|
15
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
16
|
+
onChange: (date?: Date) => void;
|
|
17
|
+
datepickerExtraProps?: Record<string, unknown>;
|
|
18
|
+
/** @deprecated use value instead. (Will be removed in v0.11) */
|
|
19
|
+
initialDate?: Date;
|
|
20
|
+
} & FormFieldWrappingProps;
|
|
21
|
+
export declare const getDateDiff: (date: Date, diff: number) => Date;
|
|
22
|
+
export declare type DatepickerLocaleProps = {
|
|
23
|
+
nextMonthAriaLabel: string;
|
|
24
|
+
nextMonthButtonLabel: string;
|
|
25
|
+
nextYearAriaLabel: string;
|
|
26
|
+
nextYearButtonLabel: string;
|
|
27
|
+
previousMonthAriaLabel: string;
|
|
28
|
+
previousMonthButtonLabel: string;
|
|
29
|
+
previousYearAriaLabel: string;
|
|
30
|
+
previousYearButtonLabel: string;
|
|
31
|
+
timeInputLabel: string;
|
|
32
|
+
weekAriaLabelPrefix: string;
|
|
33
|
+
weekLabel: string;
|
|
34
|
+
ariaLabelPrefix: string;
|
|
35
|
+
chooseDayAriaLabelPrefix: string;
|
|
36
|
+
disabledDayAriaLabelPrefix: string;
|
|
37
|
+
};
|
|
38
|
+
declare const Datepicker: (props: DatepickerProps) => JSX.Element;
|
|
39
|
+
export default Datepicker;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TextCardListProps } from './_abstract/CardList';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect';
|
|
3
|
+
export declare type RelatedLink = {
|
|
4
|
+
href: string;
|
|
5
|
+
label: string;
|
|
6
|
+
blank?: boolean;
|
|
7
|
+
type?: 'link' | 'pdf' | 'text';
|
|
8
|
+
};
|
|
9
|
+
declare type RelatedProps = {
|
|
10
|
+
relatedTitle?: string;
|
|
11
|
+
relatedLinks?: Array<RelatedLink>;
|
|
12
|
+
};
|
|
13
|
+
export declare type ExtraLinksCardProps = TextCardListProps['cards'][number];
|
|
14
|
+
export declare type ExtraLinksProps = TextCardListProps & RelatedProps & {
|
|
15
|
+
className?: string;
|
|
16
|
+
} & SeenProp;
|
|
17
|
+
declare const ExtraLinks: (props: ExtraLinksProps) => JSX.Element;
|
|
18
|
+
export default ExtraLinks;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Efnistakn } from '@reykjavik/hanna-utils/assets';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect';
|
|
3
|
+
export declare type FeatureListProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
features: Array<{
|
|
6
|
+
icon?: Efnistakn;
|
|
7
|
+
iconUrl?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}>;
|
|
10
|
+
} & SeenProp;
|
|
11
|
+
declare const FeatureList: (props: FeatureListProps) => JSX.Element;
|
|
12
|
+
export default FeatureList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type FieldGroupProps = {
|
|
3
|
+
legend: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const FieldGroup: (props: FieldGroupProps) => JSX.Element;
|
|
9
|
+
export default FieldGroup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FormFieldWrappingProps } from './FormField';
|
|
2
|
+
declare type dropzonePropsProps = {
|
|
3
|
+
accept?: string;
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare type FileInputProps = {
|
|
7
|
+
dropzoneProps: dropzonePropsProps;
|
|
8
|
+
dropzoneText: string | JSX.Element;
|
|
9
|
+
showFileSize?: boolean;
|
|
10
|
+
showImagePreviews?: boolean;
|
|
11
|
+
removeFileText: string;
|
|
12
|
+
onFilesUpdated?: (files: Array<File>) => void;
|
|
13
|
+
name?: string;
|
|
14
|
+
value?: ReadonlyArray<File>;
|
|
15
|
+
} & FormFieldWrappingProps;
|
|
16
|
+
declare const FileInput: (props: FileInputProps) => JSX.Element;
|
|
17
|
+
export default FileInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FootnoteProps as _FootnoteProps } from './Footnote';
|
|
2
|
+
/** @deprecated (Will be removed in v0.11)
|
|
3
|
+
*
|
|
4
|
+
* This module file is a typo. import from `Footnote` instead
|
|
5
|
+
*/
|
|
6
|
+
export declare type FootnoteProps = _FootnoteProps;
|
|
7
|
+
/** @deprecated (Will be removed in v0.11)
|
|
8
|
+
*
|
|
9
|
+
* This module file is a typo. import from `Footnote` instead
|
|
10
|
+
*/
|
|
11
|
+
declare const Footnote: (props: _FootnoteProps) => JSX.Element;
|
|
12
|
+
export default Footnote;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
2
|
+
export declare type FooterInfoGroup = {
|
|
3
|
+
title: string;
|
|
4
|
+
role?: JSX.IntrinsicElements['div']['role'];
|
|
5
|
+
modifier?: string;
|
|
6
|
+
} & BemPropsModifier & ({
|
|
7
|
+
content: JSX.Element;
|
|
8
|
+
html?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
html: string;
|
|
11
|
+
content?: undefined;
|
|
12
|
+
});
|
|
13
|
+
export declare type FooterInfoBoxes = Array<FooterInfoGroup>;
|
|
14
|
+
export declare type FooterInfoProps = {
|
|
15
|
+
boxes: FooterInfoBoxes;
|
|
16
|
+
};
|
|
17
|
+
declare const FooterInfo: (props: FooterInfoProps) => JSX.Element;
|
|
18
|
+
export default FooterInfo;
|
package/types/Form.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ComponentLayoutProps } from './constants';
|
|
3
|
+
export declare type FormProps = ComponentLayoutProps & React.FormHTMLAttributes<HTMLFormElement> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const Form: (props: FormProps) => JSX.Element;
|
|
7
|
+
export default Form;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
3
|
+
declare type InputClassNames = {
|
|
4
|
+
/** Basic/raw FormField BEM name */
|
|
5
|
+
bem: string;
|
|
6
|
+
/** Standard name for "<input/>"-styled controls */
|
|
7
|
+
input: string;
|
|
8
|
+
/** Standard name for radio/checkbox group conotrols */
|
|
9
|
+
options: string;
|
|
10
|
+
/** Generic name for unstyled/free-form controls. */
|
|
11
|
+
control: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type FormFieldInputProps = {
|
|
14
|
+
id?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
'aria-describedby'?: string;
|
|
21
|
+
};
|
|
22
|
+
declare type FocusEvents = {
|
|
23
|
+
onFocus?: (e: any) => void;
|
|
24
|
+
onBlur?: (e: any) => void;
|
|
25
|
+
};
|
|
26
|
+
declare type FocusPropMaker = <P extends FocusEvents>(ownProps?: P) => P & Required<FocusEvents>;
|
|
27
|
+
export declare type FormFieldWrappingProps = {
|
|
28
|
+
/** Container className - alongside "FormField" */
|
|
29
|
+
className?: string;
|
|
30
|
+
label: string | JSX.Element;
|
|
31
|
+
assistText?: string | JSX.Element;
|
|
32
|
+
hideLabel?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
invalid?: boolean;
|
|
36
|
+
errorMessage?: string | JSX.Element;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/** Hidden label prefix text to indicate that the field is required.
|
|
39
|
+
*
|
|
40
|
+
* If your field is required but should not say so in its label
|
|
41
|
+
* then set this prop to `false`
|
|
42
|
+
*
|
|
43
|
+
* Default: `"Þarf að fylla út"`
|
|
44
|
+
* */
|
|
45
|
+
reqText?: string | false;
|
|
46
|
+
/** Optional pre-determinted id="" for the __input */
|
|
47
|
+
id?: string;
|
|
48
|
+
/** Ref object pointing to the outermost `.FormField` element */
|
|
49
|
+
wrapperRef?: RefObject<HTMLElement>;
|
|
50
|
+
ssr?: SSRSupport;
|
|
51
|
+
};
|
|
52
|
+
export declare type FormFieldGroupWrappingProps = FormFieldWrappingProps & {
|
|
53
|
+
LabelTag?: 'h3' | 'h4' | 'h5';
|
|
54
|
+
};
|
|
55
|
+
export declare type FormFieldProps = FormFieldGroupWrappingProps & {
|
|
56
|
+
/** Container className - alongside "FormField" */
|
|
57
|
+
className: string;
|
|
58
|
+
small?: boolean;
|
|
59
|
+
group?: boolean;
|
|
60
|
+
empty?: boolean;
|
|
61
|
+
filled?: boolean;
|
|
62
|
+
renderInput(className: InputClassNames, inputProps: FormFieldInputProps, addFocusProps: FocusPropMaker, isBrowser?: boolean): JSX.Element;
|
|
63
|
+
};
|
|
64
|
+
declare const FormField: (props: FormFieldProps) => JSX.Element;
|
|
65
|
+
export default FormField;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageProps } from '../_abstract/Image';
|
|
2
|
+
export declare type GalleryItemProps = {
|
|
3
|
+
caption?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
largeImageSrc?: string;
|
|
6
|
+
} & ImageProps;
|
|
7
|
+
declare const GalleryItem: (props: GalleryItemProps) => JSX.Element;
|
|
8
|
+
export default GalleryItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GalleryProps } from '../Gallery';
|
|
3
|
+
import { GalleryItemProps } from './_GalleryItem';
|
|
4
|
+
declare type ModalContextProps = {
|
|
5
|
+
setCurrentImage: (item: GalleryItemProps | undefined) => void;
|
|
6
|
+
currentImage: GalleryItemProps | undefined;
|
|
7
|
+
} & GalleryProps;
|
|
8
|
+
declare const GalleryModalContext: React.Context<ModalContextProps>;
|
|
9
|
+
export default GalleryModalContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
2
|
+
import { GalleryItemProps } from './Gallery/_GalleryItem';
|
|
3
|
+
import { SeenProp } from './utils/seenEffect';
|
|
4
|
+
export type { GalleryItemProps } from './Gallery/_GalleryItem';
|
|
5
|
+
export declare type GalleryI18n = {
|
|
6
|
+
modalNextLabel: string;
|
|
7
|
+
modalPrevLabel: string;
|
|
8
|
+
modalCloseLabel: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type GalleryProps = {
|
|
11
|
+
items: Array<GalleryItemProps>;
|
|
12
|
+
texts?: GalleryI18n;
|
|
13
|
+
lang?: string;
|
|
14
|
+
ssr?: SSRSupport;
|
|
15
|
+
} & SeenProp;
|
|
16
|
+
declare const Gallery: (props: GalleryProps) => JSX.Element;
|
|
17
|
+
export default Gallery;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Efnistakn } from '@reykjavik/hanna-utils/assets';
|
|
2
|
+
import { ButtonProps } from './_abstract/Button';
|
|
3
|
+
import { ImageProps } from './_abstract/Image';
|
|
4
|
+
import { SeenProp } from './utils/seenEffect';
|
|
5
|
+
export declare type GridBlockItem = {
|
|
6
|
+
title: string;
|
|
7
|
+
summary: string | JSX.Element;
|
|
8
|
+
icon?: Efnistakn;
|
|
9
|
+
image?: ImageProps;
|
|
10
|
+
} & ({
|
|
11
|
+
href?: string;
|
|
12
|
+
links: Array<ButtonProps>;
|
|
13
|
+
} | {
|
|
14
|
+
href: string;
|
|
15
|
+
links?: Array<ButtonProps>;
|
|
16
|
+
});
|
|
17
|
+
export declare type GridBlocksProps = {
|
|
18
|
+
blocks: Array<GridBlockItem>;
|
|
19
|
+
twocol?: boolean;
|
|
20
|
+
} & SeenProp;
|
|
21
|
+
export declare type GridBlocksProp1s = {
|
|
22
|
+
blocks: Array<GridBlockItem>;
|
|
23
|
+
twocol?: boolean;
|
|
24
|
+
};
|
|
25
|
+
declare const GridBlocks: (props: GridBlocksProps) => JSX.Element;
|
|
26
|
+
export default GridBlocks;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ComponentLayoutProps } from './constants';
|
|
3
|
+
declare const sizes: {
|
|
4
|
+
readonly small: "small";
|
|
5
|
+
/** Default value */
|
|
6
|
+
readonly normal: "normal";
|
|
7
|
+
readonly large: "large";
|
|
8
|
+
};
|
|
9
|
+
declare type HeadingSize = keyof typeof sizes;
|
|
10
|
+
export declare type HeadingProps = {
|
|
11
|
+
Tag?: 'h2' | 'h3';
|
|
12
|
+
size?: HeadingSize;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
} & ComponentLayoutProps;
|
|
15
|
+
declare const Heading: (props: HeadingProps) => JSX.Element;
|
|
16
|
+
export default Heading;
|