@gitlab/ui 122.6.0 → 122.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "122.6.0",
3
+ "version": "122.7.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -133,7 +133,7 @@
133
133
  "acorn": "^8.15.0",
134
134
  "acorn-walk": "^8.3.4",
135
135
  "autoprefixer": "10.4.21",
136
- "axe-playwright": "^2.1.0",
136
+ "axe-playwright": "^2.2.2",
137
137
  "babel-loader": "^9.2.1",
138
138
  "cypress": "14.5.4",
139
139
  "cypress-real-events": "^1.15.0",
@@ -11,7 +11,7 @@
11
11
  max-width: $grid-size * 15;
12
12
  }
13
13
 
14
- @include gl-container-width-down(sm) {
14
+ @include gl-container-width-down(md) {
15
15
  display: none;
16
16
  }
17
17
  }
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  table.gl-table {
2
4
  background-color: var(--gl-color-alpha-0);
3
5
  @apply gl-text-default;
@@ -96,22 +98,18 @@ table.gl-table {
96
98
  }
97
99
  }
98
100
 
99
- $stacked-table-breakpoints: (
100
- 'sm': 'xs',
101
- 'md': 'sm',
102
- 'lg': 'md',
103
- 'xl': 'lg',
104
- );
105
-
106
101
  &.b-table {
107
102
  &.b-table-stacked {
108
103
  @include gl-tmp-stacked-override();
109
104
  }
110
105
 
111
- @each $class, $mq in $stacked-table-breakpoints {
112
- &.b-table-stacked-#{$class} {
113
- @include media-breakpoint-down(#{$mq}) {
114
- @include gl-tmp-stacked-override();
106
+ @each $breakpoint in map.keys($grid-breakpoints) {
107
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
108
+ @if ($next != null) {
109
+ &.b-table-stacked-#{$next} {
110
+ @include gl-container-width-down(#{$next}) {
111
+ @include gl-tmp-stacked-override();
112
+ }
115
113
  }
116
114
  }
117
115
  }
@@ -1,5 +1,6 @@
1
- @import 'bootstrap';
1
+ @import 'mixins';
2
2
 
3
+ @import 'bootstrap';
3
4
  @import 'bootstrap_vue';
4
5
 
5
6
  // Design Tokens
@@ -8,7 +9,6 @@
8
9
  // Settings
9
10
  @import 'functions';
10
11
  @import 'variables';
11
- @import 'mixins';
12
12
  @import 'typescale/index';
13
13
 
14
14
  // Body
@@ -7,9 +7,11 @@
7
7
  @import '../vendor/bootstrap/scss/variables';
8
8
  @import '../vendor/bootstrap/scss/mixins';
9
9
 
10
+ @import 'mixins';
11
+
12
+ @import 'bootstrap';
10
13
  @import 'bootstrap_vue';
11
14
 
12
- @import 'mixins';
13
15
 
14
16
  @import 'fonts';
15
17
 
@@ -135,24 +135,32 @@
135
135
  //
136
136
  // Generate series of `.table-responsive-*` classes for configuring the screen
137
137
  // size of where your table will overflow.
138
+ @mixin resonsive-table-styles {
139
+ display: block;
140
+ width: 100%;
141
+ overflow-x: auto;
142
+ -webkit-overflow-scrolling: touch;
143
+
144
+ // Prevent double border on horizontal scroll due to use of `display: block;`
145
+ > .table-bordered {
146
+ border: 0;
147
+ }
148
+ }
138
149
 
139
150
  .table-responsive {
140
151
  @each $breakpoint in map.keys($grid-breakpoints) {
141
152
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
142
153
  $infix: breakpoint-infix($next, $grid-breakpoints);
143
-
144
- &#{$infix} {
145
- @include media-breakpoint-down($breakpoint) {
146
- display: block;
147
- width: 100%;
148
- overflow-x: auto;
149
- -webkit-overflow-scrolling: touch;
150
-
151
- // Prevent double border on horizontal scroll due to use of `display: block;`
152
- > .table-bordered {
153
- border: 0;
154
+ @if ($next != null) {
155
+ &#{$infix} {
156
+ @include gl-container-width-down($next) {
157
+ @include resonsive-table-styles;
154
158
  }
155
159
  }
156
160
  }
157
161
  }
162
+
163
+ & {
164
+ @include resonsive-table-styles;
165
+ }
158
166
  }
@@ -378,6 +378,89 @@ $bv-escaped-characters: (("<", "%3c"), (">", "%3e"), ("#", "%23"));
378
378
  }
379
379
 
380
380
  // --- Stacked tables ---
381
+ @mixin stacked-table-styles {
382
+ display: block;
383
+ width: 100%;
384
+
385
+ // Convert to blocks when stacked
386
+ > caption,
387
+ > tbody,
388
+ > tbody > tr,
389
+ > tbody > tr > td,
390
+ > tbody > tr > th {
391
+ display: block;
392
+ }
393
+
394
+ // Hide when stacked
395
+ > thead,
396
+ > tfoot {
397
+ display: none;
398
+
399
+ > tr.b-table-top-row,
400
+ > tr.b-table-bottom-row {
401
+ display: none;
402
+ }
403
+ }
404
+
405
+ // Caption positioning
406
+ > caption {
407
+ caption-side: top !important;
408
+ }
409
+
410
+ > tbody {
411
+ > tr {
412
+ // Turn cells with labels into micro-grids
413
+ > [data-label] {
414
+ // Cell header label pseudo element
415
+ &::before {
416
+ content: attr(data-label);
417
+ width: $b-table-stacked-heading-width;
418
+ float: left;
419
+ text-align: right;
420
+ overflow-wrap: break-word;
421
+ font-weight: bold;
422
+ font-style: normal;
423
+ padding: 0 calc(#{$b-table-stacked-gap} / 2) 0 0;
424
+ margin: 0;
425
+ }
426
+
427
+ // Add clearfix in-case field label wraps
428
+ &::after {
429
+ display: block;
430
+ clear: both;
431
+ content: "";
432
+ }
433
+
434
+ // Cell value (we wrap the cell value in a div when stacked)
435
+ > div {
436
+ display: inline-block;
437
+ width: calc(100% - #{$b-table-stacked-heading-width});
438
+ // Add "gap" between "cells"
439
+ padding: 0 0 0 calc(#{$b-table-stacked-gap} / 2);
440
+ margin: 0;
441
+ }
442
+ }
443
+
444
+ // Dont show the fixed top/bottom rows
445
+ &.top-row,
446
+ &.bottom-row {
447
+ display: none;
448
+ }
449
+
450
+ // Give the top cell of each "row" a heavy border
451
+ > :first-child {
452
+ border-top-width: (3 * $table-border-width);
453
+ }
454
+
455
+ // Give any cell after a rowspan'ed cell a heavy top border
456
+ > [rowspan] + td,
457
+ > [rowspan] + th {
458
+ border-top-width: (3 * $table-border-width);
459
+ }
460
+ }
461
+ }
462
+ }
463
+
381
464
  @if $bv-enable-table-stacked {
382
465
  .table.b-table {
383
466
  &.b-table-stacked {
@@ -385,91 +468,18 @@ $bv-escaped-characters: (("<", "%3c"), (">", "%3e"), ("#", "%23"));
385
468
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
386
469
  $infix: breakpoint-infix($next, $grid-breakpoints);
387
470
 
388
- &#{$infix} {
389
- @include media-breakpoint-down($breakpoint) {
390
- display: block;
391
- width: 100%;
392
-
393
- // Convert to blocks when stacked
394
- > caption,
395
- > tbody,
396
- > tbody > tr,
397
- > tbody > tr > td,
398
- > tbody > tr > th {
399
- display: block;
400
- }
401
-
402
- // Hide when stacked
403
- > thead,
404
- > tfoot {
405
- display: none;
406
-
407
- > tr.b-table-top-row,
408
- > tr.b-table-bottom-row {
409
- display: none;
410
- }
411
- }
412
-
413
- // Caption positioning
414
- > caption {
415
- caption-side: top !important;
416
- }
417
-
418
- > tbody {
419
- > tr {
420
- // Turn cells with labels into micro-grids
421
- > [data-label] {
422
- // Cell header label pseudo element
423
- &::before {
424
- content: attr(data-label);
425
- width: $b-table-stacked-heading-width;
426
- float: left;
427
- text-align: right;
428
- overflow-wrap: break-word;
429
- font-weight: bold;
430
- font-style: normal;
431
- padding: 0 calc(#{$b-table-stacked-gap} / 2) 0 0;
432
- margin: 0;
433
- }
434
-
435
- // Add clearfix in-case field label wraps
436
- &::after {
437
- display: block;
438
- clear: both;
439
- content: "";
440
- }
441
-
442
- // Cell value (we wrap the cell value in a div when stacked)
443
- > div {
444
- display: inline-block;
445
- width: calc(100% - #{$b-table-stacked-heading-width});
446
- // Add "gap" between "cells"
447
- padding: 0 0 0 calc(#{$b-table-stacked-gap} / 2);
448
- margin: 0;
449
- }
450
- }
451
-
452
- // Dont show the fixed top/bottom rows
453
- &.top-row,
454
- &.bottom-row {
455
- display: none;
456
- }
457
-
458
- // Give the top cell of each "row" a heavy border
459
- > :first-child {
460
- border-top-width: (3 * $table-border-width);
461
- }
462
-
463
- // Give any cell after a rowspan'ed cell a heavy top border
464
- > [rowspan] + td,
465
- > [rowspan] + th {
466
- border-top-width: (3 * $table-border-width);
467
- }
468
- }
471
+ @if ($next != null) {
472
+ &#{$infix} {
473
+ @include gl-container-width-down($next) {
474
+ @include stacked-table-styles;
469
475
  }
470
476
  }
471
477
  }
472
478
  }
479
+
480
+ & {
481
+ @include stacked-table-styles;
482
+ }
473
483
  }
474
484
  }
475
485
  }