@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
|
@@ -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();
|
|
@@ -139,6 +155,10 @@ export default {
|
|
|
139
155
|
</script>
|
|
140
156
|
|
|
141
157
|
<template>
|
|
158
|
+
<!--
|
|
159
|
+
Emitted when the modal visibility changes
|
|
160
|
+
@event change
|
|
161
|
+
-->
|
|
142
162
|
<b-modal
|
|
143
163
|
:id="modalId"
|
|
144
164
|
ref="modal"
|
|
@@ -154,45 +174,66 @@ export default {
|
|
|
154
174
|
@cancel="canceled"
|
|
155
175
|
@change="$emit('change', $event)"
|
|
156
176
|
>
|
|
157
|
-
<
|
|
177
|
+
<template #default>
|
|
178
|
+
<slot name="default"></slot>
|
|
179
|
+
</template>
|
|
158
180
|
<template #modal-header>
|
|
181
|
+
<!-- @slot Entire modal header container contents (including the close button on the top right corner) -->
|
|
159
182
|
<slot name="modal-header">
|
|
160
183
|
<h4 class="modal-title">
|
|
184
|
+
<!-- @slot Modal title. If modal-header slot is used, this slot will not be shown. -->
|
|
161
185
|
<slot name="modal-title">{{ title }}</slot>
|
|
162
186
|
</h4>
|
|
163
187
|
</slot>
|
|
188
|
+
<!-- @slot Content of Modal header close button. If modal-header slot is used, this slot will not be shown. -->
|
|
164
189
|
<close-button ref="close-button" :label="dismissLabel" @click="close" />
|
|
165
190
|
</template>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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>
|
|
197
|
+
<!-- @slot Populated via props: modal-action-primary, modal-action-cancel and modal-action-secondary. -->
|
|
198
|
+
<template v-if="shouldRenderModalFooter" #modal-footer>
|
|
199
|
+
<slot name="modal-footer">
|
|
200
|
+
<!--
|
|
201
|
+
Emitted when clicked on modal-action-cancel
|
|
202
|
+
@event canceled
|
|
203
|
+
-->
|
|
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
|
+
<!--
|
|
213
|
+
Emitted when clicked on modal-action-secondary
|
|
214
|
+
@event secondary
|
|
215
|
+
-->
|
|
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
|
+
<!--
|
|
225
|
+
Emitted when clicked on modal-action-primary
|
|
226
|
+
@event primary
|
|
227
|
+
-->
|
|
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>
|
|
197
238
|
</b-modal>
|
|
198
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,3 +1,5 @@
|
|
|
1
|
+
import emojiRegexFactory from 'emoji-regex';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Split the given string after each occurrence of each of the given symbols.
|
|
3
5
|
*
|
|
@@ -60,10 +62,12 @@ export const splitAfterSymbols = (symbols, string) => {
|
|
|
60
62
|
return textParts;
|
|
61
63
|
};
|
|
62
64
|
|
|
65
|
+
const startsWithEmojiRegex = `^(${emojiRegexFactory().source})`;
|
|
66
|
+
|
|
63
67
|
export const getAvatarChar = (name) => {
|
|
64
68
|
if (name) {
|
|
65
|
-
// Check if
|
|
66
|
-
const match = name.match(
|
|
69
|
+
// Check if string starts with an emoji (which could be multiple characters and zero-width joined)
|
|
70
|
+
const match = name.match(startsWithEmojiRegex);
|
|
67
71
|
if (match) {
|
|
68
72
|
// Return the first match
|
|
69
73
|
return match[0];
|
|
@@ -44,5 +44,13 @@ describe('string utils', () => {
|
|
|
44
44
|
it('Returns first character if emoji is not first in name', () => {
|
|
45
45
|
expect(getAvatarChar('tanuki🦊')).toBe('T');
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
it('Returns zero-width joined emoji if the name starts with it', () => {
|
|
49
|
+
expect(getAvatarChar('🏴☠️Zero-width join')).toBe('🏴☠️');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('Returns only first emoji if the name starts with multiple', () => {
|
|
53
|
+
expect(getAvatarChar('🏴☠️🙂Multiple Emoji')).toBe('🏴☠️');
|
|
54
|
+
});
|
|
47
55
|
});
|
|
48
56
|
});
|
|
@@ -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__;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
originalName: 'First last',
|
|
7
|
-
name: 'First last',
|
|
8
|
-
submitDisabled: false
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
computed: {
|
|
13
|
-
formClean() {
|
|
14
|
-
return this.name === this.originalName;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
methods: {
|
|
19
|
-
onSubmit(evt) {
|
|
20
|
-
evt.preventDefault();
|
|
21
|
-
this.submitDisabled = true;
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
this.submitDisabled = true;
|
|
24
|
-
}, 1000);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/* script */
|
|
31
|
-
const __vue_script__ = script;
|
|
32
|
-
|
|
33
|
-
/* template */
|
|
34
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form',{on:{"submit":_vm.onSubmit}},[_c('gl-form-group',{attrs:{"label":"Name"}},[_c('gl-form-input',{attrs:{"type":"text","required":""},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v;},expression:"name"}})],1),_vm._v(" "),_c('gl-button',{attrs:{"disabled":_vm.formClean || _vm.submitDisabled,"type":"submit","variant":"success"}},[_vm._v("Submit")])],1)};
|
|
35
|
-
var __vue_staticRenderFns__ = [];
|
|
36
|
-
|
|
37
|
-
/* style */
|
|
38
|
-
const __vue_inject_styles__ = undefined;
|
|
39
|
-
/* scoped */
|
|
40
|
-
const __vue_scope_id__ = undefined;
|
|
41
|
-
/* module identifier */
|
|
42
|
-
const __vue_module_identifier__ = undefined;
|
|
43
|
-
/* functional template */
|
|
44
|
-
const __vue_is_functional_template__ = false;
|
|
45
|
-
/* style inject */
|
|
46
|
-
|
|
47
|
-
/* style inject SSR */
|
|
48
|
-
|
|
49
|
-
/* style inject shadow dom */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const __vue_component__ = __vue_normalize__(
|
|
54
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
55
|
-
__vue_inject_styles__,
|
|
56
|
-
__vue_script__,
|
|
57
|
-
__vue_scope_id__,
|
|
58
|
-
__vue_is_functional_template__,
|
|
59
|
-
__vue_module_identifier__,
|
|
60
|
-
false,
|
|
61
|
-
undefined,
|
|
62
|
-
undefined,
|
|
63
|
-
undefined
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
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
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
name: {
|
|
7
|
-
first: '',
|
|
8
|
-
last: '',
|
|
9
|
-
submitDisabled: false
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
methods: {
|
|
15
|
-
onSubmit(evt) {
|
|
16
|
-
evt.preventDefault();
|
|
17
|
-
this.submitDisabled = true;
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
this.submitDisabled = false;
|
|
20
|
-
}, 1000);
|
|
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('gl-form',{attrs:{"inline":""},on:{"submit":_vm.onSubmit}},[_c('label',{staticClass:"gl-mr-3",attrs:{"for":"input-name"}},[_vm._v("First name")]),_vm._v(" "),_c('gl-form-input',{staticClass:"ml-1",attrs:{"name":"input-name","type":"text","required":""},model:{value:(_vm.name.first),callback:function ($$v) {_vm.$set(_vm.name, "first", $$v);},expression:"name.first"}}),_vm._v(" "),_c('label',{staticClass:"gl-mx-3",attrs:{"for":"input-surname"}},[_vm._v("Surname")]),_vm._v(" "),_c('gl-form-input',{staticClass:"ml-1",attrs:{"name":"input-surname","type":"text","required":""},model:{value:(_vm.name.last),callback:function ($$v) {_vm.$set(_vm.name, "last", $$v);},expression:"name.last"}}),_vm._v(" "),_c('gl-button',{staticClass:"gl-ml-3",attrs:{"small":"","disabled":_vm.submitDisabled,"type":"submit","variant":"success"}},[_vm._v("Save")])],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,61 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
name: '',
|
|
7
|
-
errorText: ''
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
methods: {
|
|
12
|
-
onSubmit(evt) {
|
|
13
|
-
evt.preventDefault();
|
|
14
|
-
|
|
15
|
-
if (this.name === '') {
|
|
16
|
-
this.errorText = 'Please enter your name';
|
|
17
|
-
} else {
|
|
18
|
-
this.errorText = '';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/* script */
|
|
26
|
-
const __vue_script__ = script;
|
|
27
|
-
|
|
28
|
-
/* template */
|
|
29
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form',{attrs:{"novalidate":""},on:{"submit":_vm.onSubmit}},[_c('gl-form-group',{attrs:{"label":"Name"}},[_c('gl-form-input',{attrs:{"type":"text","required":""},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v;},expression:"name"}})],1),_vm._v(" "),_c('p',{staticClass:"text-danger"},[_vm._v(_vm._s(_vm.errorText))]),_vm._v(" "),_c('gl-button',{attrs:{"type":"submit","variant":"success"}},[_vm._v("Submit")])],1)};
|
|
30
|
-
var __vue_staticRenderFns__ = [];
|
|
31
|
-
|
|
32
|
-
/* style */
|
|
33
|
-
const __vue_inject_styles__ = undefined;
|
|
34
|
-
/* scoped */
|
|
35
|
-
const __vue_scope_id__ = undefined;
|
|
36
|
-
/* module identifier */
|
|
37
|
-
const __vue_module_identifier__ = undefined;
|
|
38
|
-
/* functional template */
|
|
39
|
-
const __vue_is_functional_template__ = false;
|
|
40
|
-
/* style inject */
|
|
41
|
-
|
|
42
|
-
/* style inject SSR */
|
|
43
|
-
|
|
44
|
-
/* style inject shadow dom */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const __vue_component__ = __vue_normalize__(
|
|
49
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
50
|
-
__vue_inject_styles__,
|
|
51
|
-
__vue_script__,
|
|
52
|
-
__vue_scope_id__,
|
|
53
|
-
__vue_is_functional_template__,
|
|
54
|
-
__vue_module_identifier__,
|
|
55
|
-
false,
|
|
56
|
-
undefined,
|
|
57
|
-
undefined,
|
|
58
|
-
undefined
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
export default __vue_component__;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import FormExample from './form.basic.example';
|
|
2
|
-
import EditFormExample from './form.edit.example';
|
|
3
|
-
import InlineFormExample from './form.inline.example';
|
|
4
|
-
import NoValidateFormExample from './form.novalidate.example';
|
|
5
|
-
|
|
6
|
-
var index = [{
|
|
7
|
-
name: 'Form',
|
|
8
|
-
items: [{
|
|
9
|
-
id: 'form-basic',
|
|
10
|
-
name: 'Form in the default state',
|
|
11
|
-
component: FormExample
|
|
12
|
-
}, {
|
|
13
|
-
id: 'form-inline',
|
|
14
|
-
name: 'Form in the inline state',
|
|
15
|
-
component: InlineFormExample
|
|
16
|
-
}, {
|
|
17
|
-
id: 'form-edit',
|
|
18
|
-
name: 'Form with existing data',
|
|
19
|
-
component: EditFormExample
|
|
20
|
-
}, {
|
|
21
|
-
id: 'form-novalidate',
|
|
22
|
-
name: 'Form with HTML validation disabled',
|
|
23
|
-
component: NoValidateFormExample
|
|
24
|
-
}]
|
|
25
|
-
}];
|
|
26
|
-
|
|
27
|
-
export default index;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
selected: 'one'
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/* script */
|
|
13
|
-
const __vue_script__ = script;
|
|
14
|
-
|
|
15
|
-
/* template */
|
|
16
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-form-radio',{attrs:{"value":"one"},model:{value:(_vm.selected),callback:function ($$v) {_vm.selected=$$v;},expression:"selected"}},[_vm._v("One")]),_vm._v(" "),_c('gl-form-radio',{attrs:{"value":"two"},model:{value:(_vm.selected),callback:function ($$v) {_vm.selected=$$v;},expression:"selected"}},[_vm._v("Two")])],1)};
|
|
17
|
-
var __vue_staticRenderFns__ = [];
|
|
18
|
-
|
|
19
|
-
/* style */
|
|
20
|
-
const __vue_inject_styles__ = undefined;
|
|
21
|
-
/* scoped */
|
|
22
|
-
const __vue_scope_id__ = undefined;
|
|
23
|
-
/* module identifier */
|
|
24
|
-
const __vue_module_identifier__ = undefined;
|
|
25
|
-
/* functional template */
|
|
26
|
-
const __vue_is_functional_template__ = false;
|
|
27
|
-
/* style inject */
|
|
28
|
-
|
|
29
|
-
/* style inject SSR */
|
|
30
|
-
|
|
31
|
-
/* style inject shadow dom */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const __vue_component__ = __vue_normalize__(
|
|
36
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
37
|
-
__vue_inject_styles__,
|
|
38
|
-
__vue_script__,
|
|
39
|
-
__vue_scope_id__,
|
|
40
|
-
__vue_is_functional_template__,
|
|
41
|
-
__vue_module_identifier__,
|
|
42
|
-
false,
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
|
-
undefined
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
export default __vue_component__;
|
package/dist/components/base/form/form_radio/examples/form_radio.checked_disabled.example.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
-
|
|
3
|
-
var script = {
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
checked: 'foo'
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/* script */
|
|
13
|
-
const __vue_script__ = script;
|
|
14
|
-
|
|
15
|
-
/* template */
|
|
16
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-radio',{attrs:{"value":"foo","disabled":""},model:{value:(_vm.checked),callback:function ($$v) {_vm.checked=$$v;},expression:"checked"}},[_vm._v("Disabled and checked")])};
|
|
17
|
-
var __vue_staticRenderFns__ = [];
|
|
18
|
-
|
|
19
|
-
/* style */
|
|
20
|
-
const __vue_inject_styles__ = undefined;
|
|
21
|
-
/* scoped */
|
|
22
|
-
const __vue_scope_id__ = undefined;
|
|
23
|
-
/* module identifier */
|
|
24
|
-
const __vue_module_identifier__ = undefined;
|
|
25
|
-
/* functional template */
|
|
26
|
-
const __vue_is_functional_template__ = false;
|
|
27
|
-
/* style inject */
|
|
28
|
-
|
|
29
|
-
/* style inject SSR */
|
|
30
|
-
|
|
31
|
-
/* style inject shadow dom */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const __vue_component__ = __vue_normalize__(
|
|
36
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
37
|
-
__vue_inject_styles__,
|
|
38
|
-
__vue_script__,
|
|
39
|
-
__vue_scope_id__,
|
|
40
|
-
__vue_is_functional_template__,
|
|
41
|
-
__vue_module_identifier__,
|
|
42
|
-
false,
|
|
43
|
-
undefined,
|
|
44
|
-
undefined,
|
|
45
|
-
undefined
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
export default __vue_component__;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import FormRadioBasic from './form_radio.basic.example';
|
|
2
|
-
import FormRadioCheckedDisabled from './form_radio.checked_disabled.example';
|
|
3
|
-
|
|
4
|
-
var index = [{
|
|
5
|
-
name: 'Basic',
|
|
6
|
-
items: [{
|
|
7
|
-
id: 'form-radio-basic',
|
|
8
|
-
name: 'Basic',
|
|
9
|
-
description: 'Basic GlFormRadio',
|
|
10
|
-
component: FormRadioBasic
|
|
11
|
-
}, {
|
|
12
|
-
id: 'form-radio-checked-disabled',
|
|
13
|
-
name: 'Checked and disabled radio',
|
|
14
|
-
description: 'Checked and disabled GlFormRadio',
|
|
15
|
-
component: FormRadioCheckedDisabled
|
|
16
|
-
}]
|
|
17
|
-
}];
|
|
18
|
-
|
|
19
|
-
export default index;
|