@gitlab/ui 121.1.0 → 122.1.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.
Files changed (46) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.css.map +1 -1
  3. package/dist/tailwind.css +1 -1
  4. package/dist/tailwind.css.map +1 -1
  5. package/dist/tokens/build/js/tokens.dark.js +48 -1
  6. package/dist/tokens/build/js/tokens.js +48 -1
  7. package/dist/tokens/css/tokens.css +47 -0
  8. package/dist/tokens/css/tokens.dark.css +47 -0
  9. package/dist/tokens/docs/tokens-tailwind-docs.dark.json +1294 -0
  10. package/dist/tokens/docs/tokens-tailwind-docs.json +1294 -0
  11. package/dist/tokens/figma/constants.tokens.json +226 -0
  12. package/dist/tokens/figma/semantic.tokens.json +157 -0
  13. package/dist/tokens/js/tokens.dark.js +47 -0
  14. package/dist/tokens/js/tokens.js +47 -0
  15. package/dist/tokens/json/tokens.dark.json +1473 -226
  16. package/dist/tokens/json/tokens.json +1473 -226
  17. package/dist/tokens/scss/_tokens.dark.scss +47 -0
  18. package/dist/tokens/scss/_tokens.scss +47 -0
  19. package/dist/tokens/scss/_tokens_custom_properties.scss +47 -0
  20. package/dist/tokens/tailwind/tokens.cjs +4 -0
  21. package/package.json +3 -3
  22. package/src/scss/variables.scss +0 -37
  23. package/src/tokens/build/css/tokens.css +47 -0
  24. package/src/tokens/build/css/tokens.dark.css +47 -0
  25. package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +1294 -0
  26. package/src/tokens/build/docs/tokens-tailwind-docs.json +1294 -0
  27. package/src/tokens/build/figma/constants.tokens.json +226 -0
  28. package/src/tokens/build/figma/semantic.tokens.json +157 -0
  29. package/src/tokens/build/js/tokens.dark.js +47 -0
  30. package/src/tokens/build/js/tokens.js +47 -0
  31. package/src/tokens/build/json/tokens.dark.json +1473 -226
  32. package/src/tokens/build/json/tokens.json +1473 -226
  33. package/src/tokens/build/scss/_tokens.dark.scss +47 -0
  34. package/src/tokens/build/scss/_tokens.scss +47 -0
  35. package/src/tokens/build/scss/_tokens_custom_properties.scss +47 -0
  36. package/src/tokens/build/tailwind/tokens.cjs +53 -0
  37. package/src/tokens/constant/spacing_scale.tokens.json +228 -0
  38. package/src/tokens/semantic/border.tokens.json +157 -0
  39. package/src/vendor/bootstrap/scss/_card.scss +0 -110
  40. package/src/vendor/bootstrap/scss/_dropdown.scss +7 -13
  41. package/src/vendor/bootstrap/scss/_list-group.scss +0 -41
  42. package/src/vendor/bootstrap/scss/_variables.scss +0 -14
  43. package/src/vendor/bootstrap/scss/bootstrap.scss +0 -1
  44. package/tailwind.defaults.js +3 -47
  45. package/src/components/dashboards/dashboard_layout/dashboard_layout.md +0 -145
  46. package/src/vendor/bootstrap/scss/_jumbotron.scss +0 -17
@@ -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
- @each $breakpoint in map.keys($grid-breakpoints) {
40
- @include media-breakpoint-up($breakpoint) {
41
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
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
- .dropdown-menu#{$infix}-right {
49
- right: 0;
50
- left: auto;
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
 
@@ -28,7 +28,6 @@
28
28
  @import "breadcrumb";
29
29
  @import "pagination";
30
30
  @import "badge";
31
- @import "jumbotron";
32
31
  @import "alert";
33
32
  @import "progress";
34
33
  @import "media";
@@ -8,48 +8,12 @@ const {
8
8
  outlineColor,
9
9
  fill,
10
10
  textColor,
11
+ spacing,
12
+ borderRadius,
11
13
  } = require('./src/tokens/build/tailwind/tokens.cjs');
12
14
 
13
15
  const buildCQs = Boolean(process.env.USE_TAILWIND_CONTAINER_QUERIES);
14
16
 
15
- const gridSize = 0.5; // rem
16
- const spacing = {
17
- 0: '0',
18
- px: '1px',
19
- ...Object.fromEntries(
20
- Object.entries({
21
- 1: 0.25,
22
- 2: 0.5,
23
- 3: 1,
24
- 4: 1.5,
25
- 5: 2,
26
- 6: 3,
27
- 7: 4,
28
- 8: 5,
29
- 9: 6,
30
- 10: 7,
31
- 11: 8,
32
- '11-5': 9,
33
- 12: 10,
34
- 13: 12,
35
- 15: 15,
36
- 20: 20,
37
- 26: 26,
38
- 28: 28,
39
- 30: 30,
40
- 31: 31,
41
- 34: 34,
42
- 48: 48,
43
- 62: 62,
44
- 75: 75,
45
- 80: 80,
46
- 88: 88,
47
- }).map(([scale, factor]) => {
48
- return [scale, `${factor * gridSize}rem`];
49
- }),
50
- ),
51
- };
52
-
53
17
  function addCustomDefinitions({ addComponents, addUtilities }) {
54
18
  addComponents({
55
19
  '.action-neutral-colors': {
@@ -499,15 +463,7 @@ module.exports = {
499
463
  },
500
464
  backgroundColor,
501
465
  borderColor,
502
- borderRadius: {
503
- none: '0',
504
- 6: '1.5rem',
505
- base: '.25rem',
506
- full: '50%', // Tailwind gl-rounded-full is 9999px
507
- small: '.125rem',
508
- lg: '.5rem',
509
- pill: '.75rem',
510
- },
466
+ borderRadius,
511
467
  boxShadow: {
512
468
  DEFAULT: '0 1px 4px 0 #0000004d',
513
469
  none: 'none',
@@ -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
- }