@gitlab/ui 43.0.0 → 43.2.1
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 +21 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +11 -11
- package/src/components/base/button/button.stories.js +3 -3
- package/src/components/base/markdown/markdown.scss +5 -13
- package/src/components/base/toggle/toggle.stories.js +1 -1
- package/src/scss/functions.scss +10 -0
- package/src/scss/mixins.scss +5 -21
- package/src/scss/mixins.spec.scss +4 -16
- package/src/scss/typescale/_index.scss +4 -10
- package/src/scss/utilities.scss +20 -8
- package/src/scss/utility-mixins/background.scss +3 -3
- package/src/scss/utility-mixins/flex.scss +6 -0
- package/src/scss/utility-mixins/masks.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.2.1",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -79,22 +79,22 @@
|
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@arkweid/lefthook": "0.7.7",
|
|
82
|
-
"@babel/core": "^7.18.
|
|
83
|
-
"@babel/preset-env": "^7.18.
|
|
82
|
+
"@babel/core": "^7.18.10",
|
|
83
|
+
"@babel/preset-env": "^7.18.10",
|
|
84
84
|
"@gitlab/eslint-plugin": "15.0.0",
|
|
85
85
|
"@gitlab/stylelint-config": "4.1.0",
|
|
86
86
|
"@gitlab/svgs": "2.33.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
90
|
-
"@storybook/addon-a11y": "6.5.
|
|
91
|
-
"@storybook/addon-docs": "6.5.
|
|
92
|
-
"@storybook/addon-essentials": "6.5.
|
|
93
|
-
"@storybook/addon-storyshots": "6.5.
|
|
94
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
95
|
-
"@storybook/addon-viewport": "6.5.
|
|
96
|
-
"@storybook/theming": "6.5.
|
|
97
|
-
"@storybook/vue": "6.5.
|
|
90
|
+
"@storybook/addon-a11y": "6.5.10",
|
|
91
|
+
"@storybook/addon-docs": "6.5.10",
|
|
92
|
+
"@storybook/addon-essentials": "6.5.10",
|
|
93
|
+
"@storybook/addon-storyshots": "6.5.10",
|
|
94
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.10",
|
|
95
|
+
"@storybook/addon-viewport": "6.5.10",
|
|
96
|
+
"@storybook/theming": "6.5.10",
|
|
97
|
+
"@storybook/vue": "6.5.10",
|
|
98
98
|
"@vue/test-utils": "1.3.0",
|
|
99
99
|
"@vue/vue2-jest": "27.0.0",
|
|
100
100
|
"autoprefixer": "^9.7.6",
|
|
@@ -508,15 +508,15 @@ export default {
|
|
|
508
508
|
},
|
|
509
509
|
argTypes: {
|
|
510
510
|
category: {
|
|
511
|
-
options: buttonCategoryOptions,
|
|
511
|
+
options: Object.keys(buttonCategoryOptions),
|
|
512
512
|
control: 'select',
|
|
513
513
|
},
|
|
514
514
|
variant: {
|
|
515
|
-
options: buttonVariantOptions,
|
|
515
|
+
options: Object.keys(buttonVariantOptions),
|
|
516
516
|
control: 'select',
|
|
517
517
|
},
|
|
518
518
|
size: {
|
|
519
|
-
options: buttonSizeOptions,
|
|
519
|
+
options: Object.keys(buttonSizeOptions),
|
|
520
520
|
control: 'select',
|
|
521
521
|
},
|
|
522
522
|
target: {
|
|
@@ -45,22 +45,18 @@
|
|
|
45
45
|
|
|
46
46
|
h1,
|
|
47
47
|
.gl-h1 {
|
|
48
|
-
@include gl-font-size-markdown-h1;
|
|
49
|
-
@include gl-line-height-32;
|
|
50
48
|
@include gl-fluid-font-size(
|
|
51
|
-
$min: $gl-font-size-markdown-h1
|
|
49
|
+
$min: $gl-font-size-markdown-h1,
|
|
52
50
|
$max: $gl-font-size-markdown-h1-xl
|
|
53
51
|
);
|
|
54
|
-
@include gl-fluid-line-height($min: $gl-line-height-
|
|
52
|
+
@include gl-fluid-line-height($min: $gl-line-height-32, $max: $gl-line-height-52);
|
|
55
53
|
@include gl-mt-0;
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
h2,
|
|
59
57
|
.gl-h2 {
|
|
60
|
-
@include gl-font-size-markdown-h2;
|
|
61
|
-
@include gl-line-height-28;
|
|
62
58
|
@include gl-fluid-font-size(
|
|
63
|
-
$min: $gl-font-size-markdown-h2
|
|
59
|
+
$min: $gl-font-size-markdown-h2,
|
|
64
60
|
$max: $gl-font-size-markdown-h2-xl
|
|
65
61
|
);
|
|
66
62
|
@include gl-fluid-line-height($min: $gl-line-height-28, $max: $gl-line-height-36);
|
|
@@ -69,10 +65,8 @@
|
|
|
69
65
|
|
|
70
66
|
h3,
|
|
71
67
|
.gl-h3 {
|
|
72
|
-
@include gl-font-size-markdown-h3;
|
|
73
|
-
@include gl-line-height-24;
|
|
74
68
|
@include gl-fluid-font-size(
|
|
75
|
-
$min: $gl-font-size-markdown-h3
|
|
69
|
+
$min: $gl-font-size-markdown-h3,
|
|
76
70
|
$max: $gl-font-size-markdown-h3-xl
|
|
77
71
|
);
|
|
78
72
|
@include gl-fluid-line-height($min: $gl-line-height-24, $max: $gl-line-height-28);
|
|
@@ -239,10 +233,8 @@
|
|
|
239
233
|
|
|
240
234
|
h1,
|
|
241
235
|
.gl-h1 {
|
|
242
|
-
@include gl-font-size-compact-markdown-h1;
|
|
243
|
-
@include gl-line-height-24;
|
|
244
236
|
@include gl-fluid-font-size(
|
|
245
|
-
$min: $gl-font-size-compact-markdown-h1
|
|
237
|
+
$min: $gl-font-size-compact-markdown-h1,
|
|
246
238
|
$max: $gl-font-size-compact-markdown-h1-xl
|
|
247
239
|
);
|
|
248
240
|
@include gl-fluid-line-height($min: $gl-line-height-24, $max: $gl-line-height-28);
|
package/src/scss/functions.scss
CHANGED
|
@@ -49,3 +49,13 @@
|
|
|
49
49
|
@function if-important($important) {
|
|
50
50
|
@return #{if($important, '!important', '')};
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
@function clamp-between($min, $max, $min-width: $breakpoint-md, $max-width: $breakpoint-xl) {
|
|
54
|
+
$min-width: px-to-rem($min-width);
|
|
55
|
+
$max-width: px-to-rem($max-width);
|
|
56
|
+
|
|
57
|
+
$slope: ($max - $min) / ($max-width - $min-width);
|
|
58
|
+
$intersection: (-$min-width * $slope) + $min;
|
|
59
|
+
|
|
60
|
+
@return clamp(#{$min}, #{$intersection} + #{$slope * 100vw}, #{$max});
|
|
61
|
+
}
|
package/src/scss/mixins.scss
CHANGED
|
@@ -21,30 +21,14 @@
|
|
|
21
21
|
* should be numeric.
|
|
22
22
|
*
|
|
23
23
|
* Values are expected in rem units.
|
|
24
|
+
* Fluid range: between 48rem (768px) – 75rem (1200px).
|
|
24
25
|
*
|
|
25
26
|
* @param $property Property name, i.e. line-height, font-size, width, height, etc.
|
|
26
|
-
* @param $
|
|
27
|
-
* @param $
|
|
27
|
+
* @param $min Property value lower bound.
|
|
28
|
+
* @param $max Property value upper bound.
|
|
28
29
|
*/
|
|
29
|
-
@mixin gl-responsive-property(
|
|
30
|
-
$property,
|
|
31
|
-
$property-min,
|
|
32
|
-
$property-max,
|
|
33
|
-
$breakpoint-min: $breakpoint-md,
|
|
34
|
-
$breakpoint-max: $breakpoint-xl
|
|
35
|
-
) {
|
|
36
|
-
$property-range: ($property-max - $property-min) / 1rem;
|
|
37
|
-
$breakpoint-range: px-to-rem($breakpoint-max - $breakpoint-min) / 1rem;
|
|
38
|
-
|
|
39
|
-
@media (min-width: $breakpoint-min) {
|
|
40
|
-
#{$property}: calc(
|
|
41
|
-
#{$property-min} + #{$property-range} * ((100vw - #{$breakpoint-min}) / #{$breakpoint-range})
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (min-width: $breakpoint-max) {
|
|
46
|
-
#{$property}: $property-max;
|
|
47
|
-
}
|
|
30
|
+
@mixin gl-responsive-property($property, $min, $max) {
|
|
31
|
+
#{$property}: clamp-between($min, $max);
|
|
48
32
|
}
|
|
49
33
|
|
|
50
34
|
/**
|
|
@@ -9,14 +9,8 @@
|
|
|
9
9
|
@include gl-fluid-font-size(2rem, 3.5rem);
|
|
10
10
|
}
|
|
11
11
|
@include expect {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
font-size: calc( 2rem + 1.5 * ((100vw - 768px) / 27));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@media (min-width: 1200px) {
|
|
18
|
-
font-size: 3.5rem;
|
|
19
|
-
}
|
|
12
|
+
// prettier-ignore
|
|
13
|
+
font-size: clamp(2rem, #{-0.66667rem} + #{5.55556vw}, 3.5rem);
|
|
20
14
|
}
|
|
21
15
|
}
|
|
22
16
|
}
|
|
@@ -29,14 +23,8 @@
|
|
|
29
23
|
@include gl-fluid-line-height(2rem, 3.5rem);
|
|
30
24
|
}
|
|
31
25
|
@include expect {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
line-height: calc( 2rem + 1.5 * ((100vw - 768px) / 27));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media (min-width: 1200px) {
|
|
38
|
-
line-height: 3.5rem;
|
|
39
|
-
}
|
|
26
|
+
// prettier-ignore
|
|
27
|
+
line-height: clamp(2rem, #{-0.66667rem} + #{5.55556vw}, 3.5rem);
|
|
40
28
|
}
|
|
41
29
|
}
|
|
42
30
|
}
|
|
@@ -26,25 +26,19 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.h-display {
|
|
29
|
-
@include gl-font-size-h-display;
|
|
30
|
-
@include gl-line-height-32;
|
|
31
|
-
@include gl-fluid-font-size($min: $gl-font-size-h-display-md, $max: $gl-font-size-h-display-xl);
|
|
32
|
-
@include gl-fluid-line-height($min: $gl-line-height-36, $max: $gl-line-height-52);
|
|
29
|
+
@include gl-fluid-font-size($min: $gl-font-size-h-display, $max: $gl-font-size-h-display-xl);
|
|
30
|
+
@include gl-fluid-line-height($min: $gl-line-height-32, $max: $gl-line-height-52);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
h1,
|
|
36
34
|
.gl-h1 {
|
|
37
|
-
@include gl-font-size-h1;
|
|
38
|
-
@include gl-line-height-28;
|
|
39
|
-
@include gl-fluid-font-size($min: $gl-font-size-h1-md, $max: $gl-font-size-h1-xl);
|
|
35
|
+
@include gl-fluid-font-size($min: $gl-font-size-h1, $max: $gl-font-size-h1-xl);
|
|
40
36
|
@include gl-fluid-line-height($min: $gl-line-height-28, $max: $gl-line-height-36);
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
h2,
|
|
44
40
|
.gl-h2 {
|
|
45
|
-
@include gl-font-size-h2;
|
|
46
|
-
@include gl-line-height-24;
|
|
47
|
-
@include gl-fluid-font-size($min: $gl-font-size-h2-md, $max: $gl-font-size-h2-xl);
|
|
41
|
+
@include gl-fluid-font-size($min: $gl-font-size-h2, $max: $gl-font-size-h2-xl);
|
|
48
42
|
@include gl-fluid-line-height($min: $gl-line-height-24, $max: $gl-line-height-28);
|
|
49
43
|
}
|
|
50
44
|
|
package/src/scss/utilities.scss
CHANGED
|
@@ -859,27 +859,27 @@
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
.gl-bg-chevron-left {
|
|
862
|
-
background-image: url($gl-icon-chevron-left)
|
|
862
|
+
background-image: url('#{$gl-icon-chevron-left}')
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
.gl-bg-chevron-left\! {
|
|
866
|
-
background-image: url($gl-icon-chevron-left) !important
|
|
866
|
+
background-image: url('#{$gl-icon-chevron-left}') !important
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
.gl-bg-chevron-right {
|
|
870
|
-
background-image: url($gl-icon-chevron-right)
|
|
870
|
+
background-image: url('#{$gl-icon-chevron-right}')
|
|
871
871
|
}
|
|
872
872
|
|
|
873
873
|
.gl-bg-chevron-right\! {
|
|
874
|
-
background-image: url($gl-icon-chevron-right) !important
|
|
874
|
+
background-image: url('#{$gl-icon-chevron-right}') !important
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
.gl-bg-chevron-down {
|
|
878
|
-
background-image: url($gl-icon-chevron-down)
|
|
878
|
+
background-image: url('#{$gl-icon-chevron-down}')
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
.gl-bg-chevron-down\! {
|
|
882
|
-
background-image: url($gl-icon-chevron-down) !important
|
|
882
|
+
background-image: url('#{$gl-icon-chevron-down}') !important
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
.gl-backdrop-filter-blur-1 {
|
|
@@ -3236,6 +3236,18 @@
|
|
|
3236
3236
|
}
|
|
3237
3237
|
}
|
|
3238
3238
|
|
|
3239
|
+
.gl-lg-flex-direction-column {
|
|
3240
|
+
@include gl-media-breakpoint-up(lg) {
|
|
3241
|
+
@include gl-flex-direction-column;
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
.gl-lg-flex-direction-column\! {
|
|
3246
|
+
@include gl-media-breakpoint-up(lg) {
|
|
3247
|
+
@include gl-flex-direction-column;
|
|
3248
|
+
}
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3239
3251
|
.gl-xs-flex-direction-column {
|
|
3240
3252
|
@include gl-media-breakpoint-down(sm) {
|
|
3241
3253
|
flex-direction: column;
|
|
@@ -3631,13 +3643,13 @@
|
|
|
3631
3643
|
list-style-position: inside !important
|
|
3632
3644
|
}
|
|
3633
3645
|
.gl-mask-chevron-down {
|
|
3634
|
-
mask-image: url($gl-icon-chevron-down);
|
|
3646
|
+
mask-image: url('#{$gl-icon-chevron-down}');
|
|
3635
3647
|
mask-repeat: no-repeat;
|
|
3636
3648
|
mask-position: center;
|
|
3637
3649
|
mask-size: cover
|
|
3638
3650
|
}
|
|
3639
3651
|
.gl-mask-chevron-down\! {
|
|
3640
|
-
mask-image: url($gl-icon-chevron-down) !important;
|
|
3652
|
+
mask-image: url('#{$gl-icon-chevron-down}') !important;
|
|
3641
3653
|
mask-repeat: no-repeat !important;
|
|
3642
3654
|
mask-position: center !important;
|
|
3643
3655
|
mask-size: cover !important
|
|
@@ -387,15 +387,15 @@
|
|
|
387
387
|
* naming convention: gl-bg-{image-name}
|
|
388
388
|
*/
|
|
389
389
|
@mixin gl-bg-chevron-left {
|
|
390
|
-
background-image: url($gl-icon-chevron-left);
|
|
390
|
+
background-image: url('#{$gl-icon-chevron-left}');
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
@mixin gl-bg-chevron-right {
|
|
394
|
-
background-image: url($gl-icon-chevron-right);
|
|
394
|
+
background-image: url('#{$gl-icon-chevron-right}');
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
@mixin gl-bg-chevron-down {
|
|
398
|
-
background-image: url($gl-icon-chevron-down);
|
|
398
|
+
background-image: url('#{$gl-icon-chevron-down}');
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
/**
|
|
@@ -95,6 +95,12 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
@mixin gl-lg-flex-direction-column {
|
|
99
|
+
@include gl-media-breakpoint-up(lg) {
|
|
100
|
+
@include gl-flex-direction-column;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
@mixin gl-xs-flex-direction-column {
|
|
99
105
|
@include gl-media-breakpoint-down(sm) {
|
|
100
106
|
flex-direction: column;
|