@gitlab/ui 110.1.0 → 111.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.
- package/CHANGELOG.md +22 -0
- package/dist/components/base/link/link.js +254 -10
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -2
- package/dist/components/charts/heatmap/heatmap.js +4 -4
- package/dist/components/charts/legend/legend.js +1 -2
- package/dist/components/charts/line/line.js +1 -2
- package/dist/directives/safe_link/safe_link.js +6 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +8 -1
- package/dist/tokens/build/js/tokens.js +8 -1
- package/dist/tokens/css/tokens.css +7 -0
- package/dist/tokens/css/tokens.dark.css +7 -0
- package/dist/tokens/js/tokens.dark.js +7 -0
- package/dist/tokens/js/tokens.js +7 -0
- package/dist/tokens/json/tokens.dark.json +171 -0
- package/dist/tokens/json/tokens.json +171 -0
- package/dist/tokens/scss/_tokens.dark.scss +7 -0
- package/dist/tokens/scss/_tokens.scss +7 -0
- package/dist/tokens/scss/_tokens_custom_properties.scss +7 -0
- package/dist/utils/charts/theme.js +31 -29
- package/dist/utils/constants.js +3 -1
- package/dist/utils/is_slot_empty.js +1 -1
- package/package.json +6 -14
- package/src/components/base/link/link.md +109 -0
- package/src/components/base/link/link.vue +283 -18
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -2
- package/src/components/charts/heatmap/heatmap.vue +4 -4
- package/src/components/charts/legend/legend.vue +1 -2
- package/src/components/charts/line/line.vue +1 -2
- package/src/directives/safe_link/safe_link.js +7 -3
- package/src/tokens/build/css/tokens.css +7 -0
- package/src/tokens/build/css/tokens.dark.css +7 -0
- package/src/tokens/build/js/tokens.dark.js +7 -0
- package/src/tokens/build/js/tokens.js +7 -0
- package/src/tokens/build/json/tokens.dark.json +171 -0
- package/src/tokens/build/json/tokens.json +171 -0
- package/src/tokens/build/scss/_tokens.dark.scss +7 -0
- package/src/tokens/build/scss/_tokens.scss +7 -0
- package/src/tokens/build/scss/_tokens_custom_properties.scss +7 -0
- package/src/tokens/contextual/chart.tokens.json +68 -0
- package/src/utils/charts/theme.js +150 -153
- package/src/utils/constants.js +3 -0
- package/src/utils/is_slot_empty.js +1 -2
|
@@ -1,17 +1,128 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import isFunction from 'lodash/isFunction';
|
|
4
|
+
import isString from 'lodash/isString';
|
|
5
|
+
import isObject from 'lodash/isObject';
|
|
6
|
+
import toString from 'lodash/toString';
|
|
7
|
+
import isBoolean from 'lodash/isBoolean';
|
|
8
|
+
import concat from 'lodash/concat';
|
|
9
|
+
import { SafeLinkDirective, isExternalURL } from '../../../directives/safe_link/safe_link';
|
|
10
|
+
import { stopEvent } from '../../../utils/utils';
|
|
11
|
+
import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
|
|
12
|
+
import { stringifyQueryObj } from '../../../vendor/bootstrap-vue/src/utils/router';
|
|
13
|
+
import { safeVueInstance } from '../../../vendor/bootstrap-vue/src/utils/safe-vue-instance';
|
|
14
|
+
import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/utils/dom';
|
|
15
|
+
import { linkVariantOptions, isVue3 } from '../../../utils/constants';
|
|
16
|
+
|
|
17
|
+
const ANCHOR_TAG = 'a';
|
|
18
|
+
const NUXT_LINK_TAG = 'nuxt-link';
|
|
19
|
+
const VUE_ROUTER_LINK_TAG = 'router-link';
|
|
7
20
|
|
|
8
21
|
export default {
|
|
9
22
|
name: 'GlLink',
|
|
10
|
-
|
|
11
|
-
|
|
23
|
+
directives: {
|
|
24
|
+
SafeLink: SafeLinkDirective,
|
|
12
25
|
},
|
|
13
|
-
mixins: [SafeLinkMixin],
|
|
14
26
|
props: {
|
|
27
|
+
/**
|
|
28
|
+
* Denotes the target URL of the link for standard links.
|
|
29
|
+
*/
|
|
30
|
+
href: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: false,
|
|
33
|
+
default: undefined,
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* When set to `true`, disables the component's functionality and places it in a disabled state.
|
|
37
|
+
*/
|
|
38
|
+
disabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
required: false,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Skips sanitization of href if true. This should be used sparingly.
|
|
45
|
+
* Consult security team before setting to true.
|
|
46
|
+
*/
|
|
47
|
+
isUnsafeLink: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
required: false,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Sets the 'rel' attribute on the rendered link.
|
|
54
|
+
*/
|
|
55
|
+
rel: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: false,
|
|
58
|
+
default: null,
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Sets the 'target' attribute on the rendered link.
|
|
62
|
+
*/
|
|
63
|
+
target: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null,
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* When set to `true`, places the component in the active state with active styling
|
|
70
|
+
*/
|
|
71
|
+
active: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
required: false,
|
|
74
|
+
default: false,
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* <router-link> prop: Denotes the target route of the link.
|
|
78
|
+
* When clicked, the value of the to prop will be passed to `router.push()` internally,
|
|
79
|
+
* so the value can be either a string or a Location descriptor object.
|
|
80
|
+
*/
|
|
81
|
+
to: {
|
|
82
|
+
type: [Object, String],
|
|
83
|
+
required: false,
|
|
84
|
+
default: undefined,
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* <router-link> prop: Configure the active CSS class applied when the link is active.
|
|
88
|
+
*/
|
|
89
|
+
activeClass: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: false,
|
|
92
|
+
default: undefined,
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* <router-link> prop: Configure the active CSS class applied when the link is active with exact match.
|
|
96
|
+
*/
|
|
97
|
+
exactActiveClass: {
|
|
98
|
+
type: String,
|
|
99
|
+
required: false,
|
|
100
|
+
default: undefined,
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* <router-link> prop: Setting the replace prop will call `router.replace()` instead of `router.push()`
|
|
104
|
+
* when clicked, so the navigation will not leave a history record.
|
|
105
|
+
*/
|
|
106
|
+
replace: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
required: false,
|
|
109
|
+
default: false,
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* <nuxt-link> prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport,
|
|
113
|
+
* Nuxt.js will automatically prefetch the code splitted page. Setting `prefetch` to `true` or `false` will overwrite the default value of `router.prefetchLinks`
|
|
114
|
+
*/
|
|
115
|
+
prefetch: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
required: false,
|
|
118
|
+
// Must be `null` to fall back to the value defined in the
|
|
119
|
+
// `nuxt.config.js` configuration file for `router.prefetchLinks`
|
|
120
|
+
// We convert `null` to `undefined`, so that Nuxt.js will use the
|
|
121
|
+
// compiled default
|
|
122
|
+
// Vue treats `undefined` as default of `false` for Boolean props,
|
|
123
|
+
// so we must set it as `null` here to be a true tri-state prop
|
|
124
|
+
default: null,
|
|
125
|
+
},
|
|
15
126
|
/**
|
|
16
127
|
* If inline variant, controls ↗ character visibility
|
|
17
128
|
*/
|
|
@@ -31,33 +142,187 @@ export default {
|
|
|
31
142
|
},
|
|
32
143
|
},
|
|
33
144
|
computed: {
|
|
145
|
+
safeLinkConfig() {
|
|
146
|
+
return {
|
|
147
|
+
skipSanitization: this.isUnsafeLink,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
tag() {
|
|
151
|
+
const hasRouter = Boolean(safeVueInstance(this).$router);
|
|
152
|
+
const hasNuxt = Boolean(safeVueInstance(this).$nuxt);
|
|
153
|
+
|
|
154
|
+
if (!hasRouter || this.disabled || !this.to) {
|
|
155
|
+
return ANCHOR_TAG;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return hasNuxt ? NUXT_LINK_TAG : VUE_ROUTER_LINK_TAG;
|
|
159
|
+
},
|
|
160
|
+
isRouterLink() {
|
|
161
|
+
return this.tag !== ANCHOR_TAG;
|
|
162
|
+
},
|
|
163
|
+
isVue3RouterLink() {
|
|
164
|
+
return this.tag === VUE_ROUTER_LINK_TAG && isVue3;
|
|
165
|
+
},
|
|
34
166
|
isInlineAndHasExternalIcon() {
|
|
35
167
|
return (
|
|
36
168
|
this.showExternalIcon &&
|
|
37
169
|
this.variant === 'inline' &&
|
|
38
|
-
this
|
|
39
|
-
isExternalURL(this.target, this
|
|
170
|
+
this.href &&
|
|
171
|
+
isExternalURL(this.target, this.href)
|
|
40
172
|
);
|
|
41
173
|
},
|
|
42
|
-
|
|
174
|
+
computedHref() {
|
|
175
|
+
const fallback = '#';
|
|
176
|
+
const toFallback = '/';
|
|
177
|
+
const { to } = this;
|
|
178
|
+
|
|
179
|
+
// Return `href` when explicitly provided
|
|
180
|
+
if (this.href) {
|
|
181
|
+
return this.href;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (isString(to)) {
|
|
185
|
+
return to || toFallback;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Fallback to `to.path' + `to.query` + `to.hash` prop (if `to` is an object)
|
|
189
|
+
if (isObject(to) && (to.path || to.query || to.hash)) {
|
|
190
|
+
const path = toString(to.path);
|
|
191
|
+
const query = stringifyQueryObj(to.query);
|
|
192
|
+
let hash = toString(to.hash);
|
|
193
|
+
hash = !hash || hash.charAt(0) === '#' ? hash : `#${hash}`;
|
|
194
|
+
return `${path}${query}${hash}` || fallback;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return fallback;
|
|
198
|
+
},
|
|
199
|
+
computedProps() {
|
|
200
|
+
if (this.isRouterLink) {
|
|
201
|
+
return {
|
|
202
|
+
to: this.to,
|
|
203
|
+
activeClass: this.activeClass,
|
|
204
|
+
exactActiveClass: this.exactActiveClass,
|
|
205
|
+
replace: this.replace,
|
|
206
|
+
...(isBoolean(this.prefetch) ? { prefetch: this.prefetch } : {}),
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return {
|
|
211
|
+
disabled: this.disabled,
|
|
212
|
+
...(this.disabled ? { 'aria-disabled': 'true', tabindex: '-1' } : {}),
|
|
213
|
+
rel: this.rel,
|
|
214
|
+
target: this.target,
|
|
215
|
+
href: this.computedHref,
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
computedListeners() {
|
|
219
|
+
const { click, ...listenersWithoutClick } = this.$listeners;
|
|
220
|
+
|
|
221
|
+
return listenersWithoutClick;
|
|
222
|
+
},
|
|
223
|
+
computedClass() {
|
|
43
224
|
return [
|
|
44
225
|
'gl-link',
|
|
45
226
|
linkVariantOptions[this.variant],
|
|
46
|
-
{
|
|
227
|
+
{
|
|
228
|
+
disabled: this.disabled,
|
|
229
|
+
active: this.active,
|
|
230
|
+
'gl-link-inline-external': this.isInlineAndHasExternalIcon,
|
|
231
|
+
},
|
|
47
232
|
];
|
|
48
233
|
},
|
|
49
234
|
},
|
|
235
|
+
methods: {
|
|
236
|
+
onClick(event, navigate) {
|
|
237
|
+
const eventIsEvent = isEvent(event);
|
|
238
|
+
const suppliedHandler = this.$listeners.click;
|
|
239
|
+
|
|
240
|
+
if (eventIsEvent && this.disabled) {
|
|
241
|
+
// Stop event from bubbling up
|
|
242
|
+
// Kill the event loop attached to this specific `EventTarget`
|
|
243
|
+
// Needed to prevent `vue-router` from navigating
|
|
244
|
+
stopEvent(event, { immediatePropagation: true });
|
|
245
|
+
} else {
|
|
246
|
+
// Router links do not emit instance `click` events, so we
|
|
247
|
+
// add in an `$emit('click', event)` on its Vue instance
|
|
248
|
+
//
|
|
249
|
+
// seems not to be required for Vue3 compat build
|
|
250
|
+
if (this.isRouterLink) {
|
|
251
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
252
|
+
event.currentTarget.__vue__?.$emit('click', event);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Call the suppliedHandler(s), if any provided
|
|
256
|
+
concat([], suppliedHandler)
|
|
257
|
+
.filter((h) => isFunction(h))
|
|
258
|
+
.forEach((handler) => {
|
|
259
|
+
// eslint-disable-next-line prefer-rest-params
|
|
260
|
+
handler(...arguments);
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// this navigate function comes from Vue 3 router
|
|
264
|
+
// See https://router.vuejs.org/guide/advanced/extending-router-link.html#Extending-RouterLink
|
|
265
|
+
if (isFunction(navigate)) {
|
|
266
|
+
navigate(event);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// TODO: Remove deprecated 'clicked::link' event
|
|
270
|
+
this.$root.$emit('clicked::link', event);
|
|
271
|
+
}
|
|
272
|
+
// Stop scroll-to-top behavior or navigation on
|
|
273
|
+
// regular links when href is just '#'
|
|
274
|
+
if (eventIsEvent && !this.isRouterLink && this.computedHref === '#') {
|
|
275
|
+
stopEvent(event, { stopPropagation: false });
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
focus() {
|
|
279
|
+
attemptFocus(this.$el);
|
|
280
|
+
},
|
|
281
|
+
blur() {
|
|
282
|
+
attemptBlur(this.$el);
|
|
283
|
+
},
|
|
284
|
+
},
|
|
50
285
|
};
|
|
51
286
|
</script>
|
|
287
|
+
|
|
52
288
|
<template>
|
|
53
|
-
<
|
|
289
|
+
<component
|
|
290
|
+
:is="tag"
|
|
291
|
+
v-if="isVue3RouterLink"
|
|
292
|
+
#default="{ href: routerLinkHref, isActive, isExactActive, navigate }"
|
|
293
|
+
v-bind="computedProps"
|
|
294
|
+
custom
|
|
295
|
+
>
|
|
296
|
+
<a
|
|
297
|
+
v-safe-link:[safeLinkConfig]
|
|
298
|
+
:class="[computedClass, { [activeClass]: isActive, [exactActiveClass]: isExactActive }]"
|
|
299
|
+
:href="routerLinkHref"
|
|
300
|
+
v-on="computedListeners"
|
|
301
|
+
@click="onClick($event, navigate)"
|
|
302
|
+
>
|
|
303
|
+
<slot></slot>
|
|
304
|
+
</a>
|
|
305
|
+
</component>
|
|
306
|
+
<component
|
|
307
|
+
:is="tag"
|
|
308
|
+
v-else-if="isRouterLink"
|
|
309
|
+
v-safe-link:[safeLinkConfig]
|
|
310
|
+
v-bind="computedProps"
|
|
311
|
+
:class="computedClass"
|
|
312
|
+
v-on="computedListeners"
|
|
313
|
+
@click.native="onClick"
|
|
314
|
+
>
|
|
315
|
+
<slot></slot>
|
|
316
|
+
</component>
|
|
317
|
+
<component
|
|
318
|
+
:is="tag"
|
|
319
|
+
v-else
|
|
54
320
|
v-safe-link:[safeLinkConfig]
|
|
55
|
-
v-bind="
|
|
56
|
-
:
|
|
57
|
-
|
|
58
|
-
|
|
321
|
+
v-bind="computedProps"
|
|
322
|
+
:class="computedClass"
|
|
323
|
+
v-on="computedListeners"
|
|
324
|
+
@click="onClick"
|
|
59
325
|
>
|
|
60
|
-
<!-- @slot The link to display. -->
|
|
61
326
|
<slot></slot>
|
|
62
|
-
</
|
|
327
|
+
</component>
|
|
63
328
|
</template>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
4
3
|
import {
|
|
5
4
|
defaultChartOptions,
|
|
6
5
|
dataZoomAdjustments,
|
|
@@ -112,7 +111,7 @@ export default {
|
|
|
112
111
|
alignWithLabel: true,
|
|
113
112
|
show: true,
|
|
114
113
|
lineStyle: {
|
|
115
|
-
color:
|
|
114
|
+
color: 'var(--gl-chart-axis-line-color)',
|
|
116
115
|
},
|
|
117
116
|
},
|
|
118
117
|
axisLabel: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
-
import {
|
|
4
|
+
import { GL_COLOR_NEUTRAL_0, GL_COLOR_NEUTRAL_100 } from '../../../tokens/build/js/tokens';
|
|
5
5
|
import { getTooltipTitle, getTooltipContent } from '../../../utils/charts/config';
|
|
6
6
|
import { HEIGHT_AUTO_CLASSES } from '../../../utils/charts/constants';
|
|
7
7
|
import { heatmapHues } from '../../../utils/charts/theme';
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
right: '32px',
|
|
141
141
|
show: true,
|
|
142
142
|
borderWidth: 0,
|
|
143
|
-
backgroundColor:
|
|
143
|
+
backgroundColor: GL_COLOR_NEUTRAL_100,
|
|
144
144
|
},
|
|
145
145
|
visualMap: {
|
|
146
146
|
min,
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
164
164
|
show: true,
|
|
165
165
|
interval: 0,
|
|
166
166
|
lineStyle: {
|
|
167
|
-
color:
|
|
167
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
168
168
|
width: 2,
|
|
169
169
|
},
|
|
170
170
|
},
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
show: true,
|
|
192
192
|
interval: 0,
|
|
193
193
|
lineStyle: {
|
|
194
|
-
color:
|
|
194
|
+
color: GL_COLOR_NEUTRAL_0,
|
|
195
195
|
width: 2,
|
|
196
196
|
},
|
|
197
197
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
2
2
|
<script>
|
|
3
3
|
import * as echarts from 'echarts';
|
|
4
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
5
4
|
import { defaultFontSize } from '../../../utils/charts/config';
|
|
6
5
|
import {
|
|
7
6
|
LEGEND_LAYOUT_INLINE,
|
|
@@ -146,7 +145,7 @@ export default {
|
|
|
146
145
|
this.chart.dispatchAction({ type: 'downplay', seriesName: name });
|
|
147
146
|
},
|
|
148
147
|
getColor(color, key) {
|
|
149
|
-
return this.disabledSeries[key] ?
|
|
148
|
+
return this.disabledSeries[key] ? 'var(--gl-chart-axis-line-color)' : color;
|
|
150
149
|
},
|
|
151
150
|
suppressLastActiveSeriesLabelToggle({ selected }) {
|
|
152
151
|
const selectedSeriesLabels = Object.entries(selected).filter(([, isSelected]) =>
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import merge from 'lodash/merge';
|
|
22
|
-
import { GRAY_200 } from '../../../tokens/build/js/tokens';
|
|
23
22
|
import {
|
|
24
23
|
defaultChartOptions,
|
|
25
24
|
grid,
|
|
@@ -193,7 +192,7 @@ export default {
|
|
|
193
192
|
alignWithLabel: true,
|
|
194
193
|
show: true,
|
|
195
194
|
lineStyle: {
|
|
196
|
-
color:
|
|
195
|
+
color: 'var(--gl-chart-axis-line-color)',
|
|
197
196
|
},
|
|
198
197
|
},
|
|
199
198
|
},
|
|
@@ -5,8 +5,12 @@ const getBaseURL = () => {
|
|
|
5
5
|
return `${protocol}//${host}`;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
const isTargetBlank = (target) => {
|
|
9
|
+
return target === '_blank';
|
|
10
|
+
};
|
|
11
|
+
|
|
8
12
|
export const isExternalURL = (target, hostname) => {
|
|
9
|
-
return target
|
|
13
|
+
return isTargetBlank(target) && hostname !== window.location.hostname;
|
|
10
14
|
};
|
|
11
15
|
|
|
12
16
|
const secureRel = (rel) => {
|
|
@@ -35,13 +39,13 @@ const transform = (el, { arg: { skipSanitization = false } = {} } = {}) => {
|
|
|
35
39
|
return;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
|
-
const { href, target, rel
|
|
42
|
+
const { href, target, rel } = el;
|
|
39
43
|
|
|
40
44
|
if (!isSafeURL(href)) {
|
|
41
45
|
el.href = 'about:blank';
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
if (
|
|
48
|
+
if (isTargetBlank(target)) {
|
|
45
49
|
el.rel = secureRel(rel);
|
|
46
50
|
}
|
|
47
51
|
};
|
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
--gl-avatar-fallback-background-color-green: #91d4a83d; /* Green background for avatar fallback with no particular meaning. */
|
|
245
245
|
--gl-avatar-fallback-background-color-orange: #e9be743d; /* Orange background for avatar fallback with no particular meaning. */
|
|
246
246
|
--gl-avatar-fallback-background-color-neutral: #bfbfc33d; /* Neutral background for avatar fallback with no particular meaning. */
|
|
247
|
+
--gl-chart-threshold-area-color: rgba(221,43,14,0.1); /* Used in charts to delineate a threshold area in a chart. */
|
|
247
248
|
--gl-illustration-stroke-color-default: #171321; /* Default stroke color to define shape and provide essential detail. */
|
|
248
249
|
--gl-illustration-stroke-width-default: 0.125rem; /* Default stroke width to define shape and provide essential detail. */
|
|
249
250
|
--gl-illustration-fill-color-default: #fff; /* Default fill color for an element where specific meaning or emphasis is not required. */
|
|
@@ -750,6 +751,9 @@
|
|
|
750
751
|
--gl-button-disabled-foreground-color: var(--gl-color-neutral-500); /* Used for the foreground of a disabled button. */
|
|
751
752
|
--gl-button-disabled-background-color: var(--gl-color-neutral-10); /* Used for the background of a disabled button. */
|
|
752
753
|
--gl-button-disabled-border-color: var(--gl-color-neutral-100); /* Used for the border of a disabled button. */
|
|
754
|
+
--gl-chart-axis-line-color: var(--gl-color-neutral-200); /* Used in charts for axis line color. */
|
|
755
|
+
--gl-chart-threshold-line-color: var(--gl-color-red-500); /* Used in charts to divide a threshold area in a chart from other data. */
|
|
756
|
+
--gl-chart-zoom-filler-color: var(--gl-color-alpha-dark-8); /* Used in charts for the overlay color when zooming in on a specific area of data. */
|
|
753
757
|
--gl-datepicker-background-color: var(--gl-color-neutral-0); /* Used for the background color of datepicker. */
|
|
754
758
|
--gl-dropdown-option-background-color-unselected-default: var(--gl-action-neutral-background-color-default); /* Used for the background of an unselected dropdown option in the default state. */
|
|
755
759
|
--gl-dropdown-option-background-color-unselected-hover: var(--gl-action-neutral-background-color-hover); /* Used for the background of an unselected dropdown option in the hover state. */
|
|
@@ -953,6 +957,7 @@
|
|
|
953
957
|
--gl-button-selected-background-color-hover: var(--gl-button-default-primary-background-color-hover); /* Used for the background of a selected button in the hover state. */
|
|
954
958
|
--gl-button-selected-background-color-active: var(--gl-button-default-primary-background-color-active); /* Used for the background of a selected button in the active state. */
|
|
955
959
|
--gl-button-selected-border-color-focus: var(--gl-button-selected-border-color-hover); /* Used for the border of a selected button in the focus state. */
|
|
960
|
+
--gl-chart-axis-text-color: var(--gl-text-color-subtle); /* Used in charts for the text color of axis titles and labels. */
|
|
956
961
|
--gl-datepicker-date-text-color-selected: var(--gl-control-indicator-color-selected); /* Used for the datepicker date text color state indicators. */
|
|
957
962
|
--gl-dropdown-background-color: var(--gl-background-color-overlap); /* Used for the background of a dropdown. */
|
|
958
963
|
--gl-dropdown-border-color: var(--gl-border-color-strong); /* Used for the border of a dropdown. */
|
|
@@ -1027,6 +1032,8 @@
|
|
|
1027
1032
|
--gl-button-selected-foreground-color-focus: var(--gl-button-default-primary-foreground-color-focus); /* Used for the foreground of a selected button in the focus state. */
|
|
1028
1033
|
--gl-button-selected-foreground-color-active: var(--gl-button-default-primary-foreground-color-active); /* Used for the foreground of a selected button in the active state. */
|
|
1029
1034
|
--gl-button-selected-background-color-focus: var(--gl-button-default-primary-background-color-focus); /* Used for the background of a selected button in the focus state. */
|
|
1035
|
+
--gl-chart-axis-pointer-color: var(--gl-icon-color-subtle); /* Used in charts for the color of the reference line and axis value under mouse pointer. */
|
|
1036
|
+
--gl-chart-zoom-handle-color: var(--gl-icon-color-subtle); /* Used in charts for the handle color when zooming in on a specific area of data. */
|
|
1030
1037
|
--gl-dropdown-option-text-color-hover: var(--gl-action-neutral-foreground-color-hover); /* Used for the text of a dropdown option in the hover state. */
|
|
1031
1038
|
--gl-dropdown-option-text-color-focus: var(--gl-action-neutral-foreground-color-focus); /* Used for the text of a dropdown option in the focus state. */
|
|
1032
1039
|
--gl-dropdown-option-text-color-active: var(--gl-action-neutral-foreground-color-active); /* Used for the text of a dropdown option in the active state. */
|
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
--gl-avatar-fallback-background-color-green: #91d4a83d; /* Green background for avatar fallback with no particular meaning. */
|
|
245
245
|
--gl-avatar-fallback-background-color-orange: #e9be743d; /* Orange background for avatar fallback with no particular meaning. */
|
|
246
246
|
--gl-avatar-fallback-background-color-neutral: #bfbfc33d; /* Neutral background for avatar fallback with no particular meaning. */
|
|
247
|
+
--gl-chart-threshold-area-color: rgba(221,43,14,0.1); /* Used in charts to delineate a threshold area in a chart. */
|
|
247
248
|
--gl-illustration-stroke-color-default: #e3e3e8; /* Default stroke color to define shape and provide essential detail. */
|
|
248
249
|
--gl-illustration-stroke-width-default: 0.09375rem; /* Default stroke width to define shape and provide essential detail. */
|
|
249
250
|
--gl-illustration-fill-color-default: #423f4f; /* Default fill color for an element where specific meaning or emphasis is not required. */
|
|
@@ -750,6 +751,9 @@
|
|
|
750
751
|
--gl-button-disabled-foreground-color: var(--gl-color-neutral-400); /* Used for the foreground of a disabled button. */
|
|
751
752
|
--gl-button-disabled-background-color: rgba(137, 136, 141, 0.16); /* Used for the background of a disabled button. */
|
|
752
753
|
--gl-button-disabled-border-color: var(--gl-color-alpha-0); /* Used for the border of a disabled button. */
|
|
754
|
+
--gl-chart-axis-line-color: var(--gl-color-neutral-700); /* Used in charts for axis line color. */
|
|
755
|
+
--gl-chart-threshold-line-color: var(--gl-color-red-600); /* Used in charts to divide a threshold area in a chart from other data. */
|
|
756
|
+
--gl-chart-zoom-filler-color: var(--gl-color-alpha-light-16); /* Used in charts for the overlay color when zooming in on a specific area of data. */
|
|
753
757
|
--gl-datepicker-background-color: var(--gl-color-neutral-900); /* Used for the background color of datepicker. */
|
|
754
758
|
--gl-dropdown-option-background-color-unselected-default: var(--gl-action-neutral-background-color-default); /* Used for the background of an unselected dropdown option in the default state. */
|
|
755
759
|
--gl-dropdown-option-background-color-unselected-hover: var(--gl-action-neutral-background-color-hover); /* Used for the background of an unselected dropdown option in the hover state. */
|
|
@@ -953,6 +957,7 @@
|
|
|
953
957
|
--gl-button-selected-background-color-hover: var(--gl-color-neutral-200); /* Used for the background of a selected button in the hover state. */
|
|
954
958
|
--gl-button-selected-background-color-active: var(--gl-color-neutral-400); /* Used for the background of a selected button in the active state. */
|
|
955
959
|
--gl-button-selected-border-color-focus: var(--gl-button-selected-border-color-hover); /* Used for the border of a selected button in the focus state. */
|
|
960
|
+
--gl-chart-axis-text-color: var(--gl-text-color-subtle); /* Used in charts for the text color of axis titles and labels. */
|
|
956
961
|
--gl-datepicker-date-text-color-selected: var(--gl-control-indicator-color-selected); /* Used for the datepicker date text color state indicators. */
|
|
957
962
|
--gl-dropdown-background-color: var(--gl-background-color-overlap); /* Used for the background of a dropdown. */
|
|
958
963
|
--gl-dropdown-border-color: var(--gl-border-color-default); /* Used for the border of a dropdown. */
|
|
@@ -1027,6 +1032,8 @@
|
|
|
1027
1032
|
--gl-button-selected-foreground-color-focus: var(--gl-color-neutral-950); /* Used for the foreground of a selected button in the focus state. */
|
|
1028
1033
|
--gl-button-selected-foreground-color-active: var(--gl-color-neutral-950); /* Used for the foreground of a selected button in the active state. */
|
|
1029
1034
|
--gl-button-selected-background-color-focus: var(--gl-color-neutral-200); /* Used for the background of a selected button in the focus state. */
|
|
1035
|
+
--gl-chart-axis-pointer-color: var(--gl-icon-color-subtle); /* Used in charts for the color of the reference line and axis value under mouse pointer. */
|
|
1036
|
+
--gl-chart-zoom-handle-color: var(--gl-icon-color-subtle); /* Used in charts for the handle color when zooming in on a specific area of data. */
|
|
1030
1037
|
--gl-dropdown-option-text-color-hover: var(--gl-action-neutral-foreground-color-hover); /* Used for the text of a dropdown option in the hover state. */
|
|
1031
1038
|
--gl-dropdown-option-text-color-focus: var(--gl-action-neutral-foreground-color-focus); /* Used for the text of a dropdown option in the focus state. */
|
|
1032
1039
|
--gl-dropdown-option-text-color-active: var(--gl-action-neutral-foreground-color-active); /* Used for the text of a dropdown option in the active state. */
|
|
@@ -624,6 +624,13 @@ export const GL_BUTTON_SELECTED_BORDER_COLOR_ACTIVE = 'transparent';
|
|
|
624
624
|
export const GL_BUTTON_DISABLED_FOREGROUND_COLOR = '#89888d';
|
|
625
625
|
export const GL_BUTTON_DISABLED_BACKGROUND_COLOR = 'rgba(137, 136, 141, 0.16)';
|
|
626
626
|
export const GL_BUTTON_DISABLED_BORDER_COLOR = 'transparent';
|
|
627
|
+
export const GL_CHART_AXIS_POINTER_COLOR = '#bfbfc3';
|
|
628
|
+
export const GL_CHART_AXIS_LINE_COLOR = '#4c4b51';
|
|
629
|
+
export const GL_CHART_AXIS_TEXT_COLOR = '#bfbfc3';
|
|
630
|
+
export const GL_CHART_THRESHOLD_AREA_COLOR = 'rgba(221,43,14,0.1)';
|
|
631
|
+
export const GL_CHART_THRESHOLD_LINE_COLOR = '#c91c00';
|
|
632
|
+
export const GL_CHART_ZOOM_FILLER_COLOR = 'rgba(255, 255, 255, 0.16)';
|
|
633
|
+
export const GL_CHART_ZOOM_HANDLE_COLOR = '#bfbfc3';
|
|
627
634
|
export const GL_DATEPICKER_BACKGROUND_COLOR = '#28272d';
|
|
628
635
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#18171d';
|
|
629
636
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#28272d';
|
|
@@ -624,6 +624,13 @@ export const GL_BUTTON_SELECTED_BORDER_COLOR_ACTIVE = '#626168';
|
|
|
624
624
|
export const GL_BUTTON_DISABLED_FOREGROUND_COLOR = '#737278';
|
|
625
625
|
export const GL_BUTTON_DISABLED_BACKGROUND_COLOR = '#fbfafd';
|
|
626
626
|
export const GL_BUTTON_DISABLED_BORDER_COLOR = '#dcdcde';
|
|
627
|
+
export const GL_CHART_AXIS_POINTER_COLOR = '#626168';
|
|
628
|
+
export const GL_CHART_AXIS_LINE_COLOR = '#bfbfc3';
|
|
629
|
+
export const GL_CHART_AXIS_TEXT_COLOR = '#626168';
|
|
630
|
+
export const GL_CHART_THRESHOLD_AREA_COLOR = 'rgba(221,43,14,0.1)';
|
|
631
|
+
export const GL_CHART_THRESHOLD_LINE_COLOR = '#dd2b0e';
|
|
632
|
+
export const GL_CHART_ZOOM_FILLER_COLOR = 'rgba(05, 05, 06, 0.08)';
|
|
633
|
+
export const GL_CHART_ZOOM_HANDLE_COLOR = '#626168';
|
|
627
634
|
export const GL_DATEPICKER_BACKGROUND_COLOR = '#fff';
|
|
628
635
|
export const GL_DATEPICKER_DATE_TEXT_COLOR_SELECTED = '#fff';
|
|
629
636
|
export const GL_DROPDOWN_BACKGROUND_COLOR = '#fff';
|