@gitlab/ui 40.7.0 → 40.7.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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [40.7.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.7.0...v40.7.1) (2022-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlToggle:** Fix overflow of long help text ([8947400](https://gitlab.com/gitlab-org/gitlab-ui/commit/89474002e1f9333675ac6ed626277a18595d9d89))
|
|
7
|
+
|
|
1
8
|
# [40.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.6.6...v40.7.0) (2022-05-31)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -131,11 +131,11 @@ var script = {
|
|
|
131
131
|
const __vue_script__ = script;
|
|
132
132
|
|
|
133
133
|
/* template */
|
|
134
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-toggle-wrapper gl-display-flex gl-mb-0
|
|
134
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-toggle-wrapper gl-display-flex gl-mb-0",class:{
|
|
135
135
|
'gl-flex-direction-column': _vm.labelPosition === 'top' || _vm.labelPosition === 'hidden',
|
|
136
136
|
'gl-toggle-label-inline': _vm.labelPosition === 'left',
|
|
137
137
|
'is-disabled': _vm.disabled,
|
|
138
|
-
},attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label",class:{ 'gl-sr-only': _vm.labelPosition === 'hidden' },attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",[_vm._v(_vm._s(_vm.label))])],2),_vm._v(" "),(_vm.name)?_c('input',{attrs:{"name":_vm.name,"type":"hidden"},domProps:{"value":_vm.value}}):_vm._e(),_vm._v(" "),_c('button',{class:{
|
|
138
|
+
},attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label gl-flex-shrink-0",class:{ 'gl-sr-only': _vm.labelPosition === 'hidden' },attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",[_vm._v(_vm._s(_vm.label))])],2),_vm._v(" "),(_vm.name)?_c('input',{attrs:{"name":_vm.name,"type":"hidden"},domProps:{"value":_vm.value}}):_vm._e(),_vm._v(" "),_c('button',{staticClass:"gl-flex-shrink-0",class:{
|
|
139
139
|
'gl-toggle': true,
|
|
140
140
|
'is-checked': _vm.value,
|
|
141
141
|
'is-disabled': _vm.disabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "40.7.
|
|
3
|
+
"version": "40.7.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -87,15 +87,15 @@
|
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
90
|
-
"@storybook/addon-a11y": "6.5.
|
|
91
|
-
"@storybook/addon-docs": "6.5.
|
|
92
|
-
"@storybook/addon-essentials": "6.5.
|
|
90
|
+
"@storybook/addon-a11y": "6.5.6",
|
|
91
|
+
"@storybook/addon-docs": "6.5.6",
|
|
92
|
+
"@storybook/addon-essentials": "6.5.6",
|
|
93
93
|
"@storybook/addon-knobs": "6.4.0",
|
|
94
|
-
"@storybook/addon-storyshots": "6.5.
|
|
95
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
96
|
-
"@storybook/addon-viewport": "6.5.
|
|
97
|
-
"@storybook/theming": "6.5.
|
|
98
|
-
"@storybook/vue": "6.5.
|
|
94
|
+
"@storybook/addon-storyshots": "6.5.6",
|
|
95
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.6",
|
|
96
|
+
"@storybook/addon-viewport": "6.5.6",
|
|
97
|
+
"@storybook/theming": "6.5.6",
|
|
98
|
+
"@storybook/vue": "6.5.6",
|
|
99
99
|
"@vue/test-utils": "1.3.0",
|
|
100
100
|
"autoprefixer": "^9.7.6",
|
|
101
101
|
"babel-jest": "^26.6.3",
|
|
@@ -5,6 +5,10 @@ import readme from './toggle.md';
|
|
|
5
5
|
|
|
6
6
|
const defaultValue = (prop) => GlToggle.props[prop].default;
|
|
7
7
|
|
|
8
|
+
const longHelp = `This is a toggle component with a long help message.
|
|
9
|
+
You can notice how the text wraps when the width of the container
|
|
10
|
+
is not enough to fix the entire text.`;
|
|
11
|
+
|
|
8
12
|
const generateProps = ({
|
|
9
13
|
value = true,
|
|
10
14
|
disabled = defaultValue('disabled'),
|
|
@@ -43,6 +47,11 @@ const Template = (args, { argTypes }) => ({
|
|
|
43
47
|
export const Default = Template.bind({});
|
|
44
48
|
Default.args = generateProps();
|
|
45
49
|
|
|
50
|
+
export const WithLongHelp = Template.bind({});
|
|
51
|
+
WithLongHelp.args = generateProps({
|
|
52
|
+
help: longHelp,
|
|
53
|
+
});
|
|
54
|
+
|
|
46
55
|
export default {
|
|
47
56
|
title: 'base/toggle',
|
|
48
57
|
component: GlToggle,
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
|
|
119
119
|
<template>
|
|
120
120
|
<div
|
|
121
|
-
class="gl-toggle-wrapper gl-display-flex gl-mb-0
|
|
121
|
+
class="gl-toggle-wrapper gl-display-flex gl-mb-0"
|
|
122
122
|
:class="{
|
|
123
123
|
'gl-flex-direction-column': labelPosition === 'top' || labelPosition === 'hidden',
|
|
124
124
|
'gl-toggle-label-inline': labelPosition === 'left',
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
129
129
|
<span
|
|
130
130
|
:id="labelId"
|
|
131
131
|
:class="{ 'gl-sr-only': labelPosition === 'hidden' }"
|
|
132
|
-
class="gl-toggle-label"
|
|
132
|
+
class="gl-toggle-label gl-flex-shrink-0"
|
|
133
133
|
data-testid="toggle-label"
|
|
134
134
|
>
|
|
135
135
|
<!-- @slot The toggle's label. -->
|
|
@@ -146,6 +146,7 @@ export default {
|
|
|
146
146
|
'is-checked': value,
|
|
147
147
|
'is-disabled': disabled,
|
|
148
148
|
}"
|
|
149
|
+
class="gl-flex-shrink-0"
|
|
149
150
|
type="button"
|
|
150
151
|
@click.prevent="toggleFeature"
|
|
151
152
|
>
|