-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SideNav): Implementation, Documentation, Tests (#2167)
* poc * feat: create L1 menu * feat: add basic L2 * feat: attempt l2 * fix: no clue what I am doing * feat: finally made l1 active states work correctly * feat: add mutation observer * current page check * feat: isCurrentPage implementation * feat: get implementation working with isCurrentPage * feat: get level 1 hover working * feat: add collapse animation * feat: add animation * feat: add animations * fix: remove unused navlink * fix: types * fix: remove unused code * feat: add mobile sidenav with drawer * fix: click to open again in l2 trigger * feat: add basic l3 * feat: get l3 working in example * fix: background color in collapsible * fix: ts errors and add collapsible * feat: add footer * refactor: move items to separate dir * fix: drawer heading, add header * feat: add collapsed state for show more link * fix: transition delay * feat: add l2 drawer heading * feat: add titleSuffix and trailing * feat: add tooltip to item * fix: mobile check * feat: add active line * fix: active link animation on page load * fix: initial focus * hide open nav button in mobile * fix: perf, refactor code * fix: matchPath logic * fix: responsiveness in docs * feat: add comment * feat: add new json * fix: latest documentation * fix: selected state when items are collapsed * feat: add SideNavItem component * feat: add jsdoc * docs: add dashboard template example * fix: ts * feat: export SideNav * feat: add v6 docs * feat: remove StrictMode * feat: add tests * refactor: move example out of test * feat: add interaction test * feat: add kitchensink * fix: ts * fix: SideNav snapshots * feat: prettify route output * fix: remove unused variable * fix: resolve anurag's amazing comments * feat: add comment for isFirstRender * fix: tests * fix: remove flaky sidenav test * fix: animations and layout shift padding * fix: tests * fix: edgecases * feat: add activation card * fix: snapshots * fix: react-router example * docs: divide sandbox code in multiple files * fix: add comments to router example * feat: add url bar to stackblitz * feat: add alert in usage * fix: text * add link playground * fix: remove unused code * tests: fix snapshots * feat: add ham menu in mobile stories * feat: add mobile sidenav * fix: add ham menu button in examples * fix: broken types * fix: snapshots * fix: missing skeleton in dashboard layout * feat: add jsdoc * Create red-bats-allow.md * fix: Drawer tests for back button * fix: interaction tests for safari * fix: sidenav mobile test * feat: add background transition to items and make show more link area more clickable * feat: add delay in exit, fix ui panic * docs: add comment to SideNavLevel * fix: snapshots * fix: small mobile scroll * feat: add error for L4 items * fix: typecheck * docs: resolve chaitanya's comment * fix: snapshots * fix: drawer interaction test * fix: spacing right
- Loading branch information
1 parent
2d82e41
commit 0d3e260
Showing
62 changed files
with
6,292 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@razorpay/blade": minor | ||
--- | ||
|
||
feat(SideNav): add SideNav component | ||
|
||
Checkout [SideNav Documentation](https://blade.razorpay.com/?path=/docs/components-sidenav--docs) |
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
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
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,5 +1,21 @@ | ||
import type { ReactNode } from 'react'; | ||
import type { BaseBoxProps } from '~components/Box/BaseBox'; | ||
import type { TestID } from '~utils/types'; | ||
|
||
export type CollapsibleBodyContentProps = { | ||
type CollapsibleBodyProps = { | ||
children: ReactNode; | ||
width?: BaseBoxProps['width']; | ||
/** | ||
* Internal | ||
* | ||
* Set to false to remove margin of CollapsibleBody | ||
*/ | ||
_hasMargin?: boolean; | ||
} & TestID; | ||
|
||
type CollapsibleBodyContentProps = { | ||
children: ReactNode; | ||
_hasMargin?: CollapsibleBodyProps['_hasMargin']; | ||
}; | ||
|
||
export type { CollapsibleBodyProps, CollapsibleBodyContentProps }; |
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,10 +1,17 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import React from 'react'; | ||
|
||
const DrawerContext = React.createContext<{ | ||
type DrawerContextType = { | ||
close: () => void; | ||
closeButtonRef?: React.MutableRefObject<any>; | ||
stackingLevel?: number; | ||
isExiting: boolean; | ||
}; | ||
|
||
const DrawerContext = React.createContext<DrawerContextType>({ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
}>({ close: () => {} }); | ||
close: () => {}, | ||
isExiting: false, | ||
}); | ||
|
||
export { DrawerContext }; |
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.