@gitlab/ui 42.0.1 → 42.3.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": "42.0.1",
3
+ "version": "42.3.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -83,7 +83,7 @@
83
83
  "@babel/preset-env": "^7.10.2",
84
84
  "@gitlab/eslint-plugin": "12.3.0",
85
85
  "@gitlab/stylelint-config": "4.1.0",
86
- "@gitlab/svgs": "2.20.0",
86
+ "@gitlab/svgs": "2.21.0",
87
87
  "@rollup/plugin-commonjs": "^11.1.0",
88
88
  "@rollup/plugin-node-resolve": "^7.1.3",
89
89
  "@rollup/plugin-replace": "^2.3.2",
@@ -89,7 +89,7 @@ export const purple700 = '#5943b6'
89
89
  export const purple800 = '#453894'
90
90
  export const purple900 = '#2f2a6b'
91
91
  export const purple950 = '#232150'
92
- export const gray10 = '#fafafa'
92
+ export const gray10 = '#f5f5f5'
93
93
  export const gray50 = '#f0f0f0'
94
94
  export const gray100 = '#dbdbdb'
95
95
  export const gray200 = '#bfbfbf'
@@ -342,7 +342,7 @@ export const spacer = '0.5rem'
342
342
  export const spacers = '(1: 0.25rem, 2: 0.5rem, 3: 1rem, 4: 1.5rem, 5: 2rem, 6: 2.5rem, 7: 3rem, 8: 3.5rem, 9: 4rem)'
343
343
  export const tableAccentBg = '#f0f0f0'
344
344
  export const cardBorderColor = '#dbdbdb'
345
- export const cardCapBg = '#fafafa'
345
+ export const cardCapBg = '#f5f5f5'
346
346
  export const glFormInputSizes = '(xs: 5rem, sm: 10rem, md: 15rem, lg: 20rem, xl: 35rem)'
347
347
  export const popoverBg = '#fff'
348
348
  export const popoverArrowWidth = '0.5rem'
@@ -484,8 +484,8 @@
484
484
  },
485
485
  {
486
486
  "name": "$gray-10",
487
- "value": "#fafafa",
488
- "compiledValue": "#fafafa"
487
+ "value": "#f5f5f5",
488
+ "compiledValue": "#f5f5f5"
489
489
  },
490
490
  {
491
491
  "name": "$gray-50",
@@ -1795,7 +1795,7 @@
1795
1795
  {
1796
1796
  "name": "$card-cap-bg",
1797
1797
  "value": "$gray-10",
1798
- "compiledValue": "#fafafa"
1798
+ "compiledValue": "#f5f5f5"
1799
1799
  },
1800
1800
  {
1801
1801
  "name": "$gl-form-input-sizes",
@@ -103,4 +103,19 @@ describe('GlAccordionItem', () => {
103
103
  expect(findButton().props('icon')).toBe('chevron-down');
104
104
  expect(findCollapse().props('visible')).toBe(true);
105
105
  });
106
+
107
+ it('emits the initial visible state', () => {
108
+ createComponent({ visible: true });
109
+
110
+ expect(wrapper.emitted('input')).toEqual([[true]]);
111
+ });
112
+
113
+ it('emits the visible state when toggled', async () => {
114
+ createComponent({ visible: true });
115
+
116
+ await waitForAnimationFrame();
117
+ await findButton().trigger('click');
118
+
119
+ expect(wrapper.emitted('input')).toEqual([[true], [false]]);
120
+ });
106
121
  });
@@ -15,6 +15,10 @@ export default {
15
15
  },
16
16
  inject: ['accordionSetId', 'defaultHeaderLevel'],
17
17
  inheritAttrs: false,
