@reykjavik/hanna-react 0.10.93 → 0.10.95
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 -3
- package/AccordionList.js +3 -3
- package/Alert.d.ts +2 -3
- package/Alert.js +2 -2
- package/ArticleCarousel/_ArticleCarouselCard.js +2 -2
- package/ArticleCarousel.d.ts +2 -3
- package/ArticleMeta.js +2 -2
- package/Attention.js +2 -2
- package/BasicTable.js +2 -2
- package/BgBox.js +2 -2
- package/Bling.js +2 -2
- package/ButtonBar.js +2 -2
- package/CHANGELOG.md +14 -1
- package/ContactBubble.d.ts +2 -3
- package/ContactBubble.js +2 -2
- package/Datepicker.js +2 -2
- package/ExtraLinks.js +3 -3
- package/FieldGroup.js +2 -2
- package/FileInput.js +3 -3
- package/FooterInfo.d.ts +2 -2
- package/FooterInfo.js +3 -3
- package/Form.js +2 -2
- package/FormField.d.ts +2 -3
- package/FormField.js +2 -2
- package/Gallery.d.ts +2 -3
- package/GridBlocks.js +2 -2
- package/Heading.js +2 -2
- package/IframeBlock.js +2 -2
- package/ImageCards.js +2 -2
- package/InfoHero.js +2 -2
- package/LabeledTextBlock.js +2 -2
- package/Layout.d.ts +3 -6
- package/Layout.js +7 -13
- package/MainMenu/_PrimaryPanel.js +2 -2
- package/MainMenu.d.ts +2 -3
- package/MainMenu.js +3 -3
- package/Multiselect.js +5 -5
- package/NameCard.js +2 -2
- package/NewsHero.js +2 -2
- package/PageFilter.js +2 -2
- package/PageHeading.js +2 -2
- package/Picture.js +2 -2
- package/ProcessOverview.js +2 -2
- package/ReadSpeakerPlayer.js +2 -2
- package/RowBlock.d.ts +2 -2
- package/RowBlock.js +2 -2
- package/RowBlockColumn.js +2 -2
- package/SearchInput.js +2 -2
- package/SearchResults.js +2 -2
- package/Selectbox.js +2 -2
- package/ShareButtons.d.ts +2 -3
- package/Sharpie.js +2 -2
- package/SiteSearchAutocomplete.d.ts +1 -1
- package/SiteSearchCurtain.js +2 -2
- package/SiteSearchInput.d.ts +2 -3
- package/Skeleton.js +2 -2
- package/SubHeading.js +2 -2
- package/Tabs.d.ts +2 -3
- package/Tabs.js +2 -2
- package/TagPill.js +3 -3
- package/TextBlock.js +2 -2
- package/TextInput.js +2 -2
- package/Tooltip.js +2 -2
- package/VSpacer.js +2 -2
- package/WizardLayout.d.ts +2 -3
- package/WizardLayout.js +2 -2
- package/WizardStepper.js +3 -3
- package/_abstract/_AbstractCarousel.d.ts +3 -4
- package/_abstract/_AbstractCarousel.js +2 -2
- package/_abstract/_Block.d.ts +2 -2
- package/_abstract/_Block.js +2 -2
- package/_abstract/_Button.d.ts +3 -3
- package/_abstract/_Button.js +2 -2
- package/_abstract/_Image.js +3 -3
- package/_abstract/_TogglerGroup.js +2 -2
- package/_abstract/_TogglerGroupField.d.ts +2 -2
- package/_abstract/_TogglerGroupField.js +2 -2
- package/_abstract/_TogglerInput.d.ts +2 -2
- package/_abstract/_TogglerInput.js +2 -2
- package/_mixed_export_resolution_/ReactDropzone.d.ts +3 -3
- package/_mixed_export_resolution_/ReactDropzone.js +3 -3
- package/esm/AccordionList.d.ts +2 -3
- package/esm/AccordionList.js +3 -3
- package/esm/Alert.d.ts +2 -3
- package/esm/Alert.js +2 -2
- package/esm/ArticleCarousel/_ArticleCarouselCard.js +2 -2
- package/esm/ArticleCarousel.d.ts +2 -3
- package/esm/ArticleMeta.js +2 -2
- package/esm/Attention.js +2 -2
- package/esm/BasicTable.js +2 -2
- package/esm/BgBox.js +2 -2
- package/esm/Bling.js +2 -2
- package/esm/ButtonBar.js +2 -2
- package/esm/ContactBubble.d.ts +2 -3
- package/esm/ContactBubble.js +2 -2
- package/esm/Datepicker.js +2 -2
- package/esm/ExtraLinks.js +3 -3
- package/esm/FieldGroup.js +2 -2
- package/esm/FileInput.js +3 -3
- package/esm/FooterInfo.d.ts +2 -2
- package/esm/FooterInfo.js +3 -3
- package/esm/Form.js +2 -2
- package/esm/FormField.d.ts +2 -3
- package/esm/FormField.js +2 -2
- package/esm/Gallery.d.ts +2 -3
- package/esm/GridBlocks.js +2 -2
- package/esm/Heading.js +2 -2
- package/esm/IframeBlock.js +2 -2
- package/esm/ImageCards.js +2 -2
- package/esm/InfoHero.js +2 -2
- package/esm/LabeledTextBlock.js +2 -2
- package/esm/Layout.d.ts +3 -6
- package/esm/Layout.js +7 -13
- package/esm/MainMenu/_PrimaryPanel.js +2 -2
- package/esm/MainMenu.d.ts +2 -3
- package/esm/MainMenu.js +3 -3
- package/esm/Multiselect.js +5 -5
- package/esm/NameCard.js +2 -2
- package/esm/NewsHero.js +2 -2
- package/esm/PageFilter.js +2 -2
- package/esm/PageHeading.js +2 -2
- package/esm/Picture.js +2 -2
- package/esm/ProcessOverview.js +2 -2
- package/esm/ReadSpeakerPlayer.js +2 -2
- package/esm/RowBlock.d.ts +2 -2
- package/esm/RowBlock.js +2 -2
- package/esm/RowBlockColumn.js +2 -2
- package/esm/SearchInput.js +2 -2
- package/esm/SearchResults.js +2 -2
- package/esm/Selectbox.js +2 -2
- package/esm/ShareButtons.d.ts +2 -3
- package/esm/Sharpie.js +2 -2
- package/esm/SiteSearchAutocomplete.d.ts +1 -1
- package/esm/SiteSearchCurtain.js +2 -2
- package/esm/SiteSearchInput.d.ts +2 -3
- package/esm/Skeleton.js +2 -2
- package/esm/SubHeading.js +2 -2
- package/esm/Tabs.d.ts +2 -3
- package/esm/Tabs.js +2 -2
- package/esm/TagPill.js +3 -3
- package/esm/TextBlock.js +2 -2
- package/esm/TextInput.js +2 -2
- package/esm/Tooltip.js +2 -2
- package/esm/VSpacer.js +2 -2
- package/esm/WizardLayout.d.ts +2 -3
- package/esm/WizardLayout.js +2 -2
- package/esm/WizardStepper.js +3 -3
- package/esm/_abstract/_AbstractCarousel.d.ts +3 -4
- package/esm/_abstract/_AbstractCarousel.js +2 -2
- package/esm/_abstract/_Block.d.ts +2 -2
- package/esm/_abstract/_Block.js +2 -2
- package/esm/_abstract/_Button.d.ts +3 -3
- package/esm/_abstract/_Button.js +2 -2
- package/esm/_abstract/_Image.js +3 -3
- package/esm/_abstract/_TogglerGroup.js +2 -2
- package/esm/_abstract/_TogglerGroupField.d.ts +2 -2
- package/esm/_abstract/_TogglerGroupField.js +2 -2
- package/esm/_abstract/_TogglerInput.d.ts +2 -2
- package/esm/_abstract/_TogglerInput.js +2 -2
- package/esm/_mixed_export_resolution_/ReactDropzone.d.ts +3 -3
- package/esm/_mixed_export_resolution_/ReactDropzone.js +3 -3
- package/esm/utils/HannaUIState.d.ts +3 -4
- package/esm/utils/config.d.ts +11 -1
- package/esm/utils/config.js +1 -0
- package/esm/utils/types.d.ts +12 -0
- package/esm/utils/types.js +1 -0
- package/esm/utils/useGetSVGtext.d.ts +1 -1
- package/esm/utils/useGetSVGtext.js +2 -2
- package/esm/utils/useMenuToggling.d.ts +2 -0
- package/esm/utils/useMenuToggling.js +31 -21
- package/esm/utils.d.ts +2 -1
- package/esm/utils.js +2 -1
- package/package.json +5 -4
- package/utils/HannaUIState.d.ts +3 -4
- package/utils/config.d.ts +11 -1
- package/utils/config.js +1 -0
- package/utils/types.d.ts +12 -0
- package/utils/types.js +2 -0
- package/utils/useGetSVGtext.d.ts +1 -1
- package/utils/useGetSVGtext.js +2 -2
- package/utils/useMenuToggling.d.ts +2 -0
- package/utils/useMenuToggling.js +31 -21
- package/utils.d.ts +2 -1
- package/utils.js +5 -1
package/esm/ContactBubble.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
3
|
-
import {
|
|
3
|
+
import { SSRSupportProps } from './utils.js';
|
|
4
4
|
export type ContactBubbleI18n = {
|
|
5
5
|
lang?: string;
|
|
6
6
|
openBtn: string;
|
|
@@ -47,8 +47,7 @@ export type ContactBubbleProps = {
|
|
|
47
47
|
alwaysShow?: boolean;
|
|
48
48
|
texts?: ContactBubbleI18n;
|
|
49
49
|
lang?: string;
|
|
50
|
-
|
|
51
|
-
} & ({
|
|
50
|
+
} & SSRSupportProps & ({
|
|
52
51
|
open?: boolean;
|
|
53
52
|
onToggle: (isOpen: boolean) => void;
|
|
54
53
|
} | {
|
package/esm/ContactBubble.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { focusElm } from '@hugsmidjan/qj/focusElm';
|
|
3
3
|
import { useDomid } from '@hugsmidjan/react/hooks';
|
|
4
|
-
import
|
|
4
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
5
5
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
6
6
|
import { Link } from './_abstract/_Link.js';
|
|
7
7
|
import { breakOnNL } from './_abstract/breakOnNL.js';
|
|
@@ -121,7 +121,7 @@ export const ContactBubble = (props) => {
|
|
|
121
121
|
React.createElement("ul", { className: "ContactBubble__list" }, links.map((linkInfo, i) => {
|
|
122
122
|
const { href, label, extraLabel, target, onClick } = linkInfo;
|
|
123
123
|
const icon = ensureIcon(linkInfo.icon);
|
|
124
|
-
const itemClass =
|
|
124
|
+
const itemClass = modifiedClass('ContactBubble__item', icon && 'type--' + icon);
|
|
125
125
|
const onClickHandler = (e) => {
|
|
126
126
|
if (onClick) {
|
|
127
127
|
const doPreventDefault = onClick() !== true;
|
package/esm/Datepicker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useDomid } from '@hugsmidjan/react/hooks';
|
|
3
|
-
import
|
|
3
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
4
4
|
// For more info on localization see: https://stackoverflow.com/questions/54399084/change-locale-in-react-datepicker/58306958#58306958
|
|
5
5
|
import is from 'date-fns/locale/is/index.js';
|
|
6
6
|
import pl from 'date-fns/locale/pl/index.js';
|
|
@@ -69,7 +69,7 @@ export const Datepicker = (props) => {
|
|
|
69
69
|
const txts = i18n[localeCode] || {};
|
|
70
70
|
const filled = !!value;
|
|
71
71
|
const empty = !filled && !placeholder;
|
|
72
|
-
return (React.createElement(FormField, { className:
|
|
72
|
+
return (React.createElement(FormField, { className: modifiedClass('Datepicker', [], className), ssr: ssr, label: label, small: small, assistText: assistText, hideLabel: hideLabel, invalid: invalid, required: required, reqText: reqText, disabled: disabled, readOnly: readOnly, filled: filled, empty: empty, errorMessage: errorMessage, renderInput: (className, inputProps, addFocusProps) => {
|
|
73
73
|
return (React.createElement("div", Object.assign({ className: className.input, onClick: ({ target, currentTarget }) => { var _a; return target === currentTarget && ((_a = currentTarget.querySelector('input')) === null || _a === void 0 ? void 0 : _a.focus()); }, ref: inputRef &&
|
|
74
74
|
((elm) => {
|
|
75
75
|
inputRef.current =
|
package/esm/ExtraLinks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
4
4
|
import { CardList } from './_abstract/_CardList.js';
|
|
5
5
|
import { Link } from './_abstract/_Link.js';
|
|
6
6
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
@@ -10,13 +10,13 @@ const ExtraLinks__related = (props) => {
|
|
|
10
10
|
relatedTitle && React.createElement("h3", { className: "ExtraLinks__related__title" }, relatedTitle),
|
|
11
11
|
React.createElement("ul", { className: "ExtraLinks__related__list" }, relatedLinks &&
|
|
12
12
|
relatedLinks.map(({ href, label, blank = false, type }, i) => (React.createElement("li", { className: "ExtraLinks__related__item", key: i },
|
|
13
|
-
React.createElement(Link, { className:
|
|
13
|
+
React.createElement(Link, { className: modifiedClass('ExtraLinks__related__link', type), href: href, target: blank ? '_blank' : '', rel: blank ? 'noreferrer noopener' : '' }, label)))))));
|
|
14
14
|
};
|
|
15
15
|
export const ExtraLinks = (props) => {
|
|
16
16
|
const { relatedTitle, relatedLinks, className, startSeen } = props, cardListProps = __rest(props, ["relatedTitle", "relatedLinks", "className", "startSeen"]);
|
|
17
17
|
const hasRelated = !!(relatedLinks && relatedLinks.length);
|
|
18
18
|
const [ref] = useSeenEffect(startSeen);
|
|
19
|
-
return (React.createElement("div", { className:
|
|
19
|
+
return (React.createElement("div", { className: modifiedClass('ExtraLinks', hasRelated && 'related', className), ref: ref },
|
|
20
20
|
React.createElement("div", { className: "ExtraLinks__main" },
|
|
21
21
|
React.createElement(CardList, Object.assign({}, cardListProps, { bemPrefix: "ExtraLinks" }))),
|
|
22
22
|
hasRelated && (React.createElement(ExtraLinks__related, { relatedTitle: relatedTitle, relatedLinks: relatedLinks }))));
|
package/esm/FieldGroup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
export const FieldGroup = (props) => {
|
|
4
4
|
const { legend, children, className, disabled, small } = props;
|
|
5
|
-
return (React.createElement("fieldset", { className:
|
|
5
|
+
return (React.createElement("fieldset", { className: modifiedClass('FieldGroup', small && 'small', className), disabled: disabled },
|
|
6
6
|
React.createElement("legend", { className: "FieldGroup__legend" }, legend),
|
|
7
7
|
children));
|
|
8
8
|
};
|
package/esm/FileInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
4
|
import { useDomid } from '@hugsmidjan/react/hooks';
|
|
4
|
-
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
5
5
|
import { DEFAULT_LANG } from '@reykjavik/hanna-utils/i18n';
|
|
6
6
|
import { useDropzone } from './_mixed_export_resolution_/ReactDropzone.js';
|
|
7
7
|
import { addPreview, formatBytes, getFileListUpdate, releasePreview, } from './FileInput/_FileInput.utils.js';
|
|
@@ -101,7 +101,7 @@ export const FileInput = (props) => {
|
|
|
101
101
|
}
|
|
102
102
|
onFilesUpdated(fileList, diff);
|
|
103
103
|
};
|
|
104
|
-
return (React.createElement(FormField, { className:
|
|
104
|
+
return (React.createElement(FormField, { className: modifiedClass('FileInput', [multiple && 'multi'], className), label: label, id: domid + '-fake', LabelTag: "h4", assistText: assistText, hideLabel: hideLabel, disabled: disabled, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, renderInput: (className, inputProps /* , addFocusProps */) => {
|
|
105
105
|
return (React.createElement("div", { className: className.control, ref: fileInputWrapper },
|
|
106
106
|
// Explicitly skip rendering of input element if no
|
|
107
107
|
// name prop is provided. This is implicitly what the
|
|
@@ -115,7 +115,7 @@ export const FileInput = (props) => {
|
|
|
115
115
|
// it's contents are wiped on every "add" action.
|
|
116
116
|
className: "FileInput__input--fake" }, getInputProps(), { tabIndex: undefined, style: undefined, multiple: multiple || undefined }, inputProps, { required: undefined })),
|
|
117
117
|
' ',
|
|
118
|
-
React.createElement("div", Object.assign({ className:
|
|
118
|
+
React.createElement("div", Object.assign({ className: modifiedClass('FileInput__dropzone', [isHover && 'highlight']) }, getRootProps({ isDragReject }), { tabIndex: undefined }),
|
|
119
119
|
React.createElement("p", { className: "FileInput__droptext" }, dropzoneText)),
|
|
120
120
|
FileList && (React.createElement(FileList, Object.assign({}, {
|
|
121
121
|
files,
|
package/esm/FooterInfo.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BemModifierProps } from './utils/types.js';
|
|
2
2
|
export type FooterInfoGroup = {
|
|
3
3
|
title: string;
|
|
4
4
|
modifier?: string;
|
|
5
5
|
main?: boolean;
|
|
6
6
|
/** @deprecated (Will be removed in v0.11) */
|
|
7
7
|
role?: JSX.IntrinsicElements['div']['role'];
|
|
8
|
-
} &
|
|
8
|
+
} & BemModifierProps & ({
|
|
9
9
|
content: JSX.Element;
|
|
10
10
|
html?: undefined;
|
|
11
11
|
} | {
|
package/esm/FooterInfo.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
export const FooterInfo = (props) => {
|
|
4
4
|
const { boxes } = props;
|
|
5
|
-
return (React.createElement("div", { className: "FooterInfo" }, boxes.map((group, i) => (React.createElement("div", { className:
|
|
5
|
+
return (React.createElement("div", { className: "FooterInfo" }, boxes.map((group, i) => (React.createElement("div", { className: modifiedClass('FooterInfo__group', [
|
|
6
6
|
group.main && 'main',
|
|
7
7
|
group.modifier,
|
|
8
8
|
]), key: i },
|
|
9
9
|
React.createElement("h3", { className: "FooterInfo__grouptitle" }, group.title),
|
|
10
|
-
group.content ? (React.createElement("div", { className:
|
|
10
|
+
group.content ? (React.createElement("div", { className: modifiedClass('FooterInfo__groupcontent', group.modifier) }, group.content)) : (React.createElement("div", { className: modifiedClass('FooterInfo__groupcontent', group.modifier), dangerouslySetInnerHTML: { __html: group.html } })))))));
|
|
11
11
|
};
|
|
12
12
|
export default FooterInfo;
|
package/esm/Form.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
export const Form = (props) => {
|
|
4
4
|
const { children, align, wide } = props;
|
|
5
|
-
return (React.createElement("form", Object.assign({}, props, { className:
|
|
5
|
+
return (React.createElement("form", Object.assign({}, props, { className: modifiedClass('Form', [
|
|
6
6
|
align === 'right' && 'align--' + align,
|
|
7
7
|
!align && wide && 'wide',
|
|
8
8
|
]) }), children));
|
package/esm/FormField.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SSRSupportProps } from './utils.js';
|
|
3
3
|
type InputClassNames = {
|
|
4
4
|
/** Basic/raw FormField BEM name */
|
|
5
5
|
bem: string;
|
|
@@ -51,8 +51,7 @@ export type FormFieldWrappingProps = {
|
|
|
51
51
|
id?: string;
|
|
52
52
|
/** Ref object pointing to the outermost `.FormField` element */
|
|
53
53
|
wrapperRef?: RefObject<HTMLElement>;
|
|
54
|
-
|
|
55
|
-
};
|
|
54
|
+
} & SSRSupportProps;
|
|
56
55
|
/**
|
|
57
56
|
* Mixin base props type for components using `FormField` to contain
|
|
58
57
|
* more complex multi-element, grouped choices, that require a Heading
|
package/esm/FormField.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { useDomid } from '@hugsmidjan/react/hooks';
|
|
3
|
-
import
|
|
3
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
4
4
|
import { isPreact } from './utils/env.js';
|
|
5
5
|
import { useIsBrowserSide } from './utils.js';
|
|
6
6
|
const inputClassNames = {
|
|
@@ -63,7 +63,7 @@ export const FormField = (props) => {
|
|
|
63
63
|
'aria-describedby': assistTextId && errorId ? assistTextId + ' ' + errorId : assistTextId || errorId,
|
|
64
64
|
'aria-labelledby': labelId, // undefined if normalLabel
|
|
65
65
|
};
|
|
66
|
-
return (React.createElement("div", { className:
|
|
66
|
+
return (React.createElement("div", { className: modifiedClass('FormField', [
|
|
67
67
|
small && 'small',
|
|
68
68
|
hideLabel && 'nolabel',
|
|
69
69
|
isInvalid && 'invalid',
|
package/esm/Gallery.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GalleryItemProps } from './Gallery/_GalleryItem.js';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
|
-
import {
|
|
3
|
+
import { SSRSupportProps } from './utils.js';
|
|
4
4
|
export type { GalleryItemProps } from './Gallery/_GalleryItem.js';
|
|
5
5
|
export type GalleryI18n = {
|
|
6
6
|
modalNextLabel: string;
|
|
@@ -11,7 +11,6 @@ export type GalleryProps = {
|
|
|
11
11
|
items: Array<GalleryItemProps>;
|
|
12
12
|
texts?: GalleryI18n;
|
|
13
13
|
lang?: string;
|
|
14
|
-
|
|
15
|
-
} & SeenProp;
|
|
14
|
+
} & SSRSupportProps & SeenProp;
|
|
16
15
|
export declare const Gallery: (props: GalleryProps) => JSX.Element;
|
|
17
16
|
export default Gallery;
|
package/esm/GridBlocks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { getEfnistaknUrl } from '@reykjavik/hanna-utils/assets';
|
|
4
4
|
import { Image } from './_abstract/_Image.js';
|
|
5
5
|
import { Link } from './_abstract/_Link.js';
|
|
@@ -8,7 +8,7 @@ import ButtonTertiary from './ButtonTertiary.js';
|
|
|
8
8
|
export const GridBlocks = (props) => {
|
|
9
9
|
const { blocks, twocol, startSeen } = props;
|
|
10
10
|
const [ref] = useSeenEffect(startSeen);
|
|
11
|
-
return (React.createElement("div", { className:
|
|
11
|
+
return (React.createElement("div", { className: modifiedClass('GridBlocks', [twocol && 'twocol']), ref: ref }, blocks.map(({ title, summary, href, links = [], icon, image }, i) => {
|
|
12
12
|
const imageProps = icon ? { src: getEfnistaknUrl(icon) } : image;
|
|
13
13
|
return (React.createElement("div", { key: i, className: "GridBlocks__item" },
|
|
14
14
|
imageProps && React.createElement(Image, Object.assign({ className: "GridBlocks__illustration" }, imageProps)),
|
package/esm/Heading.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
const sizes = {
|
|
4
4
|
small: 'small',
|
|
5
5
|
/** Default value */
|
|
@@ -10,7 +10,7 @@ export const Heading = (props) => {
|
|
|
10
10
|
const { size = 'normal', align, wide, children } = props;
|
|
11
11
|
const Tag = props.Tag || (props.forceH1 ? 'h1' : 'h2');
|
|
12
12
|
const suppressWarning = process.env.NODE_ENV !== 'production' && Tag === 'h1' ? true : undefined;
|
|
13
|
-
return (React.createElement(Tag, { "data-dev-forcedh1": suppressWarning, className:
|
|
13
|
+
return (React.createElement(Tag, { "data-dev-forcedh1": suppressWarning, className: modifiedClass('Heading', [
|
|
14
14
|
sizes[size],
|
|
15
15
|
align === 'right' && 'align--' + align,
|
|
16
16
|
!align && wide && 'wide',
|
package/esm/IframeBlock.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import IframeResizer from 'iframe-resizer-react';
|
|
4
4
|
/**
|
|
5
5
|
* When `height` is undefined or "auto", then Add the following code-snipped to the iframed page:
|
|
@@ -11,7 +11,7 @@ import IframeResizer from 'iframe-resizer-react';
|
|
|
11
11
|
*/
|
|
12
12
|
export const IframeBlock = (props) => {
|
|
13
13
|
const { title, src, framed, compact, scrolling, height = 'auto', align, checkOrigin = false, } = props;
|
|
14
|
-
const className =
|
|
14
|
+
const className = modifiedClass('IframeBlock', [
|
|
15
15
|
framed && 'framed',
|
|
16
16
|
compact && 'compact',
|
|
17
17
|
align === 'right' && 'align--' + align,
|
package/esm/ImageCards.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
4
4
|
import { CardList, } from './_abstract/_CardList.js';
|
|
5
5
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
6
6
|
export const ImageCards = (props) => {
|
|
7
7
|
const { background, startSeen } = props, cardListProps = __rest(props, ["background", "startSeen"]);
|
|
8
8
|
const [ref] = useSeenEffect(startSeen);
|
|
9
|
-
return (React.createElement("div", { className:
|
|
9
|
+
return (React.createElement("div", { className: modifiedClass('ImageCards', background && 'background'), ref: ref },
|
|
10
10
|
React.createElement(CardList, Object.assign({}, cardListProps, { bemPrefix: "ImageCards", imgPlaceholder: props.imgPlaceholder || true }))));
|
|
11
11
|
};
|
|
12
12
|
export default ImageCards;
|
package/esm/InfoHero.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { Blings } from './_abstract/_Blings.js';
|
|
4
4
|
import { Image } from './_abstract/_Image.js';
|
|
5
5
|
import { breakOnNL } from './_abstract/breakOnNL.js';
|
|
@@ -69,7 +69,7 @@ export const InfoHero = (props) => {
|
|
|
69
69
|
const alignment = align && aligns[align] ? align : 'right';
|
|
70
70
|
const blings = (blingType && blingOptions[blingType]) ||
|
|
71
71
|
blingOptions.waves; // default to `waves`
|
|
72
|
-
return (React.createElement("div", { className:
|
|
72
|
+
return (React.createElement("div", { className: modifiedClass('InfoHero', 'align--' + alignment) },
|
|
73
73
|
React.createElement("div", { className: "InfoHero__content" },
|
|
74
74
|
React.createElement("h1", { className: "InfoHero__title" }, title),
|
|
75
75
|
titleBlurb && React.createElement("div", { className: "InfoHero__titleblurb" }, titleBlurb),
|
package/esm/LabeledTextBlock.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
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
6
|
const { label, summary, wide, buttons = [], startSeen } = props;
|
|
7
7
|
const [ref] = useSeenEffect(startSeen);
|
|
8
|
-
return (React.createElement("div", { className:
|
|
8
|
+
return (React.createElement("div", { className: modifiedClass('LabeledTextBlock', wide && 'wide'), 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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
3
2
|
import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
4
3
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
5
4
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
6
|
-
import {
|
|
5
|
+
import { BemModifierProps } from './utils/types.js';
|
|
6
|
+
import { SSRSupportProps } from './utils.js';
|
|
7
7
|
export type LayoutI18n = {
|
|
8
8
|
lang?: string;
|
|
9
9
|
skipLinkLabel: string;
|
|
@@ -13,17 +13,14 @@ export type LayoutI18n = {
|
|
|
13
13
|
export declare const defaultLayoutTexts: DefaultTexts<LayoutI18n>;
|
|
14
14
|
type LayoutProps = {
|
|
15
15
|
globalAlerts?: ReactNode;
|
|
16
|
-
mainChildren?: ReactNode;
|
|
17
16
|
navChildren?: ReactNode;
|
|
18
17
|
footerChildren?: ReactNode;
|
|
19
18
|
colorTheme?: HannaColorTheme;
|
|
20
19
|
logoLink?: string;
|
|
21
20
|
siteName?: string;
|
|
22
|
-
modifier?: BemPropsModifier['modifier'];
|
|
23
|
-
ssr?: SSRSupport;
|
|
24
21
|
texts?: LayoutI18n;
|
|
25
22
|
lang?: string;
|
|
26
|
-
} & EitherObj<{
|
|
23
|
+
} & SSRSupportProps & BemModifierProps & EitherObj<{
|
|
27
24
|
mainChildren: ReactNode;
|
|
28
25
|
}, {
|
|
29
26
|
children: ReactNode;
|
package/esm/Layout.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { getAssetUrl } from '@reykjavik/hanna-utils/assets';
|
|
4
4
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
5
5
|
import { Image } from './_abstract/_Image.js';
|
|
6
6
|
import { Link } from './_abstract/_Link.js';
|
|
7
|
-
import { HannaUIState } from './utils
|
|
8
|
-
import { useMenuToggling } from './utils/useMenuToggling.js';
|
|
9
|
-
import { useScrollbarWidthCSSVar } from './utils/useScrollbarWidthCSSVar.js';
|
|
10
|
-
import { useIsBrowserSide } from './utils.js';
|
|
7
|
+
import { HannaUIState, useIsBrowserSide, useMenuToggling, useScrollbarWidthCSSVar, } from './utils.js';
|
|
11
8
|
export const defaultLayoutTexts = {
|
|
12
9
|
is: {
|
|
13
10
|
lang: 'is',
|
|
@@ -24,17 +21,17 @@ export const defaultLayoutTexts = {
|
|
|
24
21
|
};
|
|
25
22
|
export const Layout = (props) => {
|
|
26
23
|
useScrollbarWidthCSSVar();
|
|
27
|
-
const { ssr, globalAlerts, mainChildren, navChildren, footerChildren, colorTheme, children, siteName = '
|
|
28
|
-
const { isMenuActive,
|
|
24
|
+
const { ssr, globalAlerts, mainChildren, navChildren, footerChildren, colorTheme, children, siteName = '', logoLink = '/', } = props;
|
|
25
|
+
const { isMenuActive, uiState, closeMenu, toggleMenu } = useMenuToggling(ssr !== 'ssr-only');
|
|
29
26
|
const isBrowser = useIsBrowserSide( /* ssr */);
|
|
30
27
|
const txt = getTexts(props, defaultLayoutTexts);
|
|
31
|
-
return (React.createElement("div", { className:
|
|
28
|
+
return (React.createElement("div", { className: modifiedClass('Layout', props.modifier), "data-sprinkled": isBrowser, "data-color-theme": colorTheme },
|
|
32
29
|
globalAlerts && (React.createElement("div", { className: "Layout__alerts", role: "alert" }, globalAlerts)),
|
|
33
30
|
React.createElement("div", { className: "Layout__content" },
|
|
34
31
|
React.createElement("div", { className: "Layout__header", role: "banner" },
|
|
35
32
|
React.createElement(Link, { className: "Layout__header__logo", href: logoLink },
|
|
36
33
|
' ',
|
|
37
|
-
React.createElement(Image, { className: undefined, inline: true, src: getAssetUrl('reykjavik-logo.svg') }),
|
|
34
|
+
React.createElement(Image, { className: undefined, inline: true, src: getAssetUrl('reykjavik-logo.svg'), altText: "Reykjav\u00EDk" }),
|
|
38
35
|
' ',
|
|
39
36
|
siteName,
|
|
40
37
|
' '),
|
|
@@ -46,10 +43,7 @@ export const Layout = (props) => {
|
|
|
46
43
|
}), "aria-label": txt.skipLinkLabel }, txt.skipLinkLabel))),
|
|
47
44
|
React.createElement("div", { className: "Layout__main", role: "main" }, mainChildren || children),
|
|
48
45
|
navChildren && (React.createElement("div", { className: "Layout__nav", id: "pagenav", role: "navigation" },
|
|
49
|
-
React.createElement(HannaUIState, { value:
|
|
50
|
-
closeHamburgerMenu: closeMenu,
|
|
51
|
-
isHamburgerMenuOpen: isMenuOpen,
|
|
52
|
-
} }, navChildren),
|
|
46
|
+
React.createElement(HannaUIState, { value: uiState }, navChildren),
|
|
53
47
|
isMenuActive && (React.createElement("button", { className: "Layout__nav__closebutton", onClick: closeMenu, "aria-label": txt.closeMenuLabelLong, type: "button" }, txt.closeMenuLabel)))),
|
|
54
48
|
React.createElement("div", { className: "Layout__footer", role: "complementary" }, footerChildren))));
|
|
55
49
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { Link } from '../_abstract/_Link.js';
|
|
4
4
|
export const PrimaryPanel = (props) => {
|
|
5
5
|
const { setActivePanel, panel, isParent, isActive, isBrowser, texts } = props;
|
|
6
6
|
const { items } = panel;
|
|
7
|
-
return (React.createElement("li", { ref: isActive ? props.activeRef : undefined, className:
|
|
7
|
+
return (React.createElement("li", { ref: isActive ? props.activeRef : undefined, className: modifiedClass('PrimaryPanel', [
|
|
8
8
|
isParent && 'parent',
|
|
9
9
|
isActive && 'active',
|
|
10
10
|
items.length > 5 && 'twocol', // TODO: allow setting twocol manually?
|
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 {
|
|
6
|
+
import { SSRSupportProps } from './utils.js';
|
|
7
7
|
export type MainMenuI18n = Cleanup<{
|
|
8
8
|
lang?: string;
|
|
9
9
|
homeLabel?: string;
|
|
@@ -58,7 +58,6 @@ export type MainMenuProps = {
|
|
|
58
58
|
activePanelId?: string;
|
|
59
59
|
texts?: MainMenuI18n;
|
|
60
60
|
lang?: string;
|
|
61
|
-
|
|
62
|
-
};
|
|
61
|
+
} & SSRSupportProps;
|
|
63
62
|
export declare const MainMenu: (props: MainMenuProps) => JSX.Element | null;
|
|
64
63
|
export default MainMenu;
|
package/esm/MainMenu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
2
3
|
import { focusElm } from '@hugsmidjan/qj/focusElm';
|
|
3
4
|
import useShortState from '@hugsmidjan/react/hooks/useShortState';
|
|
4
|
-
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
5
5
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
6
6
|
import { Link } from './_abstract/_Link.js';
|
|
7
7
|
import { AuxiliaryPanel, } from './MainMenu/_Auxiliary.js';
|
|
@@ -184,7 +184,7 @@ export const MainMenu = (props) => {
|
|
|
184
184
|
}
|
|
185
185
|
const { label, labelLong, lang, controlsId, onClick } = item;
|
|
186
186
|
const pressed = (activePanel && controlsId === activePanel.id) || undefined;
|
|
187
|
-
return (React.createElement("li", { key: i, className:
|
|
187
|
+
return (React.createElement("li", { key: i, className: modifiedClass('MainMenu__item', item.modifier), "aria-current": item.current || undefined }, onClick || (!!item.megaPanel && (isBrowser || !item.href)) ? (
|
|
188
188
|
// only print script-driven buttons in the browser
|
|
189
189
|
React.createElement("button", { className: "MainMenu__link", onClick: () => {
|
|
190
190
|
const keepOpen1 = onClick && onClick(i, item) === false;
|
|
@@ -205,7 +205,7 @@ export const MainMenu = (props) => {
|
|
|
205
205
|
));
|
|
206
206
|
})),
|
|
207
207
|
'\n\n',
|
|
208
|
-
megaPanels.length > 0 && (React.createElement("div", { className:
|
|
208
|
+
megaPanels.length > 0 && (React.createElement("div", { className: modifiedClass('MainMenu__panelsWrap', [activePanel && 'active']) },
|
|
209
209
|
React.createElement("ul", { className: "MainMenu__panels", onClick: handleMegaPanelClicks },
|
|
210
210
|
megaPanels.map((panel, i) => {
|
|
211
211
|
if (!panel.items.length) {
|
package/esm/Multiselect.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
2
3
|
import domId from '@hugsmidjan/qj/domid';
|
|
3
4
|
import { useDomid, useOnClickOutside } from '@hugsmidjan/react/hooks';
|
|
4
|
-
import getBemClass from '@hugsmidjan/react/utils/getBemClass';
|
|
5
5
|
import { notNully } from '@reykjavik/hanna-utils';
|
|
6
6
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
7
7
|
import { FocusTrap } from './_abstract/_FocusTrap.js';
|
|
@@ -24,7 +24,7 @@ const metaData = {
|
|
|
24
24
|
*
|
|
25
25
|
* (This summary just gets in the way with ultra short option lists.)
|
|
26
26
|
*/
|
|
27
|
-
summaryLimit:
|
|
27
|
+
summaryLimit: 20,
|
|
28
28
|
};
|
|
29
29
|
const { searchableLimit, summaryLimit } = metaData;
|
|
30
30
|
const defaultTexts = {
|
|
@@ -187,9 +187,9 @@ export const Multiselect = (props) => {
|
|
|
187
187
|
block: 'nearest',
|
|
188
188
|
});
|
|
189
189
|
}, [activeItemIndex]);
|
|
190
|
-
return (React.createElement(FormField, { className:
|
|
190
|
+
return (React.createElement(FormField, { className: modifiedClass('Multiselect', props.nowrap && 'nowrap', props.className), ssr: props.ssr, group: "inputlike", label: props.label, LabelTag: props.LabelTag, hideLabel: props.hideLabel, small: props.small, filled: filled, empty: empty, disabled: disabled, invalid: props.invalid, errorMessage: props.errorMessage, assistText: props.assistText, readOnly: readOnly, required: props.required, reqText: props.reqText, id: props.id, renderInput: (className, inputProps, addFocusProps, isBrowser) => {
|
|
191
191
|
const { id } = inputProps;
|
|
192
|
-
return (React.createElement("div", Object.assign({ className:
|
|
192
|
+
return (React.createElement("div", Object.assign({ className: modifiedClass('Multiselect__input', [isOpen && 'open'], className.input) }, addFocusProps(), { "data-sprinkled": isBrowser, ref: wrapperRef }),
|
|
193
193
|
!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
194
|
// onFocus={handleInputFocus}
|
|
195
195
|
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,
|
|
@@ -220,7 +220,7 @@ export const Multiselect = (props) => {
|
|
|
220
220
|
? item.disabled
|
|
221
221
|
: disableds && disableds.includes(idx);
|
|
222
222
|
const isChecked = values.includes(item.value);
|
|
223
|
-
return (React.createElement(Checkbox, Object.assign({ key: idx, className:
|
|
223
|
+
return (React.createElement(Checkbox, Object.assign({ key: idx, className: modifiedClass('Multiselect__option', activeItemIndex === idx && 'focused'), disabled: isDisabled, readOnly: readOnly, required: props.required, Wrapper: "li", name: name }, item, { checked: isChecked, "aria-invalid": props.invalid, label: item.label || item.value, onChange: () => handleCheckboxSelection(item), onFocus: () => setActiveItemIndex(idx), wrapperProps: {
|
|
224
224
|
onMouseEnter: () => setActiveItemIndex(idx),
|
|
225
225
|
} })));
|
|
226
226
|
})) : searchQuery ? (React.createElement("li", { className: "Multiselect__noresults" }, texts.noneFoundMsg)) : undefined,
|
package/esm/NameCard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
import { Button } from './_abstract/_Button.js';
|
|
5
5
|
import { breakOnNL } from './_abstract/breakOnNL.js';
|
|
@@ -44,7 +44,7 @@ export const NameCard = (props) => {
|
|
|
44
44
|
const texts = getTexts(props, defaultTexts);
|
|
45
45
|
const { updatedLabel, availableLabel, unavailableLabel } = texts;
|
|
46
46
|
return (React.createElement("div", { className: "NameCard__meta" },
|
|
47
|
-
available != null && (React.createElement("span", { className:
|
|
47
|
+
available != null && (React.createElement("span", { className: modifiedClass('NameCard__availability', available && 'available') },
|
|
48
48
|
available
|
|
49
49
|
? availableLabel || texts.vacancyLabel
|
|
50
50
|
: unavailableLabel || texts.noVacancyLabel,
|
package/esm/NewsHero.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { getStableRandomItem } from '@reykjavik/hanna-utils';
|
|
4
4
|
import { Blings } from './_abstract/_Blings.js';
|
|
5
5
|
import { Image } from './_abstract/_Image.js';
|
|
@@ -75,7 +75,7 @@ export const NewsHero = (props) => {
|
|
|
75
75
|
const { title, sharing = true, meta, summary, image, blingType, startSeen } = props;
|
|
76
76
|
const [ref] = useSeenEffect(startSeen);
|
|
77
77
|
const blings = (blingType && blingOptions[blingType]) || getStableRandomItem(blingOptions, title);
|
|
78
|
-
return (React.createElement("div", { className:
|
|
78
|
+
return (React.createElement("div", { className: modifiedClass('NewsHero', [!image && 'align--right']), 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),
|
package/esm/PageFilter.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
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
6
|
const { title, summary, footnote, filters, children, buttonRow, underlap, startSeen } = props;
|
|
7
7
|
const [ref] = useSeenEffect(startSeen);
|
|
8
|
-
return (React.createElement("div", { className:
|
|
8
|
+
return (React.createElement("div", { className: modifiedClass('PageFilter', underlap && 'underlap'), 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.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { useSeenEffect } from './utils/seenEffect.js';
|
|
4
4
|
export const PageHeading = (props) => {
|
|
5
5
|
const { Tag = 'h1', align, small, children, startSeen } = props;
|
|
6
6
|
const [ref] = useSeenEffect(startSeen);
|
|
7
|
-
return (React.createElement(Tag, { className:
|
|
7
|
+
return (React.createElement(Tag, { className: modifiedClass('PageHeading', [
|
|
8
8
|
small && 'small',
|
|
9
9
|
align === 'right' && 'align--' + align,
|
|
10
10
|
]), ref: ref }, children));
|
package/esm/Picture.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { Image } from './_abstract/_Image.js';
|
|
4
4
|
export const Picture = (props) => {
|
|
5
5
|
const { contain, className } = props;
|
|
6
|
-
return (React.createElement(Image, Object.assign({}, props, { className:
|
|
6
|
+
return (React.createElement(Image, Object.assign({}, props, { className: modifiedClass('Picture', contain && 'contain', className) })));
|
|
7
7
|
};
|
|
8
8
|
export default Picture;
|
package/esm/ProcessOverview.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
export const ProcessOverview = (props) => {
|
|
4
4
|
const { title, items, attention, transparent, narrow } = props;
|
|
5
|
-
return (React.createElement("div", { className:
|
|
5
|
+
return (React.createElement("div", { className: modifiedClass('ProcessOverview', [
|
|
6
6
|
transparent && 'transparent',
|
|
7
7
|
narrow && 'narrow',
|
|
8
8
|
]) },
|
package/esm/ReadSpeakerPlayer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
3
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
const scriptTagId = 'rs_req_Init';
|
|
5
5
|
const scriptTagSelector = `script#${scriptTagId}`;
|
|
@@ -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:
|
|
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,
|