@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
|
@@ -2,6 +2,7 @@ import { LabelWithId } from '#uilib/components/ui/LabelWithId';
|
|
|
2
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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 LabelWithIdPage() {
|
|
@@ -13,6 +14,16 @@ export default function LabelWithIdPage() {
|
|
|
13
14
|
subheader="Label with stable id for anchors."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
17
|
+
<DocsGuidance
|
|
18
|
+
overview="LabelWithId renders a text label preceded by a small numeric id badge, giving entities such as analyses a stable, scannable reference. Passing an id of -1 hides the badge and shows the label alone."
|
|
19
|
+
whenToUse={[
|
|
20
|
+
'To display entities that users reference by number, such as analyses or saved items.',
|
|
21
|
+
'In lists, selectors, or breadcrumbs where the id helps users match items across views.',
|
|
22
|
+
]}
|
|
23
|
+
whenNotToUse={[
|
|
24
|
+
'For plain text that has no meaningful numeric identifier; use ordinary text or Label.',
|
|
25
|
+
]}
|
|
26
|
+
/>
|
|
16
27
|
<PageContentSection>
|
|
17
28
|
<LabelWithId id={42} label="Analysis label" />
|
|
18
29
|
</PageContentSection>
|
|
@@ -4,6 +4,7 @@ import { LabeledInput } from '#uilib/components/ui/LabeledInput/LabeledInput';
|
|
|
4
4
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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 LabeledInputPage() {
|
|
@@ -17,6 +18,17 @@ export default function LabeledInputPage() {
|
|
|
17
18
|
subheader="Label + input row."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
21
|
+
<DocsGuidance
|
|
22
|
+
overview="LabeledInput combines a Label and an Input into a single row, wiring the label to the field automatically via the id you provide. It accepts the usual input props such as name, value, onChange, and placeholder."
|
|
23
|
+
whenToUse={[
|
|
24
|
+
'For standard form fields where every input needs a visible, associated label.',
|
|
25
|
+
'To keep label and input markup consistent across forms without repeating the wiring.',
|
|
26
|
+
]}
|
|
27
|
+
whenNotToUse={[
|
|
28
|
+
'When the field needs a custom layout, helper text, or validation message; compose Label and Input directly.',
|
|
29
|
+
'For non-text controls such as switches or selects, which have their own labelling patterns.',
|
|
30
|
+
]}
|
|
31
|
+
/>
|
|
20
32
|
<PageContentSection>
|
|
21
33
|
<LabeledInput
|
|
22
34
|
id="labeled-docs"
|
|
@@ -2,6 +2,7 @@ import { LegacyPlatformLink } from '#uilib/components/ui/LegacyPlatformLink';
|
|
|
2
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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 LegacyPlatformLinkPage() {
|
|
@@ -13,6 +14,20 @@ export default function LegacyPlatformLinkPage() {
|
|
|
13
14
|
subheader="Link styled for legacy platform navigation."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
17
|
+
<DocsGuidance
|
|
18
|
+
overview="LegacyPlatformLink is an anchor that points at the legacy platform, building the destination from the API domain plus the redirectPath you supply. It renders as a styled link and accepts standard anchor props."
|
|
19
|
+
whenToUse={[
|
|
20
|
+
'To send users to a screen that still lives on the legacy platform, such as older dashboards.',
|
|
21
|
+
'During migration, where some destinations exist only in the legacy product.',
|
|
22
|
+
]}
|
|
23
|
+
whenNotToUse={[
|
|
24
|
+
'For navigation within the current app; use the router link components instead.',
|
|
25
|
+
'Once the destination has been migrated; replace the legacy link with an in-app route.',
|
|
26
|
+
]}
|
|
27
|
+
doNotes={[
|
|
28
|
+
'Pass only the path portion in redirectPath, such as /v1/dashboard; the domain is added for you.',
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
16
31
|
<PageContentSection>
|
|
17
32
|
<LegacyPlatformLink redirectPath="/v1/dashboard">
|
|
18
33
|
Legacy platform link
|
|
@@ -8,6 +8,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
8
8
|
import { useTheme } from '#uilib/contexts/theme-context';
|
|
9
9
|
|
|
10
10
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
11
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
11
12
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
12
13
|
import S from './LightweightChartPage.styl';
|
|
13
14
|
|
|
@@ -122,6 +123,22 @@ export default function LightweightChartPage() {
|
|
|
122
123
|
}
|
|
123
124
|
actions={<DocsHeaderActions />}
|
|
124
125
|
/>
|
|
126
|
+
<DocsGuidance
|
|
127
|
+
overview="LightweightForecastChart renders historical and forecast time series using TradingView Lightweight Charts, with optional quantile fill bands, a tooltip, and a legend. It applies the shared ensureChartForecastBridge preprocessing so forecast lines connect smoothly to the last historical point."
|
|
128
|
+
whenToUse={[
|
|
129
|
+
'To plot a historical series alongside one or more forecast lines on a canvas-rendered chart.',
|
|
130
|
+
'To show forecast uncertainty as stacked quantile bands, such as P10–P90 and P25–P75.',
|
|
131
|
+
'When rendering performance matters more than the richer interactions of ChartAreaInteractive.',
|
|
132
|
+
]}
|
|
133
|
+
whenNotToUse={[
|
|
134
|
+
'When you need the full overlay, selection, and interaction features of ChartAreaInteractive.',
|
|
135
|
+
'For categorical or non-time-series data; use a different chart type instead.',
|
|
136
|
+
]}
|
|
137
|
+
doNotes={[
|
|
138
|
+
'Pass raw forecast anchor rows; the chart applies the bridge preprocessing internally.',
|
|
139
|
+
'Set isDarkTheme from the active theme so colours match the surrounding page.',
|
|
140
|
+
]}
|
|
141
|
+
/>
|
|
125
142
|
<PageContentSection>
|
|
126
143
|
<div className={S.stack}>
|
|
127
144
|
<div>
|
|
@@ -2,6 +2,7 @@ import { Logo } from '#uilib/components/ui/Logo';
|
|
|
2
2
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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 LogoPage() {
|
|
@@ -13,6 +14,20 @@ export default function LogoPage() {
|
|
|
13
14
|
subheader="Brand mark with optional wordmark."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
17
|
+
<DocsGuidance
|
|
18
|
+
overview="Logo renders the brand mark with an optional wordmark. Choose a size that fits the surrounding chrome and hide the text with showText={false} where space is tight."
|
|
19
|
+
whenToUse={[
|
|
20
|
+
'In application chrome such as the sidebar header, top navigation, or sign-in screens.',
|
|
21
|
+
'Anywhere the product brand needs consistent, pre-sized rendering.',
|
|
22
|
+
]}
|
|
23
|
+
whenNotToUse={[
|
|
24
|
+
'For decorative imagery or illustrations; the logo is reserved for brand identity.',
|
|
25
|
+
'When you need arbitrary sizing; stick to the provided size presets for consistency.',
|
|
26
|
+
]}
|
|
27
|
+
doNotes={[
|
|
28
|
+
'Use showText={false} in collapsed or icon-only contexts such as a rail sidebar.',
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
16
31
|
<PageContentSection
|
|
17
32
|
style={{ display: 'flex', gap: '1.5rem', alignItems: 'center' }}
|
|
18
33
|
>
|
|
@@ -4,6 +4,7 @@ import { MobileAdaptiveSelector } from '#uilib/components/ui/MobileAdaptiveSelec
|
|
|
4
4
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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
|
const ITEMS = [
|
|
@@ -23,6 +24,20 @@ export default function MobileAdaptiveSelectorPage() {
|
|
|
23
24
|
subheader="Toggle group on desktop, select on mobile (or many items)."
|
|
24
25
|
actions={<DocsHeaderActions />}
|
|
25
26
|
/>
|
|
27
|
+
<DocsGuidance
|
|
28
|
+
overview="MobileAdaptiveSelector presents a single-choice control that renders as a toggle group on desktop and switches to a select dropdown on mobile, or whenever the item list is too long for a row of toggles. It keeps one value and onChange contract across both presentations."
|
|
29
|
+
whenToUse={[
|
|
30
|
+
'To switch between a small set of mutually exclusive options that must stay usable on narrow viewports.',
|
|
31
|
+
'For view or mode switchers, such as grouping or time-range pickers, that appear in responsive layouts.',
|
|
32
|
+
]}
|
|
33
|
+
whenNotToUse={[
|
|
34
|
+
'For multi-select choices; use a checkbox group or multi-select instead.',
|
|
35
|
+
'When the presentation must stay fixed across breakpoints; use ToggleGroup or Select directly.',
|
|
36
|
+
]}
|
|
37
|
+
doNotes={[
|
|
38
|
+
'Keep labels short so the desktop toggle row does not overflow.',
|
|
39
|
+
]}
|
|
40
|
+
/>
|
|
26
41
|
<PageContentSection>
|
|
27
42
|
<MobileAdaptiveSelector
|
|
28
43
|
value={value}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.tokenList
|
|
2
|
+
display flex
|
|
3
|
+
flex-direction column
|
|
4
|
+
gap var(--p-2)
|
|
5
|
+
margin-bottom var(--p-6)
|
|
6
|
+
|
|
7
|
+
.tokenRow
|
|
8
|
+
display flex
|
|
9
|
+
gap var(--p-4)
|
|
10
|
+
align-items baseline
|
|
11
|
+
|
|
12
|
+
.token
|
|
13
|
+
font-family monospace
|
|
14
|
+
font-size var(--text-xs)
|
|
15
|
+
color var(--muted-foreground)
|
|
16
|
+
min-width 160px
|
|
17
|
+
user-select text
|
|
18
|
+
|
|
19
|
+
.value
|
|
20
|
+
font-size var(--text-xs)
|
|
21
|
+
color var(--foreground)
|
|
22
|
+
user-select text
|
|
23
|
+
|
|
24
|
+
.tokenPicker
|
|
25
|
+
margin-top var(--p-4)
|
|
26
|
+
margin-bottom var(--p-4)
|
|
27
|
+
|
|
28
|
+
.demoSummary
|
|
29
|
+
font-family monospace
|
|
30
|
+
font-size var(--text-xs)
|
|
31
|
+
color var(--muted-foreground)
|
|
32
|
+
margin-bottom var(--p-3)
|
|
33
|
+
|
|
34
|
+
.track
|
|
35
|
+
position relative
|
|
36
|
+
width 320px
|
|
37
|
+
flex none
|
|
38
|
+
height 24px
|
|
39
|
+
border 1px solid var(--border)
|
|
40
|
+
border-radius var(--radius-pill)
|
|
41
|
+
background var(--muted)
|
|
42
|
+
|
|
43
|
+
.dot
|
|
44
|
+
position absolute
|
|
45
|
+
top 3px
|
|
46
|
+
left 3px
|
|
47
|
+
width 16px
|
|
48
|
+
height 16px
|
|
49
|
+
border-radius var(--radius-pill)
|
|
50
|
+
background var(--brand-color)
|
|
51
|
+
|
|
52
|
+
.dotEnd
|
|
53
|
+
transform translateX(280px)
|
|
54
|
+
|
|
55
|
+
.hoverCard
|
|
56
|
+
display inline-flex
|
|
57
|
+
align-items center
|
|
58
|
+
justify-content center
|
|
59
|
+
padding var(--p-3) var(--p-5)
|
|
60
|
+
border 1px solid var(--border)
|
|
61
|
+
border-radius var(--radius-card)
|
|
62
|
+
background var(--background)
|
|
63
|
+
transition box-shadow var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard)
|
|
64
|
+
|
|
65
|
+
&:hover
|
|
66
|
+
box-shadow var(--shadow-2)
|
|
67
|
+
transform translateY(-2px)
|
|
68
|
+
|
|
69
|
+
.sectionNote
|
|
70
|
+
margin-bottom var(--p-3)
|
|
71
|
+
color var(--muted-foreground)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file is automatically generated.
|
|
2
|
+
// Please do not change this file!
|
|
3
|
+
interface CssExports {
|
|
4
|
+
'demoSummary': string;
|
|
5
|
+
'dot': string;
|
|
6
|
+
'dotEnd': string;
|
|
7
|
+
'hoverCard': string;
|
|
8
|
+
'sectionNote': string;
|
|
9
|
+
'token': string;
|
|
10
|
+
'tokenList': string;
|
|
11
|
+
'tokenPicker': string;
|
|
12
|
+
'tokenRow': string;
|
|
13
|
+
'track': string;
|
|
14
|
+
'value': string;
|
|
15
|
+
}
|
|
16
|
+
export const cssExports: CssExports;
|
|
17
|
+
export default cssExports;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
|
+
import { Tabs, TabsList, TabsTrigger } from '#uilib/components/ui/Tabs';
|
|
5
|
+
import { ToggleGroup, ToggleGroupItem } from '#uilib/components/ui/ToggleGroup';
|
|
6
|
+
|
|
7
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
8
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
9
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
10
|
+
import S from './MotionPage.styl';
|
|
11
|
+
|
|
12
|
+
const TOKENS = [
|
|
13
|
+
{ token: '--ease-standard', value: 'cubic-bezier(0.2, 0.6, 0.2, 1)' },
|
|
14
|
+
{ token: '--ease-exit', value: 'cubic-bezier(0.4, 0, 1, 1)' },
|
|
15
|
+
{ token: '--dur-fast', value: '120ms' },
|
|
16
|
+
{ token: '--dur-base', value: '200ms' },
|
|
17
|
+
{ token: '--dur-slow', value: '400ms' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
type DemoTab = 'dur' | 'ease';
|
|
21
|
+
|
|
22
|
+
type EaseToken = '--ease-standard' | '--ease-exit';
|
|
23
|
+
type DurationToken = '--dur-fast' | '--dur-base' | '--dur-slow';
|
|
24
|
+
|
|
25
|
+
const EASES: EaseToken[] = ['--ease-standard', '--ease-exit'];
|
|
26
|
+
const DURATIONS: DurationToken[] = ['--dur-fast', '--dur-base', '--dur-slow'];
|
|
27
|
+
|
|
28
|
+
function isDemoTab(value: string): value is DemoTab {
|
|
29
|
+
return value === 'dur' || value === 'ease';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function isEaseToken(value: string): value is EaseToken {
|
|
33
|
+
return value === '--ease-standard' || value === '--ease-exit';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isDurationToken(value: string): value is DurationToken {
|
|
37
|
+
return (
|
|
38
|
+
value === '--dur-fast' || value === '--dur-base' || value === '--dur-slow'
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function AnimatedDot({
|
|
43
|
+
duration,
|
|
44
|
+
easing,
|
|
45
|
+
}: {
|
|
46
|
+
duration: DurationToken;
|
|
47
|
+
easing: EaseToken;
|
|
48
|
+
}) {
|
|
49
|
+
const [atEnd, setAtEnd] = useState(false);
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
let frame2 = 0;
|
|
53
|
+
const frame1 = window.requestAnimationFrame(() => {
|
|
54
|
+
frame2 = window.requestAnimationFrame(() => setAtEnd(true));
|
|
55
|
+
});
|
|
56
|
+
return () => {
|
|
57
|
+
window.cancelAnimationFrame(frame1);
|
|
58
|
+
window.cancelAnimationFrame(frame2);
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div
|
|
64
|
+
className={atEnd ? `${S.dot} ${S.dotEnd}` : S.dot}
|
|
65
|
+
style={{
|
|
66
|
+
transition: `transform var(${duration}) var(${easing})`,
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default function MotionPage() {
|
|
73
|
+
const [demoTab, setDemoTab] = useState<DemoTab>('dur');
|
|
74
|
+
const [selectedEase, setSelectedEase] =
|
|
75
|
+
useState<EaseToken>('--ease-standard');
|
|
76
|
+
const [selectedDuration, setSelectedDuration] =
|
|
77
|
+
useState<DurationToken>('--dur-base');
|
|
78
|
+
const [replayKey, setReplayKey] = useState(0);
|
|
79
|
+
const skipReplayRef = useRef(true);
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (skipReplayRef.current) {
|
|
83
|
+
skipReplayRef.current = false;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setReplayKey(key => key + 1);
|
|
87
|
+
}, [demoTab, selectedEase, selectedDuration]);
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<>
|
|
91
|
+
<AppPageHeader
|
|
92
|
+
breadcrumbs={[{ label: 'Motion' }]}
|
|
93
|
+
title="Motion"
|
|
94
|
+
subheader="Easing curves and duration tokens for transitions."
|
|
95
|
+
actions={<DocsHeaderActions />}
|
|
96
|
+
/>
|
|
97
|
+
<DocsGuidance
|
|
98
|
+
overview="Motion is quick and purposeful. Use --ease-standard for elements entering or changing state, --ease-exit for elements leaving, and pick the shortest duration that still reads: --dur-fast for hovers and toggles, --dur-base for most transitions, --dur-slow for larger surfaces."
|
|
99
|
+
whenToUse={[
|
|
100
|
+
'Hover, focus, and state-change transitions on interactive controls.',
|
|
101
|
+
'Entering and leaving surfaces such as popovers, sheets, and dialogs.',
|
|
102
|
+
]}
|
|
103
|
+
whenNotToUse={[
|
|
104
|
+
'Decorative or looping animation that does not communicate a state change.',
|
|
105
|
+
]}
|
|
106
|
+
/>
|
|
107
|
+
<PageContentSection>
|
|
108
|
+
<h3>Tokens</h3>
|
|
109
|
+
<div className={S.tokenList}>
|
|
110
|
+
{TOKENS.map(({ token, value }) => (
|
|
111
|
+
<div key={token} className={S.tokenRow}>
|
|
112
|
+
<span className={S.token}>{token}</span>
|
|
113
|
+
<span className={S.value}>{value}</span>
|
|
114
|
+
</div>
|
|
115
|
+
))}
|
|
116
|
+
</div>
|
|
117
|
+
</PageContentSection>
|
|
118
|
+
<PageContentSection>
|
|
119
|
+
<h3>Transition demo</h3>
|
|
120
|
+
<Tabs
|
|
121
|
+
variant="button"
|
|
122
|
+
value={demoTab}
|
|
123
|
+
onValueChange={value => {
|
|
124
|
+
if (isDemoTab(value)) setDemoTab(value);
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
<TabsList>
|
|
128
|
+
<TabsTrigger value="dur">Duration</TabsTrigger>
|
|
129
|
+
<TabsTrigger value="ease">Easing</TabsTrigger>
|
|
130
|
+
</TabsList>
|
|
131
|
+
</Tabs>
|
|
132
|
+
<div className={S.tokenPicker}>
|
|
133
|
+
{demoTab === 'dur' ? (
|
|
134
|
+
<ToggleGroup
|
|
135
|
+
type="single"
|
|
136
|
+
value={selectedDuration}
|
|
137
|
+
onValueChange={value => {
|
|
138
|
+
if (isDurationToken(value)) setSelectedDuration(value);
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
{DURATIONS.map(token => (
|
|
142
|
+
<ToggleGroupItem key={token} value={token}>
|
|
143
|
+
{token}
|
|
144
|
+
</ToggleGroupItem>
|
|
145
|
+
))}
|
|
146
|
+
</ToggleGroup>
|
|
147
|
+
) : (
|
|
148
|
+
<ToggleGroup
|
|
149
|
+
type="single"
|
|
150
|
+
value={selectedEase}
|
|
151
|
+
onValueChange={value => {
|
|
152
|
+
if (isEaseToken(value)) setSelectedEase(value);
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
{EASES.map(token => (
|
|
156
|
+
<ToggleGroupItem key={token} value={token}>
|
|
157
|
+
{token}
|
|
158
|
+
</ToggleGroupItem>
|
|
159
|
+
))}
|
|
160
|
+
</ToggleGroup>
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
<p className={S.demoSummary}>
|
|
164
|
+
{selectedEase} · {selectedDuration}
|
|
165
|
+
</p>
|
|
166
|
+
<div className={S.track}>
|
|
167
|
+
<AnimatedDot
|
|
168
|
+
key={replayKey}
|
|
169
|
+
duration={selectedDuration}
|
|
170
|
+
easing={selectedEase}
|
|
171
|
+
/>
|
|
172
|
+
</div>
|
|
173
|
+
</PageContentSection>
|
|
174
|
+
</>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
@@ -4,6 +4,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
4
4
|
import { GearSixIcon, UserCircleIcon } from '@phosphor-icons/react';
|
|
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 NavUserHeaderPage() {
|
|
@@ -28,6 +29,20 @@ export default function NavUserHeaderPage() {
|
|
|
28
29
|
subheader="User menu with label, custom rows, theme toggle (docs ThemeProvider), and logout."
|
|
29
30
|
actions={<DocsHeaderActions />}
|
|
30
31
|
/>
|
|
32
|
+
<DocsGuidance
|
|
33
|
+
overview="NavUserHeader shows the signed-in user with their name, email, and avatar, and opens a dropdown menu containing custom rows, a theme toggle, and a logout action. Use the compact variant where horizontal space is limited."
|
|
34
|
+
whenToUse={[
|
|
35
|
+
'In application chrome, such as a sidebar footer or top bar, to expose account-level actions.',
|
|
36
|
+
'When the user needs quick access to profile, settings, theme, and logout from one place.',
|
|
37
|
+
]}
|
|
38
|
+
whenNotToUse={[
|
|
39
|
+
'For general-purpose menus not tied to the signed-in user; use DropdownMenu directly.',
|
|
40
|
+
'On unauthenticated screens where there is no user to display.',
|
|
41
|
+
]}
|
|
42
|
+
doNotes={[
|
|
43
|
+
'Pass bespoke rows through menuItems rather than recreating the trigger and menu yourself.',
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
31
46
|
<PageContentSection
|
|
32
47
|
style={{ display: 'flex', flexWrap: 'wrap', gap: '2rem' }}
|
|
33
48
|
>
|
|
@@ -4,6 +4,7 @@ import { NumberControl } from '#uilib/components/ui/NumberControl';
|
|
|
4
4
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
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 NumberControlPage() {
|
|
@@ -17,6 +18,20 @@ export default function NumberControlPage() {
|
|
|
17
18
|
subheader="Stepper with minus / plus."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
21
|
+
<DocsGuidance
|
|
22
|
+
overview="NumberControl is a numeric stepper with minus and plus buttons for adjusting a value within a bounded range. Configure min, max, and step to control the allowed values."
|
|
23
|
+
whenToUse={[
|
|
24
|
+
'To adjust a numeric value in small, predictable increments, such as a quantity or threshold.',
|
|
25
|
+
'When the valid range is narrow and stepping is faster than typing.',
|
|
26
|
+
]}
|
|
27
|
+
whenNotToUse={[
|
|
28
|
+
'For values with a wide range or many decimal places; use a plain number input instead.',
|
|
29
|
+
'For picking one of a few discrete options; use Select or ToggleGroup.',
|
|
30
|
+
]}
|
|
31
|
+
doNotes={[
|
|
32
|
+
'Always set min and max so the control cannot step out of the valid range.',
|
|
33
|
+
]}
|
|
34
|
+
/>
|
|
20
35
|
<PageContentSection>
|
|
21
36
|
<NumberControl value={v} onChange={setV} min={0} max={10} step={0.5} />
|
|
22
37
|
</PageContentSection>
|
|
@@ -3,6 +3,7 @@ import type { CSSProperties } from 'react';
|
|
|
3
3
|
import { PageColumns, PageContentSection } from '#uilib/components/ui/Page';
|
|
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
|
const demoBlockStyle: CSSProperties = {
|
|
@@ -26,6 +27,20 @@ export default function PageColumnsPage() {
|
|
|
26
27
|
subheader="Responsive row of columns; fill prop controls which column(s) grow past the default width cap on wide viewports."
|
|
27
28
|
actions={<DocsHeaderActions />}
|
|
28
29
|
/>
|
|
30
|
+
<DocsGuidance
|
|
31
|
+
overview="PageColumns lays out a responsive row of columns inside a page section. The fill prop controls which columns grow past the default width cap on wide viewports: all, left, or right."
|
|
32
|
+
whenToUse={[
|
|
33
|
+
'To place two or more content blocks side by side within a PageContentSection.',
|
|
34
|
+
'For main-plus-aside layouts where one column should grow and the other stays at a fixed width.',
|
|
35
|
+
]}
|
|
36
|
+
whenNotToUse={[
|
|
37
|
+
'For card or tile grids; use GridLayout instead.',
|
|
38
|
+
'For arbitrary flex layouts inside a component; PageColumns is a page-structure primitive.',
|
|
39
|
+
]}
|
|
40
|
+
doNotes={[
|
|
41
|
+
'Use fill="left" or fill="right" to keep a sidebar column at the default fixed width on wide screens.',
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
29
44
|
<PageContentSection
|
|
30
45
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
31
46
|
>
|
|
@@ -11,6 +11,7 @@ import { Switch } from '#uilib/components/ui/Switch';
|
|
|
11
11
|
import { GlobeIcon, Hash, MailIcon, MessageCircle } from 'lucide-react';
|
|
12
12
|
|
|
13
13
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
14
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
14
15
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
15
16
|
import S from './PageFooterPage.styl';
|
|
16
17
|
|
|
@@ -68,6 +69,20 @@ export default function PageFooterPage() {
|
|
|
68
69
|
subheader="Copyright + optional link row with gap and wrapping."
|
|
69
70
|
actions={<DocsHeaderActions />}
|
|
70
71
|
/>
|
|
72
|
+
<DocsGuidance
|
|
73
|
+
overview="PageFooter renders the page-level footer with copyright, a version label, and an optional row of links that wrap on narrow viewports. Links accept an icon and label and open external destinations."
|
|
74
|
+
whenToUse={[
|
|
75
|
+
'At the bottom of an application shell to show copyright, version, and support links.',
|
|
76
|
+
'When you need a consistent set of external links, such as website, email, or community channels.',
|
|
77
|
+
]}
|
|
78
|
+
whenNotToUse={[
|
|
79
|
+
'For page actions or navigation within the app; keep those in the header or sidebar.',
|
|
80
|
+
'Inside individual sections or cards; the footer belongs to the page shell.',
|
|
81
|
+
]}
|
|
82
|
+
doNotes={[
|
|
83
|
+
'Keep the link list short so it remains scannable when it wraps on mobile.',
|
|
84
|
+
]}
|
|
85
|
+
/>
|
|
71
86
|
<PageContent>
|
|
72
87
|
<PageContentSection title="With links prop">
|
|
73
88
|
<div
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PageContent, PageContentSection } from '#uilib/components/ui/Page';
|
|
2
2
|
|
|
3
3
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
4
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
4
5
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
5
6
|
|
|
6
7
|
export default function PagePage() {
|
|
@@ -12,6 +13,20 @@ export default function PagePage() {
|
|
|
12
13
|
subheader="PageContent and PageContentSection layout helpers."
|
|
13
14
|
actions={<DocsHeaderActions />}
|
|
14
15
|
/>
|
|
16
|
+
<DocsGuidance
|
|
17
|
+
overview="PageContent and PageContentSection are the structural building blocks of a page body. PageContent wraps the whole body and applies the page width cap, while each PageContentSection forms a vertical section that owns the horizontal page padding."
|
|
18
|
+
whenToUse={[
|
|
19
|
+
'On every authenticated page, directly below the page header, to structure the body.',
|
|
20
|
+
'To split a page into vertical sections with consistent spacing and padding.',
|
|
21
|
+
]}
|
|
22
|
+
whenNotToUse={[
|
|
23
|
+
'Inside cards or other components; sections are page-level structure, not generic containers.',
|
|
24
|
+
'Nested within another PageContentSection.',
|
|
25
|
+
]}
|
|
26
|
+
doNotes={[
|
|
27
|
+
'Place all body content inside at least one PageContentSection so page padding stays consistent.',
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
15
30
|
<PageContent>
|
|
16
31
|
<PageContentSection>
|
|
17
32
|
<p style={{ margin: 0 }}>First section content.</p>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PageContentSection, PageTabs } from '#uilib/components/ui/Page';
|
|
2
2
|
|
|
3
3
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
4
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
4
5
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
5
6
|
|
|
6
7
|
const OUTLINE_ITEMS = [
|
|
@@ -33,6 +34,23 @@ export default function PageTabsPage() {
|
|
|
33
34
|
subheader="Page-scoped tabs with horizontally scrollable tab strip."
|
|
34
35
|
actions={<DocsHeaderActions />}
|
|
35
36
|
/>
|
|
37
|
+
<DocsGuidance
|
|
38
|
+
overview="PageTabs renders a page-scoped tab bar with optional panels. The tab strip scrolls horizontally when triggers overflow the container, and an outline variant is available for muted surfaces."
|
|
39
|
+
whenToUse={[
|
|
40
|
+
'To divide a page into a few parallel views that share the same context.',
|
|
41
|
+
'When the tab row may overflow on narrow viewports and needs built-in horizontal scrolling.',
|
|
42
|
+
]}
|
|
43
|
+
whenNotToUse={[
|
|
44
|
+
'Inside a PageContentSection; PageTabs is a page-structure primitive and must sit alongside sections.',
|
|
45
|
+
'For sequential steps in a flow; use a wizard or stepper pattern instead.',
|
|
46
|
+
]}
|
|
47
|
+
doNotes={[
|
|
48
|
+
'Wrap each tab’s content in its own PageContentSection so padding stays consistent.',
|
|
49
|
+
]}
|
|
50
|
+
dontNotes={[
|
|
51
|
+
'Don’t nest PageTabs inside another PageTabs or a PageContentSection.',
|
|
52
|
+
]}
|
|
53
|
+
/>
|
|
36
54
|
<PageContentSection
|
|
37
55
|
style={{ display: 'flex', flexDirection: 'column', gap: '1.5rem' }}
|
|
38
56
|
>
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { useTheme } from '#uilib/contexts/theme-context';
|
|
12
12
|
|
|
13
13
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
14
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
14
15
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
15
16
|
|
|
16
17
|
function monthKey(year: number, month: number): string {
|
|
@@ -131,6 +132,20 @@ export default function PerformanceChartPage() {
|
|
|
131
132
|
subheader="Per-horizon and spaghetti performance plots with linked metrics table."
|
|
132
133
|
actions={<DocsHeaderActions />}
|
|
133
134
|
/>
|
|
135
|
+
<DocsGuidance
|
|
136
|
+
overview="PerformanceChart is a widget for evaluating forecast accuracy. It plots per-horizon and spaghetti views of model and drift forecasts against historical data, linked to a metrics table with MAE and MAPE, and handles loading, empty, and run-analysis-hint states."
|
|
137
|
+
whenToUse={[
|
|
138
|
+
'To present backtest or performance-analysis results for a dataset’s forecasting models.',
|
|
139
|
+
'To compare forecast horizons against actuals, including optional custom series matrices.',
|
|
140
|
+
]}
|
|
141
|
+
whenNotToUse={[
|
|
142
|
+
'For plain historical or forecast charts without performance metrics; use ChartAreaInteractive or LightweightForecastChart.',
|
|
143
|
+
'When no performance analysis exists yet; show a call to action to run one instead.',
|
|
144
|
+
]}
|
|
145
|
+
doNotes={[
|
|
146
|
+
'Wire the loading, empty, and hint props to your data-fetch state so the widget shows the right placeholder.',
|
|
147
|
+
]}
|
|
148
|
+
/>
|
|
134
149
|
<PageContentSection>
|
|
135
150
|
<div
|
|
136
151
|
style={{
|