-
Notifications
You must be signed in to change notification settings - Fork 79
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
25eec3c
commit 05c62d4
Showing
3 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.p-selectbutton { | ||
@apply inline-flex select-none rounded-md | ||
} | ||
|
||
.p-selectbutton .p-togglebutton { | ||
@apply rounded-none border-y border-r border-l-0 | ||
} | ||
|
||
.p-selectbutton .p-togglebutton:focus-visible { | ||
@apply relative z-10 | ||
} | ||
|
||
.p-selectbutton .p-togglebutton:first-child { | ||
@apply border-l rounded-l-md | ||
} | ||
|
||
.p-selectbutton .p-togglebutton:last-child { | ||
@apply rounded-r-md | ||
} | ||
|
||
.p-selectbutton.p-invalid { | ||
@apply outline outline-offset-0 outline-red-400 dark:outline-red-300 | ||
} |
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,55 @@ | ||
.p-togglebutton { | ||
@apply inline-flex items-center justify-center overflow-hidden relative cursor-pointer select-none | ||
border border-surface-100 dark:border-surface-950 rounded-md | ||
bg-surface-100 dark:bg-surface-950 | ||
text-surface-500 dark:text-surface-400 text-base font-medium | ||
px-4 py-2 | ||
focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-primary | ||
disabled:opacity-100 disabled:cursor-default | ||
disabled:bg-surface-200 disabled:border-surface-200 disabled:text-surface-500 | ||
disabled:dark:bg-surface-700 disabled:dark:border-surface-700 disabled:dark:text-surface-400 | ||
transition-colors duration-300 | ||
before:bg-transparent before:absolute before:left-1 before:top-1 before:rounded-md before:w-[calc(100%-0.5rem)] before:h-[calc(100%-0.5rem)] | ||
before:transition-colors before:duration-200 | ||
} | ||
|
||
.p-togglebutton-content { | ||
@apply relative inline-flex items-center justify-center gap-2 | ||
} | ||
|
||
.p-togglebutton-label, | ||
.p-togglebutton-icon { | ||
@apply relative transition-none | ||
} | ||
|
||
.p-togglebutton.p-togglebutton-checked::before { | ||
@apply bg-surface-0 dark:bg-surface-800 shadow-[0px_1px_2px_0px_rgba(0,0,0,0.02),0px_1px_2px_0px_rgba(0,0,0,0.04)] | ||
} | ||
|
||
.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover { | ||
@apply bg-surface-100 dark:bg-surface-950 text-surface-700 dark:text-surface-300 | ||
} | ||
|
||
.p-togglebutton.p-togglebutton-checked { | ||
@apply bg-surface-100 dark:bg-surface-950 border-surface-100 dark:border-surface-950 text-surface-900 dark:text-surface-0 | ||
} | ||
|
||
.p-togglebutton.p-invalid { | ||
@apply border-red-400 dark:border-red-300 | ||
} | ||
|
||
.p-togglebutton-icon { | ||
@apply text-surface-500 dark:text-surface-400 | ||
} | ||
|
||
.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover .p-togglebutton-icon { | ||
@apply text-surface-700 dark:text-surface-300 | ||
} | ||
|
||
.p-togglebutton.p-togglebutton-checked .p-togglebutton-icon { | ||
@apply text-surface-900 dark:text-surface-0 | ||
} | ||
|
||
.p-togglebutton:disabled .p-togglebutton-icon { | ||
@apply text-surface-500 dark:text-surface-400 | ||
} |