Skip to content

Commit

Permalink
Added Button, Form and Table skeleton (#1)
Browse files Browse the repository at this point in the history
* WIP

* Tidy

* Started adding table

* Finished skeleton for Table component

* Added CODEOWNERS

* Added form skeleton

* Added form Rich Text

* Added form Date Time Picker

* Use latest Node LTS

* Include /dist

* Updated dist

* Working SCSS

* Added examples

* Changes

* Added card

* Classes to functional components

---------

Co-authored-by: Kishan Jadav <kishan_jadav@hotmail.com>
  • Loading branch information
ianvexler and kishannareshpal authored Feb 6, 2024
1 parent 833eec6 commit f44d312
Show file tree
Hide file tree
Showing 102 changed files with 59,927 additions and 290 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ module.exports = {
'@typescript-eslint/no-use-before-define': ['error'],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/react-in-jsx-scope': 'off', // suppress errors for missing 'import React' in files
'react/react-in-jsx-scope': 'off', // suppress errors for missing 'import React' in files,
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/* @kishannareshpal @ianvexler @jsteeland @rich-williamson
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,4 @@ public/
# Ignore all local history of files
.history

dist/

# End of https://www.gitignore.io/api/node,macos,visualstudiocode
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
example
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.19.0
v20.11.0
1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions dist/Text.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from 'react';
export declare const Text: () => React.JSX.Element;
//# sourceMappingURL=Text.d.ts.map
1 change: 1 addition & 0 deletions dist/Text.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/components/button/Button.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
import { themes } from 'types';
interface ButtonProps extends Bootstrap.ButtonProps {
label: string;
variant?: themes;
}
declare const Button: ({ label, className, variant, ...rest }: ButtonProps) => React.JSX.Element;
export default Button;
//# sourceMappingURL=Button.d.ts.map
1 change: 1 addition & 0 deletions dist/components/button/Button.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/card/Card.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
interface CardProps extends React.HTMLProps<HTMLDivElement> {
header?: string;
}
declare const Button: ({ header, children, className, ...rest }: CardProps) => React.JSX.Element;
export default Button;
//# sourceMappingURL=Card.d.ts.map
1 change: 1 addition & 0 deletions dist/components/card/Card.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions dist/components/form/Form.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
export interface FormProps extends React.HTMLProps<HTMLFormElement> {
}
declare const Form: {
({ children, ...rest }: FormProps): React.JSX.Element;
Group: ({ label, className, children, ...rest }: import("./FormGroup").FormGroupProps) => React.JSX.Element;
Label: ({ label, className }: import("react-bootstrap").FormLabelProps & {
label: string;
}) => React.JSX.Element;
Control: ({ className, ...rest }: import("./components/FormControl").FormControlProps) => React.JSX.Element;
Select: ({ className, children, ...rest }: import("./components/FormSelect").FormSelectProps) => React.JSX.Element;
Check: ({ type, className, ...rest }: import("./components/FormCheck").FormCheckProps) => React.JSX.Element;
RichText: ({ style, ...rest }: import("./components/FormRichText").FormRichText) => React.JSX.Element;
DateTime: ({ ...rest }: import("./components/FormDateTime").FormDateTime) => React.JSX.Element;
};
export default Form;
//# sourceMappingURL=Form.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/Form.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions dist/components/form/FormGroup.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
export interface FormGroupProps extends Bootstrap.FormGroupProps {
label?: string;
}
declare const FormGroup: ({ label, className, children, ...rest }: FormGroupProps) => React.JSX.Element;
export default FormGroup;
//# sourceMappingURL=FormGroup.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/FormGroup.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/form/components/FormCheck.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
export interface FormCheckProps extends Bootstrap.FormCheckProps {
}
declare const FormCheck: ({ type, className, ...rest }: FormCheckProps) => React.JSX.Element;
export default FormCheck;
//# sourceMappingURL=FormCheck.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormCheck.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/form/components/FormControl.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
export interface FormControlProps extends Bootstrap.FormControlProps {
}
declare const FormControl: ({ className, ...rest }: FormControlProps) => React.JSX.Element;
export default FormControl;
//# sourceMappingURL=FormControl.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormControl.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/form/components/FormDateTime.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { DateTimePickerProps } from '@mui/x-date-pickers/DateTimePicker';
export interface FormDateTime extends DateTimePickerProps<Date> {
}
declare const FormDateTime: ({ ...rest }: FormDateTime) => React.JSX.Element;
export default FormDateTime;
//# sourceMappingURL=FormDateTime.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormDateTime.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions dist/components/form/components/FormLabel.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import { FormLabelProps as BootstrapFormLabelProps } from 'react-bootstrap';
type FormLabelProps = BootstrapFormLabelProps & {
label: string;
};
declare const FormLabel: ({ label, className }: FormLabelProps) => React.JSX.Element;
export default FormLabel;
//# sourceMappingURL=FormLabel.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormLabel.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions dist/components/form/components/FormRichText.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';
export interface FormRichText extends ReactQuill.ReactQuillProps {
}
declare const FormRichText: ({ style, ...rest }: FormRichText) => React.JSX.Element;
export default FormRichText;
//# sourceMappingURL=FormRichText.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormRichText.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/form/components/FormSelect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
export interface FormSelectProps extends Bootstrap.FormSelectProps {
}
declare const FormSelect: ({ className, children, ...rest }: FormSelectProps) => React.JSX.Element;
export default FormSelect;
//# sourceMappingURL=FormSelect.d.ts.map
1 change: 1 addition & 0 deletions dist/components/form/components/FormSelect.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions dist/components/table/Table.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import * as Bootstrap from 'react-bootstrap';
interface TableProps extends Bootstrap.TableProps {
}
declare const Table: {
({ className, children, ...rest }: TableProps): React.JSX.Element;
Head: ({ children, ...rest }: import("./components/TableHead").TableHeadProps) => React.JSX.Element;
Row: ({ className, children, ...rest }: import("./components/TableRow").TableRowProps) => React.JSX.Element;
Cell: ({ className, children, ...rest }: import("./components/TableCell").TableCellProps) => React.JSX.Element;
Body: ({ children, ...rest }: import("./components/TableBody").TableBodyProps) => React.JSX.Element;
};
export default Table;
//# sourceMappingURL=Table.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/Table.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/components/table/TableSectionContext.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="react" />
export declare enum TableSection {
NONE = 0,
HEAD = 1,
BODY = 2
}
declare const TableSectionContext: import("react").Context<TableSection>;
export default TableSectionContext;
//# sourceMappingURL=TableSectionContext.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/TableSectionContext.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/table/components/TableBody.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TableBodyProps extends React.HTMLProps<HTMLTableSectionElement> {
}
declare const TableBody: ({ children, ...rest }: TableBodyProps) => React.JSX.Element;
export default TableBody;
//# sourceMappingURL=TableBody.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/components/TableBody.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/table/components/TableCell.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TableCellProps extends React.HTMLProps<HTMLTableCellElement> {
}
declare const TableCell: ({ className, children, ...rest }: TableCellProps) => React.JSX.Element;
export default TableCell;
//# sourceMappingURL=TableCell.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/components/TableCell.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/table/components/TableHead.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TableHeadProps extends React.HTMLProps<HTMLTableSectionElement> {
}
declare const TableHead: ({ children, ...rest }: TableHeadProps) => React.JSX.Element;
export default TableHead;
//# sourceMappingURL=TableHead.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/components/TableHead.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/table/components/TableRow.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TableRowProps extends React.HTMLProps<HTMLTableRowElement> {
}
declare const TableRow: ({ className, children, ...rest }: TableRowProps) => React.JSX.Element;
export default TableRow;
//# sourceMappingURL=TableRow.d.ts.map
1 change: 1 addition & 0 deletions dist/components/table/components/TableRow.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/text/Text.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
text: string;
}
export declare const Title: ({ text, ...rest }: TitleProps) => React.JSX.Element;
//# sourceMappingURL=Text.d.ts.map
1 change: 1 addition & 0 deletions dist/components/text/Text.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/components/title/Text.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
export interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
text: string;
}
export declare const Title: ({ text, ...rest }: TitleProps) => React.JSX.Element;
//# sourceMappingURL=Text.d.ts.map
1 change: 1 addition & 0 deletions dist/components/title/Text.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/components/title/Title.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
export interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
text: string;
}
declare const Title: ({ text, ...rest }: TitleProps) => React.JSX.Element;
export default Title;
//# sourceMappingURL=Title.d.ts.map
1 change: 1 addition & 0 deletions dist/components/title/Title.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Button from './components/button/Button';
import Table from 'components/table/Table';
import Form from 'components/form/Form';
import Title from './components/title/Title';
import Card from './components/card/Card';
export { Button, Table, Form, Title, Card };
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f44d312

Please sign in to comment.