@gitlab/ui 36.5.1 → 37.0.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 +39 -0
- package/dist/components/base/alert/alert.js +1 -11
- package/dist/components/base/card/card.js +1 -1
- package/dist/components/base/form/form_radio_group/form_radio_group.documentation.js +2 -48
- package/dist/components/base/form/form_radio_group/form_radio_group.js +22 -2
- package/dist/components/base/pagination/pagination.js +1 -1
- package/dist/components/charts/area/area.documentation.js +1 -7
- package/dist/components/charts/heatmap/heatmap.documentation.js +0 -3
- package/dist/components/charts/line/line.documentation.js +2 -5
- package/dist/components/charts/series_label/series_label.documentation.js +2 -5
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/stories_utils.js +13 -1
- package/documentation/documented_stories.js +5 -0
- package/package.json +13 -13
- package/scss_to_js/scss_variables.js +1 -0
- package/scss_to_js/scss_variables.json +5 -0
- package/src/components/base/accordion/accordion.stories.js +2 -1
- package/src/components/base/alert/alert.scss +0 -38
- package/src/components/base/alert/alert.spec.js +0 -1
- package/src/components/base/alert/alert.stories.js +0 -8
- package/src/components/base/alert/alert.vue +30 -41
- package/src/components/base/badge/badge.stories.js +4 -24
- package/src/components/base/card/card.vue +2 -2
- package/src/components/base/daterange_picker/daterange_picker.stories.js +10 -35
- package/src/components/base/form/form_radio_group/form_radio_group.documentation.js +0 -48
- package/src/components/base/form/form_radio_group/form_radio_group.md +0 -2
- package/src/components/base/form/form_radio_group/form_radio_group.stories.js +50 -29
- package/src/components/base/form/form_radio_group/form_radio_group.vue +22 -2
- package/src/components/base/icon/icon.stories.js +2 -5
- package/src/components/base/paginated_list/__snapshots__/paginated_list.spec.js.snap +10 -10
- package/src/components/base/pagination/pagination.stories.js +5 -1
- package/src/components/base/pagination/pagination.vue +1 -1
- package/src/components/base/toggle/toggle.stories.js +2 -3
- package/src/components/charts/area/area.documentation.js +0 -5
- package/src/components/charts/area/area.stories.js +127 -127
- package/src/components/charts/bar/bar.stories.js +8 -5
- package/src/components/charts/heatmap/heatmap.documentation.js +0 -2
- package/src/components/charts/heatmap/heatmap.stories.js +58 -44
- package/src/components/charts/line/line.documentation.js +0 -2
- package/src/components/charts/line/line.md +0 -2
- package/src/components/charts/line/line.stories.js +124 -113
- package/src/components/charts/series_label/series_label.documentation.js +0 -2
- package/src/components/charts/series_label/series_label.md +0 -2
- package/src/components/charts/series_label/series_label.stories.js +62 -59
- package/src/scss/utilities.scss +40 -0
- package/src/scss/utility-mixins/border.scss +21 -0
- package/src/scss/variables.scss +2 -0
- package/src/utils/stories_utils.js +6 -0
- package/src/utils/stories_utils.spec.js +18 -0
- package/dist/components/base/form/form_radio_group/examples/form_radio_group.options_array.example.js +0 -59
- package/dist/components/base/form/form_radio_group/examples/form_radio_group.slots.example.js +0 -48
- package/dist/components/base/form/form_radio_group/examples/index.js +0 -17
- package/dist/components/charts/area/examples/area.basic.example.js +0 -45
- package/dist/components/charts/area/examples/area.basic_plus.example.js +0 -53
- package/dist/components/charts/area/examples/index.js +0 -19
- package/dist/components/charts/heatmap/examples/heatmap.custom_options.example.js +0 -79
- package/dist/components/charts/heatmap/examples/heatmap.hourly.example.js +0 -70
- package/dist/components/charts/heatmap/examples/heatmap.responsive.example.js +0 -70
- package/dist/components/charts/heatmap/examples/heatmap.totals.example.js +0 -62
- package/dist/components/charts/heatmap/examples/index.js +0 -31
- package/dist/components/charts/line/examples/index.js +0 -19
- package/dist/components/charts/line/examples/line.basic.example.js +0 -45
- package/dist/components/charts/line/examples/line.series.example.js +0 -53
- package/dist/components/charts/series_label/examples/index.js +0 -13
- package/dist/components/charts/series_label/examples/series_label.basic.example.js +0 -38
- package/src/components/base/form/form_radio_group/examples/form_radio_group.options_array.example.vue +0 -27
- package/src/components/base/form/form_radio_group/examples/form_radio_group.slots.example.vue +0 -21
- package/src/components/base/form/form_radio_group/examples/index.js +0 -20
- package/src/components/charts/area/area.md +0 -1
- package/src/components/charts/area/examples/area.basic.example.vue +0 -14
- package/src/components/charts/area/examples/area.basic_plus.example.vue +0 -25
- package/src/components/charts/area/examples/index.js +0 -22
- package/src/components/charts/heatmap/examples/heatmap.custom_options.example.vue +0 -70
- package/src/components/charts/heatmap/examples/heatmap.hourly.example.vue +0 -62
- package/src/components/charts/heatmap/examples/heatmap.responsive.example.vue +0 -63
- package/src/components/charts/heatmap/examples/heatmap.totals.example.vue +0 -38
- package/src/components/charts/heatmap/examples/index.js +0 -36
- package/src/components/charts/line/examples/index.js +0 -22
- package/src/components/charts/line/examples/line.basic.example.vue +0 -14
- package/src/components/charts/line/examples/line.series.example.vue +0 -25
- package/src/components/charts/series_label/examples/index.js +0 -15
- package/src/components/charts/series_label/examples/series_label.basic.example.vue +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# [37.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.7.1...v37.0.0) (2022-02-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlAlert:** drop contained behavior ([a2ae17e](https://gitlab.com/gitlab-org/gitlab-ui/commit/a2ae17eeb80eb9ea399b9f93047fc71764a3e1cb))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **GlAlert:** This drops GlAlert's contained behavior.
|
|
12
|
+
|
|
13
|
+
Alerts content width cannot be constrainted with the `contained` prop
|
|
14
|
+
anymore. Existing alerts' content will exapnd to the take up the alert's
|
|
15
|
+
full width.
|
|
16
|
+
You should consider removing all `contained` usages from your code.
|
|
17
|
+
`
|
|
18
|
+
|
|
19
|
+
## [36.7.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.7.0...v36.7.1) (2022-02-18)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **deps:** update dependency dompurify to ^2.3.6 ([266b5a7](https://gitlab.com/gitlab-org/gitlab-ui/commit/266b5a7deb3496c80418fa6d39e944ddab4cab0d))
|
|
25
|
+
|
|
26
|
+
# [36.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.6.0...v36.7.0) (2022-02-17)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **pagination:** Remove abbreviation from prev text ([f959077](https://gitlab.com/gitlab-org/gitlab-ui/commit/f959077da8ec3bf2107f2229a25fd09ff6771993))
|
|
32
|
+
|
|
33
|
+
# [36.6.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.5.1...v36.6.0) (2022-02-14)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **css:** Add shorthand border util classes ([318c99c](https://gitlab.com/gitlab-org/gitlab-ui/commit/318c99c4764b7cc889a4b97d93215ab322b03025))
|
|
39
|
+
|
|
1
40
|
## [36.5.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v36.5.0...v36.5.1) (2022-02-11)
|
|
2
41
|
|
|
3
42
|
|
|
@@ -76,15 +76,6 @@ var script = {
|
|
|
76
76
|
required: false,
|
|
77
77
|
default: ''
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Contained alerts have their content's width limited.
|
|
82
|
-
*/
|
|
83
|
-
contained: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
required: false,
|
|
86
|
-
default: false
|
|
87
|
-
},
|
|
88
79
|
sticky: {
|
|
89
80
|
type: Boolean,
|
|
90
81
|
required: false,
|
|
@@ -182,10 +173,9 @@ const __vue_script__ = script;
|
|
|
182
173
|
/* template */
|
|
183
174
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:[
|
|
184
175
|
'gl-alert',
|
|
185
|
-
{ 'gl-alert-max-content gl-alert-layout-limited': _vm.contained },
|
|
186
176
|
{ 'gl-alert-sticky': _vm.sticky },
|
|
187
177
|
{ 'gl-alert-not-dismissible': !_vm.dismissible },
|
|
188
|
-
_vm.variantClass ]},[_c('
|
|
178
|
+
_vm.variantClass ]},[_c('gl-icon',{class:{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !_vm.title },attrs:{"name":_vm.iconName}}),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":"alert"}},[(_vm.title)?_c('h4',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",_vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])}))],2):_vm._e()])],1)};
|
|
189
179
|
var __vue_staticRenderFns__ = [];
|
|
190
180
|
|
|
191
181
|
/* style */
|
|
@@ -35,7 +35,7 @@ var script = {
|
|
|
35
35
|
const __vue_script__ = script;
|
|
36
36
|
|
|
37
37
|
/* template */
|
|
38
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-card"},[(
|
|
38
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-card"},[(_vm.$slots.header)?_c('div',{staticClass:"gl-card-header",class:_vm.headerClass},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-card-body",class:_vm.bodyClass},[_vm._t("default")],2),_vm._v(" "),(_vm.$slots.footer)?_c('div',{staticClass:"gl-card-footer",class:_vm.footerClass},[_vm._t("footer")],2):_vm._e()])};
|
|
39
39
|
var __vue_staticRenderFns__ = [];
|
|
40
40
|
|
|
41
41
|
/* style */
|
|
@@ -1,54 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "# GlFormRadioGroup\n\nThe `GlFormRadioGroup` component provides an alternative and sometimes more\ncompact way of setting up a group of `GlFormRadio` components.\n\n## Usage\n\n`GlFormRadioGroup` can be used in a few ways to build a group of `GlFormRadio`\ncomponents: implicitly, explicitly, or a mix of both.\n\nBelow is an example which demonstrates all three approaches, written such that\nall of them produce the same visual result.\n\n```html\n<script>\nexport default {\n data() {\n return {\n selected: 'one',\n options: [\n {\n value: 'one',\n text: 'One',\n },\n {\n value: 'two',\n text: 'Two',\n },\n {\n value: 'three',\n text: 'Three',\n },\n ],\n };\n },\n};\n</script>\n\n<template>\n <div>\n <!-- Implicit -->\n <gl-form-radio-group v-model=\"selected\" :options=\"options\" name=\"implicit\" />\n\n <!-- Explicit -->\n <gl-form-radio-group v-model=\"selected\" name=\"explicit\">\n <gl-form-radio value=\"one\">One</gl-form-radio>\n <gl-form-radio value=\"two\">Two</gl-form-radio>\n <gl-form-radio value=\"three\">Three</gl-form-radio>\n </gl-form-radio-group>\n\n <!-- Mixed -->\n <gl-form-radio-group v-model=\"selected\" :options=\"[options[1]]\" name=\"mixed\">\n <template #first>\n <gl-form-radio value=\"one\">One</gl-form-radio>\n </template>\n <gl-form-radio value=\"three\">Three</gl-form-radio>\n </gl-form-radio-group>\n </div>\n</template>\n```\n\n## Stacked\n\nBy default, the GitLab Design guide mandates the `<gl-form-radio-group>` be `stacked` by default and\nis non-changeable at this time.\n";
|
|
1
|
+
var description = "The `GlFormRadioGroup` component provides an alternative and sometimes more\ncompact way of setting up a group of `GlFormRadio` components.\n\n## Usage\n\n`GlFormRadioGroup` can be used in a few ways to build a group of `GlFormRadio`\ncomponents: implicitly, explicitly, or a mix of both.\n\nBelow is an example which demonstrates all three approaches, written such that\nall of them produce the same visual result.\n\n```html\n<script>\nexport default {\n data() {\n return {\n selected: 'one',\n options: [\n {\n value: 'one',\n text: 'One',\n },\n {\n value: 'two',\n text: 'Two',\n },\n {\n value: 'three',\n text: 'Three',\n },\n ],\n };\n },\n};\n</script>\n\n<template>\n <div>\n <!-- Implicit -->\n <gl-form-radio-group v-model=\"selected\" :options=\"options\" name=\"implicit\" />\n\n <!-- Explicit -->\n <gl-form-radio-group v-model=\"selected\" name=\"explicit\">\n <gl-form-radio value=\"one\">One</gl-form-radio>\n <gl-form-radio value=\"two\">Two</gl-form-radio>\n <gl-form-radio value=\"three\">Three</gl-form-radio>\n </gl-form-radio-group>\n\n <!-- Mixed -->\n <gl-form-radio-group v-model=\"selected\" :options=\"[options[1]]\" name=\"mixed\">\n <template #first>\n <gl-form-radio value=\"one\">One</gl-form-radio>\n </template>\n <gl-form-radio value=\"three\">Three</gl-form-radio>\n </gl-form-radio-group>\n </div>\n</template>\n```\n\n## Stacked\n\nBy default, the GitLab Design guide mandates the `<gl-form-radio-group>` be `stacked` by default and\nis non-changeable at this time.\n";
|
|
4
2
|
|
|
5
3
|
var form_radio_group_documentation = {
|
|
6
4
|
description,
|
|
7
|
-
|
|
8
|
-
followsDesignSystem: true,
|
|
9
|
-
bootstrapComponent: 'b-form-radio-group',
|
|
10
|
-
propsInfo: {
|
|
11
|
-
options: {
|
|
12
|
-
additionalInfo: 'Array of objects representing the radios to render'
|
|
13
|
-
},
|
|
14
|
-
valueField: {
|
|
15
|
-
additionalInfo: 'Field name in the options prop that should be used for the value'
|
|
16
|
-
},
|
|
17
|
-
textField: {
|
|
18
|
-
additionalInfo: 'Field name in the options prop that should be used for the text label'
|
|
19
|
-
},
|
|
20
|
-
htmlField: {
|
|
21
|
-
additionalInfo: 'Field name in the options prop that should be used for the html label instead of text field. Use with caution.'
|
|
22
|
-
},
|
|
23
|
-
disabledField: {
|
|
24
|
-
additionalInfo: 'Field name in the options prop that should be used for the disabled state'
|
|
25
|
-
},
|
|
26
|
-
checked: {
|
|
27
|
-
additionalInfo: 'The current value of the checked radio in the group'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
events: [{
|
|
31
|
-
event: 'input',
|
|
32
|
-
args: [{
|
|
33
|
-
arg: 'checked',
|
|
34
|
-
description: 'current selected value of radio group'
|
|
35
|
-
}],
|
|
36
|
-
description: 'Emitted when the selected value is changed'
|
|
37
|
-
}, {
|
|
38
|
-
event: 'change',
|
|
39
|
-
args: [{
|
|
40
|
-
arg: 'checked',
|
|
41
|
-
description: 'current selected value of radio group'
|
|
42
|
-
}],
|
|
43
|
-
description: 'Emitted when the selected value is changed due to user interaction'
|
|
44
|
-
}],
|
|
45
|
-
slots: [{
|
|
46
|
-
name: 'first',
|
|
47
|
-
description: 'Slot for GlFormRadios that will appear before radios generated from options prop'
|
|
48
|
-
}, {
|
|
49
|
-
name: 'default',
|
|
50
|
-
description: 'Slot for GlFormRadios that will appear after radios generated from options prop'
|
|
51
|
-
}]
|
|
5
|
+
followsDesignSystem: true
|
|
52
6
|
};
|
|
53
7
|
|
|
54
8
|
export default form_radio_group_documentation;
|
|
@@ -17,14 +17,34 @@ var script = {
|
|
|
17
17
|
},
|
|
18
18
|
mixins: [formOptionsMixin],
|
|
19
19
|
inheritAttrs: false,
|
|
20
|
-
model
|
|
20
|
+
model,
|
|
21
|
+
methods: {
|
|
22
|
+
onInput(e) {
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when the selected value is changed.
|
|
25
|
+
*
|
|
26
|
+
* @event input
|
|
27
|
+
*/
|
|
28
|
+
this.$emit('input', e);
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
onChange(e) {
|
|
32
|
+
/**
|
|
33
|
+
* Emitted when the selected value is changed.
|
|
34
|
+
*
|
|
35
|
+
* @event change
|
|
36
|
+
*/
|
|
37
|
+
this.$emit('change', e);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
21
41
|
};
|
|
22
42
|
|
|
23
43
|
/* script */
|
|
24
44
|
const __vue_script__ = script;
|
|
25
45
|
|
|
26
46
|
/* template */
|
|
27
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-radio-group',_vm._g(_vm._b({staticClass:"gl-form-checkbox-group",attrs:{"stacked":""},on:{"input":
|
|
47
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-radio-group',_vm._g(_vm._b({staticClass:"gl-form-checkbox-group",attrs:{"stacked":""},on:{"input":_vm.onInput,"change":_vm.onChange}},'b-form-radio-group',_vm.$attrs,false),_vm.$listeners),[_vm._t("first"),_vm._v(" "),_vm._l((_vm.formOptions),function(option,idx){return _c('gl-form-radio',{key:idx,attrs:{"value":option.value,"disabled":option.disabled}},[(option.html)?_c('span',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(option.html),expression:"option.html"}]}):_c('span',[_vm._v(_vm._s(option.text))])])}),_vm._v(" "),_vm._t("default")],2)};
|
|
28
48
|
var __vue_staticRenderFns__ = [];
|
|
29
49
|
|
|
30
50
|
/* style */
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
|
-
|
|
3
1
|
var description = "## Heatmaps\n\n**Note** This component uses `<gl-legend>`, which should allow a user to click on any data point(s)\nin the legend and make the corresponding data point(s) on the chart rendered disappear.\n_See [area chart](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/charts-area-chart--default)\nfor an example_ For this particular chart, there is a [known issue](https://gitlab.com/gitlab-org/gitlab-ui/issues/352)\nwith the functionality of the legend, where clicking on it does nothing.\n";
|
|
4
2
|
|
|
5
3
|
var heatmap_documentation = {
|
|
6
4
|
description,
|
|
7
|
-
examples,
|
|
8
5
|
followsDesignSystem: true
|
|
9
6
|
};
|
|
10
7
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "### Line Chart\n\nThis is a basic line chart.\n\n### Implementation Details\n\nThis component wraps the Gitlab UI `chart` component, which in turn wraps the ECharts component.\n\nSee the [chart](./?path=/story/charts-chart--default) component for more info.\n";
|
|
1
|
+
var description = "This is a basic line chart.\n\n### Implementation Details\n\nThis component wraps the Gitlab UI `chart` component, which in turn wraps the ECharts component.\n\nSee the [chart](./?path=/story/charts-chart--default) component for more info.\n";
|
|
4
2
|
|
|
5
3
|
var line_documentation = {
|
|
6
4
|
followsDesignSystem: false,
|
|
7
|
-
description
|
|
8
|
-
examples
|
|
5
|
+
description
|
|
9
6
|
};
|
|
10
7
|
|
|
11
8
|
export default line_documentation;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var description = "# Chart Series Label\n\nDisplays chart data series name as a label for chart legend, tooltip, etc.\n";
|
|
1
|
+
var description = "Displays chart data series name as a label for chart legend, tooltip, etc.\n";
|
|
4
2
|
|
|
5
3
|
var series_label_documentation = {
|
|
6
|
-
description
|
|
7
|
-
examples
|
|
4
|
+
description
|
|
8
5
|
};
|
|
9
6
|
|
|
10
7
|
export default series_label_documentation;
|