@sybilion/uilib 1.2.23 → 1.2.26

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 (80) hide show
  1. package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +1 -1
  2. package/dist/esm/components/ui/Card/Card.styl.js +1 -1
  3. package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.js +1 -1
  4. package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.styl.js +1 -1
  5. package/dist/esm/components/ui/DropdownMenu/DropdownMenu.js +4 -4
  6. package/dist/esm/components/ui/NavUserHeader/NavUserHeader.js +5 -2
  7. package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.js +1 -1
  8. package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +2 -2
  9. package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.constants.json.js +6 -0
  10. package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.js +21 -0
  11. package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +7 -0
  12. package/dist/esm/components/widgets/DriverMap/DriverMap.helpers.js +107 -0
  13. package/dist/esm/components/widgets/DriverMap/DriverMap.js +129 -0
  14. package/dist/esm/components/widgets/DriverMap/DriverMap.styl.js +7 -0
  15. package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.js +8 -0
  16. package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.js +7 -0
  17. package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.js +10 -0
  18. package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.styl.js +7 -0
  19. package/dist/esm/components/widgets/DriverMap/MapBackground/map.svg.js +3 -0
  20. package/dist/esm/components/widgets/DriverMap/driverCategoryIcon.js +194 -0
  21. package/dist/esm/components/widgets/DriverMap/driverMapGeography.js +345 -0
  22. package/dist/esm/components/widgets/DriverMap/driverMapSelection.js +17 -0
  23. package/dist/esm/hooks/index.js +1 -0
  24. package/dist/esm/hooks/useEvent.js +0 -2
  25. package/dist/esm/index.js +6 -0
  26. package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.d.ts +2 -2
  27. package/dist/esm/types/src/components/widgets/DriverMap/DriverIcon/DriverIcon.d.ts +17 -0
  28. package/dist/esm/types/src/components/widgets/DriverMap/DriverMap.d.ts +8 -0
  29. package/dist/esm/types/src/components/widgets/DriverMap/DriverMap.helpers.d.ts +21 -0
  30. package/dist/esm/types/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.d.ts +1 -0
  31. package/dist/esm/types/src/components/widgets/DriverMap/MapBackground/MapBackground.d.ts +1 -0
  32. package/dist/esm/types/src/components/widgets/DriverMap/driverCategoryIcon.d.ts +1 -0
  33. package/dist/esm/types/src/components/widgets/DriverMap/driverMapGeography.d.ts +80 -0
  34. package/dist/esm/types/src/components/widgets/DriverMap/driverMapSelection.d.ts +3 -0
  35. package/dist/esm/types/src/components/widgets/DriverMap/index.d.ts +8 -0
  36. package/dist/esm/types/src/docs/pages/DriverMapPage.d.ts +1 -0
  37. package/dist/esm/types/src/docs/registry.d.ts +1 -1
  38. package/dist/esm/types/src/hooks/index.d.ts +1 -0
  39. package/dist/esm/types/src/index.d.ts +1 -0
  40. package/dist/esm/types/src/sybilion-auth/SybilionAuthProvider.d.ts +1 -1
  41. package/package.json +4 -4
  42. package/src/components/ui/AppHeader/AppHeader.styl +4 -0
  43. package/src/components/ui/Card/Card.styl +1 -0
  44. package/src/components/ui/Chat/ChatSheet/ChatSelector.styl +3 -1
  45. package/src/components/ui/Chat/ChatSheet/ChatSelector.tsx +1 -1
  46. package/src/components/ui/DropdownMenu/DropdownMenu.tsx +4 -0
  47. package/src/components/ui/NavUserHeader/NavUserHeader.tsx +9 -3
  48. package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +12 -0
  49. package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.d.ts +1 -0
  50. package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.tsx +1 -1
  51. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.constants.json +3 -0
  52. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +125 -0
  53. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.d.ts +22 -0
  54. package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.tsx +81 -0
  55. package/src/components/widgets/DriverMap/DriverMap.helpers.ts +164 -0
  56. package/src/components/widgets/DriverMap/DriverMap.styl +45 -0
  57. package/src/components/widgets/DriverMap/DriverMap.styl.d.ts +11 -0
  58. package/src/components/widgets/DriverMap/DriverMap.tsx +214 -0
  59. package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl +24 -0
  60. package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.d.ts +9 -0
  61. package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.tsx +11 -0
  62. package/src/components/widgets/DriverMap/MapBackground/MapBackground.styl +13 -0
  63. package/src/components/widgets/DriverMap/MapBackground/MapBackground.styl.d.ts +7 -0
  64. package/src/components/widgets/DriverMap/MapBackground/MapBackground.tsx +18 -0
  65. package/src/components/widgets/DriverMap/MapBackground/map.svg +4337 -0
  66. package/src/components/widgets/DriverMap/MapBackground/mapAspect.mixin.styl +3 -0
  67. package/src/components/widgets/DriverMap/MapBackground/mapAspect.mixin.styl.d.ts +2 -0
  68. package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +279 -0
  69. package/src/components/widgets/DriverMap/driverMapGeography.ts +478 -0
  70. package/src/components/widgets/DriverMap/driverMapSelection.ts +23 -0
  71. package/src/components/widgets/DriverMap/index.ts +18 -0
  72. package/src/docs/config/webpack.config.js +25 -9
  73. package/src/docs/pages/DriverMapPage.tsx +114 -0
  74. package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +5 -7
  75. package/src/docs/pages/TooltipPage.tsx +14 -10
  76. package/src/docs/registry.ts +6 -5
  77. package/src/hooks/index.ts +1 -0
  78. package/src/hooks/useEvent.ts +0 -2
  79. package/src/index.ts +1 -0
  80. package/src/sybilion-auth/SybilionAuthProvider.tsx +1 -1
