@gitlab/ui 94.10.0 → 95.1.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 (56) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/components/base/progress_bar/progress_bar.js +1 -1
  3. package/dist/components/experimental/duo/chat/components/duo_chat_context/constants.js +4 -1
  4. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.js +120 -0
  5. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.js +11 -1
  6. package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.js +29 -2
  7. package/dist/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +14 -1
  8. package/dist/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.js +4 -1
  9. package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +7 -1
  10. package/dist/components/experimental/duo/chat/duo_chat.js +9 -1
  11. package/dist/index.css +2 -2
  12. package/dist/index.css.map +1 -1
  13. package/dist/tokens/build/js/tokens.dark.js +6 -1
  14. package/dist/tokens/build/js/tokens.js +6 -1
  15. package/dist/tokens/css/tokens.css +5 -0
  16. package/dist/tokens/css/tokens.dark.css +5 -0
  17. package/dist/tokens/js/tokens.dark.js +5 -0
  18. package/dist/tokens/js/tokens.js +5 -0
  19. package/dist/tokens/json/tokens.dark.json +110 -0
  20. package/dist/tokens/json/tokens.json +110 -0
  21. package/dist/tokens/scss/_tokens.dark.scss +5 -0
  22. package/dist/tokens/scss/_tokens.scss +5 -0
  23. package/dist/tokens/scss/_tokens_custom_properties.scss +5 -0
  24. package/dist/utils/constants.js +3 -14
  25. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +4 -34
  26. package/package.json +1 -1
  27. package/src/components/base/progress_bar/progress_bar.scss +19 -0
  28. package/src/components/base/progress_bar/progress_bar.vue +1 -1
  29. package/src/components/experimental/duo/chat/components/duo_chat_context/constants.js +4 -0
  30. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.vue +114 -0
  31. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.vue +10 -0
  32. package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.vue +42 -0
  33. package/src/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +15 -0
  34. package/src/components/experimental/duo/chat/components/duo_chat_conversation/duo_chat_conversation.vue +4 -0
  35. package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +8 -0
  36. package/src/components/experimental/duo/chat/duo_chat.vue +9 -0
  37. package/src/scss/components.scss +1 -0
  38. package/src/tokens/build/css/tokens.css +5 -0
  39. package/src/tokens/build/css/tokens.dark.css +5 -0
  40. package/src/tokens/build/js/tokens.dark.js +5 -0
  41. package/src/tokens/build/js/tokens.js +5 -0
  42. package/src/tokens/build/json/tokens.dark.json +110 -0
  43. package/src/tokens/build/json/tokens.json +110 -0
  44. package/src/tokens/build/scss/_tokens.dark.scss +5 -0
  45. package/src/tokens/build/scss/_tokens.scss +5 -0
  46. package/src/tokens/build/scss/_tokens_custom_properties.scss +5 -0
  47. package/src/tokens/contextual/progress-bar.tokens.json +38 -0
  48. package/src/utils/constants.js +1 -11
  49. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +27 -0
  50. package/src/vendor/bootstrap-vue/src/components/modal/README.md +2 -118
  51. package/src/vendor/bootstrap-vue/src/components/modal/index.d.ts +0 -10
  52. package/src/vendor/bootstrap-vue/src/components/modal/modal.js +4 -43
  53. package/src/vendor/bootstrap-vue/src/components/modal/package.json +0 -36
  54. package/src/vendor/bootstrap-vue/src/components/progress/MODIFICATIONS.md +23 -0
  55. package/src/vendor/bootstrap-vue/src/components/progress/README.md +4 -17
  56. package/translations.js +1 -0
@@ -14793,6 +14793,116 @@
14793
14793
  }
14794
14794
  }
14795
14795
  },
