-
Notifications
You must be signed in to change notification settings - Fork 0
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
a287d95
commit f109341
Showing
3 changed files
with
262 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
:host { | ||
--icon-color: var(--color-semantic-text-button-outline-default); | ||
--padding-inline: 16px; | ||
|
||
display: inline-block; | ||
min-width: 0; | ||
max-width: 100%; | ||
} | ||
|
||
.base { | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
column-gap: 4px; | ||
color: var(--color-semantic-text-button-outline-default); | ||
border-radius: 5px; | ||
border: 1px solid transparent; | ||
background-color: transparent; | ||
min-height: 28px; | ||
max-width: calc(100% - var(--padding-inline)*2); | ||
padding-inline: var(--padding-inline); | ||
position: relative; | ||
overflow: hidden; | ||
cursor: pointer; | ||
} | ||
|
||
.base__text { | ||
min-width: 0; | ||
font-size: 10px; | ||
font-weight: bold; | ||
line-height: 1; | ||
overflow-wrap : break-word; | ||
} | ||
|
||
.type__default.appearance__outline { | ||
border-color: var(--color-semantic-border-button-outline-default); | ||
} | ||
|
||
.type__default.appearance__outline:hover:not(:disabled) { | ||
--icon-color: var(--color-semantic-text-button-outline-hover); | ||
|
||
border-color: var(--color-semantic-border-button-outline-hover); | ||
color: var(--color-semantic-text-button-outline-hover); | ||
} | ||
|
||
.type__default.appearance__outline:focus-visible:not(:is(:disabled, .isSelected)) { | ||
--icon-color: var(--color-semantic-text-button-outline-focus); | ||
|
||
border-color: var(--color-semantic-border-button-outline-focus); | ||
color: var(--color-semantic-text-button-outline-focus); | ||
} | ||
|
||
.type__default.appearance__fill { | ||
--icon-color: var(--color-semantic-text-button-fill-default); | ||
|
||
border-color: var(--color-semantic-border-button-fill-default); | ||
background-color: var(--color-semantic-surface-button-fill-default); | ||
color: var(--color-semantic-text-button-fill-default); | ||
} | ||
|
||
.type__default.appearance__fill:hover:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-fill-hover); | ||
background-color: var(--color-semantic-surface-button-fill-hover); | ||
} | ||
|
||
.type__default.appearance__fill:focus-visible:not(:is(:disabled, .isSelected)) { | ||
border-color: var(--color-semantic-border-button-fill-focus); | ||
background-color: var(--color-semantic-surface-button-fill-focus); | ||
} | ||
|
||
.type__default.appearance__text { | ||
border-color: var(--color-semantic-border-button-text-default); | ||
background-color: var(--color-semantic-surface-button-text-default); | ||
} | ||
|
||
.type__default.appearance__text:hover:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-text-hover); | ||
background-color: var(--color-semantic-surface-button-text-hover); | ||
} | ||
|
||
.type__default.appearance__text:focus-visible:not(:is(:disabled, .isSelected)) { | ||
border-color: var(--color-semantic-border-button-text-focus); | ||
background-color: var(--color-semantic-surface-button-text-focus); | ||
} | ||
|
||
.type__default.isSelected { | ||
--icon-color: var(--color-semantic-text-button-selected); | ||
|
||
border-color: var(--color-semantic-border-button-selected); | ||
background-color: var(--color-semantic-surface-button-selected); | ||
color: var(--color-semantic-text-button-selected); | ||
} | ||
|
||
.type__default.isSelected:hover:not(:disabled) { | ||
--icon-color: var(--color-semantic-text-button-selected); | ||
|
||
border-color: var(--color-semantic-border-button-selected-hover); | ||
background-color: var(--color-semantic-surface-button-selected-hover); | ||
color: var(--color-semantic-text-button-selected); | ||
} | ||
|
||
.type__destructive.appearance__outline { | ||
--icon-color: var(--color-semantic-text-button-outline-destructive-default); | ||
|
||
border-color: var(--color-semantic-border-button-outline-destructive-default); | ||
color: var(--color-semantic-text-button-outline-destructive-default); | ||
} | ||
|
||
.type__destructive.appearance__outline:hover:not(:disabled) { | ||
--icon-color: var(--color-semantic-text-button-outline-destructive-hover); | ||
|
||
border-color: var(--color-semantic-border-button-outline-destructive-hover); | ||
color: var(--color-semantic-text-button-outline-destructive-hover); | ||
} | ||
|
||
.type__destructive.appearance__outline:focus-visible:not(:disabled) { | ||
--icon-color: var(--color-semantic-text-button-outline-destructive-focus); | ||
|
||
border-color: var(--color-semantic-border-button-outline-destructive-focus); | ||
color: var(--color-semantic-text-button-outline-destructive-focus); | ||
} | ||
|
||
.type__destructive.appearance__fill { | ||
--icon-color: var(--color-semantic-text-button-fill-destructive-default); | ||
|
||
border-color: var(--color-semantic-border-button-fill-destructive-default); | ||
background-color: var( | ||
--color-semantic-surface-button-fill-destructive-default | ||
); | ||
color: var(--color-semantic-text-button-fill-destructive-default); | ||
} | ||
|
||
.type__destructive.appearance__fill:hover:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-fill-destructive-hover); | ||
background-color: var(--color-semantic-surface-button-fill-destructive-hover); | ||
} | ||
|
||
.type__destructive.appearance__fill:focus-visible:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-fill-destructive-focus); | ||
background-color: var(--color-semantic-surface-button-fill-destructive-focus); | ||
} | ||
|
||
.type__destructive.appearance__text { | ||
--icon-color: var(--color-semantic-text-button-text-destructive-default); | ||
|
||
border-color: transparent; | ||
background-color: transparent; | ||
color: var(--color-semantic-text-button-text-destructive-default); | ||
} | ||
|
||
.type__destructive.appearance__text:hover:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-text-destructive-hover); | ||
background-color: var(--color-semantic-surface-button-text-destructive-hover); | ||
} | ||
|
||
.type__destructive.appearance__text:focus-visible:not(:disabled) { | ||
border-color: var(--color-semantic-border-button-text-destructive-focus); | ||
background-color: var(--color-semantic-surface-button-text-destructive-focus); | ||
} | ||
|
||
/* disabledとisLoadingにおいては、上記の詳細度と同等とするために:isを不可している */ | ||
:is(.type__default, .type__destructive):disabled { | ||
--icon-color: var(--color-semantic-text-button-disabled); | ||
|
||
border-color: var(--color-semantic-border-button-disabled); | ||
background-color: var(--color-semantic-surface-button-disabled); | ||
color: var(--color-semantic-text-button-disabled); | ||
cursor: not-allowed; | ||
} | ||
|
||
:is(.type__default, .type__destructive).isLoading { | ||
border-color: var(--color-semantic-border-button-loading); | ||
background-color: var(--color-semantic-surface-button-loading); | ||
} | ||
|
||
:is(.type__default, .type__destructive).isLoading::before { | ||
content: ""; | ||
display: block; | ||
background: transparent url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAALEsAACxLAaU9lqkAAAMAUExURUdwTP///8jIyLi4uLGxsUdHR9LS0vHx8by8vKSkpNnZ2b6+vpSUlLe3t+Dg4N/f37Ozs/X19W5ubvj4+CMjI8/Pz+/v78bGxqampp+fnzIyMufn59HR0a+vr+Xl5dbW1tbW1sHBwezs7MLCwvDw8JCQkJubm6mpqZiYmO7u7rW1tdvb29/f32VlZfb29szMzPDw8Ovr65OTk/Dw8KGhoZ2dnYeHh/Ly8tfX19TU1Nzc3Pr6+qmpqcrKysnJyYqKioyMjIODg5KSkpeXl1tbW+bm5uvr66ysrL+/v46Ojvz8/CMjI8TExMjIyIODg4GBgYaGhisrK4+Pj6CgoDw8PM/Pz6enp+Li4hsbG0xMTK2trYmJiYSEhICAgI6OjoiIiJqamq+vrykpKa2trVRUVNPT04ODg2FhYcPDwxkZGVpaWlhYWCkpKTExMSYmJp2dnY2NjSUlJSMjIzs7O0xMTJubm3l5eb+/v6urqyMjI0RERCgoKKenp3Jycqmpqa6urnh4eG1tbUxMTHFxcWhoaMzMzEBAQEBAQLe3t1ZWVpiYmEpKSqqqqm1tbXR0dJWVlWVlZSEhIWFhYSMjI5iYmJCQkKysrIuLi4CAgGtrazk5OWtra3x8fHl5eVBQUFFRURwcHLm5uYWFhS8vL2ZmZlVVVVFRUaampszMzDg4OHd3dzU1NUZGRtfX13V1dYqKisnJyXh4eLm5uXJyckVFRZeXl3Jycp+fnzs7OzIyMh4eHkhISERERIODg8TExCkpKTY2NoqKioyMjJ2dnYiIiIWFhWNjY09baWKUV+SEe0xGWUVXdUpKSkR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ading; | ||
transform-origin: center center; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 2; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
border-radius: 5px; | ||
} | ||
|
||
@keyframes loading { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
:is(.type__default, .type__destructive).isLoading:hover { | ||
cursor: not-allowed; | ||
border-color: var(--color-semantic-border-button-loading); | ||
} | ||
|
||
:is(.type__default, .type__destructive).isLoading .base__text { | ||
visibility: hidden; | ||
} | ||
|
||
:is(.type__default, .type__destructive).isLoading .base__icon { | ||
visibility: hidden; | ||
} | ||
|
||
.type__default.size__large { | ||
--padding-inline: 24px; | ||
|
||
column-gap: 8px; | ||
min-height: 32px; | ||
font-size: 12px; | ||
} | ||
|
||
.type__default.size__xLarge { | ||
--padding-inline: 40px; | ||
|
||
column-gap: 8px; | ||
min-height: 40px; | ||
font-size: 12px; | ||
} | ||
|
||
.size__width80 { | ||
--padding-inline: 4px; | ||
|
||
width: 80px; | ||
} | ||
|
||
.size__width160 { | ||
--padding-inline: 4px; | ||
|
||
width: 160px; | ||
} |
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