@reykjavik/hanna-react 0.10.75 → 0.10.77
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 +3 -3
- package/AccordionList.js +1 -1
- package/ActionCards.d.ts +2 -2
- package/Alert.d.ts +4 -4
- package/Alert.js +4 -4
- package/ArticleCards.d.ts +3 -3
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +2 -2
- package/ArticleCarousel.d.ts +2 -2
- package/ArticleMeta.d.ts +2 -2
- package/Attention.d.ts +1 -1
- package/BasicTable.d.ts +1 -1
- package/BgBox.d.ts +1 -1
- package/Bling.d.ts +5 -5
- package/BlockQuote.d.ts +1 -1
- package/BreadCrumbs.d.ts +3 -3
- package/ButtonBack.d.ts +1 -1
- package/ButtonBar.d.ts +1 -1
- package/ButtonPrimary.d.ts +1 -1
- package/ButtonSecondary.d.ts +1 -1
- package/ButtonTertiary.d.ts +3 -3
- package/CHANGELOG.md +19 -2
- package/CarouselStepper.d.ts +1 -1
- package/CenterColumn.d.ts +1 -1
- package/Checkbox.d.ts +1 -1
- package/CheckboxButton.d.ts +4 -0
- package/CheckboxButton.js +9 -0
- package/CheckboxButtonsGroup.d.ts +3 -2
- package/CheckboxButtonsGroup.js +2 -3
- package/CheckboxGroup.d.ts +4 -3
- package/CityBlock.d.ts +1 -1
- package/ContactBubble.d.ts +5 -5
- package/ContactBubble.js +2 -1
- package/ContentArticle.d.ts +1 -1
- package/ContentArticle.js +4 -2
- package/ContentImage.d.ts +1 -1
- package/Datepicker.d.ts +2 -2
- package/Datepicker.js +5 -5
- package/ExtraLinks.d.ts +4 -4
- package/FeatureList.d.ts +1 -1
- package/FieldGroup.d.ts +1 -1
- package/FileInput/_FileInput.utils.d.ts +1 -1
- package/FileInput/_FileInputFileList.d.ts +1 -1
- package/FileInput.d.ts +1 -1
- package/Foonote.d.ts +1 -1
- package/FooterBadges.d.ts +1 -1
- package/FooterInfo.d.ts +3 -3
- package/Footnote.d.ts +1 -1
- package/Form.d.ts +1 -1
- package/FormField.d.ts +8 -8
- package/FormField.js +7 -6
- package/Gallery/_GalleryItem.d.ts +1 -1
- package/Gallery/_GalleryModal.d.ts +1 -1
- package/Gallery/_GalleryModalContext.d.ts +1 -1
- package/Gallery.d.ts +3 -3
- package/GridBlocks.d.ts +3 -3
- package/Heading.d.ts +2 -2
- package/Heading.js +1 -1
- package/HeroBlock.d.ts +2 -2
- package/IframeBlock.d.ts +1 -1
- package/Illustration.d.ts +1 -1
- package/ImageCards.d.ts +3 -3
- package/InfoBlock.d.ts +1 -1
- package/InfoHero.d.ts +2 -2
- package/IslandBlock.d.ts +4 -4
- package/IslandPageBlock.d.ts +3 -3
- package/LabeledTextBlock.d.ts +1 -1
- package/Layout.d.ts +3 -3
- package/Layout.js +2 -2
- package/MainMenu/_Auxiliary.d.ts +2 -2
- package/MainMenu/_PrimaryPanel.d.ts +1 -1
- package/MainMenu.d.ts +8 -8
- package/MainMenu.js +2 -2
- package/MiniMetrics.d.ts +1 -1
- package/Modal.d.ts +1 -1
- package/NameCard.d.ts +4 -4
- package/NameCards.d.ts +1 -1
- package/NewsHero.d.ts +2 -2
- package/PageFilter.d.ts +1 -1
- package/PageHeading.d.ts +1 -1
- package/Picture.d.ts +1 -1
- package/ProcessOverview.d.ts +2 -2
- package/PullQuote.d.ts +1 -1
- package/README.md +1 -1
- package/RadioButtonsGroup.d.ts +3 -2
- package/RadioButtonsGroup.js +2 -2
- package/RadioGroup.d.ts +5 -4
- package/RadioGroup.js +1 -1
- package/RelatedLinks.d.ts +3 -3
- package/RowBlock.d.ts +1 -1
- package/RowBlockColumn.d.ts +1 -1
- package/SearchInput.d.ts +3 -3
- package/SearchResults/_SearchResultsItem.d.ts +2 -2
- package/SearchResults.d.ts +4 -4
- package/SeenEffect.d.ts +1 -1
- package/Selectbox.d.ts +2 -2
- package/ShareButtons.d.ts +2 -2
- package/Sharpie.d.ts +3 -3
- package/SiteSearchAutocomplete.d.ts +2 -2
- package/SiteSearchCurtain.d.ts +2 -2
- package/SiteSearchCurtain.js +7 -12
- package/SiteSearchInput.d.ts +5 -5
- package/Skeleton.d.ts +3 -3
- package/SubHeading.d.ts +1 -1
- package/Tabs.d.ts +6 -6
- package/Tabs.js +2 -2
- package/TagPill.d.ts +2 -2
- package/TextBlock.d.ts +1 -1
- package/TextButton.d.ts +1 -1
- package/TextInput.d.ts +3 -3
- package/VSpacer.d.ts +3 -3
- package/VerticalTabsTOC.d.ts +3 -3
- package/WizardLayout.d.ts +2 -2
- package/WizardLayout.js +2 -2
- package/WizardStepper.d.ts +2 -2
- package/_abstract/_AbstractCarousel.d.ts +3 -3
- package/_abstract/_AbstractCarousel.js +2 -2
- package/_abstract/_Blings.d.ts +2 -2
- package/_abstract/_Block.d.ts +4 -4
- package/_abstract/_Button.d.ts +9 -9
- package/_abstract/_CardList.d.ts +8 -8
- package/_abstract/_Image.d.ts +5 -5
- package/_abstract/_Link.d.ts +42 -9
- package/_abstract/_Link.js +44 -4
- package/_abstract/_Quote.d.ts +1 -1
- package/_abstract/_TogglerGroup.d.ts +7 -5
- package/_abstract/_TogglerGroup.js +14 -16
- package/_abstract/_TogglerGroupField.d.ts +6 -4
- package/_abstract/_TogglerGroupField.js +9 -3
- package/_abstract/_TogglerInput.d.ts +3 -2
- package/_abstract/_TogglerInput.js +9 -7
- package/assets.d.ts +4 -4
- package/constants.d.ts +2 -2
- package/index.d.ts +1 -0
- package/package.json +6 -6
- package/utils/browserSide.d.ts +1 -0
- package/utils/browserSide.js +6 -0
- package/utils/config.d.ts +2 -0
- package/utils/config.js +3 -4
- package/utils/seenEffect.d.ts +3 -3
- package/utils/useFormatMonitor.js +1 -1
- package/utils/useGetSVGtext.d.ts +1 -1
- package/utils/useMenuToggling.d.ts +1 -1
- package/utils/useMixedControlState.d.ts +5 -5
- package/utils.d.ts +1 -0
- package/utils.js +1 -0
package/RadioButtonsGroup.js
CHANGED
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const _TogglerGroupField_1 = require("./_abstract/_TogglerGroupField");
|
|
7
7
|
const _TogglerInput_1 = require("./_abstract/_TogglerInput");
|
|
8
|
-
const RadioButton = (props) => (react_1.default.createElement(_TogglerInput_1.TogglerInput, Object.assign({}, props, { bem: "RadioButton", type: "radio" })));
|
|
8
|
+
const RadioButton = (props) => (react_1.default.createElement(_TogglerInput_1.TogglerInput, Object.assign({}, props, { bem: "RadioButton", type: "radio", innerWrap: true })));
|
|
9
9
|
const RadioButtonsGroup = (props) => {
|
|
10
10
|
if (props.layout) {
|
|
11
11
|
console.warn('`RadioButtonsGroupProps.layout` is deprecated.');
|
|
@@ -13,7 +13,7 @@ const RadioButtonsGroup = (props) => {
|
|
|
13
13
|
if (props.columns) {
|
|
14
14
|
console.warn('`RadioButtonsGroupProps.columns` is deprecated.');
|
|
15
15
|
}
|
|
16
|
-
return react_1.default.createElement(_TogglerGroupField_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioButtonsGroup", Toggler: RadioButton }));
|
|
16
|
+
return (react_1.default.createElement(_TogglerGroupField_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioButtonsGroup", Toggler: RadioButton, isRadio: true })));
|
|
17
17
|
};
|
|
18
18
|
exports.RadioButtonsGroup = RadioButtonsGroup;
|
|
19
19
|
exports.default = exports.RadioButtonsGroup;
|
package/RadioGroup.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { TogglerGroupFieldOption, TogglerGroupFieldOptions, TogglerGroupFieldProps } from './_abstract/_TogglerGroupField';
|
|
2
2
|
import { TogglerInputProps } from './_abstract/_TogglerInput';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type RadioProps = Omit<TogglerInputProps, 'reqText'>;
|
|
4
|
+
export type RadioGroupProps = TogglerGroupFieldProps & {
|
|
5
5
|
layout?: 'inline';
|
|
6
6
|
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
9
|
+
export type RadioGroupOption = TogglerGroupFieldOption;
|
|
10
|
+
export type RadioGroupOptions = TogglerGroupFieldOptions;
|
|
10
11
|
export declare const RadioGroup: {
|
|
11
12
|
(props: RadioGroupProps): JSX.Element;
|
|
12
13
|
/** @deprecated Exposed for testing purposes only. This may disappear at any time. */
|
package/RadioGroup.js
CHANGED
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const _TogglerGroupField_1 = require("./_abstract/_TogglerGroupField");
|
|
7
7
|
const _TogglerInput_1 = require("./_abstract/_TogglerInput");
|
|
8
8
|
const Radio = (props) => react_1.default.createElement(_TogglerInput_1.TogglerInput, Object.assign({}, props, { bem: "Radio", type: "radio" }));
|
|
9
|
-
const RadioGroup = (props) => (react_1.default.createElement(_TogglerGroupField_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioGroup", modifier: props.layout, Toggler: Radio })));
|
|
9
|
+
const RadioGroup = (props) => (react_1.default.createElement(_TogglerGroupField_1.TogglerGroupField, Object.assign({}, props, { bem: "RadioGroup", modifier: props.layout, isRadio: true, Toggler: Radio })));
|
|
10
10
|
exports.RadioGroup = RadioGroup;
|
|
11
11
|
/** @deprecated Exposed for testing purposes only. This may disappear at any time. */
|
|
12
12
|
exports.RadioGroup.__Radio = Radio;
|
package/RelatedLinks.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ declare const types: {
|
|
|
4
4
|
readonly pdf: 1;
|
|
5
5
|
readonly link: 0;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type RelatedLinkType = keyof typeof types;
|
|
8
|
+
export type RelatedLinkItem = {
|
|
9
9
|
href: string;
|
|
10
10
|
label: string;
|
|
11
11
|
target?: string;
|
|
12
12
|
type?: RelatedLinkType;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type RelatedLinksProps = {
|
|
15
15
|
title?: string;
|
|
16
16
|
titleTag?: 'h2' | 'h3' | 'h4' | 'h5';
|
|
17
17
|
links: Array<RelatedLinkItem>;
|
package/RowBlock.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
3
3
|
import { SeenProp } from './utils/seenEffect';
|
|
4
|
-
export
|
|
4
|
+
export type RowBlockProps = {
|
|
5
5
|
/** Float the first RowBlockColumn to the right on larger screens. */
|
|
6
6
|
right?: boolean;
|
|
7
7
|
/** Custom **additional** class-name */
|
package/RowBlockColumn.d.ts
CHANGED
package/SearchInput.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { FormFieldWrappingProps } from './FormField';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type InputElmProps = JSX.IntrinsicElements['input'];
|
|
4
|
+
type BaseProps<Type extends {
|
|
5
5
|
type?: string;
|
|
6
6
|
}, InputProps extends object> = {
|
|
7
7
|
small?: boolean;
|
|
@@ -11,7 +11,7 @@ declare type BaseProps<Type extends {
|
|
|
11
11
|
inputRef?: RefObject<HTMLInputElement>;
|
|
12
12
|
buttonRef?: RefObject<HTMLButtonElement>;
|
|
13
13
|
} & Type & FormFieldWrappingProps & InputProps;
|
|
14
|
-
export
|
|
14
|
+
export type SearchInputProps = BaseProps<{
|
|
15
15
|
type?: 'text';
|
|
16
16
|
}, InputElmProps>;
|
|
17
17
|
export declare const SearchInput: (props: SearchInputProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
type MetaValue = string | (() => JSX.Element | string | number);
|
|
2
|
+
export type SearchResultsItemProps = {
|
|
3
3
|
/** Plain text title */
|
|
4
4
|
title: string;
|
|
5
5
|
/** Simple HTML-encoded summary (excluding any layout) */
|
package/SearchResults.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SearchResultsItemProps } from './SearchResults/_SearchResultsItem';
|
|
3
|
-
export
|
|
3
|
+
export type SearchReesultI18n = {
|
|
4
4
|
lang: string;
|
|
5
5
|
loadQueryTitle: string;
|
|
6
6
|
resultsTitle: string;
|
|
7
7
|
noResultsTitle: string;
|
|
8
8
|
loadMore: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type SearchStatus = 'loadingquery' | 'loadingfilter' | 'error' | 'results' | 'loadingmore';
|
|
11
|
+
export type SearchResultsFilter = {
|
|
12
12
|
label: string;
|
|
13
13
|
count?: number;
|
|
14
14
|
};
|
|
15
15
|
export type { SearchResultsItemProps } from './SearchResults/_SearchResultsItem';
|
|
16
|
-
export
|
|
16
|
+
export type SearchResultsProps = {
|
|
17
17
|
totalHits?: number;
|
|
18
18
|
hits?: number;
|
|
19
19
|
query?: string;
|
package/SeenEffect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EffectProp, SeenProp } from './utils/seenEffect';
|
|
2
|
-
export
|
|
2
|
+
export type SeenEffectProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & SeenProp & EffectProp;
|
|
3
3
|
export declare const SeenEffect: (props: SeenEffectProps) => JSX.Element;
|
|
4
4
|
export default SeenEffect;
|
package/Selectbox.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { FormFieldWrappingProps } from './FormField';
|
|
|
3
3
|
export { type SelectboxOption, type SelectboxOptions as SelectboxOptionList,
|
|
4
4
|
/** @deprecated Use `SelectboxOptionList` instead (Will be removed in v0.11) */
|
|
5
5
|
type SelectboxOptions, } from '@hugsmidjan/react/Selectbox';
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
type OptionOrValue = _SelectboxProps['options'][0];
|
|
7
|
+
export type SelectboxProps<O extends OptionOrValue = OptionOrValue> = FormFieldWrappingProps & Omit<_SelectboxProps<O>, 'bem'> & {
|
|
8
8
|
small?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const Selectbox: <O extends import("@hugsmidjan/react/__types/Selectbox.privates").OptionOrValue>(props: SelectboxProps<O>) => JSX.Element;
|
package/ShareButtons.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
2
1
|
import { ShareButtonI18n, ShareButtonPlatforms } from '@reykjavik/hanna-utils/shareButtonsUtils';
|
|
3
|
-
|
|
2
|
+
import { SSRSupport } from './utils';
|
|
3
|
+
export type ShareButtonsProps = {
|
|
4
4
|
ssr?: SSRSupport;
|
|
5
5
|
texts?: Readonly<ShareButtonI18n>;
|
|
6
6
|
lang?: string;
|
package/Sharpie.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const colors: {
|
|
|
3
3
|
green: number;
|
|
4
4
|
red: number;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type SharpieColor = keyof typeof colors;
|
|
7
7
|
declare const tags: {
|
|
8
8
|
span: number;
|
|
9
9
|
strong: number;
|
|
@@ -13,8 +13,8 @@ declare const tags: {
|
|
|
13
13
|
u: number;
|
|
14
14
|
s: number;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
export
|
|
16
|
+
type SharpieTag = keyof typeof tags;
|
|
17
|
+
export type SharpieProps = {
|
|
18
18
|
color: SharpieColor;
|
|
19
19
|
tag?: SharpieTag;
|
|
20
20
|
children: ReactNode;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Autosuggest, { RenderSuggestion } from 'react-autosuggest';
|
|
3
3
|
import { BemProps } from '@hugsmidjan/react/types';
|
|
4
4
|
import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
|
|
5
|
-
export
|
|
5
|
+
export type SiteSearchACI18n = {
|
|
6
6
|
lang?: string;
|
|
7
7
|
/** Label for the autocomplete's combobox container div */
|
|
8
8
|
label: string;
|
|
@@ -14,7 +14,7 @@ export declare type SiteSearchACI18n = {
|
|
|
14
14
|
suggestionsLabel: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const defaultSiteSearchACTexts: DefaultTexts<SiteSearchACI18n>;
|
|
17
|
-
export
|
|
17
|
+
export type SiteSearchAutocompleteProps<T> = {
|
|
18
18
|
suggestions: Array<T>;
|
|
19
19
|
renderSuggestion?: RenderSuggestion<T>;
|
|
20
20
|
setSuggestions: (suggestions: Array<T>) => void;
|
package/SiteSearchCurtain.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SiteSearchCurtainProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const SiteSearchCurtain: (props:
|
|
5
|
+
export declare const SiteSearchCurtain: (props: SiteSearchCurtainProps) => JSX.Element;
|
|
6
6
|
export default SiteSearchCurtain;
|
package/SiteSearchCurtain.js
CHANGED
|
@@ -7,29 +7,24 @@ const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
|
7
7
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
8
8
|
const env_1 = require("./utils/env");
|
|
9
9
|
const SiteSearchCurtain = (props) => {
|
|
10
|
-
const [focused, setFocused] = (0,
|
|
11
|
-
|
|
12
|
-
(0, hooks_1.useOnMount)(() => {
|
|
10
|
+
const [focused, setFocused] = (0, hooks_1.useLaggedState)(false);
|
|
11
|
+
(0, react_1.useEffect)(() => {
|
|
13
12
|
const closeSearch = (e) => {
|
|
14
13
|
if (e.key === 'Escape') {
|
|
15
14
|
setFocused(false);
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
17
|
document.addEventListener('keyup', closeSearch);
|
|
19
|
-
return () =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
return () => document.removeEventListener('keyup', closeSearch);
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
+
[]);
|
|
23
22
|
const focusHandler = () => {
|
|
24
|
-
blurTimeout && clearTimeout(blurTimeout);
|
|
25
23
|
setFocused(true);
|
|
26
24
|
};
|
|
27
25
|
const blurHandler = (e) => {
|
|
28
26
|
if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {
|
|
29
|
-
|
|
30
|
-
setFocused(false);
|
|
31
|
-
blurTimeout = undefined;
|
|
32
|
-
}, 100);
|
|
27
|
+
setFocused(false, 100);
|
|
33
28
|
}
|
|
34
29
|
};
|
|
35
30
|
return (react_1.default.createElement("div", Object.assign({ className: (0, getBemClass_1.default)('SiteSearchCurtain', [focused && 'focused']), onFocus: focusHandler, onBlur: blurHandler }, (env_1.isPreact && { onfocusin: focusHandler, onfocusout: blurHandler })), props.children));
|
package/SiteSearchInput.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
3
2
|
import { FormFieldWrappingProps } from './FormField';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { SSRSupport } from './utils';
|
|
4
|
+
type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit'>;
|
|
5
|
+
type WrappingProps = Pick<FormFieldWrappingProps, 'id' | 'label'>;
|
|
6
|
+
export type SiteSearchInputProps = {
|
|
7
7
|
/** Triggered when user hits ENTER key with the focus inside the input field
|
|
8
8
|
*
|
|
9
9
|
* Return `true` to **allow** the browser's default submit hehavior
|
|
@@ -20,5 +20,5 @@ export declare type SiteSearchInputProps = {
|
|
|
20
20
|
children?: never;
|
|
21
21
|
ssr?: SSRSupport;
|
|
22
22
|
} & WrappingProps & InputElmProps;
|
|
23
|
-
export declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "key" | "list" | "
|
|
23
|
+
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" | "pattern" | "value" | "ssr" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "size" | "src" | "multiple" | "alt" | "width" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "maxLength" | "min" | "minLength" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
|
|
24
24
|
export default SiteSearchInput;
|
package/Skeleton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SkeletonProps = {
|
|
3
3
|
text?: boolean;
|
|
4
4
|
height?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
5
5
|
items?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
@@ -15,11 +15,11 @@ export declare const Skeleton: {
|
|
|
15
15
|
export default Skeleton;
|
|
16
16
|
declare const _SkeletonBlock__Brand: unique symbol;
|
|
17
17
|
/** The `<Skeleton height={X}/>` element returned by `Skeleton.block(X)` */
|
|
18
|
-
export
|
|
18
|
+
export type SkeletonBlock = ReactElement & {
|
|
19
19
|
[_SkeletonBlock__Brand]: true;
|
|
20
20
|
};
|
|
21
21
|
declare const _SkeletonText__Brand: unique symbol;
|
|
22
22
|
/** The `<Skeleton text height={X}/>` element returned by `Skeleton.text(X)` */
|
|
23
|
-
export
|
|
23
|
+
export type SkeletonText = ReactElement & {
|
|
24
24
|
[_SkeletonText__Brand]: true;
|
|
25
25
|
};
|
package/SubHeading.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
3
|
import { ComponentLayoutProps } from './constants';
|
|
4
|
-
export
|
|
4
|
+
export type SubHeadingProps = {
|
|
5
5
|
Tag?: 'h2' | 'h3';
|
|
6
6
|
small?: boolean;
|
|
7
7
|
children: ReactNode;
|
package/Tabs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
2
1
|
import { SeenProp } from './utils/seenEffect';
|
|
3
|
-
|
|
2
|
+
import { SSRSupport } from './utils';
|
|
3
|
+
export type TabItemProps = {
|
|
4
4
|
label: string;
|
|
5
5
|
badge?: string | number;
|
|
6
6
|
longLabel?: string;
|
|
@@ -11,8 +11,8 @@ export declare type TabItemProps = {
|
|
|
11
11
|
onActivated?: () => void | false;
|
|
12
12
|
};
|
|
13
13
|
/** @deprecated Use `TabItemProps` instead (Will be removed in v0.11) */
|
|
14
|
-
export
|
|
15
|
-
|
|
14
|
+
export type TabProps = TabItemProps;
|
|
15
|
+
type BaseTabsProps<T extends TabItemProps = TabItemProps> = {
|
|
16
16
|
id?: string;
|
|
17
17
|
'aria-label'?: string;
|
|
18
18
|
'aria-labelledby'?: string;
|
|
@@ -24,12 +24,12 @@ declare type BaseTabsProps<T extends TabItemProps = TabItemProps> = {
|
|
|
24
24
|
activateOnFocus?: boolean;
|
|
25
25
|
ssr?: SSRSupport;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type TabsProps<T extends TabItemProps = TabItemProps> = BaseTabsProps<T> & {
|
|
28
28
|
vertical?: boolean;
|
|
29
29
|
/** Optional <Tabs/> block connected to the currently active tab */
|
|
30
30
|
subTabs?: BaseTabsProps;
|
|
31
31
|
} & SeenProp;
|
|
32
32
|
/** @deprecated Use `TabsProps` instead (Will be removed in v0.11) */
|
|
33
|
-
export
|
|
33
|
+
export type TablistProps<T extends TabItemProps = TabItemProps> = TabsProps<T>;
|
|
34
34
|
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
35
35
|
export default Tabs;
|
package/Tabs.js
CHANGED
|
@@ -4,9 +4,9 @@ exports.Tabs = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
7
|
-
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
8
7
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
9
8
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
10
|
const navKeyEffects = {
|
|
11
11
|
ArrowUp: -1,
|
|
12
12
|
ArrowLeft: -1,
|
|
@@ -51,7 +51,7 @@ const renderTab = (tabProps, index, listProps) => {
|
|
|
51
51
|
const Tabs = (props) => {
|
|
52
52
|
var _a, _b;
|
|
53
53
|
const { tabs, role, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-controls': listAriaControls, id, activeIdx, onSetActive, activateOnFocus, ssr, startSeen, vertical, subTabs, } = props;
|
|
54
|
-
const isBrowser = (0,
|
|
54
|
+
const isBrowser = (0, utils_1.useIsBrowserSide)(ssr);
|
|
55
55
|
const [focusedIdx, setFocusedIdx] = (0, react_1.useState)(activeIdx || 0);
|
|
56
56
|
const tabRole = isBrowser && role === 'tablist' ? 'tab' : undefined;
|
|
57
57
|
const activateTab = (index) => {
|
package/TagPill.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ declare const colors: {
|
|
|
8
8
|
readonly orange: "color--orange";
|
|
9
9
|
readonly red: "color--red";
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type TagPillColor = keyof typeof colors;
|
|
12
|
+
export type TagPillProps = ButtonProps & {
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
large?: boolean;
|
|
15
15
|
color?: TagPillColor;
|
package/TextBlock.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SeenProp } from './utils/seenEffect';
|
|
3
3
|
import { ComponentLayoutProps } from './constants';
|
|
4
|
-
export
|
|
4
|
+
export type TextBlockProps = ComponentLayoutProps & {
|
|
5
5
|
/** Make H2 headings float to the left
|
|
6
6
|
*
|
|
7
7
|
* Overrides the `align` and `wide` prop and automatically sets `align` to `right`
|
package/TextButton.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from './_abstract/_Button';
|
|
3
|
-
export
|
|
3
|
+
export type TextButtonProps = ButtonProps & {
|
|
4
4
|
disabled?: never;
|
|
5
5
|
};
|
|
6
6
|
export declare const TextButton: (props: TextButtonProps & {
|
package/TextInput.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { FormFieldWrappingProps } from './FormField';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
3
|
+
type InputElmProps = JSX.IntrinsicElements['input'];
|
|
4
|
+
type TextareaElmProps = JSX.IntrinsicElements['textarea'];
|
|
5
|
+
export type TextInputProps = {
|
|
6
6
|
small?: boolean;
|
|
7
7
|
children?: never;
|
|
8
8
|
} & FormFieldWrappingProps & (({
|
package/VSpacer.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ declare const sizes: {
|
|
|
8
8
|
readonly large: "large";
|
|
9
9
|
readonly xlarge: "xlarge";
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
11
|
+
type VSpacerSize = keyof typeof sizes;
|
|
12
|
+
type VSpacerSizePos = Exclude<VSpacerSize, 'none'>;
|
|
13
|
+
export type VSpacerProps = EitherObj<{
|
|
14
14
|
size?: VSpacerSizePos;
|
|
15
15
|
}, {
|
|
16
16
|
children: ReactNode;
|
package/VerticalTabsTOC.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TabItemProps, TabsProps } from './Tabs';
|
|
2
|
-
export
|
|
2
|
+
export type VerticalTabsTOCItem = TabItemProps & {
|
|
3
3
|
items?: Array<VerticalTabsTOCSubItem>;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type VerticalTabsTOCSubItem = TabItemProps & {
|
|
6
6
|
type?: never;
|
|
7
7
|
href: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type VerticalTabsTOCProps = {
|
|
10
10
|
items: Array<VerticalTabsTOCItem>;
|
|
11
11
|
onItemSelect: (itemId: string) => void;
|
|
12
12
|
} & Pick<TabsProps, 'aria-label' | 'ssr' | 'activateOnFocus' | 'id' | 'startSeen'>;
|
package/WizardLayout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
3
2
|
import type { HannaColorTheme } from '@reykjavik/hanna-css';
|
|
4
|
-
|
|
3
|
+
import { SSRSupport } from './utils';
|
|
4
|
+
type WizardLayoutProps = {
|
|
5
5
|
wizardStepper?: ReactNode | false;
|
|
6
6
|
wizardFooter?: ReactNode | false;
|
|
7
7
|
colorTheme?: HannaColorTheme;
|
package/WizardLayout.js
CHANGED
|
@@ -3,17 +3,17 @@ 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 hooks_1 = require("@hugsmidjan/react/hooks");
|
|
7
6
|
const assets_1 = require("@reykjavik/hanna-utils/assets");
|
|
8
7
|
const _Image_1 = require("./_abstract/_Image");
|
|
9
8
|
const _Link_1 = require("./_abstract/_Link");
|
|
10
9
|
const useScrollbarWidthCSSVar_1 = require("./utils/useScrollbarWidthCSSVar");
|
|
10
|
+
const utils_1 = require("./utils");
|
|
11
11
|
const WizardLayout = (props) => {
|
|
12
12
|
(0, useScrollbarWidthCSSVar_1.useScrollbarWidthCSSVar)();
|
|
13
13
|
const {
|
|
14
14
|
// ssr,
|
|
15
15
|
wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName = 'Reykjavík', globalAlerts, } = props;
|
|
16
|
-
const isBrowser = (0,
|
|
16
|
+
const isBrowser = (0, utils_1.useIsBrowserSide)( /* ssr */);
|
|
17
17
|
return (react_1.default.createElement("div", { className: "WizardLayout", "data-sprinkled": isBrowser, "data-color-theme": colorTheme },
|
|
18
18
|
globalAlerts && (react_1.default.createElement("div", { className: "WizardLayout__alerts", role: "alert" }, globalAlerts)),
|
|
19
19
|
react_1.default.createElement("div", { className: "WizardLayout__content" },
|
package/WizardStepper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WizardStepperStep = {
|
|
2
2
|
label: string;
|
|
3
3
|
/**
|
|
4
4
|
* Should the step be clickable?
|
|
@@ -22,7 +22,7 @@ export declare type WizardStepperStep = {
|
|
|
22
22
|
*/
|
|
23
23
|
neutral?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type WizardStepperProps = {
|
|
26
26
|
steps: ReadonlyArray<WizardStepperStep>;
|
|
27
27
|
/** Zero-based index of the active (current) step */
|
|
28
28
|
activeStep?: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
3
2
|
import { BemProps } from '@hugsmidjan/react/types';
|
|
4
3
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
4
|
+
import { SSRSupport } from '../utils';
|
|
5
5
|
import { SeenProp } from '../utils/seenEffect';
|
|
6
|
-
export
|
|
6
|
+
export type CarouselProps<I extends Record<string, unknown> = {}, P extends Record<string, unknown> | undefined = {}> = {
|
|
7
7
|
className?: string;
|
|
8
8
|
ssr?: SSRSupport;
|
|
9
9
|
/** @deprecated Ingored because never used (Will be removed in v0.11) */
|
|
@@ -22,7 +22,7 @@ export declare type CarouselProps<I extends Record<string, unknown> = {}, P exte
|
|
|
22
22
|
*/
|
|
23
23
|
itemCount?: number;
|
|
24
24
|
}> & SeenProp;
|
|
25
|
-
|
|
25
|
+
type AbstractCarouselProps<I extends Record<string, unknown> = Record<string, unknown>, P extends Record<string, unknown> | undefined = Record<string, unknown>> = CarouselProps<I, P> & BemProps & {
|
|
26
26
|
title?: string;
|
|
27
27
|
};
|
|
28
28
|
export declare const AbstractCarousel: <I extends Record<string, unknown> = Record<string, unknown>, P extends Record<string, unknown> | undefined = Record<string, unknown>>(props: AbstractCarouselProps<I, P>) => JSX.Element | null;
|
|
@@ -7,10 +7,10 @@ const A_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/A"));
|
|
|
7
7
|
const debounce_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/debounce"));
|
|
8
8
|
const focusElm_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/focusElm"));
|
|
9
9
|
const throttle_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/throttle"));
|
|
10
|
-
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
11
10
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
12
11
|
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
13
12
|
const CarouselStepper_1 = tslib_1.__importDefault(require("../CarouselStepper"));
|
|
13
|
+
const utils_1 = require("../utils");
|
|
14
14
|
const seenEffect_1 = require("../utils/seenEffect");
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
const scrollXBy = (elm, deltaX) => {
|
|
@@ -34,7 +34,7 @@ const AbstractCarousel = (props) => {
|
|
|
34
34
|
const itemCount = props.itemCount || (children || items).length;
|
|
35
35
|
const listRef = (0, react_1.useRef)(null);
|
|
36
36
|
const [activeItem, setActiveItem] = (0, react_1.useState)(0);
|
|
37
|
-
const isBrowser = (0,
|
|
37
|
+
const isBrowser = (0, utils_1.useIsBrowserSide)(ssr);
|
|
38
38
|
// Since listElm gets unmounted and remounted based on isBrowser, we
|
|
39
39
|
// wait for isBrowser is true before setting scroll and resize events.
|
|
40
40
|
const listElm = isBrowser && listRef.current;
|
package/_abstract/_Blings.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BlingType } from '@reykjavik/hanna-utils/assets';
|
|
2
2
|
import { BlingProps } from '../Bling';
|
|
3
|
-
export
|
|
3
|
+
export type BlingComboProps = Array<Omit<BlingProps, 'type' | 'blingUrl'> & {
|
|
4
4
|
type: BlingType;
|
|
5
5
|
}>;
|
|
6
|
-
|
|
6
|
+
type BlingsProps = {
|
|
7
7
|
blings: BlingComboProps;
|
|
8
8
|
mirror?: boolean;
|
|
9
9
|
};
|
package/_abstract/_Block.d.ts
CHANGED
|
@@ -2,20 +2,20 @@ import { BemPropsModifier } from '@hugsmidjan/react/types';
|
|
|
2
2
|
import { SeenProp } from '../utils/seenEffect';
|
|
3
3
|
import { ButtonProps } from './_Button';
|
|
4
4
|
import { ImageProps } from './_Image';
|
|
5
|
-
export
|
|
5
|
+
export type BlockItem = {
|
|
6
6
|
title: string;
|
|
7
7
|
summary?: string | JSX.Element;
|
|
8
8
|
buttons?: Array<ButtonProps>;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ContentImageBlock = {
|
|
11
11
|
content: BlockItem;
|
|
12
12
|
image: ImageProps;
|
|
13
13
|
} & SeenProp;
|
|
14
|
-
export
|
|
14
|
+
export type ContentBlock = {
|
|
15
15
|
content: Array<BlockItem>;
|
|
16
16
|
image?: undefined;
|
|
17
17
|
} & SeenProp;
|
|
18
|
-
export
|
|
18
|
+
export type BlockProps = BemPropsModifier & (ContentBlock | ContentImageBlock);
|
|
19
19
|
export declare const Block: (props: BlockProps & {
|
|
20
20
|
bem: string;
|
|
21
21
|
}) => JSX.Element;
|