@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
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Autosuggest, { RenderSuggestion } from 'react-autosuggest';
|
|
3
3
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
import { BemProps } from './utils/types.js';
|
|
5
|
+
import { WrapperElmProps } from './utils.js';
|
|
5
6
|
export type SiteSearchACI18n = {
|
|
6
7
|
lang?: string;
|
|
7
8
|
/** Label for the autocomplete's combobox container div */
|
|
@@ -35,6 +36,6 @@ export type SiteSearchAutocompleteProps<T> = {
|
|
|
35
36
|
texts?: SiteSearchACI18n;
|
|
36
37
|
/** @deprecated Use `text` prop instead (will be removed in v0.11) */
|
|
37
38
|
label?: string;
|
|
38
|
-
} & BemProps;
|
|
39
|
+
} & BemProps & WrapperElmProps;
|
|
39
40
|
export declare const SiteSearchAutocomplete: <T>(props: SiteSearchAutocompleteProps<T>) => JSX.Element;
|
|
40
41
|
export default SiteSearchAutocomplete;
|
|
@@ -23,7 +23,7 @@ exports.defaultSiteSearchACTexts = {
|
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
const SiteSearchAutocomplete = (props) => {
|
|
26
|
-
const { suggestions, setSuggestions, renderSuggestion, getSuggestionValue, onSuggestionsFetchRequested, onSuggestionSelected, onSuggestionHighlighted, onSubmit, onButtonClick = onSubmit, bem = 'SiteSearchAutocomplete', } = props;
|
|
26
|
+
const { suggestions, setSuggestions, renderSuggestion, getSuggestionValue, onSuggestionsFetchRequested, onSuggestionSelected, onSuggestionHighlighted, onSubmit, onButtonClick = onSubmit, bem = 'SiteSearchAutocomplete', wrapperProps, } = props;
|
|
27
27
|
const [value, setValue] = (0, react_1.useState)('');
|
|
28
28
|
const inputRef = (0, react_1.createRef)();
|
|
29
29
|
const txt = (0, i18n_1.getTexts)(props, exports.defaultSiteSearchACTexts);
|
|
@@ -43,9 +43,9 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
43
43
|
},
|
|
44
44
|
}, renderInputComponent: (inputProps) => {
|
|
45
45
|
/* prettier-ignore */
|
|
46
|
-
const { className, type, disabled, readOnly, required, children } = inputProps,
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const { className, type, disabled, readOnly, required, children } = inputProps, siteSearchProps = tslib_1.__rest(inputProps, ["className", "type", "disabled", "readOnly", "required", "children"]);
|
|
47
|
+
return (react_1.default.createElement(SiteSearchInput_js_1.default, Object.assign({}, siteSearchProps, { wrapperProps: wrapperProps, label: props.label || // eslint-disable-line deprecation/deprecation
|
|
48
|
+
txt.inputLabel, placeholder: txt.placeholder, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
|
|
49
49
|
} }));
|
|
50
50
|
};
|
|
51
51
|
exports.SiteSearchAutocomplete = SiteSearchAutocomplete;
|
package/SiteSearchCurtain.js
CHANGED
|
@@ -6,6 +6,8 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
7
|
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
8
8
|
const env_js_1 = require("./utils/env.js");
|
|
9
|
+
// NOTE: This component is too low-level (and too esoteric and rarely used)
|
|
10
|
+
// to justify `wrapperProps`
|
|
9
11
|
const SiteSearchCurtain = (props) => {
|
|
10
12
|
const [focused, setFocused] = (0, hooks_1.useLaggedState)(false);
|
|
11
13
|
(0, react_1.useEffect)(() => {
|
package/SiteSearchInput.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormFieldWrappingProps } from './FormField.js';
|
|
3
|
-
import { SSRSupportProps } from './utils.js';
|
|
4
3
|
type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit'>;
|
|
5
|
-
type
|
|
6
|
-
export type SiteSearchInputProps = {
|
|
4
|
+
export type SiteSearchInputProps = Pick<FormFieldWrappingProps, 'id' | 'label' | 'ssr' | 'wrapperProps'> & {
|
|
7
5
|
/** Triggered when user hits ENTER key with the focus inside the input field
|
|
8
6
|
*
|
|
9
7
|
* Return `true` to **allow** the browser's default submit hehavior
|
|
@@ -17,7 +15,6 @@ export type SiteSearchInputProps = {
|
|
|
17
15
|
*/
|
|
18
16
|
onButtonClick?: () => boolean | void;
|
|
19
17
|
buttonText?: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "key" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "value" | "pattern" | "name" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "size" | "src" | "multiple" | "alt" | "ssr" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "maxLength" | "min" | "minLength" | "width" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
|
|
18
|
+
} & InputElmProps;
|
|
19
|
+
export declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "key" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "value" | "pattern" | "name" | "wrapperProps" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "size" | "src" | "multiple" | "alt" | "ssr" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "maxLength" | "min" | "minLength" | "width" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
20
|
export default SiteSearchInput;
|
package/SiteSearchInput.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SiteSearchInput = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const FormField_js_1 = tslib_1.
|
|
6
|
+
const FormField_js_1 = tslib_1.__importStar(require("./FormField.js"));
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
9
9
|
var _a;
|
|
10
|
-
const
|
|
10
|
+
const _b = (0, FormField_js_1.groupFormFieldWrapperProps)(props), { onChange, buttonText = 'Leita', onSubmit, onButtonClick = props.onSubmit, onKeyDown, placeholder = typeof props.label === 'string' ? props.label : undefined, fieldWrapperProps } = _b, inputElementProps = tslib_1.__rest(_b, ["onChange", "buttonText", "onSubmit", "onButtonClick", "onKeyDown", "placeholder", "fieldWrapperProps"]);
|
|
11
11
|
const { value, defaultValue } = inputElementProps;
|
|
12
12
|
const [hasValue, setHasValue] = (0, react_1.useState)(undefined);
|
|
13
13
|
const filled = !!((_a = value !== null && value !== void 0 ? value : hasValue) !== null && _a !== void 0 ? _a : !!defaultValue);
|
|
@@ -18,7 +18,7 @@ exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
|
18
18
|
setHasValue(!!e.target.value);
|
|
19
19
|
onChange && onChange(e);
|
|
20
20
|
};
|
|
21
|
-
return (react_1.default.createElement(FormField_js_1.default, {
|
|
21
|
+
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: "SiteSearchInput", empty: empty, filled: filled }, fieldWrapperProps, { renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement("div", Object.assign({ className: className.input }, addFocusProps()),
|
|
22
22
|
react_1.default.createElement("input", Object.assign({ className: "SiteSearchInput__input", onChange: _onChange }, inputProps, { placeholder: placeholder, onKeyDown: onSubmit
|
|
23
23
|
? (e) => {
|
|
24
24
|
if (e.key === 'Enter' && onSubmit() !== true) {
|
|
@@ -28,6 +28,6 @@ exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
|
28
28
|
}
|
|
29
29
|
: onKeyDown }, inputElementProps, { ref: ref })),
|
|
30
30
|
' ',
|
|
31
|
-
react_1.default.createElement("button", { className: "SiteSearchInput__button", type: "submit", onClick: onButtonClick && ((e) => !onButtonClick() && e.preventDefault()), title: buttonText }, buttonText))) }));
|
|
31
|
+
react_1.default.createElement("button", { className: "SiteSearchInput__button", type: "submit", onClick: onButtonClick && ((e) => !onButtonClick() && e.preventDefault()), title: buttonText }, buttonText))) })));
|
|
32
32
|
});
|
|
33
33
|
exports.default = exports.SiteSearchInput;
|
package/Skeleton.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
4
|
export type SkeletonProps = {
|
|
3
5
|
text?: boolean;
|
|
4
6
|
height?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
7
|
+
} & EitherObj<{
|
|
5
8
|
items?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
6
9
|
gap?: 1 | 2 | 3 | 4 | 5;
|
|
7
|
-
}
|
|
10
|
+
}, WrapperElmProps>;
|
|
8
11
|
export declare const Skeleton: {
|
|
9
12
|
(props: SkeletonProps): JSX.Element;
|
|
10
13
|
/** Returns a single `<Skeleton height={X}/>` element of branded type `SkeletonBlock` */
|
package/Skeleton.js
CHANGED
|
@@ -5,27 +5,24 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
7
|
const range_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/range"));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
num
|
|
15
|
-
return num > min ? num : undefined;
|
|
8
|
+
/** Rounds the input number, caps it at max. If it's below min, returns undefined */
|
|
9
|
+
const minmax = (num, max, min) => {
|
|
10
|
+
if (num == null || isNaN(num)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
num = Math.round(num);
|
|
14
|
+
return num > max ? max : num >= min ? num : undefined;
|
|
16
15
|
};
|
|
17
16
|
const Skeleton = (props) => {
|
|
18
|
-
const height = minmax(props.height,
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (items > 1) {
|
|
26
|
-
return react_1.default.createElement(react_1.default.Fragment, null, (0, range_1.default)(1, items).map(renderSkeleton));
|
|
17
|
+
const height = minmax(props.height, 20, 2);
|
|
18
|
+
const gap = minmax(props.gap, 5, 1);
|
|
19
|
+
const items = minmax(props.items, 20, 2) || 1;
|
|
20
|
+
const { wrapperProps } = props;
|
|
21
|
+
const className = (0, classUtils_1.modifiedClass)('Skeleton', [props.text && 'text', height && 'height--' + height, gap && 'gap--' + gap], (wrapperProps || {}).className);
|
|
22
|
+
if (items) {
|
|
23
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, (0, range_1.default)(1, items).map((key) => (react_1.default.createElement("span", { key: key, className: className })))));
|
|
27
24
|
}
|
|
28
|
-
return
|
|
25
|
+
return react_1.default.createElement("span", Object.assign({}, wrapperProps, { className: className }));
|
|
29
26
|
};
|
|
30
27
|
exports.Skeleton = Skeleton;
|
|
31
28
|
exports.default = exports.Skeleton;
|
package/SubHeading.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
3
|
import { ComponentLayoutProps } from './constants.js';
|
|
4
|
+
import { WrapperElmProps } from './utils.js';
|
|
4
5
|
export type SubHeadingProps = {
|
|
5
6
|
Tag?: 'h2' | 'h3';
|
|
6
7
|
small?: boolean;
|
|
7
8
|
children: ReactNode;
|
|
8
|
-
} & ComponentLayoutProps & SeenProp;
|
|
9
|
+
} & ComponentLayoutProps & WrapperElmProps & SeenProp;
|
|
9
10
|
export declare const SubHeading: (props: SubHeadingProps) => JSX.Element;
|
|
10
11
|
export default SubHeading;
|
package/SubHeading.js
CHANGED
|
@@ -6,13 +6,13 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
7
|
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const SubHeading = (props) => {
|
|
9
|
-
const { small, Tag = 'h2', children, align, wide, startSeen } = props;
|
|
9
|
+
const { small, Tag = 'h2', children, align, wide, startSeen, wrapperProps } = props;
|
|
10
10
|
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
11
|
-
return (react_1.default.createElement(Tag, { className: (0, classUtils_1.modifiedClass)('SubHeading', [
|
|
11
|
+
return (react_1.default.createElement(Tag, Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('SubHeading', [
|
|
12
12
|
small && 'small',
|
|
13
13
|
align === 'right' && 'align--' + align,
|
|
14
14
|
!align && wide && 'wide',
|
|
15
|
-
]), ref: ref }, children));
|
|
15
|
+
], (wrapperProps || {}).className), ref: ref }), children));
|
|
16
16
|
};
|
|
17
17
|
exports.SubHeading = SubHeading;
|
|
18
18
|
exports.default = exports.SubHeading;
|
package/Tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SeenProp } from './utils/seenEffect.js';
|
|
2
|
-
import { SSRSupportProps } from './utils.js';
|
|
2
|
+
import { SSRSupportProps, WrapperElmProps } from './utils.js';
|
|
3
3
|
export type TabItemProps = {
|
|
4
4
|
label: string;
|
|
5
5
|
badge?: string | number;
|
|
@@ -27,7 +27,7 @@ export type TabsProps<T extends TabItemProps = TabItemProps> = BaseTabsProps<T>
|
|
|
27
27
|
vertical?: boolean;
|
|
28
28
|
/** Optional <Tabs/> block connected to the currently active tab */
|
|
29
29
|
subTabs?: BaseTabsProps;
|
|
30
|
-
} & SeenProp;
|
|
30
|
+
} & WrapperElmProps<null, 'role' | 'aria-label' | 'aria-labelledby'> & SeenProp;
|
|
31
31
|
/** @deprecated Use `TabsProps` instead (Will be removed in v0.11) */
|
|
32
32
|
export type TablistProps<T extends TabItemProps = TabItemProps> = TabsProps<T>;
|
|
33
33
|
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
package/Tabs.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tabs = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
7
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
|
+
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
8
8
|
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
9
9
|
const utils_js_1 = require("./utils.js");
|
|
10
10
|
const navKeyEffects = {
|
|
@@ -13,7 +13,6 @@ const navKeyEffects = {
|
|
|
13
13
|
ArrowDown: 1,
|
|
14
14
|
ArrowRight: 1,
|
|
15
15
|
};
|
|
16
|
-
// eslint-disable-next-line complexity
|
|
17
16
|
const renderTab = (tabProps, index, listProps) => {
|
|
18
17
|
const { label, badge, href, type, longLabel } = tabProps;
|
|
19
18
|
const { activeIdx, activateTab, focusedIdx, setFocusedIdx, tabRole, listAriaControls, isBrowser, } = listProps;
|
|
@@ -50,7 +49,7 @@ const renderTab = (tabProps, index, listProps) => {
|
|
|
50
49
|
// https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-2/tabs.html
|
|
51
50
|
const Tabs = (props) => {
|
|
52
51
|
var _a, _b;
|
|
53
|
-
const { tabs, role, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-controls': listAriaControls, id, activeIdx, onSetActive, activateOnFocus, ssr, startSeen, vertical, subTabs, } = props;
|
|
52
|
+
const { tabs, role, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-controls': listAriaControls, wrapperProps = {}, id = wrapperProps.id, activeIdx, onSetActive, activateOnFocus, ssr, startSeen, vertical, subTabs, } = props;
|
|
54
53
|
const isBrowser = (0, utils_js_1.useIsBrowserSide)(ssr);
|
|
55
54
|
const [focusedIdx, setFocusedIdx] = (0, react_1.useState)(activeIdx || 0);
|
|
56
55
|
const tabRole = isBrowser && role === 'tablist' ? 'tab' : undefined;
|
|
@@ -66,7 +65,7 @@ const Tabs = (props) => {
|
|
|
66
65
|
};
|
|
67
66
|
const handleKeydown = tabRole &&
|
|
68
67
|
((e) => {
|
|
69
|
-
var _a;
|
|
68
|
+
var _a, _b;
|
|
70
69
|
const delta = navKeyEffects[e.key];
|
|
71
70
|
if (delta) {
|
|
72
71
|
// prevent scolling +
|
|
@@ -77,6 +76,7 @@ const Tabs = (props) => {
|
|
|
77
76
|
nextIdx = nextIdx < 0 ? maxIdx : nextIdx > maxIdx ? 0 : nextIdx;
|
|
78
77
|
(_a = e.currentTarget.querySelectorAll('.Tabs__tab')[nextIdx]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
79
78
|
activateOnFocus && activateTab(nextIdx);
|
|
79
|
+
(_b = wrapperProps.onKeyDown) === null || _b === void 0 ? void 0 : _b.call(wrapperProps, e);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
@@ -89,7 +89,7 @@ const Tabs = (props) => {
|
|
|
89
89
|
listAriaControls,
|
|
90
90
|
isBrowser,
|
|
91
91
|
};
|
|
92
|
-
return (react_1.default.createElement("div", { className: (0, classUtils_1.modifiedClass)('Tabs', vertical && 'vertical'), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser, ref: ref },
|
|
92
|
+
return (react_1.default.createElement("div", Object.assign({}, props.wrapperProps, { className: (0, classUtils_1.modifiedClass)('Tabs', vertical && 'vertical', wrapperProps.className), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser, ref: ref }),
|
|
93
93
|
tabs.map((tabProps, index) => renderTab(tabProps, index, listProps)),
|
|
94
94
|
subTabs && (react_1.default.createElement(exports.Tabs, Object.assign({}, subTabs, { role: 'role' in subTabs ? subTabs.role : role, activateOnFocus: (_a = subTabs.activateOnFocus) !== null && _a !== void 0 ? _a : activateOnFocus, ssr: (_b = subTabs.ssr) !== null && _b !== void 0 ? _b : ssr, startSeen: true,
|
|
95
95
|
// just to be sure
|
package/TagPill.js
CHANGED
|
@@ -12,6 +12,8 @@ const colors = {
|
|
|
12
12
|
orange: 'color--orange',
|
|
13
13
|
red: 'color--red',
|
|
14
14
|
};
|
|
15
|
+
// NOTE: As a `_abstract/_Button.tsx`-derived component, all `<button/>` and
|
|
16
|
+
// `<a/>` props are allowed directly, so adding `wrapperProps` makes no sense.
|
|
15
17
|
const TagPill = (props) => {
|
|
16
18
|
const { modifier, large, removable, onRemove, children, color = 'normal', label = children, removeLabel = 'x', removeLabelLong = removeLabel } = props, buttonProps = tslib_1.__rest(props, ["modifier", "large", "removable", "onRemove", "children", "color", "label", "removeLabel", "removeLabelLong"]);
|
|
17
19
|
const isStatic = !('href' in props || 'type' in props || props.onClick);
|
package/TextBlock.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect.js';
|
|
3
3
|
import { ComponentLayoutProps } from './constants.js';
|
|
4
|
+
import { WrapperElmProps } from './utils.js';
|
|
4
5
|
export type TextBlockProps = ComponentLayoutProps & {
|
|
5
6
|
/** Make H2 headings float to the left
|
|
6
7
|
*
|
|
@@ -10,6 +11,6 @@ export type TextBlockProps = ComponentLayoutProps & {
|
|
|
10
11
|
/** Sets a smaller text-size */
|
|
11
12
|
small?: boolean;
|
|
12
13
|
children: ReactNode;
|
|
13
|
-
} & SeenProp;
|
|
14
|
+
} & WrapperElmProps & SeenProp;
|
|
14
15
|
export declare const TextBlock: (props: TextBlockProps) => JSX.Element;
|
|
15
16
|
export default TextBlock;
|
package/TextBlock.js
CHANGED
|
@@ -6,15 +6,15 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
7
|
const seenEffect_js_1 = require("./utils/seenEffect.js");
|
|
8
8
|
const TextBlock = (props) => {
|
|
9
|
-
const { children, align, labelled, wide, small, startSeen } = props;
|
|
9
|
+
const { children, align, labelled, wide, small, startSeen, wrapperProps } = props;
|
|
10
10
|
const rightAligned = align === 'right' || labelled;
|
|
11
11
|
const [ref] = (0, seenEffect_js_1.useSeenEffect)(startSeen);
|
|
12
|
-
return (react_1.default.createElement("div", { className: (0, classUtils_1.modifiedClass)('TextBlock', [
|
|
12
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('TextBlock', [
|
|
13
13
|
labelled && 'labelled',
|
|
14
14
|
rightAligned && 'align--right',
|
|
15
15
|
wide && !rightAligned && 'wide',
|
|
16
16
|
small && !labelled && 'small',
|
|
17
|
-
]), ref: ref }, children));
|
|
17
|
+
], (wrapperProps || {}).className), ref: ref }), children));
|
|
18
18
|
};
|
|
19
19
|
exports.TextBlock = TextBlock;
|
|
20
20
|
exports.default = exports.TextBlock;
|
package/TextButton.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.TextButton = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
7
|
+
// NOTE: As a `_abstract/_Button.tsx`-derived component, all `<button/>` and
|
|
8
|
+
// `<a/>` props are allowed directly, so adding `wrapperProps` makes no sense.
|
|
7
9
|
const TextButton = (props) => {
|
|
8
10
|
if ('disabled' in props) {
|
|
9
11
|
props = Object.assign(Object.assign({}, props), { disabled: undefined });
|
package/TextInput.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { RefObject } from 'react';
|
|
|
2
2
|
import { FormFieldWrappingProps } from './FormField.js';
|
|
3
3
|
type InputElmProps = JSX.IntrinsicElements['input'];
|
|
4
4
|
type TextareaElmProps = JSX.IntrinsicElements['textarea'];
|
|
5
|
-
export type TextInputProps = {
|
|
5
|
+
export type TextInputProps = FormFieldWrappingProps & {
|
|
6
6
|
small?: boolean;
|
|
7
|
-
} &
|
|
7
|
+
} & (({
|
|
8
8
|
type?: 'text' | 'email' | 'tel' | 'number' | 'date' | 'url' | 'password' | 'search';
|
|
9
9
|
inputRef?: RefObject<HTMLInputElement>;
|
|
10
10
|
} & InputElmProps) | ({
|
package/TextInput.js
CHANGED
|
@@ -4,17 +4,16 @@ exports.TextInput = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
|
-
const FormField_js_1 = tslib_1.
|
|
7
|
+
const FormField_js_1 = tslib_1.__importStar(require("./FormField.js"));
|
|
8
8
|
const TextInput = (props) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const _inputRef = (0, react_1.useRef)(null);
|
|
11
|
-
const
|
|
11
|
+
const _b = (0, FormField_js_1.groupFormFieldWrapperProps)(props), { onChange, type, inputRef = _inputRef, fieldWrapperProps } = _b, inputElementProps = tslib_1.__rest(_b, ["onChange", "type", "inputRef", "fieldWrapperProps"]);
|
|
12
12
|
const { value, defaultValue, placeholder } = inputElementProps;
|
|
13
13
|
const [hasValue, setHasValue] = (0, react_1.useState)(undefined);
|
|
14
14
|
const filled = !!((_a = value !== null && value !== void 0 ? value : hasValue) !== null && _a !== void 0 ? _a : !!defaultValue);
|
|
15
15
|
const empty = !filled && !placeholder;
|
|
16
16
|
const multiline = type === 'textarea';
|
|
17
|
-
const modifiers = [multiline && 'multiline'];
|
|
18
17
|
const _onChange = value != null
|
|
19
18
|
? onChange
|
|
20
19
|
: (e) => {
|
|
@@ -30,7 +29,7 @@ const TextInput = (props) => {
|
|
|
30
29
|
setHasValue(true);
|
|
31
30
|
}
|
|
32
31
|
}, []);
|
|
33
|
-
return (react_1.default.createElement(FormField_js_1.default, {
|
|
32
|
+
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: (0, classUtils_1.modifiedClass)('TextInput', [multiline && 'multiline']), empty: empty, filled: filled }, fieldWrapperProps, { renderInput: (className, inputProps, addFocusProps) => multiline ? (react_1.default.createElement("textarea", Object.assign({ className: className.input, onChange: _onChange }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) : (react_1.default.createElement("input", Object.assign({ className: className.input, onChange: _onChange, type: type }, inputProps, addFocusProps(inputElementProps), { ref: inputRef }))) })));
|
|
34
33
|
};
|
|
35
34
|
exports.TextInput = TextInput;
|
|
36
35
|
exports.default = exports.TextInput;
|
package/Tooltip.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { WrapperElmProps } from './utils.js';
|
|
1
2
|
export type TooltipProps = {
|
|
2
3
|
label: string;
|
|
3
4
|
text: string | JSX.Element;
|
|
4
5
|
iconOnly?: boolean;
|
|
5
|
-
}
|
|
6
|
+
} & WrapperElmProps<'details', 'open'>;
|
|
6
7
|
export declare const Tooltip: (props: TooltipProps) => JSX.Element;
|
|
7
8
|
export default Tooltip;
|
package/Tooltip.js
CHANGED
|
@@ -4,14 +4,14 @@ exports.Tooltip = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_2 = require("@floating-ui/react");
|
|
7
|
-
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
8
7
|
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
8
|
+
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
9
9
|
const getSide = (placement) => placement.split('-')[0];
|
|
10
10
|
const Tooltip = (props) => {
|
|
11
|
-
const { text, label, iconOnly } = props;
|
|
11
|
+
const { text, label, iconOnly, wrapperProps = {} } = props;
|
|
12
12
|
const arrowRef = (0, react_1.useRef)(null);
|
|
13
13
|
const [isOpen, setIsOpen] = (0, hooks_1.useLaggedState)(false, 300);
|
|
14
|
-
const { x, y,
|
|
14
|
+
const { x, y, refs, middlewareData, placement } = (0, react_2.useFloating)({
|
|
15
15
|
placement: 'top',
|
|
16
16
|
middleware: [(0, react_2.offset)(10), (0, react_2.flip)(), (0, react_2.shift)(), (0, react_2.arrow)({ element: arrowRef })],
|
|
17
17
|
whileElementsMounted: react_2.autoUpdate,
|
|
@@ -22,40 +22,53 @@ const Tooltip = (props) => {
|
|
|
22
22
|
(0, hooks_1.useCallbackOnEsc)(() => {
|
|
23
23
|
setIsOpen(false);
|
|
24
24
|
});
|
|
25
|
-
return (react_1.default.createElement("details", { className:
|
|
25
|
+
return (react_1.default.createElement("details", Object.assign({}, props.wrapperProps, { className: (0, classUtils_1.modifiedClass)('Tooltip', getSide(placement), wrapperProps.className), open: isOpen, onMouseEnter: (e) => {
|
|
26
|
+
var _a;
|
|
27
|
+
setIsOpen(true, 100);
|
|
28
|
+
(_a = wrapperProps.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
29
|
+
}, onFocus: (e) => {
|
|
30
|
+
var _a;
|
|
26
31
|
if (isOpen) {
|
|
27
32
|
setIsOpen(true, 0);
|
|
28
33
|
}
|
|
29
|
-
|
|
34
|
+
(_a = wrapperProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
35
|
+
}, onBlur: (e) => {
|
|
36
|
+
var _a;
|
|
37
|
+
setIsOpen(false);
|
|
38
|
+
(_a = wrapperProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
39
|
+
}, onClick: (e) => {
|
|
40
|
+
var _a;
|
|
30
41
|
e.preventDefault();
|
|
31
42
|
setIsOpen(!isOpen, 0);
|
|
32
|
-
|
|
43
|
+
(_a = wrapperProps.onClick) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
44
|
+
}, onMouseDown: (e) => {
|
|
45
|
+
var _a;
|
|
33
46
|
if (isOpen) {
|
|
34
47
|
setTimeout(() => {
|
|
35
48
|
setIsOpen(true, 0);
|
|
36
49
|
}, 100);
|
|
37
50
|
}
|
|
51
|
+
(_a = wrapperProps.onMouseDown) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
38
52
|
}, onMouseLeave: (e) => {
|
|
53
|
+
var _a;
|
|
39
54
|
if (e.currentTarget.$contextClicked_firefox_fix) {
|
|
40
55
|
return;
|
|
41
56
|
}
|
|
42
57
|
setIsOpen(false);
|
|
58
|
+
(_a = wrapperProps.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
43
59
|
}, onContextMenu: (e) => {
|
|
60
|
+
var _a;
|
|
44
61
|
const elm = e.currentTarget;
|
|
45
62
|
clearTimeout(elm.$contextClicked_firefox_fix);
|
|
46
63
|
elm.$contextClicked_firefox_fix = setTimeout(() => {
|
|
47
64
|
delete elm.$contextClicked_firefox_fix;
|
|
48
65
|
}, 300);
|
|
66
|
+
(_a = wrapperProps.onContextMenu) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
49
67
|
}, style: x == null
|
|
50
|
-
?
|
|
51
|
-
: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
'--tooltip-arrow-pos-x': `${arrowX}px`,
|
|
55
|
-
'--tooltip-arrow-pos-y': `${arrowY}px`,
|
|
56
|
-
} },
|
|
57
|
-
react_1.default.createElement("summary", { className: (0, classUtils_1.modifiedClass)('Tooltip__trigger', iconOnly && 'icononly'), ref: reference }, label),
|
|
58
|
-
react_1.default.createElement("div", { className: "Tooltip__content", onClick: (e) => e.stopPropagation(), ref: floating },
|
|
68
|
+
? wrapperProps.style
|
|
69
|
+
: Object.assign(Object.assign({}, wrapperProps.style), { '--tooltip-content-pos-y': `${y}px`, '--tooltip-content-pos-x': `${x}px`, '--tooltip-arrow-pos-x': `${arrowX}px`, '--tooltip-arrow-pos-y': `${arrowY}px` }) }),
|
|
70
|
+
react_1.default.createElement("summary", { className: (0, classUtils_1.modifiedClass)('Tooltip__trigger', iconOnly && 'icononly'), ref: refs.setReference }, label),
|
|
71
|
+
react_1.default.createElement("div", { className: "Tooltip__content", onClick: (e) => e.stopPropagation(), ref: refs.setFloating },
|
|
59
72
|
x !== null && (react_1.default.createElement("div", { "data-floating-ui-hack-plz-ignore": "", style: { position: 'absolute', display: 'none' }, ref: arrowRef })),
|
|
60
73
|
text)));
|
|
61
74
|
};
|
package/VSpacer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
|
+
import { WrapperElmProps } from './utils.js';
|
|
3
4
|
declare const sizes: {
|
|
4
5
|
readonly none: "none";
|
|
5
6
|
readonly small: "small";
|
|
@@ -17,6 +18,6 @@ export type VSpacerProps = EitherObj<{
|
|
|
17
18
|
size?: VSpacerSizePos;
|
|
18
19
|
top?: VSpacerSize;
|
|
19
20
|
bottom?: VSpacerSize;
|
|
20
|
-
}
|
|
21
|
+
}> & WrapperElmProps;
|
|
21
22
|
export declare const VSpacer: (props: VSpacerProps) => JSX.Element;
|
|
22
23
|
export default VSpacer;
|
package/VSpacer.js
CHANGED
|
@@ -15,7 +15,7 @@ const sizes = {
|
|
|
15
15
|
const hasChildren = (children) => (children && !(Array.isArray(children) && !children.length)) || undefined;
|
|
16
16
|
const normalizeProp = (value, exclude) => value && value !== exclude ? sizes[value] : undefined;
|
|
17
17
|
const VSpacer = (props) => {
|
|
18
|
-
const { size, top, bottom, children } = props;
|
|
18
|
+
const { size, top, bottom, children, wrapperProps } = props;
|
|
19
19
|
const isWrapper = hasChildren(children);
|
|
20
20
|
let topVal = normalizeProp(isWrapper && top);
|
|
21
21
|
let bottomVal = normalizeProp(isWrapper && bottom);
|
|
@@ -35,12 +35,8 @@ const VSpacer = (props) => {
|
|
|
35
35
|
bottomVal = undefined;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const className = (0, classUtils_1.modifiedClass)('VSpacer', [
|
|
39
|
-
|
|
40
|
-
topVal && 'top--' + topVal,
|
|
41
|
-
bottomVal && 'bottom--' + bottomVal,
|
|
42
|
-
]);
|
|
43
|
-
return isWrapper ? (react_1.default.createElement("div", { className: className }, children)) : (react_1.default.createElement("hr", { className: className }));
|
|
38
|
+
const className = (0, classUtils_1.modifiedClass)('VSpacer', [sizeVal, topVal && 'top--' + topVal, bottomVal && 'bottom--' + bottomVal], (wrapperProps || {}).className);
|
|
39
|
+
return isWrapper ? (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: className }), children)) : (react_1.default.createElement("hr", Object.assign({}, wrapperProps, { className: className })));
|
|
44
40
|
};
|
|
45
41
|
exports.VSpacer = VSpacer;
|
|
46
42
|
exports.default = exports.VSpacer;
|
package/VerticalTabsTOC.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export type VerticalTabsTOCSubItem = TabItemProps & {
|
|
|
9
9
|
export type VerticalTabsTOCProps = {
|
|
10
10
|
items: Array<VerticalTabsTOCItem>;
|
|
11
11
|
onItemSelect: (itemId: string) => void;
|
|
12
|
-
} & Pick<TabsProps, 'aria-label' | 'ssr' | 'activateOnFocus' | 'id' | 'startSeen'>;
|
|
12
|
+
} & Pick<TabsProps, 'aria-label' | 'ssr' | 'activateOnFocus' | 'id' | 'startSeen' | 'wrapperProps'>;
|
|
13
13
|
export declare const VerticalTabsTOC: (props: VerticalTabsTOCProps) => JSX.Element;
|
|
14
14
|
export default VerticalTabsTOC;
|
package/VerticalTabsTOC.js
CHANGED
|
@@ -62,7 +62,7 @@ const VerticalTabsTOC = (props) => {
|
|
|
62
62
|
window.addEventListener('hashchange', handleHash);
|
|
63
63
|
return () => window.removeEventListener('hashchange', handleHash);
|
|
64
64
|
}, [itemsById, onItemSelect]);
|
|
65
|
-
return (react_1.default.createElement(Tabs_js_1.default, { id: domid, vertical: true, "aria-label": props['aria-label'], onSetActive: (_, item) => {
|
|
65
|
+
return (react_1.default.createElement(Tabs_js_1.default, { wrapperProps: props.wrapperProps, id: domid, vertical: true, "aria-label": props['aria-label'], onSetActive: (_, item) => {
|
|
66
66
|
var _a;
|
|
67
67
|
const itemId = getItemId(item);
|
|
68
68
|
const newId = itemId || getItemId((_a = itemsById[itemId].subTabs) === null || _a === void 0 ? void 0 : _a.tabs[0]);
|
package/WizardLayout.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
3
|
-
import { SSRSupportProps } from './utils.js';
|
|
3
|
+
import { SSRSupportProps, WrapperElmProps } from './utils.js';
|
|
4
4
|
type WizardLayoutProps = {
|
|
5
5
|
wizardStepper?: ReactNode | false;
|
|
6
6
|
wizardFooter?: ReactNode | false;
|
|
@@ -9,6 +9,6 @@ type WizardLayoutProps = {
|
|
|
9
9
|
logoLink?: string;
|
|
10
10
|
globalAlerts?: ReactNode;
|
|
11
11
|
children?: ReactNode;
|
|
12
|
-
} & SSRSupportProps;
|
|
12
|
+
} & SSRSupportProps & WrapperElmProps;
|
|
13
13
|
export declare const WizardLayout: (props: WizardLayoutProps) => JSX.Element;
|
|
14
14
|
export default WizardLayout;
|
package/WizardLayout.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WizardLayout = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
6
7
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
7
8
|
const _Image_js_1 = require("./_abstract/_Image.js");
|
|
8
9
|
const _Link_js_1 = require("./_abstract/_Link.js");
|
|
@@ -12,15 +13,15 @@ const WizardLayout = (props) => {
|
|
|
12
13
|
(0, useScrollbarWidthCSSVar_js_1.useScrollbarWidthCSSVar)();
|
|
13
14
|
const {
|
|
14
15
|
// ssr,
|
|
15
|
-
wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName = '', globalAlerts, } = props;
|
|
16
|
+
wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName = '', globalAlerts, wrapperProps, } = props;
|
|
16
17
|
const isBrowser = (0, utils_js_1.useIsBrowserSide)( /* ssr */);
|
|
17
|
-
return (react_1.default.createElement("div", { className:
|
|
18
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('WizardLayout', null, (wrapperProps || {}).className), "data-sprinkled": isBrowser, "data-color-theme": colorTheme }),
|
|
18
19
|
globalAlerts && (react_1.default.createElement("div", { className: "WizardLayout__alerts", role: "alert" }, globalAlerts)),
|
|
19
20
|
react_1.default.createElement("div", { className: "WizardLayout__content" },
|
|
20
21
|
react_1.default.createElement("div", { className: "WizardLayout__header", role: "banner" },
|
|
21
22
|
react_1.default.createElement(_Link_js_1.Link, { className: "WizardLayout__header__logo", href: logoLink },
|
|
22
23
|
' ',
|
|
23
|
-
react_1.default.createElement(_Image_js_1.Image, {
|
|
24
|
+
react_1.default.createElement(_Image_js_1.Image, { bem: undefined, inline: true, src: (0, assets_1.getAssetUrl)('reykjavik-logo.svg'), altText: "Reykjav\u00EDk" }),
|
|
24
25
|
' ',
|
|
25
26
|
siteName,
|
|
26
27
|
' '),
|