14796
+ "progress-bar": {
14797
+ "indicator": {
14798
+ "color": {
14799
+ "default": {
14800
+ "value": "#428fdc",
14801
+ "$type": "color",
14802
+ "comment": "Used for the indicator color for the primary progress-bar variant.",
14803
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14804
+ "isSource": true,
14805
+ "original": {
14806
+ "value": "{status.info.icon.color}",
14807
+ "$type": "color",
14808
+ "comment": "Used for the indicator color for the primary progress-bar variant."
14809
+ },
14810
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_DEFAULT",
14811
+ "attributes": {},
14812
+ "path": [
14813
+ "progress-bar",
14814
+ "indicator",
14815
+ "color",
14816
+ "default"
14817
+ ]
14818
+ },
14819
+ "success": {
14820
+ "value": "#2da160",
14821
+ "$type": "color",
14822
+ "comment": "Used for the indicator color for the success progress-bar variant.",
14823
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14824
+ "isSource": true,
14825
+ "original": {
14826
+ "value": "{status.success.icon.color}",
14827
+ "$type": "color",
14828
+ "comment": "Used for the indicator color for the success progress-bar variant."
14829
+ },
14830
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_SUCCESS",
14831
+ "attributes": {},
14832
+ "path": [
14833
+ "progress-bar",
14834
+ "indicator",
14835
+ "color",
14836
+ "success"
14837
+ ]
14838
+ },
14839
+ "warning": {
14840
+ "value": "#c17d10",
14841
+ "$type": "color",
14842
+ "comment": "Used for the indicator color for the warning progress-bar variant.",
14843
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14844
+ "isSource": true,
14845
+ "original": {
14846
+ "value": "{status.warning.icon.color}",
14847
+ "$type": "color",
14848
+ "comment": "Used for the indicator color for the warning progress-bar variant."
14849
+ },
14850
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_WARNING",
14851
+ "attributes": {},
14852
+ "path": [
14853
+ "progress-bar",
14854
+ "indicator",
14855
+ "color",
14856
+ "warning"
14857
+ ]
14858
+ },
14859
+ "danger": {
14860
+ "value": "#ec5941",
14861
+ "$type": "color",
14862
+ "comment": "Used for the indicator color for the danger progress-bar variant.",
14863
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14864
+ "isSource": true,
14865
+ "original": {
14866
+ "value": "{status.danger.icon.color}",
14867
+ "$type": "color",
14868
+ "comment": "Used for the indicator color for the danger progress-bar variant."
14869
+ },
14870
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_DANGER",
14871
+ "attributes": {},
14872
+ "path": [
14873
+ "progress-bar",
14874
+ "indicator",
14875
+ "color",
14876
+ "danger"
14877
+ ]
14878
+ }
14879
+ }
14880
+ },
14881
+ "track": {
14882
+ "color": {
14883
+ "value": "#4c4b51",
14884
+ "$type": "color",
14885
+ "comment": "Used for the track color for all progress-bar variants.",
14886
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14887
+ "isSource": true,
14888
+ "original": {
14889
+ "value": {
14890
+ "default": "{color.neutral.200}",
14891
+ "dark": "{color.neutral.700}"
14892
+ },
14893
+ "$type": "color",
14894
+ "comment": "Used for the track color for all progress-bar variants."
14895
+ },
14896
+ "name": "PROGRESS_BAR_TRACK_COLOR",
14897
+ "attributes": {},
14898
+ "path": [
14899
+ "progress-bar",
14900
+ "track",
14901
+ "color"
14902
+ ]
14903
+ }
14904
+ }
14905
+ },
14796
14906
  "skeleton-loader": {
14797
14907
  "background": {
14798
14908
  "color": {
@@ -14793,6 +14793,116 @@
14793
14793
  }
14794
14794
  }
14795
14795
  },
