@reykjavik/hanna-react 0.10.143 → 0.10.145
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/Alert.d.ts +2 -8
- package/CHANGELOG.md +14 -1
- package/FooterBadges.d.ts +2 -1
- package/FooterBadges.js +2 -1
- package/FooterInfo.d.ts +2 -1
- package/FooterInfo.js +2 -2
- package/esm/Alert.d.ts +2 -8
- package/esm/FooterBadges.d.ts +2 -1
- package/esm/FooterBadges.js +2 -1
- package/esm/FooterInfo.d.ts +2 -1
- package/esm/FooterInfo.js +2 -2
- package/package.json +1 -1
package/Alert.d.ts
CHANGED
|
@@ -7,14 +7,8 @@ export type AlertI18n = {
|
|
|
7
7
|
closeLabelLong?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const defaultAlertTexts: DefaultTexts<AlertI18n>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
success: number;
|
|
13
|
-
warning: number;
|
|
14
|
-
error: number;
|
|
15
|
-
critical: number;
|
|
16
|
-
};
|
|
17
|
-
type AlertType = keyof typeof alertTypes;
|
|
10
|
+
type AlertType = 'info' | 'success' | 'warning' | 'error' | 'critical';
|
|
11
|
+
export declare const alertTypes: Record<string, 1>;
|
|
18
12
|
export type AlertProps = {
|
|
19
13
|
type: AlertType;
|
|
20
14
|
closable?: boolean;
|
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
- ... <!-- Add new lines here. -->
|
|
6
6
|
|
|
7
|
+
## 0.10.145
|
|
8
|
+
|
|
9
|
+
_2025-01-14_
|
|
10
|
+
|
|
11
|
+
- feat: Add prop `wrapperProps` to `FooterInfo` and `FooterBadges`
|
|
12
|
+
|
|
13
|
+
## 0.10.144
|
|
14
|
+
|
|
15
|
+
_2024-12-18_
|
|
16
|
+
|
|
17
|
+
- `Alert`:
|
|
18
|
+
- feat: (TS) Change `alertTypes` into `Record<string, 1>` for easier use
|
|
19
|
+
|
|
7
20
|
## 0.10.143
|
|
8
21
|
|
|
9
22
|
_2024-12-06_
|
|
10
|
-
|
|
23
|
+
|
|
11
24
|
- `Datepicker:`
|
|
12
25
|
- fix: Timezone mismatch in `isoMode` (emitted UTC-based dates, not local)
|
|
13
26
|
|
package/FooterBadges.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { WrapperElmProps } from './utils.js';
|
|
1
2
|
export type FooterBadgesProps = {
|
|
2
3
|
badges: Array<{
|
|
3
4
|
altText: string;
|
|
4
5
|
src: string;
|
|
5
6
|
href?: string;
|
|
6
7
|
}>;
|
|
7
|
-
}
|
|
8
|
+
} & WrapperElmProps<'ul'>;
|
|
8
9
|
export declare const FooterBadges: (props: FooterBadgesProps) => JSX.Element | null;
|
|
9
10
|
export default FooterBadges;
|
package/FooterBadges.js
CHANGED
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FooterBadges = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
6
7
|
const _Link_js_1 = require("./_abstract/_Link.js");
|
|
7
8
|
const FooterBadges = (props) => {
|
|
8
9
|
if (!props.badges.length) {
|
|
9
10
|
return null;
|
|
10
11
|
}
|
|
11
|
-
return (react_1.default.createElement("ul", { className:
|
|
12
|
+
return (react_1.default.createElement("ul", Object.assign({}, props.wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('FooterBadges', null, (props.wrapperProps || {}).className) }), props.badges.map(({ altText, src, href }, i) => (react_1.default.createElement("li", { key: i, className: "FooterBadges__badge" }, href ? (react_1.default.createElement(_Link_js_1.Link, { href: href },
|
|
12
13
|
' ',
|
|
13
14
|
react_1.default.createElement("img", { src: src, alt: altText }),
|
|
14
15
|
' ')) : (react_1.default.createElement("img", { src: src, alt: altText })))))));
|
package/FooterInfo.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BemModifierProps } from './utils/types.js';
|
|
2
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
3
|
export type FooterInfoGroup = {
|
|
3
4
|
title: string;
|
|
4
5
|
modifier?: string;
|
|
@@ -15,6 +16,6 @@ export type FooterInfoGroup = {
|
|
|
15
16
|
export type FooterInfoBoxes = Array<FooterInfoGroup>;
|
|
16
17
|
export type FooterInfoProps = {
|
|
17
18
|
boxes: FooterInfoBoxes;
|
|
18
|
-
};
|
|
19
|
+
} & WrapperElmProps;
|
|
19
20
|
export declare const FooterInfo: (props: FooterInfoProps) => JSX.Element;
|
|
20
21
|
export default FooterInfo;
|
package/FooterInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const hanna_utils_1 = require("@reykjavik/hanna-utils");
|
|
7
7
|
const FooterInfo = (props) => {
|
|
8
|
-
const { boxes } = props;
|
|
9
|
-
return (react_1.default.createElement("div", { className:
|
|
8
|
+
const { boxes, wrapperProps } = props;
|
|
9
|
+
return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, hanna_utils_1.modifiedClass)('FooterInfo', null, (wrapperProps || {}).className) }), boxes.map((group, i) => (react_1.default.createElement("div", { className: (0, hanna_utils_1.modifiedClass)('FooterInfo__group', [
|
|
10
10
|
group.main && 'main',
|
|
11
11
|
group.modifier,
|
|
12
12
|
]), key: i },
|
package/esm/Alert.d.ts
CHANGED
|
@@ -7,14 +7,8 @@ export type AlertI18n = {
|
|
|
7
7
|
closeLabelLong?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const defaultAlertTexts: DefaultTexts<AlertI18n>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
success: number;
|
|
13
|
-
warning: number;
|
|
14
|
-
error: number;
|
|
15
|
-
critical: number;
|
|
16
|
-
};
|
|
17
|
-
type AlertType = keyof typeof alertTypes;
|
|
10
|
+
type AlertType = 'info' | 'success' | 'warning' | 'error' | 'critical';
|
|
11
|
+
export declare const alertTypes: Record<string, 1>;
|
|
18
12
|
export type AlertProps = {
|
|
19
13
|
type: AlertType;
|
|
20
14
|
closable?: boolean;
|
package/esm/FooterBadges.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { WrapperElmProps } from './utils.js';
|
|
1
2
|
export type FooterBadgesProps = {
|
|
2
3
|
badges: Array<{
|
|
3
4
|
altText: string;
|
|
4
5
|
src: string;
|
|
5
6
|
href?: string;
|
|
6
7
|
}>;
|
|
7
|
-
}
|
|
8
|
+
} & WrapperElmProps<'ul'>;
|
|
8
9
|
export declare const FooterBadges: (props: FooterBadgesProps) => JSX.Element | null;
|
|
9
10
|
export default FooterBadges;
|
package/esm/FooterBadges.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
2
3
|
import { Link } from './_abstract/_Link.js';
|
|
3
4
|
export const FooterBadges = (props) => {
|
|
4
5
|
if (!props.badges.length) {
|
|
5
6
|
return null;
|
|
6
7
|
}
|
|
7
|
-
return (React.createElement("ul", { className:
|
|
8
|
+
return (React.createElement("ul", Object.assign({}, props.wrapperProps, { className: modifiedClass('FooterBadges', null, (props.wrapperProps || {}).className) }), props.badges.map(({ altText, src, href }, i) => (React.createElement("li", { key: i, className: "FooterBadges__badge" }, href ? (React.createElement(Link, { href: href },
|
|
8
9
|
' ',
|
|
9
10
|
React.createElement("img", { src: src, alt: altText }),
|
|
10
11
|
' ')) : (React.createElement("img", { src: src, alt: altText })))))));
|
package/esm/FooterInfo.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BemModifierProps } from './utils/types.js';
|
|
2
|
+
import { WrapperElmProps } from './utils.js';
|
|
2
3
|
export type FooterInfoGroup = {
|
|
3
4
|
title: string;
|
|
4
5
|
modifier?: string;
|
|
@@ -15,6 +16,6 @@ export type FooterInfoGroup = {
|
|
|
15
16
|
export type FooterInfoBoxes = Array<FooterInfoGroup>;
|
|
16
17
|
export type FooterInfoProps = {
|
|
17
18
|
boxes: FooterInfoBoxes;
|
|
18
|
-
};
|
|
19
|
+
} & WrapperElmProps;
|
|
19
20
|
export declare const FooterInfo: (props: FooterInfoProps) => JSX.Element;
|
|
20
21
|
export default FooterInfo;
|
package/esm/FooterInfo.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
3
|
export const FooterInfo = (props) => {
|
|
4
|
-
const { boxes } = props;
|
|
5
|
-
return (React.createElement("div", { className:
|
|
4
|
+
const { boxes, wrapperProps } = props;
|
|
5
|
+
return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('FooterInfo', null, (wrapperProps || {}).className) }), boxes.map((group, i) => (React.createElement("div", { className: modifiedClass('FooterInfo__group', [
|
|
6
6
|
group.main && 'main',
|
|
7
7
|
group.modifier,
|
|
8
8
|
]), key: i },
|