@gitlab/ui 32.17.0 → 32.20.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/accordion/accordion.js +7 -0
- package/dist/components/base/accordion/accordion_item.js +11 -0
- package/dist/components/base/alert/alert.js +3 -3
- package/dist/components/base/button/button.documentation.js +17 -1
- package/dist/components/base/button/button.js +10 -10
- package/dist/components/base/card/card.documentation.js +2 -26
- package/dist/components/base/card/card.js +11 -0
- package/dist/components/base/daterange_picker/daterange_picker.js +43 -1
- package/dist/components/base/dropdown/dropdown.js +9 -9
- package/dist/components/base/form/form_checkbox/form_checkbox.documentation.js +2 -14
- package/dist/components/base/form/form_checkbox/form_checkbox.js +21 -1
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +2 -2
- package/dist/components/base/form/form_input_group/form_input_group.js +1 -1
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +2 -2
- package/dist/components/base/form/form_radio_group/form_radio_group.js +2 -2
- package/dist/components/base/tabs/tabs/examples/tabs.basic.example.js +1 -1
- package/dist/components/base/tabs/tabs/examples/tabs.counterbadges.example.js +1 -1
- package/dist/components/base/tabs/tabs/examples/tabs.custom_title.example.js +1 -1
- package/dist/components/base/tabs/tabs/examples/tabs.disabled.example.js +1 -1
- package/dist/components/base/tabs/tabs/examples/tabs.justified.example.js +1 -1
- package/dist/components/base/tabs/tabs/examples/tabs.scrollable.example.js +2 -2
- package/dist/components/base/tabs/tabs/examples/tabs.styles_only.example.js +1 -1
- package/dist/components/base/tabs/tabs/tabs.documentation.js +1 -1
- package/dist/components/mixins/button_mixin.js +4 -4
- package/dist/directives/safe_html/safe_html.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/charts/mock_data.js +0 -2
- package/dist/utils/constants.js +8 -8
- package/dist/utils/use_fake_date.js +4 -4
- package/dist/utils/validation_utils.js +0 -2
- package/documentation/components_documentation.js +0 -3
- package/documentation/documented_stories.js +5 -0
- package/index.js +1 -1
- package/package.json +12 -12
- package/src/components/base/accordion/accordion.md +0 -4
- package/src/components/base/accordion/accordion.stories.js +58 -20
- package/src/components/base/accordion/accordion.vue +7 -0
- package/src/components/base/accordion/accordion_item.md +0 -4
- package/src/components/base/accordion/accordion_item.stories.js +56 -11
- package/src/components/base/accordion/accordion_item.vue +10 -0
- package/src/components/base/alert/alert.spec.js +3 -3
- package/src/components/base/alert/alert.vue +3 -3
- package/src/components/base/badge/badge.scss +1 -0
- package/src/components/base/button/button.documentation.js +18 -0
- package/src/components/base/button/button.stories.js +13 -13
- package/src/components/base/button/button.vue +15 -15
- package/src/components/base/card/card.documentation.js +0 -27
- package/src/components/base/card/card.md +0 -4
- package/src/components/base/card/card.stories.js +32 -18
- package/src/components/base/card/card.vue +12 -0
- package/src/components/base/datepicker/datepicker.scss +9 -0
- package/src/components/base/datepicker/datepicker.stories.js +1 -1
- package/src/components/base/daterange_picker/daterange_picker.md +0 -4
- package/src/components/base/daterange_picker/daterange_picker.stories.js +151 -88
- package/src/components/base/daterange_picker/daterange_picker.vue +43 -4
- package/src/components/base/dropdown/dropdown.stories.js +5 -5
- package/src/components/base/dropdown/dropdown.vue +12 -12
- package/src/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -15
- package/src/components/base/form/form_checkbox/form_checkbox.md +2 -4
- package/src/components/base/form/form_checkbox/form_checkbox.stories.js +31 -39
- package/src/components/base/form/form_checkbox/form_checkbox.vue +21 -6
- package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
- package/src/components/base/form/form_input_group/form_input_group.vue +1 -1
- package/src/components/base/form/form_input_group/form_input_group_mixin.js +1 -1
- package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
- package/src/components/base/tabs/tabs/examples/tabs.basic.example.vue +2 -2
- package/src/components/base/tabs/tabs/examples/tabs.counterbadges.example.vue +9 -6
- package/src/components/base/tabs/tabs/examples/tabs.custom_title.example.vue +3 -3
- package/src/components/base/tabs/tabs/examples/tabs.disabled.example.vue +3 -3
- package/src/components/base/tabs/tabs/examples/tabs.justified.example.vue +2 -2
- package/src/components/base/tabs/tabs/examples/tabs.scrollable.example.vue +2 -2
- package/src/components/base/tabs/tabs/examples/tabs.styles_only.example.vue +4 -4
- package/src/components/base/tabs/tabs/tabs.md +8 -8
- package/src/components/base/tabs/tabs/tabs.stories.js +42 -40
- package/src/components/mixins/button_mixin.js +3 -3
- package/src/directives/safe_html/safe_html.js +1 -3
- package/src/directives/safe_html/safe_html.spec.js +1 -1
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/sizing.scss +4 -0
- package/src/utils/charts/mock_data.js +0 -2
- package/src/utils/constants.js +7 -7
- package/src/utils/use_fake_date.js +2 -2
- package/src/utils/validation_utils.js +0 -2
- package/dist/components/base/accordion/accordion.documentation.js +0 -20
- package/dist/components/base/accordion/accordion_item.documentation.js +0 -22
- package/dist/components/base/accordion/examples/accordion.auto_collapse.example.js +0 -38
- package/dist/components/base/accordion/examples/accordion.basic.example.js +0 -38
- package/dist/components/base/accordion/examples/accordion.initial_visible.example.js +0 -38
- package/dist/components/base/accordion/examples/index.js +0 -25
- package/dist/components/base/card/examples/card.basic.example.js +0 -38
- package/dist/components/base/card/examples/card.headerfooter.example.js +0 -38
- package/dist/components/base/card/examples/index.js +0 -19
- package/dist/components/base/daterange_picker/daterange_picker.documentation.js +0 -29
- package/dist/components/base/daterange_picker/examples/daterange_picker.basic.example.js +0 -49
- package/dist/components/base/daterange_picker/examples/index.js +0 -12
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.checked.example.js +0 -48
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.checked_disabled.example.js +0 -48
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.disabled.example.js +0 -38
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.help.example.js +0 -38
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.indeterminant.example.js +0 -38
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.unchecked.example.js +0 -38
- package/dist/components/base/form/form_checkbox/examples/form_checkbox.values.example.js +0 -48
- package/dist/components/base/form/form_checkbox/examples/form_checkbox_group.options_array.example.js +0 -58
- package/dist/components/base/form/form_checkbox/examples/form_checkbox_group.slots.example.js +0 -38
- package/dist/components/base/form/form_checkbox/examples/index.js +0 -55
- package/src/components/base/accordion/accordion.documentation.js +0 -19
- package/src/components/base/accordion/accordion_item.documentation.js +0 -20
- package/src/components/base/accordion/examples/accordion.auto_collapse.example.vue +0 -16
- package/src/components/base/accordion/examples/accordion.basic.example.vue +0 -17
- package/src/components/base/accordion/examples/accordion.initial_visible.example.vue +0 -16
- package/src/components/base/accordion/examples/index.js +0 -29
- package/src/components/base/card/examples/card.basic.example.vue +0 -3
- package/src/components/base/card/examples/card.headerfooter.example.vue +0 -11
- package/src/components/base/card/examples/index.js +0 -22
- package/src/components/base/daterange_picker/daterange_picker.documentation.js +0 -34
- package/src/components/base/daterange_picker/examples/daterange_picker.basic.example.vue +0 -13
- package/src/components/base/daterange_picker/examples/index.js +0 -14
- package/src/components/base/form/form_checkbox/examples/form_checkbox.checked.example.vue +0 -13
- package/src/components/base/form/form_checkbox/examples/form_checkbox.checked_disabled.example.vue +0 -13
- package/src/components/base/form/form_checkbox/examples/form_checkbox.disabled.example.vue +0 -3
- package/src/components/base/form/form_checkbox/examples/form_checkbox.help.example.vue +0 -6
- package/src/components/base/form/form_checkbox/examples/form_checkbox.indeterminant.example.vue +0 -3
- package/src/components/base/form/form_checkbox/examples/form_checkbox.unchecked.example.vue +0 -3
- package/src/components/base/form/form_checkbox/examples/form_checkbox.values.example.vue +0 -15
- package/src/components/base/form/form_checkbox/examples/form_checkbox_group.options_array.example.vue +0 -27
- package/src/components/base/form/form_checkbox/examples/form_checkbox_group.slots.example.vue +0 -11
- package/src/components/base/form/form_checkbox/examples/index.js +0 -67
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { withKnobs, object } from '@storybook/addon-knobs';
|
|
2
|
-
import { documentedStoriesOf } from '../../../../../documentation/documented_stories';
|
|
3
1
|
import { GlFormCheckbox, GlFormCheckboxGroup } from '../../../../../index';
|
|
4
2
|
import readme from './form_checkbox.md';
|
|
5
3
|
|
|
@@ -8,43 +6,37 @@ const components = {
|
|
|
8
6
|
GlFormCheckboxGroup,
|
|
9
7
|
};
|
|
10
8
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'String option',
|
|
19
|
-
{ text: 'Disabled object option', value: 'disabled value', disabled: true },
|
|
20
|
-
{
|
|
21
|
-
text: 'Enabled object option',
|
|
22
|
-
value: 'html value',
|
|
23
|
-
},
|
|
24
|
-
]),
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
template: `
|
|
28
|
-
<gl-form-checkbox-group :options="options">
|
|
29
|
-
<template #first>
|
|
30
|
-
<gl-form-checkbox value="Slot option">
|
|
31
|
-
Slot option with help text
|
|
32
|
-
<template #help>
|
|
33
|
-
Help text
|
|
34
|
-
</template>
|
|
35
|
-
</gl-form-checkbox>
|
|
9
|
+
const template = `
|
|
10
|
+
<gl-form-checkbox-group>
|
|
11
|
+
<template #first>
|
|
12
|
+
<gl-form-checkbox value="Slot option">
|
|
13
|
+
Slot option with help text
|
|
14
|
+
<template #help>
|
|
15
|
+
Help text
|
|
36
16
|
</template>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
</gl-form-checkbox>
|
|
18
|
+
</template>
|
|
19
|
+
<gl-form-checkbox value="Last option">Last option</gl-form-checkbox>
|
|
20
|
+
</gl-form-checkbox-group>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const Template = () => ({
|
|
24
|
+
components,
|
|
25
|
+
template,
|
|
40
26
|
});
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
28
|
+
export const Default = Template.bind({});
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
title: 'base/form/form checkbox',
|
|
32
|
+
component: GlFormCheckbox,
|
|
33
|
+
parameters: {
|
|
34
|
+
knobs: { disable: true },
|
|
35
|
+
bootstrapComponent: 'b-form-checkbox',
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: readme,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -11,18 +11,33 @@ export default {
|
|
|
11
11
|
prop: 'checked',
|
|
12
12
|
event: 'input',
|
|
13
13
|
},
|
|
14
|
+
methods: {
|
|
15
|
+
change($event) {
|
|
16
|
+
/**
|
|
17
|
+
* Emitted when selected value(s) is changed due to user interaction.
|
|
18
|
+
*
|
|
19
|
+
* @event change
|
|
20
|
+
*/
|
|
21
|
+
this.$emit('change', $event);
|
|
22
|
+
},
|
|
23
|
+
input($event) {
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when checked state is changed.
|
|
26
|
+
*
|
|
27
|
+
* @event input
|
|
28
|
+
*/
|
|
29
|
+
this.$emit('input', $event);
|
|
30
|
+
},
|
|
31
|
+
},
|
|
14
32
|
};
|
|
15
33
|
</script>
|
|
16
34
|
|
|
17
35
|
<template>
|
|
18
|
-
<b-form-checkbox
|
|
19
|
-
|
|
20
|
-
class="gl-form-checkbox"
|
|
21
|
-
@change="$emit('change', $event)"
|
|
22
|
-
@input="$emit('input', $event)"
|
|
23
|
-
>
|
|
36
|
+
<b-form-checkbox v-bind="$attrs" class="gl-form-checkbox" @change="change" @input="input">
|
|
37
|
+
<!-- @slot The checkbox content to display. -->
|
|
24
38
|
<slot></slot>
|
|
25
39
|
<p v-if="Boolean($scopedSlots.help)" class="help-text">
|
|
40
|
+
<!-- @slot The help text to display. -->
|
|
26
41
|
<slot name="help"></slot>
|
|
27
42
|
</p>
|
|
28
43
|
</b-form-checkbox>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BFormCheckboxGroup } from 'bootstrap-vue';
|
|
3
3
|
import formOptionsMixin from 'bootstrap-vue/src/mixins/form-options';
|
|
4
|
-
import SafeHtml from '../../../../directives/safe_html/safe_html';
|
|
4
|
+
import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
|
|
5
5
|
import GlFormCheckbox from './form_checkbox.vue';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { BInputGroup, BInputGroupPrepend, BInputGroupAppend, BFormInput } from 'bootstrap-vue';
|
|
3
3
|
import GlDropdown from '../../dropdown/dropdown.vue';
|
|
4
4
|
import GlDropdownItem from '../../dropdown/dropdown_item.vue';
|
|
5
|
-
import InputGroupMixin from './form_input_group_mixin';
|
|
5
|
+
import { InputGroupMixin } from './form_input_group_mixin';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
name: 'GlFormInputGroup',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BFormRadioGroup } from 'bootstrap-vue';
|
|
3
3
|
import formOptionsMixin from 'bootstrap-vue/src/mixins/form-options';
|
|
4
|
-
import SafeHtml from '../../../../directives/safe_html/safe_html';
|
|
4
|
+
import { SafeHtmlDirective as SafeHtml } from '../../../../directives/safe_html/safe_html';
|
|
5
5
|
import GlFormRadio from '../form_radio/form_radio.vue';
|
|
6
6
|
|
|
7
7
|
const { model } = BFormRadioGroup.options;
|
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
<gl-tabs>
|
|
3
3
|
<gl-tab>
|
|
4
4
|
<template #title>
|
|
5
|
-
<span>
|
|
5
|
+
<span>Tab</span>
|
|
6
6
|
<gl-badge size="sm" class="gl-tab-counter-badge">500</gl-badge>
|
|
7
|
+
<span class="sr-only">items</span>
|
|
7
8
|
</template>
|
|
8
|
-
|
|
9
|
+
Tab panel 1
|
|
9
10
|
</gl-tab>
|
|
10
11
|
<gl-tab>
|
|
11
12
|
<template #title>
|
|
12
|
-
<span>
|
|
13
|
+
<span>Tab</span>
|
|
13
14
|
<gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
|
|
15
|
+
<span class="sr-only">items</span>
|
|
14
16
|
</template>
|
|
15
|
-
|
|
17
|
+
Tab panel 2
|
|
16
18
|
</gl-tab>
|
|
17
19
|
<gl-tab>
|
|
18
20
|
<template #title>
|
|
19
|
-
<span>
|
|
21
|
+
<span>Tab</span>
|
|
20
22
|
<gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
|
|
23
|
+
<span class="sr-only">items</span>
|
|
21
24
|
</template>
|
|
22
|
-
|
|
25
|
+
Tab panel 3
|
|
23
26
|
</gl-tab>
|
|
24
27
|
</gl-tabs>
|
|
25
28
|
</template>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<gl-tabs>
|
|
3
|
-
<gl-tab title="
|
|
3
|
+
<gl-tab title="Tab 1">
|
|
4
4
|
<template #title><i>custom</i> <strong>Title</strong></template>
|
|
5
|
-
|
|
5
|
+
Tab panel 1
|
|
6
6
|
</gl-tab>
|
|
7
|
-
<gl-tab title="
|
|
7
|
+
<gl-tab title="Tab 2">Tab panel 2</gl-tab>
|
|
8
8
|
</gl-tabs>
|
|
9
9
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<gl-tabs>
|
|
3
|
-
<gl-tab title="
|
|
4
|
-
<gl-tab title="
|
|
5
|
-
<gl-tab title="
|
|
3
|
+
<gl-tab title="Tab 1">Tab panel 1</gl-tab>
|
|
4
|
+
<gl-tab title="Tab 2">Tab panel 2</gl-tab>
|
|
5
|
+
<gl-tab title="Tab 3" disabled>Disabled tab panel</gl-tab>
|
|
6
6
|
</gl-tabs>
|
|
7
7
|
</template>
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
target="_self"
|
|
8
8
|
href="#"
|
|
9
9
|
class="nav-link gl-tab-nav-item gl-tab-nav-item-active gl-tab-nav-item-active-indigo"
|
|
10
|
-
>
|
|
10
|
+
>Tab 1</a
|
|
11
11
|
>
|
|
12
12
|
</li>
|
|
13
13
|
<li role="presentation" class="nav-item">
|
|
14
|
-
<a role="tab" target="_self" href="#" class="nav-link gl-tab-nav-item">
|
|
14
|
+
<a role="tab" target="_self" href="#" class="nav-link gl-tab-nav-item">Tab 2</a>
|
|
15
15
|
</li>
|
|
16
16
|
</ul>
|
|
17
17
|
<div class="tab-content gl-tab-content">
|
|
18
|
-
<div role="tabpanel" class="tab-pane active">
|
|
19
|
-
<div role="tabpanel" class="tab-pane">
|
|
18
|
+
<div role="tabpanel" class="tab-pane active">Tab panel 1</div>
|
|
19
|
+
<div role="tabpanel" class="tab-pane">Tab panel 2</div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
</template>
|
|
@@ -11,11 +11,11 @@ tab, when active, will reveal it’s own unique content.
|
|
|
11
11
|
|
|
12
12
|
~~~js
|
|
13
13
|
<gl-tabs theme="indigo">
|
|
14
|
-
<gl-tab title="
|
|
15
|
-
|
|
14
|
+
<gl-tab title="Tab 1">
|
|
15
|
+
Tab panel 1
|
|
16
16
|
</gl-tab>
|
|
17
|
-
<gl-tab title="
|
|
18
|
-
|
|
17
|
+
<gl-tab title="Tab 2">
|
|
18
|
+
Tab panel 2
|
|
19
19
|
</gl-tab>
|
|
20
20
|
</gl-tabs>
|
|
21
21
|
~~~
|
|
@@ -31,15 +31,15 @@ tab, when active, will reveal it’s own unique content.
|
|
|
31
31
|
target="_self"
|
|
32
32
|
href="#"
|
|
33
33
|
class="nav-link gl-tab-nav-item gl-tab-nav-item-active gl-tab-nav-item-active-indigo"
|
|
34
|
-
>
|
|
34
|
+
>Tab 1</a>
|
|
35
35
|
</li>
|
|
36
36
|
<li role="presentation" class="nav-item">
|
|
37
|
-
<a role="tab" target="_self" href="#" class="nav-link gl-tab-nav-item">
|
|
37
|
+
<a role="tab" target="_self" href="#" class="nav-link gl-tab-nav-item">Tab 2</a>
|
|
38
38
|
</li>
|
|
39
39
|
</ul>
|
|
40
40
|
<div class="tab-content gl-tab-content">
|
|
41
|
-
<div role="tabpanel" class="tab-pane gl-tab-content active">
|
|
42
|
-
<div role="tabpanel" class="tab-pane gl-tab-content">
|
|
41
|
+
<div role="tabpanel" class="tab-pane gl-tab-content active">Tab panel 1</div>
|
|
42
|
+
<div role="tabpanel" class="tab-pane gl-tab-content">Tab panel 2</div>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
~~~
|
|
@@ -19,8 +19,8 @@ const ScrollableTabsGenerator = {
|
|
|
19
19
|
computed: {
|
|
20
20
|
tabs() {
|
|
21
21
|
return range(this.count).map((i) => ({
|
|
22
|
-
title: `
|
|
23
|
-
content: `
|
|
22
|
+
title: `Tab ${i + 1}`,
|
|
23
|
+
content: `Tab panel ${i + 1} content...`,
|
|
24
24
|
}));
|
|
25
25
|
},
|
|
26
26
|
},
|
|
@@ -56,47 +56,47 @@ documentedStoriesOf('base/tabs/tabs', docs)
|
|
|
56
56
|
...createBaseStory(),
|
|
57
57
|
template: `
|
|
58
58
|
<gl-tabs :theme="theme" :sync-active-tab-with-query-params="syncActiveTabWithQueryParams">
|
|
59
|
-
<gl-tab title="
|
|
60
|
-
|
|
59
|
+
<gl-tab title="Tab 1">
|
|
60
|
+
Tab panel 1
|
|
61
61
|
</gl-tab>
|
|
62
|
-
<gl-tab title="
|
|
63
|
-
|
|
62
|
+
<gl-tab title="Tab 2">
|
|
63
|
+
Tab panel 2
|
|
64
64
|
</gl-tab>
|
|
65
|
-
<gl-tab title="
|
|
66
|
-
|
|
65
|
+
<gl-tab title="Tab 3">
|
|
66
|
+
Tab panel 3
|
|
67
67
|
</gl-tab>
|
|
68
|
-
<gl-tab title="
|
|
69
|
-
|
|
68
|
+
<gl-tab title="Tab 4">
|
|
69
|
+
Tab panel 4
|
|
70
70
|
</gl-tab>
|
|
71
|
-
<gl-tab title="
|
|
72
|
-
|
|
71
|
+
<gl-tab title="Tab 5">
|
|
72
|
+
Tab panel 5
|
|
73
73
|
</gl-tab>
|
|
74
|
-
<gl-tab title="
|
|
75
|
-
|
|
74
|
+
<gl-tab title="Tab 6">
|
|
75
|
+
Tab panel 6
|
|
76
76
|
</gl-tab>
|
|
77
|
-
<gl-tab title="
|
|
78
|
-
|
|
77
|
+
<gl-tab title="Tab 7">
|
|
78
|
+
Tab panel 7
|
|
79
79
|
</gl-tab>
|
|
80
|
-
<gl-tab title="
|
|
81
|
-
|
|
80
|
+
<gl-tab title="Tab 8">
|
|
81
|
+
Tab panel 8
|
|
82
82
|
</gl-tab>
|
|
83
|
-
<gl-tab title="
|
|
84
|
-
|
|
83
|
+
<gl-tab title="Tab 9">
|
|
84
|
+
Tab panel 9
|
|
85
85
|
</gl-tab>
|
|
86
|
-
<gl-tab title="
|
|
87
|
-
|
|
86
|
+
<gl-tab title="Tab 10">
|
|
87
|
+
Tab panel 10
|
|
88
88
|
</gl-tab>
|
|
89
|
-
<gl-tab title="
|
|
90
|
-
|
|
89
|
+
<gl-tab title="Tab 11">
|
|
90
|
+
Tab panel 11
|
|
91
91
|
</gl-tab>
|
|
92
|
-
<gl-tab title="
|
|
93
|
-
|
|
92
|
+
<gl-tab title="Tab 12">
|
|
93
|
+
Tab panel 12
|
|
94
94
|
</gl-tab>
|
|
95
|
-
<gl-tab title="
|
|
96
|
-
|
|
95
|
+
<gl-tab title="Tab 13" query-param-value="thirteenth">
|
|
96
|
+
Tab panel 13
|
|
97
97
|
</gl-tab>
|
|
98
|
-
<gl-tab title="
|
|
99
|
-
|
|
98
|
+
<gl-tab title="Tab 14">
|
|
99
|
+
Tab panel 14
|
|
100
100
|
</gl-tab>
|
|
101
101
|
</gl-tabs>
|
|
102
102
|
`,
|
|
@@ -134,11 +134,11 @@ documentedStoriesOf('base/tabs/tabs', docs)
|
|
|
134
134
|
...createBaseStory(),
|
|
135
135
|
template: `
|
|
136
136
|
<gl-tabs :theme="theme" justified>
|
|
137
|
-
<gl-tab title="
|
|
138
|
-
<p>
|
|
137
|
+
<gl-tab title="Tab 1">
|
|
138
|
+
<p>Tab panel 1</p>
|
|
139
139
|
</gl-tab>
|
|
140
|
-
<gl-tab title="
|
|
141
|
-
<p>
|
|
140
|
+
<gl-tab title="Tab 2">
|
|
141
|
+
<p>Tab panel 2</p>
|
|
142
142
|
</gl-tab>
|
|
143
143
|
</gl-tabs>
|
|
144
144
|
`,
|
|
@@ -149,23 +149,25 @@ documentedStoriesOf('base/tabs/tabs', docs)
|
|
|
149
149
|
<gl-tabs>
|
|
150
150
|
<gl-tab>
|
|
151
151
|
<template #title>
|
|
152
|
-
<span>
|
|
152
|
+
<span>Tab</span>
|
|
153
153
|
<gl-badge size="sm" class="gl-tab-counter-badge">500</gl-badge>
|
|
154
|
+
<span class="sr-only">items</span>
|
|
154
155
|
</template>
|
|
155
|
-
|
|
156
|
+
Tab panel 1
|
|
156
157
|
</gl-tab>
|
|
157
158
|
<gl-tab>
|
|
158
159
|
<template #title>
|
|
159
|
-
<span>
|
|
160
|
+
<span>Tab</span>
|
|
160
161
|
<gl-badge size="sm" class="gl-tab-counter-badge">250</gl-badge>
|
|
162
|
+
<span class="sr-only">items</span>
|
|
161
163
|
</template>
|
|
162
|
-
|
|
164
|
+
Tab panel 2
|
|
163
165
|
</gl-tab>
|
|
164
166
|
<gl-tab>
|
|
165
167
|
<template #title>
|
|
166
|
-
<span>
|
|
168
|
+
<span>Tab</span>
|
|
167
169
|
</template>
|
|
168
|
-
|
|
170
|
+
Tab panel 3
|
|
169
171
|
</gl-tab>
|
|
170
172
|
</gl-tabs>
|
|
171
173
|
`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttonSizeOptionsMap } from '../../utils/constants';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export const ButtonMixin = {
|
|
4
4
|
computed: {
|
|
5
5
|
buttonSize() {
|
|
6
|
-
return
|
|
6
|
+
return buttonSizeOptionsMap[this.size];
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
9
|
};
|
package/src/scss/utilities.scss
CHANGED
|
@@ -4163,6 +4163,14 @@
|
|
|
4163
4163
|
min-width: $gl-spacing-scale-10 !important;
|
|
4164
4164
|
}
|
|
4165
4165
|
|
|
4166
|
+
.gl-min-w-20 {
|
|
4167
|
+
min-width: $gl-spacing-scale-20;
|
|
4168
|
+
}
|
|
4169
|
+
|
|
4170
|
+
.gl-min-w-20\! {
|
|
4171
|
+
min-width: $gl-spacing-scale-20 !important;
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4166
4174
|
.gl-min-w-full {
|
|
4167
4175
|
min-width: 100%;
|
|
4168
4176
|
}
|
package/src/utils/constants.js
CHANGED
|
@@ -85,13 +85,13 @@ export const formStateOptions = {
|
|
|
85
85
|
invalid: false,
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
export const
|
|
88
|
+
export const buttonCategoryOptions = {
|
|
89
89
|
primary: 'primary',
|
|
90
90
|
secondary: 'secondary',
|
|
91
91
|
tertiary: 'tertiary',
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
export const
|
|
94
|
+
export const buttonVariantOptions = {
|
|
95
95
|
default: 'default',
|
|
96
96
|
confirm: 'confirm',
|
|
97
97
|
info: 'info (deprecated)',
|
|
@@ -110,9 +110,9 @@ export const newButtonVariantOptions = {
|
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
export const badgeForButtonOptions = {
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
113
|
+
[buttonVariantOptions.default]: badgeVariantOptions.neutral,
|
|
114
|
+
[buttonVariantOptions.confirm]: badgeVariantOptions.info,
|
|
115
|
+
[buttonVariantOptions.danger]: badgeVariantOptions.danger,
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
export const newDropdownVariantOptions = {
|
|
@@ -125,12 +125,12 @@ export const newDropdownVariantOptions = {
|
|
|
125
125
|
link: 'link',
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
export const
|
|
128
|
+
export const buttonSizeOptions = {
|
|
129
129
|
small: 'small',
|
|
130
130
|
medium: 'medium',
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
export const
|
|
133
|
+
export const buttonSizeOptionsMap = {
|
|
134
134
|
small: 'sm',
|
|
135
135
|
medium: 'md',
|
|
136
136
|
};
|
|
@@ -6,13 +6,13 @@ import MockDate from 'mockdate';
|
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
*
|
|
9
|
-
* import useFakeDate from '../../../../tests/utils/use_fake_date';
|
|
9
|
+
* import { useFakeDate } from '../../../../tests/utils/use_fake_date';
|
|
10
10
|
* documentedStoriesOf('some|story')
|
|
11
11
|
* .add('default', () => ({
|
|
12
12
|
* mixins: [useFakeDate()],
|
|
13
13
|
* })
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export const useFakeDate = () => {
|
|
16
16
|
if (process.env.IS_VISUAL_TEST) {
|
|
17
17
|
return {
|
|
18
18
|
created() {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
|
-
|
|
3
|
-
var description = "# GlAccordion\n\n<!-- STORY -->\n\nAccordions are used to group similar content and hide or show it depending on user needs or\npreferences. Accordions give users more granular control over the interface and help digest content\nin stages, rather than all at once.\n";
|
|
4
|
-
|
|
5
|
-
var accordion_documentation = {
|
|
6
|
-
followsDesignSystem: true,
|
|
7
|
-
description,
|
|
8
|
-
examples,
|
|
9
|
-
bootstrapComponent: 'b-collapse',
|
|
10
|
-
propsInfo: {
|
|
11
|
-
autoCollapse: {
|
|
12
|
-
additionalInfo: 'When true, will have the effect of closing other accordion items when one accordion item is visible.'
|
|
13
|
-
},
|
|
14
|
-
headerLevel: {
|
|
15
|
-
additionalInfo: 'The header tag used in the accordion (h1/h2/h3/h4/h5/h6). This overrides the value provided by GlAccordion. For accessibility this should be set to an appropriate value in the context where the accordion is used.'
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default accordion_documentation;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import examples from './examples';
|
|
2
|
-
|
|
3
|
-
var description = "# GlAccordionItem\n\n<!-- STORY -->\n\n## Usage\n\nUse `GlAccordionItem` to place the accordion item within your accordion.\n";
|
|
4
|
-
|
|
5
|
-
var accordion_item_documentation = {
|
|
6
|
-
description,
|
|
7
|
-
examples,
|
|
8
|
-
bootstrapComponent: 'b-collapse',
|
|
9
|
-
propsInfo: {
|
|
10
|
-
title: {
|
|
11
|
-
additionalInfo: 'Used to set the title of accordion link.'
|
|
12
|
-
},
|
|
13
|
-
visible: {
|
|
14
|
-
additionalInfo: 'When set, it will ensure the accordion item is initially visible.'
|
|
15
|
-
},
|
|
16
|
-
headerLevel: {
|
|
17
|
-
additionalInfo: 'The header tag used in the accordion (h1/h2/h3/h4/h5/h6). This overrides the value provided by GlAccordion. For accessibility this should be set to an appropriate value in the context where the accordion is used.'
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default accordion_item_documentation;
|