|
1 | 1 | /*!
|
2 |
| - * Copyright 2024 Adobe. All rights reserved. |
| 2 | + * Copyright 2025 Adobe. All rights reserved. |
3 | 3 | *
|
4 | 4 | * This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License. You may obtain a copy
|
|
12 | 12 | */
|
13 | 13 |
|
14 | 14 | .spectrum-CoachMark {
|
| 15 | + --spectrum-coachmark-width: var(--spectrum-coach-mark-width); |
| 16 | + --spectrum-coachmark-min-width: var(--spectrum-coach-mark-minimum-width); |
| 17 | + --spectrum-coachmark-max-width: var(--spectrum-coach-mark-maximum-width); |
| 18 | + --spectrum-coachmark-media-min-height: var(--spectrum-coach-mark-media-minimum-height); |
| 19 | + |
15 | 20 | --spectrum-coachmark-border-size: var(--mod-coachmark-border-size, var(--mod-popover-border-width));
|
16 | 21 | --spectrum-coachmark-border-radius: var(--mod-coachmark-border-radius, var(--mod-popover-corner-radius));
|
17 | 22 |
|
| 23 | + --spectrum-coachmark-media-fixed-height: var(--spectrum-coach-mark-media-height); |
| 24 | + |
| 25 | + /* layout */ |
| 26 | + --spectrum-coachmark-padding: var(--spectrum-coach-mark-edge-to-content); |
| 27 | + --spectrum-coachmark-image-to-heading: var(--spectrum-coach-mark-edge-to-content); |
| 28 | + --spectrum-coachmark-header-to-body: var(--spectrum-spacing-200); |
| 29 | + --spectrum-coachmark-body-to-footer: var(--spectrum-spacing-300); |
| 30 | + |
| 31 | + /* font */ |
| 32 | + --spectrum-coachmark-title-color: var(--spectrum-heading-color); |
| 33 | + --spectrum-coachmark-title-font-family: var(--spectrum-sans-serif-font); |
| 34 | + --spectrum-coachmark-title-font-size: var(--spectrum-coach-mark-title-font-size); |
| 35 | + --spectrum-coachmark-title-font-style: var(--spectrum-title-serif-font-style); |
| 36 | + --spectrum-coachmark-title-text-font-weight: var(--spectrum-title-sans-serif-font-weight); |
| 37 | + --spectrum-coachmark-title-text-line-height: var(--spectrum-title-line-height); |
| 38 | + |
| 39 | + --spectrum-coachmark-content-font-size: var(--spectrum-coach-mark-body-font-size); |
| 40 | + --spectrum-coachmark-content-font-weight: var(--spectrum-body-sans-serif-font-weight); |
| 41 | + |
| 42 | + --spectrum-coachmark-step-color: var(--spectrum-coach-mark-pagination-color); |
| 43 | + --spectrum-coachmark-step-font-style: var(--spectrum-body-serif-font-style); |
| 44 | + --spectrum-coachmark-step-font-size: var(--spectrum-coach-mark-pagination-body-font-size); |
| 45 | + --spectrum-coachmark-step-text-font-weight: var(--spectrum-medium-font-weight); |
| 46 | + --spectrum-coachmark-step-text-line-height: var(--spectrum-line-height-200); |
| 47 | + --spectrum-coachmark-step-to-bottom: var(--spectrum-coach-mark-pagination-text-to-bottom-edge); |
| 48 | + |
18 | 49 | /* @passthrough start */
|
19 | 50 | --mod-buttongroup-justify-content: flex-end;
|
20 | 51 | --mod-popover-border-width: var(--spectrum-border-width-100);
|
21 | 52 | --mod-popover-corner-radius: var(--spectrum-corner-radius-large-default);
|
22 | 53 | --mod-popover-content-area-spacing: 0;
|
23 | 54 | --mod-button-edge-to-visual-only: 9px;
|
24 | 55 | /* @passthrough end */
|
| 56 | +} |
25 | 57 |
|
| 58 | +.spectrum-CoachMark { |
26 | 59 | position: relative;
|
27 |
| - min-inline-size: var(--mod-coachmark-min-width, var(--spectrum-coach-mark-minimum-width)); |
28 |
| - max-inline-size: var(--mod-coachmark-max-width, var(--spectrum-coach-mark-maximum-width)); |
29 |
| - inline-size: var(--mod-coachmark-width, var(--spectrum-coach-mark-width)); |
| 60 | + min-inline-size: var(--mod-coachmark-min-width, var(--spectrum-coachmark-min-width)); |
| 61 | + max-inline-size: var(--mod-coachmark-max-width, var(--spectrum-coachmark-max-width)); |
| 62 | + inline-size: var(--mod-coachmark-width, var(--spectrum-coachmark-width)); |
30 | 63 | }
|
31 | 64 |
|
32 | 65 | /* Used when the coachmark has an image */
|
33 | 66 | .spectrum-CoachMark-image-wrapper {
|
34 |
| - block-size: var(--mod-coachmark-media-height, var(--spectrum-coach-mark-media-height)); |
35 |
| - min-block-size: var(--mod-coachmark-media-min-height, var(--spectrum-coach-mark-media-minimum-height)); |
| 67 | + min-block-size: var(--mod-coachmark-media-min-height, var(--spectrum-coachmark-media-min-height)); |
36 | 68 | inline-size: calc(var(--mod-coachmark-width, var(--spectrum-coach-mark-width)) - (var(--spectrum-coachmark-border-size) * 2));
|
37 | 69 |
|
38 | 70 | object-fit: cover;
|
|
42 | 74 | border-start-end-radius: inherit;
|
43 | 75 | }
|
44 | 76 |
|
| 77 | +.spectrum-CoachMark-image-wrapper--fixedHeight { |
| 78 | + block-size: var(--mod-coachmark-media-fixed-height, var(--spectrum-coachmark-media-fixed-height)); |
| 79 | +} |
| 80 | + |
45 | 81 | /* Class for the image; nested inside image-wrapper */
|
46 | 82 | .spectrum-CoachMark-image {
|
47 | 83 | display: block;
|
48 | 84 | inline-size: 100%;
|
49 | 85 | block-size: 100%;
|
| 86 | + min-block-size: var(--mod-coachmark-media-min-height, var(--spectrum-coachmark-media-min-height)); |
50 | 87 | object-fit: cover;
|
51 | 88 | border-start-start-radius: calc(var(--spectrum-coachmark-border-radius) - var(--spectrum-coachmark-border-size));
|
52 | 89 | border-start-end-radius: calc(var(--spectrum-coachmark-border-radius) - var(--spectrum-coachmark-border-size));
|
|
57 | 94 | .spectrum-CoachMark-content,
|
58 | 95 | .spectrum-CoachMark-footer {
|
59 | 96 | padding-block: 0;
|
60 |
| - padding-inline: var(--mod-coachmark-padding, var(--spectrum-coach-mark-edge-to-content)); |
| 97 | + padding-inline: var(--mod-coachmark-padding, var(--spectrum-coachmark-padding)); |
61 | 98 | }
|
62 | 99 |
|
63 | 100 | /* Wrapper contains title, action-menu */
|
64 | 101 | .spectrum-CoachMark-header {
|
65 |
| - padding-block-start: var(--mod-coachmark-padding, var(--spectrum-coach-mark-edge-to-content)); |
| 102 | + padding-block-start: var(--mod-coachmark-image-to-heading, var(--spectrum-coachmark-image-to-heading)); |
66 | 103 | display: flex;
|
67 | 104 | justify-content: space-between;
|
68 |
| - align-items: center; |
69 |
| - margin-block-end: var(--mod-coachmark-header-to-body, var(--spectrum-spacing-200)); |
| 105 | + align-items: flex-start; |
| 106 | + margin-block-end: var(--mod-coachmark-header-to-body, var(--spectrum-coachmark-header-to-body)); |
70 | 107 | }
|
71 | 108 |
|
72 | 109 | /* Text wrapper for the title content; sides besdie action menu if present */
|
73 | 110 | .spectrum-CoachMark-title {
|
74 |
| - color: var(--mod-coachmark-title-color, var(--spectrum-heading-color)); |
75 |
| - font-size: var(--mod-coachmark-title-font-size, var(--spectrum-coach-mark-title-size)); |
76 |
| - font-weight: var(--mod-coachmark-title-text-font-weight, var(--spectrum-heading-sans-serif-font-weight)); |
77 |
| - font-family: var(--mod-coachmark-title-font-family, var(--spectrum-sans-serif-font)); |
78 |
| - font-style: var(--mod-coachmark-title-font-style, var(--spectrum-heading-serif-font-style)); |
79 |
| - line-height: var(--mod-coachmark-title-text-line-height, var(--spectrum-heading-line-height)); |
| 111 | + color: var(--mod-coachmark-title-color, var(--spectrum-coachmark-title-color)); |
| 112 | + font-size: var(--mod-coachmark-title-font-size, var(--spectrum-coachmark-title-font-size)); |
| 113 | + font-weight: var(--mod-coachmark-title-text-font-weight, var(--spectrum-coachmark-title-text-font-weight)); |
| 114 | + font-family: var(--mod-coachmark-title-font-family, var(--spectrum-coachmark-title-font-family)); |
| 115 | + font-style: var(--mod-coachmark-title-font-style, var(--spectrum-coachmark-title-font-style)); |
| 116 | + line-height: var(--mod-coachmark-title-text-line-height, var(--spectrum-coachmark-title-text-line-height)); |
80 | 117 | margin-block-end: 0;
|
81 | 118 | }
|
82 | 119 |
|
83 | 120 | /* Wrapper element around the nested action menu sub-component */
|
84 | 121 | .spectrum-CoachMark-action-menu {
|
| 122 | + --mod-popover-content-area-spacing: var(--spectrum-popover-content-area-spacing); |
| 123 | + |
85 | 124 | white-space: nowrap;
|
86 | 125 | z-index: 1;
|
87 | 126 | margin-inline-start: var(--mod-coachmark-heading-to-action-button, var(--spectrum-spacing-300));
|
| 127 | + margin-block: var(--mod-coachmark-action-menu-vertical-offset, var(--spectrum-coachmark-action-menu-vertical-offset)); |
88 | 128 | }
|
89 | 129 |
|
90 | 130 | /* @deprecated not used currently in demos or by SWC */
|
|
99 | 139 |
|
100 | 140 | /* Text wrapper for the content */
|
101 | 141 | .spectrum-CoachMark-content {
|
102 |
| - margin-block-end: var(--mod-coachmark-body-to-footer, var(--spectrum-spacing-300)); |
| 142 | + margin-block-end: var(--mod-coachmark-body-to-footer, var(--spectrum-coachmark-body-to-footer)); |
103 | 143 | color: var(--mod-coachmark-content-font-color, var(--spectrum-body-color));
|
104 |
| - font-size: var(--mod-coachmark-content-font-size, var(--spectrum-coach-mark-body-size)); |
105 |
| - font-weight: var(--mod-coachmark-content-font-weight, var(--spectrum-body-sans-serif-font-weight)); |
| 144 | + font-size: var(--mod-coachmark-content-font-size, var(--spectrum-coachmark-content-font-size)); |
| 145 | + font-weight: var(--mod-coachmark-content-font-weight, var(--spectrum-coachmark-content-font-weight)); |
106 | 146 | font-family: var(--mod-coachmark-content-font-family, var(--spectrum-sans-serif-font));
|
107 | 147 | font-style: var(--mod-coachmark-content-font-style, var(--spectrum-body-sans-serif-font-style));
|
108 | 148 | line-height: var(--mod-coachmark-content-line-height, var(--spectrum-body-line-height));
|
|
113 | 153 | display: grid;
|
114 | 154 | align-items: end;
|
115 | 155 | margin-block-start: 0;
|
116 |
| - padding-block-end: var(--mod-coachmark-padding, var(--spectrum-coach-mark-edge-to-content)); |
| 156 | + padding-block-end: var(--mod-coachmark-padding, var(--spectrum-coachmark-padding)); |
117 | 157 | }
|
118 | 158 |
|
119 | 159 | /* Text wrapper for the step count */
|
120 | 160 | .spectrum-CoachMark-step {
|
121 | 161 | justify-self: start;
|
122 |
| - margin-block-end: calc(var(--mod-coachmark-step-to-bottom, var(--spectrum-coach-mark-pagination-text-to-bottom-edge)) - var(--mod-coachmark-padding, var(--spectrum-coach-mark-edge-to-content))); |
| 162 | + margin-block-end: calc(var(--mod-coachmark-step-to-bottom, var(--spectrum-coachmark-step-to-bottom)) - var(--mod-coachmark-padding, var(--spectrum-coachmark-padding))); |
123 | 163 |
|
124 |
| - color: var(--mod-coachmark-step-color, var(--spectrum-coach-mark-pagination-color)); |
125 |
| - font-size: var(--mod-coachmark-step-font-size, var(--spectrum-coach-mark-pagination-body-size)); |
126 |
| - font-weight: var(--mod-coachmark-step-text-font-weight, var(--spectrum-body-sans-serif-font-weight)); |
| 164 | + color: var(--mod-coachmark-step-color, var(--spectrum-coachmark-step-color)); |
| 165 | + font-size: var(--mod-coachmark-step-font-size, var(--spectrum-coachmark-step-font-size)); |
| 166 | + font-weight: var(--mod-coachmark-step-text-font-weight, var(--spectrum-coachmark-step-text-font-weight)); |
127 | 167 | font-family: var(--spectrum-sans-serif-font);
|
128 |
| - font-style: var(--mod-coachmark-step-font-style, var(--spectrum-body-sans-serif-font-style)); |
129 |
| - line-height: var(--mod-coachmark-step-text-line-height, var(--spectrum-body-line-height)); |
| 168 | + font-style: var(--mod-coachmark-step-font-style, var(--spectrum-coachmark-step-font-style)); |
| 169 | + line-height: var(--mod-coachmark-step-text-line-height, var(--spectrum-coachmark-step-text-line-height)); |
130 | 170 | white-space: nowrap;
|
131 | 171 | }
|
132 | 172 |
|
|
0 commit comments