@gitlab/ui 32.48.0 → 32.51.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 +28 -0
- 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/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 +5 -0
- package/package.json +5 -3
- 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_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/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_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/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
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
enteredText: ''
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
computed: {
|
|
11
|
-
primaryProps() {
|
|
12
|
-
return {
|
|
13
|
-
text: 'Okay',
|
|
14
|
-
attributes: [{
|
|
15
|
-
disabled: !this.canSubmit
|
|
16
|
-
}, {
|
|
17
|
-
variant: 'confirm'
|
|
18
|
-
}]
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
secondaryProps() {
|
|
23
|
-
return {
|
|
24
|
-
text: 'Secondary',
|
|
25
|
-
attributes: [{
|
|
26
|
-
disabled: !this.canSubmit
|
|
27
|
-
}, {
|
|
28
|
-
variant: 'confirm',
|
|
29
|
-
category: 'secondary'
|
|
30
|
-
}]
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
cancelProps() {
|
|
35
|
-
return {
|
|
36
|
-
text: 'Cancel'
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
canSubmit() {
|
|
41
|
-
return this.enteredText === 'gitlab';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
clearInput() {
|
|
47
|
-
this.enteredText = '';
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/* script */
|
|
54
|
-
const __vue_script__ = script;
|
|
55
|
-
|
|
56
|
-
/* template */
|
|
57
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-button',{directives:[{name:"gl-modal-directive",rawName:"v-gl-modal-directive",value:('basic-modal-id'),expression:"'basic-modal-id'"}],attrs:{"category":"primary","variant":"confirm"}},[_vm._v("\n Open modal\n ")]),_vm._v(" "),_c('gl-modal',{attrs:{"modal-id":"basic-modal-id","title":"Example title","no-fade":"","action-primary":_vm.primaryProps,"action-secondary":_vm.secondaryProps,"action-cancel":_vm.cancelProps},on:{"primary":_vm.clearInput,"secondary":_vm.clearInput,"cancel":_vm.clearInput}},[_c('p',[_vm._v("Enter \"gitlab\" to change the button state.")]),_vm._v(" "),_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.enteredText),expression:"enteredText"}],attrs:{"type":"text"},domProps:{"value":(_vm.enteredText)},on:{"input":function($event){if($event.target.composing){ return; }_vm.enteredText=$event.target.value;}}})])],1)};
|
|
58
|
-
var __vue_staticRenderFns__ = [];
|
|
59
|
-
|
|
60
|
-
/* style */
|
|
61
|
-
const __vue_inject_styles__ = undefined;
|
|
62
|
-
/* scoped */
|
|
63
|
-
const __vue_scope_id__ = undefined;
|
|
64
|
-
/* module identifier */
|
|
65
|
-
const __vue_module_identifier__ = undefined;
|
|
66
|
-
/* functional template */
|
|
67
|
-
const __vue_is_functional_template__ = false;
|
|
68
|
-
/* style inject */
|
|
69
|
-
|
|
70
|
-
/* style inject SSR */
|
|
71
|
-
|
|
72
|
-
/* style inject shadow dom */
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const __vue_component__ = __vue_normalize__(
|
|
77
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
78
|
-
__vue_inject_styles__,
|
|
79
|
-
__vue_script__,
|
|
80
|
-
__vue_scope_id__,
|
|
81
|
-
__vue_is_functional_template__,
|
|
82
|
-
__vue_module_identifier__,
|
|
83
|
-
false,
|
|
84
|
-
undefined,
|
|
85
|
-
undefined,
|
|
86
|
-
undefined
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
export default __vue_component__;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
computed: {
|
|
5
|
-
primaryProps() {
|
|
6
|
-
return {
|
|
7
|
-
text: 'Okay'
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
secondaryProps() {
|
|
12
|
-
return {
|
|
13
|
-
text: 'Secondary'
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
cancelProps() {
|
|
18
|
-
return {
|
|
19
|
-
text: 'Cancel'
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/* script */
|
|
27
|
-
const __vue_script__ = script;
|
|
28
|
-
|
|
29
|
-
/* template */
|
|
30
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-button',{directives:[{name:"gl-modal-directive",rawName:"v-gl-modal-directive",value:('small-modal-id'),expression:"'small-modal-id'"}],attrs:{"variant":"confirm"}},[_vm._v("Small Modal")]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-modal-directive",rawName:"v-gl-modal-directive",value:('medium-modal-id'),expression:"'medium-modal-id'"}],attrs:{"variant":"confirm"}},[_vm._v("Default Modal")]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-modal-directive",rawName:"v-gl-modal-directive",value:('large-modal-id'),expression:"'large-modal-id'"}],attrs:{"variant":"confirm"}},[_vm._v("Large Modal")]),_vm._v(" "),_c('gl-modal',{attrs:{"modal-id":"small-modal-id","title":"Example title","no-fade":"","action-primary":_vm.primaryProps,"action-secondary":_vm.secondaryProps,"action-cancel":_vm.cancelProps,"size":"sm"}},[_c('p',[_vm._v("Small modal: 512px")])]),_vm._v(" "),_c('gl-modal',{attrs:{"modal-id":"medium-modal-id","title":"Example title","no-fade":"","action-primary":_vm.primaryProps,"action-secondary":_vm.secondaryProps,"action-cancel":_vm.cancelProps}},[_c('p',[_vm._v("Medium modal: 768px (default)")])]),_vm._v(" "),_c('gl-modal',{attrs:{"modal-id":"large-modal-id","title":"Example title","no-fade":"","action-primary":_vm.primaryProps,"action-secondary":_vm.secondaryProps,"action-cancel":_vm.cancelProps,"size":"lg"}},[_c('p',[_vm._v("Large modal: 990px")])])],1)};
|
|
31
|
-
var __vue_staticRenderFns__ = [];
|
|
32
|
-
|
|
33
|
-
/* style */
|
|
34
|
-
const __vue_inject_styles__ = undefined;
|
|
35
|
-
/* scoped */
|
|
36
|
-
const __vue_scope_id__ = undefined;
|
|
37
|
-
/* module identifier */
|
|
38
|
-
const __vue_module_identifier__ = undefined;
|
|
39
|
-
/* functional template */
|
|
40
|
-
const __vue_is_functional_template__ = false;
|
|
41
|
-
/* style inject */
|
|
42
|
-
|
|
43
|
-
/* style inject SSR */
|
|
44
|
-
|
|
45
|
-
/* style inject shadow dom */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const __vue_component__ = __vue_normalize__(
|
|
50
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
51
|
-
__vue_inject_styles__,
|
|
52
|
-
__vue_script__,
|
|
53
|
-
__vue_scope_id__,
|
|
54
|
-
__vue_is_functional_template__,
|
|
55
|
-
__vue_module_identifier__,
|
|
56
|
-
false,
|
|
57
|
-
undefined,
|
|
58
|
-
undefined,
|
|
59
|
-
undefined
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
export default __vue_component__;
|
|
@@ -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>
|