@parallelogram-js/dashboard 0.0.0-stage → 0.1.2
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 +124 -0
- package/LICENSE +21 -0
- package/README.md +1391 -2
- package/dist/parallelogram-dashboard.css +9478 -0
- package/dist/parallelogram-dashboard.css.map +1 -0
- package/dist/parallelogram-dashboard.min.css +1 -0
- package/package.json +72 -4
- package/scss/_base.scss +403 -0
- package/scss/_datetime.scss +50 -0
- package/scss/_icon.scss +40 -0
- package/scss/_index.scss +61 -0
- package/scss/_mixins.scss +396 -0
- package/scss/_tokens.scss +340 -0
- package/scss/_utilities.scss +464 -0
- package/scss/_variables.scss +219 -0
- package/scss/components/_accordion.scss +297 -0
- package/scss/components/_actionbar.scss +333 -0
- package/scss/components/_alert.scss +183 -0
- package/scss/components/_auth.scss +98 -0
- package/scss/components/_avatar.scss +203 -0
- package/scss/components/_badge.scss +176 -0
- package/scss/components/_banner.scss +344 -0
- package/scss/components/_breadcrumb.scss +220 -0
- package/scss/components/_button.scss +264 -0
- package/scss/components/_card.scss +256 -0
- package/scss/components/_chart.scss +246 -0
- package/scss/components/_command.scss +267 -0
- package/scss/components/_dashboard.scss +681 -0
- package/scss/components/_data-list.scss +280 -0
- package/scss/components/_dropdown.scss +318 -0
- package/scss/components/_empty.scss +226 -0
- package/scss/components/_filebrowser.scss +906 -0
- package/scss/components/_form-layout.scss +332 -0
- package/scss/components/_input.scss +310 -0
- package/scss/components/_list.scss +130 -0
- package/scss/components/_media.scss +239 -0
- package/scss/components/_modal.scss +298 -0
- package/scss/components/_navbar.scss +312 -0
- package/scss/components/_notification.scss +59 -0
- package/scss/components/_pageheader.scss +99 -0
- package/scss/components/_pagination.scss +165 -0
- package/scss/components/_progress.scss +333 -0
- package/scss/components/_separator.scss +129 -0
- package/scss/components/_sheet.scss +286 -0
- package/scss/components/_sidebar.scss +324 -0
- package/scss/components/_skeleton.scss +246 -0
- package/scss/components/_stat.scss +218 -0
- package/scss/components/_table.scss +589 -0
- package/scss/components/_tabs.scss +266 -0
- package/scss/components/_timeline.scss +339 -0
- package/scss/components/_toast.scss +259 -0
- package/scss/components/_toolbar.scss +301 -0
- package/scss/components/_tooltip.scss +250 -0
- package/scss/main.scss +6 -0
- package/src/js/behaviours/accordion.js +58 -0
- package/src/js/behaviours/action-bar-list.js +406 -0
- package/src/js/behaviours/action-bar.js +29 -0
- package/src/js/behaviours/chart.js +339 -0
- package/src/js/behaviours/collapsible.js +34 -0
- package/src/js/behaviours/editable-table.js +91 -0
- package/src/js/behaviours/expandable.js +80 -0
- package/src/js/behaviours/overflow-actions.js +137 -0
- package/src/js/behaviours/publish-schedule.js +91 -0
- package/src/js/behaviours/search-clear.js +19 -0
- package/src/js/behaviours/segmented-control.js +43 -0
- package/src/js/behaviours/submenu.js +73 -0
- package/src/js/behaviours/table-columns.js +77 -0
- package/src/js/behaviours/table-paste.js +305 -0
- package/src/js/behaviours/table-reorder.js +252 -0
- package/src/js/behaviours/table-sort.js +101 -0
- package/src/js/behaviours/tabs.js +148 -0
- package/src/js/behaviours/toast-manager.js +106 -0
- package/src/js/behaviours/toggle.js +186 -0
- package/src/js/behaviours/unsaved-guard.js +88 -0
- package/src/js/core-loader.js +26 -0
- package/src/js/index.js +85 -0
- package/src/js/polyfills/dialog-commands.js +20 -0
- package/src/js/util/dom.js +39 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Tabs Component
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
@use "../variables" as *;
|
|
6
|
+
@use "../mixins" as *;
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------------------------
|
|
9
|
+
// Base Tabs
|
|
10
|
+
// --------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
.tabs {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
|
|
16
|
+
// --------------------------------------------------------------------------
|
|
17
|
+
// Elements
|
|
18
|
+
// --------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
&__list {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
padding: $spacing-3xs;
|
|
24
|
+
background-color: var(--bg-muted);
|
|
25
|
+
border-radius: $radius-md;
|
|
26
|
+
gap: $spacing-3xs;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__trigger {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
gap: $spacing-2xs;
|
|
34
|
+
padding: $spacing-2xs $spacing-xs;
|
|
35
|
+
font-size: $font-size-sm;
|
|
36
|
+
font-weight: $font-weight-medium;
|
|
37
|
+
color: var(--fg-muted);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
border-radius: $radius-sm;
|
|
40
|
+
@include interactive;
|
|
41
|
+
|
|
42
|
+
&:hover:not([aria-selected="true"], .tabs__trigger--active) {
|
|
43
|
+
color: var(--fg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[aria-selected="true"],
|
|
47
|
+
&--active {
|
|
48
|
+
color: var(--fg);
|
|
49
|
+
background-color: var(--bg);
|
|
50
|
+
box-shadow: $shadow-sm;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:disabled,
|
|
54
|
+
&[aria-disabled="true"],
|
|
55
|
+
&--disabled {
|
|
56
|
+
@include disabled;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Set by the unsaved-changes guard while the tab's panel holds edits
|
|
60
|
+
&[data-dirty]::after {
|
|
61
|
+
content: "";
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
width: 0.375rem;
|
|
64
|
+
height: 0.375rem;
|
|
65
|
+
background-color: var(--warning);
|
|
66
|
+
border-radius: $radius-full;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__trigger-icon {
|
|
71
|
+
width: $icon-size-md;
|
|
72
|
+
height: $icon-size-md;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&__content {
|
|
76
|
+
margin-top: $spacing-sm;
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// --------------------------------------------------------------------------
|
|
81
|
+
// Variants
|
|
82
|
+
// --------------------------------------------------------------------------
|
|
83
|
+
|
|
84
|
+
// Underline style (like browser tabs)
|
|
85
|
+
&--underline {
|
|
86
|
+
.tabs__list {
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
padding: 0;
|
|
89
|
+
border-bottom: 1px solid var(--border);
|
|
90
|
+
border-radius: 0;
|
|
91
|
+
gap: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.tabs__trigger {
|
|
95
|
+
padding: $spacing-xs $spacing-sm;
|
|
96
|
+
border-radius: 0;
|
|
97
|
+
margin-bottom: -1px;
|
|
98
|
+
border-bottom: 2px solid transparent;
|
|
99
|
+
|
|
100
|
+
&[aria-selected="true"],
|
|
101
|
+
&--active {
|
|
102
|
+
background-color: transparent;
|
|
103
|
+
box-shadow: none;
|
|
104
|
+
border-bottom-color: var(--primary);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Pills style
|
|
110
|
+
&--pills {
|
|
111
|
+
.tabs__list {
|
|
112
|
+
background-color: transparent;
|
|
113
|
+
padding: 0;
|
|
114
|
+
gap: $spacing-2xs;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.tabs__trigger {
|
|
118
|
+
border: 1px solid var(--border);
|
|
119
|
+
border-radius: $radius-md;
|
|
120
|
+
|
|
121
|
+
&[aria-selected="true"],
|
|
122
|
+
&--active {
|
|
123
|
+
background-color: var(--primary);
|
|
124
|
+
color: var(--primary-fg);
|
|
125
|
+
border-color: var(--primary);
|
|
126
|
+
box-shadow: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Vertical tabs
|
|
132
|
+
&--vertical {
|
|
133
|
+
flex-direction: row;
|
|
134
|
+
gap: $spacing-lg;
|
|
135
|
+
|
|
136
|
+
.tabs__list {
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
width: auto;
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.tabs__trigger {
|
|
143
|
+
width: 100%;
|
|
144
|
+
justify-content: flex-start;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.tabs__content {
|
|
148
|
+
margin-top: 0;
|
|
149
|
+
flex: 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Full width triggers
|
|
154
|
+
&--full {
|
|
155
|
+
.tabs__list {
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.tabs__trigger {
|
|
160
|
+
flex: 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// --------------------------------------------------------------------------
|
|
166
|
+
// Segmented Control (alternative naming)
|
|
167
|
+
// --------------------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
.segmented-control {
|
|
170
|
+
@extend .tabs;
|
|
171
|
+
@extend .tabs--full;
|
|
172
|
+
|
|
173
|
+
&__list {
|
|
174
|
+
@extend .tabs__list;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&__item {
|
|
178
|
+
@extend .tabs__trigger;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&__item[aria-pressed="true"],
|
|
182
|
+
&__item[aria-checked="true"],
|
|
183
|
+
&__item--active {
|
|
184
|
+
@extend .tabs__trigger--active;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// --------------------------------------------------------------------------
|
|
189
|
+
// Tab Badges
|
|
190
|
+
// --------------------------------------------------------------------------
|
|
191
|
+
|
|
192
|
+
.tabs__trigger-badge {
|
|
193
|
+
font-size: $font-size-xs;
|
|
194
|
+
padding: 0 $spacing-3xs;
|
|
195
|
+
background-color: var(--bg-subtle);
|
|
196
|
+
border-radius: $radius-full;
|
|
197
|
+
margin-left: $spacing-3xs;
|
|
198
|
+
|
|
199
|
+
.tabs__trigger[aria-selected="true"] &,
|
|
200
|
+
.tabs__trigger--active & {
|
|
201
|
+
background-color: var(--accent);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// On phones a row of tabs that doesn't fit scrolls sideways in place, as .tabs--scrollable does
|
|
206
|
+
@include max-sm {
|
|
207
|
+
.tabs__list {
|
|
208
|
+
max-width: 100%;
|
|
209
|
+
overflow-x: auto;
|
|
210
|
+
flex-wrap: nowrap;
|
|
211
|
+
@include scrollbar-hidden;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.tabs__trigger {
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// --------------------------------------------------------------------------
|
|
220
|
+
// Scrollable Tabs (for many tabs)
|
|
221
|
+
// --------------------------------------------------------------------------
|
|
222
|
+
|
|
223
|
+
.tabs--scrollable {
|
|
224
|
+
.tabs__list {
|
|
225
|
+
overflow-x: auto;
|
|
226
|
+
flex-wrap: nowrap;
|
|
227
|
+
@include scrollbar-hidden;
|
|
228
|
+
-webkit-overflow-scrolling: touch;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.tabs__trigger {
|
|
232
|
+
flex-shrink: 0;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// --------------------------------------------------------------------------
|
|
237
|
+
// Animated Indicator (for JS-based tabs)
|
|
238
|
+
// --------------------------------------------------------------------------
|
|
239
|
+
|
|
240
|
+
.tabs--animated {
|
|
241
|
+
.tabs__list {
|
|
242
|
+
position: relative;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Tabs sets --tabs-indicator-left/width on the list from the selected tab
|
|
246
|
+
.tabs__indicator {
|
|
247
|
+
position: absolute;
|
|
248
|
+
bottom: 0;
|
|
249
|
+
left: var(--tabs-indicator-left, 0);
|
|
250
|
+
width: var(--tabs-indicator-width, 0);
|
|
251
|
+
height: 2px;
|
|
252
|
+
background-color: var(--primary);
|
|
253
|
+
border-radius: $radius-full;
|
|
254
|
+
pointer-events: none;
|
|
255
|
+
transition: left $transition-base $transition-easing, width $transition-base $transition-easing;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.tabs--underline .tabs__indicator {
|
|
259
|
+
bottom: -1px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Once the indicator is live it replaces the selected underline, so it can slide between tabs
|
|
263
|
+
&.tabs--underline[data-tabs-enhanced] .tabs__trigger[aria-selected="true"] {
|
|
264
|
+
border-bottom-color: transparent;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Timeline Component
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
@use "../variables" as *;
|
|
6
|
+
@use "../mixins" as *;
|
|
7
|
+
|
|
8
|
+
// --------------------------------------------------------------------------
|
|
9
|
+
// Timeline Container
|
|
10
|
+
// --------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
.timeline {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
|
|
17
|
+
// Vertical line
|
|
18
|
+
&::before {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 0.9375rem; // 15px - center of 2rem icon
|
|
22
|
+
top: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
width: 2px;
|
|
25
|
+
background-color: var(--border);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// --------------------------------------------------------------------------
|
|
29
|
+
// Timeline Item
|
|
30
|
+
// --------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
&__item {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: flex;
|
|
35
|
+
gap: $spacing-sm;
|
|
36
|
+
padding-bottom: $spacing-lg;
|
|
37
|
+
|
|
38
|
+
&:last-child {
|
|
39
|
+
padding-bottom: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__marker {
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
@include flex-center;
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
width: 2rem;
|
|
49
|
+
height: 2rem;
|
|
50
|
+
background-color: var(--bg);
|
|
51
|
+
border: 2px solid var(--border);
|
|
52
|
+
border-radius: $radius-full;
|
|
53
|
+
|
|
54
|
+
svg {
|
|
55
|
+
width: 1rem;
|
|
56
|
+
height: 1rem;
|
|
57
|
+
color: var(--fg-muted);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__content {
|
|
62
|
+
flex: 1;
|
|
63
|
+
min-width: 0;
|
|
64
|
+
padding-top: $spacing-3xs;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__header {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: flex-start;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
gap: $spacing-xs;
|
|
72
|
+
margin-bottom: $spacing-3xs;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&__title {
|
|
76
|
+
font-size: $font-size-sm;
|
|
77
|
+
font-weight: $font-weight-medium;
|
|
78
|
+
color: var(--fg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__time {
|
|
82
|
+
font-size: $font-size-xs;
|
|
83
|
+
color: var(--fg-muted);
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__description {
|
|
88
|
+
font-size: $font-size-sm;
|
|
89
|
+
color: var(--fg-muted);
|
|
90
|
+
line-height: $line-height-relaxed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__card {
|
|
94
|
+
margin-top: $spacing-xs;
|
|
95
|
+
padding: $spacing-xs;
|
|
96
|
+
background-color: var(--bg-muted);
|
|
97
|
+
border: 1px solid var(--border);
|
|
98
|
+
border-radius: $radius;
|
|
99
|
+
font-size: $font-size-sm;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// --------------------------------------------------------------------------
|
|
103
|
+
// Marker Variants
|
|
104
|
+
// --------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
&__marker--success {
|
|
107
|
+
--timeline-tone: var(--success);
|
|
108
|
+
border-color: var(--success);
|
|
109
|
+
background-color: var(--success-muted);
|
|
110
|
+
|
|
111
|
+
svg {
|
|
112
|
+
color: var(--success);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&__marker--error {
|
|
117
|
+
--timeline-tone: var(--destructive);
|
|
118
|
+
border-color: var(--destructive);
|
|
119
|
+
background-color: var(--destructive-muted);
|
|
120
|
+
|
|
121
|
+
svg {
|
|
122
|
+
color: var(--destructive);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&__marker--warning {
|
|
127
|
+
--timeline-tone: var(--warning);
|
|
128
|
+
border-color: var(--warning);
|
|
129
|
+
background-color: var(--warning-muted);
|
|
130
|
+
|
|
131
|
+
svg {
|
|
132
|
+
color: var(--warning);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&__marker--info {
|
|
137
|
+
--timeline-tone: var(--info);
|
|
138
|
+
border-color: var(--info);
|
|
139
|
+
background-color: var(--info-muted);
|
|
140
|
+
|
|
141
|
+
svg {
|
|
142
|
+
color: var(--info);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&__marker--primary {
|
|
147
|
+
--timeline-tone: var(--primary);
|
|
148
|
+
border-color: var(--primary);
|
|
149
|
+
background-color: var(--primary);
|
|
150
|
+
|
|
151
|
+
svg {
|
|
152
|
+
color: var(--primary-fg);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Dot marker (simpler)
|
|
157
|
+
&__marker--dot {
|
|
158
|
+
width: 0.75rem;
|
|
159
|
+
height: 0.75rem;
|
|
160
|
+
margin-left: 0.625rem; // Center with line
|
|
161
|
+
margin-top: 0.375rem;
|
|
162
|
+
background-color: var(--border);
|
|
163
|
+
border: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// --------------------------------------------------------------------------
|
|
167
|
+
// Timeline Variants
|
|
168
|
+
// --------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
// Compact
|
|
171
|
+
&--compact {
|
|
172
|
+
// Centres the 2px line on the 0.75rem dots
|
|
173
|
+
&::before {
|
|
174
|
+
left: 0.3125rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.timeline__item {
|
|
178
|
+
padding-bottom: $spacing-sm;
|
|
179
|
+
gap: $spacing-xs;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Markers become tone-coloured dots, too small to hold an icon
|
|
183
|
+
.timeline__marker {
|
|
184
|
+
width: 0.75rem;
|
|
185
|
+
height: 0.75rem;
|
|
186
|
+
margin: 0.25rem 0 0;
|
|
187
|
+
background-color: var(--timeline-tone, var(--border));
|
|
188
|
+
border: none;
|
|
189
|
+
|
|
190
|
+
svg {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.timeline__content {
|
|
196
|
+
padding-top: 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Alternating (left-right)
|
|
201
|
+
&--alternating {
|
|
202
|
+
&::before {
|
|
203
|
+
left: 50%;
|
|
204
|
+
transform: translateX(-50%);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.timeline__item {
|
|
208
|
+
width: 50%;
|
|
209
|
+
|
|
210
|
+
&:nth-child(odd) {
|
|
211
|
+
align-self: flex-start;
|
|
212
|
+
padding-right: $spacing-xl;
|
|
213
|
+
text-align: right;
|
|
214
|
+
flex-direction: row-reverse;
|
|
215
|
+
|
|
216
|
+
.timeline__marker {
|
|
217
|
+
margin-right: calc(-1rem - 1px);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&:nth-child(even) {
|
|
222
|
+
align-self: flex-end;
|
|
223
|
+
padding-left: $spacing-xl;
|
|
224
|
+
|
|
225
|
+
.timeline__marker {
|
|
226
|
+
margin-left: calc(-1rem - 1px);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Horizontal
|
|
233
|
+
&--horizontal {
|
|
234
|
+
flex-direction: row;
|
|
235
|
+
overflow-x: auto;
|
|
236
|
+
padding-bottom: $spacing-sm;
|
|
237
|
+
|
|
238
|
+
&::before {
|
|
239
|
+
left: 0;
|
|
240
|
+
right: 0;
|
|
241
|
+
top: 0.9375rem;
|
|
242
|
+
bottom: auto;
|
|
243
|
+
width: auto;
|
|
244
|
+
height: 2px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.timeline__item {
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
padding-bottom: 0;
|
|
250
|
+
padding-right: $spacing-xl;
|
|
251
|
+
min-width: 12rem;
|
|
252
|
+
|
|
253
|
+
&:last-child {
|
|
254
|
+
padding-right: 0;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.timeline__content {
|
|
259
|
+
padding-top: $spacing-xs;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Centre the dot on the horizontal line rather than the vertical one
|
|
263
|
+
.timeline__marker--dot {
|
|
264
|
+
margin-top: 0.625rem;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&.timeline--compact {
|
|
268
|
+
&::before {
|
|
269
|
+
top: 0.5625rem;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.timeline__marker {
|
|
273
|
+
margin: 0.25rem 0 0;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// --------------------------------------------------------------------------
|
|
280
|
+
// Activity Feed (simpler timeline variant)
|
|
281
|
+
// --------------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
.activityfeed {
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
|
|
287
|
+
&__item {
|
|
288
|
+
display: flex;
|
|
289
|
+
align-items: flex-start;
|
|
290
|
+
gap: $spacing-xs;
|
|
291
|
+
padding: $spacing-xs 0;
|
|
292
|
+
border-bottom: 1px solid var(--border);
|
|
293
|
+
|
|
294
|
+
&:last-child {
|
|
295
|
+
border-bottom: none;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&__avatar {
|
|
300
|
+
flex-shrink: 0;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&__content {
|
|
304
|
+
flex: 1;
|
|
305
|
+
min-width: 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&__text {
|
|
309
|
+
font-size: $font-size-sm;
|
|
310
|
+
color: var(--fg);
|
|
311
|
+
line-height: $line-height-relaxed;
|
|
312
|
+
|
|
313
|
+
strong {
|
|
314
|
+
font-weight: $font-weight-medium;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
a {
|
|
318
|
+
color: var(--primary);
|
|
319
|
+
text-decoration: none;
|
|
320
|
+
|
|
321
|
+
&:hover {
|
|
322
|
+
text-decoration: underline;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&__time {
|
|
328
|
+
font-size: $font-size-xs;
|
|
329
|
+
color: var(--fg-muted);
|
|
330
|
+
margin-top: $spacing-3xs;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&__meta {
|
|
334
|
+
display: flex;
|
|
335
|
+
align-items: center;
|
|
336
|
+
gap: $spacing-xs;
|
|
337
|
+
margin-top: $spacing-2xs;
|
|
338
|
+
}
|
|
339
|
+
}
|