@sybilion/uilib 1.4.43 → 1.6.0
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 +16 -0
- package/assets/base.css +149 -0
- package/assets/globals.css +10 -532
- package/assets/tokens.css +288 -0
- package/dist/esm/src/components/ui/AnalysesSelector/AnalysesSelector.styl.js +1 -1
- package/dist/esm/src/components/ui/AppHeader/AppHeader.styl.js +1 -1
- package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/esm/src/components/ui/Breadcrumb/Breadcrumb.styl.js +1 -1
- package/dist/esm/src/components/ui/Button/Button.styl.js +1 -1
- package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
- package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.js +15 -2
- package/dist/esm/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +2 -2
- package/dist/esm/src/components/ui/Checkbox/Checkbox.styl.js +1 -1
- package/dist/esm/src/components/ui/Chip/Chip.styl.js +1 -1
- package/dist/esm/src/components/ui/DatePicker/DatePicker.styl.js +1 -1
- package/dist/esm/src/components/ui/Dialog/Dialog.styl.js +1 -1
- package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/esm/src/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
- package/dist/esm/src/components/ui/FileChip/FileChip.styl.js +1 -1
- package/dist/esm/src/components/ui/Input/Input.styl.js +1 -1
- package/dist/esm/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +1 -1
- package/dist/esm/src/components/ui/Notifications/Notifications.styl.js +1 -1
- package/dist/esm/src/components/ui/RadioGroup/RadioGroup.styl.js +1 -1
- package/dist/esm/src/components/ui/Renamer/Renamer.styl.js +2 -2
- package/dist/esm/src/components/ui/Select/Select.styl.js +1 -1
- package/dist/esm/src/components/ui/Sheet/Sheet.js +1 -1
- package/dist/esm/src/components/ui/Sheet/Sheet.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +1 -1
- package/dist/esm/src/components/ui/Slider/Slider.styl.js +1 -1
- package/dist/esm/src/components/ui/SupplyChainMap/SupplyChainMap.styl.js +1 -1
- package/dist/esm/src/components/ui/Switch/Switch.styl.js +1 -1
- package/dist/esm/src/components/ui/Tabs/Tabs.styl.js +1 -1
- package/dist/esm/src/components/ui/Toggle/Toggle.styl.js +1 -1
- package/dist/esm/src/components/ui/ToggleGroup/ToggleGroup.styl.js +1 -1
- package/dist/esm/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +1 -1
- package/dist/esm/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl.js +1 -1
- package/dist/esm/src/components/widgets/DriverMap/driverCategoryIcon.js +23 -23
- package/dist/esm/src/components/widgets/SignInPage/SignInPage.js +25 -0
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.js +18 -0
- package/dist/esm/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +7 -0
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.js +11 -0
- package/dist/esm/src/components/widgets/SybilionSignInPanel/SybilionSignInPanel.styl.js +7 -0
- package/dist/esm/src/signin.js +3 -0
- package/dist/esm/types/tests/cssEntries.test.d.ts +1 -0
- package/package.json +4 -3
- package/src/components/ui/AnalysesSelector/AnalysesSelector.styl +3 -0
- package/src/components/ui/AppHeader/AppHeader.styl +3 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.styl +1 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +1 -2
- package/src/components/ui/Button/Button.styl +3 -10
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +1 -1
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +8 -3
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +11 -10
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.tsx +28 -1
- package/src/components/ui/Checkbox/Checkbox.styl +3 -4
- package/src/components/ui/Chip/Chip.styl +3 -0
- package/src/components/ui/DatePicker/DatePicker.styl +5 -3
- package/src/components/ui/Dialog/Dialog.styl +1 -2
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +7 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +1 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.tsx +3 -3
- package/src/components/ui/FileChip/FileChip.styl +3 -3
- package/src/components/ui/Input/Input.styl +13 -6
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +1 -0
- package/src/components/ui/Notifications/Notifications.styl +7 -0
- package/src/components/ui/RadioGroup/RadioGroup.styl +3 -4
- package/src/components/ui/Renamer/Renamer.styl +5 -1
- package/src/components/ui/Select/Select.styl +5 -7
- package/src/components/ui/Sheet/Sheet.styl +1 -6
- package/src/components/ui/Sheet/Sheet.tsx +1 -1
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +1 -2
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +1 -2
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +1 -2
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +1 -2
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +1 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +1 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +1 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +1 -1
- package/src/components/ui/Slider/Slider.styl +3 -4
- package/src/components/ui/SupplyChainMap/SupplyChainMap.styl +1 -0
- package/src/components/ui/Switch/Switch.styl +3 -4
- package/src/components/ui/Tabs/Tabs.styl +3 -6
- package/src/components/ui/Toggle/Toggle.styl +3 -3
- package/src/components/ui/ToggleGroup/ToggleGroup.styl +3 -0
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +1 -0
- package/src/components/widgets/DriverMap/DriverIcon/DriverIcon.styl +1 -3
- package/src/components/widgets/DriverMap/driverCategoryIcon.tsx +23 -23
- package/src/docs/pages/SpacingPage.tsx +1 -1
- package/src/lib/theme.styl +17 -0
|
@@ -4,7 +4,7 @@ import { ChartBarIcon, HouseIcon, HardHatIcon, ThermometerIcon, TruckIcon, Light
|
|
|
4
4
|
// Icon mapping based on category
|
|
5
5
|
const getCategoryIcon = (category) => {
|
|
6
6
|
if (!category) {
|
|
7
|
-
return jsx(ChartBarIcon, {
|
|
7
|
+
return jsx(ChartBarIcon, { size: "100%" });
|
|
8
8
|
}
|
|
9
9
|
const categoryLower = category.toLowerCase();
|
|
10
10
|
// Housing & Real Estate
|
|
@@ -12,7 +12,7 @@ const getCategoryIcon = (category) => {
|
|
|
12
12
|
categoryLower.includes('real estate') ||
|
|
13
13
|
categoryLower.includes('residential') ||
|
|
14
14
|
categoryLower.includes('property'))
|
|
15
|
-
return jsx(HouseIcon, {
|
|
15
|
+
return jsx(HouseIcon, { size: "100%" });
|
|
16
16
|
// Construction & Infrastructure
|
|
17
17
|
if (categoryLower.includes('construction') ||
|
|
18
18
|
categoryLower.includes('infrastructure') ||
|
|
@@ -20,7 +20,7 @@ const getCategoryIcon = (category) => {
|
|
|
20
20
|
categoryLower.includes('development') ||
|
|
21
21
|
categoryLower.includes('engineering') ||
|
|
22
22
|
categoryLower.includes('contracting'))
|
|
23
|
-
return jsx(HardHatIcon, {
|
|
23
|
+
return jsx(HardHatIcon, { size: "100%" });
|
|
24
24
|
// Climate & Environment
|
|
25
25
|
if (categoryLower.includes('climate') ||
|
|
26
26
|
categoryLower.includes('weather') ||
|
|
@@ -30,18 +30,18 @@ const getCategoryIcon = (category) => {
|
|
|
30
30
|
categoryLower.includes('pollution') ||
|
|
31
31
|
categoryLower.includes('sustainability') ||
|
|
32
32
|
categoryLower.includes('green'))
|
|
33
|
-
return jsx(ThermometerIcon, {
|
|
33
|
+
return jsx(ThermometerIcon, { size: "100%" });
|
|
34
34
|
// Supply Chain & Trade
|
|
35
35
|
if (categoryLower.includes('supply') ||
|
|
36
36
|
categoryLower.includes('trade') ||
|
|
37
37
|
categoryLower.includes('logistics') ||
|
|
38
38
|
categoryLower.includes('transport'))
|
|
39
|
-
return jsx(TruckIcon, {
|
|
39
|
+
return jsx(TruckIcon, { size: "100%" });
|
|
40
40
|
// Energy & Power
|
|
41
41
|
if (categoryLower.includes('energy') ||
|
|
42
42
|
categoryLower.includes('power') ||
|
|
43
43
|
categoryLower.includes('electricity'))
|
|
44
|
-
return jsx(LightningIcon, {
|
|
44
|
+
return jsx(LightningIcon, { size: "100%" });
|
|
45
45
|
// Labor Market & Employment
|
|
46
46
|
if (categoryLower.includes('labour') ||
|
|
47
47
|
categoryLower.includes('employment') ||
|
|
@@ -52,7 +52,7 @@ const getCategoryIcon = (category) => {
|
|
|
52
52
|
categoryLower.includes('salary') ||
|
|
53
53
|
categoryLower.includes('job market') ||
|
|
54
54
|
categoryLower.includes('workforce'))
|
|
55
|
-
return jsx(IdentificationCardIcon, {
|
|
55
|
+
return jsx(IdentificationCardIcon, { size: "100%" });
|
|
56
56
|
// Workforce & Human Resources
|
|
57
57
|
if (categoryLower.includes('workforce') ||
|
|
58
58
|
categoryLower.includes('hr') ||
|
|
@@ -61,37 +61,37 @@ const getCategoryIcon = (category) => {
|
|
|
61
61
|
categoryLower.includes('staffing') ||
|
|
62
62
|
categoryLower.includes('talent') ||
|
|
63
63
|
categoryLower.includes('recruitment'))
|
|
64
|
-
return jsx(UsersIcon, {
|
|
64
|
+
return jsx(UsersIcon, { size: "100%" });
|
|
65
65
|
// Manufacturing & Production
|
|
66
66
|
if (categoryLower.includes('volume') ||
|
|
67
67
|
categoryLower.includes('production') ||
|
|
68
68
|
categoryLower.includes('manufacturing') ||
|
|
69
69
|
categoryLower.includes('industry'))
|
|
70
|
-
return jsx(FactoryIcon, {
|
|
70
|
+
return jsx(FactoryIcon, { size: "100%" });
|
|
71
71
|
// Finance & Economics
|
|
72
72
|
if (categoryLower.includes('price') ||
|
|
73
73
|
categoryLower.includes('inflation') ||
|
|
74
74
|
categoryLower.includes('finance') ||
|
|
75
75
|
categoryLower.includes('economy') ||
|
|
76
76
|
categoryLower.includes('gdp'))
|
|
77
|
-
return jsx(CurrencyDollarIcon, {
|
|
77
|
+
return jsx(CurrencyDollarIcon, { size: "100%" });
|
|
78
78
|
// Data & Analytics
|
|
79
79
|
if (categoryLower.includes('data') ||
|
|
80
80
|
categoryLower.includes('analytics') ||
|
|
81
81
|
categoryLower.includes('statistics'))
|
|
82
|
-
return jsx(DatabaseIcon, {
|
|
82
|
+
return jsx(DatabaseIcon, { size: "100%" });
|
|
83
83
|
// Global & International
|
|
84
84
|
if (categoryLower.includes('global') ||
|
|
85
85
|
categoryLower.includes('international') ||
|
|
86
86
|
categoryLower.includes('world'))
|
|
87
|
-
return jsx(GlobeIcon, {
|
|
87
|
+
return jsx(GlobeIcon, { size: "100%" });
|
|
88
88
|
// Chemicals & Pharmaceuticals
|
|
89
89
|
if (categoryLower.includes('chemical') ||
|
|
90
90
|
categoryLower.includes('pharmaceutical') ||
|
|
91
91
|
categoryLower.includes('medicine') ||
|
|
92
92
|
categoryLower.includes('drug') ||
|
|
93
93
|
categoryLower.includes('compound'))
|
|
94
|
-
return jsx(FlaskIcon, {
|
|
94
|
+
return jsx(FlaskIcon, { size: "100%" });
|
|
95
95
|
// Food & Agriculture
|
|
96
96
|
if (categoryLower.includes('food') ||
|
|
97
97
|
categoryLower.includes('processed') ||
|
|
@@ -101,7 +101,7 @@ const getCategoryIcon = (category) => {
|
|
|
101
101
|
categoryLower.includes('grain') ||
|
|
102
102
|
categoryLower.includes('dairy') ||
|
|
103
103
|
categoryLower.includes('meat'))
|
|
104
|
-
return jsx(ForkKnifeIcon, {
|
|
104
|
+
return jsx(ForkKnifeIcon, { size: "100%" });
|
|
105
105
|
// Income & Wealth
|
|
106
106
|
if (categoryLower.includes('income') ||
|
|
107
107
|
categoryLower.includes('wealth') ||
|
|
@@ -109,7 +109,7 @@ const getCategoryIcon = (category) => {
|
|
|
109
109
|
categoryLower.includes('wage') ||
|
|
110
110
|
categoryLower.includes('earnings') ||
|
|
111
111
|
categoryLower.includes('revenue'))
|
|
112
|
-
return jsx(WalletIcon, {
|
|
112
|
+
return jsx(WalletIcon, { size: "100%" });
|
|
113
113
|
// Consumption & Retail
|
|
114
114
|
if (categoryLower.includes('consumption') ||
|
|
115
115
|
categoryLower.includes('retail') ||
|
|
@@ -117,7 +117,7 @@ const getCategoryIcon = (category) => {
|
|
|
117
117
|
categoryLower.includes('spending') ||
|
|
118
118
|
categoryLower.includes('purchases') ||
|
|
119
119
|
categoryLower.includes('demand'))
|
|
120
|
-
return jsx(ShoppingCartIcon, {
|
|
120
|
+
return jsx(ShoppingCartIcon, { size: "100%" });
|
|
121
121
|
// Living Conditions & Quality of Life
|
|
122
122
|
if (categoryLower.includes('living') ||
|
|
123
123
|
categoryLower.includes('quality') ||
|
|
@@ -126,7 +126,7 @@ const getCategoryIcon = (category) => {
|
|
|
126
126
|
categoryLower.includes('social') ||
|
|
127
127
|
categoryLower.includes('welfare') ||
|
|
128
128
|
categoryLower.includes('happiness'))
|
|
129
|
-
return jsx(HeartIcon, {
|
|
129
|
+
return jsx(HeartIcon, { size: "100%" });
|
|
130
130
|
// Minerals & Mining
|
|
131
131
|
if (categoryLower.includes('mineral') ||
|
|
132
132
|
categoryLower.includes('mining') ||
|
|
@@ -138,7 +138,7 @@ const getCategoryIcon = (category) => {
|
|
|
138
138
|
categoryLower.includes('iron') ||
|
|
139
139
|
categoryLower.includes('aluminum') ||
|
|
140
140
|
categoryLower.includes('lithium'))
|
|
141
|
-
return jsx(TreeIcon, {
|
|
141
|
+
return jsx(TreeIcon, { size: "100%" });
|
|
142
142
|
// Textiles & Fibers
|
|
143
143
|
if (categoryLower.includes('textile') ||
|
|
144
144
|
categoryLower.includes('fiber') ||
|
|
@@ -150,7 +150,7 @@ const getCategoryIcon = (category) => {
|
|
|
150
150
|
categoryLower.includes('synthetic') ||
|
|
151
151
|
categoryLower.includes('garment') ||
|
|
152
152
|
categoryLower.includes('apparel'))
|
|
153
|
-
return jsx(TShirtIcon, {
|
|
153
|
+
return jsx(TShirtIcon, { size: "100%" });
|
|
154
154
|
// Crafts & Artisan
|
|
155
155
|
if (categoryLower.includes('craft') ||
|
|
156
156
|
categoryLower.includes('artisan') ||
|
|
@@ -161,7 +161,7 @@ const getCategoryIcon = (category) => {
|
|
|
161
161
|
categoryLower.includes('pottery') ||
|
|
162
162
|
categoryLower.includes('woodwork') ||
|
|
163
163
|
categoryLower.includes('jewelry'))
|
|
164
|
-
return jsx(WrenchIcon, {
|
|
164
|
+
return jsx(WrenchIcon, { size: "100%" });
|
|
165
165
|
// Population & Demographics
|
|
166
166
|
if (categoryLower.includes('population') ||
|
|
167
167
|
categoryLower.includes('demographic') ||
|
|
@@ -173,7 +173,7 @@ const getCategoryIcon = (category) => {
|
|
|
173
173
|
categoryLower.includes('age') ||
|
|
174
174
|
categoryLower.includes('gender') ||
|
|
175
175
|
categoryLower.includes('ethnicity'))
|
|
176
|
-
return jsx(UsersIcon, {
|
|
176
|
+
return jsx(UsersIcon, { size: "100%" });
|
|
177
177
|
// Market Indices & Trading
|
|
178
178
|
if (categoryLower.includes('market') ||
|
|
179
179
|
categoryLower.includes('index') ||
|
|
@@ -186,9 +186,9 @@ const getCategoryIcon = (category) => {
|
|
|
186
186
|
categoryLower.includes('dow') ||
|
|
187
187
|
categoryLower.includes('ftse') ||
|
|
188
188
|
categoryLower.includes('candlestick'))
|
|
189
|
-
return jsx(ChartLineIcon, {
|
|
189
|
+
return jsx(ChartLineIcon, { size: "100%" });
|
|
190
190
|
// Default fallback
|
|
191
|
-
return jsx(ChartBarIcon, {
|
|
191
|
+
return jsx(ChartBarIcon, { size: "100%" });
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
export { getCategoryIcon };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
@@ -0,0 +1,7 @@
|
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
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 };
|
|
@@ -0,0 +1,7 @@
|
|
|
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 };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SybilionSignInPanel } from './components/widgets/SybilionSignInPanel/SybilionSignInPanel.js';
|
|
2
|
+
export { SignInPage } from './components/widgets/SignInPage/SignInPage.js';
|
|
3
|
+
export { SybilionAppHeader } from './components/widgets/SybilionAppHeader/SybilionAppHeader.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sybilion/uilib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Sybilion Design System — React UI components (Webpack + Stylus)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
"default": "./dist/esm/src/hooks/index.js"
|
|
56
56
|
},
|
|
57
57
|
"./src/*": "./src/*",
|
|
58
|
-
"./logo.svg": "./src/components/ui/Logo/logo.svg"
|
|
58
|
+
"./logo.svg": "./src/components/ui/Logo/logo.svg",
|
|
59
|
+
"./tokens.css": "./assets/tokens.css",
|
|
60
|
+
"./base.css": "./assets/base.css"
|
|
59
61
|
},
|
|
60
62
|
"files": [
|
|
61
63
|
"assets",
|
|
@@ -140,7 +142,6 @@
|
|
|
140
142
|
"recharts": "^3.2.1",
|
|
141
143
|
"standard-version": "^9.5.0",
|
|
142
144
|
"style-inject": "^0.3.0",
|
|
143
|
-
"tailwindcss": "^4.2.2",
|
|
144
145
|
"topojson-client": "^3.1.0",
|
|
145
146
|
"tslib": "^2.8.1",
|
|
146
147
|
"vaul": "^1.1.2",
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
width auto
|
|
55
55
|
transition transform 0.1s ease-in-out
|
|
56
56
|
|
|
57
|
+
focus-outline()
|
|
58
|
+
|
|
57
59
|
&:hover svg
|
|
58
60
|
transform scale(1.05)
|
|
59
61
|
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
color var(--color-muted-foreground)
|
|
74
76
|
text-decoration none
|
|
75
77
|
transition color 0.2s ease
|
|
78
|
+
focus-outline()
|
|
76
79
|
|
|
77
80
|
&:hover
|
|
78
81
|
color var(--foreground)
|
|
@@ -90,8 +90,7 @@ function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps) {
|
|
|
90
90
|
className={cn(S.breadcrumbEllipsis, className)}
|
|
91
91
|
{...props}
|
|
92
92
|
>
|
|
93
|
-
<DotsThree
|
|
94
|
-
<span className="sr-only">More</span>
|
|
93
|
+
<DotsThree size={16} />
|
|
95
94
|
</span>
|
|
96
95
|
);
|
|
97
96
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'lib/theme.styl'
|
|
2
|
+
|
|
1
3
|
// Base button styles
|
|
2
4
|
.root
|
|
3
5
|
display inline-flex
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
cursor pointer
|
|
16
18
|
transition all var(--dur-base) var(--ease-standard)
|
|
17
19
|
border 0
|
|
20
|
+
focus-outline()
|
|
18
21
|
|
|
19
22
|
&:active
|
|
20
23
|
opacity 0.8
|
|
@@ -23,10 +26,6 @@
|
|
|
23
26
|
pointer-events none
|
|
24
27
|
opacity 0.5
|
|
25
28
|
|
|
26
|
-
&:focus-visible
|
|
27
|
-
border-color var(--ring)
|
|
28
|
-
ring 3px var(--ring-50)
|
|
29
|
-
|
|
30
29
|
&[aria-invalid="true"]
|
|
31
30
|
border-color var(--destructive)
|
|
32
31
|
ring 3px var(--destructive-200)
|
|
@@ -56,12 +55,6 @@
|
|
|
56
55
|
&:hover
|
|
57
56
|
background-color var(--destructive-600)
|
|
58
57
|
|
|
59
|
-
&:focus-visible
|
|
60
|
-
ring 3px var(--destructive-200)
|
|
61
|
-
|
|
62
|
-
:global(.dark) &
|
|
63
|
-
ring 3px var(--destructive-400)
|
|
64
|
-
|
|
65
58
|
.outline
|
|
66
59
|
border 1px solid var(--border)
|
|
67
60
|
background-color var(--background)
|
|
@@ -9,6 +9,13 @@ INPUT_MAX_HEIGHT = 200px
|
|
|
9
9
|
gap var(--p-2)
|
|
10
10
|
align-items stretch
|
|
11
11
|
padding var(--p-3)
|
|
12
|
+
overflow visible
|
|
13
|
+
|
|
14
|
+
.rootFocused
|
|
15
|
+
.root:focus-within
|
|
16
|
+
&:not([aria-disabled='true'])
|
|
17
|
+
outline none
|
|
18
|
+
box-shadow inset 0 0 0 var(--focus-outline-width, 2px) var(--focus-outline-color, var(--ring))
|
|
12
19
|
|
|
13
20
|
.composer
|
|
14
21
|
position relative
|
|
@@ -49,6 +56,7 @@ INPUT_MAX_HEIGHT = 200px
|
|
|
49
56
|
background transparent
|
|
50
57
|
|
|
51
58
|
&:focus-within
|
|
59
|
+
outline none
|
|
52
60
|
box-shadow none !important
|
|
53
61
|
|
|
54
62
|
& :global(.ProseMirror)
|
|
@@ -107,9 +115,6 @@ INPUT_MAX_HEIGHT = 200px
|
|
|
107
115
|
height 100%
|
|
108
116
|
padding-bottom 2px
|
|
109
117
|
|
|
110
|
-
& > button:focus
|
|
111
|
-
box-shadow 0 0 0 2px var(--brand-color-500) !important
|
|
112
|
-
|
|
113
118
|
& > button:first-child // submit button
|
|
114
119
|
position relative
|
|
115
120
|
border none
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// This file is automatically generated.
|
|
2
2
|
// Please do not change this file!
|
|
3
3
|
interface CssExports {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
attachButton: string;
|
|
5
|
+
attachmentItem: string;
|
|
6
|
+
attachments: string;
|
|
7
|
+
composer: string;
|
|
8
|
+
editorMount: string;
|
|
9
|
+
editorWrap: string;
|
|
10
|
+
fileInput: string;
|
|
11
|
+
root: string;
|
|
12
|
+
rootFocused: string;
|
|
13
|
+
submitButton: string;
|
|
14
|
+
submitColumn: string;
|
|
14
15
|
}
|
|
15
16
|
export const cssExports: CssExports;
|
|
16
17
|
export default cssExports;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import cn from 'classnames';
|
|
2
2
|
import {
|
|
3
|
+
FocusEvent,
|
|
3
4
|
FormEvent,
|
|
4
5
|
forwardRef,
|
|
5
6
|
useCallback,
|
|
6
7
|
useImperativeHandle,
|
|
7
8
|
useRef,
|
|
9
|
+
useState,
|
|
8
10
|
} from 'react';
|
|
9
11
|
|
|
10
12
|
import type { ChatPromptProps } from '../Chat.types';
|
|
@@ -74,6 +76,20 @@ export const ChatPrompt = forwardRef<ChatPromptComposerHandle, ChatPromptProps>(
|
|
|
74
76
|
|
|
75
77
|
emitSubmitRef.current = emitSubmitAndClear;
|
|
76
78
|
|
|
79
|
+
const [editorFocused, setEditorFocused] = useState(false);
|
|
80
|
+
|
|
81
|
+
const handleRootFocus = useCallback(() => {
|
|
82
|
+
if (!disabled) setEditorFocused(true);
|
|
83
|
+
}, [disabled]);
|
|
84
|
+
|
|
85
|
+
const handleRootBlur = useCallback((e: FocusEvent<HTMLFormElement>) => {
|
|
86
|
+
const root = e.currentTarget;
|
|
87
|
+
requestAnimationFrame(() => {
|
|
88
|
+
if (root.matches(':focus-within')) return;
|
|
89
|
+
setEditorFocused(false);
|
|
90
|
+
});
|
|
91
|
+
}, []);
|
|
92
|
+
|
|
77
93
|
const handleSubmitForm = useCallback(
|
|
78
94
|
(e?: FormEvent) => {
|
|
79
95
|
e?.preventDefault();
|
|
@@ -87,7 +103,18 @@ export const ChatPrompt = forwardRef<ChatPromptComposerHandle, ChatPromptProps>(
|
|
|
87
103
|
}
|
|
88
104
|
|
|
89
105
|
return (
|
|
90
|
-
<form
|
|
106
|
+
<form
|
|
107
|
+
onSubmit={handleSubmitForm}
|
|
108
|
+
onFocus={handleRootFocus}
|
|
109
|
+
onBlur={handleRootBlur}
|
|
110
|
+
onClick={handleRootFocus}
|
|
111
|
+
aria-disabled={disabled}
|
|
112
|
+
className={cn(
|
|
113
|
+
S.root,
|
|
114
|
+
editorFocused && !disabled && S.rootFocused,
|
|
115
|
+
className,
|
|
116
|
+
)}
|
|
117
|
+
>
|
|
91
118
|
<ChatPromptAttachments
|
|
92
119
|
attachments={attachments}
|
|
93
120
|
onRemove={index => onRemoveAttachment?.(index)}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'lib/theme.styl'
|
|
2
|
+
|
|
1
3
|
.checkboxRoot
|
|
2
4
|
cursor pointer
|
|
3
5
|
flex-shrink 0
|
|
@@ -7,6 +9,7 @@
|
|
|
7
9
|
box-shadow 0 1px 2px 0 rgba(0, 0, 0, 0.05)
|
|
8
10
|
outline none
|
|
9
11
|
transition box-shadow 0.15s ease-in-out
|
|
12
|
+
focus-outline()
|
|
10
13
|
.dark &
|
|
11
14
|
background-color var(--input-30)
|
|
12
15
|
|
|
@@ -17,10 +20,6 @@
|
|
|
17
20
|
.dark &
|
|
18
21
|
background-color var(--primary)
|
|
19
22
|
|
|
20
|
-
&:focus-visible
|
|
21
|
-
border-color var(--ring)
|
|
22
|
-
box-shadow 0 0 0 3px var(--ring-50)
|
|
23
|
-
|
|
24
23
|
&[aria-invalid=true]
|
|
25
24
|
box-shadow 0 0 0 3px var(--destructive-200)
|
|
26
25
|
border-color var(--destructive)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'lib/theme.styl'
|
|
2
|
+
|
|
1
3
|
.root
|
|
2
4
|
display inline-flex
|
|
3
5
|
align-items center
|
|
@@ -5,6 +7,7 @@
|
|
|
5
7
|
flex-shrink 0
|
|
6
8
|
white-space nowrap
|
|
7
9
|
border-radius var(--radius-pill)
|
|
10
|
+
focus-outline()
|
|
8
11
|
font-family var(--font-family-body)
|
|
9
12
|
font-weight 400
|
|
10
13
|
letter-spacing var(--tracking-body)
|
|
@@ -84,9 +84,7 @@
|
|
|
84
84
|
background-color var(--accent)
|
|
85
85
|
color var(--accent-foreground)
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
outline 2px solid var(--ring)
|
|
89
|
-
outline-offset 1px
|
|
87
|
+
focus-outline()
|
|
90
88
|
|
|
91
89
|
&:disabled
|
|
92
90
|
cursor not-allowed
|
|
@@ -154,6 +152,10 @@
|
|
|
154
152
|
.rangeInputFieldActive
|
|
155
153
|
box-shadow inset 0 0 0 2px var(--brand-color-400) !important
|
|
156
154
|
|
|
155
|
+
&:focus
|
|
156
|
+
&:focus-visible
|
|
157
|
+
box-shadow none !important
|
|
158
|
+
|
|
157
159
|
.rangeSeparator
|
|
158
160
|
display flex
|
|
159
161
|
align-items center
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
outline-offset 2px
|
|
66
66
|
user-select none
|
|
67
67
|
cursor: pointer;
|
|
68
|
+
focus-outline()
|
|
68
69
|
|
|
69
70
|
a&
|
|
70
71
|
text-decoration: none;
|
|
@@ -132,6 +133,7 @@
|
|
|
132
133
|
outline 2px solid transparent
|
|
133
134
|
outline-offset 2px
|
|
134
135
|
user-select none
|
|
136
|
+
focus-outline()
|
|
135
137
|
|
|
136
138
|
&:focus
|
|
137
139
|
background-color var(--accent)
|
|
@@ -160,6 +162,7 @@
|
|
|
160
162
|
outline 2px solid transparent
|
|
161
163
|
outline-offset 2px
|
|
162
164
|
user-select none
|
|
165
|
+
focus-outline()
|
|
163
166
|
|
|
164
167
|
&:focus
|
|
165
168
|
background-color var(--accent)
|
|
@@ -208,6 +211,7 @@
|
|
|
208
211
|
outline 2px solid transparent
|
|
209
212
|
outline-offset 2px
|
|
210
213
|
user-select none
|
|
214
|
+
focus-outline()
|
|
211
215
|
|
|
212
216
|
&:focus
|
|
213
217
|
background-color var(--accent)
|
|
@@ -220,6 +224,9 @@
|
|
|
220
224
|
&[data-inset]
|
|
221
225
|
padding-left var(--p-8)
|
|
222
226
|
|
|
227
|
+
.subTriggerIcon
|
|
228
|
+
margin-left auto
|
|
229
|
+
|
|
223
230
|
.subContent
|
|
224
231
|
z-index 1100
|
|
225
232
|
min-width 8rem
|