@gitlab/ui 32.43.3 → 32.44.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 +7 -0
- package/dist/components/base/avatar/avatar.documentation.js +2 -5
- package/dist/components/base/avatar_link/avatar_link.documentation.js +2 -5
- package/dist/components/base/form/form_input/form_input.documentation.js +2 -27
- package/dist/components/base/form/form_input/form_input.js +23 -6
- package/dist/components/base/form/form_text/form_text.documentation.js +1 -4
- package/dist/components/base/pagination/pagination.documentation.js +2 -85
- package/dist/components/base/pagination/pagination.js +76 -0
- package/dist/components/base/segmented_control/segmented_control.documentation.js +2 -14
- package/dist/components/base/segmented_control/segmented_control.js +6 -0
- package/documentation/documented_stories.js +5 -0
- package/package.json +11 -10
- package/src/components/base/alert/alert.spec.js +2 -2
- package/src/components/base/avatar/avatar.documentation.js +0 -2
- package/src/components/base/avatar/avatar.md +0 -2
- package/src/components/base/avatar/avatar.spec.js +1 -2
- package/src/components/base/avatar/avatar.stories.js +88 -101
- package/src/components/base/avatar_link/avatar_link.documentation.js +0 -2
- package/src/components/base/avatar_link/avatar_link.md +4 -7
- package/src/components/base/avatar_link/avatar_link.stories.js +66 -54
- package/src/components/base/filtered_search/filtered_search.spec.js +35 -35
- package/src/components/base/filtered_search/filtered_search_term.spec.js +1 -1
- package/src/components/base/form/form_input/form_input.documentation.js +0 -31
- package/src/components/base/form/form_input/form_input.md +0 -2
- package/src/components/base/form/form_input/form_input.stories.js +50 -42
- package/src/components/base/form/form_input/form_input.vue +23 -6
- package/src/components/base/form/form_input_group/form_input_group.spec.js +1 -3
- package/src/components/base/form/form_text/form_text.documentation.js +0 -2
- package/src/components/base/form/form_text/form_text.md +1 -3
- package/src/components/base/form/form_text/form_text.stories.js +20 -8
- package/src/components/base/icon/icon.spec.js +1 -4
- package/src/components/base/infinite_scroll/infinite_scroll.spec.js +1 -4
- package/src/components/base/modal/modal.spec.js +19 -23
- package/src/components/base/paginated_list/__snapshots__/paginated_list.spec.js.snap +10 -10
- package/src/components/base/pagination/pagination.documentation.js +0 -100
- package/src/components/base/pagination/pagination.md +5 -9
- package/src/components/base/pagination/pagination.spec.js +1 -4
- package/src/components/base/pagination/pagination.stories.js +109 -117
- package/src/components/base/pagination/pagination.vue +85 -0
- package/src/components/base/search_box_by_click/search_box_by_click.spec.js +1 -5
- package/src/components/base/segmented_control/segmented_control.documentation.js +0 -15
- package/src/components/base/segmented_control/segmented_control.md +0 -2
- package/src/components/base/segmented_control/segmented_control.stories.js +46 -36
- package/src/components/base/segmented_control/segmented_control.vue +5 -0
- package/src/components/base/sorting/sorting.spec.js +1 -4
- package/src/components/base/toast/toast.spec.js +4 -6
- package/src/components/base/token/token.spec.js +1 -4
- package/src/components/base/token_selector/token_container.spec.js +2 -3
- package/src/components/charts/gauge/gauge.spec.js +7 -7
- package/src/components/charts/sparkline/sparkline.spec.js +1 -4
- package/src/components/utilities/friendly_wrap/friendly_wrap.spec.js +1 -4
- package/src/components/utilities/intersperse/intersperse.spec.js +1 -4
- package/src/directives/hover_load/hover_load.spec.js +2 -13
- package/src/directives/outside/outside.spec.js +1 -6
- package/src/directives/resize_observer/resize_observer.spec.js +4 -10
- package/src/scss/storybook.scss +8 -0
- package/dist/components/base/avatar/examples/avatar.fallback.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.image.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.rect.example.js +0 -38
- package/dist/components/base/avatar/examples/avatar.tooltip.example.js +0 -38
- package/dist/components/base/avatar/examples/index.js +0 -31
- package/dist/components/base/avatar_link/examples/avatar.link.example.js +0 -38
- package/dist/components/base/avatar_link/examples/index.js +0 -13
- package/dist/components/base/form/form_input/examples/form_input/form_input.text.example.js +0 -38
- package/dist/components/base/form/form_input/examples/form_input/form_input.text_disabled.example.js +0 -38
- package/dist/components/base/form/form_input/examples/form_input/form_input.text_reactive.example.js +0 -57
- package/dist/components/base/form/form_input/examples/form_input/index.js +0 -22
- package/dist/components/base/form/form_text/examples/form_text.basic.example.js +0 -38
- package/dist/components/base/form/form_text/examples/index.js +0 -13
- package/dist/components/base/pagination/examples/index.js +0 -37
- package/dist/components/base/pagination/examples/pagination.basic.example.js +0 -45
- package/dist/components/base/pagination/examples/pagination.compact.example.js +0 -58
- package/dist/components/base/pagination/examples/pagination.double_truncation.example.js +0 -45
- package/dist/components/base/pagination/examples/pagination.event.example.js +0 -51
- package/dist/components/base/pagination/examples/pagination.links.example.js +0 -45
- package/dist/components/base/segmented_control/examples/index.js +0 -19
- package/dist/components/base/segmented_control/examples/segmented_control.basic.example.js +0 -65
- package/dist/components/base/segmented_control/examples/segmented_control.whitespace.example.js +0 -55
- package/src/components/base/avatar/examples/avatar.fallback.example.vue +0 -3
- package/src/components/base/avatar/examples/avatar.image.example.vue +0 -3
- package/src/components/base/avatar/examples/avatar.rect.example.vue +0 -6
- package/src/components/base/avatar/examples/avatar.tooltip.example.vue +0 -3
- package/src/components/base/avatar/examples/index.js +0 -36
- package/src/components/base/avatar_link/examples/avatar.link.example.vue +0 -5
- package/src/components/base/avatar_link/examples/index.js +0 -15
- package/src/components/base/form/form_input/examples/form_input/form_input.text.example.vue +0 -3
- package/src/components/base/form/form_input/examples/form_input/form_input.text_disabled.example.vue +0 -3
- package/src/components/base/form/form_input/examples/form_input/form_input.text_reactive.example.vue +0 -24
- package/src/components/base/form/form_input/examples/form_input/index.js +0 -26
- package/src/components/base/form/form_text/examples/form_text.basic.example.vue +0 -5
- package/src/components/base/form/form_text/examples/index.js +0 -15
- package/src/components/base/pagination/examples/index.js +0 -43
- package/src/components/base/pagination/examples/pagination.basic.example.vue +0 -17
- package/src/components/base/pagination/examples/pagination.compact.example.vue +0 -33
- package/src/components/base/pagination/examples/pagination.double_truncation.example.vue +0 -11
- package/src/components/base/pagination/examples/pagination.event.example.vue +0 -26
- package/src/components/base/pagination/examples/pagination.links.example.vue +0 -18
- package/src/components/base/segmented_control/examples/index.js +0 -22
- package/src/components/base/segmented_control/examples/segmented_control.basic.example.vue +0 -19
- package/src/components/base/segmented_control/examples/segmented_control.whitespace.example.vue +0 -18
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import PaginationBasicExample from './pagination.basic.example.vue';
|
|
2
|
-
import PaginationCompactExample from './pagination.compact.example.vue';
|
|
3
|
-
import PaginationDoubleTruncation from './pagination.double_truncation.example.vue';
|
|
4
|
-
import PaginationEventExample from './pagination.event.example.vue';
|
|
5
|
-
import PaginationLinksExample from './pagination.links.example.vue';
|
|
6
|
-
|
|
7
|
-
export default [
|
|
8
|
-
{
|
|
9
|
-
name: 'Basic',
|
|
10
|
-
items: [
|
|
11
|
-
{
|
|
12
|
-
id: 'pagination-basic',
|
|
13
|
-
name: 'Basic',
|
|
14
|
-
description: 'Basic Pagination',
|
|
15
|
-
component: PaginationBasicExample,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: 'pagination-double-truncation',
|
|
19
|
-
name: 'Double truncation',
|
|
20
|
-
description: 'Double truncation',
|
|
21
|
-
component: PaginationDoubleTruncation,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: 'pagination-compact',
|
|
25
|
-
name: 'Compact',
|
|
26
|
-
description: 'Compact Pagination',
|
|
27
|
-
component: PaginationCompactExample,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'pagination-links',
|
|
31
|
-
name: 'Link based pagination',
|
|
32
|
-
description: 'Link based pagination',
|
|
33
|
-
component: PaginationLinksExample,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 'pagination-event',
|
|
37
|
-
name: 'Page change event',
|
|
38
|
-
description: 'Page change event',
|
|
39
|
-
component: PaginationEventExample,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
const LAST_PAGE = 3;
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
lastPage: LAST_PAGE,
|
|
6
|
-
data: () => ({
|
|
7
|
-
page: 1,
|
|
8
|
-
}),
|
|
9
|
-
computed: {
|
|
10
|
-
prevPage() {
|
|
11
|
-
return Math.max(this.page - 1, 0);
|
|
12
|
-
},
|
|
13
|
-
nextPage() {
|
|
14
|
-
const nextPage = this.page + 1;
|
|
15
|
-
return nextPage > LAST_PAGE ? 0 : nextPage;
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div class="text-center">
|
|
23
|
-
<gl-pagination
|
|
24
|
-
v-model="page"
|
|
25
|
-
:prev-page="prevPage"
|
|
26
|
-
:next-page="nextPage"
|
|
27
|
-
prev-text="Prev"
|
|
28
|
-
next-text="Next"
|
|
29
|
-
align="center"
|
|
30
|
-
/>
|
|
31
|
-
Page {{ page }} of {{ $options.lastPage }}
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data: () => ({
|
|
4
|
-
page: 2,
|
|
5
|
-
}),
|
|
6
|
-
methods: {
|
|
7
|
-
logEvent(page) {
|
|
8
|
-
console.log(`page changed to ${page}`); // eslint-disable-line
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div>
|
|
16
|
-
<p>Change events are logged to the console</p>
|
|
17
|
-
<gl-pagination
|
|
18
|
-
v-model="page"
|
|
19
|
-
:per-page="10"
|
|
20
|
-
:total-items="100"
|
|
21
|
-
prev-text="Prev"
|
|
22
|
-
next-text="Next"
|
|
23
|
-
@input="logEvent"
|
|
24
|
-
/>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data: () => ({
|
|
4
|
-
page: 2,
|
|
5
|
-
}),
|
|
6
|
-
};
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<gl-pagination
|
|
11
|
-
v-model="page"
|
|
12
|
-
:per-page="10"
|
|
13
|
-
:total-items="100"
|
|
14
|
-
:link-gen="(page) => `#page${page}`"
|
|
15
|
-
prev-text="Prev"
|
|
16
|
-
next-text="Next"
|
|
17
|
-
/>
|
|
18
|
-
</template>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import SegmentedControlBasicExample from './segmented_control.basic.example.vue';
|
|
2
|
-
import SegmentedControlWhitespaceExample from './segmented_control.whitespace.example.vue';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
name: 'Basic',
|
|
7
|
-
items: [
|
|
8
|
-
{
|
|
9
|
-
id: 'segmented-control-basic',
|
|
10
|
-
name: 'Basic',
|
|
11
|
-
description: 'Basic Segmented Control',
|
|
12
|
-
component: SegmentedControlBasicExample,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: 'segmented-control-whitespace',
|
|
16
|
-
name: 'Whitespace',
|
|
17
|
-
description: 'Whitespace Segmented control',
|
|
18
|
-
component: SegmentedControlWhitespaceExample,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
options: [
|
|
6
|
-
{ value: 1, text: 'First' },
|
|
7
|
-
{ value: 2, text: 'Second', disabled: true },
|
|
8
|
-
{ value: 3, text: 'Third' },
|
|
9
|
-
{ value: 4, text: 'Fourth' },
|
|
10
|
-
{ value: 5, text: 'Fifth' },
|
|
11
|
-
],
|
|
12
|
-
selected: 1,
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
<template>
|
|
18
|
-
<gl-segmented-control v-model="selected" :options="options" />
|
|
19
|
-
</template>
|
package/src/components/base/segmented_control/examples/segmented_control.whitespace.example.vue
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data() {
|
|
4
|
-
return {
|
|
5
|
-
options: [
|
|
6
|
-
{ value: true, text: 'Show' },
|
|
7
|
-
{ value: false, text: 'Hide' },
|
|
8
|
-
],
|
|
9
|
-
selected: true,
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
</script>
|
|
14
|
-
<template>
|
|
15
|
-
<gl-form-group id="group-id" label="Whitespace" label-size="sm" label-for="select1">
|
|
16
|
-
<gl-segmented-control id="select1" v-model="selected" :options="options" />
|
|
17
|
-
</gl-form-group>
|
|
18
|
-
</template>
|