@gitlab/ui 43.9.3 → 43.12.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.
@@ -43,11 +43,6 @@ const variantCssColorMap = {
43
43
  danger: 'gl-text-red-500'
44
44
  };
45
45
  const targetOptions = ['_self', '_blank', '_parent', '_top', null];
46
- const sizeOptions = {
47
- default: null,
48
- sm: 'sm',
49
- lg: 'lg'
50
- };
51
46
  const labelSizeOptions = {
52
47
  default: null,
53
48
  sm: 'sm'
@@ -200,8 +195,7 @@ const tabsButtonDefaults = {
200
195
  };
201
196
  const tokenVariants = ['default', 'search-type', 'search-value'];
202
197
  const resizeDebounceTime = 200;
203
- const variantOptionsWithNoDefault = appendDefaultOption(variantOptions);
204
- const sizeOptionsWithNoDefault = appendDefaultOption(sizeOptions); // Datetime constants
198
+ const variantOptionsWithNoDefault = appendDefaultOption(variantOptions); // Datetime constants
205
199
 
206
200
  const defaultDateFormat = 'YYYY-MM-DD';
207
201
  const bannerVariants = ['promotion', 'introduction'];
@@ -250,4 +244,4 @@ const loadingIconSizes = {
250
244
  'xl (64x64)': 'xl'
251
245
  };
252
246
 
253
- export { COMMA, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, buttonCategoryOptions, buttonSizeOptions, buttonSizeOptionsMap, buttonVariantOptions, colorThemes, columnOptions, defaultDateFormat, drawerVariants, dropdownVariantOptions, focusableTags, formInputSizes, formStateOptions, glThemes, iconSizeOptions, keyboard, labelColorOptions, labelSizeOptions, loadingIconSizes, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, resizeDebounceTime, sizeOptions, sizeOptionsWithNoDefault, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, variantOptions, variantOptionsWithNoDefault, viewModeOptions };
247
+ export { COMMA, alertVariantIconMap, alertVariantOptions, alignOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, buttonCategoryOptions, buttonSizeOptions, buttonSizeOptionsMap, buttonVariantOptions, colorThemes, columnOptions, defaultDateFormat, drawerVariants, dropdownVariantOptions, focusableTags, formInputSizes, formStateOptions, glThemes, iconSizeOptions, keyboard, labelColorOptions, labelSizeOptions, loadingIconSizes, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, variantOptions, variantOptionsWithNoDefault, viewModeOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "43.9.3",
3
+ "version": "43.12.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -94,9 +94,9 @@
94
94
  "@storybook/theming": "6.5.10",
95
95
  "@storybook/vue": "6.5.10",
96
96
  "@vue/test-utils": "1.3.0",
97
- "@vue/vue2-jest": "27.0.0",
97
+ "@vue/vue2-jest": "29.0.0",
98
98
  "autoprefixer": "^9.7.6",
99
- "babel-jest": "^27.5.1",
99
+ "babel-jest": "29.0.1",
100
100
  "babel-loader": "^8.0.5",
101
101
  "babel-plugin-lodash": "^3.3.4",
102
102
  "babel-plugin-require-context-hook": "^1.0.0",
@@ -112,10 +112,9 @@
112
112
  "glob": "^7.2.0",
113
113
  "identity-obj-proxy": "^3.0.0",
114
114
  "inquirer-select-directory": "^1.2.0",
115
- "jest": "^27.5.1",
116
- "jest-circus": "27.5.1",
117
- "jest-environment-jsdom": "27.5.1",
118
- "jest-raw-loader": "^1.0.1",
115
+ "jest": "^29.0.1",
116
+ "jest-circus": "29.0.1",
117
+ "jest-environment-jsdom": "29.0.1",
119
118
  "jest-serializer-vue": "^2.0.2",
120
119
  "markdownlint-cli": "^0.29.0",
121
120
  "mockdate": "^2.0.5",
@@ -26,6 +26,7 @@ export const breakpointLg = '992px'
26
26
  export const breakpointXl = '1200px'
27
27
  export const breakpoints = '(xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)'
28
28
  export const limitedLayoutWidth = '990px'
29
+ export const containerXl = '1280px'
29
30
  export const black = '#000'
30
31
  export const blackNormal = '#333'
31
32
  export const white = '#fff'
@@ -167,6 +167,11 @@
167
167
  "value": "990px",
168
168
  "compiledValue": "990px"
169
169
  },
170
+ {
171
+ "name": "$container-xl",
172
+ "value": "1280px",
173
+ "compiledValue": "1280px"
174
+ },
170
175
  {
171
176
  "name": "$black",
172
177
  "value": "#000",
@@ -54,4 +54,21 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
54
54
  }
55
55
  }
