@sybilion/uilib 1.3.105 → 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/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/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/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 +2 -17
- 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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Sidebar provides the primitives for building application navigation rails: SidebarGroup, SidebarMenu, SidebarMenuItem, and SidebarMenuButton. Compose them to create grouped menus with active-state styling.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To build the primary navigation of an application shell.
|
|
6
|
+
- When menu items need consistent hover, focus, and active styling on a sidebar surface.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For in-page navigation such as tabs or table of contents; use PageTabs or links.
|
|
11
|
+
- For contextual action menus; use DropdownMenu.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Mark the current route’s item with isActive so users can orient themselves.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- While fetching data for content whose layout is known in advance, such as cards, lists, or text blocks.
|
|
6
|
+
- To reduce layout shift by holding the space the real content will occupy.
|
|
7
|
+
- When loading takes long enough that an empty area would feel broken.
|
|
8
|
+
|
|
9
|
+
## When not to use
|
|
10
|
+
|
|
11
|
+
- For very fast operations where the skeleton would only flash briefly.
|
|
12
|
+
- For indeterminate background work with no incoming content; use a spinner or progress indicator instead.
|
|
13
|
+
|
|
14
|
+
## Do
|
|
15
|
+
|
|
16
|
+
- Match skeleton shapes to the dimensions of the real content so the swap feels seamless.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To adjust a value within a known range, such as volume, opacity, or a threshold.
|
|
6
|
+
- When the approximate value matters more than a precise figure.
|
|
7
|
+
- For filtering by a numeric range where immediate feedback is useful.
|
|
8
|
+
|
|
9
|
+
## When not to use
|
|
10
|
+
|
|
11
|
+
- When users need to enter an exact value; use a number input instead.
|
|
12
|
+
- For ranges so large that fine control by dragging becomes impractical.
|
|
13
|
+
|
|
14
|
+
## Do
|
|
15
|
+
|
|
16
|
+
- Display the current value next to the slider so users can see the effect of their adjustment.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- For long identifiers, file names, or paths where the ending carries meaning.
|
|
6
|
+
- In narrow containers, such as table cells or sidebars, where strings of unpredictable length must fit on one line.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For prose or sentences; standard end truncation reads more naturally.
|
|
11
|
+
- When the full value must always be visible; let the text wrap instead.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Gaps and padding inside components and page sections.
|
|
6
|
+
- Vertical rhythm between sections, cards, and form fields.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- One-off pixel values that sit between steps; pick the nearest token instead.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To show the trend of a metric at a glance, such as price or activity over time.
|
|
6
|
+
- Inside dense layouts — table rows, KPI cards, or list items — where a full chart would not fit.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- When users need axes, labels, or precise values; use a full chart component instead.
|
|
11
|
+
- For comparing many series against each other; sparklines carry no scale.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Pair the sparkline with the current value or a delta so the trend has context.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- When building a new standalone Sybilion app that needs the standard workspace shell.
|
|
6
|
+
- As a reference for how AppShell, Sidebar, PageScroll, and SybilionAppHeader fit together.
|
|
7
|
+
- To verify scrolling, sidebar resizing, and header behaviour before wiring real routes.
|
|
8
|
+
|
|
9
|
+
## When not to use
|
|
10
|
+
|
|
11
|
+
- For individual pages inside an existing app; use PageHeader, PageContent, and PageContentSection instead.
|
|
12
|
+
- As a nested shell inside another AppShell; an app should have exactly one shell.
|
|
13
|
+
|
|
14
|
+
## Do
|
|
15
|
+
|
|
16
|
+
- Start from the app template rather than assembling the shell by hand, so auth and SDK wiring come for free.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- For full-page authentication flows, such as sign-in, sign-up, or password reset.
|
|
6
|
+
- When a standalone app needs consistent Sybilion branding on its auth screens.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For authenticated pages inside the app shell; use PageHeader and PageContent instead.
|
|
11
|
+
- For inline or modal sign-in prompts that should not take over the whole viewport.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- In standalone apps, copy the package logo to public/logo.svg so the hero column renders the correct branding.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To display structured records where users compare values across rows and columns.
|
|
6
|
+
- For datasets small enough to render directly without virtualisation.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For page or section layout; use the Page layout primitives or CSS grid instead.
|
|
11
|
+
- For large datasets that need sorting, filtering, or pagination; build on a data table abstraction.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Keep column headers short and use TableHead cells so the markup stays accessible.
|
|
16
|
+
- Use size=
|
|
17
|
+
- on Table when you need tighter row density.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To split a page or card into distinct views of related content, such as overview and details.
|
|
6
|
+
- When users switch between views often and switching should feel instant.
|
|
7
|
+
- For grouping settings or data categories that do not need to be visible at once.
|
|
8
|
+
|
|
9
|
+
## When not to use
|
|
10
|
+
|
|
11
|
+
- For sequential steps that must be completed in order; use a stepper or wizard instead.
|
|
12
|
+
- When users need to compare the contents of two panels side by side.
|
|
13
|
+
- For full-page navigation between routes; use PageTabs or links instead.
|
|
14
|
+
|
|
15
|
+
## Do
|
|
16
|
+
|
|
17
|
+
- Keep tab labels short and parallel in structure, ideally one or two words.
|
|
18
|
+
|
|
19
|
+
## Don't
|
|
20
|
+
|
|
21
|
+
- Don’t use more tabs than fit comfortably in the available width.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To indicate an in-progress operation with a descriptive label, such as “Generating…”.
|
|
6
|
+
- For streaming or AI-generated content where text appears gradually.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- As a placeholder for unknown content; use Skeleton instead.
|
|
11
|
+
- On static text that is not associated with a loading state, where the animation would mislead.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- For labels of unpredictable length in constrained spaces, such as table cells or list rows.
|
|
6
|
+
- When the full value should remain accessible on hover without widening the layout.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- When the full text is critical and must always be visible; let it wrap instead.
|
|
11
|
+
- For identifiers where the end of the string matters; consider SmartTextTruncate.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Use overTrigger to position the tooltip directly over the truncated text, which reads like the text expanding in place.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Above or beside a time series chart to let users change the visible window.
|
|
6
|
+
- When a small set of preset ranges covers the common cases.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- When users need arbitrary start and end dates; use a date range picker instead.
|
|
11
|
+
- For switching between categories or views unrelated to time; use Tabs or ToggleGroup.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Set loading while data for a new range fetches, so users cannot trigger overlapping requests.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To switch between a few mutually exclusive options, such as left, centre, and right alignment.
|
|
6
|
+
- For view switches, such as list versus grid, where the choice takes effect immediately.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For more than roughly five options; use a Select or RadioGroup instead.
|
|
11
|
+
- To switch panels of content; use Tabs instead.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- In single mode, ignore empty values from onValueChange so one option always stays selected.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- For tool options in editors and toolbars, such as bold or italic formatting.
|
|
6
|
+
- When a single independent option is switched on and off and the pressed state is the feedback.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For settings that take effect immediately in a settings list; use Switch instead.
|
|
11
|
+
- For mutually exclusive options; use ToggleGroup instead.
|
|
12
|
+
|
|
13
|
+
## Do
|
|
14
|
+
|
|
15
|
+
- Provide an aria-label when the toggle shows only an icon.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
The system pairs KMR Apparat for display and headings with Manrope for body copy. Sizes come from the --text-_ scale, display sizes from --text-display-_, and rhythm from the --lh-_ and --tracking-_ tokens. Set sizes through tokens rather than raw pixel values.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- The --text-\* scale for UI text, labels, and headings.
|
|
6
|
+
- The --text-display-\* sizes for hero and editorial moments only.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- Display sizes inside dense product UI; the largest heading there should be --text-3xl.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
VimeoEmbed renders a responsive Vimeo player from a video ID, handling the iframe markup and aspect ratio for you. Constrain its width with the surrounding container.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- To embed product videos, tutorials, or demos hosted on Vimeo.
|
|
6
|
+
- When a consistent, responsive player is needed without writing iframe markup by hand.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- For video hosted elsewhere or self-hosted files; use the appropriate player or a video element.
|
|
11
|
+
- For decorative background video, which needs autoplay and loop control beyond an embedded player.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
WorldMap renders a bundled SVG map of the world, intended as a backdrop for geographic visualisations such as DriverMap. It scales to its container and accepts a className for positioning.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- As the base layer for geographic overlays, such as markers or regional highlights.
|
|
6
|
+
- For decorative or contextual world imagery that should ship with the bundle rather than load from a network.
|
|
7
|
+
|
|
8
|
+
## When not to use
|
|
9
|
+
|
|
10
|
+
- When interactive map features such as zooming, panning, or tiles are needed; use a mapping library instead.
|
|
11
|
+
- For precise geographic data where projection accuracy matters.
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
.root
|
|
2
|
-
display
|
|
3
|
-
flex-direction column
|
|
4
|
-
gap var(--p-3)
|
|
2
|
+
display block
|
|
5
3
|
padding-top var(--p-1)
|
|
6
4
|
padding-bottom var(--p-10)
|
|
7
5
|
|
|
8
|
-
.
|
|
9
|
-
|
|
6
|
+
.markdown
|
|
7
|
+
display block
|
|
10
8
|
max-width 720px
|
|
11
9
|
line-height 1.6
|
|
12
10
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
:global(.interactive-content)
|
|
12
|
+
display block
|
|
13
|
+
|
|
14
|
+
:global(h2)
|
|
15
|
+
margin var(--p-4) 0 var(--p-2)
|
|
16
|
+
font-size var(--text-base)
|
|
17
|
+
font-weight 600
|
|
18
|
+
color var(--foreground)
|
|
19
|
+
|
|
20
|
+
&:first-child
|
|
21
|
+
margin-top 0
|
|
22
|
+
|
|
23
|
+
:global(ul)
|
|
24
|
+
margin 0 0 var(--p-3)
|
|
25
|
+
padding-left var(--p-5)
|
|
26
|
+
|
|
27
|
+
li + li
|
|
28
|
+
margin-top 2px
|
|
29
|
+
|
|
30
|
+
:global(p)
|
|
31
|
+
margin 0 0 var(--p-3)
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
&:last-child
|
|
34
|
+
margin-bottom 0
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
// This file is automatically generated.
|
|
2
2
|
// Please do not change this file!
|
|
3
3
|
interface CssExports {
|
|
4
|
-
'
|
|
5
|
-
'heading': string;
|
|
6
|
-
'list': string;
|
|
7
|
-
'overview': string;
|
|
4
|
+
'markdown': string;
|
|
8
5
|
'root': string;
|
|
9
6
|
}
|
|
10
7
|
export const cssExports: CssExports;
|
|
@@ -1,57 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { InteractiveContent } from '#uilib/components/ui/InteractiveContent';
|
|
3
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
3
|
|
|
4
|
+
import { stripAgentFrontmatter } from '../../agent-guidance/agent-md-utils';
|
|
5
5
|
import S from './DocsGuidance.styl';
|
|
6
6
|
|
|
7
7
|
export interface DocsGuidanceProps {
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
/** Bullet points describing situations where the component fits. */
|
|
11
|
-
whenToUse?: ReactNode[];
|
|
12
|
-
/** Bullet points describing situations where another pattern fits better. */
|
|
13
|
-
whenNotToUse?: ReactNode[];
|
|
14
|
-
/** Optional short "do" guidance notes. */
|
|
15
|
-
doNotes?: ReactNode[];
|
|
16
|
-
/** Optional short "don't" guidance notes. */
|
|
17
|
-
dontNotes?: ReactNode[];
|
|
8
|
+
/** Markdown from AGENT.md (frontmatter stripped at render). */
|
|
9
|
+
source: string;
|
|
18
10
|
}
|
|
19
11
|
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
items,
|
|
23
|
-
}: {
|
|
24
|
-
heading: string;
|
|
25
|
-
items?: ReactNode[];
|
|
26
|
-
}) {
|
|
27
|
-
if (!items?.length) return null;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className={S.block}>
|
|
31
|
-
<h4 className={S.heading}>{heading}</h4>
|
|
32
|
-
<ul className={S.list}>
|
|
33
|
-
{items.map((item, index) => (
|
|
34
|
-
<li key={index}>{item}</li>
|
|
35
|
-
))}
|
|
36
|
-
</ul>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
12
|
+
export function DocsGuidance({ source }: DocsGuidanceProps) {
|
|
13
|
+
const body = stripAgentFrontmatter(source);
|
|
40
14
|
|
|
41
|
-
export function DocsGuidance({
|
|
42
|
-
overview,
|
|
43
|
-
whenToUse,
|
|
44
|
-
whenNotToUse,
|
|
45
|
-
doNotes,
|
|
46
|
-
dontNotes,
|
|
47
|
-
}: DocsGuidanceProps) {
|
|
48
15
|
return (
|
|
49
16
|
<PageContentSection grow={false} className={S.root}>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<GuidanceList heading="Do" items={doNotes} />
|
|
54
|
-
<GuidanceList heading="Don't" items={dontNotes} />
|
|
17
|
+
<div className={S.markdown}>
|
|
18
|
+
<InteractiveContent text={body} variant="full" />
|
|
19
|
+
</div>
|
|
55
20
|
</PageContentSection>
|
|
56
21
|
);
|
|
57
22
|
}
|
|
@@ -83,7 +83,7 @@ export default (env, argv) => {
|
|
|
83
83
|
|
|
84
84
|
resolve: {
|
|
85
85
|
modules: [paths.src, paths.docs, 'node_modules'],
|
|
86
|
-
extensions: ['.js', '.ts', '.tsx', '.styl'],
|
|
86
|
+
extensions: ['.js', '.ts', '.tsx', '.styl', '.md'],
|
|
87
87
|
alias,
|
|
88
88
|
},
|
|
89
89
|
|
|
@@ -104,6 +104,11 @@ export default (env, argv) => {
|
|
|
104
104
|
),
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
|
+
{
|
|
108
|
+
test: /\.md$/,
|
|
109
|
+
include: [paths.src],
|
|
110
|
+
type: 'asset/source',
|
|
111
|
+
},
|
|
107
112
|
{
|
|
108
113
|
test: /\.css$/,
|
|
109
114
|
use: ['style-loader', 'css-loader'],
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
1
3
|
import { AnalysesSelector } from '#uilib/components/ui/AnalysesSelector';
|
|
4
|
+
import AnalysesSelectorGuidance from '#uilib/components/ui/AnalysesSelector/AGENT.md';
|
|
5
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
6
|
+
|
|
2
7
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
3
8
|
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
4
9
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
5
|
-
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
6
|
-
import { useState } from 'react';
|
|
7
10
|
|
|
8
11
|
const ITEMS = [
|
|
9
12
|
{ id: -1, label: 'Historical', color: 'var(--foreground)' },
|
|
@@ -36,21 +39,7 @@ export default function AnalysesSelectorPage() {
|
|
|
36
39
|
subheader="Multi-select analyses with inline or dropdown layout."
|
|
37
40
|
actions={<DocsHeaderActions />}
|
|
38
41
|
/>
|
|
39
|
-
<DocsGuidance
|
|
40
|
-
overview="AnalysesSelector lets users choose which analyses are shown alongside historical data, rendered as an inline row or a compact dropdown depending on available space. Each item carries a colour swatch and optional status so users can match selections to chart series."
|
|
41
|
-
whenToUse={[
|
|
42
|
-
'To toggle which analysis series are visible on a chart or comparison view.',
|
|
43
|
-
'When users need to compare several analyses against historical data at once.',
|
|
44
|
-
'When the selection should collapse into a dropdown in constrained layouts.',
|
|
45
|
-
]}
|
|
46
|
-
whenNotToUse={[
|
|
47
|
-
'To pick a single value from a generic list; use Select instead.',
|
|
48
|
-
'To filter tabular data by arbitrary fields; use dedicated filter controls.',
|
|
49
|
-
]}
|
|
50
|
-
doNotes={[
|
|
51
|
-
'Keep item colours in sync with the corresponding chart series so the mapping stays obvious.',
|
|
52
|
-
]}
|
|
53
|
-
/>
|
|
42
|
+
<DocsGuidance source={AnalysesSelectorGuidance} />
|
|
54
43
|
<PageContentSection style={{ maxWidth: 420 }}>
|
|
55
44
|
<AnalysesSelector
|
|
56
45
|
size="sm"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnalysisLineIcon } from '#uilib/components/ui/AnalysisLineIcon';
|
|
2
|
+
import AnalysisLineIconGuidance from '#uilib/components/ui/AnalysisLineIcon/AGENT.md';
|
|
2
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
@@ -14,17 +15,7 @@ export default function AnalysisLineIconPage() {
|
|
|
14
15
|
subheader="Solid and dashed line markers."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
17
|
-
<DocsGuidance
|
|
18
|
-
overview="AnalysisLineIcon renders a small solid or dashed line marker in a given colour. Use it as a legend swatch so users can match a label to its line on a chart."
|
|
19
|
-
whenToUse={[
|
|
20
|
-
'In chart legends, selectors, or tooltips to identify a series by colour and line style.',
|
|
21
|
-
'To distinguish historical series (solid) from forecast series (dashed).',
|
|
22
|
-
]}
|
|
23
|
-
whenNotToUse={[
|
|
24
|
-
'As a generic decorative icon; it only conveys meaning next to a chart.',
|
|
25
|
-
'To indicate status or severity; use Badge instead.',
|
|
26
|
-
]}
|
|
27
|
-
/>
|
|
18
|
+
<DocsGuidance source={AnalysisLineIconGuidance} />
|
|
28
19
|
<PageContentSection
|
|
29
20
|
style={{ flexDirection: 'row', gap: '1.5rem', alignItems: 'center' }}
|
|
30
21
|
>
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AvatarFallback,
|
|
4
4
|
AvatarImage,
|
|
5
5
|
} from '#uilib/components/ui/Avatar';
|
|
6
|
+
import AvatarGuidance from '#uilib/components/ui/Avatar/AGENT.md';
|
|
6
7
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
7
8
|
|
|
8
9
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
@@ -18,20 +19,7 @@ export default function AvatarPage() {
|
|
|
18
19
|
subheader="Image with fallback initials."
|
|
19
20
|
actions={<DocsHeaderActions />}
|
|
20
21
|
/>
|
|
21
|
-
<DocsGuidance
|
|
22
|
-
overview="Avatar displays a user or entity image with an automatic fallback to initials when the image is missing or fails to load. Compose it from AvatarImage and AvatarFallback."
|
|
23
|
-
whenToUse={[
|
|
24
|
-
'To represent a person or account in headers, lists, comments, or menus.',
|
|
25
|
-
'When an image may be unavailable and a textual fallback is acceptable.',
|
|
26
|
-
]}
|
|
27
|
-
whenNotToUse={[
|
|
28
|
-
'For arbitrary illustrative imagery; use a plain image instead.',
|
|
29
|
-
'To convey status on its own; pair it with a Badge or status indicator.',
|
|
30
|
-
]}
|
|
31
|
-
doNotes={[
|
|
32
|
-
'Always provide an AvatarFallback with one or two initials so the component degrades gracefully.',
|
|
33
|
-
]}
|
|
34
|
-
/>
|
|
22
|
+
<DocsGuidance source={AvatarGuidance} />
|
|
35
23
|
<PageContentSection
|
|
36
24
|
style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}
|
|
37
25
|
>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Badge } from '#uilib/components/ui/Badge';
|
|
2
|
+
import BadgeGuidance from '#uilib/components/ui/Badge/AGENT.md';
|
|
2
3
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
3
4
|
|
|
4
5
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
@@ -14,21 +15,7 @@ export default function BadgePage() {
|
|
|
14
15
|
subheader="Status and label badges."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
17
|
-
<DocsGuidance
|
|
18
|
-
overview="Badges are compact labels that highlight a status, category, or count. Choose a variant that matches the meaning: default or outline for neutral labels, red and green for negative and positive states."
|
|
19
|
-
whenToUse={[
|
|
20
|
-
'To show the status of an item, such as active, failed, or done.',
|
|
21
|
-
'To label or categorise content in lists, tables, and cards.',
|
|
22
|
-
'To surface short metadata next to a title.',
|
|
23
|
-
]}
|
|
24
|
-
whenNotToUse={[
|
|
25
|
-
'For interactive actions; badges are not clickable, use Button instead.',
|
|
26
|
-
'For long descriptive text; keep badge labels to one or two words.',
|
|
27
|
-
]}
|
|
28
|
-
doNotes={[
|
|
29
|
-
'Use colour variants consistently so a given colour always carries the same meaning across the product.',
|
|
30
|
-
]}
|
|
31
|
-
/>
|
|
18
|
+
<DocsGuidance source={BadgeGuidance} />
|
|
32
19
|
<PageContentSection
|
|
33
20
|
style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}
|
|
34
21
|
>
|
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
BarChartSeries,
|
|
4
4
|
} from '#uilib/components/ui/BarChart';
|
|
5
5
|
import { BarChart } from '#uilib/components/ui/BarChart';
|
|
6
|
+
import BarChartGuidance from '#uilib/components/ui/BarChart/AGENT.md';
|
|
6
7
|
import { PageContentSection, SectionHeader } from '#uilib/components/ui/Page';
|
|
7
8
|
|
|
8
9
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
@@ -46,21 +47,7 @@ export default function BarChartPage() {
|
|
|
46
47
|
subheader="Categorical bar chart with grouped and stacked modes."
|
|
47
48
|
actions={<DocsHeaderActions />}
|
|
48
49
|
/>
|
|
49
|
-
<DocsGuidance
|
|
50
|
-
overview="BarChart compares values across categories. Provide rows of data, a category key, and a list of series; choose vertical or horizontal orientation and grouped or stacked mode. Grid, axes, tooltip, and legend follow the shared chart styling."
|
|
51
|
-
whenToUse={[
|
|
52
|
-
'To compare discrete categories such as regions, models, or scenarios.',
|
|
53
|
-
'Stacked mode when the per-category total matters as much as the breakdown.',
|
|
54
|
-
'Horizontal orientation when category labels are long or there are many categories.',
|
|
55
|
-
]}
|
|
56
|
-
whenNotToUse={[
|
|
57
|
-
'For continuous time series; use ChartAreaInteractive or a line chart instead.',
|
|
58
|
-
'For part-to-whole of a single total; use DonutChart.',
|
|
59
|
-
]}
|
|
60
|
-
doNotes={[
|
|
61
|
-
'Start the value axis at zero so bar lengths stay proportional.',
|
|
62
|
-
]}
|
|
63
|
-
/>
|
|
50
|
+
<DocsGuidance source={BarChartGuidance} />
|
|
64
51
|
<PageContentSection>
|
|
65
52
|
<SectionHeader
|
|
66
53
|
title="Grouped"
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
BreadcrumbPage as BreadcrumbPageCrumb,
|
|
7
7
|
BreadcrumbSeparator,
|
|
8
8
|
} from '#uilib/components/ui/Breadcrumb';
|
|
9
|
+
import BreadcrumbGuidance from '#uilib/components/ui/Breadcrumb/AGENT.md';
|
|
9
10
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
10
11
|
|
|
11
12
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
@@ -21,20 +22,7 @@ export default function BreadcrumbPage() {
|
|
|
21
22
|
subheader="Inline navigation trail."
|
|
22
23
|
actions={<DocsHeaderActions />}
|
|
23
24
|
/>
|
|
24
|
-
<DocsGuidance
|
|
25
|
-
overview="Breadcrumb shows the user’s location within the page hierarchy as an inline trail of links, with the current page rendered as plain text. Compose it from BreadcrumbList, BreadcrumbItem, BreadcrumbLink, and BreadcrumbSeparator."
|
|
26
|
-
whenToUse={[
|
|
27
|
-
'On pages nested two or more levels deep, so users can move back up the hierarchy.',
|
|
28
|
-
'When users arrive deep in the product from search or a direct link and need orientation.',
|
|
29
|
-
]}
|
|
30
|
-
whenNotToUse={[
|
|
31
|
-
'On top-level pages with no parent; a trail with one item adds noise.',
|
|
32
|
-
'As a substitute for primary navigation or a stepper in a multi-step flow.',
|
|
33
|
-
]}
|
|
34
|
-
doNotes={[
|
|
35
|
-
'Render the current page with BreadcrumbPage rather than a link so it is not clickable.',
|
|
36
|
-
]}
|
|
37
|
-
/>
|
|
25
|
+
<DocsGuidance source={BreadcrumbGuidance} />
|
|
38
26
|
<PageContentSection>
|
|
39
27
|
<Breadcrumb>
|
|
40
28
|
<BreadcrumbList>
|