@gitlab/ui 112.2.2 → 112.3.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 (182) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/bin/migrate_custom_utils_to_tw.bundled.mjs +209 -32
  3. package/dist/components/base/accordion/accordion.js +1 -1
  4. package/dist/components/base/accordion/accordion_item.js +1 -1
  5. package/dist/components/base/alert/alert.js +1 -1
  6. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +1 -1
  7. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +1 -1
  8. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +1 -1
  9. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +1 -1
  10. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +1 -1
  11. package/dist/components/base/animated_icon/animated_loader_icon.js +1 -1
  12. package/dist/components/base/animated_icon/animated_notifications_icon.js +1 -1
  13. package/dist/components/base/animated_icon/animated_sidebar_icon.js +1 -1
  14. package/dist/components/base/animated_icon/animated_smile_icon.js +1 -1
  15. package/dist/components/base/animated_icon/animated_sort_icon.js +1 -1
  16. package/dist/components/base/animated_icon/animated_star_icon.js +1 -1
  17. package/dist/components/base/animated_icon/animated_todo_icon.js +1 -1
  18. package/dist/components/base/animated_icon/animated_upload_icon.js +1 -1
  19. package/dist/components/base/animated_icon/base_animated_icon.js +1 -1
  20. package/dist/components/base/avatar/avatar.js +1 -1
  21. package/dist/components/base/avatar_labeled/avatar_labeled.js +1 -1
  22. package/dist/components/base/avatar_link/avatar_link.js +1 -1
  23. package/dist/components/base/avatars_inline/avatars_inline.js +1 -1
  24. package/dist/components/base/badge/badge.js +1 -1
  25. package/dist/components/base/banner/banner.js +1 -1
  26. package/dist/components/base/breadcrumb/breadcrumb.js +1 -1
  27. package/dist/components/base/breadcrumb/breadcrumb_item.js +1 -1
  28. package/dist/components/base/broadcast_message/broadcast_message.js +1 -1
  29. package/dist/components/base/button/button.js +1 -1
  30. package/dist/components/base/button_group/button_group.js +1 -1
  31. package/dist/components/base/card/card.js +1 -1
  32. package/dist/components/base/collapse/collapse.js +1 -1
  33. package/dist/components/base/datepicker/datepicker.js +1 -2
  34. package/dist/components/base/daterange_picker/daterange_picker.js +1 -1
  35. package/dist/components/base/drawer/drawer.js +1 -1
  36. package/dist/components/base/dropdown/dropdown.js +1 -2
  37. package/dist/components/base/dropdown/dropdown_divider.js +1 -1
  38. package/dist/components/base/dropdown/dropdown_form.js +1 -1
  39. package/dist/components/base/dropdown/dropdown_item.js +1 -1
  40. package/dist/components/base/dropdown/dropdown_section_header.js +1 -1
  41. package/dist/components/base/dropdown/dropdown_text.js +1 -1
  42. package/dist/components/base/filtered_search/filtered_search.js +2 -2
  43. package/dist/components/base/filtered_search/filtered_search_suggestion.js +1 -1
  44. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +1 -1
  45. package/dist/components/base/filtered_search/filtered_search_term.js +1 -1
  46. package/dist/components/base/filtered_search/filtered_search_token.js +1 -1
  47. package/dist/components/base/filtered_search/filtered_search_token_segment.js +1 -1
  48. package/dist/components/base/form/form.js +1 -1
  49. package/dist/components/base/form/form_character_count/form_character_count.js +1 -1
  50. package/dist/components/base/form/form_checkbox/form_checkbox.js +1 -1
  51. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -1
  52. package/dist/components/base/form/form_checkbox_tree/checkbox_tree_node.js +1 -1
  53. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.js +1 -1
  54. package/dist/components/base/form/form_combobox/form_combobox.js +1 -1
  55. package/dist/components/base/form/form_date/form_date.js +1 -1
  56. package/dist/components/base/form/form_fields/form_field_validator.js +1 -1
  57. package/dist/components/base/form/form_fields/form_fields.js +1 -1
  58. package/dist/components/base/form/form_group/form_group.js +1 -1
  59. package/dist/components/base/form/form_input/form_input.js +1 -1
  60. package/dist/components/base/form/form_input_group/form_input_group.js +1 -1
  61. package/dist/components/base/form/form_radio/form_radio.js +1 -1
  62. package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -1
  63. package/dist/components/base/form/form_select/form_select.js +1 -1
  64. package/dist/components/base/form/form_textarea/form_textarea.js +1 -1
  65. package/dist/components/base/form/input_group_text/input_group_text.js +1 -1
  66. package/dist/components/base/icon/icon.js +1 -1
  67. package/dist/components/base/infinite_scroll/infinite_scroll.js +1 -2
  68. package/dist/components/base/keyset_pagination/keyset_pagination.js +1 -1
  69. package/dist/components/base/label/label.js +1 -1
  70. package/dist/components/base/link/link.js +1 -1
  71. package/dist/components/base/loading_icon/loading_icon.js +1 -1
  72. package/dist/components/base/markdown/markdown.js +1 -1
  73. package/dist/components/base/modal/modal.js +1 -1
  74. package/dist/components/base/nav/nav.js +90 -6
  75. package/dist/components/base/nav/nav_item.js +1 -1
  76. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +1 -2
  77. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +1 -2
  78. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +1 -2
  79. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +1 -2
  80. package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -2
  81. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +1 -1
  82. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +1 -1
  83. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +1 -1
  84. package/dist/components/base/pagination/pagination.js +1 -1
  85. package/dist/components/base/path/path.js +1 -1
  86. package/dist/components/base/popover/popover.js +1 -1
  87. package/dist/components/base/progress_bar/progress_bar.js +1 -1
  88. package/dist/components/base/search_box_by_click/search_box_by_click.js +2 -2
  89. package/dist/components/base/search_box_by_type/search_box_by_type.js +1 -1
  90. package/dist/components/base/segmented_control/segmented_control.js +1 -1
  91. package/dist/components/base/skeleton_loader/skeleton_loader.js +1 -1
  92. package/dist/components/base/sorting/sorting.js +1 -1
  93. package/dist/components/base/table/table.js +2 -2
  94. package/dist/components/base/table_lite/table_lite.js +1 -1
  95. package/dist/components/base/tabs/tab/tab.js +1 -1
  96. package/dist/components/base/tabs/tabs/scrollable_tabs.js +1 -1
  97. package/dist/components/base/tabs/tabs/tabs.js +1 -1
  98. package/dist/components/base/toast/toast.js +1 -1
  99. package/dist/components/base/toggle/toggle.js +1 -1
  100. package/dist/components/base/token/token.js +1 -1
  101. package/dist/components/base/token_selector/token_container.js +1 -1
  102. package/dist/components/base/token_selector/token_selector.js +1 -1
  103. package/dist/components/base/token_selector/token_selector_dropdown.js +1 -1
  104. package/dist/components/base/tooltip/tooltip.js +1 -1
  105. package/dist/components/charts/area/area.js +1 -1
  106. package/dist/components/charts/bar/bar.js +1 -1
  107. package/dist/components/charts/chart/chart.js +1 -1
  108. package/dist/components/charts/column/column.js +1 -1
  109. package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
  110. package/dist/components/charts/gauge/gauge.js +2 -2
  111. package/dist/components/charts/heatmap/heatmap.js +1 -1
  112. package/dist/components/charts/legend/legend.js +1 -1
  113. package/dist/components/charts/line/line.js +1 -1
  114. package/dist/components/charts/series_label/series_label.js +1 -1
  115. package/dist/components/charts/shared/tooltip/tooltip.js +1 -1
  116. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +1 -1
  117. package/dist/components/charts/single_stat/single_stat.js +1 -1
  118. package/dist/components/charts/sparkline/sparkline.js +1 -1
  119. package/dist/components/charts/stacked_column/stacked_column.js +1 -1
  120. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +1 -1
  121. package/dist/components/experimental/experiment_badge/experiment_badge.js +1 -2
  122. package/dist/components/mixins/tooltip_mixin.js +1 -1
  123. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +1 -1
  124. package/dist/components/regions/empty_state/empty_state.js +1 -1
  125. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +1 -1
  126. package/dist/components/shared_components/close_button/close_button.js +1 -1
  127. package/dist/components/utilities/animated_number/animated_number.js +1 -1
  128. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +1 -1
  129. package/dist/components/utilities/intersection_observer/intersection_observer.js +1 -1
  130. package/dist/components/utilities/intersperse/intersperse.js +1 -1
  131. package/dist/components/utilities/sprintf/sprintf.js +1 -1
  132. package/dist/components/utilities/truncate/truncate.js +1 -1
  133. package/dist/components/utilities/truncate_text/truncate_text.js +1 -1
  134. package/dist/config.js +1 -2
  135. package/dist/index.css +2 -2
  136. package/dist/index.css.map +1 -1
  137. package/dist/tailwind.css +1 -1
  138. package/dist/tokens/build/js/tokens.dark.js +80 -80
  139. package/dist/tokens/build/js/tokens.js +179 -179
  140. package/dist/tokens/css/tokens.css +50 -50
  141. package/dist/tokens/css/tokens.dark.css +25 -25
  142. package/dist/tokens/js/tokens.dark.js +80 -80
  143. package/dist/tokens/js/tokens.js +179 -179
  144. package/dist/tokens/json/tokens.dark.json +130 -130
  145. package/dist/tokens/json/tokens.json +229 -229
  146. package/dist/tokens/scss/_tokens.dark.scss +25 -25
  147. package/dist/tokens/scss/_tokens.scss +50 -50
  148. package/dist/tokens/tailwind/tokens.cjs +47 -47
  149. package/dist/tokens/tokens_story.js +1 -1
  150. package/dist/tokens/tokens_table.js +1 -1
  151. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  152. package/dist/vendor/bootstrap-vue/src/utils/cache.js +1 -1
  153. package/dist/vendor/bootstrap-vue/src/utils/props.js +1 -1
  154. package/dist/vendor/bootstrap-vue/src/utils/router.js +1 -1
  155. package/package.json +2 -2
  156. package/src/components/base/nav/nav.md +182 -4
  157. package/src/components/base/nav/nav.vue +60 -7
  158. package/src/components/base/search_box_by_click/search_box_by_click.vue +9 -3
  159. package/src/tokens/build/css/tokens.css +50 -50
  160. package/src/tokens/build/css/tokens.dark.css +25 -25
  161. package/src/tokens/build/figma/constants.tokens.json +25 -25
  162. package/src/tokens/build/figma/deprecated.tokens.json +25 -25
  163. package/src/tokens/build/js/tokens.dark.js +80 -80
  164. package/src/tokens/build/js/tokens.js +179 -179
  165. package/src/tokens/build/json/tokens.dark.json +130 -130
  166. package/src/tokens/build/json/tokens.json +229 -229
  167. package/src/tokens/build/scss/_tokens.dark.scss +25 -25
  168. package/src/tokens/build/scss/_tokens.scss +50 -50
  169. package/src/tokens/build/tailwind/tokens.cjs +47 -47
  170. package/src/tokens/constant/color.tokens.json +25 -25
  171. package/src/tokens/deprecated/deprecated.color.tokens.json +25 -25
  172. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  173. package/dist/vendor/bootstrap-vue/src/components/collapse/collapse.js +0 -207
  174. package/dist/vendor/bootstrap-vue/src/components/collapse/helpers/bv-collapse.js +0 -90
  175. package/dist/vendor/bootstrap-vue/src/components/collapse/index.js +0 -1
  176. package/src/vendor/bootstrap-vue/src/components/collapse/MODIFICATIONS.md +0 -14
  177. package/src/vendor/bootstrap-vue/src/components/collapse/README.md +0 -321
  178. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.js +0 -207
  179. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +0 -426
  180. package/src/vendor/bootstrap-vue/src/components/collapse/helpers/bv-collapse.js +0 -88
  181. package/src/vendor/bootstrap-vue/src/components/collapse/index.js +0 -3
  182. package/src/vendor/bootstrap-vue/src/components/collapse/package.json +0 -104
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "600": {
84
84
  "$value": {
85
- "default": "#1068bf",
85
+ "default": "#2f68b4",
86
86
  "dark": "#63a6e9"
87
87
  },
88
88
  "$type": "color",
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "700": {
94
94
  "$value": {
95
- "default": "#0b5cad",
95
+ "default": "#2f5ca0",
96
96
  "dark": "#9dc7f1"
97
97
  },
98
98
  "$type": "color",
@@ -102,7 +102,7 @@
102
102
  },
103
103
  "800": {
104
104
  "$value": {
105
- "default": "#064787",
105
+ "default": "#284779",
106
106
  "dark": "#cbe2f9"
107
107
  },
108
108
  "$type": "color",
@@ -112,7 +112,7 @@
112
112
  },
113
113
  "900": {
114
114
  "$value": {
115
- "default": "#033464",
115
+ "default": "#213454",
116
116
  "dark": "#e9f3fc"
117
117
  },
118
118
  "$type": "color",
@@ -122,7 +122,7 @@
122
122
  },
123
123
  "950": {
124
124
  "$value": {
125
- "default": "#002850",
125
+ "default": "#1d283e",
126
126
  "dark": "#f2f9ff"
127
127
  },
128
128
  "$type": "color",
@@ -316,7 +316,7 @@
316
316
  },
317
317
  "600": {
318
318
  "$value": {
319
- "default": "#217645",
319
+ "default": "#2f7549",
320
320
  "dark": "#52b87a"
321
321
  },
322
322
  "$type": "color",
@@ -326,7 +326,7 @@
326
326
  },
327
327
  "700": {
328
328
  "$value": {
329
- "default": "#24663b",
329
+ "default": "#306440",
330
330
  "dark": "#91d4a8"
331
331
  },
332
332
  "$type": "color",
@@ -336,7 +336,7 @@
336
336
  },
337
337
  "800": {
338
338
  "$value": {
339
- "default": "#0d532a",
339
+ "default": "#225131",
340
340
  "dark": "#c3e6cd"
341
341
  },
342
342
  "$type": "color",
@@ -346,7 +346,7 @@
346
346
  },
347
347
  "900": {
348
348
  "$value": {
349
- "default": "#0a4020",
349
+ "default": "#1e3e28",
350
350
  "dark": "#ecf4ee"
351
351
  },
352
352
  "$type": "color",
@@ -356,7 +356,7 @@
356
356
  },
357
357
  "950": {
358
358
  "$value": {
359
- "default": "#072b15",
359
+ "default": "#17291c",
360
360
  "dark": "#f1fdf6"
361
361
  },
362
362
  "$type": "color",
@@ -428,7 +428,7 @@
428
428
  },
429
429
  "600": {
430
430
  "$value": {
431
- "default": "#9e5400",
431
+ "default": "#995715",
432
432
  "dark": "#d99530"
433
433
  },
434
434
  "$type": "color",
@@ -438,7 +438,7 @@
438
438
  },
439
439
  "700": {
440
440
  "$value": {
441
- "default": "#8f4700",
441
+ "default": "#894b16",
442
442
  "dark": "#e9be74"
443
443
  },
444
444
  "$type": "color",
@@ -448,7 +448,7 @@
448
448
  },
449
449
  "800": {
450
450
  "$value": {
451
- "default": "#703800",
451
+ "default": "#693c14",
452
452
  "dark": "#f5d9a8"
453
453
  },
454
454
  "$type": "color",
@@ -458,7 +458,7 @@
458
458
  },
459
459
  "900": {
460
460
  "$value": {
461
- "default": "#5c2900",
461
+ "default": "#532e16",
462
462
  "dark": "#fdf1dd"
463
463
  },
464
464
  "$type": "color",
@@ -468,7 +468,7 @@
468
468
  },
469
469
  "950": {
470
470
  "$value": {
471
- "default": "#421f00",
471
+ "default": "#382315",
472
472
  "dark": "#fff4e1"
473
473
  },
474
474
  "$type": "color",
@@ -540,7 +540,7 @@
540
540
  },
541
541
  "600": {
542
542
  "$value": {
543
- "default": "#694cc0",
543
+ "default": "#6a4fb4",
544
544
  "dark": "#9475db"
545
545
  },
546
546
  "$type": "color",
@@ -550,7 +550,7 @@
550
550
  },
551
551
  "700": {
552
552
  "$value": {
553
- "default": "#5943b6",
553
+ "default": "#5c47a6",
554
554
  "dark": "#ac93e6"
555
555
  },
556
556
  "$type": "color",
@@ -560,7 +560,7 @@
560
560
  },
561
561
  "800": {
562
562
  "$value": {
563
- "default": "#453894",
563
+ "default": "#493c83",
564
564
  "dark": "#cbbbf2"
565
565
  },
566
566
  "$type": "color",
@@ -570,7 +570,7 @@
570
570
  },
571
571
  "900": {
572
572
  "$value": {
573
- "default": "#2f2a6b",
573
+ "default": "#342d59",
574
574
  "dark": "#e1d8f9"
575
575
  },
576
576
  "$type": "color",
@@ -580,7 +580,7 @@
580
580
  },
581
581
  "950": {
582
582
  "$value": {
583
- "default": "#232150",
583
+ "default": "#27243e",
584
584
  "dark": "#f4f0ff"
585
585
  },
586
586
  "$type": "color",
@@ -652,7 +652,7 @@
652
652
  },
653
653
  "600": {
654
654
  "$value": {
655
- "default": "#c91c00",
655
+ "default": "#c02f12",
656
656
  "dark": "#f57f6c"
657
657
  },
658
658
  "$type": "color",
@@ -662,7 +662,7 @@
662
662
  },
663
663
  "700": {
664
664
  "$value": {
665
- "default": "#ae1800",
665
+ "default": "#a32c12",
666
666
  "dark": "#fcb5aa"
667
667
  },
668
668
  "$type": "color",
@@ -672,7 +672,7 @@
672
672
  },
673
673
  "800": {
674
674
  "$value": {
675
- "default": "#8d1300",
675
+ "default": "#812713",
676
676
  "dark": "#fdd4cd"
677
677
  },
678
678
  "$type": "color",
@@ -682,7 +682,7 @@
682
682
  },
683
683
  "900": {
684
684
  "$value": {
685
- "default": "#660e00",
685
+ "default": "#582014",
686
686
  "dark": "#fcf1ef"
687
687
  },
688
688
  "$type": "color",
@@ -692,7 +692,7 @@
692
692
  },
693
693
  "950": {
694
694
  "$value": {
695
- "default": "#4d0a00",
695
+ "default": "#3e1a14",
696
696
  "dark": "#fff4f3"
697
697
  },
698
698
  "$type": "color",
@@ -2,7 +2,6 @@
2
2
  export const NAME_BUTTON = 'BButton'
3
3
  export const NAME_BUTTON_CLOSE = 'BButtonClose'
4
4
  export const NAME_COL = 'BCol'
5
- export const NAME_COLLAPSE = 'BCollapse'
6
5
  export const NAME_DROPDOWN = 'BDropdown'
7
6
  export const NAME_DROPDOWN_DIVIDER = 'BDropdownDivider'
8
7
  export const NAME_DROPDOWN_FORM = 'BDropdownForm'
@@ -46,7 +45,6 @@ export const NAME_TOOLTIP = 'BTooltip'
46
45
  export const NAME_TR = 'BTr'
47
46
 
48
47
  // Helper component names
49
- export const NAME_COLLAPSE_HELPER = 'BVCollapse'
50
48
  export const NAME_FORM_BUTTON_LABEL_CONTROL = 'BVFormBtnLabelControl'
51
49
  export const NAME_FORM_RATING_STAR = 'BVFormRatingStar'
52
50
  export const NAME_POPOVER_HELPER = 'BVPopover'
@@ -1,207 +0,0 @@
1
- import { extend } from '../../vue';
2
- import { NAME_COLLAPSE } from '../../constants/components';
3
- import { EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_HIDE, EVENT_NAME_HIDDEN } from '../../constants/events';
4
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';
5
- import { SLOT_NAME_DEFAULT } from '../../constants/slots';
6
- import { getRootActionEventName, getRootEventName } from '../../utils/events';
7
- import { makeModelMixin } from '../../utils/model';
8
- import { sortKeys } from '../../utils/object';
9
- import { makePropsConfigurable, makeProp } from '../../utils/props';
10
- import { props as props$1, idMixin } from '../../mixins/id';
11
- import { listenOnRootMixin } from '../../mixins/listen-on-root';
12
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
13
- import { BVCollapse } from './helpers/bv-collapse';
14
-
15
- // --- Constants ---
16
- const ROOT_ACTION_EVENT_NAME_TOGGLE = getRootActionEventName(NAME_COLLAPSE, 'toggle');
17
- const ROOT_ACTION_EVENT_NAME_REQUEST_STATE = getRootActionEventName(NAME_COLLAPSE, 'request-state');
18
- const ROOT_EVENT_NAME_ACCORDION = getRootEventName(NAME_COLLAPSE, 'accordion');
19
- const ROOT_EVENT_NAME_STATE = getRootEventName(NAME_COLLAPSE, 'state');
20
- const ROOT_EVENT_NAME_SYNC_STATE = getRootEventName(NAME_COLLAPSE, 'sync-state');
21
- const {
22
- mixin: modelMixin,
23
- props: modelProps,
24
- prop: MODEL_PROP_NAME,
25
- event: MODEL_EVENT_NAME
26
- } = makeModelMixin('visible', {
27
- type: PROP_TYPE_BOOLEAN,
28
- defaultValue: false
29
- });
30
-
31
- // --- Props ---
32
-
33
- const props = makePropsConfigurable(sortKeys({
34
- ...props$1,
35
- ...modelProps,
36
- // If `true` (and `visible` is `true` on mount), animate initially visible
37
- accordion: makeProp(PROP_TYPE_STRING),
38
- appear: makeProp(PROP_TYPE_BOOLEAN, false),
39
- tag: makeProp(PROP_TYPE_STRING, 'div')
40
- }), NAME_COLLAPSE);
41
-
42
- // --- Main component ---
43
-
44
- // @vue/component
45
- const BCollapse = /*#__PURE__*/extend({
46
- name: NAME_COLLAPSE,
47
- mixins: [idMixin, modelMixin, normalizeSlotMixin, listenOnRootMixin],
48
- props,
49
- data() {
50
- return {
51
- show: this[MODEL_PROP_NAME],
52
- transitioning: false
53
- };
54
- },
55
- computed: {
56
- classObject() {
57
- const {
58
- transitioning
59
- } = this;
60
- return {
61
- collapse: !transitioning,
62
- show: this.show && !transitioning
63
- };
64
- },
65
- slotScope() {
66
- return {
67
- visible: this.show,
68
- close: () => {
69
- this.show = false;
70
- }
71
- };
72
- }
73
- },
74
- watch: {
75
- [MODEL_PROP_NAME](newValue) {
76
- if (newValue !== this.show) {
77
- this.show = newValue;
78
- }
79
- },
80
- show(newValue, oldValue) {
81
- if (newValue !== oldValue) {
82
- this.emitState();
83
- }
84
- }
85
- },
86
- created() {
87
- this.show = this[MODEL_PROP_NAME];
88
- },
89
- mounted() {
90
- this.show = this[MODEL_PROP_NAME];
91
- // Listen for toggle events to open/close us
92
- this.listenOnRoot(ROOT_ACTION_EVENT_NAME_TOGGLE, this.handleToggleEvent);
93
- // Listen to other collapses for accordion events
94
- this.listenOnRoot(ROOT_EVENT_NAME_ACCORDION, this.handleAccordionEvent);
95
- this.$nextTick(() => {
96
- this.emitState();
97
- });
98
- // Listen for "Sync state" requests from `v-b-toggle`
99
- this.listenOnRoot(ROOT_ACTION_EVENT_NAME_REQUEST_STATE, id => {
100
- if (id === this.safeId()) {
101
- this.$nextTick(this.emitSync);
102
- }
103
- });
104
- },
105
- updated() {
106
- // Emit a private event every time this component updates to ensure
107
- // the toggle button is in sync with the collapse's state
108
- // It is emitted regardless if the visible state changes
109
- this.emitSync();
110
- },
111
- beforeDestroy() {
112
- // Trigger state emit if needed
113
- this.show = false;
114
- },
115
- methods: {
116
- toggle() {
117
- this.show = !this.show;
118
- },
119
- onEnter() {
120
- this.transitioning = true;
121
- // This should be moved out so we can add cancellable events
122
- this.$emit(EVENT_NAME_SHOW);
123
- },
124
- onAfterEnter() {
125
- this.transitioning = false;
126
- this.$emit(EVENT_NAME_SHOWN);
127
- },
128
- onLeave() {
129
- this.transitioning = true;
130
- // This should be moved out so we can add cancellable events
131
- this.$emit(EVENT_NAME_HIDE);
132
- },
133
- onAfterLeave() {
134
- this.transitioning = false;
135
- this.$emit(EVENT_NAME_HIDDEN);
136
- },
137
- emitState() {
138
- const {
139
- show,
140
- accordion
141
- } = this;
142
- const id = this.safeId();
143
- this.$emit(MODEL_EVENT_NAME, show);
144
-
145
- // Let `v-b-toggle` know the state of this collapse
146
- this.emitOnRoot(ROOT_EVENT_NAME_STATE, id, show);
147
- if (accordion && show) {
148
- // Tell the other collapses in this accordion to close
149
- this.emitOnRoot(ROOT_EVENT_NAME_ACCORDION, id, accordion);
150
- }
151
- },
152
- emitSync() {
153
- // Emit a private event every time this component updates to ensure
154
- // the toggle button is in sync with the collapse's state
155
- // It is emitted regardless if the visible state changes
156
- this.emitOnRoot(ROOT_EVENT_NAME_SYNC_STATE, this.safeId(), this.show);
157
- },
158
- handleToggleEvent(id) {
159
- if (id === this.safeId()) {
160
- this.toggle();
161
- }
162
- },
163
- handleAccordionEvent(openedId, openAccordion) {
164
- const {
165
- accordion,
166
- show
167
- } = this;
168
- if (!accordion || accordion !== openAccordion) {
169
- return;
170
- }
171
- const isThis = openedId === this.safeId();
172
- // Open this collapse if not shown or
173
- // close this collapse if shown
174
- if (isThis && !show || !isThis && show) {
175
- this.toggle();
176
- }
177
- }
178
- },
179
- render(h) {
180
- const {
181
- appear
182
- } = this;
183
- const $content = h(this.tag, {
184
- class: this.classObject,
185
- directives: [{
186
- name: 'show',
187
- value: this.show
188
- }],
189
- attrs: {
190
- id: this.safeId()
191
- }
192
- }, this.normalizeSlot(SLOT_NAME_DEFAULT, this.slotScope));
193
- return h(BVCollapse, {
194
- props: {
195
- appear
196
- },
197
- on: {
198
- enter: this.onEnter,
199
- afterEnter: this.onAfterEnter,
200
- leave: this.onLeave,
201
- afterLeave: this.onAfterLeave
202
- }
203
- }, [$content]);
204
- }
205
- });
206
-
207
- export { BCollapse, props };
@@ -1,90 +0,0 @@
1
- import { extend, mergeData } from '../../../vue';
2
- import { NAME_COLLAPSE_HELPER } from '../../../constants/components';
3
- import { PROP_TYPE_BOOLEAN } from '../../../constants/props';
4
- import { setStyle, requestAF, reflow, removeStyle, getBCR } from '../../../utils/dom';
5
- import { makeProp } from '../../../utils/props';
6
-
7
- // Generic collapse transion helper component
8
-
9
- // --- Helper methods ---
10
-
11
- // Transition event handler helpers
12
- const onEnter = el => {
13
- setStyle(el, 'height', 0);
14
- // In a `requestAF()` for `appear` to work
15
- requestAF(() => {
16
- reflow(el);
17
- setStyle(el, 'height', `${el.scrollHeight}px`);
18
- });
19
- };
20
- const onAfterEnter = el => {
21
- removeStyle(el, 'height');
22
- };
23
- const onLeave = el => {
24
- setStyle(el, 'height', 'auto');
25
- setStyle(el, 'display', 'block');
26
- setStyle(el, 'height', `${getBCR(el).height}px`);
27
- reflow(el);
28
- setStyle(el, 'height', 0);
29
- };
30
- const onAfterLeave = el => {
31
- removeStyle(el, 'height');
32
- };
33
-
34
- // --- Constants ---
35
-
36
- // Default transition props
37
- // `appear` will use the enter classes
38
- const TRANSITION_PROPS = {
39
- css: true,
40
- enterClass: '',
41
- enterActiveClass: 'collapsing',
42
- enterToClass: 'collapse show',
43
- leaveClass: 'collapse show',
44
- leaveActiveClass: 'collapsing',
45
- leaveToClass: 'collapse'
46
- };
47
-
48
- // Default transition handlers
49
- // `appear` will use the enter handlers
50
- const TRANSITION_HANDLERS = {
51
- enter: onEnter,
52
- afterEnter: onAfterEnter,
53
- leave: onLeave,
54
- afterLeave: onAfterLeave
55
- };
56
-
57
- // --- Main component ---
58
-
59
- const props = {
60
- // // If `true` (and `visible` is `true` on mount), animate initially visible
61
- appear: makeProp(PROP_TYPE_BOOLEAN, false)
62
- };
63
-
64
- // --- Main component ---
65
-
66
- // @vue/component
67
- const BVCollapse = /*#__PURE__*/extend({
68
- name: NAME_COLLAPSE_HELPER,
69
- functional: true,
70
- props,
71
- render(h, _ref) {
72
- let {
73
- props,
74
- data,
75
- children
76
- } = _ref;
77
- return h('transition',
78
- // We merge in the `appear` prop last
79
- mergeData(data, {
80
- props: TRANSITION_PROPS,
81
- on: TRANSITION_HANDLERS
82
- }, {
83
- props
84
- }),
85
- // Note: `<transition>` supports a single root element only
86
- children);
87
- }
88
- });
89
-
90
- export { BVCollapse, props };
@@ -1 +0,0 @@
1
- export { BCollapse } from './collapse';
@@ -1,14 +0,0 @@
1
- # Modifications to Vendored Code
2
-
3
- **Library**: BootstrapVue
4
- **Version**: 2.23.1 **Link:** https://bootstrap-vue.org **Source:**
5
- https://github.com/bootstrap-vue/bootstrap-vue **Copyright:** (c) 2016-2024 BootstrapVue
6
- **License:** (c)
7
- [2016-2024 BootstrapVue](https://github.com/bootstrap-vue/bootstrap-vue/blob/master/LICENSE)
8
-
9
- This file documents modifications made to the original BootstrapVue component files.
10
-
11
- ## Removed props
12
-
13
- The property `isNav` and code executed based on this property has been removed, as we removed the
14
- Navbar logic.