@treeui/mcp 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-HN245XRN.js → chunk-QO4S3UWW.js} +826 -18
- package/dist/cli.cjs +826 -18
- package/dist/cli.js +1 -1
- package/dist/index.cjs +826 -18
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/generated/treeui.catalog.json
|
|
2
2
|
var treeui_catalog_default = {
|
|
3
|
-
generatedAt: "2026-
|
|
3
|
+
generatedAt: "2026-07-15T22:47:49.302Z",
|
|
4
4
|
packageName: "@treeui/vue",
|
|
5
|
-
packageVersion: "0.
|
|
5
|
+
packageVersion: "0.13.0",
|
|
6
6
|
decisionGuides: [
|
|
7
7
|
{
|
|
8
8
|
id: "single-choice",
|
|
@@ -200,6 +200,50 @@ var treeui_catalog_default = {
|
|
|
200
200
|
notes: []
|
|
201
201
|
}
|
|
202
202
|
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "data-viz-choice",
|
|
206
|
+
question: "Visualize numeric data",
|
|
207
|
+
options: [
|
|
208
|
+
{
|
|
209
|
+
use: "TStat",
|
|
210
|
+
when: [
|
|
211
|
+
"The story is a single headline number, optionally with a trend and delta.",
|
|
212
|
+
"It is not a plot \u2014 prefer the number over a chart when one value says it."
|
|
213
|
+
],
|
|
214
|
+
notes: []
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
use: "TSparkline",
|
|
218
|
+
when: [
|
|
219
|
+
"You want an inline micro-trend next to a value, in a table cell, or in text.",
|
|
220
|
+
"No axes, legend, or tooltip are needed."
|
|
221
|
+
],
|
|
222
|
+
notes: []
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
use: "TChart",
|
|
226
|
+
when: [
|
|
227
|
+
"You need line, area, or bar plots with axes, gridlines, legend, and hover tooltip.",
|
|
228
|
+
"There are one or more series over shared categories."
|
|
229
|
+
],
|
|
230
|
+
notes: []
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
use: "TDonutChart",
|
|
234
|
+
when: [
|
|
235
|
+
"The data is a part-of-whole breakdown (donut or pie)."
|
|
236
|
+
],
|
|
237
|
+
notes: []
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
use: "TProgress",
|
|
241
|
+
when: [
|
|
242
|
+
"You are showing completion toward a single target, not a distribution or trend."
|
|
243
|
+
],
|
|
244
|
+
notes: []
|
|
245
|
+
}
|
|
246
|
+
]
|
|
203
247
|
}
|
|
204
248
|
],
|
|
205
249
|
recipes: [
|
|
@@ -249,11 +293,28 @@ var treeui_catalog_default = {
|
|
|
249
293
|
"Set end `min` from the selected start time when appropriate."
|
|
250
294
|
]
|
|
251
295
|
},
|
|
296
|
+
{
|
|
297
|
+
id: "app-shell",
|
|
298
|
+
name: "Full-viewport application shell",
|
|
299
|
+
useWhen: [
|
|
300
|
+
"The app needs a header plus side navigation that fills the whole screen and adapts to mobile.",
|
|
301
|
+
"The layout must use the full page width on large monitors, not a centered column."
|
|
302
|
+
],
|
|
303
|
+
compose: [
|
|
304
|
+
"TAppShell",
|
|
305
|
+
"TNavMenu"
|
|
306
|
+
],
|
|
307
|
+
notes: [
|
|
308
|
+
"`TAppShell` orchestrates the header, sidebar, and fluid content in one component; put a `TNavMenu` in its `sidebar` slot and it inherits collapsed state automatically.",
|
|
309
|
+
"Leave `mobile` unset to auto-switch at `breakpoint` (default 768px), or bind it to force mobile; the sidebar becomes an off-canvas drawer with a header menu button.",
|
|
310
|
+
"Mount it at the app root. Wrap only inner regions in `TContainer` if a specific area needs a constrained reading width."
|
|
311
|
+
]
|
|
312
|
+
},
|
|
252
313
|
{
|
|
253
314
|
id: "sidebar-shell",
|
|
254
315
|
name: "Sidebar application shell",
|
|
255
316
|
useWhen: [
|
|
256
|
-
"The screen needs persistent section navigation."
|
|
317
|
+
"The screen needs persistent section navigation and you are composing the shell by hand."
|
|
257
318
|
],
|
|
258
319
|
compose: [
|
|
259
320
|
"TSidebar",
|
|
@@ -262,7 +323,8 @@ var treeui_catalog_default = {
|
|
|
262
323
|
"TContainer"
|
|
263
324
|
],
|
|
264
325
|
notes: [
|
|
265
|
-
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible."
|
|
326
|
+
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible.",
|
|
327
|
+
"Prefer `TAppShell` (recipe `app-shell`) when you also need full-viewport sizing and a responsive mobile drawer."
|
|
266
328
|
]
|
|
267
329
|
},
|
|
268
330
|
{
|
|
@@ -360,15 +422,38 @@ var treeui_catalog_default = {
|
|
|
360
422
|
id: "chart-surface",
|
|
361
423
|
name: "Chart surface",
|
|
362
424
|
useWhen: [
|
|
363
|
-
"A screen needs data visualization
|
|
425
|
+
"A screen needs data visualization inside a framed, titled surface."
|
|
364
426
|
],
|
|
365
427
|
compose: [
|
|
366
428
|
"TCard",
|
|
367
429
|
"TStack",
|
|
368
|
-
"
|
|
430
|
+
"TChart",
|
|
431
|
+
"TSelect"
|
|
432
|
+
],
|
|
433
|
+
notes: [
|
|
434
|
+
"Prefer the native TChart / TDonutChart / TSparkline \u2014 no external charting library is required.",
|
|
435
|
+
"Use TreeUI for the surrounding surface, headings, badges, range filters, and empty/loading states.",
|
|
436
|
+
"TChart has its own loading and empty slots; you can still wrap it in TCard for the frame.",
|
|
437
|
+
"Only reach for an external chart engine for chart types TreeUI does not cover yet (e.g. scatter, heatmap)."
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
id: "metric-dashboard",
|
|
442
|
+
name: "Metric dashboard",
|
|
443
|
+
useWhen: [
|
|
444
|
+
"A dashboard shows KPIs alongside trends and breakdowns."
|
|
445
|
+
],
|
|
446
|
+
compose: [
|
|
447
|
+
"TStat",
|
|
448
|
+
"TSparkline",
|
|
449
|
+
"TChart",
|
|
450
|
+
"TDonutChart",
|
|
451
|
+
"TGrid"
|
|
369
452
|
],
|
|
370
453
|
notes: [
|
|
371
|
-
"
|
|
454
|
+
"Lead with TStat tiles; embed a TSparkline in a stat's meta slot for the inline trend.",
|
|
455
|
+
"Use one TChart for the main time series and a TDonutChart for a part-of-whole split.",
|
|
456
|
+
"Keep series colors stable across the dashboard \u2014 rely on the --tree-color-chart-* order, do not remap by rank."
|
|
372
457
|
]
|
|
373
458
|
},
|
|
374
459
|
{
|
|
@@ -518,17 +603,27 @@ var treeui_catalog_default = {
|
|
|
518
603
|
"Use `accept`, `multiple`, and size limits in the app layer to constrain uploads."
|
|
519
604
|
]
|
|
520
605
|
},
|
|
606
|
+
TAppShell: {
|
|
607
|
+
required: [],
|
|
608
|
+
notes: [
|
|
609
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
610
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
611
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
612
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
613
|
+
]
|
|
614
|
+
},
|
|
521
615
|
TSidebar: {
|
|
522
616
|
required: [],
|
|
523
617
|
notes: [
|
|
524
618
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
525
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
619
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
620
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
526
621
|
]
|
|
527
622
|
},
|
|
528
623
|
TNavMenu: {
|
|
529
624
|
required: [],
|
|
530
625
|
notes: [
|
|
531
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
626
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
532
627
|
]
|
|
533
628
|
},
|
|
534
629
|
TTreeView: {
|
|
@@ -562,6 +657,32 @@ var treeui_catalog_default = {
|
|
|
562
657
|
"Use `href` for native links.",
|
|
563
658
|
"Use `to` when the app has vue-router and breadcrumb items should render RouterLink."
|
|
564
659
|
]
|
|
660
|
+
},
|
|
661
|
+
TChart: {
|
|
662
|
+
required: [],
|
|
663
|
+
notes: [
|
|
664
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
665
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
666
|
+
"Series colors come from `--tree-color-chart-1..8` in order; pass `color` per series to override \u2014 do not remap colors when the series set changes.",
|
|
667
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
668
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
TSparkline: {
|
|
672
|
+
required: [],
|
|
673
|
+
notes: [
|
|
674
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
675
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
676
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
TDonutChart: {
|
|
680
|
+
required: [],
|
|
681
|
+
notes: [
|
|
682
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
683
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
684
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
685
|
+
]
|
|
565
686
|
}
|
|
566
687
|
},
|
|
567
688
|
appPatterns: {
|
|
@@ -575,6 +696,9 @@ var treeui_catalog_default = {
|
|
|
575
696
|
commonCompositions: [
|
|
576
697
|
"TFormField + input-like control",
|
|
577
698
|
"TGrid + TStat",
|
|
699
|
+
"TStat + TSparkline",
|
|
700
|
+
"TCard + TChart",
|
|
701
|
+
"TAppShell + TNavMenu",
|
|
578
702
|
"TSidebar + TNavMenu",
|
|
579
703
|
"TTable + TPagination",
|
|
580
704
|
"TPricing + TPricingCard"
|
|
@@ -735,6 +859,211 @@ var treeui_catalog_default = {
|
|
|
735
859
|
},
|
|
736
860
|
recipes: []
|
|
737
861
|
},
|
|
862
|
+
{
|
|
863
|
+
name: "TAppShell",
|
|
864
|
+
aliases: [],
|
|
865
|
+
package: "@treeui/vue",
|
|
866
|
+
kind: "layout",
|
|
867
|
+
category: "Layout",
|
|
868
|
+
status: "available",
|
|
869
|
+
purpose: "Full-viewport application shell with a top header, a persistent side navigation, and a fluid content area that collapses the sidebar into an off-canvas drawer on small screens.",
|
|
870
|
+
sourceFile: "packages/vue/src/components/TAppShell.vue",
|
|
871
|
+
storyFile: "apps/docs/src/stories/AppShell.stories.ts",
|
|
872
|
+
storyTitle: "Components/Layout/AppShell",
|
|
873
|
+
manifestFile: "docs/ai/COMPONENTS/app-shell.yaml",
|
|
874
|
+
props: [
|
|
875
|
+
{
|
|
876
|
+
name: "as",
|
|
877
|
+
type: "string",
|
|
878
|
+
default: "div"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: "side",
|
|
882
|
+
type: "TSidebarSide",
|
|
883
|
+
default: "left",
|
|
884
|
+
values: [
|
|
885
|
+
"left",
|
|
886
|
+
"right"
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
name: "sidebarWidth",
|
|
891
|
+
type: "string",
|
|
892
|
+
default: "17.5rem"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
name: "collapsedWidth",
|
|
896
|
+
type: "string",
|
|
897
|
+
default: "4.75rem"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
name: "collapsible",
|
|
901
|
+
type: "boolean",
|
|
902
|
+
default: "false"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "collapsed",
|
|
906
|
+
type: "boolean",
|
|
907
|
+
default: "undefined"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "defaultCollapsed",
|
|
911
|
+
type: "boolean",
|
|
912
|
+
default: "false"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "mobile",
|
|
916
|
+
type: "boolean",
|
|
917
|
+
default: "undefined"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
name: "breakpoint",
|
|
921
|
+
type: "string",
|
|
922
|
+
default: "768px"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
name: "sidebarOpen",
|
|
926
|
+
type: "boolean",
|
|
927
|
+
default: "undefined"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
name: "defaultSidebarOpen",
|
|
931
|
+
type: "boolean",
|
|
932
|
+
default: "false"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: "closeOnEscape",
|
|
936
|
+
type: "boolean",
|
|
937
|
+
default: "true"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "closeOnOverlay",
|
|
941
|
+
type: "boolean",
|
|
942
|
+
default: "true"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
name: "showMenuButton",
|
|
946
|
+
type: "boolean",
|
|
947
|
+
default: "true"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: "menuLabel",
|
|
951
|
+
type: "string",
|
|
952
|
+
default: "Open menu"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
name: "closeLabel",
|
|
956
|
+
type: "string",
|
|
957
|
+
default: "Close menu"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
name: "sidebarLabel",
|
|
961
|
+
type: "string",
|
|
962
|
+
default: "Sidebar"
|
|
963
|
+
}
|
|
964
|
+
],
|
|
965
|
+
events: [
|
|
966
|
+
{
|
|
967
|
+
name: "update:collapsed"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
name: "collapse-change"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: "update:sidebarOpen"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
name: "sidebar-open-change"
|
|
977
|
+
}
|
|
978
|
+
],
|
|
979
|
+
slots: [
|
|
980
|
+
{
|
|
981
|
+
name: "header"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: "sidebar"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
name: "default"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
name: "menu-icon"
|
|
991
|
+
}
|
|
992
|
+
],
|
|
993
|
+
a11y: [
|
|
994
|
+
"role: dialog",
|
|
995
|
+
"aria_modal: true",
|
|
996
|
+
"focus_trap: true",
|
|
997
|
+
"restores_focus_on_close: true",
|
|
998
|
+
"escape_closes_when_enabled: true",
|
|
999
|
+
"menu_button_aria_expanded: true",
|
|
1000
|
+
"menu_button_aria_controls_drawer: true",
|
|
1001
|
+
"sidebar_labelled_by_sidebar_label: true"
|
|
1002
|
+
],
|
|
1003
|
+
behavior: [
|
|
1004
|
+
"fills_viewport_full_width_and_height: true",
|
|
1005
|
+
"header_spans_full_width_above_sidebar_and_content: true",
|
|
1006
|
+
"content_area_scrolls_independently: true",
|
|
1007
|
+
"auto_switches_to_mobile_at_breakpoint_when_mobile_undefined: true",
|
|
1008
|
+
"mobile_prop_forces_mobile_mode: true",
|
|
1009
|
+
"mobile_sidebar_becomes_off_canvas_drawer: true",
|
|
1010
|
+
"auto_menu_button_in_header_on_mobile: true",
|
|
1011
|
+
"controlled_and_uncontrolled_collapsed_state: true",
|
|
1012
|
+
"controlled_and_uncontrolled_sidebar_open_state: true",
|
|
1013
|
+
"provides_collapsed_state_to_descendants: true",
|
|
1014
|
+
"drawer_reports_collapsed_false_to_descendants_and_slots: true",
|
|
1015
|
+
"left_and_right_variants: true",
|
|
1016
|
+
"locks_body_scroll_while_drawer_open: true",
|
|
1017
|
+
"overlay_click_closes_when_enabled: true",
|
|
1018
|
+
"exposes_slot_props_with_mobile_collapsed_and_toggles: true"
|
|
1019
|
+
],
|
|
1020
|
+
selection: {
|
|
1021
|
+
keywords: [
|
|
1022
|
+
"app shell",
|
|
1023
|
+
"layout",
|
|
1024
|
+
"dashboard",
|
|
1025
|
+
"admin",
|
|
1026
|
+
"header sidebar",
|
|
1027
|
+
"full screen",
|
|
1028
|
+
"responsive shell",
|
|
1029
|
+
"off-canvas"
|
|
1030
|
+
],
|
|
1031
|
+
useWhen: [
|
|
1032
|
+
"You need a full-viewport application layout with a header, a side navigation, and a fluid content area.",
|
|
1033
|
+
"The layout should use the entire page width (not a centered max-width) and switch the sidebar to an off-canvas drawer on small screens."
|
|
1034
|
+
],
|
|
1035
|
+
avoidWhen: [
|
|
1036
|
+
"You only need one region (just a top bar, or just a side rail) \u2014 compose TNavbar or TSidebar directly.",
|
|
1037
|
+
"The page content should be centered with a readable max width \u2014 use TContainer inside the shell content instead."
|
|
1038
|
+
],
|
|
1039
|
+
alternatives: [
|
|
1040
|
+
{
|
|
1041
|
+
component: "TSidebar",
|
|
1042
|
+
when: "You want a standalone collapsible side rail without the header/content orchestration or responsive drawer."
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
component: "TNavbar",
|
|
1046
|
+
when: "You only need the top application bar."
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
component: "TDrawer",
|
|
1050
|
+
when: "You need a general temporary overlay panel rather than the shell's responsive navigation."
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
},
|
|
1054
|
+
setup: {
|
|
1055
|
+
required: [],
|
|
1056
|
+
notes: [
|
|
1057
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
1058
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
1059
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
1060
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
1061
|
+
]
|
|
1062
|
+
},
|
|
1063
|
+
recipes: [
|
|
1064
|
+
"app-shell"
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
738
1067
|
{
|
|
739
1068
|
name: "TAvatar",
|
|
740
1069
|
aliases: [],
|
|
@@ -1096,7 +1425,8 @@ var treeui_catalog_default = {
|
|
|
1096
1425
|
],
|
|
1097
1426
|
a11y: [],
|
|
1098
1427
|
behavior: [
|
|
1099
|
-
"body_wrapper_class:
|
|
1428
|
+
"body_wrapper_class: t-card__body",
|
|
1429
|
+
"solid_variant_rescopes_color_tokens_for_nested_content: true"
|
|
1100
1430
|
],
|
|
1101
1431
|
selection: {
|
|
1102
1432
|
keywords: [
|
|
@@ -1131,6 +1461,202 @@ var treeui_catalog_default = {
|
|
|
1131
1461
|
"chart-surface"
|
|
1132
1462
|
]
|
|
1133
1463
|
},
|
|
1464
|
+
{
|
|
1465
|
+
name: "TChart",
|
|
1466
|
+
aliases: [],
|
|
1467
|
+
package: "@treeui/vue",
|
|
1468
|
+
kind: "data-display",
|
|
1469
|
+
category: "Data Display",
|
|
1470
|
+
status: "available",
|
|
1471
|
+
purpose: "Lightweight cartesian chart (line, area, bar) for multi-series data, with axes, gridlines, hover tooltip, legend, and an accessible data table. No external charting dependency.",
|
|
1472
|
+
sourceFile: "packages/vue/src/components/TChart.vue",
|
|
1473
|
+
storyFile: "apps/docs/src/stories/Chart.stories.ts",
|
|
1474
|
+
storyTitle: "Components/Data Display/Chart",
|
|
1475
|
+
manifestFile: "docs/ai/COMPONENTS/chart.yaml",
|
|
1476
|
+
props: [
|
|
1477
|
+
{
|
|
1478
|
+
name: "type",
|
|
1479
|
+
type: "TChartType",
|
|
1480
|
+
default: "line",
|
|
1481
|
+
values: [
|
|
1482
|
+
"line",
|
|
1483
|
+
"area",
|
|
1484
|
+
"bar"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
name: "series",
|
|
1489
|
+
type: "TChartSeries[]",
|
|
1490
|
+
default: "[]",
|
|
1491
|
+
note: "Each item is { name: string; data: number[]; color?: string }."
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
name: "labels",
|
|
1495
|
+
type: "string[]",
|
|
1496
|
+
default: "[]",
|
|
1497
|
+
note: "X-axis categories, aligned index-for-index to each series' data."
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
name: "height",
|
|
1501
|
+
type: "number",
|
|
1502
|
+
default: "260",
|
|
1503
|
+
note: "Width is fluid (measured via ResizeObserver)."
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
name: "smooth",
|
|
1507
|
+
type: "boolean",
|
|
1508
|
+
default: "false",
|
|
1509
|
+
note: "Curved line/area."
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
name: "stacked",
|
|
1513
|
+
type: "boolean",
|
|
1514
|
+
default: "false",
|
|
1515
|
+
note: "Stacks bar series; ignored for line/area. Negative values are clamped to 0 in stacked mode (grouped mode renders them)."
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
name: "showGrid",
|
|
1519
|
+
type: "boolean",
|
|
1520
|
+
default: "true"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
name: "showLegend",
|
|
1524
|
+
type: "boolean",
|
|
1525
|
+
default: "auto (true when more than one series)"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
name: "showXAxis",
|
|
1529
|
+
type: "boolean",
|
|
1530
|
+
default: "true"
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
name: "showYAxis",
|
|
1534
|
+
type: "boolean",
|
|
1535
|
+
default: "true"
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "showTooltip",
|
|
1539
|
+
type: "boolean",
|
|
1540
|
+
default: "true"
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
name: "showPoints",
|
|
1544
|
+
type: "boolean",
|
|
1545
|
+
default: "false",
|
|
1546
|
+
note: "Always draw markers on line/area points."
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
name: "yTicks",
|
|
1550
|
+
type: "number",
|
|
1551
|
+
default: "5"
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
name: "valueFormat",
|
|
1555
|
+
type: "(value: number) => string",
|
|
1556
|
+
default: "locale integers for |value| >= 1000"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: "minY",
|
|
1560
|
+
type: "number",
|
|
1561
|
+
default: "auto"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
name: "maxY",
|
|
1565
|
+
type: "number",
|
|
1566
|
+
default: "auto"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
name: "animated",
|
|
1570
|
+
type: "boolean",
|
|
1571
|
+
default: "true",
|
|
1572
|
+
note: "Draw-in animation; disabled under prefers-reduced-motion."
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
name: "loading",
|
|
1576
|
+
type: "boolean",
|
|
1577
|
+
default: "false"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
name: "ariaLabel",
|
|
1581
|
+
type: "string",
|
|
1582
|
+
default: "auto-generated summary"
|
|
1583
|
+
}
|
|
1584
|
+
],
|
|
1585
|
+
events: [
|
|
1586
|
+
{
|
|
1587
|
+
name: "point-click",
|
|
1588
|
+
payload: "{ index: number; label: string; values: { name: string; value: number; color: string }[] }"
|
|
1589
|
+
}
|
|
1590
|
+
],
|
|
1591
|
+
slots: [
|
|
1592
|
+
{
|
|
1593
|
+
name: "legend"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "tooltip"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
name: "empty"
|
|
1600
|
+
}
|
|
1601
|
+
],
|
|
1602
|
+
a11y: [
|
|
1603
|
+
"SVG is aria-hidden; a visually-hidden <table> mirrors the series data for assistive tech.",
|
|
1604
|
+
"Legend defaults on for multiple series so identity is not color-only.",
|
|
1605
|
+
"Provide a meaningful ariaLabel describing what the chart shows."
|
|
1606
|
+
],
|
|
1607
|
+
behavior: [
|
|
1608
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-series color overrides",
|
|
1609
|
+
"bar_zero_baseline: true",
|
|
1610
|
+
"line_domain_uses_nice_ticks: true",
|
|
1611
|
+
"hover_shows_crosshair_and_tooltip: true"
|
|
1612
|
+
],
|
|
1613
|
+
selection: {
|
|
1614
|
+
keywords: [
|
|
1615
|
+
"chart",
|
|
1616
|
+
"graph",
|
|
1617
|
+
"line chart",
|
|
1618
|
+
"area chart",
|
|
1619
|
+
"bar chart",
|
|
1620
|
+
"plot",
|
|
1621
|
+
"dashboard",
|
|
1622
|
+
"time series",
|
|
1623
|
+
"analytics"
|
|
1624
|
+
],
|
|
1625
|
+
useWhen: [
|
|
1626
|
+
"You need a line, area, or bar chart with axes, gridlines, legend, and a hover tooltip.",
|
|
1627
|
+
"One or more series share a set of category labels."
|
|
1628
|
+
],
|
|
1629
|
+
avoidWhen: [
|
|
1630
|
+
"A single value tells the story \u2014 use TStat.",
|
|
1631
|
+
"You only need an inline trend with no axes \u2014 use TSparkline.",
|
|
1632
|
+
"The data is a part-of-whole breakdown \u2014 use TDonutChart."
|
|
1633
|
+
],
|
|
1634
|
+
alternatives: [
|
|
1635
|
+
{
|
|
1636
|
+
component: "TSparkline",
|
|
1637
|
+
when: "The trend should be inline and axis-less."
|
|
1638
|
+
},
|
|
1639
|
+
{
|
|
1640
|
+
component: "TDonutChart",
|
|
1641
|
+
when: "The data is proportional (parts of a whole)."
|
|
1642
|
+
}
|
|
1643
|
+
]
|
|
1644
|
+
},
|
|
1645
|
+
setup: {
|
|
1646
|
+
required: [],
|
|
1647
|
+
notes: [
|
|
1648
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
1649
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
1650
|
+
"Series colors come from `--tree-color-chart-1..8` in order; pass `color` per series to override \u2014 do not remap colors when the series set changes.",
|
|
1651
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
1652
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
recipes: [
|
|
1656
|
+
"chart-surface",
|
|
1657
|
+
"metric-dashboard"
|
|
1658
|
+
]
|
|
1659
|
+
},
|
|
1134
1660
|
{
|
|
1135
1661
|
name: "TCheckbox",
|
|
1136
1662
|
aliases: [],
|
|
@@ -2102,6 +2628,142 @@ var treeui_catalog_default = {
|
|
|
2102
2628
|
},
|
|
2103
2629
|
recipes: []
|
|
2104
2630
|
},
|
|
2631
|
+
{
|
|
2632
|
+
name: "TDonutChart",
|
|
2633
|
+
aliases: [],
|
|
2634
|
+
package: "@treeui/vue",
|
|
2635
|
+
kind: "data-display",
|
|
2636
|
+
category: "Data Display",
|
|
2637
|
+
status: "available",
|
|
2638
|
+
purpose: "Part-of-whole chart rendered as a donut (default) or full pie, with a legend, percentages, an interactive center readout, and an accessible label.",
|
|
2639
|
+
sourceFile: "packages/vue/src/components/TDonutChart.vue",
|
|
2640
|
+
storyFile: "apps/docs/src/stories/DonutChart.stories.ts",
|
|
2641
|
+
storyTitle: "Components/Data Display/Donut Chart",
|
|
2642
|
+
manifestFile: "docs/ai/COMPONENTS/donut-chart.yaml",
|
|
2643
|
+
props: [
|
|
2644
|
+
{
|
|
2645
|
+
name: "segments",
|
|
2646
|
+
type: "TDonutSegment[]",
|
|
2647
|
+
default: "[]",
|
|
2648
|
+
note: "Each item is { label: string; value: number; color?: string }. Non-positive values are omitted."
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
name: "size",
|
|
2652
|
+
type: "number",
|
|
2653
|
+
default: "200",
|
|
2654
|
+
note: "Square canvas in px."
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
name: "thickness",
|
|
2658
|
+
type: "number",
|
|
2659
|
+
default: "26",
|
|
2660
|
+
note: "Ring thickness; 0 renders a full pie."
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
name: "gap",
|
|
2664
|
+
type: "number",
|
|
2665
|
+
default: "2",
|
|
2666
|
+
note: "Gap between slices, in degrees."
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
name: "rounded",
|
|
2670
|
+
type: "boolean",
|
|
2671
|
+
default: "false",
|
|
2672
|
+
note: "Round the ends of donut segments (widens the gap to make room). Best with a thinner ring."
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
name: "showLegend",
|
|
2676
|
+
type: "boolean",
|
|
2677
|
+
default: "true"
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
name: "showPercent",
|
|
2681
|
+
type: "boolean",
|
|
2682
|
+
default: "true"
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
name: "centerLabel",
|
|
2686
|
+
type: "string",
|
|
2687
|
+
default: "Total",
|
|
2688
|
+
note: "Donut only; ignored for pie."
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
name: "centerValue",
|
|
2692
|
+
type: "string | number",
|
|
2693
|
+
default: "auto (sum of values)"
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
name: "valueFormat",
|
|
2697
|
+
type: "(value: number) => string",
|
|
2698
|
+
default: "locale integers for |value| >= 1000"
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
name: "loading",
|
|
2702
|
+
type: "boolean",
|
|
2703
|
+
default: "false"
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
name: "ariaLabel",
|
|
2707
|
+
type: "string",
|
|
2708
|
+
default: "auto-generated summary"
|
|
2709
|
+
}
|
|
2710
|
+
],
|
|
2711
|
+
events: [],
|
|
2712
|
+
slots: [
|
|
2713
|
+
{
|
|
2714
|
+
name: "center"
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
name: "empty"
|
|
2718
|
+
}
|
|
2719
|
+
],
|
|
2720
|
+
a11y: [
|
|
2721
|
+
"Renders role=img with an aria-label summarizing the chart.",
|
|
2722
|
+
"Legend + percentages give a non-visual reading of each slice."
|
|
2723
|
+
],
|
|
2724
|
+
behavior: [
|
|
2725
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-segment color overrides",
|
|
2726
|
+
"hovering_a_slice_dims_the_rest_and_updates_center: true",
|
|
2727
|
+
"center_shows_total_or_the_hovered_segment: true"
|
|
2728
|
+
],
|
|
2729
|
+
selection: {
|
|
2730
|
+
keywords: [
|
|
2731
|
+
"donut",
|
|
2732
|
+
"doughnut",
|
|
2733
|
+
"pie",
|
|
2734
|
+
"proportion",
|
|
2735
|
+
"share",
|
|
2736
|
+
"breakdown",
|
|
2737
|
+
"part of whole",
|
|
2738
|
+
"percentage"
|
|
2739
|
+
],
|
|
2740
|
+
useWhen: [
|
|
2741
|
+
"You are showing how a total splits into a handful of categories.",
|
|
2742
|
+
"A donut center readout (total or hovered slice) is useful."
|
|
2743
|
+
],
|
|
2744
|
+
avoidWhen: [
|
|
2745
|
+
"There are many categories or precise comparison matters \u2014 use TChart bars.",
|
|
2746
|
+
"The data is a trend over time \u2014 use TChart or TSparkline."
|
|
2747
|
+
],
|
|
2748
|
+
alternatives: [
|
|
2749
|
+
{
|
|
2750
|
+
component: "TChart",
|
|
2751
|
+
when: "Precise magnitude comparison across categories is needed (bars)."
|
|
2752
|
+
}
|
|
2753
|
+
]
|
|
2754
|
+
},
|
|
2755
|
+
setup: {
|
|
2756
|
+
required: [],
|
|
2757
|
+
notes: [
|
|
2758
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
2759
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
2760
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
2761
|
+
]
|
|
2762
|
+
},
|
|
2763
|
+
recipes: [
|
|
2764
|
+
"metric-dashboard"
|
|
2765
|
+
]
|
|
2766
|
+
},
|
|
2105
2767
|
{
|
|
2106
2768
|
name: "TDrawer",
|
|
2107
2769
|
aliases: [],
|
|
@@ -2303,6 +2965,16 @@ var treeui_catalog_default = {
|
|
|
2303
2965
|
name: "label",
|
|
2304
2966
|
type: "string",
|
|
2305
2967
|
default: ""
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
name: "align",
|
|
2971
|
+
type: "TDropdownAlign",
|
|
2972
|
+
default: "start",
|
|
2973
|
+
values: [
|
|
2974
|
+
"start",
|
|
2975
|
+
"end"
|
|
2976
|
+
],
|
|
2977
|
+
note: "Horizontal alignment of the menu relative to the trigger. Use `end` when the trigger sits near the right edge of a clipping container (e.g. a table actions column)."
|
|
2306
2978
|
}
|
|
2307
2979
|
],
|
|
2308
2980
|
events: [
|
|
@@ -2338,7 +3010,8 @@ var treeui_catalog_default = {
|
|
|
2338
3010
|
behavior: [
|
|
2339
3011
|
"outside_click_closes_menu: true",
|
|
2340
3012
|
"focus_restores_on_close: true",
|
|
2341
|
-
"chevron_rotates_when_open: true"
|
|
3013
|
+
"chevron_rotates_when_open: true",
|
|
3014
|
+
"menu_grows_to_fit_items_without_wrapping: true"
|
|
2342
3015
|
],
|
|
2343
3016
|
selection: {
|
|
2344
3017
|
keywords: [
|
|
@@ -2838,7 +3511,8 @@ var treeui_catalog_default = {
|
|
|
2838
3511
|
},
|
|
2839
3512
|
recipes: [
|
|
2840
3513
|
"date-range-form",
|
|
2841
|
-
"stat-grid"
|
|
3514
|
+
"stat-grid",
|
|
3515
|
+
"metric-dashboard"
|
|
2842
3516
|
]
|
|
2843
3517
|
},
|
|
2844
3518
|
{
|
|
@@ -3728,10 +4402,11 @@ var treeui_catalog_default = {
|
|
|
3728
4402
|
setup: {
|
|
3729
4403
|
required: [],
|
|
3730
4404
|
notes: [
|
|
3731
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
4405
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
3732
4406
|
]
|
|
3733
4407
|
},
|
|
3734
4408
|
recipes: [
|
|
4409
|
+
"app-shell",
|
|
3735
4410
|
"sidebar-shell"
|
|
3736
4411
|
]
|
|
3737
4412
|
},
|
|
@@ -4558,7 +5233,8 @@ var treeui_catalog_default = {
|
|
|
4558
5233
|
"check_icon_on_selected_option: true",
|
|
4559
5234
|
"outside_click_closes_dropdown: true",
|
|
4560
5235
|
"focus_restores_on_close: true",
|
|
4561
|
-
"numeric_values_supported_without_string_coercion: true"
|
|
5236
|
+
"numeric_values_supported_without_string_coercion: true",
|
|
5237
|
+
"listbox_flips_above_trigger_when_space_below_is_insufficient: true"
|
|
4562
5238
|
],
|
|
4563
5239
|
selection: {
|
|
4564
5240
|
keywords: [
|
|
@@ -4591,7 +5267,9 @@ var treeui_catalog_default = {
|
|
|
4591
5267
|
"Use `placeholder` when no selection has been made."
|
|
4592
5268
|
]
|
|
4593
5269
|
},
|
|
4594
|
-
recipes: [
|
|
5270
|
+
recipes: [
|
|
5271
|
+
"chart-surface"
|
|
5272
|
+
]
|
|
4595
5273
|
},
|
|
4596
5274
|
{
|
|
4597
5275
|
name: "TSelectableList",
|
|
@@ -4813,7 +5491,8 @@ var treeui_catalog_default = {
|
|
|
4813
5491
|
"controlled_and_uncontrolled_collapsed_state: true",
|
|
4814
5492
|
"provides_collapsed_state_to_descendants: true",
|
|
4815
5493
|
"left_and_right_variants: true",
|
|
4816
|
-
"exposes_slot_props_with_collapsed_state: true"
|
|
5494
|
+
"exposes_slot_props_with_collapsed_state: true",
|
|
5495
|
+
"collapsed_state_centers_header_and_footer_content: true"
|
|
4817
5496
|
],
|
|
4818
5497
|
selection: {
|
|
4819
5498
|
keywords: [
|
|
@@ -4838,7 +5517,8 @@ var treeui_catalog_default = {
|
|
|
4838
5517
|
required: [],
|
|
4839
5518
|
notes: [
|
|
4840
5519
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
4841
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
5520
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
5521
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
4842
5522
|
]
|
|
4843
5523
|
},
|
|
4844
5524
|
recipes: [
|
|
@@ -4908,6 +5588,129 @@ var treeui_catalog_default = {
|
|
|
4908
5588
|
},
|
|
4909
5589
|
recipes: []
|
|
4910
5590
|
},
|
|
5591
|
+
{
|
|
5592
|
+
name: "TSparkline",
|
|
5593
|
+
aliases: [],
|
|
5594
|
+
package: "@treeui/vue",
|
|
5595
|
+
kind: "data-display",
|
|
5596
|
+
category: "Data Display",
|
|
5597
|
+
status: "available",
|
|
5598
|
+
purpose: "Tiny, axis-less inline trend chart (line, area, or bar) sized for stat tiles, table cells, and running text.",
|
|
5599
|
+
sourceFile: "packages/vue/src/components/TSparkline.vue",
|
|
5600
|
+
storyFile: "apps/docs/src/stories/Sparkline.stories.ts",
|
|
5601
|
+
storyTitle: "Components/Data Display/Sparkline",
|
|
5602
|
+
manifestFile: "docs/ai/COMPONENTS/sparkline.yaml",
|
|
5603
|
+
props: [
|
|
5604
|
+
{
|
|
5605
|
+
name: "data",
|
|
5606
|
+
type: "number[]",
|
|
5607
|
+
default: "[]"
|
|
5608
|
+
},
|
|
5609
|
+
{
|
|
5610
|
+
name: "type",
|
|
5611
|
+
type: "line | area | bar",
|
|
5612
|
+
default: "line"
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
name: "color",
|
|
5616
|
+
type: "string",
|
|
5617
|
+
default: "var(--tree-color-chart-1)",
|
|
5618
|
+
note: "Any CSS color."
|
|
5619
|
+
},
|
|
5620
|
+
{
|
|
5621
|
+
name: "width",
|
|
5622
|
+
type: "number",
|
|
5623
|
+
default: "120"
|
|
5624
|
+
},
|
|
5625
|
+
{
|
|
5626
|
+
name: "height",
|
|
5627
|
+
type: "number",
|
|
5628
|
+
default: "32"
|
|
5629
|
+
},
|
|
5630
|
+
{
|
|
5631
|
+
name: "smooth",
|
|
5632
|
+
type: "boolean",
|
|
5633
|
+
default: "false",
|
|
5634
|
+
note: "Curved line/area."
|
|
5635
|
+
},
|
|
5636
|
+
{
|
|
5637
|
+
name: "strokeWidth",
|
|
5638
|
+
type: "number",
|
|
5639
|
+
default: "2",
|
|
5640
|
+
note: "Line/area only."
|
|
5641
|
+
},
|
|
5642
|
+
{
|
|
5643
|
+
name: "min",
|
|
5644
|
+
type: "number",
|
|
5645
|
+
default: "data min"
|
|
5646
|
+
},
|
|
5647
|
+
{
|
|
5648
|
+
name: "max",
|
|
5649
|
+
type: "number",
|
|
5650
|
+
default: "data max"
|
|
5651
|
+
},
|
|
5652
|
+
{
|
|
5653
|
+
name: "showLastPoint",
|
|
5654
|
+
type: "boolean",
|
|
5655
|
+
default: "false",
|
|
5656
|
+
note: "Marker on the final point (line/area)."
|
|
5657
|
+
},
|
|
5658
|
+
{
|
|
5659
|
+
name: "ariaLabel",
|
|
5660
|
+
type: "string",
|
|
5661
|
+
default: "Trend sparkline"
|
|
5662
|
+
}
|
|
5663
|
+
],
|
|
5664
|
+
events: [],
|
|
5665
|
+
slots: [],
|
|
5666
|
+
a11y: [
|
|
5667
|
+
"Renders role=img with an aria-label; pass a specific one for meaningful trends.",
|
|
5668
|
+
"Pair with a visible number \u2014 a sparkline supplements a value, it does not replace it."
|
|
5669
|
+
],
|
|
5670
|
+
behavior: [
|
|
5671
|
+
"no_axes_or_legend: true",
|
|
5672
|
+
"flat_series_renders_centered: true",
|
|
5673
|
+
"scales_to_intrinsic_width_and_height: true"
|
|
5674
|
+
],
|
|
5675
|
+
selection: {
|
|
5676
|
+
keywords: [
|
|
5677
|
+
"sparkline",
|
|
5678
|
+
"mini chart",
|
|
5679
|
+
"inline chart",
|
|
5680
|
+
"micro trend",
|
|
5681
|
+
"trend line",
|
|
5682
|
+
"table chart"
|
|
5683
|
+
],
|
|
5684
|
+
useWhen: [
|
|
5685
|
+
"You want a compact trend beside a value, in a table cell, or inline in text.",
|
|
5686
|
+
"No axes, legend, or tooltip are required."
|
|
5687
|
+
],
|
|
5688
|
+
avoidWhen: [
|
|
5689
|
+
"You need axes, multiple labeled series, or a tooltip \u2014 use TChart."
|
|
5690
|
+
],
|
|
5691
|
+
alternatives: [
|
|
5692
|
+
{
|
|
5693
|
+
component: "TChart",
|
|
5694
|
+
when: "The chart needs axes, a legend, or a tooltip."
|
|
5695
|
+
},
|
|
5696
|
+
{
|
|
5697
|
+
component: "TStat",
|
|
5698
|
+
when: "A single value with a trend badge is enough."
|
|
5699
|
+
}
|
|
5700
|
+
]
|
|
5701
|
+
},
|
|
5702
|
+
setup: {
|
|
5703
|
+
required: [],
|
|
5704
|
+
notes: [
|
|
5705
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
5706
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
5707
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
5708
|
+
]
|
|
5709
|
+
},
|
|
5710
|
+
recipes: [
|
|
5711
|
+
"metric-dashboard"
|
|
5712
|
+
]
|
|
5713
|
+
},
|
|
4911
5714
|
{
|
|
4912
5715
|
name: "TSpinner",
|
|
4913
5716
|
aliases: [],
|
|
@@ -5161,6 +5964,10 @@ var treeui_catalog_default = {
|
|
|
5161
5964
|
{
|
|
5162
5965
|
component: "TCard",
|
|
5163
5966
|
when: "The content is not a metric."
|
|
5967
|
+
},
|
|
5968
|
+
{
|
|
5969
|
+
component: "TSparkline",
|
|
5970
|
+
when: "You want to show the metric's trend as an inline mini-chart."
|
|
5164
5971
|
}
|
|
5165
5972
|
]
|
|
5166
5973
|
},
|
|
@@ -5169,7 +5976,8 @@ var treeui_catalog_default = {
|
|
|
5169
5976
|
notes: []
|
|
5170
5977
|
},
|
|
5171
5978
|
recipes: [
|
|
5172
|
-
"stat-grid"
|
|
5979
|
+
"stat-grid",
|
|
5980
|
+
"metric-dashboard"
|
|
5173
5981
|
]
|
|
5174
5982
|
},
|
|
5175
5983
|
{
|