@gitlab/ui 121.1.0 → 122.0.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/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +3 -3
- package/src/vendor/bootstrap/scss/_card.scss +0 -110
- package/src/vendor/bootstrap/scss/_dropdown.scss +7 -13
- package/src/vendor/bootstrap/scss/_list-group.scss +0 -41
- package/src/vendor/bootstrap/scss/_variables.scss +0 -14
- package/src/vendor/bootstrap/scss/bootstrap.scss +0 -1
- package/src/components/dashboards/dashboard_layout/dashboard_layout.md +0 -145
- package/src/vendor/bootstrap/scss/_jumbotron.scss +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "122.0.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@cypress/grep": "^4.1.1",
|
|
105
105
|
"@gitlab/fonts": "^1.3.1",
|
|
106
106
|
"@gitlab/svgs": "3.146.0",
|
|
107
|
-
"@jest/test-sequencer": "30.1.
|
|
107
|
+
"@jest/test-sequencer": "30.1.2",
|
|
108
108
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
109
109
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
110
110
|
"@rollup/plugin-replace": "^6.0.2",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"playwright": "^1.55.0",
|
|
156
156
|
"playwright-core": "^1.55.0",
|
|
157
157
|
"postcss": "8.5.6",
|
|
158
|
-
"postcss-loader": "8.
|
|
158
|
+
"postcss-loader": "8.2.0",
|
|
159
159
|
"postcss-scss": "4.0.9",
|
|
160
160
|
"react": "18.3.1",
|
|
161
161
|
"react-dom": "18.3.1",
|
|
@@ -149,116 +149,6 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
// Card deck
|
|
153
|
-
|
|
154
|
-
.card-deck {
|
|
155
|
-
.card {
|
|
156
|
-
margin-bottom: $card-deck-margin;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@include media-breakpoint-up(sm) {
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-flow: row wrap;
|
|
162
|
-
margin-right: -$card-deck-margin;
|
|
163
|
-
margin-left: -$card-deck-margin;
|
|
164
|
-
|
|
165
|
-
.card {
|
|
166
|
-
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
|
167
|
-
flex: 1 0 0%;
|
|
168
|
-
margin-right: $card-deck-margin;
|
|
169
|
-
margin-bottom: 0; // Override the default
|
|
170
|
-
margin-left: $card-deck-margin;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
//
|
|
177
|
-
// Card groups
|
|
178
|
-
//
|
|
179
|
-
|
|
180
|
-
.card-group {
|
|
181
|
-
// The child selector allows nested `.card` within `.card-group`
|
|
182
|
-
// to display properly.
|
|
183
|
-
> .card {
|
|
184
|
-
margin-bottom: $card-group-margin;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
@include media-breakpoint-up(sm) {
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-flow: row wrap;
|
|
190
|
-
// The child selector allows nested `.card` within `.card-group`
|
|
191
|
-
// to display properly.
|
|
192
|
-
> .card {
|
|
193
|
-
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
|
194
|
-
flex: 1 0 0%;
|
|
195
|
-
margin-bottom: 0;
|
|
196
|
-
|
|
197
|
-
+ .card {
|
|
198
|
-
margin-left: 0;
|
|
199
|
-
border-left: 0;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Handle rounded corners
|
|
203
|
-
@if $enable-rounded {
|
|
204
|
-
&:not(:last-child) {
|
|
205
|
-
@include border-right-radius(0);
|
|
206
|
-
|
|
207
|
-
.card-img-top,
|
|
208
|
-
.card-header {
|
|
209
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
210
|
-
border-top-right-radius: 0;
|
|
211
|
-
}
|
|
212
|
-
.card-img-bottom,
|
|
213
|
-
.card-footer {
|
|
214
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
215
|
-
border-bottom-right-radius: 0;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&:not(:first-child) {
|
|
220
|
-
@include border-left-radius(0);
|
|
221
|
-
|
|
222
|
-
.card-img-top,
|
|
223
|
-
.card-header {
|
|
224
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
225
|
-
border-top-left-radius: 0;
|
|
226
|
-
}
|
|
227
|
-
.card-img-bottom,
|
|
228
|
-
.card-footer {
|
|
229
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
230
|
-
border-bottom-left-radius: 0;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
//
|
|
240
|
-
// Columns
|
|
241
|
-
//
|
|
242
|
-
|
|
243
|
-
.card-columns {
|
|
244
|
-
.card {
|
|
245
|
-
margin-bottom: $card-columns-margin;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@include media-breakpoint-up(sm) {
|
|
249
|
-
column-count: $card-columns-count;
|
|
250
|
-
column-gap: $card-columns-gap;
|
|
251
|
-
orphans: 1;
|
|
252
|
-
widows: 1;
|
|
253
|
-
|
|
254
|
-
.card {
|
|
255
|
-
display: inline-block; // Don't let them vertically span multiple columns
|
|
256
|
-
width: 100%; // Don't let their width change
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
152
|
//
|
|
263
153
|
// Accordion
|
|
264
154
|
//
|
|
@@ -36,20 +36,14 @@
|
|
|
36
36
|
@include box-shadow($dropdown-box-shadow);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.dropdown-menu#{$infix}-left {
|
|
44
|
-
right: auto;
|
|
45
|
-
left: 0;
|
|
46
|
-
}
|
|
39
|
+
.dropdown-menu-left {
|
|
40
|
+
right: auto;
|
|
41
|
+
left: 0;
|
|
42
|
+
}
|
|
47
43
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
}
|
|
44
|
+
.dropdown-menu-right {
|
|
45
|
+
right: 0;
|
|
46
|
+
left: auto;
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
|
@@ -86,47 +86,6 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
// Horizontal
|
|
90
|
-
//
|
|
91
|
-
// Change the layout of list group items from vertical (default) to horizontal.
|
|
92
|
-
|
|
93
|
-
@each $breakpoint in map.keys($grid-breakpoints) {
|
|
94
|
-
@include media-breakpoint-up($breakpoint) {
|
|
95
|
-
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
96
|
-
|
|
97
|
-
.list-group-horizontal#{$infix} {
|
|
98
|
-
flex-direction: row;
|
|
99
|
-
|
|
100
|
-
> .list-group-item {
|
|
101
|
-
&:first-child {
|
|
102
|
-
@include border-bottom-left-radius($list-group-border-radius);
|
|
103
|
-
@include border-top-right-radius(0);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&:last-child {
|
|
107
|
-
@include border-top-right-radius($list-group-border-radius);
|
|
108
|
-
@include border-bottom-left-radius(0);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&.active {
|
|
112
|
-
margin-top: 0;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
+ .list-group-item {
|
|
116
|
-
border-top-width: $list-group-border-width;
|
|
117
|
-
border-left-width: 0;
|
|
118
|
-
|
|
119
|
-
&.active {
|
|
120
|
-
margin-left: -$list-group-border-width;
|
|
121
|
-
border-left-width: $list-group-border-width;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
89
|
// Flush list items
|
|
131
90
|
//
|
|
132
91
|
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
|
@@ -826,13 +826,6 @@ $pagination-border-radius-sm: $border-radius-sm !default;
|
|
|
826
826
|
$pagination-border-radius-lg: $border-radius-lg !default;
|
|
827
827
|
|
|
828
828
|
|
|
829
|
-
// Jumbotron
|
|
830
|
-
|
|
831
|
-
$jumbotron-padding: 2rem !default;
|
|
832
|
-
$jumbotron-color: null !default;
|
|
833
|
-
$jumbotron-bg: $gray-200 !default;
|
|
834
|
-
|
|
835
|
-
|
|
836
829
|
// Cards
|
|
837
830
|
|
|
838
831
|
$card-spacer-y: .75rem !default;
|
|
@@ -849,13 +842,6 @@ $card-bg: $white !default;
|
|
|
849
842
|
|
|
850
843
|
$card-img-overlay-padding: 1.25rem !default;
|
|
851
844
|
|
|
852
|
-
$card-group-margin: $grid-gutter-width * .5 !default;
|
|
853
|
-
$card-deck-margin: $card-group-margin !default;
|
|
854
|
-
|
|
855
|
-
$card-columns-count: 3 !default;
|
|
856
|
-
$card-columns-gap: 1.25rem !default;
|
|
857
|
-
$card-columns-margin: $card-spacer-y !default;
|
|
858
|
-
|
|
859
845
|
|
|
860
846
|
// Tooltips
|
|
861
847
|
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
## Dashboard layout
|
|
2
|
-
|
|
3
|
-
The `GlDashboardLayout` component provides an easy way to render grid-based dashboards
|
|
4
|
-
using a configuration as outlined by our [Pajamas guidelines](#pajamas-guidelines).
|
|
5
|
-
For more in-depth details on the dashboard layout framework, see the
|
|
6
|
-
[architecture design document](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/dashboard_layout_framework/).
|
|
7
|
-
|
|
8
|
-
### When to use
|
|
9
|
-
|
|
10
|
-
This component should be used when:
|
|
11
|
-
|
|
12
|
-
- You want an easy way to create a dashboard interface.
|
|
13
|
-
- You want your dashboard to align with our [Pajamas guidelines](#pajamas-guidelines).
|
|
14
|
-
- You want to benefit from features such as customizable layouts with resizable, draggable elements.
|
|
15
|
-
|
|
16
|
-
### Current limitations
|
|
17
|
-
|
|
18
|
-
The `GlDashboardLayout` component is limited to rendering dashboards. As defined
|
|
19
|
-
in our architecture design document it does not provide:
|
|
20
|
-
|
|
21
|
-
- Data exploration outside defined panel visualizations.
|
|
22
|
-
- User-driven customization outside of editing panel position and size.
|
|
23
|
-
- Navigation placement for dashboards.
|
|
24
|
-
|
|
25
|
-
## The component
|
|
26
|
-
|
|
27
|
-
The component expects a dashboard configuration object as input and renders a dashboard
|
|
28
|
-
layout with title, description, actions, and panels.
|
|
29
|
-
|
|
30
|
-
### Grid layout
|
|
31
|
-
|
|
32
|
-
Panels within the dashboard layout are rendered in a cross-browser 12-column grid
|
|
33
|
-
system with an unlimited number of rows. The grid is responsive and collapses down to a
|
|
34
|
-
single column at the [medium breakpoint](https://design.gitlab.com/product-foundations/layout/#breakpoints).
|
|
35
|
-
|
|
36
|
-
### Dashboard panels
|
|
37
|
-
|
|
38
|
-
The dashboard layout is not opinionated about the panel component used. You are free to choose
|
|
39
|
-
whichever panel component best suits your needs. However, to ensure consistency with
|
|
40
|
-
our design patterns, it's strongly recommended that you use `GlDashboardPanel`.
|
|
41
|
-
|
|
42
|
-
### Filters
|
|
43
|
-
|
|
44
|
-
The component provides a `#filters` slot to render your filters in the dashboard layout.
|
|
45
|
-
The component does not manage or sync filters and leaves it up to the consumer to manage this state.
|
|
46
|
-
|
|
47
|
-
We expect dashboards using the framework to implement two types of filters:
|
|
48
|
-
|
|
49
|
-
- Dashboard filters: Applied to every panel and visualization in the dashboard.
|
|
50
|
-
- Panel filters: Applied per panel to refine results available within the dashboard context.
|
|
51
|
-
|
|
52
|
-
### Basic implementation
|
|
53
|
-
|
|
54
|
-
A basic implementation of a static dashboard using the `#panel` slot to render existing
|
|
55
|
-
visualizations wrapped in `GlDashboardPanel`.
|
|
56
|
-
|
|
57
|
-
```html
|
|
58
|
-
<script>
|
|
59
|
-
import { GlDashboardLayout, GlDashboardPanel } from '@gitlab/ui';
|
|
60
|
-
|
|
61
|
-
// Your i18n library
|
|
62
|
-
import { __ } from '~/locale';
|
|
63
|
-
|
|
64
|
-
// Your visualizations
|
|
65
|
-
import UsersVisualization from './my_users_visualization.vue';
|
|
66
|
-
import EventsVisualization from './my_events_visualization.vue';
|
|
67
|
-
|
|
68
|
-
export default {
|
|
69
|
-
components: {
|
|
70
|
-
GlDashboardLayout,
|
|
71
|
-
GlDashboardPanel,
|
|
72
|
-
UsersVisualization,
|
|
73
|
-
EventsVisualization,
|
|
74
|
-
},
|
|
75
|
-
data() {
|
|
76
|
-
return {
|
|
77
|
-
dashboard: {
|
|
78
|
-
title: __('My dashboard title'),
|
|
79
|
-
description: __('The dashboard description to render'),
|
|
80
|
-
panels: [
|
|
81
|
-
{
|
|
82
|
-
// Each panel ID must be unique within the context of this dashboard obj
|
|
83
|
-
id: 'active-users-panel',
|
|
84
|
-
dashboardPanelProps: {
|
|
85
|
-
title: __('Active users over time'),
|
|
86
|
-
// Any additional GlDashboardPanel props go here
|
|
87
|
-
},
|
|
88
|
-
component: UsersVisualization,
|
|
89
|
-
componentProps: {
|
|
90
|
-
apiPath: '/example-users-api',
|
|
91
|
-
// Any props you want to pass to your component
|
|
92
|
-
},
|
|
93
|
-
gridAttributes: {
|
|
94
|
-
width: 6,
|
|
95
|
-
height: 4,
|
|
96
|
-
yPos: 0,
|
|
97
|
-
xPos: 0,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
// Each panel ID must be unique within the context of this dashboard obj
|
|
102
|
-
id: 'events-over-time-panel',
|
|
103
|
-
dashboardPanelProps: {
|
|
104
|
-
title: __('Events over time'),
|
|
105
|
-
// Any additional GlDashboardPanel props go here
|
|
106
|
-
},
|
|
107
|
-
component: EventsVisualization,
|
|
108
|
-
componentProps: {
|
|
109
|
-
apiPath: '/example-events-api',
|
|
110
|
-
// Any props you want to pass to your component
|
|
111
|
-
},
|
|
112
|
-
gridAttributes: {
|
|
113
|
-
width: 6,
|
|
114
|
-
height: 4,
|
|
115
|
-
yPos: 0,
|
|
116
|
-
xPos: 6,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
}
|
|
124
|
-
</script>
|
|
125
|
-
|
|
126
|
-
<template>
|
|
127
|
-
<gl-dashboard-layout :config="dashboard">
|
|
128
|
-
<template #panel="{ panel }">
|
|
129
|
-
<gl-dashboard-panel v-bind="panel.dashboardPanelProps">
|
|
130
|
-
<template #body>
|
|
131
|
-
<component
|
|
132
|
-
:is="panel.component"
|
|
133
|
-
class="gl-h-full gl-overflow-hidden"
|
|
134
|
-
v-bind="panel.componentProps"
|
|
135
|
-
/>
|
|
136
|
-
</template>
|
|
137
|
-
</gl-dashboard-panel>
|
|
138
|
-
</template>
|
|
139
|
-
</gl-dashboard-layout>
|
|
140
|
-
</template>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Pajamas guidelines
|
|
144
|
-
|
|
145
|
-
- [Pajamas dashboards pattern](https://design.gitlab.com/patterns/dashboards)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.jumbotron {
|
|
2
|
-
padding: $jumbotron-padding ($jumbotron-padding * .5);
|
|
3
|
-
margin-bottom: $jumbotron-padding;
|
|
4
|
-
color: $jumbotron-color;
|
|
5
|
-
background-color: $jumbotron-bg;
|
|
6
|
-
@include border-radius($border-radius-lg);
|
|
7
|
-
|
|
8
|
-
@include media-breakpoint-up(sm) {
|
|
9
|
-
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.jumbotron-fluid {
|
|
14
|
-
padding-right: 0;
|
|
15
|
-
padding-left: 0;
|
|
16
|
-
@include border-radius(0);
|
|
17
|
-
}
|