@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.
- package/dist/components/FavoriteButton/FavoriteButton.d.ts +3 -2
- package/dist/components/ProjectTable/ProjectTable.d.ts +6 -5
- package/dist/components/StatusBadge/StatusBadge.d.ts +5 -4
- package/dist/components/StatusChart/StatusChart.d.ts +14 -0
- package/dist/components/StatusLegendItem/StatusLegendItem.d.ts +11 -0
- package/dist/components/index.d.ts +4 -8
- package/dist/components.js +284 -264
- package/dist/utils/date.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/DonutChart/DonutChart.d.ts +0 -15
- package/dist/components/LegendItem/LegendItem.d.ts +0 -11
- package/dist/components/ProjectFeatured/ProjectFeatured.d.ts +0 -12
- package/dist/components/StatsPanel/StatsPanel.d.ts +0 -17
|
@@ -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 {
|
|
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
|
-
|
|
15
|
+
onToggleFavorite?: (id: string, nextFavorite: boolean) => void;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const ProjectTable: React.ForwardRefExoticComponent<ProjectTableProps & React.RefAttributes<
|
|
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' | '
|
|
3
|
-
export
|
|
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
|
-
|
|
6
|
-
|
|
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 {
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
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';
|
package/dist/components.js
CHANGED
|
@@ -1,296 +1,316 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
function w(
|
|
5
|
-
var r, l,
|
|
6
|
-
if (typeof
|
|
7
|
-
else if (typeof
|
|
8
|
-
var
|
|
9
|
-
for (r = 0; r <
|
|
10
|
-
} else for (l in
|
|
11
|
-
return
|
|
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
|
|
14
|
-
for (var
|
|
15
|
-
return
|
|
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
|
|
18
|
-
badge:
|
|
19
|
-
|
|
20
|
-
"badge--
|
|
21
|
-
"badge--
|
|
22
|
-
"badge--
|
|
23
|
-
"badge--
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
45
|
-
const
|
|
46
|
-
btn:
|
|
47
|
-
"btn--
|
|
48
|
-
},
|
|
49
|
-
({ pressed:
|
|
50
|
-
const
|
|
51
|
-
|
|
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:
|
|
63
|
+
ref: h,
|
|
55
64
|
type: "button",
|
|
56
|
-
className:
|
|
57
|
-
|
|
58
|
-
{ [
|
|
59
|
-
|
|
65
|
+
className: p(
|
|
66
|
+
L["favorite-btn"],
|
|
67
|
+
{ [L["favorite-btn--active"]]: t },
|
|
68
|
+
a
|
|
60
69
|
),
|
|
61
|
-
|
|
62
|
-
"aria-
|
|
63
|
-
|
|
64
|
-
|
|
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:
|
|
70
|
-
stroke:
|
|
71
|
-
strokeWidth:
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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:
|
|
174
|
-
className:
|
|
175
|
-
|
|
160
|
+
ref: a,
|
|
161
|
+
className: p(f["status-overview__chart-container"], s),
|
|
162
|
+
...n,
|
|
176
163
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
164
|
+
/* @__PURE__ */ e(
|
|
165
|
+
"svg",
|
|
179
166
|
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
175
|
+
cx: d,
|
|
176
|
+
cy: d,
|
|
177
|
+
r: N,
|
|
178
|
+
fill: "none",
|
|
179
|
+
stroke: "hsl(var(--border))",
|
|
180
|
+
strokeWidth: m
|
|
200
181
|
}
|
|
201
|
-
)
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
309
|
+
P.displayName = "ProjectTable";
|
|
288
310
|
export {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
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,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>>;
|