@carbon/styles 1.113.0 → 1.114.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 +2167 -536
- package/css/styles.min.css +1 -1
- package/index.scss +2 -1
- package/package.json +9 -9
- package/scss/__tests__/__snapshots__/border-radius-test.js.snap +24 -0
- package/scss/__tests__/__snapshots__/colors-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/config-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/spacing-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/type-test.js.snap +1 -1
- package/scss/__tests__/border-radius-test.js +31 -0
- package/scss/_border-radius.scss +10 -0
- package/scss/components/EditInPlace/_edit-in-place.scss +188 -0
- package/scss/components/EditInPlace/_index.scss +11 -0
- package/scss/components/FullPageError/_full-page-error.scss +91 -0
- package/scss/components/FullPageError/_index.scss +11 -0
- package/scss/components/InterstitialScreen/_index.scss +11 -0
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +181 -0
- package/scss/components/OptionsTile/_index.scss +11 -0
- package/scss/components/OptionsTile/_options-tile.scss +240 -0
- package/scss/components/__tests__/button-test.js +27 -0
- package/scss/components/__tests__/data-table-test.js +43 -1
- package/scss/components/__tests__/file-uploader.js +30 -0
- package/scss/components/__tests__/overflow-menu-test.js +40 -1
- package/scss/components/__tests__/structured-list-test.js +38 -1
- package/scss/components/__tests__/tag-test.js +1 -2
- package/scss/components/__tests__/text-input-test.js +1 -1
- package/scss/components/__tests__/treeview-test.js +60 -1
- package/scss/components/_index.scss +9 -1
- package/scss/components/big-number/_big-number.scss +164 -0
- package/scss/components/big-number/_index.scss +11 -0
- package/scss/components/button/_button.scss +0 -1
- package/scss/components/card/_card.scss +37 -12
- package/scss/components/coachmark/_coachmark-beacon.scss +159 -0
- package/scss/components/coachmark/_coachmark-tagline.scss +142 -0
- package/scss/components/coachmark/_coachmark.scss +56 -0
- package/scss/components/coachmark/_index.scss +17 -0
- package/scss/components/data-table/_data-table.scss +140 -110
- package/scss/components/data-table/expandable/_data-table-expandable.scss +86 -59
- package/scss/components/data-table/skeleton/_data-table-skeleton.scss +10 -8
- package/scss/components/date-picker/_date-picker-next.scss +20 -20
- package/scss/components/date-picker/_date-picker.scss +5 -3
- package/scss/components/date-picker/_flatpickr.scss +46 -28
- package/scss/components/file-uploader/_file-uploader.scss +23 -10
- package/scss/components/loading/_loading.scss +2 -1
- package/scss/components/overflow-menu/_overflow-menu.scss +12 -6
- package/scss/components/pagination/_pagination.scss +12 -0
- package/scss/components/pagination-nav/_pagination-nav.scss +5 -3
- package/scss/components/scroll-gradient/_index.scss +11 -0
- package/scss/components/scroll-gradient/_scroll-gradient.scss +107 -0
- package/scss/components/slider/_slider.scss +38 -15
- package/scss/components/structured-list/_structured-list.scss +27 -20
- package/scss/components/tabs/_tabs.scss +11 -0
- package/scss/components/tag/_mixins.scss +9 -5
- package/scss/components/tag/_tag.scss +44 -26
- package/scss/components/text-input/_text-input.scss +11 -7
- package/scss/components/treeview/_treeview.scss +52 -33
- package/scss/components/ui-shell/side-nav/_side-nav.scss +58 -42
- package/scss/components/ui-shell/switcher/_switcher.scss +7 -5
- package/scss/components/user-avatar/_index.scss +11 -0
- package/scss/components/user-avatar/_user-avatar.scss +160 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2024, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
//-----------------------------
|
|
9
|
+
// Big number
|
|
10
|
+
//-----------------------------
|
|
11
|
+
|
|
12
|
+
@use '../../config' as *;
|
|
13
|
+
@use '../../theme' as *;
|
|
14
|
+
@use '../../type' as *;
|
|
15
|
+
@use '../../spacing' as *;
|
|
16
|
+
|
|
17
|
+
/// BigNumber styles
|
|
18
|
+
/// @access public
|
|
19
|
+
/// @group big-number
|
|
20
|
+
@mixin big-number {
|
|
21
|
+
.#{$prefix}--big-number {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.#{$prefix}--big-number__label {
|
|
26
|
+
@include type-style('label-01');
|
|
27
|
+
|
|
28
|
+
display: block;
|
|
29
|
+
margin: 0;
|
|
30
|
+
color: $text-secondary;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.#{$prefix}--big-number__value {
|
|
34
|
+
@include type-style('heading-04');
|
|
35
|
+
|
|
36
|
+
margin-block-end: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{$prefix}--big-number__total {
|
|
40
|
+
@include type-style('body-compact-01');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.#{$prefix}--big-number__total,
|
|
44
|
+
.#{$prefix}--big-number__percentage-mark {
|
|
45
|
+
margin-block: auto $spacing-02;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$prefix}--big-number__info {
|
|
49
|
+
padding-inline-start: $spacing-03;
|
|
50
|
+
vertical-align: top;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$prefix}--big-number__trend {
|
|
54
|
+
margin-block-start: $spacing-03;
|
|
55
|
+
vertical-align: top;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.#{$prefix}--big-number__row {
|
|
59
|
+
display: flex;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.#{$prefix}--big-number__percentage {
|
|
63
|
+
@include type-style('heading-04');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.#{$prefix}--big-number__percentage-mark {
|
|
67
|
+
@include type-style('body-compact-01');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.#{$prefix}--big-number__icon-button {
|
|
71
|
+
margin-inline-start: $spacing-02;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$prefix}--big-number--lg .#{$prefix}--big-number__value,
|
|
75
|
+
.#{$prefix}--big-number--lg .#{$prefix}--big-number__percentage {
|
|
76
|
+
@include type-style('heading-06');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.#{$prefix}--big-number--lg .#{$prefix}--big-number__total,
|
|
80
|
+
.#{$prefix}--big-number--lg .#{$prefix}--big-number__percentage-mark {
|
|
81
|
+
@include type-style('heading-03');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__label {
|
|
85
|
+
@include type-style('body-compact-01');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__value,
|
|
89
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__percentage {
|
|
90
|
+
@include type-style('heading-07');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__total,
|
|
94
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__percentage-mark {
|
|
95
|
+
@include type-style('heading-04');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{$prefix}--big-number--xl .#{$prefix}--big-number__trend {
|
|
99
|
+
margin-block-start: $spacing-04;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$prefix}--big-number .#{$prefix}--big-number__tooltip-trigger {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
padding: 0;
|
|
105
|
+
border: 0;
|
|
106
|
+
background: none;
|
|
107
|
+
color: inherit;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
vertical-align: top;
|
|
110
|
+
|
|
111
|
+
&:focus {
|
|
112
|
+
outline: 1px solid $focus;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//
|
|
117
|
+
// Skeleton
|
|
118
|
+
//
|
|
119
|
+
|
|
120
|
+
.#{$prefix}--big-number-skeleton {
|
|
121
|
+
inline-size: 4rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.#{$prefix}--big-number-skeleton__label {
|
|
125
|
+
block-size: $spacing-04;
|
|
126
|
+
margin-block: 0 $spacing-03;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.#{$prefix}--big-number-skeleton__value {
|
|
130
|
+
margin: 0;
|
|
131
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
132
|
+
block-size: $spacing-08 !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.#{$prefix}--big-number-skeleton--lg {
|
|
136
|
+
inline-size: 5rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.#{$prefix}--big-number-skeleton--xl {
|
|
140
|
+
inline-size: 6rem;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.#{$prefix}--big-number-skeleton.#{$prefix}--big-number-skeleton--lg
|
|
144
|
+
.#{$prefix}--big-number-skeleton__label {
|
|
145
|
+
block-size: $spacing-04;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.#{$prefix}--big-number-skeleton.#{$prefix}--big-number-skeleton--lg
|
|
149
|
+
.#{$prefix}--big-number-skeleton__value {
|
|
150
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
151
|
+
block-size: $spacing-09 !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.#{$prefix}--big-number-skeleton.#{$prefix}--big-number-skeleton--xl
|
|
155
|
+
.#{$prefix}--big-number-skeleton__label {
|
|
156
|
+
block-size: $spacing-04;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.#{$prefix}--big-number-skeleton.#{$prefix}--big-number-skeleton--xl
|
|
160
|
+
.#{$prefix}--big-number-skeleton__value {
|
|
161
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
162
|
+
block-size: $spacing-10 !important;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2024, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@forward 'big-number';
|
|
9
|
+
@use 'big-number';
|
|
10
|
+
|
|
11
|
+
@include big-number.big-number;
|
|
@@ -24,33 +24,53 @@
|
|
|
24
24
|
// ─── Base ────────────────────────────────────────────────────────────
|
|
25
25
|
.#{$prefix}--card {
|
|
26
26
|
position: relative;
|
|
27
|
-
|
|
28
|
-
background-color: $layer-01;
|
|
27
|
+
background-color: $layer;
|
|
29
28
|
color: $text-primary;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
// ─── Clickable ───────────────────────────────────────────────────────
|
|
33
32
|
.#{$prefix}--card--clickable {
|
|
33
|
+
display: block;
|
|
34
|
+
border: 1px solid $border-tile-01;
|
|
34
35
|
cursor: pointer;
|
|
36
|
+
// Reset anchor defaults when card is rendered as <a>
|
|
37
|
+
text-decoration: none;
|
|
35
38
|
transition: background-color $duration-fast-02 motion(standard, productive);
|
|
36
39
|
|
|
37
40
|
&:hover {
|
|
38
|
-
background-color: $layer-hover
|
|
41
|
+
background-color: $layer-hover;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
&:focus {
|
|
42
45
|
@include focus-outline('outline');
|
|
46
|
+
|
|
47
|
+
outline-offset: 0;
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
&:active {
|
|
46
|
-
background-color: $layer-active
|
|
51
|
+
background-color: $layer-active;
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
|
|
55
|
+
// ─── Clickable footer affordance ─────────────────────────────────────
|
|
56
|
+
// Auto-rendered by Card when clickable is true.
|
|
57
|
+
.#{$prefix}--card__clickable-footer {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: flex-end;
|
|
61
|
+
padding: $spacing-05;
|
|
62
|
+
color: $icon-interactive;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Disabled state: mute the footer icon
|
|
66
|
+
.#{$prefix}--card--disabled .#{$prefix}--card__clickable-footer {
|
|
67
|
+
color: $icon-disabled;
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
// ─── Disabled ────────────────────────────────────────────────────────
|
|
51
71
|
.#{$prefix}--card--disabled {
|
|
52
72
|
border-color: $border-disabled;
|
|
53
|
-
background-color: $layer
|
|
73
|
+
background-color: $layer;
|
|
54
74
|
color: $text-disabled;
|
|
55
75
|
cursor: not-allowed;
|
|
56
76
|
pointer-events: none;
|
|
@@ -71,14 +91,12 @@
|
|
|
71
91
|
.#{$prefix}--card__body {
|
|
72
92
|
@include type-style('body-compact-01');
|
|
73
93
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
margin-inline: $spacing-05;
|
|
94
|
+
padding-block: $spacing-05;
|
|
95
|
+
padding-inline: $spacing-05;
|
|
77
96
|
}
|
|
78
97
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
margin-block-start: $spacing-05;
|
|
98
|
+
.#{$prefix}--card__body--flush {
|
|
99
|
+
padding: 0;
|
|
82
100
|
}
|
|
83
101
|
|
|
84
102
|
// ─── Footer ──────────────────────────────────────────────────────────
|
|
@@ -231,6 +249,10 @@
|
|
|
231
249
|
color: $text-secondary;
|
|
232
250
|
}
|
|
233
251
|
|
|
252
|
+
.#{$prefix}--card--disabled .#{$prefix}--card__label {
|
|
253
|
+
color: $text-disabled;
|
|
254
|
+
}
|
|
255
|
+
|
|
234
256
|
.#{$prefix}--card__label--truncate {
|
|
235
257
|
overflow: hidden;
|
|
236
258
|
text-overflow: ellipsis;
|
|
@@ -250,7 +272,6 @@
|
|
|
250
272
|
display: flex;
|
|
251
273
|
overflow: hidden;
|
|
252
274
|
flex-direction: column;
|
|
253
|
-
color: $text-primary;
|
|
254
275
|
// 2px between label / text-row / description
|
|
255
276
|
gap: $spacing-01;
|
|
256
277
|
margin-inline: $spacing-05;
|
|
@@ -325,6 +346,10 @@
|
|
|
325
346
|
color: $text-secondary;
|
|
326
347
|
}
|
|
327
348
|
|
|
349
|
+
.#{$prefix}--card--disabled .#{$prefix}--card__description {
|
|
350
|
+
color: $text-disabled;
|
|
351
|
+
}
|
|
352
|
+
|
|
328
353
|
.#{$prefix}--card__description--truncate {
|
|
329
354
|
overflow: hidden;
|
|
330
355
|
text-overflow: ellipsis;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2024, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@use '../../config' as *;
|
|
9
|
+
@use '../../spacing' as *;
|
|
10
|
+
@use '../../colors' as *;
|
|
11
|
+
@use '../../theme' as *;
|
|
12
|
+
@use '../../type';
|
|
13
|
+
@use '../button/tokens' as *;
|
|
14
|
+
@use '../../motion' as *;
|
|
15
|
+
|
|
16
|
+
$beacon-animation-time: 2s;
|
|
17
|
+
|
|
18
|
+
/// CoachmarkBeacon styles
|
|
19
|
+
/// @access public
|
|
20
|
+
/// @group coachmark
|
|
21
|
+
@mixin coachmark-beacon {
|
|
22
|
+
$block-class: #{$prefix}--coachmark-beacon;
|
|
23
|
+
|
|
24
|
+
.#{$block-class} {
|
|
25
|
+
position: relative;
|
|
26
|
+
|
|
27
|
+
&-default {
|
|
28
|
+
.#{$block-class}__target {
|
|
29
|
+
&::before {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// the blue dot
|
|
34
|
+
&::after {
|
|
35
|
+
position: absolute;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background-color: $blue-50;
|
|
38
|
+
block-size: $spacing-04;
|
|
39
|
+
content: '';
|
|
40
|
+
inline-size: $spacing-04;
|
|
41
|
+
inset-block-start: calc($spacing-01 + $spacing-03);
|
|
42
|
+
inset-inline-start: calc($spacing-01 + $spacing-03);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: transparent;
|
|
47
|
+
|
|
48
|
+
&::before {
|
|
49
|
+
position: absolute;
|
|
50
|
+
display: block;
|
|
51
|
+
border-radius: 100%;
|
|
52
|
+
block-size: 18px;
|
|
53
|
+
content: '';
|
|
54
|
+
inline-size: 18px;
|
|
55
|
+
inset-block-start: 7px;
|
|
56
|
+
inset-inline-start: 7px;
|
|
57
|
+
outline: $spacing-01 $focus solid;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.#{$block-class}__target {
|
|
64
|
+
// the hit area
|
|
65
|
+
display: flex;
|
|
66
|
+
padding: 0;
|
|
67
|
+
border: none;
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
block-size: $spacing-07;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
inline-size: $spacing-07;
|
|
73
|
+
|
|
74
|
+
&[aria-expanded='true'] {
|
|
75
|
+
circle {
|
|
76
|
+
animation: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__center {
|
|
82
|
+
position: absolute;
|
|
83
|
+
z-index: 6900;
|
|
84
|
+
block-size: $spacing-11;
|
|
85
|
+
inline-size: $spacing-11;
|
|
86
|
+
inset-block-start: calc(($spacing-06 - $spacing-01) * -1);
|
|
87
|
+
inset-inline-start: calc(($spacing-06 - $spacing-01) * -1);
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
|
|
90
|
+
circle {
|
|
91
|
+
animation: ripple $beacon-animation-time infinite;
|
|
92
|
+
fill: $support-info;
|
|
93
|
+
fill-opacity: 0;
|
|
94
|
+
-webkit-mask-image: none;
|
|
95
|
+
mask-image: none;
|
|
96
|
+
stroke: $support-info;
|
|
97
|
+
stroke-opacity: 0;
|
|
98
|
+
stroke-width: 1px;
|
|
99
|
+
transition-timing-function: motion(exit, productive);
|
|
100
|
+
|
|
101
|
+
@media (prefers-reduced-motion) {
|
|
102
|
+
animation: none;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes ripple {
|
|
109
|
+
0% {
|
|
110
|
+
fill-opacity: 0;
|
|
111
|
+
r: 1px;
|
|
112
|
+
stroke-opacity: 0;
|
|
113
|
+
transition-timing-function: motion(entrance, productive);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
31% {
|
|
117
|
+
fill-opacity: 0.2;
|
|
118
|
+
stroke-opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
62% {
|
|
122
|
+
fill-opacity: 0;
|
|
123
|
+
r: 32px;
|
|
124
|
+
stroke-opacity: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
100% {
|
|
128
|
+
fill-opacity: 0;
|
|
129
|
+
r: 32px;
|
|
130
|
+
stroke-opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@keyframes ring-ripple {
|
|
135
|
+
0% {
|
|
136
|
+
fill-opacity: 0;
|
|
137
|
+
r: 12px;
|
|
138
|
+
stroke-opacity: 0;
|
|
139
|
+
transition-timing-function: motion(entrance, productive);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
31% {
|
|
143
|
+
fill-opacity: 0.2;
|
|
144
|
+
stroke-opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
62% {
|
|
148
|
+
fill-opacity: 0;
|
|
149
|
+
r: 32px;
|
|
150
|
+
stroke-opacity: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
100% {
|
|
154
|
+
fill-opacity: 0;
|
|
155
|
+
r: 32px;
|
|
156
|
+
stroke-opacity: 0;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2023, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
/* stylelint-disable declaration-no-important */
|
|
9
|
+
|
|
10
|
+
@use '../../config' as *;
|
|
11
|
+
@use '../../spacing' as *;
|
|
12
|
+
@use '../../motion' as *;
|
|
13
|
+
@use '../../type';
|
|
14
|
+
@use '../../colors' as *;
|
|
15
|
+
@use '../../theme' as *;
|
|
16
|
+
@use '../button/tokens' as *;
|
|
17
|
+
|
|
18
|
+
/// CoachmarkTagline styles
|
|
19
|
+
/// @access public
|
|
20
|
+
/// @group coachmark
|
|
21
|
+
@mixin coachmark-tagline {
|
|
22
|
+
$block-class: #{$prefix}--coachmark-tagline;
|
|
23
|
+
|
|
24
|
+
.#{$block-class} {
|
|
25
|
+
position: fixed;
|
|
26
|
+
z-index: 1000;
|
|
27
|
+
display: grid;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
border-radius: $spacing-01 $spacing-01 0 0;
|
|
30
|
+
background: $purple-70;
|
|
31
|
+
background-image: linear-gradient(90deg, $blue-90 0%, $purple-70 100%);
|
|
32
|
+
color: $white-0 !important;
|
|
33
|
+
grid-template-columns: [cta-col] auto [close-btn-col] $spacing-08;
|
|
34
|
+
inline-size: 18rem;
|
|
35
|
+
inset-block-end: 0;
|
|
36
|
+
inset-inline-end: $spacing-05;
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transition: opacity $duration-moderate-02 motion(exit, productive) 300ms;
|
|
39
|
+
transition-delay: $duration-moderate-02;
|
|
40
|
+
|
|
41
|
+
@media (prefers-reduced-motion) {
|
|
42
|
+
transition: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::before {
|
|
46
|
+
position: absolute;
|
|
47
|
+
z-index: -1;
|
|
48
|
+
background: linear-gradient(90deg, $blue-70 0%, $purple-70 100%);
|
|
49
|
+
content: '';
|
|
50
|
+
inset: 0;
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transition: opacity $duration-moderate-02 motion(exit, productive);
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion) {
|
|
55
|
+
transition: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:hover::before {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--is-open {
|
|
64
|
+
background: $white-0;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
|
|
67
|
+
#{$block-class}__cta {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#{$block-class}--close-btn {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&::before {
|
|
76
|
+
background: $white-0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__cta {
|
|
81
|
+
display: grid;
|
|
82
|
+
padding: $spacing-03 0;
|
|
83
|
+
border: none;
|
|
84
|
+
background: transparent;
|
|
85
|
+
color: $white-0 !important;
|
|
86
|
+
grid-template-columns: [icon-col] $spacing-07 [body-col] auto;
|
|
87
|
+
text-align: start;
|
|
88
|
+
|
|
89
|
+
@include type.type-style('body-short-01');
|
|
90
|
+
|
|
91
|
+
&:focus {
|
|
92
|
+
box-shadow:
|
|
93
|
+
inset 0 0 0 3px $purple-70,
|
|
94
|
+
inset 0 0 0 $spacing-02 $white-0;
|
|
95
|
+
outline: 1px solid transparent;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
cursor: pointer !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$block-class}__idea {
|
|
103
|
+
justify-self: center;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--close-btn-container {
|
|
108
|
+
block-size: $spacing-07;
|
|
109
|
+
inline-size: $spacing-07;
|
|
110
|
+
margin-inline-start: auto;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--close-btn {
|
|
114
|
+
border-color: transparent !important;
|
|
115
|
+
border-radius: 0;
|
|
116
|
+
block-size: $spacing-07;
|
|
117
|
+
color: $white-0;
|
|
118
|
+
inline-size: $spacing-07;
|
|
119
|
+
margin-inline-start: auto !important;
|
|
120
|
+
outline: 1px solid transparent;
|
|
121
|
+
|
|
122
|
+
&:active {
|
|
123
|
+
background-color: $button-secondary-active;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:focus {
|
|
127
|
+
box-shadow:
|
|
128
|
+
inset 0 0 0 1px $background-inverse,
|
|
129
|
+
inset 0 0 0 $spacing-01 $white-0 !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
svg > path {
|
|
133
|
+
margin: 0;
|
|
134
|
+
fill: $white-0 !important;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:hover {
|
|
138
|
+
background-color: $purple-70-hover !important;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@use '../../config' as *;
|
|
9
|
+
@use '../../theme' as *;
|
|
10
|
+
@use '../../spacing' as *;
|
|
11
|
+
@use '../button/tokens' as *;
|
|
12
|
+
|
|
13
|
+
/// Coachmark styles
|
|
14
|
+
/// @access public
|
|
15
|
+
/// @group coachmark
|
|
16
|
+
@mixin coachmark {
|
|
17
|
+
$block-class: #{$prefix}--coachmark;
|
|
18
|
+
|
|
19
|
+
.#{$block-class} {
|
|
20
|
+
&--floating {
|
|
21
|
+
span:has(> div > .#{$block-class}--content-header--drag-icon) {
|
|
22
|
+
margin-inline-end: auto;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.#{$block-class}--content-header--is-dragging {
|
|
27
|
+
border-radius: 0;
|
|
28
|
+
box-shadow: 0 0 0 $spacing-02 $icon-inverse;
|
|
29
|
+
outline: $spacing-01 solid $background-inverse;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$block-class}--coachmark-content {
|
|
33
|
+
.#{$block-class}--content-header {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.#{$block-class}--content-header--drag-icon,
|
|
39
|
+
.#{$block-class}--content-header .#{$prefix}--btn {
|
|
40
|
+
color: $icon-inverse;
|
|
41
|
+
|
|
42
|
+
.#{$prefix}--btn__icon,
|
|
43
|
+
svg {
|
|
44
|
+
color: $icon-inverse;
|
|
45
|
+
fill: $icon-inverse;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$block-class}--content-body {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
padding: $spacing-01 $spacing-05 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2023, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@forward 'coachmark';
|
|
9
|
+
@forward 'coachmark-beacon';
|
|
10
|
+
@forward 'coachmark-tagline';
|
|
11
|
+
@use 'coachmark';
|
|
12
|
+
@use 'coachmark-beacon';
|
|
13
|
+
@use 'coachmark-tagline';
|
|
14
|
+
|
|
15
|
+
@include coachmark.coachmark;
|
|
16
|
+
@include coachmark-beacon.coachmark-beacon;
|
|
17
|
+
@include coachmark-tagline.coachmark-tagline;
|