@carbon/styles 1.113.0-rc.0 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/styles.css +390 -0
- package/css/styles.min.css +1 -1
- package/package.json +9 -9
- package/scss/components/__tests__/button-test.js +1 -0
- package/scss/components/_index.scss +1 -0
- package/scss/components/button/_button.scss +3 -3
- package/scss/components/button/_vars.scss +10 -0
- package/scss/components/card/_card.scss +449 -0
- package/scss/components/card/_index.scss +11 -0
package/css/styles.css
CHANGED
|
@@ -7938,6 +7938,396 @@ a.cds--overflow-menu-options__btn::before {
|
|
|
7938
7938
|
block-size: 1.25rem;
|
|
7939
7939
|
}
|
|
7940
7940
|
|
|
7941
|
+
.cds--card {
|
|
7942
|
+
position: relative;
|
|
7943
|
+
border: 1px solid var(--cds-border-subtle-01, #c6c6c6);
|
|
7944
|
+
background-color: var(--cds-layer-01, #f4f4f4);
|
|
7945
|
+
color: var(--cds-text-primary, #161616);
|
|
7946
|
+
}
|
|
7947
|
+
|
|
7948
|
+
.cds--card--clickable {
|
|
7949
|
+
cursor: pointer;
|
|
7950
|
+
transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);
|
|
7951
|
+
}
|
|
7952
|
+
.cds--card--clickable:hover {
|
|
7953
|
+
background-color: var(--cds-layer-hover-01, #e8e8e8);
|
|
7954
|
+
}
|
|
7955
|
+
.cds--card--clickable:focus {
|
|
7956
|
+
outline: 2px solid var(--cds-focus, #0f62fe);
|
|
7957
|
+
outline-offset: -2px;
|
|
7958
|
+
}
|
|
7959
|
+
@media screen and (prefers-contrast) {
|
|
7960
|
+
.cds--card--clickable:focus {
|
|
7961
|
+
outline-style: dotted;
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7964
|
+
.cds--card--clickable:active {
|
|
7965
|
+
background-color: var(--cds-layer-active-01, #c6c6c6);
|
|
7966
|
+
}
|
|
7967
|
+
|
|
7968
|
+
.cds--card--disabled {
|
|
7969
|
+
border-color: var(--cds-border-disabled, #c6c6c6);
|
|
7970
|
+
background-color: var(--cds-layer-01, #f4f4f4);
|
|
7971
|
+
color: var(--cds-text-disabled, rgba(22, 22, 22, 0.25));
|
|
7972
|
+
cursor: not-allowed;
|
|
7973
|
+
pointer-events: none;
|
|
7974
|
+
}
|
|
7975
|
+
|
|
7976
|
+
.cds--card__header {
|
|
7977
|
+
position: relative;
|
|
7978
|
+
display: grid;
|
|
7979
|
+
-moz-column-gap: 1rem;
|
|
7980
|
+
column-gap: 1rem;
|
|
7981
|
+
grid-template-columns: auto 1fr;
|
|
7982
|
+
row-gap: 0;
|
|
7983
|
+
}
|
|
7984
|
+
|
|
7985
|
+
.cds--card__body {
|
|
7986
|
+
font-size: var(--cds-body-compact-01-font-size, 0.875rem);
|
|
7987
|
+
font-weight: var(--cds-body-compact-01-font-weight, 400);
|
|
7988
|
+
line-height: var(--cds-body-compact-01-line-height, 1.28572);
|
|
7989
|
+
letter-spacing: var(--cds-body-compact-01-letter-spacing, 0.16px);
|
|
7990
|
+
margin-block: 1rem;
|
|
7991
|
+
margin-block-start: 0;
|
|
7992
|
+
margin-inline: 1rem;
|
|
7993
|
+
}
|
|
7994
|
+
|
|
7995
|
+
.cds--card > .cds--card__body:first-child {
|
|
7996
|
+
margin-block-start: 1rem;
|
|
7997
|
+
}
|
|
7998
|
+
|
|
7999
|
+
.cds--card__footer {
|
|
8000
|
+
display: flex;
|
|
8001
|
+
align-items: center;
|
|
8002
|
+
padding: 1rem;
|
|
8003
|
+
}
|
|
8004
|
+
|
|
8005
|
+
.cds--card__footer:has(> .cds--card__action) {
|
|
8006
|
+
overflow: hidden;
|
|
8007
|
+
padding: 0;
|
|
8008
|
+
border-block-start: 1px solid var(--cds-border-subtle);
|
|
8009
|
+
gap: 1px;
|
|
8010
|
+
}
|
|
8011
|
+
|
|
8012
|
+
.cds--card__footer > .cds--card__action:not(:has(.cds--btn--icon-only)) {
|
|
8013
|
+
flex: 1 0;
|
|
8014
|
+
min-inline-size: 0;
|
|
8015
|
+
}
|
|
8016
|
+
.cds--card__footer > .cds--card__action:not(:has(.cds--btn--icon-only)) > .cds--btn,
|
|
8017
|
+
.cds--card__footer > .cds--card__action:not(:has(.cds--btn--icon-only)) > * > .cds--btn {
|
|
8018
|
+
inline-size: 100%;
|
|
8019
|
+
max-inline-size: none;
|
|
8020
|
+
}
|
|
8021
|
+
|
|
8022
|
+
.cds--card__footer > .cds--card__action:has(.cds--btn--icon-only) {
|
|
8023
|
+
flex: 0 0 auto;
|
|
8024
|
+
margin-inline-start: auto;
|
|
8025
|
+
}
|
|
8026
|
+
|
|
8027
|
+
.cds--card__footer > .cds--card__action:has(.cds--btn--icon-only) + .cds--card__action:has(.cds--btn--icon-only) {
|
|
8028
|
+
margin-inline-start: 0;
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
.cds--card__action {
|
|
8032
|
+
display: inline-flex;
|
|
8033
|
+
}
|
|
8034
|
+
|
|
8035
|
+
.cds--card__header-media {
|
|
8036
|
+
display: flex;
|
|
8037
|
+
align-items: flex-start;
|
|
8038
|
+
justify-content: flex-start;
|
|
8039
|
+
grid-column: 1/-1;
|
|
8040
|
+
margin-block: 1rem;
|
|
8041
|
+
margin-inline: 1rem;
|
|
8042
|
+
max-block-size: 4rem;
|
|
8043
|
+
}
|
|
8044
|
+
|
|
8045
|
+
.cds--card__media {
|
|
8046
|
+
grid-column: 1/-1;
|
|
8047
|
+
inline-size: 100%;
|
|
8048
|
+
}
|
|
8049
|
+
.cds--card__media::before, .cds--card__media::after {
|
|
8050
|
+
display: none;
|
|
8051
|
+
}
|
|
8052
|
+
|
|
8053
|
+
.cds--card__media.cds--aspect-ratio--16x9 {
|
|
8054
|
+
aspect-ratio: 16/9;
|
|
8055
|
+
}
|
|
8056
|
+
|
|
8057
|
+
.cds--card__media.cds--aspect-ratio--9x16 {
|
|
8058
|
+
aspect-ratio: 9/16;
|
|
8059
|
+
}
|
|
8060
|
+
|
|
8061
|
+
.cds--card__media.cds--aspect-ratio--2x1 {
|
|
8062
|
+
aspect-ratio: 2/1;
|
|
8063
|
+
}
|
|
8064
|
+
|
|
8065
|
+
.cds--card__media.cds--aspect-ratio--1x2 {
|
|
8066
|
+
aspect-ratio: 1/2;
|
|
8067
|
+
}
|
|
8068
|
+
|
|
8069
|
+
.cds--card__media.cds--aspect-ratio--4x3 {
|
|
8070
|
+
aspect-ratio: 4/3;
|
|
8071
|
+
}
|
|
8072
|
+
|
|
8073
|
+
.cds--card__media.cds--aspect-ratio--3x4 {
|
|
8074
|
+
aspect-ratio: 3/4;
|
|
8075
|
+
}
|
|
8076
|
+
|
|
8077
|
+
.cds--card__media.cds--aspect-ratio--3x2 {
|
|
8078
|
+
aspect-ratio: 3/2;
|
|
8079
|
+
}
|
|
8080
|
+
|
|
8081
|
+
.cds--card__media.cds--aspect-ratio--2x3 {
|
|
8082
|
+
aspect-ratio: 2/3;
|
|
8083
|
+
}
|
|
8084
|
+
|
|
8085
|
+
.cds--card__media.cds--aspect-ratio--1x1 {
|
|
8086
|
+
aspect-ratio: 1/1;
|
|
8087
|
+
}
|
|
8088
|
+
|
|
8089
|
+
.cds--card__media > * {
|
|
8090
|
+
position: static;
|
|
8091
|
+
block-size: 100%;
|
|
8092
|
+
inline-size: 100%;
|
|
8093
|
+
-o-object-fit: cover;
|
|
8094
|
+
object-fit: cover;
|
|
8095
|
+
}
|
|
8096
|
+
|
|
8097
|
+
.cds--card--horizontal {
|
|
8098
|
+
display: flex;
|
|
8099
|
+
flex-direction: row;
|
|
8100
|
+
align-items: stretch;
|
|
8101
|
+
}
|
|
8102
|
+
|
|
8103
|
+
.cds--card__media--horizontal {
|
|
8104
|
+
overflow: hidden;
|
|
8105
|
+
flex-basis: var(--cds--card--media-width, 33.33%);
|
|
8106
|
+
flex-shrink: 0;
|
|
8107
|
+
align-self: stretch;
|
|
8108
|
+
}
|
|
8109
|
+
|
|
8110
|
+
.cds--card--horizontal > .cds--card__content {
|
|
8111
|
+
display: flex;
|
|
8112
|
+
flex: 1 1;
|
|
8113
|
+
flex-direction: column;
|
|
8114
|
+
min-inline-size: 0;
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
.cds--card--horizontal > .cds--card__content > .cds--card__body {
|
|
8118
|
+
flex: 1 0 auto;
|
|
8119
|
+
}
|
|
8120
|
+
|
|
8121
|
+
.cds--card--horizontal > .cds--card__content > .cds--card__footer {
|
|
8122
|
+
margin-block-start: auto;
|
|
8123
|
+
}
|
|
8124
|
+
|
|
8125
|
+
.cds--card__title > .cds--card__label {
|
|
8126
|
+
font-size: var(--cds-label-01-font-size, 0.75rem);
|
|
8127
|
+
font-weight: var(--cds-label-01-font-weight, 400);
|
|
8128
|
+
line-height: var(--cds-label-01-line-height, 1.33333);
|
|
8129
|
+
letter-spacing: var(--cds-label-01-letter-spacing, 0.32px);
|
|
8130
|
+
color: var(--cds-text-secondary, #525252);
|
|
8131
|
+
}
|
|
8132
|
+
|
|
8133
|
+
.cds--card__label--truncate {
|
|
8134
|
+
overflow: hidden;
|
|
8135
|
+
text-overflow: ellipsis;
|
|
8136
|
+
white-space: nowrap;
|
|
8137
|
+
}
|
|
8138
|
+
|
|
8139
|
+
.cds--card__label--truncate-multi {
|
|
8140
|
+
display: -webkit-box;
|
|
8141
|
+
overflow: hidden;
|
|
8142
|
+
-webkit-box-orient: vertical;
|
|
8143
|
+
-webkit-line-clamp: var(--cds--card--label-line-clamp);
|
|
8144
|
+
text-overflow: ellipsis;
|
|
8145
|
+
}
|
|
8146
|
+
|
|
8147
|
+
.cds--card__title {
|
|
8148
|
+
display: flex;
|
|
8149
|
+
overflow: hidden;
|
|
8150
|
+
flex-direction: column;
|
|
8151
|
+
color: var(--cds-text-primary, #161616);
|
|
8152
|
+
gap: 0.125rem;
|
|
8153
|
+
margin-inline: 1rem;
|
|
8154
|
+
min-inline-size: 0;
|
|
8155
|
+
}
|
|
8156
|
+
|
|
8157
|
+
.cds--card__header > .cds--card__title {
|
|
8158
|
+
margin-block: 1rem;
|
|
8159
|
+
}
|
|
8160
|
+
|
|
8161
|
+
.cds--card--expressive .cds--card__title-text-row {
|
|
8162
|
+
font-size: var(--cds-heading-03-font-size, 1.25rem);
|
|
8163
|
+
font-weight: var(--cds-heading-03-font-weight, 400);
|
|
8164
|
+
line-height: var(--cds-heading-03-line-height, 1.4);
|
|
8165
|
+
letter-spacing: var(--cds-heading-03-letter-spacing, 0);
|
|
8166
|
+
}
|
|
8167
|
+
|
|
8168
|
+
.cds--card--productive .cds--card__title-text-row {
|
|
8169
|
+
font-size: var(--cds-heading-compact-02-font-size, 1rem);
|
|
8170
|
+
font-weight: var(--cds-heading-compact-02-font-weight, 600);
|
|
8171
|
+
line-height: var(--cds-heading-compact-02-line-height, 1.375);
|
|
8172
|
+
letter-spacing: var(--cds-heading-compact-02-letter-spacing, 0);
|
|
8173
|
+
}
|
|
8174
|
+
|
|
8175
|
+
.cds--card__title-text-row {
|
|
8176
|
+
display: block;
|
|
8177
|
+
}
|
|
8178
|
+
|
|
8179
|
+
.cds--card__title-text-row--truncate {
|
|
8180
|
+
overflow: hidden;
|
|
8181
|
+
max-inline-size: var(--cds--card--title-max-width, 100%);
|
|
8182
|
+
text-overflow: ellipsis;
|
|
8183
|
+
white-space: nowrap;
|
|
8184
|
+
}
|
|
8185
|
+
|
|
8186
|
+
.cds--card__title-text-row--truncate-multi {
|
|
8187
|
+
display: -webkit-box;
|
|
8188
|
+
overflow: hidden;
|
|
8189
|
+
-webkit-box-orient: vertical;
|
|
8190
|
+
-webkit-line-clamp: var(--cds--card--title-line-clamp);
|
|
8191
|
+
max-inline-size: var(--cds--card--title-max-width, 100%);
|
|
8192
|
+
text-overflow: ellipsis;
|
|
8193
|
+
}
|
|
8194
|
+
|
|
8195
|
+
.cds--card__title-text-row--with-start-icon {
|
|
8196
|
+
display: flex;
|
|
8197
|
+
align-items: flex-start;
|
|
8198
|
+
gap: 0.5rem;
|
|
8199
|
+
}
|
|
8200
|
+
|
|
8201
|
+
.cds--card__title-text-row--with-end-icon {
|
|
8202
|
+
display: block;
|
|
8203
|
+
}
|
|
8204
|
+
|
|
8205
|
+
.cds--card__title-start-icon {
|
|
8206
|
+
display: flex;
|
|
8207
|
+
flex-shrink: 0;
|
|
8208
|
+
margin-block-start: 0.125rem;
|
|
8209
|
+
}
|
|
8210
|
+
|
|
8211
|
+
.cds--card__title-end-icon {
|
|
8212
|
+
display: inline-flex;
|
|
8213
|
+
align-items: center;
|
|
8214
|
+
margin-inline-start: 0.5rem;
|
|
8215
|
+
vertical-align: middle;
|
|
8216
|
+
}
|
|
8217
|
+
|
|
8218
|
+
.cds--card__title > .cds--card__description {
|
|
8219
|
+
font-size: var(--cds-label-01-font-size, 0.75rem);
|
|
8220
|
+
font-weight: var(--cds-label-01-font-weight, 400);
|
|
8221
|
+
line-height: var(--cds-label-01-line-height, 1.33333);
|
|
8222
|
+
letter-spacing: var(--cds-label-01-letter-spacing, 0.32px);
|
|
8223
|
+
color: var(--cds-text-secondary, #525252);
|
|
8224
|
+
}
|
|
8225
|
+
|
|
8226
|
+
.cds--card__description--truncate {
|
|
8227
|
+
overflow: hidden;
|
|
8228
|
+
text-overflow: ellipsis;
|
|
8229
|
+
white-space: nowrap;
|
|
8230
|
+
}
|
|
8231
|
+
|
|
8232
|
+
.cds--card__description--truncate-multi {
|
|
8233
|
+
display: -webkit-box;
|
|
8234
|
+
overflow: hidden;
|
|
8235
|
+
-webkit-box-orient: vertical;
|
|
8236
|
+
-webkit-line-clamp: var(--cds--card--description-line-clamp);
|
|
8237
|
+
text-overflow: ellipsis;
|
|
8238
|
+
}
|
|
8239
|
+
|
|
8240
|
+
.cds--card__title-media {
|
|
8241
|
+
display: flex;
|
|
8242
|
+
flex-shrink: 0;
|
|
8243
|
+
align-items: flex-start;
|
|
8244
|
+
justify-content: center;
|
|
8245
|
+
grid-column: 1;
|
|
8246
|
+
margin-block-start: 1rem;
|
|
8247
|
+
margin-inline-start: 1rem;
|
|
8248
|
+
max-block-size: 4rem;
|
|
8249
|
+
}
|
|
8250
|
+
|
|
8251
|
+
.cds--card__header:has(> .cds--card__title-media) > .cds--card__title {
|
|
8252
|
+
grid-column: 2;
|
|
8253
|
+
margin-inline-start: 0;
|
|
8254
|
+
}
|
|
8255
|
+
|
|
8256
|
+
.cds--card__actions {
|
|
8257
|
+
position: absolute;
|
|
8258
|
+
display: inline-flex;
|
|
8259
|
+
align-items: center;
|
|
8260
|
+
justify-content: flex-end;
|
|
8261
|
+
block-size: 2rem;
|
|
8262
|
+
gap: 0.25rem;
|
|
8263
|
+
inline-size: 50%;
|
|
8264
|
+
inset-block-start: 0.5rem;
|
|
8265
|
+
inset-inline-end: 0.5rem;
|
|
8266
|
+
max-inline-size: 50%;
|
|
8267
|
+
}
|
|
8268
|
+
|
|
8269
|
+
.cds--card--has-ai-label {
|
|
8270
|
+
background: linear-gradient(to top, var(--cds-layer, var(--cds-ai-popover-background, #ffffff)) 0%, var(--cds-ai-aura-start, rgba(69, 137, 255, 0.1)) 0%, 15%, var(--cds-ai-aura-end, rgba(255, 255, 255, 0)) 50%) padding-box, linear-gradient(to top, var(--cds-layer, var(--cds-ai-popover-background, #ffffff)), var(--cds-layer, var(--cds-ai-popover-background, #ffffff))) padding-box, linear-gradient(to bottom, var(--cds-ai-border-start, rgba(166, 200, 255, 0.64)), var(--cds-ai-border-end, #78a9ff)) border-box, linear-gradient(to top, var(--cds-layer, var(--cds-ai-popover-background, #ffffff)), var(--cds-layer, var(--cds-ai-popover-background, #ffffff))) border-box;
|
|
8271
|
+
border: 1px solid transparent;
|
|
8272
|
+
box-shadow: inset 0 -80px 70px -65px var(--cds-ai-inner-shadow, rgba(69, 137, 255, 0.1)), 0 4px 10px 2px var(--cds-ai-drop-shadow, rgba(15, 98, 254, 0.1));
|
|
8273
|
+
}
|
|
8274
|
+
|
|
8275
|
+
.cds--card__decorator {
|
|
8276
|
+
position: absolute;
|
|
8277
|
+
z-index: 1;
|
|
8278
|
+
display: flex;
|
|
8279
|
+
align-items: center;
|
|
8280
|
+
block-size: 2rem;
|
|
8281
|
+
inset-block-start: 0.5rem;
|
|
8282
|
+
inset-inline-end: 0.5rem;
|
|
8283
|
+
}
|
|
8284
|
+
|
|
8285
|
+
.cds--card--has-ai-label .cds--card__title {
|
|
8286
|
+
padding-inline-end: 3rem;
|
|
8287
|
+
}
|
|
8288
|
+
|
|
8289
|
+
.cds--card--has-ai-label:has(.cds--card__actions) .cds--card__title {
|
|
8290
|
+
padding-inline-end: 10rem;
|
|
8291
|
+
}
|
|
8292
|
+
|
|
8293
|
+
.cds--card--has-ai-label .cds--card__label {
|
|
8294
|
+
padding-inline-end: 3rem;
|
|
8295
|
+
}
|
|
8296
|
+
|
|
8297
|
+
.cds--card--has-ai-label:has(.cds--card__actions) .cds--card__label {
|
|
8298
|
+
padding-inline-end: 10rem;
|
|
8299
|
+
}
|
|
8300
|
+
|
|
8301
|
+
.cds--card--has-ai-label .cds--card__description {
|
|
8302
|
+
padding-inline-end: 3rem;
|
|
8303
|
+
}
|
|
8304
|
+
|
|
8305
|
+
.cds--card--has-ai-label:has(.cds--card__actions) .cds--card__description {
|
|
8306
|
+
padding-inline-end: 10rem;
|
|
8307
|
+
}
|
|
8308
|
+
|
|
8309
|
+
.cds--card--has-ai-label .cds--card__actions {
|
|
8310
|
+
inset-inline-end: 2.5rem;
|
|
8311
|
+
}
|
|
8312
|
+
|
|
8313
|
+
.cds--card--clickable.cds--card--has-ai-label::before {
|
|
8314
|
+
background: linear-gradient(to top, var(--cds-ai-aura-hover-start, rgba(69, 137, 255, 0.32)) 0%, 15%, var(--cds-ai-aura-hover-end, rgba(255, 255, 255, 0)) 50%) padding-box, linear-gradient(to top, var(--cds-ai-aura-hover-background, #edf5ff), var(--cds-ai-aura-hover-background, #edf5ff)) padding-box, linear-gradient(to bottom, var(--cds-ai-border-start, rgba(166, 200, 255, 0.64)), var(--cds-ai-border-end, #78a9ff)) border-box, linear-gradient(to top, var(--cds-ai-aura-hover-background, #edf5ff), var(--cds-ai-aura-hover-background, #edf5ff)) border-box;
|
|
8315
|
+
position: absolute;
|
|
8316
|
+
display: block;
|
|
8317
|
+
block-size: 100%;
|
|
8318
|
+
box-shadow: inset 0 -80px 70px -65px var(--cds-ai-inner-shadow, rgba(69, 137, 255, 0.1));
|
|
8319
|
+
content: "";
|
|
8320
|
+
inline-size: 100%;
|
|
8321
|
+
inset-block-start: 0;
|
|
8322
|
+
inset-inline-start: 0;
|
|
8323
|
+
opacity: 0;
|
|
8324
|
+
transition: opacity 110ms cubic-bezier(0.2, 0, 0.38, 0.9);
|
|
8325
|
+
}
|
|
8326
|
+
|
|
8327
|
+
.cds--card--clickable.cds--card--has-ai-label:hover::before {
|
|
8328
|
+
opacity: 1;
|
|
8329
|
+
}
|
|
8330
|
+
|
|
7941
8331
|
.cds--chat-btn {
|
|
7942
8332
|
border-radius: 1.5rem;
|
|
7943
8333
|
}
|