@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.
- package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +1 -1
- package/dist/esm/components/ui/Card/Card.styl.js +1 -1
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.js +1 -1
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.styl.js +1 -1
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.js +4 -4
- package/dist/esm/components/ui/NavUserHeader/NavUserHeader.js +5 -2
- package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.js +1 -1
- package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +2 -2
- package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.constants.json.js +6 -0
- package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.js +21 -0
- package/dist/esm/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +7 -0
- package/dist/esm/components/widgets/DriverMap/DriverMap.helpers.js +107 -0
- package/dist/esm/components/widgets/DriverMap/DriverMap.js +129 -0
- package/dist/esm/components/widgets/DriverMap/DriverMap.styl.js +7 -0
- package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.js +8 -0
- package/dist/esm/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.js +7 -0
- package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.js +10 -0
- package/dist/esm/components/widgets/DriverMap/MapBackground/MapBackground.styl.js +7 -0
- package/dist/esm/components/widgets/DriverMap/MapBackground/map.svg.js +3 -0
- package/dist/esm/components/widgets/DriverMap/driverCategoryIcon.js +194 -0
- package/dist/esm/components/widgets/DriverMap/driverMapGeography.js +345 -0
- package/dist/esm/components/widgets/DriverMap/driverMapSelection.js +17 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/useEvent.js +0 -2
- package/dist/esm/index.js +6 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.d.ts +2 -2
- package/dist/esm/types/src/components/widgets/DriverMap/DriverIcon/DriverIcon.d.ts +17 -0
- package/dist/esm/types/src/components/widgets/DriverMap/DriverMap.d.ts +8 -0
- package/dist/esm/types/src/components/widgets/DriverMap/DriverMap.helpers.d.ts +21 -0
- package/dist/esm/types/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/DriverMap/MapBackground/MapBackground.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/DriverMap/driverCategoryIcon.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/DriverMap/driverMapGeography.d.ts +80 -0
- package/dist/esm/types/src/components/widgets/DriverMap/driverMapSelection.d.ts +3 -0
- package/dist/esm/types/src/components/widgets/DriverMap/index.d.ts +8 -0
- package/dist/esm/types/src/docs/pages/DriverMapPage.d.ts +1 -0
- package/dist/esm/types/src/docs/registry.d.ts +1 -1
- package/dist/esm/types/src/hooks/index.d.ts +1 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/esm/types/src/sybilion-auth/SybilionAuthProvider.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/ui/AppHeader/AppHeader.styl +4 -0
- package/src/components/ui/Card/Card.styl +1 -0
- package/src/components/ui/Chat/ChatSheet/ChatSelector.styl +3 -1
- package/src/components/ui/Chat/ChatSheet/ChatSelector.tsx +1 -1
- package/src/components/ui/DropdownMenu/DropdownMenu.tsx +4 -0
- package/src/components/ui/NavUserHeader/NavUserHeader.tsx +9 -3
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +12 -0
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.d.ts +1 -0
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.tsx +1 -1
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.constants.json +3 -0
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +125 -0
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.d.ts +22 -0
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.tsx +81 -0
- package/src/components/widgets/DriverMap/DriverMap.helpers.ts +164 -0
- package/src/components/widgets/DriverMap/DriverMap.styl +45 -0
- package/src/components/widgets/DriverMap/DriverMap.styl.d.ts +11 -0
- package/src/components/widgets/DriverMap/DriverMap.tsx +214 -0
- package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl +24 -0
- package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.styl.d.ts +9 -0
- package/src/components/widgets/DriverMap/LoadingSpinner/LoadingSpinner.tsx +11 -0
- package/src/components/widgets/DriverMap/MapBackground/MapBackground.styl +13 -0
- package/src/components/widgets/DriverMap/MapBackground/MapBackground.styl.d.ts +7 -0
- package/src/components/widgets/DriverMap/MapBackground/MapBackground.tsx +18 -0
- package/src/components/widgets/DriverMap/MapBackground/map.svg +4337 -0
- package/src/components/widgets/DriverMap/MapBackground/mapAspect.mixin.styl +3 -0
- package/src/components/widgets/DriverMap/MapBackground/mapAspect.mixin.styl.d.ts +2 -0
- package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +279 -0
- package/src/components/widgets/DriverMap/driverMapGeography.ts +478 -0
- package/src/components/widgets/DriverMap/driverMapSelection.ts +23 -0
- package/src/components/widgets/DriverMap/index.ts +18 -0
- package/src/docs/config/webpack.config.js +25 -9
- package/src/docs/pages/DriverMapPage.tsx +114 -0
- package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx +5 -7
- package/src/docs/pages/TooltipPage.tsx +14 -10
- package/src/docs/registry.ts +6 -5
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useEvent.ts +0 -2
- package/src/index.ts +1 -0
- package/src/sybilion-auth/SybilionAuthProvider.tsx +1 -1
|
@@ -157,8 +157,8 @@ function StandaloneLayoutPreview() {
|
|
|
157
157
|
appsStorageKey={DOCS_WORKSPACE_APPS_LS_KEY}
|
|
158
158
|
defaultApps={DOCS_PREVIEW_APPS}
|
|
159
159
|
user={{
|
|
160
|
-
name: '
|
|
161
|
-
email: '
|
|
160
|
+
name: 'Example User',
|
|
161
|
+
email: 'user@example.com',
|
|
162
162
|
avatar: '',
|
|
163
163
|
}}
|
|
164
164
|
onLogout={() => undefined}
|
|
@@ -191,11 +191,9 @@ export default function StandaloneAppLayoutPage() {
|
|
|
191
191
|
title="Standalone app layout"
|
|
192
192
|
subheader={
|
|
193
193
|
<>
|
|
194
|
-
Live preview of AppShell + Sidebar + main column.
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
<code>mini/sybilion-app-template/</code> and follow its README — this
|
|
198
|
-
page is layout only.
|
|
194
|
+
Live preview of AppShell + Sidebar + main column. <br />
|
|
195
|
+
Greenfield wiring: copy <code>mini/sybilion-app-template/</code> and
|
|
196
|
+
follow its README — this page is layout only.
|
|
199
197
|
</>
|
|
200
198
|
}
|
|
201
199
|
actions={<DocsHeaderActions />}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
10
10
|
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
11
11
|
|
|
12
|
+
const TOOLTIP_SIDES = ['left', 'top', 'bottom', 'right'] as const;
|
|
13
|
+
|
|
12
14
|
export default function TooltipPage() {
|
|
13
15
|
return (
|
|
14
16
|
<>
|
|
@@ -19,16 +21,18 @@ export default function TooltipPage() {
|
|
|
19
21
|
actions={<DocsHeaderActions />}
|
|
20
22
|
/>
|
|
21
23
|
<PageContentSection>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
|
|
25
|
+
{TOOLTIP_SIDES.map(side => (
|
|
26
|
+
<Tooltip key={side}>
|
|
27
|
+
<TooltipTrigger asChild>
|
|
28
|
+
<Button type="button" variant="outline">
|
|
29
|
+
{side.charAt(0).toUpperCase() + side.slice(1)}
|
|
30
|
+
</Button>
|
|
31
|
+
</TooltipTrigger>
|
|
32
|
+
<TooltipContent side={side}>Tooltip opens {side}</TooltipContent>
|
|
33
|
+
</Tooltip>
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
32
36
|
</PageContentSection>
|
|
33
37
|
</>
|
|
34
38
|
);
|
package/src/docs/registry.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const DOC_SECTION_ORDER = [
|
|
|
13
13
|
'Feedback',
|
|
14
14
|
'Layout',
|
|
15
15
|
'Navigation',
|
|
16
|
+
'Widgets',
|
|
16
17
|
'Overlays',
|
|
17
18
|
'Data display',
|
|
18
19
|
'Charts',
|
|
@@ -115,10 +116,10 @@ export const DOC_REGISTRY: DocEntry[] = [
|
|
|
115
116
|
load: () => import('./pages/DialogPage'),
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
|
-
slug: '
|
|
119
|
-
title: '
|
|
120
|
-
section: '
|
|
121
|
-
load: () => import('./pages/
|
|
119
|
+
slug: 'driver-map',
|
|
120
|
+
title: 'DriverMap',
|
|
121
|
+
section: 'Widgets',
|
|
122
|
+
load: () => import('./pages/DriverMapPage'),
|
|
122
123
|
},
|
|
123
124
|
{
|
|
124
125
|
slug: 'dropdown-menu',
|
|
@@ -286,7 +287,7 @@ export const DOC_REGISTRY: DocEntry[] = [
|
|
|
286
287
|
{
|
|
287
288
|
slug: 'sidebar-datasets-items-grouped',
|
|
288
289
|
title: 'SidebarDatasetsItemsGrouped',
|
|
289
|
-
section: '
|
|
290
|
+
section: 'Widgets',
|
|
290
291
|
load: () => import('./pages/SidebarDatasetsItemsGroupedPage'),
|
|
291
292
|
},
|
|
292
293
|
{
|
package/src/hooks/index.ts
CHANGED
package/src/hooks/useEvent.ts
CHANGED
|
@@ -20,11 +20,9 @@ export default function useEvent({
|
|
|
20
20
|
const callbackRef = useRef(callback);
|
|
21
21
|
callbackRef.current = callback;
|
|
22
22
|
|
|
23
|
-
// Track when elem.current changes to force effect re-run
|
|
24
23
|
const [elemKey, setElemKey] = useState(0);
|
|
25
24
|
const prevElemRef = useRef<HTMLElement | null>(null);
|
|
26
25
|
|
|
27
|
-
// Watch for elem.current changes and update state to trigger main effect re-run
|
|
28
26
|
useEffect(() => {
|
|
29
27
|
const currentElem = Array.isArray(elem)
|
|
30
28
|
? elem.find(ref => ref?.current)?.current || null
|
package/src/index.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from './components/ui/Tooltip';
|
|
|
60
60
|
export * from './components/ui/VimeoEmbed';
|
|
61
61
|
export * from './components/ui/WorkspaceAppSwitcher';
|
|
62
62
|
export * from './components/widgets/SidebarDatasetsItemsGrouped';
|
|
63
|
+
export * from './components/widgets/DriverMap';
|
|
63
64
|
export * from './components/widgets/SybilionAppHeader';
|
|
64
65
|
export * from './components/widgets/SybilionAuthLayout';
|
|
65
66
|
export * from './components/widgets/SybilionSignInPanel';
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from 'react';
|
|
16
16
|
|
|
17
17
|
import { normalizeApiBaseUrl } from '#uilib/sybilion-auth/authPaths';
|
|
18
|
-
import type { LoginTokenResponse, SybilionSDK } from '@sybilion/sdk';
|
|
18
|
+
import type { LoginTokenResponse, SybilionSDK } from '@sybilion/platform-sdk';
|
|
19
19
|
|
|
20
20
|
const DEFAULT_TOKEN_KEY = 'sybilion.standalone.jwt';
|
|
21
21
|
|