chore: replace prettier with oxfmt (#8676)
This commit is contained in:
parent
9ee73d57ef
commit
41abaffc6e
1008 changed files with 4046 additions and 4027 deletions
|
|
@ -58,7 +58,7 @@ export const Basic: Story = {
|
|||
{tabOptions.map((option) => (
|
||||
<Tabs.Content key={option.value} value={option.value} className="p-4">
|
||||
<div className="text-13">
|
||||
<h3 className="font-medium mb-2">{option.label}</h3>
|
||||
<h3 className="mb-2 font-medium">{option.label}</h3>
|
||||
<p className="text-tertiary">Content for the {option.label.toLowerCase()} tab.</p>
|
||||
</div>
|
||||
</Tabs.Content>
|
||||
|
|
@ -78,7 +78,7 @@ export const Sizes: Story = {
|
|||
lg: "Large",
|
||||
};
|
||||
return (
|
||||
<div className="w-[400px] grid gap-4">
|
||||
<div className="grid w-[400px] gap-4">
|
||||
{sizes.map((size) => (
|
||||
<div key={size} className="flex flex-col gap-2">
|
||||
<div className="text-13 font-medium">{sizeLabels[size]}</div>
|
||||
|
|
@ -171,7 +171,7 @@ export const WithIcons: Story = {
|
|||
<Tabs.List>
|
||||
{tabsWithIcons.map((tab) => (
|
||||
<Tabs.Trigger key={tab.value} value={tab.value}>
|
||||
<tab.icon className="w-4 h-4 mr-2" />
|
||||
<tab.icon className="mr-2 h-4 w-4" />
|
||||
{tab.label}
|
||||
</Tabs.Trigger>
|
||||
))}
|
||||
|
|
@ -203,7 +203,7 @@ export const IconsOnly: Story = {
|
|||
<Tabs.List>
|
||||
{iconTabs.map((tab) => (
|
||||
<Tabs.Trigger key={tab.value} value={tab.value}>
|
||||
<tab.icon className="w-4 h-4" />
|
||||
<tab.icon className="h-4 w-4" />
|
||||
</Tabs.Trigger>
|
||||
))}
|
||||
<Tabs.Indicator />
|
||||
|
|
@ -243,7 +243,7 @@ export const DynamicTabs: Story = {
|
|||
return (
|
||||
<div className="w-[500px]">
|
||||
<div className="mb-4">
|
||||
<button onClick={addTab} className="px-3 py-1.5 text-13 bg-layer-1 rounded-sm hover:bg-surface-2">
|
||||
<button onClick={addTab} className="rounded-sm bg-layer-1 px-3 py-1.5 text-13 hover:bg-surface-2">
|
||||
Add Tab
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -323,11 +323,11 @@ export const WithComplexContent: Story = {
|
|||
<div className="space-y-4">
|
||||
<div>
|
||||
<label className="text-13 font-medium">Username</label>
|
||||
<input type="text" className="mt-1 w-full px-3 py-2 bg-layer-1 rounded-sm" />
|
||||
<input type="text" className="mt-1 w-full rounded-sm bg-layer-1 px-3 py-2" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-13 font-medium">Email</label>
|
||||
<input type="email" className="mt-1 w-full px-3 py-2 bg-layer-1 rounded-sm" />
|
||||
<input type="email" className="mt-1 w-full rounded-sm bg-layer-1 px-3 py-2" />
|
||||
</div>
|
||||
</div>
|
||||
</Tabs.Content>
|
||||
|
|
@ -335,11 +335,11 @@ export const WithComplexContent: Story = {
|
|||
<div className="space-y-4">
|
||||
<div>
|
||||
<label className="text-13 font-medium">Current Password</label>
|
||||
<input type="password" className="mt-1 w-full px-3 py-2 bg-layer-1 rounded-sm" />
|
||||
<input type="password" className="mt-1 w-full rounded-sm bg-layer-1 px-3 py-2" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-13 font-medium">New Password</label>
|
||||
<input type="password" className="mt-1 w-full px-3 py-2 bg-layer-1 rounded-sm" />
|
||||
<input type="password" className="mt-1 w-full rounded-sm bg-layer-1 px-3 py-2" />
|
||||
</div>
|
||||
</div>
|
||||
</Tabs.Content>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const TabsRoot = React.forwardRef(function TabsRoot(
|
|||
<TabsContext.Provider value={{ variant }}>
|
||||
<TabsPrimitive.Root
|
||||
data-slot="tabs"
|
||||
className={cn("flex flex-col w-full h-full", className)}
|
||||
className={cn("flex h-full w-full flex-col", className)}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
|
|
@ -68,7 +68,7 @@ const TabsList = React.forwardRef(function TabsList(
|
|||
<TabsPrimitive.List
|
||||
data-slot="tabs-list"
|
||||
className={cn(
|
||||
"flex w-full items-center justify-between gap-1.5 rounded-lg text-13 p-0.5 relative overflow-auto",
|
||||
"relative flex w-full items-center justify-between gap-1.5 overflow-auto rounded-lg p-0.5 text-13",
|
||||
{
|
||||
"bg-layer-3": background === "contained",
|
||||
},
|
||||
|
|
@ -92,10 +92,10 @@ const TabsTrigger = React.forwardRef(function TabsTrigger(
|
|||
<TabsPrimitive.Tab
|
||||
data-slot="tabs-trigger"
|
||||
className={cn(
|
||||
"flex items-center justify-center p-1 min-w-fit w-full font-medium text-primary outline-none focus:outline-none cursor-pointer transition-all duration-200 ease-in-out rounded-md border border-transparent",
|
||||
" data-[selected]:text-primary data-[selected]:shadow-sm data-[selected]:bg-layer-2 data-[selected]:border data-[selected]:border-subtle-1 data-[selected]:raised-200",
|
||||
"text-placeholder hover:text-tertiary hover:bg-layer-transparent-hover",
|
||||
"disabled:text-placeholder disabled:cursor-not-allowed",
|
||||
"flex w-full min-w-fit cursor-pointer items-center justify-center rounded-md border border-transparent p-1 font-medium text-primary transition-all duration-200 ease-in-out outline-none focus:outline-none",
|
||||
"data-[selected]:shadow-sm data-[selected]:raised-200 data-[selected]:border data-[selected]:border-subtle-1 data-[selected]:bg-layer-2 data-[selected]:text-primary",
|
||||
"text-placeholder hover:bg-layer-transparent-hover hover:text-tertiary",
|
||||
"disabled:cursor-not-allowed disabled:text-placeholder",
|
||||
{
|
||||
"text-11": size === "sm",
|
||||
"text-13": size === "md",
|
||||
|
|
@ -129,7 +129,7 @@ const TabsIndicator = React.forwardRef(function TabsIndicator(
|
|||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"absolute left-0 top-[50%] z-[-1] h-6 w-[var(--active-tab-width)] translate-x-[var(--active-tab-left)] -translate-y-[50%] rounded-xs bg-surface-1 shadow-sm transition-[width,transform] duration-200 ease-in-out",
|
||||
"shadow-sm absolute top-[50%] left-0 z-[-1] h-6 w-[var(--active-tab-width)] translate-x-[var(--active-tab-left)] -translate-y-[50%] rounded-xs bg-surface-1 transition-[width,transform] duration-200 ease-in-out",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue