@fikar-ai/design-react 1.5.0 → 1.6.1
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-icons.js +1 -0
- package/dist/app-shell.js +3 -3
- package/package.json +1 -1
package/dist/app-icons.js
CHANGED
|
@@ -6,6 +6,7 @@ export const APP_ICONS = {
|
|
|
6
6
|
"cost-calculator": "<rect width=\"16\" height=\"20\" x=\"4\" y=\"2\" rx=\"2\"/><line x1=\"8\" x2=\"16\" y1=\"6\" y2=\"6\"/><line x1=\"16\" x2=\"16\" y1=\"14\" y2=\"18\"/><path d=\"M16 10h.01\"/><path d=\"M12 10h.01\"/><path d=\"M8 10h.01\"/><path d=\"M12 14h.01\"/><path d=\"M8 14h.01\"/><path d=\"M12 18h.01\"/><path d=\"M8 18h.01\"/>",
|
|
7
7
|
"crs": "<circle cx=\"12\" cy=\"4.5\" r=\"2.5\"/><path d=\"m10.2 6.3-3.9 3.9\"/><circle cx=\"4.5\" cy=\"12\" r=\"2.5\"/><path d=\"M7 12h10\"/><circle cx=\"19.5\" cy=\"12\" r=\"2.5\"/><path d=\"m13.8 17.7 3.9-3.9\"/><circle cx=\"12\" cy=\"19.5\" r=\"2.5\"/>",
|
|
8
8
|
"dictionary": "<path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><path d=\"m8 13 4-7 4 7\"/><path d=\"M9.1 11h5.7\"/>",
|
|
9
|
+
"pii": "<path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"/><path d=\"m9 12 2 2 4-4\"/>",
|
|
9
10
|
"platform": "<line x1=\"21\" x2=\"14\" y1=\"4\" y2=\"4\"/><line x1=\"10\" x2=\"3\" y1=\"4\" y2=\"4\"/><line x1=\"21\" x2=\"12\" y1=\"12\" y2=\"12\"/><line x1=\"8\" x2=\"3\" y1=\"12\" y2=\"12\"/><line x1=\"21\" x2=\"16\" y1=\"20\" y2=\"20\"/><line x1=\"12\" x2=\"3\" y1=\"20\" y2=\"20\"/><line x1=\"14\" x2=\"14\" y1=\"2\" y2=\"6\"/><line x1=\"8\" x2=\"8\" y1=\"10\" y2=\"14\"/><line x1=\"16\" x2=\"16\" y1=\"18\" y2=\"22\"/>",
|
|
10
11
|
"super-admin": "<path d=\"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z\"/><path d=\"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2\"/><path d=\"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2\"/><path d=\"M10 6h4\"/><path d=\"M10 10h4\"/><path d=\"M10 14h4\"/><path d=\"M10 18h4\"/>",
|
|
11
12
|
};
|
package/dist/app-shell.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import * as Tooltip from '@radix-ui/react-tooltip';
|
|
4
4
|
import { AppShellContext } from './context.js';
|
|
@@ -7,7 +7,7 @@ const DESKTOP_QUERY = '(min-width: 1024px)';
|
|
|
7
7
|
// useLayoutEffect warns during server rendering; the effect body only matters in the browser.
|
|
8
8
|
const useIsoLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;
|
|
9
9
|
const MenuIcon = () => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M4 6h16M4 12h16M4 18h16" }) }));
|
|
10
|
-
const
|
|
10
|
+
const PanelIcon = () => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }), _jsx("path", { d: "M9 3v18" })] }));
|
|
11
11
|
function SidebarShell({ brand, brandName, navLabel = 'Main', nav, navRail, navScroll = false, footer, headerStart, headerActions, children, fill = false, collapsed: collapsedProp, defaultCollapsed = false, onCollapsedChange, }) {
|
|
12
12
|
const isControlled = collapsedProp !== undefined;
|
|
13
13
|
const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
|
|
@@ -64,7 +64,7 @@ function SidebarShell({ brand, brandName, navLabel = 'Main', nav, navRail, navSc
|
|
|
64
64
|
.filter(Boolean)
|
|
65
65
|
.join(' ');
|
|
66
66
|
const brandBlock = (_jsxs(_Fragment, { children: [brand, brandName ? _jsx("span", { className: "word", children: brandName }) : null] }));
|
|
67
|
-
return (_jsx(AppShellContext.Provider, { value: state, children: _jsx(Tooltip.Provider, { delayDuration: 300, children: _jsxs("div", { className: shellClass, id: "shell", children: [_jsxs("aside", { className: "sidebar", id: "sidebar", children: [_jsxs("div", { className: "brand", children: [brandBlock, _jsx("button", { className: "shell-close iconbtn", type: "button", "aria-label": "Close navigation", onClick: closeDrawer, children: "\u00D7" })] }), _jsx("nav", { className: navScroll ? 'side is-scroll' : 'side', "aria-label": navLabel, children: isRail && navRail !== undefined ? navRail : nav }), footer ? _jsx("div", { className: "side-foot", children: footer }) : null, _jsxs("button", { className: "shell-collapse", type: "button", "aria-controls": "sidebar", "aria-pressed": collapsed, title: collapsed ? 'Expand sidebar' : 'Collapse sidebar', onClick: () => setCollapsed(!collapsed), children: [_jsx(
|
|
67
|
+
return (_jsx(AppShellContext.Provider, { value: state, children: _jsx(Tooltip.Provider, { delayDuration: 300, children: _jsxs("div", { className: shellClass, id: "shell", children: [_jsxs("aside", { className: "sidebar", id: "sidebar", children: [_jsxs("div", { className: "brand", children: [brandBlock, _jsx("button", { className: "shell-close iconbtn", type: "button", "aria-label": "Close navigation", onClick: closeDrawer, children: "\u00D7" })] }), _jsx("nav", { className: navScroll ? 'side is-scroll' : 'side', "aria-label": navLabel, children: isRail && navRail !== undefined ? navRail : nav }), footer ? _jsx("div", { className: "side-foot", children: footer }) : null, _jsxs("button", { className: "shell-collapse", type: "button", "aria-controls": "sidebar", "aria-pressed": collapsed, title: collapsed ? 'Expand sidebar' : 'Collapse sidebar', onClick: () => setCollapsed(!collapsed), children: [_jsx(PanelIcon, {}), _jsx("span", { className: "nav-label", children: "Collapse" })] })] }), _jsxs("header", { className: "shell-topbar", children: [_jsx("button", { ref: menuRef, className: "shell-menu", type: "button", "aria-label": "Open navigation", "aria-controls": "sidebar", "aria-expanded": drawerOpen, onClick: () => setDrawerOpen(true), children: _jsx(MenuIcon, {}) }), _jsx("div", { className: "brand", children: brandBlock }), headerStart ? _jsx("div", { className: "shell-topbar-start", children: headerStart }) : null, _jsx("div", { className: "cluster", children: headerActions })] }), _jsx("div", { className: "shell-scrim", hidden: !drawerOpen, onClick: closeDrawer }), _jsx("main", { className: "main", children: _jsx("div", { className: "content", children: children }) })] }) }) }));
|
|
68
68
|
}
|
|
69
69
|
// No drawer, no rail, no stored choice: the state is fixed, so slot content that reads it
|
|
70
70
|
// gets the answer for an open, full-width layout, and its setters do nothing.
|
package/package.json
CHANGED