@sybilion/uilib 1.3.92 → 1.3.95
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/Page/PageTabs/PageTabs.js +2 -2
- package/dist/esm/components/ui/Page/PageXScroll/PageXScroll.js +5 -5
- 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/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/Page/PageTabs/PageTabs.d.ts +3 -1
- package/dist/esm/types/src/components/ui/Page/PageXScroll/PageXScroll.d.ts +8 -3
- 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/Page/PageTabs/PageTabs.tsx +8 -2
- package/src/components/ui/Page/PageXScroll/PageXScroll.tsx +12 -6
- 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 +26 -8
- 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/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 +132 -20
- 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
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
10
10
|
|
|
11
11
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
12
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
12
13
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
13
14
|
|
|
14
15
|
export default function BreadcrumbPage() {
|
|
@@ -20,6 +21,20 @@ export default function BreadcrumbPage() {
|
|
|
20
21
|
subheader="Inline navigation trail."
|
|
21
22
|
actions={<DocsHeaderActions />}
|
|
22
23
|
/>
|
|
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
|
+
/>
|
|
23
38
|
<PageContentSection>
|
|
24
39
|
<Breadcrumb>
|
|
25
40
|
<BreadcrumbList>
|
|
@@ -4,6 +4,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
4
4
|
import { Plus } from 'lucide-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
|
const VARIANTS: ButtonVariant[] = [
|
|
@@ -26,6 +27,22 @@ export default function ButtonPage() {
|
|
|
26
27
|
subheader="Variants, sizes, icon mode, and disabled state."
|
|
27
28
|
actions={<DocsHeaderActions />}
|
|
28
29
|
/>
|
|
30
|
+
<DocsGuidance
|
|
31
|
+
overview="Buttons trigger an action or event, such as submitting a form or confirming a dialog. Choose a variant that matches the weight of the action: default for the primary action, secondary or outline for supporting actions, ghost for low-emphasis actions, and destructive for irreversible ones."
|
|
32
|
+
whenToUse={[
|
|
33
|
+
'To trigger an immediate action, such as saving, submitting, or confirming.',
|
|
34
|
+
'To open a dialog, drawer, or other transient surface.',
|
|
35
|
+
'As the primary call to action in a form, card, or empty state.',
|
|
36
|
+
]}
|
|
37
|
+
whenNotToUse={[
|
|
38
|
+
'To navigate to another page; use a link or the link variant instead.',
|
|
39
|
+
'To switch between mutually exclusive options; use Tabs, Toggle, or ToggleGroup.',
|
|
40
|
+
]}
|
|
41
|
+
doNotes={[
|
|
42
|
+
'Use one default-variant button per view so the primary action stays clear.',
|
|
43
|
+
'Label buttons with a verb that describes the action, such as “Save changes”.',
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
29
46
|
<PageContentSection
|
|
30
47
|
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
31
48
|
>
|
|
@@ -6,38 +6,211 @@ import {
|
|
|
6
6
|
CardFooter,
|
|
7
7
|
CardHeader,
|
|
8
8
|
CardTitle,
|
|
9
|
+
LinkCard,
|
|
9
10
|
} from '#uilib/components/ui/Card';
|
|
10
11
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
11
12
|
import { PackageIcon } from '@phosphor-icons/react';
|
|
12
13
|
|
|
13
14
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
15
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
14
16
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
15
17
|
|
|
18
|
+
const PADDING_SIZES = ['s', 'm', 'l'] as const;
|
|
19
|
+
|
|
20
|
+
const CARD_WIDTH = 280;
|
|
21
|
+
|
|
16
22
|
export default function CardPage() {
|
|
17
23
|
return (
|
|
18
24
|
<>
|
|
19
25
|
<AppPageHeader
|
|
20
26
|
breadcrumbs={[{ label: 'Card' }]}
|
|
21
27
|
title="Card"
|
|
22
|
-
subheader="
|
|
28
|
+
subheader="Padding sizes, slot compositions, and link card."
|
|
23
29
|
actions={<DocsHeaderActions />}
|
|
24
30
|
/>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
<DocsGuidance
|
|
32
|
+
overview="Card groups related content and actions into a single bounded container with optional header, content, and footer slots. The header supports an icon, title, and description; the footer typically holds actions."
|
|
33
|
+
whenToUse={[
|
|
34
|
+
'To group a self-contained piece of content, such as a summary, setting, or entity.',
|
|
35
|
+
'In grid dashboards where each tile presents one unit of information.',
|
|
36
|
+
'When content needs a clear visual boundary from its surroundings.',
|
|
37
|
+
]}
|
|
38
|
+
whenNotToUse={[
|
|
39
|
+
'To wrap an entire page; use the page layout primitives instead.',
|
|
40
|
+
'For long, flowing text that does not need a boundary.',
|
|
41
|
+
]}
|
|
42
|
+
doNotes={[
|
|
43
|
+
'Keep one primary action per card and place it in the footer.',
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
<PageContentSection
|
|
47
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
48
|
+
>
|
|
49
|
+
<section>
|
|
50
|
+
<h3 style={{ marginBottom: '1rem' }}>Padding sizes</h3>
|
|
51
|
+
<div
|
|
52
|
+
style={{
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexWrap: 'wrap',
|
|
55
|
+
gap: '1rem',
|
|
56
|
+
alignItems: 'flex-start',
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
{PADDING_SIZES.map(p => (
|
|
60
|
+
<Card key={p} paddingSize={p} style={{ width: CARD_WIDTH }}>
|
|
61
|
+
<CardHeader title={`padding-${p}`} />
|
|
62
|
+
<CardContent>
|
|
63
|
+
<p style={{ margin: 0 }}>
|
|
64
|
+
Inner padding via <code>paddingSize="{p}"</code>.
|
|
65
|
+
</p>
|
|
66
|
+
</CardContent>
|
|
67
|
+
</Card>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
</section>
|
|
71
|
+
<section>
|
|
72
|
+
<h3 style={{ marginBottom: '1rem' }}>Slot compositions</h3>
|
|
73
|
+
<div style={{ overflowX: 'auto' }}>
|
|
74
|
+
<table style={{ borderCollapse: 'collapse', width: '100%' }}>
|
|
75
|
+
<thead>
|
|
76
|
+
<tr>
|
|
77
|
+
<th style={{ textAlign: 'left', padding: '0.5rem' }}>
|
|
78
|
+
composition
|
|
79
|
+
</th>
|
|
80
|
+
<th style={{ padding: '0.5rem' }}>preview</th>
|
|
81
|
+
</tr>
|
|
82
|
+
</thead>
|
|
83
|
+
<tbody>
|
|
84
|
+
<tr>
|
|
85
|
+
<td
|
|
86
|
+
style={{
|
|
87
|
+
padding: '0.5rem',
|
|
88
|
+
fontWeight: 600,
|
|
89
|
+
whiteSpace: 'nowrap',
|
|
90
|
+
verticalAlign: 'top',
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
header + content + footer
|
|
94
|
+
</td>
|
|
95
|
+
<td style={{ padding: '0.5rem' }}>
|
|
96
|
+
<Card paddingSize="m" style={{ width: CARD_WIDTH }}>
|
|
97
|
+
<CardHeader
|
|
98
|
+
icon={<PackageIcon />}
|
|
99
|
+
title="Card title"
|
|
100
|
+
description="Supporting description text."
|
|
101
|
+
/>
|
|
102
|
+
<CardContent>
|
|
103
|
+
<p style={{ margin: 0 }}>Main content area.</p>
|
|
104
|
+
</CardContent>
|
|
105
|
+
<CardFooter>
|
|
106
|
+
<Button type="button" size="sm">
|
|
107
|
+
Action
|
|
108
|
+
</Button>
|
|
109
|
+
</CardFooter>
|
|
110
|
+
</Card>
|
|
111
|
+
</td>
|
|
112
|
+
</tr>
|
|
113
|
+
<tr>
|
|
114
|
+
<td
|
|
115
|
+
style={{
|
|
116
|
+
padding: '0.5rem',
|
|
117
|
+
fontWeight: 600,
|
|
118
|
+
whiteSpace: 'nowrap',
|
|
119
|
+
verticalAlign: 'top',
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
header + content
|
|
123
|
+
</td>
|
|
124
|
+
<td style={{ padding: '0.5rem' }}>
|
|
125
|
+
<Card paddingSize="m" style={{ width: CARD_WIDTH }}>
|
|
126
|
+
<CardHeader
|
|
127
|
+
title="No footer"
|
|
128
|
+
description="Content only below the header."
|
|
129
|
+
/>
|
|
130
|
+
<CardContent>
|
|
131
|
+
<p style={{ margin: 0 }}>Main content area.</p>
|
|
132
|
+
</CardContent>
|
|
133
|
+
</Card>
|
|
134
|
+
</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td
|
|
138
|
+
style={{
|
|
139
|
+
padding: '0.5rem',
|
|
140
|
+
fontWeight: 600,
|
|
141
|
+
whiteSpace: 'nowrap',
|
|
142
|
+
verticalAlign: 'top',
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
content only
|
|
146
|
+
</td>
|
|
147
|
+
<td style={{ padding: '0.5rem' }}>
|
|
148
|
+
<Card paddingSize="m" style={{ width: CARD_WIDTH }}>
|
|
149
|
+
<CardContent>
|
|
150
|
+
<CardTitle>Standalone title</CardTitle>
|
|
151
|
+
<div style={{ marginTop: '0.25rem' }}>
|
|
152
|
+
<CardDescription>
|
|
153
|
+
Content without a separate header slot.
|
|
154
|
+
</CardDescription>
|
|
155
|
+
</div>
|
|
156
|
+
</CardContent>
|
|
157
|
+
</Card>
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td
|
|
162
|
+
style={{
|
|
163
|
+
padding: '0.5rem',
|
|
164
|
+
fontWeight: 600,
|
|
165
|
+
whiteSpace: 'nowrap',
|
|
166
|
+
verticalAlign: 'top',
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
icon with background
|
|
170
|
+
</td>
|
|
171
|
+
<td style={{ padding: '0.5rem' }}>
|
|
172
|
+
<Card paddingSize="m" style={{ width: CARD_WIDTH }}>
|
|
173
|
+
<CardHeader
|
|
174
|
+
icon={<PackageIcon />}
|
|
175
|
+
iconWithBackground
|
|
176
|
+
title="Icon background"
|
|
177
|
+
description="iconWithBackground on CardHeader."
|
|
178
|
+
/>
|
|
179
|
+
<CardContent>
|
|
180
|
+
<p style={{ margin: 0 }}>Main content area.</p>
|
|
181
|
+
</CardContent>
|
|
182
|
+
</Card>
|
|
183
|
+
</td>
|
|
184
|
+
</tr>
|
|
185
|
+
</tbody>
|
|
186
|
+
</table>
|
|
187
|
+
</div>
|
|
188
|
+
</section>
|
|
189
|
+
<section>
|
|
190
|
+
<h3 style={{ marginBottom: '1rem' }}>Link card</h3>
|
|
191
|
+
<p
|
|
192
|
+
style={{
|
|
193
|
+
marginBottom: '0.75rem',
|
|
194
|
+
color: 'var(--muted-foreground)',
|
|
195
|
+
}}
|
|
196
|
+
>
|
|
197
|
+
<code>LinkCard</code> renders the card shell as an anchor for
|
|
198
|
+
external navigation.
|
|
199
|
+
</p>
|
|
200
|
+
<LinkCard
|
|
201
|
+
href="https://example.com"
|
|
202
|
+
style={{
|
|
203
|
+
width: CARD_WIDTH,
|
|
204
|
+
textDecoration: 'none',
|
|
205
|
+
padding: 'var(--p-6)',
|
|
206
|
+
}}
|
|
207
|
+
>
|
|
208
|
+
<CardHeader title="External link" />
|
|
209
|
+
<CardContent>
|
|
210
|
+
<p style={{ margin: 0 }}>Opens in a new tab.</p>
|
|
211
|
+
</CardContent>
|
|
212
|
+
</LinkCard>
|
|
213
|
+
</section>
|
|
41
214
|
</PageContentSection>
|
|
42
215
|
</>
|
|
43
216
|
);
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { ChartAreaInteractive } from '#uilib/components/ui/ChartAreaInteractive';
|
|
1
4
|
import type {
|
|
2
5
|
ChartDataPoint,
|
|
3
6
|
OverlayMode,
|
|
4
7
|
} from '#uilib/components/ui/ChartAreaInteractive/ChartAreaInteractive.types';
|
|
5
|
-
import { Tabs, TabsList, TabsTrigger } from '#uilib/components/ui/Tabs';
|
|
6
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
9
|
-
import { ChartAreaInteractive } from '#uilib/components/ui/ChartAreaInteractive';
|
|
10
|
-
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
11
|
-
import type { ForecastData } from '#uilib/types/forecast-data';
|
|
12
8
|
import { ForecastItemData } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
13
9
|
import { Label } from '#uilib/components/ui/Label';
|
|
14
10
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
15
11
|
import { Switch } from '#uilib/components/ui/Switch';
|
|
12
|
+
import { Tabs, TabsList, TabsTrigger } from '#uilib/components/ui/Tabs';
|
|
16
13
|
import { useTheme } from '#uilib/contexts/theme-context';
|
|
14
|
+
import type { ForecastData } from '#uilib/types/forecast-data';
|
|
15
|
+
|
|
16
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
17
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
18
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
17
19
|
|
|
18
20
|
const DEMO_FORECAST_ID = 1;
|
|
19
21
|
|
|
@@ -147,6 +149,21 @@ export default function ChartAreaInteractivePage() {
|
|
|
147
149
|
subheader="Interactive area chart shell with time range controls."
|
|
148
150
|
actions={<DocsHeaderActions />}
|
|
149
151
|
/>
|
|
152
|
+
<DocsGuidance
|
|
153
|
+
overview="ChartAreaInteractive is the full chart shell for time series data, combining an area chart with a time range selector, a legend with series toggles, and optional forecast overlays. Overlay modes add month pinning, quantile interval bands, or threshold controls on top of the base chart."
|
|
154
|
+
whenToUse={[
|
|
155
|
+
'To present historical and forecast series together with built-in time range filtering.',
|
|
156
|
+
'When users need to toggle series visibility, pin a month, or inspect quantile intervals and thresholds.',
|
|
157
|
+
'As the main visualisation on an analysis or dataset page.',
|
|
158
|
+
]}
|
|
159
|
+
whenNotToUse={[
|
|
160
|
+
'For a simple static chart without controls; compose ChartContainer with Recharts directly.',
|
|
161
|
+
'For non-temporal data such as categorical comparisons.',
|
|
162
|
+
]}
|
|
163
|
+
doNotes={[
|
|
164
|
+
'Pass loading while data is being fetched so the chart shows its skeleton state.',
|
|
165
|
+
]}
|
|
166
|
+
/>
|
|
150
167
|
<PageContentSection>
|
|
151
168
|
<Tabs
|
|
152
169
|
value={demoMode}
|
|
@@ -4,6 +4,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
4
4
|
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from 'recharts';
|
|
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 DATA = [
|
|
@@ -26,6 +27,19 @@ export default function ChartPage() {
|
|
|
26
27
|
subheader="ChartContainer + Recharts line chart."
|
|
27
28
|
actions={<DocsHeaderActions />}
|
|
28
29
|
/>
|
|
30
|
+
<DocsGuidance
|
|
31
|
+
overview="ChartContainer wraps Recharts charts with the library’s theming, mapping a ChartConfig of labels and colours onto CSS variables. Compose any Recharts chart inside it and reference series colours via var(--color-<key>)."
|
|
32
|
+
whenToUse={[
|
|
33
|
+
'To build bespoke line, bar, or area charts that follow the design system palette.',
|
|
34
|
+
'When you need full control over Recharts composition but consistent theming.',
|
|
35
|
+
]}
|
|
36
|
+
whenNotToUse={[
|
|
37
|
+
'For the standard time series experience with range controls and overlays; use ChartAreaInteractive.',
|
|
38
|
+
]}
|
|
39
|
+
doNotes={[
|
|
40
|
+
'Define every series in the ChartConfig so labels and colours stay consistent across tooltips and legends.',
|
|
41
|
+
]}
|
|
42
|
+
/>
|
|
29
43
|
<PageContentSection>
|
|
30
44
|
<ChartContainer
|
|
31
45
|
config={config}
|
|
@@ -11,6 +11,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
11
11
|
import { ScrollRef } from '@homecode/ui';
|
|
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
|
const NO_QUICK_REPLY_KEYS: ReadonlySet<string> = new Set();
|
|
@@ -100,6 +101,20 @@ export default function ChatAttachmentsDropzonePage() {
|
|
|
100
101
|
subheader="Drop text, Office, or PDF files onto the chat shell; they appear on the prompt until you send."
|
|
101
102
|
actions={<DocsHeaderActions />}
|
|
102
103
|
/>
|
|
104
|
+
<DocsGuidance
|
|
105
|
+
overview="ChatChrome supports a file dropzone: users drag text, Office, or PDF files onto the chat panel and the parsed content attaches to the prompt until they send. Configure accepted types via allowedAttachments and enable PDFs with allowPdfAttachments."
|
|
106
|
+
whenToUse={[
|
|
107
|
+
'When users need to give the assistant file context, such as CSV data or documents.',
|
|
108
|
+
'When attached files should be reviewed alongside the typed prompt before sending.',
|
|
109
|
+
]}
|
|
110
|
+
whenNotToUse={[
|
|
111
|
+
'For persistent file uploads to storage; use a dedicated upload flow.',
|
|
112
|
+
'When only plain text input is expected; omit the attachment props to disable the dropzone.',
|
|
113
|
+
]}
|
|
114
|
+
doNotes={[
|
|
115
|
+
'Office and PDF parsers load on demand, so the first attachment of those types incurs a one-off load.',
|
|
116
|
+
]}
|
|
117
|
+
/>
|
|
103
118
|
<PageContentSection>
|
|
104
119
|
<p style={{ marginBottom: 16, fontSize: 14, lineHeight: 1.5 }}>
|
|
105
120
|
Drop a <code>.txt</code>, <code>.csv</code>, <code>.md</code>,{' '}
|
|
@@ -12,6 +12,7 @@ import { ScrollRef } from '@homecode/ui';
|
|
|
12
12
|
import { MessageSquare } from 'lucide-react';
|
|
13
13
|
|
|
14
14
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
15
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
15
16
|
import { DOCS_CHAT_USER_KEY } from '../docsConstants';
|
|
16
17
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
17
18
|
|
|
@@ -109,6 +110,20 @@ export default function ChatComposerPrefillPage() {
|
|
|
109
110
|
/>
|
|
110
111
|
}
|
|
111
112
|
/>
|
|
113
|
+
<DocsGuidance
|
|
114
|
+
overview="The chat composer can be prefilled without auto-sending: pass promptPrefill to ChatChrome, call ChatSheetActions.openNewChatWithPrefill for the portal sheet, or use a ?prompt= deep link. Focus lands at the end of the text so users can edit before submitting."
|
|
115
|
+
whenToUse={[
|
|
116
|
+
'To seed the composer from a call to action, such as a suggested question on a dataset page.',
|
|
117
|
+
'To deep link into the product with a prepared prompt via ?prompt=.',
|
|
118
|
+
'When opening a new chat session that should start from a template prompt.',
|
|
119
|
+
]}
|
|
120
|
+
whenNotToUse={[
|
|
121
|
+
'To send a message automatically on behalf of the user; prefill never submits.',
|
|
122
|
+
]}
|
|
123
|
+
doNotes={[
|
|
124
|
+
'Keep prefilled text short and editable; it is a starting point, not a command.',
|
|
125
|
+
]}
|
|
126
|
+
/>
|
|
112
127
|
<PageContentSection>
|
|
113
128
|
<p style={{ marginBottom: 12, fontSize: 14, lineHeight: 1.5 }}>
|
|
114
129
|
After prefill, the composer receives focus at the end of the text so
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
DOCS_SAMPLE_DATASET_NAME,
|
|
7
7
|
} from '../chatPresets.sample';
|
|
8
8
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
9
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
9
10
|
import { DOCS_CHAT_USER_KEY } from '../docsConstants';
|
|
10
11
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
11
12
|
import S from './ChatPage.styl';
|
|
@@ -35,6 +36,20 @@ export default function ChatPage() {
|
|
|
35
36
|
subheader={`Chat shell with message list, prompt, and dataset-scoped preset bubbles for "${DOCS_SAMPLE_DATASET_NAME}".`}
|
|
36
37
|
actions={<DocsHeaderActions presets={DOCS_DATASET_PRESETS} />}
|
|
37
38
|
/>
|
|
39
|
+
<DocsGuidance
|
|
40
|
+
overview="ChatChrome is the complete chat shell: message list, prompt composer, empty state, and optional preset bubbles. Drive it with useChatPanelChromeModel for a self-contained session, or wire the props manually for full control."
|
|
41
|
+
whenToUse={[
|
|
42
|
+
'To embed an assistant conversation inline on a page or in a side panel.',
|
|
43
|
+
'When you want preset prompt chips scoped to the current dataset or context.',
|
|
44
|
+
]}
|
|
45
|
+
whenNotToUse={[
|
|
46
|
+
'For a single one-off prompt without conversation history; a simple form may suffice.',
|
|
47
|
+
'For notification or activity feeds; the shell is designed for two-way conversation.',
|
|
48
|
+
]}
|
|
49
|
+
doNotes={[
|
|
50
|
+
'Provide a meaningful emptyState title and description so the first-run view explains what the assistant can do.',
|
|
51
|
+
]}
|
|
52
|
+
/>
|
|
38
53
|
<PageContentSection>
|
|
39
54
|
<p style={{ marginBottom: 16, fontSize: 14, lineHeight: 1.5 }}>
|
|
40
55
|
Preset chips render above the prompt in the empty state (fixed layout)
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DOCS_SAMPLE_DATASET_NAME,
|
|
8
8
|
} from '../chatPresets.sample';
|
|
9
9
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
10
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
10
11
|
import { DOCS_CHAT_USER_KEY } from '../docsConstants';
|
|
11
12
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
12
13
|
|
|
@@ -40,6 +41,19 @@ export default function ChatSheetPage() {
|
|
|
40
41
|
/>
|
|
41
42
|
}
|
|
42
43
|
/>
|
|
44
|
+
<DocsGuidance
|
|
45
|
+
overview="ChatSheet places the chat panel behind a trigger in the page header and portals it into the shell chat slot, matching the app dataset page integration. Presets, slash commands, and the empty state are passed through to the underlying chat shell."
|
|
46
|
+
whenToUse={[
|
|
47
|
+
'When chat is a secondary tool on the page and should open on demand from the header.',
|
|
48
|
+
'To reuse one assistant entry point across pages with page-scoped presets.',
|
|
49
|
+
]}
|
|
50
|
+
whenNotToUse={[
|
|
51
|
+
'When the conversation is the primary content of the page; embed ChatChrome inline instead.',
|
|
52
|
+
]}
|
|
53
|
+
doNotes={[
|
|
54
|
+
'Give each page its own scopeId so chat sessions do not leak between contexts.',
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
43
57
|
<PageContentSection>
|
|
44
58
|
<p style={{ marginBottom: 16, fontSize: 14, lineHeight: 1.5 }}>
|
|
45
59
|
Open <strong>AI Assistant</strong> in the header. Presets render below
|
|
@@ -11,6 +11,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
11
11
|
import { ScrollRef } from '@homecode/ui';
|
|
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
|
const NO_QUICK_REPLY_KEYS: ReadonlySet<string> = new Set();
|
|
@@ -97,6 +98,20 @@ export default function ChatSlashCommandsPage() {
|
|
|
97
98
|
subheader={`Slash palette uses TipTap Mention with "/" as the trigger. Pass slashCommandItems from the app — each item inserts an inline mention chip by default. Optional className and color on SlashCommandItem style the chip in the composer.`}
|
|
98
99
|
actions={<DocsHeaderActions slashCommandItems={DOCS_SLASH_ITEMS} />}
|
|
99
100
|
/>
|
|
101
|
+
<DocsGuidance
|
|
102
|
+
overview="The chat composer supports a slash command palette built on TipTap mentions: typing / at the start of a line or after a space opens a picker, and choosing an item inserts an inline mention chip. Supply items through slashCommandItems; optional className and color style each chip."
|
|
103
|
+
whenToUse={[
|
|
104
|
+
'To expose a small set of named commands users can invoke from the composer.',
|
|
105
|
+
'When commands should read as part of the message, such as /generate-report.',
|
|
106
|
+
]}
|
|
107
|
+
whenNotToUse={[
|
|
108
|
+
'For long or hierarchical command sets; the palette works best with a handful of items.',
|
|
109
|
+
'For primary actions that deserve a visible button outside the composer.',
|
|
110
|
+
]}
|
|
111
|
+
doNotes={[
|
|
112
|
+
'Keep command ids stable, since plain-text sends fall back to the item id.',
|
|
113
|
+
]}
|
|
114
|
+
/>
|
|
100
115
|
<PageContentSection>
|
|
101
116
|
<p style={{ marginBottom: 16, fontSize: 14, lineHeight: 1.5 }}>
|
|
102
117
|
Same{' '}
|
|
@@ -10,6 +10,7 @@ import { PageContentSection } from '#uilib/components/ui/Page';
|
|
|
10
10
|
import { ScrollRef } from '@homecode/ui';
|
|
11
11
|
|
|
12
12
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
13
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
13
14
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
14
15
|
|
|
15
16
|
const NO_QUICK_REPLY_KEYS: ReadonlySet<string> = new Set();
|
|
@@ -125,6 +126,19 @@ export default function ChatUserCsvAttachmentPage() {
|
|
|
125
126
|
subheader="USER bubble with separate downloadable CSV row (dashboard preset pattern)."
|
|
126
127
|
actions={<DocsHeaderActions />}
|
|
127
128
|
/>
|
|
129
|
+
<DocsGuidance
|
|
130
|
+
overview="User messages can carry downloadable text file attachments via userTextFileAttachments: the bubble shows the message text with a separate file row beneath it, matching the dashboard preset pattern. Users can download the attached file from that row."
|
|
131
|
+
whenToUse={[
|
|
132
|
+
'When a preset or automated flow sends data, such as a CSV extract, on the user’s behalf.',
|
|
133
|
+
'To keep generated file context visible and retrievable in the conversation history.',
|
|
134
|
+
]}
|
|
135
|
+
whenNotToUse={[
|
|
136
|
+
'For user-initiated uploads; use the attachments dropzone instead.',
|
|
137
|
+
]}
|
|
138
|
+
doNotes={[
|
|
139
|
+
'Give each attachment a readable displayName so the file row makes sense out of context.',
|
|
140
|
+
]}
|
|
141
|
+
/>
|
|
128
142
|
<PageContentSection>
|
|
129
143
|
<p style={{ marginBottom: 16 }}>
|
|
130
144
|
<Button
|
|
@@ -3,6 +3,7 @@ import { Label } from '#uilib/components/ui/Label';
|
|
|
3
3
|
import { 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
|
export default function CheckboxPage() {
|
|
@@ -11,14 +12,46 @@ export default function CheckboxPage() {
|
|
|
11
12
|
<AppPageHeader
|
|
12
13
|
breadcrumbs={[{ label: 'Checkbox' }]}
|
|
13
14
|
title="Checkbox"
|
|
14
|
-
subheader="Binary
|
|
15
|
+
subheader="Binary control for selecting an option."
|
|
15
16
|
actions={<DocsHeaderActions />}
|
|
16
17
|
/>
|
|
18
|
+
<DocsGuidance
|
|
19
|
+
overview="Checkbox is a binary control for selecting or deselecting an option. Pair it with a Label linked via htmlFor so the text is clickable and announced by assistive technology."
|
|
20
|
+
whenToUse={[
|
|
21
|
+
'For independent on or off options in forms and settings.',
|
|
22
|
+
'To select multiple items from a list.',
|
|
23
|
+
'To record agreement, such as accepting terms.',
|
|
24
|
+
]}
|
|
25
|
+
whenNotToUse={[
|
|
26
|
+
'For an action that takes effect immediately; use Switch instead.',
|
|
27
|
+
'For mutually exclusive choices; use RadioGroup.',
|
|
28
|
+
]}
|
|
29
|
+
doNotes={[
|
|
30
|
+
'Write labels positively, such as “Send notifications” rather than “Do not send notifications”.',
|
|
31
|
+
]}
|
|
32
|
+
/>
|
|
17
33
|
<PageContentSection
|
|
18
|
-
style={{ display: 'flex',
|
|
34
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
|
|
19
35
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
36
|
+
<div
|
|
37
|
+
style={{
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
gap: 'var(--p-2)',
|
|
41
|
+
padding: 'var(--p-2)',
|
|
42
|
+
background: 'var(--background)',
|
|
43
|
+
borderRadius: 'var(--radius-3)',
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
47
|
+
<Checkbox id="cb-default" />
|
|
48
|
+
<Label htmlFor="cb-default">Option</Label>
|
|
49
|
+
</div>
|
|
50
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
51
|
+
<Checkbox id="cb-disabled" disabled />
|
|
52
|
+
<Label htmlFor="cb-disabled">Option</Label>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
22
55
|
</PageContentSection>
|
|
23
56
|
</>
|
|
24
57
|
);
|