@gitlab/ui 42.24.1 → 43.1.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.1",
3
+ "version": "43.1.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",
@@ -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
  });
@@ -3236,6 +3236,18 @@
3236
3236
  }
3237
3237
  }
3238
3238
 
3239
+ .gl-lg-flex-direction-column {
3240
+ @include gl-media-breakpoint-up(lg) {
3241
+ @include gl-flex-direction-column;
3242
+ }
3243
+ }
3244
+
3245
+ .gl-lg-flex-direction-column\! {
3246
+ @include gl-media-breakpoint-up(lg) {
3247
+ @include gl-flex-direction-column;
3248
+ }
3249
+ }
3250
+
3239
3251
  .gl-xs-flex-direction-column {
3240
3252
  @include gl-media-breakpoint-down(sm) {
3241
3253
  flex-direction: column;
@@ -7499,6 +7511,12 @@
7499
7511
  .gl-text-transform-none\! {
7500
7512
  text-transform: none !important;
7501
7513
  }
7514
+ .gl-text-transform-capitalize {
7515
+ text-transform: capitalize;
7516
+ }
7517
+ .gl-text-transform-capitalize\! {
7518
+ text-transform: capitalize !important;
7519
+ }
7502
7520
  .gl-text-overflow-ellipsis {
7503
7521
  text-overflow: ellipsis;
7504
7522
  }
@@ -95,6 +95,12 @@
95
95
  }
96
96
  }
97
97
 
98
+ @mixin gl-lg-flex-direction-column {
99
+ @include gl-media-breakpoint-up(lg) {
100
+ @include gl-flex-direction-column;
101
+ }
102
+ }
103
+
98
104
  @mixin gl-xs-flex-direction-column {
99
105
  @include gl-media-breakpoint-down(sm) {
100
106
  flex-direction: column;
@@ -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
  *