@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.
Files changed (84) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/base/form/form.documentation.js +1 -5
  3. package/dist/components/base/form/form_radio/form_radio.documentation.js +2 -33
  4. package/dist/components/base/form/form_radio/form_radio.js +15 -2
  5. package/dist/components/base/form/form_select/form_select.documentation.js +2 -17
  6. package/dist/components/base/keyset_pagination/keyset_pagination.documentation.js +2 -84
  7. package/dist/components/base/keyset_pagination/keyset_pagination.js +42 -0
  8. package/dist/components/base/modal/modal.documentation.js +2 -32
  9. package/dist/components/base/modal/modal.js +15 -1
  10. package/dist/utility_classes.css +1 -1
  11. package/dist/utility_classes.css.map +1 -1
  12. package/dist/utils/string_utils.js +6 -2
  13. package/documentation/documented_stories.js +5 -0
  14. package/package.json +5 -3
  15. package/scss_to_js/scss_variables.js +2 -0
  16. package/scss_to_js/scss_variables.json +10 -0
  17. package/src/components/base/form/form.documentation.js +0 -3
  18. package/src/components/base/form/form.stories.js +99 -14
  19. package/src/components/base/form/form_radio/form_radio.documentation.js +0 -31
  20. package/src/components/base/form/form_radio/form_radio.md +7 -14
  21. package/src/components/base/form/form_radio/form_radio.stories.js +40 -28
  22. package/src/components/base/form/form_radio/form_radio.vue +26 -1
  23. package/src/components/base/form/form_select/form_select.documentation.js +0 -19
  24. package/src/components/base/form/form_select/form_select.md +0 -2
  25. package/src/components/base/form/form_select/form_select.stories.js +98 -80
  26. package/src/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -99
  27. package/src/components/base/keyset_pagination/keyset_pagination.md +0 -2
  28. package/src/components/base/keyset_pagination/keyset_pagination.stories.js +60 -58
  29. package/src/components/base/keyset_pagination/keyset_pagination.vue +35 -1
  30. package/src/components/base/modal/modal.documentation.js +0 -42
  31. package/src/components/base/modal/modal.md +2 -7
  32. package/src/components/base/modal/modal.stories.js +107 -85
  33. package/src/components/base/modal/modal.vue +73 -32
  34. package/src/scss/utilities.scss +16 -0
  35. package/src/scss/utility-mixins/sizing.scss +8 -0
  36. package/src/scss/variables.scss +2 -0
  37. package/src/utils/string_utils.js +6 -2
  38. package/src/utils/string_utils.spec.js +8 -0
  39. package/dist/components/base/form/examples/form.basic.example.js +0 -76
  40. package/dist/components/base/form/examples/form.edit.example.js +0 -66
  41. package/dist/components/base/form/examples/form.inline.example.js +0 -62
  42. package/dist/components/base/form/examples/form.novalidate.example.js +0 -61
  43. package/dist/components/base/form/examples/index.js +0 -27
  44. package/dist/components/base/form/form_radio/examples/form_radio.basic.example.js +0 -48
  45. package/dist/components/base/form/form_radio/examples/form_radio.checked_disabled.example.js +0 -48
  46. package/dist/components/base/form/form_radio/examples/index.js +0 -19
  47. package/dist/components/base/form/form_select/examples/form_select.basic.example.js +0 -55
  48. package/dist/components/base/form/form_select/examples/form_select.disabled.example.js +0 -55
  49. package/dist/components/base/form/form_select/examples/form_select.manual_options.example.js +0 -48
  50. package/dist/components/base/form/form_select/examples/form_select.mixed_options.example.js +0 -55
  51. package/dist/components/base/form/form_select/examples/index.js +0 -27
  52. package/dist/components/base/keyset_pagination/examples/index.js +0 -37
  53. package/dist/components/base/keyset_pagination/examples/keyset_pagination.basic.example.js +0 -51
  54. package/dist/components/base/keyset_pagination/examples/keyset_pagination.events.example.js +0 -64
  55. package/dist/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.js +0 -59
  56. package/dist/components/base/keyset_pagination/examples/keyset_pagination.links.example.js +0 -51
  57. package/dist/components/base/keyset_pagination/examples/keyset_pagination.slots.example.js +0 -51
  58. package/dist/components/base/modal/examples/index.js +0 -31
  59. package/dist/components/base/modal/examples/modal.basic.example.js +0 -62
  60. package/dist/components/base/modal/examples/modal.disabled.example.js +0 -89
  61. package/dist/components/base/modal/examples/modal.sizes.example.js +0 -62
  62. package/src/components/base/form/examples/form.basic.example.vue +0 -73
  63. package/src/components/base/form/examples/form.edit.example.vue +0 -37
  64. package/src/components/base/form/examples/form.inline.example.vue +0 -36
  65. package/src/components/base/form/examples/form.novalidate.example.vue +0 -30
  66. package/src/components/base/form/examples/index.js +0 -32
  67. package/src/components/base/form/form_radio/examples/form_radio.basic.example.vue +0 -16
  68. package/src/components/base/form/form_radio/examples/form_radio.checked_disabled.example.vue +0 -13
  69. package/src/components/base/form/form_radio/examples/index.js +0 -22
  70. package/src/components/base/form/form_select/examples/form_select.basic.example.vue +0 -17
  71. package/src/components/base/form/form_select/examples/form_select.disabled.example.vue +0 -17
  72. package/src/components/base/form/form_select/examples/form_select.manual_options.example.vue +0 -17
  73. package/src/components/base/form/form_select/examples/form_select.mixed_options.example.vue +0 -21
  74. package/src/components/base/form/form_select/examples/index.js +0 -32
  75. package/src/components/base/keyset_pagination/examples/index.js +0 -43
  76. package/src/components/base/keyset_pagination/examples/keyset_pagination.basic.example.vue +0 -16
  77. package/src/components/base/keyset_pagination/examples/keyset_pagination.events.example.vue +0 -29
  78. package/src/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.vue +0 -23
  79. package/src/components/base/keyset_pagination/examples/keyset_pagination.links.example.vue +0 -20
  80. package/src/components/base/keyset_pagination/examples/keyset_pagination.slots.example.vue +0 -23
  81. package/src/components/base/modal/examples/index.js +0 -39
  82. package/src/components/base/modal/examples/modal.basic.example.vue +0 -39
  83. package/src/components/base/modal/examples/modal.disabled.example.vue +0 -58
  84. package/src/components/base/modal/examples/modal.sizes.example.vue +0 -61
