Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(components): refactor components #221

Merged
merged 8 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "eslint .",
"lint:fix": "eslint --fix",
"preview": "vite preview",
"storybook": "BROWSER=none storybook dev -p 6006"
"storybook": "storybook dev -p 6006"
},
"dependencies": {
"@layer5/sistent-components": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
ignorePatterns: ['dist', '.eslintrc.cjs'],
ignorePatterns: ['dist', '.eslintrc.cjs', 'tsup.config.ts'],
parser: '@typescript-eslint/parser',
plugins: ['react'],
rules: {
Expand Down
22 changes: 22 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.8.1-beta.10](https://github.com/layer5io/sistent/compare/@layer5/[email protected]...@layer5/[email protected]) (2023-11-04)

**Note:** Version bump only for package @layer5/sistent-components

## [0.8.1-beta.9](https://github.com/layer5io/sistent/compare/@layer5/[email protected]...@layer5/[email protected]) (2023-11-04)

### Bug Fixes

- redo const to function ([056f675](https://github.com/layer5io/sistent/commit/056f675fdbd4c964ab07f4ce06b266d7dab53112))

## [0.8.1-beta.8](https://github.com/layer5io/sistent/compare/@layer5/[email protected]...@layer5/[email protected]) (2023-11-03)

### Bug Fixes

- remove react-error-boundary package ([6ea9422](https://github.com/layer5io/sistent/commit/6ea9422a8125b67d1241dd6a1c323f8830a509a3))

## [0.8.1-beta.7](https://github.com/layer5io/sistent/compare/@layer5/[email protected]...@layer5/[email protected]) (2023-11-03)

### Bug Fixes

- **components:** refactor components ([5b90831](https://github.com/layer5io/sistent/commit/5b90831f02644bbaa16de6e59a11a3ea50f17e58))

## [0.8.1-beta.6](https://github.com/layer5io/sistent/compare/@layer5/[email protected]...@layer5/[email protected]) (2023-11-02)

**Note:** Version bump only for package @layer5/sistent-components
Expand Down
40 changes: 18 additions & 22 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
{
"name": "@layer5/sistent-components",
"version": "0.8.1-beta.6",
"version": "0.8.1-beta.10",
"description": "Reusable React Components",
"type": "module",
"exports": {
".": {
"import": "./dist/index.es.js",
"require": "./dist/index.cjs.js"
}
},
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.js",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc && NODE_ENV=production vite build",
"build": "NODE_ENV=production tsup",
"dev": "NODE_ENV=development tsup",
"lint": "eslint .",
"lint:fix": "eslint --fix"
},
"dependencies": {
"@layer5/sistent-svg": "^0.11.1-beta.1"
"@layer5/sistent-svg": "^0.11.1-beta.3"
},
"devDependencies": {
"@emotion/react": "^11.11.1",
Expand All @@ -36,23 +30,18 @@
"eslint": "^8.45.0",
"eslint-plugin-react": "^7.33.2",
"mui-datatables": "^4.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.11",
"typescript": "^5.0.2",
"vite": "^4.5.0",
"vite-plugin-dts": "^3.5.3",
"vite-tsconfig-paths": "^4.2.1"
"tsconfig": "workspace:^",
"tsup": "^7.2.0",
"typescript": "^5.0.2"
},
"peerDependencies": {
"@emotion/react": "*",
"@emotion/styled": "*",
"@mui/material": "*",
"@types/mui-datatables": "*",
"mui-datatables": "*",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-error-boundary": "*"
"react": ">=17",
"react-dom": ">=17"
},
"peerDependenciesMeta": {
"@emotion/react": {
Expand All @@ -69,8 +58,15 @@
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},
"optionalDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/base/Accordion/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Accordion as MuiAccordion, type AccordionProps } from '@mui/material';
export function Accordion(props: AccordionProps) {
export function Accordion(props: AccordionProps): JSX.Element {
return <MuiAccordion {...props} />;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AccordionActions as MuiAccordionActions, type AccordionActionsProps } from '@mui/material';

export function AccordionActions(props: AccordionActionsProps) {
export function AccordionActions(props: AccordionActionsProps): JSX.Element {
return <MuiAccordionActions {...props} />;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AccordionDetails as MuiAccordionDetails, type AccordionDetailsProps } from '@mui/material';

export function AccordionDetails(props: AccordionDetailsProps) {
export function AccordionDetails(props: AccordionDetailsProps): JSX.Element {
return <MuiAccordionDetails {...props} />;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AccordionSummary as MuiAccordionSummary, type AccordionSummaryProps } from '@mui/material';

export function AccordionSummary(props: AccordionSummaryProps) {
export function AccordionSummary(props: AccordionSummaryProps): JSX.Element {
return <MuiAccordionSummary {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/AppBar/appbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppBar as MuiAppBar, type AppBarProps } from '@mui/material';

export function AppBar(props: AppBarProps) {
export function AppBar(props: AppBarProps): JSX.Element {
return <MuiAppBar {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Avatar/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Avatar as MuiAvatar, type AvatarProps } from '@mui/material';

export function Avatar(props: AvatarProps) {
export function Avatar(props: AvatarProps): JSX.Element {
return <MuiAvatar {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Avatar/avatargroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AvatarGroup as MuiAvatarGroup, type AvatarGroupProps } from '@mui/material';

export function AvatarGroup(props: AvatarGroupProps) {
export function AvatarGroup(props: AvatarGroupProps): JSX.Element {
return <MuiAvatarGroup {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Avatar/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Badge as MuiBadge, type BadgeProps } from '@mui/material';

export function Badge(props: BadgeProps) {
export function Badge(props: BadgeProps): JSX.Element {
return <MuiBadge {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Box/box.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as MuiBox, type BoxProps } from '@mui/material';

export function Box(props: BoxProps) {
export function Box(props: BoxProps): JSX.Element {
return <MuiBox {...props} />;
}
5 changes: 2 additions & 3 deletions packages/components/src/base/Button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Button as MuiButton, type ButtonProps as MuiButtonProps } from '@mui/material';
import { ReactNode } from 'react';

export interface ButtonProps extends MuiButtonProps {
label?: string;
children?: ReactNode;
children?: React.ReactNode;
}

export function Button({ label, children, ...props }: ButtonProps) {
export function Button({ label, children, ...props }: ButtonProps): JSX.Element {
return (
<MuiButton {...props}>
{label}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/base/Button/buttongroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ButtonGroup as MuiButtonGroup, type ButtonGroupProps } from '@mui/material';

export function ButtonGroup(props: ButtonGroupProps) {
export function ButtonGroup(props: ButtonGroupProps): JSX.Element {
return <MuiButtonGroup {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Button/iconbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconButton as MuiIconButton, type IconButtonProps } from '@mui/material';

export function IconButton(props: IconButtonProps) {
export function IconButton(props: IconButtonProps): JSX.Element {
return <MuiIconButton {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Card/card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Card as MuiCard, type CardProps } from '@mui/material';

export function Card(props: CardProps) {
export function Card(props: CardProps): JSX.Element {
return <MuiCard {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Card/cardactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CardActions as MuiCardActions, type CardActionsProps } from '@mui/material';

export function CardActions(props: CardActionsProps) {
export function CardActions(props: CardActionsProps): JSX.Element {
return <MuiCardActions {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Card/cardcontent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CardContent as MuiCardContent, type CardContentProps } from '@mui/material';

export function CardContent(props: CardContentProps) {
export function CardContent(props: CardContentProps): JSX.Element {
return <MuiCardContent {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Checkbox as MuiCheckbox, type CheckboxProps } from '@mui/material';

export function Checkbox(props: CheckboxProps) {
export function Checkbox(props: CheckboxProps): JSX.Element {
return <MuiCheckbox {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Chip/chip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Chip as MuiChip, type ChipProps } from '@mui/material';

export function Chip(props: ChipProps) {
export function Chip(props: ChipProps): JSX.Element {
return <MuiChip {...props} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import {
ClickAwayListener as MuiClickAwayListener,
type ClickAwayListenerProps
} from '@mui/material';
export function ClickAwayListener(props: ClickAwayListenerProps) {
export function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element {
return <MuiClickAwayListener {...props} />;
}
1 change: 0 additions & 1 deletion packages/components/src/base/DataTable/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/backdrop.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Backdrop as MuiBackdrop, type BackdropProps } from '@mui/material';

export function Backdrop(props: BackdropProps) {
export function Backdrop(props: BackdropProps): JSX.Element {
return <MuiBackdrop {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dialog as MuiDialog, type DialogProps } from '@mui/material';

export function Dialog(props: DialogProps) {
export function Dialog(props: DialogProps): JSX.Element {
return <MuiDialog {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/dialogactions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DialogActions as MuiDialogActions, type DialogActionsProps } from '@mui/material';

export function DialogActions(props: DialogActionsProps) {
export function DialogActions(props: DialogActionsProps): JSX.Element {
return <MuiDialogActions {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/dialogcontent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DialogContent as MuiDialogContent, type DialogContentProps } from '@mui/material';

export function DialogContent(props: DialogContentProps) {
export function DialogContent(props: DialogContentProps): JSX.Element {
return <MuiDialogContent {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/dialogcontenttext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import {
type DialogContentTextProps
} from '@mui/material';

export function DialogContentText(props: DialogContentTextProps) {
export function DialogContentText(props: DialogContentTextProps): JSX.Element {
return <MuiDialogContentText {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Dialog/dialogtitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DialogTitle as MuiDialogTitle, type DialogTitleProps } from '@mui/material';

export function DialogTitle(props: DialogTitleProps) {
export function DialogTitle(props: DialogTitleProps): JSX.Element {
return <MuiDialogTitle {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Divider/divider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Divider as MuiDivider, type DividerProps } from '@mui/material';

export function Divider(props: DividerProps) {
export function Divider(props: DividerProps): JSX.Element {
return <MuiDivider {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Drawer/drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Drawer as MuiDrawer, type DrawerProps } from '@mui/material';

export function Drawer(props: DrawerProps) {
export function Drawer(props: DrawerProps): JSX.Element {
return <MuiDrawer {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Form/formcontrollabel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormControlLabel as MuiFormControlLabel, type FormControlLabelProps } from '@mui/material';

export function FormControlLabel(props: FormControlLabelProps) {
export function FormControlLabel(props: FormControlLabelProps): JSX.Element {
return <MuiFormControlLabel {...props} />;
}
5 changes: 5 additions & 0 deletions packages/components/src/base/Grid/grid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Grid as MuiGrid, GridProps as MuiGridProps } from '@mui/material';

export function Grid(props: MuiGridProps): JSX.Element {
return <MuiGrid {...props} />;
}
4 changes: 2 additions & 2 deletions packages/components/src/base/List/list.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { List as MuiList, type ListProps } from '@mui/material';

export const List = (props: ListProps) => {
export function List(props: ListProps): JSX.Element {
return <MuiList {...props} />;
};
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Menu/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Menu as MuiMenu, type MenuProps } from '@mui/material';

export function Menu(props: MenuProps) {
export function Menu(props: MenuProps): JSX.Element {
return <MuiMenu {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Menu/menuitem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MenuItem as MuiMenuItem, type MenuItemProps } from '@mui/material';

export function MenuItem(props: MenuItemProps) {
export function MenuItem(props: MenuItemProps): JSX.Element {
return <MuiMenuItem {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Paper/paper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Paper as MuiPaper, type PaperProps } from '@mui/material';

export function Paper(props: PaperProps) {
export function Paper(props: PaperProps): JSX.Element {
return <MuiPaper {...props}>{props.children}</MuiPaper>;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Popper/popper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Popper as MuiPopper, type PopperProps } from '@mui/material';

export function Popper(props: PopperProps) {
export function Popper(props: PopperProps): JSX.Element {
return <MuiPopper {...props} />;
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Radio/radiogroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RadioGroup as MuiRadioGroup, type RadioGroupProps } from '@mui/material';

export function RadioGroup(props: RadioGroupProps) {
export function RadioGroup(props: RadioGroupProps): JSX.Element {
return <MuiRadioGroup {...props} />;
}
4 changes: 2 additions & 2 deletions packages/components/src/base/Select/select.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Select as MuiSelect, type SelectProps } from '@mui/material';

export const Select = (props: SelectProps) => {
export function Select(props: SelectProps): JSX.Element {
return <MuiSelect {...props} />;
};
}
2 changes: 1 addition & 1 deletion packages/components/src/base/Slide/slide.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Slide as MuiSlide, type SlideProps } from '@mui/material';

export function Slide(props: SlideProps) {
export function Slide(props: SlideProps): JSX.Element {
return <MuiSlide {...props} />;
}
Loading
Loading