@fastnd/components 1.0.4 → 1.0.5

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.
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- export interface FavoriteButtonProps {
2
+ export interface FavoriteButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onToggle'> {
3
3
  pressed: boolean;
4
4
  projectName: string;
5
- variant?: 'default' | 'featured';
6
5
  onToggle?: (nextPressed: boolean) => void;
7
6
  className?: string;
8
7
  }
@@ -1,17 +1,16 @@
1
1
  import React from 'react';
2
- import { type StatusBadgeStatus } from '../StatusBadge/StatusBadge';
2
+ import { StatusBadgeStatus } from '../StatusBadge/StatusBadge';
3
3
  export interface ProjectRow {
4
4
  id: string;
5
5
  name: string;
6
6
  client: string;
7
7
  app: string;
8
8
  status: StatusBadgeStatus;
9
- statusLabel: string;
10
9
  favorite: boolean;
11
10
  }
12
- export interface ProjectTableProps {
11
+ export interface ProjectTableProps extends React.HTMLAttributes<HTMLDivElement> {
13
12
  rows: ProjectRow[];
14
- onFavoriteToggle?: (id: string, nextPressed: boolean) => void;
13
+ onToggleFavorite?: (id: string, nextFavorite: boolean) => void;
15
14
  className?: string;
16
15
  }
17
- export declare const ProjectTable: React.ForwardRefExoticComponent<ProjectTableProps & React.RefAttributes<HTMLTableElement>>;
16
+ export declare const ProjectTable: React.ForwardRefExoticComponent<ProjectTableProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- export type StatusBadgeStatus = 'neu' | 'offen' | 'pruefung' | 'validierung' | 'abgeschlossen';
3
- export interface StatusBadgeProps {
2
+ export type StatusBadgeStatus = 'neu' | 'offen' | 'in-prufung' | 'validierung' | 'abgeschlossen';
3
+ export declare const STATUS_LABELS: Record<StatusBadgeStatus, string>;
4
+ export interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
4
5
  status: StatusBadgeStatus;
5
- label: string;
6
- variant?: 'default' | 'featured';
7
6
  className?: string;
8
7
  }
9
8
  export declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface StatusChartProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ total: number;
4
+ totalLabel?: string;
5
+ className?: string;
6
+ }
7
+ export declare const StatusChart: React.ForwardRefExoticComponent<StatusChartProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export type LegendStatus = 'alle' | 'neu' | 'offen' | 'in-prufung' | 'validierung' | 'abgeschlossen';
3
+ export interface StatusLegendItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ status: LegendStatus;
5
+ label: string;
6
+ count: number;
7
+ active?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare const StatusLegendItem: React.ForwardRefExoticComponent<StatusLegendItemProps & React.RefAttributes<HTMLButtonElement>>;
@@ -2,13 +2,9 @@ export { StatusBadge } from './StatusBadge/StatusBadge';
2
2
  export type { StatusBadgeProps, StatusBadgeStatus } from './StatusBadge/StatusBadge';
3
3
  export { FavoriteButton } from './FavoriteButton/FavoriteButton';
4
4
  export type { FavoriteButtonProps } from './FavoriteButton/FavoriteButton';
5
- export { LegendItem } from './LegendItem/LegendItem';
6
- export type { LegendItemProps, LegendItemFilter } from './LegendItem/LegendItem';
7
- export { DonutChart } from './DonutChart/DonutChart';
8
- export type { DonutChartProps, DonutSegment } from './DonutChart/DonutChart';
9
- export { StatsPanel } from './StatsPanel/StatsPanel';
10
- export type { StatsPanelProps, StatsPanelLegendEntry } from './StatsPanel/StatsPanel';
11
- export { ProjectFeatured } from './ProjectFeatured/ProjectFeatured';
12
- export type { ProjectFeaturedProps } from './ProjectFeatured/ProjectFeatured';
5
+ export { StatusLegendItem } from './StatusLegendItem/StatusLegendItem';
6
+ export type { StatusLegendItemProps, LegendStatus } from './StatusLegendItem/StatusLegendItem';
7
+ export { StatusChart } from './StatusChart/StatusChart';
8
+ export type { StatusChartProps } from './StatusChart/StatusChart';
13
9
  export { ProjectTable } from './ProjectTable/ProjectTable';
14
10
  export type { ProjectTableProps, ProjectRow } from './ProjectTable/ProjectTable';
