@gitlab/ui 32.48.0 → 32.49.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 (47) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/base/form/form_radio/form_radio.documentation.js +2 -33
  3. package/dist/components/base/form/form_radio/form_radio.js +15 -2
  4. package/dist/components/base/keyset_pagination/keyset_pagination.documentation.js +2 -84
  5. package/dist/components/base/keyset_pagination/keyset_pagination.js +42 -0
  6. package/dist/components/base/modal/modal.documentation.js +2 -32
  7. package/dist/components/base/modal/modal.js +1 -1
  8. package/documentation/documented_stories.js +3 -0
  9. package/package.json +1 -1
  10. package/src/components/base/form/form_radio/form_radio.documentation.js +0 -31
  11. package/src/components/base/form/form_radio/form_radio.md +7 -14
  12. package/src/components/base/form/form_radio/form_radio.stories.js +40 -28
  13. package/src/components/base/form/form_radio/form_radio.vue +26 -1
  14. package/src/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -99
  15. package/src/components/base/keyset_pagination/keyset_pagination.md +0 -2
  16. package/src/components/base/keyset_pagination/keyset_pagination.stories.js +60 -58
  17. package/src/components/base/keyset_pagination/keyset_pagination.vue +35 -1
  18. package/src/components/base/modal/modal.documentation.js +0 -42
  19. package/src/components/base/modal/modal.md +2 -7
  20. package/src/components/base/modal/modal.stories.js +107 -85
  21. package/src/components/base/modal/modal.vue +20 -0
  22. package/dist/components/base/form/form_radio/examples/form_radio.basic.example.js +0 -48
  23. package/dist/components/base/form/form_radio/examples/form_radio.checked_disabled.example.js +0 -48
  24. package/dist/components/base/form/form_radio/examples/index.js +0 -19
  25. package/dist/components/base/keyset_pagination/examples/index.js +0 -37
  26. package/dist/components/base/keyset_pagination/examples/keyset_pagination.basic.example.js +0 -51
  27. package/dist/components/base/keyset_pagination/examples/keyset_pagination.events.example.js +0 -64
  28. package/dist/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.js +0 -59
  29. package/dist/components/base/keyset_pagination/examples/keyset_pagination.links.example.js +0 -51
  30. package/dist/components/base/keyset_pagination/examples/keyset_pagination.slots.example.js +0 -51
  31. package/dist/components/base/modal/examples/index.js +0 -31
  32. package/dist/components/base/modal/examples/modal.basic.example.js +0 -62
  33. package/dist/components/base/modal/examples/modal.disabled.example.js +0 -89
  34. package/dist/components/base/modal/examples/modal.sizes.example.js +0 -62
  35. package/src/components/base/form/form_radio/examples/form_radio.basic.example.vue +0 -16
  36. package/src/components/base/form/form_radio/examples/form_radio.checked_disabled.example.vue +0 -13
  37. package/src/components/base/form/form_radio/examples/index.js +0 -22
  38. package/src/components/base/keyset_pagination/examples/index.js +0 -43
  39. package/src/components/base/keyset_pagination/examples/keyset_pagination.basic.example.vue +0 -16
  40. package/src/components/base/keyset_pagination/examples/keyset_pagination.events.example.vue +0 -29
  41. package/src/components/base/keyset_pagination/examples/keyset_pagination.internationalization.example.vue +0 -23
  42. package/src/components/base/keyset_pagination/examples/keyset_pagination.links.example.vue +0 -20
  43. package/src/components/base/keyset_pagination/examples/keyset_pagination.slots.example.vue +0 -23
  44. package/src/components/base/modal/examples/index.js +0 -39
  45. package/src/components/base/modal/examples/modal.basic.example.vue +0 -39
  46. package/src/components/base/modal/examples/modal.disabled.example.vue +0 -58
  47. package/src/components/base/modal/examples/modal.sizes.example.vue +0 -61
@@ -1,16 +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>
@@ -1,29 +0,0 @@
1
- <script>
2
- /* eslint-disable no-alert */
3
- export default {
4
- data() {
5
- return {
6
- pageInfo: {
7
- startCursor:
8
- 'eyJpZCI6IjE3NTg1ODciLCJyZWxlYXNlZF9hdCI6IjIwMjAtMDgtMjAgMTQ6NDc6MDguNTQ1MjE1MDAwIFVUQyJ9',
9
- endCursor:
10
- 'eyJpZCI6IjEyNjcxNzkiLCJyZWxlYXNlZF9hdCI6IjIwMjAtMDItMTkgMjE6MDA6MDUuODU5NTQ2MDAwIFVUQyJ9',
11
- hasPreviousPage: true,
12
- hasNextPage: true,
13
- },
14
- };
15
- },
16
- methods: {
17
- onPrev(startCursor) {
18
- alert(`"prev" event fired with start cursor: "${startCursor}"`);
19
- },
20
- onNext(endCursor) {
21
- alert(`"next" event fired with end cursor: "${endCursor}"`);
22
- },
23
- },
24
- };
25
- </script>
26
-
27
- <template>
28
- <gl-keyset-pagination v-bind="pageInfo" @prev="onPrev($event)" @next="onNext($event)" />
29
- </template>
@@ -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
- methods: {
12
- // Stub version of our i18n function in GitLab
13
- // eslint-disable-next-line no-underscore-dangle
14
- __(text) {
15
- return text;
16
- },
17
- },
18
- };
19
- </script>
20
-
21
- <template>
22
- <gl-keyset-pagination v-bind="pageInfo" :prev-text="__('Prev')" :next-text="__('Next')" />
23
- </template>
@@ -1,20 +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
16
- v-bind="pageInfo"
17
- prev-button-link="https://example.com/prev"
18
- next-button-link="https://example.com/next"
19
- />
20
- </template>
@@ -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>