@sybilion/uilib 1.3.93 → 1.3.96
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/assets/globals.css +98 -0
- package/dist/esm/components/ui/Badge/Badge.styl.js +1 -1
- package/dist/esm/components/ui/BarChart/BarChart.js +32 -0
- package/dist/esm/components/ui/BarChart/BarChart.styl.js +7 -0
- package/dist/esm/components/ui/Button/Button.js +1 -1
- package/dist/esm/components/ui/Button/Button.styl.js +1 -1
- package/dist/esm/components/ui/Card/Card.styl.js +1 -1
- package/dist/esm/components/ui/Chart/Chart.helpers.js +15 -3
- package/dist/esm/components/ui/Chart/chartSeriesPalette.js +17 -0
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.js +2 -2
- package/dist/esm/components/ui/Checkbox/Checkbox.styl.js +1 -1
- package/dist/esm/components/ui/Chip/Chip.js +12 -0
- package/dist/esm/components/ui/Chip/Chip.styl.js +7 -0
- package/dist/esm/components/ui/DonutChart/DonutChart.js +35 -0
- package/dist/esm/components/ui/DonutChart/DonutChart.styl.js +7 -0
- package/dist/esm/components/ui/Input/Input.styl.js +1 -1
- package/dist/esm/components/ui/Kicker/Kicker.js +9 -0
- package/dist/esm/components/ui/Kicker/Kicker.styl.js +7 -0
- package/dist/esm/components/ui/LabeledInput/LabeledInput.styl.js +1 -1
- package/dist/esm/components/ui/PullQuote/PullQuote.js +9 -0
- package/dist/esm/components/ui/PullQuote/PullQuote.styl.js +7 -0
- package/dist/esm/components/ui/Select/Select.styl.js +1 -1
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +1 -1
- package/dist/esm/components/ui/SignalCard/SignalCard.js +17 -0
- package/dist/esm/components/ui/SignalCard/SignalCard.styl.js +7 -0
- package/dist/esm/components/ui/Switch/Switch.styl.js +1 -1
- package/dist/esm/components/ui/Table/Table.js +4 -4
- package/dist/esm/components/ui/Table/Table.styl.js +2 -2
- package/dist/esm/components/ui/Tooltip/Tooltip.styl.js +1 -1
- package/dist/esm/components/widgets/PerformanceChart/PerformanceChart.styl.js +2 -2
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +5 -5
- package/dist/esm/index.js +6 -0
- package/dist/esm/types/src/components/ui/BarChart/BarChart.d.ts +3 -0
- package/dist/esm/types/src/components/ui/BarChart/BarChart.types.d.ts +28 -0
- package/dist/esm/types/src/components/ui/BarChart/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/chartSeriesPalette.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Chip/Chip.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chip/Chip.types.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Chip/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DonutChart/DonutChart.d.ts +3 -0
- package/dist/esm/types/src/components/ui/DonutChart/DonutChart.types.d.ts +25 -0
- package/dist/esm/types/src/components/ui/DonutChart/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Kicker/Kicker.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Kicker/Kicker.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Kicker/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/PullQuote/PullQuote.d.ts +3 -0
- package/dist/esm/types/src/components/ui/PullQuote/PullQuote.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/PullQuote/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Select/Select.types.d.ts +1 -1
- package/dist/esm/types/src/components/ui/SignalCard/SignalCard.d.ts +3 -0
- package/dist/esm/types/src/components/ui/SignalCard/SignalCard.types.d.ts +23 -0
- package/dist/esm/types/src/components/ui/SignalCard/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Table/Table.d.ts +2 -5
- package/dist/esm/types/src/components/ui/Table/Table.types.d.ts +4 -1
- package/dist/esm/types/src/components/ui/Table/index.d.ts +1 -1
- package/dist/esm/types/src/docs/components/DocsGuidance/DocsGuidance.d.ts +14 -0
- package/dist/esm/types/src/docs/pages/BarChartPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChipPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ColorsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DonutChartPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/IconsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/KickerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/MotionPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/PullQuotePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RadiiShadowsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SignalCardPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SpacingPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TypographyPage.d.ts +1 -0
- package/dist/esm/types/src/docs/registry.d.ts +1 -1
- package/dist/esm/types/src/index.d.ts +6 -0
- package/dist/esm/types/tests/charts.test.d.ts +1 -0
- package/dist/esm/types/tests/chip.test.d.ts +1 -0
- package/dist/esm/types/tests/componentsSmoke.test.d.ts +1 -0
- package/dist/esm/types/tests/docsRegistry.test.d.ts +1 -0
- package/dist/esm/types/tests/iconsPageFilter.test.d.ts +1 -0
- package/dist/esm/types/tests/mocks/homecodeUiMock.d.ts +32 -1
- package/dist/esm/types/tests/mocks/lightweightChartsMock.d.ts +29 -0
- package/dist/esm/types/tests/pullQuoteKicker.test.d.ts +1 -0
- package/dist/esm/types/tests/signalCard.test.d.ts +1 -0
- package/dist/esm/types/tests/tokenSync.test.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/ui/Badge/Badge.styl +4 -4
- package/src/components/ui/BarChart/BarChart.styl +2 -0
- package/src/components/ui/BarChart/BarChart.styl.d.ts +7 -0
- package/src/components/ui/BarChart/BarChart.tsx +142 -0
- package/src/components/ui/BarChart/BarChart.types.ts +36 -0
- package/src/components/ui/BarChart/index.ts +2 -0
- package/src/components/ui/Button/Button.styl +30 -28
- package/src/components/ui/Button/Button.tsx +2 -1
- package/src/components/ui/Card/Card.styl +4 -3
- package/src/components/ui/Chart/Chart.helpers.ts +17 -3
- package/src/components/ui/Chart/chartSeriesPalette.ts +16 -0
- package/src/components/ui/Chat/ChatSheet/ChatSelector.tsx +2 -2
- package/src/components/ui/Checkbox/Checkbox.styl +1 -1
- package/src/components/ui/Chip/Chip.styl +78 -0
- package/src/components/ui/Chip/Chip.styl.d.ts +16 -0
- package/src/components/ui/Chip/Chip.tsx +35 -0
- package/src/components/ui/Chip/Chip.types.ts +23 -0
- package/src/components/ui/Chip/index.ts +2 -0
- package/src/components/ui/DonutChart/DonutChart.styl +16 -0
- package/src/components/ui/DonutChart/DonutChart.styl.d.ts +10 -0
- package/src/components/ui/DonutChart/DonutChart.tsx +112 -0
- package/src/components/ui/DonutChart/DonutChart.types.ts +30 -0
- package/src/components/ui/DonutChart/index.ts +2 -0
- package/src/components/ui/Input/Input.styl +2 -2
- package/src/components/ui/Kicker/Kicker.styl +10 -0
- package/src/components/ui/Kicker/Kicker.styl.d.ts +7 -0
- package/src/components/ui/Kicker/Kicker.tsx +15 -0
- package/src/components/ui/Kicker/Kicker.types.ts +6 -0
- package/src/components/ui/Kicker/index.ts +2 -0
- package/src/components/ui/LabeledInput/LabeledInput.styl +4 -1
- package/src/components/ui/PullQuote/PullQuote.styl +32 -0
- package/src/components/ui/PullQuote/PullQuote.styl.d.ts +10 -0
- package/src/components/ui/PullQuote/PullQuote.tsx +31 -0
- package/src/components/ui/PullQuote/PullQuote.types.ts +8 -0
- package/src/components/ui/PullQuote/index.ts +2 -0
- package/src/components/ui/Select/Select.styl +21 -14
- package/src/components/ui/Select/Select.types.ts +1 -1
- package/src/components/ui/Sidebar/Sidebar.styl +1 -0
- package/src/components/ui/SignalCard/SignalCard.styl +104 -0
- package/src/components/ui/SignalCard/SignalCard.styl.d.ts +20 -0
- package/src/components/ui/SignalCard/SignalCard.tsx +87 -0
- package/src/components/ui/SignalCard/SignalCard.types.ts +24 -0
- package/src/components/ui/SignalCard/index.ts +2 -0
- package/src/components/ui/Switch/Switch.styl +7 -7
- package/src/components/ui/Table/Table.styl +37 -19
- package/src/components/ui/Table/Table.styl.d.ts +0 -1
- package/src/components/ui/Table/Table.tsx +5 -3
- package/src/components/ui/Table/Table.types.ts +8 -4
- package/src/components/ui/Table/index.ts +1 -1
- package/src/components/ui/Tooltip/Tooltip.styl +2 -2
- package/src/components/widgets/PerformanceChart/PerformanceChart.styl +3 -0
- package/src/components/widgets/PerformanceChart/PerformanceChart.styl.d.ts +1 -0
- package/src/components/widgets/PerformanceChart/PerformanceTable.tsx +8 -8
- package/src/contexts/chatPersistence.test.ts +13 -2
- package/src/docs/components/DocsGuidance/DocsGuidance.styl +33 -0
- package/src/docs/components/DocsGuidance/DocsGuidance.styl.d.ts +11 -0
- package/src/docs/components/DocsGuidance/DocsGuidance.tsx +57 -0
- package/src/docs/pages/AnalysesSelectorPage.tsx +16 -0
- package/src/docs/pages/AnalysisLineIconPage.tsx +12 -0
- package/src/docs/pages/AvatarPage.tsx +15 -0
- package/src/docs/pages/BadgePage.tsx +16 -0
- package/src/docs/pages/BarChartPage.tsx +109 -0
- package/src/docs/pages/BreadcrumbPage.tsx +15 -0
- package/src/docs/pages/ButtonPage.tsx +17 -0
- package/src/docs/pages/CardPage.tsx +190 -17
- package/src/docs/pages/ChartAreaInteractivePage.tsx +24 -7
- package/src/docs/pages/ChartPage.tsx +14 -0
- package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +15 -0
- package/src/docs/pages/ChatComposerPrefillPage.tsx +15 -0
- package/src/docs/pages/ChatPage.tsx +15 -0
- package/src/docs/pages/ChatSheetPage.tsx +14 -0
- package/src/docs/pages/ChatSlashCommandsPage.tsx +15 -0
- package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +14 -0
- package/src/docs/pages/CheckboxPage.tsx +37 -4
- package/src/docs/pages/ChipPage.tsx +160 -0
- package/src/docs/pages/ColorsPage.styl +27 -0
- package/src/docs/pages/ColorsPage.styl.d.ts +12 -0
- package/src/docs/pages/ColorsPage.tsx +102 -0
- package/src/docs/pages/ConfirmPage.tsx +15 -0
- package/src/docs/pages/DialogPage.tsx +15 -0
- package/src/docs/pages/DonutChartPage.tsx +80 -0
- package/src/docs/pages/DrawerPage.tsx +17 -0
- package/src/docs/pages/DriverMapPage.tsx +17 -0
- package/src/docs/pages/DriversComparisonChartPage.tsx +17 -0
- package/src/docs/pages/DropZonePage.tsx +16 -0
- package/src/docs/pages/DropdownMenuPage.tsx +16 -0
- package/src/docs/pages/FileChipPage.tsx +17 -0
- package/src/docs/pages/FlickeringGridPage.tsx +15 -0
- package/src/docs/pages/FoldablePage.tsx +16 -0
- package/src/docs/pages/GridLayoutPage.tsx +16 -0
- package/src/docs/pages/IconsPage.styl +74 -0
- package/src/docs/pages/IconsPage.styl.d.ts +17 -0
- package/src/docs/pages/IconsPage.tsx +125 -0
- package/src/docs/pages/ImagePage.tsx +16 -0
- package/src/docs/pages/ImageWithFallbackPage.tsx +15 -0
- package/src/docs/pages/IncludeHiddenInYScalePage.tsx +14 -0
- package/src/docs/pages/InputPage.tsx +134 -19
- package/src/docs/pages/InteractiveContentPage.tsx +15 -0
- package/src/docs/pages/KickerPage.tsx +62 -0
- package/src/docs/pages/LabelPage.tsx +15 -0
- package/src/docs/pages/LabelWithIdPage.tsx +11 -0
- package/src/docs/pages/LabeledInputPage.tsx +12 -0
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +15 -0
- package/src/docs/pages/LightweightChartPage.styl +0 -1
- package/src/docs/pages/LightweightChartPage.tsx +17 -0
- package/src/docs/pages/LogoPage.tsx +15 -0
- package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +15 -0
- package/src/docs/pages/MotionPage.styl +71 -0
- package/src/docs/pages/MotionPage.styl.d.ts +17 -0
- package/src/docs/pages/MotionPage.tsx +176 -0
- package/src/docs/pages/NavUserHeaderPage.tsx +15 -0
- package/src/docs/pages/NumberControlPage.tsx +15 -0
- package/src/docs/pages/PageColumnsPage.tsx +15 -0
- package/src/docs/pages/PageFooterPage.tsx +15 -0
- package/src/docs/pages/PagePage.tsx +15 -0
- package/src/docs/pages/PageTabsPage.tsx +18 -0
- package/src/docs/pages/PerformanceChartPage.tsx +15 -0
- package/src/docs/pages/ProgressPage.tsx +66 -3
- package/src/docs/pages/PullQuotePage.tsx +59 -0
- package/src/docs/pages/RadiiShadowsPage.styl +47 -0
- package/src/docs/pages/RadiiShadowsPage.styl.d.ts +14 -0
- package/src/docs/pages/RadiiShadowsPage.tsx +109 -0
- package/src/docs/pages/RegionCoordsPage.tsx +12 -0
- package/src/docs/pages/RenamerPage.tsx +15 -0
- package/src/docs/pages/SelectPage.tsx +160 -6
- package/src/docs/pages/SeparatorPage.tsx +12 -0
- package/src/docs/pages/SheetPage.tsx +15 -0
- package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +12 -0
- package/src/docs/pages/SidebarPage.tsx +15 -0
- package/src/docs/pages/SignalCardPage.tsx +126 -0
- package/src/docs/pages/SkeletonPage.tsx +16 -0
- package/src/docs/pages/SliderPage.tsx +70 -4
- package/src/docs/pages/SmartTextTruncatePage.styl +13 -0
- package/src/docs/pages/SmartTextTruncatePage.styl.d.ts +8 -0
- package/src/docs/pages/SmartTextTruncatePage.tsx +17 -4
- package/src/docs/pages/SpacingPage.styl +31 -0
- package/src/docs/pages/SpacingPage.styl.d.ts +12 -0
- package/src/docs/pages/SpacingPage.tsx +50 -0
- package/src/docs/pages/SparklinePage.tsx +15 -0
- package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +16 -0
- package/src/docs/pages/SwitchPage.tsx +147 -8
- package/src/docs/pages/SybilionAuthLayoutPage.tsx +15 -0
- package/src/docs/pages/TablePage.tsx +134 -22
- package/src/docs/pages/TabsPage.tsx +20 -0
- package/src/docs/pages/TextShimmerPage.tsx +12 -0
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +15 -0
- package/src/docs/pages/TimeRangeControlsPage.tsx +15 -0
- package/src/docs/pages/ToggleGroupPage.tsx +15 -0
- package/src/docs/pages/TogglePage.tsx +13 -0
- package/src/docs/pages/TooltipPage.tsx +17 -0
- package/src/docs/pages/TypographyPage.styl +42 -0
- package/src/docs/pages/TypographyPage.styl.d.ts +12 -0
- package/src/docs/pages/TypographyPage.tsx +226 -0
- package/src/docs/pages/VimeoEmbedPage.tsx +12 -0
- package/src/docs/pages/WorldMapPage.tsx +12 -0
- package/src/docs/registry.ts +79 -0
- package/src/index.ts +6 -0
|
@@ -3,6 +3,7 @@ import { SybilionAuthLayout } from '#uilib/components/widgets/SybilionAuthLayout
|
|
|
3
3
|
import { SybilionSignInPanel } from '#uilib/components/widgets/SybilionSignInPanel';
|
|
4
4
|
|
|
5
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
6
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
6
7
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
7
8
|
|
|
8
9
|
export default function SybilionAuthLayoutPage() {
|
|
@@ -14,6 +15,20 @@ export default function SybilionAuthLayoutPage() {
|
|
|
14
15
|
subheader="Split-view auth chrome (hero column + form). Standalone apps: copy package logo to public/logo.svg — see Logo."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
18
|
+
<DocsGuidance
|
|
19
|
+
overview="SybilionAuthLayout provides the split-view chrome for authentication routes: a branded hero column beside a form column with a title and subtitle. Place a form such as SybilionSignInPanel as its child; on a real route it fills the full viewport."
|
|
20
|
+
whenToUse={[
|
|
21
|
+
'For full-page authentication flows, such as sign-in, sign-up, or password reset.',
|
|
22
|
+
'When a standalone app needs consistent Sybilion branding on its auth screens.',
|
|
23
|
+
]}
|
|
24
|
+
whenNotToUse={[
|
|
25
|
+
'For authenticated pages inside the app shell; use PageHeader and PageContent instead.',
|
|
26
|
+
'For inline or modal sign-in prompts that should not take over the whole viewport.',
|
|
27
|
+
]}
|
|
28
|
+
doNotes={[
|
|
29
|
+
'In standalone apps, copy the package logo to public/logo.svg so the hero column renders the correct branding.',
|
|
30
|
+
]}
|
|
31
|
+
/>
|
|
17
32
|
<PageContentSection title="Preview">
|
|
18
33
|
<p style={{ marginTop: 0, color: 'var(--muted-foreground)' }}>
|
|
19
34
|
Clipped height so <code>100vh</code> layout fits the docs shell. Real
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
1
|
+
import { PageContentSection, PageXScroll } from '#uilib/components/ui/Page';
|
|
2
2
|
import {
|
|
3
3
|
Table,
|
|
4
4
|
TableBody,
|
|
@@ -7,39 +7,151 @@ import {
|
|
|
7
7
|
TableHeader,
|
|
8
8
|
TableRow,
|
|
9
9
|
} from '#uilib/components/ui/Table';
|
|
10
|
+
import type { TableSize } from '#uilib/components/ui/Table';
|
|
10
11
|
|
|
11
12
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
12
14
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
13
15
|
|
|
16
|
+
const SIZES = ['sm', 'md', 'lg'] as const satisfies readonly TableSize[];
|
|
17
|
+
|
|
18
|
+
const SAMPLE_ROWS = [
|
|
19
|
+
{ name: 'Ada', role: 'Admin', status: 'Active' },
|
|
20
|
+
{ name: 'Bob', role: 'Viewer', status: 'Active' },
|
|
21
|
+
{ name: 'Cara', role: 'Editor', status: 'Invited' },
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
function DemoTable({
|
|
25
|
+
size,
|
|
26
|
+
withBackground = false,
|
|
27
|
+
withPaddings = false,
|
|
28
|
+
}: {
|
|
29
|
+
size: TableSize;
|
|
30
|
+
withBackground?: boolean;
|
|
31
|
+
withPaddings?: boolean;
|
|
32
|
+
}) {
|
|
33
|
+
return (
|
|
34
|
+
<Table
|
|
35
|
+
size={size}
|
|
36
|
+
withBackground={withBackground}
|
|
37
|
+
withPaddings={withPaddings}
|
|
38
|
+
>
|
|
39
|
+
<TableHeader>
|
|
40
|
+
<TableRow>
|
|
41
|
+
<TableHead>Name</TableHead>
|
|
42
|
+
<TableHead>Role</TableHead>
|
|
43
|
+
<TableHead>Status</TableHead>
|
|
44
|
+
</TableRow>
|
|
45
|
+
</TableHeader>
|
|
46
|
+
<TableBody>
|
|
47
|
+
{SAMPLE_ROWS.map(row => (
|
|
48
|
+
<TableRow key={row.name}>
|
|
49
|
+
<TableCell>{row.name}</TableCell>
|
|
50
|
+
<TableCell>{row.role}</TableCell>
|
|
51
|
+
<TableCell>{row.status}</TableCell>
|
|
52
|
+
</TableRow>
|
|
53
|
+
))}
|
|
54
|
+
</TableBody>
|
|
55
|
+
</Table>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
14
59
|
export default function TablePage() {
|
|
15
60
|
return (
|
|
16
61
|
<>
|
|
17
62
|
<AppPageHeader
|
|
18
63
|
breadcrumbs={[{ label: 'Table' }]}
|
|
19
64
|
title="Table"
|
|
20
|
-
subheader="Semantic table primitives."
|
|
65
|
+
subheader="Semantic table primitives and size ramp."
|
|
21
66
|
actions={<DocsHeaderActions />}
|
|
22
67
|
/>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
<DocsGuidance
|
|
69
|
+
overview="Table is a set of semantic primitives — Table, TableHeader, TableBody, TableRow, TableHead, and TableCell — for presenting structured, row-and-column data. Pass size on Table for sm, md, or lg density, and use withBackground and withPaddings when you need a surface and extra edge spacing."
|
|
70
|
+
whenToUse={[
|
|
71
|
+
'To display structured records where users compare values across rows and columns.',
|
|
72
|
+
'For datasets small enough to render directly without virtualisation.',
|
|
73
|
+
]}
|
|
74
|
+
whenNotToUse={[
|
|
75
|
+
'For page or section layout; use the Page layout primitives or CSS grid instead.',
|
|
76
|
+
'For large datasets that need sorting, filtering, or pagination; build on a data table abstraction.',
|
|
77
|
+
]}
|
|
78
|
+
doNotes={[
|
|
79
|
+
'Keep column headers short and use TableHead cells so the markup stays accessible.',
|
|
80
|
+
'Use size="sm" on Table when you need tighter row density.',
|
|
81
|
+
]}
|
|
82
|
+
/>
|
|
83
|
+
<PageXScroll>
|
|
84
|
+
<section
|
|
85
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
86
|
+
>
|
|
87
|
+
<h3 style={{ marginBottom: '1rem' }}>Sizes</h3>
|
|
88
|
+
<p
|
|
89
|
+
style={{
|
|
90
|
+
marginBottom: '0.75rem',
|
|
91
|
+
color: 'var(--muted-foreground)',
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
Pass <code>size</code> on <code>Table</code> — defaults to{' '}
|
|
95
|
+
<code>md</code>.
|
|
96
|
+
</p>
|
|
97
|
+
<div style={{ overflowX: 'auto' }}>
|
|
98
|
+
<table style={{ borderCollapse: 'collapse', width: '100%' }}>
|
|
99
|
+
<thead>
|
|
100
|
+
<tr>
|
|
101
|
+
<th style={{ textAlign: 'left', padding: '0.5rem' }} />
|
|
102
|
+
{SIZES.map(s => (
|
|
103
|
+
<th key={s} style={{ padding: '0.5rem' }}>
|
|
104
|
+
{s}
|
|
105
|
+
</th>
|
|
106
|
+
))}
|
|
107
|
+
</tr>
|
|
108
|
+
</thead>
|
|
109
|
+
<tbody>
|
|
110
|
+
<tr>
|
|
111
|
+
<td
|
|
112
|
+
style={{
|
|
113
|
+
padding: '0.5rem',
|
|
114
|
+
fontWeight: 600,
|
|
115
|
+
whiteSpace: 'nowrap',
|
|
116
|
+
verticalAlign: 'top',
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
default
|
|
120
|
+
</td>
|
|
121
|
+
{SIZES.map(s => (
|
|
122
|
+
<td
|
|
123
|
+
key={s}
|
|
124
|
+
style={{ padding: '0.5rem', verticalAlign: 'top' }}
|
|
125
|
+
>
|
|
126
|
+
<DemoTable size={s} />
|
|
127
|
+
</td>
|
|
128
|
+
))}
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td
|
|
132
|
+
style={{
|
|
133
|
+
padding: '0.5rem',
|
|
134
|
+
fontWeight: 600,
|
|
135
|
+
whiteSpace: 'nowrap',
|
|
136
|
+
verticalAlign: 'top',
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
withBackground
|
|
140
|
+
</td>
|
|
141
|
+
{SIZES.map(s => (
|
|
142
|
+
<td
|
|
143
|
+
key={s}
|
|
144
|
+
style={{ padding: '0.5rem', verticalAlign: 'top' }}
|
|
145
|
+
>
|
|
146
|
+
<DemoTable size={s} withBackground withPaddings />
|
|
147
|
+
</td>
|
|
148
|
+
))}
|
|
149
|
+
</tr>
|
|
150
|
+
</tbody>
|
|
151
|
+
</table>
|
|
152
|
+
</div>
|
|
153
|
+
</section>
|
|
154
|
+
</PageXScroll>
|
|
43
155
|
</>
|
|
44
156
|
);
|
|
45
157
|
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from '#uilib/components/ui/Tabs';
|
|
11
11
|
|
|
12
12
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
13
14
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
14
15
|
|
|
15
16
|
const VARIANTS: TabsVariant[] = ['button', 'link', 'outline'];
|
|
@@ -85,6 +86,25 @@ export default function TabsPage() {
|
|
|
85
86
|
subheader="Variants, sizes, full-width list, darker surface."
|
|
86
87
|
actions={<DocsHeaderActions />}
|
|
87
88
|
/>
|
|
89
|
+
<DocsGuidance
|
|
90
|
+
overview="Tabs organise related content into panels that share the same space, with only one panel visible at a time. Three variants — button, link, and outline — cover different visual weights, each in small, medium, and large sizes."
|
|
91
|
+
whenToUse={[
|
|
92
|
+
'To split a page or card into distinct views of related content, such as overview and details.',
|
|
93
|
+
'When users switch between views often and switching should feel instant.',
|
|
94
|
+
'For grouping settings or data categories that do not need to be visible at once.',
|
|
95
|
+
]}
|
|
96
|
+
whenNotToUse={[
|
|
97
|
+
'For sequential steps that must be completed in order; use a stepper or wizard instead.',
|
|
98
|
+
'When users need to compare the contents of two panels side by side.',
|
|
99
|
+
'For full-page navigation between routes; use PageTabs or links instead.',
|
|
100
|
+
]}
|
|
101
|
+
doNotes={[
|
|
102
|
+
'Keep tab labels short and parallel in structure, ideally one or two words.',
|
|
103
|
+
]}
|
|
104
|
+
dontNotes={[
|
|
105
|
+
'Don’t use more tabs than fit comfortably in the available width.',
|
|
106
|
+
]}
|
|
107
|
+
/>
|
|
88
108
|
<PageContentSection
|
|
89
109
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
90
110
|
>
|
|
@@ -2,6 +2,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
2
2
|
import { TextShimmer } from '#uilib/components/ui/TextShimmer';
|
|
3
3
|
|
|
4
4
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
5
6
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
6
7
|
|
|
7
8
|
export default function TextShimmerPage() {
|
|
@@ -13,6 +14,17 @@ export default function TextShimmerPage() {
|
|
|
13
14
|
subheader="Shimmer loading text."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
17
|
+
<DocsGuidance
|
|
18
|
+
overview="TextShimmer animates a shimmer effect across its text content to signal that an operation is in progress. It keeps the label readable while making the pending state obvious."
|
|
19
|
+
whenToUse={[
|
|
20
|
+
'To indicate an in-progress operation with a descriptive label, such as “Generating…”.',
|
|
21
|
+
'For streaming or AI-generated content where text appears gradually.',
|
|
22
|
+
]}
|
|
23
|
+
whenNotToUse={[
|
|
24
|
+
'As a placeholder for unknown content; use Skeleton instead.',
|
|
25
|
+
'On static text that is not associated with a loading state, where the animation would mislead.',
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
16
28
|
<PageContentSection>
|
|
17
29
|
<span>
|
|
18
30
|
<TextShimmer>Generating…</TextShimmer>
|
|
@@ -2,6 +2,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
2
2
|
import { TextWithDeferTooltip } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
3
3
|
|
|
4
4
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
5
6
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
6
7
|
|
|
7
8
|
const LONG_LABEL =
|
|
@@ -16,6 +17,20 @@ export default function TextWithDeferTooltipPage() {
|
|
|
16
17
|
subheader="Tooltip only when text overflows."
|
|
17
18
|
actions={<DocsHeaderActions />}
|
|
18
19
|
/>
|
|
20
|
+
<DocsGuidance
|
|
21
|
+
overview="TextWithDeferTooltip truncates its text with an ellipsis and shows the full value in a tooltip, but only when the text actually overflows its container. Fully visible text gets no tooltip, avoiding redundant hover content."
|
|
22
|
+
whenToUse={[
|
|
23
|
+
'For labels of unpredictable length in constrained spaces, such as table cells or list rows.',
|
|
24
|
+
'When the full value should remain accessible on hover without widening the layout.',
|
|
25
|
+
]}
|
|
26
|
+
whenNotToUse={[
|
|
27
|
+
'When the full text is critical and must always be visible; let it wrap instead.',
|
|
28
|
+
'For identifiers where the end of the string matters; consider SmartTextTruncate.',
|
|
29
|
+
]}
|
|
30
|
+
doNotes={[
|
|
31
|
+
'Use overTrigger to position the tooltip directly over the truncated text, which reads like the text expanding in place.',
|
|
32
|
+
]}
|
|
33
|
+
/>
|
|
19
34
|
<PageContentSection>
|
|
20
35
|
<p style={{ margin: '0 0 8px', fontWeight: 600 }}>Default</p>
|
|
21
36
|
<div
|
|
@@ -4,6 +4,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
4
4
|
import { TimeRangeControls } from '#uilib/components/ui/TimeRangeControls';
|
|
5
5
|
|
|
6
6
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
7
8
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
8
9
|
|
|
9
10
|
export default function TimeRangeControlsPage() {
|
|
@@ -17,6 +18,20 @@ export default function TimeRangeControlsPage() {
|
|
|
17
18
|
subheader="Chart time range toggles."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
21
|
+
<DocsGuidance
|
|
22
|
+
overview="TimeRangeControls renders a row of preset time range toggles, such as one month or one year, for switching the window of a chart. Control it with timeRange and onTimeRangeChange, and pass loading to disable the controls while data refreshes."
|
|
23
|
+
whenToUse={[
|
|
24
|
+
'Above or beside a time series chart to let users change the visible window.',
|
|
25
|
+
'When a small set of preset ranges covers the common cases.',
|
|
26
|
+
]}
|
|
27
|
+
whenNotToUse={[
|
|
28
|
+
'When users need arbitrary start and end dates; use a date range picker instead.',
|
|
29
|
+
'For switching between categories or views unrelated to time; use Tabs or ToggleGroup.',
|
|
30
|
+
]}
|
|
31
|
+
doNotes={[
|
|
32
|
+
'Set loading while data for a new range fetches, so users cannot trigger overlapping requests.',
|
|
33
|
+
]}
|
|
34
|
+
/>
|
|
20
35
|
<PageContentSection>
|
|
21
36
|
<TimeRangeControls
|
|
22
37
|
timeRange={range}
|
|
@@ -4,6 +4,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
4
4
|
import { ToggleGroup, ToggleGroupItem } from '#uilib/components/ui/ToggleGroup';
|
|
5
5
|
|
|
6
6
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
7
8
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
8
9
|
|
|
9
10
|
export default function ToggleGroupPage() {
|
|
@@ -17,6 +18,20 @@ export default function ToggleGroupPage() {
|
|
|
17
18
|
subheader="Single-select group."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
21
|
+
<DocsGuidance
|
|
22
|
+
overview="ToggleGroup presents a set of related toggle buttons where, in single mode, exactly one option is active at a time. It suits compact, mutually exclusive choices such as alignment or view mode."
|
|
23
|
+
whenToUse={[
|
|
24
|
+
'To switch between a few mutually exclusive options, such as left, centre, and right alignment.',
|
|
25
|
+
'For view switches, such as list versus grid, where the choice takes effect immediately.',
|
|
26
|
+
]}
|
|
27
|
+
whenNotToUse={[
|
|
28
|
+
'For more than roughly five options; use a Select or RadioGroup instead.',
|
|
29
|
+
'To switch panels of content; use Tabs instead.',
|
|
30
|
+
]}
|
|
31
|
+
doNotes={[
|
|
32
|
+
'In single mode, ignore empty values from onValueChange so one option always stays selected.',
|
|
33
|
+
]}
|
|
34
|
+
/>
|
|
20
35
|
<PageContentSection>
|
|
21
36
|
<ToggleGroup
|
|
22
37
|
type="single"
|
|
@@ -3,6 +3,7 @@ import { Toggle } from '#uilib/components/ui/Toggle';
|
|
|
3
3
|
import { Bold } from 'lucide-react';
|
|
4
4
|
|
|
5
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
6
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
6
7
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
7
8
|
|
|
8
9
|
export default function TogglePage() {
|
|
@@ -14,6 +15,18 @@ export default function TogglePage() {
|
|
|
14
15
|
subheader="Pressable toggle (two-state)."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
18
|
+
<DocsGuidance
|
|
19
|
+
overview="Toggle is a two-state button that can be pressed or unpressed, typically showing an icon. It suits tool-style options that users switch on and off in place, such as text formatting."
|
|
20
|
+
whenToUse={[
|
|
21
|
+
'For tool options in editors and toolbars, such as bold or italic formatting.',
|
|
22
|
+
'When a single independent option is switched on and off and the pressed state is the feedback.',
|
|
23
|
+
]}
|
|
24
|
+
whenNotToUse={[
|
|
25
|
+
'For settings that take effect immediately in a settings list; use Switch instead.',
|
|
26
|
+
'For mutually exclusive options; use ToggleGroup instead.',
|
|
27
|
+
]}
|
|
28
|
+
doNotes={['Provide an aria-label when the toggle shows only an icon.']}
|
|
29
|
+
/>
|
|
17
30
|
<PageContentSection>
|
|
18
31
|
<Toggle aria-label="Bold" size="sm">
|
|
19
32
|
<Bold size={16} />
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from '#uilib/components/ui/Tooltip';
|
|
8
8
|
|
|
9
9
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
10
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
10
11
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
11
12
|
|
|
12
13
|
const TOOLTIP_SIDES = ['left', 'top', 'bottom', 'right'] as const;
|
|
@@ -23,6 +24,22 @@ export default function TooltipPage() {
|
|
|
23
24
|
subheader="Hover content."
|
|
24
25
|
actions={<DocsHeaderActions />}
|
|
25
26
|
/>
|
|
27
|
+
<DocsGuidance
|
|
28
|
+
overview="Tooltip shows brief, supplementary text when users hover or focus a trigger element. Compose Tooltip, TooltipTrigger, and TooltipContent, choosing a side for placement; the overTrigger option positions the content directly over the trigger, which suits revealing truncated text."
|
|
29
|
+
whenToUse={[
|
|
30
|
+
'To label icon-only buttons or controls whose purpose is not obvious.',
|
|
31
|
+
'To reveal the full value of truncated text on hover.',
|
|
32
|
+
'For short, non-essential hints that supplement the visible interface.',
|
|
33
|
+
]}
|
|
34
|
+
whenNotToUse={[
|
|
35
|
+
'For information users need to complete a task; show it in the layout instead.',
|
|
36
|
+
'For rich or interactive content; use a Popover or HoverCard instead.',
|
|
37
|
+
'On touch-only interfaces where hover is unavailable.',
|
|
38
|
+
]}
|
|
39
|
+
dontNotes={[
|
|
40
|
+
'Don’t repeat text that is already visible next to the trigger.',
|
|
41
|
+
]}
|
|
42
|
+
/>
|
|
26
43
|
<PageContentSection>
|
|
27
44
|
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
|
|
28
45
|
{TOOLTIP_SIDES.map(side => (
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.table
|
|
2
|
+
width 100%
|
|
3
|
+
border-collapse collapse
|
|
4
|
+
|
|
5
|
+
th
|
|
6
|
+
text-align left
|
|
7
|
+
font-size var(--text-xs)
|
|
8
|
+
color var(--muted-foreground)
|
|
9
|
+
font-weight 500
|
|
10
|
+
padding var(--p-2) var(--p-4) var(--p-2) 0
|
|
11
|
+
border-bottom 1px solid var(--border)
|
|
12
|
+
|
|
13
|
+
td
|
|
14
|
+
padding var(--p-3) var(--p-4) var(--p-3) 0
|
|
15
|
+
border-bottom 1px solid var(--border)
|
|
16
|
+
vertical-align baseline
|
|
17
|
+
|
|
18
|
+
.token
|
|
19
|
+
font-family monospace
|
|
20
|
+
font-size var(--text-xs)
|
|
21
|
+
color var(--muted-foreground)
|
|
22
|
+
white-space nowrap
|
|
23
|
+
user-select text
|
|
24
|
+
|
|
25
|
+
.value
|
|
26
|
+
font-size var(--text-xs)
|
|
27
|
+
color var(--muted-foreground)
|
|
28
|
+
white-space nowrap
|
|
29
|
+
|
|
30
|
+
.specimen
|
|
31
|
+
white-space nowrap
|
|
32
|
+
overflow hidden
|
|
33
|
+
text-overflow ellipsis
|
|
34
|
+
max-width 0
|
|
35
|
+
width 100%
|
|
36
|
+
|
|
37
|
+
.paragraphSpecimen
|
|
38
|
+
max-width 52ch
|
|
39
|
+
|
|
40
|
+
.sectionNote
|
|
41
|
+
margin-bottom var(--p-3)
|
|
42
|
+
color var(--muted-foreground)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file is automatically generated.
|
|
2
|
+
// Please do not change this file!
|
|
3
|
+
interface CssExports {
|
|
4
|
+
'paragraphSpecimen': string;
|
|
5
|
+
'sectionNote': string;
|
|
6
|
+
'specimen': string;
|
|
7
|
+
'table': string;
|
|
8
|
+
'token': string;
|
|
9
|
+
'value': string;
|
|
10
|
+
}
|
|
11
|
+
export const cssExports: CssExports;
|
|
12
|
+
export default cssExports;
|