@shadow-library/ui 0.1.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/LICENSE +21 -0
- package/README.md +98 -0
- package/components/AppLayout/AppLayout.d.ts +19 -0
- package/components/AppLayout/AppLayout.js +28 -0
- package/components/AppLayout/AppLayout.js.map +1 -0
- package/components/AppLayout/ContentFooter.d.ts +13 -0
- package/components/AppLayout/ContentFooter.js +16 -0
- package/components/AppLayout/ContentFooter.js.map +1 -0
- package/components/AppLayout/SideNavbar.d.ts +21 -0
- package/components/AppLayout/SideNavbar.js +19 -0
- package/components/AppLayout/SideNavbar.js.map +1 -0
- package/components/AppLayout/SideNavbarItem.d.ts +14 -0
- package/components/AppLayout/SideNavbarItem.js +31 -0
- package/components/AppLayout/SideNavbarItem.js.map +1 -0
- package/components/AppLayout/TopNavbar.d.ts +16 -0
- package/components/AppLayout/TopNavbar.js +19 -0
- package/components/AppLayout/TopNavbar.js.map +1 -0
- package/components/AppLayout/hooks/use-layout-state.d.ts +20 -0
- package/components/AppLayout/hooks/use-layout-state.js +16 -0
- package/components/AppLayout/hooks/use-layout-state.js.map +1 -0
- package/components/AppLayout/hooks/use-side-navbar-item.d.ts +11 -0
- package/components/AppLayout/hooks/use-side-navbar-item.js +37 -0
- package/components/AppLayout/hooks/use-side-navbar-item.js.map +1 -0
- package/components/AppLayout/index.d.ts +2 -0
- package/components/AppLayout/index.js +3 -0
- package/components/AppLayout/index.js.map +1 -0
- package/components/AppLayout/layout.types.d.ts +59 -0
- package/components/AppLayout/layout.types.js +2 -0
- package/components/AppLayout/layout.types.js.map +1 -0
- package/components/Logo/Alphabets.d.ts +44 -0
- package/components/Logo/Alphabets.js +31 -0
- package/components/Logo/Alphabets.js.map +1 -0
- package/components/Logo/BrandMark.d.ts +16 -0
- package/components/Logo/BrandMark.js +17 -0
- package/components/Logo/BrandMark.js.map +1 -0
- package/components/Logo/Logo.d.ts +17 -0
- package/components/Logo/Logo.js +18 -0
- package/components/Logo/Logo.js.map +1 -0
- package/components/Logo/hooks/use-logo.d.ts +9 -0
- package/components/Logo/hooks/use-logo.js +18 -0
- package/components/Logo/hooks/use-logo.js.map +1 -0
- package/components/Logo/index.d.ts +2 -0
- package/components/Logo/index.js +3 -0
- package/components/Logo/index.js.map +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useSearchParams.d.ts +15 -0
- package/hooks/useSearchParams.js +24 -0
- package/hooks/useSearchParams.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +5 -0
- package/index.js.map +1 -0
- package/lib/api-error.d.ts +29 -0
- package/lib/api-error.js +21 -0
- package/lib/api-error.js.map +1 -0
- package/lib/api-request.d.ts +56 -0
- package/lib/api-request.js +119 -0
- package/lib/api-request.js.map +1 -0
- package/lib/generate-api.d.ts +4 -0
- package/lib/generate-api.js +259 -0
- package/lib/generate-api.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/lib/utils.d.ts +13 -0
- package/lib/utils.js +22 -0
- package/lib/utils.js.map +1 -0
- package/package.json +24 -0
- package/theme.d.ts +161 -0
- package/theme.js +115 -0
- package/theme.js.map +1 -0
- package/types.d.ts +20 -0
- package/types.js +5 -0
- package/types.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 shadow-library
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# @shadow-library/ui
|
|
2
|
+
|
|
3
|
+
Shared UI components, layout primitives, and utilities for all Shadow Library apps.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
# npm
|
|
9
|
+
npm install @shadow-library/ui
|
|
10
|
+
|
|
11
|
+
# bun
|
|
12
|
+
bun add @shadow-library/ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Peer Dependencies
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
# npm
|
|
19
|
+
npm install react react-dom @mantine/core @mantine/hooks @tanstack/react-router lucide-react
|
|
20
|
+
|
|
21
|
+
# bun
|
|
22
|
+
bun add react react-dom @mantine/core @mantine/hooks @tanstack/react-router lucide-react
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
Wrap your app with Mantine's `MantineProvider` using the exported `shadowTheme`:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { MantineProvider } from '@mantine/core';
|
|
31
|
+
import { shadowTheme } from '@shadow-library/ui';
|
|
32
|
+
|
|
33
|
+
function App() {
|
|
34
|
+
return <MantineProvider theme={shadowTheme}>{/* your app */}</MantineProvider>;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## What's Included
|
|
39
|
+
|
|
40
|
+
### Layout
|
|
41
|
+
|
|
42
|
+
A full application shell with a collapsible sidebar, top navigation bar, and optional footer.
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { AppLayout } from '@shadow-library/ui';
|
|
46
|
+
import { LayoutDashboard } from 'lucide-react';
|
|
47
|
+
|
|
48
|
+
const navItems = [{ label: 'Dashboard', path: '/', icon: LayoutDashboard }];
|
|
49
|
+
|
|
50
|
+
function Shell({ children }) {
|
|
51
|
+
return (
|
|
52
|
+
<AppLayout appName='My App' navItems={navItems} user={{ name: 'Jane Doe', email: 'jane@example.com' }}>
|
|
53
|
+
{children}
|
|
54
|
+
</AppLayout>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### API Client
|
|
60
|
+
|
|
61
|
+
A chainable HTTP client with pre/post hooks and typed errors.
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { APIRequest, ApiError } from '@shadow-library/ui';
|
|
65
|
+
|
|
66
|
+
const data = await APIRequest.get('/users')
|
|
67
|
+
.query({ limit: 20 })
|
|
68
|
+
.header('X-Tenant', 'acme')
|
|
69
|
+
.then((res) => res.json());
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### OpenAPI Code Generation
|
|
73
|
+
|
|
74
|
+
Generate typed API clients from an OpenAPI spec URL.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { generateApi } from '@shadow-library/ui';
|
|
78
|
+
|
|
79
|
+
await generateApi('https://api.example.com/openapi.json');
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Hooks
|
|
83
|
+
|
|
84
|
+
| Hook | Description |
|
|
85
|
+
| ----------------- | ---------------------------------------------------- |
|
|
86
|
+
| `useSearchParams` | Read and update URL query params via TanStack Router |
|
|
87
|
+
|
|
88
|
+
## Full Documentation
|
|
89
|
+
|
|
90
|
+
Component props, usage examples, and visual previews are available in Storybook.
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
npm run storybook
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Alphabet } from '../Logo/index.js';
|
|
3
|
+
import { type FooterConfig, type NavItem, type NotificationsConfig, type UserInfo } from './layout.types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Defining types
|
|
6
|
+
*/
|
|
7
|
+
interface AppLayoutProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
productName: Alphabet[];
|
|
10
|
+
appName: string;
|
|
11
|
+
navItems: NavItem[];
|
|
12
|
+
user?: UserInfo;
|
|
13
|
+
notifications?: NotificationsConfig;
|
|
14
|
+
footer?: FooterConfig;
|
|
15
|
+
showThemeToggle?: boolean;
|
|
16
|
+
defaultCollapsed?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function AppLayout({ children, appName, productName, navItems, user, notifications, footer, showThemeToggle, defaultCollapsed }: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Importing npm packages
|
|
4
|
+
*/
|
|
5
|
+
import { AppShell } from '@mantine/core';
|
|
6
|
+
/**
|
|
7
|
+
* Importing user defined packages
|
|
8
|
+
*/
|
|
9
|
+
import styles from './AppLayout.module.css';
|
|
10
|
+
import { ContentFooter } from './ContentFooter.js';
|
|
11
|
+
import { useLayoutState } from './hooks/use-layout-state.js';
|
|
12
|
+
import { SideNavbar } from './SideNavbar.js';
|
|
13
|
+
import { TopNavbar } from './TopNavbar.js';
|
|
14
|
+
/**
|
|
15
|
+
* Declaring the constants
|
|
16
|
+
*/
|
|
17
|
+
const HEADER_HEIGHT = 56;
|
|
18
|
+
const NAVBAR_WIDTH_EXPANDED = 260;
|
|
19
|
+
const NAVBAR_WIDTH_COLLAPSED = 72;
|
|
20
|
+
export function AppLayout({ children, appName, productName, navItems, user, notifications, footer, showThemeToggle = true, defaultCollapsed = false }) {
|
|
21
|
+
const { collapsed, toggleCollapsed, mobileOpened, toggleMobile, closeMobile } = useLayoutState({ defaultCollapsed });
|
|
22
|
+
return (_jsxs(AppShell, { layout: 'alt', header: { height: HEADER_HEIGHT }, navbar: {
|
|
23
|
+
width: collapsed ? NAVBAR_WIDTH_COLLAPSED : NAVBAR_WIDTH_EXPANDED,
|
|
24
|
+
breakpoint: 'sm',
|
|
25
|
+
collapsed: { mobile: !mobileOpened },
|
|
26
|
+
}, padding: 'md', transitionDuration: 200, children: [_jsx(AppShell.Header, { children: _jsx(TopNavbar, { user: user, notifications: notifications, showThemeToggle: showThemeToggle, mobileOpened: mobileOpened, onToggleMobile: toggleMobile }) }), _jsx(AppShell.Navbar, { children: _jsx(SideNavbar, { items: navItems, collapsed: collapsed, onToggleCollapsed: toggleCollapsed, onNavigate: closeMobile, productName: productName, onCloseMobile: closeMobile }) }), _jsxs(AppShell.Main, { className: styles.main, children: [_jsx("div", { className: styles.mainContent, children: children }), _jsx(ContentFooter, { appName: appName, footer: footer })] })] }));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=AppLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppLayout.js","sourceRoot":"","sources":["../../../src/components/AppLayout/AppLayout.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC;;GAEG;AACH,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,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iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,GAAI,GACxJ,EAElB,MAAC,QAAQ,CAAC,IAAI,IAAC,SAAS,EAAE,MAAM,CAAC,IAAI,aACnC,cAAK,SAAS,EAAE,MAAM,CAAC,WAAW,YAAG,QAAQ,GAAO,EACpD,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAI,IACrC,IACP,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FooterConfig } from './layout.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Defining types
|
|
4
|
+
*/
|
|
5
|
+
interface ContentFooterProps {
|
|
6
|
+
appName: string;
|
|
7
|
+
footer?: FooterConfig;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Declaring the constants
|
|
11
|
+
*/
|
|
12
|
+
export declare function ContentFooter({ appName, footer }: ContentFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Importing npm packages
|
|
4
|
+
*/
|
|
5
|
+
import { Box, Text } from '@mantine/core';
|
|
6
|
+
/**
|
|
7
|
+
* Importing user defined packages
|
|
8
|
+
*/
|
|
9
|
+
import styles from './AppLayout.module.css';
|
|
10
|
+
/**
|
|
11
|
+
* Declaring the constants
|
|
12
|
+
*/
|
|
13
|
+
export function ContentFooter({ appName, footer }) {
|
|
14
|
+
return (_jsx(Box, { component: 'footer', mt: 'xl', py: 'xs', className: styles.footer, children: footer?.content ?? (_jsxs(Text, { size: 'xs', c: 'dimmed', ta: 'center', children: [appName, footer?.version ? ` \u00B7 ${footer.version}` : ''] })) }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ContentFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentFooter.js","sourceRoot":"","sources":["../../../src/components/AppLayout/ContentFooter.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAY5C;;GAEG;AAEH,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,EAAsB;IACnE,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAE,MAAM,CAAC,MAAM,YAC7D,MAAM,EAAE,OAAO,IAAI,CAClB,MAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAC,QAAQ,aACnC,OAAO,EACP,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,IAC9C,CACR,GACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing user defined packages
|
|
3
|
+
*/
|
|
4
|
+
import { type Alphabet } from '../Logo/index.js';
|
|
5
|
+
import { type NavItem } from './layout.types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Defining types
|
|
8
|
+
*/
|
|
9
|
+
interface SideNavbarProps {
|
|
10
|
+
items: NavItem[];
|
|
11
|
+
collapsed: boolean;
|
|
12
|
+
onToggleCollapsed: () => void;
|
|
13
|
+
onNavigate?: () => void;
|
|
14
|
+
productName?: Alphabet[];
|
|
15
|
+
onCloseMobile?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Declaring the constants
|
|
19
|
+
*/
|
|
20
|
+
export declare function SideNavbar({ items, collapsed, onToggleCollapsed, onNavigate, productName, onCloseMobile }: SideNavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Importing npm packages
|
|
4
|
+
*/
|
|
5
|
+
import { ActionIcon, AppShell, CloseButton, Group, ScrollArea, Stack, Tooltip } from '@mantine/core';
|
|
6
|
+
import { ChevronsLeft, ChevronsRight } from 'lucide-react';
|
|
7
|
+
/**
|
|
8
|
+
* Importing user defined packages
|
|
9
|
+
*/
|
|
10
|
+
import { Logo } from '../Logo/index.js';
|
|
11
|
+
import styles from './AppLayout.module.css';
|
|
12
|
+
import { SideNavbarItem } from './SideNavbarItem.js';
|
|
13
|
+
/**
|
|
14
|
+
* Declaring the constants
|
|
15
|
+
*/
|
|
16
|
+
export function SideNavbar({ items, collapsed, onToggleCollapsed, onNavigate, productName, onCloseMobile }) {
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppShell.Section, { className: styles.logoSection, p: collapsed ? 'xs' : 'sm', children: _jsxs(Group, { justify: 'space-between', w: '100%', h: '100%', wrap: 'nowrap', children: [_jsx("div", { className: styles.logoContainer, children: _jsx(Logo, { variant: 'icon', productName: collapsed ? undefined : productName }) }), _jsx(CloseButton, { hiddenFrom: 'sm', onClick: onCloseMobile, "aria-label": 'Close navigation' })] }) }), _jsx(AppShell.Section, { grow: true, component: ScrollArea, scrollbarSize: 6, children: _jsx(Stack, { gap: 4, p: collapsed ? 'xs' : 'sm', align: collapsed ? 'center' : 'stretch', children: items.map(item => (_jsx(SideNavbarItem, { item: item, collapsed: collapsed, onNavigate: onNavigate }, item.key ?? item.path ?? item.label))) }) }), _jsx(AppShell.Section, { p: collapsed ? 'xs' : 'sm', className: `${styles.navToggleSection} ${collapsed ? styles.navToggleSectionCollapsed : ''}`, hiddenFrom: undefined, visibleFrom: 'sm', children: _jsx(Tooltip, { label: collapsed ? 'Expand sidebar' : 'Collapse sidebar', position: 'right', children: _jsx(ActionIcon, { onClick: onToggleCollapsed, size: 'md', "aria-label": 'Toggle sidebar', children: collapsed ? _jsx(ChevronsRight, { size: 16 }) : _jsx(ChevronsLeft, { size: 16 }) }) }) })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=SideNavbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNavbar.js","sourceRoot":"","sources":["../../../src/components/AppLayout/SideNavbar.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3D;;GAEG;AACH,OAAO,EAAiB,IAAI,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAelD;;GAEG;AAEH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAmB;IACzH,OAAO,CACL,8BACE,KAAC,QAAQ,CAAC,OAAO,IAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,YACzE,MAAC,KAAK,IAAC,OAAO,EAAC,eAAe,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,aAC5D,cAAK,SAAS,EAAE,MAAM,CAAC,aAAa,YAClC,KAAC,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,WAAW,EAAE,SAAS,CAAC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AAE,GAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,GAC1D,GACL,GACO,IAClB,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type NavItem } from './layout.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Defining types
|
|
4
|
+
*/
|
|
5
|
+
interface SideNavbarItemProps {
|
|
6
|
+
item: NavItem;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
onNavigate?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Declaring the constants
|
|
12
|
+
*/
|
|
13
|
+
export declare function SideNavbarItem({ item, collapsed, onNavigate }: SideNavbarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Importing npm packages
|
|
4
|
+
*/
|
|
5
|
+
import { ActionIcon, Menu, NavLink, Tooltip } from '@mantine/core';
|
|
6
|
+
/**
|
|
7
|
+
* Importing user defined packages
|
|
8
|
+
*/
|
|
9
|
+
import styles from './AppLayout.module.css';
|
|
10
|
+
import { useSideNavbarItem } from './hooks/use-side-navbar-item.js';
|
|
11
|
+
/**
|
|
12
|
+
* Declaring the constants
|
|
13
|
+
*/
|
|
14
|
+
export function SideNavbarItem({ item, collapsed, onNavigate }) {
|
|
15
|
+
const { isActive, hasChildren, hasActiveChild, handleClick, navigate } = useSideNavbarItem(item, onNavigate);
|
|
16
|
+
/** Collapsed mode — icon only */
|
|
17
|
+
if (collapsed) {
|
|
18
|
+
if (hasChildren) {
|
|
19
|
+
return (_jsxs(Menu, { trigger: 'hover', position: 'right-start', offset: 4, children: [_jsx(Menu.Target, { children: _jsx(ActionIcon, { variant: hasActiveChild ? 'light' : 'subtle', size: 'xl', onClick: handleClick, disabled: item.disabled, className: styles.collapsedItem, children: _jsx(item.icon, { size: 20 }) }) }), _jsxs(Menu.Dropdown, { children: [_jsx(Menu.Label, { children: item.label }), item.children?.map(child => (_jsx(Menu.Item, { leftSection: _jsx(child.icon, { size: 16 }), disabled: child.disabled, onClick: () => {
|
|
20
|
+
child.onClick?.();
|
|
21
|
+
if (child.path)
|
|
22
|
+
navigate({ to: child.path });
|
|
23
|
+
onNavigate?.();
|
|
24
|
+
}, children: child.label }, child.key ?? child.path ?? child.label)))] })] }));
|
|
25
|
+
}
|
|
26
|
+
return (_jsx(Tooltip, { label: item.label, position: 'right', offset: 8, children: _jsx(ActionIcon, { variant: isActive ? 'light' : 'subtle', size: 'xl', onClick: handleClick, disabled: item.disabled, className: styles.collapsedItem, children: _jsx(item.icon, { size: 20 }) }) }));
|
|
27
|
+
}
|
|
28
|
+
/** Expanded mode */
|
|
29
|
+
return (_jsx(NavLink, { label: item.label, leftSection: _jsx(item.icon, { size: 18 }), active: isActive || hasActiveChild, disabled: item.disabled, onClick: hasChildren ? undefined : handleClick, defaultOpened: hasActiveChild, href: item.path, children: hasChildren && item.children?.map(child => _jsx(SideNavbarItem, { item: child, collapsed: false, onNavigate: onNavigate }, child.key ?? child.path ?? child.label)) }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=SideNavbarItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNavbarItem.js","sourceRoot":"","sources":["../../../src/components/AppLayout/SideNavbarItem.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnE;;GAEG;AACH,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAajE;;GAEG;AAEH,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAuB;IACjF,MAA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
|
+
*/
|
|
5
|
+
interface TopNavbarProps {
|
|
6
|
+
user?: UserInfo;
|
|
7
|
+
notifications?: NotificationsConfig;
|
|
8
|
+
showThemeToggle?: boolean;
|
|
9
|
+
mobileOpened: boolean;
|
|
10
|
+
onToggleMobile: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Declaring the constants
|
|
14
|
+
*/
|
|
15
|
+
export declare function TopNavbar({ user, notifications, showThemeToggle, mobileOpened, onToggleMobile }: TopNavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Importing npm packages
|
|
4
|
+
*/
|
|
5
|
+
import { ActionIcon, Avatar, Burger, Group, Indicator, Menu, Text, useComputedColorScheme, useMantineColorScheme } from '@mantine/core';
|
|
6
|
+
import { Bell, Moon, Sun } from 'lucide-react';
|
|
7
|
+
/**
|
|
8
|
+
* Importing user defined packages
|
|
9
|
+
*/
|
|
10
|
+
import { getInitials } from '../../lib/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Declaring the constants
|
|
13
|
+
*/
|
|
14
|
+
export function TopNavbar({ user, notifications, showThemeToggle = true, mobileOpened, onToggleMobile }) {
|
|
15
|
+
const theme = useComputedColorScheme();
|
|
16
|
+
const { toggleColorScheme } = useMantineColorScheme();
|
|
17
|
+
return (_jsxs(Group, { h: '100%', px: 'md', justify: 'space-between', wrap: 'nowrap', children: [_jsx(Group, { gap: 'sm', wrap: 'nowrap', children: _jsx(Burger, { opened: mobileOpened, onClick: onToggleMobile, hiddenFrom: 'sm', size: 'sm' }) }), _jsxs(Group, { gap: 'xs', wrap: 'nowrap', children: [showThemeToggle && (_jsx(ActionIcon, { onClick: toggleColorScheme, size: 'lg', "aria-label": 'Toggle color scheme', children: theme === 'dark' ? _jsx(Sun, { size: 18 }) : _jsx(Moon, { size: 18 }) })), notifications && (_jsx(Indicator, { label: notifications.count, size: 16, disabled: notifications.count === 0, offset: 4, children: _jsx(ActionIcon, { onClick: notifications.onClick, size: 'lg', "aria-label": 'Notifications', children: _jsx(Bell, { size: 18 }) }) })), user && (_jsxs(Menu, { position: 'bottom-end', offset: 8, width: 200, children: [_jsx(Menu.Target, { children: _jsx(ActionIcon, { variant: 'transparent', size: 'lg', radius: 'xl', children: _jsx(Avatar, { src: user.avatarUrl, size: 'sm', radius: 'xl', color: 'initials', children: !user.avatarUrl && getInitials(user.name) }) }) }), _jsxs(Menu.Dropdown, { children: [_jsxs(Menu.Label, { children: [_jsx(Text, { size: 'sm', fw: 500, children: user.name }), user.email && (_jsx(Text, { size: 'xs', c: 'dimmed', children: user.email }))] }), user.actions?.map((action, index) => (_jsxs("div", { children: [(action.divider || index === 0) && _jsx(Menu.Divider, {}), _jsx(Menu.Item, { leftSection: action.icon && _jsx(action.icon, { size: 14 }), color: action.color, onClick: action.onClick, children: action.label })] }, action.label)))] })] }))] })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=TopNavbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopNavbar.js","sourceRoot":"","sources":["../../../src/components/AppLayout/TopNavbar.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACxI,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAgBpC;;GAEG;AAEH,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,eAAe,GAAG,IAAI,EAAE,YAAY,EAAE,cAAc,EAAkB;IACrH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seLayoutStateOptions {
|
|
8
|
+
defaultCollapsed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Declaring the constants
|
|
12
|
+
*/
|
|
13
|
+
export declare function useLayoutState(options?: UseLayoutStateOptions): {
|
|
14
|
+
collapsed: boolean;
|
|
15
|
+
toggleCollapsed: () => void;
|
|
16
|
+
mobileOpened: boolean;
|
|
17
|
+
toggleMobile: () => void;
|
|
18
|
+
closeMobile: () => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing npm packages
|
|
3
|
+
*/
|
|
4
|
+
import { useDisclosure } from '@mantine/hooks';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* Declaring the constants
|
|
8
|
+
*/
|
|
9
|
+
export function useLayoutState(options = {}) {
|
|
10
|
+
const { defaultCollapsed = false } = options;
|
|
11
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
12
|
+
const [mobileOpened, { toggle: toggleMobile, close: closeMobile }] = useDisclosure(false);
|
|
13
|
+
const toggleCollapsed = () => setCollapsed(prev => !prev);
|
|
14
|
+
return { collapsed, toggleCollapsed, mobileOpened, toggleMobile, closeMobile };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=use-layout-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-layout-state.js","sourceRoot":"","sources":["../../../../src/components/AppLayout/hooks/use-layout-state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcjC;;GAEG;AAEH,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,MAAM,EAAE,gBAAgB,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAE7C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1F,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAE1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing user defined packages
|
|
3
|
+
*/
|
|
4
|
+
import { type NavItem } from '../layout.types.js';
|
|
5
|
+
export declare function useSideNavbarItem(item: NavItem, onNavigate?: () => void): {
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
hasChildren: boolean | undefined;
|
|
8
|
+
hasActiveChild: boolean;
|
|
9
|
+
handleClick: () => void;
|
|
10
|
+
navigate: import("@tanstack/router-core").UseNavigateResult<string>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing npm packages
|
|
3
|
+
*/
|
|
4
|
+
import { useLocation, useNavigate } from '@tanstack/react-router';
|
|
5
|
+
/**
|
|
6
|
+
* Defining types
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Declaring the constants
|
|
10
|
+
*/
|
|
11
|
+
function isRouteActive(itemPath, currentPath, exactMatch) {
|
|
12
|
+
if (exactMatch)
|
|
13
|
+
return currentPath === itemPath;
|
|
14
|
+
return currentPath === itemPath || currentPath.startsWith(`${itemPath}/`);
|
|
15
|
+
}
|
|
16
|
+
function isItemOrChildActive(item, currentPath) {
|
|
17
|
+
if (item.path && isRouteActive(item.path, currentPath, item.exactMatch ?? false))
|
|
18
|
+
return true;
|
|
19
|
+
return item.children?.some(child => isItemOrChildActive(child, currentPath)) ?? false;
|
|
20
|
+
}
|
|
21
|
+
export function useSideNavbarItem(item, onNavigate) {
|
|
22
|
+
const location = useLocation();
|
|
23
|
+
const navigate = useNavigate();
|
|
24
|
+
const currentPath = location.pathname;
|
|
25
|
+
const isActive = item.path ? isRouteActive(item.path, currentPath, item.exactMatch ?? false) : false;
|
|
26
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
27
|
+
const hasActiveChild = hasChildren ? isItemOrChildActive(item, currentPath) : false;
|
|
28
|
+
const handleClick = () => {
|
|
29
|
+
item.onClick?.();
|
|
30
|
+
if (item.path)
|
|
31
|
+
navigate({ to: item.path });
|
|
32
|
+
if (!hasChildren)
|
|
33
|
+
onNavigate?.();
|
|
34
|
+
};
|
|
35
|
+
return { isActive, hasChildren, hasActiveChild, handleClick, navigate };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=use-side-navbar-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-side-navbar-item.js","sourceRoot":"","sources":["../../../../src/components/AppLayout/hooks/use-side-navbar-item.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOlE;;GAEG;AAEH;;GAEG;AAEH,SAAS,aAAa,CAAC,QAAgB,EAAE,WAAmB,EAAE,UAAmB;IAC/E,IAAI,UAAU;QAAE,OAAO,WAAW,KAAK,QAAQ,CAAC;IAChD,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC;AAC5E,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAa,EAAE,WAAmB;IAC7D,IAAI,IAAI,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9F,OAAO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C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing npm packages
|
|
3
|
+
*/
|
|
4
|
+
import { type LucideIcon } from 'lucide-react';
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* Importing user defined packages
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Defining types
|
|
11
|
+
*/
|
|
12
|
+
export interface NavItem {
|
|
13
|
+
/** Unique key for this item; defaults to `path` if not provided */
|
|
14
|
+
key?: string;
|
|
15
|
+
/** Display label */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Lucide icon component (not element), e.g. `Home` not `<Home />` */
|
|
18
|
+
icon: LucideIcon;
|
|
19
|
+
/** Route path — used for navigation and active-state matching */
|
|
20
|
+
path?: string;
|
|
21
|
+
/** Click handler — called in addition to navigation when `path` is set */
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
/** Nested children — renders accordion (expanded) or flyout (collapsed) */
|
|
24
|
+
children?: NavItem[];
|
|
25
|
+
/** If true, active match uses exact equality; otherwise prefix match. @default false */
|
|
26
|
+
exactMatch?: boolean;
|
|
27
|
+
/** If true, this item is visually disabled */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface UserMenuAction {
|
|
31
|
+
label: string;
|
|
32
|
+
icon?: LucideIcon;
|
|
33
|
+
onClick: () => void;
|
|
34
|
+
color?: string;
|
|
35
|
+
/** If true, a divider is rendered before this action */
|
|
36
|
+
divider?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface UserInfo {
|
|
39
|
+
/** Display name shown in avatar/dropdown */
|
|
40
|
+
name: string;
|
|
41
|
+
/** Optional email shown below name in dropdown */
|
|
42
|
+
email?: string;
|
|
43
|
+
/** Avatar image URL; if absent, initials derived from name */
|
|
44
|
+
avatarUrl?: string;
|
|
45
|
+
/** Menu actions (e.g. "Profile", "Settings", "Logout") */
|
|
46
|
+
actions?: UserMenuAction[];
|
|
47
|
+
}
|
|
48
|
+
export interface NotificationsConfig {
|
|
49
|
+
/** Unread count displayed as badge; 0 hides badge */
|
|
50
|
+
count: number;
|
|
51
|
+
/** Called when the bell icon is clicked */
|
|
52
|
+
onClick: () => void;
|
|
53
|
+
}
|
|
54
|
+
export interface FooterConfig {
|
|
55
|
+
/** Version string, e.g. "v1.2.3" */
|
|
56
|
+
version?: string;
|
|
57
|
+
/** Completely custom footer content — overrides default rendering */
|
|
58
|
+
content?: ReactNode;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.types.js","sourceRoot":"","sources":["../../../src/components/AppLayout/layout.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing npm packages
|
|
3
|
+
*/
|
|
4
|
+
import { type ReactElement } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Importing user defined packages
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Defining types
|
|
10
|
+
*/
|
|
11
|
+
declare const AlphabetBrand: unique symbol;
|
|
12
|
+
export type Alphabet = (props: React.SVGProps<SVGSVGElement>) => ReactElement<SVGSVGElement> & {
|
|
13
|
+
[AlphabetBrand]: undefined;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Declaring the constants
|
|
17
|
+
*/
|
|
18
|
+
export declare const A: Alphabet;
|
|
19
|
+
export declare const B: Alphabet;
|
|
20
|
+
export declare const C: Alphabet;
|
|
21
|
+
export declare const D: Alphabet;
|
|
22
|
+
export declare const E: Alphabet;
|
|
23
|
+
export declare const F: Alphabet;
|
|
24
|
+
export declare const G: Alphabet;
|
|
25
|
+
export declare const H: Alphabet;
|
|
26
|
+
export declare const I: Alphabet;
|
|
27
|
+
export declare const J: Alphabet;
|
|
28
|
+
export declare const K: Alphabet;
|
|
29
|
+
export declare const L: Alphabet;
|
|
30
|
+
export declare const M: Alphabet;
|
|
31
|
+
export declare const N: Alphabet;
|
|
32
|
+
export declare const O: Alphabet;
|
|
33
|
+
export declare const P: Alphabet;
|
|
34
|
+
export declare const Q: Alphabet;
|
|
35
|
+
export declare const R: Alphabet;
|
|
36
|
+
export declare const S: Alphabet;
|
|
37
|
+
export declare const T: Alphabet;
|
|
38
|
+
export declare const U: Alphabet;
|
|
39
|
+
export declare const V: Alphabet;
|
|
40
|
+
export declare const W: Alphabet;
|
|
41
|
+
export declare const X: Alphabet;
|
|
42
|
+
export declare const Y: Alphabet;
|
|
43
|
+
export declare const Z: Alphabet;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Declaring the constants
|
|
4
|
+
*/
|
|
5
|
+
export const A = ((props) => (_jsxs("svg", { ...props, viewBox: '2 -70 58 70', children: [_jsx("title", { children: "A" }), _jsx("path", { d: 'M2 0L27-70L35-70L60 0L52 0L46-19L16-19L10 0L2 0ZM19-26L43-26L31-61L31-61L19-26Z' })] })));
|
|
6
|
+
export const B = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.6 70', children: [_jsx("title", { children: "B" }), _jsx("path", { d: 'M8 0L8-70L47-70L57-61L57-41L52-37L60-29L60-10L50 0L8 0ZM15-38L44-38L49-43L49-59L44-63L15-63L15-38ZM15-7L46-7L52-12L52-26L46-32L15-32L15-7Z' })] })));
|
|
7
|
+
export const C = ((props) => (_jsxs("svg", { ...props, viewBox: '7 -70 51.6 70', children: [_jsx("title", { children: "C" }), _jsx("path", { d: 'M18 0L7-11L7-59L18-70L48-70L59-59L59-53L51-53L51-57L45-63L21-63L15-57L15-14L21-7L45-7L51-13L51-17L59-17L59-11L48 0L18 0Z' })] })));
|
|
8
|
+
export const D = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.400000000000006 70', children: [_jsx("title", { children: "D" }), _jsx("path", { d: 'M8 0L8-70L48-70L59-59L59-11L48 0L8 0ZM16-7L45-7L52-14L52-57L45-63L16-63L16-7Z' })] })));
|
|
9
|
+
export const E = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 45.2 70', children: [_jsx("title", { children: "E" }), _jsx("path", { d: 'M8 0L8-70L53-70L53-63L16-63L16-39L50-39L50-32L16-32L16-7L53-7L53 0L8 0Z' })] })));
|
|
10
|
+
export const F = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 44.2 70', children: [_jsx("title", { children: "F" }), _jsx("path", { d: 'M8 0L8-70L52-70L52-63L16-63L16-38L47-38L47-31L16-31L16 0L8 0Z' })] })));
|
|
11
|
+
export const G = ((props) => (_jsxs("svg", { ...props, viewBox: '7 -70 52.2 70', children: [_jsx("title", { children: "G" }), _jsx("path", { d: 'M18 0L7-11L7-59L18-70L49-70L59-59L59-53L52-53L52-57L45-63L21-63L15-57L15-14L21-7L45-7L52-14L52-30L36-30L36-37L59-37L59-11L48 0L18 0Z' })] })));
|
|
12
|
+
export const H = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.400000000000006 70', children: [_jsx("title", { children: "H" }), _jsx("path", { d: 'M8 0L8-70L16-70L16-38L52-38L52-70L59-70L59 0L52 0L52-32L16-32L16 0L8 0Z' })] })));
|
|
13
|
+
export const I = ((props) => (_jsxs("svg", { ...props, viewBox: '8.5 -70 7.600000000000001 70', children: [_jsx("title", { children: "I" }), _jsx("path", { d: 'M9 0L9-70L16-70L16 0L9 0Z' })] })));
|
|
14
|
+
export const J = ((props) => (_jsxs("svg", { ...props, viewBox: '3.5 -70 44.6 70', children: [_jsx("title", { children: "J" }), _jsx("path", { d: 'M15 0L4-11L4-21L11-21L11-14L18-7L35-7L41-12L41-70L48-70L48-10L38 0L15 0Z' })] })));
|
|
15
|
+
export const K = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.7 70', children: [_jsx("title", { children: "K" }), _jsx("path", { d: 'M8 0L8-70L16-70L16-38L32-38L50-70L58-70L38-35L60 0L51 0L32-32L16-32L16 0L8 0Z' })] })));
|
|
16
|
+
export const L = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 43.2 70', children: [_jsx("title", { children: "L" }), _jsx("path", { d: 'M8 0L8-70L16-70L16-7L51-7L51 0L8 0Z' })] })));
|
|
17
|
+
export const M = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 61.7 70', children: [_jsx("title", { children: "M" }), _jsx("path", { d: 'M8 0L8-70L16-70L39-16L39-16L61-70L70-70L70 0L63 0L63-55L62-55L42-7L36-7L15-55L15-55L15 0L8 0Z' })] })));
|
|
18
|
+
export const N = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.300000000000004 70', children: [_jsx("title", { children: "N" }), _jsx("path", { d: 'M8 0L8-70L15-70L52-12L52-12L52-70L59-70L59 0L52 0L15-58L15-58L15 0L8 0Z' })] })));
|
|
19
|
+
export const O = ((props) => (_jsxs("svg", { ...props, viewBox: '7 -70 53.6 70', children: [_jsx("title", { children: "O" }), _jsx("path", { d: 'M18 0L7-11L7-59L18-70L50-70L61-59L61-11L50 0L18 0ZM21-7L46-7L53-14L53-57L46-63L21-63L15-57L15-14L21-7Z' })] })));
|
|
20
|
+
export const P = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 49.2 70', children: [_jsx("title", { children: "P" }), _jsx("path", { d: 'M8 0L8-70L48-70L57-61L57-38L48-29L16-29L16 0L8 0ZM16-36L45-36L50-41L50-59L45-63L16-63L16-36Z' })] })));
|
|
21
|
+
export const Q = ((props) => (_jsxs("svg", { ...props, viewBox: '7 -70 56 80.8', children: [_jsx("title", { children: "Q" }), _jsx("path", { d: 'M53-4L63 6L58 11L48 0L18 0L7-11L7-59L18-70L50-70L61-59L61-11L53-4ZM46-7L53-14L53-57L46-63L21-63L15-57L15-14L21-7L46-7Z' })] })));
|
|
22
|
+
export const R = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 49.6 70', children: [_jsx("title", { children: "R" }), _jsx("path", { d: 'M49-31L58-21L58 0L50 0L50-19L40-29L16-29L16 0L8 0L8-70L48-70L57-61L57-39L49-31ZM16-63L16-36L45-36L50-41L50-59L45-63L16-63Z' })] })));
|
|
23
|
+
export const S = ((props) => (_jsxs("svg", { ...props, viewBox: '6.5 -70 48.800000000000004 70', children: [_jsx("title", { children: "S" }), _jsx("path", { d: 'M16 0L7-9L7-16L14-16L14-12L19-7L43-7L48-12L48-28L43-33L16-33L7-42L7-61L16-70L45-70L55-61L55-54L47-54L47-58L42-63L19-63L14-58L14-44L19-39L46-39L55-30L55-9L46 0L16 0Z' })] })));
|
|
24
|
+
export const T = ((props) => (_jsxs("svg", { ...props, viewBox: '3 -70 50 70', children: [_jsx("title", { children: "T" }), _jsx("path", { d: 'M24 0L24-63L3-63L3-70L53-70L53-63L32-63L32 0L24 0Z' })] })));
|
|
25
|
+
export const U = ((props) => (_jsxs("svg", { ...props, viewBox: '8 -70 51.6 70', children: [_jsx("title", { children: "U" }), _jsx("path", { d: 'M19 0L8-11L8-70L16-70L16-14L22-7L45-7L52-14L52-70L60-70L60-11L49 0L19 0Z' })] })));
|
|
26
|
+
export const V = ((props) => (_jsxs("svg", { ...props, viewBox: '2.5 -70 57.6 70', children: [_jsx("title", { children: "V" }), _jsx("path", { d: 'M27 0L3-70L10-70L31-9L31-9L52-70L60-70L35 0L27 0Z' })] })));
|
|
27
|
+
export const W = ((props) => (_jsxs("svg", { ...props, viewBox: '4 -70 78.30000000000001 70', children: [_jsx("title", { children: "W" }), _jsx("path", { d: 'M18 0L4-70L12-70L23-11L23-11L40-70L47-70L64-11L64-11L75-70L82-70L68 0L60 0L44-59L44-59L26 0L18 0Z' })] })));
|
|
28
|
+
export const X = ((props) => (_jsxs("svg", { ...props, viewBox: '2 -70 56.400000000000006 70', children: [_jsx("title", { children: "X" }), _jsx("path", { d: 'M2 0L26-36L3-70L12-70L30-42L49-70L57-70L35-36L58 0L50 0L30-30L11 0L2 0Z' })] })));
|
|
29
|
+
export const Y = ((props) => (_jsxs("svg", { ...props, viewBox: '1.5 -70 56.2 70', children: [_jsx("title", { children: "Y" }), _jsx("path", { d: 'M26 0L26-29L2-70L10-70L30-36L30-36L50-70L58-70L33-29L33 0L26 0Z' })] })));
|
|
30
|
+
export const Z = ((props) => (_jsxs("svg", { ...props, viewBox: '5 -70 46.800000000000004 70', children: [_jsx("title", { children: "Z" }), _jsx("path", { d: 'M5 0L5-8L44-63L44-64L6-64L6-70L52-70L52-63L13-7L13-7L52-7L52 0L5 0Z' })] })));
|
|
31
|
+
//# sourceMappingURL=Alphabets.js.map
|