@sybilion/uilib 1.2.26 → 1.3.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.
Files changed (137) hide show
  1. package/dist/esm/components/ui/Chart/Chart.js +5 -0
  2. package/dist/esm/components/ui/Chart/components/BaseChartWrapper.js +7 -32
  3. package/dist/esm/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.js +21 -0
  4. package/dist/esm/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.styl.js +7 -0
  5. package/dist/esm/components/ui/Chart/lightweight/LightweightForecastChart.js +460 -0
  6. package/dist/esm/components/ui/Chart/lightweight/LightweightForecastChart.styl.js +7 -0
  7. package/dist/esm/components/ui/Chart/lightweight/chartTime.js +16 -0
  8. package/dist/esm/components/ui/Chart/lightweight/lightweightForecastChart.helpers.js +114 -0
  9. package/dist/esm/components/ui/Chart/lightweight/quantileBandCustomSeries.js +147 -0
  10. package/dist/esm/components/ui/Chart/quantileBandConeChartData.js +131 -0
  11. package/dist/esm/components/ui/Chart/tools/chartPlotGeometry.js +65 -0
  12. package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.js +37 -1
  13. package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.js +5 -2
  14. package/dist/esm/components/ui/ChartAreaInteractive/TimeRangeBrushLayer.js +205 -0
  15. package/dist/esm/components/ui/ChartAreaInteractive/TimeRangeBrushLayer.styl.js +7 -0
  16. package/dist/esm/components/ui/ChartAreaInteractive/TimeRangeBrushLayout.helpers.js +37 -0
  17. package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.js +1 -0
  18. package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.js +7 -60
  19. package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.js +2 -2
  20. package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.js +1 -0
  21. package/dist/esm/components/ui/ChartAreaInteractive/overlays/useChartYRange.js +2 -4
  22. package/dist/esm/components/ui/ChartAreaInteractive/overlays/useQuantileBands.js +4 -102
  23. package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.js +7 -2
  24. package/dist/esm/components/ui/WorldMap/WorldMap.js +11 -0
  25. package/dist/esm/components/ui/WorldMap/WorldMap.styl.js +7 -0
  26. package/dist/esm/components/widgets/DriverCard/DriverCard.js +89 -0
  27. package/dist/esm/components/widgets/DriverCard/DriverCard.styl.js +7 -0
  28. package/dist/esm/components/widgets/DriverCard/DriverPerformanceChart.js +83 -0
  29. package/dist/esm/components/widgets/DriverCard/DriverPerformanceChart.styl.js +7 -0
  30. package/dist/esm/components/widgets/DriverCard/driverPerformanceChartData.js +50 -0
  31. package/dist/esm/components/widgets/DriverMap/DriverMap.js +2 -2
  32. package/dist/esm/components/widgets/DriverMap/DriverMap.styl.js +2 -2
  33. package/dist/esm/index.js +4 -2
  34. package/dist/esm/types/src/components/ui/Chart/Chart.d.ts +2 -0
  35. package/dist/esm/types/src/components/ui/Chart/components/BaseChartWrapper.d.ts +2 -1
  36. package/dist/esm/types/src/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.d.ts +14 -0
  37. package/dist/esm/types/src/components/ui/Chart/lightweight/LightweightForecastChart.d.ts +26 -0
  38. package/dist/esm/types/src/components/ui/Chart/lightweight/chartTime.d.ts +5 -0
  39. package/dist/esm/types/src/components/ui/Chart/lightweight/lightweightForecastChart.helpers.d.ts +13 -0
  40. package/dist/esm/types/src/components/ui/Chart/lightweight/quantileBandCustomSeries.d.ts +24 -0
  41. package/dist/esm/types/src/components/ui/Chart/quantileBandConeChartData.d.ts +7 -0
  42. package/dist/esm/types/src/components/ui/Chart/tools/chartPlotGeometry.d.ts +30 -0
  43. package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.d.ts +1 -1
  44. package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.d.ts +11 -2
  45. package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.d.ts +2 -2
  46. package/dist/esm/types/src/components/ui/ChartAreaInteractive/TimeRangeBrushLayer.d.ts +15 -0
  47. package/dist/esm/types/src/components/ui/ChartAreaInteractive/TimeRangeBrushLayout.helpers.d.ts +14 -0
  48. package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.d.ts +1 -1
  49. package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +1 -1
  50. package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.d.ts +5 -7
  51. package/dist/esm/types/src/components/ui/WorldMap/WorldMap.d.ts +4 -0
  52. package/dist/esm/types/src/components/ui/WorldMap/index.d.ts +2 -0
  53. package/dist/esm/types/src/components/widgets/DriverCard/DriverCard.d.ts +9 -0
  54. package/dist/esm/types/src/components/widgets/DriverCard/DriverPerformanceChart.d.ts +5 -0
  55. package/dist/esm/types/src/components/widgets/DriverCard/driverPerformanceChartData.d.ts +7 -0
  56. package/dist/esm/types/src/components/widgets/DriverCard/index.d.ts +1 -0
  57. package/dist/esm/types/src/components/widgets/DriverMap/index.d.ts +0 -2
  58. package/dist/esm/types/src/docs/pages/LightweightChartPage.d.ts +1 -0
  59. package/dist/esm/types/src/docs/pages/PageColumnsPage.d.ts +1 -0
  60. package/dist/esm/types/src/docs/pages/WorldMapPage.d.ts +1 -0
  61. package/dist/esm/types/src/index.d.ts +2 -0
  62. package/package.json +3 -2
  63. package/src/components/ui/Chart/Chart.tsx +9 -0
  64. package/src/components/ui/Chart/components/BaseChartWrapper.tsx +8 -41
  65. package/src/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.styl +60 -0
  66. package/src/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.styl.d.ts +15 -0
  67. package/src/components/ui/Chart/components/ChartEmptyState/ChartEmptyState.tsx +66 -0
  68. package/src/components/ui/Chart/lightweight/LightweightForecastChart.styl +25 -0
  69. package/src/components/ui/Chart/lightweight/LightweightForecastChart.styl.d.ts +11 -0
  70. package/src/components/ui/Chart/lightweight/LightweightForecastChart.tsx +721 -0
  71. package/src/components/ui/Chart/lightweight/chartTime.ts +18 -0
  72. package/src/components/ui/Chart/lightweight/lightweightForecastChart.helpers.ts +141 -0
  73. package/src/components/ui/Chart/lightweight/quantileBandCustomSeries.ts +215 -0
  74. package/src/components/ui/Chart/quantileBandConeChartData.ts +171 -0
  75. package/src/components/ui/Chart/tools/chartPlotGeometry.ts +89 -0
  76. package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.ts +44 -2
  77. package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.tsx +14 -1
  78. package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.ts +2 -3
  79. package/src/components/ui/ChartAreaInteractive/TimeRangeBrushLayer.styl +21 -0
  80. package/src/components/{widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.d.ts → ui/ChartAreaInteractive/TimeRangeBrushLayer.styl.d.ts} +3 -3
  81. package/src/components/ui/ChartAreaInteractive/TimeRangeBrushLayer.tsx +285 -0
  82. package/src/components/ui/ChartAreaInteractive/TimeRangeBrushLayout.helpers.ts +55 -0
  83. package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.ts +1 -0
  84. package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl +2 -7
  85. package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.d.ts +0 -1
  86. package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.tsx +7 -71
  87. package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.ts +1 -0
  88. package/src/components/ui/ChartAreaInteractive/overlays/useChartYRange.ts +2 -3
  89. package/src/components/ui/ChartAreaInteractive/overlays/useQuantileBands.ts +5 -131
  90. package/src/components/ui/Page/PageColumns/PageColumns.tsx +1 -1
  91. package/src/components/ui/TimeRangeControls/TimeRangeControls.tsx +16 -17
  92. package/src/components/{widgets/DriverMap/MapBackground/MapBackground.styl → ui/WorldMap/WorldMap.styl} +1 -3
  93. package/src/components/{widgets/DriverMap/MapBackground/MapBackground.styl.d.ts → ui/WorldMap/WorldMap.styl.d.ts} +1 -1
  94. package/src/components/ui/WorldMap/WorldMap.tsx +22 -0
  95. package/src/components/ui/WorldMap/index.ts +2 -0
  96. package/src/components/widgets/DriverCard/DriverCard.styl +169 -0
  97. package/src/components/widgets/DriverCard/DriverCard.styl.d.ts +40 -0
  98. package/src/components/widgets/DriverCard/DriverCard.tsx +219 -0
  99. package/src/components/widgets/DriverCard/DriverPerformanceChart.styl +43 -0
  100. package/src/components/widgets/DriverCard/DriverPerformanceChart.styl.d.ts +13 -0
  101. package/src/components/widgets/DriverCard/DriverPerformanceChart.tsx +150 -0
  102. package/src/components/widgets/DriverCard/driverPerformanceChartData.ts +64 -0
  103. package/src/components/widgets/DriverCard/index.ts +1 -0
  104. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.tsx +0 -2
  105. package/src/components/widgets/DriverMap/DriverMap.styl +6 -1
  106. package/src/components/widgets/DriverMap/DriverMap.styl.d.ts +1 -0
  107. package/src/components/widgets/DriverMap/DriverMap.tsx +2 -4
  108. package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +0 -2
  109. package/src/components/widgets/DriverMap/index.ts +0 -2
  110. package/src/declarations.d.ts +2 -0
  111. package/src/docs/config/webpack.config.js +26 -3
  112. package/src/docs/index.tsx +1 -1
  113. package/src/docs/pages/ChartAreaInteractivePage.tsx +2 -3
  114. package/src/docs/pages/DriverMapPage.tsx +214 -60
  115. package/src/docs/pages/LightweightChartPage.styl +18 -0
  116. package/src/docs/pages/LightweightChartPage.styl.d.ts +10 -0
  117. package/src/docs/pages/LightweightChartPage.tsx +195 -0
  118. package/src/docs/pages/PageColumnsPage.tsx +92 -0
  119. package/src/docs/pages/TimeRangeControlsPage.tsx +2 -3
  120. package/src/docs/pages/WorldMapPage.styl +14 -0
  121. package/src/docs/pages/WorldMapPage.styl.d.ts +8 -0
  122. package/src/docs/pages/WorldMapPage.tsx +26 -0
  123. package/src/docs/registry.ts +19 -1
  124. package/src/index.ts +2 -0
  125. package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.js +0 -8
  126. package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.js +0 -7
  127. package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.js +0 -10
  128. package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.styl.js +0 -7
  129. package/dist/esm/types/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.d.ts +0 -1
  130. package/dist/esm/types/src/components/widgets/DriverMap/MapBackground/MapBackground.d.ts +0 -1
  131. package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl +0 -24
  132. package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.tsx +0 -11
  133. package/src/components/widgets/DriverMap/MapBackground/MapBackground.tsx +0 -18
  134. /package/dist/esm/components/{widgets/DriverMap/MapBackground → ui/WorldMap}/map.svg.js +0 -0
  135. /package/src/components/{widgets/DriverMap/MapBackground → ui/WorldMap}/map.svg +0 -0
  136. /package/src/components/{widgets/DriverMap/MapBackground → ui/WorldMap}/mapAspect.mixin.styl +0 -0
  137. /package/src/components/{widgets/DriverMap/MapBackground → ui/WorldMap}/mapAspect.mixin.styl.d.ts +0 -0
