feat: streamline component imports and update package exports for better organization
This commit is contained in:
@@ -1,10 +1,7 @@
|
|||||||
import { lazy, Suspense, useState } from 'react';
|
import { lazy, Suspense, useState } from 'react';
|
||||||
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
||||||
import { ThemeProvider, ColorSchemeType, DensityType } from '@repo/ui/provider';
|
import { ThemeProvider, ColorSchemeType, DensityType } from '@repo/ui/provider';
|
||||||
import { NotFound } from '@repo/ui/components/system-pages/not-found';
|
import { NotFound, Forbidden, Maintenance, ComingSoon } from '@repo/ui/components';
|
||||||
import { Forbidden } from '@repo/ui/components/system-pages/forbidden';
|
|
||||||
import { Maintenance } from '@repo/ui/components/system-pages/maintenance';
|
|
||||||
import { ComingSoon } from '@repo/ui/components/system-pages/coming-soon';
|
|
||||||
|
|
||||||
const AuthModule = lazy(() => import('./auth'));
|
const AuthModule = lazy(() => import('./auth'));
|
||||||
const AppModule = lazy(() => import('./modules'));
|
const AppModule = lazy(() => import('./modules'));
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
import { ColorSchemeType, DensityType } from '@repo/ui/provider';
|
import { ColorSchemeType, DensityType } from '@repo/ui/provider';
|
||||||
import { Button } from '@repo/ui/components/button';
|
import { Button, Card, Container, Select, Group, Stack, Text, Title, TextInput, Checkbox } from '@repo/ui/components';
|
||||||
import { Card } from '@repo/ui/components/card';
|
|
||||||
import { Container } from '@repo/ui/components/container';
|
|
||||||
import { Select } from '@repo/ui/components/select';
|
|
||||||
import { Group, Stack } from '@repo/ui/components/group';
|
|
||||||
import { Text, Title } from '@repo/ui/components/text';
|
|
||||||
import { TextInput } from '@repo/ui/components/input';
|
|
||||||
import { Checkbox } from '@repo/ui/components/checkbox';
|
|
||||||
|
|
||||||
interface ShowcaseViewProps {
|
interface ShowcaseViewProps {
|
||||||
colorScheme: ColorSchemeType;
|
colorScheme: ColorSchemeType;
|
||||||
@@ -23,7 +16,9 @@ export default function ShowcaseView({ colorScheme, setColorScheme, density, set
|
|||||||
|
|
||||||
{/* Control Panel */}
|
{/* Control Panel */}
|
||||||
<Card withBorder shadow="sm" radius="md" p="md">
|
<Card withBorder shadow="sm" radius="md" p="md">
|
||||||
<Title order={3} mb="md">Control Panel</Title>
|
<Title order={3} mb="md">
|
||||||
|
Control Panel
|
||||||
|
</Title>
|
||||||
<Group grow align="flex-end">
|
<Group grow align="flex-end">
|
||||||
<Select
|
<Select
|
||||||
label="Color Scheme"
|
label="Color Scheme"
|
||||||
@@ -53,13 +48,19 @@ export default function ShowcaseView({ colorScheme, setColorScheme, density, set
|
|||||||
<Card withBorder shadow="sm" radius="md" p="md">
|
<Card withBorder shadow="sm" radius="md" p="md">
|
||||||
<Stack gap="lg">
|
<Stack gap="lg">
|
||||||
<div>
|
<div>
|
||||||
<Title order={3} mb="sm">Typography</Title>
|
<Title order={3} mb="sm">
|
||||||
<Text size="sm" c="dimmed">This is dimmed small text.</Text>
|
Typography
|
||||||
|
</Title>
|
||||||
|
<Text size="sm" c="dimmed">
|
||||||
|
This is dimmed small text.
|
||||||
|
</Text>
|
||||||
<Text>This is standard text describing the components below.</Text>
|
<Text>This is standard text describing the components below.</Text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Title order={3} mb="sm">Buttons</Title>
|
<Title order={3} mb="sm">
|
||||||
|
Buttons
|
||||||
|
</Title>
|
||||||
<Group>
|
<Group>
|
||||||
<Button variant="filled">Filled Button</Button>
|
<Button variant="filled">Filled Button</Button>
|
||||||
<Button variant="outline">Outline Button</Button>
|
<Button variant="outline">Outline Button</Button>
|
||||||
@@ -69,7 +70,9 @@ export default function ShowcaseView({ colorScheme, setColorScheme, density, set
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Title order={3} mb="md">Form Elements</Title>
|
<Title order={3} mb="md">
|
||||||
|
Form Elements
|
||||||
|
</Title>
|
||||||
<Group grow>
|
<Group grow>
|
||||||
<TextInput label="First Name" placeholder="John" />
|
<TextInput label="First Name" placeholder="John" />
|
||||||
<TextInput label="Last Name" placeholder="Doe" />
|
<TextInput label="Last Name" placeholder="Doe" />
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./theme.css": "./src/theme.css",
|
"./theme.css": "./src/theme.css",
|
||||||
"./components/system-pages/*": "./src/components/system-pages/*.tsx",
|
"./components": "./src/components/index.ts",
|
||||||
"./components/*": "./src/components/*.ts",
|
"./hooks": "./src/hooks/index.ts",
|
||||||
"./hooks/*": "./src/hooks/*.ts",
|
|
||||||
"./utils/*": "./src/utils/*.ts",
|
|
||||||
"./provider": "./src/provider/index.ts"
|
"./provider": "./src/provider/index.ts"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export { Button, type ButtonProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Card, type CardProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Checkbox, type CheckboxProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Container, type ContainerProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Group, type GroupProps, Stack, type StackProps } from '@mantine/core';
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from '@mantine/core';
|
||||||
|
|
||||||
|
export * from './system-pages/coming-soon';
|
||||||
|
export * from './system-pages/forbidden';
|
||||||
|
export * from './system-pages/maintenance';
|
||||||
|
export * from './system-pages/not-found';
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { TextInput, type TextInputProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Select, type SelectProps } from '@mantine/core';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Text, type TextProps, Title, type TitleProps } from '@mantine/core';
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from '@mantine/hooks';
|
||||||
Reference in New Issue
Block a user