@ds-mo/ui 12.2.0 → 12.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/README.md +8 -2
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +6 -6
- package/dist/agent.json +530 -25
- package/dist/angular/ds-bar-title.d.ts +7 -1
- package/dist/angular/ds-bar-title.js +7 -4
- package/dist/angular/ds-breadcrumb.d.ts +19 -0
- package/dist/angular/ds-breadcrumb.js +42 -0
- package/dist/angular/ds-card-data-viz-bar.d.ts +18 -0
- package/dist/angular/ds-card-data-viz-bar.js +42 -0
- package/dist/angular/ds-card-data-viz-line.d.ts +18 -0
- package/dist/angular/ds-card-data-viz-line.js +42 -0
- package/dist/angular/ds-chart-bar-stacked.d.ts +12 -0
- package/dist/angular/ds-chart-bar-stacked.js +38 -0
- package/dist/angular/ds-chart-legend.d.ts +1 -1
- package/dist/angular/ds-chart-legend.js +3 -3
- package/dist/angular/ds-shell-page.d.ts +1 -1
- package/dist/angular/ds-shell-page.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +4 -0
- package/dist/angular/proxies.d.ts +4 -0
- package/dist/angular/proxies.js +4 -0
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-source-list.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-title.js.map +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-breadcrumb.d.ts +11 -0
- package/dist/components/ds-breadcrumb.js +2 -0
- package/dist/components/ds-breadcrumb.js.map +1 -0
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-data-viz-bar.d.ts +11 -0
- package/dist/components/ds-card-data-viz-bar.js +2 -0
- package/dist/components/ds-card-data-viz-bar.js.map +1 -0
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js.map +1 -1
- package/dist/components/ds-card-data-viz-line.d.ts +11 -0
- package/dist/components/ds-card-data-viz-line.js +2 -0
- package/dist/components/ds-card-data-viz-line.js.map +1 -0
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-setting.js.map +1 -1
- package/dist/components/ds-card-shell-data-viz.js +1 -1
- package/dist/components/ds-chart-bar-stacked.d.ts +11 -0
- package/dist/components/ds-chart-bar-stacked.js +2 -0
- package/dist/components/ds-chart-bar-stacked.js.map +1 -0
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-bar.js.map +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart-line.js +1 -1
- package/dist/components/ds-chart-line.js.map +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-item.js.map +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-conversation-list.js +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-bubble.js +1 -1
- package/dist/components/ds-message-bubble.js.map +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message-scroller.js.map +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-scroll-overlay.js.map +1 -1
- package/dist/components/ds-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-page.js.map +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/ds-typing-indicator.js.map +1 -1
- package/dist/components/{p-DcGpdIlT.js → p-9dQQSgwT.js} +2 -2
- package/dist/components/p-B3rbhRAk.js +2 -0
- package/dist/components/p-B3rbhRAk.js.map +1 -0
- package/dist/components/{p-BWUTr_XN.js → p-BJMRBHKW.js} +2 -2
- package/dist/components/p-BJMRBHKW.js.map +1 -0
- package/dist/components/p-BVV_rlIP.js +2 -0
- package/dist/components/p-BVV_rlIP.js.map +1 -0
- package/dist/components/{p-GMDGgtY8.js → p-BhxwpOH8.js} +2 -2
- package/dist/components/{p-2W-ZjZCR.js → p-Bi_bxbih.js} +2 -2
- package/dist/components/{p-CG5EX4NW.js → p-BtEjlcB9.js} +2 -2
- package/dist/components/{p-C0_8K4y7.js → p-BwGnhInj.js} +2 -2
- package/dist/components/p-BwGnhInj.js.map +1 -0
- package/dist/components/p-C0NPJ0h2.js +2 -0
- package/dist/components/{p-BpA9uYKX.js.map → p-C0NPJ0h2.js.map} +1 -1
- package/dist/components/{p-D6jK2Hyi.js → p-C7bZ-jiU.js} +2 -2
- package/dist/components/p-CH3w-P2H.js +2 -0
- package/dist/components/p-CH3w-P2H.js.map +1 -0
- package/dist/components/{p-DOCKtrS4.js → p-CH6cNXXF.js} +2 -2
- package/dist/components/p-CWlh7HAg.js +2 -0
- package/dist/components/{p-8OOCLGph.js.map → p-CWlh7HAg.js.map} +1 -1
- package/dist/components/{p-BE_CDJeL.js → p-CY19gMiz.js} +2 -2
- package/dist/components/p-C_ewSXTT.js +2 -0
- package/dist/components/p-C_ewSXTT.js.map +1 -0
- package/dist/components/{p-CHkI3oIS.js → p-Ce52yVXF.js} +2 -2
- package/dist/components/{p-xY3TjBF5.js → p-CoYFJD-w.js} +2 -2
- package/dist/components/{p-DBi1bmOL.js → p-Cuw2Lo2g.js} +2 -2
- package/dist/components/{p-BRLDJmkh.js → p-D-xttdpn.js} +2 -2
- package/dist/components/{p-CCHqsF_H.js → p-D3DYxbC5.js} +2 -2
- package/dist/components/{p-Cxpl-rzP.js → p-DC7yOUQx.js} +2 -2
- package/dist/components/{p-CNffejay.js → p-DSa0Hnd3.js} +2 -2
- package/dist/components/p-DXewjzkM.js +2 -0
- package/dist/components/p-DXewjzkM.js.map +1 -0
- package/dist/components/{p-DyGB97Oy.js → p-DYqReipj.js} +2 -2
- package/dist/components/{p-ky1msbJ8.js → p-DjPZxzIG.js} +2 -2
- package/dist/components/{p-ky1msbJ8.js.map → p-DjPZxzIG.js.map} +1 -1
- package/dist/components/p-J6xK6Ihq.js +2 -0
- package/dist/components/p-jCWtxthA.js +2 -0
- package/dist/components/{p-XgIQ3oI_.js.map → p-jCWtxthA.js.map} +1 -1
- package/dist/docs/components.json +956 -145
- package/dist/lib/utils/index.js +3 -1
- package/dist/lib/utils/index.js.map +2 -2
- package/dist/mcp/cli.js +142 -18
- package/dist/mcp-data/registry/agent-source-list.json +1 -1
- package/dist/mcp-data/registry/bar-title.json +68 -14
- package/dist/mcp-data/registry/breadcrumb.json +205 -0
- package/dist/mcp-data/registry/card-data-viz-bar.json +212 -0
- package/dist/mcp-data/registry/card-data-viz-line.json +206 -0
- package/dist/mcp-data/registry/card-shell-data-viz.json +7 -0
- package/dist/mcp-data/registry/chart-bar-stacked.json +225 -0
- package/dist/mcp-data/registry/chart-bar.json +9 -2
- package/dist/mcp-data/registry/chart-legend.json +29 -3
- package/dist/mcp-data/registry/chart-line.json +4 -2
- package/dist/mcp-data/registry/conversation-list-item.json +2 -2
- package/dist/mcp-data/registry/message-scroller.json +4 -2
- package/dist/mcp-data/registry/message.json +3 -2
- package/dist/mcp-data/registry/registry.json +541 -24
- package/dist/mcp-data/registry/shell-page.json +31 -13
- package/dist/mcp-data/registry/text.json +1 -1
- package/dist/mcp-data/registry/typing-indicator.json +7 -7
- package/dist/react/components.d.ts +4 -0
- package/dist/react/components.js +4 -0
- package/dist/react/ds-bar-title.d.ts +2 -1
- package/dist/react/ds-bar-title.js +1 -0
- package/dist/react/ds-breadcrumb.d.ts +12 -0
- package/dist/react/ds-breadcrumb.js +12 -0
- package/dist/react/ds-card-data-viz-bar.d.ts +12 -0
- package/dist/react/ds-card-data-viz-bar.js +12 -0
- package/dist/react/ds-card-data-viz-line.d.ts +12 -0
- package/dist/react/ds-card-data-viz-line.js +12 -0
- package/dist/react/ds-chart-bar-stacked.d.ts +9 -0
- package/dist/react/ds-chart-bar-stacked.js +12 -0
- package/dist/styles/prose.css +1 -0
- package/dist/types/components/BarTitle/BarTitle.d.ts +13 -1
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +31 -0
- package/dist/types/components/Breadcrumb/breadcrumb-types.d.ts +17 -0
- package/dist/types/components/CardDataVizBar/CardDataVizBar.d.ts +24 -0
- package/dist/types/components/CardDataVizBar/index.d.ts +2 -0
- package/dist/types/components/CardDataVizLine/CardDataVizLine.d.ts +24 -0
- package/dist/types/components/CardDataVizLine/index.d.ts +2 -0
- package/dist/types/components/ChartBarStacked/ChartBarStacked.d.ts +15 -0
- package/dist/types/components/ChartBarStacked/index.d.ts +3 -0
- package/dist/types/components/ChartLegend/ChartLegend.d.ts +3 -0
- package/dist/types/components/ShellPage/ShellPage.d.ts +19 -7
- package/dist/types/components/ShellPage/shell-page-responsive.d.ts +0 -8
- package/dist/types/components/TypingIndicator/TypingIndicator.d.ts +1 -1
- package/dist/types/components.d.ts +339 -10
- package/package.json +1 -1
- package/dist/components/p-8OOCLGph.js +0 -2
- package/dist/components/p-B8CubPgQ.js +0 -2
- package/dist/components/p-BWUTr_XN.js.map +0 -1
- package/dist/components/p-BpA9uYKX.js +0 -2
- package/dist/components/p-C0_8K4y7.js.map +0 -1
- package/dist/components/p-CA3kLO7K.js +0 -2
- package/dist/components/p-CA3kLO7K.js.map +0 -1
- package/dist/components/p-CzBnvtcz.js +0 -2
- package/dist/components/p-CzBnvtcz.js.map +0 -1
- package/dist/components/p-XgIQ3oI_.js +0 -2
- /package/dist/components/{p-DcGpdIlT.js.map → p-9dQQSgwT.js.map} +0 -0
- /package/dist/components/{p-GMDGgtY8.js.map → p-BhxwpOH8.js.map} +0 -0
- /package/dist/components/{p-2W-ZjZCR.js.map → p-Bi_bxbih.js.map} +0 -0
- /package/dist/components/{p-CG5EX4NW.js.map → p-BtEjlcB9.js.map} +0 -0
- /package/dist/components/{p-D6jK2Hyi.js.map → p-C7bZ-jiU.js.map} +0 -0
- /package/dist/components/{p-DOCKtrS4.js.map → p-CH6cNXXF.js.map} +0 -0
- /package/dist/components/{p-BE_CDJeL.js.map → p-CY19gMiz.js.map} +0 -0
- /package/dist/components/{p-CHkI3oIS.js.map → p-Ce52yVXF.js.map} +0 -0
- /package/dist/components/{p-xY3TjBF5.js.map → p-CoYFJD-w.js.map} +0 -0
- /package/dist/components/{p-DBi1bmOL.js.map → p-Cuw2Lo2g.js.map} +0 -0
- /package/dist/components/{p-BRLDJmkh.js.map → p-D-xttdpn.js.map} +0 -0
- /package/dist/components/{p-CCHqsF_H.js.map → p-D3DYxbC5.js.map} +0 -0
- /package/dist/components/{p-Cxpl-rzP.js.map → p-DC7yOUQx.js.map} +0 -0
- /package/dist/components/{p-CNffejay.js.map → p-DSa0Hnd3.js.map} +0 -0
- /package/dist/components/{p-DyGB97Oy.js.map → p-DYqReipj.js.map} +0 -0
- /package/dist/components/{p-B8CubPgQ.js.map → p-J6xK6Ihq.js.map} +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "card-data-viz-bar",
|
|
4
|
+
"title": "CardDataVizBar",
|
|
5
|
+
"description": "Canonical bar-chart dashboard card with shared data-viz chrome, a filter action, a fill chart region, and an optional static legend.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/card-data-viz-bar",
|
|
11
|
+
"source": "src/wc/components/CardDataVizBar/CardDataVizBar.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "specialized",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Canonical bar-chart dashboard card with shared data-viz chrome, a filter action, a fill chart region, and an optional static legend.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A dashboard widget needs a regular, stacked, or percentage bar chart in the standard data-viz card.",
|
|
19
|
+
"A stacked bar chart needs a visible static series key beneath the chart."
|
|
20
|
+
],
|
|
21
|
+
"avoidWhen": [
|
|
22
|
+
"The visualization needs selectable legend rows or chart-to-legend hover synchronization.",
|
|
23
|
+
"The product needs supporting metrics or an alternate chart layout beyond the chart and optional legend."
|
|
24
|
+
],
|
|
25
|
+
"alternatives": [
|
|
26
|
+
{
|
|
27
|
+
"when": "The bar chart needs a custom layout without card chrome.",
|
|
28
|
+
"component": "component:ds-chart-bar",
|
|
29
|
+
"reason": "Compose ChartBar directly in the product-owned layout."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"when": "The visualization communicates change as continuous lines.",
|
|
33
|
+
"component": "component:ds-card-data-viz-line",
|
|
34
|
+
"reason": "CardDataVizLine owns the canonical line-chart card layout."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"when": "The visualization communicates parts of one total with synchronized slice emphasis.",
|
|
38
|
+
"component": "component:ds-card-data-viz-donut",
|
|
39
|
+
"reason": "CardDataVizDonut owns the donut layout and bidirectional hover synchronization."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"commonlyComposedWith": [
|
|
43
|
+
"component:ds-card-shell-data-viz",
|
|
44
|
+
"component:ds-chart-bar",
|
|
45
|
+
"component:ds-chart-bar-stacked",
|
|
46
|
+
"component:ds-chart-legend",
|
|
47
|
+
"component:ds-button-unfilled"
|
|
48
|
+
],
|
|
49
|
+
"accessibility": [
|
|
50
|
+
"Provide a concise heading that identifies the measure and meaningful visible labels for every legend entry.",
|
|
51
|
+
"Keep essential series and value context available textually rather than relying on bar color alone.",
|
|
52
|
+
"The card disables decorative legend-row hover; genuine legend links retain native link semantics and affordances."
|
|
53
|
+
],
|
|
54
|
+
"states": [
|
|
55
|
+
"The chart region fills the remaining card body while an optional legend remains content-sized.",
|
|
56
|
+
"The card disables local hover highlighting on a slotted ChartLegend because bar legends are static keys.",
|
|
57
|
+
"Chart and legend regions render only when their corresponding slots contain content, avoiding empty region spacing.",
|
|
58
|
+
"The owning product controls data, filtering, loading, empty, and error state; the card emits the filter action only."
|
|
59
|
+
],
|
|
60
|
+
"responsiveBehavior": [
|
|
61
|
+
"The selected sm, md, or lg shell size controls the card dimensions while the bar chart shrinks within its chart region.",
|
|
62
|
+
"The horizontal legend wraps complete entries when the available width is constrained.",
|
|
63
|
+
"The parent dashboard owns card wrapping and breakpoint changes."
|
|
64
|
+
],
|
|
65
|
+
"frameworkCaveats": {
|
|
66
|
+
"customElements": [
|
|
67
|
+
"Assign data or series and categories as JavaScript properties, then place the bar chart and optional legend in their named slots."
|
|
68
|
+
],
|
|
69
|
+
"react": [
|
|
70
|
+
"Keep filter and dataset state in the owner; pass the chart and optional legend with chart and legend slot attributes."
|
|
71
|
+
],
|
|
72
|
+
"angular": [
|
|
73
|
+
"Keep filter and dataset state in the owner; project the chart and optional legend into the chart and legend slots."
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"references": [
|
|
77
|
+
{
|
|
78
|
+
"label": "Storybook examples",
|
|
79
|
+
"path": "src/wc/components/CardDataVizBar/CardDataVizBar.stories.ts"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"api": {
|
|
84
|
+
"props": {
|
|
85
|
+
"cardWidth": {
|
|
86
|
+
"type": "CardDataVizBarWidth",
|
|
87
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\"",
|
|
88
|
+
"attribute": "card-width",
|
|
89
|
+
"default": "'md'",
|
|
90
|
+
"required": false,
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"description": "Card width token — also sets matching min-height."
|
|
93
|
+
},
|
|
94
|
+
"filterLabel": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"resolvedType": "string",
|
|
97
|
+
"attribute": "filter-label",
|
|
98
|
+
"default": "'Filter'",
|
|
99
|
+
"required": false,
|
|
100
|
+
"mutable": false
|
|
101
|
+
},
|
|
102
|
+
"heading": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"resolvedType": "string",
|
|
105
|
+
"attribute": "heading",
|
|
106
|
+
"required": true,
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"description": "Widget heading shown in the card header."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"events": [
|
|
112
|
+
{
|
|
113
|
+
"name": "dsFilterClick",
|
|
114
|
+
"detail": "void",
|
|
115
|
+
"bubbles": true,
|
|
116
|
+
"cancelable": true,
|
|
117
|
+
"composed": true,
|
|
118
|
+
"description": "Emits when the header filter control is activated."
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"methods": [],
|
|
122
|
+
"slots": []
|
|
123
|
+
},
|
|
124
|
+
"props": {
|
|
125
|
+
"cardWidth": {
|
|
126
|
+
"type": "CardDataVizBarWidth",
|
|
127
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\"",
|
|
128
|
+
"attribute": "card-width",
|
|
129
|
+
"default": "'md'",
|
|
130
|
+
"required": false,
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"description": "Card width token — also sets matching min-height."
|
|
133
|
+
},
|
|
134
|
+
"filterLabel": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"resolvedType": "string",
|
|
137
|
+
"attribute": "filter-label",
|
|
138
|
+
"default": "'Filter'",
|
|
139
|
+
"required": false,
|
|
140
|
+
"mutable": false
|
|
141
|
+
},
|
|
142
|
+
"heading": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"resolvedType": "string",
|
|
145
|
+
"attribute": "heading",
|
|
146
|
+
"required": true,
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"description": "Widget heading shown in the card header."
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"events": [
|
|
152
|
+
{
|
|
153
|
+
"name": "dsFilterClick",
|
|
154
|
+
"detail": "void",
|
|
155
|
+
"bubbles": true,
|
|
156
|
+
"cancelable": true,
|
|
157
|
+
"composed": true,
|
|
158
|
+
"description": "Emits when the header filter control is activated."
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"methods": [],
|
|
162
|
+
"slots": [],
|
|
163
|
+
"exports": {
|
|
164
|
+
"customElement": "ds-card-data-viz-bar",
|
|
165
|
+
"react": "DsCardDataVizBar",
|
|
166
|
+
"angular": "DsCardDataVizBar"
|
|
167
|
+
},
|
|
168
|
+
"consumption": {
|
|
169
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
170
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
171
|
+
"customElements": {
|
|
172
|
+
"import": "import '@ds-mo/ui/dist/components/ds-card-data-viz-bar.js';",
|
|
173
|
+
"example": "<ds-card-data-viz-bar></ds-card-data-viz-bar>"
|
|
174
|
+
},
|
|
175
|
+
"react": {
|
|
176
|
+
"import": "import { DsCardDataVizBar } from '@ds-mo/ui/react';",
|
|
177
|
+
"example": "<DsCardDataVizBar />"
|
|
178
|
+
},
|
|
179
|
+
"angular": {
|
|
180
|
+
"import": "import { DsCardDataVizBar } from '@ds-mo/ui/angular/ds-card-data-viz-bar';",
|
|
181
|
+
"example": "<ds-card-data-viz-bar></ds-card-data-viz-bar>"
|
|
182
|
+
},
|
|
183
|
+
"peerDependencies": {
|
|
184
|
+
"required": [
|
|
185
|
+
"@ds-mo/tokens ^3.1.1",
|
|
186
|
+
"@ds-mo/icons ^6.4.0"
|
|
187
|
+
],
|
|
188
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"dependencies": [
|
|
193
|
+
"@ds-mo/ui",
|
|
194
|
+
"@ds-mo/tokens"
|
|
195
|
+
],
|
|
196
|
+
"registryDependencies": [
|
|
197
|
+
"button-unfilled",
|
|
198
|
+
"card-shell-data-viz"
|
|
199
|
+
],
|
|
200
|
+
"files": [
|
|
201
|
+
{
|
|
202
|
+
"path": "src/wc/components/CardDataVizBar/CardDataVizBar.css",
|
|
203
|
+
"content": ":host {\n display: contents;\n}\n\n.card-data-viz-bar__layout {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n gap: var(--dimension-space-200);\n}\n\n.card-data-viz-bar__chart-region {\n display: grid;\n flex: 1 1 auto;\n align-items: center;\n box-sizing: border-box;\n min-height: 0;\n padding: var(--dimension-space-400) var(--dimension-space-400) 0\n var(--dimension-space-400);\n}\n\n.card-data-viz-bar__chart-region > * {\n width: 100%;\n min-width: 0;\n max-width: 100%;\n}\n\n.card-data-viz-bar__legend-region {\n flex: 0 0 auto;\n box-sizing: border-box;\n padding: 0 var(--dimension-space-100) var(--dimension-space-100)\n var(--dimension-space-100);\n}\n",
|
|
204
|
+
"type": "registry:ui"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"path": "src/wc/components/CardDataVizBar/CardDataVizBar.tsx",
|
|
208
|
+
"content": "import { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport type { CardShellDataVizWidth } from '../CardShellDataViz/CardShellDataViz';\n\nexport type CardDataVizBarWidth = CardShellDataVizWidth;\n\ntype StaticLegendSlot = HTMLElement & {\n highlightOnHover?: boolean;\n};\n\n/**\n * Bar-chart data-viz card — dedicated `ds-card-shell-data-viz` chrome with a fill chart\n * region and an optional, content-sized static legend.\n */\n@Component({\n tag: 'ds-card-data-viz-bar',\n styleUrl: 'CardDataVizBar.css',\n scoped: true,\n})\nexport class CardDataVizBar {\n @Element() el!: HTMLElement;\n\n /** Widget heading shown in the card header. */\n @Prop() heading!: string;\n\n /** Card width token — also sets matching min-height. */\n @Prop() cardWidth: CardDataVizBarWidth = 'md';\n @Prop() filterLabel: string = 'Filter';\n\n /** Emits when the header filter control is activated. */\n @Event() dsFilterClick!: EventEmitter<void>;\n\n @State() private hasChartSlot = false;\n @State() private hasLegendSlot = false;\n\n componentWillRender() {\n this.hasChartSlot = !!this.el.querySelector('[slot=\"chart\"]');\n this.hasLegendSlot = !!this.el.querySelector('[slot=\"legend\"]');\n }\n\n componentDidRender() {\n const legend = this.el.querySelector(\n 'ds-chart-legend[slot=\"legend\"]'\n ) as StaticLegendSlot | null;\n if (!legend) return;\n legend.setAttribute('highlight-on-hover', 'false');\n if ('highlightOnHover' in legend) legend.highlightOnHover = false;\n }\n\n private handleFilterClick = () => {\n this.dsFilterClick.emit();\n };\n\n render() {\n return (\n <Host class=\"card-data-viz-bar\">\n <ds-card-shell-data-viz heading={this.heading} cardWidth={this.cardWidth}>\n <ds-button-unfilled\n slot=\"actions\"\n variant=\"icon\"\n type=\"button\"\n icon=\"Filters\"\n aria-label={this.filterLabel}\n onDsClick={this.handleFilterClick}\n />\n <div class=\"card-data-viz-bar__layout\">\n {this.hasChartSlot && (\n <div class=\"card-data-viz-bar__chart-region\">\n <slot name=\"chart\" />\n </div>\n )}\n {this.hasLegendSlot && (\n <div class=\"card-data-viz-bar__legend-region\">\n <slot name=\"legend\" />\n </div>\n )}\n </div>\n </ds-card-shell-data-viz>\n </Host>\n );\n }\n}\n",
|
|
209
|
+
"type": "registry:ui"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "card-data-viz-line",
|
|
4
|
+
"title": "CardDataVizLine",
|
|
5
|
+
"description": "Canonical line-chart dashboard card with shared data-viz chrome, a filter action, fill chart region, and a static horizontal legend.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/card-data-viz-line",
|
|
11
|
+
"source": "src/wc/components/CardDataVizLine/CardDataVizLine.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "specialized",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Canonical line-chart dashboard card with shared data-viz chrome, a filter action, fill chart region, and a static horizontal legend.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A dashboard widget needs the standard line chart and visible series key in one data-viz card.",
|
|
19
|
+
"The legend identifies static line series and should not highlight or dim rows on hover."
|
|
20
|
+
],
|
|
21
|
+
"avoidWhen": [
|
|
22
|
+
"The visualization needs chart-to-legend hover synchronization or selectable series controls.",
|
|
23
|
+
"The product needs a custom legend treatment, supporting metrics, or an alternate chart layout."
|
|
24
|
+
],
|
|
25
|
+
"alternatives": [
|
|
26
|
+
{
|
|
27
|
+
"when": "The line chart and legend need a custom layout without card chrome.",
|
|
28
|
+
"component": "component:ds-chart-line",
|
|
29
|
+
"reason": "Compose ChartLine and a static ChartLegend directly in the product-owned layout."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"when": "The visualization communicates parts of a total with synchronized slice emphasis.",
|
|
33
|
+
"component": "component:ds-card-data-viz-donut",
|
|
34
|
+
"reason": "CardDataVizDonut owns the donut layout and bidirectional hover synchronization."
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"commonlyComposedWith": [
|
|
38
|
+
"component:ds-card-shell-data-viz",
|
|
39
|
+
"component:ds-chart-line",
|
|
40
|
+
"component:ds-chart-legend",
|
|
41
|
+
"component:ds-button-unfilled"
|
|
42
|
+
],
|
|
43
|
+
"accessibility": [
|
|
44
|
+
"Provide a concise heading that identifies the trend and meaningful visible labels for every legend entry.",
|
|
45
|
+
"Keep essential series and value context available textually rather than relying on line color alone.",
|
|
46
|
+
"The card disables decorative legend-row hover; genuine legend links retain native link semantics and affordances."
|
|
47
|
+
],
|
|
48
|
+
"states": [
|
|
49
|
+
"The chart region fills the remaining card body while the legend remains content-sized.",
|
|
50
|
+
"The card disables local hover highlighting on a slotted ChartLegend because the line chart is static.",
|
|
51
|
+
"Chart and legend regions render only when their corresponding slots contain content, avoiding empty region spacing.",
|
|
52
|
+
"The owning product controls data, filtering, loading, empty, and error state; the card emits the filter action only."
|
|
53
|
+
],
|
|
54
|
+
"responsiveBehavior": [
|
|
55
|
+
"The selected sm, md, or lg shell size controls the card dimensions while the line chart shrinks within its chart region.",
|
|
56
|
+
"The horizontal legend wraps complete entries when the available width is constrained.",
|
|
57
|
+
"The parent dashboard owns card wrapping and breakpoint changes."
|
|
58
|
+
],
|
|
59
|
+
"frameworkCaveats": {
|
|
60
|
+
"customElements": [
|
|
61
|
+
"Assign series, categories, and legend items as JavaScript properties, then place the chart and legend in their named slots."
|
|
62
|
+
],
|
|
63
|
+
"react": [
|
|
64
|
+
"Keep filter and dataset state in the owner; pass the chart and legend with chart and legend slot attributes."
|
|
65
|
+
],
|
|
66
|
+
"angular": [
|
|
67
|
+
"Keep filter and dataset state in the owner; project the chart and legend into the chart and legend slots."
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"references": [
|
|
71
|
+
{
|
|
72
|
+
"label": "Storybook examples",
|
|
73
|
+
"path": "src/wc/components/CardDataVizLine/CardDataVizLine.stories.ts"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"api": {
|
|
78
|
+
"props": {
|
|
79
|
+
"cardWidth": {
|
|
80
|
+
"type": "CardDataVizLineWidth",
|
|
81
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\"",
|
|
82
|
+
"attribute": "card-width",
|
|
83
|
+
"default": "'md'",
|
|
84
|
+
"required": false,
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"description": "Card width token — also sets matching min-height."
|
|
87
|
+
},
|
|
88
|
+
"filterLabel": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"resolvedType": "string",
|
|
91
|
+
"attribute": "filter-label",
|
|
92
|
+
"default": "'Filter'",
|
|
93
|
+
"required": false,
|
|
94
|
+
"mutable": false
|
|
95
|
+
},
|
|
96
|
+
"heading": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"resolvedType": "string",
|
|
99
|
+
"attribute": "heading",
|
|
100
|
+
"required": true,
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"description": "Widget heading shown in the card header."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"events": [
|
|
106
|
+
{
|
|
107
|
+
"name": "dsFilterClick",
|
|
108
|
+
"detail": "void",
|
|
109
|
+
"bubbles": true,
|
|
110
|
+
"cancelable": true,
|
|
111
|
+
"composed": true,
|
|
112
|
+
"description": "Emits when the header filter control is activated."
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"methods": [],
|
|
116
|
+
"slots": []
|
|
117
|
+
},
|
|
118
|
+
"props": {
|
|
119
|
+
"cardWidth": {
|
|
120
|
+
"type": "CardDataVizLineWidth",
|
|
121
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\"",
|
|
122
|
+
"attribute": "card-width",
|
|
123
|
+
"default": "'md'",
|
|
124
|
+
"required": false,
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"description": "Card width token — also sets matching min-height."
|
|
127
|
+
},
|
|
128
|
+
"filterLabel": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"resolvedType": "string",
|
|
131
|
+
"attribute": "filter-label",
|
|
132
|
+
"default": "'Filter'",
|
|
133
|
+
"required": false,
|
|
134
|
+
"mutable": false
|
|
135
|
+
},
|
|
136
|
+
"heading": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"resolvedType": "string",
|
|
139
|
+
"attribute": "heading",
|
|
140
|
+
"required": true,
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"description": "Widget heading shown in the card header."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"events": [
|
|
146
|
+
{
|
|
147
|
+
"name": "dsFilterClick",
|
|
148
|
+
"detail": "void",
|
|
149
|
+
"bubbles": true,
|
|
150
|
+
"cancelable": true,
|
|
151
|
+
"composed": true,
|
|
152
|
+
"description": "Emits when the header filter control is activated."
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"methods": [],
|
|
156
|
+
"slots": [],
|
|
157
|
+
"exports": {
|
|
158
|
+
"customElement": "ds-card-data-viz-line",
|
|
159
|
+
"react": "DsCardDataVizLine",
|
|
160
|
+
"angular": "DsCardDataVizLine"
|
|
161
|
+
},
|
|
162
|
+
"consumption": {
|
|
163
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
164
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
165
|
+
"customElements": {
|
|
166
|
+
"import": "import '@ds-mo/ui/dist/components/ds-card-data-viz-line.js';",
|
|
167
|
+
"example": "<ds-card-data-viz-line></ds-card-data-viz-line>"
|
|
168
|
+
},
|
|
169
|
+
"react": {
|
|
170
|
+
"import": "import { DsCardDataVizLine } from '@ds-mo/ui/react';",
|
|
171
|
+
"example": "<DsCardDataVizLine />"
|
|
172
|
+
},
|
|
173
|
+
"angular": {
|
|
174
|
+
"import": "import { DsCardDataVizLine } from '@ds-mo/ui/angular/ds-card-data-viz-line';",
|
|
175
|
+
"example": "<ds-card-data-viz-line></ds-card-data-viz-line>"
|
|
176
|
+
},
|
|
177
|
+
"peerDependencies": {
|
|
178
|
+
"required": [
|
|
179
|
+
"@ds-mo/tokens ^3.1.1",
|
|
180
|
+
"@ds-mo/icons ^6.4.0"
|
|
181
|
+
],
|
|
182
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"dependencies": [
|
|
187
|
+
"@ds-mo/ui",
|
|
188
|
+
"@ds-mo/tokens"
|
|
189
|
+
],
|
|
190
|
+
"registryDependencies": [
|
|
191
|
+
"button-unfilled",
|
|
192
|
+
"card-shell-data-viz"
|
|
193
|
+
],
|
|
194
|
+
"files": [
|
|
195
|
+
{
|
|
196
|
+
"path": "src/wc/components/CardDataVizLine/CardDataVizLine.css",
|
|
197
|
+
"content": ":host {\n display: contents;\n}\n\n.card-data-viz-line__layout {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n gap: var(--dimension-space-200);\n}\n\n.card-data-viz-line__chart-region {\n display: grid;\n flex: 1 1 auto;\n align-items: center;\n box-sizing: border-box;\n min-height: 0;\n padding: var(--dimension-space-400) var(--dimension-space-400) 0\n var(--dimension-space-400);\n}\n\n.card-data-viz-line__chart-region > * {\n width: 100%;\n min-width: 0;\n max-width: 100%;\n}\n\n.card-data-viz-line__legend-region {\n flex: 0 0 auto;\n box-sizing: border-box;\n padding: 0 var(--dimension-space-100) var(--dimension-space-100)\n var(--dimension-space-100);\n}\n",
|
|
198
|
+
"type": "registry:ui"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"path": "src/wc/components/CardDataVizLine/CardDataVizLine.tsx",
|
|
202
|
+
"content": "import { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport type { CardShellDataVizWidth } from '../CardShellDataViz/CardShellDataViz';\n\nexport type CardDataVizLineWidth = CardShellDataVizWidth;\n\ntype StaticLegendSlot = HTMLElement & {\n highlightOnHover?: boolean;\n};\n\n/**\n * Line-chart data-viz card — dedicated `ds-card-shell-data-viz` chrome with a fill chart\n * region and a content-sized, static legend.\n */\n@Component({\n tag: 'ds-card-data-viz-line',\n styleUrl: 'CardDataVizLine.css',\n scoped: true,\n})\nexport class CardDataVizLine {\n @Element() el!: HTMLElement;\n\n /** Widget heading shown in the card header. */\n @Prop() heading!: string;\n\n /** Card width token — also sets matching min-height. */\n @Prop() cardWidth: CardDataVizLineWidth = 'md';\n @Prop() filterLabel: string = 'Filter';\n\n /** Emits when the header filter control is activated. */\n @Event() dsFilterClick!: EventEmitter<void>;\n\n @State() private hasChartSlot = false;\n @State() private hasLegendSlot = false;\n\n componentWillRender() {\n this.hasChartSlot = !!this.el.querySelector('[slot=\"chart\"]');\n this.hasLegendSlot = !!this.el.querySelector('[slot=\"legend\"]');\n }\n\n componentDidRender() {\n const legend = this.el.querySelector(\n 'ds-chart-legend[slot=\"legend\"]'\n ) as StaticLegendSlot | null;\n if (!legend) return;\n legend.setAttribute('highlight-on-hover', 'false');\n if ('highlightOnHover' in legend) legend.highlightOnHover = false;\n }\n\n private handleFilterClick = () => {\n this.dsFilterClick.emit();\n };\n\n render() {\n return (\n <Host class=\"card-data-viz-line\">\n <ds-card-shell-data-viz heading={this.heading} cardWidth={this.cardWidth}>\n <ds-button-unfilled\n slot=\"actions\"\n variant=\"icon\"\n type=\"button\"\n icon=\"Filters\"\n aria-label={this.filterLabel}\n onDsClick={this.handleFilterClick}\n />\n <div class=\"card-data-viz-line__layout\">\n {this.hasChartSlot && (\n <div class=\"card-data-viz-line__chart-region\">\n <slot name=\"chart\" />\n </div>\n )}\n {this.hasLegendSlot && (\n <div class=\"card-data-viz-line__legend-region\">\n <slot name=\"legend\" />\n </div>\n )}\n </div>\n </ds-card-shell-data-viz>\n </Host>\n );\n }\n}\n",
|
|
203
|
+
"type": "registry:ui"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
@@ -34,13 +34,20 @@
|
|
|
34
34
|
"when": "The composition is the standard donut chart plus synchronized legend.",
|
|
35
35
|
"component": "component:ds-card-data-viz-donut",
|
|
36
36
|
"reason": "CardDataVizDonut composes this shell with donut-specific regions and hover synchronization."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"when": "The composition is the standard line chart plus static horizontal legend.",
|
|
40
|
+
"component": "component:ds-card-data-viz-line",
|
|
41
|
+
"reason": "CardDataVizLine composes this shell with line-specific regions and disables decorative legend hover."
|
|
37
42
|
}
|
|
38
43
|
],
|
|
39
44
|
"commonlyComposedWith": [
|
|
40
45
|
"component:ds-chart-bar",
|
|
46
|
+
"component:ds-chart-bar-stacked",
|
|
41
47
|
"component:ds-chart-donut",
|
|
42
48
|
"component:ds-chart-line",
|
|
43
49
|
"component:ds-chart-legend",
|
|
50
|
+
"component:ds-card-data-viz-line",
|
|
44
51
|
"component:ds-button-unfilled"
|
|
45
52
|
],
|
|
46
53
|
"accessibility": [
|