@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/index.cjs
CHANGED
|
@@ -47,9 +47,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
47
47
|
|
|
48
48
|
// src/generated/treeui.catalog.json
|
|
49
49
|
var treeui_catalog_default = {
|
|
50
|
-
generatedAt: "2026-
|
|
50
|
+
generatedAt: "2026-07-15T22:47:49.302Z",
|
|
51
51
|
packageName: "@treeui/vue",
|
|
52
|
-
packageVersion: "0.
|
|
52
|
+
packageVersion: "0.13.0",
|
|
53
53
|
decisionGuides: [
|
|
54
54
|
{
|
|
55
55
|
id: "single-choice",
|
|
@@ -247,6 +247,50 @@ var treeui_catalog_default = {
|
|
|
247
247
|
notes: []
|
|
248
248
|
}
|
|
249
249
|
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "data-viz-choice",
|
|
253
|
+
question: "Visualize numeric data",
|
|
254
|
+
options: [
|
|
255
|
+
{
|
|
256
|
+
use: "TStat",
|
|
257
|
+
when: [
|
|
258
|
+
"The story is a single headline number, optionally with a trend and delta.",
|
|
259
|
+
"It is not a plot \u2014 prefer the number over a chart when one value says it."
|
|
260
|
+
],
|
|
261
|
+
notes: []
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
use: "TSparkline",
|
|
265
|
+
when: [
|
|
266
|
+
"You want an inline micro-trend next to a value, in a table cell, or in text.",
|
|
267
|
+
"No axes, legend, or tooltip are needed."
|
|
268
|
+
],
|
|
269
|
+
notes: []
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
use: "TChart",
|
|
273
|
+
when: [
|
|
274
|
+
"You need line, area, or bar plots with axes, gridlines, legend, and hover tooltip.",
|
|
275
|
+
"There are one or more series over shared categories."
|
|
276
|
+
],
|
|
277
|
+
notes: []
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
use: "TDonutChart",
|
|
281
|
+
when: [
|
|
282
|
+
"The data is a part-of-whole breakdown (donut or pie)."
|
|
283
|
+
],
|
|
284
|
+
notes: []
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
use: "TProgress",
|
|
288
|
+
when: [
|
|
289
|
+
"You are showing completion toward a single target, not a distribution or trend."
|
|
290
|
+
],
|
|
291
|
+
notes: []
|
|
292
|
+
}
|
|
293
|
+
]
|
|
250
294
|
}
|
|
251
295
|
],
|
|
252
296
|
recipes: [
|
|
@@ -296,11 +340,28 @@ var treeui_catalog_default = {
|
|
|
296
340
|
"Set end `min` from the selected start time when appropriate."
|
|
297
341
|
]
|
|
298
342
|
},
|
|
343
|
+
{
|
|
344
|
+
id: "app-shell",
|
|
345
|
+
name: "Full-viewport application shell",
|
|
346
|
+
useWhen: [
|
|
347
|
+
"The app needs a header plus side navigation that fills the whole screen and adapts to mobile.",
|
|
348
|
+
"The layout must use the full page width on large monitors, not a centered column."
|
|
349
|
+
],
|
|
350
|
+
compose: [
|
|
351
|
+
"TAppShell",
|
|
352
|
+
"TNavMenu"
|
|
353
|
+
],
|
|
354
|
+
notes: [
|
|
355
|
+
"`TAppShell` orchestrates the header, sidebar, and fluid content in one component; put a `TNavMenu` in its `sidebar` slot and it inherits collapsed state automatically.",
|
|
356
|
+
"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.",
|
|
357
|
+
"Mount it at the app root. Wrap only inner regions in `TContainer` if a specific area needs a constrained reading width."
|
|
358
|
+
]
|
|
359
|
+
},
|
|
299
360
|
{
|
|
300
361
|
id: "sidebar-shell",
|
|
301
362
|
name: "Sidebar application shell",
|
|
302
363
|
useWhen: [
|
|
303
|
-
"The screen needs persistent section navigation."
|
|
364
|
+
"The screen needs persistent section navigation and you are composing the shell by hand."
|
|
304
365
|
],
|
|
305
366
|
compose: [
|
|
306
367
|
"TSidebar",
|
|
@@ -309,7 +370,8 @@ var treeui_catalog_default = {
|
|
|
309
370
|
"TContainer"
|
|
310
371
|
],
|
|
311
372
|
notes: [
|
|
312
|
-
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible."
|
|
373
|
+
"Let `TNavMenu` inherit collapsed state from `TSidebar` when possible.",
|
|
374
|
+
"Prefer `TAppShell` (recipe `app-shell`) when you also need full-viewport sizing and a responsive mobile drawer."
|
|
313
375
|
]
|
|
314
376
|
},
|
|
315
377
|
{
|
|
@@ -407,15 +469,38 @@ var treeui_catalog_default = {
|
|
|
407
469
|
id: "chart-surface",
|
|
408
470
|
name: "Chart surface",
|
|
409
471
|
useWhen: [
|
|
410
|
-
"A screen needs data visualization
|
|
472
|
+
"A screen needs data visualization inside a framed, titled surface."
|
|
411
473
|
],
|
|
412
474
|
compose: [
|
|
413
475
|
"TCard",
|
|
414
476
|
"TStack",
|
|
415
|
-
"
|
|
477
|
+
"TChart",
|
|
478
|
+
"TSelect"
|
|
479
|
+
],
|
|
480
|
+
notes: [
|
|
481
|
+
"Prefer the native TChart / TDonutChart / TSparkline \u2014 no external charting library is required.",
|
|
482
|
+
"Use TreeUI for the surrounding surface, headings, badges, range filters, and empty/loading states.",
|
|
483
|
+
"TChart has its own loading and empty slots; you can still wrap it in TCard for the frame.",
|
|
484
|
+
"Only reach for an external chart engine for chart types TreeUI does not cover yet (e.g. scatter, heatmap)."
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
id: "metric-dashboard",
|
|
489
|
+
name: "Metric dashboard",
|
|
490
|
+
useWhen: [
|
|
491
|
+
"A dashboard shows KPIs alongside trends and breakdowns."
|
|
492
|
+
],
|
|
493
|
+
compose: [
|
|
494
|
+
"TStat",
|
|
495
|
+
"TSparkline",
|
|
496
|
+
"TChart",
|
|
497
|
+
"TDonutChart",
|
|
498
|
+
"TGrid"
|
|
416
499
|
],
|
|
417
500
|
notes: [
|
|
418
|
-
"
|
|
501
|
+
"Lead with TStat tiles; embed a TSparkline in a stat's meta slot for the inline trend.",
|
|
502
|
+
"Use one TChart for the main time series and a TDonutChart for a part-of-whole split.",
|
|
503
|
+
"Keep series colors stable across the dashboard \u2014 rely on the --tree-color-chart-* order, do not remap by rank."
|
|
419
504
|
]
|
|
420
505
|
},
|
|
421
506
|
{
|
|
@@ -565,17 +650,27 @@ var treeui_catalog_default = {
|
|
|
565
650
|
"Use `accept`, `multiple`, and size limits in the app layer to constrain uploads."
|
|
566
651
|
]
|
|
567
652
|
},
|
|
653
|
+
TAppShell: {
|
|
654
|
+
required: [],
|
|
655
|
+
notes: [
|
|
656
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
657
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
658
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
659
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
660
|
+
]
|
|
661
|
+
},
|
|
568
662
|
TSidebar: {
|
|
569
663
|
required: [],
|
|
570
664
|
notes: [
|
|
571
665
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
572
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
666
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
667
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
573
668
|
]
|
|
574
669
|
},
|
|
575
670
|
TNavMenu: {
|
|
576
671
|
required: [],
|
|
577
672
|
notes: [
|
|
578
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
673
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
579
674
|
]
|
|
580
675
|
},
|
|
581
676
|
TTreeView: {
|
|
@@ -609,6 +704,32 @@ var treeui_catalog_default = {
|
|
|
609
704
|
"Use `href` for native links.",
|
|
610
705
|
"Use `to` when the app has vue-router and breadcrumb items should render RouterLink."
|
|
611
706
|
]
|
|
707
|
+
},
|
|
708
|
+
TChart: {
|
|
709
|
+
required: [],
|
|
710
|
+
notes: [
|
|
711
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
712
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
713
|
+
"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.",
|
|
714
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
715
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
TSparkline: {
|
|
719
|
+
required: [],
|
|
720
|
+
notes: [
|
|
721
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
722
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
723
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
TDonutChart: {
|
|
727
|
+
required: [],
|
|
728
|
+
notes: [
|
|
729
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
730
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
731
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
732
|
+
]
|
|
612
733
|
}
|
|
613
734
|
},
|
|
614
735
|
appPatterns: {
|
|
@@ -622,6 +743,9 @@ var treeui_catalog_default = {
|
|
|
622
743
|
commonCompositions: [
|
|
623
744
|
"TFormField + input-like control",
|
|
624
745
|
"TGrid + TStat",
|
|
746
|
+
"TStat + TSparkline",
|
|
747
|
+
"TCard + TChart",
|
|
748
|
+
"TAppShell + TNavMenu",
|
|
625
749
|
"TSidebar + TNavMenu",
|
|
626
750
|
"TTable + TPagination",
|
|
627
751
|
"TPricing + TPricingCard"
|
|
@@ -782,6 +906,211 @@ var treeui_catalog_default = {
|
|
|
782
906
|
},
|
|
783
907
|
recipes: []
|
|
784
908
|
},
|
|
909
|
+
{
|
|
910
|
+
name: "TAppShell",
|
|
911
|
+
aliases: [],
|
|
912
|
+
package: "@treeui/vue",
|
|
913
|
+
kind: "layout",
|
|
914
|
+
category: "Layout",
|
|
915
|
+
status: "available",
|
|
916
|
+
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.",
|
|
917
|
+
sourceFile: "packages/vue/src/components/TAppShell.vue",
|
|
918
|
+
storyFile: "apps/docs/src/stories/AppShell.stories.ts",
|
|
919
|
+
storyTitle: "Components/Layout/AppShell",
|
|
920
|
+
manifestFile: "docs/ai/COMPONENTS/app-shell.yaml",
|
|
921
|
+
props: [
|
|
922
|
+
{
|
|
923
|
+
name: "as",
|
|
924
|
+
type: "string",
|
|
925
|
+
default: "div"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
name: "side",
|
|
929
|
+
type: "TSidebarSide",
|
|
930
|
+
default: "left",
|
|
931
|
+
values: [
|
|
932
|
+
"left",
|
|
933
|
+
"right"
|
|
934
|
+
]
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
name: "sidebarWidth",
|
|
938
|
+
type: "string",
|
|
939
|
+
default: "17.5rem"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "collapsedWidth",
|
|
943
|
+
type: "string",
|
|
944
|
+
default: "4.75rem"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: "collapsible",
|
|
948
|
+
type: "boolean",
|
|
949
|
+
default: "false"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
name: "collapsed",
|
|
953
|
+
type: "boolean",
|
|
954
|
+
default: "undefined"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
name: "defaultCollapsed",
|
|
958
|
+
type: "boolean",
|
|
959
|
+
default: "false"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
name: "mobile",
|
|
963
|
+
type: "boolean",
|
|
964
|
+
default: "undefined"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
name: "breakpoint",
|
|
968
|
+
type: "string",
|
|
969
|
+
default: "768px"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
name: "sidebarOpen",
|
|
973
|
+
type: "boolean",
|
|
974
|
+
default: "undefined"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: "defaultSidebarOpen",
|
|
978
|
+
type: "boolean",
|
|
979
|
+
default: "false"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: "closeOnEscape",
|
|
983
|
+
type: "boolean",
|
|
984
|
+
default: "true"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
name: "closeOnOverlay",
|
|
988
|
+
type: "boolean",
|
|
989
|
+
default: "true"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: "showMenuButton",
|
|
993
|
+
type: "boolean",
|
|
994
|
+
default: "true"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
name: "menuLabel",
|
|
998
|
+
type: "string",
|
|
999
|
+
default: "Open menu"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "closeLabel",
|
|
1003
|
+
type: "string",
|
|
1004
|
+
default: "Close menu"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "sidebarLabel",
|
|
1008
|
+
type: "string",
|
|
1009
|
+
default: "Sidebar"
|
|
1010
|
+
}
|
|
1011
|
+
],
|
|
1012
|
+
events: [
|
|
1013
|
+
{
|
|
1014
|
+
name: "update:collapsed"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: "collapse-change"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
name: "update:sidebarOpen"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
name: "sidebar-open-change"
|
|
1024
|
+
}
|
|
1025
|
+
],
|
|
1026
|
+
slots: [
|
|
1027
|
+
{
|
|
1028
|
+
name: "header"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
name: "sidebar"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: "default"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
name: "menu-icon"
|
|
1038
|
+
}
|
|
1039
|
+
],
|
|
1040
|
+
a11y: [
|
|
1041
|
+
"role: dialog",
|
|
1042
|
+
"aria_modal: true",
|
|
1043
|
+
"focus_trap: true",
|
|
1044
|
+
"restores_focus_on_close: true",
|
|
1045
|
+
"escape_closes_when_enabled: true",
|
|
1046
|
+
"menu_button_aria_expanded: true",
|
|
1047
|
+
"menu_button_aria_controls_drawer: true",
|
|
1048
|
+
"sidebar_labelled_by_sidebar_label: true"
|
|
1049
|
+
],
|
|
1050
|
+
behavior: [
|
|
1051
|
+
"fills_viewport_full_width_and_height: true",
|
|
1052
|
+
"header_spans_full_width_above_sidebar_and_content: true",
|
|
1053
|
+
"content_area_scrolls_independently: true",
|
|
1054
|
+
"auto_switches_to_mobile_at_breakpoint_when_mobile_undefined: true",
|
|
1055
|
+
"mobile_prop_forces_mobile_mode: true",
|
|
1056
|
+
"mobile_sidebar_becomes_off_canvas_drawer: true",
|
|
1057
|
+
"auto_menu_button_in_header_on_mobile: true",
|
|
1058
|
+
"controlled_and_uncontrolled_collapsed_state: true",
|
|
1059
|
+
"controlled_and_uncontrolled_sidebar_open_state: true",
|
|
1060
|
+
"provides_collapsed_state_to_descendants: true",
|
|
1061
|
+
"drawer_reports_collapsed_false_to_descendants_and_slots: true",
|
|
1062
|
+
"left_and_right_variants: true",
|
|
1063
|
+
"locks_body_scroll_while_drawer_open: true",
|
|
1064
|
+
"overlay_click_closes_when_enabled: true",
|
|
1065
|
+
"exposes_slot_props_with_mobile_collapsed_and_toggles: true"
|
|
1066
|
+
],
|
|
1067
|
+
selection: {
|
|
1068
|
+
keywords: [
|
|
1069
|
+
"app shell",
|
|
1070
|
+
"layout",
|
|
1071
|
+
"dashboard",
|
|
1072
|
+
"admin",
|
|
1073
|
+
"header sidebar",
|
|
1074
|
+
"full screen",
|
|
1075
|
+
"responsive shell",
|
|
1076
|
+
"off-canvas"
|
|
1077
|
+
],
|
|
1078
|
+
useWhen: [
|
|
1079
|
+
"You need a full-viewport application layout with a header, a side navigation, and a fluid content area.",
|
|
1080
|
+
"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."
|
|
1081
|
+
],
|
|
1082
|
+
avoidWhen: [
|
|
1083
|
+
"You only need one region (just a top bar, or just a side rail) \u2014 compose TNavbar or TSidebar directly.",
|
|
1084
|
+
"The page content should be centered with a readable max width \u2014 use TContainer inside the shell content instead."
|
|
1085
|
+
],
|
|
1086
|
+
alternatives: [
|
|
1087
|
+
{
|
|
1088
|
+
component: "TSidebar",
|
|
1089
|
+
when: "You want a standalone collapsible side rail without the header/content orchestration or responsive drawer."
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
component: "TNavbar",
|
|
1093
|
+
when: "You only need the top application bar."
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
component: "TDrawer",
|
|
1097
|
+
when: "You need a general temporary overlay panel rather than the shell's responsive navigation."
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1101
|
+
setup: {
|
|
1102
|
+
required: [],
|
|
1103
|
+
notes: [
|
|
1104
|
+
"Mount at the app root; it fills the viewport (100dvh, full width) and scrolls its content region independently.",
|
|
1105
|
+
"Put navigation in the `sidebar` slot (e.g. `TNavMenu`) \u2014 it inherits collapsed state from the shell provider like `TSidebar`.",
|
|
1106
|
+
"Leave `mobile` unset to auto-switch to an off-canvas drawer at `breakpoint`, or bind `mobile` to control it explicitly.",
|
|
1107
|
+
"Use `v-model:collapsed` for the desktop rail and `v-model:sidebarOpen` for the mobile drawer when the app persists layout state."
|
|
1108
|
+
]
|
|
1109
|
+
},
|
|
1110
|
+
recipes: [
|
|
1111
|
+
"app-shell"
|
|
1112
|
+
]
|
|
1113
|
+
},
|
|
785
1114
|
{
|
|
786
1115
|
name: "TAvatar",
|
|
787
1116
|
aliases: [],
|
|
@@ -1143,7 +1472,8 @@ var treeui_catalog_default = {
|
|
|
1143
1472
|
],
|
|
1144
1473
|
a11y: [],
|
|
1145
1474
|
behavior: [
|
|
1146
|
-
"body_wrapper_class:
|
|
1475
|
+
"body_wrapper_class: t-card__body",
|
|
1476
|
+
"solid_variant_rescopes_color_tokens_for_nested_content: true"
|
|
1147
1477
|
],
|
|
1148
1478
|
selection: {
|
|
1149
1479
|
keywords: [
|
|
@@ -1178,6 +1508,202 @@ var treeui_catalog_default = {
|
|
|
1178
1508
|
"chart-surface"
|
|
1179
1509
|
]
|
|
1180
1510
|
},
|
|
1511
|
+
{
|
|
1512
|
+
name: "TChart",
|
|
1513
|
+
aliases: [],
|
|
1514
|
+
package: "@treeui/vue",
|
|
1515
|
+
kind: "data-display",
|
|
1516
|
+
category: "Data Display",
|
|
1517
|
+
status: "available",
|
|
1518
|
+
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.",
|
|
1519
|
+
sourceFile: "packages/vue/src/components/TChart.vue",
|
|
1520
|
+
storyFile: "apps/docs/src/stories/Chart.stories.ts",
|
|
1521
|
+
storyTitle: "Components/Data Display/Chart",
|
|
1522
|
+
manifestFile: "docs/ai/COMPONENTS/chart.yaml",
|
|
1523
|
+
props: [
|
|
1524
|
+
{
|
|
1525
|
+
name: "type",
|
|
1526
|
+
type: "TChartType",
|
|
1527
|
+
default: "line",
|
|
1528
|
+
values: [
|
|
1529
|
+
"line",
|
|
1530
|
+
"area",
|
|
1531
|
+
"bar"
|
|
1532
|
+
]
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
name: "series",
|
|
1536
|
+
type: "TChartSeries[]",
|
|
1537
|
+
default: "[]",
|
|
1538
|
+
note: "Each item is { name: string; data: number[]; color?: string }."
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
name: "labels",
|
|
1542
|
+
type: "string[]",
|
|
1543
|
+
default: "[]",
|
|
1544
|
+
note: "X-axis categories, aligned index-for-index to each series' data."
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
name: "height",
|
|
1548
|
+
type: "number",
|
|
1549
|
+
default: "260",
|
|
1550
|
+
note: "Width is fluid (measured via ResizeObserver)."
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
name: "smooth",
|
|
1554
|
+
type: "boolean",
|
|
1555
|
+
default: "false",
|
|
1556
|
+
note: "Curved line/area."
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: "stacked",
|
|
1560
|
+
type: "boolean",
|
|
1561
|
+
default: "false",
|
|
1562
|
+
note: "Stacks bar series; ignored for line/area. Negative values are clamped to 0 in stacked mode (grouped mode renders them)."
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
name: "showGrid",
|
|
1566
|
+
type: "boolean",
|
|
1567
|
+
default: "true"
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
name: "showLegend",
|
|
1571
|
+
type: "boolean",
|
|
1572
|
+
default: "auto (true when more than one series)"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
name: "showXAxis",
|
|
1576
|
+
type: "boolean",
|
|
1577
|
+
default: "true"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
name: "showYAxis",
|
|
1581
|
+
type: "boolean",
|
|
1582
|
+
default: "true"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
name: "showTooltip",
|
|
1586
|
+
type: "boolean",
|
|
1587
|
+
default: "true"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
name: "showPoints",
|
|
1591
|
+
type: "boolean",
|
|
1592
|
+
default: "false",
|
|
1593
|
+
note: "Always draw markers on line/area points."
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "yTicks",
|
|
1597
|
+
type: "number",
|
|
1598
|
+
default: "5"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
name: "valueFormat",
|
|
1602
|
+
type: "(value: number) => string",
|
|
1603
|
+
default: "locale integers for |value| >= 1000"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
name: "minY",
|
|
1607
|
+
type: "number",
|
|
1608
|
+
default: "auto"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
name: "maxY",
|
|
1612
|
+
type: "number",
|
|
1613
|
+
default: "auto"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
name: "animated",
|
|
1617
|
+
type: "boolean",
|
|
1618
|
+
default: "true",
|
|
1619
|
+
note: "Draw-in animation; disabled under prefers-reduced-motion."
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
name: "loading",
|
|
1623
|
+
type: "boolean",
|
|
1624
|
+
default: "false"
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
name: "ariaLabel",
|
|
1628
|
+
type: "string",
|
|
1629
|
+
default: "auto-generated summary"
|
|
1630
|
+
}
|
|
1631
|
+
],
|
|
1632
|
+
events: [
|
|
1633
|
+
{
|
|
1634
|
+
name: "point-click",
|
|
1635
|
+
payload: "{ index: number; label: string; values: { name: string; value: number; color: string }[] }"
|
|
1636
|
+
}
|
|
1637
|
+
],
|
|
1638
|
+
slots: [
|
|
1639
|
+
{
|
|
1640
|
+
name: "legend"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
name: "tooltip"
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
name: "empty"
|
|
1647
|
+
}
|
|
1648
|
+
],
|
|
1649
|
+
a11y: [
|
|
1650
|
+
"SVG is aria-hidden; a visually-hidden <table> mirrors the series data for assistive tech.",
|
|
1651
|
+
"Legend defaults on for multiple series so identity is not color-only.",
|
|
1652
|
+
"Provide a meaningful ariaLabel describing what the chart shows."
|
|
1653
|
+
],
|
|
1654
|
+
behavior: [
|
|
1655
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-series color overrides",
|
|
1656
|
+
"bar_zero_baseline: true",
|
|
1657
|
+
"line_domain_uses_nice_ticks: true",
|
|
1658
|
+
"hover_shows_crosshair_and_tooltip: true"
|
|
1659
|
+
],
|
|
1660
|
+
selection: {
|
|
1661
|
+
keywords: [
|
|
1662
|
+
"chart",
|
|
1663
|
+
"graph",
|
|
1664
|
+
"line chart",
|
|
1665
|
+
"area chart",
|
|
1666
|
+
"bar chart",
|
|
1667
|
+
"plot",
|
|
1668
|
+
"dashboard",
|
|
1669
|
+
"time series",
|
|
1670
|
+
"analytics"
|
|
1671
|
+
],
|
|
1672
|
+
useWhen: [
|
|
1673
|
+
"You need a line, area, or bar chart with axes, gridlines, legend, and a hover tooltip.",
|
|
1674
|
+
"One or more series share a set of category labels."
|
|
1675
|
+
],
|
|
1676
|
+
avoidWhen: [
|
|
1677
|
+
"A single value tells the story \u2014 use TStat.",
|
|
1678
|
+
"You only need an inline trend with no axes \u2014 use TSparkline.",
|
|
1679
|
+
"The data is a part-of-whole breakdown \u2014 use TDonutChart."
|
|
1680
|
+
],
|
|
1681
|
+
alternatives: [
|
|
1682
|
+
{
|
|
1683
|
+
component: "TSparkline",
|
|
1684
|
+
when: "The trend should be inline and axis-less."
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
component: "TDonutChart",
|
|
1688
|
+
when: "The data is proportional (parts of a whole)."
|
|
1689
|
+
}
|
|
1690
|
+
]
|
|
1691
|
+
},
|
|
1692
|
+
setup: {
|
|
1693
|
+
required: [],
|
|
1694
|
+
notes: [
|
|
1695
|
+
"Pass `series` as `{ name, data, color? }[]` and `labels` as a parallel `string[]` (one label per data index).",
|
|
1696
|
+
"Set `type` to `line`, `area`, or `bar`; use `stacked` only with `bar`.",
|
|
1697
|
+
"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.",
|
|
1698
|
+
"Pass `valueFormat: (n) => string` to format axis and tooltip values (currency, compact, etc.).",
|
|
1699
|
+
"No charting library or provider is required \u2014 the SVG and geometry are built in."
|
|
1700
|
+
]
|
|
1701
|
+
},
|
|
1702
|
+
recipes: [
|
|
1703
|
+
"chart-surface",
|
|
1704
|
+
"metric-dashboard"
|
|
1705
|
+
]
|
|
1706
|
+
},
|
|
1181
1707
|
{
|
|
1182
1708
|
name: "TCheckbox",
|
|
1183
1709
|
aliases: [],
|
|
@@ -2149,6 +2675,142 @@ var treeui_catalog_default = {
|
|
|
2149
2675
|
},
|
|
2150
2676
|
recipes: []
|
|
2151
2677
|
},
|
|
2678
|
+
{
|
|
2679
|
+
name: "TDonutChart",
|
|
2680
|
+
aliases: [],
|
|
2681
|
+
package: "@treeui/vue",
|
|
2682
|
+
kind: "data-display",
|
|
2683
|
+
category: "Data Display",
|
|
2684
|
+
status: "available",
|
|
2685
|
+
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.",
|
|
2686
|
+
sourceFile: "packages/vue/src/components/TDonutChart.vue",
|
|
2687
|
+
storyFile: "apps/docs/src/stories/DonutChart.stories.ts",
|
|
2688
|
+
storyTitle: "Components/Data Display/Donut Chart",
|
|
2689
|
+
manifestFile: "docs/ai/COMPONENTS/donut-chart.yaml",
|
|
2690
|
+
props: [
|
|
2691
|
+
{
|
|
2692
|
+
name: "segments",
|
|
2693
|
+
type: "TDonutSegment[]",
|
|
2694
|
+
default: "[]",
|
|
2695
|
+
note: "Each item is { label: string; value: number; color?: string }. Non-positive values are omitted."
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
name: "size",
|
|
2699
|
+
type: "number",
|
|
2700
|
+
default: "200",
|
|
2701
|
+
note: "Square canvas in px."
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
name: "thickness",
|
|
2705
|
+
type: "number",
|
|
2706
|
+
default: "26",
|
|
2707
|
+
note: "Ring thickness; 0 renders a full pie."
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
name: "gap",
|
|
2711
|
+
type: "number",
|
|
2712
|
+
default: "2",
|
|
2713
|
+
note: "Gap between slices, in degrees."
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
name: "rounded",
|
|
2717
|
+
type: "boolean",
|
|
2718
|
+
default: "false",
|
|
2719
|
+
note: "Round the ends of donut segments (widens the gap to make room). Best with a thinner ring."
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
name: "showLegend",
|
|
2723
|
+
type: "boolean",
|
|
2724
|
+
default: "true"
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
name: "showPercent",
|
|
2728
|
+
type: "boolean",
|
|
2729
|
+
default: "true"
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
name: "centerLabel",
|
|
2733
|
+
type: "string",
|
|
2734
|
+
default: "Total",
|
|
2735
|
+
note: "Donut only; ignored for pie."
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
name: "centerValue",
|
|
2739
|
+
type: "string | number",
|
|
2740
|
+
default: "auto (sum of values)"
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
name: "valueFormat",
|
|
2744
|
+
type: "(value: number) => string",
|
|
2745
|
+
default: "locale integers for |value| >= 1000"
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
name: "loading",
|
|
2749
|
+
type: "boolean",
|
|
2750
|
+
default: "false"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
name: "ariaLabel",
|
|
2754
|
+
type: "string",
|
|
2755
|
+
default: "auto-generated summary"
|
|
2756
|
+
}
|
|
2757
|
+
],
|
|
2758
|
+
events: [],
|
|
2759
|
+
slots: [
|
|
2760
|
+
{
|
|
2761
|
+
name: "center"
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
name: "empty"
|
|
2765
|
+
}
|
|
2766
|
+
],
|
|
2767
|
+
a11y: [
|
|
2768
|
+
"Renders role=img with an aria-label summarizing the chart.",
|
|
2769
|
+
"Legend + percentages give a non-visual reading of each slice."
|
|
2770
|
+
],
|
|
2771
|
+
behavior: [
|
|
2772
|
+
"colors_auto_assign_from_chart_palette: --tree-color-chart-1..8, cycling; per-segment color overrides",
|
|
2773
|
+
"hovering_a_slice_dims_the_rest_and_updates_center: true",
|
|
2774
|
+
"center_shows_total_or_the_hovered_segment: true"
|
|
2775
|
+
],
|
|
2776
|
+
selection: {
|
|
2777
|
+
keywords: [
|
|
2778
|
+
"donut",
|
|
2779
|
+
"doughnut",
|
|
2780
|
+
"pie",
|
|
2781
|
+
"proportion",
|
|
2782
|
+
"share",
|
|
2783
|
+
"breakdown",
|
|
2784
|
+
"part of whole",
|
|
2785
|
+
"percentage"
|
|
2786
|
+
],
|
|
2787
|
+
useWhen: [
|
|
2788
|
+
"You are showing how a total splits into a handful of categories.",
|
|
2789
|
+
"A donut center readout (total or hovered slice) is useful."
|
|
2790
|
+
],
|
|
2791
|
+
avoidWhen: [
|
|
2792
|
+
"There are many categories or precise comparison matters \u2014 use TChart bars.",
|
|
2793
|
+
"The data is a trend over time \u2014 use TChart or TSparkline."
|
|
2794
|
+
],
|
|
2795
|
+
alternatives: [
|
|
2796
|
+
{
|
|
2797
|
+
component: "TChart",
|
|
2798
|
+
when: "Precise magnitude comparison across categories is needed (bars)."
|
|
2799
|
+
}
|
|
2800
|
+
]
|
|
2801
|
+
},
|
|
2802
|
+
setup: {
|
|
2803
|
+
required: [],
|
|
2804
|
+
notes: [
|
|
2805
|
+
"Pass `segments` as `{ label, value, color? }[]`; non-positive values are dropped.",
|
|
2806
|
+
"Set `thickness: 0` for a full pie; keep the default for a donut with a center readout.",
|
|
2807
|
+
"Use the `center` slot (donut only) for a custom center; otherwise it shows the total or the hovered slice."
|
|
2808
|
+
]
|
|
2809
|
+
},
|
|
2810
|
+
recipes: [
|
|
2811
|
+
"metric-dashboard"
|
|
2812
|
+
]
|
|
2813
|
+
},
|
|
2152
2814
|
{
|
|
2153
2815
|
name: "TDrawer",
|
|
2154
2816
|
aliases: [],
|
|
@@ -2350,6 +3012,16 @@ var treeui_catalog_default = {
|
|
|
2350
3012
|
name: "label",
|
|
2351
3013
|
type: "string",
|
|
2352
3014
|
default: ""
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
name: "align",
|
|
3018
|
+
type: "TDropdownAlign",
|
|
3019
|
+
default: "start",
|
|
3020
|
+
values: [
|
|
3021
|
+
"start",
|
|
3022
|
+
"end"
|
|
3023
|
+
],
|
|
3024
|
+
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)."
|
|
2353
3025
|
}
|
|
2354
3026
|
],
|
|
2355
3027
|
events: [
|
|
@@ -2385,7 +3057,8 @@ var treeui_catalog_default = {
|
|
|
2385
3057
|
behavior: [
|
|
2386
3058
|
"outside_click_closes_menu: true",
|
|
2387
3059
|
"focus_restores_on_close: true",
|
|
2388
|
-
"chevron_rotates_when_open: true"
|
|
3060
|
+
"chevron_rotates_when_open: true",
|
|
3061
|
+
"menu_grows_to_fit_items_without_wrapping: true"
|
|
2389
3062
|
],
|
|
2390
3063
|
selection: {
|
|
2391
3064
|
keywords: [
|
|
@@ -2885,7 +3558,8 @@ var treeui_catalog_default = {
|
|
|
2885
3558
|
},
|
|
2886
3559
|
recipes: [
|
|
2887
3560
|
"date-range-form",
|
|
2888
|
-
"stat-grid"
|
|
3561
|
+
"stat-grid",
|
|
3562
|
+
"metric-dashboard"
|
|
2889
3563
|
]
|
|
2890
3564
|
},
|
|
2891
3565
|
{
|
|
@@ -3775,10 +4449,11 @@ var treeui_catalog_default = {
|
|
|
3775
4449
|
setup: {
|
|
3776
4450
|
required: [],
|
|
3777
4451
|
notes: [
|
|
3778
|
-
"When nested inside `TSidebar`, `collapsed` can be inherited from the sidebar provider."
|
|
4452
|
+
"When nested inside `TSidebar` or `TAppShell`, `collapsed` can be inherited from the sidebar provider."
|
|
3779
4453
|
]
|
|
3780
4454
|
},
|
|
3781
4455
|
recipes: [
|
|
4456
|
+
"app-shell",
|
|
3782
4457
|
"sidebar-shell"
|
|
3783
4458
|
]
|
|
3784
4459
|
},
|
|
@@ -4605,7 +5280,8 @@ var treeui_catalog_default = {
|
|
|
4605
5280
|
"check_icon_on_selected_option: true",
|
|
4606
5281
|
"outside_click_closes_dropdown: true",
|
|
4607
5282
|
"focus_restores_on_close: true",
|
|
4608
|
-
"numeric_values_supported_without_string_coercion: true"
|
|
5283
|
+
"numeric_values_supported_without_string_coercion: true",
|
|
5284
|
+
"listbox_flips_above_trigger_when_space_below_is_insufficient: true"
|
|
4609
5285
|
],
|
|
4610
5286
|
selection: {
|
|
4611
5287
|
keywords: [
|
|
@@ -4638,7 +5314,9 @@ var treeui_catalog_default = {
|
|
|
4638
5314
|
"Use `placeholder` when no selection has been made."
|
|
4639
5315
|
]
|
|
4640
5316
|
},
|
|
4641
|
-
recipes: [
|
|
5317
|
+
recipes: [
|
|
5318
|
+
"chart-surface"
|
|
5319
|
+
]
|
|
4642
5320
|
},
|
|
4643
5321
|
{
|
|
4644
5322
|
name: "TSelectableList",
|
|
@@ -4860,7 +5538,8 @@ var treeui_catalog_default = {
|
|
|
4860
5538
|
"controlled_and_uncontrolled_collapsed_state: true",
|
|
4861
5539
|
"provides_collapsed_state_to_descendants: true",
|
|
4862
5540
|
"left_and_right_variants: true",
|
|
4863
|
-
"exposes_slot_props_with_collapsed_state: true"
|
|
5541
|
+
"exposes_slot_props_with_collapsed_state: true",
|
|
5542
|
+
"collapsed_state_centers_header_and_footer_content: true"
|
|
4864
5543
|
],
|
|
4865
5544
|
selection: {
|
|
4866
5545
|
keywords: [
|
|
@@ -4885,7 +5564,8 @@ var treeui_catalog_default = {
|
|
|
4885
5564
|
required: [],
|
|
4886
5565
|
notes: [
|
|
4887
5566
|
"Pair with `TNavMenu` for app-section navigation.",
|
|
4888
|
-
"Use controlled `collapsed` state when the app shell persists layout preferences."
|
|
5567
|
+
"Use controlled `collapsed` state when the app shell persists layout preferences.",
|
|
5568
|
+
"Prefer `TAppShell` when you also want full-viewport sizing, a top header, and a responsive mobile drawer."
|
|
4889
5569
|
]
|
|
4890
5570
|
},
|
|
4891
5571
|
recipes: [
|
|
@@ -4955,6 +5635,129 @@ var treeui_catalog_default = {
|
|
|
4955
5635
|
},
|
|
4956
5636
|
recipes: []
|
|
4957
5637
|
},
|
|
5638
|
+
{
|
|
5639
|
+
name: "TSparkline",
|
|
5640
|
+
aliases: [],
|
|
5641
|
+
package: "@treeui/vue",
|
|
5642
|
+
kind: "data-display",
|
|
5643
|
+
category: "Data Display",
|
|
5644
|
+
status: "available",
|
|
5645
|
+
purpose: "Tiny, axis-less inline trend chart (line, area, or bar) sized for stat tiles, table cells, and running text.",
|
|
5646
|
+
sourceFile: "packages/vue/src/components/TSparkline.vue",
|
|
5647
|
+
storyFile: "apps/docs/src/stories/Sparkline.stories.ts",
|
|
5648
|
+
storyTitle: "Components/Data Display/Sparkline",
|
|
5649
|
+
manifestFile: "docs/ai/COMPONENTS/sparkline.yaml",
|
|
5650
|
+
props: [
|
|
5651
|
+
{
|
|
5652
|
+
name: "data",
|
|
5653
|
+
type: "number[]",
|
|
5654
|
+
default: "[]"
|
|
5655
|
+
},
|
|
5656
|
+
{
|
|
5657
|
+
name: "type",
|
|
5658
|
+
type: "line | area | bar",
|
|
5659
|
+
default: "line"
|
|
5660
|
+
},
|
|
5661
|
+
{
|
|
5662
|
+
name: "color",
|
|
5663
|
+
type: "string",
|
|
5664
|
+
default: "var(--tree-color-chart-1)",
|
|
5665
|
+
note: "Any CSS color."
|
|
5666
|
+
},
|
|
5667
|
+
{
|
|
5668
|
+
name: "width",
|
|
5669
|
+
type: "number",
|
|
5670
|
+
default: "120"
|
|
5671
|
+
},
|
|
5672
|
+
{
|
|
5673
|
+
name: "height",
|
|
5674
|
+
type: "number",
|
|
5675
|
+
default: "32"
|
|
5676
|
+
},
|
|
5677
|
+
{
|
|
5678
|
+
name: "smooth",
|
|
5679
|
+
type: "boolean",
|
|
5680
|
+
default: "false",
|
|
5681
|
+
note: "Curved line/area."
|
|
5682
|
+
},
|
|
5683
|
+
{
|
|
5684
|
+
name: "strokeWidth",
|
|
5685
|
+
type: "number",
|
|
5686
|
+
default: "2",
|
|
5687
|
+
note: "Line/area only."
|
|
5688
|
+
},
|
|
5689
|
+
{
|
|
5690
|
+
name: "min",
|
|
5691
|
+
type: "number",
|
|
5692
|
+
default: "data min"
|
|
5693
|
+
},
|
|
5694
|
+
{
|
|
5695
|
+
name: "max",
|
|
5696
|
+
type: "number",
|
|
5697
|
+
default: "data max"
|
|
5698
|
+
},
|
|
5699
|
+
{
|
|
5700
|
+
name: "showLastPoint",
|
|
5701
|
+
type: "boolean",
|
|
5702
|
+
default: "false",
|
|
5703
|
+
note: "Marker on the final point (line/area)."
|
|
5704
|
+
},
|
|
5705
|
+
{
|
|
5706
|
+
name: "ariaLabel",
|
|
5707
|
+
type: "string",
|
|
5708
|
+
default: "Trend sparkline"
|
|
5709
|
+
}
|
|
5710
|
+
],
|
|
5711
|
+
events: [],
|
|
5712
|
+
slots: [],
|
|
5713
|
+
a11y: [
|
|
5714
|
+
"Renders role=img with an aria-label; pass a specific one for meaningful trends.",
|
|
5715
|
+
"Pair with a visible number \u2014 a sparkline supplements a value, it does not replace it."
|
|
5716
|
+
],
|
|
5717
|
+
behavior: [
|
|
5718
|
+
"no_axes_or_legend: true",
|
|
5719
|
+
"flat_series_renders_centered: true",
|
|
5720
|
+
"scales_to_intrinsic_width_and_height: true"
|
|
5721
|
+
],
|
|
5722
|
+
selection: {
|
|
5723
|
+
keywords: [
|
|
5724
|
+
"sparkline",
|
|
5725
|
+
"mini chart",
|
|
5726
|
+
"inline chart",
|
|
5727
|
+
"micro trend",
|
|
5728
|
+
"trend line",
|
|
5729
|
+
"table chart"
|
|
5730
|
+
],
|
|
5731
|
+
useWhen: [
|
|
5732
|
+
"You want a compact trend beside a value, in a table cell, or inline in text.",
|
|
5733
|
+
"No axes, legend, or tooltip are required."
|
|
5734
|
+
],
|
|
5735
|
+
avoidWhen: [
|
|
5736
|
+
"You need axes, multiple labeled series, or a tooltip \u2014 use TChart."
|
|
5737
|
+
],
|
|
5738
|
+
alternatives: [
|
|
5739
|
+
{
|
|
5740
|
+
component: "TChart",
|
|
5741
|
+
when: "The chart needs axes, a legend, or a tooltip."
|
|
5742
|
+
},
|
|
5743
|
+
{
|
|
5744
|
+
component: "TStat",
|
|
5745
|
+
when: "A single value with a trend badge is enough."
|
|
5746
|
+
}
|
|
5747
|
+
]
|
|
5748
|
+
},
|
|
5749
|
+
setup: {
|
|
5750
|
+
required: [],
|
|
5751
|
+
notes: [
|
|
5752
|
+
"Pass `data` as `number[]`; there are no axes, legend, or tooltip by design.",
|
|
5753
|
+
"Size it with `width`/`height`; use it inside `TStat`, table cells, or text.",
|
|
5754
|
+
"Always keep a visible number nearby \u2014 a sparkline supplements a value, it does not replace it."
|
|
5755
|
+
]
|
|
5756
|
+
},
|
|
5757
|
+
recipes: [
|
|
5758
|
+
"metric-dashboard"
|
|
5759
|
+
]
|
|
5760
|
+
},
|
|
4958
5761
|
{
|
|
4959
5762
|
name: "TSpinner",
|
|
4960
5763
|
aliases: [],
|
|
@@ -5208,6 +6011,10 @@ var treeui_catalog_default = {
|
|
|
5208
6011
|
{
|
|
5209
6012
|
component: "TCard",
|
|
5210
6013
|
when: "The content is not a metric."
|
|
6014
|
+
},
|
|
6015
|
+
{
|
|
6016
|
+
component: "TSparkline",
|
|
6017
|
+
when: "You want to show the metric's trend as an inline mini-chart."
|
|
5211
6018
|
}
|
|
5212
6019
|
]
|
|
5213
6020
|
},
|
|
@@ -5216,7 +6023,8 @@ var treeui_catalog_default = {
|
|
|
5216
6023
|
notes: []
|
|
5217
6024
|
},
|
|
5218
6025
|
recipes: [
|
|
5219
|
-
"stat-grid"
|
|
6026
|
+
"stat-grid",
|
|
6027
|
+
"metric-dashboard"
|
|
5220
6028
|
]
|
|
5221
6029
|
},
|
|
5222
6030
|
{
|