@deck.gl/widgets 9.2.8 → 9.2.9
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/dist.dev.js +119 -121
- package/dist/geocoder-widget.d.ts +4 -1
- package/dist/geocoder-widget.d.ts.map +1 -1
- package/dist/geocoder-widget.js +50 -24
- package/dist/geocoder-widget.js.map +1 -1
- package/dist/index.cjs +89 -66
- package/dist/index.cjs.map +2 -2
- package/dist/lib/components/dropdown-menu.d.ts +7 -2
- package/dist/lib/components/dropdown-menu.d.ts.map +1 -1
- package/dist/lib/components/dropdown-menu.js +19 -34
- package/dist/lib/components/dropdown-menu.js.map +1 -1
- package/dist/stylesheet.css +154 -16
- package/dist/themes.d.ts +30 -0
- package/dist/themes.d.ts.map +1 -1
- package/dist/themes.js +28 -4
- package/dist/themes.js.map +1 -1
- package/dist.min.js +2 -2
- package/package.json +2 -2
- package/src/geocoder-widget.tsx +58 -36
- package/src/lib/components/dropdown-menu.tsx +44 -56
- package/src/stylesheet.css +154 -16
- package/src/themes.ts +34 -4
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { type JSX } from 'preact';
|
|
2
|
+
export type MenuItem = string | {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
};
|
|
2
7
|
export type DropdownMenuProps = {
|
|
3
|
-
menuItems:
|
|
8
|
+
menuItems: MenuItem[];
|
|
4
9
|
onSelect: (value: string) => void;
|
|
5
10
|
style?: JSX.CSSProperties;
|
|
6
11
|
};
|
|
7
|
-
export declare const DropdownMenu: (props: DropdownMenuProps) => JSX.Element;
|
|
12
|
+
export declare const DropdownMenu: (props: DropdownMenuProps) => JSX.Element | null;
|
|
8
13
|
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dropdown-menu.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,GAAG,EAAC,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dropdown-menu.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,GAAG,EAAC,MAAM,QAAQ,CAAC;AAGhC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC;CAC3B,CAAC;AAcF,eAAO,MAAM,YAAY,UAAW,iBAAiB,uBA0DpD,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect } from 'preact/hooks';
|
|
3
|
+
function getMenuItemValue(item) {
|
|
4
|
+
return typeof item === 'string' ? item : item.value;
|
|
5
|
+
}
|
|
6
|
+
function getMenuItemLabel(item) {
|
|
7
|
+
return typeof item === 'string' ? item : item.label;
|
|
8
|
+
}
|
|
9
|
+
function getMenuItemIcon(item) {
|
|
10
|
+
return typeof item === 'string' ? undefined : item.icon;
|
|
11
|
+
}
|
|
3
12
|
export const DropdownMenu = (props) => {
|
|
4
13
|
const [isOpen, setIsOpen] = useState(false);
|
|
5
14
|
const dropdownRef = useRef(null);
|
|
@@ -15,41 +24,17 @@ export const DropdownMenu = (props) => {
|
|
|
15
24
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
16
25
|
};
|
|
17
26
|
}, []);
|
|
18
|
-
const handleSelect = (
|
|
19
|
-
props.onSelect(
|
|
27
|
+
const handleSelect = (item) => {
|
|
28
|
+
props.onSelect(getMenuItemValue(item));
|
|
20
29
|
setIsOpen(false);
|
|
21
30
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
border: '1px solid #ccc',
|
|
33
|
-
borderRadius: '4px',
|
|
34
|
-
background: '#fff',
|
|
35
|
-
cursor: 'pointer',
|
|
36
|
-
padding: 0
|
|
37
|
-
}, children: "\u25BC" }), isOpen && (_jsx("ul", { style: {
|
|
38
|
-
position: 'absolute',
|
|
39
|
-
top: '100%',
|
|
40
|
-
right: '100%',
|
|
41
|
-
background: '#fff',
|
|
42
|
-
border: '1px solid #ccc',
|
|
43
|
-
borderRadius: '4px',
|
|
44
|
-
listStyle: 'none',
|
|
45
|
-
padding: '4px 0',
|
|
46
|
-
margin: 0,
|
|
47
|
-
zIndex: 1000,
|
|
48
|
-
minWidth: '200px'
|
|
49
|
-
}, children: props.menuItems.map(item => (_jsx("li", { onClick: () => handleSelect(item), style: {
|
|
50
|
-
padding: '4px 8px',
|
|
51
|
-
cursor: 'pointer',
|
|
52
|
-
whiteSpace: 'nowrap'
|
|
53
|
-
}, children: item }, item))) }))] }));
|
|
31
|
+
// Don't render anything if there are no menu items
|
|
32
|
+
if (props.menuItems.length === 0) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return (_jsxs("div", { className: "deck-widget-dropdown-container", ref: dropdownRef, style: props.style, children: [_jsx("button", { className: "deck-widget-dropdown-button", onClick: toggleDropdown, children: _jsx("span", { className: `deck-widget-dropdown-icon ${isOpen ? 'open' : ''}` }) }), isOpen && (_jsx("ul", { className: "deck-widget-dropdown-menu", children: props.menuItems.map(item => {
|
|
36
|
+
const icon = getMenuItemIcon(item);
|
|
37
|
+
return (_jsxs("li", { className: "deck-widget-dropdown-item", onClick: () => handleSelect(item), children: [icon && (_jsx("span", { className: "deck-widget-dropdown-item-icon", style: { maskImage: `url("${icon}")`, WebkitMaskImage: `url("${icon}")` } })), getMenuItemLabel(item)] }, getMenuItemValue(item)));
|
|
38
|
+
}) }))] }));
|
|
54
39
|
};
|
|
55
40
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/lib/components/dropdown-menu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/lib/components/dropdown-menu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAUzD,SAAS,gBAAgB,CAAC,IAAc;IACtC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AACtD,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAc;IACtC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AACtD,CAAC;AAED,SAAS,eAAe,CAAC,IAAc;IACrC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC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,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBAC1B,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO,CACL,cACE,SAAS,EAAC,2BAA2B,EAErC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,aAEhC,IAAI,IAAI,CACP,eACE,SAAS,EAAC,gCAAgC,EAC1C,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,IAAI,IAAI,EAAE,eAAe,EAAE,QAAQ,IAAI,IAAI,EAAC,GACvE,CACH,EACA,gBAAgB,CAAC,IAAI,CAAC,KATlB,gBAAgB,CAAC,IAAI,CAAC,CAUxB,CACN,CAAC;gBACJ,CAAC,CAAC,GACC,CACN,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/stylesheet.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
.deck-widget-button-group {
|
|
25
25
|
width: calc(var(--button-size, 28px) - 2);
|
|
26
26
|
height: calc((var(--button-size, 28px) * 2) - 1);
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
flex-direction: row;
|
|
29
29
|
padding: 1px;
|
|
30
30
|
gap: 1px;
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
border-top-right-radius: 0;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
70
69
|
.deck-widget-button-group.horizontal > *:not(:last-child),
|
|
71
70
|
.deck-widget-button-group.horizontal > *:not(:last-child) > button {
|
|
72
71
|
border-top-right-radius: 0;
|
|
@@ -192,14 +191,14 @@
|
|
|
192
191
|
.deck-widget.deck-widget-reset-view button.deck-widget-reset-focus .deck-widget-icon {
|
|
193
192
|
mask-image: var(
|
|
194
193
|
--icon-camera,
|
|
195
|
-
|
|
194
|
+
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>')
|
|
196
195
|
);
|
|
197
196
|
-webkit-mask-image: var(
|
|
198
197
|
--icon-camera,
|
|
199
|
-
|
|
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>')
|
|
200
199
|
);
|
|
201
200
|
}
|
|
202
|
-
|
|
201
|
+
|
|
203
202
|
/* Timeline widget styles */
|
|
204
203
|
.deck-widget.deck-widget-timeline {
|
|
205
204
|
display: flex;
|
|
@@ -248,7 +247,7 @@
|
|
|
248
247
|
|
|
249
248
|
.deck-widget.deck-widget-loading button.deck-widget-spinner .deck-widget-icon {
|
|
250
249
|
mask-image: var(
|
|
251
|
-
--loading-icon,
|
|
250
|
+
--loading-icon,
|
|
252
251
|
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>')
|
|
253
252
|
);
|
|
254
253
|
-webkit-mask-image: var(
|
|
@@ -267,7 +266,151 @@
|
|
|
267
266
|
/* Geocoder styles */
|
|
268
267
|
.deck-widget .deck-widget-geocoder {
|
|
269
268
|
pointer-events: auto;
|
|
269
|
+
position: relative;
|
|
270
|
+
z-index: 1;
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
flex-wrap: wrap;
|
|
274
|
+
background: var(--button-stroke, rgba(255, 255, 255, 0.3));
|
|
275
|
+
border-radius: var(--button-corner-radius, 8px);
|
|
276
|
+
box-shadow: var(--button-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
277
|
+
padding: 1px;
|
|
278
|
+
gap: 1px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.deck-widget .deck-widget-geocoder-input {
|
|
282
|
+
flex: 1 1 auto;
|
|
283
|
+
min-width: 200px;
|
|
284
|
+
height: calc(var(--button-size, 28px) - 2px);
|
|
285
|
+
margin: 0;
|
|
286
|
+
padding: 0 8px;
|
|
287
|
+
box-sizing: border-box;
|
|
288
|
+
background: var(--button-background, #fff);
|
|
289
|
+
backdrop-filter: var(--button-backdrop-filter, unset);
|
|
290
|
+
color: var(--button-text, rgb(24, 24, 26));
|
|
291
|
+
border: var(--button-inner-stroke, unset);
|
|
292
|
+
border-radius: calc(var(--button-corner-radius, 8px) - 1px);
|
|
293
|
+
border-top-right-radius: 0;
|
|
294
|
+
border-bottom-right-radius: 0;
|
|
295
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
296
|
+
font-size: 13px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.deck-widget .deck-widget-geocoder-input:focus {
|
|
300
|
+
outline: none;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.deck-widget .deck-widget-geocoder-input::placeholder {
|
|
304
|
+
color: var(--button-icon-idle, rgba(97, 97, 102, 1));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.deck-widget .deck-widget-geocoder-error {
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: calc(100% + var(--menu-gap, 4px));
|
|
310
|
+
left: 1px;
|
|
311
|
+
right: 1px;
|
|
312
|
+
padding: 6px 10px;
|
|
313
|
+
background: var(--button-background, #fff);
|
|
314
|
+
backdrop-filter: var(--button-backdrop-filter, unset);
|
|
315
|
+
border: var(--button-inner-stroke, unset);
|
|
316
|
+
border-radius: var(--button-corner-radius, 8px);
|
|
317
|
+
box-shadow: var(--button-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
318
|
+
color: rgb(220, 80, 80);
|
|
319
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
320
|
+
font-size: 12px;
|
|
321
|
+
text-align: center;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* When dropdown is not present, input should have full rounded corners */
|
|
325
|
+
.deck-widget .deck-widget-geocoder-input:last-child {
|
|
326
|
+
border-top-right-radius: calc(var(--button-corner-radius, 8px) - 1px);
|
|
327
|
+
border-bottom-right-radius: calc(var(--button-corner-radius, 8px) - 1px);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Dropdown menu styles */
|
|
331
|
+
.deck-widget .deck-widget-dropdown-container {
|
|
332
|
+
position: static;
|
|
333
|
+
display: inline-block;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.deck-widget .deck-widget-dropdown-button {
|
|
337
|
+
width: calc(var(--button-size, 28px) - 2px);
|
|
338
|
+
height: calc(var(--button-size, 28px) - 2px);
|
|
339
|
+
display: flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
justify-content: center;
|
|
342
|
+
padding: 0;
|
|
270
343
|
cursor: pointer;
|
|
344
|
+
background: var(--button-background, #fff);
|
|
345
|
+
backdrop-filter: var(--button-backdrop-filter, unset);
|
|
346
|
+
border: var(--button-inner-stroke, unset);
|
|
347
|
+
border-radius: calc(var(--button-corner-radius, 8px) - 1px);
|
|
348
|
+
border-top-left-radius: 0;
|
|
349
|
+
border-bottom-left-radius: 0;
|
|
350
|
+
outline: none;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.deck-widget .deck-widget-dropdown-icon {
|
|
354
|
+
width: 12px;
|
|
355
|
+
height: 12px;
|
|
356
|
+
background-color: var(--button-icon-idle, rgba(97, 97, 102, 1));
|
|
357
|
+
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>');
|
|
358
|
+
-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>');
|
|
359
|
+
mask-size: contain;
|
|
360
|
+
-webkit-mask-size: contain;
|
|
361
|
+
transition: transform 0.2s ease;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.deck-widget .deck-widget-dropdown-icon.open {
|
|
365
|
+
transform: rotate(180deg);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.deck-widget .deck-widget-dropdown-button:hover .deck-widget-dropdown-icon {
|
|
369
|
+
background-color: var(--button-icon-hover, rgba(24, 24, 26, 1));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.deck-widget .deck-widget-dropdown-menu {
|
|
373
|
+
position: absolute;
|
|
374
|
+
top: calc(100% + var(--menu-gap, 4px));
|
|
375
|
+
left: 1px;
|
|
376
|
+
right: 1px;
|
|
377
|
+
margin: 0;
|
|
378
|
+
padding: 4px 0;
|
|
379
|
+
list-style: none;
|
|
380
|
+
z-index: 1000;
|
|
381
|
+
background: var(--menu-background, #fff);
|
|
382
|
+
backdrop-filter: var(--menu-backdrop-filter, unset);
|
|
383
|
+
border: var(--menu-border, unset);
|
|
384
|
+
border-radius: var(--button-corner-radius, 8px);
|
|
385
|
+
box-shadow: var(--menu-shadow, 0px 0px 8px 0px rgba(0, 0, 0, 0.25));
|
|
386
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
387
|
+
font-size: 13px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.deck-widget .deck-widget-dropdown-item {
|
|
391
|
+
padding: 8px 12px;
|
|
392
|
+
cursor: pointer;
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
text-overflow: ellipsis;
|
|
396
|
+
color: var(--menu-text, rgb(24, 24, 26));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.deck-widget .deck-widget-dropdown-item:hover {
|
|
400
|
+
background: var(--menu-item-hover, rgba(128, 128, 128, 0.15));
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.deck-widget .deck-widget-dropdown-item-icon {
|
|
404
|
+
display: inline-block;
|
|
405
|
+
width: 16px;
|
|
406
|
+
height: 16px;
|
|
407
|
+
margin-right: 8px;
|
|
408
|
+
vertical-align: text-bottom;
|
|
409
|
+
background-color: var(--menu-text, rgb(24, 24, 26));
|
|
410
|
+
mask-size: contain;
|
|
411
|
+
-webkit-mask-size: contain;
|
|
412
|
+
mask-repeat: no-repeat;
|
|
413
|
+
-webkit-mask-repeat: no-repeat;
|
|
271
414
|
}
|
|
272
415
|
|
|
273
416
|
/* Stats styles */
|
|
@@ -281,16 +424,11 @@
|
|
|
281
424
|
line-height: 1.6;
|
|
282
425
|
font-family:
|
|
283
426
|
'SF Mono',
|
|
284
|
-
/* macOS */
|
|
285
|
-
'
|
|
286
|
-
/*
|
|
287
|
-
'
|
|
288
|
-
/*
|
|
289
|
-
'DejaVu Sans Mono',
|
|
290
|
-
/* Linux */
|
|
291
|
-
'Liberation Mono',
|
|
292
|
-
/* Linux */
|
|
293
|
-
monospace;
|
|
427
|
+
/* macOS */ 'Menlo',
|
|
428
|
+
/* macOS */ 'Consolas',
|
|
429
|
+
/* Windows */ 'DejaVu Sans Mono',
|
|
430
|
+
/* Linux */ 'Liberation Mono',
|
|
431
|
+
/* Linux */ monospace;
|
|
294
432
|
background-color: var(--button-background, #fff);
|
|
295
433
|
color: var(--button-text, rgb(24, 24, 26));
|
|
296
434
|
}
|
package/dist/themes.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export type DeckWidgetTheme = {
|
|
|
16
16
|
'--icon-compass-north-color'?: string;
|
|
17
17
|
'--icon-compass-south-color'?: string;
|
|
18
18
|
'--menu-gap'?: string;
|
|
19
|
+
'--menu-background'?: string;
|
|
20
|
+
'--menu-backdrop-filter'?: string;
|
|
21
|
+
'--menu-border'?: string;
|
|
22
|
+
'--menu-shadow'?: string;
|
|
23
|
+
'--menu-text'?: string;
|
|
24
|
+
'--menu-item-hover'?: string;
|
|
19
25
|
};
|
|
20
26
|
export declare const LightTheme: {
|
|
21
27
|
readonly '--widget-margin': "12px";
|
|
@@ -32,6 +38,12 @@ export declare const LightTheme: {
|
|
|
32
38
|
readonly '--icon-compass-north-color': "rgb(240, 92, 68)";
|
|
33
39
|
readonly '--icon-compass-south-color': "rgb(204, 204, 204)";
|
|
34
40
|
readonly '--menu-gap': "4px";
|
|
41
|
+
readonly '--menu-background': "#fff";
|
|
42
|
+
readonly '--menu-backdrop-filter': "unset";
|
|
43
|
+
readonly '--menu-border': "unset";
|
|
44
|
+
readonly '--menu-shadow': "0px 0px 8px 0px rgba(0, 0, 0, 0.25)";
|
|
45
|
+
readonly '--menu-text': "rgb(24, 24, 26, 1)";
|
|
46
|
+
readonly '--menu-item-hover': "rgba(0, 0, 0, 0.08)";
|
|
35
47
|
};
|
|
36
48
|
export declare const DarkTheme: {
|
|
37
49
|
readonly '--widget-margin': "12px";
|
|
@@ -48,6 +60,12 @@ export declare const DarkTheme: {
|
|
|
48
60
|
readonly '--icon-compass-north-color': "rgb(240, 92, 68)";
|
|
49
61
|
readonly '--icon-compass-south-color': "rgb(200, 199, 209)";
|
|
50
62
|
readonly '--menu-gap': "4px";
|
|
63
|
+
readonly '--menu-background': "rgba(18, 18, 20, 1)";
|
|
64
|
+
readonly '--menu-backdrop-filter': "unset";
|
|
65
|
+
readonly '--menu-border': "unset";
|
|
66
|
+
readonly '--menu-shadow': "0px 0px 8px 0px rgba(0, 0, 0, 0.25)";
|
|
67
|
+
readonly '--menu-text': "rgb(215, 214, 229, 1)";
|
|
68
|
+
readonly '--menu-item-hover': "rgba(255, 255, 255, 0.1)";
|
|
51
69
|
};
|
|
52
70
|
export declare const LightGlassTheme: {
|
|
53
71
|
readonly '--widget-margin': "12px";
|
|
@@ -64,6 +82,12 @@ export declare const LightGlassTheme: {
|
|
|
64
82
|
readonly '--icon-compass-north-color': "rgb(240, 92, 68)";
|
|
65
83
|
readonly '--icon-compass-south-color': "rgb(204, 204, 204)";
|
|
66
84
|
readonly '--menu-gap': "4px";
|
|
85
|
+
readonly '--menu-background': "rgba(255, 255, 255, 0.6)";
|
|
86
|
+
readonly '--menu-backdrop-filter': "blur(4px)";
|
|
87
|
+
readonly '--menu-border': "1px solid rgba(255, 255, 255, 0.6)";
|
|
88
|
+
readonly '--menu-shadow': "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset";
|
|
89
|
+
readonly '--menu-text': "rgb(24, 24, 26, 1)";
|
|
90
|
+
readonly '--menu-item-hover': "rgba(0, 0, 0, 0.08)";
|
|
67
91
|
};
|
|
68
92
|
export declare const DarkGlassTheme: {
|
|
69
93
|
readonly '--widget-margin': "12px";
|
|
@@ -80,5 +104,11 @@ export declare const DarkGlassTheme: {
|
|
|
80
104
|
readonly '--icon-compass-north-color': "rgb(240, 92, 68)";
|
|
81
105
|
readonly '--icon-compass-south-color': "rgb(200, 199, 209)";
|
|
82
106
|
readonly '--menu-gap': "4px";
|
|
107
|
+
readonly '--menu-background': "rgba(18, 18, 20, 0.75)";
|
|
108
|
+
readonly '--menu-backdrop-filter': "blur(4px)";
|
|
109
|
+
readonly '--menu-border': "1px solid rgba(18, 18, 20, 0.75)";
|
|
110
|
+
readonly '--menu-shadow': "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset";
|
|
111
|
+
readonly '--menu-text': "rgb(215, 214, 229, 1)";
|
|
112
|
+
readonly '--menu-item-hover': "rgba(255, 255, 255, 0.1)";
|
|
83
113
|
};
|
|
84
114
|
//# sourceMappingURL=themes.d.ts.map
|
package/dist/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAE5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAEtC,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAE5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAEtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAqBuB,CAAC;AAE/C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;CAqBwB,CAAC;AAE/C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAsBkB,CAAC;AAE/C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CAsBmB,CAAC"}
|
package/dist/themes.js
CHANGED
|
@@ -15,7 +15,13 @@ export const LightTheme = {
|
|
|
15
15
|
'--button-text': 'rgb(24, 24, 26, 1)',
|
|
16
16
|
'--icon-compass-north-color': 'rgb(240, 92, 68)',
|
|
17
17
|
'--icon-compass-south-color': 'rgb(204, 204, 204)',
|
|
18
|
-
'--menu-gap': '4px'
|
|
18
|
+
'--menu-gap': '4px',
|
|
19
|
+
'--menu-background': '#fff',
|
|
20
|
+
'--menu-backdrop-filter': 'unset',
|
|
21
|
+
'--menu-border': 'unset',
|
|
22
|
+
'--menu-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',
|
|
23
|
+
'--menu-text': 'rgb(24, 24, 26, 1)',
|
|
24
|
+
'--menu-item-hover': 'rgba(0, 0, 0, 0.08)'
|
|
19
25
|
};
|
|
20
26
|
export const DarkTheme = {
|
|
21
27
|
'--widget-margin': '12px',
|
|
@@ -31,7 +37,13 @@ export const DarkTheme = {
|
|
|
31
37
|
'--button-text': 'rgb(215, 214, 229, 1)',
|
|
32
38
|
'--icon-compass-north-color': 'rgb(240, 92, 68)',
|
|
33
39
|
'--icon-compass-south-color': 'rgb(200, 199, 209)',
|
|
34
|
-
'--menu-gap': '4px'
|
|
40
|
+
'--menu-gap': '4px',
|
|
41
|
+
'--menu-background': 'rgba(18, 18, 20, 1)',
|
|
42
|
+
'--menu-backdrop-filter': 'unset',
|
|
43
|
+
'--menu-border': 'unset',
|
|
44
|
+
'--menu-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',
|
|
45
|
+
'--menu-text': 'rgb(215, 214, 229, 1)',
|
|
46
|
+
'--menu-item-hover': 'rgba(255, 255, 255, 0.1)'
|
|
35
47
|
};
|
|
36
48
|
export const LightGlassTheme = {
|
|
37
49
|
'--widget-margin': '12px',
|
|
@@ -47,7 +59,13 @@ export const LightGlassTheme = {
|
|
|
47
59
|
'--button-text': 'rgb(24, 24, 26, 1)',
|
|
48
60
|
'--icon-compass-north-color': 'rgb(240, 92, 68)',
|
|
49
61
|
'--icon-compass-south-color': 'rgb(204, 204, 204)',
|
|
50
|
-
'--menu-gap': '4px'
|
|
62
|
+
'--menu-gap': '4px',
|
|
63
|
+
'--menu-background': 'rgba(255, 255, 255, 0.6)',
|
|
64
|
+
'--menu-backdrop-filter': 'blur(4px)',
|
|
65
|
+
'--menu-border': '1px solid rgba(255, 255, 255, 0.6)',
|
|
66
|
+
'--menu-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',
|
|
67
|
+
'--menu-text': 'rgb(24, 24, 26, 1)',
|
|
68
|
+
'--menu-item-hover': 'rgba(0, 0, 0, 0.08)'
|
|
51
69
|
};
|
|
52
70
|
export const DarkGlassTheme = {
|
|
53
71
|
'--widget-margin': '12px',
|
|
@@ -63,6 +81,12 @@ export const DarkGlassTheme = {
|
|
|
63
81
|
'--button-text': 'rgb(215, 214, 229, 1)',
|
|
64
82
|
'--icon-compass-north-color': 'rgb(240, 92, 68)',
|
|
65
83
|
'--icon-compass-south-color': 'rgb(200, 199, 209)',
|
|
66
|
-
'--menu-gap': '4px'
|
|
84
|
+
'--menu-gap': '4px',
|
|
85
|
+
'--menu-background': 'rgba(18, 18, 20, 0.75)',
|
|
86
|
+
'--menu-backdrop-filter': 'blur(4px)',
|
|
87
|
+
'--menu-border': '1px solid rgba(18, 18, 20, 0.75)',
|
|
88
|
+
'--menu-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',
|
|
89
|
+
'--menu-text': 'rgb(215, 214, 229, 1)',
|
|
90
|
+
'--menu-item-hover': 'rgba(255, 255, 255, 0.1)'
|
|
67
91
|
};
|
|
68
92
|
//# sourceMappingURL=themes.js.map
|
package/dist/themes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAgCpC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,iBAAi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