@@ -0,0 +1,3 @@
1
+ mapAspect()
2
+ aspect-ratio 623.2 / 341.276
3
+ max-width 100%
@@ -0,0 +1,2 @@
1
+ const mod: { [cls: string]: string };
2
+ export default mod;
@@ -0,0 +1,279 @@
1
+ 'use client';
2
+
3
+ import {
4
+ ChartBarIcon,
5
+ ChartLineIcon,
6
+ CurrencyDollarIcon,
7
+ DatabaseIcon,
8
+ FactoryIcon,
9
+ FlaskIcon,
10
+ ForkKnifeIcon,
11
+ GlobeIcon,
12
+ HardHatIcon,
13
+ HeartIcon,
14
+ HouseIcon,
15
+ IdentificationCardIcon,
16
+ LightningIcon,
17
+ ShoppingCartIcon,
18
+ TShirtIcon,
19
+ ThermometerIcon,
20
+ TreeIcon,
21
+ TruckIcon,
22
+ UsersIcon,
23
+ WalletIcon,
24
+ WrenchIcon,
25
+ } from '@phosphor-icons/react';
26
+
27
+ // Icon mapping based on category
28
+ export const getCategoryIcon = (category: string | undefined | null) => {
29
+ if (!category) {
30
+ return <ChartBarIcon className="h-full w-full" />;
31
+ }
32
+ const categoryLower = category.toLowerCase();
33
+
34
+ // Housing & Real Estate
35
+ if (
36
+ categoryLower.includes('housing') ||
37
+ categoryLower.includes('real estate') ||
38
+ categoryLower.includes('residential') ||
39
+ categoryLower.includes('property')
40
+ )
41
+ return <HouseIcon className="h-full w-full" />;
42
+
43
+ // Construction & Infrastructure
44
+ if (
45
+ categoryLower.includes('construction') ||
46
+ categoryLower.includes('infrastructure') ||
47
+ categoryLower.includes('building') ||
48
+ categoryLower.includes('development') ||
49
+ categoryLower.includes('engineering') ||
50
+ categoryLower.includes('contracting')
51
+ )
52
+ return <HardHatIcon className="h-full w-full" />;
53
+
54
+ // Climate & Environment
55
+ if (
56
+ categoryLower.includes('climate') ||
57
+ categoryLower.includes('weather') ||
58
+ categoryLower.includes('environment') ||
59
+ categoryLower.includes('temperature') ||
60
+ categoryLower.includes('global warming') ||
61
+ categoryLower.includes('pollution') ||
62
+ categoryLower.includes('sustainability') ||
63
+ categoryLower.includes('green')
64
+ )
65
+ return <ThermometerIcon className="h-full w-full" />;
66
+
67
+ // Supply Chain & Trade
68
+ if (
69
+ categoryLower.includes('supply') ||
70
+ categoryLower.includes('trade') ||
71
+ categoryLower.includes('logistics') ||
72
+ categoryLower.includes('transport')
73
+ )
74
+ return <TruckIcon className="h-full w-full" />;
75
+
76
+ // Energy & Power
77
+ if (
78
+ categoryLower.includes('energy') ||
79
+ categoryLower.includes('power') ||
80
+ categoryLower.includes('electricity')
81
+ )
82
+ return <LightningIcon className="h-full w-full" />;
83
+
84
+ // Labor Market & Employment
85
+ if (
86
+ categoryLower.includes('labour') ||
87
+ categoryLower.includes('employment') ||
88
+ categoryLower.includes('jobs') ||
89
+ categoryLower.includes('hiring') ||
90
+ categoryLower.includes('unemployment') ||
91
+ categoryLower.includes('wages') ||
92
+ categoryLower.includes('salary') ||
93
+ categoryLower.includes('job market') ||
94
+ categoryLower.includes('workforce')
95
+ )
96
+ return <IdentificationCardIcon className="h-full w-full" />;
97
+
98
+ // Workforce & Human Resources
99
+ if (
100
+ categoryLower.includes('workforce') ||
101
+ categoryLower.includes('hr') ||
102
+ categoryLower.includes('human resources') ||
103
+ categoryLower.includes('personnel') ||
104
+ categoryLower.includes('staffing') ||
105
+ categoryLower.includes('talent') ||
106
+ categoryLower.includes('recruitment')
107
+ )
108
+ return <UsersIcon className="h-full w-full" />;
109
+
110
+ // Manufacturing & Production
111
+ if (
112
+ categoryLower.includes('volume') ||
113
+ categoryLower.includes('production') ||
114
+ categoryLower.includes('manufacturing') ||
115
+ categoryLower.includes('industry')
116
+ )
117
+ return <FactoryIcon className="h-full w-full" />;
118
+
119
+ // Finance & Economics
120
+ if (
121
+ categoryLower.includes('price') ||
122
+ categoryLower.includes('inflation') ||
123
+ categoryLower.includes('finance') ||
124
+ categoryLower.includes('economy') ||
125
+ categoryLower.includes('gdp')
126
+ )
127
+ return <CurrencyDollarIcon className="h-full w-full" />;
128
+
129
+ // Data & Analytics
130
+ if (
131
+ categoryLower.includes('data') ||
132
+ categoryLower.includes('analytics') ||
133
+ categoryLower.includes('statistics')
134
+ )
135
+ return <DatabaseIcon className="h-full w-full" />;
136
+
137
+ // Global & International
138
+ if (
139
+ categoryLower.includes('global') ||
140
+ categoryLower.includes('international') ||
141
+ categoryLower.includes('world')
142
+ )
143
+ return <GlobeIcon className="h-full w-full" />;
144
+
145
+ // Chemicals & Pharmaceuticals
146
+ if (
147
+ categoryLower.includes('chemical') ||
148
+ categoryLower.includes('pharmaceutical') ||
149
+ categoryLower.includes('medicine') ||
150
+ categoryLower.includes('drug') ||
151
+ categoryLower.includes('compound')
152
+ )
153
+ return <FlaskIcon className="h-full w-full" />;
154
+
155
+ // Food & Agriculture
156
+ if (
157
+ categoryLower.includes('food') ||
158
+ categoryLower.includes('processed') ||
159
+ categoryLower.includes('agriculture') ||
160
+ categoryLower.includes('farming') ||
161
+ categoryLower.includes('crop') ||
162
+ categoryLower.includes('grain') ||
163
+ categoryLower.includes('dairy') ||
164
+ categoryLower.includes('meat')
165
+ )
166
+ return <ForkKnifeIcon className="h-full w-full" />;
167
+
168
+ // Income & Wealth
169
+ if (
170
+ categoryLower.includes('income') ||
171
+ categoryLower.includes('wealth') ||
172
+ categoryLower.includes('salary') ||
173
+ categoryLower.includes('wage') ||
174
+ categoryLower.includes('earnings') ||
175
+ categoryLower.includes('revenue')
176
+ )
177
+ return <WalletIcon className="h-full w-full" />;
178
+
179
+ // Consumption & Retail
180
+ if (
181
+ categoryLower.includes('consumption') ||
182
+ categoryLower.includes('retail') ||
183
+ categoryLower.includes('shopping') ||
184
+ categoryLower.includes('spending') ||
185
+ categoryLower.includes('purchases') ||
186
+ categoryLower.includes('demand')
187
+ )
188
+ return <ShoppingCartIcon className="h-full w-full" />;
189
+
190
+ // Living Conditions & Quality of Life
191
+ if (
192
+ categoryLower.includes('living') ||
193
+ categoryLower.includes('quality') ||
194
+ categoryLower.includes('wellbeing') ||
195
+ categoryLower.includes('health') ||
196
+ categoryLower.includes('social') ||
197
+ categoryLower.includes('welfare') ||
198
+ categoryLower.includes('happiness')
199
+ )
200
+ return <HeartIcon className="h-full w-full" />;
201
+
202
+ // Minerals & Mining
203
+ if (
204
+ categoryLower.includes('mineral') ||
205
+ categoryLower.includes('mining') ||
206
+ categoryLower.includes('ore') ||
207
+ categoryLower.includes('metal') ||
208
+ categoryLower.includes('coal') ||
209
+ categoryLower.includes('gold') ||
210
+ categoryLower.includes('copper') ||
211
+ categoryLower.includes('iron') ||
212
+ categoryLower.includes('aluminum') ||
213
+ categoryLower.includes('lithium')
214
+ )
215
+ return <TreeIcon className="h-full w-full" />;
216
+
217
+ // Textiles & Fibers
218
+ if (
219
+ categoryLower.includes('textile') ||
220
+ categoryLower.includes('fiber') ||
221
+ categoryLower.includes('fabric') ||
222
+ categoryLower.includes('cloth') ||
223
+ categoryLower.includes('cotton') ||
224
+ categoryLower.includes('wool') ||
225
+ categoryLower.includes('silk') ||
226
+ categoryLower.includes('synthetic') ||
227
+ categoryLower.includes('garment') ||
228
+ categoryLower.includes('apparel')
229
+ )
230
+ return <TShirtIcon className="h-full w-full" />;
231
+
232
+ // Crafts & Artisan
233
+ if (
234
+ categoryLower.includes('craft') ||
235
+ categoryLower.includes('artisan') ||
236
+ categoryLower.includes('handmade') ||
237
+ categoryLower.includes('artistic') ||
238
+ categoryLower.includes('creative') ||
239
+ categoryLower.includes('design') ||
240
+ categoryLower.includes('pottery') ||
241
+ categoryLower.includes('woodwork') ||
242
+ categoryLower.includes('jewelry')
243
+ )
244
+ return <WrenchIcon className="h-full w-full" />;
245
+
246
+ // Population & Demographics
247
+ if (
248
+ categoryLower.includes('population') ||
249
+ categoryLower.includes('demographic') ||
250
+ categoryLower.includes('census') ||
251
+ categoryLower.includes('birth') ||
252
+ categoryLower.includes('death') ||
253
+ categoryLower.includes('migration') ||
254
+ categoryLower.includes('immigration') ||
255
+ categoryLower.includes('age') ||
256
+ categoryLower.includes('gender') ||
257
+ categoryLower.includes('ethnicity')
258
+ )
259
+ return <UsersIcon className="h-full w-full" />;
260
+
261
+ // Market Indices & Trading
262
+ if (
263
+ categoryLower.includes('market') ||
264
+ categoryLower.includes('index') ||
265
+ categoryLower.includes('indices') ||
266
+ categoryLower.includes('trading') ||
267
+ categoryLower.includes('stock') ||
268
+ categoryLower.includes('equity') ||
269
+ categoryLower.includes('s&p') ||
270
+ categoryLower.includes('nasdaq') ||
271
+ categoryLower.includes('dow') ||
272
+ categoryLower.includes('ftse') ||
273
+ categoryLower.includes('candlestick')
274
+ )
275
+ return <ChartLineIcon className="h-full w-full" />;
276
+
277
+ // Default fallback
278
+ return <ChartBarIcon className="h-full w-full" />;
279
+ };