@sjvair/monitor-map 3.0.3 → 3.0.5
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/lib/LoadScreen.svelte +68 -0
- package/dist/lib/LoadScreen.svelte.d.ts +25 -0
- package/dist/lib/MainMapView.svelte +1 -0
- package/dist/lib/MainMapView.svelte.d.ts +26 -0
- package/dist/lib/MapLegend.svelte +15 -0
- package/dist/lib/MapLegend.svelte.d.ts +18 -0
- package/dist/lib/MonitorDetailPanel.svelte +152 -0
- package/dist/lib/MonitorDetailPanel.svelte.d.ts +3 -0
- package/dist/lib/MonitorMapLayout.svelte +193 -0
- package/dist/lib/MonitorMapLayout.svelte.d.ts +7 -0
- package/dist/lib/actions.d.ts +3 -0
- package/dist/lib/actions.js +12 -8
- package/dist/lib/assets/icons/adjustment-horizontal.svg +3 -0
- package/dist/lib/assets/logos/airgradient-blue.svg +63 -0
- package/dist/lib/assets/logos/airnow-compact.jpg +0 -0
- package/dist/lib/assets/logos/carb-compact.jpg +0 -0
- package/dist/lib/assets/logos/purpleair-compact.png +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-air.webp +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-icon.webp +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-sjv.webp +0 -0
- package/dist/lib/assets/logos/sjvair-white.svg +115 -0
- package/dist/lib/assets/logos/sjvair.svg +96 -0
- package/dist/lib/collocation-sites/CollocationTooltip.svelte +98 -0
- package/dist/lib/collocation-sites/CollocationTooltip.svelte.d.ts +7 -0
- package/dist/lib/collocation-sites/collocation-utils.d.ts +3 -0
- package/dist/lib/collocation-sites/collocation-utils.js +30 -0
- package/dist/lib/collocation-sites/collocations-icon-manager.svelte.d.ts +7 -0
- package/dist/lib/collocation-sites/collocations-icon-manager.svelte.js +17 -20
- package/dist/lib/collocation-sites/collocations-map-integration.svelte.d.ts +18 -0
- package/dist/lib/collocation-sites/collocations-map-integration.svelte.js +98 -83
- package/dist/lib/collocation-sites/collocations.svelte.d.ts +9 -0
- package/dist/lib/collocation-sites/collocations.svelte.js +17 -26
- package/dist/lib/collocation-sites/types.d.ts +8 -0
- package/dist/lib/collocation-sites/types.js +1 -0
- package/dist/lib/colors.d.ts +17 -0
- package/dist/lib/colors.js +29 -23
- package/dist/lib/components/DataBox.svelte +29 -0
- package/dist/lib/components/DataBox.svelte.d.ts +9 -0
- package/dist/lib/components/DisplayOption.svelte +7 -0
- package/dist/lib/components/DisplayOption.svelte.d.ts +5 -0
- package/dist/lib/components/MapLayersDisplayOptions.svelte +42 -0
- package/dist/lib/components/MapLayersDisplayOptions.svelte.d.ts +18 -0
- package/dist/lib/components/SegmentedControl.svelte +61 -0
- package/dist/lib/components/SegmentedControl.svelte.d.ts +11 -0
- package/dist/lib/components/ToggleSwitch.svelte +93 -0
- package/dist/lib/components/ToggleSwitch.svelte.d.ts +9 -0
- package/dist/lib/components/ui/button/button.svelte +89 -0
- package/dist/lib/components/ui/button/button.svelte.d.ts +70 -0
- package/dist/lib/components/ui/button/index.d.ts +2 -0
- package/dist/lib/components/ui/button/index.js +4 -0
- package/dist/lib/components/ui/range-calendar/index.d.ts +19 -0
- package/dist/lib/components/ui/range-calendar/index.js +21 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.svelte +76 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.svelte.d.ts +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-day.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-day.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.svelte +7 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.svelte +7 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.svelte +12 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.svelte +16 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-header.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-heading.svelte +16 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.svelte +44 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month.svelte +15 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-months.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +8 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +8 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.svelte +43 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar.svelte +112 -0
- package/dist/lib/components/ui/range-calendar/range-calendar.svelte.d.ts +21 -0
- package/dist/lib/data-chart/DataChart.svelte +303 -0
- package/dist/lib/data-chart/DataChart.svelte.d.ts +7 -0
- package/dist/lib/data-chart/DateRange.d.ts +6 -0
- package/dist/lib/data-chart/DateRange.js +15 -14
- package/dist/lib/data-chart/chart-utils.d.ts +3 -0
- package/dist/lib/data-chart/chart-utils.js +157 -93
- package/dist/lib/data-chart/data-chart.svelte.d.ts +7 -0
- package/dist/lib/data-chart/data-chart.svelte.js +7 -28
- package/dist/lib/data-chart/requests.d.ts +3 -0
- package/dist/lib/data-chart/requests.js +36 -28
- package/dist/lib/data-chart/tooltip.d.ts +10 -0
- package/dist/lib/data-chart/tooltip.js +160 -98
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.svelte +16 -0
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.svelte.d.ts +7 -0
- package/dist/lib/ev-stations/components/EvStationTooltip.svelte +127 -0
- package/dist/lib/ev-stations/components/EvStationTooltip.svelte.d.ts +7 -0
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.svelte +46 -0
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.svelte.d.ts +18 -0
- package/dist/lib/ev-stations/data-maps.d.ts +5 -0
- package/dist/lib/ev-stations/data-maps.js +152 -4
- package/dist/lib/ev-stations/ev-station-icons.d.ts +16 -0
- package/dist/lib/ev-stations/ev-station-icons.js +21 -27
- package/dist/lib/ev-stations/ev-stations-cluster-renderer.d.ts +19 -0
- package/dist/lib/ev-stations/ev-stations-cluster-renderer.js +130 -117
- package/dist/lib/ev-stations/ev-stations-map-integration.svelte.d.ts +31 -0
- package/dist/lib/ev-stations/ev-stations-map-integration.svelte.js +206 -180
- package/dist/lib/ev-stations/ev-stations.svelte.d.ts +9 -0
- package/dist/lib/ev-stations/ev-stations.svelte.js +54 -32
- package/dist/lib/ev-stations/types.d.ts +53 -0
- package/dist/lib/ev-stations/types.js +1 -0
- package/dist/lib/ev-stations/zip-codes.d.ts +13 -0
- package/dist/lib/ev-stations/zip-codes.js +457 -135
- package/dist/lib/hms/components/HMSFireLegend.svelte +21 -0
- package/dist/lib/hms/components/HMSFireLegend.svelte.d.ts +18 -0
- package/dist/lib/hms/hms-fire-icon-manager.d.ts +5 -0
- package/dist/lib/hms/hms-fire-icon-manager.js +28 -37
- package/dist/lib/hms/hms-fire-map-integration.svelte.d.ts +23 -0
- package/dist/lib/hms/hms-fire-map-integration.svelte.js +94 -97
- package/dist/lib/hms/hms-smoke-map-integration.svelte.d.ts +19 -0
- package/dist/lib/hms/hms-smoke-map-integration.svelte.js +68 -84
- package/dist/lib/hms/hms.svelte.d.ts +19 -0
- package/dist/lib/hms/hms.svelte.js +225 -76
- package/dist/lib/index.d.ts +68 -0
- package/dist/lib/index.js +56 -21
- package/dist/lib/map/Map.svelte +13 -0
- package/dist/lib/map/Map.svelte.d.ts +8 -0
- package/dist/lib/map/MapStyleDisplayOptions.svelte +61 -0
- package/dist/lib/map/MapStyleDisplayOptions.svelte.d.ts +3 -0
- package/dist/lib/map/Menu.svelte +64 -0
- package/dist/lib/map/Menu.svelte.d.ts +5 -0
- package/dist/lib/map/icons.d.ts +7 -0
- package/dist/lib/map/icons.js +24 -22
- package/dist/lib/map/integrations/base-layer-seperator.d.ts +9 -0
- package/dist/lib/map/integrations/base-layer-seperator.js +11 -12
- package/dist/lib/map/integrations/click-manager.d.ts +14 -0
- package/dist/lib/map/integrations/click-manager.js +52 -33
- package/dist/lib/map/integrations/integrations-manager.d.ts +8 -0
- package/dist/lib/map/integrations/integrations-manager.js +20 -12
- package/dist/lib/map/integrations/map-display-option.svelte.d.ts +7 -0
- package/dist/lib/map/integrations/map-display-option.svelte.js +10 -18
- package/dist/lib/map/integrations/map-geojson-integration.svelte.d.ts +13 -0
- package/dist/lib/map/integrations/map-geojson-integration.svelte.js +21 -17
- package/dist/lib/map/integrations/map-icon-manager.d.ts +15 -0
- package/dist/lib/map/integrations/map-icon-manager.js +52 -46
- package/dist/lib/map/integrations/map-integration.svelte.d.ts +6 -0
- package/dist/lib/map/integrations/map-integration.svelte.js +2 -5
- package/dist/lib/map/integrations/map-layer-integration.svelte.d.ts +11 -0
- package/dist/lib/map/integrations/map-layer-integration.svelte.js +36 -23
- package/dist/lib/map/integrations/tooltip.svelte.d.ts +28 -0
- package/dist/lib/map/integrations/tooltip.svelte.js +120 -78
- package/dist/lib/map/integrations/types.d.ts +14 -0
- package/dist/lib/map/integrations/types.js +1 -0
- package/dist/lib/map/map.svelte.d.ts +14 -0
- package/dist/lib/map/map.svelte.js +48 -50
- package/dist/lib/map/utils.d.ts +7 -0
- package/dist/lib/map/utils.js +32 -29
- package/dist/lib/monitors/components/MonitorClusterTooltip.svelte +112 -0
- package/dist/lib/monitors/components/MonitorClusterTooltip.svelte.d.ts +7 -0
- package/dist/lib/monitors/components/MonitorMarkersLegend.svelte +41 -0
- package/dist/lib/monitors/components/MonitorMarkersLegend.svelte.d.ts +3 -0
- package/dist/lib/monitors/components/MonitorSubscriptionManager.svelte +128 -0
- package/dist/lib/monitors/components/MonitorSubscriptionManager.svelte.d.ts +6 -0
- package/dist/lib/monitors/components/MonitorTooltip.svelte +61 -0
- package/dist/lib/monitors/components/MonitorTooltip.svelte.d.ts +7 -0
- package/dist/lib/monitors/components/MonitorWidgetModal.svelte +100 -0
- package/dist/lib/monitors/components/MonitorWidgetModal.svelte.d.ts +6 -0
- package/dist/lib/monitors/components/MonitorsDisplayOptions.svelte +79 -0
- package/dist/lib/monitors/components/MonitorsDisplayOptions.svelte.d.ts +3 -0
- package/dist/lib/monitors/monitor-utils.d.ts +4 -0
- package/dist/lib/monitors/monitor-utils.js +33 -23
- package/dist/lib/monitors/monitors-cluster-renderer.d.ts +33 -0
- package/dist/lib/monitors/monitors-cluster-renderer.js +218 -209
- package/dist/lib/monitors/monitors-icon-manager.svelte.d.ts +13 -0
- package/dist/lib/monitors/monitors-icon-manager.svelte.js +75 -70
- package/dist/lib/monitors/monitors-map-integration.svelte.d.ts +40 -0
- package/dist/lib/monitors/monitors-map-integration.svelte.js +278 -270
- package/dist/lib/monitors/monitors.svelte.d.ts +16 -0
- package/dist/lib/monitors/monitors.svelte.js +38 -63
- package/dist/lib/monitors/types.d.ts +26 -0
- package/dist/lib/monitors/types.js +1 -0
- package/dist/lib/reactivity.svelte.d.ts +0 -0
- package/dist/lib/reactivity.svelte.js +83 -0
- package/dist/lib/router-context.d.ts +27 -0
- package/dist/lib/router-context.js +11 -11
- package/dist/lib/routes.d.ts +2 -0
- package/dist/lib/routes.js +10 -9
- package/dist/lib/search/Search.svelte +189 -0
- package/dist/lib/search/Search.svelte.d.ts +3 -0
- package/dist/lib/search/service.d.ts +17 -0
- package/dist/lib/search/service.js +75 -85
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.js +10 -12
- package/dist/lib/weather.d.ts +1 -0
- package/dist/lib/weather.js +11 -7
- package/dist/lib/wind/wind.svelte.d.ts +10 -0
- package/dist/lib/wind/wind.svelte.js +13 -21
- package/package.json +9 -7
- package/src/lib/LoadScreen.svelte +3 -3
- package/src/lib/hms/components/HMSFireLegend.svelte +1 -1
- package/src/lib/hms/hms.svelte.ts +8 -9
- package/src/lib/index.ts +18 -0
- package/src/lib/routes.ts +6 -1
- package/src/lib/utils.ts +1 -1
- package/dist/lib/LoadScreen.js +0 -73
- package/dist/lib/MainMapView.js +0 -7
- package/dist/lib/MapLegend.js +0 -13
- package/dist/lib/MonitorDetailPanel.js +0 -169
- package/dist/lib/MonitorMapLayout.js +0 -91
- package/dist/lib/_virtual/_rolldown/runtime.js +0 -11
- package/dist/lib/assets/logos/airgradient-blue.js +0 -4
- package/dist/lib/assets/logos/airnow-compact.js +0 -4
- package/dist/lib/assets/logos/carb-compact.js +0 -4
- package/dist/lib/assets/logos/purpleair-compact.js +0 -4
- package/dist/lib/assets/logos/sjvair.js +0 -4
- package/dist/lib/collocation-sites/CollocationTooltip.js +0 -105
- package/dist/lib/components/DataBox.js +0 -30
- package/dist/lib/components/DisplayOption.js +0 -10
- package/dist/lib/components/MapLayersDisplayOptions.js +0 -87
- package/dist/lib/components/SegmentedControl.js +0 -37
- package/dist/lib/components/ToggleSwitch.js +0 -17
- package/dist/lib/components/ui/button/button.js +0 -34
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.js +0 -82
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-day.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.js +0 -27
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.js +0 -27
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-header.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.js +0 -61
- package/dist/lib/components/ui/range-calendar/range-calendar-month.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-months.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.js +0 -58
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.js +0 -58
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.js +0 -59
- package/dist/lib/components/ui/range-calendar/range-calendar.js +0 -272
- package/dist/lib/data-chart/DataChart.js +0 -142
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.js +0 -16
- package/dist/lib/ev-stations/components/EvStationTooltip.js +0 -120
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.js +0 -41
- package/dist/lib/hms/components/HMSFireLegend.js +0 -35
- package/dist/lib/map/Map.js +0 -14
- package/dist/lib/map/MapStyleDisplayOptions.js +0 -43
- package/dist/lib/map/Menu.js +0 -44
- package/dist/lib/monitors/components/MonitorClusterTooltip.js +0 -83
- package/dist/lib/monitors/components/MonitorMarkersLegend.js +0 -35
- package/dist/lib/monitors/components/MonitorSubscriptionManager.js +0 -104
- package/dist/lib/monitors/components/MonitorTooltip.js +0 -59
- package/dist/lib/monitors/components/MonitorWidgetModal.js +0 -40
- package/dist/lib/monitors/components/MonitorsDisplayOptions.js +0 -76
- package/dist/lib/search/Search.js +0 -124
- package/dist/lib/sjvair-air.avif +0 -0
- package/dist/lib/sjvair-air.png +0 -0
- package/dist/lib/sjvair-air.webp +0 -0
- package/dist/lib/sjvair-air2.avif +0 -0
- package/dist/lib/sjvair-air2.png +0 -0
- package/dist/lib/sjvair-air2.webp +0 -0
- package/dist/lib/sjvair-icon.avif +0 -0
- package/dist/lib/sjvair-icon.png +0 -0
- package/dist/lib/sjvair-icon.webp +0 -0
- package/dist/lib/sjvair-icon2.avif +0 -0
- package/dist/lib/sjvair-icon2.png +0 -0
- package/dist/lib/sjvair-icon2.webp +0 -0
- package/dist/lib/sjvair-sjv.avif +0 -0
- package/dist/lib/sjvair-sjv.png +0 -0
- package/dist/lib/sjvair-sjv.webp +0 -0
- package/dist/lib/sjvair-sjv2.avif +0 -0
- package/dist/lib/sjvair-sjv2.png +0 -0
- package/dist/lib/sjvair-sjv2.webp +0 -0
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
async init() {
|
|
19
|
-
this.initialized ||= (this.collocationSites = await t(), !0);
|
|
20
|
-
}
|
|
21
|
-
async update() {
|
|
22
|
-
this.initialized && (this.collocationSites = await t());
|
|
23
|
-
}
|
|
24
|
-
}();
|
|
25
|
-
//#endregion
|
|
26
|
-
export { n as collocationSitesManager };
|
|
1
|
+
import { getCollocationSites } from "@sjvair/sdk";
|
|
2
|
+
class CollocationSitesManager {
|
|
3
|
+
initialized = $state(false);
|
|
4
|
+
collocationSites = $state(null);
|
|
5
|
+
async init() {
|
|
6
|
+
if (this.initialized)
|
|
7
|
+
return;
|
|
8
|
+
this.collocationSites = await getCollocationSites();
|
|
9
|
+
this.initialized = true;
|
|
10
|
+
}
|
|
11
|
+
async update() {
|
|
12
|
+
if (!this.initialized)
|
|
13
|
+
return;
|
|
14
|
+
this.collocationSites = await getCollocationSites();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const collocationSitesManager = new CollocationSitesManager();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Feature, Geometry } from "geojson";
|
|
2
|
+
export type CollocationSiteMapFeature = Feature<Geometry, CollocationSiteMarkerProperties>;
|
|
3
|
+
export interface CollocationSiteMarkerProperties {
|
|
4
|
+
icon: string;
|
|
5
|
+
colocated_id: string;
|
|
6
|
+
reference_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ColorMap {
|
|
2
|
+
min: number;
|
|
3
|
+
color: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const Colors: {
|
|
6
|
+
readonly white: "ffffff";
|
|
7
|
+
readonly gray: "969696";
|
|
8
|
+
readonly black: "000000";
|
|
9
|
+
readonly blue: "0000FF";
|
|
10
|
+
readonly green: "00e400";
|
|
11
|
+
readonly yellow: "ffff00";
|
|
12
|
+
readonly orange: "ff7e00";
|
|
13
|
+
readonly red: "ff0000";
|
|
14
|
+
readonly purple: "8f3f97";
|
|
15
|
+
readonly maroon: "7e0023";
|
|
16
|
+
};
|
|
17
|
+
export declare function valueToColor(value: number, colors: ColorMap[]): string;
|
package/dist/lib/colors.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { mix
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
maroon: "7e0023"
|
|
1
|
+
import { mix } from "color2k";
|
|
2
|
+
export const Colors = {
|
|
3
|
+
white: "ffffff",
|
|
4
|
+
gray: "969696",
|
|
5
|
+
black: "000000",
|
|
6
|
+
blue: "0000FF",
|
|
7
|
+
green: "00e400",
|
|
8
|
+
yellow: "ffff00",
|
|
9
|
+
orange: "ff7e00",
|
|
10
|
+
red: "ff0000",
|
|
11
|
+
purple: "8f3f97",
|
|
12
|
+
maroon: "7e0023"
|
|
14
13
|
};
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
export function valueToColor(value, colors) {
|
|
15
|
+
if (value >= colors[colors.length - 1].min) {
|
|
16
|
+
return `#${colors[colors.length - 1].color}`;
|
|
17
|
+
}
|
|
18
|
+
if (value <= 0) {
|
|
19
|
+
return `#${colors[0].color}`;
|
|
20
|
+
}
|
|
21
|
+
for (let i = 0; i < colors.length - 1; i++) {
|
|
22
|
+
if (colors[i + 1].min > value) {
|
|
23
|
+
const min = colors[i];
|
|
24
|
+
const max = colors[i + 1];
|
|
25
|
+
const lvlDiff = min.min === -Infinity ? max.min : max.min - min.min;
|
|
26
|
+
const diff = (lvlDiff - (max.min - value)) / lvlDiff;
|
|
27
|
+
return mix(`#${min.color}`, `#${max.color}`, diff);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return "#FFFFFF";
|
|
23
31
|
}
|
|
24
|
-
//#endregion
|
|
25
|
-
export { t as Colors, n as valueToColor };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { darken, readableColor } from "color2k";
|
|
3
|
+
|
|
4
|
+
interface DataBoxProps {
|
|
5
|
+
color: string;
|
|
6
|
+
header: string;
|
|
7
|
+
subheading?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { color, header, subheading, value }: DataBoxProps = $props();
|
|
12
|
+
const borderColor = $derived(darken(color, 0.1));
|
|
13
|
+
const textColor = $derived(readableColor(color));
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
class="flex flex-col rounded-sm border-4 p-1 text-center"
|
|
18
|
+
style:background-color={color}
|
|
19
|
+
style:border-color={borderColor}
|
|
20
|
+
style:color={textColor}
|
|
21
|
+
>
|
|
22
|
+
<p class="text-base whitespace-nowrap">{header}</p>
|
|
23
|
+
<div class="flex flex-1 flex-col items-center justify-center">
|
|
24
|
+
<p class={["font-bold whitespace-nowrap", subheading ? "text-3xl" : "text-4xl"]}>{value}</p>
|
|
25
|
+
{#if subheading}
|
|
26
|
+
<p class="whitespace-nowrap">{subheading}</p>
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { WindIcon, CrosshairIcon, WavesVerticalIcon } from "@lucide/svelte";
|
|
3
|
+
import DisplayOption from "./DisplayOption.svelte";
|
|
4
|
+
import ToggleSwitch from "./ToggleSwitch.svelte";
|
|
5
|
+
import { windMapIntegration } from "../wind/wind.svelte";
|
|
6
|
+
import { collocationSitesMapIntegration } from "../collocation-sites/collocations-map-integration.svelte";
|
|
7
|
+
import { monitorsManager } from "../monitors/monitors.svelte";
|
|
8
|
+
import { hmsFireMapIntegration } from "../hms/hms-fire-map-integration.svelte";
|
|
9
|
+
import { hmsSmokeMapIntegration } from "../hms/hms-smoke-map-integration.svelte";
|
|
10
|
+
|
|
11
|
+
const fireIcon = hmsFireMapIntegration.icons.get("hms-fire-xxl");
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<DisplayOption>
|
|
15
|
+
<p class="text-lg font-bold whitespace-nowrap underline">Map Layers</p>
|
|
16
|
+
<div class="flex gap-1 items-center">
|
|
17
|
+
<WindIcon size="16" />
|
|
18
|
+
<ToggleSwitch id="wind" label="Wind" bind:value={windMapIntegration.enabled}></ToggleSwitch>
|
|
19
|
+
</div>
|
|
20
|
+
{#if monitorsManager.pollutant === "pm25"}
|
|
21
|
+
<div class="flex gap-1 items-center">
|
|
22
|
+
<CrosshairIcon size="16" color="#4A5FC6" />
|
|
23
|
+
<ToggleSwitch
|
|
24
|
+
id="collocation-sites"
|
|
25
|
+
label="Collocation Sites"
|
|
26
|
+
bind:value={collocationSitesMapIntegration.enabled}
|
|
27
|
+
></ToggleSwitch>
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
<div class="flex gap-1 items-center">
|
|
31
|
+
{#if fireIcon}
|
|
32
|
+
<img class="w-4" src={fireIcon.image.src} alt={fireIcon.image.alt} />
|
|
33
|
+
{/if}
|
|
34
|
+
<ToggleSwitch id="hms-fire" label="HMS Fire" bind:value={hmsFireMapIntegration.enabled}
|
|
35
|
+
></ToggleSwitch>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="flex gap-1 items-center">
|
|
38
|
+
<WavesVerticalIcon size="16" />
|
|
39
|
+
<ToggleSwitch id="hms-smoke" label="HMS Smoke" bind:value={hmsSmokeMapIntegration.enabled}
|
|
40
|
+
></ToggleSwitch>
|
|
41
|
+
</div>
|
|
42
|
+
</DisplayOption>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const MapLayersDisplayOptions: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type MapLayersDisplayOptions = InstanceType<typeof MapLayersDisplayOptions>;
|
|
18
|
+
export default MapLayersDisplayOptions;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { searchParams } from "sv-router";
|
|
3
|
+
import { untrack } from "svelte";
|
|
4
|
+
|
|
5
|
+
interface SegmentedControlProps {
|
|
6
|
+
segmentLabel?: string;
|
|
7
|
+
options: Array<{ label: string; value: string }>;
|
|
8
|
+
group: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { segmentLabel: label, options, group = $bindable() }: SegmentedControlProps = $props();
|
|
12
|
+
|
|
13
|
+
let inner: HTMLDivElement | undefined = $state();
|
|
14
|
+
|
|
15
|
+
$effect(() => {
|
|
16
|
+
void group;
|
|
17
|
+
if (!inner) return;
|
|
18
|
+
|
|
19
|
+
const checked = inner.querySelector<HTMLInputElement>("input:checked");
|
|
20
|
+
if (!checked) return;
|
|
21
|
+
|
|
22
|
+
// FIXME: this shouldn't live in this file
|
|
23
|
+
const pollutant = untrack(() => searchParams.get("pollutant"));
|
|
24
|
+
if (pollutant !== checked.value) {
|
|
25
|
+
untrack(() => searchParams.set("pollutant", checked.value));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const fontSize = parseFloat(getComputedStyle(inner).fontSize);
|
|
29
|
+
const padding = fontSize; // 1em
|
|
30
|
+
const label = checked.closest("label") as HTMLLabelElement;
|
|
31
|
+
const innerRect = inner.getBoundingClientRect();
|
|
32
|
+
const labelRect = label.getBoundingClientRect();
|
|
33
|
+
|
|
34
|
+
inner.style.setProperty("--highlight-width", `${labelRect.width + padding}px`);
|
|
35
|
+
inner.style.setProperty(
|
|
36
|
+
"--highlight-x-pos",
|
|
37
|
+
`${labelRect.left - innerRect.left - padding / 2}px`
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<div class="relative">
|
|
43
|
+
{#if label}
|
|
44
|
+
<p>{label}</p>
|
|
45
|
+
{/if}
|
|
46
|
+
<div
|
|
47
|
+
bind:this={inner}
|
|
48
|
+
class="relative flex gap-4 px-[.5em] before:absolute before:top-[0.125em] before:bottom-[0.125em] before:left-0 before:z-0 before:w-(--highlight-width) before:translate-x-(--highlight-x-pos) before:rounded-md before:bg-[#5465FF] before:transition-transform before:duration-500 before:content-['']"
|
|
49
|
+
>
|
|
50
|
+
{#each options as { label, value } (value)}
|
|
51
|
+
{@const inputId = `${value}-segmented-control-option`}
|
|
52
|
+
<label
|
|
53
|
+
for={inputId}
|
|
54
|
+
class="relative z-1 cursor-pointer text-center transition-all duration-750 active:scale-95 has-checked:text-white"
|
|
55
|
+
>
|
|
56
|
+
<input type="radio" id={inputId} name={label} {value} bind:group class="hidden" />
|
|
57
|
+
{label}
|
|
58
|
+
</label>
|
|
59
|
+
{/each}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SegmentedControlProps {
|
|
2
|
+
segmentLabel?: string;
|
|
3
|
+
options: Array<{
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}>;
|
|
7
|
+
group: string;
|
|
8
|
+
}
|
|
9
|
+
declare const SegmentedControl: import("svelte").Component<SegmentedControlProps, {}, "group">;
|
|
10
|
+
type SegmentedControl = ReturnType<typeof SegmentedControl>;
|
|
11
|
+
export default SegmentedControl;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface ToggleSwitchProps {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
reverse?: boolean;
|
|
6
|
+
value: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { id, label, reverse, value = $bindable() }: ToggleSwitchProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<label
|
|
13
|
+
for={id}
|
|
14
|
+
class={[
|
|
15
|
+
"flex cursor-pointer items-center justify-center gap-x-[0.25em] whitespace-nowrap select-none",
|
|
16
|
+
{ "flex-row-reverse": reverse }
|
|
17
|
+
]}
|
|
18
|
+
>
|
|
19
|
+
{label}
|
|
20
|
+
<div class="switch">
|
|
21
|
+
<input class="switch-input" type="checkbox" {id} name={id} bind:checked={value} />
|
|
22
|
+
<span class="slider round"></span>
|
|
23
|
+
</div>
|
|
24
|
+
</label>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
.switch {
|
|
28
|
+
--animation-duration: 100ms;
|
|
29
|
+
--switch-diameter: 1.625em;
|
|
30
|
+
--switch-offset: 0.25em;
|
|
31
|
+
--track-width: 3.75em;
|
|
32
|
+
--track-height: 2.125em;
|
|
33
|
+
|
|
34
|
+
font-size: 0.5em;
|
|
35
|
+
position: relative;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
width: var(--track-width);
|
|
38
|
+
height: var(--track-height);
|
|
39
|
+
transform: scale(0.8);
|
|
40
|
+
|
|
41
|
+
.switch-input {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
width: 0;
|
|
44
|
+
height: 0;
|
|
45
|
+
|
|
46
|
+
&:checked + .slider {
|
|
47
|
+
background-color: #2196f3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:focus + .slider {
|
|
51
|
+
box-shadow: 0 0 1px #2196f3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:checked + .slider:before {
|
|
55
|
+
-webkit-transform: translateX(var(--switch-diameter));
|
|
56
|
+
-ms-transform: translateX(var(--switch-diameter));
|
|
57
|
+
transform: translateX(var(--switch-diameter));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.slider {
|
|
62
|
+
position: absolute;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
background-color: #ccc;
|
|
69
|
+
-webkit-transition: var(--animation-duration);
|
|
70
|
+
transition: var(--animation-duration);
|
|
71
|
+
|
|
72
|
+
&:before {
|
|
73
|
+
position: absolute;
|
|
74
|
+
content: "";
|
|
75
|
+
height: var(--switch-diameter);
|
|
76
|
+
width: var(--switch-diameter);
|
|
77
|
+
left: var(--switch-offset);
|
|
78
|
+
bottom: var(--switch-offset);
|
|
79
|
+
background-color: white;
|
|
80
|
+
-webkit-transition: var(--animation-duration);
|
|
81
|
+
transition: var(--animation-duration);
|
|
82
|
+
}
|
|
83
|
+
/* Rounded sliders */
|
|
84
|
+
&.round {
|
|
85
|
+
border-radius: var(--track-height);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.round:before {
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ToggleSwitchProps {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
reverse?: boolean;
|
|
5
|
+
value: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ToggleSwitch: import("svelte").Component<ToggleSwitchProps, {}, "value">;
|
|
8
|
+
type ToggleSwitch = ReturnType<typeof ToggleSwitch>;
|
|
9
|
+
export default ToggleSwitch;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
|
+
|
|
6
|
+
export const buttonVariants = tv({
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
11
|
+
outline:
|
|
12
|
+
"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
13
|
+
secondary:
|
|
14
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
15
|
+
ghost:
|
|
16
|
+
"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
17
|
+
destructive:
|
|
18
|
+
"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
19
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default:
|
|
23
|
+
"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
24
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
26
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
27
|
+
icon: "size-8",
|
|
28
|
+
"icon-xs":
|
|
29
|
+
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
+
"icon-sm":
|
|
31
|
+
"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
32
|
+
"icon-lg": "size-9"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: "default",
|
|
37
|
+
size: "default"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
42
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
43
|
+
|
|
44
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
|
|
45
|
+
WithElementRef<HTMLAnchorAttributes> & {
|
|
46
|
+
variant?: ButtonVariant;
|
|
47
|
+
size?: ButtonSize;
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
let {
|
|
53
|
+
class: className,
|
|
54
|
+
variant = "default",
|
|
55
|
+
size = "default",
|
|
56
|
+
ref = $bindable(null),
|
|
57
|
+
href = undefined,
|
|
58
|
+
type = "button",
|
|
59
|
+
disabled,
|
|
60
|
+
children,
|
|
61
|
+
...restProps
|
|
62
|
+
}: ButtonProps = $props();
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
{#if href}
|
|
66
|
+
<a
|
|
67
|
+
bind:this={ref}
|
|
68
|
+
data-slot="button"
|
|
69
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
70
|
+
href={disabled ? undefined : href}
|
|
71
|
+
aria-disabled={disabled}
|
|
72
|
+
role={disabled ? "link" : undefined}
|
|
73
|
+
tabindex={disabled ? -1 : undefined}
|
|
74
|
+
{...restProps}
|
|
75
|
+
>
|
|
76
|
+
{@render children?.()}
|
|
77
|
+
</a>
|
|
78
|
+
{:else}
|
|
79
|
+
<button
|
|
80
|
+
bind:this={ref}
|
|
81
|
+
data-slot="button"
|
|
82
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
83
|
+
{type}
|
|
84
|
+
{disabled}
|
|
85
|
+
{...restProps}
|
|
86
|
+
>
|
|
87
|
+
{@render children?.()}
|
|
88
|
+
</button>
|
|
89
|
+
{/if}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
import { type VariantProps } from "tailwind-variants";
|
|
4
|
+
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
ghost: string;
|
|
10
|
+
destructive: string;
|
|
11
|
+
link: string;
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
default: string;
|
|
15
|
+
xs: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
"icon-xs": string;
|
|
20
|
+
"icon-sm": string;
|
|
21
|
+
"icon-lg": string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
24
|
+
variant: {
|
|
25
|
+
default: string;
|
|
26
|
+
outline: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
ghost: string;
|
|
29
|
+
destructive: string;
|
|
30
|
+
link: string;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
default: string;
|
|
34
|
+
xs: string;
|
|
35
|
+
sm: string;
|
|
36
|
+
lg: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
"icon-xs": string;
|
|
39
|
+
"icon-sm": string;
|
|
40
|
+
"icon-lg": string;
|
|
41
|
+
};
|
|
42
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
43
|
+
variant: {
|
|
44
|
+
default: string;
|
|
45
|
+
outline: string;
|
|
46
|
+
secondary: string;
|
|
47
|
+
ghost: string;
|
|
48
|
+
destructive: string;
|
|
49
|
+
link: string;
|
|
50
|
+
};
|
|
51
|
+
size: {
|
|
52
|
+
default: string;
|
|
53
|
+
xs: string;
|
|
54
|
+
sm: string;
|
|
55
|
+
lg: string;
|
|
56
|
+
icon: string;
|
|
57
|
+
"icon-xs": string;
|
|
58
|
+
"icon-sm": string;
|
|
59
|
+
"icon-lg": string;
|
|
60
|
+
};
|
|
61
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
62
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
63
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
64
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
65
|
+
variant?: ButtonVariant;
|
|
66
|
+
size?: ButtonSize;
|
|
67
|
+
};
|
|
68
|
+
declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
|
|
69
|
+
type Button = ReturnType<typeof Button>;
|
|
70
|
+
export default Button;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Root from "./range-calendar.svelte";
|
|
2
|
+
import Cell from "./range-calendar-cell.svelte";
|
|
3
|
+
import Day from "./range-calendar-day.svelte";
|
|
4
|
+
import Grid from "./range-calendar-grid.svelte";
|
|
5
|
+
import Header from "./range-calendar-header.svelte";
|
|
6
|
+
import Months from "./range-calendar-months.svelte";
|
|
7
|
+
import GridRow from "./range-calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./range-calendar-heading.svelte";
|
|
9
|
+
import HeadCell from "./range-calendar-head-cell.svelte";
|
|
10
|
+
import NextButton from "./range-calendar-next-button.svelte";
|
|
11
|
+
import PrevButton from "./range-calendar-prev-button.svelte";
|
|
12
|
+
import MonthSelect from "./range-calendar-month-select.svelte";
|
|
13
|
+
import YearSelect from "./range-calendar-year-select.svelte";
|
|
14
|
+
import Caption from "./range-calendar-caption.svelte";
|
|
15
|
+
import Nav from "./range-calendar-nav.svelte";
|
|
16
|
+
import Month from "./range-calendar-month.svelte";
|
|
17
|
+
import GridBody from "./range-calendar-grid-body.svelte";
|
|
18
|
+
import GridHead from "./range-calendar-grid-head.svelte";
|
|
19
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton, MonthSelect, YearSelect, Caption, Nav, Month, Root as RangeCalendar };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Root from "./range-calendar.svelte";
|
|
2
|
+
import Cell from "./range-calendar-cell.svelte";
|
|
3
|
+
import Day from "./range-calendar-day.svelte";
|
|
4
|
+
import Grid from "./range-calendar-grid.svelte";
|
|
5
|
+
import Header from "./range-calendar-header.svelte";
|
|
6
|
+
import Months from "./range-calendar-months.svelte";
|
|
7
|
+
import GridRow from "./range-calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./range-calendar-heading.svelte";
|
|
9
|
+
import HeadCell from "./range-calendar-head-cell.svelte";
|
|
10
|
+
import NextButton from "./range-calendar-next-button.svelte";
|
|
11
|
+
import PrevButton from "./range-calendar-prev-button.svelte";
|
|
12
|
+
import MonthSelect from "./range-calendar-month-select.svelte";
|
|
13
|
+
import YearSelect from "./range-calendar-year-select.svelte";
|
|
14
|
+
import Caption from "./range-calendar-caption.svelte";
|
|
15
|
+
import Nav from "./range-calendar-nav.svelte";
|
|
16
|
+
import Month from "./range-calendar-month.svelte";
|
|
17
|
+
import GridBody from "./range-calendar-grid-body.svelte";
|
|
18
|
+
import GridHead from "./range-calendar-grid-head.svelte";
|
|
19
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton, MonthSelect, YearSelect, Caption, Nav, Month,
|
|
20
|
+
//
|
|
21
|
+
Root as RangeCalendar };
|