@gitlab/duo-ui 0.1.0 → 0.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 (761) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/chat/components/duo_chat_context/constants.js +11 -0
  3. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.js +118 -0
  4. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.js +265 -0
  5. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.js +68 -0
  6. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.js +87 -0
  7. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.js +137 -0
  8. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items_loading.js +53 -0
  9. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.js +121 -0
  10. package/dist/components/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.js +153 -0
  11. package/dist/components/chat/components/duo_chat_context/mock_context_data.js +191 -0
  12. package/dist/components/chat/components/duo_chat_context/utils.js +106 -0
  13. package/dist/components/chat/components/duo_chat_conversation/duo_chat_conversation.js +101 -0
  14. package/dist/components/chat/components/duo_chat_loader/duo_chat_loader.js +101 -0
  15. package/dist/components/chat/components/duo_chat_message/buttons_utils.js +25 -0
  16. package/dist/components/chat/components/duo_chat_message/constants.js +5 -0
  17. package/dist/components/chat/components/duo_chat_message/copy_code_element.js +16 -0
  18. package/dist/components/chat/components/duo_chat_message/duo_chat_message.js +287 -0
  19. package/dist/components/chat/components/duo_chat_message/insert_code_snippet_element.js +56 -0
  20. package/dist/components/chat/components/duo_chat_message/utils.js +8 -0
  21. package/dist/components/chat/components/duo_chat_message_sources/duo_chat_message_sources.js +106 -0
  22. package/dist/components/chat/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.js +64 -0
  23. package/dist/components/chat/constants.js +30 -0
  24. package/dist/components/chat/duo_chat.js +524 -0
  25. package/dist/components/chat/markdown_renderer.js +18 -0
  26. package/dist/components/chat/mock_data.js +162 -0
  27. package/dist/components/user_feedback/user_feedback.js +97 -0
  28. package/dist/components/user_feedback/user_feedback_modal.js +149 -0
  29. package/dist/components/workflow/components/duo_workflow_panel/duo_workflow_panel.js +95 -0
  30. package/dist/components/workflow/components/duo_workflow_prompt/duo_workflow_prompt.js +235 -0
  31. package/dist/components.css +2 -0
  32. package/dist/components.css.map +1 -0
  33. package/dist/tailwind.css +2 -0
  34. package/dist/tailwind.css.map +1 -0
  35. package/package.json +8 -16
  36. package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_details_modal/duo_chat_context_item_details_modal.vue +1 -1
  37. package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items_loading.vue +1 -1
  38. package/src/components/chat/components/duo_chat_message/constants.js +3 -0
  39. package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/duo_chat_message.scss +31 -2
  40. package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/duo_chat_message.vue +33 -2
  41. package/src/components/chat/duo_chat.scss +393 -0
  42. package/src/components/{experimental/duo/chat → chat}/mock_data.js +2 -2
  43. package/src/config.js +3 -43
  44. package/src/index.js +3 -130
  45. package/src/scss/components.scss +6 -83
  46. package/src/tokens/build/json/tokens.json +13548 -13548
  47. package/src/vendor/bootstrap/LICENSE +22 -0
  48. package/src/vendor/bootstrap-vue/LICENSE +21 -0
  49. package/src/vendor/bootstrap-vue/nuxt/index.js +164 -0
  50. package/src/vendor/bootstrap-vue/nuxt/plugin.template.js +29 -0
  51. package/src/vendor/bootstrap-vue/package.json +201 -0
  52. package/src/vendor/bootstrap-vue/src/bv-config.d.ts +4 -0
  53. package/src/vendor/bootstrap-vue/src/components/badge/README.md +126 -0
  54. package/src/vendor/bootstrap-vue/src/components/badge/badge.spec.js +141 -0
  55. package/src/vendor/bootstrap-vue/src/components/badge/index.d.ts +7 -0
  56. package/src/vendor/bootstrap-vue/src/components/badge/package.json +29 -0
  57. package/src/vendor/bootstrap-vue/src/components/breadcrumb/README.md +93 -0
  58. package/src/vendor/bootstrap-vue/src/components/breadcrumb/breadcrumb-item.spec.js +123 -0
  59. package/src/vendor/bootstrap-vue/src/components/breadcrumb/breadcrumb-link.spec.js +117 -0
  60. package/src/vendor/bootstrap-vue/src/components/breadcrumb/breadcrumb.spec.js +183 -0
  61. package/src/vendor/bootstrap-vue/src/components/breadcrumb/index.d.ts +13 -0
  62. package/src/vendor/bootstrap-vue/src/components/breadcrumb/package.json +62 -0
  63. package/src/vendor/bootstrap-vue/src/components/button/README.md +281 -0
  64. package/src/vendor/bootstrap-vue/src/components/button/button-close.spec.js +210 -0
  65. package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +385 -0
  66. package/src/vendor/bootstrap-vue/src/components/button/index.d.ts +10 -0
  67. package/src/vendor/bootstrap-vue/src/components/button/package.json +105 -0
  68. package/src/vendor/bootstrap-vue/src/components/button-group/README.md +112 -0
  69. package/src/vendor/bootstrap-vue/src/components/button-group/button-group.spec.js +98 -0
  70. package/src/vendor/bootstrap-vue/src/components/button-group/index.d.ts +7 -0
  71. package/src/vendor/bootstrap-vue/src/components/button-group/package.json +29 -0
  72. package/src/vendor/bootstrap-vue/src/components/collapse/README.md +321 -0
  73. package/src/vendor/bootstrap-vue/src/components/collapse/collapse.spec.js +558 -0
  74. package/src/vendor/bootstrap-vue/src/components/collapse/index.d.ts +9 -0
  75. package/src/vendor/bootstrap-vue/src/components/collapse/package.json +111 -0
  76. package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +730 -0
  77. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.spec.js +58 -0
  78. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.spec.js +110 -0
  79. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.spec.js +94 -0
  80. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.spec.js +73 -0
  81. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.spec.js +117 -0
  82. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.spec.js +147 -0
  83. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.spec.js +59 -0
  84. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.spec.js +1121 -0
  85. package/src/vendor/bootstrap-vue/src/components/dropdown/index.d.ts +32 -0
  86. package/src/vendor/bootstrap-vue/src/components/dropdown/package.json +368 -0
  87. package/src/vendor/bootstrap-vue/src/components/form/README.md +370 -0
  88. package/src/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.spec.js +170 -0
  89. package/src/vendor/bootstrap-vue/src/components/form/form-text.spec.js +93 -0
  90. package/src/vendor/bootstrap-vue/src/components/form/form-valid-feedback.spec.js +157 -0
  91. package/src/vendor/bootstrap-vue/src/components/form/form.spec.js +97 -0
  92. package/src/vendor/bootstrap-vue/src/components/form/index.d.ts +16 -0
  93. package/src/vendor/bootstrap-vue/src/components/form/package.json +112 -0
  94. package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +862 -0
  95. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +642 -0
  96. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +1331 -0
  97. package/src/vendor/bootstrap-vue/src/components/form-checkbox/index.d.ts +10 -0
  98. package/src/vendor/bootstrap-vue/src/components/form-checkbox/package.json +172 -0
  99. package/src/vendor/bootstrap-vue/src/components/form-group/README.md +337 -0
  100. package/src/vendor/bootstrap-vue/src/components/form-group/form-group.spec.js +477 -0
  101. package/src/vendor/bootstrap-vue/src/components/form-group/index.d.ts +7 -0
  102. package/src/vendor/bootstrap-vue/src/components/form-group/package.json +183 -0
  103. package/src/vendor/bootstrap-vue/src/components/form-input/README.md +612 -0
  104. package/src/vendor/bootstrap-vue/src/components/form-input/form-input.spec.js +986 -0
  105. package/src/vendor/bootstrap-vue/src/components/form-input/index.d.ts +9 -0
  106. package/src/vendor/bootstrap-vue/src/components/form-input/package.json +135 -0
  107. package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +566 -0
  108. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +469 -0
  109. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +952 -0
  110. package/src/vendor/bootstrap-vue/src/components/form-radio/index.d.ts +10 -0
  111. package/src/vendor/bootstrap-vue/src/components/form-radio/package.json +162 -0
  112. package/src/vendor/bootstrap-vue/src/components/form-select/README.md +504 -0
  113. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.spec.js +138 -0
  114. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.spec.js +75 -0
  115. package/src/vendor/bootstrap-vue/src/components/form-select/form-select.spec.js +723 -0
  116. package/src/vendor/bootstrap-vue/src/components/form-select/index.d.ts +13 -0
  117. package/src/vendor/bootstrap-vue/src/components/form-select/package.json +132 -0
  118. package/src/vendor/bootstrap-vue/src/components/form-textarea/README.md +453 -0
  119. package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.spec.js +1000 -0
  120. package/src/vendor/bootstrap-vue/src/components/form-textarea/index.d.ts +9 -0
  121. package/src/vendor/bootstrap-vue/src/components/form-textarea/package.json +122 -0
  122. package/src/vendor/bootstrap-vue/src/components/index.d.ts +31 -0
  123. package/src/vendor/bootstrap-vue/src/components/input-group/README.md +334 -0
  124. package/src/vendor/bootstrap-vue/src/components/input-group/index.d.ts +19 -0
  125. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-append.spec.js +84 -0
  126. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-prepend.spec.js +84 -0
  127. package/src/vendor/bootstrap-vue/src/components/input-group/input-group-text.spec.js +45 -0
  128. package/src/vendor/bootstrap-vue/src/components/input-group/input-group.spec.js +153 -0
  129. package/src/vendor/bootstrap-vue/src/components/input-group/package.json +109 -0
  130. package/src/vendor/bootstrap-vue/src/components/layout/README.md +791 -0
  131. package/src/vendor/bootstrap-vue/src/components/layout/col.spec.js +192 -0
  132. package/src/vendor/bootstrap-vue/src/components/layout/form-row.spec.js +45 -0
  133. package/src/vendor/bootstrap-vue/src/components/layout/index.d.ts +10 -0
  134. package/src/vendor/bootstrap-vue/src/components/layout/package.json +99 -0
  135. package/src/vendor/bootstrap-vue/src/components/link/README.md +76 -0
  136. package/src/vendor/bootstrap-vue/src/components/link/index.d.ts +10 -0
  137. package/src/vendor/bootstrap-vue/src/components/link/link.spec.js +434 -0
  138. package/src/vendor/bootstrap-vue/src/components/link/package.json +57 -0
  139. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +27 -0
  140. package/src/vendor/bootstrap-vue/src/components/modal/README.md +1068 -0
  141. package/src/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.spec.js +82 -0
  142. package/src/vendor/bootstrap-vue/src/components/modal/index.d.ts +82 -0
  143. package/src/vendor/bootstrap-vue/src/components/modal/modal.spec.js +1418 -0
  144. package/src/vendor/bootstrap-vue/src/components/modal/package.json +548 -0
  145. package/src/vendor/bootstrap-vue/src/components/nav/README.md +480 -0
  146. package/src/vendor/bootstrap-vue/src/components/nav/index.d.ts +17 -0
  147. package/src/vendor/bootstrap-vue/src/components/nav/nav-item-dropdown.spec.js +268 -0
  148. package/src/vendor/bootstrap-vue/src/components/nav/nav-item.spec.js +127 -0
  149. package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +244 -0
  150. package/src/vendor/bootstrap-vue/src/components/nav/package.json +190 -0
  151. package/src/vendor/bootstrap-vue/src/components/navbar/README.md +333 -0
  152. package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +10 -0
  153. package/src/vendor/bootstrap-vue/src/components/navbar/navbar-brand.spec.js +50 -0
  154. package/src/vendor/bootstrap-vue/src/components/navbar/navbar.spec.js +130 -0
  155. package/src/vendor/bootstrap-vue/src/components/navbar/package.json +54 -0
  156. package/src/vendor/bootstrap-vue/src/components/popover/README.md +919 -0
  157. package/src/vendor/bootstrap-vue/src/components/popover/index.d.ts +7 -0
  158. package/src/vendor/bootstrap-vue/src/components/popover/package.json +261 -0
  159. package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +199 -0
  160. package/src/vendor/bootstrap-vue/src/components/progress/MODIFICATIONS.md +23 -0
  161. package/src/vendor/bootstrap-vue/src/components/progress/README.md +363 -0
  162. package/src/vendor/bootstrap-vue/src/components/progress/index.d.ts +10 -0
  163. package/src/vendor/bootstrap-vue/src/components/progress/package.json +109 -0
  164. package/src/vendor/bootstrap-vue/src/components/progress/progress-bar.spec.js +270 -0
  165. package/src/vendor/bootstrap-vue/src/components/progress/progress.spec.js +71 -0
  166. package/src/vendor/bootstrap-vue/src/components/table/README.md +3157 -0
  167. package/src/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.spec.js +112 -0
  168. package/src/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.spec.js +93 -0
  169. package/src/vendor/bootstrap-vue/src/components/table/index.d.ts +237 -0
  170. package/src/vendor/bootstrap-vue/src/components/table/package.json +1763 -0
  171. package/src/vendor/bootstrap-vue/src/components/table/table-busy.spec.js +150 -0
  172. package/src/vendor/bootstrap-vue/src/components/table/table-caption.spec.js +176 -0
  173. package/src/vendor/bootstrap-vue/src/components/table/table-colgroup.spec.js +81 -0
  174. package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +409 -0
  175. package/src/vendor/bootstrap-vue/src/components/table/table-item-formatter.spec.js +56 -0
  176. package/src/vendor/bootstrap-vue/src/components/table/table-lite.spec.js +682 -0
  177. package/src/vendor/bootstrap-vue/src/components/table/table-pagination.spec.js +133 -0
  178. package/src/vendor/bootstrap-vue/src/components/table/table-primarykey.spec.js +83 -0
  179. package/src/vendor/bootstrap-vue/src/components/table/table-provider.spec.js +411 -0
  180. package/src/vendor/bootstrap-vue/src/components/table/table-row-details.spec.js +459 -0
  181. package/src/vendor/bootstrap-vue/src/components/table/table-selectable.spec.js +1182 -0
  182. package/src/vendor/bootstrap-vue/src/components/table/table-simple.spec.js +206 -0
  183. package/src/vendor/bootstrap-vue/src/components/table/table-sorting.spec.js +858 -0
  184. package/src/vendor/bootstrap-vue/src/components/table/table-sticky-column.spec.js +377 -0
  185. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-bottom-row.spec.js +94 -0
  186. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-row-events.spec.js +529 -0
  187. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-top-row.spec.js +88 -0
  188. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-transition.spec.js +83 -0
  189. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-custom.spec.js +91 -0
  190. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-events.spec.js +137 -0
  191. package/src/vendor/bootstrap-vue/src/components/table/table-thead-events.spec.js +155 -0
  192. package/src/vendor/bootstrap-vue/src/components/table/table-thead-top.spec.js +96 -0
  193. package/src/vendor/bootstrap-vue/src/components/table/table.spec.js +692 -0
  194. package/src/vendor/bootstrap-vue/src/components/tabs/README.md +575 -0
  195. package/src/vendor/bootstrap-vue/src/components/tabs/index.d.ts +13 -0
  196. package/src/vendor/bootstrap-vue/src/components/tabs/package.json +205 -0
  197. package/src/vendor/bootstrap-vue/src/components/tabs/tab.spec.js +330 -0
  198. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +836 -0
  199. package/src/vendor/bootstrap-vue/src/components/toast/README.md +656 -0
  200. package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +131 -0
  201. package/src/vendor/bootstrap-vue/src/components/toast/index.d.ts +70 -0
  202. package/src/vendor/bootstrap-vue/src/components/toast/package.json +188 -0
  203. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +346 -0
  204. package/src/vendor/bootstrap-vue/src/components/toast/toaster.spec.js +77 -0
  205. package/src/vendor/bootstrap-vue/src/components/tooltip/README.md +559 -0
  206. package/src/vendor/bootstrap-vue/src/components/tooltip/index.d.ts +7 -0
  207. package/src/vendor/bootstrap-vue/src/components/tooltip/package.json +258 -0
  208. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +1529 -0
  209. package/src/vendor/bootstrap-vue/src/components/transition/package.json +5 -0
  210. package/src/vendor/bootstrap-vue/src/components/transporter/package.json +5 -0
  211. package/src/vendor/bootstrap-vue/src/components/transporter/transporter.spec.js +85 -0
  212. package/src/vendor/bootstrap-vue/src/directives/modal/index.d.ts +8 -0
  213. package/src/vendor/bootstrap-vue/src/directives/modal/modal.spec.js +191 -0
  214. package/src/vendor/bootstrap-vue/src/directives/toggle/README.md +146 -0
  215. package/src/vendor/bootstrap-vue/src/directives/toggle/index.d.ts +7 -0
  216. package/src/vendor/bootstrap-vue/src/directives/toggle/package.json +26 -0
  217. package/src/vendor/bootstrap-vue/src/directives/toggle/toggle.spec.js +452 -0
  218. package/src/vendor/bootstrap-vue/src/directives/tooltip/README.md +521 -0
  219. package/src/vendor/bootstrap-vue/src/directives/tooltip/index.d.ts +7 -0
  220. package/src/vendor/bootstrap-vue/src/directives/tooltip/package.json +131 -0
  221. package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +223 -0
  222. package/src/vendor/bootstrap-vue/src/directives/visible/README.md +244 -0
  223. package/src/vendor/bootstrap-vue/src/directives/visible/index.d.ts +7 -0
  224. package/src/vendor/bootstrap-vue/src/directives/visible/package.json +24 -0
  225. package/src/vendor/bootstrap-vue/src/index.d.ts +61 -0
  226. package/src/vendor/bootstrap-vue/src/mixins/attrs.spec.js +194 -0
  227. package/src/vendor/bootstrap-vue/src/mixins/click-out.spec.js +52 -0
  228. package/src/vendor/bootstrap-vue/src/mixins/focus-in.spec.js +53 -0
  229. package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.spec.js +117 -0
  230. package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.spec.js +77 -0
  231. package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.spec.js +115 -0
  232. package/src/vendor/bootstrap-vue/src/mixins/listeners.spec.js +245 -0
  233. package/src/vendor/bootstrap-vue/src/utils/bv-event.class.spec.js +66 -0
  234. package/src/vendor/bootstrap-vue/src/utils/clone-deep.spec.js +70 -0
  235. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +169 -0
  236. package/src/vendor/bootstrap-vue/src/utils/css-escape.spec.js +82 -0
  237. package/src/vendor/bootstrap-vue/src/utils/dom.spec.js +291 -0
  238. package/src/vendor/bootstrap-vue/src/utils/events.spec.js +41 -0
  239. package/src/vendor/bootstrap-vue/src/utils/get.spec.js +109 -0
  240. package/src/vendor/bootstrap-vue/src/utils/inspect.spec.js +251 -0
  241. package/src/vendor/bootstrap-vue/src/utils/loose-equal.spec.js +203 -0
  242. package/src/vendor/bootstrap-vue/src/utils/normalize-slot.spec.js +63 -0
  243. package/src/vendor/bootstrap-vue/src/utils/number.spec.js +72 -0
  244. package/src/vendor/bootstrap-vue/src/utils/object.spec.js +61 -0
  245. package/src/vendor/bootstrap-vue/src/utils/props.spec.js +112 -0
  246. package/src/vendor/bootstrap-vue/src/utils/router.spec.js +248 -0
  247. package/src/vendor/bootstrap-vue/src/utils/string.spec.js +65 -0
  248. package/src/vendor/bootstrap-vue/src/utils/stringify-object-values.spec.js +47 -0
  249. package/src/vendor/bootstrap-vue/src/utils/warn.spec.js +54 -0
  250. package/src/vendor/bootstrap-vue/src/vue-injections.d.ts +13 -0
  251. package/translations.js +0 -26
  252. package/dist/tokens/css/tokens.css +0 -953
  253. package/dist/tokens/css/tokens.dark.css +0 -953
  254. package/dist/tokens/js/tokens.dark.js +0 -951
  255. package/dist/tokens/js/tokens.js +0 -951
  256. package/dist/tokens/json/tokens.dark.json +0 -21803
  257. package/dist/tokens/json/tokens.json +0 -21803
  258. package/dist/tokens/scss/_tokens.dark.scss +0 -950
  259. package/dist/tokens/scss/_tokens.scss +0 -950
  260. package/dist/tokens/scss/_tokens_custom_properties.scss +0 -951
  261. package/dist/tokens/tailwind/tokens.cjs +0 -336
  262. package/src/charts.js +0 -14
  263. package/src/components/base/accordion/accordion.md +0 -3
  264. package/src/components/base/accordion/accordion.vue +0 -43
  265. package/src/components/base/accordion/accordion_item.md +0 -3
  266. package/src/components/base/accordion/accordion_item.scss +0 -16
  267. package/src/components/base/accordion/accordion_item.vue +0 -122
  268. package/src/components/base/alert/alert.md +0 -35
  269. package/src/components/base/alert/alert.scss +0 -179
  270. package/src/components/base/alert/alert.vue +0 -241
  271. package/src/components/base/animated_icon/animated_chevron_right_down_icon.vue +0 -28
  272. package/src/components/base/animated_icon/animated_duo_chat_icon.vue +0 -39
  273. package/src/components/base/animated_icon/animated_icon.md +0 -4
  274. package/src/components/base/animated_icon/animated_icon.scss +0 -456
  275. package/src/components/base/animated_icon/animated_notifications_icon.vue +0 -49
  276. package/src/components/base/animated_icon/animated_sidebar_icon.vue +0 -35
  277. package/src/components/base/animated_icon/animated_smile_icon.vue +0 -37
  278. package/src/components/base/animated_icon/animated_sort_icon.vue +0 -84
  279. package/src/components/base/animated_icon/animated_star_icon.vue +0 -27
  280. package/src/components/base/animated_icon/animated_todo_icon.vue +0 -49
  281. package/src/components/base/animated_icon/animated_upload_icon.vue +0 -41
  282. package/src/components/base/animated_icon/base_animated_icon.vue +0 -39
  283. package/src/components/base/avatar/avatar.md +0 -1
  284. package/src/components/base/avatar/avatar.scss +0 -228
  285. package/src/components/base/avatar/avatar.vue +0 -151
  286. package/src/components/base/avatar_labeled/avatar_labeled.md +0 -20
  287. package/src/components/base/avatar_labeled/avatar_labeled.scss +0 -30
  288. package/src/components/base/avatar_labeled/avatar_labeled.vue +0 -92
  289. package/src/components/base/avatar_link/avatar_link.md +0 -33
  290. package/src/components/base/avatar_link/avatar_link.scss +0 -41
  291. package/src/components/base/avatar_link/avatar_link.vue +0 -15
  292. package/src/components/base/avatars_inline/avatars_inline.md +0 -38
  293. package/src/components/base/avatars_inline/avatars_inline.scss +0 -64
  294. package/src/components/base/avatars_inline/avatars_inline.vue +0 -110
  295. package/src/components/base/badge/badge.md +0 -38
  296. package/src/components/base/badge/badge.scss +0 -251
  297. package/src/components/base/badge/badge.vue +0 -91
  298. package/src/components/base/banner/banner.md +0 -35
  299. package/src/components/base/banner/banner.scss +0 -35
  300. package/src/components/base/banner/banner.vue +0 -131
  301. package/src/components/base/breadcrumb/breadcrumb.md +0 -23
  302. package/src/components/base/breadcrumb/breadcrumb.scss +0 -62
  303. package/src/components/base/breadcrumb/breadcrumb.vue +0 -229
  304. package/src/components/base/breadcrumb/breadcrumb_item.vue +0 -44
  305. package/src/components/base/broadcast_message/broadcast_message.md +0 -25
  306. package/src/components/base/broadcast_message/broadcast_message.scss +0 -135
  307. package/src/components/base/broadcast_message/broadcast_message.vue +0 -98
  308. package/src/components/base/broadcast_message/constants.js +0 -3
  309. package/src/components/base/button/button.md +0 -61
  310. package/src/components/base/button/button.scss +0 -699
  311. package/src/components/base/button/button.vue +0 -143
  312. package/src/components/base/button_group/button_group.md +0 -28
  313. package/src/components/base/button_group/button_group.vue +0 -16
  314. package/src/components/base/card/card.md +0 -4
  315. package/src/components/base/card/card.scss +0 -46
  316. package/src/components/base/card/card.vue +0 -49
  317. package/src/components/base/collapse/collapse.md +0 -26
  318. package/src/components/base/collapse/collapse.vue +0 -29
  319. package/src/components/base/datepicker/datepicker.md +0 -8
  320. package/src/components/base/datepicker/datepicker.scss +0 -228
  321. package/src/components/base/datepicker/datepicker.vue +0 -454
  322. package/src/components/base/daterange_picker/daterange_picker.md +0 -32
  323. package/src/components/base/daterange_picker/daterange_picker.scss +0 -20
  324. package/src/components/base/daterange_picker/daterange_picker.vue +0 -345
  325. package/src/components/base/drawer/drawer.md +0 -17
  326. package/src/components/base/drawer/drawer.scss +0 -153
  327. package/src/components/base/drawer/drawer.vue +0 -136
  328. package/src/components/base/dropdown/dropdown.md +0 -72
  329. package/src/components/base/dropdown/dropdown.scss +0 -210
  330. package/src/components/base/dropdown/dropdown.vue +0 -323
  331. package/src/components/base/dropdown/dropdown_divider.scss +0 -20
  332. package/src/components/base/dropdown/dropdown_divider.vue +0 -15
  333. package/src/components/base/dropdown/dropdown_form.vue +0 -17
  334. package/src/components/base/dropdown/dropdown_item.md +0 -2
  335. package/src/components/base/dropdown/dropdown_item.scss +0 -102
  336. package/src/components/base/dropdown/dropdown_item.vue +0 -114
  337. package/src/components/base/dropdown/dropdown_section_header.md +0 -7
  338. package/src/components/base/dropdown/dropdown_section_header.scss +0 -22
  339. package/src/components/base/dropdown/dropdown_section_header.vue +0 -17
  340. package/src/components/base/dropdown/dropdown_text.md +0 -7
  341. package/src/components/base/dropdown/dropdown_text.scss +0 -6
  342. package/src/components/base/dropdown/dropdown_text.vue +0 -17
  343. package/src/components/base/filtered_search/common_story_options.js +0 -12
  344. package/src/components/base/filtered_search/filtered_search.md +0 -76
  345. package/src/components/base/filtered_search/filtered_search.scss +0 -51
  346. package/src/components/base/filtered_search/filtered_search.vue +0 -475
  347. package/src/components/base/filtered_search/filtered_search_suggestion.md +0 -15
  348. package/src/components/base/filtered_search/filtered_search_suggestion.scss +0 -11
  349. package/src/components/base/filtered_search/filtered_search_suggestion.vue +0 -64
  350. package/src/components/base/filtered_search/filtered_search_suggestion_list.md +0 -13
  351. package/src/components/base/filtered_search/filtered_search_suggestion_list.scss +0 -36
  352. package/src/components/base/filtered_search/filtered_search_suggestion_list.vue +0 -122
  353. package/src/components/base/filtered_search/filtered_search_term.md +0 -7
  354. package/src/components/base/filtered_search/filtered_search_term.scss +0 -19
  355. package/src/components/base/filtered_search/filtered_search_term.vue +0 -243
  356. package/src/components/base/filtered_search/filtered_search_token.md +0 -23
  357. package/src/components/base/filtered_search/filtered_search_token.scss +0 -63
  358. package/src/components/base/filtered_search/filtered_search_token.vue +0 -484
  359. package/src/components/base/filtered_search/filtered_search_token_segment.md +0 -14
  360. package/src/components/base/filtered_search/filtered_search_token_segment.scss +0 -25
  361. package/src/components/base/filtered_search/filtered_search_token_segment.vue +0 -468
  362. package/src/components/base/filtered_search/filtered_search_utils.js +0 -251
  363. package/src/components/base/form/form.md +0 -2
  364. package/src/components/base/form/form.vue +0 -17
  365. package/src/components/base/form/form_character_count/form_character_count.md +0 -53
  366. package/src/components/base/form/form_character_count/form_character_count.vue +0 -97
  367. package/src/components/base/form/form_checkbox/form_checkbox.md +0 -6
  368. package/src/components/base/form/form_checkbox/form_checkbox.scss +0 -221
  369. package/src/components/base/form/form_checkbox/form_checkbox.vue +0 -58
  370. package/src/components/base/form/form_checkbox/form_checkbox_group.vue +0 -44
  371. package/src/components/base/form/form_checkbox_tree/checkbox_tree_node.vue +0 -58
  372. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.md +0 -73
  373. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.vue +0 -116
  374. package/src/components/base/form/form_checkbox_tree/models/constants.js +0 -12
  375. package/src/components/base/form/form_checkbox_tree/models/node.js +0 -48
  376. package/src/components/base/form/form_checkbox_tree/models/tree.js +0 -186
  377. package/src/components/base/form/form_combobox/constants.js +0 -50
  378. package/src/components/base/form/form_combobox/form_combobox.md +0 -52
  379. package/src/components/base/form/form_combobox/form_combobox.scss +0 -5
  380. package/src/components/base/form/form_combobox/form_combobox.vue +0 -280
  381. package/src/components/base/form/form_date/form_date.md +0 -26
  382. package/src/components/base/form/form_date/form_date.scss +0 -7
  383. package/src/components/base/form/form_date/form_date.vue +0 -135
  384. package/src/components/base/form/form_fields/form_field_validator.vue +0 -59
  385. package/src/components/base/form/form_fields/form_fields.md +0 -41
  386. package/src/components/base/form/form_fields/form_fields.vue +0 -258
  387. package/src/components/base/form/form_fields/mappers.js +0 -11
  388. package/src/components/base/form/form_fields/validators.js +0 -49
  389. package/src/components/base/form/form_group/form_group.md +0 -1
  390. package/src/components/base/form/form_group/form_group.scss +0 -59
  391. package/src/components/base/form/form_group/form_group.vue +0 -76
  392. package/src/components/base/form/form_input/form_input.md +0 -1
  393. package/src/components/base/form/form_input/form_input.scss +0 -74
  394. package/src/components/base/form/form_input/form_input.vue +0 -98
  395. package/src/components/base/form/form_input_group/form_input_group.md +0 -67
  396. package/src/components/base/form/form_input_group/form_input_group.vue +0 -103
  397. package/src/components/base/form/form_input_group/form_input_group_mixin.js +0 -39
  398. package/src/components/base/form/form_radio/form_radio.md +0 -23
  399. package/src/components/base/form/form_radio/form_radio.scss +0 -1
  400. package/src/components/base/form/form_radio/form_radio.vue +0 -51
  401. package/src/components/base/form/form_radio_group/form_radio_group.md +0 -63
  402. package/src/components/base/form/form_radio_group/form_radio_group.scss +0 -4
  403. package/src/components/base/form/form_radio_group/form_radio_group.vue +0 -64
  404. package/src/components/base/form/form_select/constants.js +0 -5
  405. package/src/components/base/form/form_select/form_select.md +0 -1
  406. package/src/components/base/form/form_select/form_select.scss +0 -117
  407. package/src/components/base/form/form_select/form_select.vue +0 -61
  408. package/src/components/base/form/form_textarea/form_textarea.md +0 -3
  409. package/src/components/base/form/form_textarea/form_textarea.vue +0 -141
  410. package/src/components/base/form/input_group_text/input_group_text.md +0 -4
  411. package/src/components/base/form/input_group_text/input_group_text.vue +0 -17
  412. package/src/components/base/icon/icon.md +0 -27
  413. package/src/components/base/icon/icon.scss +0 -8
  414. package/src/components/base/icon/icon.vue +0 -98
  415. package/src/components/base/infinite_scroll/infinite_scroll.md +0 -104
  416. package/src/components/base/infinite_scroll/infinite_scroll.scss +0 -11
  417. package/src/components/base/infinite_scroll/infinite_scroll.vue +0 -169
  418. package/src/components/base/keyset_pagination/keyset_pagination.md +0 -49
  419. package/src/components/base/keyset_pagination/keyset_pagination.scss +0 -9
  420. package/src/components/base/keyset_pagination/keyset_pagination.vue +0 -152
  421. package/src/components/base/label/label.md +0 -15
  422. package/src/components/base/label/label.scss +0 -156
  423. package/src/components/base/label/label.vue +0 -160
  424. package/src/components/base/link/link.md +0 -22
  425. package/src/components/base/link/link.scss +0 -13
  426. package/src/components/base/link/link.vue +0 -25
  427. package/src/components/base/loading_icon/loading_icon.md +0 -3
  428. package/src/components/base/loading_icon/loading_icon.scss +0 -139
  429. package/src/components/base/loading_icon/loading_icon.vue +0 -96
  430. package/src/components/base/markdown/markdown.md +0 -73
  431. package/src/components/base/markdown/markdown.scss +0 -223
  432. package/src/components/base/markdown/markdown.vue +0 -18
  433. package/src/components/base/markdown/markdown_typescale_demo.html +0 -155
  434. package/src/components/base/modal/modal.md +0 -30
  435. package/src/components/base/modal/modal.scss +0 -130
  436. package/src/components/base/modal/modal.vue +0 -269
  437. package/src/components/base/nav/nav.md +0 -11
  438. package/src/components/base/nav/nav.scss +0 -7
  439. package/src/components/base/nav/nav.vue +0 -17
  440. package/src/components/base/nav/nav_item.vue +0 -17
  441. package/src/components/base/nav/nav_item_dropdown.vue +0 -40
  442. package/src/components/base/navbar/navbar.md +0 -4
  443. package/src/components/base/navbar/navbar.scss +0 -0
  444. package/src/components/base/navbar/navbar.vue +0 -17
  445. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +0 -507
  446. package/src/components/base/new_dropdowns/base_dropdown/constants.js +0 -2
  447. package/src/components/base/new_dropdowns/constants.js +0 -20
  448. package/src/components/base/new_dropdowns/disclosure/constants.js +0 -6
  449. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +0 -168
  450. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.scss +0 -17
  451. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +0 -458
  452. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.vue +0 -104
  453. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +0 -131
  454. package/src/components/base/new_dropdowns/disclosure/mock_data.js +0 -201
  455. package/src/components/base/new_dropdowns/disclosure/utils.js +0 -70
  456. package/src/components/base/new_dropdowns/dropdown.scss +0 -243
  457. package/src/components/base/new_dropdowns/dropdown_item.scss +0 -134
  458. package/src/components/base/new_dropdowns/listbox/listbox.md +0 -159
  459. package/src/components/base/new_dropdowns/listbox/listbox.scss +0 -53
  460. package/src/components/base/new_dropdowns/listbox/listbox.vue +0 -940
  461. package/src/components/base/new_dropdowns/listbox/listbox_group.vue +0 -35
  462. package/src/components/base/new_dropdowns/listbox/listbox_item.vue +0 -77
  463. package/src/components/base/new_dropdowns/listbox/listbox_search_input.vue +0 -76
  464. package/src/components/base/new_dropdowns/listbox/mock_data.js +0 -139
  465. package/src/components/base/new_dropdowns/listbox/utils.js +0 -25
  466. package/src/components/base/paginated_list/paginated_list.md +0 -1
  467. package/src/components/base/paginated_list/paginated_list.vue +0 -179
  468. package/src/components/base/pagination/pagination.md +0 -45
  469. package/src/components/base/pagination/pagination.scss +0 -57
  470. package/src/components/base/pagination/pagination.vue +0 -498
  471. package/src/components/base/path/data.js +0 -43
  472. package/src/components/base/path/path.md +0 -41
  473. package/src/components/base/path/path.scss +0 -163
  474. package/src/components/base/path/path.vue +0 -191
  475. package/src/components/base/popover/popover.scss +0 -102
  476. package/src/components/base/popover/popover.vue +0 -111
  477. package/src/components/base/progress_bar/progress_bar.scss +0 -19
  478. package/src/components/base/progress_bar/progress_bar.vue +0 -15
  479. package/src/components/base/search_box_by_click/search_box_by_click.md +0 -1
  480. package/src/components/base/search_box_by_click/search_box_by_click.scss +0 -49
  481. package/src/components/base/search_box_by_click/search_box_by_click.vue +0 -296
  482. package/src/components/base/search_box_by_type/search_box_by_type.md +0 -1
  483. package/src/components/base/search_box_by_type/search_box_by_type.scss +0 -70
  484. package/src/components/base/search_box_by_type/search_box_by_type.vue +0 -159
  485. package/src/components/base/segmented_control/segmented_control.md +0 -1
  486. package/src/components/base/segmented_control/segmented_control.scss +0 -179
  487. package/src/components/base/segmented_control/segmented_control.vue +0 -77
  488. package/src/components/base/skeleton_loader/skeleton_loader.md +0 -46
  489. package/src/components/base/skeleton_loader/skeleton_loader.scss +0 -17
  490. package/src/components/base/skeleton_loader/skeleton_loader.vue +0 -249
  491. package/src/components/base/sorting/sorting.md +0 -80
  492. package/src/components/base/sorting/sorting.vue +0 -160
  493. package/src/components/base/table/constants.js +0 -48
  494. package/src/components/base/table/table.md +0 -72
  495. package/src/components/base/table/table.scss +0 -145
  496. package/src/components/base/table/table.vue +0 -144
  497. package/src/components/base/table_lite/table_lite.md +0 -68
  498. package/src/components/base/table_lite/table_lite.vue +0 -43
  499. package/src/components/base/tabs/constants.js +0 -1
  500. package/src/components/base/tabs/tab/tab.vue +0 -57
  501. package/src/components/base/tabs/tabs/scrollable_tabs.vue +0 -140
  502. package/src/components/base/tabs/tabs/tabs.md +0 -76
  503. package/src/components/base/tabs/tabs/tabs.scss +0 -164
  504. package/src/components/base/tabs/tabs/tabs.vue +0 -282
  505. package/src/components/base/toast/toast.js +0 -93
  506. package/src/components/base/toast/toast.md +0 -48
  507. package/src/components/base/toast/toast.scss +0 -62
  508. package/src/components/base/toggle/toggle.md +0 -4
  509. package/src/components/base/toggle/toggle.scss +0 -177
  510. package/src/components/base/toggle/toggle.vue +0 -194
  511. package/src/components/base/token/token.md +0 -12
  512. package/src/components/base/token/token.scss +0 -44
  513. package/src/components/base/token/token.vue +0 -67
  514. package/src/components/base/token_selector/helpers.js +0 -3
  515. package/src/components/base/token_selector/token_container.vue +0 -184
  516. package/src/components/base/token_selector/token_selector.md +0 -78
  517. package/src/components/base/token_selector/token_selector.scss +0 -19
  518. package/src/components/base/token_selector/token_selector.vue +0 -489
  519. package/src/components/base/token_selector/token_selector_dropdown.vue +0 -257
  520. package/src/components/base/tooltip/tooltip.md +0 -52
  521. package/src/components/base/tooltip/tooltip.scss +0 -52
  522. package/src/components/base/tooltip/tooltip.vue +0 -31
  523. package/src/components/charts/area/area.vue +0 -372
  524. package/src/components/charts/bar/bar.md +0 -3
  525. package/src/components/charts/bar/bar.vue +0 -237
  526. package/src/components/charts/chart/chart.md +0 -19
  527. package/src/components/charts/chart/chart.vue +0 -188
  528. package/src/components/charts/column/column.vue +0 -204
  529. package/src/components/charts/discrete_scatter/discrete_scatter.vue +0 -207
  530. package/src/components/charts/gauge/gauge.md +0 -8
  531. package/src/components/charts/gauge/gauge.scss +0 -0
  532. package/src/components/charts/gauge/gauge.vue +0 -178
  533. package/src/components/charts/heatmap/heatmap.md +0 -7
  534. package/src/components/charts/heatmap/heatmap.scss +0 -7
  535. package/src/components/charts/heatmap/heatmap.vue +0 -290
  536. package/src/components/charts/heatmap/index.js +0 -3
  537. package/src/components/charts/legend/legend.md +0 -16
  538. package/src/components/charts/legend/legend.scss +0 -97
  539. package/src/components/charts/legend/legend.vue +0 -284
  540. package/src/components/charts/line/line.md +0 -7
  541. package/src/components/charts/line/line.vue +0 -368
  542. package/src/components/charts/series_label/series_label.md +0 -1
  543. package/src/components/charts/series_label/series_label.scss +0 -23
  544. package/src/components/charts/series_label/series_label.vue +0 -85
  545. package/src/components/charts/single_stat/single_stat.md +0 -8
  546. package/src/components/charts/single_stat/single_stat.scss +0 -17
  547. package/src/components/charts/single_stat/single_stat.vue +0 -158
  548. package/src/components/charts/sparkline/sparkline.md +0 -8
  549. package/src/components/charts/sparkline/sparkline.vue +0 -308
  550. package/src/components/charts/stacked_column/stacked_column.md +0 -10
  551. package/src/components/charts/stacked_column/stacked_column.vue +0 -330
  552. package/src/components/charts/tooltip/tooltip.md +0 -3
  553. package/src/components/charts/tooltip/tooltip.scss +0 -9
  554. package/src/components/charts/tooltip/tooltip.vue +0 -253
  555. package/src/components/experimental/duo/chat/duo_chat.scss +0 -168
  556. package/src/components/experimental/experiment_badge/constants.js +0 -2
  557. package/src/components/experimental/experiment_badge/experiment_badge.md +0 -9
  558. package/src/components/experimental/experiment_badge/experiment_badge.vue +0 -113
  559. package/src/components/mixins/button_mixin.js +0 -9
  560. package/src/components/mixins/safe_link_mixin.js +0 -28
  561. package/src/components/mixins/tooltip_mixin.js +0 -21
  562. package/src/components/regions/dashboard_skeleton/dashboard_skeleton.md +0 -4
  563. package/src/components/regions/dashboard_skeleton/dashboard_skeleton.vue +0 -40
  564. package/src/components/regions/empty_state/empty_state.md +0 -4
  565. package/src/components/regions/empty_state/empty_state.scss +0 -3
  566. package/src/components/regions/empty_state/empty_state.vue +0 -187
  567. package/src/components/shared_components/charts/tooltip_default_format.scss +0 -18
  568. package/src/components/shared_components/charts/tooltip_default_format.vue +0 -32
  569. package/src/components/shared_components/clear_icon_button/clear_icon_button.scss +0 -10
  570. package/src/components/shared_components/clear_icon_button/clear_icon_button.vue +0 -43
  571. package/src/components/shared_components/close_button/close_button.vue +0 -29
  572. package/src/components/utilities/animated_number/animated_number.md +0 -6
  573. package/src/components/utilities/animated_number/animated_number.vue +0 -99
  574. package/src/components/utilities/friendly_wrap/friendly_wrap.md +0 -66
  575. package/src/components/utilities/friendly_wrap/friendly_wrap.vue +0 -33
  576. package/src/components/utilities/intersection_observer/intersection_observer.md +0 -16
  577. package/src/components/utilities/intersection_observer/intersection_observer.vue +0 -67
  578. package/src/components/utilities/intersperse/intersperse.md +0 -90
  579. package/src/components/utilities/intersperse/intersperse.vue +0 -60
  580. package/src/components/utilities/sprintf/sprintf.md +0 -243
  581. package/src/components/utilities/sprintf/sprintf.vue +0 -142
  582. package/src/components/utilities/truncate/constants.js +0 -5
  583. package/src/components/utilities/truncate/truncate.md +0 -14
  584. package/src/components/utilities/truncate/truncate.scss +0 -21
  585. package/src/components/utilities/truncate/truncate.vue +0 -109
  586. package/src/components/utilities/truncate_text/constants.js +0 -5
  587. package/src/components/utilities/truncate_text/truncate_text.md +0 -26
  588. package/src/components/utilities/truncate_text/truncate_text.scss +0 -14
  589. package/src/components/utilities/truncate_text/truncate_text.vue +0 -124
  590. package/src/directives/collapse_toggle.js +0 -1
  591. package/src/directives/hover_load/hover_load.js +0 -46
  592. package/src/directives/hover_load/hover_load.md +0 -22
  593. package/src/directives/modal.js +0 -1
  594. package/src/directives/outside/outside.js +0 -151
  595. package/src/directives/outside/outside.md +0 -140
  596. package/src/directives/resize_observer/resize_observer.js +0 -45
  597. package/src/directives/resize_observer/resize_observer.md +0 -54
  598. package/src/directives/safe_html/constants.js +0 -14
  599. package/src/directives/safe_html/safe_html.js +0 -35
  600. package/src/directives/safe_html/safe_html.md +0 -58
  601. package/src/directives/safe_link/mock_data.js +0 -33
  602. package/src/directives/safe_link/safe_link.js +0 -56
  603. package/src/directives/safe_link/safe_link.md +0 -37
  604. package/src/directives/tooltip.js +0 -1
  605. package/src/internal/color_contrast/color_contrast.md +0 -8
  606. package/src/internal/color_contrast/color_contrast.vue +0 -52
  607. package/src/scss/README.md +0 -1
  608. package/src/scss/body.scss +0 -4
  609. package/src/scss/bootstrap.scss +0 -34
  610. package/src/scss/bootstrap_vue.scss +0 -25
  611. package/src/scss/fonts.scss +0 -67
  612. package/src/scss/functions.scss +0 -63
  613. package/src/scss/gitlab_ui.scss +0 -19
  614. package/src/scss/mixins.scss +0 -262
  615. package/src/scss/storybook.scss +0 -43
  616. package/src/scss/storybook_dark_mode.scss +0 -21
  617. package/src/scss/tokens.scss +0 -2
  618. package/src/scss/typescale/_index.scss +0 -103
  619. package/src/scss/typescale/typeface_demo.html +0 -70
  620. package/src/scss/typescale/typescale.md +0 -82
  621. package/src/scss/typescale/typescale_demo.html +0 -78
  622. package/src/scss/typescale/typescale_demo.scss +0 -8
  623. package/src/scss/utilities.scss +0 -9196
  624. package/src/scss/utility-mixins/accessibility.scss +0 -19
  625. package/src/scss/utility-mixins/animation.scss +0 -90
  626. package/src/scss/utility-mixins/background.scss +0 -421
  627. package/src/scss/utility-mixins/border.scss +0 -498
  628. package/src/scss/utility-mixins/box-shadow.scss +0 -220
  629. package/src/scss/utility-mixins/clearfix.scss +0 -9
  630. package/src/scss/utility-mixins/color.scss +0 -228
  631. package/src/scss/utility-mixins/composite.scss +0 -24
  632. package/src/scss/utility-mixins/cursor.scss +0 -36
  633. package/src/scss/utility-mixins/deprecated.scss +0 -20
  634. package/src/scss/utility-mixins/display.scss +0 -192
  635. package/src/scss/utility-mixins/flex.scss +0 -360
  636. package/src/scss/utility-mixins/grid.scss +0 -50
  637. package/src/scss/utility-mixins/image.scss +0 -8
  638. package/src/scss/utility-mixins/index.scss +0 -47
  639. package/src/scss/utility-mixins/list-style.scss +0 -12
  640. package/src/scss/utility-mixins/opacity.scss +0 -32
  641. package/src/scss/utility-mixins/outline.scss +0 -12
  642. package/src/scss/utility-mixins/overflow.scss +0 -45
  643. package/src/scss/utility-mixins/pointer-events.scss +0 -12
  644. package/src/scss/utility-mixins/sizing.scss +0 -582
  645. package/src/scss/utility-mixins/spacing.scss +0 -1564
  646. package/src/scss/utility-mixins/svg.scss +0 -79
  647. package/src/scss/utility-mixins/text.scss +0 -183
  648. package/src/scss/utility-mixins/transform.scss +0 -58
  649. package/src/scss/utility-mixins/transition.scss +0 -44
  650. package/src/scss/utility-mixins/typography.scss +0 -381
  651. package/src/scss/utility-mixins/vertical-align.scss +0 -22
  652. package/src/scss/utility-mixins/visibility.scss +0 -12
  653. package/src/scss/utility-mixins/z-index.scss +0 -37
  654. package/src/scss/variables.scss +0 -337
  655. package/src/tokens/action.tokens.json +0 -566
  656. package/src/tokens/background.tokens.json +0 -62
  657. package/src/tokens/border.tokens.json +0 -43
  658. package/src/tokens/build/css/tokens.css +0 -953
  659. package/src/tokens/build/css/tokens.dark.css +0 -953
  660. package/src/tokens/build/js/tokens.dark.js +0 -951
  661. package/src/tokens/build/js/tokens.js +0 -951
  662. package/src/tokens/build/json/tokens.dark.json +0 -21803
  663. package/src/tokens/build/scss/_tokens.dark.scss +0 -950
  664. package/src/tokens/build/scss/_tokens.scss +0 -950
  665. package/src/tokens/build/scss/_tokens_custom_properties.scss +0 -951
  666. package/src/tokens/build/tailwind/tokens.cjs +0 -336
  667. package/src/tokens/color.alpha.tokens.json +0 -70
  668. package/src/tokens/color.constant.tokens.json +0 -660
  669. package/src/tokens/color.data_viz.tokens.json +0 -509
  670. package/src/tokens/common_story_options.js +0 -25
  671. package/src/tokens/contextual/alert.tokens.json +0 -209
  672. package/src/tokens/contextual/avatar.tokens.json +0 -112
  673. package/src/tokens/contextual/badge.tokens.json +0 -879
  674. package/src/tokens/contextual/banner.tokens.json +0 -38
  675. package/src/tokens/contextual/breadcrumb.tokens.json +0 -11
  676. package/src/tokens/contextual/broadcast.tokens.json +0 -222
  677. package/src/tokens/contextual/button.tokens.json +0 -874
  678. package/src/tokens/contextual/datepicker.tokens.json +0 -25
  679. package/src/tokens/contextual/dropdown.tokens.json +0 -148
  680. package/src/tokens/contextual/filtered-search.tokens.json +0 -72
  681. package/src/tokens/contextual/label.tokens.json +0 -118
  682. package/src/tokens/contextual/link.tokens.json +0 -46
  683. package/src/tokens/contextual/progress-bar.tokens.json +0 -38
  684. package/src/tokens/contextual/skeleton-loader.tokens.json +0 -24
  685. package/src/tokens/contextual/spinner.tokens.json +0 -38
  686. package/src/tokens/contextual/table.tokens.json +0 -24
  687. package/src/tokens/contextual/tabs.tokens.json +0 -18
  688. package/src/tokens/contextual/toggle.tokens.json +0 -59
  689. package/src/tokens/contextual/token.tokens.json +0 -21
  690. package/src/tokens/control.tokens.json +0 -177
  691. package/src/tokens/deprecated.color.theme.tokens.json +0 -736
  692. package/src/tokens/deprecated.color.tokens.json +0 -800
  693. package/src/tokens/deprecated.color.transparency.tokens.json +0 -110
  694. package/src/tokens/feedback.tokens.json +0 -200
  695. package/src/tokens/focus-ring.tokens.json +0 -21
  696. package/src/tokens/icon.tokens.json +0 -78
  697. package/src/tokens/line_height.tokens.json +0 -74
  698. package/src/tokens/shadow.tokens.json +0 -14
  699. package/src/tokens/status.tokens.json +0 -196
  700. package/src/tokens/text.tokens.json +0 -105
  701. package/src/tokens/tokens_story.vue +0 -84
  702. package/src/tokens/tokens_table.vue +0 -248
  703. package/src/utils/breakpoints.js +0 -21
  704. package/src/utils/charts/config.js +0 -514
  705. package/src/utils/charts/constants.js +0 -61
  706. package/src/utils/charts/mock_data.js +0 -259
  707. package/src/utils/charts/story_config.js +0 -21
  708. package/src/utils/charts/theme.js +0 -344
  709. package/src/utils/charts/utils.js +0 -49
  710. package/src/utils/constants.js +0 -347
  711. package/src/utils/data_utils.js +0 -28
  712. package/src/utils/datetime_utility.js +0 -63
  713. package/src/utils/i18n.js +0 -62
  714. package/src/utils/is_slot_empty.js +0 -40
  715. package/src/utils/number_utils.js +0 -120
  716. package/src/utils/play_utils.js +0 -9
  717. package/src/utils/set_utils.js +0 -24
  718. package/src/utils/stories_constants.js +0 -30
  719. package/src/utils/stories_utils.js +0 -5
  720. package/src/utils/story_decorators/container.js +0 -14
  721. package/src/utils/string_utils.js +0 -79
  722. package/src/utils/svgs/svg_paths.js +0 -10
  723. package/src/utils/use_fake_date.js +0 -27
  724. package/src/utils/use_mock_intersection_observer.js +0 -96
  725. package/src/utils/utils.js +0 -206
  726. package/src/utils.js +0 -4
  727. package/tailwind.defaults.js +0 -543
  728. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/constants.js +0 -0
  729. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.vue +0 -0
  730. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_category_items.vue +0 -0
  731. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.vue +0 -0
  732. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.vue +0 -0
  733. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.vue +0 -0
  734. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.vue +0 -0
  735. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/mock_context_data.js +0 -0
  736. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_context/utils.js +0 -0
  737. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_conversation/duo_chat_conversation.md +0 -0
  738. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_conversation/duo_chat_conversation.vue +0 -0
  739. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_loader/duo_chat_loader.md +0 -0
  740. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_loader/duo_chat_loader.scss +0 -0
  741. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_loader/duo_chat_loader.vue +0 -0
  742. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/buttons_utils.js +0 -0
  743. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/copy_code_element.js +0 -0
  744. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/duo_chat_message.md +0 -0
  745. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/insert_code_snippet_element.js +0 -0
  746. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message/utils.js +0 -0
  747. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message_sources/duo_chat_message_sources.md +0 -0
  748. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_message_sources/duo_chat_message_sources.vue +0 -0
  749. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.md +0 -0
  750. /package/src/components/{experimental/duo/chat → chat}/components/duo_chat_predefined_prompts/duo_chat_predefined_prompts.vue +0 -0
  751. /package/src/components/{experimental/duo/chat → chat}/constants.js +0 -0
  752. /package/src/components/{experimental/duo/chat → chat}/duo_chat.md +0 -0
  753. /package/src/components/{experimental/duo/chat → chat}/duo_chat.vue +0 -0
  754. /package/src/components/{experimental/duo/chat → chat}/markdown_renderer.js +0 -0
  755. /package/src/components/{experimental/duo/user_feedback → user_feedback}/user_feedback.md +0 -0
  756. /package/src/components/{experimental/duo/user_feedback → user_feedback}/user_feedback.vue +0 -0
  757. /package/src/components/{experimental/duo/user_feedback → user_feedback}/user_feedback_modal.vue +0 -0
  758. /package/src/components/{experimental/duo/workflow → workflow}/components/duo_workflow_panel/duo_workflow_panel.md +0 -0
  759. /package/src/components/{experimental/duo/workflow → workflow}/components/duo_workflow_panel/duo_workflow_panel.vue +0 -0
  760. /package/src/components/{experimental/duo/workflow → workflow}/components/duo_workflow_prompt/duo_workflow_prompt.md +0 -0
  761. /package/src/components/{experimental/duo/workflow → workflow}/components/duo_workflow_prompt/duo_workflow_prompt.vue +0 -0
