-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(progress-tracker): add orientation prop
- Loading branch information
Showing
10 changed files
with
192 additions
and
42 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
13 changes: 13 additions & 0 deletions
13
packages/components/progress-tracker/src/ProgressTracker.styles.ts
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,13 @@ | ||
import { cva } from 'class-variance-authority' | ||
|
||
export const progressListVariant = cva(['flex flex-nowrap'], { | ||
variants: { | ||
orientation: { | ||
horizontal: 'flex-row w-full', | ||
vertical: 'flex-col', | ||
}, | ||
}, | ||
defaultVariants: { | ||
orientation: 'horizontal', | ||
}, | ||
}) |
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
21 changes: 21 additions & 0 deletions
21
packages/components/progress-tracker/src/variants/disabled.ts
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,21 @@ | ||
export const disabledItemVariants = { | ||
disabled: { | ||
true: 'before:opacity-dim-3 after:opacity-dim-3', | ||
false: '', | ||
}, | ||
disabledBefore: { | ||
true: 'before:opacity-dim-3', | ||
false: '', | ||
}, | ||
disabledAfter: { | ||
true: 'after:opacity-dim-3', | ||
false: '', | ||
}, | ||
} | ||
|
||
export const disabledButtonVariants = { | ||
disabled: { | ||
true: 'before:opacity-dim-3', | ||
false: '', | ||
}, | ||
} |
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,2 @@ | ||
export * from './size' | ||
export * from './disabled' |
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,34 @@ | ||
export const sizeItemVariants = [ | ||
{ | ||
size: 'sm', | ||
orientation: ['horizontal', 'vertical'], | ||
class: [ | ||
'before:top-[8px] after:top-[8px]', | ||
'before:right-[calc(50%+12px)] after:left-[calc(50%+12px)]', | ||
], | ||
}, | ||
{ | ||
size: 'md', | ||
orientation: ['horizontal', 'vertical'], | ||
class: [ | ||
'before:top-[12px] after:top-[12px]', | ||
'before:right-[calc(50%+16px)] after:left-[calc(50%+16px)]', | ||
], | ||
}, | ||
{ | ||
size: 'lg', | ||
orientation: ['horizontal', 'vertical'], | ||
class: [ | ||
'before:top-[16px] after:top-[16px]', | ||
'before:right-[calc(50%+20px)] after:left-[calc(50%+20px)]', | ||
], | ||
}, | ||
] as const | ||
|
||
export const sizeButtonVariants = { | ||
size: { | ||
sm: ['before:w-sz-16 before:h-sz-16', 'before:!content-["_"]'], | ||
md: 'before:w-sz-24 before:h-sz-24', | ||
lg: 'before:w-sz-32 before:h-sz-32', | ||
}, | ||
} |