@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
@@ -0,0 +1,8 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ 'demoFill': string;
5
+ 'demoFrame': string;
6
+ }
7
+ export const cssExports: CssExports;
8
+ export default cssExports;
@@ -0,0 +1,26 @@
1
+ import { PageContentSection } from '#uilib/components/ui/Page';
2
+ import { WorldMap } from '#uilib/components/ui/WorldMap';
3
+
4
+ import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
5
+ import { DocsHeaderActions } from '../docsHeaderActions';
6
+ import S from './WorldMapPage.styl';
7
+
8
+ export default function WorldMapPage() {
9
+ return (
10
+ <>
11
+ <AppPageHeader
12
+ breadcrumbs={[{ label: 'World map' }]}
13
+ title="WorldMap"
14
+ subheader="Bundled SVG world map for layouts such as DriverMap — optional className for positioning."
15
+ actions={<DocsHeaderActions />}
16
+ />
17
+ <PageContentSection>
18
+ <div className={S.demoFrame}>
19
+ <div className={S.demoFill}>
20
+ <WorldMap />
21
+ </div>
22
+ </div>
23
+ </PageContentSection>
24
+ </>
25
+ );
26
+ }
@@ -91,6 +91,12 @@ export const DOC_REGISTRY: DocEntry[] = [
91
91
  section: 'Charts',
92
92
  load: () => import('./pages/ChartAreaInteractivePage'),
93
93
  },
94
+ {
95
+ slug: 'lightweight-forecast-chart',
96
+ title: 'LightweightForecastChart',
97
+ section: 'Charts',
98
+ load: () => import('./pages/LightweightChartPage'),
99
+ },
94
100
  {
95
101
  slug: 'chat',
96
102
  title: 'Chat',
@@ -117,7 +123,7 @@ export const DOC_REGISTRY: DocEntry[] = [
117
123
  },
118
124
  {
119
125
  slug: 'driver-map',
120
- title: 'DriverMap',
126
+ title: 'DriverMap & DriverCard',
121
127
  section: 'Widgets',
122
128
  load: () => import('./pages/DriverMapPage'),
123
129
  },
@@ -223,6 +229,12 @@ export const DOC_REGISTRY: DocEntry[] = [
223
229
  section: 'Layout',
224
230
  load: () => import('./pages/PagePage'),
225
231
  },
232
+ {
233
+ slug: 'page-columns',
234
+ title: 'PageColumns',
235
+ section: 'Layout',
236
+ load: () => import('./pages/PageColumnsPage'),
237
+ },
226
238
  {
227
239
  slug: 'page-footer',
228
240
  title: 'PageFooter',
@@ -374,6 +386,12 @@ export const DOC_REGISTRY: DocEntry[] = [
374
386
  section: 'Media',
375
387
  load: () => import('./pages/VimeoEmbedPage'),
376
388
  },
389
+ {
390
+ slug: 'world-map',
391
+ title: 'WorldMap',
392
+ section: 'Media',
393
+ load: () => import('./pages/WorldMapPage'),
394
+ },
377
395
  ];
378
396
 
379
397
  export const docPageComponents: Record<
package/src/index.ts CHANGED
@@ -58,8 +58,10 @@ export * from './components/ui/Toggle';
58
58
  export * from './components/ui/ToggleGroup';
59
59
  export * from './components/ui/Tooltip';
60
60
  export * from './components/ui/VimeoEmbed';
61
+ export * from './components/ui/WorldMap';
61
62
  export * from './components/ui/WorkspaceAppSwitcher';
62
63
  export * from './components/widgets/SidebarDatasetsItemsGrouped';
64
+ export * from './components/widgets/DriverCard';
63
65
  export * from './components/widgets/DriverMap';
64
66
  export * from './components/widgets/SybilionAppHeader';
65
67
  export * from './components/widgets/SybilionAuthLayout';
@@ -1,8 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import S from './LoadingSpinner.styl.js';
3
-
4
- function LoadingSpinner() {
5
- return (jsx("div", { className: S.loadingSpinnerContainer, children: jsx("div", { className: S.loadingSpinner }) }));
6
- }
7
-
8
- export { LoadingSpinner };
@@ -1,7 +0,0 @@
1
- import styleInject from 'style-inject';
2
-
3
- var css_248z = ".LoadingSpinner_loadingSpinnerContainer__Z69yY{align-items:center;display:flex;inset:0;justify-content:center;position:absolute;z-index:20}.LoadingSpinner_loadingSpinner__Nouur{border-top-color:var(--muted-foreground);height:1.5rem;width:1.5rem;border-opacity:.2;border:2px solid var(--muted-foreground);border-top-opacity:.6;animation:LoadingSpinner_spin__VSFJr 1s linear infinite;border-radius:50%}@keyframes LoadingSpinner_spin__VSFJr{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}";
4
- var S = {"loadingSpinnerContainer":"LoadingSpinner_loadingSpinnerContainer__Z69yY","loadingSpinner":"LoadingSpinner_loadingSpinner__Nouur","spin":"LoadingSpinner_spin__VSFJr"};
5
- styleInject(css_248z);
6
-
7
- export { S as default };
@@ -1,10 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import S from './MapBackground.styl.js';
3
- import mapBgUrl from './map.svg.js';
4
-
5
- function MapBackground() {
6
- const src = mapBgUrl;
7
- return (jsx("img", { alt: "", className: S.mapBackground, decoding: "async", draggable: false, src: src }));
8
- }
9
-
10
- export { MapBackground };
@@ -1,7 +0,0 @@
1
- import styleInject from 'style-inject';
2
-
3
- var css_248z = ".MapBackground_mapBackground__DC1-Z{aspect-ratio:623.2/341.276;display:block;height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}";
4
- var S = {"mapBackground":"MapBackground_mapBackground__DC1-Z"};
5
- styleInject(css_248z);
6
-
7
- export { S as default };
@@ -1 +0,0 @@
1
- export declare function LoadingSpinner(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function MapBackground(): import("react/jsx-runtime").JSX.Element;
@@ -1,24 +0,0 @@
1
- // Loading spinner component styles
2
- .loadingSpinnerContainer
3
- position absolute
4
- inset 0
5
- display flex
6
- align-items center
7
- justify-content center
8
- z-index 20
9
-
10
- .loadingSpinner
11
- width 1.5rem
12
- height 1.5rem
13
- border 2px solid var(--muted-foreground)
14
- border-opacity 0.2
15
- border-top-color var(--muted-foreground)
16
- border-top-opacity 0.6
17
- border-radius 50%
18
- animation spin 1s linear infinite
19
-
20
- @keyframes spin
21
- from
22
- transform rotate(0deg)
23
- to
24
- transform rotate(360deg)
@@ -1,11 +0,0 @@
1
- 'use client';
2
-
3
- import S from './LoadingSpinner.styl';
4
-
5
- export function LoadingSpinner() {
6
- return (
7
- <div className={S.loadingSpinnerContainer}>
8
- <div className={S.loadingSpinner}></div>
9
- </div>
10
- );
11
- }
@@ -1,18 +0,0 @@
1
- 'use client';
2
-
3
- import S from './MapBackground.styl';
4
- import mapBgUrl from './map.svg';
5
-
6
- export function MapBackground() {
7
- const src = mapBgUrl as unknown as string;
8
-
9
- return (
10
- <img
11
- alt=""
12
- className={S.mapBackground}
13
- decoding="async"
14
- draggable={false}
15
- src={src}
16
- />
17
- );
18
- }