@gitlab/ui 64.4.0 → 64.6.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": "64.4.0",
3
+ "version": "64.6.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,7 @@ $gl-drawer-scrim-gradient: linear-gradient(to bottom, $transparent-rgba, $white)
9
9
  @include gl-h-full;
10
10
  @include gl-w-full;
11
11
  @include gl-overflow-y-auto;
12
- @include gl-shadow-drawer;
12
+ @include gl-shadow-lg;
13
13
  @include gl-font-base;
14
14
  @include gl-line-height-normal;
15
15
  @include gl-display-flex;
@@ -318,6 +318,20 @@ describe('GlDisclosureDropdown', () => {
318
318
  });
319
319
  });
320
320
 
321
+ describe('block prop', () => {
322
+ it('is disabled by default', () => {
323
+ buildWrapper();
324
+
325
+ expect(findBaseDropdown().props('block')).toBe(false);
326
+ });
327
+
328
+ it('is enabled when `block` is `true`', () => {
329
+ buildWrapper({ block: true });
330
+
331
+ expect(findBaseDropdown().props('block')).toBe(true);
332
+ });
333
+ });
334
+
321
335
  describe('fluid width', () => {
322
336
  it('is disabled by default', () => {
323
337
  buildWrapper();
@@ -39,6 +39,7 @@ const makeBindings = (overrides = {}) =>
39
39
  ':icon': 'icon',
40
40
  ':toggle-aria-labelled-by': 'toggleAriaLabelledBy',
41
41
  ':list-aria-labelled-by': 'listAriaLabelledBy',
42
+ ':block': 'block',
42
43
  ':fluid-width': 'fluidWidth',
43
44
  ':auto-close': 'autoClose',
44
45
  ':positioning-strategy': 'positioningStrategy',
@@ -203,6 +204,7 @@ export const CustomGroupsAndItems = (args, { argTypes }) => ({
203
204
  CustomGroupsAndItems.args = {
204
205
  items: mockGroupsCustomItem,
205
206
  toggleText: 'Merge requests',
207
+ block: true,
206
208
  };
207
209
  CustomGroupsAndItems.decorators = [makeContainer({ height: '200px' })];
208
210
 
@@ -172,6 +172,14 @@ export default {
172
172
  required: false,
173
173
  default: null,
174
174
  },
175
+ /**
176
+ * Render the toggle button as a block element
177
+ */
178
+ block: {
179
+ type: Boolean,
180
+ required: false,
181
+ default: false,
182
+ },
175
183
  /**
176
184
  * Custom offset to be applied to Floating UI's offset middleware.
177
185
  * https://floating-ui.com/docs/offset
@@ -334,6 +342,7 @@ export default {
334
342
  :loading="loading"
335
343
  :no-caret="noCaret"
336
344
  :placement="placement"
345
+ :block="block"
337
346
  :offset="dropdownOffset"
338
347
  :fluid-width="fluidWidth"
339
348
  :positioning-strategy="positioningStrategy"
@@ -2232,14 +2232,6 @@
2232
2232
  box-shadow: 0 0 4px 2px $blue-200 !important
2233
2233
  }
2234
2234
 
2235
- .gl-shadow-drawer {
2236
- box-shadow: -4px 0 8px $gray-200
2237
- }
2238
-
2239
- .gl-shadow-drawer\! {
2240
- box-shadow: -4px 0 8px $gray-200 !important
2241
- }
2242
-
2243
2235
  .gl-shadow-x0-y0-b3-s1-blue-500 {
2244
2236
  box-shadow: inset 0 0 3px 1px $blue-500
2245
2237
  }
@@ -186,10 +186,6 @@
186
186
  box-shadow: 0 0 4px 2px $blue-200;
187
187
  }
188
188
 
189
- @mixin gl-shadow-drawer {
190
- box-shadow: -4px 0 8px $gray-200;
191
- }
192
-
193
189
  @mixin gl-shadow-x0-y0-b3-s1-blue-500 {
194
190
  box-shadow: inset 0 0 3px 1px $blue-500;
195
191
  }