@gitlab/ui 43.15.0 → 43.16.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": "43.15.0",
3
+ "version": "43.16.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,4 +1,12 @@
1
- import { GlButton, GlButtonGroup, GlBadge, GlDropdown, GlDropdownItem } from '../../../index';
1
+ import {
2
+ GlButton,
3
+ GlButtonGroup,
4
+ GlBadge,
5
+ GlDropdown,
6
+ GlDropdownItem,
7
+ GlSorting,
8
+ GlSortingItem,
9
+ } from '../../../index';
2
10
  import {
3
11
  buttonCategoryOptions,
4
12
  buttonVariantOptions,
@@ -478,13 +486,12 @@ export const Badges = (args, { argTypes = {} }) => ({
478
486
  </div>
479
487
  `,
480
488
  });
481
-
482
489
  Badges.parameters = { controls: { disable: true } };
483
490
 
484
491
  export const BadgeWithSROnlyText = (args, { argTypes = {} }) => ({
485
492
  props: Object.keys(argTypes),
486
493
  components: { GlButton, GlBadge },
487
- template: `
494
+ template: `
488
495
  <gl-button variant="confirm" buttonTextClasses="gl-display-flex gl-align-items-center">
489
496
  Submit review
490
497
  <gl-badge size="sm" variant="info" class="gl-ml-2">2</gl-badge>
@@ -492,9 +499,21 @@ export const BadgeWithSROnlyText = (args, { argTypes = {} }) => ({
492
499
  </gl-button>
493
500
  `,
494
501
  });
495
-
496
502
  BadgeWithSROnlyText.parameters = { controls: { disable: true } };
497
503
 
504
+ export const SortingDropdownSplitButton = (args, { argTypes }) => ({
505
+ props: Object.keys(argTypes),
506
+ components: { GlSorting, GlSortingItem },
507
+ template: `
508
+ <gl-sorting text="Sorting options">
509
+ <gl-sorting-item active>First item</gl-sorting-item>
510
+ <gl-sorting-item>Second item</gl-sorting-item>
511
+ <gl-sorting-item>Last item</gl-sorting-item>
512
+ </gl-sorting>
513
+ `,
514
+ });
515
+ SortingDropdownSplitButton.parameters = { controls: { disable: true } };
516
+
498
517
  export default {
499
518
  title: 'base/button',
500
519
  component: GlButton,
@@ -10,7 +10,7 @@ const components = {
10
10
  const propDefault = (prop) => GlSorting.props[prop].default;
11
11
 
12
12
  const generateProps = ({
13
- text = 'Sorting Dropdown',
13
+ text = 'Sorting options',
14
14
  isAscending = propDefault('isAscending'),
15
15
  sortDirectionToolTip = propDefault('sortDirectionToolTip'),
16
16
  dropdownClass = propDefault('dropdownClass'),
@@ -13,7 +13,7 @@ const generateProps = ({ href = null, active = false } = {}) => ({
13
13
  });
14
14
 
15
15
  const template = `
16
- <gl-sorting text="Sorting Dropdown">
16
+ <gl-sorting text="Sorting options">
17
17
  <gl-sorting-item :href="href" :active="active">Some item</gl-sorting-item>
18
18
  </gl-sorting>`;
19
19
 
@@ -6392,6 +6392,16 @@
6392
6392
  margin-top: $gl-spacing-scale-5 !important;
6393
6393
  }
6394
6394
  }
6395
+ .gl-sm-mt-6 {
6396
+ @include gl-media-breakpoint-up(sm) {
6397
+ margin-top: $gl-spacing-scale-6;
6398
+ }
6399
+ }
6400
+ .gl-sm-mt-6\! {
6401
+ @include gl-media-breakpoint-up(sm) {
6402
+ margin-top: $gl-spacing-scale-6 !important;
6403
+ }
6404
+ }
6395
6405
  .gl-sm-mb-7 {
6396
6406
  @include gl-media-breakpoint-up(sm) {
6397
6407
  margin-bottom: $gl-spacing-scale-7;
@@ -883,6 +883,12 @@
883
883
  }
884
884
  }
885
885
 
886
+ @mixin gl-sm-mt-6 {
887
+ @include gl-media-breakpoint-up(sm) {
888
+ @include gl-mt-6;
889
+ }
890
+ }
891
+
886
892
  @mixin gl-sm-mb-7 {
887
893
  @include gl-media-breakpoint-up(sm) {
888
894
  @include gl-mb-7;