@gitlab/ui 65.4.0 → 66.0.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,23 @@
1
+ ## [66.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.0.0...v66.0.1) (2023-08-24)
2
+
3
+
4
+ ### Reverts
5
+
6
+ * feat(GlToggle): Add a block level toggle ([c092403](https://gitlab.com/gitlab-org/gitlab-ui/commit/c0924031044b00711eceb8f3f63e4a5d2351c4e4))
7
+
8
+ # [66.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v65.4.0...v66.0.0) (2023-08-24)
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * Remove `GlSkeletonLoading` component ([a2cf859](https://gitlab.com/gitlab-org/gitlab-ui/commit/a2cf859afb63887f847aa88822aeedd51d5c141c))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * `GlSkeletonLoading` has been deprecated
19
+ since `v20.10.0`.
20
+
1
21
  # [65.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v65.3.1...v65.4.0) (2023-08-21)
2
22
 
3
23
 
@@ -88,40 +88,18 @@ var script = {
88
88
  };
89
89
  },
90
90
  computed: {
91
- layoutAllowsDescription() {
92
- return this.isVerticalLayout || this.isBlockLayout;
93
- },
94
91
  shouldRenderDescription() {
95
- return Boolean(this.$scopedSlots.description || this.description) && this.layoutAllowsDescription;
96
- },
97
- labelIsSrOnly() {
98
- return this.labelPosition === 'hidden';
99
- },
100
- layoutAllowsHelp() {
101
- return this.isVerticalLayout || this.isBlockLayout;
92
+ // eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
93
+ return Boolean(this.$scopedSlots.description || this.description) && this.isVerticalLayout;
102
94
  },
103
95
  shouldRenderHelp() {
104
- return Boolean(this.$scopedSlots.help || this.help) && this.layoutAllowsHelp;
96
+ // eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
97
+ return Boolean(this.$slots.help || this.help) && this.isVerticalLayout;
105
98
  },
106
- labelContainerClasses() {
107
- return {
108
- 'gl-mb-3': this.isVerticalLayout && !this.labelIsSrOnly
109
- };
110
- },
111
- labelClasses() {
112
- if (this.labelIsSrOnly) return 'gl-sr-only';
113
- return {
114
- 'gl-mb-2': this.shouldRenderDescription,
115
- 'gl-mb-3': !this.shouldRenderDescription && !this.isVerticalLayout
116
- };
117
- },
118
- wrapperClasses() {
119
- return {
120
- 'gl-flex-direction-column': this.isVerticalLayout,
121
- 'gl-toggle-label-inline': !this.isVerticalLayout,
122
- 'is-disabled': this.disabled,
123
- 'gl-toggle-label-position-block': this.isBlockLayout
124
- };
99
+ toggleClasses() {
100
+ return [{
101
+ 'gl-sr-only': this.labelPosition === 'hidden'
102
+ }, this.shouldRenderDescription ? 'gl-mb-2' : 'gl-mb-3'];
125
103
  },
126
104
  icon() {
127
105
  return this.value ? 'mobile-issue-close' : 'close';
@@ -134,9 +112,6 @@ var script = {
134
112
  },
135
113
  isVerticalLayout() {
136
114
  return this.labelPosition === 'top' || this.labelPosition === 'hidden';
137
- },
138
- isBlockLayout() {
139
- return this.labelPosition === 'block';
140
115
  }
141
116
  },
142
117
  beforeCreate() {
@@ -162,11 +137,15 @@ var script = {
162
137
  const __vue_script__ = script;
163
138
 
164
139
  /* template */
165
- 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 flex-grow-1",class:_vm.wrapperClasses,attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label-container",class:_vm.labelContainerClasses},[_c('span',{staticClass:"gl-toggle-label",class:_vm.labelClasses,attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_vm._v(" "),(_vm.shouldRenderDescription)?_c('span',{staticClass:"gl-description-label",attrs:{"data-testid":"toggle-description"}},[_vm._t("description",function(){return [_vm._v(_vm._s(_vm.description))]})],2):_vm._e()]),_vm._v(" "),_c('span',{staticClass:"gl-toggle-switch-container"},[(_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:{
166
- 'gl-toggle': true,
167
- 'is-checked': _vm.value,
168
- 'is-disabled': _vm.disabled,
169
- },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()])])};
140
+ 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:{
141
+ 'gl-flex-direction-column': _vm.isVerticalLayout,
142
+ 'gl-toggle-label-inline': !_vm.isVerticalLayout,
143
+ 'is-disabled': _vm.disabled,
144
+ },attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label gl-flex-shrink-0",class:_vm.toggleClasses,attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_vm._v(" "),(_vm.shouldRenderDescription)?_c('span',{staticClass:"gl-description-label gl-mb-3",attrs:{"data-testid":"toggle-description"}},[_vm._t("description",function(){return [_vm._v(_vm._s(_vm.description))]})],2):_vm._e(),_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:{
145
+ 'gl-toggle': true,
146
+ 'is-checked': _vm.value,
147
+ 'is-disabled': _vm.disabled,
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()])};
170
149
  var __vue_staticRenderFns__ = [];
171
150
 
172
151
  /* style */