14796
+ "progress-bar": {
14797
+ "indicator": {
14798
+ "color": {
14799
+ "default": {
14800
+ "value": "#1f75cb",
14801
+ "$type": "color",
14802
+ "comment": "Used for the indicator color for the primary progress-bar variant.",
14803
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14804
+ "isSource": true,
14805
+ "original": {
14806
+ "value": "{status.info.icon.color}",
14807
+ "$type": "color",
14808
+ "comment": "Used for the indicator color for the primary progress-bar variant."
14809
+ },
14810
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_DEFAULT",
14811
+ "attributes": {},
14812
+ "path": [
14813
+ "progress-bar",
14814
+ "indicator",
14815
+ "color",
14816
+ "default"
14817
+ ]
14818
+ },
14819
+ "success": {
14820
+ "value": "#108548",
14821
+ "$type": "color",
14822
+ "comment": "Used for the indicator color for the success progress-bar variant.",
14823
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14824
+ "isSource": true,
14825
+ "original": {
14826
+ "value": "{status.success.icon.color}",
14827
+ "$type": "color",
14828
+ "comment": "Used for the indicator color for the success progress-bar variant."
14829
+ },
14830
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_SUCCESS",
14831
+ "attributes": {},
14832
+ "path": [
14833
+ "progress-bar",
14834
+ "indicator",
14835
+ "color",
14836
+ "success"
14837
+ ]
14838
+ },
14839
+ "warning": {
14840
+ "value": "#ab6100",
14841
+ "$type": "color",
14842
+ "comment": "Used for the indicator color for the warning progress-bar variant.",
14843
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14844
+ "isSource": true,
14845
+ "original": {
14846
+ "value": "{status.warning.icon.color}",
14847
+ "$type": "color",
14848
+ "comment": "Used for the indicator color for the warning progress-bar variant."
14849
+ },
14850
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_WARNING",
14851
+ "attributes": {},
14852
+ "path": [
14853
+ "progress-bar",
14854
+ "indicator",
14855
+ "color",
14856
+ "warning"
14857
+ ]
14858
+ },
14859
+ "danger": {
14860
+ "value": "#dd2b0e",
14861
+ "$type": "color",
14862
+ "comment": "Used for the indicator color for the danger progress-bar variant.",
14863
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14864
+ "isSource": true,
14865
+ "original": {
14866
+ "value": "{status.danger.icon.color}",
14867
+ "$type": "color",
14868
+ "comment": "Used for the indicator color for the danger progress-bar variant."
14869
+ },
14870
+ "name": "PROGRESS_BAR_INDICATOR_COLOR_DANGER",
14871
+ "attributes": {},
14872
+ "path": [
14873
+ "progress-bar",
14874
+ "indicator",
14875
+ "color",
14876
+ "danger"
14877
+ ]
14878
+ }
14879
+ }
14880
+ },
14881
+ "track": {
14882
+ "color": {
14883
+ "value": "#bfbfc3",
14884
+ "$type": "color",
14885
+ "comment": "Used for the track color for all progress-bar variants.",
14886
+ "filePath": "src/tokens/contextual/progress-bar.tokens.json",
14887
+ "isSource": true,
14888
+ "original": {
14889
+ "value": {
14890
+ "default": "{color.neutral.200}",
14891
+ "dark": "{color.neutral.700}"
14892
+ },
14893
+ "$type": "color",
14894
+ "comment": "Used for the track color for all progress-bar variants."
14895
+ },
14896
+ "name": "PROGRESS_BAR_TRACK_COLOR",
14897
+ "attributes": {},
14898
+ "path": [
14899
+ "progress-bar",
14900
+ "track",
14901
+ "color"
14902
+ ]
14903
+ }
14904
+ }
14905
+ },
14796
14906
  "skeleton-loader": {
14797
14907
  "background": {
14798
14908
  "color": {
@@ -503,6 +503,7 @@ $gl-spinner-track-color-light: $gl-color-neutral-800; // Used for the static tra
503
503
  $gl-spinner-track-color-default: $gl-color-neutral-800; // Used for the static track (background) of a loading spinner.
504
504
  $gl-skeleton-loader-shimmer-color: $gl-color-neutral-700; // Used for the animated shimmer effect in a skeleton loader.
505
505
  $gl-skeleton-loader-background-color: $gl-color-neutral-800; // Used for the skeleton loader background color.
506
+ $gl-progress-bar-track-color: $gl-color-neutral-700; // Used for the track color for all progress-bar variants.
506
507
  $gl-link-mention-background-color-current: $gl-color-orange-800; // Used for the mention link background when referencing the current user.
507
508
  $gl-link-mention-background-color-default: $gl-color-blue-800; // Used for the mention link default background.
508
509
  $gl-link-mention-text-color-current: $gl-color-orange-100; // Used for the mention link text color when referencing the current user.
@@ -779,6 +780,10 @@ $gl-control-text-color-error: $gl-text-color-danger; // Used for the helper text
779
780
  $gl-token-foreground-color: $gl-text-color-default; // Used for the token foreground color.
780
781
  $gl-table-sorting-icon-color: $gl-text-color-heading; // Used for the color of the sorting icons in the column headers.
781
782
  $gl-table-row-background-color-hover: $gl-background-color-subtle; // Used for the background of a table row in hover state.
783
+ $gl-progress-bar-indicator-color-danger: $gl-status-danger-icon-color; // Used for the indicator color for the danger progress-bar variant.
784
+ $gl-progress-bar-indicator-color-warning: $gl-status-warning-icon-color; // Used for the indicator color for the warning progress-bar variant.
785
+ $gl-progress-bar-indicator-color-success: $gl-status-success-icon-color; // Used for the indicator color for the success progress-bar variant.
786
+ $gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used for the indicator color for the primary progress-bar variant.
782
787
  $gl-dropdown-option-background-color-selected-focus: $gl-dropdown-option-background-color-selected-hover; // Used for the background of a selected dropdown option in the focus state.
783
788
  $gl-dropdown-option-background-color-unselected-focus: $gl-action-neutral-background-color-focus; // Used for the background of an unselected dropdown option in the focus state.
784
789
  $gl-dropdown-option-indicator-color-selected-focus: $gl-color-neutral-0; // Used for the dropdown selected option indicator in the focus state.
@@ -503,6 +503,7 @@ $gl-spinner-track-color-light: $gl-color-neutral-800; // Used for the static tra
503
503
  $gl-spinner-track-color-default: $gl-color-neutral-100; // Used for the static track (background) of a loading spinner.
504
504
  $gl-skeleton-loader-shimmer-color: $gl-color-neutral-50; // Used for the animated shimmer effect in a skeleton loader.
505
505
  $gl-skeleton-loader-background-color: $gl-color-neutral-100; // Used for the skeleton loader background color.
506
+ $gl-progress-bar-track-color: $gl-color-neutral-200; // Used for the track color for all progress-bar variants.
506
507
  $gl-link-mention-background-color-current: $gl-color-orange-100; // Used for the mention link background when referencing the current user.
507
508
  $gl-link-mention-background-color-default: $gl-color-blue-100; // Used for the mention link default background.
508
509
  $gl-link-mention-text-color-current: $gl-color-orange-800; // Used for the mention link text color when referencing the current user.
@@ -779,6 +780,10 @@ $gl-control-text-color-error: $gl-text-color-danger; // Used for the helper text
779
780
  $gl-token-foreground-color: $gl-text-color-default; // Used for the token foreground color.
780
781
  $gl-table-sorting-icon-color: $gl-text-color-heading; // Used for the color of the sorting icons in the column headers.
781
782
  $gl-table-row-background-color-hover: $gl-background-color-subtle; // Used for the background of a table row in hover state.
783
+ $gl-progress-bar-indicator-color-danger: $gl-status-danger-icon-color; // Used for the indicator color for the danger progress-bar variant.
784
+ $gl-progress-bar-indicator-color-warning: $gl-status-warning-icon-color; // Used for the indicator color for the warning progress-bar variant.
785
+ $gl-progress-bar-indicator-color-success: $gl-status-success-icon-color; // Used for the indicator color for the success progress-bar variant.
786
+ $gl-progress-bar-indicator-color-default: $gl-status-info-icon-color; // Used for the indicator color for the primary progress-bar variant.
782
787
  $gl-dropdown-option-background-color-selected-focus: $gl-dropdown-option-background-color-selected-hover; // Used for the background of a selected dropdown option in the focus state.
783
788
  $gl-dropdown-option-background-color-unselected-focus: $gl-action-neutral-background-color-focus; // Used for the background of an unselected dropdown option in the focus state.
784
789
  $gl-dropdown-option-indicator-color-selected-focus: $gl-control-background-color-selected-focus; // Used for the dropdown selected option indicator in the focus state.
@@ -668,6 +668,11 @@ $gl-link-mention-text-color-default: var(--gl-link-mention-text-color-default);
668
668
  $gl-link-mention-text-color-current: var(--gl-link-mention-text-color-current);
669
669
  $gl-link-mention-background-color-default: var(--gl-link-mention-background-color-default);
670
670
  $gl-link-mention-background-color-current: var(--gl-link-mention-background-color-current);
671
+ $gl-progress-bar-indicator-color-default: var(--gl-progress-bar-indicator-color-default);
672
+ $gl-progress-bar-indicator-color-success: var(--gl-progress-bar-indicator-color-success);
673
+ $gl-progress-bar-indicator-color-warning: var(--gl-progress-bar-indicator-color-warning);
674
+ $gl-progress-bar-indicator-color-danger: var(--gl-progress-bar-indicator-color-danger);
675
+ $gl-progress-bar-track-color: var(--gl-progress-bar-track-color);
671
676
  $gl-skeleton-loader-background-color: var(--gl-skeleton-loader-background-color);
672
677
  $gl-skeleton-loader-shimmer-color: var(--gl-skeleton-loader-shimmer-color);
673
678
  $gl-spinner-track-color-default: var(--gl-spinner-track-color-default);
@@ -0,0 +1,38 @@
1
+ {
2
+ "progress-bar": {
3
+ "indicator": {
4
+ "color": {
5
+ "default": {
6
+ "$value": "{status.info.icon.color}",
7
+ "$type": "color",
8
+ "$description": "Used for the indicator color for the primary progress-bar variant."
9
+ },
10
+ "success": {
11
+ "$value": "{status.success.icon.color}",
12
+ "$type": "color",
13
+ "$description": "Used for the indicator color for the success progress-bar variant."
14
+ },
15
+ "warning": {
16
+ "$value": "{status.warning.icon.color}",
17
+ "$type": "color",
18
+ "$description": "Used for the indicator color for the warning progress-bar variant."
19
+ },
20
+ "danger": {
21
+ "$value": "{status.danger.icon.color}",
22
+ "$type": "color",
23
+ "$description": "Used for the indicator color for the danger progress-bar variant."
24
+ }
25
+ }
26
+ },
27
+ "track": {
28
+ "color": {
29
+ "$value": {
30
+ "default": "{color.neutral.200}",
31
+ "dark": "{color.neutral.700}"
32
+ },
33
+ "$type": "color",
34
+ "$description": "Used for the track color for all progress-bar variants."
35
+ }
36
+ }
37
+ }
38
+ }
@@ -1,9 +1,5 @@
1
1
  import { POSITION } from '../components/utilities/truncate/constants';
2
2
 
3
- function appendDefaultOption(options) {
4
- return { ...options, default: '' };
5
- }
6
-
7
3
  export const COMMA = ',';
8
4
 
9
5
  export const CONTRAST_LEVELS = [
@@ -33,15 +29,11 @@ export const HEX_REGEX = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
33
29
 
34
30
  export const LEFT_MOUSE_BUTTON = 0;
35
31
 
36
- export const variantOptions = {
32
+ export const progressBarVariantOptions = {
37
33
  primary: 'primary',
38
- secondary: 'secondary',
39
34
  success: 'success',
40
35
  warning: 'warning',
41
36
  danger: 'danger',
42
- info: 'info',
43
- light: 'light',
44
- dark: 'dark',
45
37
  };
46
38
 
47
39
  export const badgeSizeOptions = {
@@ -290,8 +282,6 @@ export const tokenVariants = ['default', 'search-type', 'search-value'];
290
282
 
291
283
  export const resizeDebounceTime = 200;
292
284
 
293
- export const variantOptionsWithNoDefault = appendDefaultOption(variantOptions);
294
-
295
285
  // Datetime constants
296
286
  export const defaultDateFormat = 'YYYY-MM-DD';
297
287
 
@@ -0,0 +1,27 @@
1
+ # Modifications to Vendored Code
2
+
3
+ **Library**: BootstrapVue
4
+ **Version**: 2.23.1
5
+
6
+ This file documents modifications made to the original BootstrapVue component files.
7
+
8
+ ## Removed unnecessary properties
9
+
10
+ The following properties have been removed as they are no longer supported in our implementation:
11
+
12
+ - `headerBgVariant`
13
+ - `headerBorderVariant`
14
+ - `headerTextVariant`
15
+ - `headerCloseVariant`
16
+ - `bodyBgVariant`
17
+ - `bodyTextVariant`
18
+ - `footerBgVariant`
19
+ - `footerBorderVariant`
20
+ - `footerTextVariant`
21
+
22
+ These properties were removed to streamline the component for our use case, as they are no longer necessary in our project.
23
+ The following files have been modified from the original:
24
+
25
+ - `modal.js`: Removed unnecessary properties.
26
+ - `package.json`: Removed unnecessary properties.
27
+ - `README.md`: Removed unnecessary properties.
@@ -469,125 +469,9 @@ Vertically center your modal in the viewport by setting the `centered` prop.
469
469
 
470
470
  Feel free to mix vertically `centered` with `scrollable`.
471
471
 
472
- ### Variants
472
+ ### Pass CSS classes
473
473
 
474
- Control the header, footer, and body background and text variants by setting the
475
- `header-bg-variant`, `header-text-variant`, `body-bg-variant`, `body-text-variant`,
476
- `footer-bg-variant`, and `footer-text-variant` props. Use any of the standard Bootstrap variants
477
- such as `danger`, `warning`, `info`, `success`, `dark`, `light`, etc.
478
-
479
- The variants for the bottom border of the header and top border of the footer can be controlled by
480
- the `header-border-variant` and `footer-border-variant` props respectively.
481
-
482
- ```html
483
- <template>
484
- <div>
485
- <b-button @click="show=true" variant="primary">Show Modal</b-button>
486
-
487
- <b-modal
488
- v-model="show"
489
- title="Modal Variants"
490
- :header-bg-variant="headerBgVariant"
491
- :header-text-variant="headerTextVariant"
492
- :body-bg-variant="bodyBgVariant"
493
- :body-text-variant="bodyTextVariant"
494
- :footer-bg-variant="footerBgVariant"
495
- :footer-text-variant="footerTextVariant"
496
- >
497
- <b-container fluid>
498
- <b-row class="mb-1 text-center">
499
- <b-col cols="3"></b-col>
500
- <b-col>Background</b-col>
501
- <b-col>Text</b-col>
502
- </b-row>
503
-
504
- <b-row class="mb-1">
505
- <b-col cols="3">Header</b-col>
506
- <b-col>
507
- <b-form-select
508
- v-model="headerBgVariant"
509
- :options="variants"
510
- ></b-form-select>
511
- </b-col>
512
- <b-col>
513
- <b-form-select
514
- v-model="headerTextVariant"
515
- :options="variants"
516
- ></b-form-select>
517
- </b-col>
518
- </b-row>
519
-
520
- <b-row class="mb-1">
521
- <b-col cols="3">Body</b-col>
522
- <b-col>
523
- <b-form-select
524
- v-model="bodyBgVariant"
525
- :options="variants"
526
- ></b-form-select>
527
- </b-col>
528
- <b-col>
529
- <b-form-select
530
- v-model="bodyTextVariant"
531
- :options="variants"
532
- ></b-form-select>
533
- </b-col>
534
- </b-row>
535
-
536
- <b-row>
537
- <b-col cols="3">Footer</b-col>
538
- <b-col>
539
- <b-form-select
540
- v-model="footerBgVariant"
541
- :options="variants"
542
- ></b-form-select>
543
- </b-col>
544
- <b-col>
545
- <b-form-select
546
- v-model="footerTextVariant"
547
- :options="variants"
548
- ></b-form-select>
549
- </b-col>
550
- </b-row>
551
- </b-container>
552
-
553
- <template #modal-footer>
554
- <div class="w-100">
555
- <p class="float-left">Modal Footer Content</p>
556
- <b-button
557
- variant="primary"
558
- size="sm"
559
- class="float-right"
560
- @click="show=false"
561
- >
562
- Close
563
- </b-button>
564
- </div>
565
- </template>
566
- </b-modal>
567
- </div>
568
- </template>
569
-
570
- <script>
571
- export default {
572
- data() {
573
- return {
574
- show: false,
575
- variants: ['primary', 'secondary', 'success', 'warning', 'danger', 'info', 'light', 'dark'],
576
- headerBgVariant: 'dark',
577
- headerTextVariant: 'light',
578
- bodyBgVariant: 'light',
579
- bodyTextVariant: 'dark',
580
- footerBgVariant: 'warning',
581
- footerTextVariant: 'dark'
582
- }
583
- }
584
- }
585
- </script>
586
-
587
- <!-- b-modal-variants.vue -->
588
- ```
589
-
590
- You can also apply arbitrary classes to the modal dialog container, content (modal window itself),
474
+ You can apply arbitrary classes to the modal dialog container, content (modal window itself),
591
475
  header, body and footer via the `modal-class`, `content-class`, `header-class`, `body-class` and
592
476
  `footer-class` props, respectively. The props accept either a string or array of strings.
593
477
 
@@ -28,18 +28,8 @@ export interface BvMsgBoxOptions {
28
28
  noFade?: boolean
29
29
  noCloseOnBackdrop?: boolean
30
30
  noCloseOnEsc?: boolean
31
- headerBgVariant?: string
32
- headerBorderVariant?: string
33
- headerTextVariant?: string
34
- headerCloseVariant?: string
35
31
  headerClass?: string | string[] | Array<any>
36
- bodyBgVariant?: string
37
- bodyBorderVariant?: string
38
- bodyTextVariant?: string
39
32
  bodyClass?: string | string[] | Array<any>
40
- footerBgVariant?: string
41
- footerBorderVariant?: string
42
- footerTextVariant?: string
43
33
  footerClass?: string | string[] | Array<any>
44
34
  headerCloseLabel?: string
45
35
  buttonSize?: string
@@ -113,9 +113,7 @@ export const props = makePropsConfigurable(
113
113
  return isUndefinedOrNull(value) || arrayIncludes(BUTTONS, value)
114
114
  }
115
115
  ),
116
- bodyBgVariant: makeProp(PROP_TYPE_STRING),
117
116
  bodyClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
118
- bodyTextVariant: makeProp(PROP_TYPE_STRING),
119
117
  busy: makeProp(PROP_TYPE_BOOLEAN, false),
120
118
  buttonSize: makeProp(PROP_TYPE_STRING),
121
119
  cancelDisabled: makeProp(PROP_TYPE_BOOLEAN, false),
@@ -125,19 +123,12 @@ export const props = makePropsConfigurable(
125
123
  centered: makeProp(PROP_TYPE_BOOLEAN, false),
126
124
  contentClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
127
125
  dialogClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
128
- footerBgVariant: makeProp(PROP_TYPE_STRING),
129
- footerBorderVariant: makeProp(PROP_TYPE_STRING),
130
126
  footerClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
131
127
  footerTag: makeProp(PROP_TYPE_STRING, 'footer'),
132
- footerTextVariant: makeProp(PROP_TYPE_STRING),
133
- headerBgVariant: makeProp(PROP_TYPE_STRING),
134
- headerBorderVariant: makeProp(PROP_TYPE_STRING),
135
128
  headerClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
136
129
  headerCloseContent: makeProp(PROP_TYPE_STRING, '&times;'),
137
130
  headerCloseLabel: makeProp(PROP_TYPE_STRING, 'Close'),
138
- headerCloseVariant: makeProp(PROP_TYPE_STRING),
139
131
  headerTag: makeProp(PROP_TYPE_STRING, 'header'),
140
- headerTextVariant: makeProp(PROP_TYPE_STRING),
141
132
  // TODO: Rename to `noBackdrop` and deprecate `hideBackdrop`
142
133
  hideBackdrop: makeProp(PROP_TYPE_BOOLEAN, false),
143
134
  // TODO: Rename to `noFooter` and deprecate `hideFooter`
@@ -260,38 +251,9 @@ export const BModal = /*#__PURE__*/ extend({
260
251
  this.dialogClass
261
252
  ]
262
253
  },
263
- headerClasses() {
264
- return [
265
- {
266
- [`bg-${this.headerBgVariant}`]: this.headerBgVariant,
267
- [`text-${this.headerTextVariant}`]: this.headerTextVariant,
268
- [`border-${this.headerBorderVariant}`]: this.headerBorderVariant
269
- },
270
- this.headerClass
271
- ]
272
- },
273
254
  titleClasses() {
274
255
  return [{ 'sr-only': this.titleSrOnly }, this.titleClass]
275
256
  },
276
- bodyClasses() {
277
- return [
278
- {
279
- [`bg-${this.bodyBgVariant}`]: this.bodyBgVariant,
280
- [`text-${this.bodyTextVariant}`]: this.bodyTextVariant
281
- },
282
- this.bodyClass
283
- ]
284
- },
285
- footerClasses() {
286
- return [
287
- {
288
- [`bg-${this.footerBgVariant}`]: this.footerBgVariant,
289
- [`text-${this.footerTextVariant}`]: this.footerTextVariant,
290
- [`border-${this.footerBorderVariant}`]: this.footerBorderVariant
291
- },
292
- this.footerClass
293
- ]
294
- },
295
257
  modalOuterStyle() {
296
258
  // Styles needed for proper stacking of modals
297
259
  return {
@@ -783,8 +745,7 @@ export const BModal = /*#__PURE__*/ extend({
783
745
  props: {
784
746
  content: this.headerCloseContent,
785
747
  disabled: this.isTransitioning,
786
- ariaLabel: this.headerCloseLabel,
787
- textVariant: this.headerCloseVariant || this.headerTextVariant
748
+ ariaLabel: this.headerCloseLabel
788
749
  },
789
750
  on: { click: this.onClose },
790
751
  ref: 'close-button'
@@ -817,7 +778,7 @@ export const BModal = /*#__PURE__*/ extend({
817
778
  this.headerTag,
818
779
  {
819
780
  staticClass: 'modal-header',
820
- class: this.headerClasses,
781
+ class: this.headerClass,
821
782
  attrs: { id: this.modalHeaderId },
822
783
  ref: 'header'
823
784
  },
@@ -830,7 +791,7 @@ export const BModal = /*#__PURE__*/ extend({
830
791
  'div',
831
792
  {
832
793
  staticClass: 'modal-body',
833
- class: this.bodyClasses,
794
+ class: this.bodyClass,
834
795
  attrs: { id: this.modalBodyId },
835
796
  ref: 'body'
836
797
  },
@@ -891,7 +852,7 @@ export const BModal = /*#__PURE__*/ extend({
891
852
  this.footerTag,
892
853
  {
893
854
  staticClass: 'modal-footer',
894
- class: this.footerClasses,
855
+ class: this.footerClass,
895
856
  attrs: { id: this.modalFooterId },
896
857
  ref: 'footer'
897
858
  },