@gitlab/ui 32.50.0 → 32.51.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 +7 -0
- package/dist/components/base/form/form.documentation.js +1 -5
- package/dist/components/base/form/form_select/form_select.documentation.js +2 -17
- package/dist/components/base/modal/modal.js +15 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/documentation/documented_stories.js +2 -0
- package/package.json +1 -1
- package/scss_to_js/scss_variables.js +2 -0
- package/scss_to_js/scss_variables.json +10 -0
- package/src/components/base/form/form.documentation.js +0 -3
- package/src/components/base/form/form.stories.js +99 -14
- package/src/components/base/form/form_select/form_select.documentation.js +0 -19
- package/src/components/base/form/form_select/form_select.md +0 -2
- package/src/components/base/form/form_select/form_select.stories.js +98 -80
- package/src/components/base/modal/modal.vue +56 -35
- package/src/scss/utilities.scss +16 -0
- package/src/scss/utility-mixins/sizing.scss +8 -0
- package/src/scss/variables.scss +2 -0
- package/dist/components/base/form/examples/form.basic.example.js +0 -76
- package/dist/components/base/form/examples/form.edit.example.js +0 -66
- package/dist/components/base/form/examples/form.inline.example.js +0 -62
- package/dist/components/base/form/examples/form.novalidate.example.js +0 -61
- package/dist/components/base/form/examples/index.js +0 -27
- package/dist/components/base/form/form_select/examples/form_select.basic.example.js +0 -55
- package/dist/components/base/form/form_select/examples/form_select.disabled.example.js +0 -55
- package/dist/components/base/form/form_select/examples/form_select.manual_options.example.js +0 -48
- package/dist/components/base/form/form_select/examples/form_select.mixed_options.example.js +0 -55
- package/dist/components/base/form/form_select/examples/index.js +0 -27
- package/src/components/base/form/examples/form.basic.example.vue +0 -73
- package/src/components/base/form/examples/form.edit.example.vue +0 -37
- package/src/components/base/form/examples/form.inline.example.vue +0 -36
- package/src/components/base/form/examples/form.novalidate.example.vue +0 -30
- package/src/components/base/form/examples/index.js +0 -32
- package/src/components/base/form/form_select/examples/form_select.basic.example.vue +0 -17
- package/src/components/base/form/form_select/examples/form_select.disabled.example.vue +0 -17
- package/src/components/base/form/form_select/examples/form_select.manual_options.example.vue +0 -17
- package/src/components/base/form/form_select/examples/form_select.mixed_options.example.vue +0 -21
- package/src/components/base/form/form_select/examples/index.js +0 -32
|
@@ -90,6 +90,7 @@ export const setupStorybookReadme = () =>
|
|
|
90
90
|
'GlAccordion',
|
|
91
91
|
'GlAccordionItem',
|
|
92
92
|
'GlIntersperse',
|
|
93
|
+
'GlFormSelect',
|
|
93
94
|
'GlDaterangePicker',
|
|
94
95
|
'GlAvatarLabeled',
|
|
95
96
|
'GlBarChart',
|
|
@@ -114,6 +115,7 @@ export const setupStorybookReadme = () =>
|
|
|
114
115
|
'GlFormRadio',
|
|
115
116
|
'GlModal',
|
|
116
117
|
'GlKeysetPagination',
|
|
118
|
+
'GlForm',
|
|
117
119
|
],
|
|
118
120
|
components: {
|
|
119
121
|
GlComponentDocumentation,
|
package/package.json
CHANGED
|
@@ -15,6 +15,8 @@ export const glSpacingScale12 = '5rem'
|
|
|
15
15
|
export const glSpacingScale13 = '6rem'
|
|
16
16
|
export const glSpacingScale15 = '7.5rem'
|
|
17
17
|
export const glSpacingScale20 = '10rem'
|
|
18
|
+
export const glSpacingScale26 = '13rem'
|
|
19
|
+
export const glSpacingScale62 = '31rem'
|
|
18
20
|
export const breakpointSm = '576px'
|
|
19
21
|
export const breakpointMd = '768px'
|
|
20
22
|
export const breakpointLg = '992px'
|
|
@@ -85,6 +85,16 @@
|
|
|
85
85
|
"value": "20 * $grid-size",
|
|
86
86
|
"compiledValue": "10rem"
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"name": "$gl-spacing-scale-26",
|
|
90
|
+
"value": "26 * $grid-size",
|
|
91
|
+
"compiledValue": "13rem"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "$gl-spacing-scale-62",
|
|
95
|
+
"value": "62 * $grid-size",
|
|
96
|
+
"compiledValue": "31rem"
|
|
97
|
+
},
|
|
88
98
|
{
|
|
89
99
|
"name": "$breakpoint-sm",
|
|
90
100
|
"value": "576px",
|
|
@@ -1,17 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
GlForm,
|
|
3
|
+
GlFormGroup,
|
|
4
|
+
GlFormInput,
|
|
5
|
+
GlFormSelect,
|
|
6
|
+
GlFormCheckbox,
|
|
7
|
+
GlButton,
|
|
8
|
+
} from '../../../../index';
|
|
9
|
+
import { setStoryTimeout } from '../../../utils/test_utils';
|
|
4
10
|
import readme from './form.md';
|
|
5
11
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
export const Default = (args) => ({
|
|
13
|
+
components: {
|
|
14
|
+
GlForm,
|
|
15
|
+
GlFormGroup,
|
|
16
|
+
GlFormInput,
|
|
17
|
+
GlFormSelect,
|
|
18
|
+
GlFormCheckbox,
|
|
19
|
+
GlButton,
|
|
20
|
+
},
|
|
21
|
+
props: Object.keys(args),
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
form: {
|
|
25
|
+
submitDisabled: false,
|
|
26
|
+
email: '',
|
|
27
|
+
name: '',
|
|
28
|
+
mergeState: null,
|
|
29
|
+
checked: [],
|
|
30
|
+
},
|
|
31
|
+
states: [{ text: 'Select One', value: null }, 'Open', 'Resolved', 'Closed', 'Blocked'],
|
|
32
|
+
show: true,
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
onReset() {
|
|
37
|
+
this.form.name = '';
|
|
38
|
+
this.form.submitDisabled = false;
|
|
39
|
+
},
|
|
40
|
+
onSubmit(evt) {
|
|
41
|
+
evt.preventDefault();
|
|
42
|
+
this.form.submitDisabled = true;
|
|
43
|
+
setStoryTimeout(() => {
|
|
44
|
+
this.form.submitDisabled = false;
|
|
45
|
+
// eslint-disable-next-line no-alert
|
|
46
|
+
alert(JSON.stringify(this.form));
|
|
47
|
+
}, 1000);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
template: `
|
|
51
|
+
<gl-form @submit="onSubmit" @reset="onReset">
|
|
52
|
+
<gl-form-group
|
|
53
|
+
id="input-group-1"
|
|
54
|
+
label="Email address:"
|
|
55
|
+
label-for="input-1"
|
|
56
|
+
description="We'll never share your email with anyone else."
|
|
57
|
+
>
|
|
58
|
+
<gl-form-input
|
|
59
|
+
id="input-1"
|
|
60
|
+
v-model="form.email"
|
|
61
|
+
type="email"
|
|
62
|
+
required
|
|
63
|
+
placeholder="Enter email"
|
|
64
|
+
/>
|
|
65
|
+
</gl-form-group>
|
|
66
|
+
|
|
67
|
+
<gl-form-group id="input-group-2" label="Your Name:" label-for="input-2">
|
|
68
|
+
<gl-form-input id="input-2" v-model="form.name" required placeholder="Enter name" />
|
|
69
|
+
</gl-form-group>
|
|
9
70
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
71
|
+
<gl-form-group id="input-group-3" label="Merge State:" label-for="input-3">
|
|
72
|
+
<gl-form-select id="input-3" v-model="form.mergeState" :options="states" required />
|
|
73
|
+
</gl-form-group>
|
|
74
|
+
|
|
75
|
+
<gl-form-group id="input-group-4">
|
|
76
|
+
<gl-form-checkbox-group id="checkboxes-4" v-model="form.checked">
|
|
77
|
+
<gl-form-checkbox value="squash">Squash Commits</gl-form-checkbox>
|
|
78
|
+
<gl-form-checkbox value="new">Create New Issue</gl-form-checkbox>
|
|
79
|
+
</gl-form-checkbox-group>
|
|
80
|
+
</gl-form-group>
|
|
81
|
+
|
|
82
|
+
<div class="gl-display-flex gl-justify-content-end">
|
|
83
|
+
<gl-button type="reset" class="gl-mr-3">Cancel</gl-button>
|
|
84
|
+
<gl-button type="submit" variant="confirm">Submit</gl-button>
|
|
85
|
+
</div>
|
|
86
|
+
</gl-form>
|
|
87
|
+
`,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default {
|
|
91
|
+
title: 'base/form/form',
|
|
92
|
+
component: GlForm,
|
|
93
|
+
parameters: {
|
|
94
|
+
bootstrapComponent: 'b-form',
|
|
95
|
+
knobs: { disable: true },
|
|
96
|
+
docs: {
|
|
97
|
+
description: {
|
|
98
|
+
component: readme,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
1
|
import description from './form_select.md';
|
|
3
2
|
|
|
4
3
|
export default {
|
|
5
4
|
description,
|
|
6
|
-
examples,
|
|
7
5
|
followDesignSystem: true,
|
|
8
|
-
bootstrapComponent: 'b-form-select',
|
|
9
|
-
events: [
|
|
10
|
-
{
|
|
11
|
-
event: 'change',
|
|
12
|
-
description: 'Emitted with the select value changes via user interaction.',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
event: 'input',
|
|
16
|
-
description: 'Emitted with the select value changes.',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
slots: [
|
|
20
|
-
{
|
|
21
|
-
name: 'first',
|
|
22
|
-
description: 'Slot to place option tags above options provided via options prop',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
6
|
};
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { withKnobs, boolean, select, number, object } from '@storybook/addon-knobs';
|
|
2
|
-
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
3
1
|
import { GlFormSelect } from '../../../../../index';
|
|
4
2
|
import { sizeOptions, formStateOptions } from '../../../../utils/constants';
|
|
5
3
|
import { formSelectOptions } from './constants';
|
|
6
4
|
import readme from './form_select.md';
|
|
7
5
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const data = () => {
|
|
13
|
-
return {
|
|
14
|
-
selected: 'Pizza',
|
|
15
|
-
};
|
|
16
|
-
};
|
|
6
|
+
const data = () => ({
|
|
7
|
+
selected: 'Pizza',
|
|
8
|
+
});
|
|
17
9
|
|
|
18
10
|
const template = `
|
|
19
11
|
<gl-form-select
|
|
@@ -27,86 +19,112 @@ const template = `
|
|
|
27
19
|
</gl-form-select>
|
|
28
20
|
`;
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
const generateProps = ({
|
|
31
23
|
size = null,
|
|
32
24
|
state = null,
|
|
33
25
|
disabled = false,
|
|
34
26
|
multiple = false,
|
|
35
27
|
selectSize = 1,
|
|
36
28
|
options = formSelectOptions,
|
|
37
|
-
} = {}) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
} = {}) => ({
|
|
30
|
+
size,
|
|
31
|
+
disabled,
|
|
32
|
+
state,
|
|
33
|
+
multiple,
|
|
34
|
+
selectSize,
|
|
35
|
+
options,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const Template = (args) => ({
|
|
39
|
+
components: { GlFormSelect },
|
|
40
|
+
props: Object.keys(args),
|
|
41
|
+
data,
|
|
42
|
+
template,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const Default = Template.bind({});
|
|
46
|
+
Default.args = generateProps();
|
|
47
|
+
|
|
48
|
+
export const Disabled = Template.bind({});
|
|
49
|
+
Disabled.args = generateProps({ disabled: true });
|
|
50
|
+
|
|
51
|
+
export const ValidState = Template.bind({});
|
|
52
|
+
ValidState.args = generateProps({ state: true });
|
|
53
|
+
|
|
54
|
+
export const InvalidState = Template.bind({});
|
|
55
|
+
InvalidState.args = generateProps({ state: false });
|
|
56
|
+
|
|
57
|
+
export const WithTruncation = (args, { argTypes }) => ({
|
|
58
|
+
components: { GlFormSelect },
|
|
59
|
+
props: Object.keys(argTypes),
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
selected: 1,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
template: `
|
|
66
|
+
<div style="max-width: 300px;">
|
|
67
|
+
${template}
|
|
68
|
+
</div>
|
|
69
|
+
`,
|
|
70
|
+
});
|
|
71
|
+
WithTruncation.args = generateProps({
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
value: 1,
|
|
75
|
+
text: 'A form select option with a very looooooooong label',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
title: 'base/form/form-select',
|
|
82
|
+
component: GlFormSelect,
|
|
83
|
+
parameters: {
|
|
84
|
+
bootstrapComponent: 'b-form-select',
|
|
85
|
+
knobs: { disable: true },
|
|
86
|
+
docs: {
|
|
87
|
+
description: {
|
|
88
|
+
component: readme,
|
|
89
|
+
},
|
|
42
90
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
91
|
+
},
|
|
92
|
+
argTypes: {
|
|
93
|
+
size: {
|
|
94
|
+
control: {
|
|
95
|
+
type: 'select',
|
|
96
|
+
options: sizeOptions,
|
|
97
|
+
},
|
|
46
98
|
},
|
|
47
99
|
state: {
|
|
48
|
-
|
|
49
|
-
|
|
100
|
+
control: {
|
|
101
|
+
type: 'select',
|
|
102
|
+
options: formStateOptions,
|
|
103
|
+
},
|
|
50
104
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
105
|
+
input: {
|
|
106
|
+
description: 'Emitted with the select value changes.',
|
|
107
|
+
table: {
|
|
108
|
+
category: 'events',
|
|
109
|
+
},
|
|
54
110
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
111
|
+
change: {
|
|
112
|
+
description: 'Emitted with the select value changes via user interaction.',
|
|
113
|
+
table: {
|
|
114
|
+
category: 'events',
|
|
115
|
+
},
|
|
58
116
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
117
|
+
first: {
|
|
118
|
+
description: 'Slot to place option tags above options provided via options prop.',
|
|
119
|
+
table: {
|
|
120
|
+
category: 'slots',
|
|
121
|
+
},
|
|
62
122
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.add('default', () => ({
|
|
69
|
-
components,
|
|
70
|
-
props: generateProps(),
|
|
71
|
-
data,
|
|
72
|
-
template,
|
|
73
|
-
}))
|
|
74
|
-
.add('disabled', () => ({
|
|
75
|
-
components,
|
|
76
|
-
props: generateProps({ disabled: true }),
|
|
77
|
-
data,
|
|
78
|
-
template,
|
|
79
|
-
}))
|
|
80
|
-
.add('valid state', () => ({
|
|
81
|
-
components,
|
|
82
|
-
props: generateProps({ state: true }),
|
|
83
|
-
data,
|
|
84
|
-
template,
|
|
85
|
-
}))
|
|
86
|
-
.add('invalid state', () => ({
|
|
87
|
-
components,
|
|
88
|
-
props: generateProps({ state: false }),
|
|
89
|
-
data,
|
|
90
|
-
template,
|
|
91
|
-
}))
|
|
92
|
-
.add('with truncation', () => ({
|
|
93
|
-
components,
|
|
94
|
-
props: generateProps({
|
|
95
|
-
options: [
|
|
96
|
-
{
|
|
97
|
-
value: 1,
|
|
98
|
-
text: 'A form select option with a very looooooooong label',
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
}),
|
|
102
|
-
data() {
|
|
103
|
-
return {
|
|
104
|
-
selected: 1,
|
|
105
|
-
};
|
|
123
|
+
default: {
|
|
124
|
+
description: 'Slot to place explicit option tags.',
|
|
125
|
+
table: {
|
|
126
|
+
category: 'slots',
|
|
127
|
+
},
|
|
106
128
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
${template}
|
|
110
|
-
</div>
|
|
111
|
-
`,
|
|
112
|
-
}));
|
|
129
|
+
},
|
|
130
|
+
};
|
|
@@ -80,6 +80,22 @@ export default {
|
|
|
80
80
|
default: false,
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
|
+
computed: {
|
|
84
|
+
shouldRenderModalOk() {
|
|
85
|
+
return Boolean(this.$slots['modal-ok']);
|
|
86
|
+
},
|
|
87
|
+
shouldRenderModalCancel() {
|
|
88
|
+
return Boolean(this.$slots['modal-cancel']);
|
|
89
|
+
},
|
|
90
|
+
shouldRenderModalFooter() {
|
|
91
|
+
return Boolean(
|
|
92
|
+
this.actionCancel ||
|
|
93
|
+
this.actionSecondary ||
|
|
94
|
+
this.actionPrimary ||
|
|
95
|
+
this.$slots['modal-footer']
|
|
96
|
+
);
|
|
97
|
+
},
|
|
98
|
+
},
|
|
83
99
|
methods: {
|
|
84
100
|
show() {
|
|
85
101
|
this.$refs.modal.show();
|
|
@@ -158,7 +174,9 @@ export default {
|
|
|
158
174
|
@cancel="canceled"
|
|
159
175
|
@change="$emit('change', $event)"
|
|
160
176
|
>
|
|
161
|
-
<
|
|
177
|
+
<template #default>
|
|
178
|
+
<slot name="default"></slot>
|
|
179
|
+
</template>
|
|
162
180
|
<template #modal-header>
|
|
163
181
|
<!-- @slot Entire modal header container contents (including the close button on the top right corner) -->
|
|
164
182
|
<slot name="modal-header">
|
|
@@ -170,49 +188,52 @@ export default {
|
|
|
170
188
|
<!-- @slot Content of Modal header close button. If modal-header slot is used, this slot will not be shown. -->
|
|
171
189
|
<close-button ref="close-button" :label="dismissLabel" @click="close" />
|
|
172
190
|
</template>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<
|
|
191
|
+
<template v-if="shouldRenderModalOk" #modal-ok>
|
|
192
|
+
<slot name="modal-ok"></slot>
|
|
193
|
+
</template>
|
|
194
|
+
<template v-if="shouldRenderModalCancel" #modal-cancel>
|
|
195
|
+
<slot name="modal-cancel"></slot>
|
|
196
|
+
</template>
|
|
177
197
|
<!-- @slot Populated via props: modal-action-primary, modal-action-cancel and modal-action-secondary. -->
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
198
|
+
<template v-if="shouldRenderModalFooter" #modal-footer>
|
|
199
|
+
<slot name="modal-footer">
|
|
200
|
+
<!--
|
|
181
201
|
Emitted when clicked on modal-action-cancel
|
|
182
202
|
@event canceled
|
|
183
203
|
-->
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
204
|
+
<gl-button
|
|
205
|
+
v-if="actionCancel"
|
|
206
|
+
class="js-modal-action-cancel"
|
|
207
|
+
v-bind="buttonBinding(actionCancel, 'actionCancel')"
|
|
208
|
+
@click="cancel"
|
|
209
|
+
>
|
|
210
|
+
{{ actionCancel.text }}
|
|
211
|
+
</gl-button>
|
|
212
|
+
<!--
|
|
193
213
|
Emitted when clicked on modal-action-secondary
|
|
194
214
|
@event secondary
|
|
195
215
|
-->
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
216
|
+
<gl-button
|
|
217
|
+
v-if="actionSecondary"
|
|
218
|
+
class="js-modal-action-secondary"
|
|
219
|
+
v-bind="buttonBinding(actionSecondary, 'actionSecondary')"
|
|
220
|
+
@click="secondary"
|
|
221
|
+
>
|
|
222
|
+
{{ actionSecondary.text }}
|
|
223
|
+
</gl-button>
|
|
224
|
+
<!--
|
|
205
225
|
Emitted when clicked on modal-action-primary
|
|
206
226
|
@event primary
|
|
207
227
|
-->
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
228
|
+
<gl-button
|
|
229
|
+
v-if="actionPrimary"
|
|
230
|
+
class="js-modal-action-primary"
|
|
231
|
+
v-bind="buttonBinding(actionPrimary, 'actionPrimary')"
|
|
232
|
+
@click="ok"
|
|
233
|
+
>
|
|
234
|
+
{{ actionPrimary.text }}
|
|
235
|
+
</gl-button>
|
|
236
|
+
</slot>
|
|
237
|
+
</template>
|
|
217
238
|
</b-modal>
|
|
218
239
|
</template>
|
package/src/scss/utilities.scss
CHANGED
|
@@ -4313,6 +4313,22 @@
|
|
|
4313
4313
|
max-width: $gl-spacing-scale-15 !important;
|
|
4314
4314
|
}
|
|
4315
4315
|
|
|
4316
|
+
.gl-max-w-26 {
|
|
4317
|
+
max-width: $gl-spacing-scale-26;
|
|
4318
|
+
}
|
|
4319
|
+
|
|
4320
|
+
.gl-max-w-26\! {
|
|
4321
|
+
max-width: $gl-spacing-scale-26 !important;
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4324
|
+
.gl-max-w-62 {
|
|
4325
|
+
max-width: $gl-spacing-scale-62;
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4328
|
+
.gl-max-w-62\! {
|
|
4329
|
+
max-width: $gl-spacing-scale-62 !important;
|
|
4330
|
+
}
|
|
4331
|
+
|
|
4316
4332
|
.gl-max-w-none {
|
|
4317
4333
|
max-width: none;
|
|
4318
4334
|
}
|
|
@@ -271,6 +271,14 @@
|
|
|
271
271
|
max-width: $gl-spacing-scale-15;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
@mixin gl-max-w-26 {
|
|
275
|
+
max-width: $gl-spacing-scale-26;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@mixin gl-max-w-62 {
|
|
279
|
+
max-width: $gl-spacing-scale-62;
|
|
280
|
+
}
|
|
281
|
+
|
|
274
282
|
@mixin gl-max-w-none {
|
|
275
283
|
max-width: none;
|
|
276
284
|
}
|
package/src/scss/variables.scss
CHANGED
|
@@ -18,6 +18,8 @@ $gl-spacing-scale-12: 10 * $grid-size;
|
|
|
18
18
|
$gl-spacing-scale-13: 12 * $grid-size;
|
|
19
19
|
$gl-spacing-scale-15: 15 * $grid-size;
|
|
20
20
|
$gl-spacing-scale-20: 20 * $grid-size;
|
|
21
|
+
$gl-spacing-scale-26: 26 * $grid-size;
|
|
22
|
+
$gl-spacing-scale-62: 62 * $grid-size;
|
|
21
23
|
|
|
22
24
|
// Responsive breakpoints
|
|
23
25
|
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
form: {
|
|
7
|
-
submitDisabled: false,
|
|
8
|
-
email: '',
|
|
9
|
-
name: '',
|
|
10
|
-
mergeState: null,
|
|
11
|
-
checked: []
|
|
12
|
-
},
|
|
13
|
-
states: [{
|
|
14
|
-
text: 'Select One',
|
|
15
|
-
value: null
|
|
16
|
-
}, 'Open', 'Resolved', 'Closed', 'Blocked'],
|
|
17
|
-
show: true
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
methods: {
|
|
22
|
-
onReset() {
|
|
23
|
-
this.form.name = '';
|
|
24
|
-
this.form.submitDisabled = false;
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
onSubmit(evt) {
|
|
28
|
-
evt.preventDefault();
|
|
29
|
-
this.form.submitDisabled = true;
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
this.form.submitDisabled = false; // eslint-disable-next-line no-alert
|
|
32
|
-
|
|
33
|
-
alert(JSON.stringify(this.form));
|
|
34
|
-
}, 1000);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/* script */
|
|
41
|
-
const __vue_script__ = script;
|
|
42
|
-
|
|
43
|
-
/* template */
|
|
44
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-form',{on:{"submit":_vm.onSubmit,"reset":_vm.onReset}},[_c('gl-form-group',{attrs:{"id":"input-group-1","label":"Email address:","label-for":"input-1","description":"We'll never share your email with anyone else."}},[_c('gl-form-input',{attrs:{"id":"input-1","type":"email","required":"","placeholder":"Enter email"},model:{value:(_vm.form.email),callback:function ($$v) {_vm.$set(_vm.form, "email", $$v);},expression:"form.email"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"id":"input-group-2","label":"Your Name:","label-for":"input-2"}},[_c('gl-form-input',{attrs:{"id":"input-2","required":"","placeholder":"Enter name"},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, "name", $$v);},expression:"form.name"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"id":"input-group-3","label":"Merge State:","label-for":"input-3"}},[_c('gl-form-select',{attrs:{"id":"input-3","options":_vm.states,"required":""},model:{value:(_vm.form.mergeState),callback:function ($$v) {_vm.$set(_vm.form, "mergeState", $$v);},expression:"form.mergeState"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"id":"input-group-4"}},[_c('gl-form-checkbox-group',{attrs:{"id":"checkboxes-4"},model:{value:(_vm.form.checked),callback:function ($$v) {_vm.$set(_vm.form, "checked", $$v);},expression:"form.checked"}},[_c('gl-form-checkbox',{attrs:{"value":"squash"}},[_vm._v("Squash Commits")]),_vm._v(" "),_c('gl-form-checkbox',{attrs:{"value":"new"}},[_vm._v("Create New Issue")])],1)],1),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-justify-content-end"},[_c('gl-button',{staticClass:"gl-mr-3",attrs:{"type":"reset","variant":"secondary"}},[_vm._v("Cancel")]),_vm._v(" "),_c('gl-button',{attrs:{"type":"submit","variant":"success"}},[_vm._v("Submit")])],1)],1)],1)};
|
|
45
|
-
var __vue_staticRenderFns__ = [];
|
|
46
|
-
|
|
47
|
-
/* style */
|
|
48
|
-
const __vue_inject_styles__ = undefined;
|
|
49
|
-
/* scoped */
|
|
50
|
-
const __vue_scope_id__ = undefined;
|
|
51
|
-
/* module identifier */
|
|
52
|
-
const __vue_module_identifier__ = undefined;
|
|
53
|
-
/* functional template */
|
|
54
|
-
const __vue_is_functional_template__ = false;
|
|
55
|
-
/* style inject */
|
|
56
|
-
|
|
57
|
-
/* style inject SSR */
|
|
58
|
-
|
|
59
|
-
/* style inject shadow dom */
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const __vue_component__ = __vue_normalize__(
|
|
64
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
65
|
-
__vue_inject_styles__,
|
|
66
|
-
__vue_script__,
|
|
67
|
-
__vue_scope_id__,
|
|
68
|
-
__vue_is_functional_template__,
|
|
69
|
-
__vue_module_identifier__,
|
|
70
|
-
false,
|
|
71
|
-
undefined,
|
|
72
|
-
undefined,
|
|
73
|
-
undefined
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
export default __vue_component__;
|