@gitlab/ui 58.5.1 → 58.7.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/CHANGELOG.md +14 -0
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +1 -1
- package/src/components/base/button_group/button_group.stories.js +16 -4
- package/src/scss/utilities.scss +20 -0
- package/src/scss/utility-mixins/grid.scss +4 -0
- package/src/scss/utility-mixins/spacing.scss +8 -0
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import GlButton from '../button/button.vue';
|
|
2
2
|
import GlDropdown from '../dropdown/dropdown.vue';
|
|
3
3
|
import GlDropdownItem from '../dropdown/dropdown_item.vue';
|
|
4
|
+
import { buttonSizeOptions } from '../../../utils/constants';
|
|
4
5
|
import GlButtonGroup from './button_group.vue';
|
|
5
6
|
import readme from './button_group.md';
|
|
6
7
|
|
|
7
|
-
const
|
|
8
|
+
const defaultValue = (prop) => GlButton.props[prop].default;
|
|
9
|
+
|
|
10
|
+
const generateProps = ({ vertical = false, size = defaultValue('size') } = {}) => ({
|
|
11
|
+
vertical,
|
|
12
|
+
size,
|
|
13
|
+
});
|
|
8
14
|
|
|
9
15
|
const template = `
|
|
10
16
|
<gl-button-group :vertical="vertical">
|
|
11
|
-
<gl-button>Button 1</gl-button>
|
|
12
|
-
<gl-button>Button 2</gl-button>
|
|
13
|
-
<gl-dropdown text="Some dropdown">
|
|
17
|
+
<gl-button :size="size">Button 1</gl-button>
|
|
18
|
+
<gl-button :size="size">Button 2</gl-button>
|
|
19
|
+
<gl-dropdown :size="size" text="Some dropdown">
|
|
14
20
|
<gl-dropdown-item>First item</gl-dropdown-item>
|
|
15
21
|
<gl-dropdown-item>Second item</gl-dropdown-item>
|
|
16
22
|
<gl-dropdown-item>Last item</gl-dropdown-item>
|
|
@@ -37,4 +43,10 @@ export default {
|
|
|
37
43
|
},
|
|
38
44
|
},
|
|
39
45
|
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
size: {
|
|
48
|
+
options: Object.keys(buttonSizeOptions),
|
|
49
|
+
control: 'select',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
40
52
|
};
|
package/src/scss/utilities.scss
CHANGED
|
@@ -3886,6 +3886,14 @@
|
|
|
3886
3886
|
}
|
|
3887
3887
|
}
|
|
3888
3888
|
|
|
3889
|
+
.gl-grid-template-columns-4 {
|
|
3890
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
.gl-grid-template-columns-4\! {
|
|
3894
|
+
grid-template-columns: 1fr 1fr 1fr 1fr !important;
|
|
3895
|
+
}
|
|
3896
|
+
|
|
3889
3897
|
.gl-lg-grid-template-columns-4 {
|
|
3890
3898
|
@include gl-media-breakpoint-up(lg) {
|
|
3891
3899
|
grid-template-columns: repeat(4, 1fr);
|
|
@@ -6663,6 +6671,12 @@
|
|
|
6663
6671
|
gap: $gl-spacing-scale-3 !important;
|
|
6664
6672
|
}
|
|
6665
6673
|
}
|
|
6674
|
+
.gl-gap-4 {
|
|
6675
|
+
gap: $gl-spacing-scale-4;
|
|
6676
|
+
}
|
|
6677
|
+
.gl-gap-4\! {
|
|
6678
|
+
gap: $gl-spacing-scale-4 !important;
|
|
6679
|
+
}
|
|
6666
6680
|
.gl-gap-5 {
|
|
6667
6681
|
gap: $gl-spacing-scale-5;
|
|
6668
6682
|
}
|
|
@@ -6675,6 +6689,12 @@
|
|
|
6675
6689
|
.gl-gap-6\! {
|
|
6676
6690
|
gap: $gl-spacing-scale-6 !important;
|
|
6677
6691
|
}
|
|
6692
|
+
.gl-gap-7 {
|
|
6693
|
+
gap: $gl-spacing-scale-7;
|
|
6694
|
+
}
|
|
6695
|
+
.gl-gap-7\! {
|
|
6696
|
+
gap: $gl-spacing-scale-7 !important;
|
|
6697
|
+
}
|
|
6678
6698
|
.gl-column-gap-6 {
|
|
6679
6699
|
column-gap: $gl-spacing-scale-6;
|
|
6680
6700
|
}
|
|
@@ -862,6 +862,10 @@
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
+
@mixin gl-gap-4 {
|
|
866
|
+
gap: $gl-spacing-scale-4;
|
|
867
|
+
}
|
|
868
|
+
|
|
865
869
|
@mixin gl-gap-5 {
|
|
866
870
|
gap: $gl-spacing-scale-5;
|
|
867
871
|
}
|
|
@@ -870,6 +874,10 @@
|
|
|
870
874
|
gap: $gl-spacing-scale-6;
|
|
871
875
|
}
|
|
872
876
|
|
|
877
|
+
@mixin gl-gap-7 {
|
|
878
|
+
gap: $gl-spacing-scale-7;
|
|
879
|
+
}
|
|
880
|
+
|
|
873
881
|
/**
|
|
874
882
|
* Column gap utilities
|
|
875
883
|
*
|