@gitlab/ui 86.10.1 → 86.11.1
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 +14 -0
- package/README.md +20 -61
- package/dist/components/base/badge/badge.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +12 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +3 -3
- package/src/components/base/badge/badge.scss +11 -4
- package/src/components/base/badge/badge.vue +4 -1
- package/src/components/charts/sparkline/sparkline.vue +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [86.11.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.11.0...v86.11.1) (2024-07-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlBadge:** fix visual regressions ([3dae6e3](https://gitlab.com/gitlab-org/gitlab-ui/commit/3dae6e32dd24b7eefcc21bcfa2386d8abf9c7872))
|
|
7
|
+
|
|
8
|
+
# [86.11.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.10.1...v86.11.0) (2024-07-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlSparklineChart:** Add `connectNulls` prop ([61d8a7c](https://gitlab.com/gitlab-org/gitlab-ui/commit/61d8a7cb06f64a7f141ab3795a5e02c843a99a52))
|
|
14
|
+
|
|
1
15
|
## [86.10.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.10.0...v86.10.1) (2024-07-15)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -10,39 +10,36 @@ See <https://gitlab-org.gitlab.io/gitlab-ui/> for documentation.
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
To use GitLab UI in your project, add it as a dependency:
|
|
13
|
+
1. To use GitLab UI in your project, add it as a dependency:
|
|
14
14
|
|
|
15
|
-
```sh
|
|
16
|
-
yarn add @gitlab/ui
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
> **Note:** Make sure to also install GitLab UI's peer dependencies. Refer to the
|
|
20
|
-
> [`package.json`](./package.json) for the list of peer dependencies and their expected versions.
|
|
15
|
+
```sh
|
|
16
|
+
yarn add @gitlab/ui
|
|
17
|
+
```
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
> **Note:** Make sure to also install GitLab UI's peer dependencies. Refer to the
|
|
20
|
+
> [`package.json`](./package.json) for the list of peer dependencies and their expected versions.
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
import setConfigs from '@gitlab/ui/dist/config'
|
|
22
|
+
1. In your main entrypoint **before** importing or using any component:
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
This will set the global configs used by GitLab UI.
|
|
24
|
+
```javascript
|
|
25
|
+
import setConfigs from '@gitlab/ui/dist/config'
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
setConfigs()
|
|
28
|
+
```
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
import { GlButton } from '@gitlab/ui';
|
|
36
|
-
```
|
|
30
|
+
This will set the global configs used by GitLab UI.
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
1. Include the required stylesheets in your app. Refer to the [CSS docs](/doc/css.md) for
|
|
33
|
+
installation options.
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
1. Import the components as desired:
|
|
41
36
|
|
|
42
|
-
|
|
37
|
+
```javascript
|
|
38
|
+
import { GlButton } from '@gitlab/ui';
|
|
39
|
+
```
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
> **Note:** GitLab UI is compatible with tree-shaking, you may enable this in your project to
|
|
42
|
+
> reduce bundle sizes.
|
|
46
43
|
|
|
47
44
|
## Quick start - development
|
|
48
45
|
|
|
@@ -121,44 +118,6 @@ Components’ end to end tests live in the `cypress/e2e` folder. See our
|
|
|
121
118
|
|
|
122
119
|
`yarn run cypress open` runs Cypress locally to run end to end tests.
|
|
123
120
|
|
|
124
|
-
## Installation
|
|
125
|
-
|
|
126
|
-
Install with Yarn:
|
|
127
|
-
|
|
128
|
-
```sh
|
|
129
|
-
yarn add @gitlab/ui
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Install with npm:
|
|
133
|
-
|
|
134
|
-
```sh
|
|
135
|
-
npm install @gitlab/ui
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Styles
|
|
139
|
-
|
|
140
|
-
GitLab UI requires its styles to be imported to display components properly. We currently have 2
|
|
141
|
-
separate stylesheets that both need to be included in your project. The main stylesheet
|
|
142
|
-
(`gitlab_ui.scss`) contains component-specific styles, while the other one (`utilities.scss`)
|
|
143
|
-
contains the utility classes library on which some components rely. You might find the utility
|
|
144
|
-
classes useful to layout components in your own project.
|
|
145
|
-
|
|
146
|
-
You have two options to include those stylesheets:
|
|
147
|
-
|
|
148
|
-
- If you have a SCSS preprocessor setup, include the SCSS files in your own stylesheet:
|
|
149
|
-
|
|
150
|
-
```scss
|
|
151
|
-
@import '@gitlab/ui/src/scss/gitlab_ui.scss';
|
|
152
|
-
@import '@gitlab/ui/src/scss/utilities.scss';
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
- If you don't have a SCSS preprocessor setup, you can import the compiled CSS files directly:
|
|
156
|
-
|
|
157
|
-
```css
|
|
158
|
-
@import '@gitlab/ui/dist/index.css';
|
|
159
|
-
@import '@gitlab/ui/dist/utility_classes.css';
|
|
160
|
-
```
|
|
161
|
-
|
|
162
121
|
### Design tokens
|
|
163
122
|
|
|
164
123
|
GitLab UI uses design tokens to maintain a single source of truth that, through automation,
|
|
@@ -68,7 +68,7 @@ var script = {
|
|
|
68
68
|
const __vue_script__ = script;
|
|
69
69
|
|
|
70
70
|
/* template */
|
|
71
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-badge',_vm._b({staticClass:"gl-badge",class:{ 'gl-px-2!': !_vm.$scopedSlots.default },attrs:{"variant":_vm.variant,"role":_vm.role,"aria-label":_vm.ariaLabel,"pill":""}},'b-badge',_vm.$attrs,false),[(_vm.icon)?_c('gl-icon',{staticClass:"gl-badge-icon",class:{ '-gl-ml-2 gl-ml-n2': _vm.isCircularIcon },attrs:{"size":_vm.iconSizeComputed,"name":_vm.icon}}):_vm._e(),_vm._v(" "),_vm._t("default")],2)};
|
|
71
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-badge',_vm._b({staticClass:"gl-badge",class:{ 'gl-px-2!': !_vm.$scopedSlots.default },attrs:{"variant":_vm.variant,"role":_vm.role,"aria-label":_vm.ariaLabel,"pill":""}},'b-badge',_vm.$attrs,false),[(_vm.icon)?_c('gl-icon',{staticClass:"gl-badge-icon",class:{ '-gl-ml-2 gl-ml-n2': _vm.isCircularIcon },attrs:{"size":_vm.iconSizeComputed,"name":_vm.icon}}):_vm._e(),_vm._v(" "),(_vm.$slots.default)?_c('span',{staticClass:"gl-badge-content"},[_vm._t("default")],2):_vm._e()],1)};
|
|
72
72
|
var __vue_staticRenderFns__ = [];
|
|
73
73
|
|
|
74
74
|
/* style */
|
|
@@ -78,6 +78,14 @@ var script = {
|
|
|
78
78
|
required: false,
|
|
79
79
|
default: 0,
|
|
80
80
|
validator: x => x >= 0 && x <= 1
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Whether to connect the line across null points.
|
|
84
|
+
*/
|
|
85
|
+
connectNulls: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
required: false,
|
|
88
|
+
default: false
|
|
81
89
|
}
|
|
82
90
|
},
|
|
83
91
|
data() {
|
|
@@ -131,7 +139,8 @@ var script = {
|
|
|
131
139
|
data,
|
|
132
140
|
smooth,
|
|
133
141
|
itemStyle,
|
|
134
|
-
showLastYValue
|
|
142
|
+
showLastYValue,
|
|
143
|
+
connectNulls
|
|
135
144
|
} = this;
|
|
136
145
|
const markPoint = showLastYValue ? {
|
|
137
146
|
symbol: 'circle',
|
|
@@ -156,7 +165,8 @@ var script = {
|
|
|
156
165
|
itemStyle,
|
|
157
166
|
lineStyle: {
|
|
158
167
|
cap: 'round'
|
|
159
|
-
}
|
|
168
|
+
},
|
|
169
|
+
connectNulls
|
|
160
170
|
};
|
|
161
171
|
},
|
|
162
172
|
itemStyle() {
|