@ds-mo/ui 2.14.0 → 3.0.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/components/ds-app-shell.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-banner.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-card-setting.js.map +1 -1
- package/dist/components/ds-card.js +1 -1
- 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-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-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-checkbox.js.map +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-chip.js.map +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-empty-state.js.map +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-field.js.map +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-input.js.map +1 -1
- package/dist/components/ds-loader.js +1 -1
- package/dist/components/ds-loader.js.map +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-modal.js.map +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-pagination.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-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio-group.js +1 -1
- package/dist/components/ds-radio-group.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-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-tab-group-nav.js +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-table.js +1 -1
- package/dist/components/ds-table.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-text.js +1 -1
- package/dist/components/ds-toggle.js +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/p-8WTsyLQ9.js +2 -0
- package/dist/components/p-8WTsyLQ9.js.map +1 -0
- package/dist/components/{p-B82KZX9D.js → p-9Qu1ls2y.js} +2 -2
- package/dist/components/p-BSNlp8Di.js +2 -0
- package/dist/components/p-BSNlp8Di.js.map +1 -0
- package/dist/components/p-BVNJnFI9.js +2 -0
- package/dist/components/p-BVNJnFI9.js.map +1 -0
- package/dist/components/p-B_ENgncs.js +2 -0
- package/dist/components/p-B_ENgncs.js.map +1 -0
- package/dist/components/p-CNgNgezy.js +2 -0
- package/dist/components/p-CNgNgezy.js.map +1 -0
- package/dist/components/p-CQmul5NK.js +2 -0
- package/dist/components/p-CQmul5NK.js.map +1 -0
- package/dist/components/p-CsaW5gDM.js +2 -0
- package/dist/components/{p-CYmVDfd_.js.map → p-CsaW5gDM.js.map} +1 -1
- package/dist/components/p-Cx-ywr1e.js +2 -0
- package/dist/components/p-Cx-ywr1e.js.map +1 -0
- package/dist/components/p-DQ3l2TXw.js +2 -0
- package/dist/components/p-DQ3l2TXw.js.map +1 -0
- package/dist/components/p-DRqJ3RUb.js +2 -0
- package/dist/components/p-DRqJ3RUb.js.map +1 -0
- package/dist/components/p-V2qW8NL0.js +2 -0
- package/dist/components/p-V2qW8NL0.js.map +1 -0
- package/dist/components/p-sBx2MuF2.js +2 -0
- package/dist/components/p-sBx2MuF2.js.map +1 -0
- package/dist/lib/components/Text/text-types.d.ts +9 -0
- package/dist/lib/utils/control-text.d.ts +5 -0
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/index.js +8 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +1 -1
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +1 -1
- package/dist/types/components/ChartDonut/ChartDonut.d.ts +2 -7
- package/dist/types/components/Loader/Loader.d.ts +7 -3
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Text/Text.d.ts +9 -9
- package/dist/types/components/Text/index.d.ts +2 -1
- package/dist/types/components/Text/text-types.d.ts +10 -0
- package/dist/types/components/Text/text-utils.d.ts +6 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/types/components/TooltipDataViz/TooltipDataViz.d.ts +3 -2
- package/dist/types/components.d.ts +54 -19
- package/dist/types/utils/control-text.d.ts +6 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +7 -7
- package/src/angular/proxies.ts +4 -4
- package/src/wc/components/Badge/Badge.tsx +6 -8
- package/src/wc/components/Banner/Banner.tsx +3 -1
- package/src/wc/components/BarNav/BarNav.tsx +10 -1
- package/src/wc/components/ButtonFilled/ButtonFilled.tsx +10 -11
- package/src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx +10 -11
- package/src/wc/components/Card/Card.tsx +9 -10
- package/src/wc/components/ChartDonut/ChartDonut.tsx +4 -47
- package/src/wc/components/ChartLegend/ChartLegend.tsx +23 -15
- package/src/wc/components/Checkbox/Checkbox.tsx +2 -2
- package/src/wc/components/Chip/Chip.tsx +4 -10
- package/src/wc/components/EmptyState/EmptyState.tsx +3 -5
- package/src/wc/components/Field/Field.tsx +3 -1
- package/src/wc/components/Input/Input.tsx +10 -3
- package/src/wc/components/Loader/Loader.tsx +77 -30
- package/src/wc/components/Loader/index.ts +1 -1
- package/src/wc/components/Menu/Menu.tsx +21 -6
- package/src/wc/components/Modal/Modal.tsx +16 -3
- package/src/wc/components/Pagination/Pagination.tsx +5 -5
- package/src/wc/components/PanelNav/PanelNav.tsx +30 -30
- package/src/wc/components/PanelTools/PanelTools.tsx +10 -7
- package/src/wc/components/RadioGroup/RadioGroup.tsx +3 -1
- package/src/wc/components/Select/Select.tsx +15 -17
- package/src/wc/components/Slider/Slider.tsx +6 -2
- package/src/wc/components/TabGroup/TabGroup.tsx +3 -2
- package/src/wc/components/TabGroupNav/TabGroupNav.tsx +3 -2
- package/src/wc/components/Table/Table.tsx +21 -16
- package/src/wc/components/Tag/Tag.tsx +4 -10
- package/src/wc/components/Text/Text.tsx +54 -59
- package/src/wc/components/Text/index.ts +12 -1
- package/src/wc/components/Text/text-types.ts +23 -0
- package/src/wc/components/Text/text-utils.ts +13 -0
- package/src/wc/components/Tooltip/Tooltip.tsx +64 -41
- package/src/wc/components/TooltipDataViz/TooltipDataViz.tsx +20 -12
- package/src/wc/components.d.ts +54 -19
- package/src/wc/utils/control-density.css +1 -0
- package/src/wc/utils/control-text.ts +11 -0
- package/src/wc/utils/index.ts +2 -0
- package/src/wc/utils/interaction-fill.css +2 -2
- package/src/wc/utils/typography.css +146 -0
- package/dist/components/p-1m8r0wFg.js +0 -2
- package/dist/components/p-1m8r0wFg.js.map +0 -1
- package/dist/components/p-B2_D4IDN.js +0 -2
- package/dist/components/p-B2_D4IDN.js.map +0 -1
- package/dist/components/p-B5NcWtpp.js +0 -2
- package/dist/components/p-B5NcWtpp.js.map +0 -1
- package/dist/components/p-BAeKw2pj.js +0 -2
- package/dist/components/p-BAeKw2pj.js.map +0 -1
- package/dist/components/p-B_g8X0eh.js +0 -2
- package/dist/components/p-B_g8X0eh.js.map +0 -1
- package/dist/components/p-CDHRJqea.js +0 -2
- package/dist/components/p-CDHRJqea.js.map +0 -1
- package/dist/components/p-CYmVDfd_.js +0 -2
- package/dist/components/p-CtwNUCnp.js +0 -2
- package/dist/components/p-CtwNUCnp.js.map +0 -1
- package/dist/components/p-CuRjYmBk.js +0 -2
- package/dist/components/p-CuRjYmBk.js.map +0 -1
- package/dist/components/p-Dlol7hPg.js +0 -2
- package/dist/components/p-Dlol7hPg.js.map +0 -1
- package/dist/components/p-EK1hOP19.js +0 -2
- package/dist/components/p-EK1hOP19.js.map +0 -1
- package/dist/components/p-XNHSe8Mg.js +0 -2
- package/dist/components/p-XNHSe8Mg.js.map +0 -1
- /package/dist/components/{p-B82KZX9D.js.map → p-9Qu1ls2y.js.map} +0 -0
|
@@ -22,6 +22,7 @@ import { DividerInset, DividerLength, DividerOrientation, DividerSurface } from
|
|
|
22
22
|
import { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
23
23
|
import { IconColor, IconSize } from "./components/Icon/Icon";
|
|
24
24
|
import { InputType } from "./components/Input/Input";
|
|
25
|
+
import { LoaderColor, LoaderSize } from "./components/Loader/Loader";
|
|
25
26
|
import { MenuItemData, MenuSection } from "./components/Menu/menu-types";
|
|
26
27
|
import { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
27
28
|
import { ModalWidth } from "./components/Modal/Modal";
|
|
@@ -37,7 +38,7 @@ import { TabBackground } from "./components/TabGroup/TabGroup";
|
|
|
37
38
|
import { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
|
|
38
39
|
import { SortState, TableColumn } from "./components/Table/Table";
|
|
39
40
|
import { TagContrast, TagIntent, TagSize } from "./components/Tag/Tag";
|
|
40
|
-
import { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/
|
|
41
|
+
import { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/text-types";
|
|
41
42
|
import { TooltipAlign, TooltipSide, TooltipSize } from "./components/Tooltip/Tooltip";
|
|
42
43
|
export { NavChromeStyle } from "./nav/nav-chrome";
|
|
43
44
|
export { ShellGradientPreset } from "./nav/shell-gradient-presets";
|
|
@@ -56,6 +57,7 @@ export { DividerInset, DividerLength, DividerOrientation, DividerSurface } from
|
|
|
56
57
|
export { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
57
58
|
export { IconColor, IconSize } from "./components/Icon/Icon";
|
|
58
59
|
export { InputType } from "./components/Input/Input";
|
|
60
|
+
export { LoaderColor, LoaderSize } from "./components/Loader/Loader";
|
|
59
61
|
export { MenuItemData, MenuSection } from "./components/Menu/menu-types";
|
|
60
62
|
export { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
61
63
|
export { ModalWidth } from "./components/Modal/Modal";
|
|
@@ -71,7 +73,7 @@ export { TabBackground } from "./components/TabGroup/TabGroup";
|
|
|
71
73
|
export { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
|
|
72
74
|
export { SortState, TableColumn } from "./components/Table/Table";
|
|
73
75
|
export { TagContrast, TagIntent, TagSize } from "./components/Tag/Tag";
|
|
74
|
-
export { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/
|
|
76
|
+
export { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/text-types";
|
|
75
77
|
export { TooltipAlign, TooltipSide, TooltipSize } from "./components/Tooltip/Tooltip";
|
|
76
78
|
export namespace Components {
|
|
77
79
|
interface DsAppShell {
|
|
@@ -401,7 +403,7 @@ export namespace Components {
|
|
|
401
403
|
}
|
|
402
404
|
interface DsChartDonut {
|
|
403
405
|
/**
|
|
404
|
-
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset.
|
|
406
|
+
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. Slice hover dims peer slices and emits `dsSliceHover` for legend sync — no data-viz tooltip (the legend already surfaces label/value).
|
|
405
407
|
* @default null
|
|
406
408
|
*/
|
|
407
409
|
"activeLabel": string | null;
|
|
@@ -639,15 +641,19 @@ export namespace Components {
|
|
|
639
641
|
"value": string;
|
|
640
642
|
}
|
|
641
643
|
interface DsLoader {
|
|
644
|
+
/**
|
|
645
|
+
* Semantic foreground color token, or a raw CSS var reference. Same tokens as `ds-icon`.
|
|
646
|
+
*/
|
|
647
|
+
"color": LoaderColor | undefined;
|
|
642
648
|
/**
|
|
643
649
|
* Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
|
|
644
650
|
*/
|
|
645
651
|
"label": string | undefined;
|
|
646
652
|
/**
|
|
647
|
-
*
|
|
648
|
-
* @default
|
|
653
|
+
* Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px.
|
|
654
|
+
* @default 'md'
|
|
649
655
|
*/
|
|
650
|
-
"size":
|
|
656
|
+
"size": LoaderSize;
|
|
651
657
|
}
|
|
652
658
|
interface DsMenu {
|
|
653
659
|
/**
|
|
@@ -1069,6 +1075,11 @@ export namespace Components {
|
|
|
1069
1075
|
"as": TextElement;
|
|
1070
1076
|
"color": TextColor | undefined;
|
|
1071
1077
|
"decoration": TextDecoration | undefined;
|
|
1078
|
+
/**
|
|
1079
|
+
* Heavier weight + tighter letter-spacing for the variant. `false` (default): regular weight (caption stays medium). `true`: display bold, title/caption semibold, body medium.
|
|
1080
|
+
* @default false
|
|
1081
|
+
*/
|
|
1082
|
+
"emphasis": boolean;
|
|
1072
1083
|
/**
|
|
1073
1084
|
* @default 'normal'
|
|
1074
1085
|
*/
|
|
@@ -1085,6 +1096,10 @@ export namespace Components {
|
|
|
1085
1096
|
* @default 'none'
|
|
1086
1097
|
*/
|
|
1087
1098
|
"lineTruncation": LineTruncation;
|
|
1099
|
+
/**
|
|
1100
|
+
* Forwarded to the inner element (e.g. aria-labelledby targets).
|
|
1101
|
+
*/
|
|
1102
|
+
"textId": string | undefined;
|
|
1088
1103
|
/**
|
|
1089
1104
|
* @default 'text-body-medium'
|
|
1090
1105
|
*/
|
|
@@ -1147,8 +1162,9 @@ export namespace Components {
|
|
|
1147
1162
|
"size": TooltipSize;
|
|
1148
1163
|
}
|
|
1149
1164
|
/**
|
|
1150
|
-
* Positioned value/label callout for chart hover interactions (
|
|
1151
|
-
*
|
|
1165
|
+
* Positioned value/label callout for chart hover interactions (bar, line point, …).
|
|
1166
|
+
* Donut charts skip this — legend sync already surfaces the hovered slice.
|
|
1167
|
+
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
1152
1168
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
1153
1169
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
1154
1170
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -1842,8 +1858,9 @@ declare global {
|
|
|
1842
1858
|
new (): HTMLDsTooltipElement;
|
|
1843
1859
|
};
|
|
1844
1860
|
/**
|
|
1845
|
-
* Positioned value/label callout for chart hover interactions (
|
|
1846
|
-
*
|
|
1861
|
+
* Positioned value/label callout for chart hover interactions (bar, line point, …).
|
|
1862
|
+
* Donut charts skip this — legend sync already surfaces the hovered slice.
|
|
1863
|
+
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
1847
1864
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
1848
1865
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
1849
1866
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -2246,7 +2263,7 @@ declare namespace LocalJSX {
|
|
|
2246
2263
|
}
|
|
2247
2264
|
interface DsChartDonut {
|
|
2248
2265
|
/**
|
|
2249
|
-
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset.
|
|
2266
|
+
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync. Falls back to this component's own pointer/focus hover when unset. Slice hover dims peer slices and emits `dsSliceHover` for legend sync — no data-viz tooltip (the legend already surfaces label/value).
|
|
2250
2267
|
* @default null
|
|
2251
2268
|
*/
|
|
2252
2269
|
"activeLabel"?: string | null;
|
|
@@ -2502,15 +2519,19 @@ declare namespace LocalJSX {
|
|
|
2502
2519
|
"value"?: string;
|
|
2503
2520
|
}
|
|
2504
2521
|
interface DsLoader {
|
|
2522
|
+
/**
|
|
2523
|
+
* Semantic foreground color token, or a raw CSS var reference. Same tokens as `ds-icon`.
|
|
2524
|
+
*/
|
|
2525
|
+
"color"?: LoaderColor | undefined;
|
|
2505
2526
|
/**
|
|
2506
2527
|
* Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
|
|
2507
2528
|
*/
|
|
2508
2529
|
"label"?: string | undefined;
|
|
2509
2530
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
* @default
|
|
2531
|
+
* Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px.
|
|
2532
|
+
* @default 'md'
|
|
2512
2533
|
*/
|
|
2513
|
-
"size"?:
|
|
2534
|
+
"size"?: LoaderSize;
|
|
2514
2535
|
}
|
|
2515
2536
|
interface DsMenu {
|
|
2516
2537
|
/**
|
|
@@ -2975,6 +2996,11 @@ declare namespace LocalJSX {
|
|
|
2975
2996
|
"as"?: TextElement;
|
|
2976
2997
|
"color"?: TextColor | undefined;
|
|
2977
2998
|
"decoration"?: TextDecoration | undefined;
|
|
2999
|
+
/**
|
|
3000
|
+
* Heavier weight + tighter letter-spacing for the variant. `false` (default): regular weight (caption stays medium). `true`: display bold, title/caption semibold, body medium.
|
|
3001
|
+
* @default false
|
|
3002
|
+
*/
|
|
3003
|
+
"emphasis"?: boolean;
|
|
2978
3004
|
/**
|
|
2979
3005
|
* @default 'normal'
|
|
2980
3006
|
*/
|
|
@@ -2991,6 +3017,10 @@ declare namespace LocalJSX {
|
|
|
2991
3017
|
* @default 'none'
|
|
2992
3018
|
*/
|
|
2993
3019
|
"lineTruncation"?: LineTruncation;
|
|
3020
|
+
/**
|
|
3021
|
+
* Forwarded to the inner element (e.g. aria-labelledby targets).
|
|
3022
|
+
*/
|
|
3023
|
+
"textId"?: string | undefined;
|
|
2994
3024
|
/**
|
|
2995
3025
|
* @default 'text-body-medium'
|
|
2996
3026
|
*/
|
|
@@ -3054,8 +3084,9 @@ declare namespace LocalJSX {
|
|
|
3054
3084
|
"size"?: TooltipSize;
|
|
3055
3085
|
}
|
|
3056
3086
|
/**
|
|
3057
|
-
* Positioned value/label callout for chart hover interactions (
|
|
3058
|
-
*
|
|
3087
|
+
* Positioned value/label callout for chart hover interactions (bar, line point, …).
|
|
3088
|
+
* Donut charts skip this — legend sync already surfaces the hovered slice.
|
|
3089
|
+
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
3059
3090
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
3060
3091
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
3061
3092
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -3246,7 +3277,8 @@ declare namespace LocalJSX {
|
|
|
3246
3277
|
"ariaDescribedby": string | undefined;
|
|
3247
3278
|
}
|
|
3248
3279
|
interface DsLoaderAttributes {
|
|
3249
|
-
"size":
|
|
3280
|
+
"size": LoaderSize;
|
|
3281
|
+
"color": LoaderColor | undefined;
|
|
3250
3282
|
"label": string | undefined;
|
|
3251
3283
|
}
|
|
3252
3284
|
interface DsMenuAttributes {
|
|
@@ -3367,6 +3399,7 @@ declare namespace LocalJSX {
|
|
|
3367
3399
|
}
|
|
3368
3400
|
interface DsTextAttributes {
|
|
3369
3401
|
"variant": TextVariant;
|
|
3402
|
+
"emphasis": boolean;
|
|
3370
3403
|
"color": TextColor | undefined;
|
|
3371
3404
|
"decoration": TextDecoration | undefined;
|
|
3372
3405
|
"italic": boolean;
|
|
@@ -3376,6 +3409,7 @@ declare namespace LocalJSX {
|
|
|
3376
3409
|
"fontFeature": TextFontFeature;
|
|
3377
3410
|
"as": TextElement;
|
|
3378
3411
|
"for": string | undefined;
|
|
3412
|
+
"textId": string | undefined;
|
|
3379
3413
|
}
|
|
3380
3414
|
interface DsToggleAttributes {
|
|
3381
3415
|
"checked": boolean;
|
|
@@ -3517,8 +3551,9 @@ declare module "@stencil/core" {
|
|
|
3517
3551
|
*/
|
|
3518
3552
|
"ds-tooltip": LocalJSX.IntrinsicElements["ds-tooltip"] & JSXBase.HTMLAttributes<HTMLDsTooltipElement>;
|
|
3519
3553
|
/**
|
|
3520
|
-
* Positioned value/label callout for chart hover interactions (
|
|
3521
|
-
*
|
|
3554
|
+
* Positioned value/label callout for chart hover interactions (bar, line point, …).
|
|
3555
|
+
* Donut charts skip this — legend sync already surfaces the hovered slice.
|
|
3556
|
+
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
3522
3557
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
3523
3558
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
3524
3559
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TextVariant } from '../components/Text/text-types';
|
|
2
|
+
/** Shared public control sizes. Typography is derived; it is not a separate density API. */
|
|
3
|
+
export type ControlSize = 'md' | 'sm' | 'xs';
|
|
4
|
+
/** Complete text variant selected internally by each control size. */
|
|
5
|
+
export declare const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant>;
|
|
6
|
+
//# sourceMappingURL=control-text.d.ts.map
|
|
@@ -9,4 +9,6 @@ export { TOKEN_DEFAULTS, TOKEN_CSS_LENGTHS } from './token-defaults';
|
|
|
9
9
|
export type { TokenDefaultKey } from './token-defaults';
|
|
10
10
|
export { controlWidthClass } from './control-width';
|
|
11
11
|
export type { ControlWidth } from './control-width';
|
|
12
|
+
export { CONTROL_TEXT_VARIANT } from './control-text';
|
|
13
|
+
export type { ControlSize } from './control-text';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ds-mo/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "CompoMo — composable web components styled with TokoMo design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"pretest": "node scripts/generate-icon-catalog.mjs",
|
|
70
70
|
"build": "stencil build && node scripts/patch-index-types.mjs && node scripts/verify-icons-externalized.mjs && node scripts/write-build-stamp.mjs && node scripts/build-lib-exports.mjs",
|
|
71
71
|
"verify:pack": "node scripts/verify-npm-pack.mjs && node scripts/verify-nav-import.mjs",
|
|
72
|
-
"test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/shell-shortcuts.test.ts tests/shell-gradient-presets.test.ts tests/shell-view-transition.test.ts tests/shell-gradient.test.ts tests/shell-chrome-metrics.test.ts tests/shell-chrome-layer.test.ts tests/chrome-transition.test.ts tests/bar-nav-overflow-hysteresis.test.ts tests/badge-gradient-ring.test.ts tests/scroll-edge-fade.test.ts tests/resolve-css-length-px.test.ts tests/resolve-css-time-ms.test.ts tests/overlay-positioning.test.ts tests/menu-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts tests/icon-cache.test.ts tests/icon-svg.test.ts",
|
|
72
|
+
"test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/text.test.ts tests/eslint-plugin-local.test.ts tests/shell-shortcuts.test.ts tests/shell-gradient-presets.test.ts tests/shell-view-transition.test.ts tests/shell-gradient.test.ts tests/shell-chrome-metrics.test.ts tests/shell-chrome-layer.test.ts tests/chrome-transition.test.ts tests/bar-nav-overflow-hysteresis.test.ts tests/badge-gradient-ring.test.ts tests/scroll-edge-fade.test.ts tests/resolve-css-length-px.test.ts tests/resolve-css-time-ms.test.ts tests/overlay-positioning.test.ts tests/menu-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts tests/icon-cache.test.ts tests/icon-svg.test.ts",
|
|
73
73
|
"test:e2e": "npm run build && playwright test",
|
|
74
|
-
"test:e2e:install": "playwright install chromium",
|
|
74
|
+
"test:e2e:install": "playwright install chromium firefox",
|
|
75
75
|
"build:docs": "stencil build --docs",
|
|
76
76
|
"dev": "node scripts/generate-icon-catalog.mjs && stencil build --watch",
|
|
77
77
|
"storybook:ui": "node scripts/storybook-ui.mjs",
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"@stencil/angular-output-target": "^1.3.1",
|
|
115
115
|
"@stencil/core": "^4.43.4",
|
|
116
116
|
"@stencil/react-output-target": "^1.5.3",
|
|
117
|
-
"@storybook/addon-docs": "^10.
|
|
118
|
-
"@storybook/web-components": "^10.
|
|
119
|
-
"@storybook/web-components-vite": "^10.
|
|
117
|
+
"@storybook/addon-docs": "^10.5.0",
|
|
118
|
+
"@storybook/web-components": "^10.5.0",
|
|
119
|
+
"@storybook/web-components-vite": "^10.5.0",
|
|
120
120
|
"@types/d3-array": "^3.2.2",
|
|
121
121
|
"@types/d3-scale": "^4.0.9",
|
|
122
122
|
"@types/d3-shape": "^3.1.8",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"lit": "^3.3.3",
|
|
131
131
|
"react": "^19.2.7",
|
|
132
132
|
"react-dom": "^19.2.7",
|
|
133
|
-
"storybook": "^10.
|
|
133
|
+
"storybook": "^10.5.0",
|
|
134
134
|
"stylelint": "^17.14.0",
|
|
135
135
|
"stylelint-config-standard": "^40.0.0",
|
|
136
136
|
"tsx": "^4.20.3",
|
package/src/angular/proxies.ts
CHANGED
|
@@ -553,14 +553,14 @@ export declare interface DsInput extends Components.DsInput {
|
|
|
553
553
|
|
|
554
554
|
|
|
555
555
|
@ProxyCmp({
|
|
556
|
-
inputs: ['label', 'size']
|
|
556
|
+
inputs: ['color', 'label', 'size']
|
|
557
557
|
})
|
|
558
558
|
@Component({
|
|
559
559
|
selector: 'ds-loader',
|
|
560
560
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
561
561
|
template: '<ng-content></ng-content>',
|
|
562
562
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
563
|
-
inputs: ['label', 'size'],
|
|
563
|
+
inputs: ['color', 'label', 'size'],
|
|
564
564
|
standalone: false
|
|
565
565
|
})
|
|
566
566
|
export class DsLoader {
|
|
@@ -1058,14 +1058,14 @@ export declare interface DsTag extends Components.DsTag {}
|
|
|
1058
1058
|
|
|
1059
1059
|
|
|
1060
1060
|
@ProxyCmp({
|
|
1061
|
-
inputs: ['align', 'as', 'color', 'decoration', 'fontFeature', 'for', 'italic', 'lineTruncation', 'variant', 'wrap']
|
|
1061
|
+
inputs: ['align', 'as', 'color', 'decoration', 'emphasis', 'fontFeature', 'for', 'italic', 'lineTruncation', 'textId', 'variant', 'wrap']
|
|
1062
1062
|
})
|
|
1063
1063
|
@Component({
|
|
1064
1064
|
selector: 'ds-text',
|
|
1065
1065
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1066
1066
|
template: '<ng-content></ng-content>',
|
|
1067
1067
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1068
|
-
inputs: ['align', 'as', 'color', 'decoration', 'fontFeature', 'for', 'italic', 'lineTruncation', 'variant', 'wrap'],
|
|
1068
|
+
inputs: ['align', 'as', 'color', 'decoration', 'emphasis', 'fontFeature', 'for', 'italic', 'lineTruncation', 'textId', 'variant', 'wrap'],
|
|
1069
1069
|
standalone: false
|
|
1070
1070
|
})
|
|
1071
1071
|
export class DsText {
|
|
@@ -166,14 +166,12 @@ export class Badge {
|
|
|
166
166
|
aria-label={ariaLabel}
|
|
167
167
|
style={this.ringHostStyle(ring)}
|
|
168
168
|
>
|
|
169
|
-
<span
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
>
|
|
176
|
-
{!isDot && display}
|
|
169
|
+
<span class="badge__mark" aria-hidden="true">
|
|
170
|
+
{!isDot && (
|
|
171
|
+
<ds-text as="span" variant="text-caption" emphasis color="inherit">
|
|
172
|
+
{display}
|
|
173
|
+
</ds-text>
|
|
174
|
+
)}
|
|
177
175
|
</span>
|
|
178
176
|
</Host>
|
|
179
177
|
);
|
|
@@ -121,7 +121,9 @@ export class Banner {
|
|
|
121
121
|
</div>
|
|
122
122
|
)}
|
|
123
123
|
<div class="banner-body">
|
|
124
|
-
<
|
|
124
|
+
<ds-text class="banner-message" as="div" variant="text-body-medium" color="inherit">
|
|
125
|
+
{this.message}
|
|
126
|
+
</ds-text>
|
|
125
127
|
{this.showDismiss && (
|
|
126
128
|
<button
|
|
127
129
|
type="button"
|
|
@@ -683,7 +683,16 @@ export class BarNav {
|
|
|
683
683
|
)}
|
|
684
684
|
|
|
685
685
|
{!hasTabs && this.heading && (
|
|
686
|
-
<
|
|
686
|
+
<ds-text
|
|
687
|
+
class="bar-nav__heading"
|
|
688
|
+
as="span"
|
|
689
|
+
variant="text-body-medium"
|
|
690
|
+
emphasis
|
|
691
|
+
color="inherit"
|
|
692
|
+
wrap="nowrap"
|
|
693
|
+
>
|
|
694
|
+
{this.heading}
|
|
695
|
+
</ds-text>
|
|
687
696
|
)}
|
|
688
697
|
|
|
689
698
|
{hasTabs && this.hasOverflowTabs && (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';
|
|
2
|
-
import { controlWidthClass, type ControlWidth } from '../../utils
|
|
2
|
+
import { controlWidthClass, CONTROL_TEXT_VARIANT, type ControlWidth } from '../../utils';
|
|
3
3
|
|
|
4
4
|
export type ButtonFilledIntent =
|
|
5
5
|
| 'neutral'
|
|
@@ -20,13 +20,6 @@ export type ButtonFilledSize = 'md' | 'sm' | 'xs';
|
|
|
20
20
|
|
|
21
21
|
export type ButtonFilledWidth = ControlWidth;
|
|
22
22
|
|
|
23
|
-
/** Emphasis text per control-density size (buttons use emphasis, unlike Tag). */
|
|
24
|
-
const TEXT_VARIANT: Record<ButtonFilledSize, string> = {
|
|
25
|
-
md: 'text-body-medium-emphasis',
|
|
26
|
-
sm: 'text-body-small-emphasis',
|
|
27
|
-
xs: 'text-caption-emphasis',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
23
|
/**
|
|
31
24
|
* `ds-icon` size prop matching control-density icon metrics
|
|
32
25
|
* (md→20 / sm→16 / xs→12 via `--dimension-iconography-*`).
|
|
@@ -110,7 +103,7 @@ export class ButtonFilled {
|
|
|
110
103
|
}
|
|
111
104
|
|
|
112
105
|
render() {
|
|
113
|
-
const textVariant =
|
|
106
|
+
const textVariant = CONTROL_TEXT_VARIANT[this.size];
|
|
114
107
|
const iconSize = ICON_SIZE[this.size];
|
|
115
108
|
|
|
116
109
|
const cls: Record<string, boolean> = {
|
|
@@ -161,9 +154,15 @@ export class ButtonFilled {
|
|
|
161
154
|
</span>
|
|
162
155
|
)}
|
|
163
156
|
{this.showLabel && (
|
|
164
|
-
<
|
|
157
|
+
<ds-text
|
|
158
|
+
class="button-filled__label ds-interaction-fill__content"
|
|
159
|
+
as="span"
|
|
160
|
+
variant={textVariant}
|
|
161
|
+
emphasis
|
|
162
|
+
color="inherit"
|
|
163
|
+
>
|
|
165
164
|
{this.label}
|
|
166
|
-
</
|
|
165
|
+
</ds-text>
|
|
167
166
|
)}
|
|
168
167
|
</button>
|
|
169
168
|
</Host>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';
|
|
2
|
-
import { controlWidthClass, type ControlWidth } from '../../utils
|
|
2
|
+
import { controlWidthClass, CONTROL_TEXT_VARIANT, type ControlWidth } from '../../utils';
|
|
3
3
|
|
|
4
4
|
export type ButtonUnfilledOnBackgroundContrast = 'default' | 'medium' | 'bold' | 'strong';
|
|
5
5
|
|
|
@@ -11,13 +11,6 @@ export type ButtonUnfilledSize = 'md' | 'sm' | 'xs';
|
|
|
11
11
|
|
|
12
12
|
export type ButtonUnfilledWidth = ControlWidth;
|
|
13
13
|
|
|
14
|
-
/** Emphasis text per control-density size (buttons use emphasis, unlike Tag). */
|
|
15
|
-
const TEXT_VARIANT: Record<ButtonUnfilledSize, string> = {
|
|
16
|
-
md: 'text-body-medium-emphasis',
|
|
17
|
-
sm: 'text-body-small-emphasis',
|
|
18
|
-
xs: 'text-caption-emphasis',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
14
|
/**
|
|
22
15
|
* `ds-icon` size prop matching control-density icon metrics
|
|
23
16
|
* (md→20 / sm→16 / xs→12 via `--dimension-iconography-*`).
|
|
@@ -148,7 +141,7 @@ export class ButtonUnfilled {
|
|
|
148
141
|
render() {
|
|
149
142
|
const bg = this.background;
|
|
150
143
|
const contrast = this.effectiveContrast();
|
|
151
|
-
const textVariant =
|
|
144
|
+
const textVariant = CONTROL_TEXT_VARIANT[this.size];
|
|
152
145
|
const iconSize = ICON_SIZE[this.size];
|
|
153
146
|
|
|
154
147
|
const cls: Record<string, boolean> = {
|
|
@@ -219,9 +212,15 @@ export class ButtonUnfilled {
|
|
|
219
212
|
</span>
|
|
220
213
|
)}
|
|
221
214
|
{this.showLabel && (
|
|
222
|
-
<
|
|
215
|
+
<ds-text
|
|
216
|
+
class="button-unfilled__label ds-interaction-fill__content"
|
|
217
|
+
as="span"
|
|
218
|
+
variant={textVariant}
|
|
219
|
+
emphasis
|
|
220
|
+
color="inherit"
|
|
221
|
+
>
|
|
223
222
|
{this.label}
|
|
224
|
-
</
|
|
223
|
+
</ds-text>
|
|
225
224
|
)}
|
|
226
225
|
</button>
|
|
227
226
|
</Host>
|
|
@@ -56,16 +56,15 @@ export class Card {
|
|
|
56
56
|
}}
|
|
57
57
|
>
|
|
58
58
|
<header class="card__header">
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</div>
|
|
59
|
+
<ds-text
|
|
60
|
+
class="card__title-wrap card__title"
|
|
61
|
+
variant="text-title-small"
|
|
62
|
+
emphasis
|
|
63
|
+
color={editing ? FAINT_BRAND_TITLE_COLOR : 'primary'}
|
|
64
|
+
as="h2"
|
|
65
|
+
>
|
|
66
|
+
{this.heading}
|
|
67
|
+
</ds-text>
|
|
69
68
|
<div class="card__actions">
|
|
70
69
|
<slot name="actions" />
|
|
71
70
|
</div>
|
|
@@ -12,12 +12,6 @@ const CENTER_TEXT_SAFE_WIDTH_RATIO = 0.82;
|
|
|
12
12
|
/** Fallback when filling before the first ResizeObserver measurement (matches fill min). */
|
|
13
13
|
const FILL_FALLBACK_PX = 128;
|
|
14
14
|
|
|
15
|
-
type DonutTooltipState = {
|
|
16
|
-
datum: ChartDatum;
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
15
|
@Component({
|
|
22
16
|
tag: 'ds-chart-donut',
|
|
23
17
|
styleUrl: 'ChartDonut.css',
|
|
@@ -49,14 +43,12 @@ export class ChartDonut {
|
|
|
49
43
|
* Externally controlled highlight, matched by `label` — e.g. drive this from a sibling
|
|
50
44
|
* `ds-chart-legend`'s `dsItemHover` event to keep chart and legend hover in sync.
|
|
51
45
|
* Falls back to this component's own pointer/focus hover when unset.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
46
|
+
* Slice hover dims peer slices and emits `dsSliceHover` for legend sync — no data-viz
|
|
47
|
+
* tooltip (the legend already surfaces label/value).
|
|
54
48
|
*/
|
|
55
49
|
@Prop() activeLabel: string | null = null;
|
|
56
50
|
|
|
57
51
|
@State() private hoveredLabel: string | null = null;
|
|
58
|
-
/** Own-hover tooltip (cursor-following). Cleared on leave; not driven by `activeLabel`. */
|
|
59
|
-
@State() private tooltip: DonutTooltipState | null = null;
|
|
60
52
|
/** Center text, truncated with an ellipsis if it doesn't fit inside the inner circle. */
|
|
61
53
|
@State() private displayedValueText: string = '';
|
|
62
54
|
@State() private displayedCaptionText: string = '';
|
|
@@ -68,7 +60,6 @@ export class ChartDonut {
|
|
|
68
60
|
|
|
69
61
|
private valueTextEl?: SVGTextElement;
|
|
70
62
|
private captionTextEl?: SVGTextElement;
|
|
71
|
-
private wrapperEl?: HTMLDivElement;
|
|
72
63
|
private resizeObserver: ResizeObserver | null = null;
|
|
73
64
|
|
|
74
65
|
private get isFillMode(): boolean {
|
|
@@ -143,29 +134,9 @@ export class ChartDonut {
|
|
|
143
134
|
this.resizeObserver = null;
|
|
144
135
|
}
|
|
145
136
|
|
|
146
|
-
private handleHover(datum: ChartDatum | null
|
|
137
|
+
private handleHover(datum: ChartDatum | null) {
|
|
147
138
|
this.hoveredLabel = datum?.label ?? null;
|
|
148
139
|
this.dsSliceHover.emit(datum);
|
|
149
|
-
if (!datum) {
|
|
150
|
-
this.tooltip = null;
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
this.updateTooltip(datum, event);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
private handleSliceMove(datum: ChartDatum, event: MouseEvent) {
|
|
157
|
-
if (this.hoveredLabel !== datum.label) return;
|
|
158
|
-
this.updateTooltip(datum, event);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
private updateTooltip(datum: ChartDatum, event?: MouseEvent) {
|
|
162
|
-
const wrapper = this.wrapperEl;
|
|
163
|
-
if (!wrapper) return;
|
|
164
|
-
const size = this.resolvedSize;
|
|
165
|
-
const rect = wrapper.getBoundingClientRect();
|
|
166
|
-
const x = event ? event.clientX - rect.left : size / 2;
|
|
167
|
-
const y = event ? event.clientY - rect.top : size / 2;
|
|
168
|
-
this.tooltip = { datum, x, y };
|
|
169
140
|
}
|
|
170
141
|
|
|
171
142
|
componentDidRender() {
|
|
@@ -238,7 +209,6 @@ export class ChartDonut {
|
|
|
238
209
|
// Show the full text before the post-render truncation pass has measured it (avoids a blank first paint).
|
|
239
210
|
const fullValueText = this.centerValue ?? formatCompactNumber(total);
|
|
240
211
|
const fullCaptionText = this.centerCaption ?? '';
|
|
241
|
-
const tip = this.tooltip;
|
|
242
212
|
const fill = this.isFillMode;
|
|
243
213
|
|
|
244
214
|
return (
|
|
@@ -253,9 +223,6 @@ export class ChartDonut {
|
|
|
253
223
|
<div
|
|
254
224
|
class="chart-donut__wrapper"
|
|
255
225
|
style={!fill ? { width: `${size}px`, height: `${size}px` } : undefined}
|
|
256
|
-
ref={el => {
|
|
257
|
-
this.wrapperEl = (el as HTMLDivElement) ?? undefined;
|
|
258
|
-
}}
|
|
259
226
|
>
|
|
260
227
|
<svg
|
|
261
228
|
class="chart-donut__svg"
|
|
@@ -279,8 +246,7 @@ export class ChartDonut {
|
|
|
279
246
|
tabindex={0}
|
|
280
247
|
role="img"
|
|
281
248
|
aria-label={`${datum.label}: ${datum.value}`}
|
|
282
|
-
onMouseEnter={(
|
|
283
|
-
onMouseMove={(e: MouseEvent) => this.handleSliceMove(datum, e)}
|
|
249
|
+
onMouseEnter={() => this.handleHover(datum)}
|
|
284
250
|
onMouseLeave={() => this.handleHover(null)}
|
|
285
251
|
onFocus={() => this.handleHover(datum)}
|
|
286
252
|
onBlur={() => this.handleHover(null)}
|
|
@@ -316,15 +282,6 @@ export class ChartDonut {
|
|
|
316
282
|
</text>
|
|
317
283
|
)}
|
|
318
284
|
</svg>
|
|
319
|
-
{tip && (
|
|
320
|
-
<ds-tooltip-data-viz
|
|
321
|
-
key={tip.datum.label}
|
|
322
|
-
label={tip.datum.label}
|
|
323
|
-
value={formatCompactNumber(tip.datum.value)}
|
|
324
|
-
x={tip.x}
|
|
325
|
-
y={tip.y}
|
|
326
|
-
/>
|
|
327
|
-
)}
|
|
328
285
|
</div>
|
|
329
286
|
</Host>
|
|
330
287
|
);
|
|
@@ -87,24 +87,32 @@ export class ChartLegend {
|
|
|
87
87
|
<span class="chart-legend__swatch-box">
|
|
88
88
|
<span class="chart-legend__swatch" style={{ backgroundColor: item.color ?? categoryColor(i) }} />
|
|
89
89
|
</span>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
<ds-text
|
|
91
|
+
class="chart-legend__label"
|
|
92
|
+
as="span"
|
|
93
|
+
variant="text-body-medium"
|
|
94
|
+
color="secondary"
|
|
95
|
+
lineTruncation={1}
|
|
96
|
+
title={item.label}
|
|
97
|
+
>
|
|
98
|
+
{item.label}
|
|
99
|
+
</ds-text>
|
|
95
100
|
{item.value != null && (
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
<ds-text
|
|
102
|
+
class="chart-legend__value"
|
|
103
|
+
as="span"
|
|
104
|
+
variant="text-body-medium"
|
|
105
|
+
color="primary"
|
|
106
|
+
lineTruncation={1}
|
|
107
|
+
title={String(item.value)}
|
|
108
|
+
>
|
|
109
|
+
{formatCompactNumber(item.value)}
|
|
110
|
+
</ds-text>
|
|
101
111
|
)}
|
|
102
112
|
{item.value != null && this.showPercentage && (
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</ds-text>
|
|
107
|
-
</span>
|
|
113
|
+
<ds-text class="chart-legend__percentage" as="span" variant="text-body-medium" color="primary">
|
|
114
|
+
{(total ? (item.value / total) * 100 : 0).toFixed(1)}%
|
|
115
|
+
</ds-text>
|
|
108
116
|
)}
|
|
109
117
|
</RowTag>
|
|
110
118
|
</li>
|