-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change profile tabs to use Ark+Panda
- Loading branch information
1 parent
6afd866
commit 112cd68
Showing
8 changed files
with
513 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Tabs as ArkTabs } from "@ark-ui/react/tabs"; | ||
import { styled } from "styled-system/jsx"; | ||
import { tabs } from "styled-system/recipes"; | ||
|
||
import { createStyleContext } from "src/theme/create-style-context"; | ||
|
||
const { withProvider, withContext } = createStyleContext(tabs); | ||
|
||
const Tabs = withProvider(styled(ArkTabs.Root), "root"); | ||
const TabsContent = withContext(styled(ArkTabs.Content), "content"); | ||
const TabsIndicator = withContext(styled(ArkTabs.Indicator), "indicator"); | ||
const TabsList = withContext(styled(ArkTabs.List), "list"); | ||
const TabsTrigger = withContext(styled(ArkTabs.Trigger), "trigger"); | ||
|
||
const Root = Tabs; | ||
const Content = TabsContent; | ||
const Indicator = TabsIndicator; | ||
const List = TabsList; | ||
const Trigger = TabsTrigger; | ||
|
||
export { | ||
Content, | ||
Indicator, | ||
List, | ||
Root, | ||
Tabs, | ||
TabsContent, | ||
TabsIndicator, | ||
TabsList, | ||
TabsTrigger, | ||
Trigger, | ||
}; |
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,261 @@ | ||
import { tabsAnatomy } from "@ark-ui/react"; | ||
import { defineSlotRecipe } from "@pandacss/dev"; | ||
|
||
export const tabs = defineSlotRecipe({ | ||
className: "tabs", | ||
slots: tabsAnatomy.keys(), | ||
base: { | ||
root: { | ||
display: "flex", | ||
width: "full", | ||
_horizontal: { | ||
flexDirection: "column", | ||
}, | ||
_vertical: { | ||
flexDirection: "row", | ||
}, | ||
}, | ||
list: { | ||
display: "flex", | ||
flexShrink: "0", | ||
_horizontal: { | ||
flexDirection: "row", | ||
}, | ||
_vertical: { | ||
flexDirection: "column", | ||
}, | ||
overflow: "auto", | ||
position: "relative", | ||
scrollbarWidth: "none", | ||
"&::-webkit-scrollbar": { | ||
display: "none", | ||
}, | ||
}, | ||
trigger: { | ||
alignItems: "center", | ||
color: "fg.muted", | ||
cursor: "pointer", | ||
display: "inline-flex", | ||
flexShrink: "0", | ||
fontWeight: "semibold", | ||
gap: "2", | ||
justifyContent: "center", | ||
transitionDuration: "normal", | ||
transitionProperty: "color, background, border-color", | ||
transitionTimingFunction: "default", | ||
whiteSpace: "nowrap", | ||
_disabled: { | ||
color: "fg.disabled", | ||
cursor: "not-allowed", | ||
_hover: { | ||
color: "fg.disabled", | ||
}, | ||
}, | ||
_hover: { | ||
color: "fg.muted", | ||
}, | ||
_selected: { | ||
color: "fg.default", | ||
_hover: { | ||
color: "fg.default", | ||
}, | ||
}, | ||
_vertical: { | ||
justifyContent: "start", | ||
}, | ||
}, | ||
}, | ||
defaultVariants: { | ||
size: "md", | ||
}, | ||
variants: { | ||
variant: { | ||
line: { | ||
list: { | ||
_horizontal: { | ||
boxShadow: "0 -1px 0 0 inset var(--colors-border-default)", | ||
gap: "4", | ||
}, | ||
_vertical: { | ||
boxShadow: "1px 0 0 0 inset var(--colors-border-default)", | ||
gap: "1", | ||
}, | ||
}, | ||
indicator: { | ||
background: "colorPalette.default", | ||
_horizontal: { | ||
height: "2px", | ||
bottom: "0", | ||
}, | ||
_vertical: { | ||
width: "2px", | ||
left: "0", | ||
}, | ||
}, | ||
content: { | ||
pt: "4", | ||
}, | ||
trigger: { | ||
_horizontal: { | ||
pb: "2.5", | ||
}, | ||
}, | ||
}, | ||
outline: { | ||
list: { | ||
_horizontal: { | ||
mb: "-1px", | ||
}, | ||
_vertical: { | ||
mr: "-1px", | ||
}, | ||
}, | ||
trigger: { | ||
borderColor: "transparent", | ||
borderWidth: "1px", | ||
_horizontal: { | ||
borderTopRadius: "l2", | ||
}, | ||
_vertical: { | ||
borderTopLeftRadius: "l2", | ||
borderBottomLeftRadius: "l2", | ||
}, | ||
_selected: { | ||
background: "bg.default", | ||
borderColor: "accent.500", | ||
_horizontal: { | ||
borderBottomColor: "transparent", | ||
}, | ||
_vertical: { | ||
borderRightColor: "transparent", | ||
}, | ||
}, | ||
}, | ||
content: { | ||
borderWidth: "1px", | ||
borderColor: "accent.500", | ||
background: "bg.default", | ||
width: "full", | ||
}, | ||
}, | ||
}, | ||
size: { | ||
sm: { | ||
trigger: { | ||
"& svg": { | ||
width: "4", | ||
height: "4", | ||
}, | ||
}, | ||
}, | ||
md: { | ||
trigger: { | ||
"& svg": { | ||
width: "5", | ||
height: "5", | ||
}, | ||
}, | ||
}, | ||
lg: { | ||
trigger: { | ||
"& svg": { | ||
width: "5", | ||
height: "5", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
compoundVariants: [ | ||
{ | ||
size: "sm", | ||
variant: "outline", | ||
css: { | ||
trigger: { | ||
h: "9", | ||
minW: "9", | ||
textStyle: "sm", | ||
px: "3.5", | ||
}, | ||
content: { | ||
p: "3.5", | ||
}, | ||
}, | ||
}, | ||
{ | ||
size: "md", | ||
variant: "outline", | ||
css: { | ||
trigger: { | ||
h: "10", | ||
minW: "10", | ||
textStyle: "sm", | ||
px: "4", | ||
}, | ||
content: { | ||
p: "4", | ||
}, | ||
}, | ||
}, | ||
{ | ||
size: "lg", | ||
variant: "outline", | ||
css: { | ||
trigger: { | ||
h: "11", | ||
minW: "11", | ||
textStyle: "md", | ||
px: "4.5", | ||
}, | ||
content: { | ||
p: "4.5", | ||
}, | ||
}, | ||
}, | ||
{ | ||
size: "sm", | ||
variant: "line", | ||
css: { | ||
trigger: { | ||
fontSize: "sm", | ||
h: "9", | ||
minW: "9", | ||
px: "2.5", | ||
}, | ||
content: { | ||
pt: "3", | ||
}, | ||
}, | ||
}, | ||
{ | ||
size: "md", | ||
variant: "line", | ||
css: { | ||
trigger: { | ||
fontSize: "md", | ||
h: "10", | ||
minW: "10", | ||
px: "3", | ||
}, | ||
content: { | ||
pt: "4", | ||
}, | ||
}, | ||
}, | ||
{ | ||
size: "lg", | ||
variant: "line", | ||
css: { | ||
trigger: { | ||
px: "3.5", | ||
h: "11", | ||
minW: "11", | ||
fontSize: "md", | ||
}, | ||
content: { | ||
pt: "5", | ||
}, | ||
}, | ||
}, | ||
], | ||
}); |
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.
112cd68
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.
Successfully deployed to the following URLs:
storyden-homepage – ./home
www.storyden.org
storyden-homepage.vercel.app
storyden-homepage-git-main-southclaws.vercel.app
storyden.org
storyden-homepage-southclaws.vercel.app
112cd68
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.
Successfully deployed to the following URLs:
storyden – ./web
storyden.vercel.app
storyden-git-main-southclaws.vercel.app
storyden-southclaws.vercel.app
www.makeroom.club
demo.storyden.org
makeroom.club