@gitlab/ui 135.1.0 → 135.1.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.
@@ -5,7 +5,7 @@ import { onInstanceDestroy } from '../../../utils/on-instance-destroy';
5
5
  import { useParentMixin } from '../../../mixins/use-parent';
6
6
  import { concat, from } from '../../../utils/array';
7
7
  import { getInstanceFromElement } from '../../../utils/element-to-vue-instance-registry';
8
- import { requestAF, contains, isVisible, getById, isElement, closest, hasClass, select, getAttr, setAttr, removeAttr, hasAttr, isDisabled, attemptFocus } from '../../../utils/dom';
8
+ import { requestAF, contains, isVisible, getById, isElement, closest, hasClass, select, getAttr, setAttr, removeAttr, hasAttr, isDisabledNatively, attemptFocus } from '../../../utils/dom';
9
9
  import { getRootEventName, eventOn, eventOff, getRootActionEventName, eventOnOff } from '../../../utils/events';
10
10
  import { getScopeId } from '../../../utils/get-scope-id';
11
11
  import { identity } from '../../../utils/identity';
@@ -755,7 +755,7 @@ const BVTooltip = /*#__PURE__*/extend({
755
755
  // General trigger event handler
756
756
  // target is the trigger element
757
757
  const target = this.getTarget();
758
- if (!target || isDisabled(target) || !this.$_enabled || this.dropdownOpen()) {
758
+ if (!target || isDisabledNatively(target) || !this.$_enabled || this.dropdownOpen()) {
759
759
  // If disabled or not enabled, or if a dropdown that is open, don't do anything
760
760
  // If tip is shown before element gets disabled, then tip will not
761
761
  // close until no longer disabled or forcefully closed
@@ -79,8 +79,11 @@ const isVisible = el => {
79
79
  return !!(bcr && bcr.height > 0 && bcr.width > 0);
80
80
  };
81
81
 
82
- // Determine if an element is disabled
83
- const isDisabled = el => !isElement(el) || el.disabled || hasAttr(el, 'disabled') || hasClass(el, 'disabled');
82
+ // Determine if an element is disabled natively
83
+ const isDisabledNatively = el => !isElement(el) || el.disabled || hasAttr(el, 'disabled');
84
+
85
+ // Determine if an element is disabled natively, accessibly, or visibly
86
+ const isDisabled = el => isDisabledNatively(el) || getAttr(el, 'aria-disabled') === 'true' || hasClass(el, 'disabled');
84
87
 
85
88
  // Cause/wait-for an element to reflow its content (adjusting its height/width)
86
89
  const reflow = el => {
@@ -289,4 +292,4 @@ const attemptBlur = el => {
289
292
  return !isActiveElement(el);
290
293
  };
291
294
 
292
- export { MutationObs, addClass, attemptBlur, attemptFocus, closest, closestEl, contains, getActiveElement, getAttr, getBCR, getById, getCS, getSel, getStyle, getTabables, hasAttr, hasClass, isActiveElement, isDisabled, isElement, isTag, isVisible, matches, matchesEl, offset, position, reflow, removeAttr, removeClass, removeNode, removeStyle, requestAF, select, selectAll, setAttr, setStyle };
295
+ export { MutationObs, addClass, attemptBlur, attemptFocus, closest, closestEl, contains, getActiveElement, getAttr, getBCR, getById, getCS, getSel, getStyle, getTabables, hasAttr, hasClass, isActiveElement, isDisabled, isDisabledNatively, isElement, isTag, isVisible, matches, matchesEl, offset, position, reflow, removeAttr, removeClass, removeNode, removeStyle, requestAF, select, selectAll, setAttr, setStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "135.1.0",
3
+ "version": "135.1.2",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -93,7 +93,7 @@
93
93
  "chokidar": "^4.0.3",
94
94
  "sane": "^5.0.1",
95
95
  "jackspeak": "2.3.6",
96
- "postcss": "8.5.16",
96
+ "postcss": "8.5.23",
97
97
  "json5": "2.2.3",
98
98
  "rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "3.3.1"
99
99
  },
@@ -135,12 +135,12 @@
135
135
  "@vue/vue2-jest": "29.2.6",
136
136
  "@vue/vue3-jest": "^29.2.6",
137
137
  "@yarnpkg/lockfile": "^1.1.0",
138
- "acorn": "^8.17.0",
138
+ "acorn": "^8.18.0",
139
139
  "acorn-walk": "^8.3.5",
140
- "autoprefixer": "10.5.2",
140
+ "autoprefixer": "10.5.4",
141
141
  "axe-playwright": "^2.2.2",
142
142
  "babel-loader": "^9.2.1",
143
- "cypress": "15.18.1",
143
+ "cypress": "15.19.0",
144
144
  "cypress-real-events": "^1.15.0",
145
145
  "dompurify": "^3.1.2",
146
146
  "emoji-regex": "^10.6.0",
@@ -156,9 +156,9 @@
156
156
  "mockdate": "^3.0.5",
157
157
  "module-alias": "^2.3.4",
158
158
  "pikaday": "^1.8.0",
159
- "playwright": "^1.61.1",
160
- "playwright-core": "^1.61.1",
161
- "postcss": "8.5.16",
159
+ "playwright": "^1.62.0",
160
+ "playwright-core": "^1.62.0",
161
+ "postcss": "8.5.23",
162
162
  "postcss-loader": "8.2.1",
163
163
  "postcss-scss": "4.0.9",
164
164
  "react": "18.3.1",
@@ -169,7 +169,7 @@
169
169
  "rollup-plugin-string": "^3.0.0",
170
170
  "rollup-plugin-svg": "^2.0.0",
171
171
  "rollup-plugin-vue": "^5.1.9",
172
- "sass": "^1.101.0",
172
+ "sass": "^1.102.0",
173
173
  "sass-loader": "^10.5.2",
174
174
  "sass-true": "^9",
175
175
  "start-server-and-test": "^2.1.5",
@@ -295,8 +295,10 @@ export default {
295
295
  },
296
296
  },
297
297
  beforeDestroy() {
298
- this.chart.off('mouseout', this.hideAnnotationsTooltip);
299
- this.chart.off('mouseover', this.onChartMouseOver);
298
+ if (!this.chart) return;
299
+
300
+ this.chart.off('mouseout', this.onChartDataPointMouseOut);
301
+ this.chart.off('mouseover', this.onChartDataPointMouseOver);
300
302
  },
301
303
  methods: {
302
304
  defaultAnnotationTooltipText(params) {
@@ -146,6 +146,8 @@ export default {
146
146
  this.setChartSize();
147
147
  },
148
148
  beforeDestroy() {
149
+ if (!this.chart) return;
150
+
149
151
  this.chart.off('click', this.handleClick);
150
152
  },
151
153
  methods: {
@@ -299,6 +299,8 @@ export default {
299
299
  },
300
300
  },
301
301
  beforeDestroy() {
302
+ if (!this.chart) return;
303
+
302
304
  this.chart.off('mouseout', this.onChartDataPointMouseOut);
303
305
  this.chart.off('mouseover', this.onChartDataPointMouseOver);
304
306
  },
@@ -32,8 +32,8 @@ import {
32
32
  getById,
33
33
  hasAttr,
34
34
  hasClass,
35
- isDisabled,
36
35
  isElement,
36
+ isDisabledNatively,
37
37
  isVisible,
38
38
  removeAttr,
39
39
  requestAF,
@@ -797,7 +797,7 @@ export const BVTooltip = /*#__PURE__*/ extend({
797
797
  // General trigger event handler
798
798
  // target is the trigger element
799
799
  const target = this.getTarget()
800
- if (!target || isDisabled(target) || !this.$_enabled || this.dropdownOpen()) {
800
+ if (!target || isDisabledNatively(target) || !this.$_enabled || this.dropdownOpen()) {
801
801
  // If disabled or not enabled, or if a dropdown that is open, don't do anything
802
802
  // If tip is shown before element gets disabled, then tip will not
803
803
  // close until no longer disabled or forcefully closed
@@ -100,9 +100,12 @@ export const isVisible = el => {
100
100
  return !!(bcr && bcr.height > 0 && bcr.width > 0)
101
101
  }
102
102
 
103
- // Determine if an element is disabled
103
+ // Determine if an element is disabled natively
104
+ export const isDisabledNatively = el => !isElement(el) || el.disabled || hasAttr(el, 'disabled')
105
+
106
+ // Determine if an element is disabled natively, accessibly, or visibly
104
107
  export const isDisabled = el =>
105
- !isElement(el) || el.disabled || hasAttr(el, 'disabled') || hasClass(el, 'disabled')
108
+ isDisabledNatively(el) || getAttr(el, 'aria-disabled') === 'true' || hasClass(el, 'disabled')
106
109
 
107
110
  // Cause/wait-for an element to reflow its content (adjusting its height/width)
108
111
  export const reflow = el => {