@gitlab/ui 131.2.0 → 131.3.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 (402) hide show
  1. package/package.json +11 -11
  2. package/src/components/base/form/form_checkbox/form_checkbox.vue +1 -2
  3. package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
  4. package/src/components/base/form/form_radio/form_radio.vue +1 -1
  5. package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
  6. package/src/components/base/table/table.scss +8 -0
  7. package/src/components/utilities/truncate/truncate.scss +3 -1
  8. package/src/scss/mixins.scss +3 -1
  9. package/src/utils/equality_utils.js +82 -0
  10. package/src/vendor/bootstrap-vue/src/components/button/button-close.js +20 -5
  11. package/src/vendor/bootstrap-vue/src/components/button/button.js +36 -8
  12. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +12 -4
  13. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +16 -5
  14. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +99 -24
  15. package/src/vendor/bootstrap-vue/src/components/form/form-text.js +20 -5
  16. package/src/vendor/bootstrap-vue/src/components/form/form.js +20 -5
  17. package/src/vendor/bootstrap-vue/src/components/layout/form-row.js +5 -2
  18. package/src/vendor/bootstrap-vue/src/components/table/tbody.js +10 -3
  19. package/src/vendor/bootstrap-vue/src/components/table/td.js +28 -7
  20. package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +5 -2
  21. package/src/vendor/bootstrap-vue/src/components/table/thead.js +5 -2
  22. package/src/vendor/bootstrap-vue/src/components/table/tr.js +5 -2
  23. package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +51 -12
  24. package/tailwind.defaults.js +10 -1
  25. package/dist/charts.js +0 -13
  26. package/dist/components/base/accordion/accordion.js +0 -69
  27. package/dist/components/base/accordion/accordion_item.js +0 -160
  28. package/dist/components/base/accordion/constants.js +0 -3
  29. package/dist/components/base/alert/alert.js +0 -263
  30. package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
  31. package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
  32. package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
  33. package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
  34. package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
  35. package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
  36. package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
  37. package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
  38. package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
  39. package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
  40. package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
  41. package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
  42. package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
  43. package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
  44. package/dist/components/base/attribute_list/attribute_list.js +0 -100
  45. package/dist/components/base/avatar/avatar.js +0 -175
  46. package/dist/components/base/avatar/utils.js +0 -17
  47. package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
  48. package/dist/components/base/avatar_link/avatar_link.js +0 -47
  49. package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
  50. package/dist/components/base/badge/badge.js +0 -197
  51. package/dist/components/base/banner/banner.js +0 -149
  52. package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
  53. package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
  54. package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
  55. package/dist/components/base/broadcast_message/constants.js +0 -5
  56. package/dist/components/base/button/button.js +0 -419
  57. package/dist/components/base/button_group/button_group.js +0 -53
  58. package/dist/components/base/card/card.js +0 -69
  59. package/dist/components/base/collapse/collapse.js +0 -163
  60. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
  61. package/dist/components/base/datepicker/datepicker.js +0 -475
  62. package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
  63. package/dist/components/base/drawer/drawer.js +0 -156
  64. package/dist/components/base/dropdown/dropdown.js +0 -330
  65. package/dist/components/base/dropdown/dropdown_divider.js +0 -48
  66. package/dist/components/base/dropdown/dropdown_form.js +0 -48
  67. package/dist/components/base/dropdown/dropdown_item.js +0 -175
  68. package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
  69. package/dist/components/base/dropdown/dropdown_text.js +0 -48
  70. package/dist/components/base/filtered_search/common_story_options.js +0 -14
  71. package/dist/components/base/filtered_search/filtered_search.js +0 -428
  72. package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
  73. package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
  74. package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
  75. package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
  76. package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
  77. package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
  78. package/dist/components/base/form/form.js +0 -43
  79. package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
  80. package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -343
  81. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
  82. package/dist/components/base/form/form_combobox/constants.js +0 -55
  83. package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
  84. package/dist/components/base/form/form_date/form_date.js +0 -143
  85. package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
  86. package/dist/components/base/form/form_fields/form_fields.js +0 -289
  87. package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
  88. package/dist/components/base/form/form_fields/mappers.js +0 -13
  89. package/dist/components/base/form/form_fields/validators.js +0 -48
  90. package/dist/components/base/form/form_group/form_group.js +0 -119
  91. package/dist/components/base/form/form_input/form_input.js +0 -695
  92. package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
  93. package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
  94. package/dist/components/base/form/form_radio/form_radio.js +0 -259
  95. package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
  96. package/dist/components/base/form/form_select/constants.js +0 -12
  97. package/dist/components/base/form/form_select/form_select.js +0 -96
  98. package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
  99. package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
  100. package/dist/components/base/icon/icon.js +0 -113
  101. package/dist/components/base/illustration/illustration.js +0 -80
  102. package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
  103. package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
  104. package/dist/components/base/label/label.js +0 -174
  105. package/dist/components/base/link/link.js +0 -332
  106. package/dist/components/base/loading_icon/loading_icon.js +0 -120
  107. package/dist/components/base/markdown/markdown.js +0 -50
  108. package/dist/components/base/modal/modal.js +0 -259
  109. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
  110. package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
  111. package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
  112. package/dist/components/base/new_dropdowns/constants.js +0 -24
  113. package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
  114. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
  115. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
  116. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
  117. package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
  118. package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
  119. package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
  120. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
  121. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
  122. package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
  123. package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
  124. package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
  125. package/dist/components/base/pagination/pagination.js +0 -397
  126. package/dist/components/base/path/data.js +0 -34
  127. package/dist/components/base/path/path.js +0 -177
  128. package/dist/components/base/popover/popover.js +0 -142
  129. package/dist/components/base/progress_bar/progress_bar.js +0 -117
  130. package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
  131. package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
  132. package/dist/components/base/segmented_control/segmented_control.js +0 -73
  133. package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
  134. package/dist/components/base/sorting/sorting.js +0 -180
  135. package/dist/components/base/table/constants.js +0 -5
  136. package/dist/components/base/table/table.js +0 -187
  137. package/dist/components/base/table_lite/table_lite.js +0 -80
  138. package/dist/components/base/tabs/constants.js +0 -3
  139. package/dist/components/base/tabs/tab/tab.js +0 -113
  140. package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
  141. package/dist/components/base/tabs/tabs/tabs.js +0 -223
  142. package/dist/components/base/toast/index.js +0 -66
  143. package/dist/components/base/toast/toast.js +0 -125
  144. package/dist/components/base/toast/toaster.js +0 -87
  145. package/dist/components/base/toggle/toggle.js +0 -178
  146. package/dist/components/base/token/token.js +0 -97
  147. package/dist/components/base/token_selector/helpers.js +0 -5
  148. package/dist/components/base/token_selector/token_container.js +0 -160
  149. package/dist/components/base/token_selector/token_selector.js +0 -454
  150. package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
  151. package/dist/components/base/tooltip/tooltip.js +0 -54
  152. package/dist/components/charts/area/area.js +0 -329
  153. package/dist/components/charts/bar/bar.js +0 -207
  154. package/dist/components/charts/chart/chart.js +0 -215
  155. package/dist/components/charts/column/column.js +0 -221
  156. package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
  157. package/dist/components/charts/gauge/gauge.js +0 -205
  158. package/dist/components/charts/heatmap/heatmap.js +0 -299
  159. package/dist/components/charts/heatmap/index.js +0 -2
  160. package/dist/components/charts/legend/legend.js +0 -245
  161. package/dist/components/charts/line/line.js +0 -340
  162. package/dist/components/charts/series_label/series_label.js +0 -101
  163. package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
  164. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
  165. package/dist/components/charts/single_stat/single_stat.js +0 -164
  166. package/dist/components/charts/sparkline/sparkline.js +0 -299
  167. package/dist/components/charts/stacked_column/stacked_column.js +0 -380
  168. package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
  169. package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
  170. package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
  171. package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
  172. package/dist/components/dashboards/mock_data.js +0 -49
  173. package/dist/components/experimental/experiment_badge/constants.js +0 -4
  174. package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
  175. package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
  176. package/dist/components/index.js +0 -107
  177. package/dist/components/mixins/button_mixin.js +0 -11
  178. package/dist/components/mixins/safe_link_mixin.js +0 -30
  179. package/dist/components/mixins/tooltip_mixin.js +0 -21
  180. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
  181. package/dist/components/regions/empty_state/empty_state.js +0 -181
  182. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
  183. package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
  184. package/dist/components/shared_components/close_button/close_button.js +0 -55
  185. package/dist/components/utilities/animated_number/animated_number.js +0 -131
  186. package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
  187. package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
  188. package/dist/components/utilities/intersperse/intersperse.js +0 -104
  189. package/dist/components/utilities/sprintf/sprintf.js +0 -171
  190. package/dist/components/utilities/truncate/constants.js +0 -8
  191. package/dist/components/utilities/truncate/truncate.js +0 -154
  192. package/dist/components/utilities/truncate_text/constants.js +0 -7
  193. package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
  194. package/dist/config.js +0 -53
  195. package/dist/directives/hover_load/hover_load.js +0 -45
  196. package/dist/directives/index.js +0 -8
  197. package/dist/directives/modal.js +0 -1
  198. package/dist/directives/outside/outside.js +0 -149
  199. package/dist/directives/resize_observer/resize_observer.js +0 -58
  200. package/dist/directives/safe_html/constants.js +0 -6
  201. package/dist/directives/safe_html/safe_html.js +0 -39
  202. package/dist/directives/safe_link/mock_data.js +0 -10
  203. package/dist/directives/safe_link/safe_link.js +0 -67
  204. package/dist/directives/tooltip/container.js +0 -7
  205. package/dist/directives/tooltip/tooltip.js +0 -18
  206. package/dist/index.css +0 -7
  207. package/dist/index.css.map +0 -1
  208. package/dist/index.js +0 -2
  209. package/dist/tailwind.css +0 -2
  210. package/dist/tailwind.css.map +0 -1
  211. package/dist/tokens/build/js/tokens.dark.js +0 -1410
  212. package/dist/tokens/build/js/tokens.js +0 -1410
  213. package/dist/tokens/common_story_options.js +0 -29
  214. package/dist/tokens/tokens_story.js +0 -76
  215. package/dist/utils/breakpoints.js +0 -20
  216. package/dist/utils/charts/config.js +0 -616
  217. package/dist/utils/charts/constants.js +0 -69
  218. package/dist/utils/charts/mock_data.js +0 -191
  219. package/dist/utils/charts/story_config.js +0 -24
  220. package/dist/utils/charts/theme.js +0 -200
  221. package/dist/utils/charts/utils.js +0 -54
  222. package/dist/utils/constants.js +0 -333
  223. package/dist/utils/data_utils.js +0 -19
  224. package/dist/utils/datetime_utility.js +0 -61
  225. package/dist/utils/i18n.js +0 -65
  226. package/dist/utils/is_slot_empty.js +0 -34
  227. package/dist/utils/number_utils.js +0 -132
  228. package/dist/utils/play_utils.js +0 -11
  229. package/dist/utils/set_utils.js +0 -25
  230. package/dist/utils/stories_constants.js +0 -29
  231. package/dist/utils/stories_utils.js +0 -62
  232. package/dist/utils/story_decorators/container.js +0 -19
  233. package/dist/utils/string_utils.js +0 -69
  234. package/dist/utils/svgs/svg_paths.js +0 -7
  235. package/dist/utils/test_utils.js +0 -33
  236. package/dist/utils/use_fake_date.js +0 -29
  237. package/dist/utils/use_mock_intersection_observer.js +0 -105
  238. package/dist/utils/utils.js +0 -205
  239. package/dist/utils.js +0 -5
  240. package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
  241. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -66
  242. package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -176
  243. package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
  244. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
  245. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
  246. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
  247. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
  248. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
  249. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -89
  250. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -49
  251. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -195
  252. package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
  253. package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
  254. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -40
  255. package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
  256. package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -41
  257. package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
  258. package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
  259. package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
  260. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
  261. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
  262. package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
  263. package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
  264. package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
  265. package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
  266. package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
  267. package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
  268. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -31
  269. package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
  270. package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
  271. package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
  272. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
  273. package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
  274. package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
  275. package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
  276. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
  277. package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
  278. package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
  279. package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
  280. package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
  281. package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
  282. package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
  283. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
  284. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
  285. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
  286. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
  287. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
  288. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
  289. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
  290. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
  291. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
  292. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
  293. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
  294. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
  295. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
  296. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
  297. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
  298. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
  299. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
  300. package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
  301. package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
  302. package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
  303. package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
  304. package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
  305. package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
  306. package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
  307. package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
  308. package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
  309. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -109
  310. package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -183
  311. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -93
  312. package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
  313. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -96
  314. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -118
  315. package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
  316. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -199
  317. package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
  318. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
  319. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
  320. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
  321. package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
  322. package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
  323. package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
  324. package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
  325. package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
  326. package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
  327. package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
  328. package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
  329. package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
  330. package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
  331. package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
  332. package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
  333. package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
  334. package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
  335. package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
  336. package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
  337. package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
  338. package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
  339. package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
  340. package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
  341. package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
  342. package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
  343. package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
  344. package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
  345. package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
  346. package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
  347. package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
  348. package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
  349. package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
  350. package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
  351. package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
  352. package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
  353. package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
  354. package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
  355. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
  356. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
  357. package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
  358. package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
  359. package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
  360. package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
  361. package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
  362. package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
  363. package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
  364. package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
  365. package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
  366. package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
  367. package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
  368. package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
  369. package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
  370. package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
  371. package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
  372. package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
  373. package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
  374. package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
  375. package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
  376. package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
  377. package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
  378. package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
  379. package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
  380. package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
  381. package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
  382. package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
  383. package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
  384. package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
  385. package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
  386. package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
  387. package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
  388. package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
  389. package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
  390. package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
  391. package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
  392. package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
  393. package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
  394. package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
  395. package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
  396. package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
  397. package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
  398. package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
  399. package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
  400. package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
  401. package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
  402. package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
