@gitlab/ui 72.10.0 → 72.11.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 +9 -0
- package/dist/components/base/form/form_input/form_input.js +1 -1
- package/dist/components/charts/single_stat/single_stat.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +2 -2
- package/src/components/base/form/form_input/form_input.stories.js +16 -0
- package/src/components/base/form/form_input/form_input.vue +7 -1
- package/src/components/charts/single_stat/single_stat.scss +10 -3
- package/src/components/charts/single_stat/single_stat.vue +8 -2
package/dist/tokens/js/tokens.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "72.
|
|
3
|
+
"version": "72.11.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"babel-jest": "29.0.1",
|
|
129
129
|
"babel-loader": "^8.0.5",
|
|
130
130
|
"bootstrap": "4.6.2",
|
|
131
|
-
"cypress": "13.6.
|
|
131
|
+
"cypress": "13.6.3",
|
|
132
132
|
"cypress-axe": "^1.4.0",
|
|
133
133
|
"cypress-real-events": "^1.11.0",
|
|
134
134
|
"dompurify": "^3.0.0",
|
|
@@ -16,11 +16,13 @@ const generateProps = ({
|
|
|
16
16
|
value = '',
|
|
17
17
|
disabled = false,
|
|
18
18
|
readonly = false,
|
|
19
|
+
type = 'text',
|
|
19
20
|
} = {}) => ({
|
|
20
21
|
width,
|
|
21
22
|
value,
|
|
22
23
|
disabled,
|
|
23
24
|
readonly,
|
|
25
|
+
type,
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
const Template = (args) => ({
|
|
@@ -38,6 +40,20 @@ Disabled.args = generateProps({ value: 'some text', disabled: true });
|
|
|
38
40
|
export const Readonly = Template.bind({});
|
|
39
41
|
Readonly.args = generateProps({ value: 'readonly text', readonly: true });
|
|
40
42
|
|
|
43
|
+
export const NumberInput = (args, { argTypes }) => ({
|
|
44
|
+
components: { GlFormInput },
|
|
45
|
+
props: Object.keys(argTypes),
|
|
46
|
+
data: () => ({
|
|
47
|
+
formInputWidths,
|
|
48
|
+
}),
|
|
49
|
+
template: `
|
|
50
|
+
<gl-form-input
|
|
51
|
+
type="number"
|
|
52
|
+
/>
|
|
53
|
+
`,
|
|
54
|
+
});
|
|
55
|
+
NumberInput.tags = ['skip-visual-test'];
|
|
56
|
+
|
|
41
57
|
export const Widths = (args, { argTypes }) => ({
|
|
42
58
|
components: { GlFormInput },
|
|
43
59
|
props: Object.keys(argTypes),
|
|
@@ -82,5 +82,11 @@ export default {
|
|
|
82
82
|
</script>
|
|
83
83
|
|
|
84
84
|
<template>
|
|
85
|
-
<b-form-input
|
|
85
|
+
<b-form-input
|
|
86
|
+
class="gl-form-input"
|
|
87
|
+
:class="cssClasses"
|
|
88
|
+
no-wheel
|
|
89
|
+
v-bind="$attrs"
|
|
90
|
+
v-on="listeners"
|
|
91
|
+
/>
|
|
86
92
|
</template>
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
$line-height: 1;
|
|
2
|
-
|
|
3
1
|
.gl-single-stat {
|
|
4
|
-
line-height
|
|
2
|
+
@include gl-line-height-1;
|
|
5
3
|
|
|
6
4
|
&:hover[tabindex='0'] {
|
|
7
5
|
@include gl-bg-gray-50;
|
|
8
6
|
@include gl-rounded-base;
|
|
9
7
|
}
|
|
8
|
+
|
|
9
|
+
.gl-single-stat-number {
|
|
10
|
+
font-size: map-get($gl-font-sizes, 700);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.gl-single-stat-content .gl-badge {
|
|
14
|
+
position: relative;
|
|
15
|
+
top: -0.125em;
|
|
16
|
+
}
|
|
10
17
|
}
|
|
@@ -130,8 +130,14 @@ export default {
|
|
|
130
130
|
/>
|
|
131
131
|
<span class="gl-font-base gl-font-weight-normal" data-testid="title-text">{{ title }}</span>
|
|
132
132
|
</div>
|
|
133
|
-
<div
|
|
134
|
-
|
|
133
|
+
<div
|
|
134
|
+
class="gl-single-stat-content gl-display-flex gl-align-items-baseline gl-font-weight-bold gl-text-gray-900"
|
|
135
|
+
>
|
|
136
|
+
<span
|
|
137
|
+
class="gl-single-stat-number gl-line-height-1"
|
|
138
|
+
:class="{ 'gl-mr-2': !unit }"
|
|
139
|
+
data-testid="displayValue"
|
|
140
|
+
>
|
|
135
141
|
<gl-animated-number
|
|
136
142
|
v-if="canAnimate"
|
|
137
143
|
:number="Number(value)"
|