@deck.gl/widgets 9.4.0-alpha.1 → 9.4.0-beta.1
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/compass-widget.d.ts +2 -0
- package/dist/compass-widget.d.ts.map +1 -1
- package/dist/compass-widget.js +8 -5
- package/dist/compass-widget.js.map +1 -1
- package/dist/context-menu-widget.d.ts.map +1 -1
- package/dist/dist.dev.js +3319 -3264
- package/dist/fullscreen-widget.d.ts +4 -0
- package/dist/fullscreen-widget.d.ts.map +1 -1
- package/dist/fullscreen-widget.js +3 -1
- package/dist/fullscreen-widget.js.map +1 -1
- package/dist/geocoder-widget.d.ts.map +1 -1
- package/dist/gimbal-widget.d.ts +2 -0
- package/dist/gimbal-widget.d.ts.map +1 -1
- package/dist/gimbal-widget.js +18 -15
- package/dist/gimbal-widget.js.map +1 -1
- package/dist/icon-widget.d.ts +2 -0
- package/dist/icon-widget.d.ts.map +1 -1
- package/dist/icon-widget.js +3 -2
- package/dist/icon-widget.js.map +1 -1
- package/dist/index.cjs +3330 -218
- package/dist/index.cjs.map +3 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/info-widget.d.ts.map +1 -1
- package/dist/lib/components/button-group.d.ts.map +1 -1
- package/dist/lib/components/dropdown-menu.d.ts.map +1 -1
- package/dist/lib/components/icon-button.d.ts +2 -0
- package/dist/lib/components/icon-button.d.ts.map +1 -1
- package/dist/lib/components/icon-button.js +5 -2
- package/dist/lib/components/icon-button.js.map +1 -1
- package/dist/lib/components/popover.d.ts.map +1 -1
- package/dist/lib/components/tooltip.d.ts +14 -0
- package/dist/lib/components/tooltip.d.ts.map +1 -0
- package/dist/lib/components/tooltip.js +64 -0
- package/dist/lib/components/tooltip.js.map +1 -0
- package/dist/lib/components/user-content.d.ts.map +1 -1
- package/dist/loading-widget.d.ts +2 -0
- package/dist/loading-widget.d.ts.map +1 -1
- package/dist/loading-widget.js +2 -1
- package/dist/loading-widget.js.map +1 -1
- package/dist/popup-widget.d.ts.map +1 -1
- package/dist/reset-view-widget.d.ts +2 -0
- package/dist/reset-view-widget.d.ts.map +1 -1
- package/dist/reset-view-widget.js +2 -1
- package/dist/reset-view-widget.js.map +1 -1
- package/dist/screenshot-widget.d.ts +2 -0
- package/dist/screenshot-widget.d.ts.map +1 -1
- package/dist/screenshot-widget.js +2 -1
- package/dist/screenshot-widget.js.map +1 -1
- package/dist/scrollbar-widget.d.ts +6 -1
- package/dist/scrollbar-widget.d.ts.map +1 -1
- package/dist/scrollbar-widget.js +12 -3
- package/dist/scrollbar-widget.js.map +1 -1
- package/dist/selector-widget.d.ts +2 -0
- package/dist/selector-widget.d.ts.map +1 -1
- package/dist/selector-widget.js +2 -1
- package/dist/selector-widget.js.map +1 -1
- package/dist/splitter-widget.d.ts.map +1 -1
- package/dist/stylesheet.css +102 -116
- package/dist/theme-widget.d.ts +4 -0
- package/dist/theme-widget.d.ts.map +1 -1
- package/dist/theme-widget.js +4 -2
- package/dist/theme-widget.js.map +1 -1
- package/dist/themes.d.ts +5 -0
- package/dist/themes.d.ts.map +1 -1
- package/dist/themes.js +4 -0
- package/dist/themes.js.map +1 -1
- package/dist/timeline-widget.d.ts +4 -0
- package/dist/timeline-widget.d.ts.map +1 -1
- package/dist/timeline-widget.js +5 -3
- package/dist/timeline-widget.js.map +1 -1
- package/dist/toggle-widget.d.ts +4 -0
- package/dist/toggle-widget.d.ts.map +1 -1
- package/dist/toggle-widget.js +4 -2
- package/dist/toggle-widget.js.map +1 -1
- package/dist/zoom-widget.d.ts +4 -0
- package/dist/zoom-widget.d.ts.map +1 -1
- package/dist/zoom-widget.js +3 -1
- package/dist/zoom-widget.js.map +1 -1
- package/dist.min.js +2 -2
- package/package.json +8 -4
- package/src/compass-widget.tsx +31 -23
- package/src/fullscreen-widget.tsx +7 -0
- package/src/gimbal-widget.tsx +62 -54
- package/src/icon-widget.tsx +5 -1
- package/src/icons/add.svg +1 -0
- package/src/icons/chevron-down.svg +1 -0
- package/src/icons/chevron-left.svg +1 -0
- package/src/icons/chevron-right.svg +1 -0
- package/src/icons/chevron-up.svg +1 -0
- package/src/icons/close.svg +1 -0
- package/src/icons/dark-mode.svg +1 -0
- package/src/icons/dropdown.svg +1 -0
- package/src/icons/fullscreen-exit.svg +1 -0
- package/src/icons/fullscreen.svg +1 -0
- package/src/icons/light-mode.svg +1 -0
- package/src/icons/loading.svg +1 -0
- package/src/icons/pause.svg +1 -0
- package/src/icons/photo-camera.svg +1 -0
- package/src/icons/play-arrow.svg +1 -0
- package/src/icons/remove.svg +1 -0
- package/src/icons/reset-focus.svg +1 -0
- package/src/index.ts +1 -0
- package/src/lib/components/icon-button.tsx +17 -9
- package/src/lib/components/tooltip.tsx +116 -0
- package/src/loading-widget.tsx +4 -0
- package/src/reset-view-widget.tsx +4 -0
- package/src/screenshot-widget.tsx +4 -0
- package/src/scrollbar-widget.tsx +30 -4
- package/src/selector-widget.tsx +4 -0
- package/src/stylesheet.css +67 -114
- package/src/theme-widget.tsx +8 -1
- package/src/themes.ts +5 -0
- package/src/timeline-widget.tsx +10 -2
- package/src/toggle-widget.tsx +9 -0
- package/src/zoom-widget.tsx +8 -0
package/src/scrollbar-widget.tsx
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {Widget} from '@deck.gl/core';
|
|
2
|
-
import type {
|
|
1
|
+
import {Widget, _getMaxBoundsRect} from '@deck.gl/core';
|
|
2
|
+
import type {
|
|
3
|
+
ControllerProps,
|
|
4
|
+
Position,
|
|
5
|
+
Viewport,
|
|
6
|
+
WidgetPlacement,
|
|
7
|
+
WidgetProps
|
|
8
|
+
} from '@deck.gl/core';
|
|
3
9
|
import {render} from 'preact';
|
|
4
10
|
import {RangeInput, type RangeInputDecoration} from './lib/components/range-input';
|
|
5
11
|
|
|
@@ -31,6 +37,10 @@ export type ScrollbarWidgetProps = WidgetProps & {
|
|
|
31
37
|
* If not supplied, the scrollbar will always be hidden.
|
|
32
38
|
*/
|
|
33
39
|
contentBounds?: ContentBounds | null;
|
|
40
|
+
/** Padding inside the viewport used to display `contentBounds`.
|
|
41
|
+
* If not supplied, falls back to the target view controller's `maxBoundsPadding`.
|
|
42
|
+
*/
|
|
43
|
+
contentBoundsPadding?: ControllerProps['maxBoundsPadding'];
|
|
34
44
|
placement?: WidgetPlacement;
|
|
35
45
|
viewId?: string | null;
|
|
36
46
|
/** Direction of the scrollbar. `'horizontal'` scrolls the camera along the X axis, and `'vertical'` scrolls the camera along the Y axis.
|
|
@@ -69,6 +79,7 @@ export class ScrollbarWidget extends Widget<ScrollbarWidgetProps> {
|
|
|
69
79
|
static override defaultProps: ScrollbarWidgetRequiredProps = {
|
|
70
80
|
...Widget.defaultProps,
|
|
71
81
|
contentBounds: null,
|
|
82
|
+
contentBoundsPadding: null,
|
|
72
83
|
placement: 'top-right',
|
|
73
84
|
viewId: null,
|
|
74
85
|
orientation: 'vertical',
|
|
@@ -152,6 +163,14 @@ export class ScrollbarWidget extends Widget<ScrollbarWidgetProps> {
|
|
|
152
163
|
return this.props.contentBounds ?? this.deck?.getView(viewId)?.controller?.maxBounds ?? null;
|
|
153
164
|
}
|
|
154
165
|
|
|
166
|
+
private getContentBoundsPadding(viewId: string): ControllerProps['maxBoundsPadding'] {
|
|
167
|
+
return (
|
|
168
|
+
this.props.contentBoundsPadding ??
|
|
169
|
+
this.deck?.getView(viewId)?.controller?.maxBoundsPadding ??
|
|
170
|
+
null
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
155
174
|
private updateViewport(viewport?: Viewport): void {
|
|
156
175
|
if (!viewport) {
|
|
157
176
|
this.contentSize = 0;
|
|
@@ -165,10 +184,17 @@ export class ScrollbarWidget extends Widget<ScrollbarWidgetProps> {
|
|
|
165
184
|
const projectedBounds = contentBounds
|
|
166
185
|
? projectBounds(contentBounds, viewport, isVertical)
|
|
167
186
|
: ([0, 0] as [number, number]);
|
|
187
|
+
const contentRect = _getMaxBoundsRect(
|
|
188
|
+
viewport.width,
|
|
189
|
+
viewport.height,
|
|
190
|
+
this.getContentBoundsPadding(viewport.id)
|
|
191
|
+
);
|
|
192
|
+
const contentStart = isVertical ? contentRect.y : contentRect.x;
|
|
193
|
+
const viewportSize = isVertical ? contentRect.height : contentRect.width;
|
|
168
194
|
|
|
169
195
|
this.contentSize = projectedBounds[1] - projectedBounds[0];
|
|
170
|
-
this.scrollOffset = -projectedBounds[0];
|
|
171
|
-
this.viewportSize =
|
|
196
|
+
this.scrollOffset = contentStart - projectedBounds[0];
|
|
197
|
+
this.viewportSize = Math.max(0, viewportSize);
|
|
172
198
|
}
|
|
173
199
|
|
|
174
200
|
private getDecorations(viewport?: Viewport): RangeInputDecoration[] {
|
package/src/selector-widget.tsx
CHANGED
|
@@ -23,6 +23,8 @@ export type SelectorWidgetProps<ValueT = string> = WidgetProps & {
|
|
|
23
23
|
options: SelectorWidgetOption<ValueT>[];
|
|
24
24
|
/** The initial value. Default to the first option. */
|
|
25
25
|
initialValue?: ValueT;
|
|
26
|
+
/** Custom tooltip content. Overrides label for tooltip display. */
|
|
27
|
+
tooltip?: string | HTMLElement | false;
|
|
26
28
|
/** Callback invoked when the value changes */
|
|
27
29
|
onChange?: (value: ValueT) => void;
|
|
28
30
|
};
|
|
@@ -43,6 +45,7 @@ export class SelectorWidget<ValueT = string> extends Widget<SelectorWidgetProps<
|
|
|
43
45
|
viewId: null,
|
|
44
46
|
initialValue: '',
|
|
45
47
|
options: [],
|
|
48
|
+
tooltip: undefined!,
|
|
46
49
|
onChange: () => {}
|
|
47
50
|
};
|
|
48
51
|
|
|
@@ -72,6 +75,7 @@ export class SelectorWidget<ValueT = string> extends Widget<SelectorWidgetProps<
|
|
|
72
75
|
<IconButton
|
|
73
76
|
icon={selectedOption.icon}
|
|
74
77
|
label={selectedOption.label}
|
|
78
|
+
tooltip={this.props.tooltip}
|
|
75
79
|
onClick={this._toggleMenu}
|
|
76
80
|
/>
|
|
77
81
|
{this.isOpen && (
|
package/src/stylesheet.css
CHANGED
|
@@ -59,25 +59,25 @@
|
|
|
59
59
|
|
|
60
60
|
/* Border radius adjustments for grouped buttons */
|
|
61
61
|
.deck-widget-button-group.vertical > *:not(:last-child),
|
|
62
|
-
.deck-widget-button-group.vertical > *:not(:last-child)
|
|
62
|
+
.deck-widget-button-group.vertical > *:not(:last-child) button {
|
|
63
63
|
border-bottom-left-radius: 0;
|
|
64
64
|
border-bottom-right-radius: 0;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.deck-widget-button-group.vertical > *:not(:first-child),
|
|
68
|
-
.deck-widget-button-group.vertical > *:not(:first-child)
|
|
68
|
+
.deck-widget-button-group.vertical > *:not(:first-child) button {
|
|
69
69
|
border-top-left-radius: 0;
|
|
70
70
|
border-top-right-radius: 0;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.deck-widget-button-group.horizontal > *:not(:last-child),
|
|
74
|
-
.deck-widget-button-group.horizontal > *:not(:last-child)
|
|
74
|
+
.deck-widget-button-group.horizontal > *:not(:last-child) button {
|
|
75
75
|
border-top-right-radius: 0;
|
|
76
76
|
border-bottom-right-radius: 0;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.deck-widget-button-group.horizontal > *:not(:first-child),
|
|
80
|
-
.deck-widget-button-group.horizontal > *:not(:first-child)
|
|
80
|
+
.deck-widget-button-group.horizontal > *:not(:first-child) button {
|
|
81
81
|
border-top-left-radius: 0;
|
|
82
82
|
border-bottom-left-radius: 0;
|
|
83
83
|
}
|
|
@@ -90,6 +90,9 @@
|
|
|
90
90
|
display: block;
|
|
91
91
|
height: 100%;
|
|
92
92
|
width: 100%;
|
|
93
|
+
mask-size: var(--icon-size, 75%);
|
|
94
|
+
mask-repeat: no-repeat;
|
|
95
|
+
mask-position: center;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
.deck-widget button .deck-widget-icon:hover {
|
|
@@ -106,26 +109,14 @@
|
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
/* Fullscreen styles */
|
|
112
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:fullscreen:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
109
113
|
.deck-widget.deck-widget-fullscreen button.deck-widget-fullscreen-enter .deck-widget-icon {
|
|
110
|
-
mask-image: var(
|
|
111
|
-
--icon-fullscreen-enter,
|
|
112
|
-
url('data:image/svg+xml,<svg fill="black" height="100%" viewBox="0 0 28 28" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M7.90474 20.0953H10.6286C10.8984 20.0953 11.1246 20.1868 11.3071 20.37C11.4897 20.5532 11.5809 20.7802 11.5809 21.051C11.5809 21.3218 11.4897 21.5476 11.3071 21.7286C11.1246 21.9095 10.8984 22 10.6286 22H6.95237C6.68254 22 6.45635 21.9087 6.2738 21.7262C6.09127 21.5436 6 21.3175 6 21.0476V17.3714C6 17.1016 6.09159 16.8754 6.27477 16.6929C6.45795 16.5103 6.68493 16.4191 6.95571 16.4191C7.2265 16.4191 7.45236 16.5103 7.63331 16.6929C7.81427 16.8754 7.90474 17.1016 7.90474 17.3714V20.0953ZM7.90474 7.90474V10.6286C7.90474 10.8984 7.81315 11.1246 7.62997 11.3071C7.44679 11.4897 7.21981 11.5809 6.94903 11.5809C6.67825 11.5809 6.45238 11.4897 6.27143 11.3071C6.09048 11.1246 6 10.8984 6 10.6286V6.95237C6 6.68254 6.09127 6.45635 6.2738 6.2738C6.45635 6.09127 6.68254 6 6.95237 6H10.6286C10.8984 6 11.1246 6.09159 11.3071 6.27477C11.4897 6.45795 11.5809 6.68493 11.5809 6.95571C11.5809 7.2265 11.4897 7.45236 11.3071 7.63331C11.1246 7.81427 10.8984 7.90474 10.6286 7.90474H7.90474ZM20.0953 20.0953V17.3714C20.0953 17.1016 20.1868 16.8754 20.37 16.6929C20.5532 16.5103 20.7802 16.4191 21.051 16.4191C21.3218 16.4191 21.5476 16.5103 21.7286 16.6929C21.9095 16.8754 22 17.1016 22 17.3714V21.0476C22 21.3175 21.9087 21.5436 21.7262 21.7262C21.5436 21.9087 21.3175 22 21.0476 22H17.3714C17.1016 22 16.8754 21.9084 16.6929 21.7252C16.5103 21.542 16.4191 21.3151 16.4191 21.0443C16.4191 20.7735 16.5103 20.5476 16.6929 20.3667C16.8754 20.1857 17.1016 20.0953 17.3714 20.0953H20.0953ZM20.0953 7.90474H17.3714C17.1016 7.90474 16.8754 7.81315 16.6929 7.62997C16.5103 7.44679 16.4191 7.21981 16.4191 6.94903C16.4191 6.67825 16.5103 6.45238 16.6929 6.27143C16.8754 6.09048 17.1016 6 17.3714 6H21.0476C21.3175 6 21.5436 6.09127 21.7262 6.2738C21.9087 6.45635 22 6.68254 22 6.95237V10.6286C22 10.8984 21.9084 11.1246 21.7252 11.3071C21.542 11.4897 21.3151 11.5809 21.0443 11.5809C20.7735 11.5809 20.5476 11.4897 20.3667 11.3071C20.1857 11.1246 20.0953 10.8984 20.0953 10.6286V7.90474Z" /></svg>')
|
|
113
|
-
);
|
|
114
|
-
-webkit-mask-image: var(
|
|
115
|
-
--icon-fullscreen-enter,
|
|
116
|
-
url('data:image/svg+xml,<svg fill="black" height="100%" viewBox="0 0 28 28" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M7.90474 20.0953H10.6286C10.8984 20.0953 11.1246 20.1868 11.3071 20.37C11.4897 20.5532 11.5809 20.7802 11.5809 21.051C11.5809 21.3218 11.4897 21.5476 11.3071 21.7286C11.1246 21.9095 10.8984 22 10.6286 22H6.95237C6.68254 22 6.45635 21.9087 6.2738 21.7262C6.09127 21.5436 6 21.3175 6 21.0476V17.3714C6 17.1016 6.09159 16.8754 6.27477 16.6929C6.45795 16.5103 6.68493 16.4191 6.95571 16.4191C7.2265 16.4191 7.45236 16.5103 7.63331 16.6929C7.81427 16.8754 7.90474 17.1016 7.90474 17.3714V20.0953ZM7.90474 7.90474V10.6286C7.90474 10.8984 7.81315 11.1246 7.62997 11.3071C7.44679 11.4897 7.21981 11.5809 6.94903 11.5809C6.67825 11.5809 6.45238 11.4897 6.27143 11.3071C6.09048 11.1246 6 10.8984 6 10.6286V6.95237C6 6.68254 6.09127 6.45635 6.2738 6.2738C6.45635 6.09127 6.68254 6 6.95237 6H10.6286C10.8984 6 11.1246 6.09159 11.3071 6.27477C11.4897 6.45795 11.5809 6.68493 11.5809 6.95571C11.5809 7.2265 11.4897 7.45236 11.3071 7.63331C11.1246 7.81427 10.8984 7.90474 10.6286 7.90474H7.90474ZM20.0953 20.0953V17.3714C20.0953 17.1016 20.1868 16.8754 20.37 16.6929C20.5532 16.5103 20.7802 16.4191 21.051 16.4191C21.3218 16.4191 21.5476 16.5103 21.7286 16.6929C21.9095 16.8754 22 17.1016 22 17.3714V21.0476C22 21.3175 21.9087 21.5436 21.7262 21.7262C21.5436 21.9087 21.3175 22 21.0476 22H17.3714C17.1016 22 16.8754 21.9084 16.6929 21.7252C16.5103 21.542 16.4191 21.3151 16.4191 21.0443C16.4191 20.7735 16.5103 20.5476 16.6929 20.3667C16.8754 20.1857 17.1016 20.0953 17.3714 20.0953H20.0953ZM20.0953 7.90474H17.3714C17.1016 7.90474 16.8754 7.81315 16.6929 7.62997C16.5103 7.44679 16.4191 7.21981 16.4191 6.94903C16.4191 6.67825 16.5103 6.45238 16.6929 6.27143C16.8754 6.09048 17.1016 6 17.3714 6H21.0476C21.3175 6 21.5436 6.09127 21.7262 6.2738C21.9087 6.45635 22 6.68254 22 6.95237V10.6286C22 10.8984 21.9084 11.1246 21.7252 11.3071C21.542 11.4897 21.3151 11.5809 21.0443 11.5809C20.7735 11.5809 20.5476 11.4897 20.3667 11.3071C20.1857 11.1246 20.0953 10.8984 20.0953 10.6286V7.90474Z" /></svg>')
|
|
117
|
-
);
|
|
114
|
+
mask-image: var(--icon-fullscreen-enter, svg-load("icons/fullscreen.svg"));
|
|
118
115
|
}
|
|
119
116
|
|
|
117
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:fullscreen_exit:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
120
118
|
.deck-widget.deck-widget-fullscreen button.deck-widget-fullscreen-exit .deck-widget-icon {
|
|
121
|
-
mask-image: var(
|
|
122
|
-
--icon-fullscreen-exit,
|
|
123
|
-
url('data:image/svg+xml,<svg fill="black" height="100%" viewBox="0 0 28 28" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M9.6762 18.3238H6.95237C6.68254 18.3238 6.45635 18.2322 6.2738 18.049C6.09127 17.8658 6 17.6389 6 17.3681C6 17.0973 6.09127 16.8714 6.2738 16.6905C6.45635 16.5095 6.68254 16.4191 6.95237 16.4191H10.6286C10.8984 16.4191 11.1246 16.5103 11.3071 16.6929C11.4897 16.8754 11.5809 17.1016 11.5809 17.3714V21.0476C11.5809 21.3175 11.4894 21.5436 11.3062 21.7262C11.123 21.9087 10.896 22 10.6252 22C10.3544 22 10.1286 21.9087 9.94763 21.7262C9.76668 21.5436 9.6762 21.3175 9.6762 21.0476V18.3238ZM18.3238 18.3238V21.0476C18.3238 21.3175 18.2322 21.5436 18.049 21.7262C17.8658 21.9087 17.6389 22 17.3681 22C17.0973 22 16.8714 21.9087 16.6905 21.7262C16.5095 21.5436 16.4191 21.3175 16.4191 21.0476V17.3714C16.4191 17.1016 16.5103 16.8754 16.6929 16.6929C16.8754 16.5103 17.1016 16.4191 17.3714 16.4191H21.0476C21.3175 16.4191 21.5436 16.5106 21.7262 16.6938C21.9087 16.877 22 17.104 22 17.3748C22 17.6456 21.9087 17.8714 21.7262 18.0524C21.5436 18.2333 21.3175 18.3238 21.0476 18.3238H18.3238ZM9.6762 9.6762V6.95237C9.6762 6.68254 9.76779 6.45635 9.95097 6.2738C10.1342 6.09127 10.3611 6 10.6319 6C10.9027 6 11.1286 6.09127 11.3095 6.2738C11.4905 6.45635 11.5809 6.68254 11.5809 6.95237V10.6286C11.5809 10.8984 11.4897 11.1246 11.3071 11.3071C11.1246 11.4897 10.8984 11.5809 10.6286 11.5809H6.95237C6.68254 11.5809 6.45635 11.4894 6.2738 11.3062C6.09127 11.123 6 10.896 6 10.6252C6 10.3544 6.09127 10.1286 6.2738 9.94763C6.45635 9.76668 6.68254 9.6762 6.95237 9.6762H9.6762ZM18.3238 9.6762H21.0476C21.3175 9.6762 21.5436 9.76779 21.7262 9.95097C21.9087 10.1342 22 10.3611 22 10.6319C22 10.9027 21.9087 11.1286 21.7262 11.3095C21.5436 11.4905 21.3175 11.5809 21.0476 11.5809H17.3714C17.1016 11.5809 16.8754 11.4897 16.6929 11.3071C16.5103 11.1246 16.4191 10.8984 16.4191 10.6286V6.95237C16.4191 6.68254 16.5106 6.45635 16.6938 6.2738C16.877 6.09127 17.104 6 17.3748 6C17.6456 6 17.8714 6.09127 18.0524 6.2738C18.2333 6.45635 18.3238 6.68254 18.3238 6.95237V9.6762Z" /></svg>')
|
|
124
|
-
);
|
|
125
|
-
-webkit-mask-image: var(
|
|
126
|
-
--icon-fullscreen-exit,
|
|
127
|
-
url('data:image/svg+xml,<svg fill="black" height="100%" viewBox="0 0 28 28" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M9.6762 18.3238H6.95237C6.68254 18.3238 6.45635 18.2322 6.2738 18.049C6.09127 17.8658 6 17.6389 6 17.3681C6 17.0973 6.09127 16.8714 6.2738 16.6905C6.45635 16.5095 6.68254 16.4191 6.95237 16.4191H10.6286C10.8984 16.4191 11.1246 16.5103 11.3071 16.6929C11.4897 16.8754 11.5809 17.1016 11.5809 17.3714V21.0476C11.5809 21.3175 11.4894 21.5436 11.3062 21.7262C11.123 21.9087 10.896 22 10.6252 22C10.3544 22 10.1286 21.9087 9.94763 21.7262C9.76668 21.5436 9.6762 21.3175 9.6762 21.0476V18.3238ZM18.3238 18.3238V21.0476C18.3238 21.3175 18.2322 21.5436 18.049 21.7262C17.8658 21.9087 17.6389 22 17.3681 22C17.0973 22 16.8714 21.9087 16.6905 21.7262C16.5095 21.5436 16.4191 21.3175 16.4191 21.0476V17.3714C16.4191 17.1016 16.5103 16.8754 16.6929 16.6929C16.8754 16.5103 17.1016 16.4191 17.3714 16.4191H21.0476C21.3175 16.4191 21.5436 16.5106 21.7262 16.6938C21.9087 16.877 22 17.104 22 17.3748C22 17.6456 21.9087 17.8714 21.7262 18.0524C21.5436 18.2333 21.3175 18.3238 21.0476 18.3238H18.3238ZM9.6762 9.6762V6.95237C9.6762 6.68254 9.76779 6.45635 9.95097 6.2738C10.1342 6.09127 10.3611 6 10.6319 6C10.9027 6 11.1286 6.09127 11.3095 6.2738C11.4905 6.45635 11.5809 6.68254 11.5809 6.95237V10.6286C11.5809 10.8984 11.4897 11.1246 11.3071 11.3071C11.1246 11.4897 10.8984 11.5809 10.6286 11.5809H6.95237C6.68254 11.5809 6.45635 11.4894 6.2738 11.3062C6.09127 11.123 6 10.896 6 10.6252C6 10.3544 6.09127 10.1286 6.2738 9.94763C6.45635 9.76668 6.68254 9.6762 6.95237 9.6762H9.6762ZM18.3238 9.6762H21.0476C21.3175 9.6762 21.5436 9.76779 21.7262 9.95097C21.9087 10.1342 22 10.3611 22 10.6319C22 10.9027 21.9087 11.1286 21.7262 11.3095C21.5436 11.4905 21.3175 11.5809 21.0476 11.5809H17.3714C17.1016 11.5809 16.8754 11.4897 16.6929 11.3071C16.5103 11.1246 16.4191 10.8984 16.4191 10.6286V6.95237C16.4191 6.68254 16.5106 6.45635 16.6938 6.2738C16.877 6.09127 17.104 6 17.3748 6C17.6456 6 17.8714 6.09127 18.0524 6.2738C18.2333 6.45635 18.3238 6.68254 18.3238 6.95237V9.6762Z" /></svg>')
|
|
128
|
-
);
|
|
119
|
+
mask-image: var(--icon-fullscreen-exit, svg-load("icons/fullscreen-exit.svg"));
|
|
129
120
|
}
|
|
130
121
|
|
|
131
122
|
.deck-pseudo-fullscreen {
|
|
@@ -138,69 +129,37 @@
|
|
|
138
129
|
}
|
|
139
130
|
|
|
140
131
|
/* Zoom styles */
|
|
132
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:add:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
141
133
|
.deck-widget.deck-widget-zoom button.deck-widget-zoom-in .deck-widget-icon {
|
|
142
|
-
mask-image: var(
|
|
143
|
-
--icon-zoom-in,
|
|
144
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 26 26" fill="black"><path d="M12.1029 13.8971H7.89332C7.64334 13.8971 7.43196 13.8105 7.25918 13.6373C7.08639 13.4641 7 13.2521 7 13.0014C7 12.7508 7.08639 12.5396 7.25918 12.368C7.43196 12.1963 7.64334 12.1105 7.89332 12.1105H12.1029V7.90097C12.1029 7.65161 12.1895 7.43912 12.3627 7.26348C12.5359 7.08783 12.7479 7 12.9986 7C13.2492 7 13.4604 7.08783 13.632 7.26348C13.8037 7.43912 13.8895 7.65161 13.8895 7.90097V12.1105H18.099C18.3484 12.1105 18.5609 12.1971 18.7365 12.3703C18.9122 12.5436 19 12.7555 19 13.0062C19 13.2569 18.9122 13.468 18.7365 13.6397C18.5609 13.8113 18.3484 13.8971 18.099 13.8971H13.8895V18.1067C13.8895 18.3567 13.8029 18.568 13.6297 18.7408C13.4564 18.9136 13.2445 19 12.9938 19C12.7431 19 12.532 18.9136 12.3603 18.7408C12.1887 18.568 12.1029 18.3567 12.1029 18.1067V13.8971Z"/></svg>')
|
|
145
|
-
);
|
|
146
|
-
-webkit-mask-image: var(
|
|
147
|
-
--icon-zoom-in,
|
|
148
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 26 26" fill="black"><path d="M12.1029 13.8971H7.89332C7.64334 13.8971 7.43196 13.8105 7.25918 13.6373C7.08639 13.4641 7 13.2521 7 13.0014C7 12.7508 7.08639 12.5396 7.25918 12.368C7.43196 12.1963 7.64334 12.1105 7.89332 12.1105H12.1029V7.90097C12.1029 7.65161 12.1895 7.43912 12.3627 7.26348C12.5359 7.08783 12.7479 7 12.9986 7C13.2492 7 13.4604 7.08783 13.632 7.26348C13.8037 7.43912 13.8895 7.65161 13.8895 7.90097V12.1105H18.099C18.3484 12.1105 18.5609 12.1971 18.7365 12.3703C18.9122 12.5436 19 12.7555 19 13.0062C19 13.2569 18.9122 13.468 18.7365 13.6397C18.5609 13.8113 18.3484 13.8971 18.099 13.8971H13.8895V18.1067C13.8895 18.3567 13.8029 18.568 13.6297 18.7408C13.4564 18.9136 13.2445 19 12.9938 19C12.7431 19 12.532 18.9136 12.3603 18.7408C12.1887 18.568 12.1029 18.3567 12.1029 18.1067V13.8971Z"/></svg>')
|
|
149
|
-
);
|
|
134
|
+
mask-image: var(--icon-zoom-in, svg-load("icons/add.svg"));
|
|
150
135
|
}
|
|
151
136
|
|
|
137
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:remove:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
152
138
|
.deck-widget.deck-widget-zoom button.deck-widget-zoom-out .deck-widget-icon {
|
|
153
|
-
mask-image: var(
|
|
154
|
-
--icon-zoom-out,
|
|
155
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 26 26" fill="black"> wBox="0 0 26 26" fill="none"><path d="M7.89332 13.8866C7.64334 13.8866 7.43196 13.8 7.25918 13.6268C7.08639 13.4535 7 13.2416 7 12.9909C7 12.7403 7.08639 12.5291 7.25918 12.3575C7.43196 12.1858 7.64334 12.1 7.89332 12.1H18.099C18.349 12.1 18.5617 12.1866 18.737 12.3598C18.9123 12.5331 19 12.745 19 12.9957C19 13.2463 18.9123 13.4575 18.737 13.6291C18.5617 13.8008 18.349 13.8866 18.099 13.8866H7.89332Z"/></svg>')
|
|
156
|
-
);
|
|
157
|
-
-webkit-mask-image: var(
|
|
158
|
-
--icon-zoom-out,
|
|
159
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 26 26" fill="black"> wBox="0 0 26 26" fill="none"><path d="M7.89332 13.8866C7.64334 13.8866 7.43196 13.8 7.25918 13.6268C7.08639 13.4535 7 13.2416 7 12.9909C7 12.7403 7.08639 12.5291 7.25918 12.3575C7.43196 12.1858 7.64334 12.1 7.89332 12.1H18.099C18.349 12.1 18.5617 12.1866 18.737 12.3598C18.9123 12.5331 19 12.745 19 12.9957C19 13.2463 18.9123 13.4575 18.737 13.6291C18.5617 13.8008 18.349 13.8866 18.099 13.8866H7.89332Z"/></svg>')
|
|
160
|
-
);
|
|
139
|
+
mask-image: var(--icon-zoom-out, svg-load("icons/remove.svg"));
|
|
161
140
|
}
|
|
162
141
|
|
|
163
142
|
/* Screenshot styles */
|
|
143
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:photo_camera:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
164
144
|
.deck-widget.deck-widget-screenshot button.deck-widget-camera .deck-widget-icon {
|
|
165
|
-
mask-image: var(
|
|
166
|
-
--icon-camera,
|
|
167
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 -960 960 960" fill="black"><path d="M480-260q75 0 127.5-52.5T660-440q0-75-52.5-127.5T480-620q-75 0-127.5 52.5T300-440q0 75 52.5 127.5T480-260Zm0-80q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29ZM160-120q-33 0-56.5-23.5T80-200v-480q0-33 23.5-56.5T160-760h126l74-80h240l74 80h126q33 0 56.5 23.5T880-680v480q0 33-23.5 56.5T800-120H160Zm0-80h640v-480H638l-73-80H395l-73 80H160v480Zm320-240Z"/></svg>')
|
|
168
|
-
);
|
|
169
|
-
-webkit-mask-image: var(
|
|
170
|
-
--icon-camera,
|
|
171
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 -960 960 960" fill="black"><path d="M480-260q75 0 127.5-52.5T660-440q0-75-52.5-127.5T480-620q-75 0-127.5 52.5T300-440q0 75 52.5 127.5T480-260Zm0-80q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29ZM160-120q-33 0-56.5-23.5T80-200v-480q0-33 23.5-56.5T160-760h126l74-80h240l74 80h126q33 0 56.5 23.5T880-680v480q0 33-23.5 56.5T800-120H160Zm0-80h640v-480H638l-73-80H395l-73 80H160v480Zm320-240Z"/></svg>')
|
|
172
|
-
);
|
|
145
|
+
mask-image: var(--icon-camera, svg-load("icons/photo-camera.svg"));
|
|
173
146
|
}
|
|
174
147
|
|
|
175
148
|
/* Theme widget styles */
|
|
149
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:light_mode:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
176
150
|
.deck-widget.deck-widget-theme button.deck-widget-sun .deck-widget-icon {
|
|
177
|
-
mask-image: var(
|
|
178
|
-
--icon-sun,
|
|
179
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="black" stroke="black"><g ><circle cx="12" cy="12" r="6" /><line x1="12" y1="1" x2="12" y2="3" /><line x1="12" y1="21" x2="12" y2="23" /><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" /><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" /><line x1="1" y1="12" x2="3" y2="12" /><line x1="21" y1="12" x2="23" y2="12" /><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" /><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" /></g></svg>')
|
|
180
|
-
);
|
|
151
|
+
mask-image: var(--icon-sun, svg-load("icons/light-mode.svg"));
|
|
181
152
|
}
|
|
182
153
|
|
|
154
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:dark_mode:FILL@0;wght@400;GRAD@0;opsz@24 */
|
|
183
155
|
.deck-widget.deck-widget-theme button.deck-widget-moon .deck-widget-icon {
|
|
184
|
-
mask-image: var(
|
|
185
|
-
--icon-moon,
|
|
186
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" ><circle cx="12" cy="12" r="6" fill="black" mask="url(%23moon-mask)" /><mask id="moon-mask" viewBox="0 0 24 24" ><rect x="0" y="0" width="24" height="24" fill="white" /><circle cx="24" cy="10" r="12" fill="black"/></mask></svg>')
|
|
187
|
-
);
|
|
188
|
-
-webbit-mask-image: var(
|
|
189
|
-
--icon-moon,
|
|
190
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><circle x="12" cy="12" r="6" /></svg>')
|
|
191
|
-
);
|
|
156
|
+
mask-image: var(--icon-moon, svg-load("icons/dark-mode.svg"));
|
|
192
157
|
}
|
|
193
158
|
|
|
194
159
|
/* Reset view styles */
|
|
160
|
+
/* Icon source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:reset_focus:FILL@1;wght@400;GRAD@0;opsz@24 */
|
|
195
161
|
.deck-widget.deck-widget-reset-view button.deck-widget-reset-focus .deck-widget-icon {
|
|
196
|
-
mask-image: var(
|
|
197
|
-
--icon-camera,
|
|
198
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M480-320v-100q0-25 17.5-42.5T540-480h100v60H540v100h-60Zm60 240q-25 0-42.5-17.5T480-140v-100h60v100h100v60H540Zm280-240v-100H720v-60h100q25 0 42.5 17.5T880-420v100h-60ZM720-80v-60h100v-100h60v100q0 25-17.5 42.5T820-80H720Zm111-480h-83q-26-88-99-144t-169-56q-117 0-198.5 81.5T200-480q0 72 32.5 132t87.5 98v-110h80v240H160v-80h94q-62-50-98-122.5T120-480q0-75 28.5-140.5t77-114q48.5-48.5 114-77T480-840q129 0 226.5 79.5T831-560Z"/></svg>')
|
|
199
|
-
);
|
|
200
|
-
-webkit-mask-image: var(
|
|
201
|
-
--icon-camera,
|
|
202
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M480-320v-100q0-25 17.5-42.5T540-480h100v60H540v100h-60Zm60 240q-25 0-42.5-17.5T480-140v-100h60v100h100v60H540Zm280-240v-100H720v-60h100q25 0 42.5 17.5T880-420v100h-60ZM720-80v-60h100v-100h60v100q0 25-17.5 42.5T820-80H720Zm111-480h-83q-26-88-99-144t-169-56q-117 0-198.5 81.5T200-480q0 72 32.5 132t87.5 98v-110h80v240H160v-80h94q-62-50-98-122.5T120-480q0-75 28.5-140.5t77-114q48.5-48.5 114-77T480-840q129 0 226.5 79.5T831-560Z"/></svg>')
|
|
203
|
-
);
|
|
162
|
+
mask-image: var(--icon-reset-view, svg-load("icons/reset-focus.svg"));
|
|
204
163
|
}
|
|
205
164
|
|
|
206
165
|
/* Timeline widget styles */
|
|
@@ -211,10 +170,10 @@
|
|
|
211
170
|
right: 0;
|
|
212
171
|
pointer-events: all;
|
|
213
172
|
}
|
|
214
|
-
.deck-widget.deck-widget-timeline[data-placement^=top-] {
|
|
173
|
+
.deck-widget.deck-widget-timeline[data-placement^='top-'] {
|
|
215
174
|
top: 0;
|
|
216
175
|
}
|
|
217
|
-
.deck-widget.deck-widget-timeline[data-placement^=bottom-] {
|
|
176
|
+
.deck-widget.deck-widget-timeline[data-placement^='bottom-'] {
|
|
218
177
|
bottom: 0;
|
|
219
178
|
}
|
|
220
179
|
.deck-widget.deck-widget-timeline .deck-widget-button-group {
|
|
@@ -223,24 +182,10 @@
|
|
|
223
182
|
padding: var(--widget-margin, 12px);
|
|
224
183
|
}
|
|
225
184
|
.deck-widget-timeline button.deck-widget-timeline-pause .deck-widget-icon {
|
|
226
|
-
mask-image: var(
|
|
227
|
-
--icon-pause,
|
|
228
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M560-200v-560h160v560H560Zm-320 0v-560h160v560H240Z"/></svg>')
|
|
229
|
-
);
|
|
230
|
-
-webkit-mask-image: var(
|
|
231
|
-
--icon-pause,
|
|
232
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M560-200v-560h160v560H560Zm-320 0v-560h160v560H240Z"/></svg>')
|
|
233
|
-
);
|
|
185
|
+
mask-image: var(--icon-pause, svg-load("icons/pause.svg"));
|
|
234
186
|
}
|
|
235
187
|
.deck-widget-timeline button.deck-widget-timeline-play .deck-widget-icon {
|
|
236
|
-
mask-image: var(
|
|
237
|
-
--icon-play,
|
|
238
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M320-200v-560l440 280-440 280Z"/></svg>')
|
|
239
|
-
);
|
|
240
|
-
-webkit-mask-image: var(
|
|
241
|
-
--icon-play,
|
|
242
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="black"><path d="M320-200v-560l440 280-440 280Z"/></svg>')
|
|
243
|
-
);
|
|
188
|
+
mask-image: var(--icon-play, svg-load("icons/play-arrow.svg"));
|
|
244
189
|
}
|
|
245
190
|
.deck-widget-timeline-label {
|
|
246
191
|
position: relative;
|
|
@@ -269,14 +214,7 @@
|
|
|
269
214
|
}
|
|
270
215
|
|
|
271
216
|
.deck-widget.deck-widget-loading button.deck-widget-spinner .deck-widget-icon {
|
|
272
|
-
mask-image: var(
|
|
273
|
-
--loading-icon,
|
|
274
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" ><path d="M21 12a9 9 0 1 1-6.219-8.56" /></svg>')
|
|
275
|
-
);
|
|
276
|
-
-webkit-mask-image: var(
|
|
277
|
-
--loading-icon,
|
|
278
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" ><path d="M21 12a9 9 0 1 1-6.219-8.56" /></svg>')
|
|
279
|
-
);
|
|
217
|
+
mask-image: var(--loading-icon, svg-load("icons/loading.svg"));
|
|
280
218
|
}
|
|
281
219
|
|
|
282
220
|
/* Scale styles */
|
|
@@ -315,7 +253,8 @@
|
|
|
315
253
|
border-radius: calc(var(--button-corner-radius, 8px) - 1px);
|
|
316
254
|
border-top-right-radius: 0;
|
|
317
255
|
border-bottom-right-radius: 0;
|
|
318
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
256
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
257
|
+
sans-serif;
|
|
319
258
|
font-size: 13px;
|
|
320
259
|
}
|
|
321
260
|
|
|
@@ -339,7 +278,8 @@
|
|
|
339
278
|
border-radius: var(--button-corner-radius, 8px);
|
|
340
279
|
box-shadow: var(--button-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
341
280
|
color: rgb(220, 80, 80);
|
|
342
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
281
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
282
|
+
sans-serif;
|
|
343
283
|
font-size: 12px;
|
|
344
284
|
text-align: center;
|
|
345
285
|
}
|
|
@@ -377,10 +317,8 @@
|
|
|
377
317
|
width: 12px;
|
|
378
318
|
height: 12px;
|
|
379
319
|
background-color: var(--button-icon-idle, rgba(97, 97, 102, 1));
|
|
380
|
-
mask-image:
|
|
381
|
-
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>');
|
|
320
|
+
mask-image: svg-load("icons/dropdown.svg");
|
|
382
321
|
mask-size: contain;
|
|
383
|
-
-webkit-mask-size: contain;
|
|
384
322
|
transition: transform 0.2s ease;
|
|
385
323
|
}
|
|
386
324
|
|
|
@@ -405,7 +343,8 @@
|
|
|
405
343
|
border: var(--menu-border, unset);
|
|
406
344
|
border-radius: var(--button-corner-radius, 8px);
|
|
407
345
|
box-shadow: var(--menu-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
408
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
346
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
347
|
+
sans-serif;
|
|
409
348
|
font-size: 13px;
|
|
410
349
|
}
|
|
411
350
|
|
|
@@ -432,9 +371,7 @@
|
|
|
432
371
|
vertical-align: text-bottom;
|
|
433
372
|
background-color: var(--menu-text, rgb(24, 24, 26));
|
|
434
373
|
mask-size: contain;
|
|
435
|
-
-webkit-mask-size: contain;
|
|
436
374
|
mask-repeat: no-repeat;
|
|
437
|
-
-webkit-mask-repeat: no-repeat;
|
|
438
375
|
}
|
|
439
376
|
|
|
440
377
|
/* Stats styles */
|
|
@@ -505,14 +442,7 @@
|
|
|
505
442
|
box-shadow: none;
|
|
506
443
|
}
|
|
507
444
|
.deck-widget-popup-content button.deck-widget-popup-close-button .deck-widget-icon {
|
|
508
|
-
mask-image: var(
|
|
509
|
-
--icon-close,
|
|
510
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 -120 120 120" fill="black"><path d="m32-25-7-7 28-28-28-28 7-7 28 28 28-28 7 7-28 28 28 28-7 7-28-28-28 28Z"/></svg>')
|
|
511
|
-
);
|
|
512
|
-
-webkit-mask-image: var(
|
|
513
|
-
--icon-close,
|
|
514
|
-
url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 -120 120 120" fill="black"><path d="m32-25-7-7 28-28-28-28 7-7 28 28 28-28 7 7-28 28 28 28-7 7-28-28-28 28Z"/></svg>')
|
|
515
|
-
);
|
|
445
|
+
mask-image: var(--icon-close, svg-load("icons/close.svg"));
|
|
516
446
|
}
|
|
517
447
|
|
|
518
448
|
/** Range input */
|
|
@@ -599,10 +529,10 @@
|
|
|
599
529
|
right: 0;
|
|
600
530
|
}
|
|
601
531
|
.deck-widget-range--vertical .deck-widget-range__button--start .deck-widget-icon {
|
|
602
|
-
mask-image:
|
|
532
|
+
mask-image: svg-load("icons/chevron-up.svg");
|
|
603
533
|
}
|
|
604
534
|
.deck-widget-range--vertical .deck-widget-range__button--end .deck-widget-icon {
|
|
605
|
-
mask-image:
|
|
535
|
+
mask-image: svg-load("icons/chevron-down.svg");
|
|
606
536
|
}
|
|
607
537
|
.deck-widget-range--horizontal .deck-widget-range__track {
|
|
608
538
|
height: var(--range-track-size, 16px);
|
|
@@ -623,10 +553,10 @@
|
|
|
623
553
|
bottom: 0;
|
|
624
554
|
}
|
|
625
555
|
.deck-widget-range--horizontal .deck-widget-range__button--start .deck-widget-icon {
|
|
626
|
-
mask-image:
|
|
556
|
+
mask-image: svg-load("icons/chevron-left.svg");
|
|
627
557
|
}
|
|
628
558
|
.deck-widget-range--horizontal .deck-widget-range__button--end .deck-widget-icon {
|
|
629
|
-
mask-image:
|
|
559
|
+
mask-image: svg-load("icons/chevron-right.svg");
|
|
630
560
|
}
|
|
631
561
|
|
|
632
562
|
/** Scrollbar */
|
|
@@ -637,20 +567,20 @@
|
|
|
637
567
|
top: var(--range-step-button-size, 24px);
|
|
638
568
|
height: calc(100% - var(--range-step-button-size, 24px) * 2);
|
|
639
569
|
}
|
|
640
|
-
.deck-widget-scrollbar[data-placement
|
|
570
|
+
.deck-widget-scrollbar[data-placement$='-left'] .deck-widget-range--vertical {
|
|
641
571
|
left: 0;
|
|
642
572
|
}
|
|
643
|
-
.deck-widget-scrollbar[data-placement
|
|
573
|
+
.deck-widget-scrollbar[data-placement$='-right'] .deck-widget-range--vertical {
|
|
644
574
|
right: 0;
|
|
645
575
|
}
|
|
646
576
|
.deck-widget-scrollbar .deck-widget-range--horizontal {
|
|
647
577
|
left: var(--range-step-button-size, 24px);
|
|
648
578
|
width: calc(100% - var(--range-step-button-size, 24px) * 2);
|
|
649
579
|
}
|
|
650
|
-
.deck-widget-scrollbar[data-placement^=top-] .deck-widget-range--horizontal {
|
|
580
|
+
.deck-widget-scrollbar[data-placement^='top-'] .deck-widget-range--horizontal {
|
|
651
581
|
top: 0;
|
|
652
582
|
}
|
|
653
|
-
.deck-widget-scrollbar[data-placement^=bottom-] .deck-widget-range--horizontal {
|
|
583
|
+
.deck-widget-scrollbar[data-placement^='bottom-'] .deck-widget-range--horizontal {
|
|
654
584
|
bottom: 0;
|
|
655
585
|
}
|
|
656
586
|
|
|
@@ -697,3 +627,26 @@
|
|
|
697
627
|
margin-top: -1px;
|
|
698
628
|
cursor: row-resize;
|
|
699
629
|
}
|
|
630
|
+
|
|
631
|
+
/* Tooltip */
|
|
632
|
+
.deck-widget-tooltip-trigger {
|
|
633
|
+
display: contents;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
.deck-widget-tooltip {
|
|
637
|
+
z-index: var(--tooltip-z-index, 1000);
|
|
638
|
+
pointer-events: none;
|
|
639
|
+
width: max-content;
|
|
640
|
+
max-width: var(--tooltip-max-width, 240px);
|
|
641
|
+
padding: 4px 8px;
|
|
642
|
+
border-radius: calc(var(--button-corner-radius, 8px) - 2px);
|
|
643
|
+
box-shadow: var(--menu-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
644
|
+
background: var(--menu-background, #fff);
|
|
645
|
+
backdrop-filter: var(--menu-backdrop-filter, unset);
|
|
646
|
+
color: var(--menu-text, rgb(24, 24, 26));
|
|
647
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
648
|
+
font-size: 12px;
|
|
649
|
+
line-height: 1.4;
|
|
650
|
+
overflow-wrap: anywhere;
|
|
651
|
+
white-space: normal;
|
|
652
|
+
}
|
package/src/theme-widget.tsx
CHANGED
|
@@ -17,10 +17,14 @@ export type ThemeWidgetProps = WidgetProps & {
|
|
|
17
17
|
viewId?: string | null;
|
|
18
18
|
/** Tooltip message when dark mode is selected. */
|
|
19
19
|
lightModeLabel?: string;
|
|
20
|
+
/** Custom tooltip content when dark mode is selected. Overrides lightModeLabel for tooltip display. */
|
|
21
|
+
lightModeTooltip?: string | HTMLElement | false;
|
|
20
22
|
/** Styles for light mode theme */
|
|
21
23
|
lightModeTheme?: DeckWidgetTheme;
|
|
22
24
|
/** Tooltip message when light mode is selected. */
|
|
23
25
|
darkModeLabel?: string;
|
|
26
|
+
/** Custom tooltip content when light mode is selected. Overrides darkModeLabel for tooltip display. */
|
|
27
|
+
darkModeTooltip?: string | HTMLElement | false;
|
|
24
28
|
/** Styles for dark mode theme */
|
|
25
29
|
darkModeTheme?: DeckWidgetTheme;
|
|
26
30
|
/** Initial theme mode for uncontrolled usage. 'auto' reads the browser default setting */
|
|
@@ -45,8 +49,10 @@ export class ThemeWidget extends Widget<ThemeWidgetProps> {
|
|
|
45
49
|
placement: 'top-left',
|
|
46
50
|
viewId: null,
|
|
47
51
|
lightModeLabel: 'Light Mode',
|
|
52
|
+
lightModeTooltip: undefined!,
|
|
48
53
|
lightModeTheme: LightGlassTheme,
|
|
49
54
|
darkModeLabel: 'Dark Mode',
|
|
55
|
+
darkModeTooltip: undefined!,
|
|
50
56
|
darkModeTheme: DarkGlassTheme,
|
|
51
57
|
initialThemeMode: 'auto',
|
|
52
58
|
themeMode: undefined!,
|
|
@@ -72,7 +78,7 @@ export class ThemeWidget extends Widget<ThemeWidgetProps> {
|
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
onRenderHTML(rootElement: HTMLElement): void {
|
|
75
|
-
const {lightModeLabel, darkModeLabel} = this.props;
|
|
81
|
+
const {lightModeLabel, darkModeLabel, lightModeTooltip, darkModeTooltip} = this.props;
|
|
76
82
|
const currentMode = this.getThemeMode();
|
|
77
83
|
this._applyTheme(currentMode, rootElement);
|
|
78
84
|
|
|
@@ -80,6 +86,7 @@ export class ThemeWidget extends Widget<ThemeWidgetProps> {
|
|
|
80
86
|
<IconButton
|
|
81
87
|
onClick={this._handleClick.bind(this)}
|
|
82
88
|
label={currentMode === 'dark' ? darkModeLabel : lightModeLabel}
|
|
89
|
+
tooltip={currentMode === 'dark' ? darkModeTooltip : lightModeTooltip}
|
|
83
90
|
className={currentMode === 'dark' ? 'deck-widget-moon' : 'deck-widget-sun'}
|
|
84
91
|
/>,
|
|
85
92
|
rootElement
|
package/src/themes.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type DeckWidgetTheme = {
|
|
|
10
10
|
'--widget-margin'?: string;
|
|
11
11
|
// button and button group
|
|
12
12
|
'--button-size'?: string;
|
|
13
|
+
'--icon-size'?: string;
|
|
13
14
|
'--button-corner-radius'?: string;
|
|
14
15
|
'--button-background'?: string;
|
|
15
16
|
'--button-stroke'?: string;
|
|
@@ -42,6 +43,7 @@ export type DeckWidgetTheme = {
|
|
|
42
43
|
export const LightTheme = {
|
|
43
44
|
'--widget-margin': '12px',
|
|
44
45
|
'--button-size': '28px',
|
|
46
|
+
'--icon-size': '75%',
|
|
45
47
|
'--button-corner-radius': '8px',
|
|
46
48
|
'--button-background': '#fff',
|
|
47
49
|
'--button-stroke': 'rgba(255, 255, 255, 0.3)',
|
|
@@ -71,6 +73,7 @@ export const LightTheme = {
|
|
|
71
73
|
export const DarkTheme = {
|
|
72
74
|
'--widget-margin': '12px',
|
|
73
75
|
'--button-size': '28px',
|
|
76
|
+
'--icon-size': '75%',
|
|
74
77
|
'--button-corner-radius': '8px',
|
|
75
78
|
'--button-background': 'rgba(18, 18, 20, 1)',
|
|
76
79
|
'--button-stroke': 'rgba(18, 18, 20, 0.30)',
|
|
@@ -100,6 +103,7 @@ export const DarkTheme = {
|
|
|
100
103
|
export const LightGlassTheme = {
|
|
101
104
|
'--widget-margin': '12px',
|
|
102
105
|
'--button-size': '28px',
|
|
106
|
+
'--icon-size': '75%',
|
|
103
107
|
'--button-corner-radius': '8px',
|
|
104
108
|
'--button-background': 'rgba(255, 255, 255, 0.6)',
|
|
105
109
|
'--button-stroke': 'rgba(255, 255, 255, 0.3)',
|
|
@@ -130,6 +134,7 @@ export const LightGlassTheme = {
|
|
|
130
134
|
export const DarkGlassTheme = {
|
|
131
135
|
'--widget-margin': '12px',
|
|
132
136
|
'--button-size': '28px',
|
|
137
|
+
'--icon-size': '75%',
|
|
133
138
|
'--button-corner-radius': '8px',
|
|
134
139
|
'--button-background': 'rgba(18, 18, 20, 0.75)',
|
|
135
140
|
'--button-stroke': 'rgba(18, 18, 20, 0.30)',
|
package/src/timeline-widget.tsx
CHANGED
|
@@ -56,6 +56,10 @@ export type TimelineWidgetProps = WidgetProps & {
|
|
|
56
56
|
onPlayingChange?: (playing: boolean) => void;
|
|
57
57
|
/** Callback to get label from time value */
|
|
58
58
|
formatLabel?: (value: number) => string;
|
|
59
|
+
/** Custom tooltip content. Overrides label for tooltip display. */
|
|
60
|
+
playTooltip?: string | HTMLElement | false;
|
|
61
|
+
/** Custom tooltip content. Overrides label for tooltip display. */
|
|
62
|
+
pauseTooltip?: string | HTMLElement | false;
|
|
59
63
|
};
|
|
60
64
|
|
|
61
65
|
export class TimelineWidget extends Widget<TimelineWidgetProps> {
|
|
@@ -101,7 +105,9 @@ export class TimelineWidget extends Widget<TimelineWidgetProps> {
|
|
|
101
105
|
playInterval: 1000,
|
|
102
106
|
playing: undefined!,
|
|
103
107
|
onPlayingChange: () => {},
|
|
104
|
-
formatLabel: String
|
|
108
|
+
formatLabel: String,
|
|
109
|
+
playTooltip: undefined!,
|
|
110
|
+
pauseTooltip: undefined!
|
|
105
111
|
};
|
|
106
112
|
|
|
107
113
|
constructor(props: TimelineWidgetProps = {}) {
|
|
@@ -151,7 +157,7 @@ export class TimelineWidget extends Widget<TimelineWidgetProps> {
|
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
onRenderHTML(rootElement: HTMLElement): void {
|
|
154
|
-
const {timeRange, step, formatLabel} = this.props;
|
|
160
|
+
const {timeRange, step, formatLabel, playTooltip, pauseTooltip} = this.props;
|
|
155
161
|
const isPlaying = this.getPlaying();
|
|
156
162
|
const currentTime = this.getTime();
|
|
157
163
|
|
|
@@ -162,12 +168,14 @@ export class TimelineWidget extends Widget<TimelineWidgetProps> {
|
|
|
162
168
|
{isPlaying ? (
|
|
163
169
|
<IconButton
|
|
164
170
|
label="Pause"
|
|
171
|
+
tooltip={pauseTooltip}
|
|
165
172
|
className="deck-widget-timeline-pause"
|
|
166
173
|
onClick={this.handlePlayPause}
|
|
167
174
|
/>
|
|
168
175
|
) : (
|
|
169
176
|
<IconButton
|
|
170
177
|
label="Play"
|
|
178
|
+
tooltip={playTooltip}
|
|
171
179
|
className="deck-widget-timeline-play"
|
|
172
180
|
onClick={this.handlePlayPause}
|
|
173
181
|
/>
|
package/src/toggle-widget.tsx
CHANGED
|
@@ -20,8 +20,12 @@ export type ToggleWidgetProps = WidgetProps & {
|
|
|
20
20
|
onIcon?: string;
|
|
21
21
|
/** Tooltip label */
|
|
22
22
|
label?: string;
|
|
23
|
+
/** Custom tooltip content. Overrides label for tooltip display. */
|
|
24
|
+
tooltip?: string | HTMLElement | false;
|
|
23
25
|
/** Tooltip label when it is checked */
|
|
24
26
|
onLabel?: string;
|
|
27
|
+
/** Custom tooltip content when checked. Overrides onLabel for tooltip display. */
|
|
28
|
+
onTooltip?: string | HTMLElement | false;
|
|
25
29
|
/** Icon color, a CSS Color string */
|
|
26
30
|
color?: string;
|
|
27
31
|
/** Icon color when it is checked, a CSS Color string */
|
|
@@ -43,7 +47,9 @@ export class ToggleWidget extends Widget<ToggleWidgetProps> {
|
|
|
43
47
|
icon: '',
|
|
44
48
|
onIcon: undefined!,
|
|
45
49
|
label: '',
|
|
50
|
+
tooltip: undefined!,
|
|
46
51
|
onLabel: undefined!,
|
|
52
|
+
onTooltip: undefined!,
|
|
47
53
|
color: '',
|
|
48
54
|
onColor: undefined!,
|
|
49
55
|
onChange: undefined!
|
|
@@ -71,9 +77,11 @@ export class ToggleWidget extends Widget<ToggleWidgetProps> {
|
|
|
71
77
|
style,
|
|
72
78
|
icon,
|
|
73
79
|
label,
|
|
80
|
+
tooltip,
|
|
74
81
|
color,
|
|
75
82
|
onIcon = icon,
|
|
76
83
|
onLabel = label,
|
|
84
|
+
onTooltip,
|
|
77
85
|
onColor = color
|
|
78
86
|
} = this.props;
|
|
79
87
|
const on = this.checked;
|
|
@@ -86,6 +94,7 @@ export class ToggleWidget extends Widget<ToggleWidgetProps> {
|
|
|
86
94
|
style={style as JSX.CSSProperties}
|
|
87
95
|
icon={on ? onIcon : icon}
|
|
88
96
|
label={on ? onLabel : label}
|
|
97
|
+
tooltip={on ? onTooltip : tooltip}
|
|
89
98
|
color={on ? onColor : color}
|
|
90
99
|
onClick={this._toggle}
|
|
91
100
|
/>,
|