@@ -1,6 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
3
  import type { QuantileBandConfig } from '#uilib/components/ui/Chart/chartForecastVisualization.types';
4
+ import { applyQuantileBandConeToChartData } from '#uilib/components/ui/Chart/quantileBandConeChartData';
4
5
  import { ChartDataPoint } from '#uilib/components/ui/ChartAreaInteractive/ChartAreaInteractive.types';
5
6
  import type { ForecastData } from '#uilib/types/forecast-data';
6
7
 
@@ -45,126 +46,17 @@ export function useQuantileBands({
45
46
  const allQuantilesData = forecastDataForSelected.allQuantiles;
46
47
  const clonedData = [...chartData];
47
48
 
48
- // Get forecast dates to map quantile array indices correctly
49
49
  const forecastDates = forecastDataForSelected.dates || [];
50
50
  const forecastDatesSet = new Set(forecastDates);
51
51
 
52
- // Find the last historical point for connection
53
- const historicalPoints = clonedData.filter(
54
- point => point.historical !== undefined,
55
- );
56
- const lastHistoricalPoint =
57
- historicalPoints.length > 0
58
- ? historicalPoints[historicalPoints.length - 1]
59
- : null;
60
- const lastHistoricalDate = lastHistoricalPoint?.date;
61
- const lastHistoricalValue = lastHistoricalPoint?.historical;
62
-
63
- // Get first forecast date
64
- const firstForecastDate = forecastDates[0];
65
- const firstForecastDateObj = firstForecastDate
66
- ? new Date(firstForecastDate)
67
- : null;
68
- const lastHistoricalDateObj = lastHistoricalDate
69
- ? new Date(lastHistoricalDate)
70
- : null;
71
-
72
- // Check if there's a gap between historical and forecast data (forecast starts after historical)
73
- const hasGap =
74
- lastHistoricalDate &&
75
- firstForecastDate &&
76
- lastHistoricalValue !== undefined &&
77
- firstForecastDateObj &&
78
- lastHistoricalDateObj &&
79
- firstForecastDateObj.getTime() > lastHistoricalDateObj.getTime();
80
-
81
- // Check if forecast starts before or at last historical point (need bridge point)
82
- const needsBridgePoint =
83
- lastHistoricalDate &&
84
- firstForecastDate &&
85
- lastHistoricalValue !== undefined &&
86
- firstForecastDateObj &&
87
- lastHistoricalDateObj &&
88
- firstForecastDateObj.getTime() <= lastHistoricalDateObj.getTime();
89
-
90
- // Find bridge point when forecast starts before or at last historical point
91
- let bridgePoint = null;
92
- let pointBeforeForecast = null;
93
- if (needsBridgePoint && historicalPoints.length > 0) {
94
- // Find the last historical point before or at the first forecast date
95
- // If dates are equal, use lastHistoricalPoint; otherwise find the point before
96
- bridgePoint =
97
- firstForecastDateObj &&
98
- lastHistoricalDateObj &&
99
- firstForecastDateObj.getTime() === lastHistoricalDateObj.getTime()
100
- ? lastHistoricalPoint
101
- : [...historicalPoints]
102
- .reverse()
103
- .find(
104
- p =>
105
- firstForecastDateObj &&
106
- new Date(p.date).getTime() < firstForecastDateObj.getTime(),
107
- ) || lastHistoricalPoint;
108
-
109
- // Find the actual point BEFORE the first forecast date for connection
110
- if (firstForecastDateObj) {
111
- pointBeforeForecast = [...historicalPoints].findLast(
112
- p => new Date(p.date).getTime() < firstForecastDateObj.getTime(),
113
- );
114
- }
115
- }
116
-
117
- // Create a map from date to quantile array index
118
52
  const dateToQuantileIndex = new Map<string, number>();
119
53
  forecastDates.forEach((date, index) => {
120
54
  dateToQuantileIndex.set(date, index);
121
55
  });
122
56
 
123
- const result = clonedData.map(point => {
57
+ const withRawBands = clonedData.map(point => {
124
58
  const newPoint = { ...point };
125
59
 
126
- // If there's a gap and this is the last historical point, add band data for connection
127
- if (
128
- hasGap &&
129
- point.date === lastHistoricalDate &&
130
- lastHistoricalValue !== undefined
131
- ) {
132
- // Set zero-width band at the last historical value for visual connection
133
- newPoint[bandKey] = [lastHistoricalValue, lastHistoricalValue] as [
134
- number,
135
- number,
136
- ];
137
- }
138
-
139
- // If forecast starts before or at last historical point, add bridge point connection
140
- // Set connection band at the point BEFORE the first forecast date (if exists)
141
- const isBridgePointDate =
142
- needsBridgePoint &&
143
- bridgePoint &&
144
- bridgePoint.historical !== undefined &&
145
- point.date === bridgePoint.date;
146
- const isPointBeforeForecast =
147
- needsBridgePoint &&
148
- pointBeforeForecast &&
149
- pointBeforeForecast.historical !== undefined &&
150
- point.date === pointBeforeForecast.date;
151
- const isAlsoForecastDate = forecastDatesSet.has(point.date);
152
-
153
- // Set zero-width connection band at the point BEFORE forecast starts
154
- if (isPointBeforeForecast && !isAlsoForecastDate) {
155
- newPoint[bandKey] = [
156
- pointBeforeForecast.historical,
157
- pointBeforeForecast.historical,
158
- ] as [number, number];
159
- } else if (isBridgePointDate && !isAlsoForecastDate) {
160
- // Fallback: if no point before forecast, use bridge point
161
- newPoint[bandKey] = [
162
- bridgePoint.historical,
163
- bridgePoint.historical,
164
- ] as [number, number];
165
- }
166
-
167
- // Only update band data for forecast dates
168
60
  if (forecastDatesSet.has(point.date)) {
169
61
  const quantileIndex = dateToQuantileIndex.get(point.date);
170
62
 
@@ -176,35 +68,17 @@ export function useQuantileBands({
176
68
  );
177
69
 
178
70
  if (bandValues) {
179
- // If this is also the bridge point (forecast starts at same date as last historical),
180
- // start the band from the historical value for smooth connection
181
- const isBridgePointDate =
182
- needsBridgePoint &&
183
- bridgePoint &&
184
- point.date === bridgePoint.date &&
185
- bridgePoint.historical !== undefined;
186
-
187
- if (isBridgePointDate && quantileIndex === 0) {
188
- // Start from historical value, expand to forecast upper bound
189
- newPoint[bandKey] = [bridgePoint.historical, bandValues[1]] as [
190
- number,
191
- number,
192
- ];
193
- } else {
194
- newPoint[bandKey] = bandValues;
195
- }
71
+ newPoint[bandKey] = bandValues;
196
72
  } else {
197
- // Remove band data if values don't exist
198
73
  delete newPoint[bandKey];
199
74
  }
200
75
  }
201
76
  }
202
- // For non-forecast dates, preserve existing band data if it exists
203
- // This ensures continuity of the band visualization
204
77
 
205
78
  return newPoint;
206
79
  });
207
- return result;
80
+
81
+ return applyQuantileBandConeToChartData(withRawBands, bandKey);
208
82
  }, [chartData, selectedForecastId, forecastData, bandKey, getBandValues]);
209
83
 
210
84
  const quantileBands: QuantileBandConfig[] = useMemo(() => {
@@ -8,7 +8,7 @@ export function PageColumns({
8
8
  className,
9
9
  }: {
10
10
  columns: React.ReactNode[];
11
- fill: 'left' | 'right' | 'all';
11
+ fill?: 'left' | 'right' | 'all';
12
12
  className?: string;
13
13
  }) {
14
14
  return (
@@ -14,22 +14,25 @@ import {
14
14
 
15
15
  import { TIME_RANGES } from './TimeRangeControls.constants';
16
16
  import S from './TimeRangeControls.styl';
17
- import { TimeRange } from './TimeRangeControls.types';
17
+
18
+ function toggleValueForTimeRange(timeRange: string): string {
19
+ return (TIME_RANGES as readonly string[]).includes(timeRange)
20
+ ? timeRange
21
+ : '';
22
+ }
23
+
24
+ export type TimeRangeControlsProps = {
25
+ timeRange: string;
26
+ onTimeRangeChange: (range: string) => void;
27
+ loading?: boolean;
28
+ };
18
29
 
19
30
  export const TimeRangeControls = memo(
20
- ({
21
- timeRange,
22
- onTimeRangeChange,
23
- loading,
24
- }: {
25
- timeRange: TimeRange;
26
- onTimeRangeChange: (range: string) => void;
27
- loading?: boolean;
28
- }) => (
31
+ ({ timeRange, onTimeRangeChange, loading }: TimeRangeControlsProps) => (
29
32
  <div className={S.timeRangeContainer}>
30
33
  <ToggleGroup
31
34
  type="single"
32
- value={timeRange}
35
+ value={toggleValueForTimeRange(timeRange)}
33
36
  onValueChange={onTimeRangeChange}
34
37
  variant="outline"
35
38
  disabled={loading}
@@ -56,13 +59,9 @@ export const TimeRangeSelect = memo(
56
59
  timeRange,
57
60
  onTimeRangeChange,
58
61
  loading,
59
- }: {
60
- timeRange: TimeRange;
61
- onTimeRangeChange: (range: string) => void;
62
- loading: boolean;
63
- }) => (
62
+ }: TimeRangeControlsProps & { loading: boolean }) => (
64
63
  <Select
65
- value={timeRange}
64
+ value={toggleValueForTimeRange(timeRange) || undefined}
66
65
  onValueChange={onTimeRangeChange}
67
66
  disabled={loading}
68
67
  >
@@ -1,8 +1,6 @@
1
1
  @import './mapAspect.mixin.styl'
2
2
 
3
- // Map is <img src> from bundled URL (data URL or file). Avoids CSS url() resolving to broken relative paths in consumers.
4
- .mapBackground
5
- position absolute
3
+ .worldMap
6
4
  display block
7
5
  width 100%
8
6
  height 100%
@@ -1,7 +1,7 @@
1
1
  // This file is automatically generated.
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
- 'mapBackground': string;
4
+ 'worldMap': string;
5
5
  }
6
6
  export const cssExports: CssExports;
7
7
  export default cssExports;
@@ -0,0 +1,22 @@
1
+ import cn from 'classnames';
2
+
3
+ import S from './WorldMap.styl';
4
+ import mapBgUrl from './map.svg';
5
+
6
+ export type WorldMapProps = {
7
+ className?: string;
8
+ };
9
+
10
+ export function WorldMap({ className }: WorldMapProps) {
11
+ const src = mapBgUrl as unknown as string;
12
+
13
+ return (
14
+ <img
15
+ alt=""
16
+ className={cn(S.worldMap, className)}
17
+ decoding="async"
18
+ draggable={false}
19
+ src={src}
20
+ />
21
+ );
22
+ }
@@ -0,0 +1,2 @@
1
+ export { WorldMap } from './WorldMap';
2
+ export type { WorldMapProps } from './WorldMap';
@@ -0,0 +1,169 @@
1
+ @import '../../../lib/theme.styl';
2
+
3
+ .root
4
+ width 100%
5
+ height auto
6
+ min-height 500px
7
+
8
+ @media (min-width 640px)
9
+ min-height 25rem
10
+
11
+ @media (min-width 768px)
12
+ min-height 31.25rem
13
+ // width 20rem
14
+
15
+ .cardContent
16
+ display flex
17
+ flex-direction column
18
+ gap 0.5rem
19
+
20
+ .noDriverSelected
21
+ color var(--muted-foreground)
22
+
23
+ .driverHeader
24
+ display flex
25
+ flex-direction column
26
+ align-items flex-start
27
+ gap 0.75rem
28
+ padding-bottom 0.25rem
29
+
30
+ .headerContent
31
+ flex-grow 1
32
+ display flex
33
+ flex-direction column
34
+ width 100%
35
+ gap 0.5rem
36
+
37
+ .topHeader
38
+ display flex
39
+ align-items center
40
+ justify-content space-between
41
+ min-height 36px
42
+ margin-top -12px
43
+
44
+ .categoryInfo
45
+ font-size 0.75rem
46
+ color var(--muted-foreground)
47
+ display flex
48
+ align-items center
49
+ gap 0.25rem
50
+
51
+ .categoryIcon
52
+ height 0.75rem
53
+ width 0.75rem
54
+ color var(--muted-foreground)
55
+
56
+ .categoryText
57
+ line-clamp(1)
58
+ overflow hidden
59
+ text-transform lowercase
60
+ &::first-letter
61
+ text-transform uppercase
62
+
63
+ .driverTitle
64
+ font-weight 500
65
+ color var(--foreground)
66
+ font-size 1.1rem
67
+ line-height 1.4
68
+ user-select text
69
+
70
+ &.truncated
71
+ line-clamp(2)
72
+ overflow hidden
73
+ cursor help
74
+
75
+ .regionDisplay
76
+ font-size 0.75rem
77
+ color var(--muted-foreground)
78
+
79
+ .metricsSection
80
+ text-align left
81
+ margin-bottom 0.5rem
82
+
83
+ .importanceScore
84
+ font-size 2.25rem
85
+ font-weight 400
86
+ color var(--foreground)
87
+ display flex
88
+ align-items center
89
+ line-height 1
90
+ height auto
91
+ user-select text
92
+
93
+ .directionLagSection
94
+ display flex
95
+ align-items center
96
+ justify-content space-between
97
+
98
+ .directionBadge
99
+ display flex
100
+ align-items center
101
+ gap 0.5rem
102
+
103
+ .trendIcon
104
+ height 0.75rem
105
+ width 0.75rem
106
+
107
+ .lagInfo
108
+ font-size 0.75rem
109
+ color var(--muted-foreground)
110
+
111
+ .description
112
+ font-size 0.875rem
113
+ line-height 1.625
114
+ user-select text
115
+
116
+ .skeletonContainer
117
+ display flex
118
+ flex-direction column
119
+ gap 1rem
120
+
121
+ .skeletonGroup
122
+ display flex
123
+ flex-direction column
124
+ gap 0.5rem
125
+
126
+ .skeletonItem
127
+ &.hxs
128
+ height 0.75rem
129
+ &.hs
130
+ height 1rem
131
+ &.hm
132
+ height 2rem
133
+ &.hl
134
+ height 8rem
135
+
136
+ &.w33
137
+ width 33.333333%
138
+ &.w50
139
+ width 50%
140
+ &.w75
141
+ width 75%
142
+ &.w80
143
+ width 80%
144
+ &.wFull
145
+ width 100%
146
+
147
+ .tooltipContent
148
+ max-width 20rem
149
+ font-size 0.75rem
150
+
151
+ .tooltipTitle
152
+ font-weight normal
153
+ font-family var(--font-family-body)
154
+
155
+ .queueMessage
156
+ display flex
157
+ flex-direction column
158
+ align-items center
159
+ gap var(--p-4)
160
+ padding var(--p-8) var(--p-4)
161
+ color var(--muted-foreground)
162
+ font-size 0.875rem
163
+ line-height 1.5
164
+ text-align center
165
+
166
+ svg
167
+ flex-shrink 0
168
+ color var(--muted-foreground)
169
+ opacity 0.8
@@ -0,0 +1,40 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ 'cardContent': string;
5
+ 'categoryIcon': string;
6
+ 'categoryInfo': string;
7
+ 'categoryText': string;
8
+ 'description': string;
9
+ 'directionBadge': string;
10
+ 'directionLagSection': string;
11
+ 'driverHeader': string;
12
+ 'driverTitle': string;
13
+ 'headerContent': string;
14
+ 'hl': string;
15
+ 'hm': string;
16
+ 'hs': string;
17
+ 'hxs': string;
18
+ 'importanceScore': string;
19
+ 'lagInfo': string;
20
+ 'metricsSection': string;
21
+ 'noDriverSelected': string;
22
+ 'queueMessage': string;
23
+ 'regionDisplay': string;
24
+ 'root': string;
25
+ 'skeletonContainer': string;
26
+ 'skeletonGroup': string;
27
+ 'skeletonItem': string;
28
+ 'tooltipContent': string;
29
+ 'tooltipTitle': string;
30
+ 'topHeader': string;
31
+ 'trendIcon': string;
32
+ 'truncated': string;
33
+ 'w33': string;
34
+ 'w50': string;
35
+ 'w75': string;
36
+ 'w80': string;
37
+ 'wFull': string;
38
+ }
39
+ export const cssExports: CssExports;
40
+ export default cssExports;