@pushwoosh/dumb-components 1.1.197 → 1.1.199
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/LeafletTheme/index.d.ts +1 -0
- package/LeafletTheme/index.js +1 -0
- package/LeafletTheme/styles.d.ts +7 -0
- package/LeafletTheme/styles.js +12 -0
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LeafletTheme } from './styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LeafletTheme } from './styles';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repaints Leaflet's own chrome with Pushwoosh tokens — map surface, zoom buttons,
|
|
3
|
+
* attribution, scale, popups and tooltips — and darkens light raster tiles in the dark theme.
|
|
4
|
+
* @example
|
|
5
|
+
* <LeafletTheme />
|
|
6
|
+
*/
|
|
7
|
+
export declare const LeafletTheme: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createGlobalStyle } from 'styled-components';
|
|
2
|
+
import { Color, THEME_ATTRIBUTE } from '@pushwoosh/kit-constants';
|
|
3
|
+
// Leaflet's own sheet lands after ours, so equal specificity would lose on order.
|
|
4
|
+
const ROOT = '.leaflet-container.leaflet-container';
|
|
5
|
+
const DARK_TILES = 'invert(1) hue-rotate(180deg) brightness(0.9) contrast(1.05) saturate(0.55)';
|
|
6
|
+
/**
|
|
7
|
+
* Repaints Leaflet's own chrome with Pushwoosh tokens — map surface, zoom buttons,
|
|
8
|
+
* attribution, scale, popups and tooltips — and darkens light raster tiles in the dark theme.
|
|
9
|
+
* @example
|
|
10
|
+
* <LeafletTheme />
|
|
11
|
+
*/
|
|
12
|
+
export const LeafletTheme = createGlobalStyle(["", "{background:", ";color:", ";}", " a{color:", ";}", " .leaflet-bar a,", " .leaflet-control-layers-toggle{background-color:", ";color:", ";border-bottom-color:", ";}", " .leaflet-bar a:hover,", " .leaflet-bar a:focus{background-color:", ";color:", ";}", " .leaflet-bar a.leaflet-disabled{background-color:", ";color:", ";}.leaflet-touch", " .leaflet-bar,.leaflet-touch", " .leaflet-control-layers{border-color:", ";}", " .leaflet-control-layers{background:", ";color:", ";}", " .leaflet-control-attribution{background:", ";color:", ";}", " .leaflet-control-scale-line{background:", ";color:", ";border-color:", ";text-shadow:none;}", " .leaflet-popup-content-wrapper,", " .leaflet-popup-tip{background:", ";color:", ";}", " a.leaflet-popup-close-button{color:", ";}", " a.leaflet-popup-close-button:hover,", " a.leaflet-popup-close-button:focus{color:", ";}", " .leaflet-tooltip{background-color:", ";border-color:", ";color:", ";}", " .leaflet-tooltip-top:before{border-top-color:", ";}", " .leaflet-tooltip-bottom:before{border-bottom-color:", ";}", " .leaflet-tooltip-left:before{border-left-color:", ";}", " .leaflet-tooltip-right:before{border-right-color:", ";}", " .leaflet-div-icon{background:", ";border-color:", ";}", " .leaflet-zoom-box{border-color:", ";background:", ";}[", "='dark'] ", " .leaflet-tile-pane{filter:", ";}"], ROOT, Color.FROZEN, Color.MAIN, ROOT, Color.PRIMARY, ROOT, ROOT, Color.CLEAR, Color.MAIN, Color.FORM, ROOT, ROOT, Color.FROZEN, Color.MAIN, ROOT, Color.FROZEN, Color.PHANTOM, ROOT, ROOT, Color.FORM, ROOT, Color.CLEAR, Color.MAIN, ROOT, Color.CLEAR, Color.LOCKED, ROOT, Color.CLEAR, Color.MAIN, Color.FORM, ROOT, ROOT, Color.CLEAR, Color.MAIN, ROOT, Color.LOCKED, ROOT, ROOT, Color.MAIN, ROOT, Color.CLEAR, Color.CLEAR, Color.MAIN, ROOT, Color.CLEAR, ROOT, Color.CLEAR, ROOT, Color.CLEAR, ROOT, Color.CLEAR, ROOT, Color.CLEAR, Color.FORM, ROOT, Color.PRIMARY, Color.BRIGHT_LIGHT, THEME_ATTRIBUTE, ROOT, DARK_TILES);
|
package/index.d.ts
CHANGED
|
@@ -52,3 +52,4 @@ export { SendRateEdit, SendRateReadonly, type SendRateBase, type SendRateEditPro
|
|
|
52
52
|
export { Alert } from './Alert';
|
|
53
53
|
export { ApplicationPreloader, type ApplicationPreloaderProps, } from './ApplicationPreloader';
|
|
54
54
|
export { NotificationInbox, NotificationBar, NotificationBell, type Notification, type NotificationInboxProps, type NotificationSeverity, type NotificationBarType, type NotificationBarProps, type NotificationBellProps, } from './NotificationInbox';
|
|
55
|
+
export { LeafletTheme } from './LeafletTheme';
|
package/index.js
CHANGED
|
@@ -50,4 +50,5 @@ export { FrequencyCappingEdit, FrequencyCappingReadonly, FrequencyCappingInApps,
|
|
|
50
50
|
export { SendRateEdit, SendRateReadonly } from './SendRate';
|
|
51
51
|
export { Alert } from './Alert';
|
|
52
52
|
export { ApplicationPreloader } from './ApplicationPreloader';
|
|
53
|
-
export { NotificationInbox, NotificationBar, NotificationBell } from './NotificationInbox';
|
|
53
|
+
export { NotificationInbox, NotificationBar, NotificationBell } from './NotificationInbox';
|
|
54
|
+
export { LeafletTheme } from './LeafletTheme';
|