@reykjavik/hanna-react 0.10.136 → 0.10.138
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.js +3 -3
- package/ActionCards.js +2 -2
- package/Alert.js +2 -2
- package/ArticleMeta.js +2 -2
- package/Attention.js +2 -2
- package/AutosuggestSearch.js +3 -3
- package/BasicTable.js +2 -2
- package/BgBox.js +2 -2
- package/Bling.js +2 -2
- package/BreadCrumbs.js +2 -2
- package/ButtonBar.js +3 -3
- package/CHANGELOG.md +13 -0
- package/CarouselStepper.js +2 -2
- package/CenterColumn.js +2 -2
- package/ContactBubble.js +3 -3
- package/ContentArticle.js +2 -2
- package/ContentImage.js +2 -2
- package/ExtraLinks.js +3 -3
- package/FeatureList.js +2 -2
- package/FieldGroup.js +2 -2
- package/FileInput.js +3 -3
- package/FooterInfo.js +3 -3
- package/Footnote.js +2 -2
- package/Form.js +2 -2
- package/FormField.js +2 -2
- package/GridBlocks.js +2 -2
- package/Heading.js +2 -2
- package/HeroBlock.js +2 -2
- package/IframeBlock.js +2 -2
- package/IframedLayout.js +2 -2
- package/ImageCards.js +2 -2
- package/InfoBlock.js +2 -2
- package/InfoHero.js +2 -2
- package/LabeledTextBlock.js +2 -2
- package/Layout.js +2 -2
- package/MainMenu/_Auxiliary.js +2 -2
- package/MainMenu/_PrimaryPanel.js +3 -3
- package/MainMenu.d.ts +2 -3
- package/MainMenu.js +4 -4
- package/MainMenu2.d.ts +2 -3
- package/MainMenu2.js +4 -4
- package/MiniMetrics.js +2 -2
- package/Multiselect.js +4 -5
- package/NameCard.js +3 -3
- package/NameCards.js +2 -2
- package/NewsHero.js +1 -2
- package/PageFilter.js +2 -2
- package/PageHeading.js +2 -2
- package/Pagination.js +4 -4
- package/ProcessOverview.js +2 -2
- package/README.md +1 -1
- package/ReadSpeakerPlayer.js +2 -2
- package/RelatedLinks.js +2 -2
- package/RowBlock.js +2 -2
- package/RowBlockColumn.js +2 -2
- package/SearchResults.js +2 -2
- package/ShareButtons.js +2 -2
- package/Sharpie.js +2 -2
- package/SiteSearchCurtain.js +2 -2
- package/Skeleton.js +2 -2
- package/SubHeading.js +2 -2
- package/Tabs.js +2 -2
- package/TagPill.js +3 -3
- package/TextBlock.js +2 -2
- package/TextInput.js +2 -2
- package/Tooltip.js +3 -3
- package/VSpacer.js +2 -2
- package/WizardLayout.js +2 -2
- package/WizardStepper.js +3 -3
- package/_abstract/_AbstractCarousel.js +1 -2
- package/_abstract/_AbstractModal.js +3 -3
- package/_abstract/_Block.js +2 -2
- package/_abstract/_Button.js +2 -2
- package/_abstract/_CardList.d.ts +3 -2
- package/_abstract/_CardList.js +4 -4
- package/_abstract/_CarouselPaging.js +2 -2
- package/_abstract/_Image.js +3 -3
- package/_abstract/_Quote.js +2 -2
- package/_abstract/_ScrollWrapper.js +2 -2
- package/_abstract/_Table.js +2 -3
- package/_abstract/_TogglerGroup.js +2 -2
- package/_abstract/_TogglerGroupField.js +2 -2
- package/_abstract/_TogglerInput.js +2 -2
- package/esm/AccordionList.js +1 -1
- package/esm/ActionCards.js +1 -1
- package/esm/Alert.js +1 -1
- package/esm/ArticleMeta.js +1 -1
- package/esm/Attention.js +1 -1
- package/esm/AutosuggestSearch.js +1 -1
- package/esm/BasicTable.js +1 -1
- package/esm/BgBox.js +1 -1
- package/esm/Bling.js +1 -1
- package/esm/BreadCrumbs.js +1 -1
- package/esm/ButtonBar.js +1 -1
- package/esm/CarouselStepper.js +1 -1
- package/esm/CenterColumn.js +1 -1
- package/esm/ContactBubble.js +1 -1
- package/esm/ContentArticle.js +1 -1
- package/esm/ContentImage.js +1 -1
- package/esm/ExtraLinks.js +1 -1
- package/esm/FeatureList.js +1 -1
- package/esm/FieldGroup.js +1 -1
- package/esm/FileInput.js +1 -1
- package/esm/FooterInfo.js +1 -1
- package/esm/Footnote.js +1 -1
- package/esm/Form.js +1 -1
- package/esm/FormField.js +1 -1
- package/esm/GridBlocks.js +1 -1
- package/esm/Heading.js +1 -1
- package/esm/HeroBlock.js +1 -1
- package/esm/IframeBlock.js +1 -1
- package/esm/IframedLayout.js +1 -1
- package/esm/ImageCards.js +1 -1
- package/esm/InfoBlock.js +1 -1
- package/esm/InfoHero.js +1 -1
- package/esm/LabeledTextBlock.js +1 -1
- package/esm/Layout.js +1 -1
- package/esm/MainMenu/_Auxiliary.js +1 -1
- package/esm/MainMenu/_PrimaryPanel.js +1 -1
- package/esm/MainMenu.d.ts +2 -3
- package/esm/MainMenu.js +1 -1
- package/esm/MainMenu2.d.ts +2 -3
- package/esm/MainMenu2.js +1 -1
- package/esm/MiniMetrics.js +1 -1
- package/esm/Multiselect.js +1 -2
- package/esm/NameCard.js +1 -1
- package/esm/NameCards.js +1 -1
- package/esm/NewsHero.js +1 -2
- package/esm/PageFilter.js +1 -1
- package/esm/PageHeading.js +1 -1
- package/esm/Pagination.js +2 -2
- package/esm/ProcessOverview.js +1 -1
- package/esm/ReadSpeakerPlayer.js +1 -1
- package/esm/RelatedLinks.js +1 -1
- package/esm/RowBlock.js +1 -1
- package/esm/RowBlockColumn.js +1 -1
- package/esm/SearchResults.js +1 -1
- package/esm/ShareButtons.js +1 -1
- package/esm/Sharpie.js +1 -1
- package/esm/SiteSearchCurtain.js +1 -1
- package/esm/Skeleton.js +1 -1
- package/esm/SubHeading.js +1 -1
- package/esm/Tabs.js +1 -1
- package/esm/TagPill.js +1 -1
- package/esm/TextBlock.js +1 -1
- package/esm/TextInput.js +1 -1
- package/esm/Tooltip.js +1 -1
- package/esm/VSpacer.js +1 -1
- package/esm/WizardLayout.js +1 -1
- package/esm/WizardStepper.js +1 -1
- package/esm/_abstract/_AbstractCarousel.js +1 -2
- package/esm/_abstract/_AbstractModal.js +1 -1
- package/esm/_abstract/_Block.js +1 -1
- package/esm/_abstract/_Button.js +1 -1
- package/esm/_abstract/_CardList.d.ts +3 -2
- package/esm/_abstract/_CardList.js +3 -3
- package/esm/_abstract/_CarouselPaging.js +1 -1
- package/esm/_abstract/_Image.js +1 -1
- package/esm/_abstract/_Quote.js +1 -1
- package/esm/_abstract/_ScrollWrapper.js +1 -1
- package/esm/_abstract/_Table.js +1 -2
- package/esm/_abstract/_TogglerGroup.js +1 -1
- package/esm/_abstract/_TogglerGroupField.js +1 -1
- package/esm/_abstract/_TogglerInput.js +1 -1
- package/esm/utils/types.d.ts +2 -2
- package/esm/utils/useScrollEdgeDetect.js +12 -8
- package/package.json +3 -3
- package/utils/types.d.ts +2 -2
- package/utils/useScrollEdgeDetect.js +11 -7
package/SubHeading.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SubHeading = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const SubHeading = (props) => {
|
|
8
8
|
const { small, Tag = 'h2', children, align, wide, wrapperProps } = props;
|
|
9
|
-
return (react_1.default.createElement(Tag, Object.assign({}, wrapperProps, { className: (0,
|
|
9
|
+
return (react_1.default.createElement(Tag, Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('SubHeading', [
|
|
10
10
|
small && 'small',
|
|
11
11
|
align === 'right' && `align--${align}`,
|
|
12
12
|
!align && wide && 'wide',
|
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 classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
6
|
const frag_1 = require("@hugsmidjan/qj/frag");
|
|
7
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
9
|
const navKeyEffects = {
|
|
10
10
|
ArrowUp: -1,
|
|
@@ -87,7 +87,7 @@ const Tabs = (props) => {
|
|
|
87
87
|
listAriaControls,
|
|
88
88
|
isBrowser,
|
|
89
89
|
};
|
|
90
|
-
return (react_1.default.createElement("div", Object.assign({}, props.wrapperProps, { className: (0,
|
|
90
|
+
return (react_1.default.createElement("div", Object.assign({}, props.wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('Tabs', vertical && 'vertical', wrapperProps.className), role: tabRole && role, id: id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown: handleKeydown, "data-sprinkled": isBrowser }),
|
|
91
91
|
tabs.map((tabProps, index) => renderTab(tabProps, index, listProps)),
|
|
92
92
|
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: ssr,
|
|
93
93
|
// just to be sure
|
package/TagPill.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TagPill = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Button_js_1 = require("./_abstract/_Button.js");
|
|
8
8
|
const colors = {
|
|
9
9
|
normal: '',
|
|
@@ -25,10 +25,10 @@ const TagPill = (props) => {
|
|
|
25
25
|
'must have an `onRemove` handler defined');
|
|
26
26
|
const modifiers = [modifier, large && 'large', colors[color]];
|
|
27
27
|
const removeBtn = removable && (react_1.default.createElement("button", { className: "TagPill__remove", onClick: onRemove && (() => onRemove()), "aria-label": removeLabelLong, type: "button" }, removeLabel));
|
|
28
|
-
return isStatic ? (react_1.default.createElement("span", Object.assign({ className: (0,
|
|
28
|
+
return isStatic ? (react_1.default.createElement("span", Object.assign({ className: (0, hanna_utils_1.modifiedClass)('TagPill', modifiers) }, buttonProps),
|
|
29
29
|
label,
|
|
30
30
|
" ",
|
|
31
|
-
removeBtn)) : onRemove ? (react_1.default.createElement("span", { className: (0,
|
|
31
|
+
removeBtn)) : onRemove ? (react_1.default.createElement("span", { className: (0, hanna_utils_1.modifiedClass)('TagPill', modifiers) },
|
|
32
32
|
react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "TagPill__button" }, buttonProps), label),
|
|
33
33
|
' ',
|
|
34
34
|
removeBtn)) : (react_1.default.createElement(_Button_js_1.Button, Object.assign({ bem: "TagPill" }, buttonProps, { modifier: modifiers }),
|
package/TextBlock.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TextBlock = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const TextBlock = (props) => {
|
|
8
8
|
const { children, align, labelled, wide, small, wrapperProps } = props;
|
|
9
9
|
const rightAligned = align === 'right' || labelled;
|
|
10
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
10
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('TextBlock', [
|
|
11
11
|
labelled && 'labelled',
|
|
12
12
|
rightAligned && 'align--right',
|
|
13
13
|
wide && !rightAligned && 'wide',
|
package/TextInput.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TextInput = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const FormField_js_1 = tslib_1.__importStar(require("./FormField.js"));
|
|
8
8
|
const TextInput = (props) => {
|
|
9
9
|
var _a;
|
|
@@ -30,7 +30,7 @@ const TextInput = (props) => {
|
|
|
30
30
|
}
|
|
31
31
|
}, [] // eslint-disable-line react-hooks/exhaustive-deps
|
|
32
32
|
);
|
|
33
|
-
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: (0,
|
|
33
|
+
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: (0, hanna_utils_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
34
|
};
|
|
35
35
|
exports.TextInput = TextInput;
|
|
36
36
|
exports.default = exports.TextInput;
|
package/Tooltip.js
CHANGED
|
@@ -4,7 +4,7 @@ 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
|
|
7
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
8
8
|
const useCallbackOnEsc_js_1 = require("./utils/useCallbackOnEsc.js");
|
|
9
9
|
const useLaggedState_js_1 = require("./utils/useLaggedState.js");
|
|
10
10
|
const getSide = (placement) => placement.split('-')[0];
|
|
@@ -22,7 +22,7 @@ const Tooltip = (props) => {
|
|
|
22
22
|
(0, useCallbackOnEsc_js_1.useCallbackOnEsc)(() => {
|
|
23
23
|
setIsOpen(false);
|
|
24
24
|
});
|
|
25
|
-
return (react_1.default.createElement("details", Object.assign({}, props.wrapperProps, { className: (0,
|
|
25
|
+
return (react_1.default.createElement("details", Object.assign({}, props.wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('Tooltip', getSide(placement), wrapperProps.className), open: isOpen, onMouseEnter: (e) => {
|
|
26
26
|
var _a;
|
|
27
27
|
setIsOpen(true, 100);
|
|
28
28
|
(_a = wrapperProps.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(wrapperProps, e);
|
|
@@ -67,7 +67,7 @@ const Tooltip = (props) => {
|
|
|
67
67
|
}, style: x == null
|
|
68
68
|
? wrapperProps.style
|
|
69
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` }) }),
|
|
70
|
-
react_1.default.createElement("summary", { className: (0,
|
|
70
|
+
react_1.default.createElement("summary", { className: (0, hanna_utils_1.modifiedClass)('Tooltip__trigger', iconOnly && 'icononly'), ref: refs.setReference }, label),
|
|
71
71
|
react_1.default.createElement("div", { className: "Tooltip__content", onClick: (e) => e.stopPropagation(), ref: refs.setFloating },
|
|
72
72
|
x !== null && (react_1.default.createElement("div", { "data-floating-ui-hack-plz-ignore": "", style: { position: 'absolute', display: 'none' }, ref: arrowRef })),
|
|
73
73
|
text)));
|
package/VSpacer.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VSpacer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const sizes = {
|
|
8
8
|
none: 'none',
|
|
9
9
|
small: 'small',
|
|
@@ -35,7 +35,7 @@ const VSpacer = (props) => {
|
|
|
35
35
|
bottomVal = undefined;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const className = (0,
|
|
38
|
+
const className = (0, hanna_utils_1.modifiedClass)('VSpacer', [sizeVal, topVal && `top--${topVal}`, bottomVal && `bottom--${bottomVal}`], (wrapperProps || {}).className);
|
|
39
39
|
return isWrapper ? (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: className }), children)) : (react_1.default.createElement("hr", Object.assign({}, wrapperProps, { className: className })));
|
|
40
40
|
};
|
|
41
41
|
exports.VSpacer = VSpacer;
|
package/WizardLayout.js
CHANGED
|
@@ -3,7 +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
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Layouts_js_1 = require("./_abstract/_Layouts.js");
|
|
8
8
|
const useScrollbarWidthCSSVar_js_1 = require("./utils/useScrollbarWidthCSSVar.js");
|
|
9
9
|
const utils_js_1 = require("./utils.js");
|
|
@@ -13,7 +13,7 @@ const WizardLayout = (props) => {
|
|
|
13
13
|
// ssr,
|
|
14
14
|
wizardStepper, wizardFooter, children, colorTheme, logoLink = '/', siteName, globalAlerts, wrapperProps, } = props;
|
|
15
15
|
const isBrowser = (0, utils_js_1.useIsBrowserSide)( /* ssr */);
|
|
16
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
16
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('WizardLayout', null, (wrapperProps || {}).className), "data-sprinkled": isBrowser, "data-color-theme": colorTheme }),
|
|
17
17
|
globalAlerts && (react_1.default.createElement("div", { className: "WizardLayout__alerts", role: "alert" }, globalAlerts)),
|
|
18
18
|
react_1.default.createElement("div", { className: "WizardLayout__content" },
|
|
19
19
|
react_1.default.createElement("div", { className: "WizardLayout__header", role: "banner" },
|
package/WizardStepper.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WizardStepper = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const WizardStepper = (props) => {
|
|
8
8
|
const { steps, activeStep = -1, allowForwardSkip, disableBacktrack, onClick, wrapperProps, } = props;
|
|
9
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
9
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('WizardStepper', activeStep === -1 && 'preview', (wrapperProps || {}).className) }), steps.map((step, i) => {
|
|
10
10
|
const { clickable, done, neutral } = step;
|
|
11
11
|
const label = step.label || '…';
|
|
12
|
-
const stepClass = (0,
|
|
12
|
+
const stepClass = (0, hanna_utils_1.modifiedClass)('WizardStepper__step', [
|
|
13
13
|
(done || (done == null && i < activeStep)) && 'done',
|
|
14
14
|
neutral && 'neutral',
|
|
15
15
|
]);
|
|
@@ -4,7 +4,6 @@ exports.AbstractCarousel = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const A_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/A"));
|
|
7
|
-
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
8
7
|
const debounce_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/debounce"));
|
|
9
8
|
const focusElm_1 = require("@hugsmidjan/qj/focusElm");
|
|
10
9
|
const throttle_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/throttle"));
|
|
@@ -115,7 +114,7 @@ const AbstractCarousel = (props) => {
|
|
|
115
114
|
items.map((item, i) => (
|
|
116
115
|
// @ts-expect-error (Can't be arsed...)
|
|
117
116
|
react_1.default.createElement(Component, Object.assign({ key: i }, ComponentProps, item))))));
|
|
118
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
117
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(bem, modifier,
|
|
119
118
|
// Prefer `className` over `wrapperProps.className`
|
|
120
119
|
className || (wrapperProps || {}).className), "data-sprinkled": isBrowser }),
|
|
121
120
|
title && react_1.default.createElement("h2", { className: `${bem}__title` }, title),
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbstractModal = exports.defaultAbstractModalTexts = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
6
|
const focusElm_1 = require("@hugsmidjan/qj/focusElm");
|
|
7
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
8
8
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
9
9
|
const FocusTrap_js_1 = require("../FocusTrap.js");
|
|
10
10
|
const utils_js_1 = require("../utils.js");
|
|
@@ -117,14 +117,14 @@ const AbstractModal = (props) => {
|
|
|
117
117
|
const closeButtonLabel = txt.closeButtonLabel || txt.closeButton;
|
|
118
118
|
const { onClick, className } = wrapperProps;
|
|
119
119
|
return (react_1.default.createElement(PortalOrFragment, null,
|
|
120
|
-
react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
120
|
+
react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(`${bem}wrapper`, [modifier, className]), hidden: !open, role: "dialog", onClick: closeOnCurtainClick && onClick
|
|
121
121
|
? (e) => {
|
|
122
122
|
closeOnCurtainClick(e);
|
|
123
123
|
onClick(e);
|
|
124
124
|
}
|
|
125
125
|
: closeOnCurtainClick || onClick, id: domid }),
|
|
126
126
|
isBrowser && react_1.default.createElement(FocusTrap_js_1.FocusTrap, { atTop: true }),
|
|
127
|
-
react_1.default.createElement("div", { className: (0,
|
|
127
|
+
react_1.default.createElement("div", { className: (0, hanna_utils_1.modifiedClass)(bem, modifier), ref: modalElmRef },
|
|
128
128
|
children,
|
|
129
129
|
isBrowser && !props.noCloseButton && (react_1.default.createElement("button", { className: `${bem}__closebutton`, type: "button", onClick: closeModal, "aria-label": closeButtonLabel, "aria-controls": domid, title: closeButtonLabel }, txt.closeButton))),
|
|
130
130
|
isBrowser && react_1.default.createElement(FocusTrap_js_1.FocusTrap, null))));
|
package/_abstract/_Block.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Block = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Button_js_1 = require("./_Button.js");
|
|
8
8
|
const _Image_js_1 = require("./_Image.js");
|
|
9
9
|
const Block = (props) => {
|
|
10
10
|
const { image, modifier, bem, content, wrapperProps } = props;
|
|
11
11
|
const contentItems = Array.isArray(content) ? content : [content];
|
|
12
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
12
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(bem, modifier, (wrapperProps || {}).className) }),
|
|
13
13
|
contentItems.map(({ title, summary, buttons = [] }, i) => {
|
|
14
14
|
const hasSummary = summary && (typeof summary !== 'string' || !!summary.trim());
|
|
15
15
|
return (react_1.default.createElement("div", { key: i, className: `${bem}__content` },
|
package/_abstract/_Button.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Button = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Link_js_1 = require("./_Link.js");
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
9
|
const sizes = {
|
|
@@ -31,7 +31,7 @@ const Button = (props) => {
|
|
|
31
31
|
const { bem, small, // eslint-disable-line deprecation/deprecation
|
|
32
32
|
size = small ? 'small' : 'normal', modifier, children, variant = 'normal', icon = 'none', label = children } = props, buttonProps = tslib_1.__rest(props, ["bem", "small", "size", "modifier", "children", "variant", "icon", "label"]);
|
|
33
33
|
const className = bem &&
|
|
34
|
-
(0,
|
|
34
|
+
(0, hanna_utils_1.modifiedClass)(bem, [modifier, variants[variant], sizes[size], navigationFlags[icon]], props.className);
|
|
35
35
|
const iconProp = icons[icon] && { 'data-icon': icons[icon] };
|
|
36
36
|
if (buttonProps.href != null) {
|
|
37
37
|
return (react_1.default.createElement(_Link_js_1.Link, Object.assign({}, buttonProps, { className: className }, iconProp), label));
|
package/_abstract/_CardList.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import React, { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import React, { MouseEventHandler, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { EitherObj } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { WrapperElmProps } from '../utils.js';
|
|
4
4
|
import { BemModifierProps } from '../utils/types.js';
|
|
5
5
|
import { ImageProps } from './_Image.js';
|
|
6
6
|
export type TextCardProps = {
|
|
7
7
|
title: string;
|
|
8
|
-
href
|
|
8
|
+
href?: string;
|
|
9
9
|
meta?: string | JSX.Element;
|
|
10
10
|
summary?: string | JSX.Element;
|
|
11
11
|
target?: React.HTMLAttributeAnchorTarget;
|
|
12
|
+
onClick?: MouseEventHandler;
|
|
12
13
|
};
|
|
13
14
|
export type ImageCardProps = TextCardProps & {
|
|
14
15
|
image?: ImageProps;
|
package/_abstract/_CardList.js
CHANGED
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CardList = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Button_js_1 = require("./_Button.js");
|
|
8
8
|
const _Image_js_1 = require("./_Image.js");
|
|
9
9
|
const Card = (props) => {
|
|
10
|
-
const { bem, href, title, imgPlaceholder, image, meta, summary, target } = props;
|
|
10
|
+
const { bem, href, title, imgPlaceholder, image, meta, summary, target, onClick } = props;
|
|
11
11
|
const cardClass = `${bem}__card`;
|
|
12
12
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
13
|
-
react_1.default.createElement(_Button_js_1.Button, { bem: cardClass, href: href, target: target },
|
|
13
|
+
react_1.default.createElement(_Button_js_1.Button, { bem: cardClass, href: href, target: target, onClick: onClick },
|
|
14
14
|
' ',
|
|
15
15
|
!!(image || imgPlaceholder) && (react_1.default.createElement(_Image_js_1.Image, Object.assign({ bem: `${bem}__image` }, image, { placeholder: imgPlaceholder }))),
|
|
16
16
|
react_1.default.createElement("span", { className: `${cardClass}__title` }, title),
|
|
@@ -35,7 +35,7 @@ const CardList = (props) => {
|
|
|
35
35
|
title && react_1.default.createElement(TitleTag, { className: `${bemPrefix}__title` }, title),
|
|
36
36
|
summaryElement)) : (title && react_1.default.createElement(TitleTag, { className: `${bemPrefix}__title` }, title)),
|
|
37
37
|
react_1.default.createElement("ul", Object.assign({}, wrapperProps, { className: props.standalone
|
|
38
|
-
? (0,
|
|
38
|
+
? (0, hanna_utils_1.modifiedClass)(bemPrefix, modifier, (wrapperProps || {}).className)
|
|
39
39
|
: `${bemPrefix}__list`, style: fallbackImageStyle }), cards.map((card, i) => (react_1.default.createElement("li", { key: i, className: `${bemPrefix}__item` },
|
|
40
40
|
react_1.default.createElement(Card
|
|
41
41
|
/* Assert as `ImageCardProps` to silence the imgPlaceholder false-positive */
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const
|
|
5
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
6
6
|
const CarouselPaging = (props) => {
|
|
7
7
|
const { bem = 'CarouselPaging', modifier, current, itemCount, setCurrent } = props;
|
|
8
8
|
const { next, prev, unit = '' } = props.texts;
|
|
9
|
-
return (react_1.default.createElement("div", { className: (0,
|
|
9
|
+
return (react_1.default.createElement("div", { className: (0, hanna_utils_1.modifiedClass)(bem, modifier) },
|
|
10
10
|
react_1.default.createElement("button", { className: `${bem}__button ${bem}__button--next`, type: "button", disabled: current >= itemCount - 1, onClick: () => setCurrent(current + 1), "aria-controls": props['aria-controls'], "aria-label": `${next} ${unit}`, title: `${next} ${unit}` }, next),
|
|
11
11
|
' ',
|
|
12
12
|
react_1.default.createElement("button", { className: `${bem}__button ${bem}__button--prev`, type: "button", disabled: current === 0, onClick: () => setCurrent(current - 1), "aria-controls": props['aria-controls'], "aria-label": `${prev} ${unit}`, title: `${prev} ${unit}` }, prev)));
|
package/_abstract/_Image.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Image = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const useGetSVGtext_js_1 = require("../utils/useGetSVGtext.js");
|
|
8
8
|
// eslint-disable-next-line complexity
|
|
9
9
|
const Image = (props) => {
|
|
@@ -12,9 +12,9 @@ const Image = (props) => {
|
|
|
12
12
|
const imageSrc = _src || (sources[0] != null ? sources[0].srcset.split(' ')[0] : undefined);
|
|
13
13
|
const imgLoading = preloadSrc ? 'eager' : 'lazy';
|
|
14
14
|
const inlineSvg = (0, useGetSVGtext_js_1.useGetSVGtext)(inline ? imageSrc : undefined, altText);
|
|
15
|
-
const extraClasses = (0,
|
|
15
|
+
const extraClasses = (0, hanna_utils_1.classes)(className, wrapperProps.className) || undefined;
|
|
16
16
|
const classNames = bem
|
|
17
|
-
? (0,
|
|
17
|
+
? (0, hanna_utils_1.modifiedClass)(bem, [modifier, !imageSrc && 'missing'], extraClasses)
|
|
18
18
|
: extraClasses;
|
|
19
19
|
if (!imageSrc) {
|
|
20
20
|
return placeholder ? (react_1.default.createElement("span", Object.assign({}, props.wrapperProps, { className: classNames }), placeholder !== true && placeholder())) : null;
|
package/_abstract/_Quote.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports._Quote = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const _Link_js_1 = require("./_Link.js");
|
|
8
8
|
const _Quote = (props) => {
|
|
9
9
|
const { bem, children, by, byHref, wrapperProps } = props;
|
|
10
|
-
return (react_1.default.createElement("figure", Object.assign({}, wrapperProps, { className: (0,
|
|
10
|
+
return (react_1.default.createElement("figure", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(bem, null, (wrapperProps || {}).className) }),
|
|
11
11
|
react_1.default.createElement("blockquote", { className: `${bem}__quote` }, children),
|
|
12
12
|
by && (react_1.default.createElement("figcaption", { className: `${bem}__by` }, byHref ? (react_1.default.createElement(_Link_js_1.Link, { href: byHref }, by)) : typeof by === 'string' ? (react_1.default.createElement("span", null, by)) : (by)))));
|
|
13
13
|
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ScrollWrapper = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const useScrollEdgeDetect_js_1 = require("../utils/useScrollEdgeDetect.js");
|
|
9
9
|
const scrollOptions = {
|
|
@@ -16,6 +16,6 @@ const ScrollWrapper = (props) => {
|
|
|
16
16
|
const modifiers = isBrowser
|
|
17
17
|
? [modifier, 'at', scrollAt.start && 'at--start', scrollAt.end && 'at--end']
|
|
18
18
|
: modifier;
|
|
19
|
-
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0,
|
|
19
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(bem, modifiers, wrapperProps.className), ref: !innerWrap ? scrollerRef : undefined }), isBrowser && innerWrap ? (react_1.default.createElement("div", { className: `${bem}__scroller`, ref: scrollerRef }, children)) : (children)));
|
|
20
20
|
};
|
|
21
21
|
exports.ScrollWrapper = ScrollWrapper;
|
package/_abstract/_Table.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Table = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const classUtils_1 = require("@hugsmidjan/qj/classUtils");
|
|
7
6
|
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
8
7
|
const TableCell = (props) => {
|
|
9
8
|
const { data, meta = {}, rowIdx, rowScope } = props;
|
|
@@ -20,7 +19,7 @@ const TableCell = (props) => {
|
|
|
20
19
|
? 'Cell--text'
|
|
21
20
|
: `Cell--text Cell--text--${text}`;
|
|
22
21
|
const telClass = tel ? 'Cell--tel' : '';
|
|
23
|
-
return (react_1.default.createElement(Tag, { className: (0,
|
|
22
|
+
return (react_1.default.createElement(Tag, { className: (0, hanna_utils_1.classes)(numberClass || telClass || textClass, className), colSpan: colSpan && colSpan > 1 ? colSpan : undefined, scope: rowScope ? 'row' : undefined }, typeof value === 'function' ? value(rowIdx) : value));
|
|
24
23
|
};
|
|
25
24
|
const TableSection = ({ section, cols = [], Tag, getRowProps }) => section.length ? (react_1.default.createElement(Tag, null, section.map(({ key, cells }, rowIdx) => {
|
|
26
25
|
let colIdx = 0;
|
|
@@ -47,7 +46,7 @@ exports.Table = (0, react_1.memo)((props) => {
|
|
|
47
46
|
const thead = (0, react_1.useMemo)(() => normalizeTableSectData(props.thead), [props.thead]);
|
|
48
47
|
const tfoot = (0, react_1.useMemo)(() => props.tfoot && normalizeTableSectData(props.tfoot), [props.tfoot]);
|
|
49
48
|
const tbodies = (0, react_1.useMemo)(() => (props.tbodies || [props.tbody]).map(normalizeTableSectData).filter(hanna_utils_1.notNully), [props.tbody, props.tbodies]);
|
|
50
|
-
return (react_1.default.createElement("table", Object.assign({}, wrapperProps, { className: (0,
|
|
49
|
+
return (react_1.default.createElement("table", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.classes)(className, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className) }),
|
|
51
50
|
caption && react_1.default.createElement("caption", null, caption),
|
|
52
51
|
thead && (react_1.default.createElement(TableSection, { section: thead, cols: cols, Tag: "thead", getRowProps: getRowProps })),
|
|
53
52
|
tfoot && (react_1.default.createElement(TableSection, { section: tfoot, cols: cols, Tag: "tfoot", getRowProps: getRowProps })),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TogglerGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const useDomid_js_1 = require("../utils/useDomid.js");
|
|
9
9
|
const TogglerGroup = (props) => {
|
|
@@ -18,7 +18,7 @@ const TogglerGroup = (props) => {
|
|
|
18
18
|
? _options.map((option) => ({ value: option }))
|
|
19
19
|
: _options;
|
|
20
20
|
}, [props.options]);
|
|
21
|
-
return (react_1.default.createElement("ul", { className: (0,
|
|
21
|
+
return (react_1.default.createElement("ul", { className: (0, hanna_utils_1.modifiedClass)(bem, null, className), role: "group", "aria-labelledby": props['aria-labelledby'], "aria-describedby": props['aria-describedby'], "aria-required": props.required }, options.map((option, i) => {
|
|
22
22
|
const isDisabled = option.disabled != null
|
|
23
23
|
? option.disabled
|
|
24
24
|
: disabled && typeof disabled !== 'boolean'
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TogglerGroupField = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const FormField_js_1 = tslib_1.__importStar(require("../FormField.js"));
|
|
8
8
|
const _TogglerGroup_js_1 = require("./_TogglerGroup.js");
|
|
9
9
|
const TogglerGroupField = (props) => {
|
|
@@ -14,7 +14,7 @@ const TogglerGroupField = (props) => {
|
|
|
14
14
|
: typeof defaultValue === 'string'
|
|
15
15
|
? [defaultValue]
|
|
16
16
|
: defaultValue, [defaultValue]);
|
|
17
|
-
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: (0,
|
|
17
|
+
return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: (0, hanna_utils_1.modifiedClass)(bem, modifier), group: true }, fieldWrapperProps, { renderInput: (className, inputProps) => {
|
|
18
18
|
return (react_1.default.createElement(_TogglerGroup_js_1.TogglerGroup, Object.assign({ bem: className.options }, inputProps, togglerGroupProps, { disabled: props.disabled, value: _value, defaultValue: _defaultValue, Toggler: Toggler })));
|
|
19
19
|
} })));
|
|
20
20
|
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TogglerInput = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const i18n_1 = require("@reykjavik/hanna-utils/i18n");
|
|
8
8
|
const useDomid_js_1 = require("../utils/useDomid.js");
|
|
9
9
|
const defaultReqText = {
|
|
@@ -26,7 +26,7 @@ const TogglerInput = (props) => {
|
|
|
26
26
|
" ",
|
|
27
27
|
label,
|
|
28
28
|
' '));
|
|
29
|
-
return (react_1.default.createElement(Wrapper, Object.assign({}, wrapperProps, { className: (0,
|
|
29
|
+
return (react_1.default.createElement(Wrapper, Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)(bem, [modifier, hideLabel && 'nolabel'],
|
|
30
30
|
// Prefer `className` over `wrapperProps.className`
|
|
31
31
|
className || (wrapperProps || {}).className) }),
|
|
32
32
|
react_1.default.createElement("input", Object.assign({ className: `${bem}__input`, type: type, id: domid, "aria-invalid": invalid || !!errorMessage || undefined, "aria-describedby": errorId }, restInputProps, inputProps, (readOnly && { disabled: true }))),
|
package/esm/AccordionList.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { useDomid } from './utils/useDomid.js';
|
|
4
4
|
import { useIsBrowserSide, useMixedControlState, } from './utils.js';
|
|
5
5
|
const AccordionListItem = (props) => {
|
package/esm/ActionCards.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { CardList, } from './_abstract/_CardList.js';
|
|
4
4
|
export const ActionCards = (props) => {
|
|
5
5
|
const { wrapperProps } = props;
|
package/esm/Alert.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState, } from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
import { Button } from './_abstract/_Button.js';
|
|
5
5
|
import { isPreact } from './utils/env.js';
|
package/esm/ArticleMeta.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { Link } from './_abstract/_Link.js';
|
|
4
4
|
export const ArticleMeta = (props) => {
|
|
5
5
|
const { items, small, wrapperProps } = props;
|
package/esm/Attention.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
export const Attention = (props) => {
|
|
4
4
|
const { small, children, wrapperProps } = props;
|
|
5
5
|
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('Attention', small && 'small', (wrapperProps || {}).className) }), children));
|
package/esm/AutosuggestSearch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
3
|
import Autosuggest from 'react-autosuggest';
|
|
4
|
-
import { modifiedClass } from '@
|
|
4
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
5
5
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
6
6
|
import SearchInput from './SearchInput.js';
|
|
7
7
|
import { useMixedControlState } from './utils.js';
|
package/esm/BasicTable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { ScrollWrapper } from './_abstract/_ScrollWrapper.js';
|
|
4
4
|
import { Table } from './_abstract/_Table.js';
|
|
5
5
|
const tableTypes = {
|
package/esm/BgBox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
export const BgBox = (props) => {
|
|
4
4
|
const { className, children, wrapperProps } = props;
|
|
5
5
|
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('BgBox', undefined,
|
package/esm/Bling.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { getBlingUrl } from '@reykjavik/hanna-utils/assets';
|
|
4
4
|
import { useGetSVGtext } from './utils/useGetSVGtext.js';
|
|
5
5
|
const colors = {
|
package/esm/BreadCrumbs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
import { Link } from './_abstract/_Link.js';
|
|
5
5
|
export const defaultBreadCrumbsTexts = {
|
package/esm/ButtonBar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
export const ButtonBar = (props) => {
|
|
4
4
|
const { align, children, wrapperProps } = props;
|
|
5
5
|
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('ButtonBar', align === 'right' && 'align--right', (wrapperProps || {}).className) }), children));
|
package/esm/CarouselStepper.js
CHANGED
package/esm/CenterColumn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import SeenEffect from './SeenEffect.js';
|
|
4
4
|
export const CenterColumn = (props) => (React.createElement(SeenEffect, Object.assign({}, props.wrapperProps, props, {
|
|
5
5
|
// @ts-expect-error (overriding `props.wrapperProps` exactly bcause it should NOT be forwarded)
|
package/esm/ContactBubble.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import { modifiedClass } from '@hugsmidjan/qj/classUtils';
|
|
3
2
|
import { focusElm } from '@hugsmidjan/qj/focusElm';
|
|
3
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
4
4
|
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
5
5
|
import { Link } from './_abstract/_Link.js';
|
|
6
6
|
import { breakOnNL } from './_abstract/breakOnNL.js';
|
package/esm/ContentArticle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import ArticleMeta from './ArticleMeta.js';
|
|
4
4
|
import ContentImage from './ContentImage.js';
|
|
5
5
|
import Heading from './Heading.js';
|
package/esm/ContentImage.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { modifiedClass } from '@
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
import { Image } from './_abstract/_Image.js';
|
|
4
4
|
export const ContentImage = (props) => {
|
|
5
5
|
const { image, caption, credit, wrapperProps } = props;
|