@gitlab/ui 71.2.0 → 71.4.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Thu, 30 Nov 2023 19:25:01 GMT
3
+ // Generated on Mon, 04 Dec 2023 16:16:35 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -71,3 +71,124 @@ $blue-100: #064787;
71
71
  $blue-50: #033464;
72
72
  $white: #333238;
73
73
  $black: #fff;
74
+ $theme-light-red-950: #faf2f1;
75
+ $theme-light-red-900: #f6d9d5;
76
+ $theme-light-red-800: #ebada2;
77
+ $theme-light-red-700: #e07f6f;
78
+ $theme-light-red-600: #d36250;
79
+ $theme-light-red-500: #c24b38;
80
+ $theme-light-red-400: #b53a26;
81
+ $theme-light-red-300: #a02e1c;
82
+ $theme-light-red-200: #8b2212;
83
+ $theme-light-red-100: #751709;
84
+ $theme-light-red-50: #5c1105;
85
+ $theme-red-950: #f4e9e7;
86
+ $theme-red-900: #ecd3d0;
87
+ $theme-red-800: #e3bab5;
88
+ $theme-red-700: #d59086;
89
+ $theme-red-600: #c66e60;
90
+ $theme-red-500: #ad4a3b;
91
+ $theme-red-400: #a13322;
92
+ $theme-red-300: #8f2110;
93
+ $theme-red-200: #761405;
94
+ $theme-red-100: #580d02;
95
+ $theme-red-50: #380700;
96
+ $theme-green-950: #dde9de;
97
+ $theme-green-900: #b1d6b5;
98
+ $theme-green-800: #8cc497;
99
+ $theme-green-700: #69af7d;
100
+ $theme-green-600: #499767;
101
+ $theme-green-500: #308258;
102
+ $theme-green-400: #25744c;
103
+ $theme-green-300: #1b653f;
104
+ $theme-green-200: #155635;
105
+ $theme-green-100: #0e4328;
106
+ $theme-green-50: #052e19;
107
+ $theme-light-blue-950: #dde6ee;
108
+ $theme-light-blue-900: #c1d4e6;
109
+ $theme-light-blue-800: #a0bedc;
110
+ $theme-light-blue-700: #74a3d3;
111
+ $theme-light-blue-600: #4f8bc7;
112
+ $theme-light-blue-500: #3476b9;
113
+ $theme-light-blue-400: #2268ae;
114
+ $theme-light-blue-300: #145aa1;
115
+ $theme-light-blue-200: #0e4d8d;
116
+ $theme-light-blue-100: #0c4277;
117
+ $theme-light-blue-50: #0a3764;
118
+ $theme-blue-950: #cdd8e3;
119
+ $theme-blue-900: #b9cadc;
120
+ $theme-blue-800: #a6bdd5;
121
+ $theme-blue-700: #81a5c9;
122
+ $theme-blue-600: #628eb9;
123
+ $theme-blue-500: #4977a5;
124
+ $theme-blue-400: #346596;
125
+ $theme-blue-300: #235180;
126
+ $theme-blue-200: #153c63;
127
+ $theme-blue-100: #0b2640;
128
+ $theme-blue-50: #04101c;
129
+ $theme-indigo-950: #f1f1ff;
130
+ $theme-indigo-900: #dbdbf8;
131
+ $theme-indigo-800: #c7c7f2;
132
+ $theme-indigo-700: #a2a2e6;
133
+ $theme-indigo-600: #8181d7;
134
+ $theme-indigo-500: #6666c4;
135
+ $theme-indigo-400: #5252b5;
136
+ $theme-indigo-300: #41419f;
137
+ $theme-indigo-200: #303083;
138
+ $theme-indigo-100: #222261;
139
+ $theme-indigo-50: #14143d;
140
+ $data-viz-orange-950: #fae8d1;
141
+ $data-viz-orange-900: #f5d6b3;
142
+ $data-viz-orange-800: #eebd8c;
143
+ $data-viz-orange-700: #e99b60;
144
+ $data-viz-orange-600: #e07e41;
145
+ $data-viz-orange-500: #c95d2e;
146
+ $data-viz-orange-400: #b14f18;
147
+ $data-viz-orange-300: #92430a;
148
+ $data-viz-orange-200: #6f3500;
149
+ $data-viz-orange-100: #5e2f05;
150
+ $data-viz-orange-50: #4b2707;
151
+ $data-viz-magenta-950: #ffe3eb;
152
+ $data-viz-magenta-900: #ffccdb;
153
+ $data-viz-magenta-800: #fcacc5;
154
+ $data-viz-magenta-700: #f88aaf;
155
+ $data-viz-magenta-600: #e86e9a;
156
+ $data-viz-magenta-500: #cf4d81;
157
+ $data-viz-magenta-400: #b93d71;
158
+ $data-viz-magenta-300: #9a2e5d;
159
+ $data-viz-magenta-200: #7c214f;
160
+ $data-viz-magenta-100: #661e3a;
161
+ $data-viz-magenta-50: #541d31;
162
+ $data-viz-blue-950: #e9ebff;
163
+ $data-viz-blue-900: #d2dcff;
164
+ $data-viz-blue-800: #b7c6ff;
165
+ $data-viz-blue-700: #97acff;
166
+ $data-viz-blue-600: #7992f5;
167
+ $data-viz-blue-500: #617ae2;
168
+ $data-viz-blue-400: #4e65cd;
169
+ $data-viz-blue-300: #3f51ae;
170
+ $data-viz-blue-200: #374291;
171
+ $data-viz-blue-100: #303470;
172
+ $data-viz-blue-50: #2a2b59;
173
+ $data-viz-aqua-950: #b5fefd;
174
+ $data-viz-aqua-900: #93f2ef;
175
+ $data-viz-aqua-800: #5edee3;
176
+ $data-viz-aqua-700: #32c5d2;
177
+ $data-viz-aqua-600: #00acc4;
178
+ $data-viz-aqua-500: #0090b1;
179
+ $data-viz-aqua-400: #007b9b;
180
+ $data-viz-aqua-300: #006381;
181
+ $data-viz-aqua-200: #00516c;
182
+ $data-viz-aqua-100: #004059;
183
+ $data-viz-aqua-50: #00344b;
184
+ $data-viz-green-950: #ddfab7;
185
+ $data-viz-green-900: #c6ed94;
186
+ $data-viz-green-800: #b0d97b;
187
+ $data-viz-green-700: #94c25e;
188
+ $data-viz-green-600: #81ac41;
189
+ $data-viz-green-500: #619025;
190
+ $data-viz-green-400: #4e7f0e;
191
+ $data-viz-green-300: #366800;
192
+ $data-viz-green-200: #275600;
193
+ $data-viz-green-100: #1a4500;
194
+ $data-viz-green-50: #133a03;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Thu, 30 Nov 2023 19:25:01 GMT
3
+ // Generated on Mon, 04 Dec 2023 16:16:35 GMT
4
4
 
