@ds-mo/ui 2.15.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.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-chart-line.js +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-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-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-CyFVn2Sc.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-DujEDZ7f.js.map → p-CQmul5NK.js.map} +1 -1
- package/dist/components/p-CsaW5gDM.js +2 -0
- package/dist/components/{p-C3ORQUOp.js.map → p-CsaW5gDM.js.map} +1 -1
- package/dist/components/{p-BvF44IQK.js → p-Cx-ywr1e.js} +1 -1
- 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/utils/control-text.d.ts +4 -4
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.js.map +2 -2
- 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/Text/text-utils.d.ts +3 -1
- package/dist/types/components/TooltipDataViz/TooltipDataViz.d.ts +3 -2
- package/dist/types/components.d.ts +32 -17
- package/dist/types/utils/control-text.d.ts +4 -4
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/angular/proxies.ts +2 -2
- package/src/wc/components/Banner/Banner.tsx +3 -5
- package/src/wc/components/BarNav/BarNav.tsx +10 -5
- package/src/wc/components/ButtonFilled/ButtonFilled.tsx +9 -5
- package/src/wc/components/ButtonUnfilled/ButtonUnfilled.tsx +9 -5
- package/src/wc/components/Card/Card.tsx +9 -12
- 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 +3 -5
- package/src/wc/components/Chip/Chip.tsx +3 -5
- package/src/wc/components/EmptyState/EmptyState.tsx +3 -5
- 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 +22 -17
- package/src/wc/components/Modal/Modal.tsx +10 -11
- package/src/wc/components/Pagination/Pagination.tsx +3 -3
- package/src/wc/components/PanelNav/PanelNav.tsx +30 -31
- package/src/wc/components/PanelTools/PanelTools.tsx +10 -5
- package/src/wc/components/RadioGroup/RadioGroup.tsx +3 -5
- package/src/wc/components/Select/Select.tsx +9 -5
- package/src/wc/components/Table/Table.tsx +15 -12
- package/src/wc/components/Tag/Tag.tsx +3 -5
- package/src/wc/components/Text/Text.tsx +4 -3
- package/src/wc/components/Text/text-utils.ts +8 -1
- package/src/wc/components/Tooltip/Tooltip.tsx +10 -4
- package/src/wc/components/TooltipDataViz/TooltipDataViz.tsx +20 -12
- package/src/wc/components.d.ts +32 -17
- package/src/wc/utils/control-density.css +2 -6
- package/src/wc/utils/control-text.ts +4 -4
- package/src/wc/utils/index.ts +1 -1
- package/src/wc/utils/interaction-fill.css +2 -2
- package/src/wc/utils/typography.css +146 -0
- package/dist/components/p-061wD4FM.js +0 -2
- package/dist/components/p-061wD4FM.js.map +0 -1
- package/dist/components/p-AiGt4dQS.js +0 -2
- package/dist/components/p-AiGt4dQS.js.map +0 -1
- package/dist/components/p-BDQgqw5J.js +0 -2
- package/dist/components/p-BDQgqw5J.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-BvF44IQK.js.map +0 -1
- package/dist/components/p-C3ORQUOp.js +0 -2
- package/dist/components/p-DIgHkkPe.js +0 -2
- package/dist/components/p-DIgHkkPe.js.map +0 -1
- package/dist/components/p-DOqi-Vkb.js +0 -2
- package/dist/components/p-DOqi-Vkb.js.map +0 -1
- package/dist/components/p-DQ3MyAC7.js +0 -2
- package/dist/components/p-DQ3MyAC7.js.map +0 -1
- package/dist/components/p-DkcH8mRl.js +0 -2
- package/dist/components/p-DkcH8mRl.js.map +0 -1
- package/dist/components/p-DrhmNrKD.js +0 -2
- package/dist/components/p-DrhmNrKD.js.map +0 -1
- package/dist/components/p-DujEDZ7f.js +0 -2
- package/dist/components/p-DwQ-zdqa.js +0 -2
- package/dist/components/p-DwQ-zdqa.js.map +0 -1
- /package/dist/components/{p-CyFVn2Sc.js.map → p-9Qu1ls2y.js.map} +0 -0
|
@@ -290,11 +290,16 @@ export class PanelTools {
|
|
|
290
290
|
>
|
|
291
291
|
<div class="panel-tools__drawer-surface">
|
|
292
292
|
<header class="panel-tools__header">
|
|
293
|
-
<
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
293
|
+
<ds-text
|
|
294
|
+
class="panel-tools__title"
|
|
295
|
+
as="span"
|
|
296
|
+
variant="text-body-medium"
|
|
297
|
+
emphasis
|
|
298
|
+
color="inherit"
|
|
299
|
+
wrap="nowrap"
|
|
300
|
+
>
|
|
301
|
+
{headerLabel}
|
|
302
|
+
</ds-text>
|
|
298
303
|
</header>
|
|
299
304
|
<div class="panel-tools__body">
|
|
300
305
|
<div
|
|
@@ -118,11 +118,9 @@ export class RadioGroup {
|
|
|
118
118
|
<span class={{ circle: true, 'circle--checked': isChecked }}>
|
|
119
119
|
{isChecked && <span class="dot" />}
|
|
120
120
|
</span>
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
</ds-text>
|
|
125
|
-
</span>
|
|
121
|
+
<ds-text class="radio-label" as="span" variant="text-body-medium">
|
|
122
|
+
{opt.label}
|
|
123
|
+
</ds-text>
|
|
126
124
|
</div>
|
|
127
125
|
);
|
|
128
126
|
})}
|
|
@@ -247,11 +247,15 @@ export class Select {
|
|
|
247
247
|
aria-labelledby={this.ariaLabelledby}
|
|
248
248
|
onClick={() => this.toggle({ focusVisible: false })}
|
|
249
249
|
>
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
<ds-text
|
|
251
|
+
class="trigger__label ds-interaction-fill__content"
|
|
252
|
+
as="span"
|
|
253
|
+
variant={textVariant}
|
|
254
|
+
color="inherit"
|
|
255
|
+
lineTruncation={1}
|
|
256
|
+
>
|
|
257
|
+
{label}
|
|
258
|
+
</ds-text>
|
|
255
259
|
<span class="trigger__chevron ds-interaction-fill__content" aria-hidden="true">
|
|
256
260
|
<ds-icon name="ChevronDown" size={iconSize} color="inherit" />
|
|
257
261
|
</span>
|
|
@@ -181,11 +181,15 @@ export class Table {
|
|
|
181
181
|
|
|
182
182
|
{/* Empty state */}
|
|
183
183
|
{isEmpty && (
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
<ds-text
|
|
185
|
+
class="empty-row"
|
|
186
|
+
as="p"
|
|
187
|
+
variant="text-body-medium"
|
|
188
|
+
color="secondary"
|
|
189
|
+
style={{ gridColumn: '1 / -1' }}
|
|
190
|
+
>
|
|
191
|
+
{this.emptyMessage}
|
|
192
|
+
</ds-text>
|
|
189
193
|
)}
|
|
190
194
|
|
|
191
195
|
{/* Data rows */}
|
|
@@ -211,21 +215,20 @@ export class Table {
|
|
|
211
215
|
}}
|
|
212
216
|
>
|
|
213
217
|
{visibleCols.map(col => (
|
|
214
|
-
<
|
|
218
|
+
<ds-text
|
|
215
219
|
key={col.id}
|
|
216
220
|
class={{
|
|
217
221
|
'cell': true,
|
|
218
222
|
'align-right': col.align === 'right',
|
|
219
223
|
'align-center': col.align === 'center',
|
|
220
224
|
}}
|
|
225
|
+
as="span"
|
|
226
|
+
variant="text-body-medium"
|
|
227
|
+
lineTruncation={1}
|
|
221
228
|
role="cell"
|
|
222
229
|
>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
{String(getCellValue(col, row) ?? '')}
|
|
226
|
-
</ds-text>
|
|
227
|
-
</span>
|
|
228
|
-
</div>
|
|
230
|
+
{String(getCellValue(col, row) ?? '')}
|
|
231
|
+
</ds-text>
|
|
229
232
|
))}
|
|
230
233
|
</div>
|
|
231
234
|
);
|
|
@@ -54,11 +54,9 @@ export class Tag {
|
|
|
54
54
|
<span class="tag__icon-slot" data-icon-size={iconSize}>
|
|
55
55
|
<slot name="icon" />
|
|
56
56
|
</span>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</ds-text>
|
|
61
|
-
</span>
|
|
57
|
+
<ds-text class="tag__label" as="span" variant={textVariant} color="inherit">
|
|
58
|
+
{this.label}
|
|
59
|
+
</ds-text>
|
|
62
60
|
</Host>
|
|
63
61
|
);
|
|
64
62
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, h, Host } from '@stencil/core';
|
|
2
|
-
import { textVariantClass } from './text-utils';
|
|
2
|
+
import { textDisplayClass, textVariantClass } from './text-utils';
|
|
3
3
|
import type {
|
|
4
4
|
TextAlign,
|
|
5
5
|
TextColor,
|
|
@@ -46,6 +46,7 @@ export class Text {
|
|
|
46
46
|
|
|
47
47
|
const cls: Record<string, boolean> = {
|
|
48
48
|
'ds-text': true,
|
|
49
|
+
[textDisplayClass(this.as)]: true,
|
|
49
50
|
[textVariantClass(this.variant)]: true,
|
|
50
51
|
'ds-text--emphasis': this.emphasis,
|
|
51
52
|
'ds-text--regular': !this.emphasis,
|
|
@@ -87,8 +88,8 @@ export class Text {
|
|
|
87
88
|
if (this.textId) extraProps['id'] = this.textId;
|
|
88
89
|
|
|
89
90
|
return (
|
|
90
|
-
<Host style={
|
|
91
|
-
<Tag class=
|
|
91
|
+
<Host class={cls} style={style}>
|
|
92
|
+
<Tag class="ds-text__element" {...extraProps}>
|
|
92
93
|
<slot />
|
|
93
94
|
</Tag>
|
|
94
95
|
</Host>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type { TextVariant } from './text-types';
|
|
1
|
+
import type { TextElement, TextVariant } from './text-types';
|
|
2
2
|
|
|
3
3
|
/** `text-body-medium` → `ds-text--body-medium` */
|
|
4
4
|
export function textVariantClass(variant: TextVariant): string {
|
|
5
5
|
return `ds-text--${variant.replace(/^text-/, '')}`;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
/** Inline semantics get a measurable inline box; paragraphs/headings get a block box. */
|
|
9
|
+
export function textDisplayClass(element: TextElement): string {
|
|
10
|
+
return element === 'span' || element === 'label'
|
|
11
|
+
? 'ds-text--inline-box'
|
|
12
|
+
: 'ds-text--block-box';
|
|
13
|
+
}
|
|
@@ -36,9 +36,11 @@ function createDsText(opts: {
|
|
|
36
36
|
variant: TextVariant;
|
|
37
37
|
emphasis?: boolean;
|
|
38
38
|
color?: string;
|
|
39
|
+
className?: string;
|
|
39
40
|
text: string;
|
|
40
41
|
}): DsTextEl {
|
|
41
42
|
const el = document.createElement('ds-text') as DsTextEl;
|
|
43
|
+
if (opts.className) el.className = opts.className;
|
|
42
44
|
el.as = 'span';
|
|
43
45
|
el.variant = opts.variant;
|
|
44
46
|
el.emphasis = opts.emphasis ?? false;
|
|
@@ -222,6 +224,7 @@ export class Tooltip {
|
|
|
222
224
|
activeTooltip.hideInstant();
|
|
223
225
|
instant = true;
|
|
224
226
|
}
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias -- module singleton tracks the active instance
|
|
225
228
|
activeTooltip = this;
|
|
226
229
|
this.skipEnterAnimation = instant;
|
|
227
230
|
if (instant) {
|
|
@@ -303,10 +306,13 @@ export class Tooltip {
|
|
|
303
306
|
|
|
304
307
|
appendShortcut('start');
|
|
305
308
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
inner.appendChild(
|
|
310
|
+
createDsText({
|
|
311
|
+
className: `tooltip-label ${sc}`,
|
|
312
|
+
variant: textVariant,
|
|
313
|
+
text: this.label,
|
|
314
|
+
}),
|
|
315
|
+
);
|
|
310
316
|
|
|
311
317
|
appendShortcut('end');
|
|
312
318
|
|
|
@@ -8,8 +8,9 @@ export type TooltipDataVizSide = 'left' | 'right';
|
|
|
8
8
|
export type TooltipDataVizAlign = 'top' | 'bottom';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Positioned value/label callout for chart hover interactions (
|
|
12
|
-
*
|
|
11
|
+
* Positioned value/label callout for chart hover interactions (bar, line point, …).
|
|
12
|
+
* Donut charts skip this — legend sync already surfaces the hovered slice.
|
|
13
|
+
* Unlike `ds-tooltip`, this doesn't bind to a slotted anchor element —
|
|
13
14
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
14
15
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
15
16
|
*
|
|
@@ -120,16 +121,23 @@ export class TooltipDataViz {
|
|
|
120
121
|
style={{ left: `${this.x}px`, top: `${this.y}px`, transform: `translate(${translateX}, ${translateY})` }}
|
|
121
122
|
>
|
|
122
123
|
<div class="tooltip-data-viz__item ds-control--md">
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
<ds-text
|
|
125
|
+
class="tooltip-data-viz__label"
|
|
126
|
+
as="span"
|
|
127
|
+
variant="text-body-medium"
|
|
128
|
+
color="var(--color-foreground-on-translucent-background-secondary)"
|
|
129
|
+
>
|
|
130
|
+
{this.label}
|
|
131
|
+
</ds-text>
|
|
132
|
+
<ds-text
|
|
133
|
+
class="tooltip-data-viz__value"
|
|
134
|
+
as="span"
|
|
135
|
+
variant="text-body-medium"
|
|
136
|
+
emphasis
|
|
137
|
+
color="var(--color-foreground-on-translucent-background-primary)"
|
|
138
|
+
>
|
|
139
|
+
{this.value}
|
|
140
|
+
</ds-text>
|
|
133
141
|
</div>
|
|
134
142
|
</Host>
|
|
135
143
|
);
|
package/src/wc/components.d.ts
CHANGED
|
@@ -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";
|
|
@@ -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";
|
|
@@ -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
|
/**
|
|
@@ -1156,8 +1162,9 @@ export namespace Components {
|
|
|
1156
1162
|
"size": TooltipSize;
|
|
1157
1163
|
}
|
|
1158
1164
|
/**
|
|
1159
|
-
* Positioned value/label callout for chart hover interactions (
|
|
1160
|
-
*
|
|
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 —
|
|
1161
1168
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
1162
1169
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
1163
1170
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -1851,8 +1858,9 @@ declare global {
|
|
|
1851
1858
|
new (): HTMLDsTooltipElement;
|
|
1852
1859
|
};
|
|
1853
1860
|
/**
|
|
1854
|
-
* Positioned value/label callout for chart hover interactions (
|
|
1855
|
-
*
|
|
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 —
|
|
1856
1864
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
1857
1865
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
1858
1866
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -2255,7 +2263,7 @@ declare namespace LocalJSX {
|
|
|
2255
2263
|
}
|
|
2256
2264
|
interface DsChartDonut {
|
|
2257
2265
|
/**
|
|
2258
|
-
* 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).
|
|
2259
2267
|
* @default null
|
|
2260
2268
|
*/
|
|
2261
2269
|
"activeLabel"?: string | null;
|
|
@@ -2511,15 +2519,19 @@ declare namespace LocalJSX {
|
|
|
2511
2519
|
"value"?: string;
|
|
2512
2520
|
}
|
|
2513
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;
|
|
2514
2526
|
/**
|
|
2515
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.
|
|
2516
2528
|
*/
|
|
2517
2529
|
"label"?: string | undefined;
|
|
2518
2530
|
/**
|
|
2519
|
-
*
|
|
2520
|
-
* @default
|
|
2531
|
+
* Iconography size token. Maps to `--dimension-iconography-{size}`. Default `md` = 20 px.
|
|
2532
|
+
* @default 'md'
|
|
2521
2533
|
*/
|
|
2522
|
-
"size"?:
|
|
2534
|
+
"size"?: LoaderSize;
|
|
2523
2535
|
}
|
|
2524
2536
|
interface DsMenu {
|
|
2525
2537
|
/**
|
|
@@ -3072,8 +3084,9 @@ declare namespace LocalJSX {
|
|
|
3072
3084
|
"size"?: TooltipSize;
|
|
3073
3085
|
}
|
|
3074
3086
|
/**
|
|
3075
|
-
* Positioned value/label callout for chart hover interactions (
|
|
3076
|
-
*
|
|
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 —
|
|
3077
3090
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
3078
3091
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
3079
3092
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -3264,7 +3277,8 @@ declare namespace LocalJSX {
|
|
|
3264
3277
|
"ariaDescribedby": string | undefined;
|
|
3265
3278
|
}
|
|
3266
3279
|
interface DsLoaderAttributes {
|
|
3267
|
-
"size":
|
|
3280
|
+
"size": LoaderSize;
|
|
3281
|
+
"color": LoaderColor | undefined;
|
|
3268
3282
|
"label": string | undefined;
|
|
3269
3283
|
}
|
|
3270
3284
|
interface DsMenuAttributes {
|
|
@@ -3537,8 +3551,9 @@ declare module "@stencil/core" {
|
|
|
3537
3551
|
*/
|
|
3538
3552
|
"ds-tooltip": LocalJSX.IntrinsicElements["ds-tooltip"] & JSXBase.HTMLAttributes<HTMLDsTooltipElement>;
|
|
3539
3553
|
/**
|
|
3540
|
-
* Positioned value/label callout for chart hover interactions (
|
|
3541
|
-
*
|
|
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 —
|
|
3542
3557
|
* charts hover-highlight data that lives inside an SVG, so the chart itself computes
|
|
3543
3558
|
* the anchor point (e.g. the cursor position while hovering) and passes it in as `x`/`y`.
|
|
3544
3559
|
* Renders `position: absolute` — place inside a `position: relative` chart wrapper,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* (Tag, PanelNav items, BarNav tabs, Menu items, Chip, etc.).
|
|
4
4
|
*
|
|
5
5
|
* Apply `.ds-control--md|sm|xs` on the control (host or inner row). Then use the
|
|
6
|
-
* `--ds-control-*` vars for height, padding, icon box, label inset, gap, radius
|
|
7
|
-
*
|
|
6
|
+
* `--ds-control-*` vars for height, padding, icon box, label inset, gap, and radius.
|
|
7
|
+
* Text line-height belongs exclusively to the selected `ds-text` variant.
|
|
8
8
|
*
|
|
9
9
|
* Both `:host(.ds-control--*)` and `.ds-control--*` are listed so Stencil scoped
|
|
10
10
|
* components work whether the class is on the host (Tag) or an inner item (PanelNav).
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
--ds-control-label-inset: var(--dimension-space-025);
|
|
21
21
|
--ds-control-gap: var(--dimension-space-050);
|
|
22
22
|
--ds-control-radius: var(--dimension-radius-025);
|
|
23
|
-
/* Matches text-body-medium line-height — wrappers around ds-text need this. */
|
|
24
|
-
--ds-control-line-height: var(--typography-lineheight-md);
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
:host(.ds-control--sm),
|
|
@@ -32,7 +30,6 @@
|
|
|
32
30
|
--ds-control-label-inset: var(--dimension-space-025);
|
|
33
31
|
--ds-control-gap: var(--dimension-space-025);
|
|
34
32
|
--ds-control-radius: var(--dimension-radius-025);
|
|
35
|
-
--ds-control-line-height: var(--typography-lineheight-sm);
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
:host(.ds-control--xs),
|
|
@@ -43,5 +40,4 @@
|
|
|
43
40
|
--ds-control-label-inset: var(--dimension-space-025);
|
|
44
41
|
--ds-control-gap: var(--dimension-space-025);
|
|
45
42
|
--ds-control-radius: var(--dimension-radius-025);
|
|
46
|
-
--ds-control-line-height: var(--typography-lineheight-xs);
|
|
47
43
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { TextVariant } from '../components/Text/text-types';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
export type
|
|
3
|
+
/** Shared public control sizes. Typography is derived; it is not a separate density API. */
|
|
4
|
+
export type ControlSize = 'md' | 'sm' | 'xs';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
export const CONTROL_TEXT_VARIANT: Record<
|
|
6
|
+
/** Complete text variant selected internally by each control size. */
|
|
7
|
+
export const CONTROL_TEXT_VARIANT: Record<ControlSize, TextVariant> = {
|
|
8
8
|
md: 'text-body-medium',
|
|
9
9
|
sm: 'text-body-small',
|
|
10
10
|
xs: 'text-caption',
|
package/src/wc/utils/index.ts
CHANGED
|
@@ -24,4 +24,4 @@ export type { TokenDefaultKey } from './token-defaults';
|
|
|
24
24
|
export { controlWidthClass } from './control-width';
|
|
25
25
|
export type { ControlWidth } from './control-width';
|
|
26
26
|
export { CONTROL_TEXT_VARIANT } from './control-text';
|
|
27
|
-
export type {
|
|
27
|
+
export type { ControlSize } from './control-text';
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
box-shadow: inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/* Opt-in
|
|
79
|
+
/* Opt-in secondary inset border (override color via `--ds-interaction-border-color`). */
|
|
80
80
|
:host(.ds-interaction-fill--bordered),
|
|
81
81
|
.ds-interaction-fill--bordered {
|
|
82
82
|
--ds-interaction-border-width: var(--dimension-stroke-width-012);
|
|
83
|
-
--ds-interaction-border-color: var(--color-border-
|
|
83
|
+
--ds-interaction-border-color: var(--color-border-secondary);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
:host(.ds-interaction-fill--selected)::before,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Internal typography recipes shared by ds-text and native text surfaces that
|
|
3
|
+
* cannot render a custom element (for example, an <input> value).
|
|
4
|
+
*
|
|
5
|
+
* Each variant owns its font-size + line-height pairing. Never override one
|
|
6
|
+
* without the other from a consuming component.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
:host(.ds-text--display-medium),
|
|
10
|
+
.ds-text--display-medium {
|
|
11
|
+
font-size: var(--typography-fontsize-3xl);
|
|
12
|
+
line-height: var(--typography-lineheight-3xl);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(.ds-text--display-small),
|
|
16
|
+
.ds-text--display-small {
|
|
17
|
+
font-size: var(--typography-fontsize-2xl);
|
|
18
|
+
line-height: var(--typography-lineheight-2xl);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(.ds-text--title-large),
|
|
22
|
+
.ds-text--title-large {
|
|
23
|
+
font-size: var(--typography-fontsize-xl);
|
|
24
|
+
line-height: var(--typography-lineheight-xl);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(.ds-text--title-medium),
|
|
28
|
+
.ds-text--title-medium {
|
|
29
|
+
font-size: var(--typography-fontsize-lg);
|
|
30
|
+
line-height: var(--typography-lineheight-lg);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host(.ds-text--title-small),
|
|
34
|
+
.ds-text--title-small {
|
|
35
|
+
font-size: var(--typography-fontsize-md);
|
|
36
|
+
line-height: var(--typography-lineheight-md);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host(.ds-text--body-large),
|
|
40
|
+
.ds-text--body-large {
|
|
41
|
+
font-size: var(--typography-fontsize-lg);
|
|
42
|
+
line-height: var(--typography-lineheight-lg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host(.ds-text--body-medium),
|
|
46
|
+
.ds-text--body-medium {
|
|
47
|
+
font-size: var(--typography-fontsize-md);
|
|
48
|
+
line-height: var(--typography-lineheight-md);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host(.ds-text--body-small),
|
|
52
|
+
.ds-text--body-small {
|
|
53
|
+
font-size: var(--typography-fontsize-sm);
|
|
54
|
+
line-height: var(--typography-lineheight-sm);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host(.ds-text--caption),
|
|
58
|
+
.ds-text--caption {
|
|
59
|
+
font-size: var(--typography-fontsize-xs);
|
|
60
|
+
line-height: var(--typography-lineheight-xs);
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host(.ds-text--display-medium.ds-text--emphasis),
|
|
65
|
+
:host(.ds-text--display-small.ds-text--emphasis),
|
|
66
|
+
.ds-text--display-medium.ds-text--emphasis,
|
|
67
|
+
.ds-text--display-small.ds-text--emphasis {
|
|
68
|
+
font-weight: var(--typography-weight-bold);
|
|
69
|
+
letter-spacing: var(--typography-letterspacing-negative-double);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host(.ds-text--display-medium.ds-text--regular),
|
|
73
|
+
:host(.ds-text--display-small.ds-text--regular),
|
|
74
|
+
.ds-text--display-medium.ds-text--regular,
|
|
75
|
+
.ds-text--display-small.ds-text--regular {
|
|
76
|
+
font-weight: var(--typography-weight-regular);
|
|
77
|
+
letter-spacing: var(--typography-letterspacing-negative);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host(.ds-text--title-large.ds-text--emphasis),
|
|
81
|
+
.ds-text--title-large.ds-text--emphasis {
|
|
82
|
+
font-weight: var(--typography-weight-semibold);
|
|
83
|
+
letter-spacing: var(--typography-letterspacing-negative-double);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host(.ds-text--title-large.ds-text--regular),
|
|
87
|
+
.ds-text--title-large.ds-text--regular {
|
|
88
|
+
font-weight: var(--typography-weight-regular);
|
|
89
|
+
letter-spacing: var(--typography-letterspacing-negative);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host(.ds-text--title-medium.ds-text--emphasis),
|
|
93
|
+
:host(.ds-text--title-small.ds-text--emphasis),
|
|
94
|
+
.ds-text--title-medium.ds-text--emphasis,
|
|
95
|
+
.ds-text--title-small.ds-text--emphasis {
|
|
96
|
+
font-weight: var(--typography-weight-semibold);
|
|
97
|
+
letter-spacing: var(--typography-letterspacing-negative);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host(.ds-text--title-medium.ds-text--regular),
|
|
101
|
+
:host(.ds-text--title-small.ds-text--regular),
|
|
102
|
+
.ds-text--title-medium.ds-text--regular,
|
|
103
|
+
.ds-text--title-small.ds-text--regular {
|
|
104
|
+
font-weight: var(--typography-weight-regular);
|
|
105
|
+
letter-spacing: var(--typography-letterspacing-negative-half);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host(.ds-text--body-large.ds-text--emphasis),
|
|
109
|
+
:host(.ds-text--body-medium.ds-text--emphasis),
|
|
110
|
+
.ds-text--body-large.ds-text--emphasis,
|
|
111
|
+
.ds-text--body-medium.ds-text--emphasis {
|
|
112
|
+
font-weight: var(--typography-weight-medium);
|
|
113
|
+
letter-spacing: var(--typography-letterspacing-negative);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(.ds-text--body-large.ds-text--regular),
|
|
117
|
+
:host(.ds-text--body-medium.ds-text--regular),
|
|
118
|
+
.ds-text--body-large.ds-text--regular,
|
|
119
|
+
.ds-text--body-medium.ds-text--regular {
|
|
120
|
+
font-weight: var(--typography-weight-regular);
|
|
121
|
+
letter-spacing: var(--typography-letterspacing-negative-half);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host(.ds-text--body-small.ds-text--emphasis),
|
|
125
|
+
.ds-text--body-small.ds-text--emphasis {
|
|
126
|
+
font-weight: var(--typography-weight-medium);
|
|
127
|
+
letter-spacing: var(--typography-letterspacing-negative-half);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host(.ds-text--body-small.ds-text--regular),
|
|
131
|
+
.ds-text--body-small.ds-text--regular {
|
|
132
|
+
font-weight: var(--typography-weight-regular);
|
|
133
|
+
letter-spacing: var(--typography-letterspacing-none);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host(.ds-text--caption.ds-text--emphasis),
|
|
137
|
+
.ds-text--caption.ds-text--emphasis {
|
|
138
|
+
font-weight: var(--typography-weight-semibold);
|
|
139
|
+
letter-spacing: var(--typography-letterspacing-positive);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:host(.ds-text--caption.ds-text--regular),
|
|
143
|
+
.ds-text--caption.ds-text--regular {
|
|
144
|
+
font-weight: var(--typography-weight-medium);
|
|
145
|
+
letter-spacing: var(--typography-letterspacing-positive);
|
|
146
|
+
}
|