@db-ux/react-core-components 4.4.0 → 4.4.1-footer-28739e3
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/dist/components/footer/footer.d.ts +3 -0
- package/dist/components/footer/footer.js +21 -0
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/footer/index.js +1 -0
- package/dist/components/footer/model.d.ts +26 -0
- package/dist/components/footer/model.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const DBFooter: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../..").GlobalProps | "width" | keyof import("./model").DBFooterDefaultProps> & import("./model").DBFooterDefaultProps & import("../..").GlobalProps & import("../..").ContainerWidthProps & React.RefAttributes<any>>;
|
|
3
|
+
export default DBFooter;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls, getBoolean } from "../../utils";
|
|
6
|
+
function DBFooterFn(props, component) {
|
|
7
|
+
props = Object.assign({ showCopyright: true, showMain: true, showMeta: true }, props);
|
|
8
|
+
const _ref = component || useRef(component);
|
|
9
|
+
return (React.createElement("footer", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { id: props.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font"]), { className: cls("db-footer", props.className), "data-width": props.width }),
|
|
10
|
+
getBoolean(props.showMain, "showMain") ? (React.createElement("section", { className: "db-footer-main" },
|
|
11
|
+
React.createElement("div", { className: "db-footer-content-container" },
|
|
12
|
+
React.createElement("div", { className: "db-footer-main-inner" },
|
|
13
|
+
React.createElement(React.Fragment, null, props.main))))) : null,
|
|
14
|
+
getBoolean(props.showMeta, "showMeta") ? (React.createElement("section", { className: "db-footer-meta" },
|
|
15
|
+
React.createElement("div", { className: "db-footer-content-container" },
|
|
16
|
+
React.createElement("div", { className: "db-footer-meta-inner" },
|
|
17
|
+
getBoolean(props.showCopyright, "showCopyright") ? (React.createElement("p", { className: "db-footer-copyright" }, "\u00A9 Deutsche Bahn AG")) : null,
|
|
18
|
+
React.createElement(React.Fragment, null, props.meta))))) : null));
|
|
19
|
+
}
|
|
20
|
+
const DBFooter = forwardRef(DBFooterFn);
|
|
21
|
+
export default DBFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBFooter } from './footer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBFooter } from './footer';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ContainerWidthProps, GlobalProps } from '../../shared/model';
|
|
2
|
+
export type DBFooterDefaultProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Slot for the main footer content.
|
|
5
|
+
* Typically used for navigation links, footer columns, etc.
|
|
6
|
+
*/
|
|
7
|
+
main?: any;
|
|
8
|
+
/**
|
|
9
|
+
* Slot for the meta footer content.
|
|
10
|
+
* Typically used for copyright information, legal links, etc.
|
|
11
|
+
*/
|
|
12
|
+
meta?: any;
|
|
13
|
+
/**
|
|
14
|
+
* Shows or hides the copyright text "© Deutsche Bahn AG".
|
|
15
|
+
*/
|
|
16
|
+
showCopyright?: boolean | string;
|
|
17
|
+
/**
|
|
18
|
+
* Shows or hides the main footer section.
|
|
19
|
+
*/
|
|
20
|
+
showMain?: boolean | string;
|
|
21
|
+
/**
|
|
22
|
+
* Shows or hides the meta footer section.
|
|
23
|
+
*/
|
|
24
|
+
showMeta?: boolean | string;
|
|
25
|
+
};
|
|
26
|
+
export type DBFooterProps = DBFooterDefaultProps & GlobalProps & ContainerWidthProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export * from './components/divider';
|
|
|
26
26
|
export * from './components/divider/model';
|
|
27
27
|
export * from './components/drawer';
|
|
28
28
|
export * from './components/drawer/model';
|
|
29
|
+
export * from './components/footer';
|
|
30
|
+
export * from './components/footer/model';
|
|
29
31
|
export * from './components/header';
|
|
30
32
|
export * from './components/header/model';
|
|
31
33
|
export * from './components/icon';
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,8 @@ export * from './components/divider';
|
|
|
26
26
|
export * from './components/divider/model';
|
|
27
27
|
export * from './components/drawer';
|
|
28
28
|
export * from './components/drawer/model';
|
|
29
|
+
export * from './components/footer';
|
|
30
|
+
export * from './components/footer/model';
|
|
29
31
|
export * from './components/header';
|
|
30
32
|
export * from './components/header/model';
|
|
31
33
|
export * from './components/icon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1-footer-28739e3",
|
|
4
4
|
"description": "React components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@db-ux/core-components": "4.4.
|
|
45
|
-
"@db-ux/core-foundations": "4.4.
|
|
44
|
+
"@db-ux/core-components": "4.4.1-footer-28739e3",
|
|
45
|
+
"@db-ux/core-foundations": "4.4.1-footer-28739e3"
|
|
46
46
|
}
|
|
47
47
|
}
|