@@ -1,23 +0,0 @@
1
- <script>
2
- export default {
3
- data() {
4
- return {
5
- pageInfo: {
6
- hasPreviousPage: true,
7
- hasNextPage: true,
8
- },
9
- };
10
- },
11
- };
12
- </script>
13
-
14
- <template>
15
- <gl-keyset-pagination v-bind="pageInfo">
16
- <template #previous-button-content>
17
- <span style="color: hotpink" class="gl-font-weight-bold">🦄 ᎮᏒᏋᏉᎥᎧᏬᏕ</span>
18
- </template>
19
- <template #next-button-content>
20
- <span style="color: purple" class="gl-font-weight-bold">ᏁᏋጀᏖ 🌈</span>
21
- </template>
22
- </gl-keyset-pagination>
23
- </template>
@@ -1,39 +0,0 @@
1
- import ModalBasicExample from './modal.basic.example.vue';
2
- import ModalDisabledExample from './modal.disabled.example.vue';
3
- import ModalSizesExample from './modal.sizes.example.vue';
4
-
5
- export default [
6
- {
7
- name: 'Basic',
8
- items: [
9
- {
10
- id: 'modal-basic',
11
- name: 'Basic',
12
- description: 'Basic Modal',
13
- component: ModalBasicExample,
14
- },
15
- ],
16
- },
17
- {
18
- name: 'Disabled',
19
- items: [
20
- {
21
- id: 'modal-disabled',
22
- name: 'Disabled',
23
- description: 'Disabled Modal',
24
- component: ModalDisabledExample,
25
- },
26
- ],
27
- },
28
- {
29
- name: 'Sizes',
30
- items: [
31
- {
32
- id: 'modal-sizes',
33
- name: 'Sizes',
34
- description: 'Modal Sizes',
35
- component: ModalSizesExample,
36
- },
37
- ],
38
- },
39
- ];
@@ -1,39 +0,0 @@
1
- <script>
2
- export default {
3
- computed: {
4
- primaryProps() {
5
- return {
6
- text: 'Okay',
7
- };
8
- },
9
- secondaryProps() {
10
- return {
11
- text: 'Secondary',
12
- };
13
- },
14
- cancelProps() {
15
- return {
16
- text: 'Cancel',
17
- };
18
- },
19
- },
20
- };
21
- </script>
22
-
23
- <template>
24
- <div>
25
- <gl-button v-gl-modal-directive="'basic-modal-id'" category="primary" variant="confirm">
26
- Open modal
27
- </gl-button>
28
- <gl-modal
29
- modal-id="basic-modal-id"
30
- title="Example title"
31
- no-fade
32
- :action-primary="primaryProps"
33
- :action-secondary="secondaryProps"
34
- :action-cancel="cancelProps"
35
- >
36
- This is my content
37
- </gl-modal>
38
- </div>
39
- </template>
@@ -1,58 +0,0 @@
1
- <script>
2
- export default {
3
- data() {
4
- return {
5
- enteredText: '',
6
- };
7
- },
8
- computed: {
9
- primaryProps() {
10
- return {
11
- text: 'Okay',
12
- attributes: [{ disabled: !this.canSubmit }, { variant: 'confirm' }],
13
- };
14
- },
15
- secondaryProps() {
16
- return {
17
- text: 'Secondary',
18
- attributes: [{ disabled: !this.canSubmit }, { variant: 'confirm', category: 'secondary' }],
19
- };
20
- },
21
- cancelProps() {
22
- return {
23
- text: 'Cancel',
24
- };
25
- },
26
- canSubmit() {
27
- return this.enteredText === 'gitlab';
28
- },
29
- },
30
- methods: {
31
- clearInput() {
32
- this.enteredText = '';
33
- },
34
- },
35
- };
36
- </script>
37
-
38
- <template>
39
- <div>
40
- <gl-button v-gl-modal-directive="'basic-modal-id'" category="primary" variant="confirm">
41
- Open modal
42
- </gl-button>
43
- <gl-modal
44
- modal-id="basic-modal-id"
45
- title="Example title"
46
- no-fade
47
- :action-primary="primaryProps"
48
- :action-secondary="secondaryProps"
49
- :action-cancel="cancelProps"
50
- @primary="clearInput"
51
- @secondary="clearInput"
52
- @cancel="clearInput"
53
- >
54
- <p>Enter "gitlab" to change the button state.</p>
55
- <input v-model="enteredText" type="text" />
56
- </gl-modal>
57
- </div>
58
- </template>
@@ -1,61 +0,0 @@
1
- <script>
2
- export default {
3
- computed: {
4
- primaryProps() {
5
- return {
6
- text: 'Okay',
7
- };
8
- },
9
- secondaryProps() {
10
- return {
11
- text: 'Secondary',
12
- };
13
- },
14
- cancelProps() {
15
- return {
16
- text: 'Cancel',
17
- };
18
- },
19
- },
20
- };
21
- </script>
22
-
23
- <template>
24
- <div>
25
- <gl-button v-gl-modal-directive="'small-modal-id'" variant="confirm">Small Modal</gl-button>
26
- <gl-button v-gl-modal-directive="'medium-modal-id'" variant="confirm">Default Modal</gl-button>
27
- <gl-button v-gl-modal-directive="'large-modal-id'" variant="confirm">Large Modal</gl-button>
28
- <gl-modal
29
- modal-id="small-modal-id"
30
- title="Example title"
31
- no-fade
32
- :action-primary="primaryProps"
33
- :action-secondary="secondaryProps"
34
- :action-cancel="cancelProps"
35
- size="sm"
36
- >
37
- <p>Small modal: 512px</p>
38
- </gl-modal>
39
- <gl-modal
40
- modal-id="medium-modal-id"
41
- title="Example title"
42
- no-fade
43
- :action-primary="primaryProps"
44
- :action-secondary="secondaryProps"
45
- :action-cancel="cancelProps"
46
- >
47
- <p>Medium modal: 768px (default)</p>
48
- </gl-modal>
49
- <gl-modal
50
- modal-id="large-modal-id"
51
- title="Example title"
52
- no-fade
53
- :action-primary="primaryProps"
54
- :action-secondary="secondaryProps"
55
- :action-cancel="cancelProps"
56
- size="lg"
57
- >
58
- <p>Large modal: 990px</p>
59
- </gl-modal>
60
- </div>
61
- </template>