@reykjavik/hanna-react 0.10.83 → 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 +13 -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 +390 -4
- 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/AccordionList.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SeenProp } from './utils/seenEffect';
|
|
2
|
-
import { SSRSupport } from './utils';
|
|
1
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
2
|
+
import { SSRSupport } from './utils.js';
|
|
3
3
|
export type AccordionListItemProps = {
|
|
4
4
|
title: string | JSX.Element;
|
|
5
5
|
content: string | JSX.Element | undefined;
|
package/AccordionList.js
CHANGED
|
@@ -5,13 +5,13 @@ 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
|
|
9
|
-
const
|
|
8
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
9
|
+
const utils_js_1 = require("./utils.js");
|
|
10
10
|
const AccordionListItem = (props) => {
|
|
11
11
|
const { title, content, id, disabled = false, ssr, open, onToggle } = props;
|
|
12
12
|
const defaultOpen = (0, react_1.useRef)(props.defaultOpen);
|
|
13
13
|
const domid = (0, hooks_1.useDomid)();
|
|
14
|
-
const isBrowser = (0,
|
|
14
|
+
const isBrowser = (0, utils_js_1.useIsBrowserSide)(ssr);
|
|
15
15
|
const itemDisabled = (isBrowser && disabled) || !content;
|
|
16
16
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('AccordionList__item', [itemDisabled && 'disabled']), id: id, "data-start-open": defaultOpen.current, "data-sprinkled": isBrowser },
|
|
17
17
|
react_1.default.createElement("h3", { className: "AccordionList__title" }, isBrowser ? (react_1.default.createElement("button", { type: "button", className: "AccordionList__button", "aria-controls": domid, "aria-expanded": open || undefined, onClick: onToggle, disabled: itemDisabled }, title)) : (title)),
|
|
@@ -19,8 +19,8 @@ const AccordionListItem = (props) => {
|
|
|
19
19
|
};
|
|
20
20
|
const AccordionList = (props) => {
|
|
21
21
|
const { items, ssr, wide, startSeen, defaultOpen } = props;
|
|
22
|
-
const [ref] = (0,
|
|
23
|
-
const [open, setOpenArray, mode] = (0,
|
|
22
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
23
|
+
const [open, setOpenArray, mode] = (0, utils_js_1.useMixedControlState)(props, 'open', []);
|
|
24
24
|
const onToggle = (index) => {
|
|
25
25
|
setOpenArray((prevOpen) => {
|
|
26
26
|
const opened = !prevOpen.includes(index);
|
package/ActionCards.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CardListSummaryProps, TextCardListProps, TextCardProps } from './_abstract/_CardList';
|
|
2
|
-
import { SeenProp } from './utils/seenEffect';
|
|
1
|
+
import { CardListSummaryProps, TextCardListProps, TextCardProps } from './_abstract/_CardList.js';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
3
3
|
export type ActionCardsProps = TextCardListProps & CardListSummaryProps & SeenProp;
|
|
4
4
|
export type ActionCardsItemProps = TextCardProps;
|
|
5
5
|
export declare const ActionCards: (props: ActionCardsProps) => JSX.Element;
|
package/ActionCards.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActionCards = 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 _CardList_js_1 = require("./_abstract/_CardList.js");
|
|
7
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const ActionCards = (props) => {
|
|
9
|
-
const [ref] = (0,
|
|
9
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(props.startSeen);
|
|
10
10
|
return (react_1.default.createElement("div", { className: "ActionCards", ref: ref },
|
|
11
|
-
react_1.default.createElement(
|
|
11
|
+
react_1.default.createElement(_CardList_js_1.CardList, Object.assign({}, props, { bemPrefix: "ActionCards" }))));
|
|
12
12
|
};
|
|
13
13
|
exports.ActionCards = ActionCards;
|
|
14
14
|
exports.default = exports.ActionCards;
|
package/Alert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
|
-
import { SSRSupport } from './utils';
|
|
4
|
+
import { SSRSupport } from './utils.js';
|
|
5
5
|
export type AlertI18n = {
|
|
6
6
|
closeLabel: string;
|
|
7
7
|
closeLabelLong?: string;
|
package/Alert.js
CHANGED
|
@@ -5,9 +5,9 @@ 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
7
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
9
|
+
const env_js_1 = require("./utils/env.js");
|
|
10
|
+
const utils_js_1 = require("./utils.js");
|
|
11
11
|
// FIXME: Eventually import from @reykjavik/hanna-css
|
|
12
12
|
const AlertCloseTransitionDuration = 400;
|
|
13
13
|
const useAutoClosing = (autoClose) => {
|
|
@@ -19,7 +19,7 @@ const useAutoClosing = (autoClose) => {
|
|
|
19
19
|
const freeze = () => setTemp((temp) => temp - 1);
|
|
20
20
|
return {
|
|
21
21
|
autoClosing: temp === 0,
|
|
22
|
-
autoClosingProps: Object.assign({ onMouseEnter: freeze, onMouseLeave: thaw, onFocus: freeze, onBlur: thaw }, (
|
|
22
|
+
autoClosingProps: Object.assign({ onMouseEnter: freeze, onMouseLeave: thaw, onFocus: freeze, onBlur: thaw }, (env_js_1.isPreact && {
|
|
23
23
|
onfocusin: (e) => e.currentTarget !== e.target && freeze(),
|
|
24
24
|
onfocusout: (e) => e.currentTarget !== e.target && thaw(),
|
|
25
25
|
})),
|
|
@@ -41,7 +41,7 @@ const Alert = (props) => {
|
|
|
41
41
|
const autoClose = Math.max(props.autoClose || 0, 0);
|
|
42
42
|
const closing = (0, react_1.useRef)();
|
|
43
43
|
const [open, setOpen] = (0, react_1.useState)(!!ssr);
|
|
44
|
-
const isBrowser = (0,
|
|
44
|
+
const isBrowser = (0, utils_js_1.useIsBrowserSide)(ssr);
|
|
45
45
|
const showCloseButton = closable && (isBrowser || closeUrl != null);
|
|
46
46
|
const { closeLabel, closeLabelLong } = (0, i18n_1.getTexts)(props, exports.defaultAlertTexts);
|
|
47
47
|
(0, react_1.useEffect)(() => {
|
|
@@ -87,7 +87,7 @@ const Alert = (props) => {
|
|
|
87
87
|
]), role: "alert", hidden: !open || undefined }, autoClosingProps),
|
|
88
88
|
childrenHTML ? (react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: childrenHTML } })) : (children),
|
|
89
89
|
' ',
|
|
90
|
-
showCloseButton && (react_1.default.createElement(
|
|
90
|
+
showCloseButton && (react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "Alert__close" }, (closeUrl != null ? { href: closeUrl } : { type: 'button' }), { onClick: (e) => {
|
|
91
91
|
closeAlert(e);
|
|
92
92
|
}, "aria-label": closeLabelLong, title: closeLabelLong || closeLabel }), closeLabel))));
|
|
93
93
|
};
|
package/ArticleCards.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cleanup } from '@reykjavik/hanna-utils';
|
|
2
|
-
import { ImageCardListProps, ImageCardProps } from './_abstract/_CardList';
|
|
2
|
+
import { ImageCardListProps, ImageCardProps } from './_abstract/_CardList.js';
|
|
3
3
|
export type ArticleCardsItemProps = ImageCardProps;
|
|
4
4
|
/** @deprecated Use `ArticleCardsItemProps` instead (Remove in v0.11) */
|
|
5
5
|
export type ArticleCardProps = ArticleCardsItemProps;
|
package/ArticleCards.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ArticleCards = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ArticleCards = (props) => (react_1.default.createElement(
|
|
6
|
+
const _CardList_js_1 = require("./_abstract/_CardList.js");
|
|
7
|
+
const ArticleCards = (props) => (react_1.default.createElement(_CardList_js_1.CardList, { bemPrefix: "ArticleCards", standalone: true, cards: props.cards, imgPlaceholder: props.imgPlaceholder || true }));
|
|
8
8
|
exports.ArticleCards = ArticleCards;
|
|
9
9
|
exports.default = exports.ArticleCards;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
2
2
|
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
3
|
-
import { ImageProps } from '../_abstract/_Image';
|
|
4
|
-
import { ColorFamily } from '../constants';
|
|
3
|
+
import { ImageProps } from '../_abstract/_Image.js';
|
|
4
|
+
import { ColorFamily } from '../constants.js';
|
|
5
5
|
export type ArticleCarouselImageProps = ImageProps & {
|
|
6
6
|
photo?: boolean;
|
|
7
7
|
};
|
|
@@ -5,23 +5,23 @@ 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
7
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const _Image_js_1 = require("../_abstract/_Image.js");
|
|
9
|
+
const _Link_js_1 = require("../_abstract/_Link.js");
|
|
10
|
+
const constants_js_1 = require("../constants.js");
|
|
11
11
|
const ArticleCarouselCard = (props) => {
|
|
12
12
|
const { date, title, summary, href, target, moreLabel, color, theme, illustration, image, } = props;
|
|
13
13
|
const photo = image === null || image === void 0 ? void 0 : image.photo;
|
|
14
14
|
const imageProps = illustration ? { src: (0, assets_1.getIllustrationUrl)(illustration) } : image;
|
|
15
|
-
return (react_1.default.createElement("div", { className: "ArticleCarouselCard", "data-color": color &&
|
|
16
|
-
react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement("div", { className: "ArticleCarouselCard", "data-color": color && constants_js_1.colorFamilies[color], "data-color-theme": !color ? theme && constants_js_1.themeOptions[theme] : undefined },
|
|
16
|
+
react_1.default.createElement(_Link_js_1.Link, { className: "ArticleCarouselCard__link", href: href, target: target },
|
|
17
17
|
' ',
|
|
18
|
-
react_1.default.createElement(
|
|
18
|
+
react_1.default.createElement(_Image_js_1.Image, Object.assign({ placeholder: true, className: (0, getBemClass_1.default)('ArticleCarouselCard__illustration', photo && 'photo') }, imageProps)),
|
|
19
19
|
react_1.default.createElement("h3", { className: "ArticleCarouselCard__title" }, title),
|
|
20
20
|
' '),
|
|
21
21
|
' ',
|
|
22
22
|
date && react_1.default.createElement("span", { className: "ArticleCarouselCard__date" }, date),
|
|
23
23
|
react_1.default.createElement("div", { className: "ArticleCarouselCard__summary" }, summary),
|
|
24
|
-
moreLabel && (react_1.default.createElement(
|
|
24
|
+
moreLabel && (react_1.default.createElement(_Link_js_1.Link, { className: "ArticleCarouselCard__morelink", href: href, target: target, "aria-label": title },
|
|
25
25
|
' ',
|
|
26
26
|
moreLabel,
|
|
27
27
|
' '))));
|
package/ArticleCarousel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArticleCarouselCardProps, ArticleCarouselImageProps } from './ArticleCarousel/_ArticleCarouselCard';
|
|
2
|
-
import { SeenProp } from './utils/seenEffect';
|
|
3
|
-
import { SSRSupport } from './utils';
|
|
1
|
+
import { ArticleCarouselCardProps, ArticleCarouselImageProps } from './ArticleCarousel/_ArticleCarouselCard.js';
|
|
2
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { SSRSupport } from './utils.js';
|
|
4
4
|
export type ArticleCarouselProps = {
|
|
5
5
|
items: Array<ArticleCarouselCardProps>;
|
|
6
6
|
title?: string;
|
package/ArticleCarousel.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ArticleCarousel = 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 _AbstractCarousel_js_1 = require("./_abstract/_AbstractCarousel.js");
|
|
7
|
+
const _ArticleCarouselCard_js_1 = require("./ArticleCarousel/_ArticleCarouselCard.js");
|
|
8
8
|
const ArticleCarousel = (props) => {
|
|
9
9
|
const { title, items, moreLabel, ssr, startSeen } = props;
|
|
10
|
-
return (react_1.default.createElement(
|
|
10
|
+
return (react_1.default.createElement(_AbstractCarousel_js_1.AbstractCarousel, { bem: "ArticleCarousel", title: title, items: items, Component: _ArticleCarouselCard_js_1.ArticleCarouselCard, ComponentProps: { moreLabel }, ssr: ssr, startSeen: startSeen }));
|
|
11
11
|
};
|
|
12
12
|
exports.ArticleCarousel = ArticleCarousel;
|
|
13
13
|
exports.default = exports.ArticleCarousel;
|
package/ArticleMeta.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.ArticleMeta = 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 _Link_js_1 = require("./_abstract/_Link.js");
|
|
8
8
|
const ArticleMeta = (props) => {
|
|
9
9
|
const { items, small } = props;
|
|
10
10
|
if (items.length === 0) {
|
|
@@ -14,7 +14,7 @@ const ArticleMeta = (props) => {
|
|
|
14
14
|
href == null ? (react_1.default.createElement("span", { className: "ArticleMeta__item" },
|
|
15
15
|
" ",
|
|
16
16
|
label,
|
|
17
|
-
" ")) : (react_1.default.createElement(
|
|
17
|
+
" ")) : (react_1.default.createElement(_Link_js_1.Link, { className: "ArticleMeta__item", href: href },
|
|
18
18
|
' ',
|
|
19
19
|
label,
|
|
20
20
|
' ')),
|
package/BasicTable.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableProps } from '@hugsmidjan/react/Table';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
|
-
import { SeenProp } from './utils/seenEffect';
|
|
3
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
4
4
|
export type BasicTableProps = {
|
|
5
5
|
compact?: boolean;
|
|
6
6
|
type?: 'text' | 'number';
|
package/BasicTable.js
CHANGED
|
@@ -6,14 +6,14 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const Table_1 = tslib_1.__importDefault(require("@hugsmidjan/react/Table"));
|
|
7
7
|
const TableWrapper_1 = tslib_1.__importDefault(require("@hugsmidjan/react/TableWrapper"));
|
|
8
8
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
|
-
const
|
|
9
|
+
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
10
10
|
const BasicTable = (props) => {
|
|
11
11
|
const { cols, caption, thead, tfoot, align, fullWidth, startSeen } = props;
|
|
12
12
|
const tbodyProps = props.tbodies
|
|
13
13
|
? { tbodies: props.tbodies }
|
|
14
14
|
: { tbody: props.tbody || [] };
|
|
15
15
|
const modifier = props.modifier;
|
|
16
|
-
const [ref] = (0,
|
|
16
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
17
17
|
return (react_1.default.createElement(TableWrapper_1.default, { modifier: [
|
|
18
18
|
'BasicTable',
|
|
19
19
|
modifier && 'BasicTable--' + modifier,
|
package/BgBox.d.ts
CHANGED
package/BgBox.js
CHANGED
|
@@ -4,11 +4,11 @@ exports.BgBox = 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 BgBox = (props) => {
|
|
9
9
|
const { className, children, effectType, startSeen } = props;
|
|
10
|
-
const [ref] = (0,
|
|
11
|
-
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('BgBox', undefined, className), ref: ref }, (0,
|
|
10
|
+
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
11
|
+
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('BgBox', undefined, className), ref: ref }, (0, seenEffect_js_1.getEffectAttr)(effectType)), children));
|
|
12
12
|
};
|
|
13
13
|
exports.BgBox = BgBox;
|
|
14
14
|
exports.default = exports.BgBox;
|
package/Bling.js
CHANGED
|
@@ -5,7 +5,7 @@ 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
7
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
8
|
-
const
|
|
8
|
+
const useGetSVGtext_js_1 = require("./utils/useGetSVGtext.js");
|
|
9
9
|
const colors = {
|
|
10
10
|
tertiary: true,
|
|
11
11
|
secondary: true,
|
|
@@ -36,7 +36,7 @@ const parentOffset = {
|
|
|
36
36
|
const Bling = (props) => {
|
|
37
37
|
const { align, vertical, color, overlay, type, blingUrl, parent, className } = props;
|
|
38
38
|
const imageUrl = type ? (0, assets_1.getBlingUrl)(type) : blingUrl;
|
|
39
|
-
const inlineSvg = (0,
|
|
39
|
+
const inlineSvg = (0, useGetSVGtext_js_1.useGetSVGtext)(imageUrl);
|
|
40
40
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Bling', [
|
|
41
41
|
'align--' + (align && align in aligns ? align : 'left'),
|
|
42
42
|
vertical && vertical in valigns && 'vertical--' + vertical,
|
package/BlockQuote.d.ts
CHANGED
package/BlockQuote.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BlockQuote = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const BlockQuote = (props) => (react_1.default.createElement(
|
|
6
|
+
const _Quote_js_1 = require("./_abstract/_Quote.js");
|
|
7
|
+
const BlockQuote = (props) => (react_1.default.createElement(_Quote_js_1._Quote, Object.assign({ bem: "BlockQuote" }, props)));
|
|
8
8
|
exports.BlockQuote = BlockQuote;
|
|
9
9
|
exports.default = exports.BlockQuote;
|
package/BreadCrumbs.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BreadCrumbs = 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 BreadCrumbs__item = (props) => {
|
|
8
8
|
const { link, current } = props;
|
|
9
|
-
return link.href != null ? (react_1.default.createElement(
|
|
9
|
+
return link.href != null ? (react_1.default.createElement(_Link_js_1.Link, { className: "BreadCrumbs__item", href: link.href, "aria-current": current || undefined }, link.label)) : (react_1.default.createElement("span", { className: "BreadCrumbs__item", "aria-current": current || undefined }, link.label));
|
|
10
10
|
};
|
|
11
11
|
const BreadCrumbs = (props) => {
|
|
12
12
|
const { title, trail } = props;
|
package/ButtonBack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from './_abstract/_Button';
|
|
2
|
+
import { ButtonProps } from './_abstract/_Button.js';
|
|
3
3
|
export type ButtonBackProps = ButtonProps;
|
|
4
4
|
export declare const ButtonBack: (props: ButtonBackProps & {
|
|
5
5
|
children?: ReactNode;
|
package/ButtonBack.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ButtonBack = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ButtonBack = (props) => (react_1.default.createElement(
|
|
6
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
7
|
+
const ButtonBack = (props) => (react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "ButtonBack" }, props)));
|
|
8
8
|
exports.ButtonBack = ButtonBack;
|
|
9
9
|
exports.default = exports.ButtonBack;
|
package/ButtonPrimary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button.js';
|
|
3
3
|
export type ButtonPrimaryProps = ButtonProps & ButtonVariantProps;
|
|
4
4
|
export declare const ButtonPrimary: (props: ButtonPrimaryProps & {
|
|
5
5
|
children?: ReactNode;
|
package/ButtonPrimary.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ButtonPrimary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ButtonPrimary = (props) => (react_1.default.createElement(
|
|
6
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
7
|
+
const ButtonPrimary = (props) => (react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "ButtonPrimary" }, props)));
|
|
8
8
|
exports.ButtonPrimary = ButtonPrimary;
|
|
9
9
|
exports.default = exports.ButtonPrimary;
|
package/ButtonSecondary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button.js';
|
|
3
3
|
export type ButtonSecondaryProps = ButtonProps & ButtonVariantProps;
|
|
4
4
|
export declare const ButtonSecondary: (props: ButtonSecondaryProps & {
|
|
5
5
|
children?: ReactNode;
|
package/ButtonSecondary.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ButtonSecondary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ButtonSecondary = (props) => react_1.default.createElement(
|
|
6
|
+
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
7
|
+
const ButtonSecondary = (props) => react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "ButtonSecondary" }, props));
|
|
8
8
|
exports.ButtonSecondary = ButtonSecondary;
|
|
9
9
|
exports.default = exports.ButtonSecondary;
|
package/ButtonTertiary.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button';
|
|
2
|
+
import { ButtonProps, ButtonVariantProps } from './_abstract/_Button.js';
|
|
3
3
|
type TertiarySize = Extract<ButtonVariantProps['size'], 'normal' | 'small'>;
|
|
4
4
|
type TertiaryIcon = Extract<ButtonVariantProps['icon'], 'none' | 'go-back'>;
|
|
5
5
|
export type ButtonTertiaryProps = ButtonProps & Omit<ButtonVariantProps, 'icon' | 'size'> & {
|
package/ButtonTertiary.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ButtonTertiary = 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 sizes = {
|
|
8
8
|
normal: 'normal',
|
|
9
9
|
small: 'small',
|
|
@@ -14,7 +14,7 @@ const icons = {
|
|
|
14
14
|
};
|
|
15
15
|
const ButtonTertiary = (props) => {
|
|
16
16
|
const { size = 'normal', icon = 'none' } = props;
|
|
17
|
-
return react_1.default.createElement(
|
|
17
|
+
return react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "ButtonTertiary" }, props, { size: sizes[size], icon: icons[icon] }));
|
|
18
18
|
};
|
|
19
19
|
exports.ButtonTertiary = ButtonTertiary;
|
|
20
20
|
exports.default = exports.ButtonTertiary;
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
- ... <!-- Add new lines here. -->
|
|
6
6
|
|
|
7
|
+
## 0.10.85
|
|
8
|
+
|
|
9
|
+
_2023-04-04_
|
|
10
|
+
|
|
11
|
+
- feat: Re-enable ESM exports in published build
|
|
12
|
+
- fix: `MegaMenu` render thrashing and accidental scrolling to top of page
|
|
13
|
+
|
|
14
|
+
## 0.10.84
|
|
15
|
+
|
|
16
|
+
_2023-03-21_
|
|
17
|
+
|
|
18
|
+
- feat: Suppress hydration warnings for auto-generated DOM `id`s in React@18
|
|
19
|
+
|
|
7
20
|
## 0.10.83
|
|
8
21
|
|
|
9
22
|
_2023-03-20_
|
package/Carousel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CarouselProps } from './_abstract/_AbstractCarousel';
|
|
2
|
-
export type { CarouselProps } from './_abstract/_AbstractCarousel';
|
|
1
|
+
import { CarouselProps } from './_abstract/_AbstractCarousel.js';
|
|
2
|
+
export type { CarouselProps } from './_abstract/_AbstractCarousel.js';
|
|
3
3
|
export declare const Carousel: <I extends Record<string, unknown> = {}, P extends Record<string, unknown> | undefined = {}>(props: CarouselProps<I, P>) => JSX.Element;
|
|
4
4
|
export default Carousel;
|
package/Carousel.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Carousel = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const Carousel = (props) => (react_1.default.createElement(
|
|
6
|
+
const _AbstractCarousel_js_1 = require("./_abstract/_AbstractCarousel.js");
|
|
7
|
+
const Carousel = (props) => (react_1.default.createElement(_AbstractCarousel_js_1.AbstractCarousel, Object.assign({}, props, { bem: undefined, modifier: undefined, title: undefined })));
|
|
8
8
|
exports.Carousel = Carousel;
|
|
9
9
|
exports.default = exports.Carousel;
|
package/CenterColumn.d.ts
CHANGED
package/CenterColumn.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CenterColumn = 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 = tslib_1.__importDefault(require("./SeenEffect.js"));
|
|
7
7
|
const CenterColumn = (props) => {
|
|
8
8
|
const { children, startSeen, effectType } = props;
|
|
9
|
-
return startSeen == null ? (react_1.default.createElement("div", { className: "CenterColumn" }, children)) : (react_1.default.createElement(
|
|
9
|
+
return startSeen == null ? (react_1.default.createElement("div", { className: "CenterColumn" }, children)) : (react_1.default.createElement(SeenEffect_js_1.default, { className: "CenterColumn", startSeen: startSeen, effectType: effectType }, children));
|
|
10
10
|
};
|
|
11
11
|
exports.CenterColumn = CenterColumn;
|
|
12
12
|
exports.default = exports.CenterColumn;
|
package/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
1
|
+
import { TogglerInputProps } from './_abstract/_TogglerInput.js';
|
|
2
2
|
export type CheckboxProps = TogglerInputProps;
|
|
3
3
|
export declare const Checkbox: (props: CheckboxProps) => JSX.Element;
|
|
4
4
|
export default Checkbox;
|
package/Checkbox.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Checkbox = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const Checkbox = (props) => (react_1.default.createElement(
|
|
6
|
+
const _TogglerInput_js_1 = require("./_abstract/_TogglerInput.js");
|
|
7
|
+
const Checkbox = (props) => (react_1.default.createElement(_TogglerInput_js_1.TogglerInput, Object.assign({ bem: "Checkbox" }, props, { type: "checkbox" })));
|
|
8
8
|
exports.Checkbox = Checkbox;
|
|
9
9
|
exports.default = exports.Checkbox;
|
package/CheckboxButton.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
1
|
+
import { TogglerInputProps } from './_abstract/_TogglerInput.js';
|
|
2
2
|
export type CheckboxProps = TogglerInputProps;
|
|
3
3
|
export declare const CheckboxButton: (props: CheckboxProps) => JSX.Element;
|
|
4
4
|
export default CheckboxButton;
|
package/CheckboxButton.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CheckboxButton = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const CheckboxButton = (props) => (react_1.default.createElement(
|
|
6
|
+
const _TogglerInput_js_1 = require("./_abstract/_TogglerInput.js");
|
|
7
|
+
const CheckboxButton = (props) => (react_1.default.createElement(_TogglerInput_js_1.TogglerInput, Object.assign({ bem: "CheckboxButton" }, props, { type: "checkbox", innerWrap: true })));
|
|
8
8
|
exports.CheckboxButton = CheckboxButton;
|
|
9
9
|
exports.default = exports.CheckboxButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
1
|
+
import { TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField.js';
|
|
2
2
|
export type CheckboxButtonsGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
value?: Array<string>;
|
|
4
4
|
defaultValue?: Array<string>;
|
package/CheckboxButtonsGroup.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CheckboxButtonsGroup = 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 _TogglerGroupField_js_1 = require("./_abstract/_TogglerGroupField.js");
|
|
7
|
+
const CheckboxButton_js_1 = tslib_1.__importDefault(require("./CheckboxButton.js"));
|
|
8
8
|
const CheckboxButtonsGroup = (props) => {
|
|
9
9
|
if (props.layout) {
|
|
10
10
|
console.warn('`CheckboxButtonsGroupProps.layout` is deprecated.');
|
|
@@ -12,7 +12,7 @@ const CheckboxButtonsGroup = (props) => {
|
|
|
12
12
|
if (props.columns) {
|
|
13
13
|
console.warn('`CheckboxButtonsGroupProps.columns` is deprecated.');
|
|
14
14
|
}
|
|
15
|
-
return (react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement(_TogglerGroupField_js_1.TogglerGroupField, Object.assign({}, props, { bem: "CheckboxButtonsGroup", Toggler: CheckboxButton_js_1.default })));
|
|
16
16
|
};
|
|
17
17
|
exports.CheckboxButtonsGroup = CheckboxButtonsGroup;
|
|
18
18
|
exports.default = exports.CheckboxButtonsGroup;
|
package/CheckboxGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
1
|
+
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField.js';
|
|
2
2
|
export type CheckboxGroupProps = TogglerGroupFieldProps & {
|
|
3
3
|
layout?: 'inline';
|
|
4
4
|
value?: Array<string>;
|
package/CheckboxGroup.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CheckboxGroup = 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 _TogglerGroupField_js_1 = require("./_abstract/_TogglerGroupField.js");
|
|
7
|
+
const Checkbox_js_1 = tslib_1.__importDefault(require("./Checkbox.js"));
|
|
8
8
|
const CheckboxGroup = (props) => {
|
|
9
|
-
return (react_1.default.createElement(
|
|
9
|
+
return (react_1.default.createElement(_TogglerGroupField_js_1.TogglerGroupField, Object.assign({}, props, { bem: "CheckboxGroup", modifier: props.layout, Toggler: Checkbox_js_1.default })));
|
|
10
10
|
};
|
|
11
11
|
exports.CheckboxGroup = CheckboxGroup;
|
|
12
12
|
exports.default = exports.CheckboxGroup;
|
package/CityBlock.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
2
2
|
import { Illustration } from '@reykjavik/hanna-utils/assets';
|
|
3
|
-
import { BlockItem } from './_abstract/_Block';
|
|
4
|
-
import { ImageProps } from './_abstract/_Image';
|
|
5
|
-
import { SeenProp } from './utils/seenEffect';
|
|
6
|
-
import { Alignment } from './constants';
|
|
3
|
+
import { BlockItem } from './_abstract/_Block.js';
|
|
4
|
+
import { ImageProps } from './_abstract/_Image.js';
|
|
5
|
+
import { SeenProp } from './utils/seenEffect.js';
|
|
6
|
+
import { Alignment } from './constants.js';
|
|
7
7
|
declare const types: {
|
|
8
8
|
largebox: boolean;
|
|
9
9
|
largeimage: boolean;
|