@gitlab/ui 92.2.0 → 92.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/migrate_custom_utils_to_tw.bundled.mjs +11 -3
- package/dist/components/experimental/duo/chat/components/duo_chat_context/constants.js +4 -4
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.js +4 -4
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.js +8 -8
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.js +5 -4
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.js +15 -16
- package/dist/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.js +7 -7
- package/dist/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +63 -81
- package/dist/components/experimental/duo/chat/components/duo_chat_context/utils.js +1 -1
- package/dist/index.css +4 -2
- package/dist/index.css.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/index.js +0 -48
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -6
- package/dist/vendor/bootstrap-vue/src/components/nav/index.js +0 -6
- package/dist/vendor/bootstrap-vue/src/components/navbar/index.js +1 -8
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +2 -6
- package/dist/vendor/bootstrap-vue/src/constants/classes.js +1 -2
- package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -51
- package/dist/vendor/bootstrap-vue/src/constants/events.js +1 -12
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +1 -5
- package/dist/vendor/bootstrap-vue/src/constants/props.js +1 -4
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +1 -20
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +1 -33
- package/dist/vendor/bootstrap-vue/src/directives/toggle/toggle.js +1 -1
- package/dist/vendor/bootstrap-vue/src/index.js +0 -74
- package/dist/vendor/bootstrap-vue/src/utils/array.js +1 -3
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +1 -3
- package/dist/vendor/bootstrap-vue/src/utils/math.js +1 -3
- package/dist/vendor/bootstrap-vue/src/utils/object.js +1 -6
- package/dist/vendor/bootstrap-vue/src/utils/props.js +2 -8
- package/dist/vendor/bootstrap-vue/src/utils/string.js +1 -10
- package/package.json +1 -1
- package/src/components/base/accordion/accordion_item.scss +3 -3
- package/src/components/base/alert/alert.scss +3 -3
- package/src/components/base/avatar_labeled/avatar_labeled.scss +2 -2
- package/src/components/base/avatars_inline/avatars_inline.scss +1 -1
- package/src/components/base/badge/badge.scss +2 -2
- package/src/components/base/banner/banner.scss +2 -2
- package/src/components/base/breadcrumb/breadcrumb.scss +3 -3
- package/src/components/base/broadcast_message/broadcast_message.scss +3 -3
- package/src/components/base/button/button.scss +14 -14
- package/src/components/base/card/card.scss +1 -1
- package/src/components/base/datepicker/datepicker.scss +10 -10
- package/src/components/base/drawer/drawer.scss +5 -5
- package/src/components/base/dropdown/dropdown.scss +28 -28
- package/src/components/base/dropdown/dropdown_divider.scss +3 -3
- package/src/components/base/dropdown/dropdown_item.scss +9 -9
- package/src/components/base/dropdown/dropdown_section_header.scss +2 -2
- package/src/components/base/dropdown/dropdown_text.scss +1 -1
- package/src/components/base/filtered_search/filtered_search.scss +7 -7
- package/src/components/base/filtered_search/filtered_search_suggestion.scss +1 -1
- package/src/components/base/filtered_search/filtered_search_suggestion_list.scss +3 -3
- package/src/components/base/filtered_search/filtered_search_term.scss +2 -2
- package/src/components/base/filtered_search/filtered_search_token.scss +4 -4
- package/src/components/base/filtered_search/filtered_search_token_segment.scss +2 -2
- package/src/components/base/form/form_checkbox/form_checkbox.scss +10 -10
- package/src/components/base/form/form_group/form_group.scss +5 -5
- package/src/components/base/form/form_input/form_input.scss +2 -2
- package/src/components/base/form/form_select/form_select.scss +2 -2
- package/src/components/base/keyset_pagination/keyset_pagination.scss +1 -1
- package/src/components/base/label/label.scss +1 -1
- package/src/components/base/loading_icon/loading_icon.scss +1 -1
- package/src/components/base/markdown/markdown.scss +33 -33
- package/src/components/base/modal/modal.scss +11 -11
- package/src/components/base/new_dropdowns/dropdown.scss +14 -14
- package/src/components/base/new_dropdowns/dropdown_item.scss +9 -9
- package/src/components/base/new_dropdowns/listbox/listbox.scss +1 -1
- package/src/components/base/pagination/pagination.scss +3 -3
- package/src/components/base/path/path.scss +5 -5
- package/src/components/base/popover/popover.scss +5 -5
- package/src/components/base/search_box_by_click/search_box_by_click.scss +2 -2
- package/src/components/base/search_box_by_type/search_box_by_type.scss +4 -4
- package/src/components/base/table/table.scss +4 -4
- package/src/components/base/tabs/tabs/tabs.scss +10 -10
- package/src/components/base/toast/toast.scss +7 -7
- package/src/components/base/toggle/toggle.scss +6 -6
- package/src/components/base/token/token.scss +5 -5
- package/src/components/base/tooltip/tooltip.scss +3 -3
- package/src/components/charts/legend/legend.scss +4 -4
- package/src/components/charts/series_label/series_label.scss +1 -1
- package/src/components/experimental/duo/chat/components/duo_chat_context/constants.js +3 -3
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu.vue +4 -4
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_item.vue +10 -10
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_menu/duo_chat_context_item_menu_search_items.vue +6 -5
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_popover/duo_chat_context_item_popover.vue +24 -24
- package/src/components/experimental/duo/chat/components/duo_chat_context/duo_chat_context_item_selections/duo_chat_context_item_selections.vue +10 -10
- package/src/components/experimental/duo/chat/components/duo_chat_context/mock_context_data.js +57 -74
- package/src/components/experimental/duo/chat/components/duo_chat_context/utils.js +5 -3
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +1 -1
- package/src/components/experimental/duo/chat/duo_chat.scss +4 -4
- package/src/components/shared_components/charts/tooltip_default_format.scss +1 -1
- package/src/scss/bootstrap_vue.scss +0 -18
- package/src/scss/typescale/_index.scss +9 -9
- package/src/vendor/bootstrap-vue/nuxt/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/_utilities.scss +0 -9
- package/src/vendor/bootstrap-vue/src/_variables.scss +0 -52
- package/src/vendor/bootstrap-vue/src/components/form/index.d.ts +0 -3
- package/src/vendor/bootstrap-vue/src/components/form/index.js +1 -4
- package/src/vendor/bootstrap-vue/src/components/form/package.json +0 -12
- package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -24
- package/src/vendor/bootstrap-vue/src/components/index.js +0 -48
- package/src/vendor/bootstrap-vue/src/components/index.scss +0 -15
- package/src/vendor/bootstrap-vue/src/components/layout/index.d.ts +0 -6
- package/src/vendor/bootstrap-vue/src/components/layout/index.js +1 -5
- package/src/vendor/bootstrap-vue/src/components/layout/package.json +0 -67
- package/src/vendor/bootstrap-vue/src/components/modal/README.md +0 -1
- package/src/vendor/bootstrap-vue/src/components/nav/index.d.ts +0 -6
- package/src/vendor/bootstrap-vue/src/components/nav/index.js +1 -5
- package/src/vendor/bootstrap-vue/src/components/nav/package.json +0 -45
- package/src/vendor/bootstrap-vue/src/components/navbar/README.md +0 -5
- package/src/vendor/bootstrap-vue/src/components/navbar/index.d.ts +1 -7
- package/src/vendor/bootstrap-vue/src/components/navbar/index.js +2 -7
- package/src/vendor/bootstrap-vue/src/components/navbar/package.json +0 -75
- package/src/vendor/bootstrap-vue/src/components/table/README.md +1 -2
- package/src/vendor/bootstrap-vue/src/components/tabs/README.md +2 -2
- package/src/vendor/bootstrap-vue/src/components/toast/README.md +1 -3
- package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +2 -6
- package/src/vendor/bootstrap-vue/src/constants/classes.js +0 -1
- package/src/vendor/bootstrap-vue/src/constants/components.js +0 -50
- package/src/vendor/bootstrap-vue/src/constants/events.js +0 -11
- package/src/vendor/bootstrap-vue/src/constants/key-codes.js +0 -4
- package/src/vendor/bootstrap-vue/src/constants/props.js +0 -3
- package/src/vendor/bootstrap-vue/src/constants/regex.js +0 -19
- package/src/vendor/bootstrap-vue/src/constants/slots.js +0 -32
- package/src/vendor/bootstrap-vue/src/directives/toggle/README.md +5 -23
- package/src/vendor/bootstrap-vue/src/directives/toggle/package.json +1 -1
- package/src/vendor/bootstrap-vue/src/directives/toggle/toggle.js +1 -1
- package/src/vendor/bootstrap-vue/src/index.js +0 -122
- package/src/vendor/bootstrap-vue/src/index.scss +0 -3
- package/src/vendor/bootstrap-vue/src/utils/array.js +0 -5
- package/src/vendor/bootstrap-vue/src/utils/config.spec.js +15 -15
- package/src/vendor/bootstrap-vue/src/utils/inspect.js +0 -4
- package/src/vendor/bootstrap-vue/src/utils/math.js +0 -4
- package/src/vendor/bootstrap-vue/src/utils/object.js +0 -5
- package/src/vendor/bootstrap-vue/src/utils/props.js +1 -7
- package/src/vendor/bootstrap-vue/src/utils/string.js +0 -9
- package/src/vendor/bootstrap-vue/src/utils/string.spec.js +1 -20
- package/dist/vendor/bootstrap-vue/src/components/alert/alert.js +0 -179
- package/dist/vendor/bootstrap-vue/src/components/alert/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/aspect/aspect.js +0 -67
- package/dist/vendor/bootstrap-vue/src/components/aspect/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/avatar/avatar-group.js +0 -67
- package/dist/vendor/bootstrap-vue/src/components/avatar/avatar.js +0 -266
- package/dist/vendor/bootstrap-vue/src/components/avatar/index.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.js +0 -112
- package/dist/vendor/bootstrap-vue/src/components/button-toolbar/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/calendar/calendar.js +0 -1010
- package/dist/vendor/bootstrap-vue/src/components/calendar/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/card/card-body.js +0 -63
- package/dist/vendor/bootstrap-vue/src/components/card/card-footer.js +0 -48
- package/dist/vendor/bootstrap-vue/src/components/card/card-group.js +0 -33
- package/dist/vendor/bootstrap-vue/src/components/card/card-header.js +0 -48
- package/dist/vendor/bootstrap-vue/src/components/card/card-img-lazy.js +0 -46
- package/dist/vendor/bootstrap-vue/src/components/card/card-img.js +0 -58
- package/dist/vendor/bootstrap-vue/src/components/card/card-sub-title.js +0 -35
- package/dist/vendor/bootstrap-vue/src/components/card/card-text.js +0 -31
- package/dist/vendor/bootstrap-vue/src/components/card/card-title.js +0 -33
- package/dist/vendor/bootstrap-vue/src/components/card/card.js +0 -123
- package/dist/vendor/bootstrap-vue/src/components/card/index.js +0 -38
- package/dist/vendor/bootstrap-vue/src/components/embed/embed.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/embed/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/form/form-datalist.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/form-btn-label-control/bv-form-btn-label-control.js +0 -261
- package/dist/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.js +0 -310
- package/dist/vendor/bootstrap-vue/src/components/form-datepicker/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/form-file/form-file.js +0 -561
- package/dist/vendor/bootstrap-vue/src/components/form-file/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/form-rating/form-rating.js +0 -402
- package/dist/vendor/bootstrap-vue/src/components/form-rating/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.js +0 -555
- package/dist/vendor/bootstrap-vue/src/components/form-spinbutton/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/form-tags/form-tag.js +0 -97
- package/dist/vendor/bootstrap-vue/src/components/form-tags/form-tags.js +0 -806
- package/dist/vendor/bootstrap-vue/src/components/form-tags/index.js +0 -16
- package/dist/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.js +0 -281
- package/dist/vendor/bootstrap-vue/src/components/form-timepicker/index.js +0 -12
- package/dist/vendor/bootstrap-vue/src/components/image/img-lazy.js +0 -157
- package/dist/vendor/bootstrap-vue/src/components/image/img.js +0 -124
- package/dist/vendor/bootstrap-vue/src/components/image/index.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/jumbotron/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.js +0 -98
- package/dist/vendor/bootstrap-vue/src/components/layout/container.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/layout/row.js +0 -113
- package/dist/vendor/bootstrap-vue/src/components/list-group/index.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/list-group/list-group-item.js +0 -78
- package/dist/vendor/bootstrap-vue/src/components/list-group/list-group.js +0 -42
- package/dist/vendor/bootstrap-vue/src/components/media/index.js +0 -17
- package/dist/vendor/bootstrap-vue/src/components/media/media-aside.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/media/media-body.js +0 -31
- package/dist/vendor/bootstrap-vue/src/components/media/media.js +0 -61
- package/dist/vendor/bootstrap-vue/src/components/nav/nav-form.js +0 -45
- package/dist/vendor/bootstrap-vue/src/components/nav/nav-text.js +0 -26
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-nav.js +0 -46
- package/dist/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.js +0 -89
- package/dist/vendor/bootstrap-vue/src/components/overlay/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/overlay/overlay.js +0 -163
- package/dist/vendor/bootstrap-vue/src/components/pagination/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/pagination/pagination.js +0 -135
- package/dist/vendor/bootstrap-vue/src/components/pagination-nav/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.js +0 -299
- package/dist/vendor/bootstrap-vue/src/components/sidebar/index.js +0 -15
- package/dist/vendor/bootstrap-vue/src/components/sidebar/sidebar.js +0 -432
- package/dist/vendor/bootstrap-vue/src/components/skeleton/index.js +0 -23
- package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.js +0 -47
- package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.js +0 -60
- package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.js +0 -64
- package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.js +0 -46
- package/dist/vendor/bootstrap-vue/src/components/skeleton/skeleton.js +0 -49
- package/dist/vendor/bootstrap-vue/src/components/spinner/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/spinner/spinner.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/time/index.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/time/time.js +0 -600
- package/dist/vendor/bootstrap-vue/src/constants/date.js +0 -8
- package/dist/vendor/bootstrap-vue/src/mixins/card.js +0 -22
- package/dist/vendor/bootstrap-vue/src/mixins/pagination.js +0 -598
- package/dist/vendor/bootstrap-vue/src/utils/date.js +0 -135
- package/src/vendor/bootstrap-vue/src/_custom-controls.scss +0 -30
- package/src/vendor/bootstrap-vue/src/components/alert/README.md +0 -280
- package/src/vendor/bootstrap-vue/src/components/alert/alert.js +0 -185
- package/src/vendor/bootstrap-vue/src/components/alert/alert.spec.js +0 -442
- package/src/vendor/bootstrap-vue/src/components/alert/index.d.ts +0 -13
- package/src/vendor/bootstrap-vue/src/components/alert/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/alert/package.json +0 -72
- package/src/vendor/bootstrap-vue/src/components/aspect/README.md +0 -65
- package/src/vendor/bootstrap-vue/src/components/aspect/aspect.js +0 -65
- package/src/vendor/bootstrap-vue/src/components/aspect/aspect.spec.js +0 -121
- package/src/vendor/bootstrap-vue/src/components/aspect/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/aspect/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/aspect/package.json +0 -26
- package/src/vendor/bootstrap-vue/src/components/avatar/README.md +0 -567
- package/src/vendor/bootstrap-vue/src/components/avatar/_avatar.scss +0 -148
- package/src/vendor/bootstrap-vue/src/components/avatar/avatar-group.js +0 -75
- package/src/vendor/bootstrap-vue/src/components/avatar/avatar-group.spec.js +0 -74
- package/src/vendor/bootstrap-vue/src/components/avatar/avatar.js +0 -228
- package/src/vendor/bootstrap-vue/src/components/avatar/avatar.spec.js +0 -355
- package/src/vendor/bootstrap-vue/src/components/avatar/index.d.ts +0 -14
- package/src/vendor/bootstrap-vue/src/components/avatar/index.js +0 -9
- package/src/vendor/bootstrap-vue/src/components/avatar/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/avatar/package.json +0 -149
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/README.md +0 -109
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.js +0 -117
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/button-toolbar.spec.js +0 -185
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/index.js +0 -11
- package/src/vendor/bootstrap-vue/src/components/button-toolbar/package.json +0 -32
- package/src/vendor/bootstrap-vue/src/components/calendar/README.md +0 -735
- package/src/vendor/bootstrap-vue/src/components/calendar/_calendar.scss +0 -78
- package/src/vendor/bootstrap-vue/src/components/calendar/calendar.js +0 -1146
- package/src/vendor/bootstrap-vue/src/components/calendar/calendar.spec.js +0 -466
- package/src/vendor/bootstrap-vue/src/components/calendar/index.d.ts +0 -28
- package/src/vendor/bootstrap-vue/src/components/calendar/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/calendar/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/calendar/package.json +0 -317
- package/src/vendor/bootstrap-vue/src/components/card/README.md +0 -729
- package/src/vendor/bootstrap-vue/src/components/card/_card-img.scss +0 -7
- package/src/vendor/bootstrap-vue/src/components/card/card-body.js +0 -69
- package/src/vendor/bootstrap-vue/src/components/card/card-body.spec.js +0 -142
- package/src/vendor/bootstrap-vue/src/components/card/card-footer.js +0 -48
- package/src/vendor/bootstrap-vue/src/components/card/card-footer.spec.js +0 -98
- package/src/vendor/bootstrap-vue/src/components/card/card-group.js +0 -33
- package/src/vendor/bootstrap-vue/src/components/card/card-group.spec.js +0 -75
- package/src/vendor/bootstrap-vue/src/components/card/card-header.js +0 -48
- package/src/vendor/bootstrap-vue/src/components/card/card-header.spec.js +0 -98
- package/src/vendor/bootstrap-vue/src/components/card/card-img-lazy.js +0 -47
- package/src/vendor/bootstrap-vue/src/components/card/card-img-lazy.spec.js +0 -204
- package/src/vendor/bootstrap-vue/src/components/card/card-img.js +0 -50
- package/src/vendor/bootstrap-vue/src/components/card/card-img.spec.js +0 -208
- package/src/vendor/bootstrap-vue/src/components/card/card-sub-title.js +0 -35
- package/src/vendor/bootstrap-vue/src/components/card/card-sub-title.spec.js +0 -60
- package/src/vendor/bootstrap-vue/src/components/card/card-text.js +0 -25
- package/src/vendor/bootstrap-vue/src/components/card/card-text.spec.js +0 -48
- package/src/vendor/bootstrap-vue/src/components/card/card-title.js +0 -33
- package/src/vendor/bootstrap-vue/src/components/card/card-title.spec.js +0 -45
- package/src/vendor/bootstrap-vue/src/components/card/card.js +0 -140
- package/src/vendor/bootstrap-vue/src/components/card/card.spec.js +0 -296
- package/src/vendor/bootstrap-vue/src/components/card/index.d.ts +0 -38
- package/src/vendor/bootstrap-vue/src/components/card/index.js +0 -40
- package/src/vendor/bootstrap-vue/src/components/card/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/card/package.json +0 -262
- package/src/vendor/bootstrap-vue/src/components/embed/README.md +0 -63
- package/src/vendor/bootstrap-vue/src/components/embed/embed.js +0 -51
- package/src/vendor/bootstrap-vue/src/components/embed/embed.spec.js +0 -110
- package/src/vendor/bootstrap-vue/src/components/embed/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/embed/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/embed/package.json +0 -29
- package/src/vendor/bootstrap-vue/src/components/form/form-datalist.js +0 -42
- package/src/vendor/bootstrap-vue/src/components/form/form-datalist.spec.js +0 -57
- package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/_form-btn-label-control.scss +0 -125
- package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/bv-form-btn-label-control.js +0 -278
- package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-btn-label-control/package.json +0 -5
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/README.md +0 -694
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/_form-datepicker.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.js +0 -342
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/form-datepicker.spec.js +0 -562
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.d.ts +0 -12
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.js +0 -11
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-datepicker/package.json +0 -420
- package/src/vendor/bootstrap-vue/src/components/form-file/README.md +0 -357
- package/src/vendor/bootstrap-vue/src/components/form-file/_form-file.scss +0 -61
- package/src/vendor/bootstrap-vue/src/components/form-file/form-file.js +0 -575
- package/src/vendor/bootstrap-vue/src/components/form-file/form-file.spec.js +0 -885
- package/src/vendor/bootstrap-vue/src/components/form-file/index.d.ts +0 -13
- package/src/vendor/bootstrap-vue/src/components/form-file/index.js +0 -11
- package/src/vendor/bootstrap-vue/src/components/form-file/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-file/package.json +0 -131
- package/src/vendor/bootstrap-vue/src/components/form-rating/README.md +0 -526
- package/src/vendor/bootstrap-vue/src/components/form-rating/_form-rating.scss +0 -57
- package/src/vendor/bootstrap-vue/src/components/form-rating/form-rating.js +0 -411
- package/src/vendor/bootstrap-vue/src/components/form-rating/form-rating.spec.js +0 -544
- package/src/vendor/bootstrap-vue/src/components/form-rating/index.d.ts +0 -14
- package/src/vendor/bootstrap-vue/src/components/form-rating/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/form-rating/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-rating/package.json +0 -166
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/README.md +0 -411
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/_spinbutton.scss +0 -76
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.js +0 -572
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/form-spinbutton.spec.js +0 -731
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.d.ts +0 -12
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.js +0 -11
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-spinbutton/package.json +0 -150
- package/src/vendor/bootstrap-vue/src/components/form-tags/README.md +0 -880
- package/src/vendor/bootstrap-vue/src/components/form-tags/_form-tags.scss +0 -70
- package/src/vendor/bootstrap-vue/src/components/form-tags/form-tag.js +0 -94
- package/src/vendor/bootstrap-vue/src/components/form-tags/form-tag.spec.js +0 -166
- package/src/vendor/bootstrap-vue/src/components/form-tags/form-tags.js +0 -891
- package/src/vendor/bootstrap-vue/src/components/form-tags/form-tags.spec.js +0 -920
- package/src/vendor/bootstrap-vue/src/components/form-tags/index.d.ts +0 -16
- package/src/vendor/bootstrap-vue/src/components/form-tags/index.js +0 -14
- package/src/vendor/bootstrap-vue/src/components/form-tags/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-tags/package.json +0 -440
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/README.md +0 -450
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/_form-timepicker.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.js +0 -308
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/form-timepicker.spec.js +0 -440
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.d.ts +0 -12
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.js +0 -11
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/form-timepicker/package.json +0 -255
- package/src/vendor/bootstrap-vue/src/components/image/README.md +0 -322
- package/src/vendor/bootstrap-vue/src/components/image/img-lazy.js +0 -161
- package/src/vendor/bootstrap-vue/src/components/image/img-lazy.spec.js +0 -96
- package/src/vendor/bootstrap-vue/src/components/image/img.js +0 -139
- package/src/vendor/bootstrap-vue/src/components/image/img.spec.js +0 -255
- package/src/vendor/bootstrap-vue/src/components/image/index.d.ts +0 -14
- package/src/vendor/bootstrap-vue/src/components/image/index.js +0 -12
- package/src/vendor/bootstrap-vue/src/components/image/package.json +0 -152
- package/src/vendor/bootstrap-vue/src/components/jumbotron/README.md +0 -109
- package/src/vendor/bootstrap-vue/src/components/jumbotron/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/jumbotron/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.js +0 -103
- package/src/vendor/bootstrap-vue/src/components/jumbotron/jumbotron.spec.js +0 -254
- package/src/vendor/bootstrap-vue/src/components/jumbotron/package.json +0 -66
- package/src/vendor/bootstrap-vue/src/components/layout/container.js +0 -40
- package/src/vendor/bootstrap-vue/src/components/layout/container.spec.js +0 -75
- package/src/vendor/bootstrap-vue/src/components/layout/row.js +0 -111
- package/src/vendor/bootstrap-vue/src/components/layout/row.spec.js +0 -138
- package/src/vendor/bootstrap-vue/src/components/list-group/README.md +0 -291
- package/src/vendor/bootstrap-vue/src/components/list-group/index.d.ts +0 -14
- package/src/vendor/bootstrap-vue/src/components/list-group/index.js +0 -12
- package/src/vendor/bootstrap-vue/src/components/list-group/list-group-item.js +0 -76
- package/src/vendor/bootstrap-vue/src/components/list-group/list-group-item.spec.js +0 -286
- package/src/vendor/bootstrap-vue/src/components/list-group/list-group.js +0 -42
- package/src/vendor/bootstrap-vue/src/components/list-group/list-group.spec.js +0 -132
- package/src/vendor/bootstrap-vue/src/components/list-group/package.json +0 -52
- package/src/vendor/bootstrap-vue/src/components/media/README.md +0 -183
- package/src/vendor/bootstrap-vue/src/components/media/_media.scss +0 -9
- package/src/vendor/bootstrap-vue/src/components/media/index.d.ts +0 -17
- package/src/vendor/bootstrap-vue/src/components/media/index.js +0 -14
- package/src/vendor/bootstrap-vue/src/components/media/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/media/media-aside.js +0 -45
- package/src/vendor/bootstrap-vue/src/components/media/media-aside.spec.js +0 -79
- package/src/vendor/bootstrap-vue/src/components/media/media-body.js +0 -25
- package/src/vendor/bootstrap-vue/src/components/media/media-body.spec.js +0 -47
- package/src/vendor/bootstrap-vue/src/components/media/media.js +0 -52
- package/src/vendor/bootstrap-vue/src/components/media/media.spec.js +0 -149
- package/src/vendor/bootstrap-vue/src/components/media/package.json +0 -65
- package/src/vendor/bootstrap-vue/src/components/nav/nav-form.js +0 -50
- package/src/vendor/bootstrap-vue/src/components/nav/nav-form.spec.js +0 -93
- package/src/vendor/bootstrap-vue/src/components/nav/nav-text.js +0 -18
- package/src/vendor/bootstrap-vue/src/components/nav/nav-text.spec.js +0 -30
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-nav.js +0 -45
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-nav.spec.js +0 -105
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.js +0 -84
- package/src/vendor/bootstrap-vue/src/components/navbar/navbar-toggle.spec.js +0 -189
- package/src/vendor/bootstrap-vue/src/components/overlay/README.md +0 -815
- package/src/vendor/bootstrap-vue/src/components/overlay/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/overlay/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/overlay/overlay.js +0 -162
- package/src/vendor/bootstrap-vue/src/components/overlay/overlay.spec.js +0 -257
- package/src/vendor/bootstrap-vue/src/components/overlay/package.json +0 -130
- package/src/vendor/bootstrap-vue/src/components/pagination/README.md +0 -430
- package/src/vendor/bootstrap-vue/src/components/pagination/_pagination.scss +0 -26
- package/src/vendor/bootstrap-vue/src/components/pagination/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/pagination/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/pagination/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/pagination/package.json +0 -295
- package/src/vendor/bootstrap-vue/src/components/pagination/pagination.js +0 -138
- package/src/vendor/bootstrap-vue/src/components/pagination/pagination.spec.js +0 -1198
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/README.md +0 -544
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/_pagination-nav.scss +0 -2
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/package.json +0 -315
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.js +0 -281
- package/src/vendor/bootstrap-vue/src/components/pagination-nav/pagination-nav.spec.js +0 -671
- package/src/vendor/bootstrap-vue/src/components/sidebar/README.md +0 -406
- package/src/vendor/bootstrap-vue/src/components/sidebar/_sidebar.scss +0 -97
- package/src/vendor/bootstrap-vue/src/components/sidebar/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/sidebar/index.js +0 -10
- package/src/vendor/bootstrap-vue/src/components/sidebar/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/sidebar/package.json +0 -239
- package/src/vendor/bootstrap-vue/src/components/sidebar/sidebar.js +0 -438
- package/src/vendor/bootstrap-vue/src/components/sidebar/sidebar.spec.js +0 -404
- package/src/vendor/bootstrap-vue/src/components/skeleton/README.md +0 -275
- package/src/vendor/bootstrap-vue/src/components/skeleton/_skeleton.scss +0 -141
- package/src/vendor/bootstrap-vue/src/components/skeleton/index.d.ts +0 -23
- package/src/vendor/bootstrap-vue/src/components/skeleton/index.js +0 -18
- package/src/vendor/bootstrap-vue/src/components/skeleton/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/skeleton/package.json +0 -136
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.js +0 -45
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-icon.spec.js +0 -86
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.js +0 -49
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-img.spec.js +0 -139
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.js +0 -58
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-table.spec.js +0 -119
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.js +0 -47
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton-wrapper.spec.js +0 -48
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton.js +0 -46
- package/src/vendor/bootstrap-vue/src/components/skeleton/skeleton.spec.js +0 -126
- package/src/vendor/bootstrap-vue/src/components/spinner/README.md +0 -229
- package/src/vendor/bootstrap-vue/src/components/spinner/index.d.ts +0 -11
- package/src/vendor/bootstrap-vue/src/components/spinner/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/spinner/package.json +0 -38
- package/src/vendor/bootstrap-vue/src/components/spinner/spinner.js +0 -54
- package/src/vendor/bootstrap-vue/src/components/spinner/spinner.spec.js +0 -305
- package/src/vendor/bootstrap-vue/src/components/time/README.md +0 -431
- package/src/vendor/bootstrap-vue/src/components/time/_time.scss +0 -41
- package/src/vendor/bootstrap-vue/src/components/time/index.d.ts +0 -27
- package/src/vendor/bootstrap-vue/src/components/time/index.js +0 -8
- package/src/vendor/bootstrap-vue/src/components/time/index.scss +0 -1
- package/src/vendor/bootstrap-vue/src/components/time/package.json +0 -123
- package/src/vendor/bootstrap-vue/src/components/time/time.js +0 -601
- package/src/vendor/bootstrap-vue/src/components/time/time.spec.js +0 -330
- package/src/vendor/bootstrap-vue/src/constants/date.js +0 -7
- package/src/vendor/bootstrap-vue/src/mixins/card.js +0 -23
- package/src/vendor/bootstrap-vue/src/mixins/pagination.js +0 -670
- package/src/vendor/bootstrap-vue/src/utils/date.js +0 -130
- package/src/vendor/bootstrap-vue/src/utils/date.spec.js +0 -159
|
@@ -1,880 +0,0 @@
|
|
|
1
|
-
# Form Tags
|
|
2
|
-
|
|
3
|
-
> Lightweight custom tagged input form control, with options for customized interface rendering,
|
|
4
|
-
> duplicate tag detection and optional tag validation.
|
|
5
|
-
|
|
6
|
-
Tags are arrays of short strings, used in various ways such as assigning categories. Use the default
|
|
7
|
-
user interface, or create your own custom interface via the use of the default scoped slot.
|
|
8
|
-
|
|
9
|
-
## Basic usage
|
|
10
|
-
|
|
11
|
-
Tags will have any leading and tailing whitespace removed, and duplicate tags are not permitted.
|
|
12
|
-
Tags that contain spaces are permitted by default.
|
|
13
|
-
|
|
14
|
-
Tags are added by clicking the **Add** button, pressing the <kbd>Enter</kbd> key or optionally when
|
|
15
|
-
the `change` event fires on the new tag input (i.e. when focus moves from the input). The **Add**
|
|
16
|
-
button will only appear when the user has entered a new tag value.
|
|
17
|
-
|
|
18
|
-
**Default render:**
|
|
19
|
-
|
|
20
|
-
```html
|
|
21
|
-
<template>
|
|
22
|
-
<div>
|
|
23
|
-
<label for="tags-basic">Type a new tag and press enter</label>
|
|
24
|
-
<b-form-tags input-id="tags-basic" v-model="value"></b-form-tags>
|
|
25
|
-
<p class="mt-2">Value: {{ value }}</p>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
export default {
|
|
31
|
-
data() {
|
|
32
|
-
return {
|
|
33
|
-
value: ['apple', 'orange']
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<!-- form-tags-example.vue -->
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
You can disable adding a new tag when pressing <kbd>Enter</kbd> via the `no-add-on-enter` prop, and
|
|
43
|
-
enable adding a tag on the input's `change` event via the `add-on-change` prop.
|
|
44
|
-
|
|
45
|
-
## Tag creation using separators
|
|
46
|
-
|
|
47
|
-
To auto create tags when a separator character is typed (i.e. <kbd>Space</kbd>, <kbd>,</kbd>, etc.),
|
|
48
|
-
set the `separator` prop to the character that will trigger the tag to be added. If multiple
|
|
49
|
-
separator characters are needed, then include them as a single string (i.e. `' ,;'`), or an array of
|
|
50
|
-
characters (i.e. `[' ', ',', ';']`), which will trigger a new tag to be added when <kbd>Space</kbd>,
|
|
51
|
-
<kbd>,</kbd>, _or_ <kbd>;</kbd> are typed). Separators must be a single character.
|
|
52
|
-
|
|
53
|
-
The following example will auto create a tag when <kbd>Space</KBD>, <kbd>,</kbd>, or <kbd>;</kbd>
|
|
54
|
-
are typed:
|
|
55
|
-
|
|
56
|
-
```html
|
|
57
|
-
<template>
|
|
58
|
-
<div>
|
|
59
|
-
<label for="tags-separators">Enter tags separated by space, comma or semicolon</label>
|
|
60
|
-
<b-form-tags
|
|
61
|
-
input-id="tags-separators"
|
|
62
|
-
v-model="value"
|
|
63
|
-
separator=" ,;"
|
|
64
|
-
placeholder="Enter new tags separated by space, comma or semicolon"
|
|
65
|
-
no-add-on-enter
|
|
66
|
-
></b-form-tags>
|
|
67
|
-
<p class="mt-2">Value: {{ value }}</p>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
|
|
71
|
-
<script>
|
|
72
|
-
export default {
|
|
73
|
-
data() {
|
|
74
|
-
return {
|
|
75
|
-
value: ['one', 'two']
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<!-- form-tags-separator.vue -->
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Last tag removal via backspace keypress
|
|
85
|
-
|
|
86
|
-
When the prop `remove-on-delete` is set, and the user presses <kbd>Backspace</kbd> (or
|
|
87
|
-
<kbd>Del</kbd>) _and_ the input value is empty, the last tag in the tag list will be removed.
|
|
88
|
-
|
|
89
|
-
```html
|
|
90
|
-
<template>
|
|
91
|
-
<div>
|
|
92
|
-
<label for="tags-remove-on-delete">Enter new tags separated by space</label>
|
|
93
|
-
<b-form-tags
|
|
94
|
-
input-id="tags-remove-on-delete"
|
|
95
|
-
:input-attrs="{ 'aria-describedby': 'tags-remove-on-delete-help' }"
|
|
96
|
-
v-model="value"
|
|
97
|
-
separator=" "
|
|
98
|
-
placeholder="Enter new tags separated by space"
|
|
99
|
-
remove-on-delete
|
|
100
|
-
no-add-on-enter
|
|
101
|
-
></b-form-tags>
|
|
102
|
-
<b-form-text id="tags-remove-on-delete-help" class="mt-2">
|
|
103
|
-
Press <kbd>Backspace</kbd> to remove the last tag entered
|
|
104
|
-
</b-form-text>
|
|
105
|
-
<p>Value: {{ value }}</p>
|
|
106
|
-
</div>
|
|
107
|
-
</template>
|
|
108
|
-
|
|
109
|
-
<script>
|
|
110
|
-
export default {
|
|
111
|
-
data() {
|
|
112
|
-
return {
|
|
113
|
-
value: ['apple', 'orange', 'grape']
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
</script>
|
|
118
|
-
|
|
119
|
-
<!-- form-tags-remove-on-delete.vue -->
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Styling Options
|
|
123
|
-
|
|
124
|
-
Several props are available to alter the basic styling of the default tagged interface:
|
|
125
|
-
|
|
126
|
-
| Prop | Description |
|
|
127
|
-
| ------------- | ----------------------------------------------------------------------------------------------------- |
|
|
128
|
-
| `tag-pills` | Renders the tags with the appearance of pills |
|
|
129
|
-
| `tag-variant` | Applies one of the Bootstrap contextual variant theme colors to the tags |
|
|
130
|
-
| `size` | Set the size of the component's appearance. 'sm', 'md' (default), or 'lg' |
|
|
131
|
-
| `placeholder` | The placeholder text for the new tag input element |
|
|
132
|
-
| `state` | Sets the contextual state of the control. Set to `true` (for valid), `false` (for invalid), or `null` |
|
|
133
|
-
| `disabled` | Places the component in a disabled state |
|
|
134
|
-
|
|
135
|
-
For additional props, see the component reference section at the bottom of this page.
|
|
136
|
-
|
|
137
|
-
The focus and validation state styling of the component relies upon BootstrapVue's custom CSS.
|
|
138
|
-
|
|
139
|
-
```html
|
|
140
|
-
<template>
|
|
141
|
-
<div>
|
|
142
|
-
<label for="tags-pills">Enter tags</label>
|
|
143
|
-
<b-form-tags
|
|
144
|
-
input-id="tags-pills"
|
|
145
|
-
v-model="value"
|
|
146
|
-
tag-variant="primary"
|
|
147
|
-
tag-pills
|
|
148
|
-
size="lg"
|
|
149
|
-
separator=" "
|
|
150
|
-
placeholder="Enter new tags separated by space"
|
|
151
|
-
></b-form-tags>
|
|
152
|
-
<p class="mt-2">Value: {{ value }}</p>
|
|
153
|
-
</div>
|
|
154
|
-
</template>
|
|
155
|
-
|
|
156
|
-
<script>
|
|
157
|
-
export default {
|
|
158
|
-
data() {
|
|
159
|
-
return {
|
|
160
|
-
value: ['apple', 'orange', 'grape']
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
</script>
|
|
165
|
-
|
|
166
|
-
<!-- form-tags-style-options.vue -->
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Using with native browser `<form>` submission
|
|
170
|
-
|
|
171
|
-
The value of the tagged input will not be submitted via standard form `action` unless you provide a
|
|
172
|
-
name via the `name` prop. When a name is provided, `<b-form-tags>` will create a hidden `<input>`
|
|
173
|
-
for each tag. The hidden input will have the `name` attribute set to the value of the `name` prop.
|
|
174
|
-
|
|
175
|
-
The hidden inputs will also be generated when using
|
|
176
|
-
[custom rendering](#custom-rendering-with-default-scoped-slot) (when the `name` prop is set).
|
|
177
|
-
|
|
178
|
-
## Tag validation
|
|
179
|
-
|
|
180
|
-
By default, `<b-form-tags>` detects when the user is attempting to enter a (case-sensitive)
|
|
181
|
-
duplicate tag, and will provide integrated feedback to the user.
|
|
182
|
-
|
|
183
|
-
You can optionally provide a tag validator method via the `tag-validator` prop. The validator
|
|
184
|
-
function will receive one argument which is the tag being added, and should return either `true` if
|
|
185
|
-
the tag passes validation and can be added, or `false` if the tag fails validation (in which case it
|
|
186
|
-
is not added to the array of tags). Integrated feedback will be provided to the user listing the
|
|
187
|
-
invalid tag(s) that could not be added.
|
|
188
|
-
|
|
189
|
-
Tag validation occurs only for tags added via user input. Changes to the tags via the `v-model` are
|
|
190
|
-
not validated.
|
|
191
|
-
|
|
192
|
-
```html
|
|
193
|
-
<template>
|
|
194
|
-
<div>
|
|
195
|
-
<b-form-group label="Tags validation example" label-for="tags-validation" :state="state">
|
|
196
|
-
<b-form-tags
|
|
197
|
-
input-id="tags-validation"
|
|
198
|
-
v-model="tags"
|
|
199
|
-
:input-attrs="{ 'aria-describedby': 'tags-validation-help' }"
|
|
200
|
-
:tag-validator="tagValidator"
|
|
201
|
-
:state="state"
|
|
202
|
-
separator=" "
|
|
203
|
-
></b-form-tags>
|
|
204
|
-
|
|
205
|
-
<template #invalid-feedback>
|
|
206
|
-
You must provide at least 3 tags and no more than 8
|
|
207
|
-
</template>
|
|
208
|
-
|
|
209
|
-
<template #description>
|
|
210
|
-
<div id="tags-validation-help">
|
|
211
|
-
Tags must be 3 to 5 characters in length and all lower
|
|
212
|
-
case. Enter tags separated by spaces or press enter.
|
|
213
|
-
</div>
|
|
214
|
-
</template>
|
|
215
|
-
</b-form-group>
|
|
216
|
-
</div>
|
|
217
|
-
</template>
|
|
218
|
-
|
|
219
|
-
<script>
|
|
220
|
-
export default {
|
|
221
|
-
data() {
|
|
222
|
-
return {
|
|
223
|
-
tags: [],
|
|
224
|
-
dirty: false
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
computed: {
|
|
228
|
-
state() {
|
|
229
|
-
// Overall component validation state
|
|
230
|
-
return this.dirty ? (this.tags.length > 2 && this.tags.length < 9) : null
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
watch: {
|
|
234
|
-
tags(newValue, oldValue) {
|
|
235
|
-
// Set the dirty flag on first change to the tags array
|
|
236
|
-
this.dirty = true
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
methods: {
|
|
240
|
-
tagValidator(tag) {
|
|
241
|
-
// Individual tag validator function
|
|
242
|
-
return tag === tag.toLowerCase() && tag.length > 2 && tag.length < 6
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
</script>
|
|
247
|
-
|
|
248
|
-
<!-- b-form-tags-validation-feedback.vue -->
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Detecting new, invalid, and duplicate tags
|
|
252
|
-
|
|
253
|
-
The event `tag-state` will be emitted whenever new tags are entered into the new tag input element,
|
|
254
|
-
tags that do not pass validation, or duplicate tags are detected. The event handler will receive
|
|
255
|
-
three arrays as its arguments:
|
|
256
|
-
|
|
257
|
-
- `validTags` (tags that pass validation)
|
|
258
|
-
- `invalidTags` (tags that do not pass validation)
|
|
259
|
-
- `duplicateTags` (tags that would be a duplicate of existing or validTags).
|
|
260
|
-
|
|
261
|
-
The event will be emitted only when the new tag input changes (characters are entered that would be
|
|
262
|
-
considered part of a tag), or when the user attempts to add a tag (i.e. via <kbd>Enter</kbd>,
|
|
263
|
-
clicking the **Add** button, or entering a separator). The three arrays will be empty when the user
|
|
264
|
-
clears the new tag input element (or contains just spaces).
|
|
265
|
-
|
|
266
|
-
If you are providing your own feedback for duplicate and invalid tags (via the use of the
|
|
267
|
-
`tag-state` event) outside of the `<b-form-tags>` component, you can disable the built in duplicate
|
|
268
|
-
and invalid messages by setting the props `duplicate-tag-text` and `invalid-tag-text` (respectively)
|
|
269
|
-
to either an empty string (`''`) or `null`.
|
|
270
|
-
|
|
271
|
-
```html
|
|
272
|
-
<template>
|
|
273
|
-
<div>
|
|
274
|
-
<label for="tags-state-event">Enter tags</label>
|
|
275
|
-
<b-form-tags
|
|
276
|
-
input-id="tags-state-event"
|
|
277
|
-
v-model="tags"
|
|
278
|
-
:tag-validator="validator"
|
|
279
|
-
placeholder="Enter tags (3-5 characters) separated by space"
|
|
280
|
-
separator=" "
|
|
281
|
-
@tag-state="onTagState"
|
|
282
|
-
></b-form-tags>
|
|
283
|
-
<p class="mt-2">Tags: {{ tags }}</p>
|
|
284
|
-
<p>Event values:</p>
|
|
285
|
-
<ul>
|
|
286
|
-
<li>validTags: {{ validTags }}</li>
|
|
287
|
-
<li>invalidTags: {{ invalidTags }}</li>
|
|
288
|
-
<li>duplicateTags: {{ duplicateTags }}</li>
|
|
289
|
-
</ul>
|
|
290
|
-
</div>
|
|
291
|
-
</template>
|
|
292
|
-
|
|
293
|
-
<script>
|
|
294
|
-
export default {
|
|
295
|
-
data() {
|
|
296
|
-
return {
|
|
297
|
-
tags: [],
|
|
298
|
-
validTags: [],
|
|
299
|
-
invalidTags: [],
|
|
300
|
-
duplicateTags: []
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
methods: {
|
|
304
|
-
onTagState(valid, invalid, duplicate) {
|
|
305
|
-
this.validTags = valid
|
|
306
|
-
this.invalidTags = invalid
|
|
307
|
-
this.duplicateTags = duplicate
|
|
308
|
-
},
|
|
309
|
-
validator(tag) {
|
|
310
|
-
return tag.length > 2 && tag.length < 6
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
</script>
|
|
315
|
-
|
|
316
|
-
<!-- b-form-tags-tags-state-event.vue -->
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## Limiting tags
|
|
320
|
-
|
|
321
|
-
If you want to limit the amount of tags the user is able to add use the `limit` prop. When
|
|
322
|
-
configured, adding more tags than the `limit` allows is only possible by the `v-model`.
|
|
323
|
-
|
|
324
|
-
When the limit of tags is reached, the user is still able to type but adding more tags is disabled.
|
|
325
|
-
A message is shown to give the user feedback about the reached limit. This message can be configured
|
|
326
|
-
by the `limit-tags-text` prop. Setting it to either an empty string (`''`) or `null` will disable
|
|
327
|
-
the feedback.
|
|
328
|
-
|
|
329
|
-
Removing tags is unaffected by the `limit` prop.
|
|
330
|
-
|
|
331
|
-
```html
|
|
332
|
-
<template>
|
|
333
|
-
<div>
|
|
334
|
-
<label for="tags-limit">Enter tags</label>
|
|
335
|
-
<b-form-tags input-id="tags-limit" v-model="value" :limit="limit" remove-on-delete></b-form-tags>
|
|
336
|
-
<p class="mt-2">Value: {{ value }}</p>
|
|
337
|
-
</div>
|
|
338
|
-
</template>
|
|
339
|
-
|
|
340
|
-
<script>
|
|
341
|
-
export default {
|
|
342
|
-
data() {
|
|
343
|
-
return {
|
|
344
|
-
value: [],
|
|
345
|
-
limit: 5
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
</script>
|
|
350
|
-
|
|
351
|
-
<!-- b-form-tags-limit.vue -->
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
## Custom rendering with default scoped slot
|
|
355
|
-
|
|
356
|
-
If you fancy a different look and feel for the tags control, you can provide your own custom
|
|
357
|
-
rendering via the default scoped slot. You can either create your own tags, or use our helper
|
|
358
|
-
`<b-form-tag>` component.
|
|
359
|
-
|
|
360
|
-
### Scope properties
|
|
361
|
-
|
|
362
|
-
The default scoped slot provides numerous properties and methods for use in rendering your custom
|
|
363
|
-
interface. Not all properties or methods are required to generate your interface.
|
|
364
|
-
|
|
365
|
-
The default slot scope properties are as follows:
|
|
366
|
-
|
|
367
|
-
| Property | Type | Description |
|
|
368
|
-
| ------------------ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
369
|
-
| `addButtonText` | String | The value of the `add-button-text` prop |
|
|
370
|
-
| `addButtonVariant` | String | The value of the `add-button-variant` prop |
|
|
371
|
-
| `addTag` | Function | Method to add a new tag. Assumes the tag is the value of the input, but optionally accepts one argument which is the tag value to be added |
|
|
372
|
-
| `disableAddButton` | Boolean | Will be `true` if the tag(s) in the input cannot be added (all invalid and/or duplicates) |
|
|
373
|
-
| `disabled` | Boolean | `true` if the component is in the disabled state. Value of the `disabled` prop |
|
|
374
|
-
| `duplicateTagText` | String | The value of the `duplicate-tag-text` prop |
|
|
375
|
-
| `duplicateTags` | Array | Array of the duplicate tag(s) the user has entered |
|
|
376
|
-
| `form` | String | <span class="badge badge-secondary">v2.20.0+</span> The value of the `form` prop |
|
|
377
|
-
| `inputAttrs` | Object | Object of attributes to apply to the new tag input element via `v-bind="inputAttrs"`. See below for details |
|
|
378
|
-
| `inputHandlers` | Object | Object of event handlers to apply to the new tag input element via `v-on="inputHandlers"`. See below for details |
|
|
379
|
-
| `inputId` | String | ID to add to the new tag input element. Defaults to prop `input-id`. If not provided a unique ID is auto-generated. Also available via 'inputAttrs.id' |
|
|
380
|
-
| `inputType` | String | <span class="badge badge-secondary">v2.3.0+</span> Type of input to render (normalized version of prop `input-type`) |
|
|
381
|
-
| `invalidTagText` | String | The value of the `invalid-tag-text` prop |
|
|
382
|
-
| `invalidTags` | Array | Array of the invalid tag(s) the user has entered |
|
|
383
|
-
| `isDuplicate` | Boolean | `true` if the user input contains duplicate tag(s) |
|
|
384
|
-
| `isInvalid` | Boolean | `true` if the user input contains invalid tag(s) |
|
|
385
|
-
| `isLimitReached` | Boolean | <span class="badge badge-secondary">v2.17.0+</span> `true` if a `limit` is configured and the amount of tags has reached the limit |
|
|
386
|
-
| `limitTagsText` | String | <span class="badge badge-secondary">v2.17.0+</span> The value of the `limit-tags-text` prop |
|
|
387
|
-
| `limit` | String | <span class="badge badge-secondary">v2.17.0+</span> The value of the `limit` prop |
|
|
388
|
-
| `noTagRemove` | Boolean | <span class="badge badge-secondary">v2.21.0+</span> The value of the `no-tag-remove` prop |
|
|
389
|
-
| `placeholder` | String | The value of the `placeholder` prop |
|
|
390
|
-
| `removeTag` | Function | Method to remove a tag. Accepts one argument which is the tag value to remove |
|
|
391
|
-
| `required` | Boolean | <span class="badge badge-secondary">v2.20.0+</span> The value of the `required` prop |
|
|
392
|
-
| `separator` | String | The value of the `separator` prop |
|
|
393
|
-
| `size` | String | The value of the `size` prop |
|
|
394
|
-
| `state` | Boolean | The contextual state of the component. Value of the `state` prop. Possible values are `true`, `false` or `null` |
|
|
395
|
-
| `tagClass` | String, Array, or Object | The value of the `tag-variant` prop. Class (or classes) to apply to the tag elements |
|
|
396
|
-
| `tagPills` | Boolean | The value of the `tag-pills` prop |
|
|
397
|
-
| `tagRemoveLabel` | String | Value of the `tag-remove-label` prop. Used as the `aria-label` attribute on the remove button of tags |
|
|
398
|
-
| `tagVariant` | String | The value of the `tag-variant` prop |
|
|
399
|
-
| `tags` | Array | Array of current tag strings |
|
|
400
|
-
|
|
401
|
-
#### `inputAttrs` object properties
|
|
402
|
-
|
|
403
|
-
The `inputAttrs` object contains attributes to bind (`v-bind`) to the new tag input element.
|
|
404
|
-
|
|
405
|
-
| Property | Type | Description |
|
|
406
|
-
| ---------- | ------- | ---------------------------------------------------------------------------- |
|
|
407
|
-
| `disabled` | Boolean | The `disabled` attribute for the new tag input. Value of the `disabled` prop |
|
|
408
|
-
| `form` | String | The `form` attribute for the new tag input. Value of the `form` prop |
|
|
409
|
-
| `id` | String | the `id` attribute for the new tag input |
|
|
410
|
-
| `value` | String | The `value` attribute for the new tag input |
|
|
411
|
-
|
|
412
|
-
The `inputAttrs` object will also include any attributes set via the `input-attrs` prop. Note that
|
|
413
|
-
the above attributes take precedence over any of the same attributes specified in the `input-attrs`
|
|
414
|
-
prop.
|
|
415
|
-
|
|
416
|
-
#### `inputHandlers` object properties
|
|
417
|
-
|
|
418
|
-
The `inputHandlers` object contains event handlers to bind (`v-on`) to the new tag input element.
|
|
419
|
-
|
|
420
|
-
| Property | Type | Description |
|
|
421
|
-
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
422
|
-
| `change` | Function | Event handler for the input element `change` event. Accepts a single argument of either an event object or a string. Change will trigger adding the tag. |
|
|
423
|
-
| `input` | Function | Event handler for the input element `input` event. Accepts a single argument of either an event object or a string. Updates the internal v-model for the new tag input element |
|
|
424
|
-
| `keydown` | Function | Event handler for the input element `keydown` <kbd>Enter</kbd> and <kbd>Del</kbd> events. Accepts a single argument which is the native keydown event object |
|
|
425
|
-
|
|
426
|
-
The `change` handler, when needed, must be enabled via the `add-on-change` prop, otherwise it is a
|
|
427
|
-
noop method.
|
|
428
|
-
|
|
429
|
-
### Using native browser inputs
|
|
430
|
-
|
|
431
|
-
The scope contains attributes and event handlers that can be directly bound to native `<input>` or
|
|
432
|
-
`<select>` elements.
|
|
433
|
-
|
|
434
|
-
The following example includes the suggested ARIA attributes and roles needed for screen-reader
|
|
435
|
-
support.
|
|
436
|
-
|
|
437
|
-
```html
|
|
438
|
-
<template>
|
|
439
|
-
<div>
|
|
440
|
-
<b-form-tags v-model="value" no-outer-focus class="mb-2">
|
|
441
|
-
<template v-slot="{ tags, inputAttrs, inputHandlers, addTag, removeTag }">
|
|
442
|
-
<b-input-group aria-controls="my-custom-tags-list">
|
|
443
|
-
<input
|
|
444
|
-
v-bind="inputAttrs"
|
|
445
|
-
v-on="inputHandlers"
|
|
446
|
-
placeholder="New tag - Press enter to add"
|
|
447
|
-
class="form-control">
|
|
448
|
-
<b-input-group-append>
|
|
449
|
-
<b-button @click="addTag()" variant="primary">Add</b-button>
|
|
450
|
-
</b-input-group-append>
|
|
451
|
-
</b-input-group>
|
|
452
|
-
<ul
|
|
453
|
-
id="my-custom-tags-list"
|
|
454
|
-
class="list-unstyled d-inline-flex flex-wrap mb-0"
|
|
455
|
-
aria-live="polite"
|
|
456
|
-
aria-atomic="false"
|
|
457
|
-
aria-relevant="additions removals"
|
|
458
|
-
>
|
|
459
|
-
<!-- Always use the tag value as the :key, not the index! -->
|
|
460
|
-
<!-- Otherwise screen readers will not read the tag
|
|
461
|
-
additions and removals correctly -->
|
|
462
|
-
<b-card
|
|
463
|
-
v-for="tag in tags"
|
|
464
|
-
:key="tag"
|
|
465
|
-
:id="`my-custom-tags-tag_${tag.replace(/\s/g, '_')}_`"
|
|
466
|
-
tag="li"
|
|
467
|
-
class="mt-1 mr-1"
|
|
468
|
-
body-class="py-1 pr-2 text-nowrap"
|
|
469
|
-
>
|
|
470
|
-
<strong>{{ tag }}</strong>
|
|
471
|
-
<b-button
|
|
472
|
-
@click="removeTag(tag)"
|
|
473
|
-
variant="link"
|
|
474
|
-
size="sm"
|
|
475
|
-
:aria-controls="`my-custom-tags-tag_${tag.replace(/\s/g, '_')}_`"
|
|
476
|
-
>remove</b-button>
|
|
477
|
-
</b-card>
|
|
478
|
-
</ul>
|
|
479
|
-
</template>
|
|
480
|
-
</b-form-tags>
|
|
481
|
-
</div>
|
|
482
|
-
</template>
|
|
483
|
-
|
|
484
|
-
<script>
|
|
485
|
-
export default {
|
|
486
|
-
data() {
|
|
487
|
-
return {
|
|
488
|
-
value: ['apple', 'orange', 'banana', 'pear', 'peach']
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
</script>
|
|
493
|
-
|
|
494
|
-
<!-- form-tags-custom-native.vue -->
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
### Using custom form components
|
|
498
|
-
|
|
499
|
-
The scope contains attributes and event handlers that can be directly bound to _most_ custom inputs
|
|
500
|
-
or select components (the event handlers accept either a string tag value _or_ a native event
|
|
501
|
-
object). Any component that emits `input` as characters are typed, and (optionally) emits `change`
|
|
502
|
-
when the input value changes (i.e on blur or select), and uses the prop `value` as the v-model,
|
|
503
|
-
should work without modification.
|
|
504
|
-
|
|
505
|
-
In this example, we are using the [`<b-form-tag>` helper component](#b-form-tag-helper-component),
|
|
506
|
-
but feel free to render tags using standard HTML or components.
|
|
507
|
-
|
|
508
|
-
```html
|
|
509
|
-
<template>
|
|
510
|
-
<div>
|
|
511
|
-
<b-form-tags v-model="value" no-outer-focus class="mb-2">
|
|
512
|
-
<template v-slot="{ tags, inputAttrs, inputHandlers, tagVariant, addTag, removeTag }">
|
|
513
|
-
<b-input-group class="mb-2">
|
|
514
|
-
<b-form-input
|
|
515
|
-
v-bind="inputAttrs"
|
|
516
|
-
v-on="inputHandlers"
|
|
517
|
-
placeholder="New tag - Press enter to add"
|
|
518
|
-
class="form-control"
|
|
519
|
-
></b-form-input>
|
|
520
|
-
<b-input-group-append>
|
|
521
|
-
<b-button @click="addTag()" variant="primary">Add</b-button>
|
|
522
|
-
</b-input-group-append>
|
|
523
|
-
</b-input-group>
|
|
524
|
-
<div class="d-inline-block" style="font-size: 1.5rem;">
|
|
525
|
-
<b-form-tag
|
|
526
|
-
v-for="tag in tags"
|
|
527
|
-
@remove="removeTag(tag)"
|
|
528
|
-
:key="tag"
|
|
529
|
-
:title="tag"
|
|
530
|
-
:variant="tagVariant"
|
|
531
|
-
class="mr-1"
|
|
532
|
-
>{{ tag }}</b-form-tag>
|
|
533
|
-
</div>
|
|
534
|
-
</template>
|
|
535
|
-
</b-form-tags>
|
|
536
|
-
</div>
|
|
537
|
-
</template>
|
|
538
|
-
|
|
539
|
-
<script>
|
|
540
|
-
export default {
|
|
541
|
-
data() {
|
|
542
|
-
return {
|
|
543
|
-
value: ['apple', 'orange', 'banana']
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
</script>
|
|
548
|
-
|
|
549
|
-
<!-- form-tags-custom-components-input.vue -->
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
The following is an example of using a custom select component for choosing from a pre-defined set
|
|
553
|
-
of tags:
|
|
554
|
-
|
|
555
|
-
```html
|
|
556
|
-
<template>
|
|
557
|
-
<div>
|
|
558
|
-
<b-form-group label="Tagged input using select" label-for="tags-component-select">
|
|
559
|
-
<!-- Prop `add-on-change` is needed to enable adding tags vie the `change` event -->
|
|
560
|
-
<b-form-tags
|
|
561
|
-
id="tags-component-select"
|
|
562
|
-
v-model="value"
|
|
563
|
-
size="lg"
|
|
564
|
-
class="mb-2"
|
|
565
|
-
add-on-change
|
|
566
|
-
no-outer-focus
|
|
567
|
-
>
|
|
568
|
-
<template v-slot="{ tags, inputAttrs, inputHandlers, disabled, removeTag }">
|
|
569
|
-
<ul v-if="tags.length > 0" class="list-inline d-inline-block mb-2">
|
|
570
|
-
<li v-for="tag in tags" :key="tag" class="list-inline-item">
|
|
571
|
-
<b-form-tag
|
|
572
|
-
@remove="removeTag(tag)"
|
|
573
|
-
:title="tag"
|
|
574
|
-
:disabled="disabled"
|
|
575
|
-
variant="info"
|
|
576
|
-
>{{ tag }}</b-form-tag>
|
|
577
|
-
</li>
|
|
578
|
-
</ul>
|
|
579
|
-
<b-form-select
|
|
580
|
-
v-bind="inputAttrs"
|
|
581
|
-
v-on="inputHandlers"
|
|
582
|
-
:disabled="disabled || availableOptions.length === 0"
|
|
583
|
-
:options="availableOptions"
|
|
584
|
-
>
|
|
585
|
-
<template #first>
|
|
586
|
-
<!-- This is required to prevent bugs with Safari -->
|
|
587
|
-
<option disabled value="">Choose a tag...</option>
|
|
588
|
-
</template>
|
|
589
|
-
</b-form-select>
|
|
590
|
-
</template>
|
|
591
|
-
</b-form-tags>
|
|
592
|
-
</b-form-group>
|
|
593
|
-
</div>
|
|
594
|
-
</template>
|
|
595
|
-
|
|
596
|
-
<script>
|
|
597
|
-
export default {
|
|
598
|
-
data() {
|
|
599
|
-
return {
|
|
600
|
-
options: ['Apple', 'Orange', 'Banana', 'Lime', 'Peach', 'Chocolate', 'Strawberry'],
|
|
601
|
-
value: []
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
computed: {
|
|
605
|
-
availableOptions() {
|
|
606
|
-
return this.options.filter(opt => this.value.indexOf(opt) === -1)
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
</script>
|
|
611
|
-
|
|
612
|
-
<!-- b-form-tags-components-select.vue -->
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
If the custom input is using custom event names that mimic `input` and `change`, and/or needs the
|
|
616
|
-
`.native` modifier for keydown, you can do something similar to below to bind the event handlers:
|
|
617
|
-
|
|
618
|
-
```html
|
|
619
|
-
<template #default="{ inputAttrs, inputHandlers, removeTag, tags }">
|
|
620
|
-
<custom-input
|
|
621
|
-
:id="inputAttrs.id"
|
|
622
|
-
:vistom-value-prop="inputAttrs.value"
|
|
623
|
-
@custom-input-event="inputHandlers.input($event)"
|
|
624
|
-
@custom-change-event="inputHandlers.change($event)"
|
|
625
|
-
@keydown.native="inputHandlers.keydown($event)"
|
|
626
|
-
></custom-input>
|
|
627
|
-
<template v-for="tag in tags">
|
|
628
|
-
<!-- Your custom tag list here -->
|
|
629
|
-
</template>
|
|
630
|
-
</template>
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
The `inputHandlers.input` handler **must** be bound to an event that updates with each character
|
|
634
|
-
entered by the user for the _as-you-type_ tag validation to work.
|
|
635
|
-
|
|
636
|
-
### Advanced custom rendering usage
|
|
637
|
-
|
|
638
|
-
In situations where the `inputHandlers` will not work with your custom input, or if you need greater
|
|
639
|
-
control over tag creation, you can take advantage of the additional properties provided via the
|
|
640
|
-
default slot's scope.
|
|
641
|
-
|
|
642
|
-
```html
|
|
643
|
-
<template>
|
|
644
|
-
<div>
|
|
645
|
-
<b-form-checkbox switch size="lg" v-model="disabled">Disable</b-form-checkbox>
|
|
646
|
-
<b-form-tags
|
|
647
|
-
v-model="value"
|
|
648
|
-
@input="resetInputValue()"
|
|
649
|
-
tag-variant="success"
|
|
650
|
-
class="mb-2 mt-2"
|
|
651
|
-
:disabled="disabled"
|
|
652
|
-
no-outer-focus
|
|
653
|
-
placeholder="Enter a new tag value and click Add"
|
|
654
|
-
:state="state"
|
|
655
|
-
>
|
|
656
|
-
<template v-slot="{tags, inputId, placeholder, disabled, addTag, removeTag }">
|
|
657
|
-
<b-input-group>
|
|
658
|
-
<!-- Always bind the id to the input so that it can be focused when needed -->
|
|
659
|
-
<b-form-input
|
|
660
|
-
v-model="newTag"
|
|
661
|
-
:id="inputId"
|
|
662
|
-
:placeholder="placeholder"
|
|
663
|
-
:disabled="disabled"
|
|
664
|
-
:formatter="formatter"
|
|
665
|
-
></b-form-input>
|
|
666
|
-
<b-input-group-append>
|
|
667
|
-
<b-button @click="addTag(newTag)" :disabled="disabled" variant="primary">Add</b-button>
|
|
668
|
-
</b-input-group-append>
|
|
669
|
-
</b-input-group>
|
|
670
|
-
<b-form-invalid-feedback :state="state">
|
|
671
|
-
Duplicate tag value cannot be added again!
|
|
672
|
-
</b-form-invalid-feedback>
|
|
673
|
-
<ul v-if="tags.length > 0" class="mb-0">
|
|
674
|
-
<li v-for="tag in tags" :key="tag" :title="`Tag: ${tag}`" class="mt-2">
|
|
675
|
-
<span class="d-flex align-items-center">
|
|
676
|
-
<span class="mr-2">{{ tag }}</span>
|
|
677
|
-
<b-button
|
|
678
|
-
:disabled="disabled"
|
|
679
|
-
size="sm"
|
|
680
|
-
variant="outline-danger"
|
|
681
|
-
@click="removeTag(tag)"
|
|
682
|
-
>
|
|
683
|
-
remove tag
|
|
684
|
-
</b-button>
|
|
685
|
-
</span>
|
|
686
|
-
</li>
|
|
687
|
-
</ul>
|
|
688
|
-
<b-form-text v-else>
|
|
689
|
-
There are no tags specified. Add a new tag above.
|
|
690
|
-
</b-form-text>
|
|
691
|
-
</template>
|
|
692
|
-
</b-form-tags>
|
|
693
|
-
</div>
|
|
694
|
-
</template>
|
|
695
|
-
|
|
696
|
-
<script>
|
|
697
|
-
export default {
|
|
698
|
-
data() {
|
|
699
|
-
return {
|
|
700
|
-
newTag: '',
|
|
701
|
-
disabled: false,
|
|
702
|
-
value: []
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
computed: {
|
|
706
|
-
state() {
|
|
707
|
-
// Return false (invalid) if new tag is a duplicate
|
|
708
|
-
return this.value.indexOf(this.newTag.trim()) > -1 ? false : null
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
methods: {
|
|
712
|
-
resetInputValue() {
|
|
713
|
-
this.newTag = ''
|
|
714
|
-
},
|
|
715
|
-
formatter(value) {
|
|
716
|
-
return value.toUpperCase()
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
</script>
|
|
721
|
-
|
|
722
|
-
<!-- form-tags-custom-components-advanced.vue -->
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
The following is an example of using the `<b-dropdown>` component for choosing or searching from a
|
|
726
|
-
pre-defined set of tags:
|
|
727
|
-
|
|
728
|
-
```html
|
|
729
|
-
<template>
|
|
730
|
-
<div>
|
|
731
|
-
<b-form-group label="Tagged input using dropdown" label-for="tags-with-dropdown">
|
|
732
|
-
<b-form-tags id="tags-with-dropdown" v-model="value" no-outer-focus class="mb-2">
|
|
733
|
-
<template v-slot="{ tags, disabled, addTag, removeTag }">
|
|
734
|
-
<ul v-if="tags.length > 0" class="list-inline d-inline-block mb-2">
|
|
735
|
-
<li v-for="tag in tags" :key="tag" class="list-inline-item">
|
|
736
|
-
<b-form-tag
|
|
737
|
-
@remove="removeTag(tag)"
|
|
738
|
-
:title="tag"
|
|
739
|
-
:disabled="disabled"
|
|
740
|
-
variant="info"
|
|
741
|
-
>{{ tag }}</b-form-tag>
|
|
742
|
-
</li>
|
|
743
|
-
</ul>
|
|
744
|
-
|
|
745
|
-
<b-dropdown size="sm" variant="outline-secondary" block menu-class="w-100">
|
|
746
|
-
<template #button-content>
|
|
747
|
-
<b-icon icon="tag-fill"></b-icon> Choose tags
|
|
748
|
-
</template>
|
|
749
|
-
<b-dropdown-form @submit.stop.prevent="() => {}">
|
|
750
|
-
<b-form-group
|
|
751
|
-
label="Search tags"
|
|
752
|
-
label-for="tag-search-input"
|
|
753
|
-
label-cols-md="auto"
|
|
754
|
-
class="mb-0"
|
|
755
|
-
label-size="sm"
|
|
756
|
-
:description="searchDesc"
|
|
757
|
-
:disabled="disabled"
|
|
758
|
-
>
|
|
759
|
-
<b-form-input
|
|
760
|
-
v-model="search"
|
|
761
|
-
id="tag-search-input"
|
|
762
|
-
type="search"
|
|
763
|
-
size="sm"
|
|
764
|
-
autocomplete="off"
|
|
765
|
-
></b-form-input>
|
|
766
|
-
</b-form-group>
|
|
767
|
-
</b-dropdown-form>
|
|
768
|
-
<b-dropdown-divider></b-dropdown-divider>
|
|
769
|
-
<b-dropdown-item-button
|
|
770
|
-
v-for="option in availableOptions"
|
|
771
|
-
:key="option"
|
|
772
|
-
@click="onOptionClick({ option, addTag })"
|
|
773
|
-
>
|
|
774
|
-
{{ option }}
|
|
775
|
-
</b-dropdown-item-button>
|
|
776
|
-
<b-dropdown-text v-if="availableOptions.length === 0">
|
|
777
|
-
There are no tags available to select
|
|
778
|
-
</b-dropdown-text>
|
|
779
|
-
</b-dropdown>
|
|
780
|
-
</template>
|
|
781
|
-
</b-form-tags>
|
|
782
|
-
</b-form-group>
|
|
783
|
-
</div>
|
|
784
|
-
</template>
|
|
785
|
-
|
|
786
|
-
<script>
|
|
787
|
-
export default {
|
|
788
|
-
data() {
|
|
789
|
-
return {
|
|
790
|
-
options: ['Apple', 'Orange', 'Banana', 'Lime', 'Peach', 'Chocolate', 'Strawberry'],
|
|
791
|
-
search: '',
|
|
792
|
-
value: []
|
|
793
|
-
}
|
|
794
|
-
},
|
|
795
|
-
computed: {
|
|
796
|
-
criteria() {
|
|
797
|
-
// Compute the search criteria
|
|
798
|
-
return this.search.trim().toLowerCase()
|
|
799
|
-
},
|
|
800
|
-
availableOptions() {
|
|
801
|
-
const criteria = this.criteria
|
|
802
|
-
// Filter out already selected options
|
|
803
|
-
const options = this.options.filter(opt => this.value.indexOf(opt) === -1)
|
|
804
|
-
if (criteria) {
|
|
805
|
-
// Show only options that match criteria
|
|
806
|
-
return options.filter(opt => opt.toLowerCase().indexOf(criteria) > -1);
|
|
807
|
-
}
|
|
808
|
-
// Show all options available
|
|
809
|
-
return options
|
|
810
|
-
},
|
|
811
|
-
searchDesc() {
|
|
812
|
-
if (this.criteria && this.availableOptions.length === 0) {
|
|
813
|
-
return 'There are no tags matching your search criteria'
|
|
814
|
-
}
|
|
815
|
-
return ''
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
methods: {
|
|
819
|
-
onOptionClick({ option, addTag }) {
|
|
820
|
-
addTag(option)
|
|
821
|
-
this.search = ''
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
</script>
|
|
826
|
-
|
|
827
|
-
<!-- b-form-tags-dropdown-example.vue -->
|
|
828
|
-
```
|
|
829
|
-
|
|
830
|
-
### Creating wrapper components
|
|
831
|
-
|
|
832
|
-
You can easily create a custom wrapper component with your preferred rendering style as follows:
|
|
833
|
-
|
|
834
|
-
```html
|
|
835
|
-
<template>
|
|
836
|
-
<b-form-tags :value="value" @input="$emit('input', $event)">
|
|
837
|
-
<template v-slot="{ tags, addTag, removeTag, inputAttrs, inputHandlers }">
|
|
838
|
-
<!-- Place your custom rendering here -->
|
|
839
|
-
</template>
|
|
840
|
-
</b-form-tags>
|
|
841
|
-
</template>
|
|
842
|
-
|
|
843
|
-
<script>
|
|
844
|
-
import { BFormTags } from 'bootstrap-vue'
|
|
845
|
-
|
|
846
|
-
export default {
|
|
847
|
-
name: 'MyCustomTags',
|
|
848
|
-
components: { BFormTags },
|
|
849
|
-
model: {
|
|
850
|
-
prop: 'value',
|
|
851
|
-
event: 'input'
|
|
852
|
-
},
|
|
853
|
-
props: {
|
|
854
|
-
value: {
|
|
855
|
-
type: Array,
|
|
856
|
-
default: () => []
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
</script>
|
|
861
|
-
```
|
|
862
|
-
|
|
863
|
-
## `<b-form-tag>` helper component
|
|
864
|
-
|
|
865
|
-
BootstrapVue provides the helper component `<b-form-tag>`, for use with the default scoped slot of
|
|
866
|
-
`<b-form-tags>`. The component is based upon [`<b-badge>`](/docs/components/badge) and
|
|
867
|
-
[`<b-button-close>`](/docs/components/button/#comp-ref-b-button-close).
|
|
868
|
-
|
|
869
|
-
`<b-form-tag>` supports the same variants as `<b-badge>` and also supports `pill` styling. Sizing is
|
|
870
|
-
based on the containing element's font-size.
|
|
871
|
-
|
|
872
|
-
The `remove` event is emitted when the `<b-form-tag>` remove button is clicked.
|
|
873
|
-
|
|
874
|
-
Tags that are too wide for their parent container will automatically have their text content
|
|
875
|
-
truncated with an ellipsis. For this reason, it is always good practice to supply a title via the
|
|
876
|
-
`title` prop when using the default slot of `<b-form-tag>` for the tag content.
|
|
877
|
-
|
|
878
|
-
Note `<b-form-tag>` requires BootstrapVue's custom CSS/SCSS for proper styling.
|
|
879
|
-
|
|
880
|
-
<!-- Component reference added automatically from component package.json -->
|