@gitlab/ui 114.3.0 → 114.5.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.
@@ -28,8 +28,6 @@ function isVnodeEmpty(vnode) {
28
28
  function isSlotEmpty(vueInstance, slot, slotArgs) {
29
29
  var _vueInstance$$scopedS, _vueInstance$$scopedS2;
30
30
  const slotContent = (_vueInstance$$scopedS = (_vueInstance$$scopedS2 = vueInstance.$scopedSlots)[slot]) === null || _vueInstance$$scopedS === void 0 ? void 0 : _vueInstance$$scopedS.call(_vueInstance$$scopedS2, slotArgs);
31
-
32
- // eslint-disable-next-line unicorn/no-array-callback-reference
33
31
  return isVnodeEmpty(slotContent);
34
32
  }
35
33
 
@@ -24,8 +24,6 @@ class MockObserver {
24
24
  this.$_observers = [];
25
25
  }
26
26
  takeRecords() {}
27
-
28
- // eslint-disable-next-line camelcase
29
27
  $_triggerObserve(nodeParam) {
30
28
  let {
31
29
  entry = {},
@@ -41,8 +39,6 @@ class MockObserver {
41
39
  }
42
40
  });
43
41
  }
44
-
45
- // eslint-disable-next-line camelcase
46
42
  $_hasObserver(node) {
47
43
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
48
44
  return this.$_observers.some(_ref => {
@@ -66,7 +66,7 @@ const tableRendererMixin = extend({
66
66
  const {
67
67
  isResponsive
68
68
  } = this;
69
- return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? `table-responsive-${this.responsive}` : ''].filter(identity);
69
+ return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? `table-responsive table-responsive-${this.responsive}` : ''].filter(identity);
70
70
  },
71
71
  wrapperStyles() {
72
72
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "114.3.0",
3
+ "version": "114.5.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -66,7 +66,7 @@
66
66
  "test:visual:internal": "NODE_ENV=test IS_VISUAL_TEST=true start-test storybook:run http-get://${STORYBOOK_HOST:-localhost}:${STORYBOOK_PORT:-9001}/iframe.html",
67
67
  "prettier": "prettier --check '**/*.{js,mjs,ts,vue}'",
68
68
  "prettier:fix": "prettier --write '**/*.{js,mjs,ts,vue}'",
69
- "eslint": "eslint --max-warnings 0 --ext .js,.vue .",
69
+ "eslint": "eslint --max-warnings 0 .",
70
70
  "eslint:fix": "yarn eslint --fix",
71
71
  "stylelint": "stylelint 'src/**/*.scss'",
72
72
  "stylelint:fix": "yarn stylelint --fix",
@@ -102,7 +102,8 @@
102
102
  "jackspeak": "2.1.1",
103
103
  "postcss": "8.5.3",
104
104
  "json5": "2.2.3",
105
- "rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "1.4.2"
105
+ "rollup-plugin-vue/@vue/component-compiler/postcss-modules-sync/generic-names/loader-utils": "1.4.2",
106
+ "eslint-plugin-import": "2.31.0"
106
107
  },
107
108
  "devDependencies": {
108
109
  "@babel/core": "^7.27.1",
@@ -111,6 +112,8 @@
111
112
  "@babel/preset-env": "^7.27.2",
112
113
  "@babel/preset-react": "^7.27.1",
113
114
  "@cypress/grep": "^4.0.1",
115
+ "@eslint/eslintrc": "^3.3.1",
116
+ "@eslint/js": "^9.28.0",
114
117
  "@gitlab/eslint-plugin": "20.7.1",
115
118
  "@gitlab/fonts": "^1.3.0",
116
119
  "@gitlab/stylelint-config": "6.2.2",
@@ -154,10 +157,10 @@
154
157
  "emoji-regex": "^10.0.0",
155
158
  "entities": "^4.5.0",
156
159
  "esbuild": "^0.18.0",
157
- "eslint": "8.57.1",
158
- "eslint-formatter-gitlab": "^5.1.0",
160
+ "eslint": "9.28.0",
161
+ "eslint-formatter-gitlab": "^6.0.0",
159
162
  "eslint-import-resolver-jest": "3.0.2",
160
- "eslint-plugin-cypress": "3.6.0",
163
+ "eslint-plugin-cypress": "5.0.1",
161
164
  "eslint-plugin-storybook": "0.12.0",
162
165
  "fuse.js": "^7.0.0",
163
166
  "gitlab-api-async-iterator": "^1.3.1",
@@ -51,7 +51,7 @@ $gl-drawer-scrim-gradient: linear-gradient(
51
51
  .gl-drawer-body > * {
52
52
  @apply gl-border-b;
53
53
  @apply gl-mx-5;
54
-
54
+
55
55
  &:last-child {
56
56
  @apply gl-border-none;
57
57
  }
@@ -112,6 +112,7 @@ $gl-drawer-scrim-gradient: linear-gradient(
112
112
 
113
113
  .gl-drawer-body {
114
114
  @apply gl-grow;
115
+ min-height: 0;
115
116
  // prevent safari bug where box shadow is visible
116
117
  // above the drawer when hovering interactive elements
117
118
  // see https://gitlab.com/gitlab-org/gitlab/-/issues/366558
@@ -92,7 +92,6 @@ export default {
92
92
  },
93
93
  computed: {
94
94
  shouldRenderDescription() {
95
- // eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
96
95
  return Boolean(this.$scopedSlots.description || this.description) && this.isVerticalLayout;
97
96
  },
98
97
  shouldRenderHelp() {
package/src/config.js CHANGED
@@ -29,7 +29,7 @@ try {
29
29
  if (glTooltipDelay) {
30
30
  tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
31
31
  }
32
- } catch (e) {
32
+ } catch {
33
33
  // localStorage doesn't exist (or the value is not properly formatted)
34
34
  }
35
35
 
@@ -14,7 +14,7 @@ export const javascriptUrls = [
14
14
  'javascript:alert("XSS")',
15
15
  'jav\tascript:alert("XSS");',
16
16
  ];
17
- /* eslint-disable no-script-url */
17
+ /* eslint-enable no-script-url */
18
18
 
19
19
  export const encodedJavaScriptUrls = [
20
20
  '&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041',
@@ -29,7 +29,7 @@ const isSafeURL = (url) => {
29
29
  try {
30
30
  const parsedURL = new URL(url, getBaseURL());
31
31
  return ['http:', 'https:', 'mailto:', 'ftp:'].includes(parsedURL.protocol);
32
- } catch (e) {
32
+ } catch {
33
33
  return false;
34
34
  }
35
35
  };
@@ -30,6 +30,5 @@ export function isVnodeEmpty(vnode) {
30
30
  export function isSlotEmpty(vueInstance, slot, slotArgs) {
31
31
  const slotContent = vueInstance.$scopedSlots[slot]?.(slotArgs);
32
32
 
33
- // eslint-disable-next-line unicorn/no-array-callback-reference
34
33
  return isVnodeEmpty(slotContent);
35
34
  }
@@ -1,5 +1,5 @@
1
1
  /* global jest, beforeEach, afterEach */
2
- /* eslint-disable class-methods-use-this, max-classes-per-file, camelcase */
2
+ /* eslint-disable class-methods-use-this, max-classes-per-file */
3
3
  import isMatch from 'lodash/isMatch';
4
4
 
5
5
  /**
@@ -27,7 +27,6 @@ class MockObserver {
27
27
 
28
28
  takeRecords() {}
29
29
 
30
- // eslint-disable-next-line camelcase
31
30
  $_triggerObserve(nodeParam, { entry = {}, options = {} } = {}) {
32
31
  const nodes = this.$_getNodesFromParam(nodeParam);
33
32
 
@@ -38,7 +37,6 @@ class MockObserver {
38
37
  });
39
38
  }
40
39
 
41
- // eslint-disable-next-line camelcase
42
40
  $_hasObserver(node, options = {}) {
43
41
  return this.$_observers.some(
44
42
  ([obvNode, obvOptions]) => node === obvNode && isMatch(options, obvOptions)
@@ -93,8 +93,7 @@
93
93
 
94
94
  @if $bv-enable-table-sticky {
95
95
  .b-table-sticky-header,
96
- .table-responsive,
97
- [class*="table-responsive-"] {
96
+ .table-responsive {
98
97
  // Move the table bottom margin to the wrapper
99
98
  margin-bottom: $spacer;
100
99
 
@@ -137,8 +136,7 @@
137
136
  // Sticky columns only work when table has sticky
138
137
  // headers and/or is responsive
139
138
  .b-table-sticky-header,
140
- .table-responsive,
141
- [class*="table-responsive-"] {
139
+ .table-responsive {
142
140
  > .table.b-table {
143
141
  > thead,
144
142
  > tbody,
@@ -70,7 +70,7 @@ export const tableRendererMixin = extend({
70
70
  isResponsive === true
71
71
  ? 'table-responsive'
72
72
  : isResponsive
73
- ? `table-responsive-${this.responsive}`
73
+ ? `table-responsive table-responsive-${this.responsive}`
74
74
  : ''
75
75
  ].filter(identity)
76
76
  },