@gitlab/ui 32.50.0 → 32.51.3
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 +28 -0
- package/dist/components/base/breadcrumb/breadcrumb.documentation.js +1 -1
- 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/components/regions/empty_state/empty_state.js +4 -1
- 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/dist/utils/string_utils.js +6 -2
- package/documentation/documented_stories.js +2 -0
- package/package.json +3 -1
- package/scss_to_js/scss_variables.js +2 -0
- package/scss_to_js/scss_variables.json +10 -0
- package/src/components/base/breadcrumb/breadcrumb.md +6 -5
- package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
- package/src/components/base/breadcrumb/breadcrumb.stories.js +4 -1
- 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/components/regions/empty_state/empty_state.vue +12 -4
- package/src/scss/utilities.scss +16 -0
- package/src/scss/utility-mixins/sizing.scss +8 -0
- package/src/scss/variables.scss +2 -0
- package/src/utils/string_utils.js +6 -2
- package/src/utils/string_utils.spec.js +8 -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
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
originalName: 'First last',
|
|
6
|
-
name: 'First last',
|
|
7
|
-
submitDisabled: false,
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
computed: {
|
|
11
|
-
formClean() {
|
|
12
|
-
return this.name === this.originalName;
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
methods: {
|
|
16
|
-
onSubmit(evt) {
|
|
17
|
-
evt.preventDefault();
|
|
18
|
-
this.submitDisabled = true;
|
|
19
|
-
setTimeout(() => {
|
|
20
|
-
this.submitDisabled = true;
|
|
21
|
-
}, 1000);
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<gl-form @submit="onSubmit">
|
|
29
|
-
<gl-form-group label="Name">
|
|
30
|
-
<gl-form-input v-model="name" type="text" required />
|
|
31
|
-
</gl-form-group>
|
|
32
|
-
|
|
33
|
-
<gl-button :disabled="formClean || submitDisabled" type="submit" variant="success"
|
|
34
|
-
>Submit</gl-button
|
|
35
|
-
>
|
|
36
|
-
</gl-form>
|
|
37
|
-
</template>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
name: {
|
|
6
|
-
first: '',
|
|
7
|
-
last: '',
|
|
8
|
-
submitDisabled: false,
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
methods: {
|
|
13
|
-
onSubmit(evt) {
|
|
14
|
-
evt.preventDefault();
|
|
15
|
-
this.submitDisabled = true;
|
|
16
|
-
setTimeout(() => {
|
|
17
|
-
this.submitDisabled = false;
|
|
18
|
-
}, 1000);
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<template>
|
|
25
|
-
<gl-form inline @submit="onSubmit">
|
|
26
|
-
<!-- using plain label instead of gl-form-group to avoid margin layout issues -->
|
|
27
|
-
<label for="input-name" class="gl-mr-3">First name</label>
|
|
28
|
-
<gl-form-input v-model="name.first" name="input-name" class="ml-1" type="text" required />
|
|
29
|
-
<label for="input-surname" class="gl-mx-3">Surname</label>
|
|
30
|
-
<gl-form-input v-model="name.last" name="input-surname" class="ml-1" type="text" required />
|
|
31
|
-
|
|
32
|
-
<gl-button class="gl-ml-3" small :disabled="submitDisabled" type="submit" variant="success"
|
|
33
|
-
>Save</gl-button
|
|
34
|
-
>
|
|
35
|
-
</gl-form>
|
|
36
|
-
</template>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
name: '',
|
|
6
|
-
errorText: '',
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
methods: {
|
|
10
|
-
onSubmit(evt) {
|
|
11
|
-
evt.preventDefault();
|
|
12
|
-
if (this.name === '') {
|
|
13
|
-
this.errorText = 'Please enter your name';
|
|
14
|
-
} else {
|
|
15
|
-
this.errorText = '';
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<gl-form novalidate @submit="onSubmit">
|
|
24
|
-
<gl-form-group label="Name">
|
|
25
|
-
<gl-form-input v-model="name" type="text" required />
|
|
26
|
-
</gl-form-group>
|
|
27
|
-
<p class="text-danger">{{ errorText }}</p>
|
|
28
|
-
<gl-button type="submit" variant="success">Submit</gl-button>
|
|
29
|
-
</gl-form>
|
|
30
|
-
</template>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import FormExample from './form.basic.example.vue';
|
|
2
|
-
import EditFormExample from './form.edit.example.vue';
|
|
3
|
-
import InlineFormExample from './form.inline.example.vue';
|
|
4
|
-
import NoValidateFormExample from './form.novalidate.example.vue';
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
{
|
|
8
|
-
name: 'Form',
|
|
9
|
-
items: [
|
|
10
|
-
{
|
|
11
|
-
id: 'form-basic',
|
|
12
|
-
name: 'Form in the default state',
|
|
13
|
-
component: FormExample,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 'form-inline',
|
|
17
|
-
name: 'Form in the inline state',
|
|
18
|
-
component: InlineFormExample,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'form-edit',
|
|
22
|
-
name: 'Form with existing data',
|
|
23
|
-
component: EditFormExample,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 'form-novalidate',
|
|
27
|
-
name: 'Form with HTML validation disabled',
|
|
28
|
-
component: NoValidateFormExample,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
selected: 'pizza',
|
|
6
|
-
options: [
|
|
7
|
-
{ text: 'Pizza', value: 'pizza' },
|
|
8
|
-
{ text: 'Tacos', value: 'tacos' },
|
|
9
|
-
],
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<gl-form-select v-model="selected" :options="options" />
|
|
17
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
selected: 'pizza',
|
|
6
|
-
options: [
|
|
7
|
-
{ text: 'Pizza', value: 'pizza' },
|
|
8
|
-
{ text: 'Tacos', value: 'tacos' },
|
|
9
|
-
],
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<gl-form-select v-model="selected" :options="options" :disabled="true" />
|
|
17
|
-
</template>
|
package/src/components/base/form/form_select/examples/form_select.manual_options.example.vue
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
selected: 'pizza',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<gl-form-select v-model="selected">
|
|
13
|
-
<option value="pizza">Pizza</option>
|
|
14
|
-
<option value="tacos">Tacos</option>
|
|
15
|
-
<option value="pad-thai" disabled>Pad Thai</option>
|
|
16
|
-
</gl-form-select>
|
|
17
|
-
</template>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
selected: 'pizza',
|
|
6
|
-
options: [
|
|
7
|
-
{ text: 'Pizza', value: 'pizza' },
|
|
8
|
-
{ text: 'Tacos', value: 'tacos' },
|
|
9
|
-
],
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<gl-form-select v-model="selected" :options="options">
|
|
17
|
-
<template #first>
|
|
18
|
-
<option :value="null" disabled>Select a dish</option>
|
|
19
|
-
</template>
|
|
20
|
-
</gl-form-select>
|
|
21
|
-
</template>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import FormSelectBasicExample from './form_select.basic.example.vue';
|
|
2
|
-
import FormSelectDisabledExample from './form_select.disabled.example.vue';
|
|
3
|
-
import FormSelectManualOptionsExample from './form_select.manual_options.example.vue';
|
|
4
|
-
import FormSelectMixedOptionsExample from './form_select.mixed_options.example.vue';
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
{
|
|
8
|
-
name: 'Form Select',
|
|
9
|
-
items: [
|
|
10
|
-
{
|
|
11
|
-
id: 'form-select-options-array',
|
|
12
|
-
name: 'Form select with options property',
|
|
13
|
-
component: FormSelectBasicExample,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 'form-select-manual-options',
|
|
17
|
-
name: 'Form select with manual options',
|
|
18
|
-
component: FormSelectManualOptionsExample,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'form-select-mixed-options',
|
|
22
|
-
name: 'Form select with mixed options',
|
|
23
|
-
component: FormSelectMixedOptionsExample,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 'form-select-disabled',
|
|
27
|
-
name: 'Form select disabled',
|
|
28
|
-
component: FormSelectDisabledExample,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
];
|