5
5
  $gl-line-height-52: 3.25rem;
6
6
  $gl-line-height-44: 2.75rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "71.2.0",
3
+ "version": "71.4.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -87,8 +87,8 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@arkweid/lefthook": "0.7.7",
90
- "@babel/core": "^7.23.3",
91
- "@babel/preset-env": "^7.23.3",
90
+ "@babel/core": "^7.23.5",
91
+ "@babel/preset-env": "^7.23.5",
92
92
  "@babel/preset-react": "^7.23.3",
93
93
  "@cypress/grep": "^4.0.1",
94
94
  "@gitlab/eslint-plugin": "19.2.0",
@@ -1,3 +1,4 @@
1
+ import { nextTick } from 'vue';
1
2
  import { mount } from '@vue/test-utils';
2
3
  import { createMockDirective, getBinding } from '~helpers/vue_mock_directive';
3
4
  import GlButton from '../../base/button/button.vue';
@@ -133,4 +134,17 @@ describe('GlTruncateText', () => {
133
134
  });
134
135
  });
135
136
  });
137
+
138
+ it('passes `toggleButtonProps` to toggle button', async () => {
139
+ const buttonTextClasses = 'foo-bar';
140
+
141
+ createComponent({ toggleButtonProps: { buttonTextClasses } });
142
+
143
+ getBinding(findContentEl(), 'gl-resize-observer').value({
144
+ target: { scrollHeight: 20, offsetHeight: 10 },
145
+ });
146
+ await nextTick();
147
+
148
+ expect(findButton().props('buttonTextClasses')).toBe(buttonTextClasses);
149
+ });
136
150
  });
@@ -6,11 +6,13 @@ const generateProps = ({
6
6
  showLessText = 'Show less',
7
7
  lines = 3,
8
8
  mobileLines = 10,
9
+ toggleButtonProps = {},
9
10
  } = {}) => ({
10
11
  showMoreText,
11
12
  showLessText,
12
13
  lines,
13
14
  mobileLines,
15
+ toggleButtonProps,
14
16
  });
