@bytebrand/fe-ui-core-autobahn 1.0.189 → 1.0.191
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/cards/CarCard.tsx +357 -391
- package/cards/CarRow.tsx +1 -5
- package/cards/cardParts.tsx +1253 -1260
- package/constants/app.ts +1 -11
- package/constants/core.ts +1 -12
- package/locales/de/autobahn.json +880 -879
- package/locales/en/autobahn.json +880 -879
- package/package.json +30 -30
- package/theme/md3.css +15687 -15526
- package/ui/CreditCostNotice.tsx +43 -0
- package/ui/index.ts +93 -90
- package/vdp/FinanceCalculator.tsx +1095 -1090
- package/vdp/VdpModules.tsx +4417 -4409
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Icon from './Icon';
|
|
4
|
+
import { TranslationFunction } from '../types';
|
|
5
|
+
|
|
6
|
+
/** ADV-405 statutory wording. Kept as the i18n fallback so a stale locale cache never shows the raw key. */
|
|
7
|
+
export const CREDIT_COST_WARNING_DE = 'Achtung! Kreditaufnahme kostet Geld.';
|
|
8
|
+
|
|
9
|
+
export type CreditCostNoticeTone = 'light' | 'dark';
|
|
10
|
+
export type CreditCostNoticeSize = 'standard' | 'small';
|
|
11
|
+
|
|
12
|
+
export interface CreditCostNoticeProps {
|
|
13
|
+
t: TranslationFunction;
|
|
14
|
+
/** light = Figma "Ton=Hell" (default), dark = "Ton=Dunkel" (dark hero backgrounds only). */
|
|
15
|
+
tone?: CreditCostNoticeTone;
|
|
16
|
+
/** standard ≈ 8×10 px padding, small ≈ 5×6 px (small cards / narrow price columns). */
|
|
17
|
+
size?: CreditCostNoticeSize;
|
|
18
|
+
/** extra class(es) for the host's size/colour/spacing rules (font size and colour follow the host block's conditions line). */
|
|
19
|
+
cls?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Kreditkosten-Hinweis (ADV-405, Verbraucherkreditreform 2026): the warning
|
|
24
|
+
* "Achtung! Kreditaufnahme kostet Geld." with a Lucide info icon. Static, always
|
|
25
|
+
* visible, real text; the icon is hidden from screen readers. The sentence is the
|
|
26
|
+
* statutory German wording, so it is marked lang="de" and is NOT translated on the
|
|
27
|
+
* English locale. Hosts decide visibility (financing/leasing shown, Kaufen hidden).
|
|
28
|
+
*/
|
|
29
|
+
const CreditCostNotice: React.FunctionComponent<CreditCostNoticeProps> = ({ t, tone = 'light', size = 'standard', cls }) => {
|
|
30
|
+
const className = ['ccn', `ccn--${tone}`, size === 'small' ? 'ccn--small' : '', cls || ''].filter(Boolean).join(' ');
|
|
31
|
+
return (
|
|
32
|
+
<div className={className}>
|
|
33
|
+
<span className="ccn-icon" aria-hidden="true">
|
|
34
|
+
<Icon name="info" size={16} stroke={2} />
|
|
35
|
+
</span>
|
|
36
|
+
<span className="ccn-text" lang="de">
|
|
37
|
+
{t('autobahn:finance.creditCostWarning', { defaultValue: CREDIT_COST_WARNING_DE })}
|
|
38
|
+
</span>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default CreditCostNotice;
|
package/ui/index.ts
CHANGED
|
@@ -1,90 +1,93 @@
|
|
|
1
|
-
// Autobahn (auto.de redesign) — presentational UI primitives.
|
|
2
|
-
//
|
|
3
|
-
// Typed, pure React 18 + TS port of the design kit's primitives from
|
|
4
|
-
// docs/redesign/design-source/ui_kits/website/ui.jsx. The original kit exported
|
|
5
|
-
// everything via `Object.assign(window, {...})`; here each primitive is a real
|
|
6
|
-
// ES module with an explicit props interface, re-exported below.
|
|
7
|
-
//
|
|
8
|
-
// SCOPING — IMPORTANT:
|
|
9
|
-
// These components rely on the scoped CSS layer at
|
|
10
|
-
// services/fe-main/source/theme/autobahn/ (md3.css)
|
|
11
|
-
// where EVERY utility class is scoped under `.md3` (e.g. `.md3 .mbtn`,
|
|
12
|
-
// `.md3 .chip`, `.md3 .statchip--good`, `.md3 .segmented .on`, `.md3 .mfield`,
|
|
13
|
-
// `.md3 .num`, `.md3 .car-arrow`, `.md3 .imglabel`, `.md3 .md-title`, …).
|
|
14
|
-
// They therefore ONLY render correctly inside a `<div className="md3">` subtree.
|
|
15
|
-
//
|
|
16
|
-
// All components are pure/presentational: no store, no API, no window access.
|
|
17
|
-
|
|
18
|
-
export { default as Icon } from './Icon';
|
|
19
|
-
export type { IconProps } from './Icon';
|
|
20
|
-
|
|
21
|
-
export { default as Button } from './Button';
|
|
22
|
-
export type { ButtonProps, ButtonVariant, ButtonSize } from './Button';
|
|
23
|
-
|
|
24
|
-
export { default as IconButton } from './IconButton';
|
|
25
|
-
export type { IconButtonProps } from './IconButton';
|
|
26
|
-
|
|
27
|
-
export { default as Chip } from './Chip';
|
|
28
|
-
export type { ChipProps } from './Chip';
|
|
29
|
-
|
|
30
|
-
export { default as StatChip } from './StatChip';
|
|
31
|
-
export type { StatChipProps, StatChipTone } from './StatChip';
|
|
32
|
-
|
|
33
|
-
export { default as
|
|
34
|
-
export type {
|
|
35
|
-
|
|
36
|
-
export { default as
|
|
37
|
-
export type {
|
|
38
|
-
|
|
39
|
-
export { default as
|
|
40
|
-
export type {
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
export { default as
|
|
48
|
-
export type {
|
|
49
|
-
|
|
50
|
-
export { default as
|
|
51
|
-
export type {
|
|
52
|
-
|
|
53
|
-
export { default as
|
|
54
|
-
export type {
|
|
55
|
-
|
|
56
|
-
export { default as
|
|
57
|
-
export type {
|
|
58
|
-
|
|
59
|
-
export { default as
|
|
60
|
-
export type {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export
|
|
67
|
-
export {
|
|
68
|
-
export
|
|
69
|
-
export {
|
|
70
|
-
export
|
|
71
|
-
export {
|
|
72
|
-
export
|
|
73
|
-
export {
|
|
74
|
-
export
|
|
75
|
-
export {
|
|
76
|
-
export
|
|
77
|
-
export {
|
|
78
|
-
export
|
|
79
|
-
export {
|
|
80
|
-
export
|
|
81
|
-
export {
|
|
82
|
-
export
|
|
83
|
-
export {
|
|
84
|
-
export
|
|
85
|
-
export {
|
|
86
|
-
export
|
|
87
|
-
export {
|
|
88
|
-
export
|
|
89
|
-
export {
|
|
90
|
-
export
|
|
1
|
+
// Autobahn (auto.de redesign) — presentational UI primitives.
|
|
2
|
+
//
|
|
3
|
+
// Typed, pure React 18 + TS port of the design kit's primitives from
|
|
4
|
+
// docs/redesign/design-source/ui_kits/website/ui.jsx. The original kit exported
|
|
5
|
+
// everything via `Object.assign(window, {...})`; here each primitive is a real
|
|
6
|
+
// ES module with an explicit props interface, re-exported below.
|
|
7
|
+
//
|
|
8
|
+
// SCOPING — IMPORTANT:
|
|
9
|
+
// These components rely on the scoped CSS layer at
|
|
10
|
+
// services/fe-main/source/theme/autobahn/ (md3.css)
|
|
11
|
+
// where EVERY utility class is scoped under `.md3` (e.g. `.md3 .mbtn`,
|
|
12
|
+
// `.md3 .chip`, `.md3 .statchip--good`, `.md3 .segmented .on`, `.md3 .mfield`,
|
|
13
|
+
// `.md3 .num`, `.md3 .car-arrow`, `.md3 .imglabel`, `.md3 .md-title`, …).
|
|
14
|
+
// They therefore ONLY render correctly inside a `<div className="md3">` subtree.
|
|
15
|
+
//
|
|
16
|
+
// All components are pure/presentational: no store, no API, no window access.
|
|
17
|
+
|
|
18
|
+
export { default as Icon } from './Icon';
|
|
19
|
+
export type { IconProps } from './Icon';
|
|
20
|
+
|
|
21
|
+
export { default as Button } from './Button';
|
|
22
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from './Button';
|
|
23
|
+
|
|
24
|
+
export { default as IconButton } from './IconButton';
|
|
25
|
+
export type { IconButtonProps } from './IconButton';
|
|
26
|
+
|
|
27
|
+
export { default as Chip } from './Chip';
|
|
28
|
+
export type { ChipProps } from './Chip';
|
|
29
|
+
|
|
30
|
+
export { default as StatChip } from './StatChip';
|
|
31
|
+
export type { StatChipProps, StatChipTone } from './StatChip';
|
|
32
|
+
|
|
33
|
+
export { default as CreditCostNotice, CREDIT_COST_WARNING_DE } from './CreditCostNotice';
|
|
34
|
+
export type { CreditCostNoticeProps, CreditCostNoticeTone, CreditCostNoticeSize } from './CreditCostNotice';
|
|
35
|
+
|
|
36
|
+
export { default as Segmented } from './Segmented';
|
|
37
|
+
export type { SegmentedProps, SegmentedOption } from './Segmented';
|
|
38
|
+
|
|
39
|
+
export { default as FormField } from './FormField';
|
|
40
|
+
export type { FormFieldProps } from './FormField';
|
|
41
|
+
|
|
42
|
+
export { default as Dropdown } from './Dropdown';
|
|
43
|
+
export type { DropdownProps, DropdownOption } from './Dropdown';
|
|
44
|
+
|
|
45
|
+
export { scrollFieldIntoView } from './scrollFieldIntoView';
|
|
46
|
+
|
|
47
|
+
export { default as Spec } from './Spec';
|
|
48
|
+
export type { SpecProps } from './Spec';
|
|
49
|
+
|
|
50
|
+
export { default as Price } from './Price';
|
|
51
|
+
export type { PriceProps } from './Price';
|
|
52
|
+
|
|
53
|
+
export { default as Stars } from './Stars';
|
|
54
|
+
export type { StarsProps } from './Stars';
|
|
55
|
+
|
|
56
|
+
export { default as PriceEvalBar } from './PriceEvalBar';
|
|
57
|
+
export type { PriceEvalBarProps } from './PriceEvalBar';
|
|
58
|
+
|
|
59
|
+
export { default as SaveChip } from './SaveChip';
|
|
60
|
+
export type { SaveChipProps } from './SaveChip';
|
|
61
|
+
|
|
62
|
+
export { default as CardCarousel } from './CardCarousel';
|
|
63
|
+
export type { CardCarouselProps } from './CardCarousel';
|
|
64
|
+
|
|
65
|
+
// ── md3 kit (Group-B in-place rebuild) — form-bound + layout + overlay primitives ──
|
|
66
|
+
export { default as FormDropdown } from './FormDropdown';
|
|
67
|
+
export type { FormDropdownProps } from './FormDropdown';
|
|
68
|
+
export { default as FormCheckbox } from './FormCheckbox';
|
|
69
|
+
export type { FormCheckboxProps } from './FormCheckbox';
|
|
70
|
+
export { default as FormRadioGroup } from './FormRadioGroup';
|
|
71
|
+
export type { FormRadioGroupProps } from './FormRadioGroup';
|
|
72
|
+
export { default as FormRadio } from './FormRadio';
|
|
73
|
+
export type { FormRadioProps } from './FormRadio';
|
|
74
|
+
export { default as Accordion } from './Accordion';
|
|
75
|
+
export type { AccordionProps } from './Accordion';
|
|
76
|
+
export { default as Modal } from './Modal';
|
|
77
|
+
export type { ModalProps, ModalSize } from './Modal';
|
|
78
|
+
export { default as DatePicker } from './DatePicker';
|
|
79
|
+
export type { DatePickerProps } from './DatePicker';
|
|
80
|
+
export { default as Table, Thead, Tbody, Tr, Th, Td } from './Table';
|
|
81
|
+
export type { TableProps, TheadProps, TbodyProps, TrProps, ThProps, TdProps, TableAlign } from './Table';
|
|
82
|
+
export { default as Switch } from './Switch';
|
|
83
|
+
export type { SwitchProps } from './Switch';
|
|
84
|
+
export { default as Textarea } from './Textarea';
|
|
85
|
+
export type { TextareaProps } from './Textarea';
|
|
86
|
+
export { default as Pagination } from './Pagination';
|
|
87
|
+
export type { PaginationProps } from './Pagination';
|
|
88
|
+
export { default as Stepper } from './Stepper';
|
|
89
|
+
export type { StepperProps, StepperStep, StepStatus } from './Stepper';
|
|
90
|
+
export { default as FileUpload } from './FileUpload';
|
|
91
|
+
export type { FileUploadProps } from './FileUpload';
|
|
92
|
+
export { default as Skeleton } from './Skeleton';
|
|
93
|
+
export type { SkeletonProps } from './Skeleton';
|