18
+ model: {
19
+ prop: 'visible',
20
+ event: 'input',
21
+ },
18
22
  props: {
19
23
  /*
20
24
  Used to set the title of accordion link
@@ -72,6 +76,14 @@ When set, it will ensure the accordion item is initially visible
72
76
  return this.isVisible && this.titleVisible ? this.titleVisible : this.title;
73
77
  },
74
78
  },
79
+ watch: {
80
+ isVisible: {
81
+ immediate: true,
82
+ handler(isVisible) {
83
+ this.$emit('input', isVisible);
84
+ },
85
+ },
86
+ },
75
87
  };
76
88
  </script>
77
89
 
@@ -4687,6 +4687,30 @@
4687
4687
  }
4688
4688
  }
4689
4689
 
4690
+ .gl-lg-w-30p {
4691
+ @include gl-media-breakpoint-up(lg) {
4692
+ width: 30%;
4693
+ }
4694
+ }
4695
+
4696
+ .gl-lg-w-30p\! {
4697
+ @include gl-media-breakpoint-up(lg) {
4698
+ width: 30% !important;
4699
+ }
4700
+ }
4701
+
4702
+ .gl-lg-w-40p {
4703
+ @include gl-media-breakpoint-up(lg) {
4704
+ width: 40%;
4705
+ }
4706
+ }
4707
+
4708
+ .gl-lg-w-40p\! {
4709
+ @include gl-media-breakpoint-up(lg) {
4710
+ width: 40% !important;
4711
+ }
4712
+ }
4713
+
4690
4714
  .gl-lg-w-50p {
4691
4715
  @include gl-media-breakpoint-up(lg) {
4692
4716
  width: 50%;
@@ -6280,6 +6304,26 @@
6280
6304
  margin-right: $gl-spacing-scale-3 !important;
6281
6305
  }
6282
6306
  }
6307
+ .gl-lg-mr-10 {
6308
+ @include gl-media-breakpoint-up(lg) {
6309
+ margin-right: $gl-spacing-scale-10;
6310
+ }
6311
+ }
6312
+ .gl-lg-mr-10\! {
6313
+ @include gl-media-breakpoint-up(lg) {
6314
+ margin-right: $gl-spacing-scale-10 !important;
6315
+ }
6316
+ }
6317
+ .gl-lg-mr-12 {
6318
+ @include gl-media-breakpoint-up(lg) {
6319
+ margin-right: $gl-spacing-scale-12;
6320
+ }
6321
+ }
6322
+ .gl-lg-mr-12\! {
6323
+ @include gl-media-breakpoint-up(lg) {
6324
+ margin-right: $gl-spacing-scale-12 !important;
6325
+ }
6326
+ }
6283
6327
  .gl-lg-ml-2 {
6284
6328
  @include gl-media-breakpoint-up(lg) {
6285
6329
  margin-left: $gl-spacing-scale-2;
@@ -6300,6 +6344,26 @@
6300
6344
  margin-left: $gl-spacing-scale-3 !important;
6301
6345
  }
6302
6346
  }
6347
+ .gl-lg-ml-10 {
6348
+ @include gl-media-breakpoint-up(lg) {
6349
+ margin-left: $gl-spacing-scale-10;
6350
+ }
6351
+ }
6352
+ .gl-lg-ml-10\! {
6353
+ @include gl-media-breakpoint-up(lg) {
6354
+ margin-left: $gl-spacing-scale-10 !important;
6355
+ }
6356
+ }
6357
+ .gl-lg-ml-12 {
6358
+ @include gl-media-breakpoint-up(lg) {
6359
+ margin-left: $gl-spacing-scale-12;
6360
+ }
6361
+ }
6362
+ .gl-lg-ml-12\! {
6363
+ @include gl-media-breakpoint-up(lg) {
6364
+ margin-left: $gl-spacing-scale-12 !important;
6365
+ }
6366
+ }
6303
6367
  .gl-lg-mx-2 {
6304
6368
  @include gl-media-breakpoint-up(lg) {
6305
6369
  margin-left: $gl-spacing-scale-2;
@@ -6324,6 +6388,18 @@
6324
6388
  margin-right: $gl-spacing-scale-3 !important;
6325
6389
  }
6326
6390
  }
6391
+ .gl-lg-mx-12 {
6392
+ @include gl-media-breakpoint-up(lg) {
6393
+ margin-left: $gl-spacing-scale-12;
6394
+ margin-right: $gl-spacing-scale-12;
6395
+ }
6396
+ }
6397
+ .gl-lg-mx-12\! {
6398
+ @include gl-media-breakpoint-up(lg) {
6399
+ margin-left: $gl-spacing-scale-12 !important;
6400
+ margin-right: $gl-spacing-scale-12 !important;
6401
+ }
6402
+ }
6327
6403
  .gl-lg-my-5 {
6328
6404
  @include gl-media-breakpoint-up(lg) {
6329
6405
  margin-top: $gl-spacing-scale-5;
@@ -276,6 +276,18 @@
276
276
  }
277
277
  }
278
278
 
279
+ @mixin gl-lg-w-30p {
280
+ @include gl-media-breakpoint-up(lg) {
281
+ width: 30%;
282
+ }
283
+ }
284
+
285
+ @mixin gl-lg-w-40p {
286
+ @include gl-media-breakpoint-up(lg) {
287
+ width: 40%;
288
+ }
289
+ }
290
+
279
291
  @mixin gl-lg-w-50p {
280
292
  @include gl-media-breakpoint-up(lg) {
281
293
  width: 50%;
@@ -889,6 +889,18 @@
889
889
  }
890
890
  }
891
891
 
892
+ @mixin gl-lg-mr-10 {
893
+ @include gl-media-breakpoint-up(lg) {
894
+ margin-right: $gl-spacing-scale-10;
895
+ }
896
+ }
897
+
898
+ @mixin gl-lg-mr-12 {
899
+ @include gl-media-breakpoint-up(lg) {
900
+ margin-right: $gl-spacing-scale-12;
901
+ }
902
+ }
903
+
892
904
  @mixin gl-lg-ml-2 {
893
905
  @include gl-media-breakpoint-up(lg) {
894
906
  @include gl-ml-2;
@@ -901,6 +913,18 @@
901
913
  }
902
914
  }
903
915
 
916
+ @mixin gl-lg-ml-10 {
917
+ @include gl-media-breakpoint-up(lg) {
918
+ margin-left: $gl-spacing-scale-10;
919
+ }
920
+ }
921
+
922
+ @mixin gl-lg-ml-12 {
923
+ @include gl-media-breakpoint-up(lg) {
924
+ margin-left: $gl-spacing-scale-12;
925
+ }
926
+ }
927
+
904
928
  @mixin gl-lg-mx-2 {
905
929
  @include gl-media-breakpoint-up(lg) {
906
930
  @include gl-mx-2;
@@ -913,6 +937,13 @@
913
937
  }
914
938
  }
915
939
 
940
+ @mixin gl-lg-mx-12 {
941
+ @include gl-media-breakpoint-up(lg) {
942
+ margin-left: $gl-spacing-scale-12;
943
+ margin-right: $gl-spacing-scale-12;
944
+ }
945
+ }
946
+
916
947
  @mixin gl-lg-my-5 {
917
948
  @include gl-media-breakpoint-up(lg) {
918
949
  @include gl-my-5;
@@ -136,7 +136,7 @@ Before After (reflected below)
136
136
  * Passes 4.5:1 contrast ratio on $gray-10
137
137
  */
138
138
 
139
- $gray-10: #fafafa !default;
139
+ $gray-10: #f5f5f5 !default;
140
140
  $gray-50: #f0f0f0 !default;
141
141
  $gray-100: #dbdbdb !default;
142
142
  $gray-200: #bfbfbf !default;