@reykjavik/hanna-react 0.10.70 → 0.10.72
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 +1 -1
- package/AccordionList.js +3 -1
- package/ActionCards.d.ts +1 -1
- package/ActionCards.js +3 -1
- package/Alert.d.ts +2 -3
- package/Alert.js +5 -4
- package/ArticleCards.d.ts +4 -2
- package/ArticleCards.js +3 -1
- package/ArticleCarousel/_ArticleCarouselCard.d.ts +1 -1
- package/ArticleCarousel/_ArticleCarouselCard.js +2 -2
- package/ArticleCarousel.d.ts +1 -1
- package/ArticleCarousel.js +5 -3
- package/ArticleMeta.d.ts +1 -1
- package/ArticleMeta.js +3 -1
- package/Attention.d.ts +1 -1
- package/Attention.js +3 -1
- package/BasicTable.d.ts +5 -3
- package/BasicTable.js +3 -1
- package/BgBox.d.ts +1 -1
- package/BgBox.js +3 -1
- package/Bling.d.ts +1 -1
- package/Bling.js +3 -1
- package/BlockBreak.d.ts +1 -1
- package/BlockBreak.js +3 -1
- package/BlockQuote.d.ts +1 -1
- package/BlockQuote.js +4 -2
- package/BreadCrumbs.d.ts +1 -1
- package/BreadCrumbs.js +3 -1
- package/ButtonBack.d.ts +1 -1
- package/ButtonBack.js +5 -3
- package/ButtonPrimary.d.ts +1 -1
- package/ButtonPrimary.js +5 -3
- package/ButtonSecondary.d.ts +1 -1
- package/ButtonSecondary.js +5 -3
- package/ButtonTertiary.d.ts +1 -1
- package/ButtonTertiary.js +5 -3
- package/CHANGELOG.md +41 -0
- package/Carousel.d.ts +1 -1
- package/Carousel.js +5 -3
- package/CarouselStepper.d.ts +1 -1
- package/CarouselStepper.js +3 -1
- package/CenterColumn.d.ts +1 -1
- package/CenterColumn.js +3 -1
- package/Checkbox.d.ts +1 -1
- package/Checkbox.js +5 -3
- package/CheckboxButtonsGroup.d.ts +3 -3
- package/CheckboxButtonsGroup.js +7 -5
- package/CheckboxGroup.d.ts +1 -1
- package/CheckboxGroup.js +5 -3
- package/CityBlock.d.ts +1 -1
- package/CityBlock.js +5 -3
- package/ContactBubble.d.ts +1 -1
- package/ContactBubble.js +3 -2
- package/ContentArticle.d.ts +2 -2
- package/ContentArticle.js +8 -5
- package/ContentImage.d.ts +1 -1
- package/ContentImage.js +5 -3
- package/Datepicker.d.ts +2 -1
- package/Datepicker.js +8 -7
- package/ExtraLinks.d.ts +1 -1
- package/ExtraLinks.js +3 -1
- package/FeatureList.d.ts +1 -1
- package/FeatureList.js +3 -1
- package/FieldGroup.d.ts +1 -1
- package/FieldGroup.js +3 -1
- package/FileInput/_FileInput.utils.d.ts +1 -1
- package/FileInput/_FileInput.utils.js +12 -5
- package/FileInput/_FileInputFileList.js +2 -2
- package/FileInput.d.ts +5 -5
- package/FileInput.js +19 -10
- package/Foonote.d.ts +1 -1
- package/Foonote.js +3 -2
- package/FooterBadges.d.ts +1 -1
- package/FooterBadges.js +3 -1
- package/FooterInfo.d.ts +4 -2
- package/FooterInfo.js +7 -2
- package/Footnote.d.ts +1 -1
- package/Footnote.js +3 -1
- package/Form.d.ts +1 -1
- package/Form.js +3 -1
- package/FormField.d.ts +1 -1
- package/FormField.js +3 -1
- package/Gallery/_GalleryItem.d.ts +1 -2
- package/Gallery/_GalleryItem.js +9 -8
- package/Gallery/_GalleryModal.d.ts +2 -2
- package/Gallery/_GalleryModal.js +6 -5
- package/Gallery/_GalleryModalContext.d.ts +2 -2
- package/Gallery/_GalleryModalContext.js +2 -2
- package/Gallery/_GalleryModalItem.d.ts +1 -2
- package/Gallery/_GalleryModalItem.js +4 -3
- package/Gallery.d.ts +1 -1
- package/Gallery.js +10 -8
- package/GridBlocks.d.ts +1 -1
- package/GridBlocks.js +5 -3
- package/Heading.d.ts +3 -2
- package/Heading.js +5 -2
- package/HeroBlock.d.ts +1 -1
- package/HeroBlock.js +5 -3
- package/IframeBlock.d.ts +3 -1
- package/IframeBlock.js +5 -3
- package/Illustration.d.ts +5 -8
- package/Illustration.js +5 -3
- package/ImageCards.d.ts +3 -3
- package/ImageCards.js +3 -1
- package/InfoBlock.d.ts +8 -12
- package/InfoBlock.js +4 -2
- package/InfoHero.d.ts +1 -1
- package/InfoHero.js +9 -7
- package/IslandBlock.d.ts +1 -1
- package/IslandBlock.js +5 -3
- package/IslandPageBlock.d.ts +1 -1
- package/IslandPageBlock.js +5 -3
- package/LabeledTextBlock.d.ts +1 -1
- package/LabeledTextBlock.js +3 -1
- package/Layout.d.ts +2 -2
- package/Layout.js +5 -4
- package/MainMenu.d.ts +1 -1
- package/MainMenu.js +10 -6
- package/MiniMetrics.d.ts +1 -1
- package/MiniMetrics.js +5 -3
- package/Modal.d.ts +2 -4
- package/Modal.js +3 -1
- package/NameCard.d.ts +1 -1
- package/NameCard.js +7 -5
- package/NameCards.d.ts +1 -1
- package/NameCards.js +3 -1
- package/NewsHero.d.ts +1 -1
- package/NewsHero.js +6 -4
- package/PageFilter.d.ts +1 -1
- package/PageFilter.js +3 -1
- package/PageHeading.d.ts +1 -1
- package/PageHeading.js +3 -1
- package/Picture.d.ts +1 -1
- package/Picture.js +5 -3
- package/ProcessOverview.d.ts +1 -1
- package/ProcessOverview.js +3 -1
- package/PullQuote.d.ts +1 -1
- package/PullQuote.js +3 -1
- package/README.md +6 -1
- package/RadioButtonsGroup.d.ts +3 -3
- package/RadioButtonsGroup.js +7 -5
- package/RadioGroup.d.ts +4 -2
- package/RadioGroup.js +9 -6
- package/RelatedLinks.d.ts +1 -1
- package/RelatedLinks.js +3 -1
- package/RowBlock.d.ts +1 -1
- package/RowBlock.js +3 -1
- package/RowBlockColumn.d.ts +1 -1
- package/RowBlockColumn.js +3 -1
- package/SearchInput.d.ts +2 -2
- package/SearchInput.js +4 -2
- package/SearchResults/_SearchResultsItem.d.ts +2 -2
- package/SearchResults/_SearchResultsItem.js +4 -3
- package/SearchResults.d.ts +1 -1
- package/SearchResults.js +7 -6
- package/SeenEffect.d.ts +1 -1
- package/SeenEffect.js +3 -1
- package/Selectbox.d.ts +1 -1
- package/Selectbox.js +15 -9
- package/ShareButtons.d.ts +2 -2
- package/ShareButtons.js +15 -8
- package/Sharpie.d.ts +1 -1
- package/Sharpie.js +3 -1
- package/SiteSearchAutocomplete.d.ts +2 -2
- package/SiteSearchAutocomplete.js +4 -3
- package/SiteSearchCurtain.d.ts +1 -1
- package/SiteSearchCurtain.js +3 -1
- package/SiteSearchInput.d.ts +2 -2
- package/SiteSearchInput.js +3 -2
- package/Skeleton.d.ts +1 -1
- package/Skeleton.js +5 -3
- package/SubHeading.d.ts +1 -1
- package/SubHeading.js +3 -1
- package/Tabs.d.ts +1 -1
- package/Tabs.js +4 -2
- package/TagPill.d.ts +1 -1
- package/TagPill.js +6 -4
- package/TextBlock.d.ts +1 -1
- package/TextBlock.js +3 -1
- package/TextButton.d.ts +1 -1
- package/TextButton.js +5 -3
- package/TextInput.d.ts +2 -2
- package/TextInput.js +3 -1
- package/VSpacer.d.ts +1 -1
- package/VSpacer.js +3 -1
- package/VerticalTabsTOC.d.ts +1 -1
- package/VerticalTabsTOC.js +3 -1
- package/WizardLayout.d.ts +4 -4
- package/WizardLayout.js +5 -3
- package/WizardLayoutClose.d.ts +1 -1
- package/WizardLayoutClose.js +5 -3
- package/WizardStepper.d.ts +2 -2
- package/WizardStepper.js +5 -2
- package/_abstract/_AbstractCarousel.d.ts +12 -5
- package/_abstract/_AbstractCarousel.js +8 -3
- package/_abstract/_Blings.d.ts +2 -2
- package/_abstract/_Blings.js +2 -1
- package/_abstract/_Block.d.ts +1 -2
- package/_abstract/_Block.js +6 -5
- package/_abstract/_Button.d.ts +2 -2
- package/_abstract/_Button.js +2 -1
- package/_abstract/_CardList.js +4 -4
- package/_abstract/_Image.d.ts +2 -2
- package/_abstract/_Image.js +2 -1
- package/_abstract/_TogglerGroup.d.ts +2 -3
- package/_abstract/_TogglerGroup.js +2 -1
- package/_abstract/_TogglerGroupField.d.ts +2 -2
- package/_abstract/_TogglerGroupField.js +4 -3
- package/_abstract/_TogglerInput.d.ts +3 -3
- package/_abstract/_TogglerInput.js +2 -1
- package/_abstract/breakOnNL.d.ts +1 -2
- package/_abstract/breakOnNL.js +2 -1
- package/assets.js +1 -1
- package/constants.d.ts +8 -28
- package/focus-visible.js +2 -0
- package/package.json +4 -4
package/SearchResults.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchResults = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const react_intersection_observer_1 = require("react-intersection-observer");
|
|
@@ -8,7 +9,7 @@ const range_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/range"));
|
|
|
8
9
|
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
9
10
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
10
11
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
11
|
-
const _SearchResultsItem_1 =
|
|
12
|
+
const _SearchResultsItem_1 = require("./SearchResults/_SearchResultsItem");
|
|
12
13
|
const Alert_1 = tslib_1.__importDefault(require("./Alert"));
|
|
13
14
|
const Tabs_1 = tslib_1.__importDefault(require("./Tabs"));
|
|
14
15
|
const renderDefaultErrorText = () => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -41,7 +42,7 @@ const SearchResults_Tabs = (props) => {
|
|
|
41
42
|
})), [filters, lang]);
|
|
42
43
|
return tabs.length ? (react_1.default.createElement(Tabs_1.default, { role: "tablist", "aria-controls": domid, tabs: tabs, activeIdx: activeIdx || 0, onSetActive: (i) => setFilter && setFilter(i) })) : null;
|
|
43
44
|
};
|
|
44
|
-
const LoadingScaffold = (props) => props.count ? (react_1.default.createElement("ol", { className: "SearchResults__list SearchResults__list--loading" }, (0, range_1.default)(1, props.count).map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.
|
|
45
|
+
const LoadingScaffold = (props) => props.count ? (react_1.default.createElement("ol", { className: "SearchResults__list SearchResults__list--loading" }, (0, range_1.default)(1, props.count).map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.SearchResultsItem, { key: i, title: "...", summary: "", href: "" }))))) : null;
|
|
45
46
|
// ===========================================================================
|
|
46
47
|
const NUM_AUTOLOADS = 2;
|
|
47
48
|
const SearchResults__loadmore = (props) => {
|
|
@@ -72,12 +73,11 @@ const SearchResults__loadmore = (props) => {
|
|
|
72
73
|
// ===========================================================================
|
|
73
74
|
const renderTitle = (props, texts) => {
|
|
74
75
|
const { status, totalHits, query } = props;
|
|
75
|
-
const lang = texts.lang || props.lang || i18n_1.DEFAULT_LANG;
|
|
76
76
|
return (react_1.default.createElement("h2", { className: "SearchResults__title" },
|
|
77
77
|
status === 'loadingquery'
|
|
78
78
|
? texts.loadQueryTitle
|
|
79
79
|
: totalHits
|
|
80
|
-
? (0, prettyNum_1.prettyNum)(totalHits, { lang: lang }) +
|
|
80
|
+
? (0, prettyNum_1.prettyNum)(totalHits, { lang: texts.lang }) +
|
|
81
81
|
' ' +
|
|
82
82
|
texts.resultsTitle
|
|
83
83
|
: texts.noResultsTitle,
|
|
@@ -89,7 +89,7 @@ const renderResults = (props) => {
|
|
|
89
89
|
if (status === 'loadingquery' || status === 'loadingfilter') {
|
|
90
90
|
return react_1.default.createElement(LoadingScaffold, { count: Math.min(pageSize, hits || 999) });
|
|
91
91
|
}
|
|
92
|
-
return items && items.length ? (react_1.default.createElement("ol", { className: "SearchResults__list" }, items.map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.
|
|
92
|
+
return items && items.length ? (react_1.default.createElement("ol", { className: "SearchResults__list" }, items.map((item, i) => (react_1.default.createElement(_SearchResultsItem_1.SearchResultsItem, Object.assign({ key: i }, item)))))) : null;
|
|
93
93
|
};
|
|
94
94
|
// ---------------------------------------------------------------------------
|
|
95
95
|
const renderLoadMore = (props, texts) => {
|
|
@@ -109,4 +109,5 @@ const SearchResults = (props) => {
|
|
|
109
109
|
status === 'error' && (react_1.default.createElement(Alert_1.default, { type: "error" }, errorText || renderDefaultErrorText())),
|
|
110
110
|
renderLoadMore(props, texts))));
|
|
111
111
|
};
|
|
112
|
-
exports.
|
|
112
|
+
exports.SearchResults = SearchResults;
|
|
113
|
+
exports.default = exports.SearchResults;
|
package/SeenEffect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EffectProp, SeenProp } from './utils/seenEffect';
|
|
2
2
|
export declare type SeenEffectProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & SeenProp & EffectProp;
|
|
3
|
-
declare const SeenEffect: (props: SeenEffectProps) => JSX.Element;
|
|
3
|
+
export declare const SeenEffect: (props: SeenEffectProps) => JSX.Element;
|
|
4
4
|
export default SeenEffect;
|
package/SeenEffect.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SeenEffect = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const seenEffect_1 = require("./utils/seenEffect");
|
|
@@ -8,4 +9,5 @@ const SeenEffect = (props) => {
|
|
|
8
9
|
const [ref] = (0, seenEffect_1.useSeenEffect)(startSeen);
|
|
9
10
|
return react_1.default.createElement("div", Object.assign({}, divProps, { ref: ref }, (0, seenEffect_1.getEffectAttr)(effectType)));
|
|
10
11
|
};
|
|
11
|
-
exports.
|
|
12
|
+
exports.SeenEffect = SeenEffect;
|
|
13
|
+
exports.default = exports.SeenEffect;
|
package/Selectbox.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ declare type OptionOrValue = _SelectboxProps['options'][0];
|
|
|
7
7
|
export declare type SelectboxProps<O extends OptionOrValue = OptionOrValue> = FormFieldWrappingProps & Omit<_SelectboxProps<O>, 'bem'> & {
|
|
8
8
|
small?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare const Selectbox: <O extends import("@hugsmidjan/react/__types/Selectbox.privates").OptionOrValue>(props: SelectboxProps<O>) => JSX.Element;
|
|
10
|
+
export declare const Selectbox: <O extends import("@hugsmidjan/react/__types/Selectbox.privates").OptionOrValue>(props: SelectboxProps<O>) => JSX.Element;
|
|
11
11
|
export default Selectbox;
|
package/Selectbox.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Selectbox = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const Selectbox_1 = tslib_1.__importDefault(require("@hugsmidjan/react/Selectbox"));
|
|
@@ -10,7 +11,6 @@ const getValue = (opt) => {
|
|
|
10
11
|
return typeof val === 'number' ? String(val) : val;
|
|
11
12
|
};
|
|
12
13
|
const Selectbox = (props) => {
|
|
13
|
-
var _a;
|
|
14
14
|
const { className, label, assistText, hideLabel, disabled, readOnly, reqText, invalid, errorMessage, required, id, ssr, onChange, small } = props, selectProps = tslib_1.__rest(props, ["className", "label", "assistText", "hideLabel", "disabled", "readOnly", "reqText", "invalid", "errorMessage", "required", "id", "ssr", "onChange", "small"]);
|
|
15
15
|
const { value, defaultValue, placeholder, options } = selectProps;
|
|
16
16
|
const _selectRef = (0, react_1.useRef)(null);
|
|
@@ -19,13 +19,15 @@ const Selectbox = (props) => {
|
|
|
19
19
|
const [isFilled, setIsFilled] = (0, react_1.useState)(() => !!getInitialValue());
|
|
20
20
|
const [isEmpty, setIsEmpty] = (0, react_1.useState)(() => !getInitialValue() && !placeholder);
|
|
21
21
|
(0, react_1.useEffect)(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
var _a;
|
|
24
|
+
const selectElm = selectRef.current;
|
|
25
|
+
if (selectElm) {
|
|
26
|
+
setIsFilled(!!selectElm.value);
|
|
27
|
+
setIsEmpty(!((_a = selectElm.selectedOptions[0]) === null || _a === void 0 ? void 0 : _a.text));
|
|
28
|
+
}
|
|
29
|
+
}, 0);
|
|
30
|
+
}, [selectRef, value, defaultValue, options]);
|
|
29
31
|
const _onChange = (e) => {
|
|
30
32
|
var _a;
|
|
31
33
|
const selectElm = e.currentTarget;
|
|
@@ -35,4 +37,8 @@ const Selectbox = (props) => {
|
|
|
35
37
|
};
|
|
36
38
|
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)('Selectbox', null, className), ssr: ssr, small: small, label: label, empty: isEmpty, filled: isFilled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement(Selectbox_1.default, Object.assign({ bem: className.input, ssr: ssr, onChange: _onChange }, inputProps, addFocusProps(selectProps), { selectRef: selectRef }))) }));
|
|
37
39
|
};
|
|
38
|
-
exports.
|
|
40
|
+
exports.Selectbox = Selectbox;
|
|
41
|
+
// /** @deprecated Use named export instead (The default export will be removed in v0.11+) */
|
|
42
|
+
// const SelectboxDefault = Selectbox;
|
|
43
|
+
// export default SelectboxDefault;
|
|
44
|
+
exports.default = exports.Selectbox;
|
package/ShareButtons.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { SSRSupport } from '@hugsmidjan/react/hooks';
|
|
|
2
2
|
import { ShareButtonI18n, ShareButtonPlatforms } from '@reykjavik/hanna-utils/shareButtonsUtils';
|
|
3
3
|
export declare type ShareButtonsProps = {
|
|
4
4
|
ssr?: SSRSupport;
|
|
5
|
-
children?: undefined;
|
|
6
5
|
texts?: Readonly<ShareButtonI18n>;
|
|
6
|
+
lang?: string;
|
|
7
7
|
} & Partial<Record<ShareButtonPlatforms, boolean>>;
|
|
8
|
-
declare const ShareButtons: (props: ShareButtonsProps) => JSX.Element | null;
|
|
8
|
+
export declare const ShareButtons: (props: ShareButtonsProps) => JSX.Element | null;
|
|
9
9
|
export default ShareButtons;
|
package/ShareButtons.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareButtons = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
5
7
|
const shareButtonsUtils_1 = require("@reykjavik/hanna-utils/shareButtonsUtils");
|
|
6
8
|
const _Link_1 = require("./_abstract/_Link");
|
|
7
9
|
const generateTypeList = (facebook, twitter, linkedin, email) => {
|
|
@@ -22,24 +24,28 @@ const ShareButtons__item = (props) => {
|
|
|
22
24
|
react_1.default.createElement(_Link_1.Link, { className: 'ShareButtons__link ShareButtons__link--' + type, href: href, title: buttonText, rel: "noopener noreferrer", target: popup ? '_blank' : undefined, onClick: popup ? shareButtonsUtils_1.openInPopup : undefined }, buttonText)));
|
|
23
25
|
};
|
|
24
26
|
const ShareButtons = (props) => {
|
|
25
|
-
const { texts, ssr, facebook = true, twitter = true, linkedin, email, } = props;
|
|
27
|
+
const { texts, lang, ssr, facebook = true, twitter = true, linkedin, email, } = props;
|
|
26
28
|
const [docMeta, setDocMeta] = (0, react_1.useState)();
|
|
27
29
|
const href = docLoc.href; // assign to local variable to silence `react-hooks/exhaustive-deps`
|
|
28
30
|
(0, react_1.useEffect)(() => {
|
|
29
31
|
// FIXME: Drop dependency on _loc.href and set up proper
|
|
30
32
|
// location/route monitoring event handler, with unsubscribe on unmount
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
setDocMeta((0, shareButtonsUtils_1.getDocMeta)({
|
|
34
|
+
lang,
|
|
35
|
+
emailSubject: texts && texts.emailSubject,
|
|
36
|
+
}));
|
|
37
|
+
}, [texts, lang, href]);
|
|
34
38
|
if (!facebook && !twitter && !linkedin && !email) {
|
|
35
39
|
// no place to share
|
|
36
40
|
return null;
|
|
37
41
|
}
|
|
38
|
-
const txt = texts ||
|
|
39
|
-
|
|
42
|
+
const txt = texts ||
|
|
43
|
+
(docMeta && (shareButtonsUtils_1.shareButtonTexts[docMeta.lang] || shareButtonsUtils_1.shareButtonTexts[i18n_1.DEFAULT_LANG])) ||
|
|
44
|
+
{};
|
|
45
|
+
const { label, buttonLabel, emailSubject } = txt;
|
|
40
46
|
if (!docMeta || ssr === 'ssr-only') {
|
|
41
47
|
// Generate SSR markup for hanna-sprinkles to pick up on.
|
|
42
|
-
return (react_1.default.createElement("div", { className: "ShareButtons", "data-button-types": generateTypeList(facebook, twitter, linkedin, email), "data-label": label, "data-buttonlabel": buttonLabel, "data-emailsubject":
|
|
48
|
+
return (react_1.default.createElement("div", { className: "ShareButtons", "data-button-types": generateTypeList(facebook, twitter, linkedin, email), "data-label": label, "data-buttonlabel": buttonLabel, "data-emailsubject": emailSubject || undefined }));
|
|
43
49
|
}
|
|
44
50
|
const showTypes = {
|
|
45
51
|
facebook,
|
|
@@ -51,4 +57,5 @@ const ShareButtons = (props) => {
|
|
|
51
57
|
label && react_1.default.createElement("strong", { className: "ShareButtons__label" }, label),
|
|
52
58
|
react_1.default.createElement("ul", { className: "ShareButtons__list" }, shareButtonsUtils_1.shareButtonTypes.map((type) => showTypes[type] && (react_1.default.createElement(ShareButtons__item, { key: type, type: type, label: buttonLabel || '', href: docMeta.hrefs[type] }))))));
|
|
53
59
|
};
|
|
54
|
-
exports.
|
|
60
|
+
exports.ShareButtons = ShareButtons;
|
|
61
|
+
exports.default = exports.ShareButtons;
|
package/Sharpie.d.ts
CHANGED
package/Sharpie.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sharpie = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
@@ -22,4 +23,5 @@ const Sharpie = (props) => {
|
|
|
22
23
|
const Tag = tag && tags[tag] ? tag : 'span';
|
|
23
24
|
return react_1.default.createElement(Tag, { className: (0, getBemClass_1.default)('Sharpie', colorModifier) }, children);
|
|
24
25
|
};
|
|
25
|
-
exports.
|
|
26
|
+
exports.Sharpie = Sharpie;
|
|
27
|
+
exports.default = exports.Sharpie;
|
|
@@ -16,7 +16,7 @@ export declare type SiteSearchACI18n = {
|
|
|
16
16
|
export declare const defaultSiteSearchACTexts: DefaultTexts<SiteSearchACI18n>;
|
|
17
17
|
export declare type SiteSearchAutocompleteProps<T> = {
|
|
18
18
|
suggestions: Array<T>;
|
|
19
|
-
renderSuggestion
|
|
19
|
+
renderSuggestion?: RenderSuggestion<T>;
|
|
20
20
|
setSuggestions: (suggestions: Array<T>) => void;
|
|
21
21
|
getSuggestionValue: (suggestion: T) => string;
|
|
22
22
|
onSuggestionsFetchRequested: (request: Autosuggest.SuggestionsFetchRequestedParams) => void;
|
|
@@ -36,5 +36,5 @@ export declare type SiteSearchAutocompleteProps<T> = {
|
|
|
36
36
|
/** @deprecated Use `text` prop instead (will be removed in v0.11) */
|
|
37
37
|
label?: string;
|
|
38
38
|
} & BemProps;
|
|
39
|
-
declare const SiteSearchAutocomplete: <T>(props: SiteSearchAutocompleteProps<T>) => JSX.Element;
|
|
39
|
+
export declare const SiteSearchAutocomplete: <T>(props: SiteSearchAutocompleteProps<T>) => JSX.Element;
|
|
40
40
|
export default SiteSearchAutocomplete;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultSiteSearchACTexts = void 0;
|
|
3
|
+
exports.SiteSearchAutocomplete = exports.defaultSiteSearchACTexts = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_autosuggest_1 = tslib_1.__importDefault(require("react-autosuggest"));
|
|
@@ -35,7 +35,7 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
35
35
|
suggestionsList: bem + '__list',
|
|
36
36
|
suggestion: bem + '__item',
|
|
37
37
|
suggestionHighlighted: bem + '__item--highlighted',
|
|
38
|
-
}, focusInputOnSuggestionClick: true, suggestions: suggestions, onSuggestionsClearRequested: () => setSuggestions([]), onSuggestionsFetchRequested: onSuggestionsFetchRequested, getSuggestionValue: getSuggestionValue, onSuggestionSelected: onSuggestionSelected, onSuggestionHighlighted: onSuggestionHighlighted, renderSuggestion: renderSuggestion, containerProps: { 'aria-label': txt.label }, renderSuggestionsContainer: ({ containerProps, children }) => (react_1.default.createElement("div", Object.assign({}, containerProps, { "aria-label": txt.suggestionsLabel }), children)), inputProps: {
|
|
38
|
+
}, focusInputOnSuggestionClick: true, suggestions: suggestions, onSuggestionsClearRequested: () => setSuggestions([]), onSuggestionsFetchRequested: onSuggestionsFetchRequested, getSuggestionValue: getSuggestionValue, onSuggestionSelected: onSuggestionSelected, onSuggestionHighlighted: onSuggestionHighlighted, renderSuggestion: renderSuggestion || ((s) => String(s)), containerProps: { 'aria-label': txt.label }, renderSuggestionsContainer: ({ containerProps, children }) => (react_1.default.createElement("div", Object.assign({}, containerProps, { "aria-label": suggestions.length ? txt.suggestionsLabel : undefined }), children)), inputProps: {
|
|
39
39
|
ref: inputRef,
|
|
40
40
|
value: value,
|
|
41
41
|
onChange: (_, { newValue }) => {
|
|
@@ -48,4 +48,5 @@ const SiteSearchAutocomplete = (props) => {
|
|
|
48
48
|
return (react_1.default.createElement(SiteSearchInput_1.default, Object.assign({}, siteSearchProps, { label: props.label || txt.inputLabel, placeholder: txt.placeholder, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
|
|
49
49
|
} }));
|
|
50
50
|
};
|
|
51
|
-
exports.
|
|
51
|
+
exports.SiteSearchAutocomplete = SiteSearchAutocomplete;
|
|
52
|
+
exports.default = exports.SiteSearchAutocomplete;
|
package/SiteSearchCurtain.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export declare type SiteSearchCurtain = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
5
|
-
declare const SiteSearchCurtain: (props: SiteSearchCurtain) => JSX.Element;
|
|
5
|
+
export declare const SiteSearchCurtain: (props: SiteSearchCurtain) => JSX.Element;
|
|
6
6
|
export default SiteSearchCurtain;
|
package/SiteSearchCurtain.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SiteSearchCurtain = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const hooks_1 = require("@hugsmidjan/react/hooks");
|
|
@@ -33,4 +34,5 @@ const SiteSearchCurtain = (props) => {
|
|
|
33
34
|
};
|
|
34
35
|
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));
|
|
35
36
|
};
|
|
36
|
-
exports.
|
|
37
|
+
exports.SiteSearchCurtain = SiteSearchCurtain;
|
|
38
|
+
exports.default = exports.SiteSearchCurtain;
|
package/SiteSearchInput.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ export declare type SiteSearchInputProps = {
|
|
|
17
17
|
*/
|
|
18
18
|
onButtonClick?: () => boolean | void;
|
|
19
19
|
buttonText?: string;
|
|
20
|
-
children?:
|
|
20
|
+
children?: never;
|
|
21
21
|
ssr?: SSRSupport;
|
|
22
22
|
} & WrappingProps & InputElmProps;
|
|
23
|
-
declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "pattern" | "is" | "value" | "defaultValue" | "id" | "ssr" | "children" | "hidden" | "onClick" | "key" | "list" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "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" | "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" | "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" | "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" | "size" | "step" | "src" | "multiple" | "alt" | "width" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "maxLength" | "min" | "minLength" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "pattern" | "is" | "value" | "defaultValue" | "id" | "ssr" | "children" | "hidden" | "onClick" | "key" | "list" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "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" | "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" | "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" | "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" | "size" | "step" | "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/SiteSearchInput.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SiteSearchInput = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const FormField_1 = tslib_1.__importDefault(require("./FormField"));
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
7
|
-
|
|
8
|
+
exports.SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
8
9
|
var _a;
|
|
9
10
|
const { label, id, onChange, placeholder = typeof label === 'string' ? label : undefined, buttonText = 'Leita', onSubmit, onButtonClick = onSubmit, onKeyDown, ssr } = props, inputElementProps = tslib_1.__rest(props, ["label", "id", "onChange", "placeholder", "buttonText", "onSubmit", "onButtonClick", "onKeyDown", "ssr"]);
|
|
10
11
|
const { value, defaultValue } = inputElementProps;
|
|
@@ -29,4 +30,4 @@ const SiteSearchInput = react_1.default.forwardRef((props, ref) => {
|
|
|
29
30
|
' ',
|
|
30
31
|
react_1.default.createElement("button", { className: "SiteSearchInput__button", type: "submit", onClick: onButtonClick && ((e) => !onButtonClick() && e.preventDefault()), title: buttonText }, buttonText))) }));
|
|
31
32
|
});
|
|
32
|
-
exports.default = SiteSearchInput;
|
|
33
|
+
exports.default = exports.SiteSearchInput;
|
package/Skeleton.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare type SkeletonProps = {
|
|
|
5
5
|
items?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
6
6
|
gap?: 1 | 2 | 3 | 4 | 5;
|
|
7
7
|
};
|
|
8
|
-
declare const Skeleton: {
|
|
8
|
+
export declare const Skeleton: {
|
|
9
9
|
(props: SkeletonProps): JSX.Element;
|
|
10
10
|
/** Returns a single `<Skeleton height={X}/>` element of branded type `SkeletonBlock` */
|
|
11
11
|
block(height?: SkeletonProps['height']): SkeletonBlock;
|
package/Skeleton.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Skeleton = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const range_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/range"));
|
|
@@ -26,8 +27,9 @@ const Skeleton = (props) => {
|
|
|
26
27
|
}
|
|
27
28
|
return renderSkeleton();
|
|
28
29
|
};
|
|
29
|
-
exports.
|
|
30
|
+
exports.Skeleton = Skeleton;
|
|
31
|
+
exports.default = exports.Skeleton;
|
|
30
32
|
/** Returns a single `<Skeleton height={X}/>` element of branded type `SkeletonBlock` */
|
|
31
|
-
Skeleton.block = (height) => (react_1.default.createElement(Skeleton, { height: height }));
|
|
33
|
+
exports.Skeleton.block = (height) => (react_1.default.createElement(exports.Skeleton, { height: height }));
|
|
32
34
|
/** Returns a single `<Skeleton text height={X}/>` element of branded type `SkeletonText` */
|
|
33
|
-
Skeleton.text = (height) => (react_1.default.createElement(Skeleton, { text: true, height: height }));
|
|
35
|
+
exports.Skeleton.text = (height) => (react_1.default.createElement(exports.Skeleton, { text: true, height: height }));
|
package/SubHeading.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export declare type SubHeadingProps = {
|
|
|
6
6
|
small?: boolean;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
} & ComponentLayoutProps & SeenProp;
|
|
9
|
-
declare const SubHeading: (props: SubHeadingProps) => JSX.Element;
|
|
9
|
+
export declare const SubHeading: (props: SubHeadingProps) => JSX.Element;
|
|
10
10
|
export default SubHeading;
|
package/SubHeading.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubHeading = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
@@ -13,4 +14,5 @@ const SubHeading = (props) => {
|
|
|
13
14
|
!align && wide && 'wide',
|
|
14
15
|
]), ref: ref }, children));
|
|
15
16
|
};
|
|
16
|
-
exports.
|
|
17
|
+
exports.SubHeading = SubHeading;
|
|
18
|
+
exports.default = exports.SubHeading;
|
package/Tabs.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export declare type TabsProps<T extends TabItemProps = TabItemProps> = BaseTabsP
|
|
|
31
31
|
} & SeenProp;
|
|
32
32
|
/** @deprecated Use `TabsProps` instead (Will be removed in v0.11) */
|
|
33
33
|
export declare type TablistProps<T extends TabItemProps = TabItemProps> = TabsProps<T>;
|
|
34
|
-
declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
34
|
+
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
35
35
|
export default Tabs;
|
package/Tabs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tabs = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
@@ -90,8 +91,9 @@ const Tabs = (props) => {
|
|
|
90
91
|
};
|
|
91
92
|
return (react_1.default.createElement("div", { className: (0, getBemClass_1.default)('Tabs', vertical && 'vertical'), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser, ref: ref },
|
|
92
93
|
tabs.map((tabProps, index) => renderTab(tabProps, index, listProps)),
|
|
93
|
-
subTabs && (react_1.default.createElement(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,
|
|
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,
|
|
94
95
|
// just to be sure
|
|
95
96
|
vertical: undefined, subTabs: undefined })))));
|
|
96
97
|
};
|
|
97
|
-
exports.
|
|
98
|
+
exports.Tabs = Tabs;
|
|
99
|
+
exports.default = exports.Tabs;
|
package/TagPill.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export declare type TagPillProps = ButtonProps & {
|
|
|
21
21
|
removeLabel?: string;
|
|
22
22
|
removeLabelLong?: string;
|
|
23
23
|
}>;
|
|
24
|
-
declare const TagPill: (props: TagPillProps) => JSX.Element;
|
|
24
|
+
export declare const TagPill: (props: TagPillProps) => JSX.Element;
|
|
25
25
|
export default TagPill;
|
package/TagPill.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagPill = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
6
|
-
const _Button_1 =
|
|
7
|
+
const _Button_1 = require("./_abstract/_Button");
|
|
7
8
|
const colors = {
|
|
8
9
|
normal: '',
|
|
9
10
|
green: 'color--green',
|
|
@@ -26,11 +27,12 @@ const TagPill = (props) => {
|
|
|
26
27
|
label,
|
|
27
28
|
" ",
|
|
28
29
|
removeBtn)) : onRemove ? (react_1.default.createElement("span", { className: (0, getBemClass_1.default)('TagPill', modifiers) },
|
|
29
|
-
react_1.default.createElement(_Button_1.
|
|
30
|
+
react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "TagPill__button" }, buttonProps), label),
|
|
30
31
|
' ',
|
|
31
|
-
removeBtn)) : (react_1.default.createElement(_Button_1.
|
|
32
|
+
removeBtn)) : (react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "TagPill" }, buttonProps, { modifier: modifiers }),
|
|
32
33
|
label,
|
|
33
34
|
' ',
|
|
34
35
|
removable && (react_1.default.createElement("span", { className: "TagPill__remove", "aria-label": removeLabelLong }, removeLabel))));
|
|
35
36
|
};
|
|
36
|
-
exports.
|
|
37
|
+
exports.TagPill = TagPill;
|
|
38
|
+
exports.default = exports.TagPill;
|
package/TextBlock.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export declare type TextBlockProps = ComponentLayoutProps & {
|
|
|
11
11
|
small?: boolean;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
} & SeenProp;
|
|
14
|
-
declare const TextBlock: (props: TextBlockProps) => JSX.Element;
|
|
14
|
+
export declare const TextBlock: (props: TextBlockProps) => JSX.Element;
|
|
15
15
|
export default TextBlock;
|
package/TextBlock.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextBlock = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
@@ -15,4 +16,5 @@ const TextBlock = (props) => {
|
|
|
15
16
|
small && !labelled && 'small',
|
|
16
17
|
]), ref: ref }, children));
|
|
17
18
|
};
|
|
18
|
-
exports.
|
|
19
|
+
exports.TextBlock = TextBlock;
|
|
20
|
+
exports.default = exports.TextBlock;
|
package/TextButton.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonProps } from './_abstract/_Button';
|
|
|
3
3
|
export declare type TextButtonProps = ButtonProps & {
|
|
4
4
|
disabled?: never;
|
|
5
5
|
};
|
|
6
|
-
declare const TextButton: (props: TextButtonProps & {
|
|
6
|
+
export declare const TextButton: (props: TextButtonProps & {
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
}) => JSX.Element;
|
|
9
9
|
export default TextButton;
|
package/TextButton.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextButton = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const _Button_1 =
|
|
6
|
+
const _Button_1 = require("./_abstract/_Button");
|
|
6
7
|
const TextButton = (props) => {
|
|
7
8
|
if ('disabled' in props) {
|
|
8
9
|
props = Object.assign(Object.assign({}, props), { disabled: undefined });
|
|
9
10
|
}
|
|
10
|
-
return react_1.default.createElement(_Button_1.
|
|
11
|
+
return react_1.default.createElement(_Button_1.Button, Object.assign({ bem: "TextButton" }, props));
|
|
11
12
|
};
|
|
12
|
-
exports.
|
|
13
|
+
exports.TextButton = TextButton;
|
|
14
|
+
exports.default = exports.TextButton;
|
package/TextInput.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare type InputElmProps = JSX.IntrinsicElements['input'];
|
|
|
4
4
|
declare type TextareaElmProps = JSX.IntrinsicElements['textarea'];
|
|
5
5
|
export declare type TextInputProps = {
|
|
6
6
|
small?: boolean;
|
|
7
|
-
children?:
|
|
7
|
+
children?: never;
|
|
8
8
|
} & FormFieldWrappingProps & (({
|
|
9
9
|
type?: 'text' | 'email' | 'tel' | 'number' | 'date' | 'url' | 'password' | 'search';
|
|
10
10
|
inputRef?: RefObject<HTMLInputElement>;
|
|
@@ -12,5 +12,5 @@ export declare type TextInputProps = {
|
|
|
12
12
|
type: 'textarea';
|
|
13
13
|
inputRef?: RefObject<HTMLTextAreaElement>;
|
|
14
14
|
} & TextareaElmProps));
|
|
15
|
-
declare const TextInput: (props: TextInputProps) => JSX.Element;
|
|
15
|
+
export declare const TextInput: (props: TextInputProps) => JSX.Element;
|
|
16
16
|
export default TextInput;
|
package/TextInput.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextInput = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
@@ -31,4 +32,5 @@ const TextInput = (props) => {
|
|
|
31
32
|
}, []);
|
|
32
33
|
return (react_1.default.createElement(FormField_1.default, { className: (0, getBemClass_1.default)('TextInput', modifiers, className), ssr: ssr, small: small, label: label, empty: empty, filled: filled, assistText: assistText, hideLabel: hideLabel, disabled: disabled, readOnly: readOnly, invalid: invalid, errorMessage: errorMessage, required: required, reqText: reqText, id: id, 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 }))) }));
|
|
33
34
|
};
|
|
34
|
-
exports.
|
|
35
|
+
exports.TextInput = TextInput;
|
|
36
|
+
exports.default = exports.TextInput;
|
package/VSpacer.d.ts
CHANGED
package/VSpacer.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VSpacer = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const getBemClass_1 = tslib_1.__importDefault(require("@hugsmidjan/react/utils/getBemClass"));
|
|
@@ -41,4 +42,5 @@ const VSpacer = (props) => {
|
|
|
41
42
|
]);
|
|
42
43
|
return isWrapper ? (react_1.default.createElement("div", { className: className }, children)) : (react_1.default.createElement("hr", { className: className }));
|
|
43
44
|
};
|
|
44
|
-
exports.
|
|
45
|
+
exports.VSpacer = VSpacer;
|
|
46
|
+
exports.default = exports.VSpacer;
|
package/VerticalTabsTOC.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export declare type VerticalTabsTOCProps = {
|
|
|
10
10
|
items: Array<VerticalTabsTOCItem>;
|
|
11
11
|
onItemSelect: (itemId: string) => void;
|
|
12
12
|
} & Pick<TabsProps, 'aria-label' | 'ssr' | 'activateOnFocus' | 'id' | 'startSeen'>;
|
|
13
|
-
declare const VerticalTabsTOC: (props: VerticalTabsTOCProps) => JSX.Element;
|
|
13
|
+
export declare const VerticalTabsTOC: (props: VerticalTabsTOCProps) => JSX.Element;
|
|
14
14
|
export default VerticalTabsTOC;
|
package/VerticalTabsTOC.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerticalTabsTOC = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
@@ -68,4 +69,5 @@ const VerticalTabsTOC = (props) => {
|
|
|
68
69
|
(0, frag_1.setFrag)(newId);
|
|
69
70
|
}, tabs: updatedItems, role: "tablist", activeIdx: state.activeIdx, subTabs: state.subTabs }));
|
|
70
71
|
};
|
|
71
|
-
exports.
|
|
72
|
+
exports.VerticalTabsTOC = VerticalTabsTOC;
|
|
73
|
+
exports.default = exports.VerticalTabsTOC;
|