@@ -1,348 +0,0 @@
1
- import { NAME_FORM_GROUP } from '../../constants/components';
2
- import { IS_BROWSER } from '../../constants/env';
3
- import { PROP_TYPE_BOOLEAN_NUMBER_STRING, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
4
- import { RX_SPACE_SPLIT } from '../../constants/regex';
5
- import { SLOT_NAME_LABEL, SLOT_NAME_INVALID_FEEDBACK, SLOT_NAME_VALID_FEEDBACK, SLOT_NAME_DESCRIPTION, SLOT_NAME_DEFAULT } from '../../constants/slots';
6
- import { arrayIncludes } from '../../utils/array';
7
- import { getBreakpointsUpCached } from '../../utils/config';
8
- import { cssEscape } from '../../utils/css-escape';
9
- import { select, getAttr, setAttr, removeAttr, selectAll, isVisible, attemptFocus } from '../../utils/dom';
10
- import { identity } from '../../utils/identity';
11
- import { isBoolean } from '../../utils/inspect';
12
- import { toInteger } from '../../utils/number';
13
- import { sortKeys, create, keys } from '../../utils/object';
14
- import { suffixPropName, makeProp } from '../../utils/props';
15
- import { props as props$1, formStateMixin } from '../../mixins/form-state';
16
- import { props, idMixin } from '../../mixins/id';
17
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
18
- import { BCol } from '../layout/col';
19
- import { BFormRow } from '../layout/form-row';
20
- import { BFormText } from '../form/form-text';
21
- import { BFormInvalidFeedback } from '../form/form-invalid-feedback';
22
- import { BFormValidFeedback } from '../form/form-valid-feedback';
23
-
24
- // --- Constants ---
25
-
26
- const INPUTS = ['input', 'select', 'textarea'];
27
-
28
- // Selector for finding first input in the form group
29
- const INPUT_SELECTOR = INPUTS.map(v => `${v}:not([disabled])`).join();
30
-
31
- // A list of interactive elements (tag names) inside `<b-form-group>`'s legend
32
- const LEGEND_INTERACTIVE_ELEMENTS = [...INPUTS, 'a', 'button', 'label'];
33
-
34
- // --- Props ---
35
-
36
- // Prop generator for lazy generation of props
37
- const generateProps = () => sortKeys({
38
- ...props,
39
- ...props$1,
40
- ...getBreakpointsUpCached().reduce((props, breakpoint) => {
41
- // i.e. 'content-cols', 'content-cols-sm', 'content-cols-md', ...
42
- props[suffixPropName(breakpoint, 'contentCols')] = makeProp(PROP_TYPE_BOOLEAN_NUMBER_STRING);
43
- // i.e. 'label-align', 'label-align-sm', 'label-align-md', ...
44
- props[suffixPropName(breakpoint, 'labelAlign')] = makeProp(PROP_TYPE_STRING);
45
- // i.e. 'label-cols', 'label-cols-sm', 'label-cols-md', ...
46
- props[suffixPropName(breakpoint, 'labelCols')] = makeProp(PROP_TYPE_BOOLEAN_NUMBER_STRING);
47
- return props;
48
- }, create(null)),
49
- description: makeProp(PROP_TYPE_STRING),
50
- disabled: makeProp(PROP_TYPE_BOOLEAN, false),
51
- feedbackAriaLive: makeProp(PROP_TYPE_STRING, 'assertive'),
52
- invalidFeedback: makeProp(PROP_TYPE_STRING),
53
- label: makeProp(PROP_TYPE_STRING),
54
- labelClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
55
- labelFor: makeProp(PROP_TYPE_STRING),
56
- labelId: makeProp(PROP_TYPE_STRING),
57
- labelSize: makeProp(PROP_TYPE_STRING),
58
- labelSrOnly: makeProp(PROP_TYPE_BOOLEAN, false),
59
- tooltip: makeProp(PROP_TYPE_BOOLEAN, false),
60
- validFeedback: makeProp(PROP_TYPE_STRING),
61
- validated: makeProp(PROP_TYPE_BOOLEAN, false)
62
- });
63
-
64
- // --- Main component ---
65
-
66
- // We do not use `extend()` here as that would evaluate the props
67
- // immediately, which we do not want to happen
68
- // @vue/component
69
- const BFormGroup = {
70
- name: NAME_FORM_GROUP,
71
- mixins: [idMixin, formStateMixin, normalizeSlotMixin],
72
- get props() {
73
- // Allow props to be lazy evaled on first access and
74
- // then they become a non-getter afterwards
75
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#Smart_self-overwriting_lazy_getters
76
- delete this.props;
77
- // eslint-disable-next-line no-return-assign
78
- return this.props = generateProps();
79
- },
80
- data() {
81
- return {
82
- ariaDescribedby: null
83
- };
84
- },
85
- computed: {
86
- contentColProps() {
87
- return this.getColProps(this.$props, 'content');
88
- },
89
- labelAlignClasses() {
90
- return this.getAlignClasses(this.$props, 'label');
91
- },
92
- labelColProps() {
93
- return this.getColProps(this.$props, 'label');
94
- },
95
- isHorizontal() {
96
- // Determine if the form group will be rendered horizontal
97
- // based on the existence of 'content-col' or 'label-col' props
98
- return keys(this.contentColProps).length > 0 || keys(this.labelColProps).length > 0;
99
- }
100
- },
101
- watch: {
102
- ariaDescribedby(newValue, oldValue) {
103
- if (newValue !== oldValue) {
104
- this.updateAriaDescribedby(newValue, oldValue);
105
- }
106
- }
107
- },
108
- mounted() {
109
- this.$nextTick(() => {
110
- // Set `aria-describedby` on the input specified by `labelFor`
111
- // We do this in a `$nextTick()` to ensure the children have finished rendering
112
- this.updateAriaDescribedby(this.ariaDescribedby);
113
- });
114
- },
115
- methods: {
116
- getAlignClasses(props, prefix) {
117
- return getBreakpointsUpCached().reduce((result, breakpoint) => {
118
- const propValue = props[suffixPropName(breakpoint, `${prefix}Align`)] || null;
119
- if (propValue) {
120
- result.push(['text', breakpoint, propValue].filter(identity).join('-'));
121
- }
122
- return result;
123
- }, []);
124
- },
125
- getColProps(props, prefix) {
126
- return getBreakpointsUpCached().reduce((result, breakpoint) => {
127
- let propValue = props[suffixPropName(breakpoint, `${prefix}Cols`)];
128
-
129
- // Handle case where the prop's value is an empty string,
130
- // which represents `true`
131
- propValue = propValue === '' ? true : propValue || false;
132
- if (!isBoolean(propValue) && propValue !== 'auto') {
133
- // Convert to column size to number
134
- propValue = toInteger(propValue, 0);
135
- // Ensure column size is greater than `0`
136
- propValue = propValue > 0 ? propValue : false;
137
- }
138
-
139
- // Add the prop to the list of props to give to `<b-col>`
140
- // If breakpoint is '' (`${prefix}Cols` is `true`), then we use
141
- // the 'col' prop to make equal width at 'xs'
142
- if (propValue) {
143
- result[breakpoint || (isBoolean(propValue) ? 'col' : 'cols')] = propValue;
144
- }
145
- return result;
146
- }, {});
147
- },
148
- // Sets the `aria-describedby` attribute on the input if `labelFor` is set
149
- // Optionally accepts a string of IDs to remove as the second parameter
150
- // Preserves any `aria-describedby` value(s) user may have on input
151
- updateAriaDescribedby(newValue, oldValue) {
152
- const {
153
- labelFor
154
- } = this;
155
- if (IS_BROWSER && labelFor) {
156
- // We need to escape `labelFor` since it can be user-provided
157
- const $input = select(`#${cssEscape(labelFor)}`, this.$refs.content);
158
- if ($input) {
159
- const attr = 'aria-describedby';
160
- const newIds = (newValue || '').split(RX_SPACE_SPLIT);
161
- const oldIds = (oldValue || '').split(RX_SPACE_SPLIT);
162
-
163
- // Update ID list, preserving any original IDs
164
- // and ensuring the ID's are unique
165
- const ids = (getAttr($input, attr) || '').split(RX_SPACE_SPLIT).filter(id => !arrayIncludes(oldIds, id)).concat(newIds).filter((id, index, ids) => ids.indexOf(id) === index).filter(identity).join(' ').trim();
166
- if (ids) {
167
- setAttr($input, attr, ids);
168
- } else {
169
- removeAttr($input, attr);
170
- }
171
- }
172
- }
173
- },
174
- onLegendClick(event) {
175
- // Don't do anything if `labelFor` is set
176
- /* istanbul ignore next: clicking a label will focus the input, so no need to test */
177
- if (this.labelFor) {
178
- return;
179
- }
180
- const {
181
- target
182
- } = event;
183
- const tagName = target ? target.tagName : '';
184
-
185
- // If clicked an interactive element inside legend,
186
- // we just let the default happen
187
- /* istanbul ignore next */
188
- if (LEGEND_INTERACTIVE_ELEMENTS.indexOf(tagName) !== -1) {
189
- return;
190
- }
191
-
192
- // If only a single input, focus it, emulating label behaviour
193
- const inputs = selectAll(INPUT_SELECTOR, this.$refs.content).filter(isVisible);
194
- if (inputs.length === 1) {
195
- attemptFocus(inputs[0]);
196
- }
197
- }
198
- },
199
- render(h) {
200
- const {
201
- computedState: state,
202
- feedbackAriaLive,
203
- isHorizontal,
204
- labelFor,
205
- normalizeSlot,
206
- safeId,
207
- tooltip
208
- } = this;
209
- const id = safeId();
210
- const isFieldset = !labelFor;
211
- let $label = h();
212
- const labelContent = normalizeSlot(SLOT_NAME_LABEL) || this.label;
213
- const labelId = labelContent ? this.labelId || safeId('_BV_label_') : null;
214
- if (labelContent || isHorizontal) {
215
- const {
216
- labelSize,
217
- labelColProps
218
- } = this;
219
- const labelTag = isFieldset ? 'legend' : 'label';
220
- if (this.labelSrOnly) {
221
- if (labelContent) {
222
- $label = h(labelTag, {
223
- class: 'gl-sr-only',
224
- attrs: {
225
- id: labelId,
226
- for: labelFor || null
227
- }
228
- }, [labelContent]);
229
- }
230
- $label = h(isHorizontal ? BCol : 'div', {
231
- props: isHorizontal ? labelColProps : {}
232
- }, [$label]);
233
- } else {
234
- $label = h(isHorizontal ? BCol : labelTag, {
235
- on: isFieldset ? {
236
- click: this.onLegendClick
237
- } : {},
238
- props: isHorizontal ? {
239
- ...labelColProps,
240
- tag: labelTag
241
- } : {},
242
- attrs: {
243
- id: labelId,
244
- for: labelFor || null,
245
- // We add a `tabindex` to legend so that screen readers
246
- // will properly read the `aria-labelledby` in IE
247
- tabindex: isFieldset ? '-1' : null
248
- },
249
- class: [
250
- // Hide the focus ring on the legend
251
- isFieldset ? 'bv-no-focus-ring' : '',
252
- // When horizontal or if a legend is rendered, add 'col-form-label' class
253
- // for correct sizing as Bootstrap has inconsistent font styling for
254
- // legend in non-horizontal form groups
255
- // See: https://github.com/twbs/bootstrap/issues/27805
256
- isHorizontal || isFieldset ? 'col-form-label' : '',
257
- // Emulate label padding top of `0` on legend when not horizontal
258
- !isHorizontal && isFieldset ? '!gl-pt-0' : '',
259
- // If not horizontal and not a legend, we add '!gl-block' class to label
260
- // so that label-align works
261
- !isHorizontal && !isFieldset ? '!gl-block' : '', labelSize ? `col-form-label-${labelSize}` : '', this.labelAlignClasses, this.labelClass]
262
- }, [labelContent]);
263
- }
264
- }
265
- let $invalidFeedback = h();
266
- const invalidFeedbackContent = normalizeSlot(SLOT_NAME_INVALID_FEEDBACK) || this.invalidFeedback;
267
- const invalidFeedbackId = invalidFeedbackContent ? safeId('_BV_feedback_invalid_') : null;
268
- if (invalidFeedbackContent) {
269
- $invalidFeedback = h(BFormInvalidFeedback, {
270
- props: {
271
- ariaLive: feedbackAriaLive,
272
- id: invalidFeedbackId,
273
- // If state is explicitly `false`, always show the feedback
274
- state,
275
- tooltip
276
- },
277
- attrs: {
278
- tabindex: invalidFeedbackContent ? '-1' : null
279
- }
280
- }, [invalidFeedbackContent]);
281
- }
282
- let $validFeedback = h();
283
- const validFeedbackContent = normalizeSlot(SLOT_NAME_VALID_FEEDBACK) || this.validFeedback;
284
- const validFeedbackId = validFeedbackContent ? safeId('_BV_feedback_valid_') : null;
285
- if (validFeedbackContent) {
286
- $validFeedback = h(BFormValidFeedback, {
287
- props: {
288
- ariaLive: feedbackAriaLive,
289
- id: validFeedbackId,
290
- // If state is explicitly `true`, always show the feedback
291
- state,
292
- tooltip
293
- },
294
- attrs: {
295
- tabindex: validFeedbackContent ? '-1' : null
296
- }
297
- }, [validFeedbackContent]);
298
- }
299
- let $description = h();
300
- const descriptionContent = normalizeSlot(SLOT_NAME_DESCRIPTION) || this.description;
301
- const descriptionId = descriptionContent ? safeId('_BV_description_') : null;
302
- if (descriptionContent) {
303
- $description = h(BFormText, {
304
- attrs: {
305
- id: descriptionId,
306
- tabindex: '-1'
307
- }
308
- }, [descriptionContent]);
309
- }
310
-
311
- // Update `ariaDescribedby`
312
- // Screen readers will read out any content linked to by `aria-describedby`
313
- // even if the content is hidden with `display: none;`, hence we only include
314
- // feedback IDs if the form group's state is explicitly valid or invalid
315
- const ariaDescribedby = this.ariaDescribedby = [descriptionId, state === false ? invalidFeedbackId : null, state === true ? validFeedbackId : null].filter(identity).join(' ') || null;
316
- const $content = h(isHorizontal ? BCol : 'div', {
317
- props: isHorizontal ? this.contentColProps : {},
318
- ref: 'content'
319
- }, [normalizeSlot(SLOT_NAME_DEFAULT, {
320
- ariaDescribedby,
321
- descriptionId,
322
- id,
323
- labelId
324
- }) || h(), $invalidFeedback, $validFeedback, $description]);
325
-
326
- // Return it wrapped in a form group
327
- // Note: Fieldsets do not support adding `row` or `form-row` directly
328
- // to them due to browser specific render issues, so we move the `form-row`
329
- // to an inner wrapper div when horizontal and using a fieldset
330
- return h(isFieldset ? 'fieldset' : isHorizontal ? BFormRow : 'div', {
331
- staticClass: 'form-group',
332
- class: [{
333
- 'was-validated': this.validated
334
- }, this.stateClass],
335
- attrs: {
336
- id,
337
- disabled: isFieldset ? this.disabled : null,
338
- role: isFieldset ? null : 'group',
339
- 'aria-invalid': this.computedAriaInvalid,
340
- // Only apply `aria-labelledby` if we are a horizontal fieldset
341
- // as the legend is no longer a direct child of fieldset
342
- 'aria-labelledby': isFieldset && isHorizontal ? labelId : null
343
- }
344
- }, isHorizontal && isFieldset ? [h(BFormRow, [$label, $content])] : [$label, $content]);
345
- }
346
- };
347
-
348
- export { BFormGroup, generateProps };
@@ -1 +0,0 @@
1
- export { BFormGroup } from './form-group';
@@ -1,54 +0,0 @@
1
- import { extend } from '../../vue';
2
- import { NAME_FORM_SELECT_OPTION_GROUP } from '../../constants/components';
3
- import { PROP_TYPE_STRING } from '../../constants/props';
4
- import { SLOT_NAME_FIRST } from '../../constants/slots';
5
- import { htmlOrText } from '../../utils/html';
6
- import { sortKeys } from '../../utils/object';
7
- import { makeProp } from '../../utils/props';
8
- import { props as props$1, formOptionsMixin } from '../../mixins/form-options';
9
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
10
- import { BFormSelectOption } from './form-select-option';
11
-
12
- // --- Props ---
13
-
14
- const props = sortKeys({
15
- ...props$1,
16
- label: makeProp(PROP_TYPE_STRING, undefined, true) // Required
17
- });
18
-
19
- // --- Main component ---
20
-
21
- // @vue/component
22
- const BFormSelectOptionGroup = /*#__PURE__*/extend({
23
- name: NAME_FORM_SELECT_OPTION_GROUP,
24
- mixins: [normalizeSlotMixin, formOptionsMixin],
25
- props,
26
- render(h) {
27
- const {
28
- label
29
- } = this;
30
- const $options = this.formOptions.map((option, index) => {
31
- const {
32
- value,
33
- text,
34
- html,
35
- disabled
36
- } = option;
37
- return h(BFormSelectOption, {
38
- attrs: {
39
- value,
40
- disabled
41
- },
42
- domProps: htmlOrText(html, text),
43
- key: `option_${index}`
44
- });
45
- });
46
- return h('optgroup', {
47
- attrs: {
48
- label
49
- }
50
- }, [this.normalizeSlot(SLOT_NAME_FIRST), $options, this.normalizeSlot()]);
51
- }
52
- });
53
-
54
- export { BFormSelectOptionGroup, props };
@@ -1,41 +0,0 @@
1
- import { extend, mergeData } from '../../vue';
2
- import { NAME_FORM_SELECT_OPTION } from '../../constants/components';
3
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_ANY } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
-
6
- // --- Props ---
7
-
8
- const props = {
9
- disabled: makeProp(PROP_TYPE_BOOLEAN, false),
10
- value: makeProp(PROP_TYPE_ANY, undefined, true) // Required
11
- };
12
-
13
- // --- Main component ---
14
-
15
- // @vue/component
16
- const BFormSelectOption = /*#__PURE__*/extend({
17
- name: NAME_FORM_SELECT_OPTION,
18
- functional: true,
19
- props,
20
- render(h, _ref) {
21
- let {
22
- props,
23
- data,
24
- children
25
- } = _ref;
26
- const {
27
- value,
28
- disabled
29
- } = props;
30
- return h('option', mergeData(data, {
31
- attrs: {
32
- disabled
33
- },
34
- domProps: {
35
- value
36
- }
37
- }), children);
38
- }
39
- });
40
-
41
- export { BFormSelectOption, props };
@@ -1,143 +0,0 @@
1
- import { extend } from '../../vue';
2
- import { NAME_FORM_SELECT } from '../../constants/components';
3
- import { EVENT_NAME_CHANGE } from '../../constants/events';
4
- import { PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER } from '../../constants/props';
5
- import { SLOT_NAME_FIRST } from '../../constants/slots';
6
- import { from } from '../../utils/array';
7
- import { attemptFocus, attemptBlur } from '../../utils/dom';
8
- import { htmlOrText } from '../../utils/html';
9
- import { isArray } from '../../utils/inspect';
10
- import { sortKeys } from '../../utils/object';
11
- import { makeProp } from '../../utils/props';
12
- import { props as props$3, formControlMixin } from '../../mixins/form-control';
13
- import { props as props$4, formCustomMixin } from '../../mixins/form-custom';
14
- import { props as props$5, formSizeMixin } from '../../mixins/form-size';
15
- import { props as props$6, formStateMixin } from '../../mixins/form-state';
16
- import { props as props$1, idMixin } from '../../mixins/id';
17
- import { props as props$2, modelMixin, MODEL_PROP_NAME, MODEL_EVENT_NAME } from '../../mixins/model';
18
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
19
- import { optionsMixin } from './helpers/mixin-options';
20
- import { BFormSelectOption } from './form-select-option';
21
- import { BFormSelectOptionGroup } from './form-select-option-group';
22
-
23
- // --- Props ---
24
-
25
- const props = sortKeys({
26
- ...props$1,
27
- ...props$2,
28
- ...props$3,
29
- ...props$4,
30
- ...props$5,
31
- ...props$6,
32
- ariaInvalid: makeProp(PROP_TYPE_BOOLEAN_STRING, false),
33
- multiple: makeProp(PROP_TYPE_BOOLEAN, false),
34
- // Browsers default size to `0`, which shows 4 rows in most browsers in multiple mode
35
- // Size of `1` can bork out Firefox
36
- selectSize: makeProp(PROP_TYPE_NUMBER, 0)
37
- });
38
-
39
- // --- Main component ---
40
-
41
- // @vue/component
42
- const BFormSelect = /*#__PURE__*/extend({
43
- name: NAME_FORM_SELECT,
44
- mixins: [idMixin, modelMixin, formControlMixin, formSizeMixin, formStateMixin, formCustomMixin, optionsMixin, normalizeSlotMixin],
45
- props,
46
- data() {
47
- return {
48
- localValue: this[MODEL_PROP_NAME]
49
- };
50
- },
51
- computed: {
52
- computedSelectSize() {
53
- // Custom selects with a size of zero causes the arrows to be hidden,
54
- // so dont render the size attribute in this case
55
- return !this.plain && this.selectSize === 0 ? null : this.selectSize;
56
- },
57
- inputClass() {
58
- return [this.plain ? 'form-control' : 'custom-select', this.size && this.plain ? `form-control-${this.size}` : null, this.size && !this.plain ? `custom-select-${this.size}` : null, this.stateClass];
59
- }
60
- },
61
- watch: {
62
- value(newValue) {
63
- this.localValue = newValue;
64
- },
65
- localValue() {
66
- this.$emit(MODEL_EVENT_NAME, this.localValue);
67
- }
68
- },
69
- methods: {
70
- focus() {
71
- attemptFocus(this.$refs.input);
72
- },
73
- blur() {
74
- attemptBlur(this.$refs.input);
75
- },
76
- onChange(event) {
77
- const {
78
- target
79
- } = event;
80
- const selectedValue = from(target.options).filter(o => o.selected).map(o => '_value' in o ? o._value : o.value);
81
- this.localValue = target.multiple ? selectedValue : selectedValue[0];
82
- this.$nextTick(() => {
83
- this.$emit(EVENT_NAME_CHANGE, this.localValue);
84
- });
85
- }
86
- },
87
- render(h) {
88
- const {
89
- name,
90
- disabled,
91
- required,
92
- computedSelectSize: size,
93
- localValue: value
94
- } = this;
95
- const $options = this.formOptions.map((option, index) => {
96
- const {
97
- value,
98
- label,
99
- options,
100
- disabled
101
- } = option;
102
- const key = `option_${index}`;
103
- return isArray(options) ? h(BFormSelectOptionGroup, {
104
- props: {
105
- label,
106
- options
107
- },
108
- key
109
- }) : h(BFormSelectOption, {
110
- props: {
111
- value,
112
- disabled
113
- },
114
- domProps: htmlOrText(option.html, option.text),
115
- key
116
- });
117
- });
118
- return h('select', {
119
- class: this.inputClass,
120
- attrs: {
121
- id: this.safeId(),
122
- name,
123
- form: this.form || null,
124
- multiple: this.multiple || null,
125
- size,
126
- disabled,
127
- required,
128
- 'aria-required': required ? 'true' : null,
129
- 'aria-invalid': this.computedAriaInvalid
130
- },
131
- on: {
132
- change: this.onChange
133
- },
134
- directives: [{
135
- name: 'model',
136
- value
137
- }],
138
- ref: 'input'
139
- }, [this.normalizeSlot(SLOT_NAME_FIRST), $options, this.normalizeSlot()]);
140
- }
141
- });
142
-
143
- export { BFormSelect, props };
@@ -1,56 +0,0 @@
1
- import { extend } from '../../../vue';
2
- import { PROP_TYPE_STRING } from '../../../constants/props';
3
- import { get } from '../../../utils/get';
4
- import { isPlainObject, isNull, isUndefined } from '../../../utils/inspect';
5
- import { sortKeys } from '../../../utils/object';
6
- import { makeProp } from '../../../utils/props';
7
- import { props as props$1, formOptionsMixin } from '../../../mixins/form-options';
8
-
9
- // --- Props ---
10
-
11
- const props = sortKeys({
12
- ...props$1,
13
- labelField: makeProp(PROP_TYPE_STRING, 'label'),
14
- optionsField: makeProp(PROP_TYPE_STRING, 'options')
15
- });
16
-
17
- // --- Mixin ---
18
-
19
- // @vue/component
20
- const optionsMixin = extend({
21
- mixins: [formOptionsMixin],
22
- props,
23
- methods: {
24
- normalizeOption(option) {
25
- let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
26
- // When the option is an object, normalize it
27
- if (isPlainObject(option)) {
28
- const value = get(option, this.valueField);
29
- const text = get(option, this.textField);
30
- const options = get(option, this.optionsField, null);
31
- // When it has options, create an `<optgroup>` object
32
- if (!isNull(options)) {
33
- return {
34
- label: String(get(option, this.labelField) || text),
35
- options: this.normalizeOptions(options)
36
- };
37
- }
38
- // Otherwise create an `<option>` object
39
- return {
40
- value: isUndefined(value) ? key || text : value,
41
- text: String(isUndefined(text) ? key : text),
42
- html: get(option, this.htmlField),
43
- disabled: Boolean(get(option, this.disabledField))
44
- };
45
- }
46
- // Otherwise create an `<option>` object from the given value
47
- return {
48
- value: key || option,
49
- text: String(option),
50
- disabled: false
51
- };
52
- }
53
- }
54
- });
55
-
56
- export { optionsMixin, props };
@@ -1,3 +0,0 @@
1
- export { BFormSelect } from './form-select';
2
- export { BFormSelectOption } from './form-select-option';
3
- export { BFormSelectOptionGroup } from './form-select-option-group';