@sybilion/uilib 1.3.104 → 1.4.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/agent-glossary/content-prompt.generated.ts +323 -0
- package/dist/agent-glossary/content.generated.ts +136 -63
- package/dist/agent-glossary/content.index.md +14 -0
- package/dist/agent-glossary/content.md +135 -63
- package/dist/agent-glossary/content.prompt.md +322 -0
- package/dist/agent-glossary/workspace.generated.ts +100 -269
- package/dist/agent-glossary/workspace.index.md +100 -0
- package/dist/agent-glossary/workspace.md +100 -269
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.js +34 -0
- package/dist/esm/components/ui/InteractiveContent/InteractiveContent.styl.js +1 -1
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.js +2 -2
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +2 -2
- package/dist/esm/types/src/components/ui/Chart/Chart.example.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +10 -3
- package/dist/esm/types/src/docs/agent-guidance/agent-md-utils.d.ts +10 -0
- package/dist/esm/types/src/docs/components/DocsGuidance/DocsGuidance.d.ts +3 -12
- package/package.json +1 -1
- package/src/components/ui/AnalysesSelector/AGENT.md +16 -0
- package/src/components/ui/AnalysisLineIcon/AGENT.md +11 -0
- package/src/components/ui/AppHeader/AGENT.md +16 -0
- package/src/components/ui/Avatar/AGENT.md +15 -0
- package/src/components/ui/Badge/AGENT.md +16 -0
- package/src/components/ui/BarChart/AGENT.md +16 -0
- package/src/components/ui/Breadcrumb/AGENT.md +15 -0
- package/src/components/ui/Button/AGENT.md +17 -0
- package/src/components/ui/Card/AGENT.md +16 -0
- package/src/components/ui/Chart/AGENT.md +18 -0
- package/src/components/ui/Chart/Chart.example.tsx +37 -0
- package/src/components/ui/ChartAreaInteractive/AGENT.md +24 -8
- package/src/components/ui/Chat/AGENT.md +15 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.test.tsx +22 -1
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.tsx +40 -0
- package/src/components/ui/Checkbox/AGENT.md +16 -0
- package/src/components/ui/Chip/AGENT.md +18 -0
- package/src/components/ui/Confirm/AGENT.md +15 -0
- package/src/components/ui/Dialog/AGENT.md +15 -0
- package/src/components/ui/DonutChart/AGENT.md +15 -0
- package/src/components/ui/Drawer/AGENT.md +17 -0
- package/src/components/ui/DropZone/AGENT.md +16 -0
- package/src/components/ui/DropdownMenu/AGENT.md +16 -0
- package/src/components/ui/FileChip/AGENT.md +17 -0
- package/src/components/ui/FlickeringGrid/AGENT.md +15 -0
- package/src/components/ui/Foldable/AGENT.md +16 -0
- package/src/components/ui/GridLayout/AGENT.md +17 -0
- package/src/components/ui/Image/AGENT.md +16 -0
- package/src/components/ui/ImageWithFallback/AGENT.md +15 -0
- package/src/components/ui/Input/AGENT.md +16 -0
- package/src/components/ui/InteractiveContent/AGENT.md +21 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.styl +9 -0
- package/src/components/ui/Kicker/AGENT.md +16 -0
- package/src/components/ui/Label/AGENT.md +15 -0
- package/src/components/ui/LabelWithId/AGENT.md +10 -0
- package/src/components/ui/LabeledInput/AGENT.md +11 -0
- package/src/components/ui/LegacyPlatformLink/AGENT.md +15 -0
- package/src/components/ui/Logo/AGENT.md +15 -0
- package/src/components/ui/MobileAdaptiveSelector/AGENT.md +15 -0
- package/src/components/ui/NavUserHeader/AGENT.md +15 -0
- package/src/components/ui/NumberControl/AGENT.md +15 -0
- package/src/components/ui/Page/AGENT.md +20 -7
- package/src/components/ui/Page/PageColumns/PageColumns.styl +5 -5
- package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +3 -3
- package/src/components/ui/Page/PageColumns/PageColumns.tsx +11 -16
- package/src/components/ui/Sheet/AGENT.md +15 -0
- package/src/components/ui/SignalCard/AGENT.md +16 -0
- package/src/components/ui/Switch/AGENT.md +15 -0
- package/src/components/ui/Tooltip/AGENT.md +17 -0
- package/src/components/widgets/DriverMap/AGENT.md +27 -8
- package/src/components/widgets/DriversComparisonChart/AGENT.md +27 -13
- package/src/components/widgets/PerformanceChart/AGENT.md +23 -8
- package/src/declarations.d.ts +5 -0
- package/src/docs/agent-guidance/agent-md-utils.ts +48 -0
- package/src/docs/agent-guidance/chat-attachments-dropzone.md +15 -0
- package/src/docs/agent-guidance/chat-composer-prefill.md +15 -0
- package/src/docs/agent-guidance/chat-sheet.md +14 -0
- package/src/docs/agent-guidance/chat-slash-commands.md +15 -0
- package/src/docs/agent-guidance/chat-user-csv-attachment.md +14 -0
- package/src/docs/agent-guidance/colors.md +10 -0
- package/src/docs/agent-guidance/icons.md +11 -0
- package/src/docs/agent-guidance/lightweight-forecast-chart.md +17 -0
- package/src/docs/agent-guidance/motion.md +10 -0
- package/src/docs/agent-guidance/page-columns.md +19 -0
- package/src/docs/agent-guidance/page-footer.md +15 -0
- package/src/docs/agent-guidance/page-tabs.md +19 -0
- package/src/docs/agent-guidance/page.md +15 -0
- package/src/docs/agent-guidance/progress.md +11 -0
- package/src/docs/agent-guidance/pull-quote.md +15 -0
- package/src/docs/agent-guidance/radii-shadows.md +10 -0
- package/src/docs/agent-guidance/region-coords.md +11 -0
- package/src/docs/agent-guidance/renamer.md +15 -0
- package/src/docs/agent-guidance/select.md +15 -0
- package/src/docs/agent-guidance/separator.md +11 -0
- package/src/docs/agent-guidance/sidebar-datasets-items-grouped.md +11 -0
- package/src/docs/agent-guidance/sidebar.md +15 -0
- package/src/docs/agent-guidance/skeleton.md +16 -0
- package/src/docs/agent-guidance/slider.md +16 -0
- package/src/docs/agent-guidance/smart-text-truncate.md +11 -0
- package/src/docs/agent-guidance/spacing.md +10 -0
- package/src/docs/agent-guidance/sparkline.md +15 -0
- package/src/docs/agent-guidance/standalone-app-layout.md +16 -0
- package/src/docs/agent-guidance/sybilion-auth-layout.md +15 -0
- package/src/docs/agent-guidance/table.md +17 -0
- package/src/docs/agent-guidance/tabs.md +21 -0
- package/src/docs/agent-guidance/text-shimmer.md +11 -0
- package/src/docs/agent-guidance/text-with-defer-tooltip.md +15 -0
- package/src/docs/agent-guidance/time-range-controls.md +15 -0
- package/src/docs/agent-guidance/toggle-group.md +15 -0
- package/src/docs/agent-guidance/toggle.md +15 -0
- package/src/docs/agent-guidance/typography.md +10 -0
- package/src/docs/agent-guidance/vimeo-embed.md +11 -0
- package/src/docs/agent-guidance/world-map.md +11 -0
- package/src/docs/components/DocsGuidance/DocsGuidance.styl +26 -25
- package/src/docs/components/DocsGuidance/DocsGuidance.styl.d.ts +1 -4
- package/src/docs/components/DocsGuidance/DocsGuidance.tsx +9 -44
- package/src/docs/config/webpack.config.js +6 -1
- package/src/docs/pages/AnalysesSelectorPage.tsx +6 -17
- package/src/docs/pages/AnalysisLineIconPage.tsx +2 -11
- package/src/docs/pages/AvatarPage.tsx +2 -14
- package/src/docs/pages/BadgePage.tsx +2 -15
- package/src/docs/pages/BarChartPage.tsx +2 -15
- package/src/docs/pages/BreadcrumbPage.tsx +2 -14
- package/src/docs/pages/ButtonPage.tsx +2 -16
- package/src/docs/pages/CardPage.tsx +5 -18
- package/src/docs/pages/ChartAreaInteractivePage.tsx +2 -15
- package/src/docs/pages/ChartPage.tsx +4 -47
- package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +2 -14
- package/src/docs/pages/ChatComposerPrefillPage.tsx +2 -14
- package/src/docs/pages/ChatPage.tsx +2 -14
- package/src/docs/pages/ChatSheetPage.tsx +2 -13
- package/src/docs/pages/ChatSlashCommandsPage.tsx +2 -14
- package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +2 -13
- package/src/docs/pages/CheckboxPage.tsx +2 -15
- package/src/docs/pages/ChipPage.tsx +2 -17
- package/src/docs/pages/ColorsPage.tsx +2 -10
- package/src/docs/pages/ConfirmPage.tsx +2 -14
- package/src/docs/pages/DialogPage.tsx +2 -14
- package/src/docs/pages/DonutChartPage.tsx +2 -14
- package/src/docs/pages/DrawerPage.tsx +2 -16
- package/src/docs/pages/DriverMapPage.tsx +2 -16
- package/src/docs/pages/DriversComparisonChartPage.tsx +2 -16
- package/src/docs/pages/DropZonePage.tsx +2 -15
- package/src/docs/pages/DropdownMenuPage.tsx +2 -15
- package/src/docs/pages/FileChipPage.tsx +2 -16
- package/src/docs/pages/FlickeringGridPage.tsx +2 -14
- package/src/docs/pages/FoldablePage.tsx +2 -15
- package/src/docs/pages/GridLayoutPage.tsx +2 -15
- package/src/docs/pages/IconsPage.tsx +2 -11
- package/src/docs/pages/ImagePage.tsx +2 -15
- package/src/docs/pages/ImageWithFallbackPage.tsx +2 -14
- package/src/docs/pages/IncludeHiddenInYScalePage.tsx +2 -13
- package/src/docs/pages/InputPage.tsx +2 -15
- package/src/docs/pages/InteractiveContentPage.tsx +91 -18
- package/src/docs/pages/KickerPage.tsx +2 -15
- package/src/docs/pages/LabelPage.tsx +2 -14
- package/src/docs/pages/LabelWithIdPage.tsx +2 -10
- package/src/docs/pages/LabeledInputPage.tsx +2 -11
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +2 -14
- package/src/docs/pages/LightweightChartPage.tsx +2 -16
- package/src/docs/pages/LogoPage.tsx +2 -14
- package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +2 -14
- package/src/docs/pages/MotionPage.tsx +2 -10
- package/src/docs/pages/NavUserHeaderPage.tsx +2 -14
- package/src/docs/pages/NumberControlPage.tsx +2 -14
- package/src/docs/pages/PageColumnsPage.tsx +40 -17
- package/src/docs/pages/PageFooterPage.tsx +2 -14
- package/src/docs/pages/PagePage.tsx +2 -14
- package/src/docs/pages/PageTabsPage.tsx +2 -17
- package/src/docs/pages/PerformanceChartPage.tsx +2 -14
- package/src/docs/pages/ProgressPage.tsx +2 -11
- package/src/docs/pages/PullQuotePage.tsx +2 -14
- package/src/docs/pages/RadiiShadowsPage.tsx +2 -10
- package/src/docs/pages/RegionCoordsPage.tsx +2 -11
- package/src/docs/pages/RenamerPage.tsx +2 -14
- package/src/docs/pages/SelectPage.tsx +2 -14
- package/src/docs/pages/SeparatorPage.tsx +2 -11
- package/src/docs/pages/SheetPage.tsx +2 -14
- package/src/docs/pages/SidebarDatasetsItemsGroupedPage.tsx +2 -11
- package/src/docs/pages/SidebarPage.tsx +2 -14
- package/src/docs/pages/SignalCardPage.tsx +2 -15
- package/src/docs/pages/SkeletonPage.tsx +2 -15
- package/src/docs/pages/SliderPage.tsx +2 -15
- package/src/docs/pages/SmartTextTruncatePage.tsx +2 -11
- package/src/docs/pages/SpacingPage.tsx +2 -10
- package/src/docs/pages/SparklinePage.tsx +2 -14
- package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +2 -15
- package/src/docs/pages/SwitchPage.tsx +2 -14
- package/src/docs/pages/SybilionAuthLayoutPage.tsx +2 -14
- package/src/docs/pages/TablePage.tsx +2 -15
- package/src/docs/pages/TabsPage.tsx +2 -19
- package/src/docs/pages/TextShimmerPage.tsx +2 -11
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +2 -14
- package/src/docs/pages/TimeRangeControlsPage.tsx +2 -14
- package/src/docs/pages/ToggleGroupPage.tsx +2 -14
- package/src/docs/pages/TogglePage.tsx +2 -12
- package/src/docs/pages/TooltipPage.tsx +2 -16
- package/src/docs/pages/TypographyPage.tsx +2 -10
- package/src/docs/pages/VimeoEmbedPage.tsx +2 -11
- package/src/docs/pages/WorldMapPage.tsx +2 -11
- package/src/components/widgets/AGENT.md +0 -21
|
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
4
|
import { Renamer } from '#uilib/components/ui/Renamer';
|
|
5
|
+
import renamerGuidance from '#uilib/docs/agent-guidance/renamer.md';
|
|
5
6
|
|
|
6
7
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
8
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -18,20 +19,7 @@ export default function RenamerPage() {
|
|
|
18
19
|
subheader="Inline rename with pencil control."
|
|
19
20
|
actions={<DocsHeaderActions />}
|
|
20
21
|
/>
|
|
21
|
-
<DocsGuidance
|
|
22
|
-
overview="Renamer wraps a displayed name with an inline rename affordance: a pencil control switches the text into an editable field and commits the new value through onChange. The children render the current display state."
|
|
23
|
-
whenToUse={[
|
|
24
|
-
'To let users rename an entity, such as a dataset or report, in place without a dialog.',
|
|
25
|
-
'In headers or list rows where the name is the primary editable property.',
|
|
26
|
-
]}
|
|
27
|
-
whenNotToUse={[
|
|
28
|
-
'For multi-field editing; open a form or dialog instead.',
|
|
29
|
-
'When renaming requires validation feedback or confirmation before saving.',
|
|
30
|
-
]}
|
|
31
|
-
doNotes={[
|
|
32
|
-
'Persist the new name in onChange and reflect it back in value so the display stays in sync.',
|
|
33
|
-
]}
|
|
34
|
-
/>
|
|
22
|
+
<DocsGuidance source={renamerGuidance} />
|
|
35
23
|
<PageContentSection>
|
|
36
24
|
<Renamer value={name} onChange={setName}>
|
|
37
25
|
{name}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue,
|
|
8
8
|
} from '#uilib/components/ui/Select';
|
|
9
|
+
import selectGuidance from '#uilib/docs/agent-guidance/select.md';
|
|
9
10
|
|
|
10
11
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
11
12
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -66,20 +67,7 @@ export default function SelectPage() {
|
|
|
66
67
|
subheader="Variants, sizes, placeholder, darker trigger, and disabled state."
|
|
67
68
|
actions={<DocsHeaderActions />}
|
|
68
69
|
/>
|
|
69
|
-
<DocsGuidance
|
|
70
|
-
overview="Select is a Radix-based dropdown for choosing a single option from a list. Compose it from Select, SelectTrigger, SelectValue, SelectContent, and SelectItem, and pick a trigger variant and size to match the surrounding controls."
|
|
71
|
-
whenToUse={[
|
|
72
|
-
'To choose one option from a list of roughly five or more items.',
|
|
73
|
-
'In forms, toolbars, and filters where space is limited and options collapse behind a trigger.',
|
|
74
|
-
]}
|
|
75
|
-
whenNotToUse={[
|
|
76
|
-
'For two to four options that benefit from being visible at once; use ToggleGroup or radio buttons.',
|
|
77
|
-
'For multi-select or searchable lists; use a combobox or multi-select component.',
|
|
78
|
-
]}
|
|
79
|
-
doNotes={[
|
|
80
|
-
'Use the clear variant for low-emphasis, inline selects embedded in text or toolbars.',
|
|
81
|
-
]}
|
|
82
|
-
/>
|
|
70
|
+
<DocsGuidance source={selectGuidance} />
|
|
83
71
|
<PageContentSection
|
|
84
72
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
85
73
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { Separator } from '#uilib/components/ui/Separator';
|
|
3
|
+
import separatorGuidance from '#uilib/docs/agent-guidance/separator.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -14,17 +15,7 @@ export default function SeparatorPage() {
|
|
|
14
15
|
subheader="Horizontal rule."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
17
|
-
<DocsGuidance
|
|
18
|
-
overview="Separator draws a thin horizontal rule that visually divides adjacent content. It is purely presentational and carries no semantics of its own."
|
|
19
|
-
whenToUse={[
|
|
20
|
-
'To divide groups of related content within a card, menu, or panel.',
|
|
21
|
-
'Between repeated rows or sections where whitespace alone is not enough.',
|
|
22
|
-
]}
|
|
23
|
-
whenNotToUse={[
|
|
24
|
-
'Between top-level page sections; rely on PageContentSection spacing instead.',
|
|
25
|
-
'When grouping can be expressed with headings or spacing alone; avoid unnecessary lines.',
|
|
26
|
-
]}
|
|
27
|
-
/>
|
|
18
|
+
<DocsGuidance source={separatorGuidance} />
|
|
28
19
|
<PageContentSection>
|
|
29
20
|
<p style={{ margin: 0 }}>Above</p>
|
|
30
21
|
<Separator style={{ margin: '12px 0' }} />
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
SheetTitle,
|
|
9
9
|
SheetTrigger,
|
|
10
10
|
} from '#uilib/components/ui/Sheet';
|
|
11
|
+
import SheetGuidance from '#uilib/components/ui/Sheet/AGENT.md';
|
|
11
12
|
|
|
12
13
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
14
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -22,20 +23,7 @@ export default function SheetPage() {
|
|
|
22
23
|
subheader="Slide-over panel (Radix dialog)."
|
|
23
24
|
actions={<DocsHeaderActions />}
|
|
24
25
|
/>
|
|
25
|
-
<DocsGuidance
|
|
26
|
-
overview="Sheet is a slide-over panel built on the Radix dialog primitive. It opens from a screen edge over the current page and is composed from SheetTrigger, SheetContent, SheetHeader, SheetTitle, and SheetDescription."
|
|
27
|
-
whenToUse={[
|
|
28
|
-
'For supplementary tasks that keep the underlying page in context, such as editing details or filters.',
|
|
29
|
-
'On smaller screens where a full dialog would feel cramped and an edge panel works better.',
|
|
30
|
-
]}
|
|
31
|
-
whenNotToUse={[
|
|
32
|
-
'For short confirmations or alerts; use Dialog or AlertDialog.',
|
|
33
|
-
'For content that deserves its own page or persistent layout region.',
|
|
34
|
-
]}
|
|
35
|
-
doNotes={[
|
|
36
|
-
'Always include SheetTitle and SheetDescription so the panel is announced correctly to screen readers.',
|
|
37
|
-
]}
|
|
38
|
-
/>
|
|
26
|
+
<DocsGuidance source={SheetGuidance} />
|
|
39
27
|
<PageContentSection>
|
|
40
28
|
<Sheet>
|
|
41
29
|
<SheetTrigger asChild>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
SidebarDatasetsItemsGrouped,
|
|
8
8
|
type SidebarDatasetsItemsGroupedDataset,
|
|
9
9
|
} from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
|
|
10
|
+
import sidebarDatasetsItemsGroupedGuidance from '#uilib/docs/agent-guidance/sidebar-datasets-items-grouped.md';
|
|
10
11
|
|
|
11
12
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
12
13
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -101,17 +102,7 @@ export default function SidebarDatasetsItemsGroupedPage() {
|
|
|
101
102
|
subheader="Datasets sidebar: collapsible groups and nested rows."
|
|
102
103
|
actions={<DocsHeaderActions />}
|
|
103
104
|
/>
|
|
104
|
-
<DocsGuidance
|
|
105
|
-
overview="SidebarDatasetsItemsGrouped renders a dataset list for the application sidebar, organised into collapsible groups with nested rows. The groupBy prop switches grouping between target type, regions, and categories, and selection is controlled through selectedDatasetId and onDatasetClick."
|
|
106
|
-
whenToUse={[
|
|
107
|
-
'In a sidebar that lists many datasets which benefit from grouping by a shared attribute.',
|
|
108
|
-
'When the user needs to switch between grouping dimensions without losing their selection.',
|
|
109
|
-
]}
|
|
110
|
-
whenNotToUse={[
|
|
111
|
-
'For short, flat lists; plain Sidebar menu items are simpler.',
|
|
112
|
-
'Outside a sidebar surface; the widget assumes sidebar colours and spacing.',
|
|
113
|
-
]}
|
|
114
|
-
/>
|
|
105
|
+
<DocsGuidance source={sidebarDatasetsItemsGroupedGuidance} />
|
|
115
106
|
<PageContentSection>
|
|
116
107
|
<ToggleGroup
|
|
117
108
|
type="single"
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
SidebarMenuButton,
|
|
6
6
|
SidebarMenuItem,
|
|
7
7
|
} from '#uilib/components/ui/Sidebar/Sidebar';
|
|
8
|
+
import sidebarGuidance from '#uilib/docs/agent-guidance/sidebar.md';
|
|
8
9
|
|
|
9
10
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
10
11
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -19,20 +20,7 @@ export default function SidebarPage() {
|
|
|
19
20
|
subheader="Sidebar menu primitives (isolated preview)."
|
|
20
21
|
actions={<DocsHeaderActions />}
|
|
21
22
|
/>
|
|
22
|
-
<DocsGuidance
|
|
23
|
-
overview="Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem, and SidebarMenuButton. Compose them to create grouped menus with active-state styling."
|
|
24
|
-
whenToUse={[
|
|
25
|
-
'To build the primary navigation of an application shell.',
|
|
26
|
-
'When menu items need consistent hover, focus, and active styling on a sidebar surface.',
|
|
27
|
-
]}
|
|
28
|
-
whenNotToUse={[
|
|
29
|
-
'For in-page navigation such as tabs or table of contents; use PageTabs or links.',
|
|
30
|
-
'For contextual action menus; use DropdownMenu.',
|
|
31
|
-
]}
|
|
32
|
-
doNotes={[
|
|
33
|
-
'Mark the current route’s item with isActive so users can orient themselves.',
|
|
34
|
-
]}
|
|
35
|
-
/>
|
|
23
|
+
<DocsGuidance source={sidebarGuidance} />
|
|
36
24
|
<PageContentSection>
|
|
37
25
|
<SidebarGroup
|
|
38
26
|
style={{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Chip } from '#uilib/components/ui/Chip';
|
|
2
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
3
3
|
import { SignalCard } from '#uilib/components/ui/SignalCard';
|
|
4
|
+
import SignalCardGuidance from '#uilib/components/ui/SignalCard/AGENT.md';
|
|
4
5
|
import { Sparkline } from '#uilib/components/ui/Sparkline';
|
|
5
6
|
import { Activity, BarChart3, Clock, TrendingUp } from 'lucide-react';
|
|
6
7
|
|
|
@@ -25,21 +26,7 @@ export default function SignalCardPage() {
|
|
|
25
26
|
subheader="Metric card with kicker, figure, delta chip, and sparkline slot."
|
|
26
27
|
actions={<DocsHeaderActions />}
|
|
27
28
|
/>
|
|
28
|
-
<DocsGuidance
|
|
29
|
-
overview="SignalCard is the product primitive for a single metric: an optional kicker and icon header, a large Manrope figure with unit and tolerance suffixes, body copy, a sparkline slot, and a footer with a delta indicator and muted meta items. Weight carries the emphasis in the numeric block, not colour."
|
|
30
|
-
whenToUse={[
|
|
31
|
-
'To present a forecast, spot price, or index value with its direction and confidence.',
|
|
32
|
-
'In a dashboard grid where each card answers one quantitative question.',
|
|
33
|
-
]}
|
|
34
|
-
whenNotToUse={[
|
|
35
|
-
'For general grouped content without a headline metric; use Card.',
|
|
36
|
-
'For dense tabular comparisons across many series; use Table.',
|
|
37
|
-
]}
|
|
38
|
-
doNotes={[
|
|
39
|
-
'Keep the footer meta short, such as horizon and confidence.',
|
|
40
|
-
'Pass a Chip with a status variant as the delta so direction reads at a glance.',
|
|
41
|
-
]}
|
|
42
|
-
/>
|
|
29
|
+
<DocsGuidance source={SignalCardGuidance} />
|
|
43
30
|
<PageContentSection
|
|
44
31
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
45
32
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { Skeleton } from '#uilib/components/ui/Skeleton';
|
|
3
|
+
import skeletonGuidance from '#uilib/docs/agent-guidance/skeleton.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -14,21 +15,7 @@ export default function SkeletonPage() {
|
|
|
14
15
|
subheader="Loading placeholder."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
17
|
-
<DocsGuidance
|
|
18
|
-
overview="Skeleton is a loading placeholder that reserves space for content while it loads. Compose simple shapes — lines and blocks — to mirror the layout of the content that will eventually appear."
|
|
19
|
-
whenToUse={[
|
|
20
|
-
'While fetching data for content whose layout is known in advance, such as cards, lists, or text blocks.',
|
|
21
|
-
'To reduce layout shift by holding the space the real content will occupy.',
|
|
22
|
-
'When loading takes long enough that an empty area would feel broken.',
|
|
23
|
-
]}
|
|
24
|
-
whenNotToUse={[
|
|
25
|
-
'For very fast operations where the skeleton would only flash briefly.',
|
|
26
|
-
'For indeterminate background work with no incoming content; use a spinner or progress indicator instead.',
|
|
27
|
-
]}
|
|
28
|
-
doNotes={[
|
|
29
|
-
'Match skeleton shapes to the dimensions of the real content so the swap feels seamless.',
|
|
30
|
-
]}
|
|
31
|
-
/>
|
|
18
|
+
<DocsGuidance source={skeletonGuidance} />
|
|
32
19
|
<PageContentSection
|
|
33
20
|
style={{
|
|
34
21
|
display: 'flex',
|
|
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
4
|
import { Slider } from '#uilib/components/ui/Slider';
|
|
5
|
+
import sliderGuidance from '#uilib/docs/agent-guidance/slider.md';
|
|
5
6
|
|
|
6
7
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
8
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -32,21 +33,7 @@ export default function SliderPage() {
|
|
|
32
33
|
subheader="Value positions, range configurations, and disabled state."
|
|
33
34
|
actions={<DocsHeaderActions />}
|
|
34
35
|
/>
|
|
35
|
-
<DocsGuidance
|
|
36
|
-
overview="Slider lets users select a numeric value from a continuous or stepped range by dragging a thumb along a track. Control it with value and onValueChange, and constrain it with max and step."
|
|
37
|
-
whenToUse={[
|
|
38
|
-
'To adjust a value within a known range, such as volume, opacity, or a threshold.',
|
|
39
|
-
'When the approximate value matters more than a precise figure.',
|
|
40
|
-
'For filtering by a numeric range where immediate feedback is useful.',
|
|
41
|
-
]}
|
|
42
|
-
whenNotToUse={[
|
|
43
|
-
'When users need to enter an exact value; use a number input instead.',
|
|
44
|
-
'For ranges so large that fine control by dragging becomes impractical.',
|
|
45
|
-
]}
|
|
46
|
-
doNotes={[
|
|
47
|
-
'Display the current value next to the slider so users can see the effect of their adjustment.',
|
|
48
|
-
]}
|
|
49
|
-
/>
|
|
36
|
+
<DocsGuidance source={sliderGuidance} />
|
|
50
37
|
<PageContentSection
|
|
51
38
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
52
39
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate';
|
|
3
|
+
import smartTextTruncateGuidance from '#uilib/docs/agent-guidance/smart-text-truncate.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -18,17 +19,7 @@ export default function SmartTextTruncatePage() {
|
|
|
18
19
|
subheader="Smart ellipsis for long strings."
|
|
19
20
|
actions={<DocsHeaderActions />}
|
|
20
21
|
/>
|
|
21
|
-
<DocsGuidance
|
|
22
|
-
overview="SmartTextTruncate shortens a long string in the middle so it fits its container, keeping the end of the string visible. This preserves distinguishing suffixes such as file extensions or trailing identifiers that a plain end ellipsis would hide."
|
|
23
|
-
whenToUse={[
|
|
24
|
-
'For long identifiers, file names, or paths where the ending carries meaning.',
|
|
25
|
-
'In narrow containers, such as table cells or sidebars, where strings of unpredictable length must fit on one line.',
|
|
26
|
-
]}
|
|
27
|
-
whenNotToUse={[
|
|
28
|
-
'For prose or sentences; standard end truncation reads more naturally.',
|
|
29
|
-
'When the full value must always be visible; let the text wrap instead.',
|
|
30
|
-
]}
|
|
31
|
-
/>
|
|
22
|
+
<DocsGuidance source={smartTextTruncateGuidance} />
|
|
32
23
|
<PageContentSection>
|
|
33
24
|
<div className={S.resizableDemo}>
|
|
34
25
|
<SmartTextTruncate className={S.demoText}>{LONG}</SmartTextTruncate>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
|
+
import spacingGuidance from '#uilib/docs/agent-guidance/spacing.md';
|
|
2
3
|
|
|
3
4
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
4
5
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -19,16 +20,7 @@ export default function SpacingPage() {
|
|
|
19
20
|
subheader="The --p-* scale — a 4px-based rhythm for padding, gaps, and margins."
|
|
20
21
|
actions={<DocsHeaderActions />}
|
|
21
22
|
/>
|
|
22
|
-
<DocsGuidance
|
|
23
|
-
overview="The --p-* tokens are the canonical spacing scale: each step is a multiple of 4px, from --p-1 (4px) up to --p-24 (96px). Use them for padding, gaps, and margins instead of raw pixel values, so layouts share the same rhythm everywhere."
|
|
24
|
-
whenToUse={[
|
|
25
|
-
'Gaps and padding inside components and page sections.',
|
|
26
|
-
'Vertical rhythm between sections, cards, and form fields.',
|
|
27
|
-
]}
|
|
28
|
-
whenNotToUse={[
|
|
29
|
-
'One-off pixel values that sit between steps; pick the nearest token instead.',
|
|
30
|
-
]}
|
|
31
|
-
/>
|
|
23
|
+
<DocsGuidance source={spacingGuidance} />
|
|
32
24
|
<PageContentSection>
|
|
33
25
|
<h3>Scale</h3>
|
|
34
26
|
<p className={S.sectionNote}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { Sparkline } from '#uilib/components/ui/Sparkline';
|
|
3
|
+
import sparklineGuidance from '#uilib/docs/agent-guidance/sparkline.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -16,20 +17,7 @@ export default function SparklinePage() {
|
|
|
16
17
|
subheader="Compact line chart."
|
|
17
18
|
actions={<DocsHeaderActions />}
|
|
18
19
|
/>
|
|
19
|
-
<DocsGuidance
|
|
20
|
-
overview="Sparkline renders a compact line chart from an array of numbers, sized to fit inline alongside text or inside table cells and cards. Use showEndDot to emphasise the most recent value."
|
|
21
|
-
whenToUse={[
|
|
22
|
-
'To show the trend of a metric at a glance, such as price or activity over time.',
|
|
23
|
-
'Inside dense layouts — table rows, KPI cards, or list items — where a full chart would not fit.',
|
|
24
|
-
]}
|
|
25
|
-
whenNotToUse={[
|
|
26
|
-
'When users need axes, labels, or precise values; use a full chart component instead.',
|
|
27
|
-
'For comparing many series against each other; sparklines carry no scale.',
|
|
28
|
-
]}
|
|
29
|
-
doNotes={[
|
|
30
|
-
'Pair the sparkline with the current value or a delta so the trend has context.',
|
|
31
|
-
]}
|
|
32
|
-
/>
|
|
20
|
+
<DocsGuidance source={sparklineGuidance} />
|
|
33
21
|
<PageContentSection>
|
|
34
22
|
<Sparkline data={DATA} width={120} height={36} showEndDot />
|
|
35
23
|
</PageContentSection>
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from '#uilib/components/ui/Sidebar/Sidebar';
|
|
21
21
|
import { SidebarDatasetsItemsGrouped } from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
|
|
22
22
|
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
23
|
+
import standaloneAppLayoutGuidance from '#uilib/docs/agent-guidance/standalone-app-layout.md';
|
|
23
24
|
import { GearSixIcon, UserCircleIcon } from '@phosphor-icons/react';
|
|
24
25
|
import { House } from 'lucide-react';
|
|
25
26
|
|
|
@@ -204,21 +205,7 @@ export default function StandaloneAppLayoutPage() {
|
|
|
204
205
|
}
|
|
205
206
|
actions={<DocsHeaderActions />}
|
|
206
207
|
/>
|
|
207
|
-
<DocsGuidance
|
|
208
|
-
overview="The standalone app layout composes AppShell, Sidebar, and AppShellMainContent into the full chrome for a Sybilion standalone application: collapsible sidebar, sticky app header, scrollable main column, and page footer. This page embeds a live, layout-only preview; for real wiring, copy the standalone app template and follow its README."
|
|
209
|
-
whenToUse={[
|
|
210
|
-
'When building a new standalone Sybilion app that needs the standard workspace shell.',
|
|
211
|
-
'As a reference for how AppShell, Sidebar, PageScroll, and SybilionAppHeader fit together.',
|
|
212
|
-
'To verify scrolling, sidebar resizing, and header behaviour before wiring real routes.',
|
|
213
|
-
]}
|
|
214
|
-
whenNotToUse={[
|
|
215
|
-
'For individual pages inside an existing app; use PageHeader, PageContent, and PageContentSection instead.',
|
|
216
|
-
'As a nested shell inside another AppShell; an app should have exactly one shell.',
|
|
217
|
-
]}
|
|
218
|
-
doNotes={[
|
|
219
|
-
'Start from the app template rather than assembling the shell by hand, so auth and SDK wiring come for free.',
|
|
220
|
-
]}
|
|
221
|
-
/>
|
|
208
|
+
<DocsGuidance source={standaloneAppLayoutGuidance} />
|
|
222
209
|
<PageContentSection title="Embedded mini-app (layout preview)">
|
|
223
210
|
<StandaloneLayoutPreview />
|
|
224
211
|
</PageContentSection>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Label } from '#uilib/components/ui/Label';
|
|
2
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
3
3
|
import { Switch } from '#uilib/components/ui/Switch';
|
|
4
|
+
import SwitchGuidance from '#uilib/components/ui/Switch/AGENT.md';
|
|
4
5
|
|
|
5
6
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
6
7
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -22,20 +23,7 @@ export default function SwitchPage() {
|
|
|
22
23
|
subheader="Sizes, on/off states, and disabled state."
|
|
23
24
|
actions={<DocsHeaderActions />}
|
|
24
25
|
/>
|
|
25
|
-
<DocsGuidance
|
|
26
|
-
overview="Switch is a binary control for turning a setting on or off. Unlike a checkbox, a switch implies the change takes effect immediately, without a separate save step."
|
|
27
|
-
whenToUse={[
|
|
28
|
-
'For settings that apply instantly, such as enabling notifications or a feature flag.',
|
|
29
|
-
'When the two states are clearly opposites, such as on and off.',
|
|
30
|
-
]}
|
|
31
|
-
whenNotToUse={[
|
|
32
|
-
'In forms where changes are committed by a submit action; use Checkbox instead.',
|
|
33
|
-
'For selecting one of several options; use RadioGroup, Toggle, or ToggleGroup.',
|
|
34
|
-
]}
|
|
35
|
-
doNotes={[
|
|
36
|
-
'Pair the switch with a Label linked via htmlFor so the state being controlled is clear.',
|
|
37
|
-
]}
|
|
38
|
-
/>
|
|
26
|
+
<DocsGuidance source={SwitchGuidance} />
|
|
39
27
|
<PageContentSection
|
|
40
28
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
41
29
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { SybilionAuthLayout } from '#uilib/components/widgets/SybilionAuthLayout';
|
|
3
3
|
import { SybilionSignInPanel } from '#uilib/components/widgets/SybilionSignInPanel';
|
|
4
|
+
import sybilionAuthLayoutGuidance from '#uilib/docs/agent-guidance/sybilion-auth-layout.md';
|
|
4
5
|
|
|
5
6
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
6
7
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -15,20 +16,7 @@ export default function SybilionAuthLayoutPage() {
|
|
|
15
16
|
subheader="Split-view auth chrome (hero column + form). Standalone apps: copy package logo to public/logo.svg — see Logo."
|
|
16
17
|
actions={<DocsHeaderActions />}
|
|
17
18
|
/>
|
|
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
|
-
/>
|
|
19
|
+
<DocsGuidance source={sybilionAuthLayoutGuidance} />
|
|
32
20
|
<PageContentSection title="Preview">
|
|
33
21
|
<p style={{ marginTop: 0, color: 'var(--muted-foreground)' }}>
|
|
34
22
|
Clipped height so <code>100vh</code> layout fits the docs shell. Real
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
TableRow,
|
|
9
9
|
} from '#uilib/components/ui/Table';
|
|
10
10
|
import type { TableSize } from '#uilib/components/ui/Table';
|
|
11
|
+
import tableGuidance from '#uilib/docs/agent-guidance/table.md';
|
|
11
12
|
|
|
12
13
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
14
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -65,21 +66,7 @@ export default function TablePage() {
|
|
|
65
66
|
subheader="Semantic table primitives and size ramp."
|
|
66
67
|
actions={<DocsHeaderActions />}
|
|
67
68
|
/>
|
|
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
|
-
/>
|
|
69
|
+
<DocsGuidance source={tableGuidance} />
|
|
83
70
|
<PageXScroll>
|
|
84
71
|
<section
|
|
85
72
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
TabsTrigger,
|
|
9
9
|
type TabsVariant,
|
|
10
10
|
} from '#uilib/components/ui/Tabs';
|
|
11
|
+
import tabsGuidance from '#uilib/docs/agent-guidance/tabs.md';
|
|
11
12
|
|
|
12
13
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
14
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -86,25 +87,7 @@ export default function TabsPage() {
|
|
|
86
87
|
subheader="Variants, sizes, full-width list, darker surface."
|
|
87
88
|
actions={<DocsHeaderActions />}
|
|
88
89
|
/>
|
|
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
|
-
/>
|
|
90
|
+
<DocsGuidance source={tabsGuidance} />
|
|
108
91
|
<PageContentSection
|
|
109
92
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
110
93
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { TextShimmer } from '#uilib/components/ui/TextShimmer';
|
|
3
|
+
import textShimmerGuidance from '#uilib/docs/agent-guidance/text-shimmer.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -14,17 +15,7 @@ export default function TextShimmerPage() {
|
|
|
14
15
|
subheader="Shimmer loading text."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
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
|
-
/>
|
|
18
|
+
<DocsGuidance source={textShimmerGuidance} />
|
|
28
19
|
<PageContentSection>
|
|
29
20
|
<span>
|
|
30
21
|
<TextShimmer>Generating…</TextShimmer>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
import { TextWithDeferTooltip } from '#uilib/components/ui/TextWithDeferTooltip';
|
|
3
|
+
import textWithDeferTooltipGuidance from '#uilib/docs/agent-guidance/text-with-defer-tooltip.md';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
5
6
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -17,20 +18,7 @@ export default function TextWithDeferTooltipPage() {
|
|
|
17
18
|
subheader="Tooltip only when text overflows."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
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
|
-
/>
|
|
21
|
+
<DocsGuidance source={textWithDeferTooltipGuidance} />
|
|
34
22
|
<PageContentSection>
|
|
35
23
|
<p style={{ margin: '0 0 8px', fontWeight: 600 }}>Default</p>
|
|
36
24
|
<div
|
|
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
4
|
import { TimeRangeControls } from '#uilib/components/ui/TimeRangeControls';
|
|
5
|
+
import timeRangeControlsGuidance from '#uilib/docs/agent-guidance/time-range-controls.md';
|
|
5
6
|
|
|
6
7
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
8
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -18,20 +19,7 @@ export default function TimeRangeControlsPage() {
|
|
|
18
19
|
subheader="Chart time range toggles."
|
|
19
20
|
actions={<DocsHeaderActions />}
|
|
20
21
|
/>
|
|
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
|
-
/>
|
|
22
|
+
<DocsGuidance source={timeRangeControlsGuidance} />
|
|
35
23
|
<PageContentSection>
|
|
36
24
|
<TimeRangeControls
|
|
37
25
|
timeRange={range}
|
|
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
4
|
import { ToggleGroup, ToggleGroupItem } from '#uilib/components/ui/ToggleGroup';
|
|
5
|
+
import toggleGroupGuidance from '#uilib/docs/agent-guidance/toggle-group.md';
|
|
5
6
|
|
|
6
7
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
8
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
@@ -18,20 +19,7 @@ export default function ToggleGroupPage() {
|
|
|
18
19
|
subheader="Single-select group."
|
|
19
20
|
actions={<DocsHeaderActions />}
|
|
20
21
|
/>
|
|
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
|
-
/>
|
|
22
|
+
<DocsGuidance source={toggleGroupGuidance} />
|
|
35
23
|
<PageContentSection>
|
|
36
24
|
<ToggleGroup
|
|
37
25
|
type="single"
|