@reykjavik/hanna-react 0.10.144 → 0.10.146
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/CHANGELOG.md +12 -0
- package/Datepicker.js +1 -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/Datepicker.js +1 -1
- 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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
- ... <!-- Add new lines here. -->
|
|
6
6
|
|
|
7
|
+
## 0.10.146
|
|
8
|
+
|
|
9
|
+
_2025-02-10_
|
|
10
|
+
|
|
11
|
+
- fix: Avoid conrolled–uncontrolled warning for `Datepicker` in `isoMode`
|
|
12
|
+
|
|
13
|
+
## 0.10.145
|
|
14
|
+
|
|
15
|
+
_2025-01-14_
|
|
16
|
+
|
|
17
|
+
- feat: Add prop `wrapperProps` to `FooterInfo` and `FooterBadges`
|
|
18
|
+
|
|
7
19
|
## 0.10.144
|
|
8
20
|
|
|
9
21
|
_2024-12-18_
|
package/Datepicker.js
CHANGED
|
@@ -110,7 +110,7 @@ const defaultDatepickerTexts = {
|
|
|
110
110
|
};
|
|
111
111
|
const toLocalIsoDate = (date) => {
|
|
112
112
|
if (!date) {
|
|
113
|
-
return
|
|
113
|
+
return '';
|
|
114
114
|
}
|
|
115
115
|
const localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000);
|
|
116
116
|
return localDate.toISOString().split('T')[0];
|
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/Datepicker.js
CHANGED
|
@@ -105,7 +105,7 @@ const defaultDatepickerTexts = {
|
|
|
105
105
|
};
|
|
106
106
|
const toLocalIsoDate = (date) => {
|
|
107
107
|
if (!date) {
|
|
108
|
-
return
|
|
108
|
+
return '';
|
|
109
109
|
}
|
|
110
110
|
const localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000);
|
|
111
111
|
return localDate.toISOString().split('T')[0];
|
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 },
|