@momoi-labs/kiso-react 0.33.0 → 0.35.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/dist/app-shell.js +3 -1
- package/dist/console-shell.d.ts +2 -1
- package/dist/console-shell.js +2 -2
- package/package.json +2 -2
package/dist/app-shell.js
CHANGED
|
@@ -109,7 +109,9 @@ function ApplicationShellBottomNav({ navigation, navigationLabel, footer }) {
|
|
|
109
109
|
return;
|
|
110
110
|
event.preventDefault();
|
|
111
111
|
destination.onClick();
|
|
112
|
-
}, children: [destination.leading && _jsx("span", { className: "bottom-nav-icon", "aria-hidden": "true", children: destination.leading }), _jsx("span", { children: destination.label }),
|
|
112
|
+
}, children: [destination.leading && _jsx("span", { className: "bottom-nav-icon", "aria-hidden": "true", children: destination.leading }), _jsx("span", { children: destination.label }), typeof destination.trailing === "string" || typeof destination.trailing === "number"
|
|
113
|
+
? _jsx(BottomNavBadge, { children: destination.trailing })
|
|
114
|
+
: destination.trailing && _jsx("span", { className: "bottom-nav-trailing", children: destination.trailing })] }, `${destination.href}-${index}`));
|
|
113
115
|
return _jsxs(_Fragment, { children: [_jsxs(BottomNav, { "aria-label": navigationLabel, children: [inBar.map(link), overflow && _jsx(BottomNavLink, { asChild: true, active: rest.some(group => group.destinations.some(destination => destination.active)), children: _jsxs("button", { type: "button", "aria-haspopup": "dialog", "aria-expanded": moreOpen, onClick: () => setMoreOpen(true), children: [_jsx("span", { className: "bottom-nav-icon", "aria-hidden": "true", children: _jsx(Ellipsis, { className: "icon" }) }), _jsx("span", { children: "More" })] }) })] }), overflow && _jsx(Drawer, { open: moreOpen, onOpenChange: setMoreOpen, children: _jsxs(DrawerContent, { placement: "bottom", className: "app-shell-drawer app-shell-more", children: [_jsx(DrawerHeader, { children: _jsx(DrawerTitle, { children: "More" }) }), _jsxs(DrawerBody, { onClick: (event) => {
|
|
114
116
|
if (event.target.closest("a[href], [data-slot='navigation-link'], [data-shell-navigate]"))
|
|
115
117
|
setMoreOpen(false);
|
package/dist/console-shell.d.ts
CHANGED
|
@@ -20,8 +20,9 @@ type ConsoleShellProps = {
|
|
|
20
20
|
navigationLabel?: string;
|
|
21
21
|
breadcrumb: readonly ConsoleCrumb[];
|
|
22
22
|
account: ConsoleAccount;
|
|
23
|
+
status?: ReactNode;
|
|
23
24
|
children: ReactNode;
|
|
24
25
|
};
|
|
25
|
-
declare function ConsoleShell({ brand, brandMark, navigation, navigationLabel, breadcrumb, account, children }: ConsoleShellProps): import("react").JSX.Element;
|
|
26
|
+
declare function ConsoleShell({ brand, brandMark, navigation, navigationLabel, breadcrumb, account, status, children }: ConsoleShellProps): import("react").JSX.Element;
|
|
26
27
|
export { ConsoleShell };
|
|
27
28
|
export type { ConsoleAccount, ConsoleCrumb, ConsoleShellProps };
|
package/dist/console-shell.js
CHANGED
|
@@ -22,7 +22,7 @@ function ConsoleAccountMenu({ account }) {
|
|
|
22
22
|
? _jsx(Button, { variant: "ghost", size: "sm", asChild: true, children: _jsxs("a", { href: account.href, children: [_jsx(UserRound, { className: "icon", "aria-hidden": "true" }), "Account"] }) })
|
|
23
23
|
: null, _jsx(ThemeSelector, { theme: account.theme, onChange: account.onThemeChange }), account.language, _jsxs(Button, { variant: "ghost", size: "sm", onClick: account.onSignOut, children: [_jsx(LogOut, { className: "icon", "aria-hidden": "true" }), "Sign out"] })] })] });
|
|
24
24
|
}
|
|
25
|
-
function ConsoleShell({ brand, brandMark, navigation, navigationLabel = "Primary", breadcrumb, account, children }) {
|
|
26
|
-
return _jsx(ApplicationShell, { collapsible: true, togglePlacement: "header", shellLayout: true, headerVariant: "default", brand: brand, brandMark: brandMark, navigation: navigation, navigationLabel: navigationLabel, header: _jsxs(_Fragment, { children: [_jsx(ConsoleBreadcrumb, { items: breadcrumb }), _jsx("div", { className: "grow" }), _jsx(ConsoleAccountMenu, { account: account })] }), children: _jsx("div", { className: "page", children: children }) });
|
|
25
|
+
function ConsoleShell({ brand, brandMark, navigation, navigationLabel = "Primary", breadcrumb, account, status, children }) {
|
|
26
|
+
return _jsx(ApplicationShell, { collapsible: true, togglePlacement: "header", phoneNavigation: "bottom", shellLayout: true, headerVariant: "default", brand: brand, brandMark: brandMark, navigation: navigation, navigationLabel: navigationLabel, header: _jsxs(_Fragment, { children: [_jsx(ConsoleBreadcrumb, { items: breadcrumb }), _jsx("div", { className: "grow" }), status == null || status === false ? null : _jsx("div", { className: "app-shell-status", children: status }), _jsx(ConsoleAccountMenu, { account: account })] }), children: _jsx("div", { className: "page", children: children }) });
|
|
27
27
|
}
|
|
28
28
|
export { ConsoleShell };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momoi-labs/kiso-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Kiso React components built with shadcn/ui and Radix",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepack": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@momoi-labs/kiso": "^1.
|
|
35
|
+
"@momoi-labs/kiso": "^1.12.1",
|
|
36
36
|
"class-variance-authority": "0.7.1",
|
|
37
37
|
"clsx": "2.1.1",
|
|
38
38
|
"radix-ui": "1.6.7",
|