@robosystems/core 0.9.1 → 0.9.3
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/package.json
CHANGED
|
@@ -23,13 +23,25 @@ function MobileSidebar({ navigationItems, features, bottomMenuActions, additiona
|
|
|
23
23
|
return null;
|
|
24
24
|
return (_jsxs(_Fragment, { children: [_jsx(Sidebar, { "aria-label": "Sidebar with multi-level dropdown example", theme: customTheme.sidebar, className: twMerge(`fixed inset-y-0 left-0 z-20 hidden h-full shrink-0 flex-col border-r border-gray-200 pt-16 ${borderColorClass} lg:flex`, isOpen && 'flex'), id: "sidebar", children: _jsxs("div", { className: "flex h-full flex-col justify-between", children: [_jsxs("div", { className: "py-2", children: [additionalMobileComponents && (_jsx("div", { className: "hidden pb-2 max-md:block", children: additionalMobileComponents })), _jsxs(SidebarItems, { children: [_jsx(OrgSection, { isCollapsed: false, showOrgSection: features.showOrgSection }), _jsx(SidebarItemGroup, { className: "mt-0 border-t-0 pt-2 pb-1", children: navigationItems.map((item) => (_jsx(CustomSidebarItem, Object.assign({}, item, { pathname: pathname }), item.label))) })] })] }), _jsx(BottomMenu, { isCollapsed: false, features: features, bottomMenuActions: bottomMenuActions })] }) }), _jsx("div", { onClick: close, "aria-hidden": "true", className: "fixed inset-0 z-10 h-full w-full bg-zinc-900/50 pt-16 dark:bg-zinc-900/90" })] }));
|
|
25
25
|
}
|
|
26
|
+
// SidebarItem renders an <a> for an href and forwards these, but its props are typed
|
|
27
|
+
// as a div's, so they are spread rather than written as attributes. A link that opens a
|
|
28
|
+
// new tab gets noopener and noreferrer, so the page it opens can't reach back into the
|
|
29
|
+
// app's window through window.opener.
|
|
30
|
+
function newTabProps(target) {
|
|
31
|
+
return target
|
|
32
|
+
? {
|
|
33
|
+
target,
|
|
34
|
+
rel: target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
35
|
+
}
|
|
36
|
+
: {};
|
|
37
|
+
}
|
|
26
38
|
function CustomSidebarItem({ href, target, icon: Icon, label, items, badge, pathname, }) {
|
|
27
39
|
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
28
40
|
const isExternal = target === '_blank' || (href === null || href === void 0 ? void 0 : href.startsWith('http'));
|
|
29
41
|
if (isExternal) {
|
|
30
|
-
return (_jsx(SidebarItem, { href: href || '#', icon: Icon, active: pathname === href, theme: customTheme.sidebar.item, className: pathname === href
|
|
42
|
+
return (_jsx(SidebarItem, Object.assign({ href: href || '#' }, newTabProps(target), { icon: Icon, active: pathname === href, theme: customTheme.sidebar.item, className: pathname === href
|
|
31
43
|
? 'bg-primary-50 text-primary-700 dark:bg-primary-200 dark:text-primary-800'
|
|
32
|
-
: '', children: label }));
|
|
44
|
+
: '', children: label })));
|
|
33
45
|
}
|
|
34
46
|
return (_jsx(SidebarItem, { as: Link, href: href || '#', icon: Icon, active: pathname === href, theme: customTheme.sidebar.item, className: pathname === href
|
|
35
47
|
? 'bg-zinc-100 text-gray-900 dark:bg-zinc-800 dark:text-gray-200'
|
|
@@ -39,9 +51,9 @@ function CustomSidebarItem({ href, target, icon: Icon, label, items, badge, path
|
|
|
39
51
|
var _a;
|
|
40
52
|
const isExternal = item.target === '_blank' || ((_a = item.href) === null || _a === void 0 ? void 0 : _a.startsWith('http'));
|
|
41
53
|
if (isExternal) {
|
|
42
|
-
return (_jsx(SidebarItem, { href: item.href || '#', active: pathname === item.href, theme: customTheme.sidebar.item, className: pathname === item.href
|
|
54
|
+
return (_jsx(SidebarItem, Object.assign({ href: item.href || '#' }, newTabProps(item.target), { active: pathname === item.href, theme: customTheme.sidebar.item, className: pathname === item.href
|
|
43
55
|
? 'bg-primary-50 text-primary-700 dark:bg-primary-200 dark:text-primary-800'
|
|
44
|
-
: '', children: item.label }, item.label));
|
|
56
|
+
: '', children: item.label }), item.label));
|
|
45
57
|
}
|
|
46
58
|
return (_jsx(SidebarItem, { as: Link, href: item.href || '#', active: pathname === item.href, theme: customTheme.sidebar.item, className: pathname === item.href
|
|
47
59
|
? 'bg-primary-50 text-primary-700 dark:bg-primary-200 dark:text-primary-800'
|
|
@@ -26,8 +26,9 @@ export interface LandingFooterProps {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* The shared marketing-site footer for all three apps. The brand column, social
|
|
29
|
-
* row, the Applications cross-links
|
|
30
|
-
* derived from CURRENT_APP + APP_CONFIGS so each app
|
|
29
|
+
* row, the Applications cross-links (the three apps, then xbrlkit), the Company
|
|
30
|
+
* column and copyright are derived from CURRENT_APP + APP_CONFIGS so each app
|
|
31
|
+
* reskins automatically;
|
|
31
32
|
* only the tagline and Product links vary and are passed in. Contact stays
|
|
32
33
|
* per-app via the `contactModal` prop.
|
|
33
34
|
*/
|
|
@@ -10,8 +10,9 @@ const linkClass = 'text-gray-400 transition-colors hover:text-white';
|
|
|
10
10
|
const headingClass = 'mb-4 text-sm font-semibold tracking-wider text-gray-400 uppercase';
|
|
11
11
|
/**
|
|
12
12
|
* The shared marketing-site footer for all three apps. The brand column, social
|
|
13
|
-
* row, the Applications cross-links
|
|
14
|
-
* derived from CURRENT_APP + APP_CONFIGS so each app
|
|
13
|
+
* row, the Applications cross-links (the three apps, then xbrlkit), the Company
|
|
14
|
+
* column and copyright are derived from CURRENT_APP + APP_CONFIGS so each app
|
|
15
|
+
* reskins automatically;
|
|
15
16
|
* only the tagline and Product links vary and are passed in. Contact stays
|
|
16
17
|
* per-app via the `contactModal` prop.
|
|
17
18
|
*/
|
|
@@ -37,11 +38,11 @@ export function LandingFooter({ tagline, productLinks, contactModal: ContactModa
|
|
|
37
38
|
const resolvedBlogHref = blogHref !== null && blogHref !== void 0 ? blogHref : `${companyBase}/blog`;
|
|
38
39
|
// A same-site path opens in the same tab; an external site opens in a new one.
|
|
39
40
|
const blogLinkProps = resolvedBlogHref.startsWith('/') ? {} : companyLinkProps;
|
|
40
|
-
return (_jsxs("footer", { className: "border-t border-gray-800 bg-zinc-950", children: [_jsxs("div", { className: "mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8", children: [_jsxs("div", { className: "grid gap-4 md:grid-cols-5 lg:gap-6", children: [_jsxs("div", { className: "md:col-span-2", children: [_jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx(Image, { src: `/images/logos/${CURRENT_APP}.png`, alt: current.displayName, width: 32, height: 32, className: "rounded-lg" }), _jsx("span", { className: "font-heading text-xl font-semibold text-white", children: current.displayName })] }), _jsx("p", { className: "mb-4 max-w-md text-sm text-gray-400", children: tagline }), _jsxs("div", { className: "flex gap-4", children: [_jsx(Link, { href: "https://github.com/RoboFinSystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on GitHub", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" }) }) }), _jsx(Link, { href: "https://x.com/robofinsystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on X", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" }) }) }), _jsx(Link, { href: "https://www.linkedin.com/company/robosystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on LinkedIn", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }) }), _jsx(Link, { href: "https://www.youtube.com/@RoboSystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on YouTube", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }) }) })] })] }), _jsxs("div", { children: [_jsx("h3", { className: headingClass, children: "Product" }), _jsx("ul", { className: "space-y-2 text-sm", children: productLinks.map((link) => (_jsx("li", { children: _jsx(Link, { href: link.href, className: linkClass, children: link.label }) }, link.href))) })] }), _jsxs("div", { children: [_jsx("h3", { className: headingClass, children: "Applications" }),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
return (_jsxs("footer", { className: "border-t border-gray-800 bg-zinc-950", children: [_jsxs("div", { className: "mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8", children: [_jsxs("div", { className: "grid gap-4 md:grid-cols-5 lg:gap-6", children: [_jsxs("div", { className: "md:col-span-2", children: [_jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx(Image, { src: `/images/logos/${CURRENT_APP}.png`, alt: current.displayName, width: 32, height: 32, className: "rounded-lg" }), _jsx("span", { className: "font-heading text-xl font-semibold text-white", children: current.displayName })] }), _jsx("p", { className: "mb-4 max-w-md text-sm text-gray-400", children: tagline }), _jsxs("div", { className: "flex gap-4", children: [_jsx(Link, { href: "https://github.com/RoboFinSystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on GitHub", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" }) }) }), _jsx(Link, { href: "https://x.com/robofinsystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on X", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" }) }) }), _jsx(Link, { href: "https://www.linkedin.com/company/robosystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on LinkedIn", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }) }), _jsx(Link, { href: "https://www.youtube.com/@RoboSystems", target: "_blank", rel: "noopener noreferrer", "aria-label": "RoboSystems on YouTube", className: linkClass, children: _jsx("svg", { className: "h-6 w-6", fill: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }) }) })] })] }), _jsxs("div", { children: [_jsx("h3", { className: headingClass, children: "Product" }), _jsx("ul", { className: "space-y-2 text-sm", children: productLinks.map((link) => (_jsx("li", { children: _jsx(Link, { href: link.href, className: linkClass, children: link.label }) }, link.href))) })] }), _jsxs("div", { children: [_jsx("h3", { className: headingClass, children: "Applications" }), _jsxs("ul", { className: "space-y-2 text-sm", children: [APP_ORDER.map((app) => {
|
|
42
|
+
const cfg = getAppConfig(app);
|
|
43
|
+
const isCurrent = app === CURRENT_APP;
|
|
44
|
+
return (_jsx("li", { children: _jsx(Link, Object.assign({ href: cfg.url }, (isCurrent
|
|
45
|
+
? {}
|
|
46
|
+
: { target: '_blank', rel: 'noopener noreferrer' }), { className: linkClass, children: cfg.displayName })) }, app));
|
|
47
|
+
}), _jsx("li", { children: _jsx(Link, { href: "https://xbrlkit.com", target: "_blank", rel: "noopener noreferrer", className: linkClass, children: "xbrlkit" }) })] })] }), _jsxs("div", { children: [_jsx("h3", { className: headingClass, children: "Company" }), _jsxs("ul", { className: "space-y-2 text-sm", children: [_jsx("li", { children: _jsx(Link, Object.assign({ href: researchHref }, researchLinkProps, { className: linkClass, children: "Research" })) }), _jsx("li", { children: _jsx(Link, Object.assign({ href: resolvedBlogHref }, blogLinkProps, { className: linkClass, children: "Blog" })) }), _jsx("li", { children: _jsx(Link, Object.assign({ href: `${companyBase}/pages/privacy` }, companyLinkProps, { className: linkClass, children: "Privacy" })) }), _jsx("li", { children: _jsx(Link, Object.assign({ href: `${companyBase}/pages/terms` }, companyLinkProps, { className: linkClass, children: "Terms" })) }), _jsx("li", { children: _jsx(Link, { href: "https://trust.robosystems.ai", target: "_blank", rel: "noopener noreferrer", className: linkClass, children: "Trust Center" }) }), _jsx("li", { children: _jsx(Link, { href: "https://status.robosystems.ai", target: "_blank", rel: "noopener noreferrer", className: linkClass, children: "Status" }) }), ContactModal && (_jsx("li", { children: _jsx("button", { onClick: () => setShowContact(true), className: linkClass, children: "Contact" }) }))] })] })] }), _jsx("div", { className: "mt-8 border-t border-gray-800 pt-8 text-center text-sm text-gray-400", children: _jsxs("p", { children: ["\u00A9 ", new Date().getFullYear(), " RFS LLC. All rights reserved."] }) })] }), ContactModal && (_jsx(ContactModal, { isOpen: showContact, onClose: () => setShowContact(false) }))] }));
|
|
47
48
|
}
|