@@ -0,0 +1,1068 @@
1
+ # Modal
2
+
3
+ > Modals are streamlined, but flexible dialog prompts powered by JavaScript and CSS. They support a
4
+ > number of use cases from user notification to completely custom content and feature a handful of
5
+ > helpful sub-components, sizes, variants, accessibility, and more.
6
+
7
+ ```html
8
+ <div>
9
+ <b-button v-b-modal.modal-1>Launch demo modal</b-button>
10
+
11
+ <b-modal id="modal-1" title="BootstrapVue">
12
+ <p class="my-4">Hello from modal!</p>
13
+ </b-modal>
14
+ </div>
15
+
16
+ <!-- b-modal.vue -->
17
+ ```
18
+
19
+ ## Overview
20
+
21
+ `<b-modal>`, by default, has an **OK** and **Cancel** buttons in the footer. These buttons can be
22
+ customized by setting various props on the component. You can customize the size of the buttons,
23
+ disable buttons, hide the **Cancel** button (i.e. `ok-only`), choose a variant (e.g. `danger` for a
24
+ red OK button) using the `ok-variant` and `cancel-variant` props, and provide custom button content
25
+ using the `ok-title` and `cancel-title` props, or using the named slots `modal-ok` and
26
+ `modal-cancel`.
27
+
28
+ `<b-modal>` supports close on ESC (enabled by default), close on backdrop click (enabled by
29
+ default), and the `X` close button in the header (enabled by default). These features may be
30
+ disabled by setting the props `no-close-on-esc`, `no-close-on-backdrop`, and `hide-header-close`
31
+ respectively.
32
+
33
+ You can override the modal title via the named slot `modal-title`, override the header completely
34
+ via the `modal-header` slot, and override the footer completely via the `modal-footer` slot.
35
+
36
+ **Note**: when using the `modal-footer` slot, the default **OK** and **Cancel** buttons will not be
37
+ present. Also, if you use the `modal-header` slot, the default header `X` close button will not be
38
+ present, nor can you use the `modal-title` slot.
39
+
40
+ Modals will not render their content in the document until they are shown (lazily rendered). Modals,
41
+ when visible, are rendered **appended to the `<body>` element**. The placement of the `<b-modal>`
42
+ component will not affect layout, as it always renders as a placeholder comment node (`<!---->`).
43
+ You can revert to the behaviour of older BootstrapVue versions via the use of the
44
+ [`static` prop](#lazy-loading-and-static-modals).
45
+
46
+ ## Toggle modal visibility
47
+
48
+ There are several methods that you can employ to toggle the visibility of `<b-modal>`.
49
+
50
+ ### Using `v-b-modal` directive
51
+
52
+ Other elements can easily show modals using the `v-b-modal` directive.
53
+
54
+ ```html
55
+ <div>
56
+ <!-- Using modifiers -->
57
+ <b-button v-b-modal.my-modal>Show Modal</b-button>
58
+
59
+ <!-- Using value -->
60
+ <b-button v-b-modal="'my-modal'">Show Modal</b-button>
61
+
62
+ <!-- The modal -->
63
+ <b-modal id="my-modal">Hello From My Modal!</b-modal>
64
+ </div>
65
+
66
+ <!-- b-modal-directive.vue -->
67
+ ```
68
+
69
+ This approach will automatically return focus to the trigger element once the modal closes (similar
70
+ to default Bootstrap functionality). Other approaches for toggling modal visibility may require
71
+ additional code to implement this accessibility feature.
72
+
73
+ See the [Accessibility](#accessibility) section below for details.
74
+
75
+ ### Using `this.$bvModal.show()` and `this.$bvModal.hide()` instance methods
76
+
77
+ When BootstrapVue is installed as a plugin, or the `ModalPlugin` plugin is used, BootstrapVue will
78
+ inject a `$bvModal` object into every Vue instance (components, apps). `this.$bvModal` exposes
79
+ several methods, of which two are for showing and hiding modals:
80
+
81
+ | Method | Description |
82
+ | ------------------------ | -------------------------------------- |
83
+ | `this.$bvModal.show(id)` | Show the modal with the specified `id` |
84
+ | `this.$bvModal.hide(id)` | Hide the modal with the specified `id` |
85
+
86
+ Both methods return immediately after being called.
87
+
88
+ ```html
89
+ <div>
90
+ <b-button id="show-btn" @click="$bvModal.show('bv-modal-example')">Open Modal</b-button>
91
+
92
+ <b-modal id="bv-modal-example" hide-footer>
93
+ <template #modal-title>
94
+ Using <code>$bvModal</code> Methods
95
+ </template>
96
+ <div class="d-block text-center">
97
+ <h3>Hello From This Modal!</h3>
98
+ </div>
99
+ <b-button class="mt-3" block @click="$bvModal.hide('bv-modal-example')">Close Me</b-button>
100
+ </b-modal>
101
+ </div>
102
+
103
+ <!-- b-modal-bv-modal-hide-show.vue -->
104
+ ```
105
+
106
+ The `this.$bvModal` object is also used for displaying [modal message boxes](#modal-message-boxes).
107
+
108
+ ### Using `show()`, `hide()`, and `toggle()` component methods
109
+
110
+ You can access modal using `ref` attribute and then call the `show()`, `hide()` or `toggle()`
111
+ methods.
112
+
113
+ ```html
114
+ <template>
115
+ <div>
116
+ <b-button id="show-btn" @click="showModal">Open Modal</b-button>
117
+ <b-button id="toggle-btn" @click="toggleModal">Toggle Modal</b-button>
118
+
119
+ <b-modal ref="my-modal" hide-footer title="Using Component Methods">
120
+ <div class="d-block text-center">
121
+ <h3>Hello From My Modal!</h3>
122
+ </div>
123
+ <b-button class="mt-3" variant="outline-danger" block @click="hideModal">Close Me</b-button>
124
+ <b-button class="mt-2" variant="outline-warning" block @click="toggleModal">Toggle Me</b-button>
125
+ </b-modal>
126
+ </div>
127
+ </template>
128
+
129
+ <script>
130
+ export default {
131
+ methods: {
132
+ showModal() {
133
+ this.$refs['my-modal'].show()
134
+ },
135
+ hideModal() {
136
+ this.$refs['my-modal'].hide()
137
+ },
138
+ toggleModal() {
139
+ // We pass the ID of the button that we want to return focus to
140
+ // when the modal has hidden
141
+ this.$refs['my-modal'].toggle('#toggle-btn')
142
+ }
143
+ }
144
+ }
145
+ </script>
146
+
147
+ <!-- b-modal-methods.vue -->
148
+ ```
149
+
150
+ The `hide()` method accepts an optional string `trigger` argument for defining what triggered the
151
+ modal to close. See section [Prevent Closing](#prevent-closing) below for details.
152
+
153
+ **Note:** It is recommended to use the `this.$bvModal.show()` and `this.$bvModal.hide()` methods
154
+ (mentioned in the previous section) instead of using `$ref` methods.
155
+
156
+ ### Using `v-model` property
157
+
158
+ `v-model` property is always automatically synced with `<b-modal>` visible state and you can
159
+ show/hide using `v-model`.
160
+
161
+ ```html
162
+ <template>
163
+ <div>
164
+ <b-button @click="modalShow = !modalShow">Open Modal</b-button>
165
+
166
+ <b-modal v-model="modalShow">Hello From Modal!</b-modal>
167
+ </div>
168
+ </template>
169
+
170
+ <script>
171
+ export default {
172
+ data() {
173
+ return {
174
+ modalShow: false
175
+ }
176
+ }
177
+ }
178
+ </script>
179
+
180
+ <!-- b-modal-v-model.vue -->
181
+ ```
182
+
183
+ When using the `v-model` prop, **do not** use the `visible` prop at the same time.
184
+
185
+ ### Using scoped slot scope methods
186
+
187
+ Refer to the [Custom rendering with slots](#custom-rendering-with-slots) section on using the
188
+ various methods passed to scoped slots for closing modals.
189
+
190
+ ### Emitting events on \$root
191
+
192
+ You can emit `bv::show::modal`, `bv::hide::modal`, and `bv::toggle::modal` events on `$root` with
193
+ the first argument set to the modal's id. An optional second argument can specify the element to
194
+ return focus to once the modal is closed. The second argument can be a CSS selector, an element
195
+ reference, or a component reference (the root element of the component will be focused).
196
+
197
+ ```html
198
+ <div>
199
+ <b-button @click="showModal" ref="btnShow">Open Modal</b-button>
200
+ <b-button @click="toggleModal" ref="btnToggle">Toggle Modal</b-button>
201
+
202
+ <b-modal id="modal-1">
203
+ <div class="d-block">Hello From My Modal!</div>
204
+ <b-button @click="hideModal">Close Me</b-button>
205
+ <b-button @click="toggleModal">Toggle Me</b-button>
206
+ </b-modal>
207
+ </div>
208
+ ```
209
+
210
+ ```js
211
+ export default {
212
+ methods: {
213
+ showModal() {
214
+ this.$root.$emit('bv::show::modal', 'modal-1', '#btnShow')
215
+ },
216
+ hideModal() {
217
+ this.$root.$emit('bv::hide::modal', 'modal-1', '#btnShow')
218
+ },
219
+ toggleModal() {
220
+ this.$root.$emit('bv::toggle::modal', 'modal-1', '#btnToggle')
221
+ }
222
+ }
223
+ }
224
+ ```
225
+
226
+ **Note:** It is recommended to use the `this.$bvModal.show()` and `this.$bvModal.hide()` methods
227
+ (mentioned in a previous section) instead of emitting `$root` events.
228
+
229
+ ### Prevent closing
230
+
231
+ To prevent `<b-modal>` from closing (for example when validation fails). you can call the
232
+ `.preventDefault()` method of the event object passed to your `ok` (**OK** button), `cancel`
233
+ (**Cancel** button), `close` (modal header close button) and `hide` event handlers. Note that
234
+ `.preventDefault()`, when used, **must** be called synchronously, as async is not supported.
235
+
236
+ ```html
237
+ <template>
238
+ <div>
239
+ <b-button v-b-modal.modal-prevent-closing>Open Modal</b-button>
240
+
241
+ <div class="mt-3">
242
+ Submitted Names:
243
+ <div v-if="submittedNames.length === 0">--</div>
244
+ <ul v-else class="mb-0 pl-3">
245
+ <li v-for="name in submittedNames">{{ name }}</li>
246
+ </ul>
247
+ </div>
248
+
249
+ <b-modal
250
+ id="modal-prevent-closing"
251
+ ref="modal"
252
+ title="Submit Your Name"
253
+ @show="resetModal"
254
+ @hidden="resetModal"
255
+ @ok="handleOk"
256
+ >
257
+ <form ref="form" @submit.stop.prevent="handleSubmit">
258
+ <b-form-group
259
+ label="Name"
260
+ label-for="name-input"
261
+ invalid-feedback="Name is required"
262
+ :state="nameState"
263
+ >
264
+ <b-form-input
265
+ id="name-input"
266
+ v-model="name"
267
+ :state="nameState"
268
+ required
269
+ ></b-form-input>
270
+ </b-form-group>
271
+ </form>
272
+ </b-modal>
273
+ </div>
274
+ </template>
275
+
276
+ <script>
277
+ export default {
278
+ data() {
279
+ return {
280
+ name: '',
281
+ nameState: null,
282
+ submittedNames: []
283
+ }
284
+ },
285
+ methods: {
286
+ checkFormValidity() {
287
+ const valid = this.$refs.form.checkValidity()
288
+ this.nameState = valid
289
+ return valid
290
+ },
291
+ resetModal() {
292
+ this.name = ''
293
+ this.nameState = null
294
+ },
295
+ handleOk(bvModalEvent) {
296
+ // Prevent modal from closing
297
+ bvModalEvent.preventDefault()
298
+ // Trigger submit handler
299
+ this.handleSubmit()
300
+ },
301
+ handleSubmit() {
302
+ // Exit when the form isn't valid
303
+ if (!this.checkFormValidity()) {
304
+ return
305
+ }
306
+ // Push the name to submitted names
307
+ this.submittedNames.push(this.name)
308
+ // Hide the modal manually
309
+ this.$nextTick(() => {
310
+ this.$bvModal.hide('modal-prevent-closing')
311
+ })
312
+ }
313
+ }
314
+ }
315
+ </script>
316
+
317
+ <!-- b-modal-prevent-closing.vue -->
318
+ ```
319
+
320
+ **Note**: events `ok`, `cancel`, and `close` are emitted by modal's built in **OK**, **Cancel**, and
321
+ header close (**X**) buttons respectively. These events will not be emitted, by default, if you have
322
+ provided your own buttons in the `modal-footer` slot or have hidden the footer. In this case use the
323
+ `hide` event to control cancelling of the modal close. Event `hide` is always emitted, even if `ok`,
324
+ `cancel`, and `close` are emitted.
325
+
326
+ The `ok`, `cancel`, `close` and `hide` event object (`BvModalEvent`) contains several properties and
327
+ methods:
328
+
329
+ | Property or Method | Type | Description |
330
+ | ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
331
+ | `preventDefault()` | Method | When called prevents the modal from closing |
332
+ | `trigger` | Property | Will be one of: `ok` (Default **OK** Clicked), `cancel` (Default **Cancel** clicked), `esc` (if the <kbd>Esc</kbd> key was pressed), `backdrop` (if the backdrop was clicked), `headerclose` (if the header X button was clicked), the first argument provided to the `hide()` method, or `null` otherwise. |
333
+ | `target` | Property | A reference to the modal element |
334
+ | `vueTarget` | property | A reference to the modal's Vue VM instance |
335
+ | `componentId` | property | The modal's ID |
336
+
337
+ You can set the value of `trigger` by passing an argument to the component's `hide()` method for
338
+ advanced control (i.e. detecting what button or action triggered the modal to hide).
339
+
340
+ **Note:** `ok`, `cancel`, or `close` events will be only emitted when the argument to `hide()` is
341
+ strictly `'ok'`, `'cancel'`, or `'headerclose'` respectively. The argument passed to `hide()` will
342
+ be placed into the `trigger` property of the event object.
343
+
344
+ ## Modal content
345
+
346
+ ### Using the grid
347
+
348
+ Utilize the Bootstrap grid system within a modal by nesting `<b-container fluid>` within the
349
+ modal-body. Then, use the normal grid system `<b-row>` (or `<b-form-row>`) and `<b-col>` as you
350
+ would anywhere else.
351
+
352
+ ### Tooltips and popovers
353
+
354
+ Tooltips and popovers can be placed within modals as needed. When modals are closed, any tooltips
355
+ and popovers within are also automatically dismissed. Tooltips and popovers are automatically
356
+ appended to the modal element (to ensure correct z-indexing), although you can override where they
357
+ are appended by specifying a container ID (refer to tooltip and popover docs for details).
358
+
359
+ ```html
360
+ <div>
361
+ <b-button v-b-modal.modalPopover>Show Modal</b-button>
362
+
363
+ <b-modal id="modalPopover" title="Modal with Popover" ok-only>
364
+ <p>
365
+ This <a href="#" v-b-tooltip title="Tooltip in a modal!">Link</a> will show a tooltip on
366
+ hover.
367
+ </p>
368
+ </b-modal>
369
+ </div>
370
+
371
+ <!-- b-modal-popover.vue -->
372
+ ```
373
+
374
+ ## Lazy loading and static modals
375
+
376
+ By default, modals will not render their content in the document until they are shown (lazily
377
+ rendered). Modals that, when visible, are rendered appended to the `<body>` element. The `<b-modal>`
378
+ component will not affect layout, as they render as a placeholder comment node (`<!---->`) in the
379
+ DOM position they are placed. Due to the portalling process, it can take two or more `$nextTick`s to
380
+ render changes of the content into the target.
381
+
382
+ Modals can be rendered _in-place_ in the document (i.e. where the `<b-modal>` component is placed in
383
+ the document) by setting the `static` prop to `true`. Note that the content of the modal will be
384
+ rendered in the DOM even if the modal is not visible/shown when `static` is `true`. To make `static`
385
+ modals lazy rendered, also set the `lazy` prop to `true`. The modal will then appear in the document
386
+ _only_ when it is visible. Note, when in `static` mode, placement of the `<b-modal>` component _may
387
+ affect layout_ of your document and the modal.
388
+
389
+ The `lazy` prop will have no effect if the prop `static` is not `true` (non-static modals will
390
+ _always_ be lazily rendered).
391
+
392
+ ## Styling, options, and customization
393
+
394
+ ### Modal sizing
395
+
396
+ Modals have three optional sizes, available via the prop `size`. These sizes kick in at certain
397
+ breakpoints to avoid horizontal scrollbars on narrower viewports. Valid optional sizes are `sm`,
398
+ `lg`, and `xl`.
399
+
400
+ ```html
401
+ <div>
402
+ <b-button v-b-modal.modal-xl variant="primary">xl modal</b-button>
403
+ <b-button v-b-modal.modal-lg variant="primary">lg modal</b-button>
404
+ <b-button v-b-modal.modal-sm variant="primary">sm modal</b-button>
405
+
406
+ <b-modal id="modal-xl" size="xl" title="Extra Large Modal">Hello Extra Large Modal!</b-modal>
407
+ <b-modal id="modal-lg" size="lg" title="Large Modal">Hello Large Modal!</b-modal>
408
+ <b-modal id="modal-sm" size="sm" title="Small Modal">Hello Small Modal!</b-modal>
409
+ </div>
410
+
411
+ <!-- b-modal-sizes.vue -->
412
+ ```
413
+
414
+ The `size` prop maps the size to the `.modal-<size>` classes.
415
+
416
+ ### Scrolling long content
417
+
418
+ When modals become too long for the user's viewport or device, they scroll independent of the page
419
+ itself. Try the demo below to see what we mean.
420
+
421
+ ```html
422
+ <div>
423
+ <b-button v-b-modal.modal-tall>Launch overflowing modal</b-button>
424
+
425
+ <b-modal id="modal-tall" title="Overflowing Content">
426
+ <p class="my-4" v-for="i in 20" :key="i">
427
+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis
428
+ in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
429
+ </p>
430
+ </b-modal>
431
+ </div>
432
+
433
+ <!-- b-modal-scroll-overflow.vue -->
434
+ ```
435
+
436
+ You can also create a scrollable modal that allows the scrolling of the modal body by setting the
437
+ prop `scrollable` to `true`.
438
+
439
+ ```html
440
+ <div>
441
+ <b-button v-b-modal.modal-scrollable>Launch scrolling modal</b-button>
442
+
443
+ <b-modal id="modal-scrollable" scrollable title="Scrollable Content">
444
+ <p class="my-4" v-for="i in 20" :key="i">
445
+ Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis
446
+ in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
447
+ </p>
448
+ </b-modal>
449
+ </div>
450
+
451
+ <!-- b-modal-scrollable-content.vue -->
452
+ ```
453
+
454
+ ### Vertically centered modal
455
+
456
+ Vertically center your modal in the viewport by setting the `centered` prop.
457
+
458
+ ```html
459
+ <div>
460
+ <b-button v-b-modal.modal-center>Launch centered modal</b-button>
461
+
462
+ <b-modal id="modal-center" centered title="BootstrapVue">
463
+ <p class="my-4">Vertically centered modal!</p>
464
+ </b-modal>
465
+ </div>
466
+
467
+ <!-- b-modal-center-vertically.vue -->
468
+ ```
469
+
470
+ Feel free to mix vertically `centered` with `scrollable`.
471
+
472
+ ### Pass CSS classes
473
+
474
+ You can apply arbitrary classes to the modal dialog container, content (modal window itself),
475
+ header, body and footer via the `modal-class`, `content-class`, `header-class`, `body-class` and
476
+ `footer-class` props, respectively. The props accept either a string or array of strings.
477
+
478
+ ### Hiding the backdrop
479
+
480
+ Hide the modal's backdrop via setting the `hide-backdrop` prop.
481
+
482
+ ```html
483
+ <div>
484
+ <b-button v-b-modal.modal-no-backdrop>Open modal</b-button>
485
+
486
+ <b-modal id="modal-no-backdrop" hide-backdrop content-class="shadow" title="BootstrapVue">
487
+ <p class="my-2">
488
+ We've added the utility class <code>'shadow'</code>
489
+ to the modal content for added effect.
490
+ </p>
491
+ </b-modal>
492
+ </div>
493
+
494
+ <!-- modal-no-backdrop.vue -->
495
+ ```
496
+
497
+ Note that clicking outside of the modal will still close the modal even though the backdrop is
498
+ hidden. You can disable this behaviour by setting the `no-close-on-backdrop` prop on `<b-modal>`.
499
+
500
+ ### Disable open and close animation
501
+
502
+ To disable the fading transition/animation when modal opens and closes, just set the prop `no-fade`
503
+ on the `<b-modal>` component.
504
+
505
+ ### Footer button sizing
506
+
507
+ Fancy smaller or larger buttons in the default footer? Simply set the `button-size` prop to `'sm'`
508
+ for small buttons, or `'lg'` for larger buttons.
509
+
510
+ ```html
511
+ <div>
512
+ <b-button v-b-modal.modal-footer-sm>Small Footer Buttons</b-button>
513
+ <b-button v-b-modal.modal-footer-lg>Large Footer Buttons</b-button>
514
+
515
+ <b-modal id="modal-footer-sm" title="BootstrapVue" button-size="sm">
516
+ <p class="my-2">This modal has small footer buttons</p>
517
+ </b-modal>
518
+
519
+ <b-modal id="modal-footer-lg" title="BootstrapVue" button-size="lg">
520
+ <p class="my-2">This modal has large footer buttons</p>
521
+ </b-modal>
522
+ </div>
523
+
524
+ <!-- modal-footer-btn-sizes.vue -->
525
+ ```
526
+
527
+ The prop `button-size` has no effect if you have provided your own footer via the
528
+ [`modal-footer`](#custom-rendering-with-slots) slot.
529
+
530
+ ### Disabling built-in footer buttons
531
+
532
+ You can disable the built-in footer buttons programmatically.
533
+
534
+ You can disable the **Cancel** and **OK** buttons individually by setting the `cancel-disabled` and
535
+ `ok-disabled` props, respectively, to `true`. Set the prop to `false` to re-enable the button.
536
+
537
+ To disable both **Cancel** and **OK** buttons at the same time, simply set the `busy` prop to
538
+ `true`. Set it to `false` to re-enable both buttons.
539
+
540
+ ### Custom rendering with slots
541
+
542
+ `<b-modal>` provides several named slots (of which some are optionally scoped) that you can use to
543
+ customize the content of various sections of the modal.
544
+
545
+ | Slot | Optionally Scoped | Description |
546
+ | -------------------- | ----------------- | ------------------------------------------------------------------------------------- |
547
+ | `default` | Yes | Main content of the modal |
548
+ | `modal-title` | Yes | Content to place in the modal's title |
549
+ | `modal-header` | Yes | Content to place in the header. Replaces the entire header including the close button |
550
+ | `modal-footer` | Yes | Content to place in the footer. Replaces the entire footer including the button(s) |
551
+ | `modal-ok` | No | Content to place inside the footer OK button |
552
+ | `modal-cancel` | No | Content to place inside the footer CANCEL button |
553
+ | `modal-header-close` | No | Content to place inside the header CLOSE (`x`) button |
554
+
555
+ The scope available to the slots that support optional scoping are:
556
+
557
+ | Method or Property | Description |
558
+ | ------------------ | ------------------------------------------------------------------------------------------------------------ |
559
+ | `ok()` | Closes the modal and fires the `ok` and `hide` events, with `bvModalEvent.trigger = 'ok'` |
560
+ | `cancel()` | Closes the modal and fires the `cancel` and `hide` events, with `bvModalEvent.trigger = 'cancel'` |
561
+ | `close()` | Closes the modal and fires the `close` and `hide` events, with `bvModalEvent.trigger = 'headerclose'` |
562
+ | `hide(trigger)` | Closes the modal and fires the `hide` event, with the `bvModalEvent.trigger = trigger` (trigger is optional) |
563
+ | `visible` | The visibility state of the modal. `true` if the modal is visible and `false` if not visible |
564
+
565
+ #### Example modal using custom scoped slots
566
+
567
+ ```html
568
+ <template>
569
+ <b-button @click="$bvModal.show('modal-scoped')">Open Modal</b-button>
570
+
571
+ <b-modal id="modal-scoped">
572
+ <template #modal-header="{ close }">
573
+ <!-- Emulate built in modal header close button action -->
574
+ <b-button size="sm" variant="outline-danger" @click="close()">
575
+ Close Modal
576
+ </b-button>
577
+ <h5>Modal Header</h5>
578
+ </template>
579
+
580
+ <template #default="{ hide }">
581
+ <p>Modal Body with button</p>
582
+ <b-button @click="hide()">Hide Modal</b-button>
583
+ </template>
584
+
585
+ <template #modal-footer="{ ok, cancel, hide }">
586
+ <b>Custom Footer</b>
587
+ <!-- Emulate built in modal footer ok and cancel button actions -->
588
+ <b-button size="sm" variant="success" @click="ok()">
589
+ OK
590
+ </b-button>
591
+ <b-button size="sm" variant="danger" @click="cancel()">
592
+ Cancel
593
+ </b-button>
594
+ <!-- Button with custom close trigger value -->
595
+ <b-button size="sm" variant="outline-secondary" @click="hide('forget')">
596
+ Forget it
597
+ </b-button>
598
+ </template>
599
+ </b-modal>
600
+ </template>
601
+
602
+ <!-- b-modal-scoped-slots.vue -->
603
+ ```
604
+
605
+ ## Multiple modal support
606
+
607
+ Unlike native Bootstrap v4, BootstrapVue supports multiple modals opened at the same time.
608
+
609
+ To disable stacking for a specific modal, just set the prop `no-stacking` on the `<b-modal>`
610
+ component. This will hide the modal before another modal is shown.
611
+
612
+ ```html
613
+ <div>
614
+ <b-button v-b-modal.modal-multi-1>Open First Modal</b-button>
615
+
616
+ <b-modal id="modal-multi-1" size="lg" title="First Modal" ok-only no-stacking>
617
+ <p class="my-2">First Modal</p>
618
+ <b-button v-b-modal.modal-multi-2>Open Second Modal</b-button>
619
+ </b-modal>
620
+
621
+ <b-modal id="modal-multi-2" title="Second Modal" ok-only>
622
+ <p class="my-2">Second Modal</p>
623
+ <b-button v-b-modal.modal-multi-3 size="sm">Open Third Modal</b-button>
624
+ </b-modal>
625
+
626
+ <b-modal id="modal-multi-3" size="sm" title="Third Modal" ok-only>
627
+ <p class="my-1">Third Modal</p>
628
+ </b-modal>
629
+ </div>
630
+
631
+ <!-- b-modal-multiple.vue -->
632
+ ```
633
+
634
+ **Notes:**
635
+
636
+ - Avoid nesting a `<b-modal>` _inside_ another `<b-modal>`, as it may get "constrained" to the
637
+ boundaries of the parent modal dialog (specifically when static modals are used).
638
+ - The opaque backdrop will appear progressively darker for each modal that is opened. This is
639
+ expected behaviour as each backdrop is opened over top the other modals and backdrops.
640
+
641
+ ## Modal message boxes
642
+
643
+ BootstrapVue provides a few built in Message Box methods on the exposed `this.$bvModal` object.
644
+ These methods provide a way to generate simple OK and Confirm style modal messages, from anywhere in
645
+ your app without having to explicitly place a `<b-modal>` component in your pages.
646
+
647
+ | Method | Description |
648
+ | ----------------------------------------------- | -------------------------------------------------------------------- |
649
+ | `this.$bvModal.msgBoxOk(message, options)` | Open a modal with `message` as the content and a single OK button |
650
+ | `this.$bvModal.msgBoxConfirm(message, options)` | Open a modal with `message` as the content and CANCEL and OK buttons |
651
+
652
+ The `options` argument is an optional configuration object for adding titles and styling the Message
653
+ Box modal. The object properties correspond to `<b-modal>` props, except in <samp>camelCase</samp>
654
+ format instead of <samp>kebab-case</samp>.
655
+
656
+ Both methods return a `Promise` (requires a polyfill for IE 11 and older browser support) which
657
+ resolve into a value when the modal hides. `.msgBoxOk()` always resolves to the value `true`, while
658
+ `.msgBoxConfirm()` resolves to either `true` (OK button pressed), `false` (CANCEL button pressed),
659
+ or `null` (if the modal was closed via backdrop click, <kbd>Esc</kbd> press, or some other means.
660
+
661
+ If `message` is not provided, both methods will return immediately with the value `undefined`.
662
+
663
+ You can use either the `.then(..).catch(...)` or async `await` code styles (async `await` requires
664
+ modern browsers or a transpiler).
665
+
666
+ ### OK message box
667
+
668
+ Example OK Message boxes
669
+
670
+ ```html
671
+ <template>
672
+ <div>
673
+ <div class="mb-2">
674
+ <b-button @click="showMsgBoxOne">Simple msgBoxOk</b-button>
675
+ Return value: {{ String(boxOne) }}
676
+ </div>
677
+ <div class="mb-1">
678
+ <b-button @click="showMsgBoxTwo">msgBoxOk with options</b-button>
679
+ Return value: {{ String(boxTwo) }}
680
+ </div>
681
+ </div>
682
+ </template>
683
+
684
+ <script>
685
+ export default {
686
+ data() {
687
+ return {
688
+ boxOne: '',
689
+ boxTwo: ''
690
+ }
691
+ },
692
+ methods: {
693
+ showMsgBoxOne() {
694
+ this.boxOne = ''
695
+ this.$bvModal.msgBoxOk('Action completed')
696
+ .then(value => {
697
+ this.boxOne = value
698
+ })
699
+ .catch(err => {
700
+ // An error occurred
701
+ })
702
+ },
703
+ showMsgBoxTwo() {
704
+ this.boxTwo = ''
705
+ this.$bvModal.msgBoxOk('Data was submitted successfully', {
706
+ title: 'Confirmation',
707
+ size: 'sm',
708
+ buttonSize: 'sm',
709
+ okVariant: 'success',
710
+ headerClass: 'p-2 border-bottom-0',
711
+ footerClass: 'p-2 border-top-0',
712
+ centered: true
713
+ })
714
+ .then(value => {
715
+ this.boxTwo = value
716
+ })
717
+ .catch(err => {
718
+ // An error occurred
719
+ })
720
+ }
721
+ }
722
+ }
723
+ </script>
724
+
725
+ <!-- b-modal-msg-box-ok.vue -->
726
+ ```
727
+
728
+ ### Confirm message box
729
+
730
+ Example Confirm Message boxes
731
+
732
+ ```html
733
+ <template>
734
+ <div>
735
+ <div class="mb-2">
736
+ <b-button @click="showMsgBoxOne">Simple msgBoxConfirm</b-button>
737
+ Return value: {{ String(boxOne) }}
738
+ </div>
739
+ <div class="mb-1">
740
+ <b-button @click="showMsgBoxTwo">msgBoxConfirm with options</b-button>
741
+ Return value: {{ String(boxTwo) }}
742
+ </div>
743
+ </div>
744
+ </template>
745
+
746
+ <script>
747
+ export default {
748
+ data() {
749
+ return {
750
+ boxOne: '',
751
+ boxTwo: ''
752
+ }
753
+ },
754
+ methods: {
755
+ showMsgBoxOne() {
756
+ this.boxOne = ''
757
+ this.$bvModal.msgBoxConfirm('Are you sure?')
758
+ .then(value => {
759
+ this.boxOne = value
760
+ })
761
+ .catch(err => {
762
+ // An error occurred
763
+ })
764
+ },
765
+ showMsgBoxTwo() {
766
+ this.boxTwo = ''
767
+ this.$bvModal.msgBoxConfirm('Please confirm that you want to delete everything.', {
768
+ title: 'Please Confirm',
769
+ size: 'sm',
770
+ buttonSize: 'sm',
771
+ okVariant: 'danger',
772
+ okTitle: 'YES',
773
+ cancelTitle: 'NO',
774
+ footerClass: 'p-2',
775
+ hideHeaderClose: false,
776
+ centered: true
777
+ })
778
+ .then(value => {
779
+ this.boxTwo = value
780
+ })
781
+ .catch(err => {
782
+ // An error occurred
783
+ })
784
+ }
785
+ }
786
+ }
787
+ </script>
788
+
789
+ <!-- b-modal-msg-box-confirm.vue -->
790
+ ```
791
+
792
+ ### Message box notes
793
+
794
+ - A new `$bvModal` injection (mixin) is created for each Vue virtual machine (i.e. each instantiated
795
+ component), and is not usable via direct access to the `Vue.prototype`, as it needs access to the
796
+ instance's `this` and `$root` contexts.
797
+ - Message Boxes require `Promise` support in the browser. If targeting your app for older browsers,
798
+ such as IE 11, please include a polyfill that provides `Promise` support. If `Promise` support is
799
+ not detected, then the message box methods will immediately return `undefined`.
800
+ - Message Boxes are an extension of the `<b-modal>` component, and hence support the majority of
801
+ `<b-modal>` props (using <samp>camelCase</samp> format), with the exception of the following
802
+ props: `lazy`, `static`, `busy`, `visible`, `noStacking`, `okOnly`, `okDisabled`, and
803
+ `cancelDisabled`.
804
+ - When a `title` (or `titleHtml`) _is not_ provided in the options, the header will not be shown.
805
+ - When a `title` (or `titleHtml`) _is_ provided in the options, the header close button is not shown
806
+ by default. You can enable the header close button by setting `hideHeaderClose: false` in the
807
+ options.
808
+ - Message Boxes will throw an error (promise rejection) if they are closed/destroyed before they are
809
+ hidden. Always include a `.catch(errHandler)` reject handler, event if using the async `await`
810
+ style code.
811
+ - When using Vue Router (or similar), Message Boxes will close and reject if the route changes
812
+ before the modal hides. If you wish for the message box to remain open when the route changes, use
813
+ `this.$root.$bvModal` instead of `this.$bvModal`.
814
+ - Message boxes cannot be generated during Server Side Rendering (SSR).
815
+ - The Message Box `message` currently does not support HTML strings, however, you can pass an
816
+ _array_ of `VNodes` as the `message` for fine grained control of the markup. You can use Vue's
817
+ [`this.$createElement`](https://vuejs.org/v2/guide/render-function.html#createElement-Arguments)
818
+ method to generate VNodes. This can also be done for the modal title (by passing VNodes to the
819
+ `title` option), OK button text (via the `okTitle` option), and the CANCEL button text (via the
820
+ `cancelTitle` option).
821
+
822
+ ### Message box advanced usage
823
+
824
+ When using the `this.$bvModal.msgBoxOk(...)` or `this.$bvModal.msgBoxConfirm(...)` methods for
825
+ generating modals, you may want the modal content to be more than just a string message. As
826
+ mentioned in the [message box notes](#message-box-notes) section above, you can pass _arrays_ of
827
+ VNodes as the message and title for more complex content.
828
+
829
+ Use Vue's
830
+ [`this.$createElement`](https://vuejs.org/v2/guide/render-function.html#createElement-Arguments)
831
+ method to generate VNodes.
832
+
833
+ ```html
834
+ <template>
835
+ <div>
836
+ <b-button @click="showMsgOk">Show OK message box with custom content</b-button>
837
+ </div>
838
+ </template>
839
+
840
+ <script>
841
+ export default {
842
+ methods: {
843
+ showMsgOk() {
844
+ const h = this.$createElement
845
+ // Using HTML string
846
+ const titleVNode = h('div', { domProps: { innerHTML: 'Title from <i>HTML<i> string' } })
847
+ // More complex structure
848
+ const messageVNode = h('div', { class: ['foobar'] }, [
849
+ h('p', { class: ['text-center'] }, [
850
+ ' Flashy ',
851
+ h('strong', 'msgBoxOk'),
852
+ ' message ',
853
+ ]),
854
+ h('b-img', {
855
+ props: {
856
+ src: 'https://picsum.photos/id/20/250/250',
857
+ thumbnail: true,
858
+ center: true,
859
+ fluid: true, rounded: 'circle'
860
+ }
861
+ })
862
+ ])
863
+ // We must pass the generated VNodes as arrays
864
+ this.$bvModal.msgBoxOk([messageVNode], {
865
+ title: [titleVNode],
866
+ buttonSize: 'sm',
867
+ centered: true, size: 'sm'
868
+ })
869
+ }
870
+ }
871
+ }
872
+ </script>
873
+
874
+ <!-- modal-msg-box-advanced.vue -->
875
+ ```
876
+
877
+ ## Listening to modal changes via \$root events
878
+
879
+ To listen to any modal opening, use:
880
+
881
+ ```js
882
+ export default {
883
+ mounted() {
884
+ this.$root.$on('bv::modal::show', (bvEvent, modalId) => {
885
+ console.log('Modal is about to be shown', bvEvent, modalId)
886
+ })
887
+ }
888
+ }
889
+ ```
890
+
891
+ Refer to the [Events](#comp-ref-b-modal) section of this documentation for the full list of events
892
+ emitted.
893
+
894
+ ## Accessibility
895
+
896
+ `<b-modal>` provides several accessibility features, including auto focus, return focus, keyboard
897
+ (tab) _focus containment_, and automated `aria-*` attributes.
898
+
899
+ **Note:** The animation effect of this component is dependent on the `prefers-reduced-motion` media
900
+ query. See the
901
+ [reduced motion section of our accessibility documentation](/docs/reference/accessibility) for
902
+ additional details.
903
+
904
+ ### Modal ARIA attributes
905
+
906
+ The `aria-labelledby` and `aria-describedby` attributes will appear on the modal automatically in
907
+ most cases.
908
+
909
+ - The `aria-labelledby` attribute will **not** be present if you have the header hidden, or supplied
910
+ your own header, or have not supplied a modal title. It is recommended to supply a title for your
911
+ modals (when using the built in header). You can visually hide the header title, but still make it
912
+ available to screen readers by setting the `title-sr-only` prop. If you do not have a header, you
913
+ can supply a label for the modal by passing a string to the `aria-label` prop.
914
+ - The `aria-describedby` attribute will always point to the modal's body content.
915
+ - If the `aria-label` prop is specified with a string value, the `aria-labelledby` attribute will
916
+ not be rendered, even if you have a title/header for your modal.
917
+
918
+ The `aria-label` and `title-sr-only` props were added in version `v2.0.0-rc.27`.
919
+
920
+ ### Auto focus on open
921
+
922
+ `<b-modal>` will autofocus the modal _container_ when opened.
923
+
924
+ You can pre-focus an element within the `<b-modal>` by listening to the `<b-modal>` `shown` event,
925
+ and call the element's `focus()` method. `<b-modal>` will not attempt to autofocus if an element
926
+ already has focus within the `<b-modal>`.
927
+
928
+ ```html
929
+ <b-modal @shown="focusMyElement">
930
+ <div>
931
+ <b-button>I Don't Have Focus</b-button>
932
+ </div>
933
+
934
+ <div>
935
+ <b-form-input></b-form-input>
936
+ </div>
937
+
938
+ <div>
939
+ <!-- Element to gain focus when modal is opened -->
940
+ <b-form-input ref="focusThis"></b-form-input>
941
+ </div>
942
+
943
+ <div>
944
+ <b-form-input></b-form-input>
945
+ </div>
946
+ </b-modal>
947
+ ```
948
+
949
+ ```js
950
+ export default {
951
+ methods: {
952
+ focusMyElement() {
953
+ this.$refs.focusThis.focus()
954
+ }
955
+ }
956
+ }
957
+ ```
958
+
959
+ Alternatively, if using `b-form-*` form controls, you can use the `autofocus` prop to automatically
960
+ focus a form control when the modal opens. Note that the `autofocus` prop will not work with
961
+ `b-modal` if the `static` prop is used without the `lazy` prop set, as `autofocus` happens when the
962
+ `b-form-*` controls are _mounted in the DOM_.
963
+
964
+ If you want to auto focus one of the _built-in_ modal buttons (`ok`, `cancel` or the header `close`
965
+ button, you can set the prop `auto-focus-button` to one of the values `'ok'`, `'cancel'` or
966
+ `'close'` and `<b-modal>` will focus the specified button if it exists. This feature is also
967
+ available for modal message boxes.
968
+
969
+ <p class="alert alert-warning">
970
+ <strong>Note:</strong> it is <strong>not recommended</strong> to autofocus an input or control
971
+ inside of a modal for accessibility reasons, as screen reader users will not know the context of
972
+ where the input is (the announcement of the modal may not be spoken). It is best to let
973
+ <code>&lt;b-modal&gt;</code> focus the modal's container, allowing the modal information to be
974
+ spoken to the user, and then allow the user to tab into the input.
975
+ </p>
976
+
977
+ ### Returning focus to the triggering element
978
+
979
+ For accessibility reasons, it is desirable to return focus to the element that triggered the opening
980
+ of the modal, when the modal closes.
981
+
982
+ `<b-modal>` will try and automatically determine which element had focus before the modal was
983
+ opened, and will return the focus to that element when the modal has hidden if possible. However,
984
+ several methods and options are provided to allow you to specify the element to return focus to once
985
+ the modal has hidden.
986
+
987
+ #### Specify return focus element via the `return-focus` prop
988
+
989
+ You can also specify an element to return focus to, when modal closes, by setting the `return-focus`
990
+ prop to one of the following:
991
+
992
+ - A CSS Query Selector string (or an element ID prepended with `#`)
993
+ - A component reference (which is mounted on a focusable element, such as `<b-button>`)
994
+ - A reference to a DOM element that is focusable
995
+
996
+ If the passed in element is not focusable, then the browser will determine what has focus (usually
997
+ `<body>`, which is not desirable)
998
+
999
+ This method for returning focus is handy when you use the `<b-modal>` methods `show()` and `hide()`,
1000
+ or the `v-model` prop. Note this property takes precedence over other methods of specifying the
1001
+ return focus element.
1002
+
1003
+ #### Auto return focus
1004
+
1005
+ When `<b-modal>` is opened via the `v-b-modal` directive on an element, focus will be returned to
1006
+ this element automatically when `<b-modal>` closes, unless an element has been specified via the
1007
+ `return-focus` prop.
1008
+
1009
+ #### Specify return focus via event
1010
+
1011
+ When using the `bv::show::modal` event (emitted on `$root`), you can specify a second argument which
1012
+ is the element to return focus to. This argument accepts the same types as the `return-focus` prop.
1013
+
1014
+ ```js
1015
+ this.$root.$emit('bv::show::modal', 'modal-1', '#focusThisOnClose')
1016
+ ```
1017
+
1018
+ _Tip:_ if using a click event (or similar) to trigger modal to open, pass the event's `target`
1019
+ property:
1020
+
1021
+ ```html
1022
+ <div>
1023
+ <b-button @click="$root.$emit('bv::show::modal', 'modal-1', $event.target)">Open Modal</b-button>
1024
+ </div>
1025
+ ```
1026
+
1027
+ **Note:** If the `<b-modal>` has the `return-focus` prop set, then the element specified via the
1028
+ event will be ignored.
1029
+
1030
+ ### Keyboard navigation
1031
+
1032
+ When tabbing through elements within a `<b-modal>`, if focus attempts to leave the modal into the
1033
+ document, it will be brought back into the modal.
1034
+
1035
+ Avoid setting `tabindex` on elements within the modal to any value other than `0` or `-1`. Doing so
1036
+ will make it difficult for people who rely on assistive technology to navigate and operate page
1037
+ content and can make some of your elements unreachable via keyboard navigation.
1038
+
1039
+ If some elements outside the modal need to be focusable (i.e. for TinyMCE), you can add them as CSS
1040
+ selectors to the `ignore-enforce-focus-selector` prop
1041
+ <span class="badge badge-secondary">2.4.0+</span>, e.g.:
1042
+
1043
+ ```html
1044
+ <b-modal
1045
+ id="some-modal-id"
1046
+ title="Modal with TinyMCE Editor"
1047
+ ignore-enforce-focus-selector=".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root"
1048
+ >
1049
+ <!-- Modal content with TinyMCE editor here -->
1050
+ </b-modal>
1051
+ ```
1052
+
1053
+ In some circumstances, you may need to disable the enforce focus feature completely. You can do this
1054
+ by setting the prop `no-enforce-focus`, although this is _highly discouraged_ for accessibility
1055
+ reasons.
1056
+
1057
+ ### `v-b-modal` directive accessibility
1058
+
1059
+ Notes on `v-b-modal` directive accessibility:
1060
+
1061
+ - If the element is anything other than a `<button>` (or component that renders a `<button>`), the
1062
+ ARIA `role` will be set to `button`, and a keydown event listeners for <kbd>Enter</kbd> and
1063
+ <kbd>Space</kbd> will be added, along with a `click` listener.
1064
+ - If the element is anything other than a `<button>` or `<a>` (or a component that renders either),
1065
+ then a `tabindex` of `0` will be added to the element to ensure accessibility, unless there is
1066
+ already a `tabindex` set.
1067
+
1068
+ <!-- Component reference added automatically from component package.json -->