@gitlab/ui 32.47.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 +28 -0
- package/dist/components/base/avatar_labeled/avatar_labeled.documentation.js +2 -9
- package/dist/components/base/avatars_inline/avatars_inline.documentation.js +2 -5
- package/dist/components/base/form/form.documentation.js +1 -5
- package/dist/components/base/form/form_radio/form_radio.documentation.js +2 -33
- package/dist/components/base/form/form_radio/form_radio.js +15 -2
- package/dist/components/base/form/form_select/form_select.documentation.js +2 -17
- package/dist/components/base/keyset_pagination/keyset_pagination.documentation.js +2 -84
- package/dist/components/base/keyset_pagination/keyset_pagination.js +42 -0
- package/dist/components/base/modal/modal.documentation.js +2 -32
- package/dist/components/base/modal/modal.js +15 -1
- package/dist/components/charts/gauge/gauge.documentation.js +2 -6
- package/dist/components/utilities/intersperse/intersperse.documentation.js +2 -5
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/documentation/documented_stories.js +9 -0
- package/package.json +3 -3
- package/scss_to_js/scss_variables.js +2 -0
- package/scss_to_js/scss_variables.json +10 -0
- package/src/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -9
- package/src/components/base/avatar_labeled/avatar_labeled.md +2 -5
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +68 -62
- package/src/components/base/avatar_labeled/avatar_labeled.vue +1 -0
- package/src/components/base/avatars_inline/avatars_inline.documentation.js +0 -2
- package/src/components/base/avatars_inline/avatars_inline.md +1 -3
- package/src/components/base/avatars_inline/avatars_inline.stories.js +49 -44
- 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_radio/form_radio.documentation.js +0 -31
- package/src/components/base/form/form_radio/form_radio.md +7 -14
- package/src/components/base/form/form_radio/form_radio.stories.js +40 -28
- package/src/components/base/form/form_radio/form_radio.vue +26 -1
- 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/keyset_pagination/keyset_pagination.documentation.js +0 -99
- package/src/components/base/keyset_pagination/keyset_pagination.md +0 -2
- package/src/components/base/keyset_pagination/keyset_pagination.stories.js +60 -58
- package/src/components/base/keyset_pagination/keyset_pagination.vue +35 -1
- package/src/components/base/modal/modal.documentation.js +0 -42
- package/src/components/base/modal/modal.md +2 -7
- package/src/components/base/modal/modal.stories.js +107 -85
- package/src/components/base/modal/modal.vue +73 -32
- package/src/components/charts/gauge/gauge.documentation.js +0 -3
- package/src/components/charts/gauge/gauge.md +0 -2
- package/src/components/charts/gauge/gauge.stories.js +70 -86
- package/src/components/utilities/intersperse/intersperse.documentation.js +0 -2
- package/src/components/utilities/intersperse/intersperse.md +0 -2
- package/src/components/utilities/intersperse/intersperse.stories.js +38 -38
- 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/avatar_labeled/examples/avatar.labeled.example.js +0 -38
- package/dist/components/base/avatar_labeled/examples/avatar.labeled_badges.example.js +0 -38
- package/dist/components/base/avatar_labeled/examples/avatar.labeled_links.example.js +0 -38
- package/dist/components/base/avatar_labeled/examples/avatar.labeled_tooltip.example.js +0 -38
- package/dist/components/base/avatar_labeled/examples/index.js +0 -31
- package/dist/components/base/avatars_inline/examples/avatars.inline.example.js +0 -58
- package/dist/components/base/avatars_inline/examples/avatars.inline_large.example.js +0 -58
- package/dist/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips.example.js +0 -70
- package/dist/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips_badge.example.js +0 -70
- package/dist/components/base/avatars_inline/examples/index.js +0 -31
- 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_radio/examples/form_radio.basic.example.js +0 -48
- package/dist/components/base/form/form_radio/examples/form_radio.checked_disabled.example.js +0 -48
- package/dist/components/base/form/form_radio/examples/index.js +0 -19
- 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/dist/components/base/keyset_pagination/examples/index.js +0 -37
- package/dist/components/base/keyset_pagination/examples/keyset_pagination.basic.example.js +0 -51
- package/dist/components/base/keyset_pagination/examples/keyset_pagination.events.example.js +0 -64
- package/dist/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.js +0 -59
- package/dist/components/base/keyset_pagination/examples/keyset_pagination.links.example.js +0 -51
- package/dist/components/base/keyset_pagination/examples/keyset_pagination.slots.example.js +0 -51
- package/dist/components/base/modal/examples/index.js +0 -31
- package/dist/components/base/modal/examples/modal.basic.example.js +0 -62
- package/dist/components/base/modal/examples/modal.disabled.example.js +0 -89
- package/dist/components/base/modal/examples/modal.sizes.example.js +0 -62
- package/dist/components/charts/gauge/examples/gauge.basic.example.js +0 -38
- package/dist/components/charts/gauge/examples/gauge.no_thresholds.example.js +0 -38
- package/dist/components/charts/gauge/examples/gauge.no_value.example.js +0 -38
- package/dist/components/charts/gauge/examples/gauge.with_text.example.js +0 -38
- package/dist/components/charts/gauge/examples/index.js +0 -31
- package/dist/components/utilities/intersperse/examples/index.js +0 -31
- package/dist/components/utilities/intersperse/examples/intersperse.custom_last_separator.example.js +0 -38
- package/dist/components/utilities/intersperse/examples/intersperse.custom_last_separator_two_items.example.js +0 -38
- package/dist/components/utilities/intersperse/examples/intersperse.custom_separator.example.js +0 -38
- package/dist/components/utilities/intersperse/examples/intersperse.default.example.js +0 -38
- package/src/components/base/avatar_labeled/examples/avatar.labeled.example.vue +0 -8
- package/src/components/base/avatar_labeled/examples/avatar.labeled_badges.example.vue +0 -17
- package/src/components/base/avatar_labeled/examples/avatar.labeled_links.example.vue +0 -10
- package/src/components/base/avatar_labeled/examples/avatar.labeled_tooltip.example.vue +0 -10
- package/src/components/base/avatar_labeled/examples/index.js +0 -36
- package/src/components/base/avatars_inline/examples/avatars.inline.example.vue +0 -18
- package/src/components/base/avatars_inline/examples/avatars.inline_large.example.vue +0 -18
- package/src/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips.example.vue +0 -24
- package/src/components/base/avatars_inline/examples/avatars.inline_links_and_tooltips_badge.example.vue +0 -31
- package/src/components/base/avatars_inline/examples/index.js +0 -36
- 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_radio/examples/form_radio.basic.example.vue +0 -16
- package/src/components/base/form/form_radio/examples/form_radio.checked_disabled.example.vue +0 -13
- package/src/components/base/form/form_radio/examples/index.js +0 -22
- 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
- package/src/components/base/keyset_pagination/examples/index.js +0 -43
- package/src/components/base/keyset_pagination/examples/keyset_pagination.basic.example.vue +0 -16
- package/src/components/base/keyset_pagination/examples/keyset_pagination.events.example.vue +0 -29
- package/src/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.vue +0 -23
- package/src/components/base/keyset_pagination/examples/keyset_pagination.links.example.vue +0 -20
- package/src/components/base/keyset_pagination/examples/keyset_pagination.slots.example.vue +0 -23
- package/src/components/base/modal/examples/index.js +0 -39
- package/src/components/base/modal/examples/modal.basic.example.vue +0 -39
- package/src/components/base/modal/examples/modal.disabled.example.vue +0 -58
- package/src/components/base/modal/examples/modal.sizes.example.vue +0 -61
- package/src/components/charts/gauge/examples/gauge.basic.example.vue +0 -5
- package/src/components/charts/gauge/examples/gauge.no_thresholds.example.vue +0 -5
- package/src/components/charts/gauge/examples/gauge.no_value.example.vue +0 -5
- package/src/components/charts/gauge/examples/gauge.with_text.example.vue +0 -12
- package/src/components/charts/gauge/examples/index.js +0 -36
- package/src/components/utilities/intersperse/examples/index.js +0 -36
- package/src/components/utilities/intersperse/examples/intersperse.custom_last_separator.example.vue +0 -7
- package/src/components/utilities/intersperse/examples/intersperse.custom_last_separator_two_items.example.vue +0 -6
- package/src/components/utilities/intersperse/examples/intersperse.custom_separator.example.vue +0 -7
- package/src/components/utilities/intersperse/examples/intersperse.default.example.vue +0 -7
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
form: {
|
|
6
|
-
submitDisabled: false,
|
|
7
|
-
email: '',
|
|
8
|
-
name: '',
|
|
9
|
-
mergeState: null,
|
|
10
|
-
checked: [],
|
|
11
|
-
},
|
|
12
|
-
states: [{ text: 'Select One', value: null }, 'Open', 'Resolved', 'Closed', 'Blocked'],
|
|
13
|
-
show: true,
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
methods: {
|
|
17
|
-
onReset() {
|
|
18
|
-
this.form.name = '';
|
|
19
|
-
this.form.submitDisabled = false;
|
|
20
|
-
},
|
|
21
|
-
onSubmit(evt) {
|
|
22
|
-
evt.preventDefault();
|
|
23
|
-
this.form.submitDisabled = true;
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
this.form.submitDisabled = false;
|
|
26
|
-
// eslint-disable-next-line no-alert
|
|
27
|
-
alert(JSON.stringify(this.form));
|
|
28
|
-
}, 1000);
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<div>
|
|
36
|
-
<gl-form @submit="onSubmit" @reset="onReset">
|
|
37
|
-
<gl-form-group
|
|
38
|
-
id="input-group-1"
|
|
39
|
-
label="Email address:"
|
|
40
|
-
label-for="input-1"
|
|
41
|
-
description="We'll never share your email with anyone else."
|
|
42
|
-
>
|
|
43
|
-
<gl-form-input
|
|
44
|
-
id="input-1"
|
|
45
|
-
v-model="form.email"
|
|
46
|
-
type="email"
|
|
47
|
-
required
|
|
48
|
-
placeholder="Enter email"
|
|
49
|
-
/>
|
|
50
|
-
</gl-form-group>
|
|
51
|
-
|
|
52
|
-
<gl-form-group id="input-group-2" label="Your Name:" label-for="input-2">
|
|
53
|
-
<gl-form-input id="input-2" v-model="form.name" required placeholder="Enter name" />
|
|
54
|
-
</gl-form-group>
|
|
55
|
-
|
|
56
|
-
<gl-form-group id="input-group-3" label="Merge State:" label-for="input-3">
|
|
57
|
-
<gl-form-select id="input-3" v-model="form.mergeState" :options="states" required />
|
|
58
|
-
</gl-form-group>
|
|
59
|
-
|
|
60
|
-
<gl-form-group id="input-group-4">
|
|
61
|
-
<gl-form-checkbox-group id="checkboxes-4" v-model="form.checked">
|
|
62
|
-
<gl-form-checkbox value="squash">Squash Commits</gl-form-checkbox>
|
|
63
|
-
<gl-form-checkbox value="new">Create New Issue</gl-form-checkbox>
|
|
64
|
-
</gl-form-checkbox-group>
|
|
65
|
-
</gl-form-group>
|
|
66
|
-
|
|
67
|
-
<div class="gl-display-flex gl-justify-content-end">
|
|
68
|
-
<gl-button type="reset" variant="secondary" class="gl-mr-3">Cancel</gl-button>
|
|
69
|
-
<gl-button type="submit" variant="success">Submit</gl-button>
|
|
70
|
-
</div>
|
|
71
|
-
</gl-form>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
selected: 'one',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div>
|
|
13
|
-
<gl-form-radio v-model="selected" value="one">One</gl-form-radio>
|
|
14
|
-
<gl-form-radio v-model="selected" value="two">Two</gl-form-radio>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import FormRadioBasic from './form_radio.basic.example.vue';
|
|
2
|
-
import FormRadioCheckedDisabled from './form_radio.checked_disabled.example.vue';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
name: 'Basic',
|
|
7
|
-
items: [
|
|
8
|
-
{
|
|
9
|
-
id: 'form-radio-basic',
|
|
10
|
-
name: 'Basic',
|
|
11
|
-
description: 'Basic GlFormRadio',
|
|
12
|
-
component: FormRadioBasic,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: 'form-radio-checked-disabled',
|
|
16
|
-
name: 'Checked and disabled radio',
|
|
17
|
-
description: 'Checked and disabled GlFormRadio',
|
|
18
|
-
component: FormRadioCheckedDisabled,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
];
|
|
@@ -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
|
-
];
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import BasicExample from './keyset_pagination.basic.example.vue';
|
|
2
|
-
import EventsExample from './keyset_pagination.events.example.vue';
|
|
3
|
-
import I18nExample from './keyset_pagination.internationalization.example.vue';
|
|
4
|
-
import LinksExample from './keyset_pagination.links.example.vue';
|
|
5
|
-
import SlotsExample from './keyset_pagination.slots.example.vue';
|
|
6
|
-
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
name: 'Usage examples',
|
|
10
|
-
items: [
|
|
11
|
-
{
|
|
12
|
-
id: 'keyset-pagination-basic',
|
|
13
|
-
name: 'Basic',
|
|
14
|
-
description: 'Basic Cursor Pagination',
|
|
15
|
-
component: BasicExample,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: 'keyset-pagination-slots',
|
|
19
|
-
name: 'Custom button slots',
|
|
20
|
-
description: 'Custom "Prev" or "Next" button content',
|
|
21
|
-
component: SlotsExample,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: 'keyset-pagination-links',
|
|
25
|
-
name: 'Link buttons',
|
|
26
|
-
description: '"Prev" and "Next" buttons as link buttons',
|
|
27
|
-
component: LinksExample,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'keyset-pagination-events',
|
|
31
|
-
name: 'Button events',
|
|
32
|
-
description: '"prev" and "next" events',
|
|
33
|
-
component: EventsExample,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 'keyset-pagination-i18n',
|
|
37
|
-
name: 'Internationalization',
|
|
38
|
-
description: 'Internationalizing the "Prev" and "Next" button text',
|
|
39
|
-
component: I18nExample,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
/* eslint-disable no-alert */
|
|
3
|
-
export default {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
pageInfo: {
|
|
7
|
-
startCursor:
|
|
8
|
-
'eyJpZCI6IjE3NTg1ODciLCJyZWxlYXNlZF9hdCI6IjIwMjAtMDgtMjAgMTQ6NDc6MDguNTQ1MjE1MDAwIFVUQyJ9',
|
|
9
|
-
endCursor:
|
|
10
|
-
'eyJpZCI6IjEyNjcxNzkiLCJyZWxlYXNlZF9hdCI6IjIwMjAtMDItMTkgMjE6MDA6MDUuODU5NTQ2MDAwIFVUQyJ9',
|
|
11
|
-
hasPreviousPage: true,
|
|
12
|
-
hasNextPage: true,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
methods: {
|
|
17
|
-
onPrev(startCursor) {
|
|
18
|
-
alert(`"prev" event fired with start cursor: "${startCursor}"`);
|
|
19
|
-
},
|
|
20
|
-
onNext(endCursor) {
|
|
21
|
-
alert(`"next" event fired with end cursor: "${endCursor}"`);
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<gl-keyset-pagination v-bind="pageInfo" @prev="onPrev($event)" @next="onNext($event)" />
|
|
29
|
-
</template>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
pageInfo: {
|
|
6
|
-
hasPreviousPage: true,
|
|
7
|
-
hasNextPage: true,
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
methods: {
|
|
12
|
-
// Stub version of our i18n function in GitLab
|
|
13
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
-
__(text) {
|
|
15
|
-
return text;
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<gl-keyset-pagination v-bind="pageInfo" :prev-text="__('Prev')" :next-text="__('Next')" />
|
|
23
|
-
</template>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
pageInfo: {
|
|
6
|
-
hasPreviousPage: true,
|
|
7
|
-
hasNextPage: true,
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<gl-keyset-pagination
|
|
16
|
-
v-bind="pageInfo"
|
|
17
|
-
prev-button-link="https://example.com/prev"
|
|
18
|
-
next-button-link="https://example.com/next"
|
|
19
|
-
/>
|
|
20
|
-
</template>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
pageInfo: {
|
|
6
|
-
hasPreviousPage: true,
|
|
7
|
-
hasNextPage: true,
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<gl-keyset-pagination v-bind="pageInfo">
|
|
16
|
-
<template #previous-button-content>
|
|
17
|
-
<span style="color: hotpink" class="gl-font-weight-bold">๐ฆ แฎแแแแฅแงแฌแ</span>
|
|
18
|
-
</template>
|
|
19
|
-
<template #next-button-content>
|
|
20
|
-
<span style="color: purple" class="gl-font-weight-bold">แแแแ ๐</span>
|
|
21
|
-
</template>
|
|
22
|
-
</gl-keyset-pagination>
|
|
23
|
-
</template>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import ModalBasicExample from './modal.basic.example.vue';
|
|
2
|
-
import ModalDisabledExample from './modal.disabled.example.vue';
|
|
3
|
-
import ModalSizesExample from './modal.sizes.example.vue';
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
{
|
|
7
|
-
name: 'Basic',
|
|
8
|
-
items: [
|
|
9
|
-
{
|
|
10
|
-
id: 'modal-basic',
|
|
11
|
-
name: 'Basic',
|
|
12
|
-
description: 'Basic Modal',
|
|
13
|
-
component: ModalBasicExample,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'Disabled',
|
|
19
|
-
items: [
|
|
20
|
-
{
|
|
21
|
-
id: 'modal-disabled',
|
|
22
|
-
name: 'Disabled',
|
|
23
|
-
description: 'Disabled Modal',
|
|
24
|
-
component: ModalDisabledExample,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'Sizes',
|
|
30
|
-
items: [
|
|
31
|
-
{
|
|
32
|
-
id: 'modal-sizes',
|
|
33
|
-
name: 'Sizes',
|
|
34
|
-
description: 'Modal Sizes',
|
|
35
|
-
component: ModalSizesExample,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
];
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
computed: {
|
|
4
|
-
primaryProps() {
|
|
5
|
-
return {
|
|
6
|
-
text: 'Okay',
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
secondaryProps() {
|
|
10
|
-
return {
|
|
11
|
-
text: 'Secondary',
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
cancelProps() {
|
|
15
|
-
return {
|
|
16
|
-
text: 'Cancel',
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<div>
|
|
25
|
-
<gl-button v-gl-modal-directive="'basic-modal-id'" category="primary" variant="confirm">
|
|
26
|
-
Open modal
|
|
27
|
-
</gl-button>
|
|
28
|
-
<gl-modal
|
|
29
|
-
modal-id="basic-modal-id"
|
|
30
|
-
title="Example title"
|
|
31
|
-
no-fade
|
|
32
|
-
:action-primary="primaryProps"
|
|
33
|
-
:action-secondary="secondaryProps"
|
|
34
|
-
:action-cancel="cancelProps"
|
|
35
|
-
>
|
|
36
|
-
This is my content
|
|
37
|
-
</gl-modal>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
enteredText: '',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
computed: {
|
|
9
|
-
primaryProps() {
|
|
10
|
-
return {
|
|
11
|
-
text: 'Okay',
|
|
12
|
-
attributes: [{ disabled: !this.canSubmit }, { variant: 'confirm' }],
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
secondaryProps() {
|
|
16
|
-
return {
|
|
17
|
-
text: 'Secondary',
|
|
18
|
-
attributes: [{ disabled: !this.canSubmit }, { variant: 'confirm', category: 'secondary' }],
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
cancelProps() {
|
|
22
|
-
return {
|
|
23
|
-
text: 'Cancel',
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
canSubmit() {
|
|
27
|
-
return this.enteredText === 'gitlab';
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
clearInput() {
|
|
32
|
-
this.enteredText = '';
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<template>
|
|
39
|
-
<div>
|
|
40
|
-
<gl-button v-gl-modal-directive="'basic-modal-id'" category="primary" variant="confirm">
|
|
41
|
-
Open modal
|
|
42
|
-
</gl-button>
|
|
43
|
-
<gl-modal
|
|
44
|
-
modal-id="basic-modal-id"
|
|
45
|
-
title="Example title"
|
|
46
|
-
no-fade
|
|
47
|
-
:action-primary="primaryProps"
|
|
48
|
-
:action-secondary="secondaryProps"
|
|
49
|
-
:action-cancel="cancelProps"
|
|
50
|
-
@primary="clearInput"
|
|
51
|
-
@secondary="clearInput"
|
|
52
|
-
@cancel="clearInput"
|
|
53
|
-
>
|
|
54
|
-
<p>Enter "gitlab" to change the button state.</p>
|
|
55
|
-
<input v-model="enteredText" type="text" />
|
|
56
|
-
</gl-modal>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|