@gitlab/ui 43.6.0 → 43.8.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": "43.6.0",
3
+ "version": "43.8.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -104,7 +104,7 @@
104
104
  "bootstrap": "4.5.3",
105
105
  "cypress": "^6.6.0",
106
106
  "emoji-regex": "^10.0.0",
107
- "eslint": "8.21.0",
107
+ "eslint": "8.22.0",
108
108
  "eslint-import-resolver-jest": "3.0.2",
109
109
  "eslint-plugin-cypress": "2.12.1",
110
110
  "eslint-plugin-storybook": "0.6.4",
@@ -308,6 +308,9 @@ export const glIconChevronLeft = ''
308
308
  export const glIconChevronRight = ''
309
309
  export const glIconChevronDown = ''
310
310
  export const glIconSelectChevronDown = ''
311
+ export const glIconCheck = ''
312
+ export const glIconIndeterminate = ''
313
+ export const glIconRadio = ''
311
314
  export const defaultIconSize = '1rem'
312
315
  export const glIconSizes = '8 12 14 16 24 32 48 72'
313
316
  export const glDropdownWidth = '15rem'
@@ -1629,6 +1629,42 @@
1629
1629
  ],
1630
1630
  "compiledValue": ""
1631
1631
  },
1632
+ {
1633
+ "name": "$gl-icon-check",
1634
+ "value": "data:image/svg+xml,%3Csvg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M1 3.05299L2.99123 5L7 1\" stroke=\"white\" stroke-width=\"2\"/%3E%3C/svg%3E%0A",
1635
+ "mapValue": [
1636
+ {
1637
+ "name": "data",
1638
+ "value": "image",
1639
+ "compiledValue": "image"
1640
+ }
1641
+ ],
1642
+ "compiledValue": ""
1643
+ },
1644
+ {
1645
+ "name": "$gl-icon-indeterminate",
1646
+ "value": "data:image/svg+xml,%3Csvg width=\"8\" height=\"2\" viewBox=\"0 0 8 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M0 1L8 1\" stroke=\"white\" stroke-width=\"2\"/%3E%3C/svg%3E%0A",
1647
+ "mapValue": [
1648
+ {
1649
+ "name": "data",
1650
+ "value": "image",
1651
+ "compiledValue": "image"
1652
+ }
1653
+ ],
1654
+ "compiledValue": ""
1655
+ },
1656
+ {
1657
+ "name": "$gl-icon-radio",
1658
+ "value": "data:image/svg+xml,%3Csvg width=\"6\" height=\"6\" viewBox=\"0 0 6 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Ccircle cx=\"3\" cy=\"3\" r=\"3\" fill=\"white\"/%3E%3C/svg%3E%0A",
1659
+ "mapValue": [
1660
+ {
1661
+ "name": "data",
1662
+ "value": "image",
1663
+ "compiledValue": "image"
1664
+ }
1665
+ ],
1666
+ "compiledValue": ""
1667
+ },
1632
1668
  {
1633
1669
  "name": "$default-icon-size",
1634
1670
  "value": "px-to-rem(16px)",
@@ -463,7 +463,7 @@
463
463
  &[disabled]:active,
464
464
  &[disabled].selected {
465
465
  @include gl-bg-gray-10;
466
- @include gl-text-gray-400;
466
+ @include gl-text-gray-500;
467
467
  @include gl-inset-border-1-gray-100;
468
468
  @include gl-opacity-10;
469
469
  cursor: not-allowed !important;
@@ -79,6 +79,29 @@
79
79
  }
80
80
  }
81
81
 
82
+ .custom-control-input[type='checkbox']:checked ~ .custom-control-label,
83
+ .custom-control-input[type='checkbox']:indeterminate ~ .custom-control-label,
84
+ .custom-control-input[type='radio']:checked ~ .custom-control-label {
85
+ &::after {
86
+ @include gl-bg-none;
87
+ @include gl-bg-white;
88
+ mask-repeat: no-repeat;
89
+ mask-position: center center;
90
+ }
91
+ }
92
+
93
+ .custom-control-input[type='checkbox']:checked ~ .custom-control-label::after {
94
+ mask-image: url($gl-icon-check);
95
+ }
96
+
97
+ .custom-control-input[type='checkbox']:indeterminate ~ .custom-control-label::after {
98
+ mask-image: url($gl-icon-indeterminate);
99
+ }
100
+
101
+ .custom-control-input[type='radio']:checked ~ .custom-control-label::after {
102
+ mask-image: url($gl-icon-radio);
103
+ }
104
+
82
105
  .custom-control-input:not(:disabled):checked ~ .custom-control-label:hover,
