@gitlab/ui 42.24.0 → 43.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "42.24.0",
3
+ "version": "43.0.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "test": "run-s test:unit test:visual",
35
35
  "test:integration": "NODE_ENV=test start-server-and-test start http://localhost:9001 cy:run",
36
36
  "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns storyshots.spec.js",
37
- "test:unit:watch": "yarn test:unit --watch --notify",
37
+ "test:unit:watch": "yarn test:unit --watch",
38
38
  "test:unit:debug": "NODE_ENV=test node --inspect node_modules/.bin/jest --testPathIgnorePatterns storyshot.spec.js --watch --runInBand",
39
39
  "test:visual": "./bin/run-visual-tests.sh 'jest ./tests/storyshots.spec.js'",
40
40
  "test:visual:minimal": "node ./bin/run_minimal_visual_tests.js",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "@popperjs/core": "^2.11.2",
59
59
  "bootstrap-vue": "2.20.1",
60
- "dompurify": "^2.3.9",
60
+ "dompurify": "^2.3.10",
61
61
  "echarts": "^5.3.2",
62
62
  "iframe-resizer": "^4.3.2",
63
63
  "lodash": "^4.17.20",
@@ -79,11 +79,11 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@arkweid/lefthook": "0.7.7",
82
- "@babel/core": "^7.10.2",
83
- "@babel/preset-env": "^7.10.2",
84
- "@gitlab/eslint-plugin": "14.0.0",
82
+ "@babel/core": "^7.18.9",
83
+ "@babel/preset-env": "^7.18.9",
84
+ "@gitlab/eslint-plugin": "15.0.0",
85
85
  "@gitlab/stylelint-config": "4.1.0",
86
- "@gitlab/svgs": "2.30.0",
86
+ "@gitlab/svgs": "2.33.0",
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",
@@ -106,7 +106,7 @@
106
106
  "bootstrap": "4.5.3",
107
107
  "cypress": "^6.6.0",
108
108
  "emoji-regex": "^10.0.0",
109
- "eslint": "8.19.0",
109
+ "eslint": "8.20.0",
110
110
  "eslint-import-resolver-jest": "3.0.2",
111
111
  "eslint-plugin-cypress": "2.12.1",
112
112
  "eslint-plugin-storybook": "0.6.1",
@@ -129,7 +129,7 @@
129
129
  "postcss-loader": "^3.0.0",
130
130
  "postcss-scss": "4.0.4",
131
131
  "prettier": "2.6.2",
132
- "puppeteer": "11.0.0",
132
+ "puppeteer": "15.5.0",
133
133
  "raw-loader": "^0.5.1",
134
134
  "rollup": "^2.53.1",
135
135
  "rollup-plugin-babel": "^4.4.0",
@@ -1,3 +1,12 @@
1
1
  // See https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1421#note_617098438
2
2
  // for more details
3
- export const forbiddenDataAttrs = ['data-remote', 'data-url', 'data-type', 'data-method'];
3
+ export const forbiddenDataAttrs = [
4
+ 'data-remote',
5
+ 'data-url',
6
+ 'data-type',
7
+ 'data-method',
8
+ 'data-disable-with',
9
+ 'data-disabled',
10
+ 'data-disable',
11
+ 'data-turbo',
12
+ ];
@@ -74,24 +74,20 @@ describe('safe html directive', () => {
74
74
  });
75
75
 
76
76
  describe('handles data attributes correctly', () => {
77
- const acceptedDataAttrs = ['data-safe', 'data-random'];
77
+ const allowedDataAttrs = ['data-safe', 'data-random'];
78
78
 
79
- it.each(forbiddenDataAttrs)('removes %s attributes', (attr) => {
80
- createComponent({
81
- html: `<a ${attr}="true"></a>`,
82
- });
79
+ it.each(forbiddenDataAttrs)('removes dangerous `%s` attribute', (attr) => {
80
+ const html = `<a ${attr}="true"></a>`;
81
+ createComponent({ html });
83
82
 
84
- expect(wrapper.html()).toEqual('<div><a></a></div>');
83
+ expect(wrapper.html()).not.toContain(html);
85
84
  });
86
85
 
87
- it.each(acceptedDataAttrs)('does not remove %s attributes', (attr) => {
88
- const attrWithValue = `${attr}="true"`;
89
-
90
- createComponent({
91
- html: `<a ${attrWithValue}="true"></a>`,
92
- });
86
+ it.each(allowedDataAttrs)('does not remove allowed `%s` attribute', (attr) => {
87
+ const html = `<a ${attr}="true"></a>`;
88
+ createComponent({ html });
93
89
 
94
- expect(wrapper.html()).toEqual(`<div><a ${attrWithValue}></a></div>`);
90
+ expect(wrapper.html()).toContain(html);
95
91
  });
96
92
  });
97
93
  });
@@ -7499,6 +7499,12 @@
7499
7499
  .gl-text-transform-none\! {
7500
7500
  text-transform: none !important;
7501
7501
  }
7502
+ .gl-text-transform-capitalize {
7503
+ text-transform: capitalize;
7504
+ }
7505
+ .gl-text-transform-capitalize\! {
7506
+ text-transform: capitalize !important;
7507
+ }
7502
7508
  .gl-text-overflow-ellipsis {
7503
7509
  text-overflow: ellipsis;
7504
7510
  }
@@ -50,6 +50,10 @@
50
50
  text-transform: none;
51
51
  }
52
52
 
53
+ @mixin gl-text-transform-capitalize {
54
+ text-transform: capitalize;
55
+ }
56
+
53
57
  /**
54
58
  * Text overflow utilities
55
59
  *