@gitlab/ui 37.3.0 → 37.4.2
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 +22 -0
- package/dist/components/base/filtered_search/filtered_search_term.js +6 -1
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +10 -1
- package/dist/components/base/form/form_group/form_group.documentation.js +2 -6
- package/dist/components/base/search_box_by_click/search_box_by_click.documentation.js +2 -80
- package/dist/components/base/search_box_by_click/search_box_by_click.js +60 -1
- package/dist/components/base/search_box_by_type/search_box_by_type.documentation.js +2 -20
- package/dist/components/base/search_box_by_type/search_box_by_type.js +19 -5
- package/dist/directives/hover_load/hover_load.documentation.js +1 -1
- package/dist/directives/resize_observer/resize_observer.documentation.js +2 -5
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/documentation/documented_stories.js +5 -0
- package/package.json +1 -1
- package/src/components/base/button/button.scss +5 -9
- package/src/components/base/filtered_search/filtered_search.spec.js +12 -0
- package/src/components/base/filtered_search/filtered_search_term.spec.js +8 -2
- package/src/components/base/filtered_search/filtered_search_term.vue +6 -0
- package/src/components/base/filtered_search/filtered_search_token_segment.spec.js +46 -37
- package/src/components/base/filtered_search/filtered_search_token_segment.vue +14 -1
- package/src/components/base/form/form_group/form_group.documentation.js +0 -3
- package/src/components/base/form/form_group/form_group.md +0 -2
- package/src/components/base/form/form_group/form_group.stories.js +106 -145
- package/src/components/base/form/form_select/form_select.spec.js +8 -4
- package/src/components/base/search_box_by_click/search_box_by_click.documentation.js +0 -90
- package/src/components/base/search_box_by_click/search_box_by_click.md +0 -2
- package/src/components/base/search_box_by_click/search_box_by_click.stories.js +91 -48
- package/src/components/base/search_box_by_click/search_box_by_click.vue +50 -1
- package/src/components/base/search_box_by_type/search_box_by_type.documentation.js +0 -18
- package/src/components/base/search_box_by_type/search_box_by_type.md +0 -2
- package/src/components/base/search_box_by_type/search_box_by_type.stories.js +49 -43
- package/src/components/base/search_box_by_type/search_box_by_type.vue +16 -6
- package/src/directives/hover_load/hover_load.md +0 -2
- package/src/directives/hover_load/hover_load.stories.js +39 -34
- package/src/directives/resize_observer/resize_observer.documentation.js +0 -2
- package/src/directives/resize_observer/resize_observer.md +0 -6
- package/src/directives/resize_observer/resize_observer.stories.js +70 -51
- package/dist/components/base/form/form_group/examples/form_group/form_group.basic.example.js +0 -38
- package/dist/components/base/form/form_group/examples/form_group/form_group.disabled.example.js +0 -48
- package/dist/components/base/form/form_group/examples/form_group/form_group.textarea.example.js +0 -48
- package/dist/components/base/form/form_group/examples/form_group/form_group.validation.example.js +0 -66
- package/dist/components/base/form/form_group/examples/form_group/index.js +0 -27
- package/dist/components/base/search_box_by_click/examples/index.js +0 -22
- package/dist/components/base/search_box_by_click/examples/search_box_by_click.default.example.js +0 -48
- package/dist/components/base/search_box_by_click/examples/search_box_by_click.history.example.js +0 -51
- package/dist/components/base/search_box_by_click/examples/search_box_by_click.v_model.example.js +0 -54
- package/dist/components/base/search_box_by_type/examples/index.js +0 -17
- package/dist/components/base/search_box_by_type/examples/search_box_by_type.default.example.js +0 -48
- package/dist/components/base/search_box_by_type/examples/search_box_by_type.loading.example.js +0 -65
- package/dist/directives/resize_observer/examples/index.js +0 -12
- package/dist/directives/resize_observer/examples/resize_observer.basic.example.js +0 -62
- package/src/components/base/form/form_group/examples/form_group/form_group.basic.example.vue +0 -11
- package/src/components/base/form/form_group/examples/form_group/form_group.disabled.example.vue +0 -21
- package/src/components/base/form/form_group/examples/form_group/form_group.textarea.example.vue +0 -15
- package/src/components/base/form/form_group/examples/form_group/form_group.validation.example.vue +0 -36
- package/src/components/base/form/form_group/examples/form_group/index.js +0 -32
- package/src/components/base/search_box_by_click/examples/index.js +0 -26
- package/src/components/base/search_box_by_click/examples/search_box_by_click.default.example.vue +0 -14
- package/src/components/base/search_box_by_click/examples/search_box_by_click.history.example.vue +0 -23
- package/src/components/base/search_box_by_click/examples/search_box_by_click.v_model.example.vue +0 -23
- package/src/components/base/search_box_by_type/examples/index.js +0 -20
- package/src/components/base/search_box_by_type/examples/search_box_by_type.default.example.vue +0 -14
- package/src/components/base/search_box_by_type/examples/search_box_by_type.loading.example.vue +0 -34
- package/src/directives/resize_observer/examples/index.js +0 -14
- package/src/directives/resize_observer/examples/resize_observer.basic.example.vue +0 -21
|
@@ -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
|
-
width: 0,
|
|
7
|
-
height: 0
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
methods: {
|
|
12
|
-
handleResize(_ref) {
|
|
13
|
-
let {
|
|
14
|
-
contentRect: {
|
|
15
|
-
width,
|
|
16
|
-
height
|
|
17
|
-
}
|
|
18
|
-
} = _ref;
|
|
19
|
-
this.width = width;
|
|
20
|
-
this.height = height;
|
|
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',{directives:[{name:"gl-resize-observer-directive",rawName:"v-gl-resize-observer-directive",value:(_vm.handleResize),expression:"handleResize"}]},[_c('p',[_vm._v(_vm._s(_vm.width)+" x "+_vm._s(_vm.height))])])};
|
|
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__;
|
package/src/components/base/form/form_group/examples/form_group/form_group.disabled.example.vue
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
computed: {
|
|
4
|
-
disabled() {
|
|
5
|
-
return true;
|
|
6
|
-
},
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<gl-form-group
|
|
13
|
-
id="group-id"
|
|
14
|
-
label="Label Name"
|
|
15
|
-
label-size="sm"
|
|
16
|
-
description="This feature is disabled"
|
|
17
|
-
label-for="input1"
|
|
18
|
-
>
|
|
19
|
-
<gl-form-input id="input1" type="text" :disabled="disabled" value="Disabled" />
|
|
20
|
-
</gl-form-group>
|
|
21
|
-
</template>
|
package/src/components/base/form/form_group/examples/form_group/form_group.textarea.example.vue
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
text: '',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<gl-form-group id="group-id-textarea1" label="Label Name" label-for="textarea1">
|
|
13
|
-
<gl-form-textarea id="textarea1" v-model="text" placeholder="Enter something" />
|
|
14
|
-
</gl-form-group>
|
|
15
|
-
</template>
|
package/src/components/base/form/form_group/examples/form_group/form_group.validation.example.vue
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
name: '',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
computed: {
|
|
9
|
-
state() {
|
|
10
|
-
return this.name.length >= 4;
|
|
11
|
-
},
|
|
12
|
-
invalidFeedback() {
|
|
13
|
-
let feedbackText = 'This field is required.';
|
|
14
|
-
|
|
15
|
-
if (this.name.length > 4) {
|
|
16
|
-
feedbackText = '';
|
|
17
|
-
} else if (this.name.length > 0) {
|
|
18
|
-
feedbackText = 'Enter at least 4 characters.';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return feedbackText;
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
<template>
|
|
27
|
-
<gl-form-group
|
|
28
|
-
label="Name"
|
|
29
|
-
description="Enter a first and last name."
|
|
30
|
-
:invalid-feedback="invalidFeedback"
|
|
31
|
-
:state="state"
|
|
32
|
-
label-for="input1"
|
|
33
|
-
>
|
|
34
|
-
<gl-form-input id="input1" v-model.trim="name" :state="state" />
|
|
35
|
-
</gl-form-group>
|
|
36
|
-
</template>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import FormGroupBasicExample from './form_group.basic.example.vue';
|
|
2
|
-
import FormGroupDisabledExample from './form_group.disabled.example.vue';
|
|
3
|
-
import FormGroupTextareaExample from './form_group.textarea.example.vue';
|
|
4
|
-
import FormGroupValidationExample from './form_group.validation.example.vue';
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
{
|
|
8
|
-
name: 'Form Group',
|
|
9
|
-
items: [
|
|
10
|
-
{
|
|
11
|
-
id: 'form-group',
|
|
12
|
-
name: 'basic example',
|
|
13
|
-
component: FormGroupBasicExample,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 'form-group-validations',
|
|
17
|
-
name: 'with validations',
|
|
18
|
-
component: FormGroupValidationExample,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'form-group-disabled',
|
|
22
|
-
name: 'disabled',
|
|
23
|
-
component: FormGroupDisabledExample,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 'form-group-textarea',
|
|
27
|
-
name: 'textarea',
|
|
28
|
-
component: FormGroupTextareaExample,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import SearchBoxByClickDefaultExample from './search_box_by_click.default.example.vue';
|
|
2
|
-
import SearchBoxByClickHistoryExample from './search_box_by_click.history.example.vue';
|
|
3
|
-
import SearchBoxByClickVModelExample from './search_box_by_click.v_model.example.vue';
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
{
|
|
7
|
-
name: 'Search Box By Click',
|
|
8
|
-
items: [
|
|
9
|
-
{
|
|
10
|
-
id: 'search-box-by-click',
|
|
11
|
-
name: 'default',
|
|
12
|
-
component: SearchBoxByClickDefaultExample,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: 'search-box-by-click-v-model',
|
|
16
|
-
name: 'Using v-model',
|
|
17
|
-
component: SearchBoxByClickVModelExample,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: 'search-box-by-click-with-history',
|
|
21
|
-
name: 'with history',
|
|
22
|
-
component: SearchBoxByClickHistoryExample,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
];
|
package/src/components/base/search_box_by_click/examples/search_box_by_click.history.example.vue
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
value: '',
|
|
6
|
-
history: ['author:@admin', 'assignee:@admin milestone:%12.5', 'label:~test'],
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
</script>
|
|
11
|
-
<template>
|
|
12
|
-
<div id="tooltipcontainer">
|
|
13
|
-
<gl-search-box-by-click
|
|
14
|
-
v-model="value"
|
|
15
|
-
:history-items="history"
|
|
16
|
-
tooltip-container="#tooltipcontainer"
|
|
17
|
-
>
|
|
18
|
-
<template #history-item="{ historyItem }">
|
|
19
|
-
{{ historyItem }}
|
|
20
|
-
</template>
|
|
21
|
-
</gl-search-box-by-click>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
package/src/components/base/search_box_by_click/examples/search_box_by_click.v_model.example.vue
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
text: '',
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
methods: {
|
|
9
|
-
setText() {
|
|
10
|
-
this.text = 'Something else';
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div id="tooltipcontainer">
|
|
18
|
-
<gl-search-box-by-click v-model="text" tooltip-container="#tooltipcontainer" />
|
|
19
|
-
<gl-button class="gl-mt-4" @click="setText"
|
|
20
|
-
>Click here to set text to "Something else" using v-model</gl-button
|
|
21
|
-
>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import SearchBoxByTypeDefaultExample from './search_box_by_type.default.example.vue';
|
|
2
|
-
import SearchBoxByTypeLoadingExample from './search_box_by_type.loading.example.vue';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
name: 'Search Box By Type',
|
|
7
|
-
items: [
|
|
8
|
-
{
|
|
9
|
-
id: 'search-box-by-type',
|
|
10
|
-
name: 'default',
|
|
11
|
-
component: SearchBoxByTypeDefaultExample,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
id: 'search-box-by-type-loading',
|
|
15
|
-
name: 'loading',
|
|
16
|
-
component: SearchBoxByTypeLoadingExample,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
];
|
package/src/components/base/search_box_by_type/examples/search_box_by_type.loading.example.vue
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
value: '',
|
|
6
|
-
isLoading: false,
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
watch: {
|
|
10
|
-
value(newValue) {
|
|
11
|
-
if (newValue) {
|
|
12
|
-
clearTimeout(this.loader);
|
|
13
|
-
this.isLoading = true;
|
|
14
|
-
this.loader = setTimeout(() => {
|
|
15
|
-
this.isLoading = false;
|
|
16
|
-
}, 2000);
|
|
17
|
-
} else if (this.loader) {
|
|
18
|
-
this.isLoading = false;
|
|
19
|
-
clearTimeout(this.loader);
|
|
20
|
-
this.loader = null;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
</script>
|
|
26
|
-
<template>
|
|
27
|
-
<div id="tooltipcontainer">
|
|
28
|
-
<gl-search-box-by-type
|
|
29
|
-
v-model="value"
|
|
30
|
-
:is-loading="isLoading"
|
|
31
|
-
tooltip-container="#tooltipcontainer"
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import BasicExample from './resize_observer.basic.example.vue';
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
name: 'ResizeObserver directive',
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
id: 'resize-observer-directive-example',
|
|
9
|
-
name: 'ResizeObserver directive example',
|
|
10
|
-
component: BasicExample,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
width: 0,
|
|
6
|
-
height: 0,
|
|
7
|
-
};
|
|
8
|
-
},
|
|
9
|
-
methods: {
|
|
10
|
-
handleResize({ contentRect: { width, height } }) {
|
|
11
|
-
this.width = width;
|
|
12
|
-
this.height = height;
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
<template>
|
|
18
|
-
<div v-gl-resize-observer-directive="handleResize">
|
|
19
|
-
<p>{{ width }} x {{ height }}</p>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|