-
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.
- Loading branch information
1 parent
cef8cfc
commit a858e36
Showing
8 changed files
with
427 additions
and
14 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
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 { tw } from '@spark-ui/internal-utils' | ||
|
||
export const dashedVariants = [ | ||
{ | ||
intent: 'primary', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-primary/dim-5', | ||
'enabled:active:bg-primary/dim-5', | ||
'focus-visible:bg-primary/dim-5', | ||
'text-primary', | ||
]), | ||
}, | ||
{ | ||
intent: 'secondary', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-secondary/dim-5', | ||
'enabled:active:bg-secondary/dim-5', | ||
'focus-visible:bg-secondary/dim-5', | ||
'text-secondary', | ||
]), | ||
}, | ||
{ | ||
intent: 'success', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-success/dim-5', | ||
'enabled:active:bg-success/dim-5', | ||
'focus-visible:bg-success/dim-5', | ||
'text-success', | ||
]), | ||
}, | ||
{ | ||
intent: 'alert', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-alert/dim-5', | ||
'enabled:active:bg-alert/dim-5', | ||
'focus-visible:bg-alert/dim-5', | ||
'text-alert', | ||
]), | ||
}, | ||
{ | ||
intent: 'danger', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-error/dim-5', | ||
'enabled:active:bg-error/dim-5', | ||
'focus-visible:bg-error/dim-5', | ||
'text-error', | ||
]), | ||
}, | ||
{ | ||
intent: 'info', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-info/dim-5', | ||
'enabled:active:bg-info/dim-5', | ||
'focus-visible:bg-info/dim-5', | ||
'text-info', | ||
]), | ||
}, | ||
{ | ||
intent: 'neutral', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-neutral/dim-5', | ||
'enabled:active:bg-neutral/dim-5', | ||
'focus-visible:bg-neutral/dim-5', | ||
'text-neutral', | ||
]), | ||
}, | ||
{ | ||
intent: 'surface', | ||
design: 'dashed', | ||
class: tw([ | ||
'enabled:hover:bg-surface/dim-5', | ||
'enabled:active:bg-surface/dim-5', | ||
'focus-visible:bg-surface/dim-5', | ||
'text-surface', | ||
]), | ||
}, | ||
] as const |
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,96 @@ | ||
import { tw } from '@spark-ui/internal-utils' | ||
|
||
export const filledVariants = [ | ||
// Primary | ||
{ | ||
intent: 'primary', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-primary', | ||
'text-on-primary', | ||
'enabled:hover:bg-primary-hovered', | ||
'enabled:active:bg-primary-pressed', | ||
'focus-visible:bg-primary-focused', | ||
]), | ||
}, | ||
// Secondary | ||
{ | ||
intent: 'secondary', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-secondary', | ||
'text-on-secondary', | ||
'enabled:hover:bg-secondary-hovered', | ||
'enabled:active:bg-secondary-pressed', | ||
'focus-visible:bg-secondary-focused', | ||
]), | ||
}, | ||
// Success | ||
{ | ||
intent: 'success', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-success', | ||
'text-on-success', | ||
'enabled:hover:bg-success-hovered', | ||
'enabled:active:bg-success-pressed', | ||
'focus-visible:bg-success-focused', | ||
]), | ||
}, | ||
// Alert | ||
{ | ||
intent: 'alert', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-alert', | ||
'text-on-alert', | ||
'enabled:hover:bg-alert-hovered', | ||
'enabled:active:bg-alert-pressed', | ||
'focus-visible:bg-alert-focused', | ||
]), | ||
}, | ||
// Danger | ||
{ | ||
intent: 'danger', | ||
design: 'filled', | ||
class: tw([ | ||
'text-on-error bg-error', | ||
'enabled:hover:bg-error-hovered enabled:active:bg-error-pressed', | ||
'focus-visible:bg-error-focused', | ||
]), | ||
}, | ||
// Info | ||
{ | ||
intent: 'info', | ||
design: 'filled', | ||
class: tw([ | ||
'text-on-error bg-info', | ||
'enabled:hover:bg-info-hovered enabled:active:bg-info-pressed', | ||
'focus-visible:bg-info-focused', | ||
]), | ||
}, | ||
// Neutral | ||
{ | ||
intent: 'neutral', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-neutral', | ||
'text-on-neutral', | ||
'enabled:hover:bg-neutral-hovered', | ||
'enabled:active:bg-neutral-pressed', | ||
'focus-visible:bg-neutral-focused', | ||
]), | ||
}, | ||
// Surface | ||
{ | ||
intent: 'surface', | ||
design: 'filled', | ||
class: tw([ | ||
'bg-surface', | ||
'text-on-surface', | ||
'enabled:hover:bg-surface-hovered', | ||
'enabled:active:bg-surface-pressed', | ||
'focus-visible:bg-surface-focused', | ||
]), | ||
}, | ||
] as const |
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,4 @@ | ||
export { filledVariants } from './filled' | ||
export { outlinedVariants } from './outlined' | ||
export { tintedVariants } from './tinted' | ||
export { dashedVariants } from './dashed' |
Oops, something went wrong.