diff --git a/component-library/package-lock.json b/component-library/package-lock.json index b063773..1468716 100644 --- a/component-library/package-lock.json +++ b/component-library/package-lock.json @@ -16,6 +16,7 @@ "@radix-ui/react-select": "^2.2.5", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.3.7", "@radix-ui/react-tabs": "^1.1.12", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -1471,6 +1472,34 @@ } } }, + "node_modules/@radix-ui/react-switch": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.3.7.tgz", + "integrity": "sha512-48tB/4dn2UVLBCYhTu9AuR63IHl73l/qLbLgxd86noTUor4/K4LFDAcYjK+isP5313qxaFpjPVogE7+Y0/V3Kw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.2.2", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-use-controllable-state": "1.2.6", + "@radix-ui/react-use-size": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-tabs": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.21.tgz", diff --git a/component-library/package.json b/component-library/package.json index 1118d48..748884d 100644 --- a/component-library/package.json +++ b/component-library/package.json @@ -17,6 +17,7 @@ "@radix-ui/react-select": "^2.2.5", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.3.7", "@radix-ui/react-tabs": "^1.1.12", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/component-library/src/components/gebos/hero-art.tsx b/component-library/src/components/gebos/hero-art.tsx index 9cd6df4..407f41e 100644 --- a/component-library/src/components/gebos/hero-art.tsx +++ b/component-library/src/components/gebos/hero-art.tsx @@ -6,7 +6,8 @@ import consumptionRing from "@/assets/gebos/consumption-ring.svg" import smokeAlarmAvif from "@/assets/gebos/smoke-alarm.avif" import smokeAlarmWebp from "@/assets/gebos/smoke-alarm.webp" import tealBars from "@/assets/gebos/teal-bars.svg" -import uviBadge from "@/assets/gebos/uvi-badge.svg" +import uviBadge from "@/assetAs/gebos/uvi-badge.svg" +import { AssetRender, renders } from "" /** * Homepage hero composition from the GebOS visual asset kit: @@ -30,6 +31,11 @@ function HeroArt({ className }: { className?: string }) { alt="" className="absolute top-[12%] -right-[5%] z-0 w-[46%]" /> +
- +

Messdienstleistungen einfach gemacht – von der vorkonfigurierten Hardware bis zum laufenden Betrieb. diff --git a/component-library/src/components/ui/switch.tsx b/component-library/src/components/ui/switch.tsx new file mode 100644 index 0000000..d407af6 --- /dev/null +++ b/component-library/src/components/ui/switch.tsx @@ -0,0 +1,48 @@ +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" +import { CheckIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +/** + * On/off switch. The lit track is the same teal glass as a primary button, at + * pill scale (`inset-shadow-glass-pill`); off it is a recessed navy pane. The + * thumb travels on the site's spring easing and carries the checkbox tick, so + * the state reads without relying on colour alone. + */ +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +export { Switch } diff --git a/component-library/src/pages/audiences/hauseigentuemer.tsx b/component-library/src/pages/audiences/hauseigentuemer.tsx index deeedfc..243631c 100644 --- a/component-library/src/pages/audiences/hauseigentuemer.tsx +++ b/component-library/src/pages/audiences/hauseigentuemer.tsx @@ -35,7 +35,7 @@ function HomeownerArt() {

diff --git a/component-library/src/pages/configurator.tsx b/component-library/src/pages/configurator.tsx index 2719aae..5b9ed42 100644 --- a/component-library/src/pages/configurator.tsx +++ b/component-library/src/pages/configurator.tsx @@ -9,7 +9,7 @@ import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Separator } from "@/components/ui/separator" -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Switch } from "@/components/ui/switch" import { Checklist } from "@/components/gebos/checklist" import { IconBadge } from "@/components/gebos/icon-tile" import { Container, Section, SectionHeading } from "@/components/gebos/section" @@ -160,13 +160,12 @@ function ServiceOption({ * "Nicht enthalten" instead of merely dimmed. */ function PackageCard({ - assets, + render, title, items, included, }: { - /** drawn side by side in the header, first one leading */ - assets: RenderAsset[] + render: RenderAsset title: string items: string[] included: boolean @@ -179,17 +178,12 @@ function PackageCard({ )} >
-
- {assets.map((asset) => ( - - ))} -
+

b.heat === "fussbodenheizung") - ? renders.floorHeating - : renders.radiator return ( @@ -333,22 +323,34 @@ export default function ConfiguratorPage() { />

-

Installation

- setInstall(v === "mit")} +
- - Mit Installation - Ohne Installation - - -

- {install - ? "GebOS organisiert die Montage – Geräte- und Monatspreise enthalten die Installation." - : "Sie selbst, Ihr Hausmeister oder Ihr Fachbetrieb montiert die Geräte."} -

+
+ +

+ {install + ? "GebOS organisiert die Montage – Geräte- und Monatspreise enthalten die Installation." + : "Sie selbst, Ihr Hausmeister oder Ihr Fachbetrieb montiert die Geräte."} +

+
+ +
@@ -563,7 +565,7 @@ export default function ConfiguratorPage() { />
{solutions.map((s) => ( diff --git a/component-library/src/styles/globals.css b/component-library/src/styles/globals.css index 5962fb0..7bb1f07 100644 --- a/component-library/src/styles/globals.css +++ b/component-library/src/styles/globals.css @@ -133,6 +133,10 @@ 0 1px 2px rgb(19 41 60 / 0.05), 0 10px 22px -10px var(--glass-bloom); --shadow-glass-lg: 0 2px 4px rgb(19 41 60 / 0.06), 0 18px 34px -12px var(--glass-bloom); + /* the same optics at control scale, for pills the size of a switch track */ + --inset-shadow-glass-pill: + inset 0 1px 0 0 var(--glass-rim), inset 0 0 0 1px var(--glass-ring), + inset 0 -4px 6px -4px var(--glass-caustic); /* the same optics at slab scale, for surfaces the size of the footer */ --inset-shadow-glass-slab: inset 0 2px 0 0 var(--glass-rim), inset 0 0 0 1px var(--glass-ring),