15
17
 
16
18
  const content = () => [...Array(15)].map((_, i) => `line ${i + 1}`).join('\n');
@@ -44,6 +44,16 @@ export default {
44
44
  required: false,
45
45
  default: 10,
46
46
  },
47
+ /**
48
+ * Props that are passed to the toggle button
49
+ */
50
+ toggleButtonProps: {
51
+ type: Object,
52
+ required: false,
53
+ default() {
54
+ return {};
55
+ },
56
+ },
47
57
  },
48
58
  data() {
49
59
  return {
@@ -103,8 +113,12 @@ export default {
103
113
  <!-- @slot Text content -->
104
114
  <slot></slot>
105
115
  </article>
106
- <gl-button v-if="showTruncationToggle" variant="link" @click="toggleTruncation">{{
107
- truncationToggleText
108
- }}</gl-button>
116
+ <gl-button
117
+ v-if="showTruncationToggle"
118
+ v-bind="toggleButtonProps"
119
+ variant="link"
120
+ @click="toggleTruncation"
121
+ >{{ truncationToggleText }}</gl-button
122
+ >
109
123
  </section>
110
124
  </template>
@@ -0,0 +1,344 @@
1
+ {
2
+ "data-viz": {
3
+ "green": {
4
+ "50": {
5
+ "$value": "#133a03",
6
+ "$type": "color",
7
+ "themeable": false,
8
+ "prefix": false
9
+ },
10
+ "100": {
11
+ "$value": "#1a4500",
12
+ "$type": "color",
13
+ "themeable": false,
14
+ "prefix": false
15
+ },
16
+ "200": {
17
+ "$value": "#275600",
18
+ "$type": "color",
19
+ "themeable": false,
20
+ "prefix": false
21
+ },
22
+ "300": {
23
+ "$value": "#366800",
24
+ "$type": "color",
25
+ "themeable": false,
26
+ "prefix": false
27
+ },
28
+ "400": {
29
+ "$value": "#4e7f0e",
30
+ "$type": "color",
31
+ "themeable": false,
32
+ "prefix": false
33
+ },
34
+ "500": {
35
+ "$value": "#619025",
36
+ "$type": "color",
37
+ "themeable": false,
38
+ "prefix": false
39
+ },
40
+ "600": {
41
+ "$value": "#81ac41",
42
+ "$type": "color",
43
+ "themeable": false,
44
+ "prefix": false
45
+ },
46
+ "700": {
47
+ "$value": "#94c25e",
48
+ "$type": "color",
49
+ "themeable": false,
50
+ "prefix": false
51
+ },
52
+ "800": {
53
+ "$value": "#b0d97b",
54
+ "$type": "color",
55
+ "themeable": false,
56
+ "prefix": false
57
+ },
58
+ "900": {
59
+ "$value": "#c6ed94",
60
+ "$type": "color",
61
+ "themeable": false,
62
+ "prefix": false
63
+ },
64
+ "950": {
65
+ "$value": "#ddfab7",
66
+ "$type": "color",
67
+ "themeable": false,
68
+ "prefix": false
69
+ }
70
+ },
71
+ "aqua": {
72
+ "50": {
73
+ "$value": "#00344b",
74
+ "$type": "color",
75
+ "themeable": false,
76
+ "prefix": false
77
+ },
78
+ "100": {
79
+ "$value": "#004059",
80
+ "$type": "color",
81
+ "themeable": false,
82
+ "prefix": false
83
+ },
84
+ "200": {
85
+ "$value": "#00516c",
86
+ "$type": "color",
87
+ "themeable": false,
88
+ "prefix": false
89
+ },
90
+ "300": {
91
+ "$value": "#006381",
92
+ "$type": "color",
93
+ "themeable": false,
94
+ "prefix": false
95
+ },
96
+ "400": {
97
+ "$value": "#007b9b",
98
+ "$type": "color",
99
+ "themeable": false,
100
+ "prefix": false
101
+ },
102
+ "500": {
103
+ "$value": "#0090b1",
104
+ "$type": "color",
105
+ "themeable": false,
106
+ "prefix": false
107
+ },
108
+ "600": {
109
+ "$value": "#00acc4",
110
+ "$type": "color",
111
+ "themeable": false,
112
+ "prefix": false
113
+ },
114
+ "700": {
115
+ "$value": "#32c5d2",
116
+ "$type": "color",
117
+ "themeable": false,
118
+ "prefix": false
119
+ },
120
+ "800": {
121
+ "$value": "#5edee3",
122
+ "$type": "color",
123
+ "themeable": false,
124
+ "prefix": false
125
+ },
126
+ "900": {
127
+ "$value": "#93f2ef",
128
+ "$type": "color",
129
+ "themeable": false,
130
+ "prefix": false
131
+ },
132
+ "950": {
133
+ "$value": "#b5fefd",
134
+ "$type": "color",
135
+ "themeable": false,
136
+ "prefix": false
137
+ }
138
+ },
139
+ "blue": {
140
+ "50": {
141
+ "$value": "#2a2b59",
142
+ "$type": "color",
143
+ "themeable": false,
144
+ "prefix": false
145
+ },
146
+ "100": {
147
+ "$value": "#303470",
148
+ "$type": "color",
149
+ "themeable": false,
150
+ "prefix": false
151
+ },
152
+ "200": {
153
+ "$value": "#374291",
154
+ "$type": "color",
155
+ "themeable": false,
156
+ "prefix": false
157
+ },
158
+ "300": {
159
+ "$value": "#3f51ae",
160
+ "$type": "color",
161
+ "themeable": false,
162
+ "prefix": false
163
+ },
164
+ "400": {
165
+ "$value": "#4e65cd",
166
+ "$type": "color",
167
+ "themeable": false,
168
+ "prefix": false
169
+ },
170
+ "500": {
171
+ "$value": "#617ae2",
172
+ "$type": "color",
173
+ "themeable": false,
174
+ "prefix": false
175
+ },
176
+ "600": {
177
+ "$value": "#7992f5",
178
+ "$type": "color",
179
+ "themeable": false,
180
+ "prefix": false
181
+ },
182
+ "700": {
183
+ "$value": "#97acff",
184
+ "$type": "color",
185
+ "themeable": false,
186
+ "prefix": false
187
+ },
188
+ "800": {
189
+ "$value": "#b7c6ff",
190
+ "$type": "color",
191
+ "themeable": false,
192
+ "prefix": false
193
+ },
194
+ "900": {
195
+ "$value": "#d2dcff",
196
+ "$type": "color",
197
+ "themeable": false,
198
+ "prefix": false
199
+ },
200
+ "950": {
201
+ "$value": "#e9ebff",
202
+ "$type": "color",
203
+ "themeable": false,
204
+ "prefix": false
205
+ }
206
+ },
207
+ "magenta": {
208
+ "50": {
209
+ "$value": "#541d31",
210
+ "$type": "color",
211
+ "themeable": false,
212
+ "prefix": false
213
+ },
214
+ "100": {
215
+ "$value": "#661e3a",
216
+ "$type": "color",
217
+ "themeable": false,
218
+ "prefix": false
219
+ },
220
+ "200": {
221
+ "$value": "#7c214f",
222
+ "$type": "color",
223
+ "themeable": false,
224
+ "prefix": false
225
+ },
226
+ "300": {
227
+ "$value": "#9a2e5d",
228
+ "$type": "color",
229
+ "themeable": false,
230
+ "prefix": false
231
+ },
232
+ "400": {
233
+ "$value": "#b93d71",
234
+ "$type": "color",
235
+ "themeable": false,
236
+ "prefix": false
237
+ },
238
+ "500": {
239
+ "$value": "#cf4d81",
240
+ "$type": "color",
241
+ "themeable": false,
242
+ "prefix": false
243
+ },
244
+ "600": {
245
+ "$value": "#e86e9a",
246
+ "$type": "color",
247
+ "themeable": false,
248
+ "prefix": false
249
+ },
250
+ "700": {
251
+ "$value": "#f88aaf",
252
+ "$type": "color",
253
+ "themeable": false,
254
+ "prefix": false
255
+ },
256
+ "800": {
257
+ "$value": "#fcacc5",
258
+ "$type": "color",
259
+ "themeable": false,
260
+ "prefix": false
261
+ },
262
+ "900": {
263
+ "$value": "#ffccdb",
264
+ "$type": "color",
265
+ "themeable": false,
266
+ "prefix": false
267
+ },
268
+ "950": {
269
+ "$value": "#ffe3eb",
270
+ "$type": "color",
271
+ "themeable": false,
272
+ "prefix": false
273
+ }
274
+ },
275
+ "orange": {
276
+ "50": {
277
+ "$value": "#4b2707",
278
+ "$type": "color",
279
+ "themeable": false,
280
+ "prefix": false
281
+ },
282
+ "100": {
283
+ "$value": "#5e2f05",
284
+ "$type": "color",
285
+ "themeable": false,
286
+ "prefix": false
287
+ },
288
+ "200": {
289
+ "$value": "#6f3500",
290
+ "$type": "color",
291
+ "themeable": false,
292
+ "prefix": false
293
+ },
294
+ "300": {
295
+ "$value": "#92430a",
296
+ "$type": "color",
297
+ "themeable": false,
298
+ "prefix": false
299
+ },
300
+ "400": {
301
+ "$value": "#b14f18",
302
+ "$type": "color",
303
+ "themeable": false,
304
+ "prefix": false
305
+ },
306
+ "500": {
307
+ "$value": "#c95d2e",
308
+ "$type": "color",
309
+ "themeable": false,
310
+ "prefix": false
311
+ },
312
+ "600": {
313
+ "$value": "#e07e41",
314
+ "$type": "color",
315
+ "themeable": false,
316
+ "prefix": false
317
+ },
318
+ "700": {
319
+ "$value": "#e99b60",
320
+ "$type": "color",
321
+ "themeable": false,
322
+ "prefix": false
323
+ },
324
+ "800": {
325
+ "$value": "#eebd8c",
326
+ "$type": "color",
327
+ "themeable": false,
328
+ "prefix": false
329
+ },
330
+ "900": {
331
+ "$value": "#f5d6b3",
332
+ "$type": "color",
333
+ "themeable": false,
334
+ "prefix": false
335
+ },
336
+ "950": {
337
+ "$value": "#fae8d1",
338
+ "$type": "color",
339
+ "themeable": false,
340
+ "prefix": false
341
+ }
342
+ }
343
+ }
344
+ }
@@ -0,0 +1,56 @@
1
+ import { methods, template } from './common_story_options';
2
+ import colorTokens from './color.data_viz.dark.tokens.json';
3
+
4
+ const generateProps = ({ name = '', tokens = colorTokens } = {}) => ({
5
+ name,
6
+ tokens,
7
+ });
8
+
9
+ export const DataVizGreen = (args, { argTypes }) => ({
10
+ props: Object.keys(argTypes),
11
+ methods,
12
+ template,
13
+ });
14
+ DataVizGreen.args = generateProps({
15
+ name: 'data-viz.green',
16
+ tokens: colorTokens['data-viz'].green,
17
+ });
18
+
19
+ export const DataVizAqua = (args, { argTypes }) => ({
20
+ props: Object.keys(argTypes),
21
+ methods,
22
+ template,
23
+ });
24
+ DataVizAqua.args = generateProps({ name: 'data-viz.aqua', tokens: colorTokens['data-viz'].aqua });
25
+
26
+ export const DataVizBlue = (args, { argTypes }) => ({
27
+ props: Object.keys(argTypes),
28
+ methods,
29
+ template,
30
+ });
31
+ DataVizBlue.args = generateProps({ name: 'data-viz.blue', tokens: colorTokens['data-viz'].blue });
32
+
33
+ export const DataVizMagenta = (args, { argTypes }) => ({
34
+ props: Object.keys(argTypes),
35
+ methods,
36
+ template,
37
+ });
38
+ DataVizMagenta.args = generateProps({
39
+ name: 'data-viz.magenta',
40
+ tokens: colorTokens['data-viz'].magenta,
41
+ });
42
+
43
+ export const DataVizOrange = (args, { argTypes }) => ({
44
+ props: Object.keys(argTypes),
45
+ methods,
46
+ template,
47
+ });
48
+ DataVizOrange.args = generateProps({
49
+ name: 'data-viz.orange',
50
+ tokens: colorTokens['data-viz'].orange,
51
+ });
52
+
53
+ // eslint-disable-next-line storybook/csf-component
54
+ export default {
55
+ title: 'tokens/color/data-viz/dark',
56
+ };
@@ -52,5 +52,5 @@ DataVizOrange.args = generateProps({
52
52
 
53
53
  // eslint-disable-next-line storybook/csf-component
54
54
  export default {
55
- title: 'tokens/color/data-viz',
55
+ title: 'tokens/color/data-viz/light',
56
56
  };