@gitlab/ui 37.5.2 → 37.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": "37.5.2",
3
+ "version": "37.8.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { cloneDeep } from 'lodash';
2
+ import { cloneDeep, isEqual } from 'lodash';
3
3
  import PortalVue from 'portal-vue';
4
4
  import Vue from 'vue';
5
5
  import { GlTooltipDirective } from '../../../directives/tooltip';
@@ -146,13 +146,21 @@ export default {
146
146
  deep: true,
147
147
  immediate: true,
148
148
  },
149
+ value: {
150
+ handler(newValue, oldValue) {
151
+ if (newValue.length && !isEqual(newValue, oldValue)) {
152
+ this.applyNewValue(cloneDeep(newValue));
153
+ }
154
+ },
155
+ deep: true,
156
+ immediate: true,
157
+ },
149
158
  },
150
159
  mounted() {
151
160
  if (this.value.length) {
152
161
  this.applyNewValue(cloneDeep(this.value));
153
162
  }
154
163
  },
155
-
156
164
  methods: {
157
165
  applyNewValue(newValue) {
158
166
  this.tokens = needDenormalization(newValue) ? denormalizeTokens(newValue) : newValue;
@@ -20,11 +20,11 @@ behave in the modals footer. The props receive an object as such:
20
20
  ```js
21
21
  {
22
22
  text: 'Save Changes',
23
- attributes: [
24
- { variant: 'confirm' },
25
- { disabled: this.someState },
26
- { class: 'some-class' },
23
+ attributes: {
24
+ variant: 'confirm',
25
+ disabled: this.someState,
26
+ class: 'some-class',
27
27
  ...
28
- ]
28
+ }
29
29
  }
30
30
  ```
@@ -107,14 +107,14 @@ describe('Modal component', () => {
107
107
  const props = {
108
108
  actionPrimary: {
109
109
  text: 'Primary',
110
- attributes: [{ variant: 'info' }],
110
+ attributes: { variant: 'info' },
111
111
  },
112
112
  actionSecondary: {
113
113
  text: 'Secondary',
114
114
  },
115
115
  actionCancel: {
116
116
  text: 'Cancel',
117
- attributes: [{ variant: 'danger' }],
117
+ attributes: { variant: 'danger' },
118
118
  },
119
119
  };
120
120
 
@@ -48,12 +48,12 @@ behave and look. The props receive an object as such:
48
48
  ~~~js
49
49
  {
50
50
  text: 'Save Changes',
51
- attributes: [
52
- { variant: 'info' },
53
- { disabled: this.someState },
54
- { class: 'some-class' },
51
+ attributes: {
52
+ variant: 'info',
53
+ disabled: this.someState,
54
+ class: 'some-class',
55
55
  ...
56
- ]
56
+ }
57
57
  }
58
58
  ~~~
59
59
 
@@ -78,6 +78,11 @@ export default {
78
78
  required: false,
79
79
  default: false,
80
80
  },
81
+ invertInDarkMode: {
82
+ type: Boolean,
83
+ required: false,
84
+ default: true,
85
+ },
81
86
  },
82
87
  computed: {
83
88
  height() {
@@ -108,7 +113,14 @@ export default {
108
113
  :class="{ 'gl-display-none gl-sm-display-block gl-px-4': compact, 'gl-max-w-full': !compact }"
109
114
  >
110
115
  <div v-if="svgPath" :class="{ 'svg-content': !compact }" class="svg-250">
111
- <img :src="svgPath" alt="" role="img" class="gl-max-w-full" :height="height" />
116
+ <img
117
+ :src="svgPath"
118
+ alt=""
119
+ role="img"
120
+ :class="{ 'gl-dark-invert-keep-hue': invertInDarkMode }"
121
+ class="gl-max-w-full"
122
+ :height="height"
123
+ />
112
124
  </div>
113
125
  </div>
114
126
  <div :class="compact ? 'gl-flex-grow-1 gl-flex-basis-0 gl-px-4' : 'gl-max-w-full gl-m-auto'">
@@ -1896,6 +1896,14 @@
1896
1896
  box-shadow: inset 0 0 0 $gl-border-size-1 $red-600 !important
1897
1897
  }
1898
1898
 
1899
+ .gl-inset-border-l-3-red-600 {
1900
+ box-shadow: inset $gl-border-size-3 0 0 0 $red-600
1901
+ }
1902
+
1903
+ .gl-inset-border-l-3-red-600\! {
1904
+ box-shadow: inset $gl-border-size-3 0 0 0 $red-600 !important
1905
+ }
1906
+
1899
1907
  .gl-inset-border-b-2-theme-accent {
1900
1908
  box-shadow: inset 0 -#{$gl-border-size-2} 0 0 var(--gl-theme-accent, $theme-indigo-500)
1901
1909
  }
@@ -2448,6 +2456,18 @@
2448
2456
  .gl-text-theme-indigo-900\! {
2449
2457
  color: $theme-indigo-900 !important;
2450
2458
  }
2459
+
2460
+ .gl-dark-invert-keep-hue {
2461
+ .gl-dark & {
2462
+ filter: invert(0.8) hue-rotate(180deg);
2463
+ }
2464
+ }
2465
+
2466
+ .gl-dark-invert-keep-hue\! {
2467
+ .gl-dark & {
2468
+ filter: invert(0.8) hue-rotate(180deg) !important;
2469
+ }
2470
+ }
2451
2471
  .gl-content-empty {
2452
2472
  content: ''
2453
2473
  }
@@ -104,6 +104,10 @@
104
104
  box-shadow: inset 0 0 0 $gl-border-size-1 $red-600;
105
105
  }
106
106
 
107
+ @mixin gl-inset-border-l-3-red-600 {
108
+ box-shadow: inset $gl-border-size-3 0 0 0 $red-600;
109
+ }
110
+
107
111
  @mixin gl-inset-border-b-2-theme-accent {
108
112
  box-shadow: inset 0 -#{$gl-border-size-2} 0 0 var(--gl-theme-accent, $theme-indigo-500);
109
113
  }
@@ -196,3 +196,9 @@
196
196
  @mixin gl-text-theme-indigo-900 {
197
197
  color: $theme-indigo-900;
198
198
  }
199
+
200
+ @mixin gl-dark-invert-keep-hue {
201
+ .gl-dark & {
202
+ filter: invert(0.8) hue-rotate(180deg);
203
+ }
204
+ }