@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.
Files changed (132) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/base/accordion/accordion.js +7 -0
  3. package/dist/components/base/accordion/accordion_item.js +11 -0
  4. package/dist/components/base/alert/alert.js +3 -3
  5. package/dist/components/base/button/button.documentation.js +17 -1
  6. package/dist/components/base/button/button.js +10 -10
  7. package/dist/components/base/card/card.documentation.js +2 -26
  8. package/dist/components/base/card/card.js +11 -0
  9. package/dist/components/base/daterange_picker/daterange_picker.js +43 -1
  10. package/dist/components/base/dropdown/dropdown.js +9 -9
  11. package/dist/components/base/form/form_checkbox/form_checkbox.documentation.js +2 -14
  12. package/dist/components/base/form/form_checkbox/form_checkbox.js +21 -1
  13. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +2 -2
  14. package/dist/components/base/form/form_input_group/form_input_group.js +1 -1
  15. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +2 -2
  16. package/dist/components/base/form/form_radio_group/form_radio_group.js +2 -2
  17. package/dist/components/base/tabs/tabs/examples/tabs.basic.example.js +1 -1
  18. package/dist/components/base/tabs/tabs/examples/tabs.counterbadges.example.js +1 -1
  19. package/dist/components/base/tabs/tabs/examples/tabs.custom_title.example.js +1 -1
  20. package/dist/components/base/tabs/tabs/examples/tabs.disabled.example.js +1 -1
  21. package/dist/components/base/tabs/tabs/examples/tabs.justified.example.js +1 -1
  22. package/dist/components/base/tabs/tabs/examples/tabs.scrollable.example.js +2 -2
  23. package/dist/components/base/tabs/tabs/examples/tabs.styles_only.example.js +1 -1
  24. package/dist/components/base/tabs/tabs/tabs.documentation.js +1 -1
  25. package/dist/components/mixins/button_mixin.js +4 -4
  26. package/dist/directives/safe_html/safe_html.js +1 -1
  27. package/dist/index.css +2 -2
  28. package/dist/index.css.map +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/utility_classes.css +1 -1
  31. package/dist/utility_classes.css.map +1 -1
  32. package/dist/utils/charts/mock_data.js +0 -2
  33. package/dist/utils/constants.js +8 -8
  34. package/dist/utils/use_fake_date.js +4 -4
  35. package/dist/utils/validation_utils.js +0 -2
  36. package/documentation/components_documentation.js +0 -3
  37. package/documentation/documented_stories.js +5 -0
  38. package/index.js +1 -1
  39. package/package.json +12 -12
  40. package/src/components/base/accordion/accordion.md +0 -4
  41. package/src/components/base/accordion/accordion.stories.js +58 -20
  42. package/src/components/base/accordion/accordion.vue +7 -0
  43. package/src/components/base/accordion/accordion_item.md +0 -4
  44. package/src/components/base/accordion/accordion_item.stories.js +56 -11
  45. package/src/components/base/accordion/accordion_item.vue +10 -0
  46. package/src/components/base/alert/alert.spec.js +3 -3
  47. package/src/components/base/alert/alert.vue +3 -3
  48. package/src/components/base/badge/badge.scss +1 -0
  49. package/src/components/base/button/button.documentation.js +18 -0
  50. package/src/components/base/button/button.stories.js +13 -13
  51. package/src/components/base/button/button.vue +15 -15
  52. package/src/components/base/card/card.documentation.js +0 -27
  53. package/src/components/base/card/card.md +0 -4
  54. package/src/components/base/card/card.stories.js +32 -18
  55. package/src/components/base/card/card.vue +12 -0
  56. package/src/components/base/datepicker/datepicker.scss +9 -0
  57. package/src/components/base/datepicker/datepicker.stories.js +1 -1
  58. package/src/components/base/daterange_picker/daterange_picker.md +0 -4
  59. package/src/components/base/daterange_picker/daterange_picker.stories.js +151 -88
  60. package/src/components/base/daterange_picker/daterange_picker.vue +43 -4
  61. package/src/components/base/dropdown/dropdown.stories.js +5 -5
  62. package/src/components/base/dropdown/dropdown.vue +12 -12
  63. package/src/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -15
  64. package/src/components/base/form/form_checkbox/form_checkbox.md +2 -4
  65. package/src/components/base/form/form_checkbox/form_checkbox.stories.js +31 -39
  66. package/src/components/base/form/form_checkbox/form_checkbox.vue +21 -6
  67. package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
  68. package/src/components/base/form/form_input_group/form_input_group.vue +1 -1
  69. package/src/components/base/form/form_input_group/form_input_group_mixin.js +1 -1
  70. package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
  71. package/src/components/base/tabs/tabs/examples/tabs.basic.example.vue +2 -2
  72. package/src/components/base/tabs/tabs/examples/tabs.counterbadges.example.vue +9 -6
  73. package/src/components/base/tabs/tabs/examples/tabs.custom_title.example.vue +3 -3
  74. package/src/components/base/tabs/tabs/examples/tabs.disabled.example.vue +3 -3
  75. package/src/components/base/tabs/tabs/examples/tabs.justified.example.vue +2 -2
  76. package/src/components/base/tabs/tabs/examples/tabs.scrollable.example.vue +2 -2
  77. package/src/components/base/tabs/tabs/examples/tabs.styles_only.example.vue +4 -4
  78. package/src/components/base/tabs/tabs/tabs.md +8 -8
  79. package/src/components/base/tabs/tabs/tabs.stories.js +42 -40
  80. package/src/components/mixins/button_mixin.js +3 -3
  81. package/src/directives/safe_html/safe_html.js +1 -3
  82. package/src/directives/safe_html/safe_html.spec.js +1 -1
  83. package/src/scss/utilities.scss +8 -0
  84. package/src/scss/utility-mixins/sizing.scss +4 -0
  85. package/src/utils/charts/mock_data.js +0 -2
  86. package/src/utils/constants.js +7 -7
  87. package/src/utils/use_fake_date.js +2 -2
  88. package/src/utils/validation_utils.js +0 -2
  89. package/dist/components/base/accordion/accordion.documentation.js +0 -20
  90. package/dist/components/base/accordion/accordion_item.documentation.js +0 -22
  91. package/dist/components/base/accordion/examples/accordion.auto_collapse.example.js +0 -38
  92. package/dist/components/base/accordion/examples/accordion.basic.example.js +0 -38
  93. package/dist/components/base/accordion/examples/accordion.initial_visible.example.js +0 -38
  94. package/dist/components/base/accordion/examples/index.js +0 -25
  95. package/dist/components/base/card/examples/card.basic.example.js +0 -38
  96. package/dist/components/base/card/examples/card.headerfooter.example.js +0 -38
  97. package/dist/components/base/card/examples/index.js +0 -19
  98. package/dist/components/base/daterange_picker/daterange_picker.documentation.js +0 -29
  99. package/dist/components/base/daterange_picker/examples/daterange_picker.basic.example.js +0 -49
  100. package/dist/components/base/daterange_picker/examples/index.js +0 -12
  101. package/dist/components/base/form/form_checkbox/examples/form_checkbox.checked.example.js +0 -48
  102. package/dist/components/base/form/form_checkbox/examples/form_checkbox.checked_disabled.example.js +0 -48
  103. package/dist/components/base/form/form_checkbox/examples/form_checkbox.disabled.example.js +0 -38
  104. package/dist/components/base/form/form_checkbox/examples/form_checkbox.help.example.js +0 -38
  105. package/dist/components/base/form/form_checkbox/examples/form_checkbox.indeterminant.example.js +0 -38
  106. package/dist/components/base/form/form_checkbox/examples/form_checkbox.unchecked.example.js +0 -38
  107. package/dist/components/base/form/form_checkbox/examples/form_checkbox.values.example.js +0 -48
  108. package/dist/components/base/form/form_checkbox/examples/form_checkbox_group.options_array.example.js +0 -58
  109. package/dist/components/base/form/form_checkbox/examples/form_checkbox_group.slots.example.js +0 -38
  110. package/dist/components/base/form/form_checkbox/examples/index.js +0 -55
  111. package/src/components/base/accordion/accordion.documentation.js +0 -19
  112. package/src/components/base/accordion/accordion_item.documentation.js +0 -20
  113. package/src/components/base/accordion/examples/accordion.auto_collapse.example.vue +0 -16
  114. package/src/components/base/accordion/examples/accordion.basic.example.vue +0 -17
  115. package/src/components/base/accordion/examples/accordion.initial_visible.example.vue +0 -16
  116. package/src/components/base/accordion/examples/index.js +0 -29
  117. package/src/components/base/card/examples/card.basic.example.vue +0 -3
  118. package/src/components/base/card/examples/card.headerfooter.example.vue +0 -11
  119. package/src/components/base/card/examples/index.js +0 -22
  120. package/src/components/base/daterange_picker/daterange_picker.documentation.js +0 -34
  121. package/src/components/base/daterange_picker/examples/daterange_picker.basic.example.vue +0 -13
  122. package/src/components/base/daterange_picker/examples/index.js +0 -14
  123. package/src/components/base/form/form_checkbox/examples/form_checkbox.checked.example.vue +0 -13
  124. package/src/components/base/form/form_checkbox/examples/form_checkbox.checked_disabled.example.vue +0 -13
  125. package/src/components/base/form/form_checkbox/examples/form_checkbox.disabled.example.vue +0 -3
  126. package/src/components/base/form/form_checkbox/examples/form_checkbox.help.example.vue +0 -6
  127. package/src/components/base/form/form_checkbox/examples/form_checkbox.indeterminant.example.vue +0 -3
  128. package/src/components/base/form/form_checkbox/examples/form_checkbox.unchecked.example.vue +0 -3
  129. package/src/components/base/form/form_checkbox/examples/form_checkbox.values.example.vue +0 -15
  130. package/src/components/base/form/form_checkbox/examples/form_checkbox_group.options_array.example.vue +0 -27
  131. package/src/components/base/form/form_checkbox/examples/form_checkbox_group.slots.example.vue +0 -11
  132. 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 groupComponent = () => ({
12
- components,
13
- props: {
14
- // Note: options allows an html property, but withKnobs escapes html characters so it won't work
15
- // More info here: https://github.com/storybookjs/storybook/tree/v4.0.0-alpha.8/addons/knobs#withknobs-vs-withknobsoptions
16
- options: {
17
- default: object('Options', [
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
- <gl-form-checkbox value="Last option">Last option</gl-form-checkbox>
38
- </gl-form-checkbox-group>
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
- documentedStoriesOf('base/form/form-checkbox', readme)
43
- .addDecorator(withKnobs)
44
- .add('default', () => ({
45
- components,
46
- template: `
47
- <gl-form-checkbox>Checkbox</gl-form-checkbox>
48
- `,
49
- }))
50
- .add('group', () => groupComponent());
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
- v-bind="$attrs"
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,4 +1,4 @@
1
- export default {
1
+ export const InputGroupMixin = {
2
2
  props: {
3
3
  value: {
4
4
  type: [String, Number],
@@ -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;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <gl-tabs>
3
- <gl-tab title="First">first content</gl-tab>
4
- <gl-tab title="Second">second content</gl-tab>
3
+ <gl-tab title="Tab 1">Tab panel 1</gl-tab>
4
+ <gl-tab title="Tab 2">Tab panel 2</gl-tab>
5
5
  </gl-tabs>
6
6
  </template>
@@ -2,24 +2,27 @@
2
2
  <gl-tabs>
3
3
  <gl-tab>
4
4
  <template #title>
5
- <span>1st</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
- first content
9
+ Tab panel 1
9
10
  </gl-tab>
10
11
  <gl-tab>
11
12
  <template #title>
12
- <span>2nd</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
- second content
17
+ Tab panel 2
16
18
  </gl-tab>
17
19
  <gl-tab>
18
20
  <template #title>
19
- <span>3rd</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
- third content
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="First">
3
+ <gl-tab title="Tab 1">
4
4
  <template #title><i>custom</i> <strong>Title</strong></template>
5
- first content
5
+ Tab panel 1
6
6
  </gl-tab>
7
- <gl-tab title="Second">second content</gl-tab>
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="First">first content</gl-tab>
4
- <gl-tab title="Second">second content</gl-tab>
5
- <gl-tab title="Disabled" disabled>disabled</gl-tab>
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>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <gl-tabs justified>
3
- <gl-tab title="First tab">First content</gl-tab>
4
- <gl-tab title="Second tab">Second content</gl-tab>
3
+ <gl-tab title="Tab 1">Tab panel 1</gl-tab>
4
+ <gl-tab title="Tab 2">Tab panel 2</gl-tab>
5
5
  </gl-tabs>
6
6
  </template>
@@ -5,8 +5,8 @@ export default {
5
5
  .map((_, index) => index + 1)
6
6
  .map((id) => ({
7
7
  id,
8
- title: `Lorem ${id}`,
9
- content: `(${id}) Lorem ipsum dolar sit amit...`,
8
+ title: `Tab ${id}`,
9
+ content: `Tab panel ${id} content...`,
10
10
  })),
11
11
  };
12
12
  </script>
@@ -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
- >First</a
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">Second</a>
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">first content</div>
19
- <div role="tabpanel" class="tab-pane">second content</div>
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="First">
15
- first content
14
+ <gl-tab title="Tab 1">
15
+ Tab panel 1
16
16
  </gl-tab>
17
- <gl-tab title="Second">
18
- second content
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
- >First</a>
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">Second</a>
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">first content</div>
42
- <div role="tabpanel" class="tab-pane gl-tab-content">second content</div>
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: `Lorem ${i + 1}`,
23
- content: `(${i + 1}) Lorem ipsum dolar sit amit...`,
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="First">
60
- first tab content
59
+ <gl-tab title="Tab 1">
60
+ Tab panel 1
61
61
  </gl-tab>
62
- <gl-tab title="Second">
63
- second tab content
62
+ <gl-tab title="Tab 2">
63
+ Tab panel 2
64
64
  </gl-tab>
65
- <gl-tab title="Third">
66
- third tab content
65
+ <gl-tab title="Tab 3">
66
+ Tab panel 3
67
67
  </gl-tab>
68
- <gl-tab title="Fourth">
69
- fourth tab content
68
+ <gl-tab title="Tab 4">
69
+ Tab panel 4
70
70
  </gl-tab>
71
- <gl-tab title="Fifth">
72
- fifth tab content
71
+ <gl-tab title="Tab 5">
72
+ Tab panel 5
73
73
  </gl-tab>
74
- <gl-tab title="Sixth">
75
- sixth tab content
74
+ <gl-tab title="Tab 6">
75
+ Tab panel 6
76
76
  </gl-tab>
77
- <gl-tab title="Seventh">
78
- seventh tab content
77
+ <gl-tab title="Tab 7">
78
+ Tab panel 7
79
79
  </gl-tab>
80
- <gl-tab title="Eighth">
81
- eighth tab content
80
+ <gl-tab title="Tab 8">
81
+ Tab panel 8
82
82
  </gl-tab>
83
- <gl-tab title="Ninth">
84
- ninth tab content
83
+ <gl-tab title="Tab 9">
84
+ Tab panel 9
85
85
  </gl-tab>
86
- <gl-tab title="Tenth">
87
- tenth tab content
86
+ <gl-tab title="Tab 10">
87
+ Tab panel 10
88
88
  </gl-tab>
89
- <gl-tab title="Eleventh">
90
- eleventh tab content
89
+ <gl-tab title="Tab 11">
90
+ Tab panel 11
91
91
  </gl-tab>
92
- <gl-tab title="Twelfth">
93
- twelfth tab content
92
+ <gl-tab title="Tab 12">
93
+ Tab panel 12
94
94
  </gl-tab>
95
- <gl-tab title="Thirteenth" query-param-value="thirteenth">
96
- thirteenth tab content
95
+ <gl-tab title="Tab 13" query-param-value="thirteenth">
96
+ Tab panel 13
97
97
  </gl-tab>
98
- <gl-tab title="Fourteenth">
99
- fourteenth tab content
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="First tab">
138
- <p>First content</p>
137
+ <gl-tab title="Tab 1">
138
+ <p>Tab panel 1</p>
139
139
  </gl-tab>
140
- <gl-tab title="Second tab">
141
- <p>Second content</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>1st</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
- first content
156
+ Tab panel 1
156
157
  </gl-tab>
157
158
  <gl-tab>
158
159
  <template #title>
159
- <span>2nd</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
- second content
164
+ Tab panel 2
163
165
  </gl-tab>
164
166
  <gl-tab>
165
167
  <template #title>
166
- <span>3rd</span>
168
+ <span>Tab</span>
167
169
  </template>
168
- third content
170
+ Tab panel 3
169
171
  </gl-tab>
170
172
  </gl-tabs>
171
173
  `,
@@ -1,9 +1,9 @@
1
- import { newButtonSizeOptionsMap } from '../../utils/constants';
1
+ import { buttonSizeOptionsMap } from '../../utils/constants';
2
2
 
3
- export default {
3
+ export const ButtonMixin = {
4
4
  computed: {
5
5
  buttonSize() {
6
- return newButtonSizeOptionsMap[this.size];
6
+ return buttonSizeOptionsMap[this.size];
7
7
  },
8
8
  },
9
9
  };
@@ -17,9 +17,7 @@ const transform = (el, binding) => {
17
17
  }
18
18
  };
19
19
 
20
- const SafeHtmlDirective = {
20
+ export const SafeHtmlDirective = {
21
21
  bind: transform,
22
22
  update: transform,
23
23
  };
24
-
25
- export default SafeHtmlDirective;
@@ -1,6 +1,6 @@
1
1
  import { shallowMount } from '@vue/test-utils';
2
2
  import { forbiddenDataAttrs } from './constants';
3
- import safeHtml from './safe_html';
3
+ import { SafeHtmlDirective as safeHtml } from './safe_html';
4
4
 
5
5
  describe('safe html directive', () => {
6
6
  let wrapper;
@@ -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
  }
@@ -233,6 +233,10 @@
233
233
  min-width: $gl-spacing-scale-10;
234
234
  }
235
235
 
236
+ @mixin gl-min-w-20 {
237
+ min-width: $gl-spacing-scale-20;
238
+ }
239
+
236
240
  @mixin gl-min-w-full {
237
241
  min-width: 100%;
238
242
  }
@@ -254,5 +254,3 @@ export const mockSecondaryTrendlineData = [
254
254
  ],
255
255
  },
256
256
  ];
257
-
258
- export default {};
@@ -85,13 +85,13 @@ export const formStateOptions = {
85
85
  invalid: false,
86
86
  };
87
87
 
88
- export const newButtonCategoryOptions = {
88
+ export const buttonCategoryOptions = {
89
89
  primary: 'primary',
90
90
  secondary: 'secondary',
91
91
  tertiary: 'tertiary',
92
92
  };
93
93
 
94
- export const newButtonVariantOptions = {
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
- [newButtonVariantOptions.default]: badgeVariantOptions.neutral,
114
- [newButtonVariantOptions.confirm]: badgeVariantOptions.info,
115
- [newButtonVariantOptions.danger]: badgeVariantOptions.danger,
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 newButtonSizeOptions = {
128
+ export const buttonSizeOptions = {
129
129
  small: 'small',
130
130
  medium: 'medium',
131
131
  };
132
132
 
133
- export const newButtonSizeOptionsMap = {
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 default () => {
15
+ export const useFakeDate = () => {
16
16
  if (process.env.IS_VISUAL_TEST) {
17
17
  return {
18
18
  created() {
@@ -7,5 +7,3 @@ export const getValidationInfoText = (validation = {}) => {
7
7
  return '';
8
8
  }
9
9
  };
10
-
11
- export default {};
@@ -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;