-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
feat: extend ShadCN initialization #13347
Merged
pettinarip
merged 29 commits into
ethereum:shadcn-initial-setup
from
TylerAPfledderer:feat/shadcn-extend-initialization
Jul 11, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
1a5a98c
feat: initialize shadCN setup
TylerAPfledderer 1893c0d
feat: add next-themes for color mode
TylerAPfledderer f30e52f
refactor(.storybook): update configuration for Tailwind
TylerAPfledderer d1dde72
feat(global.css): set color tokens
TylerAPfledderer b051c50
refactor(global.css): complete update of foundation styles
TylerAPfledderer 9f06e0f
refactor: update accordion component
TylerAPfledderer 4a68d63
feat: extend shadcn initialization
TylerAPfledderer 5656859
chore: move tailwind styles to `main.css`
TylerAPfledderer f527b54
revert(components/ui): remove `eth-` utility prefix
TylerAPfledderer c3da52f
refactor: create isolated storybook config for tailwind
TylerAPfledderer d9ec82a
chore(tailwind.config): update content paths
TylerAPfledderer 0245dd1
refactor(tailwind/ui/accordion): apply icon from react-icons
TylerAPfledderer 6f80922
chore(tailwind/ui/stories): remove test story
TylerAPfledderer e351988
chore(components.json): set `rsc` to false
TylerAPfledderer 7fcb255
chore(tailwind/.storybook): update breakpoint set for viewports
TylerAPfledderer c8d89cd
chore: bump prettier to v3
TylerAPfledderer d0e4956
refactor: update next theme provider usage
TylerAPfledderer d07e666
fix(tailwind/stories): fix type errors for accordion
TylerAPfledderer c790d14
chore: remove carousel component ui
TylerAPfledderer e95298b
fix(tailwind/ui): fix accordion collapse animation
TylerAPfledderer 675492d
feat(tailwind/ui): create stack components
TylerAPfledderer 24ca478
Merge branch 'shadcn-initial-setup' into feat/shadcn-extend-initializ…
TylerAPfledderer a680d58
chore(.prettierignore): remove tailwind config
TylerAPfledderer 7236038
refactor(.storybook): update root conifg decorator
TylerAPfledderer a066d37
chore: remove generated radix components
TylerAPfledderer 7ee19ac
fix(HubHero): fix RTL position of content container
TylerAPfledderer 94e4d1a
revert: add back radix nav menu package
TylerAPfledderer 91b9185
chore: rename css files
TylerAPfledderer 4fcc57c
chore(global.css): flip pascalCase naming to kebab-case
TylerAPfledderer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,9 +1,2 @@ | ||
<style type="text/css"> | ||
|
||
:root { | ||
--font-inter: 'Inter', sans-serif; | ||
} | ||
|
||
</style> | ||
|
||
<link rel="preload" href="/fonts/inter/latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> |
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
import isChromatic from "chromatic/isChromatic" | ||
import { MotionGlobalConfig } from "framer-motion" | ||
import { withThemeByDataAttribute } from "@storybook/addon-themes" | ||
import type { Preview } from "@storybook/react" | ||
|
||
import ThemeProvider from "@/components/ThemeProvider" | ||
|
||
import i18n, { baseLocales } from "./i18next" | ||
|
||
import "../src/styles/global.css" | ||
import "../src/styles/fonts.css" | ||
|
||
MotionGlobalConfig.skipAnimations = isChromatic() | ||
|
||
export const breakpointSet: [token: string, value: string][] = [ | ||
["base", "375px"], | ||
["sm", "640px"], | ||
["md", "768px"], | ||
["lg", "1024px"], | ||
["xl", "1280px"], | ||
["2xl", "1536px"], | ||
] | ||
|
||
const preview: Preview = { | ||
globals: { | ||
locale: "en", | ||
locales: baseLocales, | ||
}, | ||
decorators: [ | ||
withThemeByDataAttribute({ | ||
themes: { | ||
light: "light", | ||
dark: "dark", | ||
}, | ||
defaultTheme: "light", | ||
}), | ||
(Story) => ( | ||
<ThemeProvider> | ||
<Story /> | ||
</ThemeProvider> | ||
), | ||
], | ||
parameters: { | ||
i18n, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
chromatic: { | ||
prefersReducedMotion: "reduce", | ||
}, | ||
options: { | ||
storySort: { | ||
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"], | ||
}, | ||
}, | ||
layout: "centered", | ||
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints) | ||
viewport: { | ||
viewports: breakpointSet.reduce<{ | ||
[token: string]: { | ||
name: string | ||
styles: Record<"width" | "height", string> | ||
} | ||
}>((arr, [token, value]) => { | ||
return { | ||
...arr, | ||
[token]: { | ||
name: token, | ||
styles: { | ||
width: value, | ||
height: "800px", | ||
}, | ||
}, | ||
} | ||
}, {}), | ||
}, | ||
}, | ||
} | ||
|
||
export default preview |
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 was deleted.
Oops, something went wrong.
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! very handy