@ds-mo/ui 2.7.0 → 2.9.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 +8 -9
- package/dist/.build-stamp +1 -1
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/{ds-toggle-button.d.ts → ds-button-filled.d.ts} +4 -4
- package/dist/components/ds-button-filled.js +2 -0
- package/dist/components/ds-button-unfilled-icon.js +1 -1
- package/dist/components/{ds-button-group.d.ts → ds-card-setting.d.ts} +4 -4
- package/dist/components/ds-card-setting.js +2 -0
- package/dist/components/ds-card-setting.js.map +1 -0
- package/dist/components/ds-card.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-empty-state.js.map +1 -1
- package/dist/components/ds-fade.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-field.js.map +1 -1
- package/dist/components/ds-header.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-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio-group.js +1 -1
- package/dist/components/ds-scrollbar.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-surface.js +1 -1
- package/dist/components/ds-tab-group-nav.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toast-provider.js +1 -1
- package/dist/components/ds-toggle.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-tooltip.js.map +1 -1
- package/dist/components/{p-D4zKc1RW.js → p-BA6a6P0b.js} +2 -2
- package/dist/components/p-CDNVPM2x.js +2 -0
- package/dist/components/p-CDNVPM2x.js.map +1 -0
- package/dist/components/{p-DqBCQRRd.js → p-CF4avTQw.js} +2 -2
- package/dist/components/{p-C9za7IDu.js → p-CJubWt1F.js} +2 -2
- package/dist/components/p-CKCBqwIw.js +2 -0
- package/dist/components/p-CKCBqwIw.js.map +1 -0
- package/dist/components/p-C_hgdYcC.js +2 -0
- package/dist/components/p-C_hgdYcC.js.map +1 -0
- package/dist/components/p-Cv5NDZug.js +2 -0
- package/dist/components/p-Cv5NDZug.js.map +1 -0
- package/dist/components/p-DnGr8qtq.js +2 -0
- package/dist/components/p-DnGr8qtq.js.map +1 -0
- package/dist/components/p-jjfqrXnP.js +2 -0
- package/dist/components/p-jjfqrXnP.js.map +1 -0
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +26 -0
- package/dist/types/components/ButtonFilled/index.d.ts +2 -0
- package/dist/types/components/ButtonUnfilledIcon/ButtonUnfilledIcon.d.ts +9 -2
- package/dist/types/components/ButtonUnfilledIcon/index.d.ts +1 -1
- package/dist/types/components/CardSetting/CardSetting.d.ts +16 -0
- package/dist/types/components/CardSetting/index.d.ts +2 -0
- package/dist/types/components/Menu/menu-placement.d.ts +5 -3
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -1
- package/dist/types/components.d.ts +129 -414
- package/dist/types/utils/token-defaults.d.ts +1 -0
- package/package.json +1 -1
- package/src/angular/index.ts +2 -4
- package/src/angular/proxies.ts +40 -105
- package/src/react/components.ts +2 -4
- package/src/react/ds-button-filled.ts +27 -0
- package/src/react/ds-card-setting.ts +27 -0
- package/src/wc/components/ButtonFilled/ButtonFilled.tsx +86 -0
- package/src/wc/components/ButtonFilled/index.ts +1 -0
- package/src/wc/components/ButtonUnfilledIcon/ButtonUnfilledIcon.tsx +19 -11
- package/src/wc/components/ButtonUnfilledIcon/index.ts +1 -1
- package/src/wc/components/CardSetting/CardSetting.tsx +96 -0
- package/src/wc/components/CardSetting/index.ts +1 -0
- package/src/wc/components/Menu/Menu.tsx +1 -2
- package/src/wc/components/Menu/menu-placement.ts +5 -3
- package/src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx +8 -2
- package/src/wc/components.d.ts +129 -414
- package/src/wc/utils/token-defaults.ts +2 -0
- package/dist/components/ds-button-group.js +0 -2
- package/dist/components/ds-button-group.js.map +0 -1
- package/dist/components/ds-button.d.ts +0 -11
- package/dist/components/ds-button.js +0 -2
- package/dist/components/ds-toggle-button-group.d.ts +0 -11
- package/dist/components/ds-toggle-button-group.js +0 -2
- package/dist/components/ds-toggle-button-group.js.map +0 -1
- package/dist/components/ds-toggle-button.js +0 -2
- package/dist/components/ds-toggle-button.js.map +0 -1
- package/dist/components/p-B4qYuM6y.js +0 -2
- package/dist/components/p-B4qYuM6y.js.map +0 -1
- package/dist/components/p-BHIptqCl.js +0 -2
- package/dist/components/p-BHIptqCl.js.map +0 -1
- package/dist/components/p-BTndnbR_.js +0 -2
- package/dist/components/p-BTndnbR_.js.map +0 -1
- package/dist/components/p-C4hnBQXI.js +0 -2
- package/dist/components/p-C4hnBQXI.js.map +0 -1
- package/dist/components/p-R7uKgEQg.js +0 -2
- package/dist/components/p-R7uKgEQg.js.map +0 -1
- package/dist/components/p-Sv1zgw__.js +0 -2
- package/dist/components/p-Sv1zgw__.js.map +0 -1
- package/dist/components/p-UngdVrfj.js +0 -2
- package/dist/components/p-UngdVrfj.js.map +0 -1
- package/dist/components/p-ska5qgNk.js +0 -2
- package/dist/components/p-ska5qgNk.js.map +0 -1
- package/dist/types/components/Button/Button.d.ts +0 -38
- package/dist/types/components/Button/index.d.ts +0 -2
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +0 -29
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +0 -37
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -33
- package/src/react/ds-button-group.ts +0 -27
- package/src/react/ds-button.ts +0 -35
- package/src/react/ds-toggle-button-group.ts +0 -27
- package/src/react/ds-toggle-button.ts +0 -27
- package/src/wc/components/Button/Button.tsx +0 -158
- package/src/wc/components/Button/index.ts +0 -1
- package/src/wc/components/ButtonGroup/ButtonGroup.tsx +0 -110
- package/src/wc/components/ToggleButton/ToggleButton.tsx +0 -124
- package/src/wc/components/ToggleButtonGroup/ToggleButtonGroup.tsx +0 -118
- /package/dist/components/{ds-button.js.map → ds-button-filled.js.map} +0 -0
- /package/dist/components/{p-D4zKc1RW.js.map → p-BA6a6P0b.js.map} +0 -0
- /package/dist/components/{p-DqBCQRRd.js.map → p-CF4avTQw.js.map} +0 -0
- /package/dist/components/{p-C9za7IDu.js.map → p-CJubWt1F.js.map} +0 -0
|
@@ -12,6 +12,7 @@ export declare const TOKEN_DEFAULTS: {
|
|
|
12
12
|
readonly panelWidthMd: "--dimension-panel-width-md";
|
|
13
13
|
readonly panelWidthLg: "--dimension-panel-width-lg";
|
|
14
14
|
readonly menuWidthXs: "--dimension-menu-width-xs";
|
|
15
|
+
readonly motionShort2: "--effect-motion-short-2";
|
|
15
16
|
readonly motionShort3: "--effect-motion-short-3";
|
|
16
17
|
readonly animationDurationShort3: "--effect-animation-duration-short-3";
|
|
17
18
|
readonly animationDurationMedium1: "--effect-animation-duration-medium-1";
|
package/package.json
CHANGED
package/src/angular/index.ts
CHANGED
|
@@ -8,10 +8,10 @@ export const DIRECTIVES = [
|
|
|
8
8
|
d.DsBanner,
|
|
9
9
|
d.DsBarNav,
|
|
10
10
|
d.DsBreadcrumb,
|
|
11
|
-
d.
|
|
12
|
-
d.DsButtonGroup,
|
|
11
|
+
d.DsButtonFilled,
|
|
13
12
|
d.DsButtonUnfilledIcon,
|
|
14
13
|
d.DsCard,
|
|
14
|
+
d.DsCardSetting,
|
|
15
15
|
d.DsCheckbox,
|
|
16
16
|
d.DsChip,
|
|
17
17
|
d.DsDivider,
|
|
@@ -42,7 +42,5 @@ export const DIRECTIVES = [
|
|
|
42
42
|
d.DsText,
|
|
43
43
|
d.DsToastProvider,
|
|
44
44
|
d.DsToggle,
|
|
45
|
-
d.DsToggleButton,
|
|
46
|
-
d.DsToggleButtonGroup,
|
|
47
45
|
d.DsTooltip
|
|
48
46
|
];
|
package/src/angular/proxies.ts
CHANGED
|
@@ -170,22 +170,21 @@ export declare interface DsBreadcrumb extends Components.DsBreadcrumb {
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
@ProxyCmp({
|
|
173
|
-
inputs: ['ariaLabel', '
|
|
173
|
+
inputs: ['ariaLabel', 'contrast', 'icon', 'inactive', 'intent', 'type'],
|
|
174
|
+
methods: ['setFocus']
|
|
174
175
|
})
|
|
175
176
|
@Component({
|
|
176
|
-
selector: 'ds-button',
|
|
177
|
+
selector: 'ds-button-filled',
|
|
177
178
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
178
179
|
template: '<ng-content></ng-content>',
|
|
179
180
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
180
|
-
inputs: ['ariaLabel', '
|
|
181
|
-
outputs: ['dsClick'
|
|
181
|
+
inputs: ['ariaLabel', 'contrast', 'icon', 'inactive', 'intent', 'type'],
|
|
182
|
+
outputs: ['dsClick'],
|
|
182
183
|
standalone: false
|
|
183
184
|
})
|
|
184
|
-
export class
|
|
185
|
-
protected el:
|
|
185
|
+
export class DsButtonFilled {
|
|
186
|
+
protected el: HTMLDsButtonFilledElement;
|
|
186
187
|
@Output() dsClick = new EventEmitter<CustomEvent<MouseEvent>>();
|
|
187
|
-
@Output() dsMouseEnter = new EventEmitter<CustomEvent<MouseEvent>>();
|
|
188
|
-
@Output() dsMouseLeave = new EventEmitter<CustomEvent<MouseEvent>>();
|
|
189
188
|
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
190
189
|
c.detach();
|
|
191
190
|
this.el = r.nativeElement;
|
|
@@ -193,48 +192,14 @@ export class DsButton {
|
|
|
193
192
|
}
|
|
194
193
|
|
|
195
194
|
|
|
196
|
-
export declare interface
|
|
195
|
+
export declare interface DsButtonFilled extends Components.DsButtonFilled {
|
|
197
196
|
|
|
198
197
|
dsClick: EventEmitter<CustomEvent<MouseEvent>>;
|
|
199
|
-
|
|
200
|
-
dsMouseEnter: EventEmitter<CustomEvent<MouseEvent>>;
|
|
201
|
-
|
|
202
|
-
dsMouseLeave: EventEmitter<CustomEvent<MouseEvent>>;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
@ProxyCmp({
|
|
207
|
-
inputs: ['elevation', 'items', 'rounded', 'size']
|
|
208
|
-
})
|
|
209
|
-
@Component({
|
|
210
|
-
selector: 'ds-button-group',
|
|
211
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
212
|
-
template: '<ng-content></ng-content>',
|
|
213
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
214
|
-
inputs: ['elevation', 'items', 'rounded', 'size'],
|
|
215
|
-
outputs: ['dsClick'],
|
|
216
|
-
standalone: false
|
|
217
|
-
})
|
|
218
|
-
export class DsButtonGroup {
|
|
219
|
-
protected el: HTMLDsButtonGroupElement;
|
|
220
|
-
@Output() dsClick = new EventEmitter<CustomEvent<number>>();
|
|
221
|
-
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
222
|
-
c.detach();
|
|
223
|
-
this.el = r.nativeElement;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
export declare interface DsButtonGroup extends Components.DsButtonGroup {
|
|
229
|
-
/**
|
|
230
|
-
* Emits the index of the clicked item.
|
|
231
|
-
*/
|
|
232
|
-
dsClick: EventEmitter<CustomEvent<number>>;
|
|
233
198
|
}
|
|
234
199
|
|
|
235
200
|
|
|
236
201
|
@ProxyCmp({
|
|
237
|
-
inputs: ['activeFill', 'ariaLabel', 'background', 'controls', 'dot', 'expanded', 'focusTabIndex', 'hasBorder', 'haspopup', 'icon', 'inactive', 'isActive', 'pressed', 'type'],
|
|
202
|
+
inputs: ['activeFill', 'ariaLabel', 'background', 'backgroundContrast', 'controls', 'dot', 'expanded', 'focusTabIndex', 'hasBorder', 'haspopup', 'icon', 'inactive', 'isActive', 'pressed', 'type'],
|
|
238
203
|
methods: ['setFocus']
|
|
239
204
|
})
|
|
240
205
|
@Component({
|
|
@@ -242,7 +207,7 @@ export declare interface DsButtonGroup extends Components.DsButtonGroup {
|
|
|
242
207
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
243
208
|
template: '<ng-content></ng-content>',
|
|
244
209
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
245
|
-
inputs: ['activeFill', 'ariaLabel', 'background', 'controls', 'dot', 'expanded', 'focusTabIndex', 'hasBorder', 'haspopup', 'icon', 'inactive', 'isActive', 'pressed', 'type'],
|
|
210
|
+
inputs: ['activeFill', 'ariaLabel', 'background', 'backgroundContrast', 'controls', 'dot', 'expanded', 'focusTabIndex', 'hasBorder', 'haspopup', 'icon', 'inactive', 'isActive', 'pressed', 'type'],
|
|
246
211
|
outputs: ['dsClick', 'dsChange'],
|
|
247
212
|
standalone: false
|
|
248
213
|
})
|
|
@@ -288,6 +253,36 @@ export class DsCard {
|
|
|
288
253
|
export declare interface DsCard extends Components.DsCard {}
|
|
289
254
|
|
|
290
255
|
|
|
256
|
+
@ProxyCmp({
|
|
257
|
+
inputs: ['cardWidth', 'editing', 'heading']
|
|
258
|
+
})
|
|
259
|
+
@Component({
|
|
260
|
+
selector: 'ds-card-setting',
|
|
261
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
262
|
+
template: '<ng-content></ng-content>',
|
|
263
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
264
|
+
inputs: ['cardWidth', 'editing', { name: 'heading', required: true }],
|
|
265
|
+
outputs: ['dsEditingChange'],
|
|
266
|
+
standalone: false
|
|
267
|
+
})
|
|
268
|
+
export class DsCardSetting {
|
|
269
|
+
protected el: HTMLDsCardSettingElement;
|
|
270
|
+
@Output() dsEditingChange = new EventEmitter<CustomEvent<boolean>>();
|
|
271
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
272
|
+
c.detach();
|
|
273
|
+
this.el = r.nativeElement;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
export declare interface DsCardSetting extends Components.DsCardSetting {
|
|
279
|
+
/**
|
|
280
|
+
* Emits when the user enters or exits edit mode.
|
|
281
|
+
*/
|
|
282
|
+
dsEditingChange: EventEmitter<CustomEvent<boolean>>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
|
|
291
286
|
@ProxyCmp({
|
|
292
287
|
inputs: ['checked', 'inactive', 'indeterminate', 'label']
|
|
293
288
|
})
|
|
@@ -1151,66 +1146,6 @@ export declare interface DsToggle extends Components.DsToggle {
|
|
|
1151
1146
|
}
|
|
1152
1147
|
|
|
1153
1148
|
|
|
1154
|
-
@ProxyCmp({
|
|
1155
|
-
inputs: ['ariaLabel', 'background', 'elevation', 'icon', 'inactive', 'label', 'pressed', 'rounded', 'size']
|
|
1156
|
-
})
|
|
1157
|
-
@Component({
|
|
1158
|
-
selector: 'ds-toggle-button',
|
|
1159
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1160
|
-
template: '<ng-content></ng-content>',
|
|
1161
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1162
|
-
inputs: ['ariaLabel', 'background', 'elevation', 'icon', 'inactive', 'label', 'pressed', 'rounded', 'size'],
|
|
1163
|
-
outputs: ['dsChange'],
|
|
1164
|
-
standalone: false
|
|
1165
|
-
})
|
|
1166
|
-
export class DsToggleButton {
|
|
1167
|
-
protected el: HTMLDsToggleButtonElement;
|
|
1168
|
-
@Output() dsChange = new EventEmitter<CustomEvent<boolean>>();
|
|
1169
|
-
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
1170
|
-
c.detach();
|
|
1171
|
-
this.el = r.nativeElement;
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
export declare interface DsToggleButton extends Components.DsToggleButton {
|
|
1177
|
-
/**
|
|
1178
|
-
* Emits the new pressed value (!pressed) on click.
|
|
1179
|
-
*/
|
|
1180
|
-
dsChange: EventEmitter<CustomEvent<boolean>>;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
@ProxyCmp({
|
|
1185
|
-
inputs: ['background', 'elevation', 'items', 'rounded', 'size', 'value']
|
|
1186
|
-
})
|
|
1187
|
-
@Component({
|
|
1188
|
-
selector: 'ds-toggle-button-group',
|
|
1189
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1190
|
-
template: '<ng-content></ng-content>',
|
|
1191
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1192
|
-
inputs: ['background', 'elevation', 'items', 'rounded', 'size', 'value'],
|
|
1193
|
-
outputs: ['dsChange'],
|
|
1194
|
-
standalone: false
|
|
1195
|
-
})
|
|
1196
|
-
export class DsToggleButtonGroup {
|
|
1197
|
-
protected el: HTMLDsToggleButtonGroupElement;
|
|
1198
|
-
@Output() dsChange = new EventEmitter<CustomEvent<string>>();
|
|
1199
|
-
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
1200
|
-
c.detach();
|
|
1201
|
-
this.el = r.nativeElement;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
export declare interface DsToggleButtonGroup extends Components.DsToggleButtonGroup {
|
|
1207
|
-
/**
|
|
1208
|
-
* Emits the id of the newly selected item.
|
|
1209
|
-
*/
|
|
1210
|
-
dsChange: EventEmitter<CustomEvent<string>>;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
1149
|
@ProxyCmp({
|
|
1215
1150
|
inputs: ['align', 'alignOffset', 'delay', 'label', 'shortcutKey', 'shortcutKeyPosition', 'side', 'sideOffset']
|
|
1216
1151
|
})
|
package/src/react/components.ts
CHANGED
|
@@ -10,9 +10,9 @@ export { DsBadge } from "./ds-badge.js";
|
|
|
10
10
|
export { DsBanner } from "./ds-banner.js";
|
|
11
11
|
export { DsBarNav } from "./ds-bar-nav.js";
|
|
12
12
|
export { DsBreadcrumb } from "./ds-breadcrumb.js";
|
|
13
|
-
export {
|
|
13
|
+
export { DsButtonFilled } from "./ds-button-filled.js";
|
|
14
14
|
export { DsButtonUnfilledIcon } from "./ds-button-unfilled-icon.js";
|
|
15
|
-
export {
|
|
15
|
+
export { DsCardSetting } from "./ds-card-setting.js";
|
|
16
16
|
export { DsCard } from "./ds-card.js";
|
|
17
17
|
export { DsCheckbox } from "./ds-checkbox.js";
|
|
18
18
|
export { DsChip } from "./ds-chip.js";
|
|
@@ -43,7 +43,5 @@ export { DsTable } from "./ds-table.js";
|
|
|
43
43
|
export { DsTag } from "./ds-tag.js";
|
|
44
44
|
export { DsText } from "./ds-text.js";
|
|
45
45
|
export { DsToastProvider } from "./ds-toast-provider.js";
|
|
46
|
-
export { DsToggleButtonGroup } from "./ds-toggle-button-group.js";
|
|
47
|
-
export { DsToggleButton } from "./ds-toggle-button.js";
|
|
48
46
|
export { DsToggle } from "./ds-toggle.js";
|
|
49
47
|
export { DsTooltip } from "./ds-tooltip.js";
|
|
@@ -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 DsButtonFilledCustomEvent } from "@ds-mo/ui";
|
|
15
|
+
import type { Components } from "@ds-mo/ui/dist/components";
|
|
16
|
+
import { DsButtonFilled as DsButtonFilledElement, defineCustomElement as defineDsButtonFilled } from "@ds-mo/ui/dist/components/ds-button-filled.js";
|
|
17
|
+
|
|
18
|
+
export type DsButtonFilledEvents = { onDsClick: EventName<DsButtonFilledCustomEvent<MouseEvent>> };
|
|
19
|
+
|
|
20
|
+
export const DsButtonFilled: StencilReactComponent<DsButtonFilledElement, DsButtonFilledEvents, Components.DsButtonFilled> = /*@__PURE__*/ createComponent<DsButtonFilledElement, DsButtonFilledEvents, Components.DsButtonFilled>({
|
|
21
|
+
tagName: 'ds-button-filled',
|
|
22
|
+
elementClass: DsButtonFilledElement,
|
|
23
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
24
|
+
react: React,
|
|
25
|
+
events: { onDsClick: 'dsClick' } as DsButtonFilledEvents,
|
|
26
|
+
defineCustomElement: defineDsButtonFilled
|
|
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 DsCardSettingCustomEvent } from "@ds-mo/ui";
|
|
15
|
+
import type { Components } from "@ds-mo/ui/dist/components";
|
|
16
|
+
import { DsCardSetting as DsCardSettingElement, defineCustomElement as defineDsCardSetting } from "@ds-mo/ui/dist/components/ds-card-setting.js";
|
|
17
|
+
|
|
18
|
+
export type DsCardSettingEvents = { onDsEditingChange: EventName<DsCardSettingCustomEvent<boolean>> };
|
|
19
|
+
|
|
20
|
+
export const DsCardSetting: StencilReactComponent<DsCardSettingElement, DsCardSettingEvents, Components.DsCardSetting> = /*@__PURE__*/ createComponent<DsCardSettingElement, DsCardSettingEvents, Components.DsCardSetting>({
|
|
21
|
+
tagName: 'ds-card-setting',
|
|
22
|
+
elementClass: DsCardSettingElement,
|
|
23
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
24
|
+
react: React,
|
|
25
|
+
events: { onDsEditingChange: 'dsEditingChange' } as DsCardSettingEvents,
|
|
26
|
+
defineCustomElement: defineDsCardSetting
|
|
27
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';
|
|
2
|
+
|
|
3
|
+
export type ButtonFilledIntent =
|
|
4
|
+
| 'neutral'
|
|
5
|
+
| 'brand'
|
|
6
|
+
| 'ai'
|
|
7
|
+
| 'negative'
|
|
8
|
+
| 'warning'
|
|
9
|
+
| 'caution'
|
|
10
|
+
| 'positive'
|
|
11
|
+
| 'guide'
|
|
12
|
+
| 'walkthrough';
|
|
13
|
+
|
|
14
|
+
export type ButtonFilledContrast = 'bold' | 'strong' | 'medium' | 'faint';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
tag: 'ds-button-filled',
|
|
18
|
+
styleUrl: 'ButtonFilled.css',
|
|
19
|
+
scoped: true,
|
|
20
|
+
})
|
|
21
|
+
export class ButtonFilled {
|
|
22
|
+
@Element() el!: HTMLElement;
|
|
23
|
+
|
|
24
|
+
/** Icon name passed to <ds-icon>. */
|
|
25
|
+
@Prop() icon: string = '';
|
|
26
|
+
|
|
27
|
+
/** Semantic colour intent. */
|
|
28
|
+
@Prop() intent: ButtonFilledIntent = 'brand';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Background fill weight. Foreground uses the paired contrast token:
|
|
32
|
+
* bold → faint, strong → medium, medium → strong, faint → bold.
|
|
33
|
+
*/
|
|
34
|
+
@Prop() contrast: ButtonFilledContrast = 'bold';
|
|
35
|
+
|
|
36
|
+
/** Disables interaction. */
|
|
37
|
+
@Prop() inactive: boolean = false;
|
|
38
|
+
|
|
39
|
+
/** Native button type. */
|
|
40
|
+
@Prop() type: 'button' | 'submit' | 'reset' = 'button';
|
|
41
|
+
|
|
42
|
+
@Prop({ attribute: 'aria-label' }) ariaLabel: string = 'action';
|
|
43
|
+
|
|
44
|
+
@Event() dsClick!: EventEmitter<MouseEvent>;
|
|
45
|
+
|
|
46
|
+
private buttonEl: HTMLButtonElement | null = null;
|
|
47
|
+
|
|
48
|
+
@Method()
|
|
49
|
+
async setFocus() {
|
|
50
|
+
this.buttonEl?.focus();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private handleClick = (event: MouseEvent) => {
|
|
54
|
+
if (this.inactive) return;
|
|
55
|
+
this.dsClick.emit(event);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
render() {
|
|
59
|
+
const cls: Record<string, boolean> = {
|
|
60
|
+
'button-filled': true,
|
|
61
|
+
'ds-focus-ring-inset': true,
|
|
62
|
+
'button-filled--inactive': this.inactive,
|
|
63
|
+
[`button-filled--intent-${this.intent}`]: true,
|
|
64
|
+
[`button-filled--contrast-${this.contrast}`]: this.contrast !== 'bold',
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Host tabIndex={-1}>
|
|
69
|
+
<button
|
|
70
|
+
ref={el => {
|
|
71
|
+
this.buttonEl = el ?? null;
|
|
72
|
+
}}
|
|
73
|
+
type={this.type}
|
|
74
|
+
class={cls}
|
|
75
|
+
disabled={this.inactive}
|
|
76
|
+
aria-label={this.ariaLabel}
|
|
77
|
+
onClick={this.handleClick}
|
|
78
|
+
>
|
|
79
|
+
<span class="button-filled__icon-wrap">
|
|
80
|
+
<ds-icon name={this.icon} size="md" color="inherit" />
|
|
81
|
+
</span>
|
|
82
|
+
</button>
|
|
83
|
+
</Host>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ButtonFilledContrast, ButtonFilledIntent } from './ButtonFilled';
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';
|
|
2
2
|
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
| 'bold'
|
|
7
|
-
| 'strong'
|
|
8
|
-
| 'always-dark'
|
|
9
|
-
| 'navigation';
|
|
3
|
+
export type ButtonUnfilledIconOnBackgroundContrast = 'default' | 'medium' | 'bold' | 'strong';
|
|
4
|
+
|
|
5
|
+
export type ButtonUnfilledIconBackground = 'always-dark' | 'navigation';
|
|
10
6
|
|
|
11
7
|
@Component({
|
|
12
8
|
tag: 'ds-button-unfilled-icon',
|
|
@@ -37,7 +33,14 @@ export class ButtonUnfilledIcon {
|
|
|
37
33
|
/** Native button type. */
|
|
38
34
|
@Prop() type: 'button' | 'submit' | 'reset' = 'button';
|
|
39
35
|
|
|
40
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Foreground and interaction tokens when the button sits on a contrasting parent
|
|
38
|
+
* background (default, medium, bold, or strong).
|
|
39
|
+
*/
|
|
40
|
+
@Prop({ attribute: 'on-background-contrast' })
|
|
41
|
+
backgroundContrast?: ButtonUnfilledIconOnBackgroundContrast;
|
|
42
|
+
|
|
43
|
+
/** Parent surface context for navigation and always-dark chrome. */
|
|
41
44
|
@Prop() background: ButtonUnfilledIconBackground | undefined;
|
|
42
45
|
|
|
43
46
|
@Prop({ attribute: 'aria-label' }) ariaLabel: string = 'action';
|
|
@@ -68,8 +71,13 @@ export class ButtonUnfilledIcon {
|
|
|
68
71
|
this.dsChange.emit(!this.isActive);
|
|
69
72
|
};
|
|
70
73
|
|
|
74
|
+
private effectiveContrast(): ButtonUnfilledIconOnBackgroundContrast {
|
|
75
|
+
return this.backgroundContrast ?? 'default';
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
render() {
|
|
72
79
|
const bg = this.background;
|
|
80
|
+
const contrast = this.effectiveContrast();
|
|
73
81
|
|
|
74
82
|
const cls: Record<string, boolean> = {
|
|
75
83
|
'button-icon': true,
|
|
@@ -78,9 +86,9 @@ export class ButtonUnfilledIcon {
|
|
|
78
86
|
'button-icon--active-fill': this.isActive && this.activeFill,
|
|
79
87
|
'button-icon--bordered': this.hasBorder,
|
|
80
88
|
'button-icon--inactive': this.inactive,
|
|
81
|
-
'button-icon--
|
|
82
|
-
'button-icon--
|
|
83
|
-
'button-icon--
|
|
89
|
+
'button-icon--contrast-medium': contrast === 'medium',
|
|
90
|
+
'button-icon--contrast-bold': contrast === 'bold',
|
|
91
|
+
'button-icon--contrast-strong': contrast === 'strong',
|
|
84
92
|
'button-icon--on-always-dark': bg === 'always-dark',
|
|
85
93
|
'button-icon--on-navigation': bg === 'navigation',
|
|
86
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { ButtonUnfilledIconBackground } from './ButtonUnfilledIcon';
|
|
1
|
+
export type { ButtonUnfilledIconBackground, ButtonUnfilledIconOnBackgroundContrast } from './ButtonUnfilledIcon';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
|
|
3
|
+
export type CardSettingWidth = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
|
|
5
|
+
const CARD_WIDTH_VARS: Record<CardSettingWidth, string> = {
|
|
6
|
+
xs: 'var(--dimension-card-width-xs)',
|
|
7
|
+
sm: 'var(--dimension-card-width-sm)',
|
|
8
|
+
md: 'var(--dimension-card-width-md)',
|
|
9
|
+
lg: 'var(--dimension-card-width-lg)',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const FAINT_BRAND_TITLE_COLOR = 'var(--color-foreground-faint-brand)';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
tag: 'ds-card-setting',
|
|
16
|
+
styleUrl: 'CardSetting.css',
|
|
17
|
+
scoped: true,
|
|
18
|
+
})
|
|
19
|
+
export class CardSetting {
|
|
20
|
+
/** Section heading shown in the card header. */
|
|
21
|
+
@Prop() heading!: string;
|
|
22
|
+
|
|
23
|
+
/** Card width token. */
|
|
24
|
+
@Prop() cardWidth: CardSettingWidth = 'md';
|
|
25
|
+
|
|
26
|
+
/** Controlled edit state — parent owns single-edit orchestration. */
|
|
27
|
+
@Prop() editing = false;
|
|
28
|
+
|
|
29
|
+
/** Emits when the user enters or exits edit mode. */
|
|
30
|
+
@Event() dsEditingChange!: EventEmitter<boolean>;
|
|
31
|
+
|
|
32
|
+
private enterEdit = () => {
|
|
33
|
+
this.dsEditingChange.emit(true);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
private exitEdit = () => {
|
|
37
|
+
this.dsEditingChange.emit(false);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
render() {
|
|
41
|
+
const editing = this.editing;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Host
|
|
45
|
+
class={{
|
|
46
|
+
'card-setting': true,
|
|
47
|
+
'card-setting--editing': editing,
|
|
48
|
+
}}
|
|
49
|
+
style={{ '--_card-setting-width': CARD_WIDTH_VARS[this.cardWidth] }}
|
|
50
|
+
>
|
|
51
|
+
<header class="card-setting__header">
|
|
52
|
+
<div class="card-setting__title-wrap">
|
|
53
|
+
<ds-text
|
|
54
|
+
class="card-setting__title"
|
|
55
|
+
variant="text-title-small"
|
|
56
|
+
color={editing ? FAINT_BRAND_TITLE_COLOR : 'primary'}
|
|
57
|
+
as="h2"
|
|
58
|
+
>
|
|
59
|
+
{this.heading}
|
|
60
|
+
</ds-text>
|
|
61
|
+
</div>
|
|
62
|
+
{!editing ? (
|
|
63
|
+
<ds-button-unfilled-icon
|
|
64
|
+
type="button"
|
|
65
|
+
icon="Pencil"
|
|
66
|
+
aria-label="Edit"
|
|
67
|
+
onDsClick={this.enterEdit}
|
|
68
|
+
/>
|
|
69
|
+
) : (
|
|
70
|
+
<div class="card-setting__actions">
|
|
71
|
+
<ds-button-unfilled-icon
|
|
72
|
+
type="button"
|
|
73
|
+
icon="Cross"
|
|
74
|
+
backgroundContrast="bold"
|
|
75
|
+
has-border
|
|
76
|
+
aria-label="Cancel"
|
|
77
|
+
onDsClick={this.exitEdit}
|
|
78
|
+
/>
|
|
79
|
+
<ds-button-filled
|
|
80
|
+
type="button"
|
|
81
|
+
icon="Check"
|
|
82
|
+
intent="brand"
|
|
83
|
+
contrast="faint"
|
|
84
|
+
aria-label="Save"
|
|
85
|
+
onDsClick={this.exitEdit}
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
</header>
|
|
90
|
+
<div class="card-setting__body">
|
|
91
|
+
<slot />
|
|
92
|
+
</div>
|
|
93
|
+
</Host>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CardSettingWidth } from './CardSetting';
|
|
@@ -124,7 +124,7 @@ export class Menu {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
private get closeAnimationMs(): number {
|
|
127
|
-
return resolveCssTimeMs(TOKEN_DEFAULTS.
|
|
127
|
+
return resolveCssTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
private get resolvedAnchor(): HTMLElement | null {
|
|
@@ -312,7 +312,6 @@ export class Menu {
|
|
|
312
312
|
private handleItemClick(item: MenuItemData) {
|
|
313
313
|
if (item.isInactive) return;
|
|
314
314
|
this.dsSelect.emit(item);
|
|
315
|
-
this.close();
|
|
316
315
|
}
|
|
317
316
|
|
|
318
317
|
private handleGradientSelect(preset: ShellGradientPreset) {
|
|
@@ -14,11 +14,13 @@ export interface MenuPlacement {
|
|
|
14
14
|
* Anchor from `dsNavUserAction` detail `{ anchor }` (id `ds-panel-nav-user-menu-anchor`).
|
|
15
15
|
*
|
|
16
16
|
* Not for BarNav overflow menus — those use `side="bottom"` / `align="end"` internally.
|
|
17
|
-
*
|
|
17
|
+
* `align: 'end'` bottom-aligns on the anchor; offsets nudge into the content area:
|
|
18
|
+
* - `sideOffset` space-100 + space-050 (12px): 4px past the panel-nav outer edge (anchor is ~8px inset).
|
|
19
|
+
* - `alignOffset` space-050 (4px): 4px below the footer user row.
|
|
18
20
|
*/
|
|
19
21
|
export const PANEL_NAV_USER_MENU_PLACEMENT = {
|
|
20
22
|
side: 'right',
|
|
21
23
|
align: 'end',
|
|
22
|
-
sideOffset:
|
|
23
|
-
alignOffset:
|
|
24
|
+
sideOffset: 'calc(var(--dimension-space-100) + var(--dimension-space-050))',
|
|
25
|
+
alignOffset: TOKEN_CSS_LENGTHS.space050,
|
|
24
26
|
} as const satisfies MenuPlacement;
|
|
@@ -16,7 +16,7 @@ export class ShellGradientSwatch {
|
|
|
16
16
|
/** Wash preset this orb previews. */
|
|
17
17
|
@Prop({ reflect: true }) preset: ShellGradientPreset = DEFAULT_SHELL_GRADIENT_PRESET;
|
|
18
18
|
|
|
19
|
-
/** Selected
|
|
19
|
+
/** Selected — brand stroke + halo over inner fill/border/interaction stack. */
|
|
20
20
|
@Prop({ reflect: true }) selected = false;
|
|
21
21
|
|
|
22
22
|
@Prop() inactive = false;
|
|
@@ -55,7 +55,13 @@ export class ShellGradientSwatch {
|
|
|
55
55
|
aria-pressed={this.selected ? 'true' : 'false'}
|
|
56
56
|
disabled={this.inactive}
|
|
57
57
|
onClick={this.handleClick}
|
|
58
|
-
|
|
58
|
+
>
|
|
59
|
+
<span class="shell-gradient-swatch__fill" aria-hidden="true" />
|
|
60
|
+
<span class="shell-gradient-swatch__border" aria-hidden="true" />
|
|
61
|
+
<span class="shell-gradient-swatch__interaction" aria-hidden="true" />
|
|
62
|
+
<span class="shell-gradient-swatch__halo" aria-hidden="true" />
|
|
63
|
+
<span class="shell-gradient-swatch__stroke" aria-hidden="true" />
|
|
64
|
+
</button>
|
|
59
65
|
</Host>
|
|
60
66
|
);
|
|
61
67
|
}
|