@ds-mo/ui 2.4.0 → 2.5.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-app-shell.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-menu.js +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-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.d.ts +11 -0
- package/dist/components/ds-shell-gradient-picker.js +2 -0
- package/dist/components/ds-shell-gradient-picker.js.map +1 -0
- package/dist/components/ds-shell-gradient-swatch.d.ts +11 -0
- package/dist/components/ds-shell-gradient-swatch.js +2 -0
- package/dist/components/ds-shell-gradient-swatch.js.map +1 -0
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-toggle.js +1 -1
- package/dist/components/p-BU5fKLdO.js +2 -0
- package/dist/components/p-BU5fKLdO.js.map +1 -0
- package/dist/components/p-BgiK3sHs.js +2 -0
- package/dist/components/p-BgiK3sHs.js.map +1 -0
- package/dist/components/p-CLmK4lRE.js +2 -0
- package/dist/components/p-CLmK4lRE.js.map +1 -0
- package/dist/components/p-DKG6W4pb.js +2 -0
- package/dist/components/p-DKG6W4pb.js.map +1 -0
- package/dist/types/components/AppShell/AppShell.d.ts +7 -1
- package/dist/types/components/Menu/Menu.d.ts +4 -0
- package/dist/types/components/Menu/menu-types.d.ts +10 -1
- package/dist/types/components/PanelTools/PanelTools.d.ts +1 -1
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +10 -0
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +14 -0
- package/dist/types/components/ShellGradientSwatch/shell-gradient-swatch-types.d.ts +4 -0
- package/dist/types/components.d.ts +130 -3
- package/dist/types/nav/index.d.ts +2 -0
- package/dist/types/nav/shell-gradient-presets.d.ts +11 -0
- package/dist/types/nav/shell-gradient.d.ts +7 -4
- package/dist/types/nav/shell-shortcuts.d.ts +4 -4
- package/package.json +2 -2
- package/src/angular/index.ts +2 -0
- package/src/angular/proxies.ts +69 -3
- package/src/react/components.ts +2 -0
- package/src/react/ds-menu.ts +5 -3
- package/src/react/ds-shell-gradient-picker.ts +27 -0
- package/src/react/ds-shell-gradient-swatch.ts +27 -0
- package/src/wc/components/AppShell/AppShell.tsx +14 -2
- package/src/wc/components/BarNav/bar-nav-tabs-menu-utils.ts +2 -2
- package/src/wc/components/Menu/Menu.tsx +27 -4
- package/src/wc/components/Menu/menu-types.ts +19 -1
- package/src/wc/components/PanelTools/PanelTools.tsx +1 -1
- package/src/wc/components/ShellGradientPicker/ShellGradientPicker.tsx +49 -0
- package/src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx +53 -0
- package/src/wc/components/ShellGradientSwatch/shell-gradient-swatch-types.ts +16 -0
- package/src/wc/components.d.ts +130 -3
- package/src/wc/nav/index.ts +9 -0
- package/src/wc/nav/shell-gradient-presets.ts +35 -0
- package/src/wc/nav/shell-gradient.ts +26 -8
- package/src/wc/nav/shell-shortcuts.ts +6 -6
- package/dist/components/p-YzIqPOqL.js +0 -2
- package/dist/components/p-YzIqPOqL.js.map +0 -1
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AccordionItemData } from "./components/Accordion/Accordion";
|
|
9
9
|
import { NavChromeStyle } from "./nav/nav-chrome";
|
|
10
|
+
import { ShellGradientPreset } from "./nav/shell-gradient-presets";
|
|
10
11
|
import { BadgeSurface, BadgeVariant } from "./components/Badge/Badge";
|
|
11
12
|
import { BannerContrast, BannerIntent } from "./components/Banner/Banner";
|
|
12
13
|
import { BarNavTab } from "./components/BarNav/bar-nav-types";
|
|
@@ -31,6 +32,7 @@ import { PanelToolsItem, PanelToolsToolId } from "./components/PanelTools/panel-
|
|
|
31
32
|
import { RadioOption } from "./components/RadioGroup/RadioGroup";
|
|
32
33
|
import { ScrollbarVariant } from "./components/Scrollbar/Scrollbar";
|
|
33
34
|
import { SelectOption } from "./components/Select/Select";
|
|
35
|
+
import { ShellGradientPreset as ShellGradientPreset1 } from "./components/ShellGradientSwatch/shell-gradient-swatch-types";
|
|
34
36
|
import { SkeletonVariant } from "./components/Skeleton/Skeleton";
|
|
35
37
|
import { SurfaceBackground, SurfaceContrast, SurfaceElement, SurfaceElevation, SurfaceIntent, SurfaceRadius } from "./components/Surface/Surface";
|
|
36
38
|
import { TabItem } from "./components/TabGroup/tab-item-utils";
|
|
@@ -45,6 +47,7 @@ import { ToggleGroupBackground, ToggleGroupElevation, ToggleGroupItem, ToggleGro
|
|
|
45
47
|
import { TooltipAlign, TooltipSide } from "./components/Tooltip/Tooltip";
|
|
46
48
|
export { AccordionItemData } from "./components/Accordion/Accordion";
|
|
47
49
|
export { NavChromeStyle } from "./nav/nav-chrome";
|
|
50
|
+
export { ShellGradientPreset } from "./nav/shell-gradient-presets";
|
|
48
51
|
export { BadgeSurface, BadgeVariant } from "./components/Badge/Badge";
|
|
49
52
|
export { BannerContrast, BannerIntent } from "./components/Banner/Banner";
|
|
50
53
|
export { BarNavTab } from "./components/BarNav/bar-nav-types";
|
|
@@ -69,6 +72,7 @@ export { PanelToolsItem, PanelToolsToolId } from "./components/PanelTools/panel-
|
|
|
69
72
|
export { RadioOption } from "./components/RadioGroup/RadioGroup";
|
|
70
73
|
export { ScrollbarVariant } from "./components/Scrollbar/Scrollbar";
|
|
71
74
|
export { SelectOption } from "./components/Select/Select";
|
|
75
|
+
export { ShellGradientPreset as ShellGradientPreset1 } from "./components/ShellGradientSwatch/shell-gradient-swatch-types";
|
|
72
76
|
export { SkeletonVariant } from "./components/Skeleton/Skeleton";
|
|
73
77
|
export { SurfaceBackground, SurfaceContrast, SurfaceElement, SurfaceElevation, SurfaceIntent, SurfaceRadius } from "./components/Surface/Surface";
|
|
74
78
|
export { TabItem } from "./components/TabGroup/tab-item-utils";
|
|
@@ -103,6 +107,11 @@ export namespace Components {
|
|
|
103
107
|
* @default false
|
|
104
108
|
*/
|
|
105
109
|
"gradient": boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Built-in shell wash preset when `gradient` is true. `cool` (blue), `neutral` (grey), `warm` (yellow). `gradientSrc` overrides when set.
|
|
112
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
113
|
+
*/
|
|
114
|
+
"gradientPreset": ShellGradientPreset;
|
|
106
115
|
/**
|
|
107
116
|
* Optional custom gradient for `background-image` (e.g. SVG URL). When set, overrides the built-in radial wash.
|
|
108
117
|
* @default ''
|
|
@@ -119,7 +128,7 @@ export namespace Components {
|
|
|
119
128
|
*/
|
|
120
129
|
"navStyle": NavChromeStyle;
|
|
121
130
|
/**
|
|
122
|
-
* When `true` (default), registers global shell keyboard shortcuts.
|
|
131
|
+
* When `true` (default), registers global shell keyboard shortcuts. `[` toggles panel nav; `]` closes tools; K/A/S/M/N toggle tool drawers. Modifiers are ignored so browser chords like ⌘N stay native.
|
|
123
132
|
* @default true
|
|
124
133
|
*/
|
|
125
134
|
"shortcutsEnabled": boolean;
|
|
@@ -719,7 +728,7 @@ export namespace Components {
|
|
|
719
728
|
}
|
|
720
729
|
interface DsPanelTools {
|
|
721
730
|
/**
|
|
722
|
-
* Toggle any rail tool open/closed — shell shortcuts
|
|
731
|
+
* Toggle any rail tool open/closed — shell shortcuts K/A/S/M/N call this.
|
|
723
732
|
*/
|
|
724
733
|
"activateTool": (id: PanelToolsToolId) => Promise<void>;
|
|
725
734
|
/**
|
|
@@ -802,6 +811,30 @@ export namespace Components {
|
|
|
802
811
|
*/
|
|
803
812
|
"value": string;
|
|
804
813
|
}
|
|
814
|
+
interface DsShellGradientPicker {
|
|
815
|
+
/**
|
|
816
|
+
* Active shell wash preset.
|
|
817
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
818
|
+
*/
|
|
819
|
+
"value": ShellGradientPreset1;
|
|
820
|
+
}
|
|
821
|
+
interface DsShellGradientSwatch {
|
|
822
|
+
"ariaLabel": string | undefined;
|
|
823
|
+
/**
|
|
824
|
+
* @default false
|
|
825
|
+
*/
|
|
826
|
+
"inactive": boolean;
|
|
827
|
+
/**
|
|
828
|
+
* Wash preset this orb previews.
|
|
829
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
830
|
+
*/
|
|
831
|
+
"preset": ShellGradientPreset1;
|
|
832
|
+
/**
|
|
833
|
+
* Selected state — shows an inset brand ring.
|
|
834
|
+
* @default false
|
|
835
|
+
*/
|
|
836
|
+
"selected": boolean;
|
|
837
|
+
}
|
|
805
838
|
interface DsSkeleton {
|
|
806
839
|
/**
|
|
807
840
|
* Height as a CSS value string or number (px).
|
|
@@ -1212,6 +1245,14 @@ export interface DsSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
1212
1245
|
detail: T;
|
|
1213
1246
|
target: HTMLDsSelectElement;
|
|
1214
1247
|
}
|
|
1248
|
+
export interface DsShellGradientPickerCustomEvent<T> extends CustomEvent<T> {
|
|
1249
|
+
detail: T;
|
|
1250
|
+
target: HTMLDsShellGradientPickerElement;
|
|
1251
|
+
}
|
|
1252
|
+
export interface DsShellGradientSwatchCustomEvent<T> extends CustomEvent<T> {
|
|
1253
|
+
detail: T;
|
|
1254
|
+
target: HTMLDsShellGradientSwatchElement;
|
|
1255
|
+
}
|
|
1215
1256
|
export interface DsSliderCustomEvent<T> extends CustomEvent<T> {
|
|
1216
1257
|
detail: T;
|
|
1217
1258
|
target: HTMLDsSliderElement;
|
|
@@ -1480,6 +1521,7 @@ declare global {
|
|
|
1480
1521
|
interface HTMLDsMenuElementEventMap {
|
|
1481
1522
|
"dsClose": void;
|
|
1482
1523
|
"dsSelect": MenuItemData;
|
|
1524
|
+
"dsGradientSelect": ShellGradientPreset;
|
|
1483
1525
|
}
|
|
1484
1526
|
interface HTMLDsMenuElement extends Components.DsMenu, HTMLStencilElement {
|
|
1485
1527
|
addEventListener<K extends keyof HTMLDsMenuElementEventMap>(type: K, listener: (this: HTMLDsMenuElement, ev: DsMenuCustomEvent<HTMLDsMenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1613,6 +1655,40 @@ declare global {
|
|
|
1613
1655
|
prototype: HTMLDsSelectElement;
|
|
1614
1656
|
new (): HTMLDsSelectElement;
|
|
1615
1657
|
};
|
|
1658
|
+
interface HTMLDsShellGradientPickerElementEventMap {
|
|
1659
|
+
"dsChange": ShellGradientPreset1;
|
|
1660
|
+
}
|
|
1661
|
+
interface HTMLDsShellGradientPickerElement extends Components.DsShellGradientPicker, HTMLStencilElement {
|
|
1662
|
+
addEventListener<K extends keyof HTMLDsShellGradientPickerElementEventMap>(type: K, listener: (this: HTMLDsShellGradientPickerElement, ev: DsShellGradientPickerCustomEvent<HTMLDsShellGradientPickerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1663
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1664
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1665
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1666
|
+
removeEventListener<K extends keyof HTMLDsShellGradientPickerElementEventMap>(type: K, listener: (this: HTMLDsShellGradientPickerElement, ev: DsShellGradientPickerCustomEvent<HTMLDsShellGradientPickerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1667
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1668
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1669
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1670
|
+
}
|
|
1671
|
+
var HTMLDsShellGradientPickerElement: {
|
|
1672
|
+
prototype: HTMLDsShellGradientPickerElement;
|
|
1673
|
+
new (): HTMLDsShellGradientPickerElement;
|
|
1674
|
+
};
|
|
1675
|
+
interface HTMLDsShellGradientSwatchElementEventMap {
|
|
1676
|
+
"dsSelect": ShellGradientPreset1;
|
|
1677
|
+
}
|
|
1678
|
+
interface HTMLDsShellGradientSwatchElement extends Components.DsShellGradientSwatch, HTMLStencilElement {
|
|
1679
|
+
addEventListener<K extends keyof HTMLDsShellGradientSwatchElementEventMap>(type: K, listener: (this: HTMLDsShellGradientSwatchElement, ev: DsShellGradientSwatchCustomEvent<HTMLDsShellGradientSwatchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1680
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1681
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1682
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1683
|
+
removeEventListener<K extends keyof HTMLDsShellGradientSwatchElementEventMap>(type: K, listener: (this: HTMLDsShellGradientSwatchElement, ev: DsShellGradientSwatchCustomEvent<HTMLDsShellGradientSwatchElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1684
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1685
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1686
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1687
|
+
}
|
|
1688
|
+
var HTMLDsShellGradientSwatchElement: {
|
|
1689
|
+
prototype: HTMLDsShellGradientSwatchElement;
|
|
1690
|
+
new (): HTMLDsShellGradientSwatchElement;
|
|
1691
|
+
};
|
|
1616
1692
|
interface HTMLDsSkeletonElement extends Components.DsSkeleton, HTMLStencilElement {
|
|
1617
1693
|
}
|
|
1618
1694
|
var HTMLDsSkeletonElement: {
|
|
@@ -1800,6 +1876,8 @@ declare global {
|
|
|
1800
1876
|
"ds-radio-group": HTMLDsRadioGroupElement;
|
|
1801
1877
|
"ds-scrollbar": HTMLDsScrollbarElement;
|
|
1802
1878
|
"ds-select": HTMLDsSelectElement;
|
|
1879
|
+
"ds-shell-gradient-picker": HTMLDsShellGradientPickerElement;
|
|
1880
|
+
"ds-shell-gradient-swatch": HTMLDsShellGradientSwatchElement;
|
|
1803
1881
|
"ds-skeleton": HTMLDsSkeletonElement;
|
|
1804
1882
|
"ds-slider": HTMLDsSliderElement;
|
|
1805
1883
|
"ds-surface": HTMLDsSurfaceElement;
|
|
@@ -1840,6 +1918,11 @@ declare namespace LocalJSX {
|
|
|
1840
1918
|
* @default false
|
|
1841
1919
|
*/
|
|
1842
1920
|
"gradient"?: boolean;
|
|
1921
|
+
/**
|
|
1922
|
+
* Built-in shell wash preset when `gradient` is true. `cool` (blue), `neutral` (grey), `warm` (yellow). `gradientSrc` overrides when set.
|
|
1923
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
1924
|
+
*/
|
|
1925
|
+
"gradientPreset"?: ShellGradientPreset;
|
|
1843
1926
|
/**
|
|
1844
1927
|
* Optional custom gradient for `background-image` (e.g. SVG URL). When set, overrides the built-in radial wash.
|
|
1845
1928
|
* @default ''
|
|
@@ -1856,7 +1939,7 @@ declare namespace LocalJSX {
|
|
|
1856
1939
|
*/
|
|
1857
1940
|
"navStyle"?: NavChromeStyle;
|
|
1858
1941
|
/**
|
|
1859
|
-
* When `true` (default), registers global shell keyboard shortcuts.
|
|
1942
|
+
* When `true` (default), registers global shell keyboard shortcuts. `[` toggles panel nav; `]` closes tools; K/A/S/M/N toggle tool drawers. Modifiers are ignored so browser chords like ⌘N stay native.
|
|
1860
1943
|
* @default true
|
|
1861
1944
|
*/
|
|
1862
1945
|
"shortcutsEnabled"?: boolean;
|
|
@@ -2374,6 +2457,10 @@ declare namespace LocalJSX {
|
|
|
2374
2457
|
"menuWidth"?: string | undefined;
|
|
2375
2458
|
"minWidth"?: string | undefined;
|
|
2376
2459
|
"onDsClose"?: (event: DsMenuCustomEvent<void>) => void;
|
|
2460
|
+
/**
|
|
2461
|
+
* Emitted when a `gradient-picker` section swatch is chosen.
|
|
2462
|
+
*/
|
|
2463
|
+
"onDsGradientSelect"?: (event: DsMenuCustomEvent<ShellGradientPreset>) => void;
|
|
2377
2464
|
"onDsSelect"?: (event: DsMenuCustomEvent<MenuItemData>) => void;
|
|
2378
2465
|
/**
|
|
2379
2466
|
* @default false
|
|
@@ -2597,6 +2684,32 @@ declare namespace LocalJSX {
|
|
|
2597
2684
|
*/
|
|
2598
2685
|
"value"?: string;
|
|
2599
2686
|
}
|
|
2687
|
+
interface DsShellGradientPicker {
|
|
2688
|
+
"onDsChange"?: (event: DsShellGradientPickerCustomEvent<ShellGradientPreset1>) => void;
|
|
2689
|
+
/**
|
|
2690
|
+
* Active shell wash preset.
|
|
2691
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
2692
|
+
*/
|
|
2693
|
+
"value"?: ShellGradientPreset1;
|
|
2694
|
+
}
|
|
2695
|
+
interface DsShellGradientSwatch {
|
|
2696
|
+
"ariaLabel"?: string | undefined;
|
|
2697
|
+
/**
|
|
2698
|
+
* @default false
|
|
2699
|
+
*/
|
|
2700
|
+
"inactive"?: boolean;
|
|
2701
|
+
"onDsSelect"?: (event: DsShellGradientSwatchCustomEvent<ShellGradientPreset1>) => void;
|
|
2702
|
+
/**
|
|
2703
|
+
* Wash preset this orb previews.
|
|
2704
|
+
* @default DEFAULT_SHELL_GRADIENT_PRESET
|
|
2705
|
+
*/
|
|
2706
|
+
"preset"?: ShellGradientPreset1;
|
|
2707
|
+
/**
|
|
2708
|
+
* Selected state — shows an inset brand ring.
|
|
2709
|
+
* @default false
|
|
2710
|
+
*/
|
|
2711
|
+
"selected"?: boolean;
|
|
2712
|
+
}
|
|
2600
2713
|
interface DsSkeleton {
|
|
2601
2714
|
/**
|
|
2602
2715
|
* Height as a CSS value string or number (px).
|
|
@@ -2964,6 +3077,7 @@ declare namespace LocalJSX {
|
|
|
2964
3077
|
"gradient": boolean;
|
|
2965
3078
|
"grid": boolean;
|
|
2966
3079
|
"gradientSrc": string;
|
|
3080
|
+
"gradientPreset": ShellGradientPreset;
|
|
2967
3081
|
"shortcutsEnabled": boolean;
|
|
2968
3082
|
}
|
|
2969
3083
|
interface DsBadgeAttributes {
|
|
@@ -3171,6 +3285,15 @@ declare namespace LocalJSX {
|
|
|
3171
3285
|
"ariaLabel": string | undefined;
|
|
3172
3286
|
"ariaLabelledby": string | undefined;
|
|
3173
3287
|
}
|
|
3288
|
+
interface DsShellGradientPickerAttributes {
|
|
3289
|
+
"value": ShellGradientPreset;
|
|
3290
|
+
}
|
|
3291
|
+
interface DsShellGradientSwatchAttributes {
|
|
3292
|
+
"preset": ShellGradientPreset;
|
|
3293
|
+
"selected": boolean;
|
|
3294
|
+
"inactive": boolean;
|
|
3295
|
+
"ariaLabel": string | undefined;
|
|
3296
|
+
}
|
|
3174
3297
|
interface DsSkeletonAttributes {
|
|
3175
3298
|
"variant": SkeletonVariant;
|
|
3176
3299
|
"width": string;
|
|
@@ -3309,6 +3432,8 @@ declare namespace LocalJSX {
|
|
|
3309
3432
|
"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] };
|
|
3310
3433
|
"ds-scrollbar": Omit<DsScrollbar, keyof DsScrollbarAttributes> & { [K in keyof DsScrollbar & keyof DsScrollbarAttributes]?: DsScrollbar[K] } & { [K in keyof DsScrollbar & keyof DsScrollbarAttributes as `attr:${K}`]?: DsScrollbarAttributes[K] } & { [K in keyof DsScrollbar & keyof DsScrollbarAttributes as `prop:${K}`]?: DsScrollbar[K] };
|
|
3311
3434
|
"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] };
|
|
3435
|
+
"ds-shell-gradient-picker": Omit<DsShellGradientPicker, keyof DsShellGradientPickerAttributes> & { [K in keyof DsShellGradientPicker & keyof DsShellGradientPickerAttributes]?: DsShellGradientPicker[K] } & { [K in keyof DsShellGradientPicker & keyof DsShellGradientPickerAttributes as `attr:${K}`]?: DsShellGradientPickerAttributes[K] } & { [K in keyof DsShellGradientPicker & keyof DsShellGradientPickerAttributes as `prop:${K}`]?: DsShellGradientPicker[K] };
|
|
3436
|
+
"ds-shell-gradient-swatch": Omit<DsShellGradientSwatch, keyof DsShellGradientSwatchAttributes> & { [K in keyof DsShellGradientSwatch & keyof DsShellGradientSwatchAttributes]?: DsShellGradientSwatch[K] } & { [K in keyof DsShellGradientSwatch & keyof DsShellGradientSwatchAttributes as `attr:${K}`]?: DsShellGradientSwatchAttributes[K] } & { [K in keyof DsShellGradientSwatch & keyof DsShellGradientSwatchAttributes as `prop:${K}`]?: DsShellGradientSwatch[K] };
|
|
3312
3437
|
"ds-skeleton": Omit<DsSkeleton, keyof DsSkeletonAttributes> & { [K in keyof DsSkeleton & keyof DsSkeletonAttributes]?: DsSkeleton[K] } & { [K in keyof DsSkeleton & keyof DsSkeletonAttributes as `attr:${K}`]?: DsSkeletonAttributes[K] } & { [K in keyof DsSkeleton & keyof DsSkeletonAttributes as `prop:${K}`]?: DsSkeleton[K] };
|
|
3313
3438
|
"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"]>;
|
|
3314
3439
|
"ds-surface": Omit<DsSurface, keyof DsSurfaceAttributes> & { [K in keyof DsSurface & keyof DsSurfaceAttributes]?: DsSurface[K] } & { [K in keyof DsSurface & keyof DsSurfaceAttributes as `attr:${K}`]?: DsSurfaceAttributes[K] } & { [K in keyof DsSurface & keyof DsSurfaceAttributes as `prop:${K}`]?: DsSurface[K] };
|
|
@@ -3356,6 +3481,8 @@ declare module "@stencil/core" {
|
|
|
3356
3481
|
"ds-radio-group": LocalJSX.IntrinsicElements["ds-radio-group"] & JSXBase.HTMLAttributes<HTMLDsRadioGroupElement>;
|
|
3357
3482
|
"ds-scrollbar": LocalJSX.IntrinsicElements["ds-scrollbar"] & JSXBase.HTMLAttributes<HTMLDsScrollbarElement>;
|
|
3358
3483
|
"ds-select": LocalJSX.IntrinsicElements["ds-select"] & JSXBase.HTMLAttributes<HTMLDsSelectElement>;
|
|
3484
|
+
"ds-shell-gradient-picker": LocalJSX.IntrinsicElements["ds-shell-gradient-picker"] & JSXBase.HTMLAttributes<HTMLDsShellGradientPickerElement>;
|
|
3485
|
+
"ds-shell-gradient-swatch": LocalJSX.IntrinsicElements["ds-shell-gradient-swatch"] & JSXBase.HTMLAttributes<HTMLDsShellGradientSwatchElement>;
|
|
3359
3486
|
"ds-skeleton": LocalJSX.IntrinsicElements["ds-skeleton"] & JSXBase.HTMLAttributes<HTMLDsSkeletonElement>;
|
|
3360
3487
|
"ds-slider": LocalJSX.IntrinsicElements["ds-slider"] & JSXBase.HTMLAttributes<HTMLDsSliderElement>;
|
|
3361
3488
|
"ds-surface": LocalJSX.IntrinsicElements["ds-surface"] & JSXBase.HTMLAttributes<HTMLDsSurfaceElement>;
|
|
@@ -4,6 +4,8 @@ export { SHELL_BAR_NAV_VT_NAME, SHELL_NAV_REVEAL_DURATION_VAR, SHELL_NAV_REVEAL_
|
|
|
4
4
|
export type { ShellNavRevealOrigin } from './shell-view-transition';
|
|
5
5
|
export { SHELL_GRADIENT_IMAGE_VAR, SHELL_GRADIENT_SIZE_VAR, SHELL_GRADIENT_POSITION_PANEL_VAR, SHELL_GRADIENT_POSITION_BAR_VAR, SHELL_GRADIENT_OPACITY_VAR, SHELL_CHROME_SURFACE_POSITION_VAR, SHELL_GRADIENT_OPACITY, buildShellRadialGradient, shellGradientImage, shellGradientSize, shellGradientPositionPanel, shellGradientPositionBar, shellChromeSurfacePosition, shellChromeLayerActive, readShellViewportDimensions, } from './shell-gradient';
|
|
6
6
|
export type { ShellGradientLayout, ShellViewportDimensions } from './shell-gradient';
|
|
7
|
+
export type { ShellGradientPreset } from './shell-gradient-presets';
|
|
8
|
+
export { DEFAULT_SHELL_GRADIENT_PRESET, SHELL_GRADIENT_PRESETS, SHELL_GRADIENT_PRESET_LABELS, buildShellRadialGradientForPreset, isShellGradientPreset, shellGradientPresetStopToken, } from './shell-gradient-presets';
|
|
7
9
|
export type { ChromeTransitionDetail, ChromeTransitionSource } from './chrome-transition';
|
|
8
10
|
export { CHROME_TRANSITION_END, CHROME_TRANSITION_START, ChromeTransitionDepth, createRafCoalescer, readChromeTransitionSource, readChromeTransitionPhase, } from './chrome-transition';
|
|
9
11
|
export { barGradientPositionFromPanelWidth, isPanelNavCollapsed, panelWidthPxFromTokens, readCssVarWidthPx, readPanelNavWidthTokens, } from './shell-chrome-metrics';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Built-in shell chrome wash presets — cool (blue), neutral (grey), warm (yellow). */
|
|
2
|
+
export type ShellGradientPreset = 'cool' | 'neutral' | 'warm';
|
|
3
|
+
export declare const SHELL_GRADIENT_PRESETS: ShellGradientPreset[];
|
|
4
|
+
/** Default wash when `gradient-preset` is omitted. */
|
|
5
|
+
export declare const DEFAULT_SHELL_GRADIENT_PRESET: ShellGradientPreset;
|
|
6
|
+
export declare const SHELL_GRADIENT_PRESET_LABELS: Record<ShellGradientPreset, string>;
|
|
7
|
+
export declare function shellGradientPresetStopToken(preset: ShellGradientPreset): string;
|
|
8
|
+
export declare function isShellGradientPreset(value: string): value is ShellGradientPreset;
|
|
9
|
+
/** Radial wash for a preset — transparent at top-left into the intent stop. */
|
|
10
|
+
export declare function buildShellRadialGradientForPreset(preset: ShellGradientPreset): string;
|
|
11
|
+
//# sourceMappingURL=shell-gradient-presets.d.ts.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/** CSS var names consumed by `ds-panel-nav` / `ds-bar-nav` inside `ds-app-shell`. */
|
|
2
|
+
import type { ShellGradientPreset } from './shell-gradient-presets';
|
|
3
|
+
export type { ShellGradientPreset } from './shell-gradient-presets';
|
|
4
|
+
export { DEFAULT_SHELL_GRADIENT_PRESET, SHELL_GRADIENT_PRESETS, SHELL_GRADIENT_PRESET_LABELS, buildShellRadialGradientForPreset, isShellGradientPreset, shellGradientPresetStopToken, } from './shell-gradient-presets';
|
|
2
5
|
export declare const SHELL_GRADIENT_IMAGE_VAR = "--ds-shell-gradient-image";
|
|
3
6
|
export declare const SHELL_GRADIENT_SIZE_VAR = "--ds-shell-gradient-size";
|
|
4
7
|
export declare const SHELL_GRADIENT_POSITION_PANEL_VAR = "--ds-shell-gradient-position-panel";
|
|
@@ -12,11 +15,11 @@ export declare const SHELL_GRADIENT_OPACITY = "0.1";
|
|
|
12
15
|
export declare function shellChromeLayerActive(gradient: boolean, grid: boolean): boolean;
|
|
13
16
|
/**
|
|
14
17
|
* Shell radial wash — same for panel and bar nav.
|
|
15
|
-
* Tokens follow `data-theme` (light/dark
|
|
18
|
+
* Tokens follow `data-theme` (light/dark intent stops).
|
|
16
19
|
*/
|
|
17
|
-
export declare function buildShellRadialGradient(): string;
|
|
18
|
-
/** Built-in radial image (
|
|
19
|
-
export declare function shellGradientImage(): string;
|
|
20
|
+
export declare function buildShellRadialGradient(preset?: ShellGradientPreset): string;
|
|
21
|
+
/** Built-in radial image (`gradientSrc` on shell overrides). */
|
|
22
|
+
export declare function shellGradientImage(preset?: ShellGradientPreset): string;
|
|
20
23
|
export interface ShellViewportDimensions {
|
|
21
24
|
width: number;
|
|
22
25
|
height: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PanelToolsToolId } from '../components/PanelTools/panel-tools-types';
|
|
2
2
|
export type ShellShortcutAction = 'toggle-panel-nav' | 'close-panel-tools' | `open-tool:${PanelToolsToolId}`;
|
|
3
|
-
/** Tool shortcut
|
|
4
|
-
/** True when
|
|
5
|
-
export declare function
|
|
3
|
+
/** Tool shortcut keys (K/A/S/M/N) toggle open/closed via `ds-panel-tools.activateTool`. */
|
|
4
|
+
/** True when no modifier keys are held — avoids browser/app chords like ⌘N. */
|
|
5
|
+
export declare function isBareShellShortcutKey(e: Pick<KeyboardEvent, 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>): boolean;
|
|
6
6
|
/** Skip shell shortcuts while typing in an editable control. */
|
|
7
7
|
export declare function isEditableShortcutTarget(target: EventTarget | null): boolean;
|
|
8
|
-
/** Resolve a shell chrome shortcut, or `null` when the
|
|
8
|
+
/** Resolve a shell chrome shortcut, or `null` when the key is not handled. */
|
|
9
9
|
export declare function resolveShellShortcut(e: Pick<KeyboardEvent, 'key' | 'code' | 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'>): ShellShortcutAction | null;
|
|
10
10
|
//# sourceMappingURL=shell-shortcuts.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ds-mo/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "CompoMo — composable web components styled with TokoMo design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"pretest": "node scripts/generate-icon-catalog.mjs",
|
|
70
70
|
"build": "stencil build && node scripts/patch-index-types.mjs && node scripts/verify-icons-externalized.mjs && node scripts/write-build-stamp.mjs",
|
|
71
71
|
"verify:pack": "node scripts/verify-npm-pack.mjs && node scripts/verify-nav-import.mjs",
|
|
72
|
-
"test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/shell-shortcuts.test.ts tests/shell-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/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts",
|
|
72
|
+
"test": "node --import tsx/esm --test tests/panel-nav-utils.test.ts tests/panel-tools.test.ts tests/shell-shortcuts.test.ts tests/shell-gradient-presets.test.ts tests/shell-view-transition.test.ts tests/shell-gradient.test.ts tests/shell-chrome-metrics.test.ts tests/shell-chrome-layer.test.ts tests/chrome-transition.test.ts tests/bar-nav-overflow-hysteresis.test.ts tests/badge-gradient-ring.test.ts tests/scroll-edge-fade.test.ts tests/resolve-css-length-px.test.ts tests/resolve-css-time-ms.test.ts tests/overlay-positioning.test.ts tests/menu-position.test.ts tests/bar-nav-utils.test.ts tests/bar-nav-tabs-menu-utils.test.ts tests/bar-nav-dom-utils.test.ts tests/icon-catalog.test.ts",
|
|
73
73
|
"test:e2e": "npm run build && playwright test",
|
|
74
74
|
"test:e2e:install": "playwright install chromium",
|
|
75
75
|
"build:docs": "stencil build --docs",
|
package/src/angular/index.ts
CHANGED
package/src/angular/proxies.ts
CHANGED
|
@@ -36,14 +36,14 @@ export declare interface DsAccordion extends Components.DsAccordion {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
@ProxyCmp({
|
|
39
|
-
inputs: ['gradient', 'gradientSrc', 'grid', 'navStyle', 'shortcutsEnabled']
|
|
39
|
+
inputs: ['gradient', 'gradientPreset', 'gradientSrc', 'grid', 'navStyle', 'shortcutsEnabled']
|
|
40
40
|
})
|
|
41
41
|
@Component({
|
|
42
42
|
selector: 'ds-app-shell',
|
|
43
43
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
44
44
|
template: '<ng-content></ng-content>',
|
|
45
45
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
46
|
-
inputs: ['gradient', 'gradientSrc', 'grid', 'navStyle', 'shortcutsEnabled'],
|
|
46
|
+
inputs: ['gradient', 'gradientPreset', 'gradientSrc', 'grid', 'navStyle', 'shortcutsEnabled'],
|
|
47
47
|
standalone: false
|
|
48
48
|
})
|
|
49
49
|
export class DsAppShell {
|
|
@@ -558,13 +558,14 @@ export declare interface DsLoader extends Components.DsLoader {}
|
|
|
558
558
|
template: '<ng-content></ng-content>',
|
|
559
559
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
560
560
|
inputs: ['align', 'alignOffset', 'anchor', 'anchorId', 'initialFocusVisible', 'items', 'menuWidth', 'minWidth', 'open', 'sections', 'side', 'sideOffset'],
|
|
561
|
-
outputs: ['dsClose', 'dsSelect'],
|
|
561
|
+
outputs: ['dsClose', 'dsSelect', 'dsGradientSelect'],
|
|
562
562
|
standalone: false
|
|
563
563
|
})
|
|
564
564
|
export class DsMenu {
|
|
565
565
|
protected el: HTMLDsMenuElement;
|
|
566
566
|
@Output() dsClose = new EventEmitter<CustomEvent<void>>();
|
|
567
567
|
@Output() dsSelect = new EventEmitter<CustomEvent<IDsMenuMenuItemData>>();
|
|
568
|
+
@Output() dsGradientSelect = new EventEmitter<CustomEvent<IDsMenuShellGradientPreset>>();
|
|
568
569
|
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
569
570
|
c.detach();
|
|
570
571
|
this.el = r.nativeElement;
|
|
@@ -573,12 +574,17 @@ export class DsMenu {
|
|
|
573
574
|
|
|
574
575
|
|
|
575
576
|
import type { MenuItemData as IDsMenuMenuItemData } from '@ds-mo/ui';
|
|
577
|
+
import type { ShellGradientPreset as IDsMenuShellGradientPreset } from '@ds-mo/ui';
|
|
576
578
|
|
|
577
579
|
export declare interface DsMenu extends Components.DsMenu {
|
|
578
580
|
|
|
579
581
|
dsClose: EventEmitter<CustomEvent<void>>;
|
|
580
582
|
|
|
581
583
|
dsSelect: EventEmitter<CustomEvent<IDsMenuMenuItemData>>;
|
|
584
|
+
/**
|
|
585
|
+
* Emitted when a `gradient-picker` section swatch is chosen.
|
|
586
|
+
*/
|
|
587
|
+
dsGradientSelect: EventEmitter<CustomEvent<IDsMenuShellGradientPreset>>;
|
|
582
588
|
}
|
|
583
589
|
|
|
584
590
|
|
|
@@ -818,6 +824,66 @@ export declare interface DsSelect extends Components.DsSelect {
|
|
|
818
824
|
}
|
|
819
825
|
|
|
820
826
|
|
|
827
|
+
@ProxyCmp({
|
|
828
|
+
inputs: ['value']
|
|
829
|
+
})
|
|
830
|
+
@Component({
|
|
831
|
+
selector: 'ds-shell-gradient-picker',
|
|
832
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
833
|
+
template: '<ng-content></ng-content>',
|
|
834
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
835
|
+
inputs: ['value'],
|
|
836
|
+
outputs: ['dsChange'],
|
|
837
|
+
standalone: false
|
|
838
|
+
})
|
|
839
|
+
export class DsShellGradientPicker {
|
|
840
|
+
protected el: HTMLDsShellGradientPickerElement;
|
|
841
|
+
@Output() dsChange = new EventEmitter<CustomEvent<IDsShellGradientPickerShellGradientPreset>>();
|
|
842
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
843
|
+
c.detach();
|
|
844
|
+
this.el = r.nativeElement;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
import type { ShellGradientPreset as IDsShellGradientPickerShellGradientPreset } from '@ds-mo/ui';
|
|
850
|
+
|
|
851
|
+
export declare interface DsShellGradientPicker extends Components.DsShellGradientPicker {
|
|
852
|
+
|
|
853
|
+
dsChange: EventEmitter<CustomEvent<IDsShellGradientPickerShellGradientPreset>>;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
@ProxyCmp({
|
|
858
|
+
inputs: ['ariaLabel', 'inactive', 'preset', 'selected']
|
|
859
|
+
})
|
|
860
|
+
@Component({
|
|
861
|
+
selector: 'ds-shell-gradient-swatch',
|
|
862
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
863
|
+
template: '<ng-content></ng-content>',
|
|
864
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
865
|
+
inputs: ['ariaLabel', 'inactive', 'preset', 'selected'],
|
|
866
|
+
outputs: ['dsSelect'],
|
|
867
|
+
standalone: false
|
|
868
|
+
})
|
|
869
|
+
export class DsShellGradientSwatch {
|
|
870
|
+
protected el: HTMLDsShellGradientSwatchElement;
|
|
871
|
+
@Output() dsSelect = new EventEmitter<CustomEvent<IDsShellGradientSwatchShellGradientPreset>>();
|
|
872
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
873
|
+
c.detach();
|
|
874
|
+
this.el = r.nativeElement;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
import type { ShellGradientPreset as IDsShellGradientSwatchShellGradientPreset } from '@ds-mo/ui';
|
|
880
|
+
|
|
881
|
+
export declare interface DsShellGradientSwatch extends Components.DsShellGradientSwatch {
|
|
882
|
+
|
|
883
|
+
dsSelect: EventEmitter<CustomEvent<IDsShellGradientSwatchShellGradientPreset>>;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
|
|
821
887
|
@ProxyCmp({
|
|
822
888
|
inputs: ['height', 'lines', 'shimmer', 'variant', 'width']
|
|
823
889
|
})
|
package/src/react/components.ts
CHANGED
|
@@ -32,6 +32,8 @@ export { DsPanelTools } from "./ds-panel-tools.js";
|
|
|
32
32
|
export { DsRadioGroup } from "./ds-radio-group.js";
|
|
33
33
|
export { DsScrollbar } from "./ds-scrollbar.js";
|
|
34
34
|
export { DsSelect } from "./ds-select.js";
|
|
35
|
+
export { DsShellGradientPicker } from "./ds-shell-gradient-picker.js";
|
|
36
|
+
export { DsShellGradientSwatch } from "./ds-shell-gradient-swatch.js";
|
|
35
37
|
export { DsSkeleton } from "./ds-skeleton.js";
|
|
36
38
|
export { DsSlider } from "./ds-slider.js";
|
|
37
39
|
export { DsSurface } from "./ds-surface.js";
|
package/src/react/ds-menu.ts
CHANGED
|
@@ -11,13 +11,14 @@ import type { EventName, StencilReactComponent } from '@stencil/react-output-tar
|
|
|
11
11
|
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
|
-
import { type DsMenuCustomEvent, type MenuItemData } from "@ds-mo/ui";
|
|
14
|
+
import { type DsMenuCustomEvent, type MenuItemData, type ShellGradientPreset } from "@ds-mo/ui";
|
|
15
15
|
import type { Components } from "@ds-mo/ui/dist/components";
|
|
16
16
|
import { DsMenu as DsMenuElement, defineCustomElement as defineDsMenu } from "@ds-mo/ui/dist/components/ds-menu.js";
|
|
17
17
|
|
|
18
18
|
export type DsMenuEvents = {
|
|
19
19
|
onDsClose: EventName<DsMenuCustomEvent<void>>,
|
|
20
|
-
onDsSelect: EventName<DsMenuCustomEvent<MenuItemData
|
|
20
|
+
onDsSelect: EventName<DsMenuCustomEvent<MenuItemData>>,
|
|
21
|
+
onDsGradientSelect: EventName<DsMenuCustomEvent<ShellGradientPreset>>
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export const DsMenu: StencilReactComponent<DsMenuElement, DsMenuEvents, Components.DsMenu> = /*@__PURE__*/ createComponent<DsMenuElement, DsMenuEvents, Components.DsMenu>({
|
|
@@ -27,7 +28,8 @@ export const DsMenu: StencilReactComponent<DsMenuElement, DsMenuEvents, Componen
|
|
|
27
28
|
react: React,
|
|
28
29
|
events: {
|
|
29
30
|
onDsClose: 'dsClose',
|
|
30
|
-
onDsSelect: 'dsSelect'
|
|
31
|
+
onDsSelect: 'dsSelect',
|
|
32
|
+
onDsGradientSelect: 'dsGradientSelect'
|
|
31
33
|
} as DsMenuEvents,
|
|
32
34
|
defineCustomElement: defineDsMenu
|
|
33
35
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
5
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
|
|
10
|
+
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
11
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
12
|
+
import React from 'react';
|
|
13
|
+
|
|
14
|
+
import { type DsShellGradientPickerCustomEvent, type ShellGradientPreset } from "@ds-mo/ui";
|
|
15
|
+
import type { Components } from "@ds-mo/ui/dist/components";
|
|
16
|
+
import { DsShellGradientPicker as DsShellGradientPickerElement, defineCustomElement as defineDsShellGradientPicker } from "@ds-mo/ui/dist/components/ds-shell-gradient-picker.js";
|
|
17
|
+
|
|
18
|
+
export type DsShellGradientPickerEvents = { onDsChange: EventName<DsShellGradientPickerCustomEvent<ShellGradientPreset>> };
|
|
19
|
+
|
|
20
|
+
export const DsShellGradientPicker: StencilReactComponent<DsShellGradientPickerElement, DsShellGradientPickerEvents, Components.DsShellGradientPicker> = /*@__PURE__*/ createComponent<DsShellGradientPickerElement, DsShellGradientPickerEvents, Components.DsShellGradientPicker>({
|
|
21
|
+
tagName: 'ds-shell-gradient-picker',
|
|
22
|
+
elementClass: DsShellGradientPickerElement,
|
|
23
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
24
|
+
react: React,
|
|
25
|
+
events: { onDsChange: 'dsChange' } as DsShellGradientPickerEvents,
|
|
26
|
+
defineCustomElement: defineDsShellGradientPicker
|
|
27
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
5
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
|
|
10
|
+
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
11
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
12
|
+
import React from 'react';
|
|
13
|
+
|
|
14
|
+
import { type DsShellGradientSwatchCustomEvent, type ShellGradientPreset } from "@ds-mo/ui";
|
|
15
|
+
import type { Components } from "@ds-mo/ui/dist/components";
|
|
16
|
+
import { DsShellGradientSwatch as DsShellGradientSwatchElement, defineCustomElement as defineDsShellGradientSwatch } from "@ds-mo/ui/dist/components/ds-shell-gradient-swatch.js";
|
|
17
|
+
|
|
18
|
+
export type DsShellGradientSwatchEvents = { onDsSelect: EventName<DsShellGradientSwatchCustomEvent<ShellGradientPreset>> };
|
|
19
|
+
|
|
20
|
+
export const DsShellGradientSwatch: StencilReactComponent<DsShellGradientSwatchElement, DsShellGradientSwatchEvents, Components.DsShellGradientSwatch> = /*@__PURE__*/ createComponent<DsShellGradientSwatchElement, DsShellGradientSwatchEvents, Components.DsShellGradientSwatch>({
|
|
21
|
+
tagName: 'ds-shell-gradient-swatch',
|
|
22
|
+
elementClass: DsShellGradientSwatchElement,
|
|
23
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
24
|
+
react: React,
|
|
25
|
+
events: { onDsSelect: 'dsSelect' } as DsShellGradientSwatchEvents,
|
|
26
|
+
defineCustomElement: defineDsShellGradientSwatch
|
|
27
|
+
});
|
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
resolveShellShortcut,
|
|
6
6
|
} from '../../nav/shell-shortcuts';
|
|
7
7
|
import type { PanelToolsToolId } from '../PanelTools/panel-tools-types';
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_SHELL_GRADIENT_PRESET,
|
|
10
|
+
type ShellGradientPreset,
|
|
11
|
+
} from '../../nav/shell-gradient-presets';
|
|
8
12
|
import {
|
|
9
13
|
CHROME_TRANSITION_END,
|
|
10
14
|
CHROME_TRANSITION_START,
|
|
@@ -53,7 +57,14 @@ export class AppShell {
|
|
|
53
57
|
*/
|
|
54
58
|
@Prop() gradientSrc: string = '';
|
|
55
59
|
|
|
56
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Built-in shell wash preset when `gradient` is true.
|
|
62
|
+
* `cool` (blue), `neutral` (grey), `warm` (yellow). `gradientSrc` overrides when set.
|
|
63
|
+
*/
|
|
64
|
+
@Prop({ attribute: 'gradient-preset', reflect: true }) gradientPreset: ShellGradientPreset =
|
|
65
|
+
DEFAULT_SHELL_GRADIENT_PRESET;
|
|
66
|
+
|
|
67
|
+
/** When `true` (default), registers global shell keyboard shortcuts. `[` toggles panel nav; `]` closes tools; K/A/S/M/N toggle tool drawers. Modifiers are ignored so browser chords like ⌘N stay native. */
|
|
57
68
|
@Prop({ attribute: 'shortcuts-enabled' }) shortcutsEnabled: boolean = true;
|
|
58
69
|
|
|
59
70
|
@Element() el!: HTMLElement;
|
|
@@ -98,6 +109,7 @@ export class AppShell {
|
|
|
98
109
|
@Watch('gradient')
|
|
99
110
|
@Watch('grid')
|
|
100
111
|
@Watch('gradientSrc')
|
|
112
|
+
@Watch('gradientPreset')
|
|
101
113
|
onShellPropsChange() {
|
|
102
114
|
this.syncSlottedNavStyle();
|
|
103
115
|
this.scheduleChromeSync();
|
|
@@ -311,7 +323,7 @@ export class AppShell {
|
|
|
311
323
|
|
|
312
324
|
const image = this.gradientSrc.trim()
|
|
313
325
|
? `url(${this.gradientSrc.trim()})`
|
|
314
|
-
: buildShellRadialGradient();
|
|
326
|
+
: buildShellRadialGradient(this.gradientPreset);
|
|
315
327
|
|
|
316
328
|
const size = shellGradientSize({
|
|
317
329
|
width: viewport.width,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MenuSection } from '../Menu/menu-types';
|
|
1
|
+
import type { MenuItemData, MenuSection } from '../Menu/menu-types';
|
|
2
2
|
import {
|
|
3
3
|
getSelectableTabs,
|
|
4
4
|
isTabDivider,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
/** Map BarNav tabs to menu sections, preserving `{ type: 'divider' }` as section breaks. */
|
|
10
10
|
export function tabsToMenuSections(tabs: TabItem[], selectedId: string): MenuSection[] {
|
|
11
11
|
const sections: MenuSection[] = [];
|
|
12
|
-
let batch:
|
|
12
|
+
let batch: MenuItemData[] = [];
|
|
13
13
|
|
|
14
14
|
for (const item of tabs) {
|
|
15
15
|
if (isTabDivider(item)) {
|