83
106
  .custom-control-input:not(:disabled):focus:checked ~ .custom-control-label {
84
107
  &::before {
@@ -88,19 +111,15 @@
88
111
  }
89
112
 
90
113
  &.custom-checkbox {
91
- .custom-control-input:indeterminate ~ .custom-control-label {
92
- &::before {
93
- @include gl-bg-blue-500;
94
- @include gl-border-blue-500;
95
- }
114
+ .custom-control-input:indeterminate ~ .custom-control-label::before {
115
+ @include gl-bg-blue-500;
116
+ @include gl-border-blue-500;
96
117
  }
97
118
 
98
- .custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover,
99
- .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label {
100
- &::before {
101
- @include gl-bg-blue-700;
102
- @include gl-border-blue-700;
103
- }
119
+ .custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover::before,
120
+ .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label::before {
121
+ @include gl-bg-blue-700;
122
+ @include gl-border-blue-700;
104
123
  }
105
124
  }
106
125
 
@@ -108,10 +127,23 @@
108
127
  @include gl-cursor-not-allowed;
109
128
 
110
129
  &::before {
111
- @include gl-opacity-5;
130
+ @include gl-bg-gray-50;
131
+ @include gl-border-gray-100;
112
132
  @include gl-pointer-events-auto;
113
133
  }
114
134
  }
135
+
136
+ .custom-control-input:checked:disabled ~ .custom-control-label,
137
+ .custom-control-input:indeterminate:disabled ~ .custom-control-label {
138
+ &::before {
139
+ @include gl-bg-gray-100;
140
+ @include gl-border-gray-100;
141
+ }
142
+
143
+ &::after {
144
+ @include gl-bg-gray-500;
145
+ }
146
+ }
115
147
  }
116
148
 
117
149
  .help-text {
@@ -21,7 +21,7 @@
21
21
 
22
22
  &:disabled {
23
23
  @include gl-cursor-not-allowed;
24
- @include gl-text-gray-400;
24
+ @include gl-text-gray-500;
25
25
  }
26
26
 
27
27
  &:not(.form-control-plaintext):focus {
@@ -32,7 +32,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
32
32
  &:disabled {
33
33
  @include gl-bg-gray-10;
34
34
  @include gl-inset-border-1-gray-100;
35
- @include gl-text-gray-400;
35
+ @include gl-text-gray-500;
36
36
  @include gl-cursor-not-allowed;
37
37
  }
38
38
 
@@ -64,6 +64,10 @@ table.gl-table {
64
64
  @include gl-border-t-solid;
65
65
  @include gl-border-t-1;
66
66
  }
67
+
68
+ &:not(:first-child) {
69
+ @include gl-border-t-none;
70
+ }
67
71
  }
68
72
 
69
73
  div {
@@ -3216,6 +3216,66 @@
3216
3216
  }
3217
3217
  }
3218
3218
 
3219
+ .gl-flex-wrap-wrap {
3220
+ flex-wrap: wrap;
3221
+ }
3222
+
3223
+ .gl-flex-wrap-wrap\! {
3224
+ flex-wrap: wrap !important;
3225
+ }
3226
+
3227
+ .gl-lg-flex-wrap-wrap {
3228
+ @include gl-media-breakpoint-up(lg) {
3229
+ flex-wrap: wrap;
3230
+ }
3231
+ }
3232
+
3233
+ .gl-lg-flex-wrap-wrap\! {
3234
+ @include gl-media-breakpoint-up(lg) {
3235
+ flex-wrap: wrap !important;
3236
+ }
3237
+ }
3238
+
3239
+ .gl-xl-flex-wrap-wrap {
3240
+ @include gl-media-breakpoint-up(xl) {
3241
+ flex-wrap: wrap;
3242
+ }
3243
+ }
3244
+
3245
+ .gl-xl-flex-wrap-wrap\! {
3246
+ @include gl-media-breakpoint-up(xl) {
3247
+ flex-wrap: wrap !important;
3248
+ }
3249
+ }
3250
+
3251
+ .gl-sm-flex-wrap-wrap {
3252
+ @include gl-media-breakpoint-up(sm) {
3253
+ flex-wrap: wrap;
3254
+ }
3255
+ }
3256
+
3257
+ .gl-sm-flex-wrap-wrap\! {
3258
+ @include gl-media-breakpoint-up(sm) {
3259
+ flex-wrap: wrap !important;
3260
+ }
3261
+ }
3262
+
3263
+ .gl-flex-wrap-wrap-reverse {
3264
+ flex-wrap: wrap-reverse;
3265
+ }
3266
+
3267
+ .gl-flex-wrap-wrap-reverse\! {
3268
+ flex-wrap: wrap-reverse !important;
3269
+ }
3270
+
3271
+ .gl-flex-wrap-nowrap {
3272
+ flex-wrap: nowrap;
3273
+ }
3274
+
3275
+ .gl-flex-wrap-nowrap\! {
3276
+ flex-wrap: nowrap !important;
3277
+ }
3278
+
3219
3279
  .gl-flex-nowrap {
3220
3280
  flex-wrap: nowrap;
3221
3281
  }
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * Flexbox utilities
3
+ *
4
+ * Naming convention: gl-{breakpoint?}-{property}-{value}
3
5
  */
4
6
  @mixin gl-align-items-baseline {
5
7
  align-items: baseline;
@@ -63,6 +65,11 @@
63
65
  }
64
66
  }
