@fastnd/components 1.0.4 → 1.0.6

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,9 +1,10 @@
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;
6
+ color?: string;
7
+ activeColor?: string;
7
8
  className?: string;
8
9
  }
9
10
  export declare const FavoriteButton: React.ForwardRefExoticComponent<FavoriteButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,17 +1,18 @@
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;
10
+ createdAt: string;
11
+ updatedAt: string;
11
12
  }
12
- export interface ProjectTableProps {
13
+ export interface ProjectTableProps extends React.HTMLAttributes<HTMLDivElement> {
13
14
  rows: ProjectRow[];
14
- onFavoriteToggle?: (id: string, nextPressed: boolean) => void;
15
+ onToggleFavorite?: (id: string, nextFavorite: boolean) => void;
15
16
  className?: string;
16
17
  }
17
- export declare const ProjectTable: React.ForwardRefExoticComponent<ProjectTableProps & React.RefAttributes<HTMLTableElement>>;
18
+ export declare const ProjectTable: React.ForwardRefExoticComponent<ProjectTableProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,10 @@
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';
6
+ color?: string;
7
+ backgroundColor?: string;
7
8
  className?: string;
8
9
  }
9
10
  export declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface StatusSegment {
3
+ status: string;
4
+ label: string;
5
+ value: number;
6
+ color: string;
7
+ }
8
+ export interface StatusChartProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ data: StatusSegment[];
10
+ totalLabel?: string;
11
+ onSegmentClick?: (status: string) => void;
12
+ className?: string;
13
+ }
14
+ export declare const StatusChart: React.ForwardRefExoticComponent<StatusChartProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,11 @@
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
+ color?: string;
9
+ className?: string;
10
+ }
11
+ 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,316 @@
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";
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);
11
- return a;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._status-badge_1vytb_3{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .625rem;border-radius:1rem;font-size:.75rem;font-weight:500;line-height:1;color:var(--custom-color, var(--current-color));background-color:var(--custom-bg, var(--current-bg));white-space:nowrap}._status-badge_1vytb_3:before{content:"";display:block;width:6px;height:6px;border-radius:50%;background-color:var(--custom-color, var(--current-color))}._status-badge--neu_1vytb_26{--current-color: hsl(var(--status-neu));--current-bg: hsl(var(--status-neu) / .1)}._status-badge--offen_1vytb_31{--current-color: hsl(var(--status-offen));--current-bg: hsl(var(--status-offen) / .1)}._status-badge--in-prufung_1vytb_36{--current-color: hsl(var(--status-in-prufung));--current-bg: hsl(var(--status-in-prufung) / .1)}._status-badge--validierung_1vytb_41{--current-color: hsl(var(--status-validierung));--current-bg: hsl(var(--status-validierung) / .1)}._status-badge--abgeschlossen_1vytb_46{--current-color: hsl(var(--status-abgeschlossen));--current-bg: hsl(var(--status-abgeschlossen) / .1)}._favorite-btn_1f4wz_3{background:none;border:none;color:var(--custom-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_1f4wz_3:hover,._favorite-btn_1f4wz_3:focus-visible{background-color:hsl(var(--muted));color:var(--custom-active-color, hsl(var(--score-medium)));outline:none}._favorite-btn--active_1f4wz_23{color:var(--custom-active-color, hsl(var(--score-medium)))}._favorite-btn_1f4wz_3 svg{width:18px;height:18px;fill:currentColor}._status-legend__item_1935r_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_1935r_3:hover,._status-legend__item_1935r_3:focus-visible{background-color:hsl(var(--muted));outline:none}._status-legend__item--active_1935r_22{background-color:hsl(var(--muted));border-color:hsl(var(--border))}._status-legend__label-wrap_1935r_27{display:flex;align-items:center;gap:.5rem}._status-legend__color_1935r_33{width:12px;height:12px;border-radius:50%;flex-shrink:0;background-color:var(--custom-color, var(--current-color))}._status-legend__label_1935r_27{font-size:.875rem;color:hsl(var(--foreground));font-weight:500}._status-legend__count_1935r_47{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_1935r_57{--current-color: hsl(var(--status-neu))}._color-offen_1935r_61{--current-color: hsl(var(--status-offen))}._color-in-prufung_1935r_65{--current-color: hsl(var(--status-in-prufung))}._color-validierung_1935r_69{--current-color: hsl(var(--status-validierung))}._color-abgeschlossen_1935r_73{--current-color: hsl(var(--status-abgeschlossen))}._color-alle_1935r_77{--current-color: hsl(var(--status-alle))}._status-overview__chart-container_1f9eq_3{position:relative;width:200px;height:200px;margin:1rem auto 2rem;display:flex;align-items:center;justify-content:center}._status-chart-svg_1f9eq_13{width:100%;height:100%;position:absolute;top:0;left:0;filter:drop-shadow(var(--shadow-sm));pointer-events:none}._status-chart__segment_1f9eq_23{transition:all .3s cubic-bezier(.4,0,.2,1);stroke-linecap:butt;pointer-events:stroke}._status-chart__segment_1f9eq_23:hover,._status-chart__segment--hovered_1f9eq_30{stroke-width:48px;filter:brightness(1.1)}._status-chart__segment--dimmed_1f9eq_35{opacity:.6;filter:grayscale(.2)}._status-chart__hole_1f9eq_40{width:120px;height:120px;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);clip-path:circle(50%)}._status-chart__total-value_1f9eq_55{font-family:var(--font-clash);font-size:2rem;font-weight:600;line-height:1;color:hsl(var(--foreground))}._status-chart__total-label_1f9eq_63{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-alle: 215 16% 47%;--status-neu: 210 95% 63%;--status-offen: 38 92% 50%;--status-in-prufung: 350 89% 60%;--status-validierung: 82 84% 44%;--status-abgeschlossen: 142 76% 36%;--font-inter: "Inter", sans-serif;--font-clash: "Clash Grotesk", sans-serif;--font-grotesk: "Space Grotesk", sans-serif}._table-container_fgnrg_3{overflow-x:auto}._project-table_fgnrg_7{width:100%;border-collapse:separate;border-spacing:0;text-align:left;table-layout:fixed}._project-table__head_fgnrg_15 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;overflow:hidden;text-overflow:ellipsis}._project-table__head_fgnrg_15 th:nth-child(1){width:auto}._project-table__head_fgnrg_15 th:nth-child(2){width:20%}._project-table__head_fgnrg_15 th:nth-child(3){width:150px}._project-table__head_fgnrg_15 th:nth-child(4){width:160px}._project-table__row_fgnrg_33{transition:background-color .15s ease;cursor:default}._project-table__row_fgnrg_33:hover{background-color:hsl(var(--muted) / .5)}._project-table__row_fgnrg_33 td{padding:1rem;border-bottom:1px solid hsl(var(--border));font-size:.875rem;color:hsl(var(--foreground));vertical-align:middle}._project-table__row_fgnrg_33 td:nth-child(1),._project-table__row_fgnrg_33 td:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._project-table__row_fgnrg_33 td:nth-child(3),._project-table__row_fgnrg_33 td:nth-child(4){overflow:visible}._project-table__row_fgnrg_33:last-child td{border-bottom:none}._project-table__name-cell_fgnrg_66{display:flex;align-items:center;gap:.5rem}._project-table__favorite_fgnrg_72{margin-left:-.5rem}._project-table__name-wrapper_fgnrg_76{display:flex;flex-direction:column;overflow:hidden;min-width:0}._project-table__name_fgnrg_66{font-weight:500;color:hsl(var(--foreground));line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._project-table__app_fgnrg_92,._project-table__date-secondary_fgnrg_93{font-size:.75rem;color:hsl(var(--muted-foreground));margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._project-table__client_fgnrg_102,._project-table__date-main_fgnrg_103{color:hsl(var(--muted-foreground));font-size:.8125rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._project-table__date-main_fgnrg_103{color:hsl(var(--foreground));font-weight:500}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
3
+ import v, { useState as q } from "react";
4
+ function w(t) {
5
+ var r, l, s = "";
6
+ if (typeof t == "string" || typeof t == "number") s += t;
7
+ else if (typeof t == "object") if (Array.isArray(t)) {
8
+ var n = t.length;
9
+ for (r = 0; r < n; r++) t[r] && (l = w(t[r])) && (s && (s += " "), s += l);
10
+ } else for (l in t) t[l] && (s && (s += " "), s += l);
11
+ return s;
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);
15
- return a;
13
+ function p() {
14
+ for (var t, r, l = 0, s = "", n = arguments.length; l < n; l++) (t = arguments[l]) && (r = w(t)) && (s && (s += " "), s += r);
15
+ return s;
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(
28
- "span",
29
- {
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
- ]
41
- }
42
- )
17
+ const S = {
18
+ "status-badge": "_status-badge_1vytb_3",
19
+ "status-badge--neu": "_status-badge--neu_1vytb_26",
20
+ "status-badge--offen": "_status-badge--offen_1vytb_31",
21
+ "status-badge--in-prufung": "_status-badge--in-prufung_1vytb_36",
22
+ "status-badge--validierung": "_status-badge--validierung_1vytb_41",
23
+ "status-badge--abgeschlossen": "_status-badge--abgeschlossen_1vytb_46"
24
+ }, R = {
25
+ neu: "Neu",
26
+ offen: "Offen",
27
+ "in-prufung": "In Prüfung",
28
+ validierung: "Validierung",
29
+ abgeschlossen: "Abgeschlossen"
30
+ }, A = v.forwardRef(
31
+ ({ status: t, color: r, backgroundColor: l, className: s, style: n, ...a }, o) => {
32
+ const i = {
33
+ ...n,
34
+ "--custom-color": r,
35
+ "--custom-bg": l
36
+ };
37
+ return /* @__PURE__ */ e(
38
+ "span",
39
+ {
40
+ ref: o,
41
+ className: p(S["status-badge"], S[`status-badge--${t}`], s),
42
+ style: i,
43
+ ...a,
44
+ children: R[t]
45
+ }
46
+ );
47
+ }
43
48
  );
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(
49
+ A.displayName = "StatusBadge";
50
+ const L = {
51
+ "favorite-btn": "_favorite-btn_1f4wz_3",
52
+ "favorite-btn--active": "_favorite-btn--active_1f4wz_23"
53
+ }, I = v.forwardRef(
54
+ ({ pressed: t, projectName: r, onToggle: l, color: s, activeColor: n, className: a, style: o, onClick: i, ...g }, h) => {
55
+ const d = {
56
+ ...o,
57
+ "--custom-color": s,
58
+ "--custom-active-color": n
59
+ }, y = t ? `Von Favoriten entfernen: ${r}` : `Zu Favoriten hinzufügen: ${r}`;
60
+ return /* @__PURE__ */ e(
52
61
  "button",
53
62
  {
54
- ref: i,
63
+ ref: h,
55
64
  type: "button",
56
- className: c(
57
- y.btn,
58
- { [y["btn--featured"]]: l === "featured" },
59
- _
65
+ className: p(
66
+ L["favorite-btn"],
67
+ { [L["favorite-btn--active"]]: t },
68
+ a
60
69
  ),
61
- "aria-pressed": e,
62
- "aria-label": s,
63
- onClick: () => a?.(!e),
64
- children: /* @__PURE__ */ t(
70
+ style: d,
71
+ "aria-pressed": t,
72
+ "aria-label": y,
73
+ onClick: (m) => {
74
+ l?.(!t), i?.(m);
75
+ },
76
+ ...g,
77
+ children: /* @__PURE__ */ e(
65
78
  "svg",
66
79
  {
67
- xmlns: "http://www.w3.org/2000/svg",
68
80
  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" })
81
+ fill: "none",
82
+ stroke: "currentColor",
83
+ strokeWidth: "2",
84
+ strokeLinecap: "round",
85
+ strokeLinejoin: "round",
86
+ children: /* @__PURE__ */ e("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
87
  }
75
88
  )
76
89
  }
77
90
  );
78
91
  }
79
92
  );
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(
94
- "button",
95
- {
96
- ref: s,
97
- type: "button",
98
- role: "option",
99
- className: c(m.item, i),
100
- "aria-pressed": a,
101
- "data-filter": e,
102
- onClick: () => _(e),
103
- children: [
104
- /* @__PURE__ */ t(
105
- "span",
106
- {
107
- className: c(m.item__dot, m[`item__dot--${e}`]),
108
- "aria-hidden": "true"
109
- }
93
+ I.displayName = "FavoriteButton";
94
+ const b = {
95
+ "status-legend__item": "_status-legend__item_1935r_3",
96
+ "status-legend__item--active": "_status-legend__item--active_1935r_22",
97
+ "status-legend__label-wrap": "_status-legend__label-wrap_1935r_27",
98
+ "status-legend__color": "_status-legend__color_1935r_33",
99
+ "status-legend__label": "_status-legend__label_1935r_27",
100
+ "status-legend__count": "_status-legend__count_1935r_47",
101
+ "color-neu": "_color-neu_1935r_57",
102
+ "color-offen": "_color-offen_1935r_61",
103
+ "color-in-prufung": "_color-in-prufung_1935r_65",
104
+ "color-validierung": "_color-validierung_1935r_69",
105
+ "color-abgeschlossen": "_color-abgeschlossen_1935r_73",
106
+ "color-alle": "_color-alle_1935r_77"
107
+ }, B = v.forwardRef(
108
+ ({ status: t, label: r, count: l, active: s = !1, color: n, className: a, style: o, ...i }, g) => {
109
+ const h = {
110
+ ...o,
111
+ "--custom-color": n
112
+ };
113
+ return /* @__PURE__ */ u(
114
+ "button",
115
+ {
116
+ ref: g,
117
+ type: "button",
118
+ role: "option",
119
+ "aria-selected": s,
120
+ className: p(
121
+ b["status-legend__item"],
122
+ { [b["status-legend__item--active"]]: s },
123
+ a
110
124
  ),
111
- /* @__PURE__ */ t("span", { className: m.item__label, children: r }),
112
- /* @__PURE__ */ t("span", { className: m.item__count, children: l })
113
- ]
114
- }
115
- )
116
- );
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
- ] })
125
+ style: h,
126
+ ...i,
127
+ children: [
128
+ /* @__PURE__ */ u("div", { className: b["status-legend__label-wrap"], children: [
129
+ /* @__PURE__ */ e(
130
+ "span",
131
+ {
132
+ className: p(b["status-legend__color"], b[`color-${t}`]),
133
+ "aria-hidden": "true"
134
+ }
135
+ ),
136
+ /* @__PURE__ */ e("span", { className: b["status-legend__label"], children: r })
137
+ ] }),
138
+ /* @__PURE__ */ e("span", { className: b["status-legend__count"], children: l })
139
+ ]
140
+ }
141
+ );
142
+ }
161
143
  );
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",
144
+ B.displayName = "StatusLegendItem";
145
+ const f = {
146
+ "status-overview__chart-container": "_status-overview__chart-container_1f9eq_3",
147
+ "status-chart-svg": "_status-chart-svg_1f9eq_13",
148
+ "status-chart__segment": "_status-chart__segment_1f9eq_23",
149
+ "status-chart__segment--hovered": "_status-chart__segment--hovered_1f9eq_30",
150
+ "status-chart__segment--dimmed": "_status-chart__segment--dimmed_1f9eq_35",
151
+ "status-chart__hole": "_status-chart__hole_1f9eq_40",
152
+ "status-chart__total-value": "_status-chart__total-value_1f9eq_55",
153
+ "status-chart__total-label": "_status-chart__total-label_1f9eq_63"
154
+ }, D = v.forwardRef(
155
+ ({ data: t, totalLabel: r = "Gesamt", onSegmentClick: l, className: s, ...n }, a) => {
156
+ const [o, i] = q(null), g = t.reduce((j, c) => j + c.value, 0), h = 240, d = h / 2, y = 100, m = 40, N = y - m / 2, $ = N * 2 * Math.PI;
157
+ return /* @__PURE__ */ u(
158
+ "div",
172
159
  {
173
- ref: s,
174
- className: c(g.panel, i),
175
- "aria-label": "Projektstatistiken",
160
+ ref: a,
161
+ className: p(f["status-overview__chart-container"], s),
162
+ ...n,
176
163
  children: [
177
- /* @__PURE__ */ t("div", { className: g.panel__chartWrapper, children: /* @__PURE__ */ t(
178
- x,
164
+ /* @__PURE__ */ e(
165
+ "svg",
179
166
  {
180
- total: e,
181
- totalLabel: "Projekte",
182
- segments: r,
183
- ariaLabel: b
184
- }
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,
167
+ viewBox: `0 0 ${h} ${h}`,
168
+ className: f["status-chart-svg"],
169
+ role: "img",
170
+ "aria-label": "Kreisdiagramm der Projektstatus-Verteilung",
171
+ overflow: "visible",
172
+ children: g === 0 ? /* @__PURE__ */ e(
173
+ "circle",
194
174
  {
195
- filter: d.filter,
196
- label: d.label,
197
- count: d.count,
198
- pressed: a === d.filter,
199
- onSelect: _
175
+ cx: d,
176
+ cy: d,
177
+ r: N,
178
+ fill: "none",
179
+ stroke: "hsl(var(--border))",
180
+ strokeWidth: m
200
181
  }
201
- ) }, d.filter))
182
+ ) : (() => {
183
+ let j = 0;
184
+ return t.map((c) => {
185
+ if (c.value === 0) return null;
186
+ const k = c.value / g * 100, x = k / 100 * $, T = j / 100 * $;
187
+ return j += k, /* @__PURE__ */ e(
188
+ "circle",
189
+ {
190
+ cx: d,
191
+ cy: d,
192
+ r: N,
193
+ fill: "none",
194
+ stroke: c.color,
195
+ strokeWidth: m,
196
+ strokeDasharray: `${x} ${$}`,
197
+ strokeDashoffset: -T,
198
+ transform: `rotate(-90 ${d} ${d})`,
199
+ className: p(f["status-chart__segment"], {
200
+ [f["status-chart__segment--hovered"]]: o === c.status,
201
+ [f["status-chart__segment--dimmed"]]: o && o !== c.status
202
+ }),
203
+ onClick: () => l?.(c.status),
204
+ onMouseEnter: () => i(c.status),
205
+ onMouseLeave: () => i(null),
206
+ style: { cursor: l ? "pointer" : "default" },
207
+ children: /* @__PURE__ */ e("title", { children: `${c.label}: ${c.value}` })
208
+ },
209
+ c.status
210
+ );
211
+ });
212
+ })()
202
213
  }
203
- )
214
+ ),
215
+ /* @__PURE__ */ u("div", { className: f["status-chart__hole"], children: [
216
+ /* @__PURE__ */ e("span", { className: f["status-chart__total-value"], children: g }),
217
+ /* @__PURE__ */ e("span", { className: f["status-chart__total-label"], children: r })
218
+ ] })
204
219
  ]
205
220
  }
206
221
  );
207
222
  }
208
223
  );
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
- ] })
224
+ D.displayName = "StatusChart";
225
+ function M(t) {
226
+ const r = new Date(t);
227
+ if (isNaN(r.getTime())) return "Ungültiges Datum";
228
+ const s = (/* @__PURE__ */ new Date()).getTime() - r.getTime(), n = Math.floor(s / (1e3 * 60 * 60 * 24));
229
+ if (n === 0) return "Heute";
230
+ if (n === 1) return "Gestern";
231
+ if (n < 7) return `vor ${n} Tagen`;
232
+ const a = Math.floor(n / 7);
233
+ if (a < 4)
234
+ return a === 1 ? "vor einer Woche" : `vor ${a} Wochen`;
235
+ const o = Math.floor(n / 30);
236
+ if (o < 12)
237
+ return o === 1 ? "vor einem Monat" : `vor ${o} Monaten`;
238
+ const i = Math.floor(n / 365);
239
+ return i === 1 ? "vor einem Jahr" : `vor ${i} Jahren`;
240
+ }
241
+ const _ = {
242
+ "table-container": "_table-container_fgnrg_3",
243
+ "project-table": "_project-table_fgnrg_7",
244
+ "project-table__head": "_project-table__head_fgnrg_15",
245
+ "project-table__row": "_project-table__row_fgnrg_33",
246
+ "project-table__name-cell": "_project-table__name-cell_fgnrg_66",
247
+ "project-table__favorite": "_project-table__favorite_fgnrg_72",
248
+ "project-table__name-wrapper": "_project-table__name-wrapper_fgnrg_76",
249
+ "project-table__name": "_project-table__name_fgnrg_66",
250
+ "project-table__app": "_project-table__app_fgnrg_92",
251
+ "project-table__date-secondary": "_project-table__date-secondary_fgnrg_93",
252
+ "project-table__client": "_project-table__client_fgnrg_102",
253
+ "project-table__date-main": "_project-table__date-main_fgnrg_103"
254
+ }, P = v.forwardRef(
255
+ ({ rows: t, onToggleFavorite: r, className: l, ...s }, n) => /* @__PURE__ */ e(
256
+ "div",
257
+ {
258
+ ref: n,
259
+ className: p(_["table-container"], l),
260
+ tabIndex: 0,
261
+ ...s,
262
+ children: /* @__PURE__ */ u("table", { className: _["project-table"], children: [
263
+ /* @__PURE__ */ e("thead", { className: _["project-table__head"], children: /* @__PURE__ */ u("tr", { children: [
264
+ /* @__PURE__ */ e("th", { scope: "col", children: "Projekt / Applikation" }),
265
+ /* @__PURE__ */ e("th", { scope: "col", children: "Kunde" }),
266
+ /* @__PURE__ */ e("th", { scope: "col", children: "Status" }),
267
+ /* @__PURE__ */ e("th", { scope: "col", children: "Aktivität" })
268
+ ] }) }),
269
+ /* @__PURE__ */ e("tbody", { className: _["project-table__body"], children: t.map((a) => /* @__PURE__ */ u(
270
+ "tr",
271
+ {
272
+ className: _["project-table__row"],
273
+ "data-status": a.status,
274
+ children: [
275
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ u("div", { className: _["project-table__name-cell"], children: [
276
+ /* @__PURE__ */ e(
277
+ I,
278
+ {
279
+ pressed: a.favorite,
280
+ projectName: a.name,
281
+ onToggle: (o) => r?.(a.id, o),
282
+ className: _["project-table__favorite"]
283
+ }
284
+ ),
285
+ /* @__PURE__ */ u("div", { className: _["project-table__name-wrapper"], title: `${a.name}
286
+ ${a.app}`, children: [
287
+ /* @__PURE__ */ e("div", { className: _["project-table__name"], children: a.name }),
288
+ /* @__PURE__ */ e("div", { className: _["project-table__app"], children: a.app })
289
+ ] })
290
+ ] }) }),
291
+ /* @__PURE__ */ e("td", { title: a.client, children: /* @__PURE__ */ e("span", { className: _["project-table__client"], children: a.client }) }),
292
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(A, { status: a.status }) }),
293
+ /* @__PURE__ */ u("td", { title: `Geändert: ${M(a.updatedAt)}
294
+ Erstellt: ${a.createdAt}`, children: [
295
+ /* @__PURE__ */ e("div", { className: _["project-table__date-main"], children: M(a.updatedAt) }),
296
+ /* @__PURE__ */ u("div", { className: _["project-table__date-secondary"], children: [
297
+ "Erstellt: ",
298
+ a.createdAt
299
+ ] })
300
+ ] })
301
+ ]
302
+ },
303
+ a.id
304
+ )) })
305
+ ] })
306
+ }
307
+ )
286
308
  );
287
- Z.displayName = "ProjectTable";
309
+ P.displayName = "ProjectTable";
288
310
  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
311
+ I as FavoriteButton,
312
+ P as ProjectTable,
313
+ A as StatusBadge,
314
+ D as StatusChart,
315
+ B as StatusLegendItem
296
316
  };
@@ -0,0 +1 @@
1
+ export declare function formatRelativeDate(dateInput: string | Date | number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastnd/components",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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>>;