@@ -1,296 +1,215 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._badge_982rt_1{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .75rem;border-radius:9999px;font-size:.6875rem;font-weight:500;letter-spacing:.01em;white-space:nowrap;line-height:1.4}._badge__dot_982rt_14{width:6px;height:6px;border-radius:50%}._badge--neu_982rt_20{background-color:hsl(var(--status-neu) / .1);color:hsl(var(--status-neu))}._badge--neu_982rt_20 ._badge__dot_982rt_14{background-color:hsl(var(--status-neu))}._badge--offen_982rt_26{background-color:hsl(var(--status-offen) / .1);color:hsl(var(--status-offen))}._badge--offen_982rt_26 ._badge__dot_982rt_14{background-color:hsl(var(--status-offen))}._badge--pruefung_982rt_32{background-color:hsl(var(--status-pruefung) / .12);color:#ae8813}._badge--pruefung_982rt_32 ._badge__dot_982rt_14{background-color:hsl(var(--status-pruefung))}._badge--validierung_982rt_38{background-color:hsl(var(--status-validierung) / .1);color:hsl(var(--status-validierung))}._badge--validierung_982rt_38 ._badge__dot_982rt_14{background-color:hsl(var(--status-validierung))}._badge--abgeschlossen_982rt_44{background-color:hsl(var(--score-high) / .1);color:hsl(var(--score-high))}._badge--abgeschlossen_982rt_44 ._badge__dot_982rt_14{background-color:hsl(var(--score-high))}._badge--featured_982rt_50{background-color:#fff3;color:#fff}._badge--featured_982rt_50 ._badge__dot_982rt_14{background-color:#fff}._btn_1uvto_1{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:var(--radius-sm);transition:background-color .15s ease,color .15s ease;color:hsl(var(--muted-foreground))}._btn_1uvto_1:hover{background-color:hsl(var(--muted))}._btn_1uvto_1[aria-pressed=true]{color:hsl(var(--score-medium))}._btn--featured_1uvto_20{color:#fff9}._btn--featured_1uvto_20:hover{background-color:#ffffff1a}._btn--featured_1uvto_20[aria-pressed=true]{color:#fff}._btn_1uvto_1 svg{width:18px;height:18px;pointer-events:none}._item_2eawr_1{display:flex;align-items:center;gap:.625rem;padding:.5rem .75rem;border-radius:var(--radius-md);transition:background-color .15s ease;width:100%;text-align:left}._item_2eawr_1:hover{background-color:hsl(var(--sidebar-accent))}._item_2eawr_1[aria-pressed=true]{background-color:hsl(var(--sidebar-accent));font-weight:500}._item__dot_2eawr_21{width:10px;height:10px;border-radius:50%;flex-shrink:0}._item__dot--alle_2eawr_28{background:var(--gradient-primary)}._item__dot--neu_2eawr_29{background-color:hsl(var(--status-neu))}._item__dot--offen_2eawr_30{background-color:hsl(var(--status-offen))}._item__dot--pruefung_2eawr_31{background-color:hsl(var(--status-pruefung))}._item__dot--validierung_2eawr_32{background-color:hsl(var(--status-validierung))}._item__dot--abgeschlossen_2eawr_33{background-color:hsl(var(--status-abgeschlossen))}._item__label_2eawr_35{flex:1;font-size:.8125rem;color:hsl(var(--sidebar-foreground))}._item__count_2eawr_41{font-family:var(--font-display);font-size:.8125rem;font-weight:600;color:hsl(var(--foreground));min-width:2rem;text-align:right}._chart_wxr92_1{position:relative;width:180px;height:180px}._chart__center_wxr92_7{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}._chart__total_wxr92_15{font-family:var(--font-display);font-size:1.75rem;font-weight:700;color:hsl(var(--foreground));line-height:1}._chart__label_wxr92_23{font-size:.625rem;color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:.08em;margin-top:.25rem}@keyframes _donutSegment_wxr92_1{0%{stroke-dasharray:0 100}}._segment_wxr92_35{animation:_donutSegment_wxr92_1 .8s ease forwards}@media(max-width:768px){._chart_wxr92_1{width:140px;height:140px}}@media(max-width:480px){._chart_wxr92_1{width:120px;height:120px}}._panel_dp2i7_1{background:hsl(var(--card));border-radius:var(--radius);border:1px solid hsl(var(--border));box-shadow:var(--shadow-card);padding:1.5rem;position:sticky;top:1rem;animation:_fadeSlideIn_dp2i7_1 .4s ease both}._panel__chartWrapper_dp2i7_12{display:flex;justify-content:center;margin-bottom:1.5rem}._panel__legend_dp2i7_18{list-style:none;display:flex;flex-direction:column;gap:.25rem}@keyframes _fadeSlideIn_dp2i7_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){._panel_dp2i7_1{position:static;display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:start}._panel__chartWrapper_dp2i7_12{margin-bottom:0}}@media(max-width:480px){._panel_dp2i7_1{grid-template-columns:1fr}}._featured_fn5hb_1{background:var(--gradient-header);padding:1rem 1.25rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}._featured__info_fn5hb_10{min-width:0}._featured__name_fn5hb_14{font-family:var(--font-display);font-size:1rem;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._featured__client_fn5hb_24{font-size:.75rem;color:#ffffffbf;margin-top:.125rem}._featured__actions_fn5hb_30{display:flex;align-items:center;gap:.75rem;flex-shrink:0}@media(max-width:768px){._featured__name_fn5hb_14{font-size:.875rem}}@media(max-width:480px){._featured_fn5hb_1{flex-direction:column;align-items:flex-start;gap:.5rem}._featured__actions_fn5hb_30{align-self:flex-end}}._table_15o0h_1{width:100%;border-collapse:collapse}._table__head_15o0h_6{position:sticky;top:0;z-index:1}._table__headerRow_15o0h_12{border-bottom:1px solid hsl(var(--border))}._table__th_15o0h_16{padding:.625rem 1rem;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:hsl(var(--muted-foreground));text-align:left;background:hsl(var(--secondary))}._table__th--actions_15o0h_27{width:3rem;text-align:center}._table__row_15o0h_32{border-bottom:1px solid hsl(var(--border));transition:background-color .1s ease;animation:_fadeSlideIn_15o0h_1 .3s ease both}._table__row_15o0h_32:last-child{border-bottom:none}._table__row_15o0h_32:hover{background-color:hsl(var(--sidebar-accent))}._table__row_15o0h_32[data-favorite=true]{background-color:hsl(var(--score-medium) / .04)}._table__row_15o0h_32[data-favorite=true]:hover{background-color:hsl(var(--score-medium) / .07)}._table__cell_15o0h_54{padding:.75rem 1rem;vertical-align:middle}._table__cell--name_15o0h_59{font-weight:500;color:hsl(var(--foreground))}._table__cell--client_15o0h_64,._table__cell--app_15o0h_65{color:hsl(var(--muted-foreground))}._table__cell--status_15o0h_69{white-space:nowrap}._table__cell--actions_15o0h_73{text-align:center}@keyframes _fadeSlideIn_15o0h_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){._table__th_15o0h_16,._table__cell_15o0h_54{padding:.5rem .625rem;font-size:.75rem}._table__cell--app_15o0h_65,._table__th--app_15o0h_99{display:none}}@media(max-width:480px){._table__cell--client_15o0h_64,._table__th--client_15o0h_109{display:none}}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('._status-badge_z2v4m_3{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .625rem;border-radius:1rem;font-size:.75rem;font-weight:500;line-height:1}._status-badge_z2v4m_3:before{content:"";display:block;width:6px;height:6px;border-radius:50%}._status-badge--neu_z2v4m_22{background-color:hsl(var(--status-neu) / .1);color:hsl(var(--status-neu))}._status-badge--neu_z2v4m_22:before{background-color:hsl(var(--status-neu))}._status-badge--offen_z2v4m_31{background-color:hsl(var(--status-offen) / .1);color:hsl(var(--status-offen))}._status-badge--offen_z2v4m_31:before{background-color:hsl(var(--status-offen))}._status-badge--in-prufung_z2v4m_40{background-color:hsl(var(--status-in-prufung) / .15);color:#aa8109}._status-badge--in-prufung_z2v4m_40:before{background-color:hsl(var(--status-in-prufung))}._status-badge--validierung_z2v4m_49{background-color:hsl(var(--status-validierung) / .15);color:#bd740f}._status-badge--validierung_z2v4m_49:before{background-color:hsl(var(--status-validierung))}._status-badge--abgeschlossen_z2v4m_58{background-color:hsl(var(--status-abgeschlossen) / .15);color:#178267}._status-badge--abgeschlossen_z2v4m_58:before{background-color:hsl(var(--status-abgeschlossen))}._favorite-btn_1q17j_3{background:none;border:none;color:hsl(var(--muted-foreground) / .5);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.375rem;border-radius:var(--radius);transition:all .2s ease}._favorite-btn_1q17j_3:hover,._favorite-btn_1q17j_3:focus-visible{background-color:hsl(var(--muted));color:hsl(var(--score-medium));outline:none}._favorite-btn--active_1q17j_23{color:hsl(var(--score-medium))}._favorite-btn_1q17j_3 svg{width:18px;height:18px;fill:currentColor}._status-legend__item_senma_3{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-radius:calc(var(--radius) - 2px);cursor:pointer;transition:background-color .2s ease;border:1px solid transparent;background:none;width:100%}._status-legend__item_senma_3:hover,._status-legend__item_senma_3:focus-visible{background-color:hsl(var(--muted));outline:none}._status-legend__item--active_senma_22{background-color:hsl(var(--muted));border-color:hsl(var(--border))}._status-legend__label-wrap_senma_27{display:flex;align-items:center;gap:.5rem}._status-legend__color_senma_33{width:12px;height:12px;border-radius:50%;flex-shrink:0}._status-legend__label_senma_27{font-size:.875rem;color:hsl(var(--foreground));font-weight:500}._status-legend__count_senma_46{font-family:var(--font-grotesk);font-size:.875rem;color:hsl(var(--muted-foreground));font-weight:600;background-color:hsl(var(--secondary));padding:.125rem .5rem;border-radius:1rem}._color-neu_senma_56{background-color:hsl(var(--status-neu))}._color-offen_senma_60{background-color:hsl(var(--status-offen))}._color-in-prufung_senma_64{background-color:hsl(var(--status-in-prufung))}._color-validierung_senma_68{background-color:hsl(var(--status-validierung))}._color-abgeschlossen_senma_72{background-color:hsl(var(--status-abgeschlossen))}._color-alle_senma_76{background-color:hsl(var(--border))}._status-overview__chart-container_23w3c_3{position:relative;width:200px;height:200px;margin:1rem auto 2rem;display:flex;align-items:center;justify-content:center}._status-chart_23w3c_13{width:100%;height:100%;border-radius:50%;background:conic-gradient(hsl(var(--status-neu)) 0% 35%,hsl(var(--status-offen)) 35% 65%,hsl(var(--status-in-prufung)) 65% 85%,hsl(var(--status-validierung)) 85% 95%,hsl(var(--status-abgeschlossen)) 95% 100%);position:absolute;top:0;left:0;transition:transform .3s ease}._status-chart_23w3c_13:hover{transform:scale(1.02)}._status-chart__hole_23w3c_32{width:140px;height:140px;background-color:hsl(var(--card));border-radius:50%;position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:inset var(--shadow-sm)}._status-chart__total-value_23w3c_46{font-family:var(--font-clash);font-size:2rem;font-weight:600;line-height:1;color:hsl(var(--foreground))}._status-chart__total-label_23w3c_54{font-size:.75rem;color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:.05em;margin-top:.25rem}:root{--primary: 209 100% 56%;--primary-hover: 207 82% 42%;--accent: 207 82% 42%;--background: 0 0% 100%;--foreground: 215 25% 15%;--muted: 210 15% 93%;--muted-foreground: 215 15% 45%;--secondary: 210 12% 94%;--border: 210 20% 90%;--input: 210 15% 92%;--card: 0 0% 100%;--card-foreground: 215 25% 15%;--popover: 0 0% 100%;--popover-foreground: 215 25% 15%;--destructive: 0 72% 51%;--score-high: 165 70% 42%;--score-medium: 45 90% 50%;--score-low: 35 85% 55%;--sidebar-background: 0 0% 100%;--sidebar-foreground: 215 20% 25%;--sidebar-primary: 209 100% 56%;--sidebar-accent: 210 20% 96%;--sidebar-border: 210 15% 92%;--radius: .5rem;--shadow-sm: 0 1px 2px 0 hsl(215 25% 15% / .04);--shadow-md: 0 4px 6px -1px hsl(215 25% 15% / .08);--shadow-lg: 0 10px 15px -3px hsl(215 25% 15% / .1);--shadow-card: 0 2px 8px hsl(215 25% 15% / .06);--gradient-primary: linear-gradient(135deg, hsl(209 100% 56%), hsl(207 82% 42%));--status-neu: var(--primary);--status-offen: 210 15% 45%;--status-in-prufung: var(--score-medium);--status-validierung: var(--score-low);--status-abgeschlossen: var(--score-high);--font-inter: "Inter", sans-serif;--font-clash: "Clash Grotesk", sans-serif;--font-grotesk: "Space Grotesk", sans-serif}._table-container_1nsqr_3{overflow-x:auto}._project-table_1nsqr_7{width:100%;border-collapse:separate;border-spacing:0;text-align:left}._project-table__head_1nsqr_14 th{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:hsl(var(--muted-foreground));padding:.75rem 1rem;border-bottom:1px solid hsl(var(--border));font-weight:600;white-space:nowrap}._project-table__row_1nsqr_25{transition:background-color .15s ease;cursor:default}._project-table__row_1nsqr_25:hover{background-color:hsl(var(--muted) / .5)}._project-table__row_1nsqr_25 td{padding:1rem;border-bottom:1px solid hsl(var(--border));font-size:.875rem;color:hsl(var(--foreground));vertical-align:middle}._project-table__row_1nsqr_25:last-child td{border-bottom:none}._project-table__name_1nsqr_46{font-weight:500;color:hsl(var(--foreground))}._project-table__client_1nsqr_51{color:hsl(var(--muted-foreground));font-size:.8125rem}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
3
3
  import h from "react";
4
- function w(e) {
5
- var r, l, a = "";
6
- if (typeof e == "string" || typeof e == "number") a += e;
7
- else if (typeof e == "object") if (Array.isArray(e)) {
8
- var _ = e.length;
9
- for (r = 0; r < _; r++) e[r] && (l = w(e[r])) && (a && (a += " "), a += l);
10
- } else for (l in e) e[l] && (a && (a += " "), a += l);
4
+ function m(t) {
5
+ var s, n, a = "";
6
+ if (typeof t == "string" || typeof t == "number") a += t;
7
+ else if (typeof t == "object") if (Array.isArray(t)) {
8
+ var r = t.length;
9
+ for (s = 0; s < r; s++) t[s] && (n = m(t[s])) && (a && (a += " "), a += n);
10
+ } else for (n in t) t[n] && (a && (a += " "), a += n);
11
11
  return a;
12
12
  }
13
- function c() {
14
- for (var e, r, l = 0, a = "", _ = arguments.length; l < _; l++) (e = arguments[l]) && (r = w(e)) && (a && (a += " "), a += r);
13
+ function i() {
14
+ for (var t, s, n = 0, a = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (s = m(t)) && (a && (a += " "), a += s);
15
15
  return a;
16
16
  }
17
- const j = "_badge_982rt_1", $ = "_badge__dot_982rt_14", p = {
18
- badge: j,
19
- badge__dot: $,
20
- "badge--neu": "_badge--neu_982rt_20",
21
- "badge--offen": "_badge--offen_982rt_26",
22
- "badge--pruefung": "_badge--pruefung_982rt_32",
23
- "badge--validierung": "_badge--validierung_982rt_38",
24
- "badge--abgeschlossen": "_badge--abgeschlossen_982rt_44",
25
- "badge--featured": "_badge--featured_982rt_50"
26
- }, N = h.forwardRef(
27
- ({ status: e, label: r, variant: l = "default", className: a }, _) => /* @__PURE__ */ o(
17
+ const b = {
18
+ "status-badge": "_status-badge_z2v4m_3",
19
+ "status-badge--neu": "_status-badge--neu_z2v4m_22",
20
+ "status-badge--offen": "_status-badge--offen_z2v4m_31",
21
+ "status-badge--in-prufung": "_status-badge--in-prufung_z2v4m_40",
22
+ "status-badge--validierung": "_status-badge--validierung_z2v4m_49",
23
+ "status-badge--abgeschlossen": "_status-badge--abgeschlossen_z2v4m_58"
24
+ }, N = {
25
+ neu: "Neu",
26
+ offen: "Offen",
27
+ "in-prufung": "In Prüfung",
28
+ validierung: "Validierung",
29
+ abgeschlossen: "Abgeschlossen"
30
+ }, p = h.forwardRef(
31
+ ({ status: t, className: s, ...n }, a) => /* @__PURE__ */ e(
28
32
  "span",
29
33
  {
30
- ref: _,
31
- className: c(
32
- p.badge,
33
- p[`badge--${e}`],
34
- { [p["badge--featured"]]: l === "featured" },
35
- a
36
- ),
37
- children: [
38
- /* @__PURE__ */ t("span", { className: p.badge__dot, "aria-hidden": "true" }),
39
- r
40
- ]
34
+ ref: a,
35
+ className: i(b["status-badge"], b[`status-badge--${t}`], s),
36
+ ...n,
37
+ children: N[t]
41
38
  }
42
39
  )
43
40
  );
44
- N.displayName = "StatusBadge";
45
- const R = "_btn_1uvto_1", y = {
46
- btn: R,
47
- "btn--featured": "_btn--featured_1uvto_20"
48
- }, v = h.forwardRef(
49
- ({ pressed: e, projectName: r, variant: l = "default", onToggle: a, className: _ }, i) => {
50
- const s = e ? `Favorit entfernen: ${r}` : `Favorit hinzufügen: ${r}`;
51
- return /* @__PURE__ */ t(
41
+ p.displayName = "StatusBadge";
42
+ const g = {
43
+ "favorite-btn": "_favorite-btn_1q17j_3",
44
+ "favorite-btn--active": "_favorite-btn--active_1q17j_23"
45
+ }, f = h.forwardRef(
46
+ ({ pressed: t, projectName: s, onToggle: n, className: a, onClick: r, ...l }, d) => {
47
+ const v = t ? `Von Favoriten entfernen: ${s}` : `Zu Favoriten hinzufügen: ${s}`;
48
+ return /* @__PURE__ */ e(
52
49
  "button",
53
50
  {
54
- ref: i,
51
+ ref: d,
55
52
  type: "button",
56
- className: c(
57
- y.btn,
58
- { [y["btn--featured"]]: l === "featured" },
59
- _
53
+ className: i(
54
+ g["favorite-btn"],
55
+ { [g["favorite-btn--active"]]: t },
56
+ a
60
57
  ),
61
- "aria-pressed": e,
62
- "aria-label": s,
63
- onClick: () => a?.(!e),
64
- children: /* @__PURE__ */ t(
65
- "svg",
66
- {
67
- xmlns: "http://www.w3.org/2000/svg",
68
- viewBox: "0 0 24 24",
69
- fill: e ? "currentColor" : "none",
70
- stroke: e ? void 0 : "currentColor",
71
- strokeWidth: e ? void 0 : 2,
72
- "aria-hidden": "true",
73
- children: /* @__PURE__ */ t("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })
74
- }
75
- )
58
+ "aria-pressed": t,
59
+ "aria-label": v,
60
+ onClick: (j) => {
61
+ n?.(!t), r?.(j);
62
+ },
63
+ ...l,
64
+ children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" }) })
76
65
  }
77
66
  );
78
67
  }
79
68
  );
80
- v.displayName = "FavoriteButton";
81
- const L = "_item_2eawr_1", P = "_item__dot_2eawr_21", D = "_item__label_2eawr_35", S = "_item__count_2eawr_41", m = {
82
- item: L,
83
- item__dot: P,
84
- "item__dot--alle": "_item__dot--alle_2eawr_28",
85
- "item__dot--neu": "_item__dot--neu_2eawr_29",
86
- "item__dot--offen": "_item__dot--offen_2eawr_30",
87
- "item__dot--pruefung": "_item__dot--pruefung_2eawr_31",
88
- "item__dot--validierung": "_item__dot--validierung_2eawr_32",
89
- "item__dot--abgeschlossen": "_item__dot--abgeschlossen_2eawr_33",
90
- item__label: D,
91
- item__count: S
92
- }, k = h.forwardRef(
93
- ({ filter: e, label: r, count: l, pressed: a, onSelect: _, className: i }, s) => /* @__PURE__ */ o(
69
+ f.displayName = "FavoriteButton";
70
+ const _ = {
71
+ "status-legend__item": "_status-legend__item_senma_3",
72
+ "status-legend__item--active": "_status-legend__item--active_senma_22",
73
+ "status-legend__label-wrap": "_status-legend__label-wrap_senma_27",
74
+ "status-legend__color": "_status-legend__color_senma_33",
75
+ "status-legend__label": "_status-legend__label_senma_27",
76
+ "status-legend__count": "_status-legend__count_senma_46",
77
+ "color-neu": "_color-neu_senma_56",
78
+ "color-offen": "_color-offen_senma_60",
79
+ "color-in-prufung": "_color-in-prufung_senma_64",
80
+ "color-validierung": "_color-validierung_senma_68",
81
+ "color-abgeschlossen": "_color-abgeschlossen_senma_72",
82
+ "color-alle": "_color-alle_senma_76"
83
+ }, y = h.forwardRef(
84
+ ({ status: t, label: s, count: n, active: a = !1, className: r, ...l }, d) => /* @__PURE__ */ c(
94
85
  "button",
95
86
  {
96
- ref: s,
87
+ ref: d,
97
88
  type: "button",
98
89
  role: "option",
99
- className: c(m.item, i),
100
- "aria-pressed": a,
101
- "data-filter": e,
102
- onClick: () => _(e),
90
+ "aria-selected": a,
91
+ className: i(
92
+ _["status-legend__item"],
93
+ { [_["status-legend__item--active"]]: a },
94
+ r
95
+ ),
96
+ ...l,
103
97
  children: [
104
- /* @__PURE__ */ t(
105
- "span",
98
+ /* @__PURE__ */ c("div", { className: _["status-legend__label-wrap"], children: [
99
+ /* @__PURE__ */ e(
100
+ "span",
101
+ {
102
+ className: i(_["status-legend__color"], _[`color-${t}`]),
103
+ "aria-hidden": "true"
104
+ }
105
+ ),
106
+ /* @__PURE__ */ e("span", { className: _["status-legend__label"], children: s })
107
+ ] }),
108
+ /* @__PURE__ */ e("span", { className: _["status-legend__count"], children: n })
109
+ ]
110
+ }
111
+ )
112
+ );
113
+ y.displayName = "StatusLegendItem";
114
+ const u = {
115
+ "status-overview__chart-container": "_status-overview__chart-container_23w3c_3",
116
+ "status-chart": "_status-chart_23w3c_13",
117
+ "status-chart__hole": "_status-chart__hole_23w3c_32",
118
+ "status-chart__total-value": "_status-chart__total-value_23w3c_46",
119
+ "status-chart__total-label": "_status-chart__total-label_23w3c_54"
120
+ }, w = h.forwardRef(
121
+ ({ total: t, totalLabel: s = "Gesamt", className: n, ...a }, r) => /* @__PURE__ */ c(
122
+ "div",
123
+ {
124
+ ref: r,
125
+ className: i(u["status-overview__chart-container"], n),
126
+ ...a,
127
+ children: [
128
+ /* @__PURE__ */ e(
129
+ "div",
106
130
  {
107
- className: c(m.item__dot, m[`item__dot--${e}`]),
108
- "aria-hidden": "true"
131
+ className: u["status-chart"],
132
+ role: "img",
133
+ "aria-label": "Kreisdiagramm der Projektstatus-Verteilung"
109
134
  }
110
135
  ),
111
- /* @__PURE__ */ t("span", { className: m.item__label, children: r }),
112
- /* @__PURE__ */ t("span", { className: m.item__count, children: l })
136
+ /* @__PURE__ */ c("div", { className: u["status-chart__hole"], children: [
137
+ /* @__PURE__ */ e("span", { className: u["status-chart__total-value"], children: t }),
138
+ /* @__PURE__ */ e("span", { className: u["status-chart__total-label"], children: s })
139
+ ] })
113
140
  ]
114
141
  }
115
142
  )
116
143
  );
117
- k.displayName = "LegendItem";
118
- const W = "_chart_wxr92_1", A = "_chart__center_wxr92_7", B = "_chart__total_wxr92_15", C = "_chart__label_wxr92_23", F = "_segment_wxr92_35", u = {
119
- chart: W,
120
- chart__center: A,
121
- chart__total: B,
122
- chart__label: C,
123
- segment: F
124
- }, x = h.forwardRef(
125
- ({ total: e, totalLabel: r, segments: l, ariaLabel: a, className: _ }, i) => /* @__PURE__ */ o("div", { ref: i, className: c(u.chart, _), role: "img", "aria-label": a, children: [
126
- /* @__PURE__ */ o("svg", { viewBox: "0 0 42 42", width: "100%", height: "100%", children: [
127
- /* @__PURE__ */ t(
128
- "circle",
129
- {
130
- cx: "21",
131
- cy: "21",
132
- r: "15.915",
133
- fill: "none",
134
- stroke: "hsl(var(--muted))",
135
- strokeWidth: "5"
136
- }
137
- ),
138
- l.map((s, b) => /* @__PURE__ */ t(
139
- "circle",
140
- {
141
- className: u.segment,
142
- cx: "21",
143
- cy: "21",
144
- r: "15.915",
145
- fill: "none",
146
- stroke: s.color,
147
- strokeWidth: "5",
148
- strokeDasharray: s.dashArray,
149
- strokeDashoffset: s.dashOffset,
150
- strokeLinecap: "round",
151
- style: { animationDelay: s.animationDelay }
152
- },
153
- b
154
- ))
155
- ] }),
156
- /* @__PURE__ */ o("div", { className: u.chart__center, children: [
157
- /* @__PURE__ */ t("div", { className: u.chart__total, children: e }),
158
- /* @__PURE__ */ t("div", { className: u.chart__label, children: r })
159
- ] })
160
- ] })
161
- );
162
- x.displayName = "DonutChart";
163
- const T = "_panel_dp2i7_1", z = "_panel__chartWrapper_dp2i7_12", I = "_panel__legend_dp2i7_18", g = {
164
- panel: T,
165
- panel__chartWrapper: z,
166
- panel__legend: I
167
- }, K = h.forwardRef(
168
- ({ total: e, segments: r, legend: l, activeFilter: a, onFilterChange: _, className: i }, s) => {
169
- const b = `Donut-Diagramm: ${l.filter((d) => d.filter !== "alle").map((d) => `${d.count} ${d.label}`).join(", ")}`;
170
- return /* @__PURE__ */ o(
171
- "aside",
172
- {
173
- ref: s,
174
- className: c(g.panel, i),
175
- "aria-label": "Projektstatistiken",
176
- children: [
177
- /* @__PURE__ */ t("div", { className: g.panel__chartWrapper, children: /* @__PURE__ */ t(
178
- x,
144
+ w.displayName = "StatusChart";
145
+ const o = {
146
+ "table-container": "_table-container_1nsqr_3",
147
+ "project-table": "_project-table_1nsqr_7",
148
+ "project-table__head": "_project-table__head_1nsqr_14",
149
+ "project-table__row": "_project-table__row_1nsqr_25",
150
+ "project-table__name": "_project-table__name_1nsqr_46",
151
+ "project-table__client": "_project-table__client_1nsqr_51"
152
+ }, L = h.forwardRef(
153
+ ({ rows: t, onToggleFavorite: s, className: n, ...a }, r) => /* @__PURE__ */ e(
154
+ "div",
155
+ {
156
+ ref: r,
157
+ className: i(o["table-container"], n),
158
+ tabIndex: 0,
159
+ ...a,
160
+ children: /* @__PURE__ */ c("table", { className: o["project-table"], children: [
161
+ /* @__PURE__ */ e("thead", { className: o["project-table__head"], children: /* @__PURE__ */ c("tr", { children: [
162
+ /* @__PURE__ */ e("th", { scope: "col", children: "Projektname" }),
163
+ /* @__PURE__ */ e("th", { scope: "col", children: "Kunde" }),
164
+ /* @__PURE__ */ e("th", { scope: "col", children: "Applikation" }),
165
+ /* @__PURE__ */ e("th", { scope: "col", children: "Status" }),
166
+ /* @__PURE__ */ e("th", { scope: "col", "aria-label": "Favorit", children: /* @__PURE__ */ e(
167
+ "svg",
179
168
  {
180
- total: e,
181
- totalLabel: "Projekte",
182
- segments: r,
183
- ariaLabel: b
169
+ width: "14",
170
+ height: "14",
171
+ viewBox: "0 0 24 24",
172
+ fill: "none",
173
+ stroke: "currentColor",
174
+ strokeWidth: "2",
175
+ strokeLinecap: "round",
176
+ strokeLinejoin: "round",
177
+ "aria-hidden": "true",
178
+ children: /* @__PURE__ */ e("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })
184
179
  }
185
- ) }),
186
- /* @__PURE__ */ t(
187
- "ul",
188
- {
189
- className: g.panel__legend,
190
- role: "listbox",
191
- "aria-label": "Projekte nach Status filtern",
192
- children: l.map((d) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
193
- k,
180
+ ) })
181
+ ] }) }),
182
+ /* @__PURE__ */ e("tbody", { className: o["project-table__body"], children: t.map((l) => /* @__PURE__ */ c(
183
+ "tr",
184
+ {
185
+ className: o["project-table__row"],
186
+ "data-status": l.status,
187
+ children: [
188
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("div", { className: o["project-table__name"], children: l.name }) }),
189
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: o["project-table__client"], children: l.client }) }),
190
+ /* @__PURE__ */ e("td", { children: l.app }),
191
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(p, { status: l.status }) }),
192
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
193
+ f,
194
194
  {
195
- filter: d.filter,
196
- label: d.label,
197
- count: d.count,
198
- pressed: a === d.filter,
199
- onSelect: _
195
+ pressed: l.favorite,
196
+ projectName: l.name,
197
+ onToggle: (d) => s?.(l.id, d)
200
198
  }
201
- ) }, d.filter))
202
- }
203
- )
204
- ]
205
- }
206
- );
207
- }
208
- );
209
- K.displayName = "StatsPanel";
210
- const M = "_featured_fn5hb_1", O = "_featured__info_fn5hb_10", q = "_featured__name_fn5hb_14", E = "_featured__client_fn5hb_24", G = "_featured__actions_fn5hb_30", f = {
211
- featured: M,
212
- featured__info: O,
213
- featured__name: q,
214
- featured__client: E,
215
- featured__actions: G
216
- }, H = h.forwardRef(
217
- ({ name: e, client: r, status: l, statusLabel: a, favorite: _, onFavoriteToggle: i, className: s }, b) => /* @__PURE__ */ o("div", { ref: b, className: c(f.featured, s), children: [
218
- /* @__PURE__ */ o("div", { className: f.featured__info, children: [
219
- /* @__PURE__ */ t("div", { className: f.featured__name, children: e }),
220
- /* @__PURE__ */ t("div", { className: f.featured__client, children: r })
221
- ] }),
222
- /* @__PURE__ */ o("div", { className: f.featured__actions, children: [
223
- /* @__PURE__ */ t(N, { status: l, label: a, variant: "featured" }),
224
- /* @__PURE__ */ t(
225
- v,
226
- {
227
- pressed: _,
228
- projectName: e,
229
- variant: "featured",
230
- onToggle: i
231
- }
232
- )
233
- ] })
234
- ] })
235
- );
236
- H.displayName = "ProjectFeatured";
237
- const J = "_table_15o0h_1", Q = "_table__head_15o0h_6", U = "_table__headerRow_15o0h_12", V = "_table__th_15o0h_16", X = "_table__row_15o0h_32", Y = "_table__cell_15o0h_54", n = {
238
- table: J,
239
- table__head: Q,
240
- table__headerRow: U,
241
- table__th: V,
242
- "table__th--actions": "_table__th--actions_15o0h_27",
243
- table__row: X,
244
- table__cell: Y,
245
- "table__cell--name": "_table__cell--name_15o0h_59",
246
- "table__cell--client": "_table__cell--client_15o0h_64",
247
- "table__cell--app": "_table__cell--app_15o0h_65",
248
- "table__cell--status": "_table__cell--status_15o0h_69",
249
- "table__cell--actions": "_table__cell--actions_15o0h_73",
250
- "table__th--app": "_table__th--app_15o0h_99",
251
- "table__th--client": "_table__th--client_15o0h_109"
252
- }, Z = h.forwardRef(
253
- ({ rows: e, onFavoriteToggle: r, className: l }, a) => /* @__PURE__ */ o("table", { ref: a, className: c(n.table, l), "aria-label": "Projekte", children: [
254
- /* @__PURE__ */ t("thead", { className: n.table__head, children: /* @__PURE__ */ o("tr", { className: n.table__headerRow, children: [
255
- /* @__PURE__ */ t("th", { className: n.table__th, scope: "col", children: "Projekt" }),
256
- /* @__PURE__ */ t("th", { className: c(n.table__th, n["table__th--client"]), scope: "col", children: "Kunde" }),
257
- /* @__PURE__ */ t("th", { className: c(n.table__th, n["table__th--app"]), scope: "col", children: "Applikation" }),
258
- /* @__PURE__ */ t("th", { className: n.table__th, scope: "col", children: "Status" }),
259
- /* @__PURE__ */ t("th", { className: c(n.table__th, n["table__th--actions"]), scope: "col", children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Aktionen" }) })
260
- ] }) }),
261
- /* @__PURE__ */ t("tbody", { children: e.map((_, i) => /* @__PURE__ */ o(
262
- "tr",
263
- {
264
- className: n.table__row,
265
- "data-status": _.status,
266
- "data-favorite": _.favorite,
267
- style: { animationDelay: `${0.15 + i * 0.03}s` },
268
- children: [
269
- /* @__PURE__ */ t("td", { className: c(n.table__cell, n["table__cell--name"]), children: _.name }),
270
- /* @__PURE__ */ t("td", { className: c(n.table__cell, n["table__cell--client"]), children: _.client }),
271
- /* @__PURE__ */ t("td", { className: c(n.table__cell, n["table__cell--app"]), children: _.app }),
272
- /* @__PURE__ */ t("td", { className: c(n.table__cell, n["table__cell--status"]), children: /* @__PURE__ */ t(N, { status: _.status, label: _.statusLabel }) }),
273
- /* @__PURE__ */ t("td", { className: c(n.table__cell, n["table__cell--actions"]), children: /* @__PURE__ */ t(
274
- v,
275
- {
276
- pressed: _.favorite,
277
- projectName: _.name,
278
- onToggle: (s) => r?.(_.id, s)
279
- }
280
- ) })
281
- ]
282
- },
283
- _.id
284
- )) })
285
- ] })
199
+ ) })
200
+ ]
201
+ },
202
+ l.id
203
+ )) })
204
+ ] })
205
+ }
206
+ )
286
207
  );
287
- Z.displayName = "ProjectTable";
208
+ L.displayName = "ProjectTable";
288
209
  export {
289
- x as DonutChart,
290
- v as FavoriteButton,
291
- k as LegendItem,
292
- H as ProjectFeatured,
293
- Z as ProjectTable,
294
- K as StatsPanel,
295
- N as StatusBadge
210
+ f as FavoriteButton,
211
+ L as ProjectTable,
212
+ p as StatusBadge,
213
+ w as StatusChart,
214
+ y as StatusLegendItem
296
215
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastnd/components",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/components.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- export interface DonutSegment {
3
- color: string;
4
- dashArray: string;
5
- dashOffset: string;
6
- animationDelay: string;
7
- }
8
- export interface DonutChartProps {
9
- total: number;
10
- totalLabel: string;
11
- segments: DonutSegment[];
12
- ariaLabel: string;
13
- className?: string;
14
- }
15
- export declare const DonutChart: React.ForwardRefExoticComponent<DonutChartProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export type LegendItemFilter = 'alle' | 'neu' | 'offen' | 'pruefung' | 'validierung' | 'abgeschlossen';
3
- export interface LegendItemProps {
4
- filter: LegendItemFilter;
5
- label: string;
6
- count: number;
7
- pressed: boolean;
8
- onSelect: (filter: LegendItemFilter) => void;
9
- className?: string;
10
- }
11
- export declare const LegendItem: React.ForwardRefExoticComponent<LegendItemProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { type StatusBadgeStatus } from '../StatusBadge/StatusBadge';
3
- export interface ProjectFeaturedProps {
4
- name: string;
5
- client: string;
6
- status: StatusBadgeStatus;
7
- statusLabel: string;
8
- favorite: boolean;
9
- onFavoriteToggle?: (nextPressed: boolean) => void;
10
- className?: string;
11
- }
12
- export declare const ProjectFeatured: React.ForwardRefExoticComponent<ProjectFeaturedProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { type DonutSegment } from '../DonutChart/DonutChart';
3
- import { type LegendItemFilter } from '../LegendItem/LegendItem';
4
- export interface StatsPanelLegendEntry {
5
- filter: LegendItemFilter;
6
- label: string;
7
- count: number;
8
- }
9
- export interface StatsPanelProps {
10
- total: number;
11
- segments: DonutSegment[];
12
- legend: StatsPanelLegendEntry[];
13
- activeFilter: LegendItemFilter;
14
- onFilterChange: (filter: LegendItemFilter) => void;
15
- className?: string;
16
- }
17
- export declare const StatsPanel: React.ForwardRefExoticComponent<StatsPanelProps & React.RefAttributes<HTMLElement>>;