@bytebrand/fe-ui-core-autobahn 1.0.93 → 1.0.94
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.
|
@@ -2,8 +2,18 @@
|
|
|
2
2
|
// BaseModalWrapper is replaced by a plain fixed overlay + centered surface.
|
|
3
3
|
// Deliberately NOT the kit ui/Modal — the cookie consent dialog has no title
|
|
4
4
|
// bar / close button and must not be dismissible without a choice.
|
|
5
|
+
//
|
|
6
|
+
// Rendered via ReactDOM.createPortal into document.body (same technique as
|
|
7
|
+
// ui/Modal.tsx) rather than inline in the page tree: a React hydration-mismatch
|
|
8
|
+
// error ANYWHERE else on the page (a known, separate bug — see the
|
|
9
|
+
// SearchNextPage isMobile SSR/CSR mismatch) can corrupt sibling reconciliation
|
|
10
|
+
// enough that an inline `position: fixed` overlay ends up mounted in the wrong
|
|
11
|
+
// place in the DOM (observed: appearing as plain content below the footer
|
|
12
|
+
// instead of as an overlay). A body-level portal is immune to that — its DOM
|
|
13
|
+
// node never lives inside the page's own React subtree.
|
|
5
14
|
|
|
6
15
|
import * as React from 'react';
|
|
16
|
+
import * as ReactDOM from 'react-dom';
|
|
7
17
|
|
|
8
18
|
import ModalsConfig from './ModalsConfig';
|
|
9
19
|
|
|
@@ -30,13 +40,19 @@ const SURFACE: React.CSSProperties = {
|
|
|
30
40
|
};
|
|
31
41
|
|
|
32
42
|
const BasicModal = ({ isVisible, toggleModal, name, modalProps, handleSentryInit }: IBasicModal) => {
|
|
33
|
-
if (!isVisible) return null;
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
if (!isVisible || typeof document === 'undefined') return null;
|
|
44
|
+
return ReactDOM.createPortal(
|
|
45
|
+
// wrapped in .md3: autobahn.css scopes every token/utility class (incl.
|
|
46
|
+
// .mbtn used by the modal buttons) under `.md3` and intentionally does
|
|
47
|
+
// nothing outside it — a bare document.body portal loses the theme.
|
|
48
|
+
<div className='md3'>
|
|
49
|
+
<div style={OVERLAY} role='dialog' aria-modal='true' aria-label='Cookie-Einstellungen'>
|
|
50
|
+
<div style={SURFACE}>
|
|
51
|
+
{ModalsConfig[name] && ModalsConfig[name]({ ...modalProps, toggleModal, handleSentryInit })}
|
|
52
|
+
</div>
|
|
38
53
|
</div>
|
|
39
|
-
</div
|
|
54
|
+
</div>,
|
|
55
|
+
document.body
|
|
40
56
|
);
|
|
41
57
|
};
|
|
42
58
|
|
package/locales/de/autobahn.json
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"priceRatingAria": "Preisbewertung: {{rating}}",
|
|
86
86
|
"detailsShow": "Details anzeigen",
|
|
87
87
|
"paymentLabel": "Zahlung",
|
|
88
|
-
"paymentValue": "
|
|
88
|
+
"paymentValue": "Zahlung per Überweisung",
|
|
89
89
|
"warrantyLabel": "Garantie",
|
|
90
90
|
"warrantyValue": "1 Jahr inklusive",
|
|
91
91
|
"deliveryLabel": "Lieferung",
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
},
|
|
772
772
|
"step3": {
|
|
773
773
|
"title": "Bezahlung",
|
|
774
|
-
"description": "Sicher
|
|
774
|
+
"description": "Sicher per Überweisung bezahlen — ohne versteckte Kosten."
|
|
775
775
|
},
|
|
776
776
|
"step4": {
|
|
777
777
|
"title": "Übergabe",
|
package/locales/en/autobahn.json
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"priceRatingAria": "Price rating: {{rating}}",
|
|
86
86
|
"detailsShow": "Show details",
|
|
87
87
|
"paymentLabel": "Payment",
|
|
88
|
-
"paymentValue": "Bank transfer
|
|
88
|
+
"paymentValue": "Bank transfer",
|
|
89
89
|
"warrantyLabel": "Warranty",
|
|
90
90
|
"warrantyValue": "1 year included",
|
|
91
91
|
"deliveryLabel": "Delivery",
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
},
|
|
772
772
|
"step3": {
|
|
773
773
|
"title": "Payment",
|
|
774
|
-
"description": "Pay securely
|
|
774
|
+
"description": "Pay securely by bank transfer — with no hidden costs."
|
|
775
775
|
},
|
|
776
776
|
"step4": {
|
|
777
777
|
"title": "Handover",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"license": "UNLICENSED",
|