@sybilion/uilib 1.4.20 → 1.4.21
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/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.js +1 -1
- package/dist/esm/components/ui/TextShimmer/TextShimmer.js +1 -1
- package/dist/esm/components/ui/TextShimmer/TextShimmer.styl.js +1 -1
- package/dist/esm/types/src/docs/pages/DataDisplayOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FeedbackOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FormsOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LayoutOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/NavigationOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/OverlaysOverviewPage.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl +3 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl +1 -0
- package/src/components/ui/TextShimmer/TextShimmer.tsx +1 -1
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +7 -1
- package/src/docs/pages/DataDisplayOverviewPage.tsx +241 -0
- package/src/docs/pages/FeedbackOverviewPage.tsx +57 -0
- package/src/docs/pages/FormsOverviewPage.tsx +590 -0
- package/src/docs/pages/LayoutOverviewPage.tsx +259 -0
- package/src/docs/pages/NavigationOverviewPage.tsx +94 -0
- package/src/docs/pages/OverlaysOverviewPage.tsx +196 -0
- package/src/docs/registry.ts +36 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarGroup_sidebarGroup__STPzX{display:flex;flex-direction:column;min-width:0;padding:0;position:relative;width:100%}";
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarGroup_sidebarGroup__STPzX{display:flex;flex-direction:column;min-width:0;padding:0;position:relative;width:100%}.SidebarGroup_sidebarGroup__STPzX:first-child{padding-top:var(--p-11)}";
|
|
4
4
|
var S = {"sidebarGroup":"SidebarGroup_sidebarGroup__STPzX"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@ import React__default, { useMemo } from 'react';
|
|
|
4
4
|
import { motion } from 'motion/react';
|
|
5
5
|
import S from './TextShimmer.styl.js';
|
|
6
6
|
|
|
7
|
-
function TextShimmerComponent({ children, as: Component = 'p', className, duration = 2, spread =
|
|
7
|
+
function TextShimmerComponent({ children, as: Component = 'p', className, duration = 2, spread = 4, inverted = false, }) {
|
|
8
8
|
const MotionComponent = motion.create(Component);
|
|
9
9
|
const { shimmerGradient, baseGradient } = useMemo(() => {
|
|
10
10
|
const dynamicSpread = children.length * spread;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".TextShimmer_root__EQnCh{-webkit-background-clip:text;background-clip:text;background-repeat:no-repeat,repeat;background-size:200% 100%,100% 100%;color:transparent!important;display:inline-block;position:relative;--base-color:#a1a1aa;--base-gradient-color:#000}.dark .TextShimmer_root__EQnCh{--base-color:#71717a;--base-gradient-color:#fff}";
|
|
3
|
+
var css_248z = ".TextShimmer_root__EQnCh{-webkit-background-clip:text;background-clip:text;background-repeat:no-repeat,repeat;background-size:200% 100%,100% 100%;color:transparent!important;display:inline-block;position:relative;width:-moz-fit-content;width:fit-content;--base-color:#a1a1aa;--base-gradient-color:#000}.dark .TextShimmer_root__EQnCh{--base-color:#71717a;--base-gradient-color:#fff}";
|
|
4
4
|
var S = {"root":"TextShimmer_root__EQnCh"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function DataDisplayOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FeedbackOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FormsOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LayoutOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NavigationOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function OverlaysOverviewPage(): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -26,7 +26,13 @@ function entriesBySection() {
|
|
|
26
26
|
map.set(entry.section, list);
|
|
27
27
|
}
|
|
28
28
|
for (const list of map.values()) {
|
|
29
|
-
list.sort((a, b) =>
|
|
29
|
+
list.sort((a, b) => {
|
|
30
|
+
const aOverview = a.slug.endsWith('-overview');
|
|
31
|
+
const bOverview = b.slug.endsWith('-overview');
|
|
32
|
+
if (aOverview && !bOverview) return -1;
|
|
33
|
+
if (!aOverview && bOverview) return 1;
|
|
34
|
+
return a.title.localeCompare(b.title);
|
|
35
|
+
});
|
|
30
36
|
}
|
|
31
37
|
return map;
|
|
32
38
|
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { AnalysesSelector } from '#uilib/components/ui/AnalysesSelector';
|
|
4
|
+
import { AnalysisLineIcon } from '#uilib/components/ui/AnalysisLineIcon';
|
|
5
|
+
import {
|
|
6
|
+
Avatar,
|
|
7
|
+
AvatarFallback,
|
|
8
|
+
AvatarImage,
|
|
9
|
+
} from '#uilib/components/ui/Avatar';
|
|
10
|
+
import { Chip } from '#uilib/components/ui/Chip';
|
|
11
|
+
import { FileChip } from '#uilib/components/ui/FileChip';
|
|
12
|
+
import { Kicker } from '#uilib/components/ui/Kicker';
|
|
13
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
14
|
+
import { PullQuote } from '#uilib/components/ui/PullQuote';
|
|
15
|
+
import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate';
|
|
16
|
+
import {
|
|
17
|
+
Table,
|
|
18
|
+
TableBody,
|
|
19
|
+
TableCell,
|
|
20
|
+
TableHead,
|
|
21
|
+
TableHeader,
|
|
22
|
+
TableRow,
|
|
23
|
+
} from '#uilib/components/ui/Table';
|
|
24
|
+
import { TextWithDeferTooltip } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
25
|
+
|
|
26
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
27
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
28
|
+
|
|
29
|
+
const SAMPLE_ROWS = [
|
|
30
|
+
{ name: 'Ada', role: 'Admin', status: 'Active' },
|
|
31
|
+
{ name: 'Bob', role: 'Viewer', status: 'Active' },
|
|
32
|
+
{ name: 'Cara', role: 'Editor', status: 'Invited' },
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
const ANALYSES_ITEMS = [
|
|
36
|
+
{ id: -1, label: 'Historical', color: 'var(--foreground)' },
|
|
37
|
+
{
|
|
38
|
+
id: 1,
|
|
39
|
+
label: 'Analysis A',
|
|
40
|
+
color: 'var(--chart-1)',
|
|
41
|
+
status: 'done' as const,
|
|
42
|
+
updated_at: new Date().toISOString(),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 2,
|
|
46
|
+
label: 'Analysis B',
|
|
47
|
+
color: 'var(--chart-2)',
|
|
48
|
+
status: 'done' as const,
|
|
49
|
+
updated_at: new Date().toISOString(),
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const LONG_TRUNCATE_LABEL =
|
|
54
|
+
'Impact — Impact Report: Professional Beauty Segment Analysis Constraints Index';
|
|
55
|
+
|
|
56
|
+
const LONG_TOOLTIP_LABEL =
|
|
57
|
+
'This is a long label that should overflow and show a tooltip on hover.';
|
|
58
|
+
|
|
59
|
+
const panelStyle: React.CSSProperties = {
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'column',
|
|
62
|
+
gap: '0.75rem',
|
|
63
|
+
padding: 'var(--p-3)',
|
|
64
|
+
borderRadius: 'var(--radius-3)',
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default function DataDisplayOverviewPage() {
|
|
68
|
+
const [selectedAnalysisIds, setSelectedAnalysisIds] = useState<Set<number>>(
|
|
69
|
+
() => new Set([1]),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
<AppPageHeader
|
|
75
|
+
breadcrumbs={[{ label: 'Overview' }]}
|
|
76
|
+
title="Overview"
|
|
77
|
+
subheader="Avatars, labels, chips, and tabular data."
|
|
78
|
+
actions={<DocsHeaderActions />}
|
|
79
|
+
/>
|
|
80
|
+
<PageContentSection
|
|
81
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2.5rem' }}
|
|
82
|
+
>
|
|
83
|
+
<section>
|
|
84
|
+
<h3 style={{ marginBottom: '1rem' }}>AnalysesSelector</h3>
|
|
85
|
+
<div style={{ ...panelStyle, maxWidth: 420 }}>
|
|
86
|
+
<AnalysesSelector
|
|
87
|
+
size="sm"
|
|
88
|
+
items={ANALYSES_ITEMS}
|
|
89
|
+
selectedIds={selectedAnalysisIds}
|
|
90
|
+
onItemToggle={id => {
|
|
91
|
+
setSelectedAnalysisIds(prev => {
|
|
92
|
+
const next = new Set(prev);
|
|
93
|
+
if (next.has(id)) next.delete(id);
|
|
94
|
+
else next.add(id);
|
|
95
|
+
return next;
|
|
96
|
+
});
|
|
97
|
+
}}
|
|
98
|
+
placeholder="Analyses"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</section>
|
|
102
|
+
|
|
103
|
+
<section>
|
|
104
|
+
<h3 style={{ marginBottom: '1rem' }}>AnalysisLineIcon</h3>
|
|
105
|
+
<div
|
|
106
|
+
style={{
|
|
107
|
+
...panelStyle,
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
<AnalysisLineIcon color="var(--chart-1)" variant="solid" />
|
|
113
|
+
<AnalysisLineIcon color="var(--chart-2)" variant="dashed" />
|
|
114
|
+
</div>
|
|
115
|
+
</section>
|
|
116
|
+
|
|
117
|
+
<section>
|
|
118
|
+
<h3 style={{ marginBottom: '1rem' }}>Avatar</h3>
|
|
119
|
+
<div
|
|
120
|
+
style={{
|
|
121
|
+
...panelStyle,
|
|
122
|
+
flexDirection: 'row',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
<Avatar>
|
|
127
|
+
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
|
|
128
|
+
<AvatarFallback>CN</AvatarFallback>
|
|
129
|
+
</Avatar>
|
|
130
|
+
<Avatar>
|
|
131
|
+
<AvatarFallback>AB</AvatarFallback>
|
|
132
|
+
</Avatar>
|
|
133
|
+
</div>
|
|
134
|
+
</section>
|
|
135
|
+
|
|
136
|
+
<section>
|
|
137
|
+
<h3 style={{ marginBottom: '1rem' }}>Chip</h3>
|
|
138
|
+
<div
|
|
139
|
+
style={{
|
|
140
|
+
...panelStyle,
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
flexWrap: 'wrap',
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
<Chip variant="neutral">Neutral</Chip>
|
|
146
|
+
<Chip variant="positive">Positive</Chip>
|
|
147
|
+
<Chip variant="negative">Negative</Chip>
|
|
148
|
+
<Chip variant="accent">Accent</Chip>
|
|
149
|
+
</div>
|
|
150
|
+
</section>
|
|
151
|
+
|
|
152
|
+
<section>
|
|
153
|
+
<h3 style={{ marginBottom: '1rem' }}>FileChip</h3>
|
|
154
|
+
<div style={{ ...panelStyle, alignItems: 'flex-start' }}>
|
|
155
|
+
<FileChip name="report.pdf" format="pdf" hint="PDF" />
|
|
156
|
+
<FileChip
|
|
157
|
+
name="notes.txt"
|
|
158
|
+
format="text"
|
|
159
|
+
hint="Text file"
|
|
160
|
+
onRemove={() => {}}
|
|
161
|
+
/>
|
|
162
|
+
</div>
|
|
163
|
+
</section>
|
|
164
|
+
|
|
165
|
+
<section>
|
|
166
|
+
<h3 style={{ marginBottom: '1rem' }}>Table</h3>
|
|
167
|
+
<div style={panelStyle}>
|
|
168
|
+
<Table size="md">
|
|
169
|
+
<TableHeader>
|
|
170
|
+
<TableRow>
|
|
171
|
+
<TableHead>Name</TableHead>
|
|
172
|
+
<TableHead>Role</TableHead>
|
|
173
|
+
<TableHead>Status</TableHead>
|
|
174
|
+
</TableRow>
|
|
175
|
+
</TableHeader>
|
|
176
|
+
<TableBody>
|
|
177
|
+
{SAMPLE_ROWS.map(row => (
|
|
178
|
+
<TableRow key={row.name}>
|
|
179
|
+
<TableCell>{row.name}</TableCell>
|
|
180
|
+
<TableCell>{row.role}</TableCell>
|
|
181
|
+
<TableCell>{row.status}</TableCell>
|
|
182
|
+
</TableRow>
|
|
183
|
+
))}
|
|
184
|
+
</TableBody>
|
|
185
|
+
</Table>
|
|
186
|
+
</div>
|
|
187
|
+
</section>
|
|
188
|
+
|
|
189
|
+
<section>
|
|
190
|
+
<h3 style={{ marginBottom: '1rem' }}>Kicker</h3>
|
|
191
|
+
<div style={panelStyle}>
|
|
192
|
+
<Kicker dash>Quarterly outlook</Kicker>
|
|
193
|
+
<h2 style={{ marginTop: '0.5rem', marginBottom: 0 }}>
|
|
194
|
+
Polymer demand
|
|
195
|
+
</h2>
|
|
196
|
+
</div>
|
|
197
|
+
</section>
|
|
198
|
+
|
|
199
|
+
<section>
|
|
200
|
+
<h3 style={{ marginBottom: '1rem' }}>PullQuote</h3>
|
|
201
|
+
<div style={panelStyle}>
|
|
202
|
+
<PullQuote
|
|
203
|
+
attribution="Marta Linden"
|
|
204
|
+
attributionRole="Head of procurement"
|
|
205
|
+
>
|
|
206
|
+
Forecasts are only useful when they arrive before the decision.
|
|
207
|
+
</PullQuote>
|
|
208
|
+
</div>
|
|
209
|
+
</section>
|
|
210
|
+
|
|
211
|
+
<section>
|
|
212
|
+
<h3 style={{ marginBottom: '1rem' }}>SmartTextTruncate</h3>
|
|
213
|
+
<div
|
|
214
|
+
style={{
|
|
215
|
+
...panelStyle,
|
|
216
|
+
width: 240,
|
|
217
|
+
border: '1px solid var(--border)',
|
|
218
|
+
}}
|
|
219
|
+
>
|
|
220
|
+
<SmartTextTruncate style={{ display: 'block', width: '100%' }}>
|
|
221
|
+
{LONG_TRUNCATE_LABEL}
|
|
222
|
+
</SmartTextTruncate>
|
|
223
|
+
</div>
|
|
224
|
+
</section>
|
|
225
|
+
|
|
226
|
+
<section>
|
|
227
|
+
<h3 style={{ marginBottom: '1rem' }}>TextWithDeferTooltip</h3>
|
|
228
|
+
<div
|
|
229
|
+
style={{
|
|
230
|
+
...panelStyle,
|
|
231
|
+
maxWidth: 120,
|
|
232
|
+
border: '1px dashed var(--border)',
|
|
233
|
+
}}
|
|
234
|
+
>
|
|
235
|
+
<TextWithDeferTooltip>{LONG_TOOLTIP_LABEL}</TextWithDeferTooltip>
|
|
236
|
+
</div>
|
|
237
|
+
</section>
|
|
238
|
+
</PageContentSection>
|
|
239
|
+
</>
|
|
240
|
+
);
|
|
241
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
|
+
import { Progress } from '#uilib/components/ui/Progress';
|
|
3
|
+
import { Skeleton } from '#uilib/components/ui/Skeleton';
|
|
4
|
+
import { TextShimmer } from '#uilib/components/ui/TextShimmer';
|
|
5
|
+
|
|
6
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
8
|
+
|
|
9
|
+
const PROGRESS_WIDTH = 320;
|
|
10
|
+
|
|
11
|
+
const panelStyle: React.CSSProperties = {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
gap: '0.75rem',
|
|
15
|
+
padding: 'var(--p-3)',
|
|
16
|
+
borderRadius: 'var(--radius-3)',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function FeedbackOverviewPage() {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<AppPageHeader
|
|
23
|
+
breadcrumbs={[{ label: 'Overview' }]}
|
|
24
|
+
title="Overview"
|
|
25
|
+
subheader="Progress, loading placeholders, and animated status text."
|
|
26
|
+
actions={<DocsHeaderActions />}
|
|
27
|
+
/>
|
|
28
|
+
<PageContentSection
|
|
29
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2.5rem' }}
|
|
30
|
+
>
|
|
31
|
+
<section>
|
|
32
|
+
<h3 style={{ marginBottom: '1rem' }}>Progress</h3>
|
|
33
|
+
<div style={panelStyle}>
|
|
34
|
+
<Progress value={65} style={{ width: PROGRESS_WIDTH }} />
|
|
35
|
+
<Progress style={{ width: PROGRESS_WIDTH }} />
|
|
36
|
+
</div>
|
|
37
|
+
</section>
|
|
38
|
+
|
|
39
|
+
<section>
|
|
40
|
+
<h3 style={{ marginBottom: '1rem' }}>Skeleton</h3>
|
|
41
|
+
<div style={{ ...panelStyle, maxWidth: 320 }}>
|
|
42
|
+
<Skeleton style={{ height: 14, width: '100%' }} />
|
|
43
|
+
<Skeleton style={{ height: 14, width: '80%' }} />
|
|
44
|
+
<Skeleton style={{ height: 80, width: '100%' }} />
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
<section>
|
|
49
|
+
<h3 style={{ marginBottom: '1rem' }}>TextShimmer</h3>
|
|
50
|
+
<div style={panelStyle}>
|
|
51
|
+
<TextShimmer>Generating forecast…</TextShimmer>
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
54
|
+
</PageContentSection>
|
|
55
|
+
</>
|
|
56
|
+
);
|
|
57
|
+
}
|