@reykjavik/hanna-react 0.10.56 → 0.10.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{AccordionList.jsx → AccordionList.js} +5 -14
- package/ActionCards.d.ts +1 -1
- package/{ActionCards.jsx → ActionCards.js} +3 -4
- package/{Alert.jsx → Alert.js} +7 -9
- package/ArticleCards.d.ts +6 -0
- package/ArticleCards.js +9 -0
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.js +31 -0
- package/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/ArticleMeta.d.ts +1 -0
- package/{ArticleMeta.jsx → ArticleMeta.js} +15 -10
- package/{Attention.jsx → Attention.js} +1 -1
- package/{BasicTable.jsx → BasicTable.js} +11 -12
- package/BgBox.d.ts +8 -0
- package/BgBox.js +14 -0
- package/{Bling.jsx → Bling.js} +2 -2
- package/{BlockBreak.jsx → BlockBreak.js} +1 -1
- package/{BlockQuote.jsx → BlockQuote.js} +1 -1
- package/BreadCrumbs.js +33 -0
- package/ButtonBack.d.ts +1 -1
- package/{ButtonBack.jsx → ButtonBack.js} +2 -2
- package/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/ButtonPrimary.d.ts +1 -1
- package/{ButtonPrimary.jsx → ButtonPrimary.js} +2 -2
- package/ButtonSecondary.d.ts +1 -1
- package/{ButtonSecondary.jsx → ButtonSecondary.js} +2 -2
- package/ButtonTertiary.d.ts +1 -1
- package/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
- package/CHANGELOG.md +12 -1
- package/{Carousel.jsx → Carousel.js} +1 -1
- package/{CarouselStepper.jsx → CarouselStepper.js} +1 -1
- package/{CenterColumn.jsx → CenterColumn.js} +1 -3
- package/Checkbox.d.ts +1 -1
- package/{Checkbox.jsx → Checkbox.js} +2 -2
- package/CheckboxButtonsGroup.d.ts +1 -1
- package/{CheckboxButtonsGroup.jsx → CheckboxButtonsGroup.js} +4 -4
- package/CheckboxGroup.d.ts +1 -1
- package/{CheckboxGroup.jsx → CheckboxGroup.js} +2 -2
- package/CityBlock.d.ts +1 -1
- package/{CityBlock.jsx → CityBlock.js} +1 -1
- package/{ContactBubble.jsx → ContactBubble.js} +13 -27
- package/{ContentArticle.jsx → ContentArticle.js} +9 -12
- package/ContentImage.d.ts +1 -1
- package/ContentImage.js +23 -0
- package/{Datepicker.jsx → Datepicker.js} +17 -18
- package/ExtraLinks.d.ts +1 -1
- package/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
- package/FeatureList.js +21 -0
- package/{FieldGroup.jsx → FieldGroup.js} +3 -4
- package/{FileInput.jsx → FileInput.js} +22 -25
- package/{Foonote.jsx → Foonote.js} +0 -0
- package/FooterBadges.js +17 -0
- package/FooterInfo.js +14 -0
- package/{Footnote.jsx → Footnote.js} +1 -1
- package/{Form.jsx → Form.js} +2 -4
- package/{FormField.jsx → FormField.js} +20 -22
- package/Gallery/_GalleryItem.d.ts +1 -1
- package/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
- package/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
- package/{Gallery.jsx → Gallery.js} +3 -4
- package/GridBlocks.d.ts +2 -2
- package/GridBlocks.js +29 -0
- package/Heading.d.ts +1 -1
- package/{Heading.jsx → Heading.js} +3 -5
- package/HeroBlock.d.ts +2 -2
- package/{HeroBlock.jsx → HeroBlock.js} +9 -10
- package/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/Illustration.d.ts +1 -1
- package/{Illustration.jsx → Illustration.js} +2 -2
- package/ImageCards.d.ts +1 -1
- package/{ImageCards.jsx → ImageCards.js} +3 -4
- package/InfoBlock.js +18 -0
- package/InfoHero.d.ts +2 -2
- package/{InfoHero.jsx → InfoHero.js} +10 -16
- package/IslandBlock.d.ts +1 -1
- package/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/IslandPageBlock.d.ts +1 -1
- package/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
- package/LabeledTextBlock.d.ts +1 -1
- package/{LabeledTextBlock.jsx → LabeledTextBlock.js} +5 -7
- package/Layout.js +58 -0
- package/MainMenu/_Auxiliary.js +20 -0
- package/MainMenu/_PrimaryPanel.js +29 -0
- package/{MainMenu.jsx → MainMenu.js} +28 -41
- package/MiniMetrics.d.ts +1 -1
- package/{MiniMetrics.jsx → MiniMetrics.js} +6 -5
- package/Modal.js +19 -0
- package/{NameCard.jsx → NameCard.js} +19 -24
- package/{NameCards.jsx → NameCards.js} +1 -3
- package/NewsHero.d.ts +1 -1
- package/{NewsHero.jsx → NewsHero.js} +8 -10
- package/{PageFilter.jsx → PageFilter.js} +6 -7
- package/{PageHeading.jsx → PageHeading.js} +2 -4
- package/Picture.d.ts +7 -0
- package/Picture.js +13 -0
- package/ProcessOverview.js +22 -0
- package/{PullQuote.jsx → PullQuote.js} +1 -1
- package/RadioButtonsGroup.d.ts +1 -1
- package/{RadioButtonsGroup.jsx → RadioButtonsGroup.js} +4 -4
- package/RadioGroup.d.ts +2 -2
- package/RadioGroup.js +12 -0
- package/RelatedLinks.js +31 -0
- package/{RowBlock.jsx → RowBlock.js} +1 -3
- package/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
- package/{SearchInput.jsx → SearchInput.js} +4 -6
- package/SearchResults/_SearchResultsItem.js +20 -0
- package/{SearchResults.jsx → SearchResults.js} +27 -36
- package/{SeenEffect.jsx → SeenEffect.js} +1 -1
- package/{Selectbox.jsx → Selectbox.js} +1 -1
- package/{ShareButtons.jsx → ShareButtons.js} +7 -13
- package/{Sharpie.jsx → Sharpie.js} +1 -1
- package/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
- package/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
- package/SiteSearchInput.d.ts +1 -1
- package/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
- package/{Skeleton.jsx → Skeleton.js} +5 -5
- package/{SubHeading.jsx → SubHeading.js} +2 -4
- package/{Tabs.jsx → Tabs.js} +12 -12
- package/TagPill.d.ts +1 -1
- package/{TagPill.jsx → TagPill.js} +12 -17
- package/{TextBlock.jsx → TextBlock.js} +2 -4
- package/TextButton.d.ts +1 -1
- package/{TextButton.jsx → TextButton.js} +2 -2
- package/{TextInput.jsx → TextInput.js} +1 -1
- package/{VSpacer.jsx → VSpacer.js} +1 -1
- package/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
- package/WizardLayout.js +35 -0
- package/WizardLayoutClose.d.ts +1 -1
- package/{WizardLayoutClose.jsx → WizardLayoutClose.js} +2 -2
- package/WizardStepper.js +30 -0
- package/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/_abstract/{_Blings.jsx → _Blings.js} +1 -3
- package/_abstract/_Block.d.ts +2 -2
- package/_abstract/_Block.js +29 -0
- package/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
- package/_abstract/{Button.jsx → _Button.js} +3 -7
- package/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
- package/_abstract/_CardList.js +45 -0
- package/{esm/_abstract/Image.d.ts → _abstract/_Image.d.ts} +9 -5
- package/_abstract/{Image.jsx → _Image.js} +11 -13
- package/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
- package/_abstract/{Link.jsx → _Link.js} +0 -0
- package/_abstract/_Quote.js +15 -0
- package/{esm/_abstract/TogglerGroup.d.ts → _abstract/_TogglerGroup.d.ts} +1 -1
- package/_abstract/_TogglerGroup.js +34 -0
- package/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
- package/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
- package/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
- package/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
- package/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/esm/AccordionList.js +24 -0
- package/esm/ActionCards.d.ts +1 -1
- package/esm/ActionCards.js +9 -0
- package/esm/{Alert.jsx → Alert.js} +7 -9
- package/esm/ArticleCards.d.ts +6 -0
- package/esm/ArticleCards.js +4 -0
- package/esm/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +24 -0
- package/esm/{ArticleCarousel.jsx → ArticleCarousel.js} +1 -1
- package/esm/ArticleMeta.d.ts +1 -0
- package/esm/ArticleMeta.js +19 -0
- package/esm/Attention.js +4 -0
- package/esm/{BasicTable.jsx → BasicTable.js} +11 -12
- package/esm/BgBox.d.ts +8 -0
- package/esm/BgBox.js +9 -0
- package/esm/{Bling.jsx → Bling.js} +2 -2
- package/esm/BlockBreak.js +6 -0
- package/esm/BlockQuote.js +4 -0
- package/esm/BreadCrumbs.js +28 -0
- package/esm/ButtonBack.d.ts +1 -1
- package/esm/ButtonBack.js +4 -0
- package/esm/{ButtonBar.jsx → ButtonBar.js} +2 -4
- package/esm/ButtonPrimary.d.ts +1 -1
- package/esm/ButtonPrimary.js +4 -0
- package/esm/ButtonSecondary.d.ts +1 -1
- package/esm/ButtonSecondary.js +4 -0
- package/esm/ButtonTertiary.d.ts +1 -1
- package/esm/{ButtonTertiary.jsx → ButtonTertiary.js} +2 -2
- package/esm/Carousel.js +4 -0
- package/esm/CarouselStepper.js +4 -0
- package/esm/CenterColumn.js +7 -0
- package/esm/Checkbox.d.ts +1 -1
- package/esm/Checkbox.js +4 -0
- package/esm/CheckboxButtonsGroup.d.ts +1 -1
- package/esm/CheckboxButtonsGroup.js +14 -0
- package/esm/CheckboxGroup.d.ts +1 -1
- package/esm/CheckboxGroup.js +7 -0
- package/esm/CityBlock.d.ts +1 -1
- package/esm/{CityBlock.jsx → CityBlock.js} +1 -1
- package/esm/{ContactBubble.jsx → ContactBubble.js} +13 -27
- package/esm/ContentArticle.js +21 -0
- package/esm/ContentImage.d.ts +1 -1
- package/esm/ContentImage.js +18 -0
- package/esm/{Datepicker.jsx → Datepicker.js} +17 -18
- package/esm/ExtraLinks.d.ts +1 -1
- package/esm/{ExtraLinks.jsx → ExtraLinks.js} +11 -19
- package/esm/FeatureList.js +16 -0
- package/esm/FieldGroup.js +9 -0
- package/esm/{FileInput.jsx → FileInput.js} +22 -25
- package/esm/{Foonote.jsx → Foonote.js} +0 -0
- package/esm/FooterBadges.js +12 -0
- package/esm/FooterInfo.js +9 -0
- package/esm/Footnote.js +3 -0
- package/esm/{Form.jsx → Form.js} +2 -4
- package/esm/{FormField.jsx → FormField.js} +20 -22
- package/esm/Gallery/_GalleryItem.d.ts +1 -1
- package/esm/Gallery/{_GalleryItem.jsx → _GalleryItem.js} +10 -11
- package/esm/Gallery/{_GalleryModal.jsx → _GalleryModal.js} +11 -15
- package/esm/Gallery/{_GalleryModalItem.jsx → _GalleryModalItem.js} +6 -8
- package/esm/{Gallery.jsx → Gallery.js} +3 -4
- package/esm/GridBlocks.d.ts +2 -2
- package/esm/GridBlocks.js +24 -0
- package/esm/Heading.d.ts +1 -1
- package/esm/{Heading.jsx → Heading.js} +3 -5
- package/esm/HeroBlock.d.ts +2 -2
- package/esm/HeroBlock.js +21 -0
- package/esm/{IframeBlock.jsx → IframeBlock.js} +6 -6
- package/esm/Illustration.d.ts +1 -1
- package/esm/{Illustration.jsx → Illustration.js} +2 -2
- package/esm/ImageCards.d.ts +1 -1
- package/esm/{ImageCards.jsx → ImageCards.js} +3 -4
- package/esm/InfoBlock.js +13 -0
- package/esm/InfoHero.d.ts +2 -2
- package/esm/{InfoHero.jsx → InfoHero.js} +10 -16
- package/esm/IslandBlock.d.ts +1 -1
- package/esm/{IslandBlock.jsx → IslandBlock.js} +1 -1
- package/esm/IslandPageBlock.d.ts +1 -1
- package/esm/{IslandPageBlock.jsx → IslandPageBlock.js} +1 -1
- package/esm/LabeledTextBlock.d.ts +1 -1
- package/esm/LabeledTextBlock.js +14 -0
- package/esm/Layout.js +52 -0
- package/esm/MainMenu/_Auxiliary.js +13 -0
- package/esm/MainMenu/_PrimaryPanel.js +22 -0
- package/esm/{MainMenu.jsx → MainMenu.js} +28 -41
- package/esm/MiniMetrics.d.ts +1 -1
- package/esm/MiniMetrics.js +12 -0
- package/esm/Modal.js +14 -0
- package/esm/{NameCard.jsx → NameCard.js} +19 -24
- package/esm/NameCards.js +7 -0
- package/esm/NewsHero.d.ts +1 -1
- package/esm/{NewsHero.jsx → NewsHero.js} +8 -10
- package/esm/PageFilter.js +15 -0
- package/esm/{PageHeading.jsx → PageHeading.js} +2 -4
- package/esm/Picture.d.ts +7 -0
- package/esm/Picture.js +8 -0
- package/esm/ProcessOverview.js +17 -0
- package/esm/PullQuote.js +4 -0
- package/esm/RadioButtonsGroup.d.ts +1 -1
- package/esm/RadioButtonsGroup.js +14 -0
- package/esm/RadioGroup.d.ts +2 -2
- package/esm/RadioGroup.js +7 -0
- package/esm/RelatedLinks.js +26 -0
- package/esm/{RowBlock.jsx → RowBlock.js} +1 -3
- package/esm/{RowBlockColumn.jsx → RowBlockColumn.js} +2 -4
- package/esm/{SearchInput.jsx → SearchInput.js} +4 -6
- package/esm/SearchResults/_SearchResultsItem.js +15 -0
- package/esm/{SearchResults.jsx → SearchResults.js} +27 -36
- package/esm/{SeenEffect.jsx → SeenEffect.js} +1 -1
- package/esm/{Selectbox.jsx → Selectbox.js} +1 -1
- package/esm/{ShareButtons.jsx → ShareButtons.js} +7 -13
- package/esm/{Sharpie.jsx → Sharpie.js} +1 -1
- package/esm/{SiteSearchAutocomplete.jsx → SiteSearchAutocomplete.js} +5 -7
- package/esm/{SiteSearchCurtain.jsx → SiteSearchCurtain.js} +1 -5
- package/esm/SiteSearchInput.d.ts +1 -1
- package/esm/{SiteSearchInput.jsx → SiteSearchInput.js} +10 -12
- package/esm/{Skeleton.jsx → Skeleton.js} +5 -5
- package/esm/{SubHeading.jsx → SubHeading.js} +2 -4
- package/esm/{Tabs.jsx → Tabs.js} +12 -12
- package/esm/TagPill.d.ts +1 -1
- package/esm/{TagPill.jsx → TagPill.js} +12 -17
- package/esm/{TextBlock.jsx → TextBlock.js} +2 -4
- package/esm/TextButton.d.ts +1 -1
- package/esm/{TextButton.jsx → TextButton.js} +2 -2
- package/esm/{TextInput.jsx → TextInput.js} +1 -1
- package/esm/{VSpacer.jsx → VSpacer.js} +1 -1
- package/esm/{VerticalTabsTOC.jsx → VerticalTabsTOC.js} +2 -2
- package/esm/WizardLayout.js +30 -0
- package/esm/WizardLayoutClose.d.ts +1 -1
- package/esm/WizardLayoutClose.js +4 -0
- package/esm/WizardStepper.js +25 -0
- package/esm/_abstract/{_AbstractCarousel.jsx → _AbstractCarousel.js} +7 -10
- package/esm/_abstract/_Blings.js +12 -0
- package/esm/_abstract/_Block.d.ts +2 -2
- package/esm/_abstract/_Block.js +24 -0
- package/esm/_abstract/{Button.d.ts → _Button.d.ts} +0 -0
- package/esm/_abstract/{Button.jsx → _Button.js} +3 -7
- package/esm/_abstract/{CardList.d.ts → _CardList.d.ts} +2 -1
- package/esm/_abstract/_CardList.js +38 -0
- package/{_abstract/Image.d.ts → esm/_abstract/_Image.d.ts} +9 -5
- package/esm/_abstract/_Image.js +27 -0
- package/esm/_abstract/{Link.d.ts → _Link.d.ts} +0 -0
- package/esm/_abstract/{Link.jsx → _Link.js} +0 -0
- package/esm/_abstract/_Quote.js +8 -0
- package/{_abstract/TogglerGroup.d.ts → esm/_abstract/_TogglerGroup.d.ts} +1 -1
- package/esm/_abstract/_TogglerGroup.js +29 -0
- package/esm/_abstract/{TogglerGroupField.d.ts → _TogglerGroupField.d.ts} +2 -2
- package/esm/_abstract/{TogglerGroupField.jsx → _TogglerGroupField.js} +4 -4
- package/esm/_abstract/{TogglerInput.d.ts → _TogglerInput.d.ts} +0 -0
- package/esm/_abstract/{TogglerInput.jsx → _TogglerInput.js} +13 -15
- package/esm/_abstract/{breakOnNL.jsx → breakOnNL.js} +1 -1
- package/esm/utils/seenEffect.d.ts +2 -2
- package/esm/utils/seenEffect.js +1 -1
- package/package.json +106 -91
- package/utils/seenEffect.d.ts +2 -2
- package/utils/seenEffect.js +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.jsx +0 -32
- package/BreadCrumbs.jsx +0 -36
- package/ContentImage.jsx +0 -18
- package/FeatureList.jsx +0 -28
- package/FooterBadges.jsx +0 -21
- package/FooterInfo.jsx +0 -19
- package/GridBlocks.jsx +0 -40
- package/InfoBlock.jsx +0 -23
- package/Layout.jsx +0 -69
- package/MainMenu/_Auxiliary.jsx +0 -26
- package/MainMenu/_PrimaryPanel.jsx +0 -37
- package/Modal.jsx +0 -21
- package/ProcessOverview.jsx +0 -25
- package/RadioGroup.jsx +0 -12
- package/RelatedLinks.jsx +0 -35
- package/SearchResults/_SearchResultsItem.jsx +0 -24
- package/WizardLayout.jsx +0 -44
- package/WizardStepper.jsx +0 -34
- package/_abstract/CardList.jsx +0 -46
- package/_abstract/TogglerGroup.jsx +0 -36
- package/_abstract/_Block.jsx +0 -32
- package/_abstract/_Quote.jsx +0 -18
- package/esm/AccordionList.jsx +0 -33
- package/esm/ActionCards.jsx +0 -10
- package/esm/ArticleCarousel/_ArticleCarouselCard.jsx +0 -25
- package/esm/ArticleMeta.jsx +0 -17
- package/esm/Attention.jsx +0 -4
- package/esm/BlockBreak.jsx +0 -6
- package/esm/BlockQuote.jsx +0 -4
- package/esm/BreadCrumbs.jsx +0 -31
- package/esm/ButtonBack.jsx +0 -4
- package/esm/ButtonPrimary.jsx +0 -4
- package/esm/ButtonSecondary.jsx +0 -4
- package/esm/Carousel.jsx +0 -4
- package/esm/CarouselStepper.jsx +0 -4
- package/esm/CenterColumn.jsx +0 -9
- package/esm/Checkbox.jsx +0 -4
- package/esm/CheckboxButtonsGroup.jsx +0 -14
- package/esm/CheckboxGroup.jsx +0 -7
- package/esm/ContentArticle.jsx +0 -24
- package/esm/ContentImage.jsx +0 -13
- package/esm/FeatureList.jsx +0 -23
- package/esm/FieldGroup.jsx +0 -10
- package/esm/FooterBadges.jsx +0 -16
- package/esm/FooterInfo.jsx +0 -14
- package/esm/Footnote.jsx +0 -3
- package/esm/GridBlocks.jsx +0 -35
- package/esm/HeroBlock.jsx +0 -22
- package/esm/InfoBlock.jsx +0 -18
- package/esm/LabeledTextBlock.jsx +0 -16
- package/esm/Layout.jsx +0 -63
- package/esm/MainMenu/_Auxiliary.jsx +0 -19
- package/esm/MainMenu/_PrimaryPanel.jsx +0 -30
- package/esm/MiniMetrics.jsx +0 -11
- package/esm/Modal.jsx +0 -16
- package/esm/NameCards.jsx +0 -9
- package/esm/PageFilter.jsx +0 -16
- package/esm/ProcessOverview.jsx +0 -20
- package/esm/PullQuote.jsx +0 -4
- package/esm/RadioButtonsGroup.jsx +0 -14
- package/esm/RadioGroup.jsx +0 -7
- package/esm/RelatedLinks.jsx +0 -30
- package/esm/SearchResults/_SearchResultsItem.jsx +0 -19
- package/esm/WizardLayout.jsx +0 -39
- package/esm/WizardLayoutClose.jsx +0 -4
- package/esm/WizardStepper.jsx +0 -29
- package/esm/_abstract/CardList.jsx +0 -39
- package/esm/_abstract/Image.jsx +0 -29
- package/esm/_abstract/TogglerGroup.jsx +0 -31
- package/esm/_abstract/_Blings.jsx +0 -14
- package/esm/_abstract/_Block.jsx +0 -27
- package/esm/_abstract/_Quote.jsx +0 -11
|
@@ -56,10 +56,6 @@ const SiteSearchCurtain = (props) => {
|
|
|
56
56
|
}, 100);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
return (
|
|
60
|
-
// (Sneak this in as Preact does not bubble `FocusEvent`s)
|
|
61
|
-
{...(env_1.isPreact && { onfocusin: focusHandler, onfocusout: blurHandler })}>
|
|
62
|
-
{props.children}
|
|
63
|
-
</div>);
|
|
59
|
+
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('SiteSearchCurtain', [focused && 'focused']), onFocus: focusHandler, onBlur: blurHandler }, (env_1.isPreact && { onfocusin: focusHandler, onfocusout: blurHandler })), props.children));
|
|
64
60
|
};
|
|
65
61
|
exports.default = SiteSearchCurtain;
|
package/SiteSearchInput.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export declare type SiteSearchInputProps = {
|
|
|
20
20
|
children?: undefined;
|
|
21
21
|
ssr?: SSRSupport;
|
|
22
22
|
} & WrappingProps & InputElmProps;
|
|
23
|
-
declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "title" | "id" | "ssr" | "form" | "label" | "slot" | "style" | "pattern" | "children" | "hidden" | "onClick" | "dir" | "is" | "key" | "list" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "step" | "src" | "
|
|
23
|
+
declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "title" | "id" | "ssr" | "form" | "label" | "slot" | "style" | "pattern" | "children" | "hidden" | "onClick" | "dir" | "is" | "key" | "list" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "step" | "src" | "multiple" | "alt" | "width" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
|
|
24
24
|
export default SiteSearchInput;
|
|
@@ -53,18 +53,16 @@ const SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
|
53
53
|
setHasValue(!!e.target.value);
|
|
54
54
|
onChange && onChange(e);
|
|
55
55
|
};
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
return (react_1.default.createElement(FormField_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()),
|
|
57
|
+
react_1.default.createElement("input", Object.assign({ className: "SiteSearchInput__input", onChange: _onChange }, inputProps, { placeholder: placeholder, onKeyDown: onSubmit
|
|
58
|
+
? (e) => {
|
|
59
|
+
if (e.key === 'Enter' && onSubmit() !== true) {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
}
|
|
62
|
+
onKeyDown && onKeyDown(e);
|
|
61
63
|
}
|
|
62
|
-
onKeyDown
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<button className="SiteSearchInput__button" type="submit" onClick={onButtonClick && ((e) => !onButtonClick() && e.preventDefault())} title={buttonText}>
|
|
66
|
-
{buttonText}
|
|
67
|
-
</button>
|
|
68
|
-
</div>)}/>);
|
|
64
|
+
: onKeyDown }, inputElementProps, { ref: ref })),
|
|
65
|
+
' ',
|
|
66
|
+
react_1.default.createElement("button", { className: "SiteSearchInput__button", type: "submit", onClick: onButtonClick && ((e) => !onButtonClick() && e.preventDefault()), title: buttonText }, buttonText))) }));
|
|
69
67
|
});
|
|
70
68
|
exports.default = SiteSearchInput;
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const range_1 = __importDefault(require("@hugsmidjan/qj/range"));
|
|
8
8
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
|
-
const makeRenderSkeleton = (props) => (key) => (
|
|
9
|
+
const makeRenderSkeleton = (props) => (key) => (react_1.default.createElement("span", { key: key, className: (0, getBemClass_1.default)('Skeleton', [
|
|
10
10
|
props.text && 'text',
|
|
11
11
|
props.height && 'height--' + props.height,
|
|
12
12
|
props.gap && 'gap--' + props.gap,
|
|
13
|
-
])}
|
|
13
|
+
]) }));
|
|
14
14
|
const minmax = (num = 0, max = 100, min = 1) => {
|
|
15
15
|
num = Math.min(Math.max(Math.round(num), min), max);
|
|
16
16
|
return num > min ? num : undefined;
|
|
@@ -24,12 +24,12 @@ const Skeleton = (props) => {
|
|
|
24
24
|
});
|
|
25
25
|
const items = minmax(props.items, 20) || 1;
|
|
26
26
|
if (items > 1) {
|
|
27
|
-
return
|
|
27
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, range_1.default)(1, items).map(renderSkeleton));
|
|
28
28
|
}
|
|
29
29
|
return renderSkeleton();
|
|
30
30
|
};
|
|
31
31
|
exports.default = Skeleton;
|
|
32
32
|
/** Returns a single `<Skeleton height={X}/>` element of branded type `SkeletonBlock` */
|
|
33
|
-
Skeleton.block = (height) => (
|
|
33
|
+
Skeleton.block = (height) => (react_1.default.createElement(Skeleton, { height: height }));
|
|
34
34
|
/** Returns a single `<Skeleton text height={X}/>` element of branded type `SkeletonText` */
|
|
35
|
-
Skeleton.text = (height) => (
|
|
35
|
+
Skeleton.text = (height) => (react_1.default.createElement(Skeleton, { text: true, height: height }));
|
|
@@ -9,12 +9,10 @@ const seenEffect_1 = require("./utils/seenEffect");
|
|
|
9
9
|
const SubHeading = (props) => {
|
|
10
10
|
const { small, Tag = 'h2', children, align, wide, startSeen } = props;
|
|
11
11
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
12
|
-
return (
|
|
12
|
+
return (react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('SubHeading', [
|
|
13
13
|
small && 'small',
|
|
14
14
|
align === 'right' && 'align--' + align,
|
|
15
15
|
!align && wide && 'wide',
|
|
16
|
-
])
|
|
17
|
-
{children}
|
|
18
|
-
</Tag>);
|
|
16
|
+
]), ref: ref }, children));
|
|
19
17
|
};
|
|
20
18
|
exports.default = SubHeading;
|
package/{Tabs.jsx → Tabs.js}
RENAMED
|
@@ -60,10 +60,13 @@ const renderTab = (tabProps, index, listProps) => {
|
|
|
60
60
|
}
|
|
61
61
|
: { href };
|
|
62
62
|
return [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
react_1.default.createElement(Tag, Object.assign({ key: index, className: "Tabs__tab", "data-active": isActive }, tagProps, { onClick: handleClick, onFocus: handleFocus, "aria-label": longLabel, title: longLabel }),
|
|
64
|
+
label,
|
|
65
|
+
" ",
|
|
66
|
+
badge != null && react_1.default.createElement("small", { className: "Tabs__tab__badge" },
|
|
67
|
+
"(",
|
|
68
|
+
badge,
|
|
69
|
+
")")),
|
|
67
70
|
' ',
|
|
68
71
|
];
|
|
69
72
|
};
|
|
@@ -110,13 +113,10 @@ const Tabs = (props) => {
|
|
|
110
113
|
listAriaControls,
|
|
111
114
|
isBrowser,
|
|
112
115
|
};
|
|
113
|
-
return (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// just to be sure
|
|
119
|
-
vertical={undefined} subTabs={undefined}/>)}
|
|
120
|
-
</div>);
|
|
116
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Tabs', vertical && 'vertical'), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser, ref: ref },
|
|
117
|
+
tabs.map((tabProps, index) => renderTab(tabProps, index, listProps)),
|
|
118
|
+
subTabs && (react_1.default.createElement(Tabs, Object.assign({}, subTabs, { role: 'role' in subTabs ? subTabs.role : role, activateOnFocus: (_a = subTabs.activateOnFocus) !== null && _a !== void 0 ? _a : activateOnFocus, ssr: (_b = subTabs.ssr) !== null && _b !== void 0 ? _b : ssr, startSeen: true,
|
|
119
|
+
// just to be sure
|
|
120
|
+
vertical: undefined, subTabs: undefined })))));
|
|
121
121
|
};
|
|
122
122
|
exports.default = Tabs;
|
package/TagPill.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
19
|
-
const
|
|
19
|
+
const _Button_1 = __importDefault(require("./_abstract/_Button"));
|
|
20
20
|
const colors = {
|
|
21
21
|
normal: '',
|
|
22
22
|
green: 'color--green',
|
|
@@ -33,21 +33,16 @@ const TagPill = (props) => {
|
|
|
33
33
|
!onRemove &&
|
|
34
34
|
console.warn('static (non-button) `TagPill`s must not be removable');
|
|
35
35
|
const modifiers = [modifier, large && 'large', colors[color]];
|
|
36
|
-
const removeBtn = removable && (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{label}{' '}
|
|
48
|
-
{removable && (<span className="TagPill__remove" aria-label={removeLabelLong}>
|
|
49
|
-
{removeLabel}
|
|
50
|
-
</span>)}
|
|
51
|
-
</Button_1.default>);
|
|
36
|
+
const removeBtn = removable && (react_1.default.createElement("button", { className: "TagPill__remove", onClick: onRemove && (() => onRemove()), "aria-label": removeLabelLong, type: "button" }, removeLabel));
|
|
37
|
+
return isStatic ? (react_1.default.createElement("span", { className: (0, getBemClass_1.default)('TagPill', modifiers) },
|
|
38
|
+
label,
|
|
39
|
+
" ",
|
|
40
|
+
removeBtn)) : onRemove ? (react_1.default.createElement("span", { className: (0, getBemClass_1.default)('TagPill', modifiers) },
|
|
41
|
+
react_1.default.createElement(_Button_1.default, Object.assign({ bem: "TagPill__button" }, buttonProps), label),
|
|
42
|
+
' ',
|
|
43
|
+
removeBtn)) : (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "TagPill" }, buttonProps, { modifier: modifiers }),
|
|
44
|
+
label,
|
|
45
|
+
' ',
|
|
46
|
+
removable && (react_1.default.createElement("span", { className: "TagPill__remove", "aria-label": removeLabelLong }, removeLabel))));
|
|
52
47
|
};
|
|
53
48
|
exports.default = TagPill;
|
|
@@ -10,13 +10,11 @@ const TextBlock = (props) => {
|
|
|
10
10
|
const { children, align, labelled, wide, small, startSeen } = props;
|
|
11
11
|
const rightAligned = align === 'right' || labelled;
|
|
12
12
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
13
|
-
return (
|
|
13
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('TextBlock', [
|
|
14
14
|
labelled && 'labelled',
|
|
15
15
|
rightAligned && 'align--right',
|
|
16
16
|
wide && !rightAligned && 'wide',
|
|
17
17
|
small && !labelled && 'small',
|
|
18
|
-
])
|
|
19
|
-
{children}
|
|
20
|
-
</div>);
|
|
18
|
+
]), ref: ref }, children));
|
|
21
19
|
};
|
|
22
20
|
exports.default = TextBlock;
|
package/TextButton.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const
|
|
7
|
+
const _Button_1 = __importDefault(require("./_abstract/_Button"));
|
|
8
8
|
const TextButton = (props) => {
|
|
9
9
|
if ('disabled' in props) {
|
|
10
10
|
props = Object.assign(Object.assign({}, props), { disabled: undefined });
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return react_1.default.createElement(_Button_1.default, Object.assign({ bem: "TextButton" }, props));
|
|
13
13
|
};
|
|
14
14
|
exports.default = TextButton;
|
|
@@ -58,6 +58,6 @@ const TextInput = (props) => {
|
|
|
58
58
|
// TypeScript is silly sometimes.
|
|
59
59
|
e);
|
|
60
60
|
};
|
|
61
|
-
return (
|
|
61
|
+
return (react_1.default.createElement(FormField_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 }))) }));
|
|
62
62
|
};
|
|
63
63
|
exports.default = TextInput;
|
|
@@ -41,6 +41,6 @@ const VSpacer = (props) => {
|
|
|
41
41
|
topVal && 'top--' + topVal,
|
|
42
42
|
bottomVal && 'bottom--' + bottomVal,
|
|
43
43
|
]);
|
|
44
|
-
return isWrapper ? (
|
|
44
|
+
return isWrapper ? (react_1.default.createElement("div", { className: className }, children)) : (react_1.default.createElement("hr", { className: className }));
|
|
45
45
|
};
|
|
46
46
|
exports.default = VSpacer;
|
|
@@ -86,11 +86,11 @@ const VerticalTabsTOC = (props) => {
|
|
|
86
86
|
window.addEventListener('hashchange', handleHash);
|
|
87
87
|
return () => window.removeEventListener('hashchange', handleHash);
|
|
88
88
|
}, [itemsById, onItemSelect]);
|
|
89
|
-
return (
|
|
89
|
+
return (react_1.default.createElement(Tabs_1.default, { id: domid, vertical: true, "aria-label": props['aria-label'], onSetActive: (_, item) => {
|
|
90
90
|
var _a;
|
|
91
91
|
const itemId = getItemId(item);
|
|
92
92
|
const newId = itemId || getItemId((_a = itemsById[itemId].subTabs) === null || _a === void 0 ? void 0 : _a.tabs[0]);
|
|
93
93
|
(0, frag_1.setFrag)(newId);
|
|
94
|
-
}
|
|
94
|
+
}, tabs: updatedItems, role: "tablist", activeIdx: state.activeIdx, subTabs: state.subTabs }));
|
|
95
95
|
};
|
|
96
96
|
exports.default = VerticalTabsTOC;
|
package/WizardLayout.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
8
|
+
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
9
|
+
const _Image_1 = __importDefault(require("./_abstract/_Image"));
|
|
10
|
+
const _Link_1 = require("./_abstract/_Link");
|
|
11
|
+
const useScrollbarWidthCSSVar_1 = require("./utils/useScrollbarWidthCSSVar");
|
|
12
|
+
const WizardLayout = (props) => {
|
|
13
|
+
(0, useScrollbarWidthCSSVar_1.useScrollbarWidthCSSVar)();
|
|
14
|
+
const {
|
|
15
|
+
// ssr,
|
|
16
|
+
wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName = 'Reykjavík', globalAlerts, } = props;
|
|
17
|
+
const isBrowser = (0, hooks_1.useIsBrowserSide)( /* ssr */);
|
|
18
|
+
return (react_1.default.createElement("div", { className: "WizardLayout", "data-sprinkled": isBrowser, "data-color-theme": colorTheme },
|
|
19
|
+
globalAlerts && (react_1.default.createElement("div", { className: "WizardLayout__alerts", role: "alert" }, globalAlerts)),
|
|
20
|
+
react_1.default.createElement("div", { className: "WizardLayout__content" },
|
|
21
|
+
react_1.default.createElement("div", { className: "WizardLayout__header", role: "banner" },
|
|
22
|
+
react_1.default.createElement(_Link_1.Link, { className: "WizardLayout__header__logo", href: logoLink },
|
|
23
|
+
' ',
|
|
24
|
+
react_1.default.createElement(_Image_1.default, { className: undefined, inline: true, src: (0, assets_1.getAssetUrl)('reykjavik-logo.svg') }),
|
|
25
|
+
' ',
|
|
26
|
+
siteName,
|
|
27
|
+
' '),
|
|
28
|
+
' '),
|
|
29
|
+
react_1.default.createElement("div", { className: "WizardLayout__wrap" },
|
|
30
|
+
wizardStepper && (react_1.default.createElement("div", { className: "WizardLayout__stepper", role: "navigation" }, wizardStepper)),
|
|
31
|
+
react_1.default.createElement("div", { className: "WizardLayout__main", role: "main" }, children),
|
|
32
|
+
react_1.default.createElement("div", { className: "WizardLayout__deco WizardLayout__deco--geometry" })),
|
|
33
|
+
react_1.default.createElement("div", { className: "WizardLayout__footer", role: "complementary" }, wizardFooter))));
|
|
34
|
+
};
|
|
35
|
+
exports.default = WizardLayout;
|
package/WizardLayoutClose.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const
|
|
8
|
-
const WizardLayoutClose = (props) => (
|
|
7
|
+
const _Button_1 = __importDefault(require("./_abstract/_Button"));
|
|
8
|
+
const WizardLayoutClose = (props) => (react_1.default.createElement(_Button_1.default, Object.assign({ bem: "WizardLayoutClose" }, props)));
|
|
9
9
|
exports.default = WizardLayoutClose;
|
package/WizardStepper.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
+
const WizardStepper = (props) => {
|
|
9
|
+
const { steps, activeStep = -1, allowForwardSkip, disableBacktrack, onClick } = props;
|
|
10
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('WizardStepper', activeStep === -1 && 'preview') }, steps.map((step, i) => {
|
|
11
|
+
const { label, clickable, done, neutral } = step;
|
|
12
|
+
const stepClass = (0, getBemClass_1.default)('WizardStepper__step', [
|
|
13
|
+
(done || (done == null && i < activeStep)) && 'done',
|
|
14
|
+
neutral && 'neutral',
|
|
15
|
+
]);
|
|
16
|
+
const isClickable = clickable === 'always' ||
|
|
17
|
+
(clickable &&
|
|
18
|
+
(activeStep === i ||
|
|
19
|
+
(i > activeStep && allowForwardSkip) ||
|
|
20
|
+
(i < activeStep && !disableBacktrack)));
|
|
21
|
+
const ariaCurrent = activeStep === i ? 'step' : undefined;
|
|
22
|
+
return (react_1.default.createElement(react_1.default.Fragment, { key: i },
|
|
23
|
+
isClickable ? (react_1.default.createElement("button", { type: "button", className: stepClass, onClick: () => onClick(i), "aria-current": ariaCurrent }, label)) : (react_1.default.createElement("span", { className: stepClass, "aria-current": ariaCurrent },
|
|
24
|
+
' ',
|
|
25
|
+
label,
|
|
26
|
+
' ')),
|
|
27
|
+
' '));
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
30
|
+
exports.default = WizardStepper;
|
|
@@ -145,17 +145,14 @@ const AbstractCarousel = (props) => {
|
|
|
145
145
|
if (!itemCount) {
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
148
|
-
return (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{children ||
|
|
148
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)(bem, modifier, props.className), ref: outerRef, "data-sprinkled": isBrowser },
|
|
149
|
+
title && react_1.default.createElement("h2", { className: bem + '__title' }, title),
|
|
150
|
+
react_1.default.createElement("div", { className: bem + '__itemlist', style: leftOffset
|
|
151
|
+
? { '--Carousel--leftOffset': `${leftOffset}px` }
|
|
152
|
+
: undefined, "data-scroll-snapping": leftOffset ? 'true' : undefined, onMouseLeave: handleMouseLeave, ref: listRef }, children ||
|
|
154
153
|
items.map((item, i) => (
|
|
155
154
|
// @ts-expect-error (Can't be arsed...)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
{isBrowser && (<CarouselStepper_1.default itemCount={itemCount} setCurrent={scrollToItem} current={activeItem}/>)}
|
|
159
|
-
</div>);
|
|
155
|
+
react_1.default.createElement(Component, Object.assign({ key: i }, ComponentProps, item))))),
|
|
156
|
+
isBrowser && (react_1.default.createElement(CarouselStepper_1.default, { itemCount: itemCount, setCurrent: scrollToItem, current: activeItem }))));
|
|
160
157
|
};
|
|
161
158
|
exports.default = AbstractCarousel;
|
|
@@ -13,7 +13,5 @@ const inverseAlignments = {
|
|
|
13
13
|
'right-ish': 'left-ish',
|
|
14
14
|
right: 'left',
|
|
15
15
|
};
|
|
16
|
-
const Blings = (props) => (
|
|
17
|
-
{props.blings.map(({ type, align, vertical, color, overlay, parent }, i) => (<Bling_1.default key={type + '-' + i} type={type} align={props.mirror ? inverseAlignments[align || 'left'] : align} vertical={vertical} color={color} overlay={overlay} parent={parent}/>))}
|
|
18
|
-
</>);
|
|
16
|
+
const Blings = (props) => (react_1.default.createElement(react_1.default.Fragment, null, props.blings.map(({ type, align, vertical, color, overlay, parent }, i) => (react_1.default.createElement(Bling_1.default, { key: type + '-' + i, type: type, align: props.mirror ? inverseAlignments[align || 'left'] : align, vertical: vertical, color: color, overlay: overlay, parent: parent })))));
|
|
19
17
|
exports.default = Blings;
|
package/_abstract/_Block.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
2
2
|
import { SeenProp } from '../utils/seenEffect';
|
|
3
|
-
import { ButtonProps } from './
|
|
4
|
-
import { ImageProps } from './
|
|
3
|
+
import { ButtonProps } from './_Button';
|
|
4
|
+
import { ImageProps } from './_Image';
|
|
5
5
|
export declare type BlockItem = {
|
|
6
6
|
title: string;
|
|
7
7
|
summary?: string | JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
|
+
const seenEffect_1 = require("../utils/seenEffect");
|
|
9
|
+
const _Button_1 = __importDefault(require("./_Button"));
|
|
10
|
+
const _Image_1 = __importDefault(require("./_Image"));
|
|
11
|
+
const Block = (props) => {
|
|
12
|
+
const { image, modifier, bem, content, startSeen } = props;
|
|
13
|
+
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
14
|
+
const contentItems = Array.isArray(content) ? content : [content];
|
|
15
|
+
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)(bem, modifier), ref: ref },
|
|
16
|
+
contentItems.map(({ title, summary, buttons = [] }, i) => {
|
|
17
|
+
const hasSummary = summary && (typeof summary !== 'string' || !!summary.trim());
|
|
18
|
+
return (react_1.default.createElement("div", { key: i, className: `${bem}__content` },
|
|
19
|
+
react_1.default.createElement("h2", { className: `${bem}__title` }, title),
|
|
20
|
+
hasSummary && react_1.default.createElement("div", { className: `${bem}__summary` }, summary),
|
|
21
|
+
buttons.length > 0 && (react_1.default.createElement("div", { className: `${bem}__buttons` },
|
|
22
|
+
' ',
|
|
23
|
+
buttons.map((buttonProps, i) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
24
|
+
react_1.default.createElement(_Button_1.default, Object.assign({ bem: `${bem}__button`, key: i }, buttonProps)),
|
|
25
|
+
' ')))))));
|
|
26
|
+
}),
|
|
27
|
+
image && react_1.default.createElement(_Image_1.default, Object.assign({ className: `${bem}__image` }, image))));
|
|
28
|
+
};
|
|
29
|
+
exports.default = Block;
|
|
File without changes
|
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const getBemClass_1 = __importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
19
|
-
const
|
|
19
|
+
const _Link_1 = require("./_Link");
|
|
20
20
|
// ---------------------------------------------------------------------------
|
|
21
21
|
const sizes = {
|
|
22
22
|
normal: '',
|
|
@@ -43,14 +43,10 @@ const Button = (props) => {
|
|
|
43
43
|
(0, getBemClass_1.default)(bem, [modifier, variants[variant], sizes[size], navigationFlags[icon]]);
|
|
44
44
|
const iconProp = icons[icon] && { 'data-icon': icons[icon] };
|
|
45
45
|
if (buttonProps.href != null) {
|
|
46
|
-
return (
|
|
47
|
-
{label}
|
|
48
|
-
</Link_1.Link>);
|
|
46
|
+
return (react_1.default.createElement(_Link_1.Link, Object.assign({ className: className }, buttonProps, { style: undefined }, iconProp), label));
|
|
49
47
|
}
|
|
50
48
|
else {
|
|
51
|
-
return (
|
|
52
|
-
{label}
|
|
53
|
-
</button>);
|
|
49
|
+
return (react_1.default.createElement("button", Object.assign({ className: className, type: "button" }, buttonProps, { style: undefined }, iconProp), label));
|
|
54
50
|
}
|
|
55
51
|
};
|
|
56
52
|
exports.default = Button;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { ImageProps } from './
|
|
2
|
+
import { ImageProps } from './_Image';
|
|
3
3
|
declare type BaseCardProps = {
|
|
4
4
|
title: string;
|
|
5
5
|
href: string;
|
|
@@ -24,6 +24,7 @@ export declare type TextCardListProps = CardListProps<TextCardProps>;
|
|
|
24
24
|
declare type _CardListProps = CardListProps<BaseCardProps> & {
|
|
25
25
|
bemPrefix: string;
|
|
26
26
|
children?: ReactNode;
|
|
27
|
+
standalone?: boolean;
|
|
27
28
|
};
|
|
28
29
|
export declare const CardList: (props: _CardListProps) => JSX.Element;
|
|
29
30
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CardList = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const _Button_1 = __importDefault(require("./_Button"));
|
|
9
|
+
const _Image_1 = __importDefault(require("./_Image"));
|
|
10
|
+
const Card = (props) => {
|
|
11
|
+
const { bem, href, title, imgPlaceholder } = props;
|
|
12
|
+
const cardClass = `${bem}__card`;
|
|
13
|
+
const image = 'image' in props && props.image;
|
|
14
|
+
const meta = 'meta' in props && props.meta;
|
|
15
|
+
const summary = 'summary' in props && props.summary;
|
|
16
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
|
+
react_1.default.createElement(_Button_1.default, { bem: cardClass, href: href },
|
|
18
|
+
' ',
|
|
19
|
+
react_1.default.createElement(_Image_1.default, Object.assign({ className: `${bem}__image` }, image, { placeholder: imgPlaceholder })),
|
|
20
|
+
react_1.default.createElement("span", { className: `${cardClass}__title` }, title),
|
|
21
|
+
' ',
|
|
22
|
+
meta && react_1.default.createElement("span", { className: `${cardClass}__meta` }, meta),
|
|
23
|
+
' ',
|
|
24
|
+
summary && react_1.default.createElement("span", { className: `${cardClass}__summary` }, summary),
|
|
25
|
+
' '),
|
|
26
|
+
' '));
|
|
27
|
+
};
|
|
28
|
+
const CardList = (props) => {
|
|
29
|
+
const { bemPrefix, title, summaryElement, cards, titleTag = 'h2', children, imgPlaceholder, } = props;
|
|
30
|
+
const TitleTag = titleTag;
|
|
31
|
+
const fallbackImageUrl = (imgPlaceholder !== true && imgPlaceholder) || undefined;
|
|
32
|
+
const fallbackImageStyle = fallbackImageUrl
|
|
33
|
+
? {
|
|
34
|
+
['--' + bemPrefix + '--fallback']: `url("${fallbackImageUrl}")`,
|
|
35
|
+
}
|
|
36
|
+
: undefined;
|
|
37
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
|
+
summaryElement ? (react_1.default.createElement("div", { className: bemPrefix + '__summary' },
|
|
39
|
+
title && react_1.default.createElement(TitleTag, { className: bemPrefix + '__title' }, title),
|
|
40
|
+
summaryElement)) : (title && react_1.default.createElement(TitleTag, { className: bemPrefix + '__title' }, title)),
|
|
41
|
+
react_1.default.createElement("ul", { className: bemPrefix + (props.standalone ? '' : '__list'), style: fallbackImageStyle }, cards.map((card, i) => (react_1.default.createElement("li", { key: i, className: bemPrefix + '__item' },
|
|
42
|
+
react_1.default.createElement(Card, Object.assign({}, card, { bem: bemPrefix, imgPlaceholder: !!imgPlaceholder })))))),
|
|
43
|
+
children));
|
|
44
|
+
};
|
|
45
|
+
exports.CardList = CardList;
|
|
@@ -2,25 +2,29 @@ export declare type Source = {
|
|
|
2
2
|
srcset: string;
|
|
3
3
|
media: string;
|
|
4
4
|
};
|
|
5
|
-
export declare type
|
|
5
|
+
export declare type ImagePropsLinked = {
|
|
6
6
|
altText?: string;
|
|
7
|
-
} & ({
|
|
8
7
|
sources?: Array<Source>;
|
|
9
8
|
/** The default image source to (lazy) load */
|
|
10
9
|
src?: string;
|
|
11
10
|
/** Eagerly-loaded placeholder/thunbnail to use until a `sources` item has been picked. */
|
|
12
11
|
preloadSrc?: string;
|
|
13
12
|
inline?: false;
|
|
14
|
-
|
|
13
|
+
focalPoint?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type ImagePropsInlinedSvg = {
|
|
16
|
+
altText?: string;
|
|
15
17
|
/** Should the image be fetched and inlined as <svg/> */
|
|
16
18
|
inline: true;
|
|
17
19
|
src: string;
|
|
18
20
|
sources?: undefined;
|
|
19
21
|
preloadSrc?: undefined;
|
|
20
|
-
|
|
22
|
+
focalPoint?: undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare type ImageProps = ImagePropsLinked | ImagePropsInlinedSvg;
|
|
21
25
|
declare type _ImageProps = {
|
|
22
26
|
/** container className */
|
|
23
|
-
className
|
|
27
|
+
className: string | undefined;
|
|
24
28
|
/** Controls if the container is rendered when image is missing/undefined.
|
|
25
29
|
* (With a `--missing` className modifier added.)
|
|
26
30
|
*
|