generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/sudhanshutech/sistent int…
…o toolbar-customSearch
- Loading branch information
Showing
21 changed files
with
766 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
exec < /dev/tty && cz --hook || true | ||
if [ "$2" != "message" ];then | ||
exec < /dev/tty && cz --hook "$1" "$2" "$3" || true | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# 0.5.0 (2023-10-08) | ||
|
||
### Bug Fixes | ||
|
||
- added type def package mui-datatables ([#149](https://github.com/layer5io/sistent/issues/149)) ([756b363](https://github.com/layer5io/sistent/commit/756b363959fe3413a31adcba5ef9d60095ddb207)) | ||
- Moved deps to devDeps, and allow them to be peers ([704c432](https://github.com/layer5io/sistent/commit/704c4323afe4710cb54b5aac6b9c079c3e0fbe89)) | ||
- update Button to use MUI props ([7331fb8](https://github.com/layer5io/sistent/commit/7331fb88d336722c5993d6c5f2cbc99c6386c48d)) | ||
|
||
### Features | ||
|
||
- add remaining MUI components ([a9ba156](https://github.com/layer5io/sistent/commit/a9ba1568289a65a0b7f666fed6a0c372c99fe4ac)) | ||
- Attempt to clean up ([fe8df9d](https://github.com/layer5io/sistent/commit/fe8df9da768c243583b93027e96f706a5fc7ef5a)) | ||
- **components:** added ClickAwayListener ([#124](https://github.com/layer5io/sistent/issues/124)) ([db1a133](https://github.com/layer5io/sistent/commit/db1a133cf95bbce5c1d5aee060771697d09ca060)), closes [#123](https://github.com/layer5io/sistent/issues/123) | ||
- **data-tables:** add tables package ([711cd98](https://github.com/layer5io/sistent/commit/711cd98453d85d25442a1cbe4a5bb4d4152a19e6)) | ||
- Update react-error-boundary and define type definitions ([d75c0e4](https://github.com/layer5io/sistent/commit/d75c0e44af6aa68598d632d45eac6422d0ffdab5)) | ||
- Updated Button to allow a label and also take in children ([0c25592](https://github.com/layer5io/sistent/commit/0c25592611f22789fd1695acf92985ff9e86d910)) | ||
|
||
# 0.4.0 (2023-10-08) | ||
|
||
### Bug Fixes | ||
|
||
- added type def package mui-datatables ([#149](https://github.com/layer5io/sistent/issues/149)) ([756b363](https://github.com/layer5io/sistent/commit/756b363959fe3413a31adcba5ef9d60095ddb207)) | ||
- Moved deps to devDeps, and allow them to be peers ([704c432](https://github.com/layer5io/sistent/commit/704c4323afe4710cb54b5aac6b9c079c3e0fbe89)) | ||
- update Button to use MUI props ([7331fb8](https://github.com/layer5io/sistent/commit/7331fb88d336722c5993d6c5f2cbc99c6386c48d)) | ||
|
||
### Features | ||
|
||
- add remaining MUI components ([a9ba156](https://github.com/layer5io/sistent/commit/a9ba1568289a65a0b7f666fed6a0c372c99fe4ac)) | ||
- Attempt to clean up ([fe8df9d](https://github.com/layer5io/sistent/commit/fe8df9da768c243583b93027e96f706a5fc7ef5a)) | ||
- **components:** added ClickAwayListener ([#124](https://github.com/layer5io/sistent/issues/124)) ([db1a133](https://github.com/layer5io/sistent/commit/db1a133cf95bbce5c1d5aee060771697d09ca060)), closes [#123](https://github.com/layer5io/sistent/issues/123) | ||
- **data-tables:** add tables package ([711cd98](https://github.com/layer5io/sistent/commit/711cd98453d85d25442a1cbe4a5bb4d4152a19e6)) | ||
- Update react-error-boundary and define type definitions ([d75c0e4](https://github.com/layer5io/sistent/commit/d75c0e44af6aa68598d632d45eac6422d0ffdab5)) | ||
- Updated Button to allow a label and also take in children ([0c25592](https://github.com/layer5io/sistent/commit/0c25592611f22789fd1695acf92985ff9e86d910)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/components/src/base/ClickAwayListener/ClickAwayListener.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { | ||
ClickAwayListener as MuiClickAwayListener, | ||
type ClickAwayListenerProps | ||
} from '@mui/material'; | ||
export function ClickAwayListener(props: ClickAwayListenerProps) { | ||
return <MuiClickAwayListener {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { ClickAwayListener } from './ClickAwayListener'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MUIDataTable, type MUIDataTableProps } from 'mui-datatables'; | ||
|
||
export const DataTable = (props: MUIDataTableProps) => { | ||
return <MUIDataTable {...props} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { DataTable } from './datatable'; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { useWindowDimensions } from './windowSize'; |
56 changes: 56 additions & 0 deletions
56
packages/components/src/custom/Helpers/Dimension/windowSize.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { useEffect, useState } from 'react'; | ||
|
||
/** | ||
* Returns the width and height of the window. | ||
* | ||
* @returns {WindowDimensions} { width, height } | ||
*/ | ||
function getWindowDimensions(): WindowDimensions { | ||
const { innerWidth: width, innerHeight: height } = window; | ||
return { | ||
width, | ||
height | ||
}; | ||
} | ||
|
||
/** | ||
* Custom hook for getting window dimensions. | ||
* | ||
* @returns {WindowDimensions} { width, height } | ||
*/ | ||
export function useWindowDimensions(): WindowDimensions { | ||
const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions()); | ||
|
||
useEffect(() => { | ||
let resizeTimeout: number; | ||
|
||
function handleResize() { | ||
if (resizeTimeout) { | ||
clearTimeout(resizeTimeout); | ||
} | ||
resizeTimeout = window.setTimeout(() => { | ||
setWindowDimensions(getWindowDimensions()); | ||
}, 500); | ||
} | ||
|
||
window.addEventListener('resize', handleResize); | ||
|
||
// Clean up the event listener on unmount | ||
return () => { | ||
window.removeEventListener('resize', handleResize); | ||
if (resizeTimeout) { | ||
clearTimeout(resizeTimeout); | ||
} | ||
}; | ||
}, []); | ||
|
||
return windowDimensions; | ||
} | ||
|
||
/** | ||
* Represents the width and height of the window. | ||
*/ | ||
interface WindowDimensions { | ||
width: number; | ||
height: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Helper Components | ||
|
||
This directory contains a collection of utility and helper components that you can use across your project. These components are designed to simplify common tasks, enhance reusability, and improve code organization. | ||
|
||
## Table of Contents | ||
|
||
- [Available Helper Components](#available-helper-components) | ||
- [How to Use](#how-to-use) | ||
- [Examples](#examples) | ||
|
||
## Available Helper Components | ||
|
||
1. **Window Dimensions Hook**: A custom React hook for tracking changes in window dimensions. | ||
|
||
- **File**: `Dimension` | ||
- **Usage**: Provides the `useWindowDimensions` hook, which allows you to get the current window dimensions and react to changes in window size. | ||
- **Returns**: An object containing the current window dimensions and a boolean value indicating whether the window is currently in landscape mode. | ||
|
||
## How to Use | ||
|
||
To use these helper components in your project, follow these steps: | ||
|
||
1. Navigate to the specific helper component directory (e.g., `dimension.ts`) to find details about its usage. | ||
|
||
2. Import the required helper component into your code: | ||
|
||
```javascript | ||
import { useWindowDimensions } from './helpers'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# 0.2.0 (2023-10-08) | ||
|
||
### Features | ||
|
||
- (wip) update rtk-query-codegen for reference ([19f2267](https://github.com/layer5io/sistent/commit/19f226748409ffea6354055e02650ff4ef4266c4)) | ||
- Attempt to clean up ([fe8df9d](https://github.com/layer5io/sistent/commit/fe8df9da768c243583b93027e96f706a5fc7ef5a)) | ||
|
||
# 0.1.0 (2023-10-08) | ||
|
||
### Features | ||
|
||
- (wip) update rtk-query-codegen for reference ([19f2267](https://github.com/layer5io/sistent/commit/19f226748409ffea6354055e02650ff4ef4266c4)) | ||
- Attempt to clean up ([fe8df9d](https://github.com/layer5io/sistent/commit/fe8df9da768c243583b93027e96f706a5fc7ef5a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# 0.8.0 (2023-10-08) | ||
|
||
### Features | ||
|
||
- Grouped Fullscreen icons ([cdb3bb8](https://github.com/layer5io/sistent/commit/cdb3bb83bc8962543271d69395a5ae9bffbd4045)) | ||
|
||
# 0.7.0 (2023-10-08) | ||
|
||
### Features | ||
|
||
- Grouped Fullscreen icons ([cdb3bb8](https://github.com/layer5io/sistent/commit/cdb3bb83bc8962543271d69395a5ae9bffbd4045)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.