@umituz/web-design-system 6.14.0 → 6.16.0
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/styles.css +1 -1
- package/package.json +1 -1
- package/src/__tests__/condition-pips.test.tsx +31 -0
- package/src/__tests__/entity-row.test.tsx +72 -0
- package/src/__tests__/theme-provider.test.tsx +19 -0
- package/src/domain/types/theme.types.ts +1 -0
- package/src/index.ts +6 -0
- package/src/infrastructure/themes/apply-theme.ts +18 -6
- package/src/infrastructure/themes/field.theme.ts +230 -0
- package/src/infrastructure/themes/forest.theme.ts +145 -0
- package/src/infrastructure/themes/index.ts +2 -0
- package/src/infrastructure/themes/registry.ts +4 -0
- package/src/presentation/molecules/ConditionPips.tsx +37 -0
- package/src/presentation/molecules/EntityRow.tsx +76 -0
- package/src/presentation/molecules/PlaceholderPanel.tsx +40 -0
- package/src/presentation/molecules/index.ts +9 -0
- package/src/styles/console.css +1164 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
+
import { Link } from 'react-router';
|
|
3
|
+
import { cn } from '../../infrastructure/utils';
|
|
4
|
+
|
|
5
|
+
export interface EntityRowProps {
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
meta?: ReactNode[];
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
aside?: ReactNode;
|
|
11
|
+
to?: string;
|
|
12
|
+
highlight?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const EntityRow = forwardRef<HTMLLIElement, EntityRowProps>(
|
|
19
|
+
(
|
|
20
|
+
{
|
|
21
|
+
icon,
|
|
22
|
+
title,
|
|
23
|
+
meta,
|
|
24
|
+
badge,
|
|
25
|
+
aside,
|
|
26
|
+
to,
|
|
27
|
+
highlight = false,
|
|
28
|
+
className,
|
|
29
|
+
onClick,
|
|
30
|
+
children,
|
|
31
|
+
},
|
|
32
|
+
ref
|
|
33
|
+
) => {
|
|
34
|
+
const content = (
|
|
35
|
+
<>
|
|
36
|
+
<span className="entity-row-icon" aria-hidden="true">
|
|
37
|
+
{icon}
|
|
38
|
+
</span>
|
|
39
|
+
<span className="entity-row-main">
|
|
40
|
+
<span className={cn('entity-row-title', highlight && 'highlight')}>
|
|
41
|
+
{title}
|
|
42
|
+
{highlight && <span className="entity-row-dot" role="img" aria-label="Unread" />}
|
|
43
|
+
</span>
|
|
44
|
+
{meta?.map((line, index) => (
|
|
45
|
+
<span key={index} className="entity-row-meta">
|
|
46
|
+
{line}
|
|
47
|
+
</span>
|
|
48
|
+
))}
|
|
49
|
+
{children}
|
|
50
|
+
</span>
|
|
51
|
+
{badge && <span className="entity-row-badge">{badge}</span>}
|
|
52
|
+
{aside && <span className="entity-row-aside">{aside}</span>}
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const rowClasses = cn('entity-row', highlight && 'highlight', className);
|
|
57
|
+
|
|
58
|
+
if (to) {
|
|
59
|
+
return (
|
|
60
|
+
<li ref={ref} className="list-none">
|
|
61
|
+
<Link to={to} className={rowClasses} onClick={onClick}>
|
|
62
|
+
{content}
|
|
63
|
+
</Link>
|
|
64
|
+
</li>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<li ref={ref} className={rowClasses} onClick={onClick}>
|
|
70
|
+
{content}
|
|
71
|
+
</li>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
EntityRow.displayName = 'EntityRow';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Check } from 'lucide-react';
|
|
3
|
+
import { cn } from '../../infrastructure/utils';
|
|
4
|
+
|
|
5
|
+
export interface PlaceholderPanelProps {
|
|
6
|
+
step: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
capabilities: string[];
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function PlaceholderPanel({
|
|
15
|
+
step,
|
|
16
|
+
title,
|
|
17
|
+
description,
|
|
18
|
+
capabilities,
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
}: PlaceholderPanelProps) {
|
|
22
|
+
return (
|
|
23
|
+
<section className={cn('placeholder-panel', className)} aria-label={title}>
|
|
24
|
+
<div>
|
|
25
|
+
<span className="placeholder-panel-step">Roadmap · {step}</span>
|
|
26
|
+
<h2 className="placeholder-panel-title">{title}</h2>
|
|
27
|
+
<p className="placeholder-panel-desc">{description}</p>
|
|
28
|
+
</div>
|
|
29
|
+
<ul className="placeholder-panel-caps">
|
|
30
|
+
{capabilities.map((capability) => (
|
|
31
|
+
<li key={capability} className="placeholder-panel-cap">
|
|
32
|
+
<Check size={15} className="placeholder-panel-check" aria-hidden="true" />
|
|
33
|
+
{capability}
|
|
34
|
+
</li>
|
|
35
|
+
))}
|
|
36
|
+
</ul>
|
|
37
|
+
{children}
|
|
38
|
+
</section>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -93,3 +93,12 @@ export type { TabNavProps, TabNavItem } from './TabNav';
|
|
|
93
93
|
|
|
94
94
|
export { FilterSelect } from './FilterSelect';
|
|
95
95
|
export type { FilterSelectProps, FilterSelectOption } from './FilterSelect';
|
|
96
|
+
|
|
97
|
+
export { EntityRow } from './EntityRow';
|
|
98
|
+
export type { EntityRowProps } from './EntityRow';
|
|
99
|
+
|
|
100
|
+
export { PlaceholderPanel } from './PlaceholderPanel';
|
|
101
|
+
export type { PlaceholderPanelProps } from './PlaceholderPanel';
|
|
102
|
+
|
|
103
|
+
export { ConditionPips } from './ConditionPips';
|
|
104
|
+
export type { ConditionPipsProps } from './ConditionPips';
|