65
67
 
68
+ /**
69
+ * `gl-*flex-wrap` is deprecated; use `gl-*flex-wrap-wrap` instead.
70
+ * TODO: delete `gl-*flex-wrap` utilities classes, see
71
+ * https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1951
72
+ */
66
73
  @mixin gl-flex-wrap {
67
74
  flex-wrap: wrap;
68
75
  }
@@ -85,6 +92,41 @@
85
92
  }
86
93
  }
87
94
 
95
+ @mixin gl-flex-wrap-wrap {
96
+ flex-wrap: wrap;
97
+ }
98
+
99
+ @mixin gl-lg-flex-wrap-wrap {
100
+ @include gl-media-breakpoint-up(lg) {
101
+ @include gl-flex-wrap-wrap;
102
+ }
103
+ }
104
+
105
+ @mixin gl-xl-flex-wrap-wrap {
106
+ @include gl-media-breakpoint-up(xl) {
107
+ @include gl-flex-wrap-wrap;
108
+ }
109
+ }
110
+
111
+ @mixin gl-sm-flex-wrap-wrap {
112
+ @include gl-media-breakpoint-up(sm) {
113
+ @include gl-flex-wrap-wrap;
114
+ }
115
+ }
116
+
117
+ @mixin gl-flex-wrap-wrap-reverse {
118
+ flex-wrap: wrap-reverse;
119
+ }
120
+
121
+ @mixin gl-flex-wrap-nowrap {
122
+ flex-wrap: nowrap;
123
+ }
124
+
125
+ /**
126
+ * `gl-flex-nowrap` is deprecated; use `gl-flex-wrap-nowrap` instead.
127
+ * TODO: delete `gl-flex-wrap-nowrap` utility class, see
128
+ * https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1951
129
+ */
88
130
  @mixin gl-flex-nowrap {
89
131
  flex-wrap: nowrap;
90
132
  }
@@ -438,6 +438,9 @@ $gl-icon-chevron-left: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="
438
438
  $gl-icon-chevron-right: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path fill-rule="evenodd" d="M10.707 7.293a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L8.586 8 6.293 5.707a1 1 0 0 1 1.414-1.414l3 3z"/></svg>';
439
439
  $gl-icon-chevron-down: 'data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path fill-rule="evenodd" d="M7.293 10.707a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L8 8.586 5.707 6.293a1 1 0 0 0-1.414 1.414l3 3z"/></svg>';
440
440
  $gl-icon-select-chevron-down: 'data:image/svg+xml,%3Csvg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M0.21967 0.21967C0.512563 -0.0732232 0.987437 -0.0732232 1.28033 0.21967L4 2.93934L6.71967 0.21967C7.01256 -0.073223 7.48744 -0.0732229 7.78033 0.21967C8.07322 0.512563 8.07322 0.987437 7.78033 1.28033L4.53033 4.53033C4.23744 4.82322 3.76256 4.82322 3.46967 4.53033L0.21967 1.28033C-0.0732233 0.987437 -0.0732233 0.512563 0.21967 0.21967Z" fill="%23666666"/%3E%3C/svg%3E%0A';
441
+ $gl-icon-check: 'data:image/svg+xml,%3Csvg width="8" height="7" viewBox="0 0 8 7" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M1 3.05299L2.99123 5L7 1" stroke="white" stroke-width="2"/%3E%3C/svg%3E%0A';
442
+ $gl-icon-indeterminate: 'data:image/svg+xml,%3Csvg width="8" height="2" viewBox="0 0 8 2" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 1L8 1" stroke="white" stroke-width="2"/%3E%3C/svg%3E%0A';
443
+ $gl-icon-radio: 'data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="3" cy="3" r="3" fill="white"/%3E%3C/svg%3E%0A';
441
444
 
442
445
  // Icons
443
446
  $default-icon-size: px-to-rem(16px);