56
56
  }
57
+
58
+ @each $name, $size in $gl-form-input-sizes {
59
+ .gl-form-select-#{$name} {
60
+ max-width: $size;
61
+ }
62
+
63
+ @each $breakpointName, $breakpointSize in $gl-form-input-sizes {
64
+ @if $breakpointName != xs {
65
+ .gl-#{$breakpointName}-form-select-#{$name} {
66
+ @include gl-media-breakpoint-up($breakpointName) {
67
+ max-width: $size;
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
57
74
  /* stylelint-enable property-no-vendor-prefix */
@@ -1,5 +1,5 @@
1
1
  import { mount } from '@vue/test-utils';
2
- import { sizeOptions, formStateOptions } from '../../../../utils/constants';
2
+ import { formStateOptions, formInputSizes } from '../../../../utils/constants';
3
3
  import { formSelectOptions } from './constants';
4
4
  import GlFormSelect from './form_select.vue';
5
5
 
@@ -33,13 +33,13 @@ describe('GlFormSelect', () => {
33
33
 
34
34
  describe('size prop', () => {
35
35
  // Exclude the default null value
36
- const nonNullSizes = excludeDefaultNull(sizeOptions);
36
+ const nonNullSizes = excludeDefaultNull(formInputSizes);
37
37
 
38
38
  it.each(nonNullSizes)('adds correct class for size %s', (size) => {
39
39
  createComponent({ size });
40
40
 
41
41
  expect(wrapper.classes().sort()).toEqual(
42
- [...DEFAULT_SELECT_CLASSES, `custom-select-${size}`].sort()
42
+ [...DEFAULT_SELECT_CLASSES, `gl-form-select-${size}`].sort()
43
43
  );
44
44
  });
45
45
 
@@ -1,5 +1,5 @@
1
1
  import { GlFormSelect } from '../../../../index';
2
- import { sizeOptions, formStateOptions } from '../../../../utils/constants';
2
+ import { formStateOptions, formInputSizes } from '../../../../utils/constants';
3
3
  import { formSelectOptions } from './constants';
4
4
  import readme from './form_select.md';
5
5
 
@@ -90,7 +90,7 @@ export default {
90
90
  },
91
91
  argTypes: {
92
92
  size: {
93
- options: sizeOptions,
93
+ options: formInputSizes,
94
94
  control: 'select',
95
95
  },
96
96
  state: {
@@ -1,15 +1,52 @@
1
1
  <script>
2
2
  import { BFormSelect } from 'bootstrap-vue';
3
+ import { isObject } from 'lodash';
4
+ import { formInputSizes } from '../../../../utils/constants';
3
5
 
4
6
  export default {
5
7
  components: {
6
8
  BFormSelect,
7
9
  },
8
10
  inheritAttrs: false,
11
+ props: {
12
+ /**
13
+ * Maximum width of the Select
14
+ */
15
+ size: {
16
+ type: [String, Object],
17
+ required: false,
18
+ default: null,
19
+ validator: (value) => {
20
+ const sizes = isObject(value) ? Object.values(value) : [value];
21
+
22
+ return sizes.every((size) => Object.values(formInputSizes).includes(size));
23
+ },
24
+ },
25
+ },
26
+ computed: {
27
+ cssClasses() {
28
+ if (this.size === null) {
29
+ return [];
30
+ }
31
+
32
+ if (isObject(this.size)) {
33
+ const { default: defaultSize, ...nonDefaultSizes } = this.size;
34
+
35
+ return [
36
+ ...(defaultSize ? [`gl-form-select-${defaultSize}`] : []),
37
+ ...Object.entries(nonDefaultSizes).map(
38
+ ([breakpoint, size]) => `gl-${breakpoint}-form-select-${size}`
39
+ ),
40
+ ];
41
+ }
42
+
43
+ return [`gl-form-select-${this.size}`];
44
+ },
45
+ },
9
46
  };
10
47
  </script>
11
48
  <template>
12
- <b-form-select class="gl-form-select" v-bind="$attrs" v-on="$listeners">
49
+ <b-form-select class="gl-form-select" v-bind="$attrs" :class="cssClasses" v-on="$listeners">
13
50
  <!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->
14
51
  <template v-for="slot in Object.keys($slots)" #[slot]>
15
52
  <slot :name="slot"></slot>
@@ -155,6 +155,22 @@
155
155
  @include gl-py-1;
156
156
  }
157
157
 
158
+ pre {
159
+ @include gl-py-3;
160
+ @include gl-px-4;
161
+ @include gl-rounded-base;
162
+ @include gl-inset-border-1-gray-100;
163
+ @include gl-my-7;
164
+ @include gl-overflow-auto;
165
+
166
+ code {
167
+ @include gl-bg-white;
168
+ @include gl-rounded-0;
169
+ @include gl-text-gray-900;
170
+ @include gl-p-0;
171
+ }
172
+ }
173
+
158
174
  .audio-container {
159
175
  @include gl-display-inline-flex;
160
176
  @include gl-flex-direction-column;
@@ -1,32 +1,46 @@
1
1
  <h1>MD Doc h1 • GitLab uses "GitLab Flavored Markdown" (GFM)</h1>
2
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
3
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
4
- requests, milestones, snippets and more.</p>
5
- <p class="sm">MD Doc Small Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
6
- in a few significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues,
7
- merge requests, milestones, snippets and more.</p>
2
+ <p>
3
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
4
+ in a few significant ways to add some useful functionality. You can use GFM in the following
5
+ areas: comments, issues, merge requests, milestones, snippets and more.
6
+ </p>
7
+ <p class="sm">
8
+ MD Doc Small Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard
9
+ Markdown in a few significant ways to add some useful functionality. You can use GFM in the
10
+ following areas: comments, issues, merge requests, milestones, snippets and more.
11
+ </p>
8
12
  <p class="monospace">UI Monospace</p>
9
13
  <p class="monospace sm">UI Small Monospace</p>
10
14
  <h2>MD Doc h2 • GitLab uses "GitLab Flavored Markdown" (GFM)</h2>
11
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
12
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
13
- requests, milestones, snippets and more.</p>
15
+ <p>
16
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
17
+ in a few significant ways to add some useful functionality. You can use GFM in the following
18
+ areas: comments, issues, merge requests, milestones, snippets and more.
19
+ </p>
14
20
  <h3>MD Doc h3 • GitLab uses "GitLab Flavored Markdown" (GFM)</h3>
15
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
16
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
17
- requests, milestones, snippets and more.</p>
21
+ <p>
22
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
23
+ in a few significant ways to add some useful functionality. You can use GFM in the following
24
+ areas: comments, issues, merge requests, milestones, snippets and more.
25
+ </p>
18
26
  <h4>MD Doc h4 • GitLab uses "GitLab Flavored Markdown" (GFM)</h4>
19
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
20
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
21
- requests, milestones, snippets and more.</p>
27
+ <p>
28
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
29
+ in a few significant ways to add some useful functionality. You can use GFM in the following
30
+ areas: comments, issues, merge requests, milestones, snippets and more.
31
+ </p>
22
32
  <h5>MD Doc h5 • GitLab uses "GitLab Flavored Markdown" (GFM)</h5>
23
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
24
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
25
- requests, milestones, snippets and more.</p>
33
+ <p>
34
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
35
+ in a few significant ways to add some useful functionality. You can use GFM in the following
36
+ areas: comments, issues, merge requests, milestones, snippets and more.
37
+ </p>
26
38
  <h6>MD Doc h6 • GitLab uses "GitLab Flavored Markdown" (GFM)</h6>
27
- <p>MD Doc Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
28
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
29
- requests, milestones, snippets and more.</p>
39
+ <p>
40
+ MD Doc Paragraph GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown
41
+ in a few significant ways to add some useful functionality. You can use GFM in the following
42
+ areas: comments, issues, merge requests, milestones, snippets and more.
43
+ </p>
30
44
 
31
45
  <table>
32
46
  <thead>
@@ -38,46 +52,31 @@
38
52
  </thead>
39
53
  <tbody>
40
54
  <tr>
55
+ <td>Test summary</td>
56
+ <td>Test summary contained 3 failed, 1 fixed test result out of 15 total tests</td>
41
57
  <td>
42
- Test summary
43
- </td>
44
- <td>
45
- Test summary contained 3 failed, 1 fixed test result out of 15 total tests
46
- </td>
47
- <td>
48
- This is the only one that doesn't include the breakdown in the Level 1 subtext. Does it need to be updated?
58
+ This is the only one that doesn't include the breakdown in the Level 1 subtext. Does it need
59
+ to be updated?
49
60
  </td>
50
61
  </tr>
51
62
  <tr>
52
- <td>
53
- Browser performance
54
- </td>
55
- <td>
56
- Browser performance test metrics: 7 changes
57
- </td>
58
- <td>
59
- Browser performance test metrics detected 7 changes
60
- </td>
63
+ <td>Browser performance</td>
64
+ <td>Browser performance test metrics: 7 changes</td>
65
+ <td>Browser performance test metrics detected 7 changes</td>
61
66
  </tr>
62
67
  <tr>
63
- <td>
64
- Load performance
65
- </td>
66
- <td>
67
- Load performance test metrics detected 4 changes
68
- </td>
69
- <td>
70
-
71
- </td>
68
+ <td>Load performance</td>
69
+ <td>Load performance test metrics detected 4 changes</td>
70
+ <td>✅</td>
72
71
  </tr>
73
72
  </tbody>
74
73
  </table>
75
74
 
76
75
  <blockquote>
77
76
  <p>
78
- MD Doc Blockquote • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
79
- significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge
80
- requests, milestones, snippets and more.
77
+ MD Doc Blockquote • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard
78
+ Markdown in a few significant ways to add some useful functionality. You can use GFM in the
79
+ following areas: comments, issues, merge requests, milestones, snippets and more.
81
80
  </p>
82
81
  </blockquote>
83
82
  <blockquote>
@@ -102,26 +101,55 @@
102
101
  </blockquote>
103
102
  <blockquote>
104
103
  <blockquote>
105
- <p>
106
- Nested blockquote
107
- </p>
104
+ <p>Nested blockquote</p>
108
105
  </blockquote>
109
106
  </blockquote>
110
107
  <p>
111
108
  This is a paragraph with two types inline diff <span class="idiff addition">addition</span> and
112
109
  <span class="idiff deletion">deletion</span>
113
110
  </p>
114
- <p>
115
- This block implements the "GitLab Flavored Markdown" <code>Code span</code> styles.
116
- </p>
111
+ <p>This block implements the "GitLab Flavored Markdown" <code>Code span</code> styles.</p>
117
112
 
118
113
  <p>
119
114
  This is an audio file
120
115
  <span class="media-container audio-container">
121
- <audio src="file.mp3" controls="true" data-setup="{}" data-title="file.mp3" data-canonical-src="file.mp3"
122
- class="gfm">
123
- </audio>
124
- <a href="file.mp3" target="_blank" rel="noopener noreferrer" title="Download file.mp3" data-canonical-src="file.mp3"
125
- data-link="true" class="gfm">file.mp3</a>
116
+ <audio
117
+ src="file.mp3"
118
+ controls="true"
119
+ data-setup="{}"
120
+ data-title="file.mp3"
121
+ data-canonical-src="file.mp3"
122
+ class="gfm"
123
+ ></audio>
124
+ <a
125
+ href="file.mp3"
126
+ target="_blank"
127
+ rel="noopener noreferrer"
128
+ title="Download file.mp3"
129
+ data-canonical-src="file.mp3"
130
+ data-link="true"
131
+ class="gfm"
132
+ >file.mp3</a
133
+ >
126
134
  </span>
127
135
  </p>
136
+ <p>Code block</p>
137
+ <pre class="code"><code>pre {
138
+ @include gl-py-4;
139
+ @include gl-px-6;
140
+
141
+ code {
142
+ @include gl-bg-white;
143
+ @include gl-rounded-0;
144
+ @include gl-text-gray-900;
145
+ @include gl-px-0;
146
+ @include gl-py-0;
147
+ }
148
+ }
149
+ </code></pre>
150
+ <p>Code block with long lines scrolls horizontally</p>
151
+ <pre
152
+ class="code"
153
+ ><code>MD Doc Small Paragraph • GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few
154
+ significant ways to add some useful functionality. You can use GFM in the following areas: comments, issues, merge requests, milestones, snippets and more.
155
+ </code></pre>
@@ -79,6 +79,7 @@ const generateProps = ({
79
79
  textSrOnly = defaultValue('textSrOnly'),
80
80
  icon = '',
81
81
  multiple = defaultValue('multiple'),
82
+ isCheckCentered = defaultValue('isCheckCentered'),
82
83
  ariaLabelledby,
83
84
  startOpened = true,
84
85
  } = {}) => ({
@@ -94,6 +95,7 @@ const generateProps = ({
94
95
  textSrOnly,
95
96
  icon,
96
97
  multiple,
98
+ isCheckCentered,
97
99
  ariaLabelledby,
98
100
  startOpened,
99
101
  });
@@ -120,6 +122,7 @@ const template = (content, label = '') => `
120
122
  :text-sr-only="textSrOnly"
121
123
  :icon="icon"
122
124
  :multiple="multiple"
125
+ :is-check-centered="isCheckCentered"
123
126
  :aria-labelledby="ariaLabelledby"
124
127
  >
125
128
  ${content}
@@ -183,7 +186,10 @@ export const HeaderAndFooter = (args, { argTypes }) => ({
183
186
  </div>
184
187
  </template>`),
185
188
  });
186
- HeaderAndFooter.args = generateProps({ toggleText: 'Header and Footer', multiple: true });
189
+ HeaderAndFooter.args = generateProps({
190
+ toggleText: 'Header and Footer',
191
+ multiple: true,
192
+ });
187
193
  HeaderAndFooter.decorators = [makeContainer({ height: '370px' })];
188
194
 
189
195
  export const CustomListItem = (args, { argTypes }) => ({
@@ -225,6 +231,7 @@ export const CustomListItem = (args, { argTypes }) => ({
225
231
  :text-sr-only="textSrOnly"
226
232
  :icon="icon"
227
233
  :multiple="multiple"
234
+ :is-check-centered="isCheckCentered"
228
235
  :aria-labelledby="ariaLabelledby"
229
236
  >
230
237
  <template #list-item="{ item }">
@@ -247,6 +254,7 @@ CustomListItem.args = generateProps({
247
254
  { value: 'markian', text: 'Mark Florian', secondaryText: '@markian', icon: 'bin' },
248
255
  ],
249
256
  multiple: true,
257
+ isCheckCentered: true,
250
258
  });
251
259
  CustomListItem.decorators = [makeContainer({ height: '200px' })];
252
260
 
@@ -152,6 +152,14 @@ export default {
152
152
  required: false,
153
153
  default: false,
154
154
  },
155
+ /**
156
+ * Center selected item checkmark
157
+ */
158
+ isCheckCentered: {
159
+ type: Boolean,
160
+ required: false,
161
+ default: false,
162
+ },
155
163
  /**
156
164
  * The `aria-labelledby` attribute value for the toggle button
157
165
  */
@@ -335,6 +343,7 @@ export default {
335
343
  :key="item.value"
336
344
  :is-selected="isSelected(item)"
337
345
  :is-focused="nextFocusedItemIndex === index"
346
+ :is-check-centered="isCheckCentered"
338
347
  @select="onSelect(item, $event)"
339
348
  >
340
349
  <!-- @slot Custom template of the listbox item -->
@@ -80,6 +80,31 @@ describe('GlListboxItem', () => {
80
80
  });
81
81
  });
82
82
 
83
+ describe('checkbox', () => {
84
+ describe('is NOT centered', () => {
85
+ beforeEach(() => {
86
+ buildWrapper({ isSelected: true });
87
+ });
88
+
89
+ it('should not center check icon by default', () => {
90
+ expect(findCheckIcon().classes()).toEqual(
91
+ expect.arrayContaining(['gl-mt-3', 'gl-align-self-start'])
92
+ );
93
+ });
94
+ });
95
+
96
+ describe('is centered', () => {
97
+ beforeEach(() => {
98
+ buildWrapper({ isSelected: true, isCheckCentered: true });
99
+ });
100
+ it('should center the check icon', () => {
101
+ expect(findCheckIcon().classes()).not.toEqual(
102
+ expect.arrayContaining(['gl-mt-3', 'gl-align-self-start'])
103
+ );
104
+ });
105
+ });
106
+ });
107
+
83
108
  describe('tabindex', () => {
84
109
  it('should set tabindex to `-1` when item is not focused', () => {
85
110
  buildWrapper({ isFocused: false });
@@ -18,6 +18,20 @@ export default {
18
18
  default: false,
19
19
  required: false,
20
20
  },
21
+ isCheckCentered: {
22
+ type: Boolean,
23
+ required: false,
24
+ default: false,
25
+ },
26
+ },
27
+ computed: {
28
+ checkedClasses() {
29
+ if (this.isCheckCentered) {
30
+ return '';
31
+ }
32
+
33
+ return 'gl-mt-3 gl-align-self-start';
34
+ },
21
35
  },
22
36
  methods: {
23
37
  toggleSelection() {
@@ -48,8 +62,11 @@ export default {
48
62
  <gl-icon
49
63
  name="mobile-issue-close"
50
64
  data-testid="dropdown-item-checkbox"
51
- class="gl-mt-3 gl-align-self-start"
52
- :class="['gl-new-dropdown-item-check-icon', { 'gl-visibility-hidden': !isSelected }]"
65
+ :class="[
66
+ 'gl-new-dropdown-item-check-icon',
67
+ { 'gl-visibility-hidden': !isSelected },
68
+ checkedClasses,
69
+ ]"
53
70
  />
54
71
  <span class="gl-new-dropdown-item-text-wrapper">
55
72
  <slot></slot>
@@ -4559,6 +4559,14 @@
4559
4559
  max-width: $limited-layout-width !important;
4560
4560
  }
4561
4561
 
4562
+ .gl-max-w-container-xl {
4563
+ max-width: $container-xl;
4564
+ }
4565
+
4566
+ .gl-max-w-container-xl\! {
4567
+ max-width: $container-xl !important;
4568
+ }
4569
+
4562
4570
  .gl-h-auto {
4563
4571
  height: auto;
4564
4572
  }
@@ -155,6 +155,10 @@
155
155
  max-width: $limited-layout-width;
156
156
  }
157
157
 
158
+ @mixin gl-max-w-container-xl {
159
+ max-width: $container-xl;
160
+ }
161
+
158
162
  @mixin gl-h-auto {
159
163
  height: auto;
160
164
  }
@@ -41,6 +41,7 @@ $breakpoints: (
41
41
 
42
42
  // Max widths
43
43
  $limited-layout-width: 990px !default;
44
+ $container-xl: 1280px !default;
44
45
 
45
46
  // Color schema
46
47
  $black: #000 !default;
@@ -48,12 +48,6 @@ export const variantCssColorMap = {
48
48
 
49
49
  export const targetOptions = ['_self', '_blank', '_parent', '_top', null];
50
50
 
51
- export const sizeOptions = {
52
- default: null,
53
- sm: 'sm',
54
- lg: 'lg',
55
- };
56
-
57
51
  export const labelSizeOptions = {
58
52
  default: null,
59
53
  sm: 'sm',
@@ -234,7 +228,6 @@ export const tokenVariants = ['default', 'search-type', 'search-value'];
234
228
  export const resizeDebounceTime = 200;
235
229
 
236
230
  export const variantOptionsWithNoDefault = appendDefaultOption(variantOptions);
237
- export const sizeOptionsWithNoDefault = appendDefaultOption(sizeOptions);
238
231
 
239
232
  // Datetime constants
240
233
  export const defaultDateFormat = 'YYYY-MM-DD';