@reykjavik/hanna-react 0.10.99 → 0.10.101
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 +2 -2
- package/ActionCards.d.ts +2 -1
- package/ActionCards.js +1 -1
- package/Alert.d.ts +2 -2
- package/Alert.js +20 -12
- package/ArticleCards.d.ts +4 -1
- package/ArticleCards.js +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.js +1 -2
- package/ArticleCarousel.d.ts +2 -2
- package/ArticleCarousel.js +1 -1
- package/ArticleMeta.d.ts +2 -1
- package/ArticleMeta.js +2 -2
- package/Attention.d.ts +2 -1
- package/Attention.js +4 -1
- package/BasicTable.d.ts +2 -1
- package/BgBox.d.ts +2 -1
- package/BgBox.js +4 -2
- package/Bling.d.ts +2 -1
- package/Bling.js +5 -3
- package/BlockBreak.js +1 -0
- package/BreadCrumbs.d.ts +2 -1
- package/BreadCrumbs.js +3 -2
- package/ButtonBack.js +2 -0
- package/ButtonBar.d.ts +4 -3
- package/ButtonBar.js +3 -3
- package/ButtonPrimary.js +2 -0
- package/ButtonSecondary.js +2 -0
- package/ButtonTertiary.js +2 -0
- package/CHANGELOG.md +14 -1
- package/CarouselStepper.d.ts +2 -1
- package/CenterColumn.d.ts +2 -1
- package/CenterColumn.js +4 -2
- package/CheckboxButton.d.ts +4 -2
- package/CheckboxButtonsGroup.js +2 -2
- package/CityBlock.d.ts +2 -1
- package/CityBlock.js +1 -1
- package/ContactBubble.d.ts +2 -2
- package/ContactBubble.js +5 -4
- package/ContentArticle.d.ts +2 -1
- package/ContentArticle.js +3 -2
- package/ContentImage.d.ts +2 -1
- package/ContentImage.js +4 -3
- package/Datepicker.js +6 -6
- package/ExtraLinks.d.ts +2 -1
- package/ExtraLinks.js +4 -2
- package/FeatureList.d.ts +2 -1
- package/FeatureList.js +3 -2
- package/FieldGroup.d.ts +2 -1
- package/FieldGroup.js +4 -2
- package/FileInput.d.ts +2 -2
- package/FileInput.js +10 -5
- package/Foonote.js +3 -4
- package/Footnote.d.ts +2 -1
- package/Footnote.js +2 -1
- package/Form.js +4 -5
- package/FormField.d.ts +25 -5
- package/FormField.js +32 -7
- package/Gallery/_GalleryItem.js +2 -2
- package/Gallery/_GalleryModalItem.js +1 -1
- package/Gallery.d.ts +2 -2
- package/Gallery.js +5 -4
- package/GridBlocks.d.ts +2 -5
- package/GridBlocks.js +3 -3
- package/Heading.d.ts +2 -1
- package/Heading.js +3 -3
- package/HeroBlock.d.ts +2 -1
- package/HeroBlock.js +4 -3
- package/IframeBlock.d.ts +9 -4
- package/IframeBlock.js +13 -12
- package/Illustration.d.ts +2 -1
- package/Illustration.js +1 -1
- package/ImageCards.d.ts +2 -1
- package/ImageCards.js +2 -2
- package/InfoBlock.d.ts +2 -1
- package/InfoBlock.js +3 -2
- package/InfoHero.d.ts +2 -1
- package/InfoHero.js +3 -3
- package/IslandBlock.d.ts +2 -1
- package/IslandBlock.js +2 -2
- package/IslandPageBlock.d.ts +2 -1
- package/IslandPageBlock.js +2 -2
- package/LabeledTextBlock.d.ts +2 -1
- package/LabeledTextBlock.js +2 -2
- package/Layout.d.ts +2 -2
- package/Layout.js +3 -3
- package/MainMenu.d.ts +2 -2
- package/MainMenu.js +4 -3
- package/MiniMetrics.d.ts +2 -1
- package/MiniMetrics.js +3 -2
- package/Modal.d.ts +2 -1
- package/Multiselect.d.ts +11 -6
- package/Multiselect.js +15 -11
- package/NameCard.d.ts +2 -1
- package/NameCard.js +10 -6
- package/NameCards.d.ts +3 -2
- package/NameCards.js +3 -2
- package/NewsHero.d.ts +2 -1
- package/NewsHero.js +3 -3
- package/PageFilter.d.ts +2 -1
- package/PageFilter.js +2 -2
- package/PageHeading.d.ts +2 -1
- package/PageHeading.js +2 -5
- package/Picture.d.ts +2 -1
- package/Picture.js +1 -5
- package/ProcessOverview.d.ts +2 -1
- package/ProcessOverview.js +2 -5
- package/RadioButtonsGroup.js +2 -2
- package/RadioGroup.js +1 -1
- package/ReadSpeakerPlayer.d.ts +1 -1
- package/ReadSpeakerPlayer.js +2 -2
- package/RelatedLinks.d.ts +2 -1
- package/RelatedLinks.js +3 -2
- package/RowBlock.d.ts +2 -1
- package/RowBlock.js +2 -2
- package/RowBlockColumn.d.ts +2 -1
- package/RowBlockColumn.js +3 -3
- package/SearchInput.d.ts +3 -9
- package/SearchInput.js +4 -5
- package/SearchResults/_SearchResultsItem.js +1 -1
- package/SearchResults.d.ts +2 -1
- package/SearchResults.js +2 -2
- package/SeenEffect.js +2 -0
- package/Selectbox.js +3 -4
- package/ShareButtons.d.ts +2 -2
- package/ShareButtons.js +5 -3
- package/Sharpie.d.ts +2 -1
- package/Sharpie.js +2 -2
- package/SiteSearchAutocomplete.d.ts +2 -1
- package/SiteSearchAutocomplete.js +4 -4
- package/SiteSearchCurtain.js +2 -0
- package/SiteSearchInput.d.ts +3 -6
- package/SiteSearchInput.js +4 -4
- package/Skeleton.d.ts +4 -1
- package/Skeleton.js +15 -18
- package/SubHeading.d.ts +2 -1
- package/SubHeading.js +3 -3
- package/Tabs.d.ts +2 -2
- package/Tabs.js +5 -5
- package/TagPill.js +2 -0
- package/TextBlock.d.ts +2 -1
- package/TextBlock.js +3 -3
- package/TextButton.js +2 -0
- package/TextInput.d.ts +2 -2
- package/TextInput.js +3 -4
- package/Tooltip.d.ts +2 -1
- package/Tooltip.js +28 -15
- package/VSpacer.d.ts +2 -1
- package/VSpacer.js +3 -7
- package/VerticalTabsTOC.d.ts +1 -1
- package/VerticalTabsTOC.js +1 -1
- package/WizardLayout.d.ts +2 -2
- package/WizardLayout.js +4 -3
- package/WizardLayoutClose.js +2 -0
- package/WizardStepper.d.ts +2 -1
- package/WizardStepper.js +2 -2
- package/_abstract/_AbstractCarousel.d.ts +2 -2
- package/_abstract/_AbstractCarousel.js +6 -3
- package/_abstract/_Block.d.ts +2 -1
- package/_abstract/_Block.js +3 -3
- package/_abstract/_Button.js +4 -1
- package/_abstract/_CardList.d.ts +3 -1
- package/_abstract/_CardList.js +6 -3
- package/_abstract/_Image.d.ts +6 -3
- package/_abstract/_Image.js +11 -4
- package/_abstract/_Quote.d.ts +2 -1
- package/_abstract/_Quote.js +3 -2
- package/_abstract/_TogglerGroup.js +1 -1
- package/_abstract/_TogglerGroupField.js +5 -5
- package/_abstract/_TogglerInput.d.ts +2 -2
- package/_abstract/_TogglerInput.js +4 -2
- package/esm/AccordionList.d.ts +2 -2
- package/esm/AccordionList.js +3 -3
- package/esm/ActionCards.d.ts +2 -1
- package/esm/ActionCards.js +1 -1
- package/esm/Alert.d.ts +2 -2
- package/esm/Alert.js +21 -13
- package/esm/ArticleCards.d.ts +4 -1
- package/esm/ArticleCards.js +1 -1
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +1 -2
- package/esm/ArticleCarousel.d.ts +2 -2
- package/esm/ArticleCarousel.js +1 -1
- package/esm/ArticleMeta.d.ts +2 -1
- package/esm/ArticleMeta.js +2 -2
- package/esm/Attention.d.ts +2 -1
- package/esm/Attention.js +4 -1
- package/esm/BasicTable.d.ts +2 -1
- package/esm/BgBox.d.ts +2 -1
- package/esm/BgBox.js +4 -2
- package/esm/Bling.d.ts +2 -1
- package/esm/Bling.js +5 -3
- package/esm/BlockBreak.js +1 -0
- package/esm/BreadCrumbs.d.ts +2 -1
- package/esm/BreadCrumbs.js +3 -2
- package/esm/ButtonBack.js +2 -0
- package/esm/ButtonBar.d.ts +4 -3
- package/esm/ButtonBar.js +3 -3
- package/esm/ButtonPrimary.js +2 -0
- package/esm/ButtonSecondary.js +2 -0
- package/esm/ButtonTertiary.js +2 -0
- package/esm/CarouselStepper.d.ts +2 -1
- package/esm/CenterColumn.d.ts +2 -1
- package/esm/CenterColumn.js +4 -2
- package/esm/CheckboxButton.d.ts +4 -2
- package/esm/CheckboxButtonsGroup.js +2 -2
- package/esm/CityBlock.d.ts +2 -1
- package/esm/CityBlock.js +1 -1
- package/esm/ContactBubble.d.ts +2 -2
- package/esm/ContactBubble.js +5 -4
- package/esm/ContentArticle.d.ts +2 -1
- package/esm/ContentArticle.js +3 -2
- package/esm/ContentImage.d.ts +2 -1
- package/esm/ContentImage.js +4 -3
- package/esm/Datepicker.js +7 -7
- package/esm/ExtraLinks.d.ts +2 -1
- package/esm/ExtraLinks.js +4 -2
- package/esm/FeatureList.d.ts +2 -1
- package/esm/FeatureList.js +3 -2
- package/esm/FieldGroup.d.ts +2 -1
- package/esm/FieldGroup.js +4 -2
- package/esm/FileInput.d.ts +2 -2
- package/esm/FileInput.js +10 -5
- package/esm/Foonote.js +2 -2
- package/esm/Footnote.d.ts +2 -1
- package/esm/Footnote.js +2 -1
- package/esm/Form.js +5 -5
- package/esm/FormField.d.ts +25 -5
- package/esm/FormField.js +30 -6
- package/esm/Gallery/_GalleryItem.js +2 -2
- package/esm/Gallery/_GalleryModalItem.js +1 -1
- package/esm/Gallery.d.ts +2 -2
- package/esm/Gallery.js +6 -5
- package/esm/GridBlocks.d.ts +2 -5
- package/esm/GridBlocks.js +3 -3
- package/esm/Heading.d.ts +2 -1
- package/esm/Heading.js +3 -3
- package/esm/HeroBlock.d.ts +2 -1
- package/esm/HeroBlock.js +4 -3
- package/esm/IframeBlock.d.ts +9 -4
- package/esm/IframeBlock.js +13 -12
- package/esm/Illustration.d.ts +2 -1
- package/esm/Illustration.js +1 -1
- package/esm/ImageCards.d.ts +2 -1
- package/esm/ImageCards.js +2 -2
- package/esm/InfoBlock.d.ts +2 -1
- package/esm/InfoBlock.js +3 -2
- package/esm/InfoHero.d.ts +2 -1
- package/esm/InfoHero.js +3 -3
- package/esm/IslandBlock.d.ts +2 -1
- package/esm/IslandBlock.js +2 -2
- package/esm/IslandPageBlock.d.ts +2 -1
- package/esm/IslandPageBlock.js +2 -2
- package/esm/LabeledTextBlock.d.ts +2 -1
- package/esm/LabeledTextBlock.js +2 -2
- package/esm/Layout.d.ts +2 -2
- package/esm/Layout.js +3 -3
- package/esm/MainMenu.d.ts +2 -2
- package/esm/MainMenu.js +4 -3
- package/esm/MiniMetrics.d.ts +2 -1
- package/esm/MiniMetrics.js +3 -2
- package/esm/Modal.d.ts +2 -1
- package/esm/Multiselect.d.ts +11 -6
- package/esm/Multiselect.js +15 -11
- package/esm/NameCard.d.ts +2 -1
- package/esm/NameCard.js +10 -6
- package/esm/NameCards.d.ts +3 -2
- package/esm/NameCards.js +3 -2
- package/esm/NewsHero.d.ts +2 -1
- package/esm/NewsHero.js +3 -3
- package/esm/PageFilter.d.ts +2 -1
- package/esm/PageFilter.js +2 -2
- package/esm/PageHeading.d.ts +2 -1
- package/esm/PageHeading.js +2 -5
- package/esm/Picture.d.ts +2 -1
- package/esm/Picture.js +1 -5
- package/esm/ProcessOverview.d.ts +2 -1
- package/esm/ProcessOverview.js +2 -5
- package/esm/RadioButtonsGroup.js +2 -2
- package/esm/RadioGroup.js +1 -1
- package/esm/ReadSpeakerPlayer.d.ts +1 -1
- package/esm/ReadSpeakerPlayer.js +2 -2
- package/esm/RelatedLinks.d.ts +2 -1
- package/esm/RelatedLinks.js +3 -2
- package/esm/RowBlock.d.ts +2 -1
- package/esm/RowBlock.js +2 -2
- package/esm/RowBlockColumn.d.ts +2 -1
- package/esm/RowBlockColumn.js +3 -3
- package/esm/SearchInput.d.ts +3 -9
- package/esm/SearchInput.js +4 -5
- package/esm/SearchResults/_SearchResultsItem.js +1 -1
- package/esm/SearchResults.d.ts +2 -1
- package/esm/SearchResults.js +2 -2
- package/esm/SeenEffect.js +2 -0
- package/esm/Selectbox.js +3 -4
- package/esm/ShareButtons.d.ts +2 -2
- package/esm/ShareButtons.js +5 -3
- package/esm/Sharpie.d.ts +2 -1
- package/esm/Sharpie.js +2 -2
- package/esm/SiteSearchAutocomplete.d.ts +2 -1
- package/esm/SiteSearchAutocomplete.js +4 -4
- package/esm/SiteSearchCurtain.js +2 -0
- package/esm/SiteSearchInput.d.ts +3 -6
- package/esm/SiteSearchInput.js +4 -4
- package/esm/Skeleton.d.ts +4 -1
- package/esm/Skeleton.js +15 -18
- package/esm/SubHeading.d.ts +2 -1
- package/esm/SubHeading.js +3 -3
- package/esm/Tabs.d.ts +2 -2
- package/esm/Tabs.js +5 -5
- package/esm/TagPill.js +2 -0
- package/esm/TextBlock.d.ts +2 -1
- package/esm/TextBlock.js +3 -3
- package/esm/TextButton.js +2 -0
- package/esm/TextInput.d.ts +2 -2
- package/esm/TextInput.js +3 -4
- package/esm/Tooltip.d.ts +2 -1
- package/esm/Tooltip.js +28 -15
- package/esm/VSpacer.d.ts +2 -1
- package/esm/VSpacer.js +3 -7
- package/esm/VerticalTabsTOC.d.ts +1 -1
- package/esm/VerticalTabsTOC.js +1 -1
- package/esm/WizardLayout.d.ts +2 -2
- package/esm/WizardLayout.js +4 -3
- package/esm/WizardLayoutClose.js +2 -0
- package/esm/WizardStepper.d.ts +2 -1
- package/esm/WizardStepper.js +2 -2
- package/esm/_abstract/_AbstractCarousel.d.ts +2 -2
- package/esm/_abstract/_AbstractCarousel.js +6 -3
- package/esm/_abstract/_Block.d.ts +2 -1
- package/esm/_abstract/_Block.js +3 -3
- package/esm/_abstract/_Button.js +4 -1
- package/esm/_abstract/_CardList.d.ts +3 -1
- package/esm/_abstract/_CardList.js +6 -3
- package/esm/_abstract/_Image.d.ts +6 -3
- package/esm/_abstract/_Image.js +12 -5
- package/esm/_abstract/_Quote.d.ts +2 -1
- package/esm/_abstract/_Quote.js +3 -2
- package/esm/_abstract/_TogglerGroup.js +1 -1
- package/esm/_abstract/_TogglerGroupField.js +5 -5
- package/esm/_abstract/_TogglerInput.d.ts +2 -2
- package/esm/_abstract/_TogglerInput.js +4 -2
- package/esm/utils.d.ts +25 -2
- package/package.json +1 -1
- package/utils.d.ts +25 -2
package/esm/LabeledTextBlock.js
CHANGED
|
@@ -3,9 +3,9 @@ import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
|
3
3
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
4
4
|
import ButtonTertiary from './ButtonTertiary.js';
|
|
5
5
|
export const LabeledTextBlock = (props) => {
|
|
6
|
-
const { label, summary, wide, buttons = [], startSeen } = props;
|
|
6
|
+
const { label, summary, wide, buttons = [], startSeen, wrapperProps } = props;
|
|
7
7
|
const [ref] = useSeenEffect(startSeen);
|
|
8
|
-
return (React.createElement("div", { className: modifiedClass('LabeledTextBlock', wide && 'wide'), ref: ref },
|
|
8
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('LabeledTextBlock', wide && 'wide', (wrapperProps || {}).className), ref: ref }),
|
|
9
9
|
React.createElement("h2", { className: "LabeledTextBlock__label" }, label),
|
|
10
10
|
React.createElement("div", { className: "LabeledTextBlock__summary" },
|
|
11
11
|
summary,
|
package/esm/Layout.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
|
3
3
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
4
4
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
5
5
|
import { BemModifierProps } from './utils/types.js';
|
|
6
|
-
import { SSRSupportProps } from './utils.js';
|
|
6
|
+
import { SSRSupportProps, WrapperElmProps } from './utils.js';
|
|
7
7
|
export type LayoutI18n = {
|
|
8
8
|
lang?: string;
|
|
9
9
|
skipLinkLabel: string;
|
|
@@ -20,7 +20,7 @@ type LayoutProps = {
|
|
|
20
20
|
siteName?: string;
|
|
21
21
|
texts?: LayoutI18n;
|
|
22
22
|
lang?: string;
|
|
23
|
-
} & SSRSupportProps & BemModifierProps & EitherObj<{
|
|
23
|
+
} & SSRSupportProps & WrapperElmProps & BemModifierProps & EitherObj<{
|
|
24
24
|
mainChildren: ReactNode;
|
|
25
25
|
}, {
|
|
26
26
|
children: ReactNode;
|
package/esm/Layout.js
CHANGED
|
@@ -27,16 +27,16 @@ export const defaultLayoutTexts = {
|
|
|
27
27
|
};
|
|
28
28
|
export const Layout = (props) => {
|
|
29
29
|
useScrollbarWidthCSSVar();
|
|
30
|
-
const { ssr, globalAlerts, mainChildren, navChildren, footerChildren, colorTheme, children, siteName = '', logoLink = '/', } = props;
|
|
30
|
+
const { ssr, globalAlerts, mainChildren, navChildren, footerChildren, colorTheme, children, siteName = '', logoLink = '/', wrapperProps, } = props;
|
|
31
31
|
const { isMenuActive, uiState, closeMenu, toggleMenu } = useMenuToggling(ssr !== 'ssr-only');
|
|
32
32
|
const txt = getTexts(props, defaultLayoutTexts);
|
|
33
|
-
return (React.createElement("div", { className: modifiedClass('Layout', props.modifier), "data-color-theme": colorTheme },
|
|
33
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('Layout', props.modifier, (wrapperProps || {}).className), "data-color-theme": colorTheme }),
|
|
34
34
|
globalAlerts && (React.createElement("div", { className: "Layout__alerts", role: "alert" }, globalAlerts)),
|
|
35
35
|
React.createElement("div", { className: "Layout__content" },
|
|
36
36
|
React.createElement("div", { className: "Layout__header", role: "banner" },
|
|
37
37
|
React.createElement(Link, { className: "Layout__header__logo", href: logoLink },
|
|
38
38
|
' ',
|
|
39
|
-
React.createElement(Image, {
|
|
39
|
+
React.createElement(Image, { bem: undefined, inline: true, src: getAssetUrl('reykjavik-logo.svg'), altText: "Reykjav\u00EDk" }),
|
|
40
40
|
' ',
|
|
41
41
|
siteName,
|
|
42
42
|
' '),
|
package/esm/MainMenu.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Cleanup } from '@reykjavik/hanna-utils';
|
|
|
3
3
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
import { AuxilaryPanelIllustration, AuxiliaryPanelProps } from './MainMenu/_Auxiliary.js';
|
|
5
5
|
import { MegaMenuItem, MegaMenuPanel, PrimaryPanelI18n } from './MainMenu/_PrimaryPanel.js';
|
|
6
|
-
import { SSRSupportProps } from './utils.js';
|
|
6
|
+
import { SSRSupportProps, WrapperElmProps } from './utils.js';
|
|
7
7
|
export type MainMenuI18n = Cleanup<{
|
|
8
8
|
lang?: string;
|
|
9
9
|
homeLabel?: string;
|
|
@@ -63,6 +63,6 @@ export type MainMenuProps = {
|
|
|
63
63
|
activePanelId?: string;
|
|
64
64
|
texts?: MainMenuI18n;
|
|
65
65
|
lang?: string;
|
|
66
|
-
} & SSRSupportProps
|
|
66
|
+
} & SSRSupportProps & WrapperElmProps<null, 'aria-label'>;
|
|
67
67
|
export declare const MainMenu: (props: MainMenuProps) => JSX.Element | null;
|
|
68
68
|
export default MainMenu;
|
package/esm/MainMenu.js
CHANGED
|
@@ -85,12 +85,13 @@ const normalizeMenuItems = (itemsProp, megaPanels, homeLink, texts) => {
|
|
|
85
85
|
// ---------------------------------------------------------------------------
|
|
86
86
|
const emptyPanelList = [];
|
|
87
87
|
export const MainMenu = (props) => {
|
|
88
|
-
const { megaPanels = emptyPanelList, onItemClick, ssr, auxiliaryPanel } = props;
|
|
88
|
+
const { megaPanels = emptyPanelList, onItemClick, ssr, auxiliaryPanel, wrapperProps = {}, } = props;
|
|
89
89
|
const texts = getTexts(props, defaultMainMenuTexts);
|
|
90
90
|
const title = props.title || texts.title;
|
|
91
91
|
const { closeHamburgerMenu } = useHannaUIState();
|
|
92
92
|
const isBrowser = useIsBrowserSide(ssr);
|
|
93
|
-
const
|
|
93
|
+
const _menuElmRef = useRef(null);
|
|
94
|
+
const menuElmRef = wrapperProps.ref || _menuElmRef;
|
|
94
95
|
const pressedLinkRef = useRef(null);
|
|
95
96
|
const activePanelRef = useRef(null);
|
|
96
97
|
const [activePanel, _setActivePanel] = useState(() => isBrowser && findActivePanel(megaPanels, props.activePanelId));
|
|
@@ -180,7 +181,7 @@ export const MainMenu = (props) => {
|
|
|
180
181
|
closeHamburgerMenu();
|
|
181
182
|
}
|
|
182
183
|
};
|
|
183
|
-
return (React.createElement("nav", { className:
|
|
184
|
+
return (React.createElement("nav", Object.assign({}, props.wrapperProps, { className: modifiedClass('MainMenu', null, wrapperProps.className), "aria-label": title, "data-sprinkled": isBrowser, ref: menuElmRef }),
|
|
184
185
|
React.createElement("h2", { className: "MainMenu__title" }, title),
|
|
185
186
|
React.createElement("ul", { className: "MainMenu__items" }, menuItems.map((item, i) => {
|
|
186
187
|
if (item === '---') {
|
package/esm/MiniMetrics.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ButtonProps } from './_abstract/_Button.js';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { WrapperElmProps } from './utils.js';
|
|
3
4
|
export type MiniMetricsProps = {
|
|
4
5
|
text: string;
|
|
5
6
|
moreButton: ButtonProps;
|
|
6
|
-
} & SeenProp;
|
|
7
|
+
} & WrapperElmProps & SeenProp;
|
|
7
8
|
export declare const MiniMetrics: (props: MiniMetricsProps) => JSX.Element;
|
|
8
9
|
export default MiniMetrics;
|
package/esm/MiniMetrics.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
2
3
|
import { Button } from './_abstract/_Button.js';
|
|
3
4
|
import SeenEffect from './SeenEffect.js';
|
|
4
5
|
export const MiniMetrics = (props) => {
|
|
5
|
-
const { text, moreButton, startSeen } = props;
|
|
6
|
-
return (React.createElement(SeenEffect, { className:
|
|
6
|
+
const { text, moreButton, startSeen, wrapperProps } = props;
|
|
7
|
+
return (React.createElement(SeenEffect, Object.assign({}, wrapperProps, { className: modifiedClass('MiniMetrics', null, (wrapperProps || {}).className), startSeen: startSeen }),
|
|
7
8
|
React.createElement("strong", { className: "MiniMetrics__text" }, text),
|
|
8
9
|
" ",
|
|
9
10
|
'\n',
|
package/esm/Modal.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ModalProps as _ModalProps } from '@hugsmidjan/react/Modal';
|
|
3
|
+
import { MissingWrapperElmProps } from './utils.js';
|
|
3
4
|
export type ModalProps = Omit<_ModalProps, 'bem' | 'bodyWrap' | 'modifier'> & {
|
|
4
5
|
modifier?: 'w6' | 'w8' | 'w10';
|
|
5
6
|
bling?: ReactElement;
|
|
6
|
-
};
|
|
7
|
+
} & MissingWrapperElmProps;
|
|
7
8
|
export declare const Modal: (props: ModalProps) => JSX.Element;
|
|
8
9
|
export default Modal;
|
package/esm/Multiselect.d.ts
CHANGED
|
@@ -28,14 +28,18 @@ export type MultiselectProps = TogglerGroupFieldProps<string> & {
|
|
|
28
28
|
* even when the total options are fewer than
|
|
29
29
|
* `Multiselect.meta.summaryLimit`.
|
|
30
30
|
*
|
|
31
|
-
* NOTE: Using this option is generally not recommended
|
|
31
|
+
* NOTE: Using this option is generally not recommended,
|
|
32
|
+
* because the search UI (i.e. the on-screen keyboard), takes up a lot of
|
|
33
|
+
* space on mobile devices.
|
|
32
34
|
*/
|
|
33
35
|
forceSummary?: boolean;
|
|
34
36
|
/**
|
|
35
37
|
* Force the options to be searchable, even when they're
|
|
36
38
|
* fewer than `Multiselect.meta.searchableLimit`.
|
|
37
39
|
*
|
|
38
|
-
* NOTE: Using this option is generally not recommended
|
|
40
|
+
* NOTE: Using this option is generally not recommended,
|
|
41
|
+
* because the summary takes up valuable space when there are only a few
|
|
42
|
+
* items.
|
|
39
43
|
*/
|
|
40
44
|
forceSearchable?: boolean;
|
|
41
45
|
texts?: MultiselectI18n;
|
|
@@ -49,16 +53,17 @@ export declare const Multiselect: {
|
|
|
49
53
|
/**
|
|
50
54
|
* The item-count where the list becomes searchable.
|
|
51
55
|
*
|
|
52
|
-
* (The search UI
|
|
56
|
+
* (The search UI (on-screen keyboard), takes up a lot of space
|
|
53
57
|
* on mobile devices, so there's a balance that we want to strike.)
|
|
54
58
|
*/
|
|
55
|
-
searchableLimit: number;
|
|
59
|
+
readonly searchableLimit: number;
|
|
56
60
|
/**
|
|
57
61
|
* The item-count above which we display a summary of "current" values
|
|
58
62
|
* at the top of the drop-down list.
|
|
59
63
|
*
|
|
60
|
-
* (
|
|
64
|
+
* (The summary is pointless and takes up valuable space,
|
|
65
|
+
* when there are only a few items.)
|
|
61
66
|
*/
|
|
62
|
-
summaryLimit: number;
|
|
67
|
+
readonly summaryLimit: number;
|
|
63
68
|
};
|
|
64
69
|
};
|
package/esm/Multiselect.js
CHANGED
|
@@ -7,14 +7,14 @@ import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
|
7
7
|
import { FocusTrap } from './_abstract/_FocusTrap.js';
|
|
8
8
|
import { filterItems } from './Multiselect/_Multiselect.search.js';
|
|
9
9
|
import Checkbox from './Checkbox.js';
|
|
10
|
-
import FormField from './FormField.js';
|
|
10
|
+
import FormField, { getFormFieldWrapperProps } from './FormField.js';
|
|
11
11
|
import TagPill from './TagPill.js';
|
|
12
12
|
import { useMixedControlState } from './utils.js';
|
|
13
13
|
const metaData = {
|
|
14
14
|
/**
|
|
15
15
|
* The item-count where the list becomes searchable.
|
|
16
16
|
*
|
|
17
|
-
* (The search UI
|
|
17
|
+
* (The search UI (on-screen keyboard), takes up a lot of space
|
|
18
18
|
* on mobile devices, so there's a balance that we want to strike.)
|
|
19
19
|
*/
|
|
20
20
|
searchableLimit: 20,
|
|
@@ -22,10 +22,14 @@ const metaData = {
|
|
|
22
22
|
* The item-count above which we display a summary of "current" values
|
|
23
23
|
* at the top of the drop-down list.
|
|
24
24
|
*
|
|
25
|
-
* (
|
|
25
|
+
* (The summary is pointless and takes up valuable space,
|
|
26
|
+
* when there are only a few items.)
|
|
26
27
|
*/
|
|
28
|
+
// NOTE: First we tried 10, which felt way too low, now we're trying 20.
|
|
29
|
+
// Maybe the "sweet-spot" is closer to 15 ? — We'll see.
|
|
27
30
|
summaryLimit: 20,
|
|
28
31
|
};
|
|
32
|
+
// Extract the values up front, to prevent runtime changes of these values.
|
|
29
33
|
const { searchableLimit, summaryLimit } = metaData;
|
|
30
34
|
const defaultTexts = {
|
|
31
35
|
pl: {
|
|
@@ -61,7 +65,7 @@ export const Multiselect = (props) => {
|
|
|
61
65
|
const placeholderText = !values.length ? props.placeholder : undefined;
|
|
62
66
|
const texts = getTexts(props, defaultTexts);
|
|
63
67
|
const inputRef = useRef(null);
|
|
64
|
-
const
|
|
68
|
+
const inputWrapperRef = useRef(null);
|
|
65
69
|
const [activeItemIndex, setActiveItemIndex] = useState(-1);
|
|
66
70
|
const [searchQuery, setSearchQuery] = useState('');
|
|
67
71
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -69,14 +73,14 @@ export const Multiselect = (props) => {
|
|
|
69
73
|
setIsOpen((isOpen) => {
|
|
70
74
|
newIsOpen = typeof newIsOpen === 'boolean' ? newIsOpen : !isOpen;
|
|
71
75
|
if (!newIsOpen) {
|
|
72
|
-
|
|
76
|
+
inputWrapperRef.current.querySelector('.Multiselect__choices').scrollTo(0, 0);
|
|
73
77
|
setSearchQuery('');
|
|
74
78
|
setActiveItemIndex(-1);
|
|
75
79
|
}
|
|
76
80
|
return newIsOpen;
|
|
77
81
|
});
|
|
78
82
|
};
|
|
79
|
-
useOnClickOutside(
|
|
83
|
+
useOnClickOutside(inputWrapperRef, () => toggleOpen(false));
|
|
80
84
|
const options = useMemo(() => _options.map((item) => (typeof item === 'string' ? { value: item } : item)), [_options]);
|
|
81
85
|
const isSearchable = props.forceSearchable || options.length >= searchableLimit;
|
|
82
86
|
/*
|
|
@@ -164,7 +168,7 @@ export const Multiselect = (props) => {
|
|
|
164
168
|
}, [activeItemIndex, filteredOptions, isOpen, handleCheckboxSelection, inputRef]);
|
|
165
169
|
// Auto-close the dropdown when focus has left the building
|
|
166
170
|
useEffect(() => {
|
|
167
|
-
const wrapperDiv =
|
|
171
|
+
const wrapperDiv = inputWrapperRef.current;
|
|
168
172
|
if (!wrapperDiv) {
|
|
169
173
|
return;
|
|
170
174
|
}
|
|
@@ -182,14 +186,14 @@ export const Multiselect = (props) => {
|
|
|
182
186
|
}, []);
|
|
183
187
|
useEffect(() => {
|
|
184
188
|
var _a, _b;
|
|
185
|
-
(_b = (_a =
|
|
189
|
+
(_b = (_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.Multiselect__option')[activeItemIndex]) === null || _b === void 0 ? void 0 : _b.scrollIntoView({
|
|
186
190
|
behavior: 'smooth',
|
|
187
191
|
block: 'nearest',
|
|
188
192
|
});
|
|
189
193
|
}, [activeItemIndex]);
|
|
190
|
-
return (React.createElement(FormField, {
|
|
194
|
+
return (React.createElement(FormField, Object.assign({ extraClassName: modifiedClass('Multiselect', props.nowrap && 'nowrap'), group: "inputlike", filled: filled, empty: empty }, getFormFieldWrapperProps(props), { renderInput: (className, inputProps, addFocusProps, isBrowser) => {
|
|
191
195
|
const { id } = inputProps;
|
|
192
|
-
return (React.createElement("div", Object.assign({ className: modifiedClass('Multiselect__input', [isOpen && 'open'], className.input) }, addFocusProps(), { "data-sprinkled": isBrowser, ref:
|
|
196
|
+
return (React.createElement("div", Object.assign({ className: modifiedClass('Multiselect__input', [isOpen && 'open'], className.input) }, addFocusProps(), { "data-sprinkled": isBrowser, ref: inputWrapperRef }),
|
|
193
197
|
!isBrowser ? null : isSearchable ? (React.createElement("input", { className: "Multiselect__search", id: `toggler:${id}`, "aria-label": texts.search, "aria-controls": domId(), "data-expanded": isOpen || undefined, onChange: handleInputChange, onKeyDown: handleInputKeyDown, onClick: () => toggleOpen(), value: searchQuery,
|
|
194
198
|
// onFocus={handleInputFocus}
|
|
195
199
|
placeholder: placeholderText, disabled: disabled, ref: inputRef })) : (React.createElement("button", { className: "Multiselect__toggler", id: `toggler:${id}`, type: "button", "aria-label": texts.buttonShow, "aria-controls": domId(), "aria-expanded": isOpen, onClick: () => toggleOpen(), disabled: disabled,
|
|
@@ -225,7 +229,7 @@ export const Multiselect = (props) => {
|
|
|
225
229
|
} })));
|
|
226
230
|
})) : searchQuery ? (React.createElement("li", { className: "Multiselect__noresults" }, texts.noneFoundMsg)) : undefined,
|
|
227
231
|
React.createElement(FocusTrap, { Tag: "li" })))));
|
|
228
|
-
} }));
|
|
232
|
+
} })));
|
|
229
233
|
};
|
|
230
234
|
/** Configuration constants for the Multiselect components */
|
|
231
235
|
Multiselect.meta = metaData;
|
package/esm/NameCard.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WrapperElmProps } from './utils.js';
|
|
1
2
|
export type NameCardI18n = {
|
|
2
3
|
updatedLabel: string;
|
|
3
4
|
availableLabel: string;
|
|
@@ -59,6 +60,6 @@ export type NameCardProps = {
|
|
|
59
60
|
vacancy?: boolean;
|
|
60
61
|
/** @deprecated Use `contactInfo` instead (will be removed in v0.11) */
|
|
61
62
|
tel?: string | Array<string>;
|
|
62
|
-
};
|
|
63
|
+
} & WrapperElmProps;
|
|
63
64
|
export declare const NameCard: (props: NameCardProps) => JSX.Element;
|
|
64
65
|
export default NameCard;
|
package/esm/NameCard.js
CHANGED
|
@@ -36,7 +36,8 @@ const defaultTexts = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
export const NameCard = (props) => {
|
|
39
|
-
const { name, location, hours, aboutText, available = props.vacancy,
|
|
39
|
+
const { name, location, hours, aboutText, available = props.vacancy, // eslint-disable-line deprecation/deprecation
|
|
40
|
+
updated, wrapperProps, } = props;
|
|
40
41
|
const renderMeta = () => {
|
|
41
42
|
if (available == null && !updated) {
|
|
42
43
|
return;
|
|
@@ -46,8 +47,9 @@ export const NameCard = (props) => {
|
|
|
46
47
|
return (React.createElement("div", { className: "NameCard__meta" },
|
|
47
48
|
available != null && (React.createElement("span", { className: modifiedClass('NameCard__availability', available && 'available') },
|
|
48
49
|
available
|
|
49
|
-
? availableLabel || texts.vacancyLabel
|
|
50
|
-
: unavailableLabel || texts.noVacancyLabel
|
|
50
|
+
? availableLabel || texts.vacancyLabel // eslint-disable-line deprecation/deprecation
|
|
51
|
+
: unavailableLabel || texts.noVacancyLabel // eslint-disable-line deprecation/deprecation
|
|
52
|
+
,
|
|
51
53
|
' ')),
|
|
52
54
|
updated != null && (React.createElement("span", { className: "NameCard__updated" },
|
|
53
55
|
updatedLabel,
|
|
@@ -56,10 +58,12 @@ export const NameCard = (props) => {
|
|
|
56
58
|
};
|
|
57
59
|
let contactInfo = props.contactInfo;
|
|
58
60
|
if (!contactInfo) {
|
|
59
|
-
contactInfo = _telToContactInfo(props.tel) || [];
|
|
61
|
+
contactInfo = _telToContactInfo(props.tel) || []; // eslint-disable-line deprecation/deprecation
|
|
60
62
|
}
|
|
61
63
|
// Remove/map @deprecated contactinfo items
|
|
62
|
-
const cleanContactInfo = contactInfo.map(
|
|
64
|
+
const cleanContactInfo = contactInfo.map(
|
|
65
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
66
|
+
(item) => {
|
|
63
67
|
if (typeof item !== 'string' && 'value' in item) {
|
|
64
68
|
return {
|
|
65
69
|
href: item.href,
|
|
@@ -69,7 +73,7 @@ export const NameCard = (props) => {
|
|
|
69
73
|
}
|
|
70
74
|
return item;
|
|
71
75
|
});
|
|
72
|
-
return (React.createElement("div", { className:
|
|
76
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('NameCard', null, (wrapperProps || {}).className) }),
|
|
73
77
|
React.createElement("div", { className: "NameCard__name" }, name),
|
|
74
78
|
contactInfo.length > 0 && (React.createElement("p", { className: "NameCard__contactinfo" }, cleanContactInfo.map((item, i) => (React.createElement(React.Fragment, null,
|
|
75
79
|
typeof item === 'string' ? (React.createElement("span", { className: "NameCard__contactinfo__item" }, item)) : (React.createElement(Button, { key: i, bem: "NameCard__contactinfo__item", href: item.href, "aria-label": item.longLabel, title: item.longLabel }, item.label)),
|
package/esm/NameCards.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NameCardProps } from './NameCard.js';
|
|
2
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
3
|
type NameCardsProps = {
|
|
3
|
-
items: Array<NameCardProps
|
|
4
|
-
};
|
|
4
|
+
items: Array<Omit<NameCardProps, 'wrapperProps'>>;
|
|
5
|
+
} & WrapperElmProps;
|
|
5
6
|
export declare const NameCards: (props: NameCardsProps) => JSX.Element;
|
|
6
7
|
export default NameCards;
|
package/esm/NameCards.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
2
3
|
import NameCard from './NameCard.js';
|
|
3
4
|
export const NameCards = (props) => {
|
|
4
|
-
const { items } = props;
|
|
5
|
-
return (React.createElement("div", { className:
|
|
5
|
+
const { items, wrapperProps } = props;
|
|
6
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('NameCards', null, (wrapperProps || {}).className) }), items.map((item, i) => (React.createElement(NameCard, Object.assign({ key: i }, item))))));
|
|
6
7
|
};
|
|
7
8
|
export default NameCards;
|
package/esm/NewsHero.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ImageProps } from './_abstract/_Image.js';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { WrapperElmProps } from './utils.js';
|
|
3
4
|
type BlingOptions = 'interesting' | 'snake' | 'pentagon' | 'dome' | 'balls-small' | 'balls-large';
|
|
4
5
|
export type NewsHeroProps = {
|
|
5
6
|
title: string;
|
|
@@ -9,6 +10,6 @@ export type NewsHeroProps = {
|
|
|
9
10
|
sharing?: boolean | (() => JSX.Element);
|
|
10
11
|
image?: ImageProps;
|
|
11
12
|
blingType?: BlingOptions;
|
|
12
|
-
} & SeenProp;
|
|
13
|
+
} & WrapperElmProps & SeenProp;
|
|
13
14
|
export declare const NewsHero: (props: NewsHeroProps) => JSX.Element;
|
|
14
15
|
export default NewsHero;
|
package/esm/NewsHero.js
CHANGED
|
@@ -72,15 +72,15 @@ const blingOptions = {
|
|
|
72
72
|
],
|
|
73
73
|
};
|
|
74
74
|
export const NewsHero = (props) => {
|
|
75
|
-
const { title, sharing = true, meta, summary, image, blingType, startSeen } = props;
|
|
75
|
+
const { title, sharing = true, meta, summary, image, blingType, startSeen, wrapperProps, } = props;
|
|
76
76
|
const [ref] = useSeenEffect(startSeen);
|
|
77
77
|
const blings = (blingType && blingOptions[blingType]) || getStableRandomItem(blingOptions, title);
|
|
78
|
-
return (React.createElement("div", { className: modifiedClass('NewsHero', [!image && 'align--right']), ref: ref },
|
|
78
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('NewsHero', [!image && 'align--right'], (wrapperProps || {}).className), ref: ref }),
|
|
79
79
|
React.createElement("div", { className: "NewsHero__content" },
|
|
80
80
|
React.createElement("h1", { className: "NewsHero__title" }, title),
|
|
81
81
|
meta && React.createElement("span", { className: "NewsHero__meta" }, meta),
|
|
82
82
|
React.createElement("div", { className: "NewsHero__summary" }, summary),
|
|
83
83
|
sharing === true ? React.createElement(ShareButtons, null) : sharing && sharing()),
|
|
84
|
-
image ?
|
|
84
|
+
image ? React.createElement(Image, Object.assign({ bem: "NewsHero__image" }, image)) : React.createElement(Blings, { blings: blings })));
|
|
85
85
|
};
|
|
86
86
|
export default NewsHero;
|
package/esm/PageFilter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { SeenProp } from './utils/seenEffect.js';
|
|
4
|
+
import { WrapperElmProps } from './utils.js';
|
|
4
5
|
export type PageFilterProps = {
|
|
5
6
|
title: string;
|
|
6
7
|
summary?: React.ReactNode;
|
|
@@ -11,6 +12,6 @@ export type PageFilterProps = {
|
|
|
11
12
|
filters: React.ReactNode;
|
|
12
13
|
}, {
|
|
13
14
|
children: React.ReactNode;
|
|
14
|
-
}> & SeenProp;
|
|
15
|
+
}> & WrapperElmProps & SeenProp;
|
|
15
16
|
export declare const PageFilter: (props: PageFilterProps) => JSX.Element;
|
|
16
17
|
export default PageFilter;
|
package/esm/PageFilter.js
CHANGED
|
@@ -3,9 +3,9 @@ import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
|
3
3
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
4
4
|
import Footnote from './Footnote.js';
|
|
5
5
|
export const PageFilter = (props) => {
|
|
6
|
-
const { title, summary, footnote, filters, children, buttonRow, underlap, startSeen } = props;
|
|
6
|
+
const { title, summary, footnote, filters, children, buttonRow, underlap, startSeen, wrapperProps, } = props;
|
|
7
7
|
const [ref] = useSeenEffect(startSeen);
|
|
8
|
-
return (React.createElement("div", { className: modifiedClass('PageFilter', underlap && 'underlap'), ref: ref },
|
|
8
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('PageFilter', underlap && 'underlap', (wrapperProps || {}).className), ref: ref }),
|
|
9
9
|
React.createElement("h2", { className: "PageFilter__title" }, title),
|
|
10
10
|
summary && React.createElement("div", { className: "PageFilter__summary" }, summary),
|
|
11
11
|
React.createElement("div", { className: "PageFilter__filters" }, filters || children),
|
package/esm/PageHeading.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
+
import { WrapperElmProps } from './utils.js';
|
|
3
4
|
export type PageHeadingProps = {
|
|
4
5
|
Tag?: 'h1' | 'h2';
|
|
5
6
|
align?: 'right';
|
|
6
7
|
small?: boolean;
|
|
7
8
|
children: ReactNode;
|
|
8
|
-
} & SeenProp;
|
|
9
|
+
} & WrapperElmProps & SeenProp;
|
|
9
10
|
export declare const PageHeading: (props: PageHeadingProps) => JSX.Element;
|
|
10
11
|
export default PageHeading;
|
package/esm/PageHeading.js
CHANGED
|
@@ -2,11 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
4
4
|
export const PageHeading = (props) => {
|
|
5
|
-
const { Tag = 'h1', align, small, children, startSeen } = props;
|
|
5
|
+
const { Tag = 'h1', align, small, children, startSeen, wrapperProps } = props;
|
|
6
6
|
const [ref] = useSeenEffect(startSeen);
|
|
7
|
-
return (React.createElement(Tag, { className: modifiedClass('PageHeading', [
|
|
8
|
-
small && 'small',
|
|
9
|
-
align === 'right' && 'align--' + align,
|
|
10
|
-
]), ref: ref }, children));
|
|
7
|
+
return (React.createElement(Tag, Object.assign({}, wrapperProps, { className: modifiedClass('PageHeading', [small && 'small', align === 'right' && 'align--' + align], (wrapperProps || {}).className), ref: ref }), children));
|
|
11
8
|
};
|
|
12
9
|
export default PageHeading;
|
package/esm/Picture.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ImagePropsLinked } from './_abstract/_Image.js';
|
|
2
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
3
|
export type PictureProps = ImagePropsLinked & {
|
|
3
4
|
contain?: boolean;
|
|
4
5
|
className?: string;
|
|
5
|
-
};
|
|
6
|
+
} & WrapperElmProps;
|
|
6
7
|
export declare const Picture: (props: PictureProps) => JSX.Element;
|
|
7
8
|
export default Picture;
|
package/esm/Picture.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
2
|
import { Image } from './_abstract/_Image.js';
|
|
4
|
-
export const Picture = (props) => {
|
|
5
|
-
const { contain, className } = props;
|
|
6
|
-
return (React.createElement(Image, Object.assign({}, props, { className: modifiedClass('Picture', contain && 'contain', className) })));
|
|
7
|
-
};
|
|
3
|
+
export const Picture = (props) => (React.createElement(Image, Object.assign({}, props, { bem: "Picture", modifier: props.contain && 'contain' })));
|
|
8
4
|
export default Picture;
|
package/esm/ProcessOverview.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WrapperElmProps } from './utils.js';
|
|
1
2
|
export type ProcessOverviewItemProps = {
|
|
2
3
|
title: string;
|
|
3
4
|
content: string | JSX.Element;
|
|
@@ -8,6 +9,6 @@ export type ProcessOverviewProps = {
|
|
|
8
9
|
attention?: string | JSX.Element;
|
|
9
10
|
transparent?: boolean;
|
|
10
11
|
narrow?: boolean;
|
|
11
|
-
};
|
|
12
|
+
} & WrapperElmProps;
|
|
12
13
|
export declare const ProcessOverview: (props: ProcessOverviewProps) => JSX.Element;
|
|
13
14
|
export default ProcessOverview;
|
package/esm/ProcessOverview.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
export const ProcessOverview = (props) => {
|
|
4
|
-
const { title, items, attention, transparent, narrow } = props;
|
|
5
|
-
return (React.createElement("div", { className: modifiedClass('ProcessOverview', [
|
|
6
|
-
transparent && 'transparent',
|
|
7
|
-
narrow && 'narrow',
|
|
8
|
-
]) },
|
|
4
|
+
const { title, items, attention, transparent, narrow, wrapperProps } = props;
|
|
5
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('ProcessOverview', [transparent && 'transparent', narrow && 'narrow'], (wrapperProps || {}).className) }),
|
|
9
6
|
React.createElement("h2", { className: "ProcessOverview__title" }, title),
|
|
10
7
|
items.map(({ title, content }, i) => {
|
|
11
8
|
return (React.createElement("div", { key: i, className: "ProcessOverview__item" },
|
package/esm/RadioButtonsGroup.js
CHANGED
|
@@ -3,10 +3,10 @@ import { TogglerGroupField, } from './_abstract/_TogglerGroupField.js';
|
|
|
3
3
|
import { TogglerInput } from './_abstract/_TogglerInput.js';
|
|
4
4
|
const RadioButton = (props) => (React.createElement(TogglerInput, Object.assign({}, props, { bem: "RadioButton", type: "radio", innerWrap: true })));
|
|
5
5
|
export const RadioButtonsGroup = (props) => {
|
|
6
|
-
if (props.layout) {
|
|
6
|
+
if (props.layout /* eslint-disable-line deprecation/deprecation */) {
|
|
7
7
|
console.warn('`RadioButtonsGroupProps.layout` is deprecated.');
|
|
8
8
|
}
|
|
9
|
-
if (props.columns) {
|
|
9
|
+
if (props.columns /* eslint-disable-line deprecation/deprecation */) {
|
|
10
10
|
console.warn('`RadioButtonsGroupProps.columns` is deprecated.');
|
|
11
11
|
}
|
|
12
12
|
return (React.createElement(TogglerGroupField, Object.assign({}, props, { bem: "RadioButtonsGroup", Toggler: RadioButton, isRadio: true })));
|
package/esm/RadioGroup.js
CHANGED
|
@@ -4,5 +4,5 @@ import { TogglerInput } from './_abstract/_TogglerInput.js';
|
|
|
4
4
|
const Radio = (props) => React.createElement(TogglerInput, Object.assign({}, props, { bem: "Radio", type: "radio" }));
|
|
5
5
|
export const RadioGroup = (props) => (React.createElement(TogglerGroupField, Object.assign({}, props, { bem: "RadioGroup", modifier: props.layout, isRadio: true, Toggler: Radio })));
|
|
6
6
|
/** @deprecated Exposed for testing purposes only. This may disappear at any time. */
|
|
7
|
-
RadioGroup.__Radio = Radio;
|
|
7
|
+
RadioGroup.__Radio = Radio; // eslint-disable-line deprecation/deprecation
|
|
8
8
|
export default RadioGroup;
|
|
@@ -49,7 +49,7 @@ export type ReadSpeakerPlayerProps = {
|
|
|
49
49
|
/** Tooggles CSS float layout */
|
|
50
50
|
float?: boolean;
|
|
51
51
|
/** Custom HTML attributes for the wrapper element. */
|
|
52
|
-
wrapperProps?: HTMLProps
|
|
52
|
+
wrapperProps?: HTMLProps;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* Embeds a ReadSpeaker player in the page
|
package/esm/ReadSpeakerPlayer.js
CHANGED
|
@@ -15,7 +15,7 @@ export const defaultReadSpeakerPlayerTexts = {
|
|
|
15
15
|
* @see https://docs.typo3.org/p/readspeaker/readspeaker-services/main/en-us/Configuration/Index.html
|
|
16
16
|
*/
|
|
17
17
|
export const ReadSpeakerPlayer = (props) => {
|
|
18
|
-
const { align, float, customerId = '11315', lang = '', voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps
|
|
18
|
+
const { align, float, customerId = '11315', lang = '', voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps, texts, } = props;
|
|
19
19
|
const { linkText, linkLabel } = getTexts({ lang: lang.slice(0, 2), texts }, defaultReadSpeakerPlayerTexts);
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
var _a, _b;
|
|
@@ -50,7 +50,7 @@ export const ReadSpeakerPlayer = (props) => {
|
|
|
50
50
|
// or multiple different `customerId`s on the same page.
|
|
51
51
|
// If you try that, things will be weird and wonky.
|
|
52
52
|
]);
|
|
53
|
-
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('ReadSpeakerPlayer', [align === 'right' && `align-${align}`, float && 'float'], wrapperProps.className) }),
|
|
53
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('ReadSpeakerPlayer', [align === 'right' && `align-${align}`, float && 'float'], (wrapperProps || {}).className) }),
|
|
54
54
|
React.createElement("div", { id: "readspeaker_button1", className: "rs_skip rsbtn rs_preserve" },
|
|
55
55
|
React.createElement("a", { rel: "nofollow", className: "rsbtn_play", accessKey: "L", title: linkLabel || linkText, href: `https://app-eu.readspeaker.com/cgi-bin/rsent?${new URLSearchParams({
|
|
56
56
|
customerid: customerId,
|
package/esm/RelatedLinks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
3
|
declare const types: {
|
|
3
4
|
readonly external: 1;
|
|
4
5
|
readonly document: 1;
|
|
@@ -16,6 +17,6 @@ export type RelatedLinksProps = {
|
|
|
16
17
|
title?: string;
|
|
17
18
|
titleTag?: 'h2' | 'h3' | 'h4' | 'h5';
|
|
18
19
|
links: Array<RelatedLinkItem>;
|
|
19
|
-
};
|
|
20
|
+
} & WrapperElmProps;
|
|
20
21
|
export declare const RelatedLinks: (props: RelatedLinksProps) => JSX.Element | null;
|
|
21
22
|
export default RelatedLinks;
|
package/esm/RelatedLinks.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
2
3
|
import { Link } from './_abstract/_Link.js';
|
|
3
4
|
const types = {
|
|
4
5
|
external: 1,
|
|
@@ -7,12 +8,12 @@ const types = {
|
|
|
7
8
|
link: 0,
|
|
8
9
|
};
|
|
9
10
|
export const RelatedLinks = (props) => {
|
|
10
|
-
const { title, links } = props;
|
|
11
|
+
const { title, links, wrapperProps } = props;
|
|
11
12
|
if (links.length === 0) {
|
|
12
13
|
return null;
|
|
13
14
|
}
|
|
14
15
|
const TitleTag = props.titleTag || 'h3';
|
|
15
|
-
return (React.createElement("div", { className:
|
|
16
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('RelatedLinks', null, (wrapperProps || {}).className) }),
|
|
16
17
|
title && React.createElement(TitleTag, { className: "RelatedLinks__title" }, title),
|
|
17
18
|
React.createElement("ul", { className: "RelatedLinks__list" }, links.map(({ href, label, type, target }, i) => {
|
|
18
19
|
type = type && types[type] ? type : undefined;
|
package/esm/RowBlock.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
3
|
import { BemModifierProps } from './utils/types.js';
|
|
4
|
+
import { WrapperElmProps } from './utils.js';
|
|
4
5
|
export type RowBlockProps = {
|
|
5
6
|
/** Float the first RowBlockColumn to the right on larger screens. */
|
|
6
7
|
right?: boolean;
|
|
7
8
|
/** Custom **additional** class-name */
|
|
8
9
|
className?: string;
|
|
9
10
|
children: ReactNode;
|
|
10
|
-
} & BemModifierProps & SeenProp;
|
|
11
|
+
} & BemModifierProps & WrapperElmProps & SeenProp;
|
|
11
12
|
export declare const RowBlock: (props: RowBlockProps) => JSX.Element;
|
|
12
13
|
export default RowBlock;
|
package/esm/RowBlock.js
CHANGED
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
4
4
|
export const RowBlock = (props) => {
|
|
5
|
-
const { right, modifier, className, children, startSeen } = props;
|
|
5
|
+
const { right, modifier, className, children, startSeen, wrapperProps } = props;
|
|
6
6
|
const [ref] = useSeenEffect(startSeen);
|
|
7
|
-
return (React.createElement("div", { className: modifiedClass('RowBlock', [modifier, right && 'align--right'], className), ref: ref }, children));
|
|
7
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('RowBlock', [modifier, right && 'align--right'], className || (wrapperProps || {}).className), ref: ref }), children));
|
|
8
8
|
};
|
|
9
9
|
export default RowBlock;
|