@ds-mo/ui 6.0.0 → 7.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/README.md +3 -3
- package/dist/.build-stamp +1 -1
- package/dist/agent.json +401 -103
- package/dist/angular/ds-button-filled.d.ts +1 -1
- package/dist/angular/ds-button-filled.js +3 -3
- package/dist/angular/ds-button-unfilled.d.ts +1 -1
- package/dist/angular/ds-button-unfilled.js +3 -3
- package/dist/angular/ds-chip.d.ts +1 -1
- package/dist/angular/ds-chip.js +3 -3
- package/dist/angular/ds-panel-sub-nav.d.ts +15 -0
- package/dist/angular/{ds-tab-group-nav.js → ds-panel-sub-nav.js} +13 -17
- package/dist/angular/ds-tab-group.d.ts +1 -1
- package/dist/angular/ds-tab-group.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -1
- package/dist/angular/proxies.d.ts +1 -1
- package/dist/angular/proxies.js +1 -1
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-app-shell.js.map +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +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-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart-line.js +1 -1
- package/dist/components/ds-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-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input.js +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-pagination.js +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-tab-group-nav.d.ts → ds-panel-sub-nav.d.ts} +4 -4
- package/dist/components/ds-panel-sub-nav.js +2 -0
- package/dist/components/ds-panel-sub-nav.js.map +1 -0
- 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-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-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-switch.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-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-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/{p-BmiNX9Mc.js → p-AIFkzp4M.js} +2 -2
- package/dist/components/p-B8ERbwc9.js +2 -0
- package/dist/components/{p-DhgDNluD.js.map → p-B8ERbwc9.js.map} +1 -1
- package/dist/components/p-BQq26pt9.js.map +1 -1
- package/dist/components/{p-cgo-rgl4.js → p-C7yzdJNM.js} +2 -2
- package/dist/components/{p-9Qu1ls2y.js → p-CGovlfKQ.js} +2 -2
- package/dist/components/{p-DkIbxCpi.js → p-CeyijE0j.js} +2 -2
- package/dist/components/p-DDO5W45N.js +2 -0
- package/dist/components/p-DDO5W45N.js.map +1 -0
- package/dist/components/p-DQy_H_hL.js +2 -0
- package/dist/components/p-DQy_H_hL.js.map +1 -0
- package/dist/components/p-DYotx2VC.js +2 -0
- package/dist/components/{p-B-cWYMqs.js.map → p-DYotx2VC.js.map} +1 -1
- package/dist/components/p-Dh4BBuI3.js +2 -0
- package/dist/components/p-Dh4BBuI3.js.map +1 -0
- package/dist/components/{p-bl7d1jB2.js → p-Dt1oDMJ6.js} +2 -2
- package/dist/components/{p-_OGE_E6L.js → p-KRZefifE.js} +2 -2
- package/dist/components/{p-BeIuJQO9.js → p-Ujv0jqbw.js} +2 -2
- package/dist/components/p-drBA73M_.js.map +1 -1
- package/dist/components/{p-CWd8L7Fk.js → p-qawuX6gT.js} +2 -2
- package/dist/docs/components.json +432 -669
- package/dist/react/components.d.ts +1 -1
- package/dist/react/components.js +1 -1
- package/dist/react/ds-panel-sub-nav.d.ts +12 -0
- package/dist/react/ds-panel-sub-nav.js +12 -0
- package/dist/types/components/BarNav/BarNav.d.ts +10 -4
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +2 -0
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +4 -9
- package/dist/types/components/ButtonUnfilled/index.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +0 -5
- package/dist/types/components/Chip/index.d.ts +1 -1
- package/dist/types/components/PanelSubNav/PanelSubNav.d.ts +27 -0
- package/dist/types/components/PanelSubNav/panel-sub-nav-types.d.ts +10 -0
- package/dist/types/components/PanelTools/PanelTools.d.ts +2 -0
- package/dist/types/components/TabGroup/TabGroup.d.ts +3 -4
- package/dist/types/components/TabGroup/tab-item-utils.d.ts +14 -0
- package/dist/types/components.d.ts +109 -152
- package/package.json +4 -4
- package/dist/angular/ds-tab-group-nav.d.ts +0 -20
- package/dist/components/ds-tab-group-nav.js +0 -2
- package/dist/components/ds-tab-group-nav.js.map +0 -1
- package/dist/components/p-B-cWYMqs.js +0 -2
- package/dist/components/p-CxOQaZ4f.js +0 -2
- package/dist/components/p-CxOQaZ4f.js.map +0 -1
- package/dist/components/p-D5wc8lKR.js +0 -2
- package/dist/components/p-D5wc8lKR.js.map +0 -1
- package/dist/components/p-DPxfMUfH.js +0 -2
- package/dist/components/p-DPxfMUfH.js.map +0 -1
- package/dist/components/p-DhgDNluD.js +0 -2
- package/dist/react/ds-tab-group-nav.d.ts +0 -13
- package/dist/react/ds-tab-group-nav.js +0 -15
- package/dist/types/components/BarNav/bar-nav-dom-utils.d.ts +0 -11
- package/dist/types/components/TabGroupNav/TabGroupNav.d.ts +0 -46
- /package/dist/components/{p-BmiNX9Mc.js.map → p-AIFkzp4M.js.map} +0 -0
- /package/dist/components/{p-cgo-rgl4.js.map → p-C7yzdJNM.js.map} +0 -0
- /package/dist/components/{p-9Qu1ls2y.js.map → p-CGovlfKQ.js.map} +0 -0
- /package/dist/components/{p-DkIbxCpi.js.map → p-CeyijE0j.js.map} +0 -0
- /package/dist/components/{p-bl7d1jB2.js.map → p-Dt1oDMJ6.js.map} +0 -0
- /package/dist/components/{p-_OGE_E6L.js.map → p-KRZefifE.js.map} +0 -0
- /package/dist/components/{p-BeIuJQO9.js.map → p-Ujv0jqbw.js.map} +0 -0
- /package/dist/components/{p-CWd8L7Fk.js.map → p-qawuX6gT.js.map} +0 -0
|
@@ -11,13 +11,13 @@ import { BadgeSurface, BadgeVariant } from "./components/Badge/Badge";
|
|
|
11
11
|
import { BannerContrast, BannerIntent } from "./components/Banner/Banner";
|
|
12
12
|
import { BarNavTab } from "./components/BarNav/bar-nav-types";
|
|
13
13
|
import { ButtonFilledContrast, ButtonFilledIntent, ButtonFilledSize, ButtonFilledVariant, ButtonFilledWidth } from "./components/ButtonFilled/ButtonFilled";
|
|
14
|
-
import { ButtonUnfilledBackground,
|
|
14
|
+
import { ButtonUnfilledBackground, ButtonUnfilledSize, ButtonUnfilledVariant, ButtonUnfilledWidth } from "./components/ButtonUnfilled/ButtonUnfilled";
|
|
15
15
|
import { CardAppearance, CardWidth } from "./components/Card/Card";
|
|
16
16
|
import { CardDataVizDonutWidth } from "./components/CardDataVizDonut/CardDataVizDonut";
|
|
17
17
|
import { CardSettingWidth } from "./components/CardSetting/CardSetting";
|
|
18
18
|
import { ChartDatum, ChartLegendItem, ChartSeries } from "./utils/chart-types";
|
|
19
19
|
import { ChartLegendDirection } from "./components/ChartLegend/ChartLegend";
|
|
20
|
-
import {
|
|
20
|
+
import { ChipSize, ChipState } from "./components/Chip/Chip";
|
|
21
21
|
import { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
|
|
22
22
|
import { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
23
23
|
import { IconColor, IconSize } from "./components/Icon/Icon";
|
|
@@ -28,6 +28,8 @@ import { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
|
28
28
|
import { ModalWidth } from "./components/Modal/Modal";
|
|
29
29
|
import { PanelNavGroup, PanelNavRouterMode, PanelNavUserActionDetail } from "./components/PanelNav/panel-nav-types";
|
|
30
30
|
import { ChromeTransitionDetail } from "./nav/chrome-transition";
|
|
31
|
+
import { PanelSubNavItem } from "./components/PanelSubNav/panel-sub-nav-types";
|
|
32
|
+
import { PanelSubNavBackground } from "./components/PanelSubNav/PanelSubNav";
|
|
31
33
|
import { PanelToolsItem, PanelToolsToolId } from "./components/PanelTools/panel-tools-types";
|
|
32
34
|
import { RadioOption } from "./components/RadioGroup/RadioGroup";
|
|
33
35
|
import { SelectOption, SelectSize, SelectWidth } from "./components/Select/Select";
|
|
@@ -37,9 +39,8 @@ import { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, Text
|
|
|
37
39
|
import { IconSize as IconSize1 } from "./components/Icon/Icon";
|
|
38
40
|
import { ControlSize } from "./utils/control-text";
|
|
39
41
|
import { SwitchSize } from "./components/Switch/Switch";
|
|
40
|
-
import {
|
|
42
|
+
import { TabGroupItem } from "./components/TabGroup/tab-item-utils";
|
|
41
43
|
import { TabBackground } from "./components/TabGroup/TabGroup";
|
|
42
|
-
import { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
|
|
43
44
|
import { SortState, TableColumn } from "./components/Table/Table";
|
|
44
45
|
import { TagContrast, TagIntent, TagSize } from "./components/Tag/Tag";
|
|
45
46
|
import { TooltipAlign, TooltipSide, TooltipSize } from "./components/Tooltip/Tooltip";
|
|
@@ -49,13 +50,13 @@ export { BadgeSurface, BadgeVariant } from "./components/Badge/Badge";
|
|
|
49
50
|
export { BannerContrast, BannerIntent } from "./components/Banner/Banner";
|
|
50
51
|
export { BarNavTab } from "./components/BarNav/bar-nav-types";
|
|
51
52
|
export { ButtonFilledContrast, ButtonFilledIntent, ButtonFilledSize, ButtonFilledVariant, ButtonFilledWidth } from "./components/ButtonFilled/ButtonFilled";
|
|
52
|
-
export { ButtonUnfilledBackground,
|
|
53
|
+
export { ButtonUnfilledBackground, ButtonUnfilledSize, ButtonUnfilledVariant, ButtonUnfilledWidth } from "./components/ButtonUnfilled/ButtonUnfilled";
|
|
53
54
|
export { CardAppearance, CardWidth } from "./components/Card/Card";
|
|
54
55
|
export { CardDataVizDonutWidth } from "./components/CardDataVizDonut/CardDataVizDonut";
|
|
55
56
|
export { CardSettingWidth } from "./components/CardSetting/CardSetting";
|
|
56
57
|
export { ChartDatum, ChartLegendItem, ChartSeries } from "./utils/chart-types";
|
|
57
58
|
export { ChartLegendDirection } from "./components/ChartLegend/ChartLegend";
|
|
58
|
-
export {
|
|
59
|
+
export { ChipSize, ChipState } from "./components/Chip/Chip";
|
|
59
60
|
export { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
|
|
60
61
|
export { EmptyStateType } from "./components/EmptyState/EmptyState";
|
|
61
62
|
export { IconColor, IconSize } from "./components/Icon/Icon";
|
|
@@ -66,6 +67,8 @@ export { MenuAlign, MenuSide } from "./components/Menu/menu-position";
|
|
|
66
67
|
export { ModalWidth } from "./components/Modal/Modal";
|
|
67
68
|
export { PanelNavGroup, PanelNavRouterMode, PanelNavUserActionDetail } from "./components/PanelNav/panel-nav-types";
|
|
68
69
|
export { ChromeTransitionDetail } from "./nav/chrome-transition";
|
|
70
|
+
export { PanelSubNavItem } from "./components/PanelSubNav/panel-sub-nav-types";
|
|
71
|
+
export { PanelSubNavBackground } from "./components/PanelSubNav/PanelSubNav";
|
|
69
72
|
export { PanelToolsItem, PanelToolsToolId } from "./components/PanelTools/panel-tools-types";
|
|
70
73
|
export { RadioOption } from "./components/RadioGroup/RadioGroup";
|
|
71
74
|
export { SelectOption, SelectSize, SelectWidth } from "./components/Select/Select";
|
|
@@ -75,9 +78,8 @@ export { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, Text
|
|
|
75
78
|
export { IconSize as IconSize1 } from "./components/Icon/Icon";
|
|
76
79
|
export { ControlSize } from "./utils/control-text";
|
|
77
80
|
export { SwitchSize } from "./components/Switch/Switch";
|
|
78
|
-
export {
|
|
81
|
+
export { TabGroupItem } from "./components/TabGroup/tab-item-utils";
|
|
79
82
|
export { TabBackground } from "./components/TabGroup/TabGroup";
|
|
80
|
-
export { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
|
|
81
83
|
export { SortState, TableColumn } from "./components/Table/Table";
|
|
82
84
|
export { TagContrast, TagIntent, TagSize } from "./components/Tag/Tag";
|
|
83
85
|
export { TooltipAlign, TooltipSide, TooltipSize } from "./components/Tooltip/Tooltip";
|
|
@@ -231,6 +233,11 @@ export namespace Components {
|
|
|
231
233
|
* @default false
|
|
232
234
|
*/
|
|
233
235
|
"isInactive": boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Shows an inline loader and prevents interaction without applying inactive opacity.
|
|
238
|
+
* @default false
|
|
239
|
+
*/
|
|
240
|
+
"isLoading": boolean;
|
|
234
241
|
/**
|
|
235
242
|
* Visible text for `label` / `icon-label` variants.
|
|
236
243
|
* @default ''
|
|
@@ -269,13 +276,9 @@ export namespace Components {
|
|
|
269
276
|
*/
|
|
270
277
|
"ariaLabel": string | null;
|
|
271
278
|
/**
|
|
272
|
-
*
|
|
279
|
+
* Actual parent surface context. Omit on primary and secondary surfaces.
|
|
273
280
|
*/
|
|
274
281
|
"background": ButtonUnfilledBackground | undefined;
|
|
275
|
-
/**
|
|
276
|
-
* Foreground and interaction tokens when the button sits on a contrasting parent background (default, medium, bold, or strong).
|
|
277
|
-
*/
|
|
278
|
-
"backgroundContrast"?: ButtonUnfilledOnBackgroundContrast;
|
|
279
282
|
"controls": string | undefined;
|
|
280
283
|
/**
|
|
281
284
|
* Show a notification dot at the top-right of the icon zone (icon variant only).
|
|
@@ -308,6 +311,11 @@ export namespace Components {
|
|
|
308
311
|
* @default false
|
|
309
312
|
*/
|
|
310
313
|
"isInactive": boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Shows an inline loader and prevents interaction without applying inactive opacity.
|
|
316
|
+
* @default false
|
|
317
|
+
*/
|
|
318
|
+
"isLoading": boolean;
|
|
311
319
|
/**
|
|
312
320
|
* Visible text for `label` / `icon-label` variants.
|
|
313
321
|
* @default ''
|
|
@@ -553,21 +561,12 @@ export namespace Components {
|
|
|
553
561
|
* action is remove.
|
|
554
562
|
*/
|
|
555
563
|
interface DsChip {
|
|
556
|
-
/**
|
|
557
|
-
* Surface context for interaction-fill tokens when the chip sits on a non-default surface.
|
|
558
|
-
*/
|
|
559
|
-
"background": ChipBackground | undefined;
|
|
560
564
|
/**
|
|
561
565
|
* @default false
|
|
562
566
|
*/
|
|
563
567
|
"isInactive": boolean;
|
|
564
568
|
"label": string;
|
|
565
569
|
"maxWidth": string | number | undefined;
|
|
566
|
-
/**
|
|
567
|
-
* When true (default), shows the trailing dismiss control.
|
|
568
|
-
* @default true
|
|
569
|
-
*/
|
|
570
|
-
"removable": boolean;
|
|
571
570
|
/**
|
|
572
571
|
* Accessible remove action. Use `{label}` as the chip-label placeholder.
|
|
573
572
|
* @default 'Remove {label}'
|
|
@@ -908,6 +907,27 @@ export namespace Components {
|
|
|
908
907
|
*/
|
|
909
908
|
"userName": string;
|
|
910
909
|
}
|
|
910
|
+
interface DsPanelSubNav {
|
|
911
|
+
/**
|
|
912
|
+
* @default null
|
|
913
|
+
*/
|
|
914
|
+
"ariaLabel": string | null;
|
|
915
|
+
"ariaLabelledby": string | undefined;
|
|
916
|
+
/**
|
|
917
|
+
* Actual parent surface context. Omit on primary and secondary surfaces.
|
|
918
|
+
*/
|
|
919
|
+
"background": PanelSubNavBackground | undefined;
|
|
920
|
+
/**
|
|
921
|
+
* Local panel tabs. Assign this array through the JavaScript property. Replace the array reference when items change.
|
|
922
|
+
* @default []
|
|
923
|
+
*/
|
|
924
|
+
"items": PanelSubNavItem[];
|
|
925
|
+
/**
|
|
926
|
+
* Required selected item id when enabled items exist. Keep synchronized with the visible panel.
|
|
927
|
+
* @default ''
|
|
928
|
+
*/
|
|
929
|
+
"value": string;
|
|
930
|
+
}
|
|
911
931
|
interface DsPanelTools {
|
|
912
932
|
/**
|
|
913
933
|
* Toggle any rail tool open/closed — shell shortcuts K/A/S/M/N call this.
|
|
@@ -1208,47 +1228,10 @@ export namespace Components {
|
|
|
1208
1228
|
"ariaLabel": string | null;
|
|
1209
1229
|
"ariaLabelledby": string | undefined;
|
|
1210
1230
|
"background": TabBackground | undefined;
|
|
1211
|
-
/**
|
|
1212
|
-
* @default 'horizontal'
|
|
1213
|
-
*/
|
|
1214
|
-
"orientation": 'horizontal' | 'vertical';
|
|
1215
|
-
/**
|
|
1216
|
-
* @default []
|
|
1217
|
-
*/
|
|
1218
|
-
"tabs": TabItem[];
|
|
1219
|
-
/**
|
|
1220
|
-
* @default ''
|
|
1221
|
-
*/
|
|
1222
|
-
"value": string;
|
|
1223
|
-
}
|
|
1224
|
-
interface DsTabGroupNav {
|
|
1225
|
-
/**
|
|
1226
|
-
* @default null
|
|
1227
|
-
*/
|
|
1228
|
-
"ariaLabel": string | null;
|
|
1229
|
-
"ariaLabelledby": string | undefined;
|
|
1230
|
-
"background": TabGroupNavBackground | undefined;
|
|
1231
|
-
"focusFirstTab": () => Promise<void>;
|
|
1232
|
-
"focusLastTab": () => Promise<void>;
|
|
1233
|
-
"focusTab": (id: string) => Promise<void>;
|
|
1234
|
-
/**
|
|
1235
|
-
* @default 'horizontal'
|
|
1236
|
-
*/
|
|
1237
|
-
"orientation": 'horizontal' | 'vertical';
|
|
1238
|
-
/**
|
|
1239
|
-
* When `false`, every tab uses `tabindex="-1"` (another chrome control owns the tab stop).
|
|
1240
|
-
* @default true
|
|
1241
|
-
*/
|
|
1242
|
-
"rovingEnabled": boolean;
|
|
1243
|
-
/**
|
|
1244
|
-
* When `false`, arrow keys move focus only — Space/Enter (or click) commits selection. Used by bar nav where each tab is a full page transition.
|
|
1245
|
-
* @default true
|
|
1246
|
-
*/
|
|
1247
|
-
"selectionFollowsFocus": boolean;
|
|
1248
1231
|
/**
|
|
1249
1232
|
* @default []
|
|
1250
1233
|
*/
|
|
1251
|
-
"tabs":
|
|
1234
|
+
"tabs": TabGroupItem[];
|
|
1252
1235
|
/**
|
|
1253
1236
|
* @default ''
|
|
1254
1237
|
*/
|
|
@@ -1511,6 +1494,10 @@ export interface DsPanelNavCustomEvent<T> extends CustomEvent<T> {
|
|
|
1511
1494
|
detail: T;
|
|
1512
1495
|
target: HTMLDsPanelNavElement;
|
|
1513
1496
|
}
|
|
1497
|
+
export interface DsPanelSubNavCustomEvent<T> extends CustomEvent<T> {
|
|
1498
|
+
detail: T;
|
|
1499
|
+
target: HTMLDsPanelSubNavElement;
|
|
1500
|
+
}
|
|
1514
1501
|
export interface DsPanelToolsCustomEvent<T> extends CustomEvent<T> {
|
|
1515
1502
|
detail: T;
|
|
1516
1503
|
target: HTMLDsPanelToolsElement;
|
|
@@ -1543,10 +1530,6 @@ export interface DsTabGroupCustomEvent<T> extends CustomEvent<T> {
|
|
|
1543
1530
|
detail: T;
|
|
1544
1531
|
target: HTMLDsTabGroupElement;
|
|
1545
1532
|
}
|
|
1546
|
-
export interface DsTabGroupNavCustomEvent<T> extends CustomEvent<T> {
|
|
1547
|
-
detail: T;
|
|
1548
|
-
target: HTMLDsTabGroupNavElement;
|
|
1549
|
-
}
|
|
1550
1533
|
export interface DsTableCustomEvent<T> extends CustomEvent<T> {
|
|
1551
1534
|
detail: T;
|
|
1552
1535
|
target: HTMLDsTableElement;
|
|
@@ -1897,6 +1880,23 @@ declare global {
|
|
|
1897
1880
|
prototype: HTMLDsPanelNavElement;
|
|
1898
1881
|
new (): HTMLDsPanelNavElement;
|
|
1899
1882
|
};
|
|
1883
|
+
interface HTMLDsPanelSubNavElementEventMap {
|
|
1884
|
+
"dsChange": string;
|
|
1885
|
+
}
|
|
1886
|
+
interface HTMLDsPanelSubNavElement extends Components.DsPanelSubNav, HTMLStencilElement {
|
|
1887
|
+
addEventListener<K extends keyof HTMLDsPanelSubNavElementEventMap>(type: K, listener: (this: HTMLDsPanelSubNavElement, ev: DsPanelSubNavCustomEvent<HTMLDsPanelSubNavElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1888
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1889
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1890
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1891
|
+
removeEventListener<K extends keyof HTMLDsPanelSubNavElementEventMap>(type: K, listener: (this: HTMLDsPanelSubNavElement, ev: DsPanelSubNavCustomEvent<HTMLDsPanelSubNavElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1892
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1893
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1894
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1895
|
+
}
|
|
1896
|
+
var HTMLDsPanelSubNavElement: {
|
|
1897
|
+
prototype: HTMLDsPanelSubNavElement;
|
|
1898
|
+
new (): HTMLDsPanelSubNavElement;
|
|
1899
|
+
};
|
|
1900
1900
|
interface HTMLDsPanelToolsElementEventMap {
|
|
1901
1901
|
"dsToolChange": {
|
|
1902
1902
|
id: PanelToolsToolId;
|
|
@@ -2048,24 +2048,6 @@ declare global {
|
|
|
2048
2048
|
prototype: HTMLDsTabGroupElement;
|
|
2049
2049
|
new (): HTMLDsTabGroupElement;
|
|
2050
2050
|
};
|
|
2051
|
-
interface HTMLDsTabGroupNavElementEventMap {
|
|
2052
|
-
"dsChange": string;
|
|
2053
|
-
"dsRovingExit": 'start' | 'end';
|
|
2054
|
-
}
|
|
2055
|
-
interface HTMLDsTabGroupNavElement extends Components.DsTabGroupNav, HTMLStencilElement {
|
|
2056
|
-
addEventListener<K extends keyof HTMLDsTabGroupNavElementEventMap>(type: K, listener: (this: HTMLDsTabGroupNavElement, ev: DsTabGroupNavCustomEvent<HTMLDsTabGroupNavElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2057
|
-
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2058
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2059
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2060
|
-
removeEventListener<K extends keyof HTMLDsTabGroupNavElementEventMap>(type: K, listener: (this: HTMLDsTabGroupNavElement, ev: DsTabGroupNavCustomEvent<HTMLDsTabGroupNavElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2061
|
-
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2062
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2063
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2064
|
-
}
|
|
2065
|
-
var HTMLDsTabGroupNavElement: {
|
|
2066
|
-
prototype: HTMLDsTabGroupNavElement;
|
|
2067
|
-
new (): HTMLDsTabGroupNavElement;
|
|
2068
|
-
};
|
|
2069
2051
|
interface HTMLDsTableElementEventMap {
|
|
2070
2052
|
"dsSort": { columnId: string };
|
|
2071
2053
|
"dsRowClick": { row: unknown; rowIndex: number };
|
|
@@ -2154,6 +2136,7 @@ declare global {
|
|
|
2154
2136
|
"ds-modal": HTMLDsModalElement;
|
|
2155
2137
|
"ds-pagination": HTMLDsPaginationElement;
|
|
2156
2138
|
"ds-panel-nav": HTMLDsPanelNavElement;
|
|
2139
|
+
"ds-panel-sub-nav": HTMLDsPanelSubNavElement;
|
|
2157
2140
|
"ds-panel-tools": HTMLDsPanelToolsElement;
|
|
2158
2141
|
"ds-radio-group": HTMLDsRadioGroupElement;
|
|
2159
2142
|
"ds-select": HTMLDsSelectElement;
|
|
@@ -2163,7 +2146,6 @@ declare global {
|
|
|
2163
2146
|
"ds-slider": HTMLDsSliderElement;
|
|
2164
2147
|
"ds-switch": HTMLDsSwitchElement;
|
|
2165
2148
|
"ds-tab-group": HTMLDsTabGroupElement;
|
|
2166
|
-
"ds-tab-group-nav": HTMLDsTabGroupNavElement;
|
|
2167
2149
|
"ds-table": HTMLDsTableElement;
|
|
2168
2150
|
"ds-tag": HTMLDsTagElement;
|
|
2169
2151
|
"ds-text": HTMLDsTextElement;
|
|
@@ -2328,6 +2310,11 @@ declare namespace LocalJSX {
|
|
|
2328
2310
|
* @default false
|
|
2329
2311
|
*/
|
|
2330
2312
|
"isInactive"?: boolean;
|
|
2313
|
+
/**
|
|
2314
|
+
* Shows an inline loader and prevents interaction without applying inactive opacity.
|
|
2315
|
+
* @default false
|
|
2316
|
+
*/
|
|
2317
|
+
"isLoading"?: boolean;
|
|
2331
2318
|
/**
|
|
2332
2319
|
* Visible text for `label` / `icon-label` variants.
|
|
2333
2320
|
* @default ''
|
|
@@ -2366,13 +2353,9 @@ declare namespace LocalJSX {
|
|
|
2366
2353
|
*/
|
|
2367
2354
|
"ariaLabel"?: string | null;
|
|
2368
2355
|
/**
|
|
2369
|
-
*
|
|
2356
|
+
* Actual parent surface context. Omit on primary and secondary surfaces.
|
|
2370
2357
|
*/
|
|
2371
2358
|
"background"?: ButtonUnfilledBackground | undefined;
|
|
2372
|
-
/**
|
|
2373
|
-
* Foreground and interaction tokens when the button sits on a contrasting parent background (default, medium, bold, or strong).
|
|
2374
|
-
*/
|
|
2375
|
-
"backgroundContrast"?: ButtonUnfilledOnBackgroundContrast;
|
|
2376
2359
|
"controls"?: string | undefined;
|
|
2377
2360
|
/**
|
|
2378
2361
|
* Show a notification dot at the top-right of the icon zone (icon variant only).
|
|
@@ -2405,6 +2388,11 @@ declare namespace LocalJSX {
|
|
|
2405
2388
|
* @default false
|
|
2406
2389
|
*/
|
|
2407
2390
|
"isInactive"?: boolean;
|
|
2391
|
+
/**
|
|
2392
|
+
* Shows an inline loader and prevents interaction without applying inactive opacity.
|
|
2393
|
+
* @default false
|
|
2394
|
+
*/
|
|
2395
|
+
"isLoading"?: boolean;
|
|
2408
2396
|
/**
|
|
2409
2397
|
* Visible text for `label` / `icon-label` variants.
|
|
2410
2398
|
* @default ''
|
|
@@ -2676,10 +2664,6 @@ declare namespace LocalJSX {
|
|
|
2676
2664
|
* action is remove.
|
|
2677
2665
|
*/
|
|
2678
2666
|
interface DsChip {
|
|
2679
|
-
/**
|
|
2680
|
-
* Surface context for interaction-fill tokens when the chip sits on a non-default surface.
|
|
2681
|
-
*/
|
|
2682
|
-
"background"?: ChipBackground | undefined;
|
|
2683
2667
|
/**
|
|
2684
2668
|
* @default false
|
|
2685
2669
|
*/
|
|
@@ -2690,11 +2674,6 @@ declare namespace LocalJSX {
|
|
|
2690
2674
|
* Fired when the remove button is clicked.
|
|
2691
2675
|
*/
|
|
2692
2676
|
"onDsRemove"?: (event: DsChipCustomEvent<void>) => void;
|
|
2693
|
-
/**
|
|
2694
|
-
* When true (default), shows the trailing dismiss control.
|
|
2695
|
-
* @default true
|
|
2696
|
-
*/
|
|
2697
|
-
"removable"?: boolean;
|
|
2698
2677
|
/**
|
|
2699
2678
|
* Accessible remove action. Use `{label}` as the chip-label placeholder.
|
|
2700
2679
|
* @default 'Remove {label}'
|
|
@@ -3065,6 +3044,28 @@ declare namespace LocalJSX {
|
|
|
3065
3044
|
*/
|
|
3066
3045
|
"userName"?: string;
|
|
3067
3046
|
}
|
|
3047
|
+
interface DsPanelSubNav {
|
|
3048
|
+
/**
|
|
3049
|
+
* @default null
|
|
3050
|
+
*/
|
|
3051
|
+
"ariaLabel"?: string | null;
|
|
3052
|
+
"ariaLabelledby"?: string | undefined;
|
|
3053
|
+
/**
|
|
3054
|
+
* Actual parent surface context. Omit on primary and secondary surfaces.
|
|
3055
|
+
*/
|
|
3056
|
+
"background"?: PanelSubNavBackground | undefined;
|
|
3057
|
+
/**
|
|
3058
|
+
* Local panel tabs. Assign this array through the JavaScript property. Replace the array reference when items change.
|
|
3059
|
+
* @default []
|
|
3060
|
+
*/
|
|
3061
|
+
"items"?: PanelSubNavItem[];
|
|
3062
|
+
"onDsChange"?: (event: DsPanelSubNavCustomEvent<string>) => void;
|
|
3063
|
+
/**
|
|
3064
|
+
* Required selected item id when enabled items exist. Keep synchronized with the visible panel.
|
|
3065
|
+
* @default ''
|
|
3066
|
+
*/
|
|
3067
|
+
"value"?: string;
|
|
3068
|
+
}
|
|
3068
3069
|
interface DsPanelTools {
|
|
3069
3070
|
/**
|
|
3070
3071
|
* Active tool view — `search`, `agents`, `messages`, `stacks`, `activity`, or `help`.
|
|
@@ -3387,49 +3388,10 @@ declare namespace LocalJSX {
|
|
|
3387
3388
|
"ariaLabelledby"?: string | undefined;
|
|
3388
3389
|
"background"?: TabBackground | undefined;
|
|
3389
3390
|
"onDsChange"?: (event: DsTabGroupCustomEvent<string>) => void;
|
|
3390
|
-
/**
|
|
3391
|
-
* @default 'horizontal'
|
|
3392
|
-
*/
|
|
3393
|
-
"orientation"?: 'horizontal' | 'vertical';
|
|
3394
3391
|
/**
|
|
3395
3392
|
* @default []
|
|
3396
3393
|
*/
|
|
3397
|
-
"tabs"?:
|
|
3398
|
-
/**
|
|
3399
|
-
* @default ''
|
|
3400
|
-
*/
|
|
3401
|
-
"value"?: string;
|
|
3402
|
-
}
|
|
3403
|
-
interface DsTabGroupNav {
|
|
3404
|
-
/**
|
|
3405
|
-
* @default null
|
|
3406
|
-
*/
|
|
3407
|
-
"ariaLabel"?: string | null;
|
|
3408
|
-
"ariaLabelledby"?: string | undefined;
|
|
3409
|
-
"background"?: TabGroupNavBackground | undefined;
|
|
3410
|
-
"onDsChange"?: (event: DsTabGroupNavCustomEvent<string>) => void;
|
|
3411
|
-
/**
|
|
3412
|
-
* Fired when arrow navigation reaches the first/last tab in manual selection mode.
|
|
3413
|
-
*/
|
|
3414
|
-
"onDsRovingExit"?: (event: DsTabGroupNavCustomEvent<'start' | 'end'>) => void;
|
|
3415
|
-
/**
|
|
3416
|
-
* @default 'horizontal'
|
|
3417
|
-
*/
|
|
3418
|
-
"orientation"?: 'horizontal' | 'vertical';
|
|
3419
|
-
/**
|
|
3420
|
-
* When `false`, every tab uses `tabindex="-1"` (another chrome control owns the tab stop).
|
|
3421
|
-
* @default true
|
|
3422
|
-
*/
|
|
3423
|
-
"rovingEnabled"?: boolean;
|
|
3424
|
-
/**
|
|
3425
|
-
* When `false`, arrow keys move focus only — Space/Enter (or click) commits selection. Used by bar nav where each tab is a full page transition.
|
|
3426
|
-
* @default true
|
|
3427
|
-
*/
|
|
3428
|
-
"selectionFollowsFocus"?: boolean;
|
|
3429
|
-
/**
|
|
3430
|
-
* @default []
|
|
3431
|
-
*/
|
|
3432
|
-
"tabs"?: TabItem[];
|
|
3394
|
+
"tabs"?: TabGroupItem[];
|
|
3433
3395
|
/**
|
|
3434
3396
|
* @default ''
|
|
3435
3397
|
*/
|
|
@@ -3676,6 +3638,7 @@ declare namespace LocalJSX {
|
|
|
3676
3638
|
"intent": ButtonFilledIntent;
|
|
3677
3639
|
"contrast": ButtonFilledContrast;
|
|
3678
3640
|
"isInactive": boolean;
|
|
3641
|
+
"isLoading": boolean;
|
|
3679
3642
|
"type": 'button' | 'submit' | 'reset';
|
|
3680
3643
|
"ariaLabel": string | null;
|
|
3681
3644
|
}
|
|
@@ -3690,8 +3653,8 @@ declare namespace LocalJSX {
|
|
|
3690
3653
|
"hasBorder": boolean;
|
|
3691
3654
|
"dot": boolean;
|
|
3692
3655
|
"isInactive": boolean;
|
|
3656
|
+
"isLoading": boolean;
|
|
3693
3657
|
"type": 'button' | 'submit' | 'reset';
|
|
3694
|
-
"backgroundContrast": ButtonUnfilledOnBackgroundContrast;
|
|
3695
3658
|
"background": ButtonUnfilledBackground | undefined;
|
|
3696
3659
|
"ariaLabel": string | null;
|
|
3697
3660
|
"controls": string | undefined;
|
|
@@ -3760,10 +3723,8 @@ declare namespace LocalJSX {
|
|
|
3760
3723
|
"state": ChipState;
|
|
3761
3724
|
"size": ChipSize;
|
|
3762
3725
|
"rounded": boolean;
|
|
3763
|
-
"removable": boolean;
|
|
3764
3726
|
"maxWidth": string;
|
|
3765
3727
|
"isInactive": boolean;
|
|
3766
|
-
"background": ChipBackground | undefined;
|
|
3767
3728
|
"removeLabel": string;
|
|
3768
3729
|
}
|
|
3769
3730
|
interface DsDividerAttributes {
|
|
@@ -3858,6 +3819,12 @@ declare namespace LocalJSX {
|
|
|
3858
3819
|
"expandNavigationLabel": string;
|
|
3859
3820
|
"collapseNavigationLabel": string;
|
|
3860
3821
|
}
|
|
3822
|
+
interface DsPanelSubNavAttributes {
|
|
3823
|
+
"value": string;
|
|
3824
|
+
"background": PanelSubNavBackground | undefined;
|
|
3825
|
+
"ariaLabel": string | null;
|
|
3826
|
+
"ariaLabelledby": string | undefined;
|
|
3827
|
+
}
|
|
3861
3828
|
interface DsPanelToolsAttributes {
|
|
3862
3829
|
"open": boolean;
|
|
3863
3830
|
"activeTool": PanelToolsToolId | '';
|
|
@@ -3941,16 +3908,6 @@ declare namespace LocalJSX {
|
|
|
3941
3908
|
"background": TabBackground | undefined;
|
|
3942
3909
|
"ariaLabel": string | null;
|
|
3943
3910
|
"ariaLabelledby": string | undefined;
|
|
3944
|
-
"orientation": 'horizontal' | 'vertical';
|
|
3945
|
-
}
|
|
3946
|
-
interface DsTabGroupNavAttributes {
|
|
3947
|
-
"value": string;
|
|
3948
|
-
"background": TabGroupNavBackground | undefined;
|
|
3949
|
-
"ariaLabel": string | null;
|
|
3950
|
-
"ariaLabelledby": string | undefined;
|
|
3951
|
-
"orientation": 'horizontal' | 'vertical';
|
|
3952
|
-
"selectionFollowsFocus": boolean;
|
|
3953
|
-
"rovingEnabled": boolean;
|
|
3954
3911
|
}
|
|
3955
3912
|
interface DsTableAttributes {
|
|
3956
3913
|
"loading": boolean;
|
|
@@ -4032,6 +3989,7 @@ declare namespace LocalJSX {
|
|
|
4032
3989
|
"ds-modal": Omit<DsModal, keyof DsModalAttributes> & { [K in keyof DsModal & keyof DsModalAttributes]?: DsModal[K] } & { [K in keyof DsModal & keyof DsModalAttributes as `attr:${K}`]?: DsModalAttributes[K] } & { [K in keyof DsModal & keyof DsModalAttributes as `prop:${K}`]?: DsModal[K] } & OneOf<"heading", DsModal["heading"], DsModalAttributes["heading"]>;
|
|
4033
3990
|
"ds-pagination": Omit<DsPagination, keyof DsPaginationAttributes> & { [K in keyof DsPagination & keyof DsPaginationAttributes]?: DsPagination[K] } & { [K in keyof DsPagination & keyof DsPaginationAttributes as `attr:${K}`]?: DsPaginationAttributes[K] } & { [K in keyof DsPagination & keyof DsPaginationAttributes as `prop:${K}`]?: DsPagination[K] };
|
|
4034
3991
|
"ds-panel-nav": Omit<DsPanelNav, keyof DsPanelNavAttributes> & { [K in keyof DsPanelNav & keyof DsPanelNavAttributes]?: DsPanelNav[K] } & { [K in keyof DsPanelNav & keyof DsPanelNavAttributes as `attr:${K}`]?: DsPanelNavAttributes[K] } & { [K in keyof DsPanelNav & keyof DsPanelNavAttributes as `prop:${K}`]?: DsPanelNav[K] };
|
|
3992
|
+
"ds-panel-sub-nav": Omit<DsPanelSubNav, keyof DsPanelSubNavAttributes> & { [K in keyof DsPanelSubNav & keyof DsPanelSubNavAttributes]?: DsPanelSubNav[K] } & { [K in keyof DsPanelSubNav & keyof DsPanelSubNavAttributes as `attr:${K}`]?: DsPanelSubNavAttributes[K] } & { [K in keyof DsPanelSubNav & keyof DsPanelSubNavAttributes as `prop:${K}`]?: DsPanelSubNav[K] };
|
|
4035
3993
|
"ds-panel-tools": Omit<DsPanelTools, keyof DsPanelToolsAttributes> & { [K in keyof DsPanelTools & keyof DsPanelToolsAttributes]?: DsPanelTools[K] } & { [K in keyof DsPanelTools & keyof DsPanelToolsAttributes as `attr:${K}`]?: DsPanelToolsAttributes[K] } & { [K in keyof DsPanelTools & keyof DsPanelToolsAttributes as `prop:${K}`]?: DsPanelTools[K] };
|
|
4036
3994
|
"ds-radio-group": Omit<DsRadioGroup, keyof DsRadioGroupAttributes> & { [K in keyof DsRadioGroup & keyof DsRadioGroupAttributes]?: DsRadioGroup[K] } & { [K in keyof DsRadioGroup & keyof DsRadioGroupAttributes as `attr:${K}`]?: DsRadioGroupAttributes[K] } & { [K in keyof DsRadioGroup & keyof DsRadioGroupAttributes as `prop:${K}`]?: DsRadioGroup[K] };
|
|
4037
3995
|
"ds-select": Omit<DsSelect, keyof DsSelectAttributes> & { [K in keyof DsSelect & keyof DsSelectAttributes]?: DsSelect[K] } & { [K in keyof DsSelect & keyof DsSelectAttributes as `attr:${K}`]?: DsSelectAttributes[K] } & { [K in keyof DsSelect & keyof DsSelectAttributes as `prop:${K}`]?: DsSelect[K] };
|
|
@@ -4041,7 +3999,6 @@ declare namespace LocalJSX {
|
|
|
4041
3999
|
"ds-slider": Omit<DsSlider, keyof DsSliderAttributes> & { [K in keyof DsSlider & keyof DsSliderAttributes]?: DsSlider[K] } & { [K in keyof DsSlider & keyof DsSliderAttributes as `attr:${K}`]?: DsSliderAttributes[K] } & { [K in keyof DsSlider & keyof DsSliderAttributes as `prop:${K}`]?: DsSlider[K] } & OneOf<"label", DsSlider["label"], DsSliderAttributes["label"]>;
|
|
4042
4000
|
"ds-switch": Omit<DsSwitch, keyof DsSwitchAttributes> & { [K in keyof DsSwitch & keyof DsSwitchAttributes]?: DsSwitch[K] } & { [K in keyof DsSwitch & keyof DsSwitchAttributes as `attr:${K}`]?: DsSwitchAttributes[K] } & { [K in keyof DsSwitch & keyof DsSwitchAttributes as `prop:${K}`]?: DsSwitch[K] };
|
|
4043
4001
|
"ds-tab-group": Omit<DsTabGroup, keyof DsTabGroupAttributes> & { [K in keyof DsTabGroup & keyof DsTabGroupAttributes]?: DsTabGroup[K] } & { [K in keyof DsTabGroup & keyof DsTabGroupAttributes as `attr:${K}`]?: DsTabGroupAttributes[K] } & { [K in keyof DsTabGroup & keyof DsTabGroupAttributes as `prop:${K}`]?: DsTabGroup[K] };
|
|
4044
|
-
"ds-tab-group-nav": Omit<DsTabGroupNav, keyof DsTabGroupNavAttributes> & { [K in keyof DsTabGroupNav & keyof DsTabGroupNavAttributes]?: DsTabGroupNav[K] } & { [K in keyof DsTabGroupNav & keyof DsTabGroupNavAttributes as `attr:${K}`]?: DsTabGroupNavAttributes[K] } & { [K in keyof DsTabGroupNav & keyof DsTabGroupNavAttributes as `prop:${K}`]?: DsTabGroupNav[K] };
|
|
4045
4002
|
"ds-table": Omit<DsTable, keyof DsTableAttributes> & { [K in keyof DsTable & keyof DsTableAttributes]?: DsTable[K] } & { [K in keyof DsTable & keyof DsTableAttributes as `attr:${K}`]?: DsTableAttributes[K] } & { [K in keyof DsTable & keyof DsTableAttributes as `prop:${K}`]?: DsTable[K] };
|
|
4046
4003
|
"ds-tag": Omit<DsTag, keyof DsTagAttributes> & { [K in keyof DsTag & keyof DsTagAttributes]?: DsTag[K] } & { [K in keyof DsTag & keyof DsTagAttributes as `attr:${K}`]?: DsTagAttributes[K] } & { [K in keyof DsTag & keyof DsTagAttributes as `prop:${K}`]?: DsTag[K] } & OneOf<"label", DsTag["label"], DsTagAttributes["label"]>;
|
|
4047
4004
|
"ds-text": Omit<DsText, keyof DsTextAttributes> & { [K in keyof DsText & keyof DsTextAttributes]?: DsText[K] } & { [K in keyof DsText & keyof DsTextAttributes as `attr:${K}`]?: DsTextAttributes[K] } & { [K in keyof DsText & keyof DsTextAttributes as `prop:${K}`]?: DsText[K] };
|
|
@@ -4098,6 +4055,7 @@ declare module "@stencil/core" {
|
|
|
4098
4055
|
"ds-modal": LocalJSX.IntrinsicElements["ds-modal"] & JSXBase.HTMLAttributes<HTMLDsModalElement>;
|
|
4099
4056
|
"ds-pagination": LocalJSX.IntrinsicElements["ds-pagination"] & JSXBase.HTMLAttributes<HTMLDsPaginationElement>;
|
|
4100
4057
|
"ds-panel-nav": LocalJSX.IntrinsicElements["ds-panel-nav"] & JSXBase.HTMLAttributes<HTMLDsPanelNavElement>;
|
|
4058
|
+
"ds-panel-sub-nav": LocalJSX.IntrinsicElements["ds-panel-sub-nav"] & JSXBase.HTMLAttributes<HTMLDsPanelSubNavElement>;
|
|
4101
4059
|
"ds-panel-tools": LocalJSX.IntrinsicElements["ds-panel-tools"] & JSXBase.HTMLAttributes<HTMLDsPanelToolsElement>;
|
|
4102
4060
|
"ds-radio-group": LocalJSX.IntrinsicElements["ds-radio-group"] & JSXBase.HTMLAttributes<HTMLDsRadioGroupElement>;
|
|
4103
4061
|
/**
|
|
@@ -4111,7 +4069,6 @@ declare module "@stencil/core" {
|
|
|
4111
4069
|
"ds-slider": LocalJSX.IntrinsicElements["ds-slider"] & JSXBase.HTMLAttributes<HTMLDsSliderElement>;
|
|
4112
4070
|
"ds-switch": LocalJSX.IntrinsicElements["ds-switch"] & JSXBase.HTMLAttributes<HTMLDsSwitchElement>;
|
|
4113
4071
|
"ds-tab-group": LocalJSX.IntrinsicElements["ds-tab-group"] & JSXBase.HTMLAttributes<HTMLDsTabGroupElement>;
|
|
4114
|
-
"ds-tab-group-nav": LocalJSX.IntrinsicElements["ds-tab-group-nav"] & JSXBase.HTMLAttributes<HTMLDsTabGroupNavElement>;
|
|
4115
4072
|
"ds-table": LocalJSX.IntrinsicElements["ds-table"] & JSXBase.HTMLAttributes<HTMLDsTableElement>;
|
|
4116
4073
|
"ds-tag": LocalJSX.IntrinsicElements["ds-tag"] & JSXBase.HTMLAttributes<HTMLDsTagElement>;
|
|
4117
4074
|
"ds-text": LocalJSX.IntrinsicElements["ds-text"] & JSXBase.HTMLAttributes<HTMLDsTextElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ds-mo/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "CompoMo — composable web components styled with TokoMo design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"pretest": "node scripts/generate-icon-catalog.mjs",
|
|
71
71
|
"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 && node scripts/build-framework-exports.mjs && node scripts/build-registry.mjs && node scripts/build-agent-manifest.mjs",
|
|
72
72
|
"verify:pack": "node scripts/verify-npm-pack.mjs && node scripts/verify-package-imports.mjs",
|
|
73
|
-
"test": "node --import tsx/esm --test tests/component-inventory.test.ts tests/agent-contract.test.ts tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/text.test.ts tests/eslint-plugin-local.test.ts tests/stylelint-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/tooltip-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/
|
|
73
|
+
"test": "node --import tsx/esm --test tests/component-inventory.test.ts tests/agent-contract.test.ts tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/text.test.ts tests/eslint-plugin-local.test.ts tests/stylelint-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/tooltip-position.test.ts tests/menu-placement.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/icon-catalog.test.ts tests/icon-cache.test.ts tests/icon-svg.test.ts",
|
|
74
74
|
"test:e2e": "npm run build && playwright test",
|
|
75
75
|
"test:e2e:install": "playwright install chromium firefox webkit",
|
|
76
76
|
"build:docs": "stencil build --docs",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@angular/core": ">=19 <23",
|
|
98
98
|
"@angular/forms": ">=19 <23",
|
|
99
99
|
"@ds-mo/icons": "^6.2.0",
|
|
100
|
-
"@ds-mo/tokens": "^3.
|
|
100
|
+
"@ds-mo/tokens": "^3.1.0",
|
|
101
101
|
"react": "^18 || ^19",
|
|
102
102
|
"react-dom": "^18 || ^19"
|
|
103
103
|
},
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@angular/forms": "^22.0.4",
|
|
123
123
|
"@axe-core/playwright": "^4.12.1",
|
|
124
124
|
"@ds-mo/icons": "^6.2.0",
|
|
125
|
-
"@ds-mo/tokens": "^3.
|
|
125
|
+
"@ds-mo/tokens": "^3.1.0",
|
|
126
126
|
"@eslint/js": "^10.0.1",
|
|
127
127
|
"@figma/code-connect": "^1.4.9",
|
|
128
128
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, NgZone, EventEmitter } from '@angular/core';
|
|
2
|
-
import type { Components } from '@ds-mo/ui/components';
|
|
3
|
-
import type { DsTabGroupNavCustomEvent } from '@ds-mo/ui/components';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DsTabGroupNav {
|
|
6
|
-
protected z: NgZone;
|
|
7
|
-
protected el: HTMLDsTabGroupNavElement;
|
|
8
|
-
dsChange: EventEmitter<DsTabGroupNavCustomEvent<string>>;
|
|
9
|
-
dsRovingExit: EventEmitter<DsTabGroupNavCustomEvent<"start" | "end">>;
|
|
10
|
-
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DsTabGroupNav, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsTabGroupNav, "ds-tab-group-nav", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "background": { "alias": "background"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "rovingEnabled": { "alias": "rovingEnabled"; "required": false; }; "selectionFollowsFocus": { "alias": "selectionFollowsFocus"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "dsChange": "dsChange"; "dsRovingExit": "dsRovingExit"; }, never, ["*"], true, never>;
|
|
13
|
-
}
|
|
14
|
-
export declare interface DsTabGroupNav extends Components.DsTabGroupNav {
|
|
15
|
-
dsChange: EventEmitter<DsTabGroupNavCustomEvent<string>>;
|
|
16
|
-
/**
|
|
17
|
-
* Fired when arrow navigation reaches the first/last tab in manual selection mode.
|
|
18
|
-
*/
|
|
19
|
-
dsRovingExit: EventEmitter<DsTabGroupNavCustomEvent<'start' | 'end'>>;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as i,H as e,c as s,h as n,a as t,t as o}from"./index.js";import{d as r}from"./p-cgo-rgl4.js";import{d as a}from"./p-DkIbxCpi.js";import{d as c}from"./p-_OGE_E6L.js";import{d}from"./p-DhgDNluD.js";import{d as l}from"./p-CWd8L7Fk.js";import{a as u,T as h}from"./p-drBA73M_.js";import{r as m}from"./p-BWUTr_XN.js";import{r as f}from"./p-BHtg1fh3.js";function v(i){const{anchorRect:e,popupWidth:s,popupHeight:n,side:t,align:o,sideOffsetPx:r,alignOffsetPx:a,viewportPadPx:c,viewportWidth:d,viewportHeight:l}=i;let u=0;let h=0;switch(t){case"top":h=e.top-n-r;u=o==="start"?e.left+a:o==="end"?e.right-s+a:e.left+e.width/2-s/2+a;break;case"bottom":h=e.bottom+r;u=o==="start"?e.left+a:o==="end"?e.right-s+a:e.left+e.width/2-s/2+a;break;case"left":u=e.left-s-r;h=o==="start"?e.top+a:o==="end"?e.bottom-n+a:e.top+e.height/2-n/2+a;break;case"right":u=e.right+r;h=o==="start"?e.top+a:o==="end"?e.bottom-n+a:e.top+e.height/2-n/2+a;break}return{x:Math.min(Math.max(u,c),d-s-c),y:Math.min(Math.max(h,c),l-n-c)}}function p(i){return"variant"in i&&i.variant==="gradient-picker"}const g=()=>`.sc-ds-menu-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-menu-h:focus-visible,.ds-focus-ring.sc-ds-menu:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-menu-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-menu{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-menu-h:focus-visible,.ds-focus-ring-inset.sc-ds-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-menu-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-menu:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-interaction-fill.sc-ds-menu-h,.ds-interaction-fill.sc-ds-menu{position:relative;z-index:0;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent}.ds-interaction-fill.sc-ds-menu-h::before,.ds-interaction-fill.sc-ds-menu::before,.ds-interaction-fill.sc-ds-menu-h::after,.ds-interaction-fill.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;transition:none}.ds-interaction-fill.sc-ds-menu-h::before,.ds-interaction-fill.sc-ds-menu::before{z-index:1}.ds-interaction-fill.sc-ds-menu-h::after,.ds-interaction-fill.sc-ds-menu::after{z-index:3;box-shadow:inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-menu-h,.ds-interaction-fill--bordered.sc-ds-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-menu-h::before,.ds-interaction-fill--selected.sc-ds-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-menu-h,.ds-interaction-fill--selected.sc-ds-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}.ds-interaction-fill.sc-ds-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}.ds-interaction-fill.sc-ds-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill.sc-ds-menu-h>.ds-interaction-fill__content.sc-ds-menu,.ds-interaction-fill.sc-ds-menu>.ds-interaction-fill__content.sc-ds-menu,.ds-interaction-fill__content.sc-ds-menu{position:relative;z-index:2}.ds-interaction-fill--on-medium.sc-ds-menu-h,.ds-interaction-fill--on-medium.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-menu-h,.ds-interaction-fill--on-bold.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-menu-h,.ds-interaction-fill--on-strong.sc-ds-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-menu-h,.ds-interaction-fill--on-translucent.sc-ds-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-menu-h,.ds-interaction-fill--on-inverted.sc-ds-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-menu-h,.ds-interaction-fill--on-media.sc-ds-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-menu-h,.ds-interaction-fill--on-navigation.sc-ds-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}.ds-control-inactive.sc-ds-menu-h,.ds-control-inactive.sc-ds-menu{opacity:0.25;pointer-events:none;cursor:not-allowed}.ds-control--md.sc-ds-menu-h,.ds-control--md.sc-ds-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050);--ds-control-radius:var(--dimension-radius-025)}.ds-control--sm.sc-ds-menu-h,.ds-control--sm.sc-ds-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025);--ds-control-radius:var(--dimension-radius-025)}.ds-control--xs.sc-ds-menu-h,.ds-control--xs.sc-ds-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0;--ds-control-radius:var(--dimension-radius-025)}.menu-popup.sc-ds-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:var(--dimension-panel-width-lg);overflow:hidden;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:menuFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.menu-popup.sc-ds-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.menu-popup--closing.sc-ds-menu{animation:menuFadeOut var(--effect-motion-short-2) forwards}@keyframes menuFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes menuFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.menu-popup.sc-ds-menu{animation:none;opacity:1}.menu-popup--closing.sc-ds-menu{opacity:0}}.menu-section.sc-ds-menu{display:flex;flex-direction:column;gap:var(--dimension-space-050);padding:var(--dimension-space-050)}.menu-section--divided.sc-ds-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.section-header.sc-ds-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding:0 calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) );text-align:start;-webkit-user-select:none;user-select:none}.menu-item.sc-ds-menu{display:flex;align-items:center;gap:var(--ds-control-gap, var(--dimension-space-050));width:100%;height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));box-sizing:border-box;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:pointer;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.menu-item.sc-ds-menu:has(.menu-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.menu-item--destructive.sc-ds-menu .menu-item__label.sc-ds-menu{color:var(--color-foreground-bold-negative) !important}.menu-item__content.sc-ds-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.menu-item__label.sc-ds-menu{padding:0 var(--ds-control-label-inset, var(--dimension-space-025))}.menu-item__subtext.sc-ds-menu,ds-text.menu-item__subtext.sc-ds-menu{padding:0 var(--ds-control-label-inset, var(--dimension-space-025))}.menu-item__dot-box.sc-ds-menu{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.menu-item__switch.sc-ds-menu{flex-shrink:0}`;const b=8;const w=i(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.dsClose=s(this,"dsClose");this.dsSelect=s(this,"dsSelect");this.dsGradientSelect=s(this,"dsGradientSelect");this.open=false;this.items=[];this.sections=[];this.side="bottom";this.align="start";this.sideOffset=u.space050;this.alignOffset=0;this.initialFocusVisible=false;this.menuLabel="Menu";this.shouldRender=false;this.closing=false;this.pos={x:0,y:0};this.focusedIndex=0;this.positionReady=false;this.focusRingVisible=false;this.clickOutsideHandler=null;this.scrollResizeHandler=null;this.closeTimer=null;this.itemEls=[];this.positionRetryRaf=null;this.listenersReady=false}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.cancelPositionRetry();this.teardownListeners()}onOpenChange(i){if(i){this.teardownListeners();this.shouldRender=true;this.closing=false;this.positionReady=false;this.listenersReady=false;this.focusRingVisible=this.initialFocusVisible;this.listenersReady=true;this.setupListeners();this.schedulePositionUpdate((()=>{this.focusInitialItem()}))}else if(this.shouldRender){this.cancelPositionRetry();this.closing=true;this.teardownListeners();this.listenersReady=false;const i=this.closeAnimationMs;if(i<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>{this.closeTimer=null;this.finishClose()}),i)}}onAnchorChange(){if(this.open)this.schedulePositionUpdate()}onPositionPropsChange(){if(this.open)this.schedulePositionUpdate()}get viewportPadPx(){return m(h.space050,h.space050)}get sideOffsetPx(){return m(this.sideOffset,h.space050)}get alignOffsetPx(){return m(this.alignOffset,0)}get popupFallbackWidthPx(){return m(h.menuWidthXs,h.menuWidthXs)}get popupFallbackHeightPx(){return m(h.menuFallbackHeight,h.menuFallbackHeight)}get closeAnimationMs(){return f(h.motionShort2,h.animationDurationShort3)}finishClose(){this.shouldRender=false;this.closing=false}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return null}get activeSections(){if(this.sections.length>0)return this.sections;if(this.items.length>0)return[{items:this.items}];return[]}get flatItems(){return this.activeSections.flatMap((i=>p(i)?[]:i.items))}cancelPositionRetry(){if(this.positionRetryRaf!==null){cancelAnimationFrame(this.positionRetryRaf);this.positionRetryRaf=null}}schedulePositionUpdate(i){if(!this.open)return;this.cancelPositionRetry();this.positionReady=false;let e=b;const s=()=>{this.positionRetryRaf=null;if(!this.open)return;if(this.calculatePosition()){this.positionReady=true;i?.();return}if(e>0){e-=1;this.positionRetryRaf=requestAnimationFrame(s)}};this.positionRetryRaf=requestAnimationFrame(s)}calculatePosition(){const i=this.resolvedAnchor;if(!i)return false;const e=this.el.querySelector(".menu-popup");if(!e)return false;this.pos=v({anchorRect:i.getBoundingClientRect(),popupWidth:e.offsetWidth||this.popupFallbackWidthPx,popupHeight:e.offsetHeight||this.popupFallbackHeightPx,side:this.side,align:this.align,sideOffsetPx:this.sideOffsetPx,alignOffsetPx:this.alignOffsetPx,viewportPadPx:this.viewportPadPx,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});return true}focusInitialItem(){const i=this.flatItems;const e=i.findIndex((i=>i.isSelected&&!i.isInactive));const s=i.findIndex((i=>!i.isInactive));this.focusedIndex=e>=0?e:s>=0?s:0;requestAnimationFrame((()=>{const i=this.el.querySelectorAll(".menu-item");i[this.focusedIndex]?.focus()}))}setupListeners(){this.clickOutsideHandler=i=>{const e=i.target;const s=this.el.querySelector(".menu-popup");const n=this.resolvedAnchor;if(s?.contains(e)||n?.contains(e))return;this.close()};this.scrollResizeHandler=()=>{if(this.shouldRender&&!this.closing)this.calculatePosition()};document.addEventListener("mousedown",this.clickOutsideHandler,true);window.addEventListener("scroll",this.scrollResizeHandler,true);window.addEventListener("resize",this.scrollResizeHandler)}teardownListeners(){if(this.clickOutsideHandler){document.removeEventListener("mousedown",this.clickOutsideHandler,true);this.clickOutsideHandler=null}if(this.scrollResizeHandler){window.removeEventListener("scroll",this.scrollResizeHandler,true);window.removeEventListener("resize",this.scrollResizeHandler);this.scrollResizeHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(){this.resolvedAnchor?.focus();this.dsClose.emit();this.open=false;this.onOpenChange(false)}handleKeyDown(i){if(!this.shouldRender||this.closing)return;const e=this.flatItems;const s=e.map(((i,e)=>({it:i,i:e}))).filter((({it:i})=>!i.isInactive)).map((({i})=>i));if(!s.length)return;const n=s.indexOf(this.focusedIndex);const t=n<0?0:n;switch(i.key){case"ArrowDown":i.preventDefault();i.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[(t+1)%s.length];this.focusItem(this.focusedIndex);break;case"ArrowUp":i.preventDefault();i.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[(t-1+s.length)%s.length];this.focusItem(this.focusedIndex);break;case"Home":i.preventDefault();i.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[0];this.focusItem(this.focusedIndex);break;case"End":i.preventDefault();i.stopPropagation();this.focusRingVisible=true;this.focusedIndex=s[s.length-1];this.focusItem(this.focusedIndex);break;case"Escape":i.preventDefault();this.close();break;case"Tab":i.preventDefault();this.close();break}}focusItem(i){const e=this.el.querySelectorAll(".menu-item");e[i]?.focus()}handleItemClick(i){if(i.isInactive)return;this.dsSelect.emit(i)}handleGradientSelect(i){this.dsGradientSelect.emit(i)}render(){if(!this.shouldRender)return n(t,{style:{display:"contents"}});const i=this.activeSections;let e=0;const s={position:"fixed",left:"0",top:"0",transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};if(this.menuWidth)s["width"]=this.menuWidth;if(this.minWidth)s["min-width"]=this.minWidth;return n(t,{style:{display:"contents"}},n("div",{class:{"menu-popup":true,"menu-popup--closing":this.closing},style:s,role:"menu","aria-label":this.menuLabel,"aria-orientation":"vertical"},i.map(((s,t)=>n("div",{key:t,class:{"menu-section":true,"menu-section--divided":t<i.length-1,"menu-section--gradient-picker":p(s)},role:s.header?"group":undefined,"aria-label":s.header},s.header&&n("ds-text",{class:"section-header ds-control--md",as:"span",variant:"text-body-small",emphasis:true,color:"primary","aria-hidden":"true"},s.header),p(s)?n("ds-shell-gradient-picker",{value:s.value,onDsChange:i=>{i.stopPropagation();this.handleGradientSelect(i.detail)}}):s.items.map((i=>{const s=e++;const t=this.focusedIndex===s;return n("button",{key:s,type:"button",class:{"menu-item":true,"ds-control--md":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":t&&this.focusRingVisible,"ds-interaction-fill":!i.isInactive,"ds-interaction-fill--selected":!!i.isSelected&&!i.isInactive,"menu-item--selected":!!i.isSelected,"ds-control-inactive":!!i.isInactive,"menu-item--destructive":!!i.isDestructive,"menu-item--focused":t},role:i.showSwitch?"menuitemcheckbox":"menuitem","aria-checked":i.showSwitch?String(!!i.switchValue):undefined,"aria-current":!i.showSwitch&&i.isSelected?"true":undefined,disabled:i.isInactive,tabIndex:t?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.handleItemClick(i),onFocus:()=>{this.focusedIndex=s}},n("div",{class:"menu-item__content ds-interaction-fill__content"},n("ds-text",{class:"menu-item__label",as:"span",variant:"text-body-medium",color:i.isSelected?"primary":"secondary"},i.label),i.subtext&&n("ds-text",{class:"menu-item__subtext",as:"span",variant:"text-body-small",color:"secondary"},i.subtext)),i.dot&&n("span",{class:"menu-item__dot-box ds-interaction-fill__content","aria-hidden":"true"},n("ds-badge",{class:"menu-item__dot",variant:"dot",background:i.isSelected&&!i.isInactive?"var(--ds-interaction-active)":"var(--color-background-primary)",label:""})),i.showSwitch&&n("ds-switch",{class:"menu-item__switch ds-interaction-fill__content",size:"sm",checked:!!i.switchValue,presentation:true}))})))))))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}}static get style(){return g()}},[2,"ds-menu",{open:[1028],items:[16],sections:[16],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],minWidth:[1,"min-width"],anchor:[16],anchorId:[1,"anchor-id"],initialFocusVisible:[4,"initial-focus-visible"],menuLabel:[1,"menu-label"],shouldRender:[32],closing:[32],pos:[32],focusedIndex:[32],positionReady:[32],focusRingVisible:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onAnchorChange:0}],anchorId:[{onAnchorChange:0}],side:[{onPositionPropsChange:0}],align:[{onPositionPropsChange:0}],sideOffset:[{onPositionPropsChange:0}],alignOffset:[{onPositionPropsChange:0}]}]);function x(){if(typeof customElements==="undefined"){return}const i=["ds-menu","ds-badge","ds-shell-gradient-picker","ds-shell-gradient-swatch","ds-switch","ds-text"];i.forEach((i=>{switch(i){case"ds-menu":if(!customElements.get(o(i))){customElements.define(o(i),w)}break;case"ds-badge":if(!customElements.get(o(i))){r()}break;case"ds-shell-gradient-picker":if(!customElements.get(o(i))){a()}break;case"ds-shell-gradient-swatch":if(!customElements.get(o(i))){c()}break;case"ds-switch":if(!customElements.get(o(i))){d()}break;case"ds-text":if(!customElements.get(o(i))){l()}break}}))}x();export{w as M,x as d};
|
|
2
|
-
//# sourceMappingURL=p-B-cWYMqs.js.map
|