@reykjavik/hanna-react 0.10.84 → 0.10.85
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.d.ts +2 -2
- package/AccordionList.js +5 -5
- package/ActionCards.d.ts +2 -2
- package/ActionCards.js +4 -4
- package/Alert.d.ts +1 -1
- package/Alert.js +6 -6
- package/ArticleCards.d.ts +1 -1
- package/ArticleCards.js +2 -2
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +2 -2
- package/ArticleCarousel/_ArticleCarouselCard.js +7 -7
- package/ArticleCarousel.d.ts +3 -3
- package/ArticleCarousel.js +3 -3
- package/ArticleMeta.js +2 -2
- package/BasicTable.d.ts +1 -1
- package/BasicTable.js +2 -2
- package/BgBox.d.ts +1 -1
- package/BgBox.js +3 -3
- package/Bling.js +2 -2
- package/BlockQuote.d.ts +1 -1
- package/BlockQuote.js +2 -2
- package/BreadCrumbs.js +2 -2
- package/ButtonBack.d.ts +1 -1
- package/ButtonBack.js +2 -2
- package/ButtonPrimary.d.ts +1 -1
- package/ButtonPrimary.js +2 -2
- package/ButtonSecondary.d.ts +1 -1
- package/ButtonSecondary.js +2 -2
- package/ButtonTertiary.d.ts +1 -1
- package/ButtonTertiary.js +2 -2
- package/CHANGELOG.md +7 -0
- package/Carousel.d.ts +2 -2
- package/Carousel.js +2 -2
- package/CenterColumn.d.ts +1 -1
- package/CenterColumn.js +2 -2
- package/Checkbox.d.ts +1 -1
- package/Checkbox.js +2 -2
- package/CheckboxButton.d.ts +1 -1
- package/CheckboxButton.js +2 -2
- package/CheckboxButtonsGroup.d.ts +1 -1
- package/CheckboxButtonsGroup.js +3 -3
- package/CheckboxGroup.d.ts +1 -1
- package/CheckboxGroup.js +3 -3
- package/CityBlock.d.ts +4 -4
- package/CityBlock.js +4 -4
- package/ContactBubble.d.ts +1 -1
- package/ContactBubble.js +6 -6
- package/ContentArticle.d.ts +4 -4
- package/ContentArticle.js +14 -14
- package/ContentImage.d.ts +1 -1
- package/ContentImage.js +2 -2
- package/Datepicker.d.ts +1 -1
- package/Datepicker.js +2 -2
- package/ExtraLinks.d.ts +2 -2
- package/ExtraLinks.js +6 -6
- package/FeatureList.d.ts +1 -1
- package/FeatureList.js +4 -4
- package/FileInput.d.ts +2 -2
- package/FileInput.js +4 -4
- package/Foonote.d.ts +1 -1
- package/Foonote.js +2 -2
- package/FooterBadges.js +2 -2
- package/Form.d.ts +1 -1
- package/FormField.d.ts +1 -1
- package/FormField.js +4 -4
- package/Gallery/_GalleryItem.d.ts +1 -1
- package/Gallery/_GalleryItem.js +7 -7
- package/Gallery/_GalleryModal.d.ts +1 -1
- package/Gallery/_GalleryModal.js +4 -4
- package/Gallery/_GalleryModalContext.d.ts +2 -2
- package/Gallery/_GalleryModalItem.d.ts +1 -1
- package/Gallery/_GalleryModalItem.js +2 -2
- package/Gallery.d.ts +4 -4
- package/Gallery.js +7 -7
- package/GridBlocks.d.ts +3 -3
- package/GridBlocks.js +8 -8
- package/Heading.d.ts +1 -1
- package/HeroBlock.d.ts +3 -3
- package/HeroBlock.js +8 -8
- package/Illustration.d.ts +1 -1
- package/Illustration.js +2 -2
- package/ImageCards.d.ts +2 -2
- package/ImageCards.js +4 -4
- package/InfoBlock.d.ts +1 -1
- package/InfoBlock.js +2 -2
- package/InfoHero.d.ts +3 -3
- package/InfoHero.js +10 -10
- package/IslandBlock.d.ts +4 -4
- package/IslandBlock.js +4 -4
- package/IslandPageBlock.d.ts +4 -4
- package/IslandPageBlock.js +4 -4
- package/LabeledTextBlock.d.ts +2 -2
- package/LabeledTextBlock.js +4 -4
- package/Layout.d.ts +1 -1
- package/Layout.js +13 -13
- package/MainMenu/_Auxiliary.d.ts +1 -1
- package/MainMenu/_Auxiliary.js +2 -2
- package/MainMenu/_PrimaryPanel.js +2 -2
- package/MainMenu.d.ts +3 -3
- package/MainMenu.js +15 -13
- package/MiniMetrics.d.ts +2 -2
- package/MiniMetrics.js +4 -4
- package/NameCard.js +4 -4
- package/NameCards.d.ts +1 -1
- package/NameCards.js +2 -2
- package/NewsHero.d.ts +2 -2
- package/NewsHero.js +7 -7
- package/PageFilter.d.ts +1 -1
- package/PageFilter.js +4 -4
- package/PageHeading.d.ts +1 -1
- package/PageHeading.js +2 -2
- package/Picture.d.ts +1 -1
- package/Picture.js +2 -2
- package/PullQuote.d.ts +1 -1
- package/PullQuote.js +2 -2
- package/RadioButtonsGroup.d.ts +1 -1
- package/RadioButtonsGroup.js +4 -4
- package/RadioGroup.d.ts +2 -2
- package/RadioGroup.js +4 -4
- package/RelatedLinks.js +2 -2
- package/RowBlock.d.ts +1 -1
- package/RowBlock.js +2 -2
- package/SearchInput.d.ts +1 -1
- package/SearchInput.js +2 -2
- package/SearchResults/_SearchResultsItem.js +4 -4
- package/SearchResults.d.ts +2 -2
- package/SearchResults.js +7 -7
- package/SeenEffect.d.ts +1 -1
- package/SeenEffect.js +3 -3
- package/Selectbox.d.ts +2 -2
- package/Selectbox.js +2 -2
- package/ShareButtons.d.ts +1 -1
- package/ShareButtons.js +2 -2
- package/SiteSearchAutocomplete.js +2 -2
- package/SiteSearchCurtain.js +2 -2
- package/SiteSearchInput.d.ts +2 -2
- package/SiteSearchInput.js +2 -2
- package/SubHeading.d.ts +2 -2
- package/SubHeading.js +2 -2
- package/Tabs.d.ts +2 -2
- package/Tabs.js +4 -4
- package/TagPill.d.ts +1 -1
- package/TagPill.js +3 -3
- package/TextBlock.d.ts +2 -2
- package/TextBlock.js +2 -2
- package/TextButton.d.ts +1 -1
- package/TextButton.js +2 -2
- package/TextInput.d.ts +1 -1
- package/TextInput.js +2 -2
- package/VerticalTabsTOC.d.ts +1 -1
- package/VerticalTabsTOC.js +2 -2
- package/WizardLayout.d.ts +1 -1
- package/WizardLayout.js +8 -8
- package/WizardLayoutClose.d.ts +1 -1
- package/WizardLayoutClose.js +2 -2
- package/_abstract/_AbstractCarousel.d.ts +2 -2
- package/_abstract/_AbstractCarousel.js +6 -6
- package/_abstract/_Blings.d.ts +1 -1
- package/_abstract/_Blings.js +2 -2
- package/_abstract/_Block.d.ts +3 -3
- package/_abstract/_Block.js +6 -6
- package/_abstract/_Button.js +2 -2
- package/_abstract/_CardList.d.ts +1 -1
- package/_abstract/_CardList.js +4 -4
- package/_abstract/_Image.js +2 -2
- package/_abstract/_Quote.js +2 -2
- package/_abstract/_TogglerGroup.d.ts +2 -2
- package/_abstract/_TogglerGroup.js +2 -2
- package/_abstract/_TogglerGroupField.d.ts +3 -3
- package/_abstract/_TogglerGroupField.js +4 -4
- package/assets.d.ts +2 -2
- package/esm/AccordionList.d.ts +25 -0
- package/esm/AccordionList.js +32 -0
- package/esm/ActionCards.d.ts +6 -0
- package/esm/ActionCards.js +9 -0
- package/esm/Alert.d.ts +48 -0
- package/esm/Alert.js +90 -0
- package/esm/ArticleCards.d.ts +8 -0
- package/esm/ArticleCards.js +4 -0
- package/esm/ArticleCarousel/_ArticleCarouselCard.d.ts +28 -0
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +24 -0
- package/esm/ArticleCarousel.d.ts +12 -0
- package/esm/ArticleCarousel.js +8 -0
- package/esm/ArticleMeta.d.ts +10 -0
- package/esm/ArticleMeta.js +19 -0
- package/esm/Attention.d.ts +7 -0
- package/esm/Attention.js +4 -0
- package/esm/BasicTable.d.ts +14 -0
- package/esm/BasicTable.js +29 -0
- package/esm/BgBox.d.ts +8 -0
- package/esm/BgBox.js +9 -0
- package/esm/Bling.d.ts +81 -0
- package/esm/Bling.js +44 -0
- package/esm/BlockBreak.d.ts +2 -0
- package/esm/BlockBreak.js +6 -0
- package/esm/BlockQuote.d.ts +4 -0
- package/esm/BlockQuote.js +4 -0
- package/esm/BreadCrumbs.d.ts +11 -0
- package/esm/BreadCrumbs.js +28 -0
- package/esm/ButtonBack.d.ts +7 -0
- package/esm/ButtonBack.js +4 -0
- package/esm/ButtonBar.d.ts +17 -0
- package/esm/ButtonBar.js +15 -0
- package/esm/ButtonPrimary.d.ts +7 -0
- package/esm/ButtonPrimary.js +4 -0
- package/esm/ButtonSecondary.d.ts +7 -0
- package/esm/ButtonSecondary.js +4 -0
- package/esm/ButtonTertiary.d.ts +12 -0
- package/esm/ButtonTertiary.js +15 -0
- package/esm/Carousel.d.ts +4 -0
- package/esm/Carousel.js +4 -0
- package/esm/CarouselStepper.d.ts +4 -0
- package/esm/CarouselStepper.js +4 -0
- package/esm/CenterColumn.d.ts +7 -0
- package/esm/CenterColumn.js +7 -0
- package/esm/Checkbox.d.ts +4 -0
- package/esm/Checkbox.js +4 -0
- package/esm/CheckboxButton.d.ts +4 -0
- package/esm/CheckboxButton.js +4 -0
- package/esm/CheckboxButtonsGroup.d.ts +12 -0
- package/esm/CheckboxButtonsGroup.js +13 -0
- package/esm/CheckboxGroup.d.ts +10 -0
- package/esm/CheckboxGroup.js +7 -0
- package/esm/CityBlock.d.ts +21 -0
- package/esm/CityBlock.js +18 -0
- package/esm/ContactBubble.d.ts +58 -0
- package/esm/ContactBubble.js +152 -0
- package/esm/ContentArticle.d.ts +16 -0
- package/esm/ContentArticle.js +24 -0
- package/esm/ContentImage.d.ts +8 -0
- package/esm/ContentImage.js +18 -0
- package/esm/Datepicker.d.ts +40 -0
- package/esm/Datepicker.js +78 -0
- package/esm/ExtraLinks.d.ts +18 -0
- package/esm/ExtraLinks.js +24 -0
- package/esm/FeatureList.d.ts +12 -0
- package/esm/FeatureList.js +16 -0
- package/esm/FieldGroup.d.ts +10 -0
- package/esm/FieldGroup.js +9 -0
- package/esm/FileInput/_FileInput.utils.d.ts +36 -0
- package/esm/FileInput/_FileInput.utils.js +69 -0
- package/esm/FileInput/_FileInputFileList.d.ts +11 -0
- package/esm/FileInput/_FileInputFileList.js +19 -0
- package/esm/FileInput.d.ts +48 -0
- package/esm/FileInput.js +130 -0
- package/esm/Foonote.d.ts +12 -0
- package/esm/Foonote.js +7 -0
- package/esm/FooterBadges.d.ts +9 -0
- package/esm/FooterBadges.js +12 -0
- package/esm/FooterInfo.d.ts +20 -0
- package/esm/FooterInfo.js +12 -0
- package/esm/Footnote.d.ts +6 -0
- package/esm/Footnote.js +3 -0
- package/esm/Form.d.ts +7 -0
- package/esm/Form.js +10 -0
- package/esm/FormField.d.ts +65 -0
- package/esm/FormField.js +92 -0
- package/esm/Gallery/_GalleryItem.d.ts +7 -0
- package/esm/Gallery/_GalleryItem.js +19 -0
- package/esm/Gallery/_GalleryModal.d.ts +6 -0
- package/esm/Gallery/_GalleryModal.js +53 -0
- package/esm/Gallery/_GalleryModalContext.d.ts +9 -0
- package/esm/Gallery/_GalleryModalContext.js +2 -0
- package/esm/Gallery/_GalleryModalItem.d.ts +2 -0
- package/esm/Gallery/_GalleryModalItem.js +11 -0
- package/esm/Gallery.d.ts +17 -0
- package/esm/Gallery.js +27 -0
- package/esm/GridBlocks.d.ts +26 -0
- package/esm/GridBlocks.js +24 -0
- package/esm/Heading.d.ts +22 -0
- package/esm/Heading.js +19 -0
- package/esm/HeroBlock.d.ts +19 -0
- package/esm/HeroBlock.js +21 -0
- package/esm/IframeBlock.d.ts +28 -0
- package/esm/IframeBlock.js +26 -0
- package/esm/Illustration.d.ts +10 -0
- package/esm/Illustration.js +8 -0
- package/esm/ImageCards.d.ts +10 -0
- package/esm/ImageCards.js +12 -0
- package/esm/InfoBlock.d.ts +13 -0
- package/esm/InfoBlock.js +13 -0
- package/esm/InfoHero.d.ts +18 -0
- package/esm/InfoHero.js +83 -0
- package/esm/IslandBlock.d.ts +25 -0
- package/esm/IslandBlock.js +16 -0
- package/esm/IslandPageBlock.d.ts +24 -0
- package/esm/IslandPageBlock.js +16 -0
- package/esm/LabeledTextBlock.d.ts +11 -0
- package/esm/LabeledTextBlock.js +14 -0
- package/esm/Layout.d.ts +32 -0
- package/esm/Layout.js +56 -0
- package/esm/MainMenu/_Auxiliary.d.ts +6 -0
- package/esm/MainMenu/_Auxiliary.js +13 -0
- package/esm/MainMenu/_PrimaryPanel.d.ts +29 -0
- package/esm/MainMenu/_PrimaryPanel.js +22 -0
- package/esm/MainMenu.d.ts +62 -0
- package/esm/MainMenu.js +221 -0
- package/esm/MiniMetrics.d.ts +8 -0
- package/esm/MiniMetrics.js +12 -0
- package/esm/Modal.d.ts +8 -0
- package/esm/Modal.js +14 -0
- package/esm/NameCard.d.ts +64 -0
- package/esm/NameCard.js +82 -0
- package/esm/NameCards.d.ts +6 -0
- package/esm/NameCards.js +7 -0
- package/esm/NewsHero.d.ts +14 -0
- package/esm/NewsHero.js +86 -0
- package/esm/PageFilter.d.ts +16 -0
- package/esm/PageFilter.js +15 -0
- package/esm/PageHeading.d.ts +10 -0
- package/esm/PageHeading.js +12 -0
- package/esm/Picture.d.ts +7 -0
- package/esm/Picture.js +8 -0
- package/esm/ProcessOverview.d.ts +13 -0
- package/esm/ProcessOverview.js +17 -0
- package/esm/PullQuote.d.ts +4 -0
- package/esm/PullQuote.js +4 -0
- package/esm/RadioButtonsGroup.d.ts +12 -0
- package/esm/RadioButtonsGroup.js +14 -0
- package/esm/RadioGroup.d.ts +16 -0
- package/esm/RadioGroup.js +8 -0
- package/esm/RelatedLinks.d.ts +20 -0
- package/esm/RelatedLinks.js +26 -0
- package/esm/RowBlock.d.ts +12 -0
- package/esm/RowBlock.js +9 -0
- package/esm/RowBlockColumn.d.ts +8 -0
- package/esm/RowBlockColumn.js +11 -0
- package/esm/SearchInput.d.ts +18 -0
- package/esm/SearchInput.js +23 -0
- package/esm/SearchResults/_SearchResultsItem.d.ts +18 -0
- package/esm/SearchResults/_SearchResultsItem.js +14 -0
- package/esm/SearchResults.d.ts +37 -0
- package/esm/SearchResults.js +108 -0
- package/esm/SeenEffect.d.ts +4 -0
- package/esm/SeenEffect.js +9 -0
- package/esm/Selectbox.d.ts +11 -0
- package/esm/Selectbox.js +40 -0
- package/esm/ShareButtons.d.ts +9 -0
- package/esm/ShareButtons.js +56 -0
- package/esm/Sharpie.d.ts +23 -0
- package/esm/Sharpie.js +22 -0
- package/esm/SiteSearchAutocomplete.d.ts +40 -0
- package/esm/SiteSearchAutocomplete.js +48 -0
- package/esm/SiteSearchCurtain.d.ts +6 -0
- package/esm/SiteSearchCurtain.js +28 -0
- package/esm/SiteSearchInput.d.ts +24 -0
- package/esm/SiteSearchInput.js +30 -0
- package/esm/Skeleton.d.ts +25 -0
- package/esm/Skeleton.js +30 -0
- package/esm/SubHeading.d.ts +10 -0
- package/esm/SubHeading.js +13 -0
- package/esm/Tabs.d.ts +35 -0
- package/esm/Tabs.js +94 -0
- package/esm/TagPill.d.ts +25 -0
- package/esm/TagPill.js +34 -0
- package/esm/TextBlock.d.ts +15 -0
- package/esm/TextBlock.js +15 -0
- package/esm/TextButton.d.ts +9 -0
- package/esm/TextButton.js +9 -0
- package/esm/TextInput.d.ts +16 -0
- package/esm/TextInput.js +32 -0
- package/esm/Tooltip.d.ts +7 -0
- package/esm/Tooltip.js +58 -0
- package/esm/VSpacer.d.ts +22 -0
- package/esm/VSpacer.js +41 -0
- package/esm/VerticalTabsTOC.d.ts +14 -0
- package/esm/VerticalTabsTOC.js +68 -0
- package/esm/WizardLayout.d.ts +15 -0
- package/esm/WizardLayout.js +30 -0
- package/esm/WizardLayoutClose.d.ts +3 -0
- package/esm/WizardLayoutClose.js +4 -0
- package/esm/WizardStepper.d.ts +36 -0
- package/esm/WizardStepper.js +26 -0
- package/esm/_abstract/_AbstractCarousel.d.ts +29 -0
- package/esm/_abstract/_AbstractCarousel.js +108 -0
- package/esm/_abstract/_Blings.d.ts +11 -0
- package/esm/_abstract/_Blings.js +11 -0
- package/esm/_abstract/_Block.d.ts +21 -0
- package/esm/_abstract/_Block.js +23 -0
- package/esm/_abstract/_Button.d.ts +40 -0
- package/esm/_abstract/_Button.js +36 -0
- package/esm/_abstract/_CardList.d.ts +34 -0
- package/esm/_abstract/_CardList.js +37 -0
- package/esm/_abstract/_Image.d.ts +36 -0
- package/esm/_abstract/_Image.js +26 -0
- package/esm/_abstract/_Link.d.ts +60 -0
- package/esm/_abstract/_Link.js +64 -0
- package/esm/_abstract/_Quote.d.ts +11 -0
- package/esm/_abstract/_Quote.js +8 -0
- package/esm/_abstract/_TogglerGroup.d.ts +32 -0
- package/esm/_abstract/_TogglerGroup.js +28 -0
- package/esm/_abstract/_TogglerGroupField.d.ts +19 -0
- package/esm/_abstract/_TogglerGroupField.js +17 -0
- package/esm/_abstract/_TogglerInput.d.ts +23 -0
- package/esm/_abstract/_TogglerInput.js +23 -0
- package/esm/_abstract/breakOnNL.d.ts +1 -0
- package/esm/_abstract/breakOnNL.js +7 -0
- package/esm/assets.d.ts +42 -0
- package/esm/assets.js +58 -0
- package/esm/constants.d.ts +19 -0
- package/esm/constants.js +22 -0
- package/esm/focus-visible.d.ts +1 -0
- package/esm/focus-visible.js +3 -0
- package/esm/index.d.ts +97 -0
- package/esm/index.js +1 -0
- package/esm/package.json +1 -0
- package/esm/utils/HannaUIState.d.ts +8 -0
- package/esm/utils/HannaUIState.js +7 -0
- package/esm/utils/browserSide.d.ts +1 -0
- package/esm/utils/browserSide.js +1 -0
- package/esm/utils/config.d.ts +4 -0
- package/esm/utils/config.js +2 -0
- package/esm/utils/env.d.ts +1 -0
- package/esm/utils/env.js +8 -0
- package/esm/utils/seenEffect.d.ts +27 -0
- package/esm/utils/seenEffect.js +75 -0
- package/esm/utils/useDidChange.d.ts +37 -0
- package/esm/utils/useDidChange.js +43 -0
- package/esm/utils/useFormatMonitor.d.ts +38 -0
- package/esm/utils/useFormatMonitor.js +41 -0
- package/esm/utils/useGetSVGtext.d.ts +10 -0
- package/esm/utils/useGetSVGtext.js +23 -0
- package/esm/utils/useMenuToggling.d.ts +8 -0
- package/esm/utils/useMenuToggling.js +62 -0
- package/esm/utils/useMixedControlState.d.ts +137 -0
- package/esm/utils/useMixedControlState.js +101 -0
- package/esm/utils/useScrollbarWidthCSSVar.d.ts +17 -0
- package/esm/utils/useScrollbarWidthCSSVar.js +19 -0
- package/esm/utils.d.ts +8 -0
- package/esm/utils.js +8 -0
- package/package.json +389 -3
- package/utils/config.d.ts +2 -2
- package/utils/config.js +2 -2
- package/utils/useDidChange.d.ts +1 -1
- package/utils/useDidChange.js +1 -1
- package/utils/useMenuToggling.js +2 -2
- package/utils.d.ts +8 -8
- package/utils.js +8 -8
package/PageHeading.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.PageHeading = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const PageHeading = (props) => {
|
|
9
9
|
const { Tag = 'h1', align, small, children, startSeen } = props;
|
|
10
|
-
const [ref] = (0,
|
|
10
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
11
11
|
return (react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('PageHeading', [
|
|
12
12
|
small && 'small',
|
|
13
13
|
align === 'right' && 'align--' + align,
|
package/Picture.d.ts
CHANGED
package/Picture.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.Picture = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const _Image_js_1 = require("./_abstract/_Image.js");
|
|
8
8
|
const Picture = (props) => {
|
|
9
9
|
const { contain, className } = props;
|
|
10
|
-
return (react_1.default.createElement(
|
|
10
|
+
return (react_1.default.createElement(_Image_js_1.Image, Object.assign({}, props, { className: (0, getBemClass_1.default)('Picture', contain && 'contain', className) })));
|
|
11
11
|
};
|
|
12
12
|
exports.Picture = Picture;
|
|
13
13
|
exports.default = exports.Picture;
|
package/PullQuote.d.ts
CHANGED
package/PullQuote.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PullQuote = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const PullQuote = (props) => react_1.default.createElement(
|
|
6
|
+
const _Quote_js_1 = require("./_abstract/_Quote.js");
|
|
7
|
+
const PullQuote = (props) => react_1.default.createElement(_Quote_js_1._Quote, Object.assign({ bem: "PullQuote" }, props));
|
|
8
8
|
exports.PullQuote = PullQuote;
|
|
9
9
|
exports.default = exports.PullQuote;
|
package/RadioButtonsGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
1
|
+
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField.js';
|
|
2
2
|
export type RadioButtonsGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
value?: string;
|
|
4
4
|
defaultValue?: string;
|
package/RadioButtonsGroup.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RadioButtonsGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const RadioButton = (props) => (react_1.default.createElement(
|
|
6
|
+
const _TogglerGroupField_js_1 = require("./_abstract/_TogglerGroupField.js");
|
|
7
|
+
const _TogglerInput_js_1 = require("./_abstract/_TogglerInput.js");
|
|
8
|
+
const RadioButton = (props) => (react_1.default.createElement(_TogglerInput_js_1.TogglerInput, Object.assign({}, props, { bem: "RadioButton", type: "radio", innerWrap: true })));
|
|
9
9
|
const RadioButtonsGroup = (props) => {
|
|
10
10
|
if (props.layout) {
|
|
11
11
|
console.warn('`RadioButtonsGroupProps.layout` is deprecated.');
|
|
@@ -13,7 +13,7 @@ const RadioButtonsGroup = (props) => {
|
|
|
13
13
|
if (props.columns) {
|
|
14
14
|
console.warn('`RadioButtonsGroupProps.columns` is deprecated.');
|
|
15
15
|
}
|
|
16
|
-
return (react_1.default.createElement(
|
|
16
|
+
return (react_1.default.createElement(_TogglerGroupField_js_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioButtonsGroup", Toggler: RadioButton, isRadio: true })));
|
|
17
17
|
};
|
|
18
18
|
exports.RadioButtonsGroup = RadioButtonsGroup;
|
|
19
19
|
exports.default = exports.RadioButtonsGroup;
|
package/RadioGroup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
|
-
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
1
|
+
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField.js';
|
|
2
|
+
import { TogglerInputProps } from './_abstract/_TogglerInput.js';
|
|
3
3
|
type RadioProps = Omit<TogglerInputProps, 'reqText'>;
|
|
4
4
|
export type RadioGroupProps = TogglerGroupFieldProps & {
|
|
5
5
|
layout?: 'inline';
|
package/RadioGroup.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RadioGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const Radio = (props) => react_1.default.createElement(
|
|
9
|
-
const RadioGroup = (props) => (react_1.default.createElement(
|
|
6
|
+
const _TogglerGroupField_js_1 = require("./_abstract/_TogglerGroupField.js");
|
|
7
|
+
const _TogglerInput_js_1 = require("./_abstract/_TogglerInput.js");
|
|
8
|
+
const Radio = (props) => react_1.default.createElement(_TogglerInput_js_1.TogglerInput, Object.assign({}, props, { bem: "Radio", type: "radio" }));
|
|
9
|
+
const RadioGroup = (props) => (react_1.default.createElement(_TogglerGroupField_js_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioGroup", modifier: props.layout, isRadio: true, Toggler: Radio })));
|
|
10
10
|
exports.RadioGroup = RadioGroup;
|
|
11
11
|
/** @deprecated Exposed for testing purposes only. This may disappear at any time. */
|
|
12
12
|
exports.RadioGroup.__Radio = Radio;
|
package/RelatedLinks.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RelatedLinks = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const _Link_js_1 = require("./_abstract/_Link.js");
|
|
7
7
|
const types = {
|
|
8
8
|
external: 1,
|
|
9
9
|
document: 1,
|
|
@@ -21,7 +21,7 @@ const RelatedLinks = (props) => {
|
|
|
21
21
|
react_1.default.createElement("ul", { className: "RelatedLinks__list" }, links.map(({ href, label, type, target }, i) => {
|
|
22
22
|
type = type && types[type] ? type : undefined;
|
|
23
23
|
return (react_1.default.createElement("li", { key: i, className: "RelatedLinks__item" },
|
|
24
|
-
react_1.default.createElement(
|
|
24
|
+
react_1.default.createElement(_Link_js_1.Link, { className: "RelatedLinks__link", href: href, "data-type": type, target: target },
|
|
25
25
|
' ',
|
|
26
26
|
label,
|
|
27
27
|
' ')));
|
package/RowBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
3
|
-
import { SeenProp } from './utils/seenEffect';
|
|
3
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
4
4
|
export type RowBlockProps = {
|
|
5
5
|
/** Float the first RowBlockColumn to the right on larger screens. */
|
|
6
6
|
right?: boolean;
|
package/RowBlock.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.RowBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const RowBlock = (props) => {
|
|
9
9
|
const { right, modifier, className, children, startSeen } = props;
|
|
10
|
-
const [ref] = (0,
|
|
10
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
11
11
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('RowBlock', [modifier, right && 'align--right'], className), ref: ref }, children));
|
|
12
12
|
};
|
|
13
13
|
exports.RowBlock = RowBlock;
|
package/SearchInput.d.ts
CHANGED
package/SearchInput.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.SearchInput = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const FormField_js_1 = tslib_1.__importDefault(require("./FormField.js"));
|
|
8
8
|
const SearchInput = (props) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const { className, label, assistText, hideLabel, disabled, readOnly, invalid, errorMessage, required, reqText, id, onChange, small, onButtonClick, buttonText = 'Leita', ssr } = props, inputElementProps = tslib_1.__rest(props, ["className", "label", "assistText", "hideLabel", "disabled", "readOnly", "invalid", "errorMessage", "required", "reqText", "id", "onChange", "small", "onButtonClick", "buttonText", "ssr"]);
|
|
@@ -18,7 +18,7 @@ const SearchInput = (props) => {
|
|
|
18
18
|
setHasValue(!!e.target.value);
|
|
19
19
|
onChange && onChange(e);
|
|
20
20
|
};
|
|
21
|
-
return (react_1.default.createElement(
|
|
21
|
+
return (react_1.default.createElement(FormField_js_1.default, { className: (0, getBemClass_1.default)('SearchInput', [], className), ssr: ssr, small: small, label: label, empty: empty, filled: filled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement("div", Object.assign({ className: className.input }, addFocusProps()),
|
|
22
22
|
react_1.default.createElement("input", Object.assign({ className: "SearchInput__input", onChange: _onChange }, inputProps, inputElementProps, { ref: props.inputRef })),
|
|
23
23
|
' ',
|
|
24
24
|
onButtonClick && (react_1.default.createElement("button", { className: "SearchInput__button", type: "button", onClick: onButtonClick, title: buttonText, ref: props.buttonRef, disabled: disabled || readOnly }, buttonText)))) }));
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SearchResultsItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const _Image_js_1 = require("../_abstract/_Image.js");
|
|
7
|
+
const _Link_js_1 = require("../_abstract/_Link.js");
|
|
8
8
|
const SearchResultsItem = (props) => {
|
|
9
9
|
const { highlight, title, summary, href, meta, image } = props;
|
|
10
10
|
const bem = highlight ? 'SearchResultsHighlightItem' : 'SearchResultsItem';
|
|
11
11
|
const metaArr = (Array.isArray(meta) ? meta : [meta]);
|
|
12
12
|
return (react_1.default.createElement("li", { className: bem },
|
|
13
|
-
react_1.default.createElement(
|
|
13
|
+
react_1.default.createElement(_Link_js_1.Link, { className: bem + '__link', href: href },
|
|
14
14
|
react_1.default.createElement("h3", { className: bem + '__title' }, title),
|
|
15
15
|
metaArr.length > 0 && (react_1.default.createElement("span", { className: bem + '__meta' }, metaArr.map((item, i) => typeof item === 'function' ? item() : item && react_1.default.createElement("span", { key: i }, item)))),
|
|
16
|
-
highlight && image && react_1.default.createElement(
|
|
16
|
+
highlight && image && react_1.default.createElement(_Image_js_1.Image, { className: bem + '__image', src: image }),
|
|
17
17
|
react_1.default.createElement("div", { className: bem + '__summary', dangerouslySetInnerHTML: { __html: summary } }))));
|
|
18
18
|
};
|
|
19
19
|
exports.SearchResultsItem = SearchResultsItem;
|
package/SearchResults.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SearchResultsItemProps } from './SearchResults/_SearchResultsItem';
|
|
2
|
+
import { SearchResultsItemProps } from './SearchResults/_SearchResultsItem.js';
|
|
3
3
|
export type SearchReesultI18n = {
|
|
4
4
|
lang: string;
|
|
5
5
|
loadQueryTitle: string;
|
|
@@ -12,7 +12,7 @@ export type SearchResultsFilter = {
|
|
|
12
12
|
label: string;
|
|
13
13
|
count?: number;
|
|
14
14
|
};
|
|
15
|
-
export type { SearchResultsItemProps } from './SearchResults/_SearchResultsItem';
|
|
15
|
+
export type { SearchResultsItemProps } from './SearchResults/_SearchResultsItem.js';
|
|
16
16
|
export type SearchResultsProps = {
|
|
17
17
|
/** Grand total number of searach results */
|
|
18
18
|
totalHits?: number;
|
package/SearchResults.js
CHANGED
|
@@ -9,9 +9,9 @@ const range_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/range"));
|
|
|
9
9
|
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
10
10
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
11
11
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const _SearchResultsItem_js_1 = require("./SearchResults/_SearchResultsItem.js");
|
|
13
|
+
const Alert_js_1 = tslib_1.__importDefault(require("./Alert.js"));
|
|
14
|
+
const Tabs_js_1 = tslib_1.__importDefault(require("./Tabs.js"));
|
|
15
15
|
const renderDefaultErrorText = () => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
16
|
"\u00DAps, \u00FEa\u00F0 hefur komi\u00F0 upp villa. M\u00E1 bj\u00F3\u00F0a \u00FE\u00E9r a\u00F0 pr\u00F3fa aftur a\u00F0 leita?",
|
|
17
17
|
react_1.default.createElement("br", null),
|
|
@@ -40,9 +40,9 @@ const SearchResults_Tabs = (props) => {
|
|
|
40
40
|
label,
|
|
41
41
|
badge: (0, prettyNum_1.prettyNum)(count, { lang }),
|
|
42
42
|
})), [filters, lang]);
|
|
43
|
-
return tabs.length ? (react_1.default.createElement(
|
|
43
|
+
return tabs.length ? (react_1.default.createElement(Tabs_js_1.default, { role: "tablist", "aria-controls": domid, tabs: tabs, activeIdx: activeIdx || 0, onSetActive: (i) => setFilter && setFilter(i) })) : null;
|
|
44
44
|
};
|
|
45
|
-
const LoadingScaffold = (props) => props.count ? (react_1.default.createElement("ol", { className: "SearchResults__list SearchResults__list--loading" }, (0, range_1.default)(1, props.count).map((item, i) => (react_1.default.createElement(
|
|
45
|
+
const LoadingScaffold = (props) => props.count ? (react_1.default.createElement("ol", { className: "SearchResults__list SearchResults__list--loading" }, (0, range_1.default)(1, props.count).map((item, i) => (react_1.default.createElement(_SearchResultsItem_js_1.SearchResultsItem, { key: i, title: "...", summary: "", href: "" }))))) : null;
|
|
46
46
|
// ===========================================================================
|
|
47
47
|
const NUM_AUTOLOADS = 2;
|
|
48
48
|
const SearchResults__loadmore = (props) => {
|
|
@@ -89,7 +89,7 @@ const renderResults = (props) => {
|
|
|
89
89
|
if (status === 'loadingquery' || status === 'loadingfilter') {
|
|
90
90
|
return react_1.default.createElement(LoadingScaffold, { count: Math.min(pageSize, hits || 999) });
|
|
91
91
|
}
|
|
92
|
-
return items && items.length ? (react_1.default.createElement("ol", { className: "SearchResults__list" }, items.map((item, i) => (react_1.default.createElement(
|
|
92
|
+
return items && items.length ? (react_1.default.createElement("ol", { className: "SearchResults__list" }, items.map((item, i) => (react_1.default.createElement(_SearchResultsItem_js_1.SearchResultsItem, Object.assign({ key: i }, item)))))) : null;
|
|
93
93
|
};
|
|
94
94
|
// ---------------------------------------------------------------------------
|
|
95
95
|
const renderLoadMore = (props, texts) => {
|
|
@@ -106,7 +106,7 @@ const SearchResults = (props) => {
|
|
|
106
106
|
react_1.default.createElement(SearchResults_Tabs, { domid: domid, filters: filters, activeIdx: activeFilterIdx, setFilter: setFilter, lang: texts.lang }),
|
|
107
107
|
react_1.default.createElement("div", { className: "SearchResults__results", id: domid },
|
|
108
108
|
renderResults(props),
|
|
109
|
-
status === 'error' && (react_1.default.createElement(
|
|
109
|
+
status === 'error' && (react_1.default.createElement(Alert_js_1.default, { type: "error" }, errorText || renderDefaultErrorText())),
|
|
110
110
|
renderLoadMore(props, texts))));
|
|
111
111
|
};
|
|
112
112
|
exports.SearchResults = SearchResults;
|
package/SeenEffect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EffectProp, SeenProp } from './utils/seenEffect';
|
|
1
|
+
import { EffectProp, SeenProp } from './utils/seenEffect.js';
|
|
2
2
|
export type SeenEffectProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & SeenProp & EffectProp;
|
|
3
3
|
export declare const SeenEffect: (props: SeenEffectProps) => JSX.Element;
|
|
4
4
|
export default SeenEffect;
|
package/SeenEffect.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SeenEffect = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
7
7
|
const SeenEffect = (props) => {
|
|
8
8
|
const { effectType, startSeen } = props, divProps = tslib_1.__rest(props, ["effectType", "startSeen"]);
|
|
9
|
-
const [ref] = (0,
|
|
10
|
-
return react_1.default.createElement("div", Object.assign({}, divProps, { ref: ref }, (0,
|
|
9
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
10
|
+
return react_1.default.createElement("div", Object.assign({}, divProps, { ref: ref }, (0, seenEffect_js_1.getEffectAttr)(effectType)));
|
|
11
11
|
};
|
|
12
12
|
exports.SeenEffect = SeenEffect;
|
|
13
13
|
exports.default = exports.SeenEffect;
|
package/Selectbox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SelectboxProps as _SelectboxProps } from '@hugsmidjan/react/Selectbox';
|
|
2
|
-
import { FormFieldWrappingProps } from './FormField';
|
|
2
|
+
import { FormFieldWrappingProps } from './FormField.js';
|
|
3
3
|
export { type SelectboxOption, type SelectboxOptions as SelectboxOptionList,
|
|
4
4
|
/** @deprecated Use `SelectboxOptionList` instead (Will be removed in v0.11) */
|
|
5
5
|
type SelectboxOptions, } from '@hugsmidjan/react/Selectbox';
|
|
@@ -7,5 +7,5 @@ type OptionOrValue = _SelectboxProps['options'][0];
|
|
|
7
7
|
export type SelectboxProps<O extends OptionOrValue = OptionOrValue> = FormFieldWrappingProps & Omit<_SelectboxProps<O>, 'bem'> & {
|
|
8
8
|
small?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const Selectbox: <O extends import("@hugsmidjan/react/__types/Selectbox.privates").OptionOrValue>(props: SelectboxProps<O>) => JSX.Element;
|
|
10
|
+
export declare const Selectbox: <O extends import("@hugsmidjan/react/__types/Selectbox.privates.js").OptionOrValue>(props: SelectboxProps<O>) => JSX.Element;
|
|
11
11
|
export default Selectbox;
|
package/Selectbox.js
CHANGED
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Selectbox_1 = tslib_1.__importDefault(require("@hugsmidjan/react/Selectbox"));
|
|
7
7
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
-
const
|
|
8
|
+
const FormField_js_1 = tslib_1.__importDefault(require("./FormField.js"));
|
|
9
9
|
const getValue = (opt) => {
|
|
10
10
|
const val = typeof opt === 'object' ? opt.value : opt;
|
|
11
11
|
return typeof val === 'number' ? String(val) : val;
|
|
@@ -35,7 +35,7 @@ const Selectbox = (props) => {
|
|
|
35
35
|
setIsEmpty(!((_a = selectElm.selectedOptions[0]) === null || _a === void 0 ? void 0 : _a.text));
|
|
36
36
|
onChange && onChange(e);
|
|
37
37
|
};
|
|
38
|
-
return (react_1.default.createElement(
|
|
38
|
+
return (react_1.default.createElement(FormField_js_1.default, { className: (0, getBemClass_1.default)('Selectbox', null, className), ssr: ssr, small: small, label: label, empty: isEmpty, filled: isFilled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement(Selectbox_1.default, Object.assign({ bem: className.input, ssr: ssr, onChange: _onChange }, inputProps, addFocusProps(selectProps), { selectRef: selectRef }))) }));
|
|
39
39
|
};
|
|
40
40
|
exports.Selectbox = Selectbox;
|
|
41
41
|
// /** @deprecated Use named export instead (The default export will be removed in v0.11+) */
|
package/ShareButtons.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShareButtonI18n, ShareButtonPlatforms } from '@reykjavik/hanna-utils/shareButtonsUtils';
|
|
2
|
-
import { SSRSupport } from './utils';
|
|
2
|
+
import { SSRSupport } from './utils.js';
|
|
3
3
|
export type ShareButtonsProps = {
|
|
4
4
|
ssr?: SSRSupport;
|
|
5
5
|
texts?: Readonly<ShareButtonI18n>;
|
package/ShareButtons.js
CHANGED
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
7
7
|
const shareButtonsUtils_1 = require("@reykjavik/hanna-utils/shareButtonsUtils");
|
|
8
|
-
const
|
|
8
|
+
const _Link_js_1 = require("./_abstract/_Link.js");
|
|
9
9
|
const generateTypeList = (facebook, twitter, linkedin, email) => {
|
|
10
10
|
const listStr = ((facebook ? 'facebook,' : '') +
|
|
11
11
|
(twitter ? 'twitter,' : '') +
|
|
@@ -21,7 +21,7 @@ const ShareButtons__item = (props) => {
|
|
|
21
21
|
const buttonText = (0, shareButtonsUtils_1.getShareButtonLabel)(type, label);
|
|
22
22
|
const popup = type !== 'email';
|
|
23
23
|
return (react_1.default.createElement("li", { className: "ShareButtons__item" },
|
|
24
|
-
react_1.default.createElement(
|
|
24
|
+
react_1.default.createElement(_Link_js_1.Link, { className: 'ShareButtons__link ShareButtons__link--' + type, href: href, title: buttonText, rel: "noopener noreferrer", target: popup ? '_blank' : undefined, onClick: popup ? shareButtonsUtils_1.openInPopup : undefined }, buttonText)));
|
|
25
25
|
};
|
|
26
26
|
const ShareButtons = (props) => {
|
|
27
27
|
const { texts, lang, ssr, facebook = true, twitter = true, linkedin, email, } = props;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_autosuggest_1 = tslib_1.__importDefault(require("react-autosuggest"));
|
|
7
7
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
8
|
-
const
|
|
8
|
+
const SiteSearchInput_js_1 = tslib_1.__importDefault(require("./SiteSearchInput.js"));
|
|
9
9
|
exports.defaultSiteSearchACTexts = {
|
|
10
10
|
is: {
|
|
11
11
|
lang: 'is',
|
|
@@ -45,7 +45,7 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
45
45
|
/* prettier-ignore */
|
|
46
46
|
const { className, type, disabled, readOnly, required, children } = inputProps, //eslint-disable-line @typescript-eslint/no-unused-vars
|
|
47
47
|
siteSearchProps = tslib_1.__rest(inputProps, ["className", "type", "disabled", "readOnly", "required", "children"]);
|
|
48
|
-
return (react_1.default.createElement(
|
|
48
|
+
return (react_1.default.createElement(SiteSearchInput_js_1.default, Object.assign({}, siteSearchProps, { label: props.label || txt.inputLabel, placeholder: txt.placeholder, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
|
|
49
49
|
} }));
|
|
50
50
|
};
|
|
51
51
|
exports.SiteSearchAutocomplete = SiteSearchAutocomplete;
|
package/SiteSearchCurtain.js
CHANGED
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
7
7
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
-
const
|
|
8
|
+
const env_js_1 = require("./utils/env.js");
|
|
9
9
|
const SiteSearchCurtain = (props) => {
|
|
10
10
|
const [focused, setFocused] = (0, hooks_1.useLaggedState)(false);
|
|
11
11
|
(0, react_1.useEffect)(() => {
|
|
@@ -27,7 +27,7 @@ const SiteSearchCurtain = (props) => {
|
|
|
27
27
|
setFocused(false, 100);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('SiteSearchCurtain', [focused && 'focused']), onFocus: focusHandler, onBlur: blurHandler }, (
|
|
30
|
+
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('SiteSearchCurtain', [focused && 'focused']), onFocus: focusHandler, onBlur: blurHandler }, (env_js_1.isPreact && { onfocusin: focusHandler, onfocusout: blurHandler })), props.children));
|
|
31
31
|
};
|
|
32
32
|
exports.SiteSearchCurtain = SiteSearchCurtain;
|
|
33
33
|
exports.default = exports.SiteSearchCurtain;
|
package/SiteSearchInput.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormFieldWrappingProps } from './FormField';
|
|
3
|
-
import { SSRSupport } from './utils';
|
|
2
|
+
import { FormFieldWrappingProps } from './FormField.js';
|
|
3
|
+
import { SSRSupport } from './utils.js';
|
|
4
4
|
type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit'>;
|
|
5
5
|
type WrappingProps = Pick<FormFieldWrappingProps, 'id' | 'label'>;
|
|
6
6
|
export type SiteSearchInputProps = {
|
package/SiteSearchInput.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SiteSearchInput = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const FormField_js_1 = tslib_1.__importDefault(require("./FormField.js"));
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
9
9
|
var _a;
|
|
@@ -18,7 +18,7 @@ exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
|
18
18
|
setHasValue(!!e.target.value);
|
|
19
19
|
onChange && onChange(e);
|
|
20
20
|
};
|
|
21
|
-
return (react_1.default.createElement(
|
|
21
|
+
return (react_1.default.createElement(FormField_js_1.default, { className: "SiteSearchInput", ssr: ssr, label: label, empty: empty, filled: filled, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement("div", Object.assign({ className: className.input }, addFocusProps()),
|
|
22
22
|
react_1.default.createElement("input", Object.assign({ className: "SiteSearchInput__input", onChange: _onChange }, inputProps, { placeholder: placeholder, onKeyDown: onSubmit
|
|
23
23
|
? (e) => {
|
|
24
24
|
if (e.key === 'Enter' && onSubmit() !== true) {
|
package/SubHeading.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SeenProp } from './utils/seenEffect';
|
|
3
|
-
import { ComponentLayoutProps } from './constants';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { ComponentLayoutProps } from './constants.js';
|
|
4
4
|
export type SubHeadingProps = {
|
|
5
5
|
Tag?: 'h2' | 'h3';
|
|
6
6
|
small?: boolean;
|
package/SubHeading.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.SubHeading = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const SubHeading = (props) => {
|
|
9
9
|
const { small, Tag = 'h2', children, align, wide, startSeen } = props;
|
|
10
|
-
const [ref] = (0,
|
|
10
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
11
11
|
return (react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('SubHeading', [
|
|
12
12
|
small && 'small',
|
|
13
13
|
align === 'right' && 'align--' + align,
|
package/Tabs.d.ts
CHANGED
package/Tabs.js
CHANGED
|
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
7
7
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
9
|
+
const utils_js_1 = require("./utils.js");
|
|
10
10
|
const navKeyEffects = {
|
|
11
11
|
ArrowUp: -1,
|
|
12
12
|
ArrowLeft: -1,
|
|
@@ -51,7 +51,7 @@ const renderTab = (tabProps, index, listProps) => {
|
|
|
51
51
|
const Tabs = (props) => {
|
|
52
52
|
var _a, _b;
|
|
53
53
|
const { tabs, role, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-controls': listAriaControls, id, activeIdx, onSetActive, activateOnFocus, ssr, startSeen, vertical, subTabs, } = props;
|
|
54
|
-
const isBrowser = (0,
|
|
54
|
+
const isBrowser = (0, utils_js_1.useIsBrowserSide)(ssr);
|
|
55
55
|
const [focusedIdx, setFocusedIdx] = (0, react_1.useState)(activeIdx || 0);
|
|
56
56
|
const tabRole = isBrowser && role === 'tablist' ? 'tab' : undefined;
|
|
57
57
|
const activateTab = (index) => {
|
|
@@ -79,7 +79,7 @@ const Tabs = (props) => {
|
|
|
79
79
|
activateOnFocus && activateTab(nextIdx);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
const [ref] = (0,
|
|
82
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
83
83
|
const listProps = {
|
|
84
84
|
activeIdx,
|
|
85
85
|
activateTab,
|
package/TagPill.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
|
-
import { ButtonProps } from './_abstract/_Button';
|
|
3
|
+
import { ButtonProps } from './_abstract/_Button.js';
|
|
4
4
|
declare const colors: {
|
|
5
5
|
readonly normal: "";
|
|
6
6
|
readonly green: "color--green";
|
package/TagPill.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.TagPill = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
8
8
|
const colors = {
|
|
9
9
|
normal: '',
|
|
10
10
|
green: 'color--green',
|
|
@@ -27,9 +27,9 @@ const TagPill = (props) => {
|
|
|
27
27
|
label,
|
|
28
28
|
" ",
|
|
29
29
|
removeBtn)) : onRemove ? (react_1.default.createElement("span", { className: (0, getBemClass_1.default)('TagPill', modifiers) },
|
|
30
|
-
react_1.default.createElement(
|
|
30
|
+
react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "TagPill__button" }, buttonProps), label),
|
|
31
31
|
' ',
|
|
32
|
-
removeBtn)) : (react_1.default.createElement(
|
|
32
|
+
removeBtn)) : (react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "TagPill" }, buttonProps, { modifier: modifiers }),
|
|
33
33
|
label,
|
|
34
34
|
' ',
|
|
35
35
|
removable && (react_1.default.createElement("span", { className: "TagPill__remove", "aria-label": removeLabelLong }, removeLabel))));
|
package/TextBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SeenProp } from './utils/seenEffect';
|
|
3
|
-
import { ComponentLayoutProps } from './constants';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { ComponentLayoutProps } from './constants.js';
|
|
4
4
|
export type TextBlockProps = ComponentLayoutProps & {
|
|
5
5
|
/** Make H2 headings float to the left
|
|
6
6
|
*
|
package/TextBlock.js
CHANGED
|
@@ -4,11 +4,11 @@ exports.TextBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const TextBlock = (props) => {
|
|
9
9
|
const { children, align, labelled, wide, small, startSeen } = props;
|
|
10
10
|
const rightAligned = align === 'right' || labelled;
|
|
11
|
-
const [ref] = (0,
|
|
11
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
12
12
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('TextBlock', [
|
|
13
13
|
labelled && 'labelled',
|
|
14
14
|
rightAligned && 'align--right',
|
package/TextButton.d.ts
CHANGED
package/TextButton.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TextButton = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
7
7
|
const TextButton = (props) => {
|
|
8
8
|
if ('disabled' in props) {
|
|
9
9
|
props = Object.assign(Object.assign({}, props), { disabled: undefined });
|
|
10
10
|
}
|
|
11
|
-
return react_1.default.createElement(
|
|
11
|
+
return react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "TextButton" }, props));
|
|
12
12
|
};
|
|
13
13
|
exports.TextButton = TextButton;
|
|
14
14
|
exports.default = exports.TextButton;
|
package/TextInput.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { FormFieldWrappingProps } from './FormField';
|
|
2
|
+
import { FormFieldWrappingProps } from './FormField.js';
|
|
3
3
|
type InputElmProps = JSX.IntrinsicElements['input'];
|
|
4
4
|
type TextareaElmProps = JSX.IntrinsicElements['textarea'];
|
|
5
5
|
export type TextInputProps = {
|
package/TextInput.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.TextInput = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
7
|
-
const
|
|
7
|
+
const FormField_js_1 = tslib_1.__importDefault(require("./FormField.js"));
|
|
8
8
|
const TextInput = (props) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const _inputRef = (0, react_1.useRef)(null);
|
|
@@ -30,7 +30,7 @@ const TextInput = (props) => {
|
|
|
30
30
|
setHasValue(true);
|
|
31
31
|
}
|
|
32
32
|
}, []);
|
|
33
|
-
return (react_1.default.createElement(
|
|
33
|
+
return (react_1.default.createElement(FormField_js_1.default, { className: (0, getBemClass_1.default)('TextInput', modifiers, className), ssr: ssr, small: small, label: label, empty: empty, filled: filled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => multiline ? (react_1.default.createElement("textarea", Object.assign({ className: className.input, onChange: _onChange }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) : (react_1.default.createElement("input", Object.assign({ className: className.input, onChange: _onChange, type: type }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) }));
|
|
34
34
|
};
|
|
35
35
|
exports.TextInput = TextInput;
|
|
36
36
|
exports.default = exports.TextInput;
|
package/VerticalTabsTOC.d.ts
CHANGED