@sybilion/uilib 1.4.42 → 1.4.43
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/README.md +2 -0
- package/dist/esm/src/index.js +0 -3
- package/dist/esm/types/src/index.d.ts +0 -3
- package/dist/esm/types/src/signin.d.ts +3 -0
- package/package.json +11 -1
- package/src/index.ts +1 -3
- package/src/signin.ts +3 -0
- package/dist/esm/src/components/widgets/SignInPage/SignInPage.js +0 -25
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.js +0 -18
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +0 -7
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.js +0 -11
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.js +0 -7
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ The package `[exports](./package.json)` entry `.` resolves to Rollup output and
|
|
|
54
54
|
```ts
|
|
55
55
|
import { Button } from '@sybilion/uilib';
|
|
56
56
|
import { ChatProvider, ChatSheet } from '@sybilion/uilib/chat';
|
|
57
|
+
import { SignInPage, SybilionSignInPanel } from '@sybilion/uilib/signin';
|
|
57
58
|
|
|
58
59
|
// or, with alias: import { Button } from 'uilib';
|
|
59
60
|
```
|
|
@@ -118,6 +119,7 @@ runs `yarn build` before `npm publish`. `dist/` is build output only (not commit
|
|
|
118
119
|
These areas expect the **app** to supply behavior or data (not vendored from product code):
|
|
119
120
|
|
|
120
121
|
- **Chat** — import from `@sybilion/uilib/chat` (`Chat`, `ChatSheet`, `ChatProvider`, slash-mention, chat-api types). Not on the main barrel. `ChatContext` exports types and hooks only. Implement `ChatContext.Provider` with `ChatContextType` in the app. Use `renderMessageChart` (or equivalent props) where charts appear inside messages.
|
|
122
|
+
- **Sign-in / SPA chrome** — import from `@sybilion/uilib/signin` (`SybilionSignInPanel`, `SignInPage`, `SybilionAppHeader`). These use `react-router-dom` and are not on the main barrel (webpack evaluates every barrel re-export before tree-shake). Page layout pieces that still use the router (`PageScroll`, `PageFooter`, `Breadcrumbs`) remain on the main index for now.
|
|
121
123
|
- **ChartAreaInteractive** — pass legend/overlay controls such as `toggleLegendSeries`, `ensureAnalysisSeriesVisible`, `hiddenSeries`, and `overlayForecastData` (use an empty object only if quantiles are entirely prop-driven).
|
|
122
124
|
- **PageFooter** — `versionLink` (empty string hides the version badge), `versionLabel`, and optional `children` between the logo block and copyright (debug UI, forms, etc. stay in the app).
|
|
123
125
|
- **Breadcrumbs** / **PageHeader** — `clientLogo`, `companyName`, and breadcrumb item data.
|
package/dist/esm/src/index.js
CHANGED
|
@@ -139,11 +139,8 @@ export { PerformanceChart } from './components/widgets/PerformanceChart/Performa
|
|
|
139
139
|
export { PerformanceTable } from './components/widgets/PerformanceChart/PerformanceTable.js';
|
|
140
140
|
export { SPAGHETTI_DRIFT_PER_HORIZON_ID_BASE, SPAGHETTI_MODEL_PER_HORIZON_ID_BASE, averageForecastErrorsVsHistoricalForMatrixColumn, buildDriftSpaghettiMatrixForCustomDialog, buildPerHorizonSpaghettiEntries, buildSpaghettiMergedChartData, calculateYRangeFromChartData, extendCustomPerformanceDriftSeedToHistoricalEnd, extendCustomPerformanceMatrixWithDriftSeed, getForecastModelDisplayName, latestHistoricalMonthKey, spaghettiGridFromHistoricalPreviousMonth } from './components/widgets/PerformanceChart/performanceChart.helpers.js';
|
|
141
141
|
export { SPAGHETTI_LOCAL_LS_USER_SERIES_ROW_ID, SPAGHETTI_TIME_SERIES_MATRIX_V, tryParseSpaghettiPerformanceMatrix } from './components/widgets/PerformanceChart/performanceChartUserSeries.js';
|
|
142
|
-
export { SybilionAppHeader } from './components/widgets/SybilionAppHeader/SybilionAppHeader.js';
|
|
143
142
|
export { SybilionAuthLayout } from './components/widgets/SybilionAuthLayout/SybilionAuthLayout.js';
|
|
144
143
|
export { SybilionAuthHeadline } from './components/widgets/SybilionAuthLayout/SybilionAuthHeadline.js';
|
|
145
|
-
export { SybilionSignInPanel } from './components/widgets/SybilionSignInPanel/SybilionSignInPanel.js';
|
|
146
|
-
export { SignInPage } from './components/widgets/SignInPage/SignInPage.js';
|
|
147
144
|
export { ChartTooltipItem } from './components/ui/Chart/components/ChartTooltipItem.js';
|
|
148
145
|
export { ChartLegendItem } from './components/ui/Chart/components/ChartLegendItem.js';
|
|
149
146
|
export { CustomChartLegend } from './components/ui/Chart/components/CustomChartLegend/CustomChartLegend.js';
|
|
@@ -80,7 +80,4 @@ export * from './components/widgets/DriverCard';
|
|
|
80
80
|
export * from './components/widgets/DriverMap';
|
|
81
81
|
export * from './components/widgets/DriversComparisonChart';
|
|
82
82
|
export * from './components/widgets/PerformanceChart';
|
|
83
|
-
export * from './components/widgets/SybilionAppHeader';
|
|
84
83
|
export * from './components/widgets/SybilionAuthLayout';
|
|
85
|
-
export * from './components/widgets/SybilionSignInPanel';
|
|
86
|
-
export * from './components/widgets/SignInPage';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sybilion/uilib",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.43",
|
|
4
4
|
"description": "Sybilion Design System — React UI components (Webpack + Stylus)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
"import": "./dist/esm/src/chat.js",
|
|
30
30
|
"default": "./dist/esm/src/chat.js"
|
|
31
31
|
},
|
|
32
|
+
"./signin": {
|
|
33
|
+
"types": "./dist/esm/types/src/signin.d.ts",
|
|
34
|
+
"import": "./dist/esm/src/signin.js",
|
|
35
|
+
"default": "./dist/esm/src/signin.js"
|
|
36
|
+
},
|
|
32
37
|
"./src": {
|
|
33
38
|
"types": "./src/index.ts",
|
|
34
39
|
"import": "./src/index.ts",
|
|
@@ -39,6 +44,11 @@
|
|
|
39
44
|
"import": "./src/chat.ts",
|
|
40
45
|
"default": "./src/chat.ts"
|
|
41
46
|
},
|
|
47
|
+
"./src/signin": {
|
|
48
|
+
"types": "./src/signin.ts",
|
|
49
|
+
"import": "./src/signin.ts",
|
|
50
|
+
"default": "./src/signin.ts"
|
|
51
|
+
},
|
|
42
52
|
"./hooks": {
|
|
43
53
|
"types": "./dist/esm/types/src/hooks/index.d.ts",
|
|
44
54
|
"import": "./dist/esm/src/hooks/index.js",
|
package/src/index.ts
CHANGED
|
@@ -85,7 +85,5 @@ export * from './components/widgets/DriverCard';
|
|
|
85
85
|
export * from './components/widgets/DriverMap';
|
|
86
86
|
export * from './components/widgets/DriversComparisonChart';
|
|
87
87
|
export * from './components/widgets/PerformanceChart';
|
|
88
|
-
export * from './components/widgets/SybilionAppHeader';
|
|
89
88
|
export * from './components/widgets/SybilionAuthLayout';
|
|
90
|
-
|
|
91
|
-
export * from './components/widgets/SignInPage';
|
|
89
|
+
// SPA/router widgets (react-router-dom): `@sybilion/uilib/signin`
|
package/src/signin.ts
ADDED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { SybilionAuthLayout } from '../SybilionAuthLayout/SybilionAuthLayout.js';
|
|
3
|
-
import '../SybilionAuthLayout/SybilionAuthHeadline.styl.js';
|
|
4
|
-
import { useSybilionAuth } from '../../../sybilion-auth/SybilionAuthProvider.js';
|
|
5
|
-
import { SybilionSignInPanel } from '../SybilionSignInPanel/SybilionSignInPanel.js';
|
|
6
|
-
|
|
7
|
-
const DEFAULT_TITLE = 'Sign In';
|
|
8
|
-
const DEFAULT_SUBTITLE = 'To get access authenticate through google or your email.';
|
|
9
|
-
function SignInPage({ title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, forgotPasswordTo = '/forgot-password', releasesTo = '/releases', versionLabel, primaryButtonLabel, connectingLabel, loginRedirectOptions, logoSize, containerClassName, }) {
|
|
10
|
-
const { error, loginWithRedirect, isLoading, isAuthenticated } = useSybilionAuth();
|
|
11
|
-
const handleSignIn = () => loginWithRedirect({
|
|
12
|
-
...loginRedirectOptions,
|
|
13
|
-
authorizationParams: {
|
|
14
|
-
prompt: 'login',
|
|
15
|
-
screen_hint: 'login',
|
|
16
|
-
...(typeof window !== 'undefined'
|
|
17
|
-
? { origin: window.location.origin }
|
|
18
|
-
: {}),
|
|
19
|
-
...loginRedirectOptions?.authorizationParams,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
return (jsx(SybilionAuthLayout, { title: title, subtitle: subtitle, logoSize: logoSize, containerClassName: containerClassName, children: jsx(SybilionSignInPanel, { onSignIn: handleSignIn, isSigningIn: isLoading && !isAuthenticated, error: error, forgotPasswordTo: forgotPasswordTo, releasesTo: releasesTo, versionLabel: versionLabel, primaryButtonLabel: primaryButtonLabel, connectingLabel: connectingLabel }) }));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { SignInPage };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import cn from 'classnames';
|
|
3
|
-
import { Link } from 'react-router-dom';
|
|
4
|
-
import { AppHeaderPortal } from '../../ui/AppHeader/AppHeader.js';
|
|
5
|
-
import { PAGE_HEADER_ACTIONS_ID } from '../../ui/AppHeader/appChromeAnchors.js';
|
|
6
|
-
import { Gap } from '../../ui/Gap/Gap.js';
|
|
7
|
-
import { Logo } from '../../ui/Logo/Logo.js';
|
|
8
|
-
import { NavUserHeader } from '../../ui/NavUserHeader/NavUserHeader.js';
|
|
9
|
-
import { WorkspaceAppSwitcher } from '../../ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.js';
|
|
10
|
-
import '@phosphor-icons/react';
|
|
11
|
-
import 'lucide-react';
|
|
12
|
-
import S from './SybilionAppHeader.styl.js';
|
|
13
|
-
|
|
14
|
-
function SybilionAppHeader({ pageHeaderId, actionsAnchorId = PAGE_HEADER_ACTIONS_ID, actionsAnchorClassName, actionsStart, actionsEnd, pathname, onNavigate, authenticated, defaultApps, appsStorageKey, logo, logoAreaClassName, ...navUserHeaderProps }) {
|
|
15
|
-
return (jsxs(AppHeaderPortal, { pageHeaderId: pageHeaderId, children: [jsx("div", { className: cn(S.logoArea, logoAreaClassName), children: jsx(Link, { to: "/", className: S.logoLink, children: logo ?? jsx(Logo, { size: "md", "aria-hidden": true }) }) }), jsx(WorkspaceAppSwitcher, { pathname: pathname, onNavigate: onNavigate, authenticated: authenticated, defaultApps: defaultApps, appsStorageKey: appsStorageKey }), jsx(Gap, {}), jsxs("div", { className: cn(S.actionsAnchor, actionsAnchorClassName), children: [jsx("div", { id: actionsAnchorId, className: S.pageActionsPortal }), actionsStart, jsx(NavUserHeader, { ...navUserHeaderProps }), actionsEnd] })] }));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { SybilionAppHeader };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styleInject from 'style-inject';
|
|
2
|
-
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2{align-items:center;display:flex;flex-shrink:0;gap:var(--p-2)}.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-1)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:28px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:16px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) header[data-sticky=false] .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:52px;position:fixed;top:22px;top:calc(22px + var(--app-banner-height, 0px))}[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) header[data-sticky=true] .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:calc(var(--sidebar-width)*-1 + 40px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=expanded] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:calc(var(--sidebar-width)*-1 + 44px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=collapsed] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:var(--p-8);position:absolute}}.SybilionAppHeader_logoLink__bH-KX{align-items:center;color:var(--foreground);display:flex;font-size:1.5rem;font-weight:400;gap:.5rem;text-decoration:none;white-space:nowrap;width:-moz-fit-content;width:fit-content}.SybilionAppHeader_logoLink__bH-KX svg{display:inline-flex;flex-shrink:0;height:32px;transition:transform .1s ease-in-out;width:auto}.SybilionAppHeader_logoLink__bH-KX:hover svg{transform:scale(1.05)}";
|
|
4
|
-
var S = {"actionsAnchor":"SybilionAppHeader_actionsAnchor__ress2","pageActionsPortal":"SybilionAppHeader_pageActionsPortal__9C5ww","logoArea":"SybilionAppHeader_logoArea__3HAhG","logoLink":"SybilionAppHeader_logoLink__bH-KX"};
|
|
5
|
-
styleInject(css_248z);
|
|
6
|
-
|
|
7
|
-
export { S as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
import { Button } from '../../ui/Button/Button.js';
|
|
4
|
-
import S from './SybilionSignInPanel.styl.js';
|
|
5
|
-
|
|
6
|
-
function SybilionSignInPanel({ onSignIn, isSigningIn = false, error, forgotPasswordTo, releasesTo, versionLabel, primaryButtonLabel = 'Sign-in', connectingLabel = 'Connecting...', }) {
|
|
7
|
-
const signingIn = Boolean(isSigningIn);
|
|
8
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: S.socialButtonContainer, children: jsx(Button, { variant: "outline", type: "button", className: S.socialButton, onClick: () => void onSignIn(), disabled: signingIn, children: signingIn ? connectingLabel : primaryButtonLabel }) }), error ? jsx("div", { className: S.errorMessage, children: error }) : null, jsx("div", { className: S.forgotPassword, children: jsx(Link, { to: forgotPasswordTo, className: S.forgotPasswordLink, children: "Forgot password?" }) }), releasesTo && versionLabel ? (jsxs(Link, { className: S.version, to: releasesTo, children: ["v", versionLabel] })) : null] }));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { SybilionSignInPanel };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styleInject from 'style-inject';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".SybilionSignInPanel_socialButtonContainer__lKNpp{display:flex;gap:10px;margin-bottom:10px;width:100%}.SybilionSignInPanel_socialButton__TqlKb{border:1px solid var(--border);border-radius:14px;flex:1;font-size:14px;font-weight:600;height:48px;padding:14px 16px}.SybilionSignInPanel_errorMessage__o8Q-m{color:red;font-size:14px;margin-bottom:10px;padding:10px}.SybilionSignInPanel_forgotPassword__47q20{margin-bottom:24px;text-align:right}.SybilionSignInPanel_forgotPasswordLink__lOJCv{color:var(--primary);font-family:Manrope,sans-serif;font-size:14px;font-weight:500;text-decoration:none;transition:opacity .2s}.SybilionSignInPanel_forgotPasswordLink__lOJCv:hover{opacity:.8}.SybilionSignInPanel_version__d5KAz{bottom:0;box-sizing:border-box;color:var(--muted-foreground);display:block;font-size:14px;margin-top:var(--p-8);opacity:.5;padding-bottom:var(--p-2);position:absolute;right:0;text-align:center;transition:opacity .3s ease-out;white-space:nowrap;width:100%}";
|
|
4
|
-
var S = {"socialButtonContainer":"SybilionSignInPanel_socialButtonContainer__lKNpp","socialButton":"SybilionSignInPanel_socialButton__TqlKb","errorMessage":"SybilionSignInPanel_errorMessage__o8Q-m","forgotPassword":"SybilionSignInPanel_forgotPassword__47q20","forgotPasswordLink":"SybilionSignInPanel_forgotPasswordLink__lOJCv","version":"SybilionSignInPanel_version__d5KAz"};
|
|
5
|
-
styleInject(css_248z);
|
|
6
|
-
|
|
7
|
-
export { S as default };
|