UI/UX-Prototyp der Analytics-Dashboards in HiveGrid, fachlich auf einen SHK-/Handwerksbetrieb zugeschnitten. Ziel ist die Übergabe an die Entwicklung, nicht der Produktivbetrieb. Inhalt: sechs Seiten (Übersicht, Finanzen, Aufträge, Kunden, Team, Komponenten), 26 KPIs, neun Chart-Bausteine, Filtersystem mit seitenabhängiger Relevanz und ein deterministischer Demo-Datensatz (420 Kunden, 1.900 Aufträge, Stichtag 30.07.2026). Drei Quellen sind zusammengeführt: die fachliche Planung mit dem Branchenpartner (Januar 2026), die Subframe-Komponentenbibliothek aus dem HiveGrid-Pitch und IBM Carbon Data Visualization für die Diagrammregeln. Herkunft und bewusste Abweichungen stehen in docs/HERKUNFT.md. Dokumentation: README, HANDOVER (was echte Logik braucht), docs/DESIGN-SYSTEM, KPI-KATALOG, DATENMODELL, NAVIGATION, HERKUNFT, ZIELSYSTEM (Einbauort in HiveGrid Cloud) und LEITPLANKEN (welche Cloud-Screens als Vorbild taugen). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QPeZNwSeU7qG3RRCwaxEZX
78 lines
2.5 KiB
TypeScript
78 lines
2.5 KiB
TypeScript
"use client";
|
|
/*
|
|
* Documentation:
|
|
* Copy to clipboard button — https://app.subframe.com/f023064a5ca0/library?component=Copy+to+clipboard+button_e8c76626-6462-4f2f-b595-38d530d427e8
|
|
* Tooltip — https://app.subframe.com/f023064a5ca0/library?component=Tooltip_ccebd1e9-f6ac-4737-8376-0dfacd90c9f3
|
|
*/
|
|
|
|
import React from "react";
|
|
import { FeatherClipboard } from "@subframe/core";
|
|
import * as SubframeCore from "@subframe/core";
|
|
import * as SubframeUtils from "../../utils";
|
|
import { Tooltip } from "../Tooltip";
|
|
|
|
export interface CopyToClipboardButtonRootProps
|
|
extends Omit<
|
|
React.ComponentProps<typeof SubframeCore.CopyToClipboard.Root>,
|
|
"clipboardText"
|
|
> {
|
|
clipboardText?: React.ReactNode;
|
|
tooltipText?: React.ReactNode;
|
|
icon?: React.ReactNode;
|
|
onCopy?: () => void;
|
|
className?: string;
|
|
}
|
|
|
|
const CopyToClipboardButtonRoot = React.forwardRef<
|
|
HTMLDivElement,
|
|
CopyToClipboardButtonRootProps
|
|
>(function CopyToClipboardButtonRoot(
|
|
{
|
|
clipboardText,
|
|
tooltipText,
|
|
icon = <FeatherClipboard />,
|
|
className,
|
|
...otherProps
|
|
}: CopyToClipboardButtonRootProps,
|
|
ref
|
|
) {
|
|
return (
|
|
<SubframeCore.Tooltip.Provider>
|
|
<SubframeCore.Tooltip.Root>
|
|
<SubframeCore.Tooltip.Trigger asChild={true}>
|
|
<SubframeCore.CopyToClipboard.Root
|
|
clipboardText={clipboardText as string}
|
|
{...otherProps}
|
|
>
|
|
<div
|
|
className={SubframeUtils.twClassNames(
|
|
"group/e8c76626 flex h-6 w-6 cursor-pointer flex-col items-center justify-center gap-2 rounded-md hover:bg-surface-neutral-tertiary",
|
|
className
|
|
)}
|
|
ref={ref}
|
|
>
|
|
{icon ? (
|
|
<SubframeCore.IconWrapper className="text-body-default-regular-0 font-body-default-regular-0 text-icon-neutral-secondary group-hover/e8c76626:text-icon-neutral-primary">
|
|
{icon}
|
|
</SubframeCore.IconWrapper>
|
|
) : null}
|
|
</div>
|
|
</SubframeCore.CopyToClipboard.Root>
|
|
</SubframeCore.Tooltip.Trigger>
|
|
<SubframeCore.Tooltip.Portal>
|
|
<SubframeCore.Tooltip.Content
|
|
side="bottom"
|
|
align="center"
|
|
sideOffset={8}
|
|
asChild={true}
|
|
>
|
|
<Tooltip>{tooltipText}</Tooltip>
|
|
</SubframeCore.Tooltip.Content>
|
|
</SubframeCore.Tooltip.Portal>
|
|
</SubframeCore.Tooltip.Root>
|
|
</SubframeCore.Tooltip.Provider>
|
|
);
|
|
});
|
|
|
|
export const CopyToClipboardButton = CopyToClipboardButtonRoot;
|