@gitlab/ui 62.5.1 → 62.5.2
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
|
+
## [62.5.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v62.5.1...v62.5.2) (2023-05-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlToggle:** set aria-disabled attribute ([a899eb7](https://gitlab.com/gitlab-org/gitlab-ui/commit/a899eb7acd23d089ddb43c3bcd66a0aae7fe3c6f))
|
|
7
|
+
|
|
1
8
|
## [62.5.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v62.5.0...v62.5.1) (2023-04-28)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -145,7 +145,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
145
145
|
'gl-toggle': true,
|
|
146
146
|
'is-checked': _vm.value,
|
|
147
147
|
'is-disabled': _vm.disabled,
|
|
148
|
-
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"type":"button"},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature.apply(null, arguments)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"light"}}):_c('span',{class:{ 'toggle-icon': true, disabled: _vm.disabled }},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":16}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",function(){return [_vm._v(_vm._s(_vm.help))]})],2):_vm._e()])};
|
|
148
|
+
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"aria-disabled":_vm.disabled,"type":"button"},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature.apply(null, arguments)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"light"}}):_c('span',{class:{ 'toggle-icon': true, disabled: _vm.disabled }},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":16}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",function(){return [_vm._v(_vm._s(_vm.help))]})],2):_vm._e()])};
|
|
149
149
|
var __vue_staticRenderFns__ = [];
|
|
150
150
|
|
|
151
151
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "62.5.
|
|
3
|
+
"version": "62.5.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
"babel-loader": "^8.0.5",
|
|
117
117
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
118
118
|
"bootstrap": "4.6.2",
|
|
119
|
-
"cypress": "12.
|
|
119
|
+
"cypress": "12.11.0",
|
|
120
120
|
"emoji-regex": "^10.0.0",
|
|
121
|
-
"eslint": "8.
|
|
121
|
+
"eslint": "8.39.0",
|
|
122
122
|
"eslint-import-resolver-jest": "3.0.2",
|
|
123
123
|
"eslint-plugin-cypress": "2.13.2",
|
|
124
124
|
"eslint-plugin-storybook": "0.6.11",
|
|
@@ -50,10 +50,10 @@ describe('toggle', () => {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
describe.each`
|
|
53
|
-
state | disabled | disabledClassExpected | changeEventPayload
|
|
54
|
-
${'enabled'} | ${false} | ${false} | ${[[true]]}
|
|
55
|
-
${'disabled'} | ${true} | ${true} | ${undefined}
|
|
56
|
-
`('when $state', ({ disabled, disabledClassExpected, changeEventPayload }) => {
|
|
53
|
+
state | disabled | disabledClassExpected | changeEventPayload | ariaDisabledValue
|
|
54
|
+
${'enabled'} | ${false} | ${false} | ${[[true]]} | ${undefined}
|
|
55
|
+
${'disabled'} | ${true} | ${true} | ${undefined} | ${'true'}
|
|
56
|
+
`('when $state', ({ disabled, disabledClassExpected, changeEventPayload, ariaDisabledValue }) => {
|
|
57
57
|
beforeEach(() => {
|
|
58
58
|
createWrapper({ disabled });
|
|
59
59
|
});
|
|
@@ -67,6 +67,10 @@ describe('toggle', () => {
|
|
|
67
67
|
|
|
68
68
|
expect(wrapper.emitted('change')).toEqual(changeEventPayload);
|
|
69
69
|
});
|
|
70
|
+
|
|
71
|
+
it(`sets aria-disabled attribute to ${ariaDisabledValue}`, () => {
|
|
72
|
+
expect(findButton().attributes('aria-disabled')).toBe(ariaDisabledValue);
|
|
73
|
+
});
|
|
70
74
|
});
|
|
71
75
|
|
|
72
76
|
describe.each`
|