@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.switchRoot
|
|
2
2
|
position relative
|
|
3
3
|
display inline-flex
|
|
4
|
-
padding
|
|
4
|
+
padding 3px
|
|
5
5
|
flex-shrink 0
|
|
6
6
|
cursor pointer
|
|
7
7
|
border-radius 9999px
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
height 20px
|
|
35
35
|
|
|
36
36
|
.switchThumb
|
|
37
|
-
width
|
|
38
|
-
height
|
|
37
|
+
width 14px
|
|
38
|
+
height 14px
|
|
39
39
|
|
|
40
40
|
&[data-state=checked] .switchThumb
|
|
41
41
|
transform translateX(16px)
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
height 24px
|
|
46
46
|
|
|
47
47
|
.switchThumb
|
|
48
|
-
width
|
|
49
|
-
height
|
|
48
|
+
width 18px
|
|
49
|
+
height 18px
|
|
50
50
|
|
|
51
51
|
&[data-state=checked] .switchThumb
|
|
52
52
|
transform translateX(20px)
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
height 28px
|
|
57
57
|
|
|
58
58
|
.switchThumb
|
|
59
|
-
width
|
|
60
|
-
height
|
|
59
|
+
width 22px
|
|
60
|
+
height 22px
|
|
61
61
|
|
|
62
62
|
&[data-state=checked] .switchThumb
|
|
63
63
|
transform translateX(24px)
|
|
@@ -20,9 +20,33 @@
|
|
|
20
20
|
.table
|
|
21
21
|
width 100%
|
|
22
22
|
caption-side bottom
|
|
23
|
-
font-size
|
|
23
|
+
font-size var(--text-sm)
|
|
24
24
|
overflow hidden
|
|
25
25
|
|
|
26
|
+
&[data-size="sm"]
|
|
27
|
+
font-size var(--text-xs)
|
|
28
|
+
|
|
29
|
+
.tableHead
|
|
30
|
+
.tableCell
|
|
31
|
+
padding var(--p-2) var(--p-3)
|
|
32
|
+
height auto
|
|
33
|
+
|
|
34
|
+
&[data-size="md"]
|
|
35
|
+
font-size var(--text-sm)
|
|
36
|
+
|
|
37
|
+
.tableHead
|
|
38
|
+
.tableCell
|
|
39
|
+
padding var(--p-3) var(--p-4)
|
|
40
|
+
height auto
|
|
41
|
+
|
|
42
|
+
&[data-size="lg"]
|
|
43
|
+
font-size var(--text-base)
|
|
44
|
+
|
|
45
|
+
.tableHead
|
|
46
|
+
.tableCell
|
|
47
|
+
padding var(--p-5) var(--p-5)
|
|
48
|
+
height auto
|
|
49
|
+
|
|
26
50
|
&.withPaddings
|
|
27
51
|
.tableHead:first-child
|
|
28
52
|
.tableCell:first-child
|
|
@@ -34,18 +58,18 @@
|
|
|
34
58
|
.tableBody
|
|
35
59
|
position relative
|
|
36
60
|
|
|
37
|
-
&:not(:first-child)::before
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
// &:not(:first-child)::before
|
|
62
|
+
// content ''
|
|
63
|
+
// display block
|
|
64
|
+
// height 1px
|
|
65
|
+
// position absolute
|
|
66
|
+
// left 0
|
|
67
|
+
// right 0
|
|
68
|
+
// background-color var(--border)
|
|
45
69
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
// .withBackground &
|
|
71
|
+
// left var(--p-6)
|
|
72
|
+
// right var(--p-6)
|
|
49
73
|
|
|
50
74
|
tr:last-child
|
|
51
75
|
border-bottom 0
|
|
@@ -62,6 +86,7 @@
|
|
|
62
86
|
|
|
63
87
|
.tableRow
|
|
64
88
|
position relative
|
|
89
|
+
border-bottom 1px solid var(--border)
|
|
65
90
|
transition-property background-color, color, border-color, text-decoration-color, fill, stroke
|
|
66
91
|
transition-timing-function cubic-bezier(0.4, 0, 0.2, 1)
|
|
67
92
|
transition-duration 150ms
|
|
@@ -94,11 +119,8 @@
|
|
|
94
119
|
.tableCell
|
|
95
120
|
position relative
|
|
96
121
|
z-index 1
|
|
97
|
-
padding-left var(--p-2)
|
|
98
|
-
padding-right var(--p-2)
|
|
99
122
|
vertical-align middle
|
|
100
123
|
white-space nowrap
|
|
101
|
-
height 65px
|
|
102
124
|
min-width 0
|
|
103
125
|
|
|
104
126
|
&:has([role="checkbox"])
|
|
@@ -107,10 +129,6 @@
|
|
|
107
129
|
[role="checkbox"]
|
|
108
130
|
transform translateY(2px)
|
|
109
131
|
|
|
110
|
-
.compact
|
|
111
|
-
height auto
|
|
112
|
-
|
|
113
|
-
|
|
114
132
|
.cellValue
|
|
115
133
|
display flex
|
|
116
134
|
align-items center
|
|
@@ -14,13 +14,15 @@ import type {
|
|
|
14
14
|
|
|
15
15
|
function Table({
|
|
16
16
|
className,
|
|
17
|
+
size = 'md',
|
|
17
18
|
withBackground = false,
|
|
18
19
|
withPaddings = false,
|
|
19
20
|
...props
|
|
20
|
-
}: TableProps
|
|
21
|
+
}: TableProps) {
|
|
21
22
|
return (
|
|
22
23
|
<table
|
|
23
24
|
data-slot="table"
|
|
25
|
+
data-size={size}
|
|
24
26
|
className={cn(
|
|
25
27
|
S.table,
|
|
26
28
|
className,
|
|
@@ -82,11 +84,11 @@ function TableHead({ className, ...props }: TableHeadProps) {
|
|
|
82
84
|
);
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
function TableCell({ className,
|
|
87
|
+
function TableCell({ className, ...props }: TableCellProps) {
|
|
86
88
|
return (
|
|
87
89
|
<td
|
|
88
90
|
data-slot="table-cell"
|
|
89
|
-
className={cn(S.tableCell,
|
|
91
|
+
className={cn(S.tableCell, className)}
|
|
90
92
|
{...props}
|
|
91
93
|
/>
|
|
92
94
|
);
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type ComponentProps } from 'react';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type TableSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
|
|
5
|
+
export interface TableProps extends ComponentProps<'table'> {
|
|
6
|
+
size?: TableSize;
|
|
7
|
+
withBackground?: boolean;
|
|
8
|
+
withPaddings?: boolean;
|
|
9
|
+
}
|
|
4
10
|
export interface TableHeaderProps extends ComponentProps<'thead'> {
|
|
5
11
|
withBorder?: boolean;
|
|
6
12
|
}
|
|
@@ -8,7 +14,5 @@ export interface TableBodyProps extends ComponentProps<'tbody'> {}
|
|
|
8
14
|
export interface TableFooterProps extends ComponentProps<'tfoot'> {}
|
|
9
15
|
export interface TableRowProps extends ComponentProps<'tr'> {}
|
|
10
16
|
export interface TableHeadProps extends ComponentProps<'th'> {}
|
|
11
|
-
export interface TableCellProps extends ComponentProps<'td'> {
|
|
12
|
-
compact?: boolean;
|
|
13
|
-
}
|
|
17
|
+
export interface TableCellProps extends ComponentProps<'td'> {}
|
|
14
18
|
export interface TableCaptionProps extends ComponentProps<'caption'> {}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
width fit-content
|
|
6
6
|
min-width 100%
|
|
7
7
|
padding 6px 12px
|
|
8
|
-
border-radius var(--
|
|
8
|
+
border-radius var(--radius-4)
|
|
9
9
|
background-color var(--popover)
|
|
10
|
-
font-size
|
|
10
|
+
font-size var(--text-xs)
|
|
11
11
|
color var(--popover-foreground)
|
|
12
12
|
backdrop-filter blur(10px)
|
|
13
13
|
text-wrap balance
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
2
2
|
import React, { useMemo, useRef } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Button } from '#uilib/components/ui/Button';
|
|
5
|
-
import { FORECAST_LINE_COLORS } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
6
|
-
import { PageXScroll } from '#uilib/components/ui/Page';
|
|
7
3
|
import {
|
|
8
4
|
Table,
|
|
9
5
|
TableBody,
|
|
@@ -18,9 +14,6 @@ import {
|
|
|
18
14
|
TooltipContent,
|
|
19
15
|
TooltipTrigger,
|
|
20
16
|
} from '#uilib/components/ui/Tooltip';
|
|
21
|
-
import { InfoIcon, Pencil, TableIcon } from 'lucide-react';
|
|
22
|
-
|
|
23
|
-
import S from './PerformanceChart.styl';
|
|
24
17
|
import {
|
|
25
18
|
calculateAccuracy,
|
|
26
19
|
calculateBenefit,
|
|
@@ -31,6 +24,12 @@ import {
|
|
|
31
24
|
getForecastModelDisplayName,
|
|
32
25
|
} from './performanceChart.helpers';
|
|
33
26
|
|
|
27
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
28
|
+
import { FORECAST_LINE_COLORS } from '#uilib/components/ui/ChartAreaInteractive/ChartLines';
|
|
29
|
+
import { PageXScroll } from '#uilib/components/ui/Page';
|
|
30
|
+
import S from './PerformanceChart.styl';
|
|
31
|
+
import cn from 'classnames';
|
|
32
|
+
|
|
34
33
|
const DEFAULT_INVESTMENT_COST = 35000; // Investment Cost (IC) - annual cost of solution
|
|
35
34
|
|
|
36
35
|
const CUSTOM_PERFORMANCE_ROW_COLOR = 'var(--sb-purple-400)';
|
|
@@ -333,6 +332,7 @@ export function PerformanceTable({
|
|
|
333
332
|
<Tooltip>
|
|
334
333
|
<TooltipTrigger asChild>
|
|
335
334
|
<Button
|
|
335
|
+
className={S.editCustomPerformanceButton}
|
|
336
336
|
type="button"
|
|
337
337
|
variant="ghost"
|
|
338
338
|
icon
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from './chatPersistence';
|
|
9
9
|
|
|
10
10
|
describe('stripMessageForPersistence', () => {
|
|
11
|
-
it('
|
|
11
|
+
it('keeps json-dashboard fences in assistant message text', () => {
|
|
12
12
|
const message = stripMessageForPersistence({
|
|
13
13
|
id: '1',
|
|
14
14
|
role: MessageRole.ASSISTANT,
|
|
@@ -16,13 +16,24 @@ describe('stripMessageForPersistence', () => {
|
|
|
16
16
|
timestamp: 1,
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
expect(message.text).toBe('Summary\n```json-dashboard\n{"tiles":[]}\n```');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('removes json-dashboard fences from non-assistant message text', () => {
|
|
23
|
+
const message = stripMessageForPersistence({
|
|
24
|
+
id: '1a',
|
|
25
|
+
role: MessageRole.USER,
|
|
26
|
+
text: 'Summary\n```json-dashboard\n{"tiles":[]}\n```',
|
|
27
|
+
timestamp: 1,
|
|
28
|
+
});
|
|
29
|
+
|
|
19
30
|
expect(message.text).toBe('Summary');
|
|
20
31
|
});
|
|
21
32
|
|
|
22
33
|
it('strips from an unclosed json-dashboard fence', () => {
|
|
23
34
|
const message = stripMessageForPersistence({
|
|
24
35
|
id: '1b',
|
|
25
|
-
role: MessageRole.
|
|
36
|
+
role: MessageRole.USER,
|
|
26
37
|
text: 'Summary\n```json-dashboard\n{"tiles":[]}',
|
|
27
38
|
timestamp: 1,
|
|
28
39
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.root
|
|
2
|
+
display flex
|
|
3
|
+
flex-direction column
|
|
4
|
+
gap var(--p-3)
|
|
5
|
+
padding-top var(--p-1)
|
|
6
|
+
padding-bottom var(--p-10)
|
|
7
|
+
|
|
8
|
+
.overview
|
|
9
|
+
margin 0
|
|
10
|
+
max-width 720px
|
|
11
|
+
line-height 1.6
|
|
12
|
+
|
|
13
|
+
.block
|
|
14
|
+
display flex
|
|
15
|
+
flex-direction column
|
|
16
|
+
gap var(--p-1)
|
|
17
|
+
|
|
18
|
+
.heading
|
|
19
|
+
margin 0
|
|
20
|
+
font-size var(--text-xs)
|
|
21
|
+
font-weight 600
|
|
22
|
+
letter-spacing 0.02em
|
|
23
|
+
text-transform uppercase
|
|
24
|
+
color var(--muted-foreground)
|
|
25
|
+
|
|
26
|
+
.list
|
|
27
|
+
margin 0
|
|
28
|
+
padding-left var(--p-5)
|
|
29
|
+
max-width 720px
|
|
30
|
+
line-height 1.6
|
|
31
|
+
|
|
32
|
+
li + li
|
|
33
|
+
margin-top 2px
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is automatically generated.
|
|
2
|
+
// Please do not change this file!
|
|
3
|
+
interface CssExports {
|
|
4
|
+
'block': string;
|
|
5
|
+
'heading': string;
|
|
6
|
+
'list': string;
|
|
7
|
+
'overview': string;
|
|
8
|
+
'root': string;
|
|
9
|
+
}
|
|
10
|
+
export const cssExports: CssExports;
|
|
11
|
+
export default cssExports;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
4
|
+
|
|
5
|
+
import S from './DocsGuidance.styl';
|
|
6
|
+
|
|
7
|
+
export interface DocsGuidanceProps {
|
|
8
|
+
/** 1-3 sentence description of what the component is and how to use it. */
|
|
9
|
+
overview: ReactNode;
|
|
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[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function GuidanceList({
|
|
21
|
+
heading,
|
|
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
|
+
}
|
|
40
|
+
|
|
41
|
+
export function DocsGuidance({
|
|
42
|
+
overview,
|
|
43
|
+
whenToUse,
|
|
44
|
+
whenNotToUse,
|
|
45
|
+
doNotes,
|
|
46
|
+
dontNotes,
|
|
47
|
+
}: DocsGuidanceProps) {
|
|
48
|
+
return (
|
|
49
|
+
<PageContentSection grow={false} className={S.root}>
|
|
50
|
+
<p className={S.overview}>{overview}</p>
|
|
51
|
+
<GuidanceList heading="When to use" items={whenToUse} />
|
|
52
|
+
<GuidanceList heading="When not to use" items={whenNotToUse} />
|
|
53
|
+
<GuidanceList heading="Do" items={doNotes} />
|
|
54
|
+
<GuidanceList heading="Don't" items={dontNotes} />
|
|
55
|
+
</PageContentSection>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -4,6 +4,7 @@ import { AnalysesSelector } from '#uilib/components/ui/AnalysesSelector';
|
|
|
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 = [
|
|
@@ -37,6 +38,21 @@ export default function AnalysesSelectorPage() {
|
|
|
37
38
|
subheader="Multi-select analyses with inline or dropdown layout."
|
|
38
39
|
actions={<DocsHeaderActions />}
|
|
39
40
|
/>
|
|
41
|
+
<DocsGuidance
|
|
42
|
+
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."
|
|
43
|
+
whenToUse={[
|
|
44
|
+
'To toggle which analysis series are visible on a chart or comparison view.',
|
|
45
|
+
'When users need to compare several analyses against historical data at once.',
|
|
46
|
+
'When the selection should collapse into a dropdown in constrained layouts.',
|
|
47
|
+
]}
|
|
48
|
+
whenNotToUse={[
|
|
49
|
+
'To pick a single value from a generic list; use Select instead.',
|
|
50
|
+
'To filter tabular data by arbitrary fields; use dedicated filter controls.',
|
|
51
|
+
]}
|
|
52
|
+
doNotes={[
|
|
53
|
+
'Keep item colours in sync with the corresponding chart series so the mapping stays obvious.',
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
40
56
|
<PageContentSection style={{ maxWidth: 420 }}>
|
|
41
57
|
<AnalysesSelector
|
|
42
58
|
items={ITEMS}
|
|
@@ -2,6 +2,7 @@ import { AnalysisLineIcon } from '#uilib/components/ui/AnalysisLineIcon';
|
|
|
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 AnalysisLineIconPage() {
|
|
@@ -13,6 +14,17 @@ export default function AnalysisLineIconPage() {
|
|
|
13
14
|
subheader="Solid and dashed line markers."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
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
|
+
/>
|
|
16
28
|
<PageContentSection
|
|
17
29
|
style={{ flexDirection: 'row', gap: '1.5rem', alignItems: 'center' }}
|
|
18
30
|
>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
7
7
|
|
|
8
8
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
9
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
9
10
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
10
11
|
|
|
11
12
|
export default function AvatarPage() {
|
|
@@ -17,6 +18,20 @@ export default function AvatarPage() {
|
|
|
17
18
|
subheader="Image with fallback initials."
|
|
18
19
|
actions={<DocsHeaderActions />}
|
|
19
20
|
/>
|
|
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
|
+
/>
|
|
20
35
|
<PageContentSection
|
|
21
36
|
style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}
|
|
22
37
|
>
|
|
@@ -2,6 +2,7 @@ import { Badge } from '#uilib/components/ui/Badge';
|
|
|
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 BadgePage() {
|
|
@@ -13,6 +14,21 @@ export default function BadgePage() {
|
|
|
13
14
|
subheader="Status and label badges."
|
|
14
15
|
actions={<DocsHeaderActions />}
|
|
15
16
|
/>
|
|
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
|
+
/>
|
|
16
32
|
<PageContentSection
|
|
17
33
|
style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}
|
|
18
34
|
>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BarChartDatum,
|
|
3
|
+
BarChartSeries,
|
|
4
|
+
} from '#uilib/components/ui/BarChart';
|
|
5
|
+
import { BarChart } from '#uilib/components/ui/BarChart';
|
|
6
|
+
import { PageContentSection, SectionHeader } from '#uilib/components/ui/Page';
|
|
7
|
+
|
|
8
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
9
|
+
import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
|
|
10
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
11
|
+
|
|
12
|
+
const REVENUE_BY_REGION: BarChartDatum[] = [
|
|
13
|
+
{ month: 'Jan', emea: 42, americas: 38, apac: 21 },
|
|
14
|
+
{ month: 'Feb', emea: 47, americas: 41, apac: 24 },
|
|
15
|
+
{ month: 'Mar', emea: 44, americas: 45, apac: 27 },
|
|
16
|
+
{ month: 'Apr', emea: 52, americas: 43, apac: 30 },
|
|
17
|
+
{ month: 'May', emea: 49, americas: 48, apac: 33 },
|
|
18
|
+
{ month: 'Jun', emea: 55, americas: 51, apac: 35 },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const REGION_SERIES: BarChartSeries[] = [
|
|
22
|
+
{ key: 'emea', label: 'EMEA' },
|
|
23
|
+
{ key: 'americas', label: 'Americas' },
|
|
24
|
+
{ key: 'apac', label: 'APAC' },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const ACCURACY_BY_MODEL: BarChartDatum[] = [
|
|
28
|
+
{ model: 'Baseline', accuracy: 62 },
|
|
29
|
+
{ model: 'Seasonal', accuracy: 71 },
|
|
30
|
+
{ model: 'Ensemble', accuracy: 79 },
|
|
31
|
+
{ model: 'Neural', accuracy: 84 },
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const ACCURACY_SERIES: BarChartSeries[] = [
|
|
35
|
+
{ key: 'accuracy', label: 'Accuracy' },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const formatPercent = (value: number) => `${value}%`;
|
|
39
|
+
|
|
40
|
+
export default function BarChartPage() {
|
|
41
|
+
return (
|
|
42
|
+
<>
|
|
43
|
+
<AppPageHeader
|
|
44
|
+
breadcrumbs={[{ label: 'BarChart' }]}
|
|
45
|
+
title="BarChart"
|
|
46
|
+
subheader="Categorical bar chart with grouped and stacked modes."
|
|
47
|
+
actions={<DocsHeaderActions />}
|
|
48
|
+
/>
|
|
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
|
+
/>
|
|
64
|
+
<PageContentSection>
|
|
65
|
+
<SectionHeader
|
|
66
|
+
title="Grouped"
|
|
67
|
+
description="Monthly revenue by region, side by side."
|
|
68
|
+
withMargin
|
|
69
|
+
/>
|
|
70
|
+
<BarChart
|
|
71
|
+
data={REVENUE_BY_REGION}
|
|
72
|
+
categoryKey="month"
|
|
73
|
+
series={REGION_SERIES}
|
|
74
|
+
height={280}
|
|
75
|
+
/>
|
|
76
|
+
</PageContentSection>
|
|
77
|
+
<PageContentSection>
|
|
78
|
+
<SectionHeader
|
|
79
|
+
title="Stacked"
|
|
80
|
+
description="The same data stacked to emphasise monthly totals."
|
|
81
|
+
withMargin
|
|
82
|
+
/>
|
|
83
|
+
<BarChart
|
|
84
|
+
data={REVENUE_BY_REGION}
|
|
85
|
+
categoryKey="month"
|
|
86
|
+
series={REGION_SERIES}
|
|
87
|
+
mode="stacked"
|
|
88
|
+
height={280}
|
|
89
|
+
/>
|
|
90
|
+
</PageContentSection>
|
|
91
|
+
<PageContentSection>
|
|
92
|
+
<SectionHeader
|
|
93
|
+
title="Horizontal"
|
|
94
|
+
description="Single series with long category labels and formatted ticks."
|
|
95
|
+
withMargin
|
|
96
|
+
/>
|
|
97
|
+
<BarChart
|
|
98
|
+
data={ACCURACY_BY_MODEL}
|
|
99
|
+
categoryKey="model"
|
|
100
|
+
series={ACCURACY_SERIES}
|
|
101
|
+
orientation="horizontal"
|
|
102
|
+
valueFormatter={formatPercent}
|
|
103
|
+
showLegend={false}
|
|
104
|
+
height={240}
|
|
105
|
+
/>
|
|
106
|
+
</PageContentSection>
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -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>
|