@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
package/dist/cli.cjs
CHANGED
|
@@ -34,9 +34,9 @@ var import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
|
34
34
|
|
|
35
35
|
// src/generated/treeui.catalog.json
|
|
36
36
|
var treeui_catalog_default = {
|
|
37
|
-
generatedAt: "2026-
|
|
37
|
+
generatedAt: "2026-07-15T22:47:49.302Z",
|
|
38
38
|
packageName: "@treeui/vue",
|
|
39
|
-
packageVersion: "0.
|
|
39
|
+
packageVersion: "0.13.0",
|
|
40
40
|
decisionGuides: [
|
|
41
41
|
{
|
|
42
42
|
id: "single-choice",
|
|
@@ -234,6 +234,50 @@ var treeui_catalog_default = {
|
|
|
234
234
|
notes: []
|
|
235
235
|
}
|
|
236
236
|
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: "data-viz-choice",
|
|
240
|
+
question: "Visualize numeric data",
|
|
241
|
+
options: [
|
|
242
|
+
{
|
|
243
|
+
use: "TStat",
|
|
244
|
+
when: [
|
|
245
|
+
"The story is a single headline number, optionally with a trend and delta.",
|
|
246
|
+
"It is not a plot \u2014 prefer the number over a chart when one value says it."
|
|
247
|
+
],
|
|
248
|
+
notes: []
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
use: "TSparkline",
|
|
252
|
+
when: [
|
|
253
|
+
"You want an inline micro-trend next to a value, in a table cell, or in text.",
|
|
254
|
+
"No axes, legend, or tooltip are needed."
|
|
255
|
+
],
|
|
256
|
+
notes: []
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
use: "TChart",
|
|
260
|
+
when: [
|
|
261
|
+
"You need line, area, or bar plots with axes, gridlines, legend, and hover tooltip.",
|
|
262
|
+
"There are one or more series over shared categories."
|
|
263
|
+
],
|
|
264
|
+
notes: []
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
use: "TDonutChart",
|
|
268
|
+
when: [
|
|
269
|
+
"The data is a part-of-whole breakdown (donut or pie)."
|
|
270
|
+
],
|
|
271
|
+
notes: []
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
use: "TProgress",
|
|
275
|
+
when: [
|
|
276
|
+
"You are showing completion toward a single target, not a distribution or trend."
|
|
277
|
+
],
|
|
278
|
+
notes: []
|
|
279
|
+
}
|
|
280
|
+
]
|
|
237
281
|
}
|
|
238
282
|
],
|
|
239
283
|
recipes: [
|
|
@@ -283,11 +327,28 @@ var treeui_catalog_default = {
|
|
|
283
327
|
"Set end `min` from the selected start time when appropriate."
|
|
284
328
|
]
|
|
285
329
|
},
|
|
330
|
+
{
|
|
331
|
+
id: "app-shell",
|
|
332
|
+
name: "Full-viewport application shell",
|
|
333
|
+
useWhen: [
|
|
334
|
+
"The app needs a header plus side navigation that fills the whole screen and adapts to mobile.",
|
|
335
|
+
"The layout must use the full page width on large monitors, not a centered column."
|
|
336
|
+
],
|
|
337
|
+
compose: [
|
|
338
|
+
"TAppShell",
|
|
339
|
+
"TNavMenu"
|
|
340
|
+
],
|
|
341
|
+
notes: [
|
|
342
|
+
"`TAppShell` orchestrates the header, sidebar, and fluid content in one component; put a `TNavMenu` in its `sidebar` slot and it inherits collapsed state automatically.",
|
|
343
|
+
"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.",
|
|
344
|
+
"Mount it at the app root. Wrap only inner regions in `TContainer` if a specific area needs a constrained reading width."
|
|
345
|
+
]
|
|
346
|
+
},
|
|
286
347
|
{
|
|
287
348
|
id: "sidebar-shell",
|
|
288
349
|
name: "Sidebar application shell",
|
|
289
350
|
useWhen: [
|
|
290
|
-
"The screen needs persistent section navigation."
|
|
351
|
+
"The screen needs persistent section navigation and you are composing the shell by hand."
|
|
291
352
|
],
|
|
292
353
|
compose: [
|
|
293
354
|
"TSidebar",
|
|
@@ -296,7 +357,8 @@ var treeui_catalog_default = {
|
|
|
296
357
|
"TContainer"
|
|
297
358
|
],
|
|
298
359
|
notes: [
|
|
299
|
-
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible."
|
|
360
|
+
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible.",
|
|
361
|
+
"Prefer `TAppShell` (recipe `app-shell`) when you also need full-viewport sizing and a responsive mobile drawer."
|
|
300
362
|
]
|
|
301
363
|
},
|
|
302
364
|
{
|
|
@@ -394,15 +456,38 @@ var treeui_catalog_default = {
|
|
|
394
456
|
id: "chart-surface",
|
|
395
457
|
name: "Chart surface",
|
|
396
458
|
useWhen: [
|
|
397
|
-
"A screen needs data visualization
|
|
459
|
+
"A screen needs data visualization inside a framed, titled surface."
|
|
398
460
|
],
|
|
399
461
|
compose: [
|
|
400
462
|
"TCard",
|
|
401
463
|
"TStack",
|
|
402
|
-
"
|
|
464
|
+
"TChart",
|
|
465
|
+
"TSelect"
|
|
466
|
+
],
|
|
467
|
+
notes: [
|
|
468
|
+
"Prefer the native TChart / TDonutChart / TSparkline \u2014 no external charting library is required.",
|
|
469
|
+
"Use TreeUI for the surrounding surface, headings, badges, range filters, and empty/loading states.",
|
|
470
|
+
"TChart has its own loading and empty slots; you can still wrap it in TCard for the frame.",
|
|
471
|
+
"Only reach for an external chart engine for chart types TreeUI does not cover yet (e.g. scatter, heatmap)."
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: "metric-dashboard",
|
|
476
|
+
name: "Metric dashboard",
|
|
477
|
+
useWhen: [
|
|
478
|
+
"A dashboard shows KPIs alongside trends and breakdowns."
|
|
479
|
+
],
|
|
480
|
+
compose: [
|
|
481
|
+
"TStat",
|
|
482
|
+
"TSparkline",
|
|
483
|
+
"TChart",
|
|
484
|
+
"TDonutChart",
|
|
485
|
+
"TGrid"
|
|
403
486
|
],
|
|
404
487
|
notes: [
|
|
405
|
-
"
|
|
488
|
+
"Lead with TStat tiles; embed a TSparkline in a stat's meta slot for the inline trend.",
|
|
489
|
+
"Use one TChart for the main time series and a TDonutChart for a part-of-whole split.",
|
|
490
|
+
"Keep series colors stable across the dashboard \u2014 rely on the --tree-color-chart-* order, do not remap by rank."
|
|
406
491
|
]
|
|
407
492
|
},
|
|
408
493
|
{
|
|
@@ -552,17 +637,27 @@ var treeui_catalog_default = {
|
|
|
552
637
|
"Use `accept`, `multiple`, and size limits in the app layer to constrain uploads."
|
|
553
638
|
]
|
|
554
639
|
},
|
|
640
|
+
TAppShell: {
|
|
641
|
+
required: [],
|
|
642
|
+
notes: [
|
|
643
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
644
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
645
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
646
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
647
|
+
]
|
|
648
|
+
},
|
|
555
649
|
TSidebar: {
|
|
556
650
|
required: [],
|
|
557
651
|
notes: [
|
|
558
652
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
559
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
653
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
654
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
560
655
|
]
|
|
561
656
|
},
|
|
562
657
|
TNavMenu: {
|
|
563
658
|
required: [],
|
|
564
659
|
notes: [
|
|
565
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
660
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
566
661
|
]
|
|
567
662
|
},
|
|
568
663
|
TTreeView: {
|
|
@@ -596,6 +691,32 @@ var treeui_catalog_default = {
|
|
|
596
691
|
"Use `href` for native links.",
|
|
597
692
|
"Use `to` when the app has vue-router and breadcrumb items should render RouterLink."
|
|
598
693
|
]
|
|
694
|
+
},
|
|
695
|
+
TChart: {
|
|
696
|
+
required: [],
|
|
697
|
+
notes: [
|
|
698
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
699
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
700
|
+
"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.",
|
|
701
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
702
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
703
|
+
]
|
|
704
|
+
},
|
|
705
|
+
TSparkline: {
|
|
706
|
+
required: [],
|
|
707
|
+
notes: [
|
|
708
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
709
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
710
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
TDonutChart: {
|
|
714
|
+
required: [],
|
|
715
|
+
notes: [
|
|
716
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
717
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
718
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
719
|
+
]
|
|
599
720
|
}
|
|
600
721
|
},
|
|
601
722
|
appPatterns: {
|
|
@@ -609,6 +730,9 @@ var treeui_catalog_default = {
|
|
|
609
730
|
commonCompositions: [
|
|
610
731
|
"TFormField + input-like control",
|
|
611
732
|
"TGrid + TStat",
|
|
733
|
+
"TStat + TSparkline",
|
|
734
|
+
"TCard + TChart",
|
|
735
|
+
"TAppShell + TNavMenu",
|
|
612
736
|
"TSidebar + TNavMenu",
|
|
613
737
|
"TTable + TPagination",
|
|
614
738
|
"TPricing + TPricingCard"
|
|
@@ -769,6 +893,211 @@ var treeui_catalog_default = {
|
|
|
769
893
|
},
|
|
770
894
|
recipes: []
|
|
771
895
|
},
|
|
896
|
+
{
|
|
897
|
+
name: "TAppShell",
|
|
898
|
+
aliases: [],
|
|
899
|
+
package: "@treeui/vue",
|
|
900
|
+
kind: "layout",
|
|
901
|
+
category: "Layout",
|
|
902
|
+
status: "available",
|
|
903
|
+
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.",
|
|
904
|
+
sourceFile: "packages/vue/src/components/TAppShell.vue",
|
|
905
|
+
storyFile: "apps/docs/src/stories/AppShell.stories.ts",
|
|
906
|
+
storyTitle: "Components/Layout/AppShell",
|
|
907
|
+
manifestFile: "docs/ai/COMPONENTS/app-shell.yaml",
|
|
908
|
+
props: [
|
|
909
|
+
{
|
|
910
|
+
name: "as",
|
|
911
|
+
type: "string",
|
|
912
|
+
default: "div"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "side",
|
|
916
|
+
type: "TSidebarSide",
|
|
917
|
+
default: "left",
|
|
918
|
+
values: [
|
|
919
|
+
"left",
|
|
920
|
+
"right"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
name: "sidebarWidth",
|
|
925
|
+
type: "string",
|
|
926
|
+
default: "17.5rem"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
name: "collapsedWidth",
|
|
930
|
+
type: "string",
|
|
931
|
+
default: "4.75rem"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: "collapsible",
|
|
935
|
+
type: "boolean",
|
|
936
|
+
default: "false"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
name: "collapsed",
|
|
940
|
+
type: "boolean",
|
|
941
|
+
default: "undefined"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
name: "defaultCollapsed",
|
|
945
|
+
type: "boolean",
|
|
946
|
+
default: "false"
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: "mobile",
|
|
950
|
+
type: "boolean",
|
|
951
|
+
default: "undefined"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: "breakpoint",
|
|
955
|
+
type: "string",
|
|
956
|
+
default: "768px"
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
name: "sidebarOpen",
|
|
960
|
+
type: "boolean",
|
|
961
|
+
default: "undefined"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
name: "defaultSidebarOpen",
|
|
965
|
+
type: "boolean",
|
|
966
|
+
default: "false"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
name: "closeOnEscape",
|
|
970
|
+
type: "boolean",
|
|
971
|
+
default: "true"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
name: "closeOnOverlay",
|
|
975
|
+
type: "boolean",
|
|
976
|
+
default: "true"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: "showMenuButton",
|
|
980
|
+
type: "boolean",
|
|
981
|
+
default: "true"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: "menuLabel",
|
|
985
|
+
type: "string",
|
|
986
|
+
default: "Open menu"
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
name: "closeLabel",
|
|
990
|
+
type: "string",
|
|
991
|
+
default: "Close menu"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: "sidebarLabel",
|
|
995
|
+
type: "string",
|
|
996
|
+
default: "Sidebar"
|
|
997
|
+
}
|
|
998
|
+
],
|
|
999
|
+
events: [
|
|
1000
|
+
{
|
|
1001
|
+
name: "update:collapsed"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
name: "collapse-change"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "update:sidebarOpen"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
name: "sidebar-open-change"
|
|
1011
|
+
}
|
|
1012
|
+
],
|
|
1013
|
+
slots: [
|
|
1014
|
+
{
|
|
1015
|
+
name: "header"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
name: "sidebar"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
name: "default"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
name: "menu-icon"
|
|
1025
|
+
}
|
|
1026
|
+
],
|
|
1027
|
+
a11y: [
|
|
1028
|
+
"role: dialog",
|
|
1029
|
+
"aria_modal: true",
|
|
1030
|
+
"focus_trap: true",
|
|
1031
|
+
"restores_focus_on_close: true",
|
|
1032
|
+
"escape_closes_when_enabled: true",
|
|
1033
|
+
"menu_button_aria_expanded: true",
|
|
1034
|
+
"menu_button_aria_controls_drawer: true",
|
|
1035
|
+
"sidebar_labelled_by_sidebar_label: true"
|
|
1036
|
+
],
|
|
1037
|
+
behavior: [
|
|
1038
|
+
"fills_viewport_full_width_and_height: true",
|
|
1039
|
+
"header_spans_full_width_above_sidebar_and_content: true",
|
|
1040
|
+
"content_area_scrolls_independently: true",
|
|
1041
|
+
"auto_switches_to_mobile_at_breakpoint_when_mobile_undefined: true",
|
|
1042
|
+
"mobile_prop_forces_mobile_mode: true",
|
|
1043
|
+
"mobile_sidebar_becomes_off_canvas_drawer: true",
|
|
1044
|
+
"auto_menu_button_in_header_on_mobile: true",
|
|
1045
|
+
"controlled_and_uncontrolled_collapsed_state: true",
|
|
1046
|
+
"controlled_and_uncontrolled_sidebar_open_state: true",
|
|
1047
|
+
"provides_collapsed_state_to_descendants: true",
|
|
1048
|
+
"drawer_reports_collapsed_false_to_descendants_and_slots: true",
|
|
1049
|
+
"left_and_right_variants: true",
|
|
1050
|
+
"locks_body_scroll_while_drawer_open: true",
|
|
1051
|
+
"overlay_click_closes_when_enabled: true",
|
|
1052
|
+
"exposes_slot_props_with_mobile_collapsed_and_toggles: true"
|
|
1053
|
+
],
|
|
1054
|
+
selection: {
|
|
1055
|
+
keywords: [
|
|
1056
|
+
"app shell",
|
|
1057
|
+
"layout",
|
|
1058
|
+
"dashboard",
|
|
1059
|
+
"admin",
|
|
1060
|
+
"header sidebar",
|
|
1061
|
+
"full screen",
|
|
1062
|
+
"responsive shell",
|
|
1063
|
+
"off-canvas"
|
|
1064
|
+
],
|
|
1065
|
+
useWhen: [
|
|
1066
|
+
"You need a full-viewport application layout with a header, a side navigation, and a fluid content area.",
|
|
1067
|
+
"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."
|
|
1068
|
+
],
|
|
1069
|
+
avoidWhen: [
|
|
1070
|
+
"You only need one region (just a top bar, or just a side rail) \u2014 compose TNavbar or TSidebar directly.",
|
|
1071
|
+
"The page content should be centered with a readable max width \u2014 use TContainer inside the shell content instead."
|
|
1072
|
+
],
|
|
1073
|
+
alternatives: [
|
|
1074
|
+
{
|
|
1075
|
+
component: "TSidebar",
|
|
1076
|
+
when: "You want a standalone collapsible side rail without the header/content orchestration or responsive drawer."
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
component: "TNavbar",
|
|
1080
|
+
when: "You only need the top application bar."
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
component: "TDrawer",
|
|
1084
|
+
when: "You need a general temporary overlay panel rather than the shell's responsive navigation."
|
|
1085
|
+
}
|
|
1086
|
+
]
|
|
1087
|
+
},
|
|
1088
|
+
setup: {
|
|
1089
|
+
required: [],
|
|
1090
|
+
notes: [
|
|
1091
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
1092
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
1093
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
1094
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
1095
|
+
]
|
|
1096
|
+
},
|
|
1097
|
+
recipes: [
|
|
1098
|
+
"app-shell"
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
772
1101
|
{
|
|
773
1102
|
name: "TAvatar",
|
|
774
1103
|
aliases: [],
|
|
@@ -1130,7 +1459,8 @@ var treeui_catalog_default = {
|
|
|
1130
1459
|
],
|
|
1131
1460
|
a11y: [],
|
|
1132
1461
|
behavior: [
|
|
1133
|
-
"body_wrapper_class:
|
|
1462
|
+
"body_wrapper_class: t-card__body",
|
|
1463
|
+
"solid_variant_rescopes_color_tokens_for_nested_content: true"
|
|
1134
1464
|
],
|
|
1135
1465
|
selection: {
|
|
1136
1466
|
keywords: [
|
|
@@ -1165,6 +1495,202 @@ var treeui_catalog_default = {
|
|
|
1165
1495
|
"chart-surface"
|
|
1166
1496
|
]
|
|
1167
1497
|
},
|
|
1498
|
+
{
|
|
1499
|
+
name: "TChart",
|
|
1500
|
+
aliases: [],
|
|
1501
|
+
package: "@treeui/vue",
|
|
1502
|
+
kind: "data-display",
|
|
1503
|
+
category: "Data Display",
|
|
1504
|
+
status: "available",
|
|
1505
|
+
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.",
|
|
1506
|
+
sourceFile: "packages/vue/src/components/TChart.vue",
|
|
1507
|
+
storyFile: "apps/docs/src/stories/Chart.stories.ts",
|
|
1508
|
+
storyTitle: "Components/Data Display/Chart",
|
|
1509
|
+
manifestFile: "docs/ai/COMPONENTS/chart.yaml",
|
|
1510
|
+
props: [
|
|
1511
|
+
{
|
|
1512
|
+
name: "type",
|
|
1513
|
+
type: "TChartType",
|
|
1514
|
+
default: "line",
|
|
1515
|
+
values: [
|
|
1516
|
+
"line",
|
|
1517
|
+
"area",
|
|
1518
|
+
"bar"
|
|
1519
|
+
]
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
name: "series",
|
|
1523
|
+
type: "TChartSeries[]",
|
|
1524
|
+
default: "[]",
|
|
1525
|
+
note: "Each item is { name: string; data: number[]; color?: string }."
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
name: "labels",
|
|
1529
|
+
type: "string[]",
|
|
1530
|
+
default: "[]",
|
|
1531
|
+
note: "X-axis categories, aligned index-for-index to each series' data."
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
name: "height",
|
|
1535
|
+
type: "number",
|
|
1536
|
+
default: "260",
|
|
1537
|
+
note: "Width is fluid (measured via ResizeObserver)."
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
name: "smooth",
|
|
1541
|
+
type: "boolean",
|
|
1542
|
+
default: "false",
|
|
1543
|
+
note: "Curved line/area."
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: "stacked",
|
|
1547
|
+
type: "boolean",
|
|
1548
|
+
default: "false",
|
|
1549
|
+
note: "Stacks bar series; ignored for line/area. Negative values are clamped to 0 in stacked mode (grouped mode renders them)."
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
name: "showGrid",
|
|
1553
|
+
type: "boolean",
|
|
1554
|
+
default: "true"
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
name: "showLegend",
|
|
1558
|
+
type: "boolean",
|
|
1559
|
+
default: "auto (true when more than one series)"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
name: "showXAxis",
|
|
1563
|
+
type: "boolean",
|
|
1564
|
+
default: "true"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: "showYAxis",
|
|
1568
|
+
type: "boolean",
|
|
1569
|
+
default: "true"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
name: "showTooltip",
|
|
1573
|
+
type: "boolean",
|
|
1574
|
+
default: "true"
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
name: "showPoints",
|
|
1578
|
+
type: "boolean",
|
|
1579
|
+
default: "false",
|
|
1580
|
+
note: "Always draw markers on line/area points."
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
name: "yTicks",
|
|
1584
|
+
type: "number",
|
|
1585
|
+
default: "5"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
name: "valueFormat",
|
|
1589
|
+
type: "(value: number) => string",
|
|
1590
|
+
default: "locale integers for |value| >= 1000"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
name: "minY",
|
|
1594
|
+
type: "number",
|
|
1595
|
+
default: "auto"
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
name: "maxY",
|
|
1599
|
+
type: "number",
|
|
1600
|
+
default: "auto"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
name: "animated",
|
|
1604
|
+
type: "boolean",
|
|
1605
|
+
default: "true",
|
|
1606
|
+
note: "Draw-in animation; disabled under prefers-reduced-motion."
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
name: "loading",
|
|
1610
|
+
type: "boolean",
|
|
1611
|
+
default: "false"
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
name: "ariaLabel",
|
|
1615
|
+
type: "string",
|
|
1616
|
+
default: "auto-generated summary"
|
|
1617
|
+
}
|
|
1618
|
+
],
|
|
1619
|
+
events: [
|
|
1620
|
+
{
|
|
1621
|
+
name: "point-click",
|
|
1622
|
+
payload: "{ index: number; label: string; values: { name: string; value: number; color: string }[] }"
|
|
1623
|
+
}
|
|
1624
|
+
],
|
|
1625
|
+
slots: [
|
|
1626
|
+
{
|
|
1627
|
+
name: "legend"
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
name: "tooltip"
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
name: "empty"
|
|
1634
|
+
}
|
|
1635
|
+
],
|
|
1636
|
+
a11y: [
|
|
1637
|
+
"SVG is aria-hidden; a visually-hidden <table> mirrors the series data for assistive tech.",
|
|
1638
|
+
"Legend defaults on for multiple series so identity is not color-only.",
|
|
1639
|
+
"Provide a meaningful ariaLabel describing what the chart shows."
|
|
1640
|
+
],
|
|
1641
|
+
behavior: [
|
|
1642
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-series color overrides",
|
|
1643
|
+
"bar_zero_baseline: true",
|
|
1644
|
+
"line_domain_uses_nice_ticks: true",
|
|
1645
|
+
"hover_shows_crosshair_and_tooltip: true"
|
|
1646
|
+
],
|
|
1647
|
+
selection: {
|
|
1648
|
+
keywords: [
|
|
1649
|
+
"chart",
|
|
1650
|
+
"graph",
|
|
1651
|
+
"line chart",
|
|
1652
|
+
"area chart",
|
|
1653
|
+
"bar chart",
|
|
1654
|
+
"plot",
|
|
1655
|
+
"dashboard",
|
|
1656
|
+
"time series",
|
|
1657
|
+
"analytics"
|
|
1658
|
+
],
|
|
1659
|
+
useWhen: [
|
|
1660
|
+
"You need a line, area, or bar chart with axes, gridlines, legend, and a hover tooltip.",
|
|
1661
|
+
"One or more series share a set of category labels."
|
|
1662
|
+
],
|
|
1663
|
+
avoidWhen: [
|
|
1664
|
+
"A single value tells the story \u2014 use TStat.",
|
|
1665
|
+
"You only need an inline trend with no axes \u2014 use TSparkline.",
|
|
1666
|
+
"The data is a part-of-whole breakdown \u2014 use TDonutChart."
|
|
1667
|
+
],
|
|
1668
|
+
alternatives: [
|
|
1669
|
+
{
|
|
1670
|
+
component: "TSparkline",
|
|
1671
|
+
when: "The trend should be inline and axis-less."
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
component: "TDonutChart",
|
|
1675
|
+
when: "The data is proportional (parts of a whole)."
|
|
1676
|
+
}
|
|
1677
|
+
]
|
|
1678
|
+
},
|
|
1679
|
+
setup: {
|
|
1680
|
+
required: [],
|
|
1681
|
+
notes: [
|
|
1682
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
1683
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
1684
|
+
"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.",
|
|
1685
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
1686
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1689
|
+
recipes: [
|
|
1690
|
+
"chart-surface",
|
|
1691
|
+
"metric-dashboard"
|
|
1692
|
+
]
|
|
1693
|
+
},
|
|
1168
1694
|
{
|
|
1169
1695
|
name: "TCheckbox",
|
|
1170
1696
|
aliases: [],
|
|
@@ -2136,6 +2662,142 @@ var treeui_catalog_default = {
|
|
|
2136
2662
|
},
|
|
2137
2663
|
recipes: []
|
|
2138
2664
|
},
|
|
2665
|
+
{
|
|
2666
|
+
name: "TDonutChart",
|
|
2667
|
+
aliases: [],
|
|
2668
|
+
package: "@treeui/vue",
|
|
2669
|
+
kind: "data-display",
|
|
2670
|
+
category: "Data Display",
|
|
2671
|
+
status: "available",
|
|
2672
|
+
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.",
|
|
2673
|
+
sourceFile: "packages/vue/src/components/TDonutChart.vue",
|
|
2674
|
+
storyFile: "apps/docs/src/stories/DonutChart.stories.ts",
|
|
2675
|
+
storyTitle: "Components/Data Display/Donut Chart",
|
|
2676
|
+
manifestFile: "docs/ai/COMPONENTS/donut-chart.yaml",
|
|
2677
|
+
props: [
|
|
2678
|
+
{
|
|
2679
|
+
name: "segments",
|
|
2680
|
+
type: "TDonutSegment[]",
|
|
2681
|
+
default: "[]",
|
|
2682
|
+
note: "Each item is { label: string; value: number; color?: string }. Non-positive values are omitted."
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
name: "size",
|
|
2686
|
+
type: "number",
|
|
2687
|
+
default: "200",
|
|
2688
|
+
note: "Square canvas in px."
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
name: "thickness",
|
|
2692
|
+
type: "number",
|
|
2693
|
+
default: "26",
|
|
2694
|
+
note: "Ring thickness; 0 renders a full pie."
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
name: "gap",
|
|
2698
|
+
type: "number",
|
|
2699
|
+
default: "2",
|
|
2700
|
+
note: "Gap between slices, in degrees."
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
name: "rounded",
|
|
2704
|
+
type: "boolean",
|
|
2705
|
+
default: "false",
|
|
2706
|
+
note: "Round the ends of donut segments (widens the gap to make room). Best with a thinner ring."
|
|
2707
|
+
},
|
|
2708
|
+
{
|
|
2709
|
+
name: "showLegend",
|
|
2710
|
+
type: "boolean",
|
|
2711
|
+
default: "true"
|
|
2712
|
+
},
|
|
2713
|
+
{
|
|
2714
|
+
name: "showPercent",
|
|
2715
|
+
type: "boolean",
|
|
2716
|
+
default: "true"
|
|
2717
|
+
},
|
|
2718
|
+
{
|
|
2719
|
+
name: "centerLabel",
|
|
2720
|
+
type: "string",
|
|
2721
|
+
default: "Total",
|
|
2722
|
+
note: "Donut only; ignored for pie."
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
name: "centerValue",
|
|
2726
|
+
type: "string | number",
|
|
2727
|
+
default: "auto (sum of values)"
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
name: "valueFormat",
|
|
2731
|
+
type: "(value: number) => string",
|
|
2732
|
+
default: "locale integers for |value| >= 1000"
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
name: "loading",
|
|
2736
|
+
type: "boolean",
|
|
2737
|
+
default: "false"
|
|
2738
|
+
},
|
|
2739
|
+
{
|
|
2740
|
+
name: "ariaLabel",
|
|
2741
|
+
type: "string",
|
|
2742
|
+
default: "auto-generated summary"
|
|
2743
|
+
}
|
|
2744
|
+
],
|
|
2745
|
+
events: [],
|
|
2746
|
+
slots: [
|
|
2747
|
+
{
|
|
2748
|
+
name: "center"
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
name: "empty"
|
|
2752
|
+
}
|
|
2753
|
+
],
|
|
2754
|
+
a11y: [
|
|
2755
|
+
"Renders role=img with an aria-label summarizing the chart.",
|
|
2756
|
+
"Legend + percentages give a non-visual reading of each slice."
|
|
2757
|
+
],
|
|
2758
|
+
behavior: [
|
|
2759
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-segment color overrides",
|
|
2760
|
+
"hovering_a_slice_dims_the_rest_and_updates_center: true",
|
|
2761
|
+
"center_shows_total_or_the_hovered_segment: true"
|
|
2762
|
+
],
|
|
2763
|
+
selection: {
|
|
2764
|
+
keywords: [
|
|
2765
|
+
"donut",
|
|
2766
|
+
"doughnut",
|
|
2767
|
+
"pie",
|
|
2768
|
+
"proportion",
|
|
2769
|
+
"share",
|
|
2770
|
+
"breakdown",
|
|
2771
|
+
"part of whole",
|
|
2772
|
+
"percentage"
|
|
2773
|
+
],
|
|
2774
|
+
useWhen: [
|
|
2775
|
+
"You are showing how a total splits into a handful of categories.",
|
|
2776
|
+
"A donut center readout (total or hovered slice) is useful."
|
|
2777
|
+
],
|
|
2778
|
+
avoidWhen: [
|
|
2779
|
+
"There are many categories or precise comparison matters \u2014 use TChart bars.",
|
|
2780
|
+
"The data is a trend over time \u2014 use TChart or TSparkline."
|
|
2781
|
+
],
|
|
2782
|
+
alternatives: [
|
|
2783
|
+
{
|
|
2784
|
+
component: "TChart",
|
|
2785
|
+
when: "Precise magnitude comparison across categories is needed (bars)."
|
|
2786
|
+
}
|
|
2787
|
+
]
|
|
2788
|
+
},
|
|
2789
|
+
setup: {
|
|
2790
|
+
required: [],
|
|
2791
|
+
notes: [
|
|
2792
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
2793
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
2794
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
2795
|
+
]
|
|
2796
|
+
},
|
|
2797
|
+
recipes: [
|
|
2798
|
+
"metric-dashboard"
|
|
2799
|
+
]
|
|
2800
|
+
},
|
|
2139
2801
|
{
|
|
2140
2802
|
name: "TDrawer",
|
|
2141
2803
|
aliases: [],
|
|
@@ -2337,6 +2999,16 @@ var treeui_catalog_default = {
|
|
|
2337
2999
|
name: "label",
|
|
2338
3000
|
type: "string",
|
|
2339
3001
|
default: ""
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
name: "align",
|
|
3005
|
+
type: "TDropdownAlign",
|
|
3006
|
+
default: "start",
|
|
3007
|
+
values: [
|
|
3008
|
+
"start",
|
|
3009
|
+
"end"
|
|
3010
|
+
],
|
|
3011
|
+
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)."
|
|
2340
3012
|
}
|
|
2341
3013
|
],
|
|
2342
3014
|
events: [
|
|
@@ -2372,7 +3044,8 @@ var treeui_catalog_default = {
|
|
|
2372
3044
|
behavior: [
|
|
2373
3045
|
"outside_click_closes_menu: true",
|
|
2374
3046
|
"focus_restores_on_close: true",
|
|
2375
|
-
"chevron_rotates_when_open: true"
|
|
3047
|
+
"chevron_rotates_when_open: true",
|
|
3048
|
+
"menu_grows_to_fit_items_without_wrapping: true"
|
|
2376
3049
|
],
|
|
2377
3050
|
selection: {
|
|
2378
3051
|
keywords: [
|
|
@@ -2872,7 +3545,8 @@ var treeui_catalog_default = {
|
|
|
2872
3545
|
},
|
|
2873
3546
|
recipes: [
|
|
2874
3547
|
"date-range-form",
|
|
2875
|
-
"stat-grid"
|
|
3548
|
+
"stat-grid",
|
|
3549
|
+
"metric-dashboard"
|
|
2876
3550
|
]
|
|
2877
3551
|
},
|
|
2878
3552
|
{
|
|
@@ -3762,10 +4436,11 @@ var treeui_catalog_default = {
|
|
|
3762
4436
|
setup: {
|
|
3763
4437
|
required: [],
|
|
3764
4438
|
notes: [
|
|
3765
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
4439
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
3766
4440
|
]
|
|
3767
4441
|
},
|
|
3768
4442
|
recipes: [
|
|
4443
|
+
"app-shell",
|
|
3769
4444
|
"sidebar-shell"
|
|
3770
4445
|
]
|
|
3771
4446
|
},
|
|
@@ -4592,7 +5267,8 @@ var treeui_catalog_default = {
|
|
|
4592
5267
|
"check_icon_on_selected_option: true",
|
|
4593
5268
|
"outside_click_closes_dropdown: true",
|
|
4594
5269
|
"focus_restores_on_close: true",
|
|
4595
|
-
"numeric_values_supported_without_string_coercion: true"
|
|
5270
|
+
"numeric_values_supported_without_string_coercion: true",
|
|
5271
|
+
"listbox_flips_above_trigger_when_space_below_is_insufficient: true"
|
|
4596
5272
|
],
|
|
4597
5273
|
selection: {
|
|
4598
5274
|
keywords: [
|
|
@@ -4625,7 +5301,9 @@ var treeui_catalog_default = {
|
|
|
4625
5301
|
"Use `placeholder` when no selection has been made."
|
|
4626
5302
|
]
|
|
4627
5303
|
},
|
|
4628
|
-
recipes: [
|
|
5304
|
+
recipes: [
|
|
5305
|
+
"chart-surface"
|
|
5306
|
+
]
|
|
4629
5307
|
},
|
|
4630
5308
|
{
|
|
4631
5309
|
name: "TSelectableList",
|
|
@@ -4847,7 +5525,8 @@ var treeui_catalog_default = {
|
|
|
4847
5525
|
"controlled_and_uncontrolled_collapsed_state: true",
|
|
4848
5526
|
"provides_collapsed_state_to_descendants: true",
|
|
4849
5527
|
"left_and_right_variants: true",
|
|
4850
|
-
"exposes_slot_props_with_collapsed_state: true"
|
|
5528
|
+
"exposes_slot_props_with_collapsed_state: true",
|
|
5529
|
+
"collapsed_state_centers_header_and_footer_content: true"
|
|
4851
5530
|
],
|
|
4852
5531
|
selection: {
|
|
4853
5532
|
keywords: [
|
|
@@ -4872,7 +5551,8 @@ var treeui_catalog_default = {
|
|
|
4872
5551
|
required: [],
|
|
4873
5552
|
notes: [
|
|
4874
5553
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
4875
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
5554
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
5555
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
4876
5556
|
]
|
|
4877
5557
|
},
|
|
4878
5558
|
recipes: [
|
|
@@ -4942,6 +5622,129 @@ var treeui_catalog_default = {
|
|
|
4942
5622
|
},
|
|
4943
5623
|
recipes: []
|
|
4944
5624
|
},
|
|
5625
|
+
{
|
|
5626
|
+
name: "TSparkline",
|
|
5627
|
+
aliases: [],
|
|
5628
|
+
package: "@treeui/vue",
|
|
5629
|
+
kind: "data-display",
|
|
5630
|
+
category: "Data Display",
|
|
5631
|
+
status: "available",
|
|
5632
|
+
purpose: "Tiny, axis-less inline trend chart (line, area, or bar) sized for stat tiles, table cells, and running text.",
|
|
5633
|
+
sourceFile: "packages/vue/src/components/TSparkline.vue",
|
|
5634
|
+
storyFile: "apps/docs/src/stories/Sparkline.stories.ts",
|
|
5635
|
+
storyTitle: "Components/Data Display/Sparkline",
|
|
5636
|
+
manifestFile: "docs/ai/COMPONENTS/sparkline.yaml",
|
|
5637
|
+
props: [
|
|
5638
|
+
{
|
|
5639
|
+
name: "data",
|
|
5640
|
+
type: "number[]",
|
|
5641
|
+
default: "[]"
|
|
5642
|
+
},
|
|
5643
|
+
{
|
|
5644
|
+
name: "type",
|
|
5645
|
+
type: "line | area | bar",
|
|
5646
|
+
default: "line"
|
|
5647
|
+
},
|
|
5648
|
+
{
|
|
5649
|
+
name: "color",
|
|
5650
|
+
type: "string",
|
|
5651
|
+
default: "var(--tree-color-chart-1)",
|
|
5652
|
+
note: "Any CSS color."
|
|
5653
|
+
},
|
|
5654
|
+
{
|
|
5655
|
+
name: "width",
|
|
5656
|
+
type: "number",
|
|
5657
|
+
default: "120"
|
|
5658
|
+
},
|
|
5659
|
+
{
|
|
5660
|
+
name: "height",
|
|
5661
|
+
type: "number",
|
|
5662
|
+
default: "32"
|
|
5663
|
+
},
|
|
5664
|
+
{
|
|
5665
|
+
name: "smooth",
|
|
5666
|
+
type: "boolean",
|
|
5667
|
+
default: "false",
|
|
5668
|
+
note: "Curved line/area."
|
|
5669
|
+
},
|
|
5670
|
+
{
|
|
5671
|
+
name: "strokeWidth",
|
|
5672
|
+
type: "number",
|
|
5673
|
+
default: "2",
|
|
5674
|
+
note: "Line/area only."
|
|
5675
|
+
},
|
|
5676
|
+
{
|
|
5677
|
+
name: "min",
|
|
5678
|
+
type: "number",
|
|
5679
|
+
default: "data min"
|
|
5680
|
+
},
|
|
5681
|
+
{
|
|
5682
|
+
name: "max",
|
|
5683
|
+
type: "number",
|
|
5684
|
+
default: "data max"
|
|
5685
|
+
},
|
|
5686
|
+
{
|
|
5687
|
+
name: "showLastPoint",
|
|
5688
|
+
type: "boolean",
|
|
5689
|
+
default: "false",
|
|
5690
|
+
note: "Marker on the final point (line/area)."
|
|
5691
|
+
},
|
|
5692
|
+
{
|
|
5693
|
+
name: "ariaLabel",
|
|
5694
|
+
type: "string",
|
|
5695
|
+
default: "Trend sparkline"
|
|
5696
|
+
}
|
|
5697
|
+
],
|
|
5698
|
+
events: [],
|
|
5699
|
+
slots: [],
|
|
5700
|
+
a11y: [
|
|
5701
|
+
"Renders role=img with an aria-label; pass a specific one for meaningful trends.",
|
|
5702
|
+
"Pair with a visible number \u2014 a sparkline supplements a value, it does not replace it."
|
|
5703
|
+
],
|
|
5704
|
+
behavior: [
|
|
5705
|
+
"no_axes_or_legend: true",
|
|
5706
|
+
"flat_series_renders_centered: true",
|
|
5707
|
+
"scales_to_intrinsic_width_and_height: true"
|
|
5708
|
+
],
|
|
5709
|
+
selection: {
|
|
5710
|
+
keywords: [
|
|
5711
|
+
"sparkline",
|
|
5712
|
+
"mini chart",
|
|
5713
|
+
"inline chart",
|
|
5714
|
+
"micro trend",
|
|
5715
|
+
"trend line",
|
|
5716
|
+
"table chart"
|
|
5717
|
+
],
|
|
5718
|
+
useWhen: [
|
|
5719
|
+
"You want a compact trend beside a value, in a table cell, or inline in text.",
|
|
5720
|
+
"No axes, legend, or tooltip are required."
|
|
5721
|
+
],
|
|
5722
|
+
avoidWhen: [
|
|
5723
|
+
"You need axes, multiple labeled series, or a tooltip \u2014 use TChart."
|
|
5724
|
+
],
|
|
5725
|
+
alternatives: [
|
|
5726
|
+
{
|
|
5727
|
+
component: "TChart",
|
|
5728
|
+
when: "The chart needs axes, a legend, or a tooltip."
|
|
5729
|
+
},
|
|
5730
|
+
{
|
|
5731
|
+
component: "TStat",
|
|
5732
|
+
when: "A single value with a trend badge is enough."
|
|
5733
|
+
}
|
|
5734
|
+
]
|
|
5735
|
+
},
|
|
5736
|
+
setup: {
|
|
5737
|
+
required: [],
|
|
5738
|
+
notes: [
|
|
5739
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
5740
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
5741
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
5742
|
+
]
|
|
5743
|
+
},
|
|
5744
|
+
recipes: [
|
|
5745
|
+
"metric-dashboard"
|
|
5746
|
+
]
|
|
5747
|
+
},
|
|
4945
5748
|
{
|
|
4946
5749
|
name: "TSpinner",
|
|
4947
5750
|
aliases: [],
|
|
@@ -5195,6 +5998,10 @@ var treeui_catalog_default = {
|
|
|
5195
5998
|
{
|
|
5196
5999
|
component: "TCard",
|
|
5197
6000
|
when: "The content is not a metric."
|
|
6001
|
+
},
|
|
6002
|
+
{
|
|
6003
|
+
component: "TSparkline",
|
|
6004
|
+
when: "You want to show the metric's trend as an inline mini-chart."
|
|
5198
6005
|
}
|
|
5199
6006
|
]
|
|
5200
6007
|
},
|
|
@@ -5203,7 +6010,8 @@ var treeui_catalog_default = {
|
|
|
5203
6010
|
notes: []
|
|
5204
6011
|
},
|
|
5205
6012
|
recipes: [
|
|
5206
|
-
"stat-grid"
|
|
6013
|
+
"stat-grid",
|
|
6014
|
+
"metric-dashboard"
|
|
5207
6015
|
]
|
|
5208
6016
|
},
|
|
5209
6017
|
{
|