@botiverse/raft-ui 0.0.0-stage → 0.7.1
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/CHANGELOG.md +576 -0
- package/LICENSE +21 -0
- package/README.md +103 -2
- package/codemods/package-name.mjs +168 -0
- package/codemods/token-names.mjs +150 -0
- package/dist/cn.d.mts +5 -0
- package/dist/cn.mjs +48 -0
- package/dist/components/combobox-select/combobox-select.css +286 -0
- package/dist/components/float-button/float-button.css +316 -0
- package/dist/components/steps/otter-indicator.css +141 -0
- package/dist/components/steps/steps.css +370 -0
- package/dist/components/timeline/timeline.css +255 -0
- package/dist/dialog-CY6S-Xqf.mjs +505 -0
- package/dist/fonts.css +13 -0
- package/dist/foundation.css +623 -0
- package/dist/index-B3_j9XYd.d.mts +329 -0
- package/dist/index.d.mts +5114 -0
- package/dist/index.mjs +16442 -0
- package/dist/style.css +1315 -0
- package/dist/styles.css +444 -0
- package/dist/tokens.json +3811 -0
- package/dist/wip.d.mts +92 -0
- package/dist/wip.mjs +517 -0
- package/package.json +92 -3
- package/skills/raft-ui-critique/SKILL.md +167 -0
- package/skills/raft-ui-critique/agents/openai.yaml +4 -0
- package/skills/raft-ui-critique/references/theme-lenses.md +69 -0
- package/skills/raft-ui-guide/SKILL.md +96 -0
- package/skills/raft-ui-guide/agents/openai.yaml +4 -0
- package/skills/raft-ui-guide/rules/adoption.md +55 -0
- package/skills/raft-ui-guide/rules/composition.md +14 -0
- package/skills/raft-ui-guide/rules/conversation.md +15 -0
- package/skills/raft-ui-guide/rules/display.md +14 -0
- package/skills/raft-ui-guide/rules/feedback.md +13 -0
- package/skills/raft-ui-guide/rules/forms.md +13 -0
- package/skills/raft-ui-guide/rules/layout.md +15 -0
- package/skills/raft-ui-guide/rules/lookup.md +78 -0
- package/skills/raft-ui-guide/rules/overlays.md +13 -0
- package/skills/raft-ui-guide/rules/overview.md +30 -0
- package/skills/raft-ui-guide/rules/styling.md +17 -0
- package/skills/raft-ui-guide/rules/technical-overview.md +80 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
2
|
+
OtterIndicator — an otter posed by a status (an agent's turn, a step). The
|
|
3
|
+
picture is fixed art; only the badges and the "z" take token colours.
|
|
4
|
+
───────────────────────────────────────────────────────────────────────── */
|
|
5
|
+
|
|
6
|
+
.r-otter-indicator {
|
|
7
|
+
overflow: visible;
|
|
8
|
+
}
|
|
9
|
+
.r-otter-indicator * {
|
|
10
|
+
transform-box: view-box;
|
|
11
|
+
}
|
|
12
|
+
.r-otter-indicator__body {
|
|
13
|
+
transform-origin: 24px 28px;
|
|
14
|
+
}
|
|
15
|
+
.r-otter-indicator__arm {
|
|
16
|
+
transform-origin: 29px 27px;
|
|
17
|
+
}
|
|
18
|
+
.r-otter-indicator__ripple {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transform-origin: 6px 30.5px;
|
|
21
|
+
}
|
|
22
|
+
.r-otter-indicator__z {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
.r-otter-indicator__parcel--adrift {
|
|
26
|
+
transform-origin: 6px 25px;
|
|
27
|
+
}
|
|
28
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
29
|
+
.r-otter-indicator__wave {
|
|
30
|
+
animation: r-otter-indicator-wave 1.2s linear infinite;
|
|
31
|
+
}
|
|
32
|
+
.r-otter-indicator__wave--back {
|
|
33
|
+
animation-duration: 2s;
|
|
34
|
+
}
|
|
35
|
+
.r-otter-indicator--process .r-otter-indicator__body {
|
|
36
|
+
animation: r-otter-indicator-bob 1.8s ease-in-out infinite alternate;
|
|
37
|
+
}
|
|
38
|
+
.r-otter-indicator--process .r-otter-indicator__arm {
|
|
39
|
+
animation: r-otter-indicator-paddle 0.9s ease-in-out infinite alternate;
|
|
40
|
+
}
|
|
41
|
+
.r-otter-indicator--process .r-otter-indicator__ripple {
|
|
42
|
+
animation: r-otter-indicator-ripple 1.8s ease-out infinite;
|
|
43
|
+
}
|
|
44
|
+
.r-otter-indicator--process .r-otter-indicator__ripple--late {
|
|
45
|
+
animation-delay: 0.9s;
|
|
46
|
+
}
|
|
47
|
+
.r-otter-indicator--finish .r-otter-indicator__wave {
|
|
48
|
+
animation-duration: 3s;
|
|
49
|
+
}
|
|
50
|
+
.r-otter-indicator--finish .r-otter-indicator__body {
|
|
51
|
+
animation: r-otter-indicator-bob 3.2s ease-in-out infinite alternate;
|
|
52
|
+
}
|
|
53
|
+
.r-otter-indicator--wait .r-otter-indicator__body {
|
|
54
|
+
animation: r-otter-indicator-breathe 2.4s ease-in-out infinite alternate;
|
|
55
|
+
}
|
|
56
|
+
.r-otter-indicator--wait .r-otter-indicator__z {
|
|
57
|
+
animation: r-otter-indicator-z 2.4s ease-out infinite;
|
|
58
|
+
}
|
|
59
|
+
.r-otter-indicator--wait .r-otter-indicator__z--late {
|
|
60
|
+
animation-delay: 1.2s;
|
|
61
|
+
}
|
|
62
|
+
.r-otter-indicator--error .r-otter-indicator__body {
|
|
63
|
+
animation: r-otter-indicator-shiver 0.18s linear infinite alternate;
|
|
64
|
+
}
|
|
65
|
+
.r-otter-indicator--error .r-otter-indicator__parcel--adrift {
|
|
66
|
+
animation: r-otter-indicator-drift 2s ease-in-out infinite alternate;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
@media (prefers-reduced-motion: reduce) {
|
|
70
|
+
.r-otter-indicator__z {
|
|
71
|
+
opacity: 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@keyframes r-otter-indicator-bob {
|
|
75
|
+
from {
|
|
76
|
+
transform: translateY(-0.6px) rotate(-3deg);
|
|
77
|
+
}
|
|
78
|
+
to {
|
|
79
|
+
transform: translateY(1.2px) rotate(2deg);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
@keyframes r-otter-indicator-paddle {
|
|
83
|
+
from {
|
|
84
|
+
transform: rotate(-35deg);
|
|
85
|
+
}
|
|
86
|
+
to {
|
|
87
|
+
transform: rotate(30deg);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@keyframes r-otter-indicator-wave {
|
|
91
|
+
to {
|
|
92
|
+
transform: translateX(-12px);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@keyframes r-otter-indicator-ripple {
|
|
96
|
+
from {
|
|
97
|
+
opacity: 0.8;
|
|
98
|
+
transform: scale(0.4);
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
transform: scale(1.6);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
@keyframes r-otter-indicator-breathe {
|
|
106
|
+
from {
|
|
107
|
+
transform: scale(1, 1);
|
|
108
|
+
}
|
|
109
|
+
to {
|
|
110
|
+
transform: scale(1.02, 1.05);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
@keyframes r-otter-indicator-z {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: translate(0, 0);
|
|
117
|
+
}
|
|
118
|
+
30% {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
to {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
transform: translate(4px, -7px);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
@keyframes r-otter-indicator-shiver {
|
|
127
|
+
from {
|
|
128
|
+
transform: translateX(-0.4px);
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
transform: translateX(0.4px);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
@keyframes r-otter-indicator-drift {
|
|
135
|
+
from {
|
|
136
|
+
transform: translate(0, 0) rotate(-18deg);
|
|
137
|
+
}
|
|
138
|
+
to {
|
|
139
|
+
transform: translate(-1.5px, 1.2px) rotate(-8deg);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/* Steps pure CSS styling following pattern/Button.css architecture
|
|
2
|
+
- Local CSS variables (--r-steps-*) declared on the list; steps inherit them
|
|
3
|
+
- Each step maps its status to --r-step-* locals
|
|
4
|
+
- Modifier classes rebind local variables
|
|
5
|
+
- Component styles strictly consume local variables
|
|
6
|
+
A step is its marker and text (`__main`) followed by the connector to the
|
|
7
|
+
next step: across in a row, down in a column.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
11
|
+
1. Local Variable Definitions & Modifier Overrides
|
|
12
|
+
───────────────────────────────────────────────────────────────────────── */
|
|
13
|
+
|
|
14
|
+
.r-steps {
|
|
15
|
+
/* The Design System's marks: 20px squares with the number in Space Mono,
|
|
16
|
+
joined by a short seam line. Upcoming is a seam outline on the surface,
|
|
17
|
+
the current step a yellow sticker (ink edge, ink number), a finished step
|
|
18
|
+
solid ink with a paper check. A failed step is a problem, so it is the
|
|
19
|
+
orange sticker. One size: `sm` keeps the marks. */
|
|
20
|
+
--r-steps-indicator-size: 20px;
|
|
21
|
+
--r-steps-indicator-font-size: 12px;
|
|
22
|
+
--r-steps-icon-size: 14px;
|
|
23
|
+
--r-steps-title-font-size: 13px;
|
|
24
|
+
--r-steps-description-font-size: 12px;
|
|
25
|
+
--r-steps-line-height: calc(18 / 13);
|
|
26
|
+
--r-steps-gap: 8px;
|
|
27
|
+
--r-steps-connector-gap: 8px;
|
|
28
|
+
--r-steps-connector-min-width: 16px;
|
|
29
|
+
--r-steps-vertical-item-gap: 16px;
|
|
30
|
+
--r-steps-indicator-font-family: var(--font-mono);
|
|
31
|
+
--r-steps-indicator-font-weight: 700;
|
|
32
|
+
--r-steps-indicator-border-width: 1px;
|
|
33
|
+
--r-steps-indicator-radius: var(--radius-sticker, 4px);
|
|
34
|
+
--r-steps-title-font-family: var(--font-sans);
|
|
35
|
+
--r-steps-title-font-weight: 600;
|
|
36
|
+
--r-steps-connector-width: 1px;
|
|
37
|
+
--r-steps-connector-color: var(--line-seam);
|
|
38
|
+
--r-steps-connector-color-finish: var(--line-seam);
|
|
39
|
+
--r-steps-focus-radius: var(--radius-sticker, 4px);
|
|
40
|
+
--r-steps-focus-outline: 2px solid var(--line-strong);
|
|
41
|
+
--r-steps-duration: 160ms;
|
|
42
|
+
--r-steps-easing: ease-out;
|
|
43
|
+
|
|
44
|
+
--r-steps-indicator-color-wait: var(--layer-card);
|
|
45
|
+
--r-steps-indicator-color-process: var(--brand-400);
|
|
46
|
+
--r-steps-indicator-color-finish: var(--foreground);
|
|
47
|
+
--r-steps-indicator-color-error: var(--warning);
|
|
48
|
+
--r-steps-indicator-border-color-wait: var(--line-seam);
|
|
49
|
+
--r-steps-indicator-border-color-process: var(--sticker-ink);
|
|
50
|
+
--r-steps-indicator-border-color-finish: var(--foreground);
|
|
51
|
+
--r-steps-indicator-border-color-error: var(--sticker-ink);
|
|
52
|
+
--r-steps-indicator-border-color-hover: var(--line-strong);
|
|
53
|
+
--r-steps-indicator-text-color-wait: var(--foreground-hint);
|
|
54
|
+
--r-steps-indicator-text-color-process: var(--sticker-ink);
|
|
55
|
+
--r-steps-indicator-text-color-finish: var(--layer-canvas);
|
|
56
|
+
--r-steps-indicator-text-color-error: var(--sticker-ink);
|
|
57
|
+
--r-steps-indicator-shadow-process: none;
|
|
58
|
+
--r-steps-indicator-shadow-hover: none;
|
|
59
|
+
--r-steps-title-color-wait: var(--foreground-hint);
|
|
60
|
+
--r-steps-title-color-process: var(--foreground);
|
|
61
|
+
--r-steps-title-color-finish: var(--foreground-muted);
|
|
62
|
+
--r-steps-title-color-error: var(--foreground);
|
|
63
|
+
--r-steps-title-color-hover: var(--foreground);
|
|
64
|
+
--r-steps-title-color-disabled: var(--foreground-disabled);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.r-step {
|
|
68
|
+
/* `wait`: ahead of the current step. */
|
|
69
|
+
--r-step-indicator-color: var(--r-steps-indicator-color-wait);
|
|
70
|
+
--r-step-indicator-border-color: var(--r-steps-indicator-border-color-wait);
|
|
71
|
+
--r-step-indicator-text-color: var(--r-steps-indicator-text-color-wait);
|
|
72
|
+
--r-step-indicator-shadow: none;
|
|
73
|
+
--r-step-title-color: var(--r-steps-title-color-wait);
|
|
74
|
+
--r-step-description-color: var(--foreground-hint);
|
|
75
|
+
--r-step-connector-color: var(--r-steps-connector-color);
|
|
76
|
+
|
|
77
|
+
&.r-step--process {
|
|
78
|
+
--r-step-indicator-color: var(--r-steps-indicator-color-process);
|
|
79
|
+
--r-step-indicator-border-color: var(--r-steps-indicator-border-color-process);
|
|
80
|
+
--r-step-indicator-text-color: var(--r-steps-indicator-text-color-process);
|
|
81
|
+
--r-step-indicator-shadow: var(--r-steps-indicator-shadow-process);
|
|
82
|
+
--r-step-title-color: var(--r-steps-title-color-process);
|
|
83
|
+
--r-step-description-color: var(--foreground-muted);
|
|
84
|
+
}
|
|
85
|
+
&.r-step--finish {
|
|
86
|
+
--r-step-indicator-color: var(--r-steps-indicator-color-finish);
|
|
87
|
+
--r-step-indicator-border-color: var(--r-steps-indicator-border-color-finish);
|
|
88
|
+
--r-step-indicator-text-color: var(--r-steps-indicator-text-color-finish);
|
|
89
|
+
--r-step-title-color: var(--r-steps-title-color-finish);
|
|
90
|
+
--r-step-connector-color: var(--r-steps-connector-color-finish);
|
|
91
|
+
}
|
|
92
|
+
&.r-step--error {
|
|
93
|
+
--r-step-indicator-color: var(--r-steps-indicator-color-error);
|
|
94
|
+
--r-step-indicator-border-color: var(--r-steps-indicator-border-color-error);
|
|
95
|
+
--r-step-indicator-text-color: var(--r-steps-indicator-text-color-error);
|
|
96
|
+
--r-step-title-color: var(--r-steps-title-color-error);
|
|
97
|
+
--r-step-description-color: var(--foreground-muted);
|
|
98
|
+
}
|
|
99
|
+
/* A clickable step under the pointer: the title takes the hover color, a
|
|
100
|
+
waiting marker its hover border, and a settled marker the hover shadow. */
|
|
101
|
+
@media (hover: hover) {
|
|
102
|
+
&.r-step--clickable:hover {
|
|
103
|
+
--r-step-title-color: var(--r-steps-title-color-hover);
|
|
104
|
+
}
|
|
105
|
+
&.r-step--clickable.r-step--wait:hover {
|
|
106
|
+
--r-step-indicator-border-color: var(--r-steps-indicator-border-color-hover);
|
|
107
|
+
}
|
|
108
|
+
&.r-step--clickable:not(.r-step--process):hover {
|
|
109
|
+
--r-step-indicator-shadow: var(--r-steps-indicator-shadow-hover);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
&.r-step--disabled {
|
|
113
|
+
--r-step-title-color: var(--r-steps-title-color-disabled);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Stickers take the 1.5px ink edge; only the upcoming outline stays a 1px seam. */
|
|
118
|
+
.r-steps > .r-step:is(.r-step--process, .r-step--finish, .r-step--error) {
|
|
119
|
+
--r-steps-indicator-border-width: 1.5px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
123
|
+
2. Component Styles
|
|
124
|
+
───────────────────────────────────────────────────────────────────────── */
|
|
125
|
+
|
|
126
|
+
.r-steps {
|
|
127
|
+
display: flex;
|
|
128
|
+
line-height: var(--r-steps-line-height);
|
|
129
|
+
list-style: none;
|
|
130
|
+
margin: 0;
|
|
131
|
+
padding: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.r-step {
|
|
135
|
+
display: flex;
|
|
136
|
+
margin: 0;
|
|
137
|
+
min-width: 0;
|
|
138
|
+
padding: 0;
|
|
139
|
+
position: relative;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* The marker and the text; the hit area of a clickable step is drawn over it. */
|
|
143
|
+
.r-step__main {
|
|
144
|
+
display: flex;
|
|
145
|
+
gap: var(--r-steps-gap);
|
|
146
|
+
position: relative;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.r-step__indicator {
|
|
150
|
+
align-items: center;
|
|
151
|
+
background: var(--r-step-indicator-color);
|
|
152
|
+
border: var(--r-steps-indicator-border-width) solid var(--r-step-indicator-border-color);
|
|
153
|
+
border-radius: var(--r-steps-indicator-radius);
|
|
154
|
+
box-shadow: var(--r-step-indicator-shadow);
|
|
155
|
+
box-sizing: border-box;
|
|
156
|
+
color: var(--r-step-indicator-text-color);
|
|
157
|
+
display: flex;
|
|
158
|
+
flex: none;
|
|
159
|
+
font-family: var(--r-steps-indicator-font-family);
|
|
160
|
+
font-size: var(--r-steps-indicator-font-size);
|
|
161
|
+
font-variant-numeric: tabular-nums;
|
|
162
|
+
font-weight: var(--r-steps-indicator-font-weight);
|
|
163
|
+
height: var(--r-steps-indicator-size);
|
|
164
|
+
justify-content: center;
|
|
165
|
+
line-height: 1;
|
|
166
|
+
transition:
|
|
167
|
+
background-color var(--r-steps-duration) var(--r-steps-easing),
|
|
168
|
+
border-color var(--r-steps-duration) var(--r-steps-easing),
|
|
169
|
+
box-shadow var(--r-steps-duration) var(--r-steps-easing),
|
|
170
|
+
color var(--r-steps-duration) var(--r-steps-easing);
|
|
171
|
+
width: var(--r-steps-indicator-size);
|
|
172
|
+
|
|
173
|
+
& > svg {
|
|
174
|
+
flex: none;
|
|
175
|
+
height: var(--r-steps-icon-size);
|
|
176
|
+
width: var(--r-steps-icon-size);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* The title's first line is centered on the marker. */
|
|
181
|
+
.r-step__content {
|
|
182
|
+
min-width: 0;
|
|
183
|
+
padding-top: calc(
|
|
184
|
+
(var(--r-steps-indicator-size) - var(--r-steps-title-font-size) * var(--r-steps-line-height)) /
|
|
185
|
+
2
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.r-step__title {
|
|
190
|
+
color: var(--r-step-title-color);
|
|
191
|
+
display: block;
|
|
192
|
+
font-family: var(--r-steps-title-font-family);
|
|
193
|
+
font-size: var(--r-steps-title-font-size);
|
|
194
|
+
font-weight: var(--r-steps-title-font-weight);
|
|
195
|
+
transition: color var(--r-steps-duration) var(--r-steps-easing);
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.r-step__description {
|
|
200
|
+
color: var(--r-step-description-color);
|
|
201
|
+
font-size: var(--r-steps-description-font-size);
|
|
202
|
+
margin-top: 2px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Read out after the title: the marker's check or cross says it only by look. */
|
|
206
|
+
.r-step__status {
|
|
207
|
+
clip-path: inset(50%);
|
|
208
|
+
height: 1px;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
position: absolute;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
width: 1px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* A clickable step's title is a button whose hit area (`::after`) stretches
|
|
216
|
+
over the marker and the description; the focus ring is drawn around it. */
|
|
217
|
+
.r-step__button {
|
|
218
|
+
appearance: none;
|
|
219
|
+
background: none;
|
|
220
|
+
border: 0;
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
line-height: inherit;
|
|
223
|
+
margin: 0;
|
|
224
|
+
padding: 0;
|
|
225
|
+
text-align: start;
|
|
226
|
+
|
|
227
|
+
&::after {
|
|
228
|
+
border-radius: var(--r-steps-focus-radius);
|
|
229
|
+
content: "";
|
|
230
|
+
inset: -4px;
|
|
231
|
+
position: absolute;
|
|
232
|
+
}
|
|
233
|
+
&:focus-visible {
|
|
234
|
+
outline: none;
|
|
235
|
+
}
|
|
236
|
+
&:focus-visible::after {
|
|
237
|
+
outline: var(--r-steps-focus-outline);
|
|
238
|
+
}
|
|
239
|
+
&:disabled {
|
|
240
|
+
cursor: not-allowed;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.r-step__connector {
|
|
245
|
+
border-color: var(--r-step-connector-color);
|
|
246
|
+
border-style: solid;
|
|
247
|
+
border-width: 0;
|
|
248
|
+
transition: border-color var(--r-steps-duration) var(--r-steps-easing);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.r-step:last-child > .r-step__connector {
|
|
252
|
+
display: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* A row, as the Design System's steps: the title sits beside its marker and
|
|
256
|
+
the connector, a 16px seam line, follows the title on the same line into
|
|
257
|
+
the next step; the description goes on the line below, under the title and
|
|
258
|
+
the connector. The steps keep their own width and the row wraps. */
|
|
259
|
+
.r-steps--horizontal > .r-step {
|
|
260
|
+
align-content: start;
|
|
261
|
+
display: grid;
|
|
262
|
+
flex: none;
|
|
263
|
+
/* The connector's column holds its line and the gap on each side. */
|
|
264
|
+
grid-template-columns:
|
|
265
|
+
var(--r-steps-indicator-size) auto
|
|
266
|
+
calc(var(--r-steps-connector-min-width) + 2 * var(--r-steps-connector-gap));
|
|
267
|
+
|
|
268
|
+
&:last-child {
|
|
269
|
+
grid-template-columns: var(--r-steps-indicator-size) auto;
|
|
270
|
+
}
|
|
271
|
+
& > .r-step__main,
|
|
272
|
+
& > .r-step__main > .r-step__content {
|
|
273
|
+
display: contents;
|
|
274
|
+
}
|
|
275
|
+
& > .r-step__main > .r-step__indicator {
|
|
276
|
+
grid-column: 1;
|
|
277
|
+
grid-row: 1;
|
|
278
|
+
}
|
|
279
|
+
& > .r-step__main > .r-step__content > .r-step__title {
|
|
280
|
+
align-self: center;
|
|
281
|
+
grid-column: 2;
|
|
282
|
+
grid-row: 1;
|
|
283
|
+
margin-inline-start: var(--r-steps-gap);
|
|
284
|
+
}
|
|
285
|
+
& > .r-step__main > .r-step__content > .r-step__description {
|
|
286
|
+
grid-column: 2 / -1;
|
|
287
|
+
grid-row: 2;
|
|
288
|
+
margin-inline-start: var(--r-steps-gap);
|
|
289
|
+
}
|
|
290
|
+
& > .r-step__connector {
|
|
291
|
+
align-self: center;
|
|
292
|
+
border-top-width: var(--r-steps-connector-width);
|
|
293
|
+
grid-column: 3;
|
|
294
|
+
grid-row: 1;
|
|
295
|
+
margin-inline: var(--r-steps-connector-gap);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@media (width >= 40rem) {
|
|
300
|
+
.r-steps--horizontal {
|
|
301
|
+
flex-wrap: wrap;
|
|
302
|
+
row-gap: 8px;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Narrow screens: a row of titles beside their markers overflows a phone, so
|
|
307
|
+
the steps share the width and each stacks its text under the marker, the
|
|
308
|
+
titles wrapping. The marker and the connector share the top line; the text
|
|
309
|
+
spans the step below. */
|
|
310
|
+
@media (width < 40rem) {
|
|
311
|
+
.r-steps--horizontal > .r-step {
|
|
312
|
+
--r-steps-connector-gap: 6px;
|
|
313
|
+
--r-steps-connector-min-width: 8px;
|
|
314
|
+
flex: 1 1 0;
|
|
315
|
+
grid-template-columns: var(--r-steps-indicator-size) minmax(0, 1fr);
|
|
316
|
+
|
|
317
|
+
&:last-child {
|
|
318
|
+
grid-template-columns: var(--r-steps-indicator-size) minmax(0, 1fr);
|
|
319
|
+
}
|
|
320
|
+
& > .r-step__main > .r-step__content {
|
|
321
|
+
display: block;
|
|
322
|
+
grid-column: 1 / -1;
|
|
323
|
+
grid-row: 2;
|
|
324
|
+
padding-inline-end: var(--r-steps-connector-gap);
|
|
325
|
+
padding-top: 6px;
|
|
326
|
+
}
|
|
327
|
+
& > .r-step__main > .r-step__content > .r-step__title,
|
|
328
|
+
& > .r-step__main > .r-step__content > .r-step__description {
|
|
329
|
+
margin-inline-start: 0;
|
|
330
|
+
}
|
|
331
|
+
& > .r-step__main > .r-step__content > .r-step__title {
|
|
332
|
+
overflow-wrap: anywhere;
|
|
333
|
+
white-space: normal;
|
|
334
|
+
}
|
|
335
|
+
& > .r-step__connector {
|
|
336
|
+
grid-column: 2;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* A column: the connector runs down from under each marker to just above the next. */
|
|
342
|
+
.r-steps--vertical {
|
|
343
|
+
flex-direction: column;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.r-steps--vertical > .r-step {
|
|
347
|
+
padding-bottom: var(--r-steps-vertical-item-gap);
|
|
348
|
+
|
|
349
|
+
&:last-child {
|
|
350
|
+
padding-bottom: 0;
|
|
351
|
+
}
|
|
352
|
+
& > .r-step__connector {
|
|
353
|
+
border-inline-start-width: var(--r-steps-connector-width);
|
|
354
|
+
bottom: 4px;
|
|
355
|
+
inset-inline-start: calc((var(--r-steps-indicator-size) - var(--r-steps-connector-width)) / 2);
|
|
356
|
+
position: absolute;
|
|
357
|
+
top: calc(var(--r-steps-indicator-size) + 4px);
|
|
358
|
+
}
|
|
359
|
+
& > .r-step__main > .r-step__content > .r-step__title {
|
|
360
|
+
white-space: normal;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@media (prefers-reduced-motion: reduce) {
|
|
365
|
+
.r-step__indicator,
|
|
366
|
+
.r-step__title,
|
|
367
|
+
.r-step__connector {
|
|
368
|
+
transition: none;
|
|
369
|
+
}
|
|
370
|
+
}
|