@ds-mo/ui 10.0.0 → 11.1.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/.build-stamp +1 -1
- package/dist/agent-patterns.json +15 -9
- package/dist/agent.json +523 -36
- package/dist/angular/ds-button-filled.d.ts +1 -1
- package/dist/angular/ds-button-filled.js +3 -3
- package/dist/angular/ds-chart-donut.d.ts +1 -1
- package/dist/angular/ds-chart-donut.js +3 -3
- package/dist/angular/ds-typing-indicator.d.ts +12 -0
- package/dist/angular/ds-typing-indicator.js +38 -0
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +2 -1
- package/dist/angular/proxies.d.ts +1 -0
- package/dist/angular/proxies.js +1 -0
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-response.js.map +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-avatar.js +1 -1
- package/dist/components/ds-avatar.js.map +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- 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-donut.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-donut.js.map +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-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-chip.js.map +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-input.js +1 -1
- package/dist/components/ds-input.js.map +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-composer.js.map +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-modal.js.map +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js.map +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-tool-search.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-radio.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-skeleton.js +1 -1
- package/dist/components/ds-skeleton.js.map +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tab-group.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-tag.js.map +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-toast.js.map +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js.map +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.d.ts +11 -0
- package/dist/components/ds-typing-indicator.js +2 -0
- package/dist/components/ds-typing-indicator.js.map +1 -0
- package/dist/components/p-BCCt2eT_.js +2 -0
- package/dist/components/{p-DM-95BX1.js.map → p-BCCt2eT_.js.map} +1 -1
- package/dist/components/{p-CxyjoTN1.js → p-BEWtqFX7.js} +2 -2
- package/dist/components/{p-DZAtgSZo.js → p-B_qVPsEU.js} +2 -2
- package/dist/components/p-BaZRP4Oo.js +2 -0
- package/dist/components/p-BaZRP4Oo.js.map +1 -0
- package/dist/components/p-BsnezUUC.js +2 -0
- package/dist/components/{p-DhsO0939.js.map → p-BsnezUUC.js.map} +1 -1
- package/dist/components/{p-B4RQoNmL.js → p-C1K5QGUZ.js} +2 -2
- package/dist/components/p-CjP8sYlo.js +2 -0
- package/dist/components/{p-CS12e52R.js.map → p-CjP8sYlo.js.map} +1 -1
- package/dist/components/p-CrwU83-g.js +2 -0
- package/dist/components/{p-C_0Q8Cnp.js.map → p-CrwU83-g.js.map} +1 -1
- package/dist/components/{p-BTo4pNdp.js → p-DJ78wdNv.js} +2 -2
- package/dist/components/p-DTqCBjUj.js +2 -0
- package/dist/components/{p-CKnoWZd9.js.map → p-DTqCBjUj.js.map} +1 -1
- package/dist/components/p-ZTugT4as.js +2 -0
- package/dist/components/{p-BJUcsBHt.js.map → p-ZTugT4as.js.map} +1 -1
- package/dist/components/p-bNpFhP5L.js +2 -0
- package/dist/components/p-bNpFhP5L.js.map +1 -0
- package/dist/docs/components.json +215 -30
- package/dist/mcp/cli.js +8 -12
- package/dist/mcp-data/registry/agent-response.json +5 -5
- package/dist/mcp-data/registry/button-filled.json +38 -2
- package/dist/mcp-data/registry/card-data-viz-donut.json +73 -4
- package/dist/mcp-data/registry/chart-bar.json +67 -3
- package/dist/mcp-data/registry/chart-donut.json +94 -8
- package/dist/mcp-data/registry/chart-legend.json +73 -3
- package/dist/mcp-data/registry/chart-line.json +67 -3
- package/dist/mcp-data/registry/conversation-list-item.json +2 -2
- package/dist/mcp-data/registry/message-bubble.json +19 -14
- package/dist/mcp-data/registry/message-composer.json +5 -3
- package/dist/mcp-data/registry/message-scroller.json +1 -1
- package/dist/mcp-data/registry/panel-nav.json +3 -2
- package/dist/mcp-data/registry/registry.json +525 -35
- package/dist/mcp-data/registry/skeleton.json +2 -2
- package/dist/mcp-data/registry/tooltip-data-viz.json +68 -4
- package/dist/mcp-data/registry/typing-indicator.json +127 -0
- package/dist/react/components.d.ts +1 -0
- package/dist/react/components.js +1 -0
- package/dist/react/ds-typing-indicator.d.ts +9 -0
- package/dist/react/ds-typing-indicator.js +12 -0
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +9 -0
- package/dist/types/components/ButtonFilled/index.d.ts +1 -1
- package/dist/types/components/CardDataVizDonut/CardDataVizDonut.d.ts +1 -0
- package/dist/types/components/ChartDonut/ChartDonut.d.ts +12 -2
- package/dist/types/components/MessageBubble/MessageBubble.d.ts +1 -1
- package/dist/types/components/TooltipDataViz/TooltipDataViz.d.ts +3 -2
- package/dist/types/components/TypingIndicator/TypingIndicator.d.ts +6 -0
- package/dist/types/components.d.ts +75 -14
- package/package.json +1 -1
- package/dist/components/p-BHtg1fh3.js +0 -2
- package/dist/components/p-BHtg1fh3.js.map +0 -1
- package/dist/components/p-BJUcsBHt.js +0 -2
- package/dist/components/p-CKnoWZd9.js +0 -2
- package/dist/components/p-CS12e52R.js +0 -2
- package/dist/components/p-C_0Q8Cnp.js +0 -2
- package/dist/components/p-DBJ2I3mH.js +0 -2
- package/dist/components/p-DBJ2I3mH.js.map +0 -1
- package/dist/components/p-DM-95BX1.js +0 -2
- package/dist/components/p-DhsO0939.js +0 -2
- package/dist/components/p-DsbhBb5F.js +0 -2
- package/dist/components/p-DsbhBb5F.js.map +0 -1
- /package/dist/components/{p-CxyjoTN1.js.map → p-BEWtqFX7.js.map} +0 -0
- /package/dist/components/{p-DZAtgSZo.js.map → p-B_qVPsEU.js.map} +0 -0
- /package/dist/components/{p-B4RQoNmL.js.map → p-C1K5QGUZ.js.map} +0 -0
- /package/dist/components/{p-BTo4pNdp.js.map → p-DJ78wdNv.js.map} +0 -0
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"The owner preserves focus and meaningful reading order when replacing placeholders with real content."
|
|
55
55
|
],
|
|
56
56
|
"states": [
|
|
57
|
-
"Text, icon, and control variants are atomic metric canvases aligned to their corresponding design-system recipes.",
|
|
57
|
+
"Text, icon, and control variants are atomic metric canvases aligned to their corresponding design-system recipes; control atoms inherit the selected control density's default radius.",
|
|
58
58
|
"Compose approximate line count, hierarchy, widths, and control placement without simulating actual values.",
|
|
59
59
|
"Shimmer is on by default and may be disabled for a static placeholder. Reduced motion always produces the static final shape.",
|
|
60
60
|
"Rounded is an optional visual treatment for icon and control atoms rather than a semantic state.",
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
"files": [
|
|
271
271
|
{
|
|
272
272
|
"path": "src/wc/components/Skeleton/Skeleton.css",
|
|
273
|
-
"content": "@import '../../utils/control-density.css';\n@import '../../utils/shimmer.css';\n\n:host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 0;\n vertical-align: middle;\n --ds-skeleton-base: var(--color-foreground-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer);\n}\n\n.skeleton__shape {\n --ds-shimmer-surface-base: var(--ds-skeleton-base);\n\n display: block;\n width: 100%;\n height: 100%;\n flex: 0 0 auto;\n background-color: var(--ds-skeleton-base);\n border-radius: var(--dimension-radius-025);\n}\n\n/* ── Background context ────────────────────────────────────────────────── */\n\n:host(.skeleton--background-medium) {\n --ds-skeleton-base: var(--color-foreground-on-medium-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-medium-background);\n}\n\n:host(.skeleton--background-bold) {\n --ds-skeleton-base: var(--color-foreground-on-bold-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-bold-background);\n}\n\n:host(.skeleton--background-strong) {\n --ds-skeleton-base: var(--color-foreground-on-strong-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-strong-background);\n}\n\n:host(.skeleton--background-translucent) {\n --ds-skeleton-base: var(--color-translucent-foreground-quaternary);\n --ds-shimmer: var(--color-translucent-shimmer);\n}\n\n:host(.skeleton--background-inverted) {\n --ds-skeleton-base: var(--color-inverted-foreground-quaternary);\n --ds-shimmer: var(--color-inverted-shimmer);\n}\n\n:host(.skeleton--background-media) {\n --ds-skeleton-base: var(--color-media-foreground-quaternary);\n --ds-shimmer: var(--color-media-shimmer);\n}\n\n:host(.skeleton--background-always-dark) {\n --ds-skeleton-base: var(--color-always-dark-foreground-quaternary);\n --ds-shimmer: var(--color-always-dark-shimmer);\n}\n\n:host(.skeleton--background-navigation) {\n --ds-skeleton-base: var(--color-navigation-foreground-quaternary);\n --ds-shimmer: var(--color-navigation-shimmer);\n}\n\n/* ── Text ──────────────────────────────────────────────────────────────── */\n\n:host(.skeleton--text) {\n width: 100%;\n height: var(--ds-skeleton-canvas-size);\n padding-block: var(--dimension-space-025);\n}\n\n:host(.skeleton--text) .skeleton__shape {\n height: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n}\n\n:host(.skeleton--text-text-display-medium) { --ds-skeleton-canvas-size: var(--typography-lineheight-3xl); }\n:host(.skeleton--text-text-display-small) { --ds-skeleton-canvas-size: var(--typography-lineheight-2xl); }\n:host(.skeleton--text-text-title-large) { --ds-skeleton-canvas-size: var(--typography-lineheight-xl); }\n:host(.skeleton--text-text-title-medium),\n:host(.skeleton--text-text-body-large) { --ds-skeleton-canvas-size: var(--typography-lineheight-lg); }\n:host(.skeleton--text-text-title-small),\n:host(.skeleton--text-text-body-medium) { --ds-skeleton-canvas-size: var(--typography-lineheight-md); }\n:host(.skeleton--text-text-body-small) { --ds-skeleton-canvas-size: var(--typography-lineheight-sm); }\n:host(.skeleton--text-text-caption) { --ds-skeleton-canvas-size: var(--typography-lineheight-xs); }\n\n/* ── Icon ──────────────────────────────────────────────────────────────── */\n\n:host(.skeleton--icon) {\n width: var(--ds-skeleton-canvas-size);\n height: var(--ds-skeleton-canvas-size);\n padding: var(--dimension-space-025);\n}\n\n:host(.skeleton--icon) .skeleton__shape {\n width: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n height: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n}\n\n:host(.skeleton--icon.skeleton--rounded) .skeleton__shape {\n border-radius: var(--dimension-radius-half);\n}\n\n:host(.skeleton--icon-xs) { --ds-skeleton-canvas-size: var(--dimension-iconography-xs); }\n:host(.skeleton--icon-sm) { --ds-skeleton-canvas-size: var(--dimension-iconography-sm); }\n:host(.skeleton--icon-md) { --ds-skeleton-canvas-size: var(--dimension-iconography-md); }\n:host(.skeleton--icon-lg) { --ds-skeleton-canvas-size: var(--dimension-iconography-lg); }\n:host(.skeleton--icon-xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-xl); }\n:host(.skeleton--icon-2xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-2xl); }\n:host(.skeleton--icon-3xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-3xl); }\n\n/* ── Control ───────────────────────────────────────────────────────────── */\n\n:host(.skeleton--control) {\n width: 100%;\n height: var(--ds-control-height);\n}\n\n:host(.skeleton--control.skeleton--rounded) .skeleton__shape {\n border-radius: var(--dimension-radius-half);\n}\n",
|
|
273
|
+
"content": "@import '../../utils/control-density.css';\n@import '../../utils/shimmer.css';\n\n:host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 0;\n vertical-align: middle;\n --ds-skeleton-base: var(--color-foreground-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer);\n}\n\n.skeleton__shape {\n --ds-shimmer-surface-base: var(--ds-skeleton-base);\n\n display: block;\n width: 100%;\n height: 100%;\n flex: 0 0 auto;\n background-color: var(--ds-skeleton-base);\n border-radius: var(--dimension-radius-025);\n}\n\n/* ── Background context ────────────────────────────────────────────────── */\n\n:host(.skeleton--background-medium) {\n --ds-skeleton-base: var(--color-foreground-on-medium-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-medium-background);\n}\n\n:host(.skeleton--background-bold) {\n --ds-skeleton-base: var(--color-foreground-on-bold-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-bold-background);\n}\n\n:host(.skeleton--background-strong) {\n --ds-skeleton-base: var(--color-foreground-on-strong-background-quaternary);\n --ds-shimmer: var(--color-shimmer-shimmer-on-strong-background);\n}\n\n:host(.skeleton--background-translucent) {\n --ds-skeleton-base: var(--color-translucent-foreground-quaternary);\n --ds-shimmer: var(--color-translucent-shimmer);\n}\n\n:host(.skeleton--background-inverted) {\n --ds-skeleton-base: var(--color-inverted-foreground-quaternary);\n --ds-shimmer: var(--color-inverted-shimmer);\n}\n\n:host(.skeleton--background-media) {\n --ds-skeleton-base: var(--color-media-foreground-quaternary);\n --ds-shimmer: var(--color-media-shimmer);\n}\n\n:host(.skeleton--background-always-dark) {\n --ds-skeleton-base: var(--color-always-dark-foreground-quaternary);\n --ds-shimmer: var(--color-always-dark-shimmer);\n}\n\n:host(.skeleton--background-navigation) {\n --ds-skeleton-base: var(--color-navigation-foreground-quaternary);\n --ds-shimmer: var(--color-navigation-shimmer);\n}\n\n/* ── Text ──────────────────────────────────────────────────────────────── */\n\n:host(.skeleton--text) {\n width: 100%;\n height: var(--ds-skeleton-canvas-size);\n padding-block: var(--dimension-space-025);\n}\n\n:host(.skeleton--text) .skeleton__shape {\n height: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n}\n\n:host(.skeleton--text-text-display-medium) { --ds-skeleton-canvas-size: var(--typography-lineheight-3xl); }\n:host(.skeleton--text-text-display-small) { --ds-skeleton-canvas-size: var(--typography-lineheight-2xl); }\n:host(.skeleton--text-text-title-large) { --ds-skeleton-canvas-size: var(--typography-lineheight-xl); }\n:host(.skeleton--text-text-title-medium),\n:host(.skeleton--text-text-body-large) { --ds-skeleton-canvas-size: var(--typography-lineheight-lg); }\n:host(.skeleton--text-text-title-small),\n:host(.skeleton--text-text-body-medium) { --ds-skeleton-canvas-size: var(--typography-lineheight-md); }\n:host(.skeleton--text-text-body-small) { --ds-skeleton-canvas-size: var(--typography-lineheight-sm); }\n:host(.skeleton--text-text-caption) { --ds-skeleton-canvas-size: var(--typography-lineheight-xs); }\n\n/* ── Icon ──────────────────────────────────────────────────────────────── */\n\n:host(.skeleton--icon) {\n width: var(--ds-skeleton-canvas-size);\n height: var(--ds-skeleton-canvas-size);\n padding: var(--dimension-space-025);\n}\n\n:host(.skeleton--icon) .skeleton__shape {\n width: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n height: calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));\n}\n\n:host(.skeleton--icon.skeleton--rounded) .skeleton__shape {\n border-radius: var(--dimension-radius-half);\n}\n\n:host(.skeleton--icon-xs) { --ds-skeleton-canvas-size: var(--dimension-iconography-xs); }\n:host(.skeleton--icon-sm) { --ds-skeleton-canvas-size: var(--dimension-iconography-sm); }\n:host(.skeleton--icon-md) { --ds-skeleton-canvas-size: var(--dimension-iconography-md); }\n:host(.skeleton--icon-lg) { --ds-skeleton-canvas-size: var(--dimension-iconography-lg); }\n:host(.skeleton--icon-xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-xl); }\n:host(.skeleton--icon-2xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-2xl); }\n:host(.skeleton--icon-3xl) { --ds-skeleton-canvas-size: var(--dimension-iconography-3xl); }\n\n/* ── Control ───────────────────────────────────────────────────────────── */\n\n:host(.skeleton--control) {\n width: 100%;\n height: var(--ds-control-height);\n}\n\n:host(.skeleton--control) .skeleton__shape {\n border-radius: var(--ds-control-radius, var(--dimension-radius-025));\n}\n\n:host(.skeleton--control.skeleton--rounded) .skeleton__shape {\n border-radius: var(--dimension-radius-half);\n}\n",
|
|
274
274
|
"type": "registry:ui"
|
|
275
275
|
},
|
|
276
276
|
{
|
|
@@ -2,15 +2,79 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "tooltip-data-viz",
|
|
4
4
|
"title": "TooltipDataViz",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Chart-owned, non-interactive label and value callout positioned from pointer or focused-mark coordinates inside a visualization wrapper.",
|
|
6
6
|
"type": "registry:ui",
|
|
7
7
|
"meta": {
|
|
8
8
|
"library": "@ds-mo/ui",
|
|
9
9
|
"distribution": "npm",
|
|
10
10
|
"storybook": "https://zainadeel.github.io/compomo/?path=/story/tooltip-data-viz",
|
|
11
11
|
"source": "src/wc/components/TooltipDataViz/TooltipDataViz.tsx",
|
|
12
|
-
"intentStatus": "
|
|
13
|
-
"intent":
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "specialized",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Chart-owned, non-interactive label and value callout positioned from pointer or focused-mark coordinates inside a visualization wrapper.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A chart needs immediate visual value feedback for a genuinely hovered or keyboard-focused mark.",
|
|
19
|
+
"The anchor lives inside SVG or chart coordinates rather than on a slotted HTML trigger.",
|
|
20
|
+
"The owning chart can mount the callout for one interaction session and update its coordinates while tracking."
|
|
21
|
+
],
|
|
22
|
+
"avoidWhen": [
|
|
23
|
+
"A normal control or text trigger needs supplemental explanation; use Tooltip.",
|
|
24
|
+
"The content needs links, actions, focus, or touch-primary disclosure.",
|
|
25
|
+
"An externally synchronized highlight has no genuine local pointer or keyboard interaction.",
|
|
26
|
+
"The callout would be the only accessible source of an essential value."
|
|
27
|
+
],
|
|
28
|
+
"alternatives": [
|
|
29
|
+
{
|
|
30
|
+
"when": "A slotted control or text trigger needs a conventional tooltip.",
|
|
31
|
+
"component": "component:ds-tooltip",
|
|
32
|
+
"reason": "Tooltip owns trigger semantics, focus behavior, and anchored overlay lifecycle."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"when": "Donut details should remain continuously visible beside the chart.",
|
|
36
|
+
"component": "component:ds-chart-legend",
|
|
37
|
+
"reason": "A visible legend avoids redundant transient slice callouts."
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"commonlyComposedWith": [
|
|
41
|
+
"component:ds-chart-bar",
|
|
42
|
+
"component:ds-chart-line",
|
|
43
|
+
"component:ds-chart-donut"
|
|
44
|
+
],
|
|
45
|
+
"accessibility": [
|
|
46
|
+
"The callout is presentation-only and never replaces the owning chart mark's accessible label or an adjacent data summary.",
|
|
47
|
+
"Keyboard-focused marks receive the same visual feedback as pointer-hovered marks.",
|
|
48
|
+
"The callout never receives focus or contains interactive descendants."
|
|
49
|
+
],
|
|
50
|
+
"states": [
|
|
51
|
+
"The owning chart mounts the callout when a local interaction starts and unmounts it when that interaction ends.",
|
|
52
|
+
"Coordinate updates track within one mounted interaction session without restarting the show delay.",
|
|
53
|
+
"Placement flips horizontally or vertically when the rendered callout approaches a viewport edge.",
|
|
54
|
+
"Reduced motion preserves the final visible state without an opacity transition."
|
|
55
|
+
],
|
|
56
|
+
"responsiveBehavior": [
|
|
57
|
+
"Render inside a positioned chart wrapper and pass coordinates relative to that wrapper.",
|
|
58
|
+
"Keep labels concise enough for the single-line callout; persistent or long explanations belong outside the chart."
|
|
59
|
+
],
|
|
60
|
+
"frameworkCaveats": {
|
|
61
|
+
"customElements": [
|
|
62
|
+
"The owning chart computes coordinates and conditionally mounts the component; applications should not use it as a standalone overlay."
|
|
63
|
+
],
|
|
64
|
+
"react": [
|
|
65
|
+
"Keep callout lifecycle and coordinates inside the chart wrapper rather than application-global tooltip state."
|
|
66
|
+
],
|
|
67
|
+
"angular": [
|
|
68
|
+
"Keep callout lifecycle and coordinates inside the chart wrapper rather than application-global tooltip state."
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"references": [
|
|
72
|
+
{
|
|
73
|
+
"label": "Storybook example",
|
|
74
|
+
"path": "src/wc/components/TooltipDataViz/TooltipDataViz.stories.ts"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
14
78
|
"api": {
|
|
15
79
|
"props": {
|
|
16
80
|
"delay": {
|
|
@@ -151,7 +215,7 @@
|
|
|
151
215
|
},
|
|
152
216
|
{
|
|
153
217
|
"path": "src/wc/components/TooltipDataViz/TooltipDataViz.tsx",
|
|
154
|
-
"content": "import { Component, Prop, State, Element, Watch, h, Host } from '@stencil/core';\nimport { resolveCssTimeMs, TOKEN_DEFAULTS } from '../../utils';\n\nconst CURSOR_OFFSET_PX = 12;\nconst VIEWPORT_PAD_PX = 8;\n\nexport type TooltipDataVizSide = 'left' | 'right';\nexport type TooltipDataVizAlign = 'top' | 'bottom';\n\n/**\n * Positioned value/label callout for chart hover interactions (bar, line point, …)
|
|
218
|
+
"content": "import { Component, Prop, State, Element, Watch, h, Host } from '@stencil/core';\nimport { resolveCssTimeMs, TOKEN_DEFAULTS } from '../../utils';\n\nconst CURSOR_OFFSET_PX = 12;\nconst VIEWPORT_PAD_PX = 8;\n\nexport type TooltipDataVizSide = 'left' | 'right';\nexport type TooltipDataVizAlign = 'top' | 'bottom';\n\n/**\n * Positioned value/label callout for chart hover interactions (bar, line point,\n * standalone donut slice, …). Donut compositions suppress it when a visible\n * legend already surfaces the hovered slice.\n * Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —\n * charts hover-highlight data that lives inside an SVG, so the chart itself computes\n * the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.\n *\n * Renders `position: absolute` — place inside a `position: relative` chart wrapper,\n * with `x`/`y` as pixel coordinates within that wrapper. Defaults to sitting below-right\n * of the anchor (matching cursor-following tooltips), flipping to whichever side/edge\n * keeps it on-screen.\n *\n * Mount (or remount) when a hover session starts so `delay` applies once per hover;\n * keep the instance mounted while the cursor moves so tracking stays instant.\n */\n@Component({\n tag: 'ds-tooltip-data-viz',\n styleUrl: 'TooltipDataViz.css',\n scoped: true,\n})\nexport class TooltipDataViz {\n @Element() el!: HTMLElement;\n\n @Prop() value: string | number = '';\n @Prop() label: string = '';\n /** Anchor point in px, relative to the nearest `position: relative` ancestor — e.g. the cursor. */\n @Prop() x: number = 0;\n @Prop() y: number = 0;\n\n /**\n * Show delay after mount before the callout appears.\n * Default: `--effect-animation-delay-instant` (0ms). Accepts a number (ms)\n * or a TokoMo time token / `var(--effect-animation-delay-*)`. Charts need\n * immediate feedback while scrubbing; prefer the default. Mount once per\n * hover session so any non-zero delay runs once, then track `x`/`y` instantly.\n */\n @Prop() delay: number | string = TOKEN_DEFAULTS.animationDelayInstant;\n\n @State() private side: TooltipDataVizSide = 'right';\n @State() private align: TooltipDataVizAlign = 'bottom';\n @State() private visible: boolean = false;\n\n private delayTimer: ReturnType<typeof setTimeout> | null = null;\n\n componentDidLoad() {\n this.scheduleShow();\n this.calculatePlacement();\n }\n\n disconnectedCallback() {\n this.clearDelayTimer();\n }\n\n @Watch('x')\n @Watch('y')\n onAnchorChange() {\n requestAnimationFrame(() => this.calculatePlacement());\n }\n\n @Watch('delay')\n onDelayChange() {\n if (!this.visible) this.scheduleShow();\n }\n\n private get showDelayMs(): number {\n return resolveCssTimeMs(this.delay, TOKEN_DEFAULTS.animationDelayInstant);\n }\n\n private clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n\n private scheduleShow() {\n this.clearDelayTimer();\n this.visible = false;\n const ms = this.showDelayMs;\n if (ms <= 0) {\n this.visible = true;\n return;\n }\n this.delayTimer = setTimeout(() => {\n this.delayTimer = null;\n this.visible = true;\n requestAnimationFrame(() => this.calculatePlacement());\n }, ms);\n }\n\n private calculatePlacement() {\n const rect = this.el.getBoundingClientRect();\n if (!rect.width || !rect.height) return;\n\n const nextSide: TooltipDataVizSide = rect.right > window.innerWidth - VIEWPORT_PAD_PX ? 'left' : 'right';\n const nextAlign: TooltipDataVizAlign = rect.bottom > window.innerHeight - VIEWPORT_PAD_PX ? 'top' : 'bottom';\n\n if (nextSide !== this.side) this.side = nextSide;\n if (nextAlign !== this.align) this.align = nextAlign;\n }\n\n render() {\n const translateX = this.side === 'right' ? `${CURSOR_OFFSET_PX}px` : `calc(-100% - ${CURSOR_OFFSET_PX}px)`;\n const translateY = this.align === 'bottom' ? `${CURSOR_OFFSET_PX}px` : `calc(-100% - ${CURSOR_OFFSET_PX}px)`;\n\n return (\n <Host\n class={{\n 'tooltip-data-viz': true,\n 'tooltip-data-viz--visible': this.visible,\n }}\n style={{ left: `${this.x}px`, top: `${this.y}px`, transform: `translate(${translateX}, ${translateY})` }}\n >\n <div class=\"tooltip-data-viz__item ds-control--md\">\n <ds-text\n class=\"tooltip-data-viz__label\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"var(--color-translucent-foreground-secondary)\"\n >\n {this.label}\n </ds-text>\n <ds-text\n class=\"tooltip-data-viz__value\"\n as=\"span\"\n variant=\"text-body-medium\"\n emphasis\n color=\"var(--color-translucent-foreground-primary)\"\n >\n {this.value}\n </ds-text>\n </div>\n </Host>\n );\n }\n}\n",
|
|
155
219
|
"type": "registry:ui"
|
|
156
220
|
}
|
|
157
221
|
]
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "typing-indicator",
|
|
4
|
+
"title": "TypingIndicator",
|
|
5
|
+
"description": "Dedicated transient status for another participant actively composing a message.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/typing-indicator",
|
|
11
|
+
"source": "src/wc/components/TypingIndicator/TypingIndicator.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "general",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Dedicated transient status for another participant actively composing a message.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"An agent or person-to-person conversation needs to show that another participant is currently typing."
|
|
19
|
+
],
|
|
20
|
+
"avoidWhen": [
|
|
21
|
+
"An operation is loading or streaming a response; use Loader or the owning region's busy state.",
|
|
22
|
+
"The status represents persisted message content; use Message and MessageBubble."
|
|
23
|
+
],
|
|
24
|
+
"commonlyComposedWith": [
|
|
25
|
+
"component:ds-message",
|
|
26
|
+
"component:ds-message-scroller"
|
|
27
|
+
],
|
|
28
|
+
"patterns": [
|
|
29
|
+
"pattern:conversation"
|
|
30
|
+
],
|
|
31
|
+
"accessibility": [
|
|
32
|
+
"Provide concise localized status text that names the participant when that context is not otherwise clear.",
|
|
33
|
+
"The polite atomic status announces typing without representing it as a message bubble."
|
|
34
|
+
],
|
|
35
|
+
"states": [
|
|
36
|
+
"TypingIndicator is transient conversation status, never persisted message content.",
|
|
37
|
+
"Its body-small secondary text may shimmer, while reduced-motion preferences retain a static readable status."
|
|
38
|
+
],
|
|
39
|
+
"responsiveBehavior": [
|
|
40
|
+
"The indicator fills the message content width and wraps only when localized status text requires it."
|
|
41
|
+
],
|
|
42
|
+
"references": [
|
|
43
|
+
{
|
|
44
|
+
"label": "Storybook example",
|
|
45
|
+
"path": "src/wc/components/TypingIndicator/TypingIndicator.stories.ts"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"api": {
|
|
50
|
+
"props": {
|
|
51
|
+
"label": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"resolvedType": "string",
|
|
54
|
+
"attribute": "label",
|
|
55
|
+
"default": "'Typing…'",
|
|
56
|
+
"required": false,
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"description": "Concise localized status text, ideally naming the participant who is typing."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"events": [],
|
|
62
|
+
"methods": [],
|
|
63
|
+
"slots": []
|
|
64
|
+
},
|
|
65
|
+
"props": {
|
|
66
|
+
"label": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"resolvedType": "string",
|
|
69
|
+
"attribute": "label",
|
|
70
|
+
"default": "'Typing…'",
|
|
71
|
+
"required": false,
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"description": "Concise localized status text, ideally naming the participant who is typing."
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"events": [],
|
|
77
|
+
"methods": [],
|
|
78
|
+
"slots": [],
|
|
79
|
+
"exports": {
|
|
80
|
+
"customElement": "ds-typing-indicator",
|
|
81
|
+
"react": "DsTypingIndicator",
|
|
82
|
+
"angular": "DsTypingIndicator"
|
|
83
|
+
},
|
|
84
|
+
"consumption": {
|
|
85
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
86
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
87
|
+
"customElements": {
|
|
88
|
+
"import": "import '@ds-mo/ui/dist/components/ds-typing-indicator.js';",
|
|
89
|
+
"example": "<ds-typing-indicator></ds-typing-indicator>"
|
|
90
|
+
},
|
|
91
|
+
"react": {
|
|
92
|
+
"import": "import { DsTypingIndicator } from '@ds-mo/ui/react';",
|
|
93
|
+
"example": "<DsTypingIndicator />"
|
|
94
|
+
},
|
|
95
|
+
"angular": {
|
|
96
|
+
"import": "import { DsTypingIndicator } from '@ds-mo/ui/angular/ds-typing-indicator';",
|
|
97
|
+
"example": "<ds-typing-indicator></ds-typing-indicator>"
|
|
98
|
+
},
|
|
99
|
+
"peerDependencies": {
|
|
100
|
+
"required": [
|
|
101
|
+
"@ds-mo/tokens ^3.1.1",
|
|
102
|
+
"@ds-mo/icons ^6.3.0"
|
|
103
|
+
],
|
|
104
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"dependencies": [
|
|
109
|
+
"@ds-mo/ui",
|
|
110
|
+
"@ds-mo/tokens"
|
|
111
|
+
],
|
|
112
|
+
"registryDependencies": [
|
|
113
|
+
"text"
|
|
114
|
+
],
|
|
115
|
+
"files": [
|
|
116
|
+
{
|
|
117
|
+
"path": "src/wc/components/TypingIndicator/TypingIndicator.css",
|
|
118
|
+
"content": ":host {\n display: block;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n",
|
|
119
|
+
"type": "registry:ui"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": "src/wc/components/TypingIndicator/TypingIndicator.tsx",
|
|
123
|
+
"content": "import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ds-typing-indicator',\n styleUrl: 'TypingIndicator.css',\n scoped: true,\n})\nexport class TypingIndicator {\n /** Concise localized status text, ideally naming the participant who is typing. */\n @Prop() label: string = 'Typing…';\n\n render() {\n return (\n <Host role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n <ds-text as=\"span\" variant=\"text-body-small\" color=\"secondary\" shimmer>\n {this.label}\n </ds-text>\n </Host>\n );\n }\n}\n",
|
|
124
|
+
"type": "registry:ui"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
package/dist/react/components.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
+
import type { Components } from "@ds-mo/ui/dist/components";
|
|
7
|
+
import { DsTypingIndicator as DsTypingIndicatorElement } from "@ds-mo/ui/dist/components/ds-typing-indicator.js";
|
|
8
|
+
export type DsTypingIndicatorEvents = NonNullable<unknown>;
|
|
9
|
+
export declare const DsTypingIndicator: StencilReactComponent<DsTypingIndicatorElement, DsTypingIndicatorEvents, Components.DsTypingIndicator>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { DsTypingIndicator as DsTypingIndicatorElement, defineCustomElement as defineDsTypingIndicator } from "@ds-mo/ui/dist/components/ds-typing-indicator.js";
|
|
5
|
+
export const DsTypingIndicator = /*@__PURE__*/ createComponent({
|
|
6
|
+
tagName: 'ds-typing-indicator',
|
|
7
|
+
elementClass: DsTypingIndicatorElement,
|
|
8
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
9
|
+
react: React,
|
|
10
|
+
events: {},
|
|
11
|
+
defineCustomElement: defineDsTypingIndicator
|
|
12
|
+
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { type ControlWidth } from '../../utils';
|
|
3
|
+
import type { ChoiceBackground } from '../../utils/choice-list';
|
|
3
4
|
export type ButtonFilledIntent = 'neutral' | 'brand' | 'ai' | 'negative' | 'warning' | 'caution' | 'positive' | 'guide' | 'walkthrough';
|
|
4
5
|
export type ButtonFilledContrast = 'bold' | 'strong' | 'medium' | 'faint';
|
|
6
|
+
export type ButtonFilledBackground = ChoiceBackground;
|
|
5
7
|
export type ButtonFilledVariant = 'icon' | 'label' | 'icon-label';
|
|
6
8
|
export type ButtonFilledSize = 'md' | 'sm' | 'xs';
|
|
7
9
|
export type ButtonFilledWidth = ControlWidth;
|
|
@@ -27,6 +29,13 @@ export declare class ButtonFilled {
|
|
|
27
29
|
* bold → faint, strong → medium, medium → strong, faint → bold.
|
|
28
30
|
*/
|
|
29
31
|
contrast: ButtonFilledContrast;
|
|
32
|
+
/** Show a 1px secondary inset border. */
|
|
33
|
+
hasBorder: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Actual parent surface context for the optional inset border color only.
|
|
36
|
+
* Omit on primary and secondary surfaces.
|
|
37
|
+
*/
|
|
38
|
+
background: ButtonFilledBackground | undefined;
|
|
30
39
|
/** Use the half-radius treatment instead of the default control radius. */
|
|
31
40
|
rounded: boolean;
|
|
32
41
|
/** Disables interaction. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ButtonFilledContrast, ButtonFilledIntent, ButtonFilledSize, ButtonFilledVariant, ButtonFilledWidth, } from './ButtonFilled';
|
|
1
|
+
export type { ButtonFilledBackground, ButtonFilledContrast, ButtonFilledIntent, ButtonFilledSize, ButtonFilledVariant, ButtonFilledWidth, } from './ButtonFilled';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -19,6 +19,11 @@ export declare class ChartDonut {
|
|
|
19
19
|
cornerRadius: number | string;
|
|
20
20
|
/** Gap between slices, in degrees. */
|
|
21
21
|
gap: number;
|
|
22
|
+
/**
|
|
23
|
+
* Show a chart-owned value callout for genuine pointer or keyboard focus.
|
|
24
|
+
* Disable when a visible legend already owns persistent label and value detail.
|
|
25
|
+
*/
|
|
26
|
+
showTooltip: boolean;
|
|
22
27
|
/** Primary center value; defaults to the sum of `data` values (e.g. "187", "40.9%"). */
|
|
23
28
|
centerValue: string | undefined;
|
|
24
29
|
/** Secondary caption below the center value (e.g. "Total", "Normal"). Rendered uppercase. */
|
|
@@ -27,8 +32,8 @@ export declare class ChartDonut {
|
|
|
27
32
|
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling
|
|
28
33
|
* `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync.
|
|
29
34
|
* Falls back to this component's own pointer/focus hover when unset.
|
|
30
|
-
* Slice hover dims peer slices and emits `dsSliceHover` for legend sync
|
|
31
|
-
*
|
|
35
|
+
* Slice hover dims peer slices and emits `dsSliceHover` for legend sync. External
|
|
36
|
+
* highlight never opens the local tooltip.
|
|
32
37
|
*/
|
|
33
38
|
activeLabel: string | null;
|
|
34
39
|
private hoveredLabel;
|
|
@@ -37,6 +42,8 @@ export declare class ChartDonut {
|
|
|
37
42
|
private displayedCaptionText;
|
|
38
43
|
/** Measured fill diameter when `size` is unset. */
|
|
39
44
|
private measuredSize;
|
|
45
|
+
private tooltipX;
|
|
46
|
+
private tooltipY;
|
|
40
47
|
/** Fires with the hovered/focused slice's datum, or `null` on leave/blur. */
|
|
41
48
|
dsSliceHover: EventEmitter<ChartDatum | null>;
|
|
42
49
|
private valueTextEl?;
|
|
@@ -56,6 +63,9 @@ export declare class ChartDonut {
|
|
|
56
63
|
private applyAvailableSize;
|
|
57
64
|
private teardownResizeObserver;
|
|
58
65
|
private handleHover;
|
|
66
|
+
private get tooltipDatum();
|
|
67
|
+
private updateTooltipFromPointer;
|
|
68
|
+
private updateTooltipFromSvgPoint;
|
|
59
69
|
componentDidRender(): void;
|
|
60
70
|
render(): any;
|
|
61
71
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type TooltipDataVizSide = 'left' | 'right';
|
|
2
2
|
export type TooltipDataVizAlign = 'top' | 'bottom';
|
|
3
3
|
/**
|
|
4
|
-
* Positioned value/label callout for chart hover interactions (bar, line point,
|
|
5
|
-
*
|
|
4
|
+
* Positioned value/label callout for chart hover interactions (bar, line point,
|
|
5
|
+
* standalone donut slice, …). Donut compositions suppress it when a visible
|
|
6
|
+
* legend already surfaces the hovered slice.
|
|
6
7
|
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
7
8
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
8
9
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|