@gitlab/ui 132.0.0 → 132.0.2
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/dist/charts.js +13 -0
- package/dist/components/base/accordion/accordion.js +69 -0
- package/dist/components/base/accordion/accordion_item.js +160 -0
- package/dist/components/base/accordion/constants.js +3 -0
- package/dist/components/base/alert/alert.js +263 -0
- package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_duo_chat_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_loader_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_notifications_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_sidebar_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_smile_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_sort_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_star_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_todo_icon.js +45 -0
- package/dist/components/base/animated_icon/animated_upload_icon.js +45 -0
- package/dist/components/base/animated_icon/base_animated_icon.js +77 -0
- package/dist/components/base/attribute_list/attribute_list.js +100 -0
- package/dist/components/base/avatar/avatar.js +175 -0
- package/dist/components/base/avatar/utils.js +17 -0
- package/dist/components/base/avatar_labeled/avatar_labeled.js +198 -0
- package/dist/components/base/avatar_link/avatar_link.js +47 -0
- package/dist/components/base/avatars_inline/avatars_inline.js +139 -0
- package/dist/components/base/badge/badge.js +197 -0
- package/dist/components/base/banner/banner.js +149 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +282 -0
- package/dist/components/base/breadcrumb/breadcrumb_item.js +96 -0
- package/dist/components/base/broadcast_message/broadcast_message.js +113 -0
- package/dist/components/base/broadcast_message/constants.js +5 -0
- package/dist/components/base/button/button.js +419 -0
- package/dist/components/base/button_group/button_group.js +53 -0
- package/dist/components/base/card/card.js +69 -0
- package/dist/components/base/collapse/collapse.js +163 -0
- package/dist/components/base/color_mode_toggle/color_mode_toggle.js +92 -0
- package/dist/components/base/datepicker/datepicker.js +475 -0
- package/dist/components/base/daterange_picker/daterange_picker.js +394 -0
- package/dist/components/base/drawer/drawer.js +156 -0
- package/dist/components/base/dropdown/dropdown.js +330 -0
- package/dist/components/base/dropdown/dropdown_divider.js +48 -0
- package/dist/components/base/dropdown/dropdown_form.js +48 -0
- package/dist/components/base/dropdown/dropdown_item.js +175 -0
- package/dist/components/base/dropdown/dropdown_section_header.js +48 -0
- package/dist/components/base/dropdown/dropdown_text.js +48 -0
- package/dist/components/base/filtered_search/common_story_options.js +14 -0
- package/dist/components/base/filtered_search/filtered_search.js +428 -0
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +95 -0
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +139 -0
- package/dist/components/base/filtered_search/filtered_search_term.js +217 -0
- package/dist/components/base/filtered_search/filtered_search_token.js +383 -0
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +444 -0
- package/dist/components/base/filtered_search/filtered_search_utils.js +241 -0
- package/dist/components/base/form/form.js +43 -0
- package/dist/components/base/form/form_character_count/form_character_count.js +107 -0
- package/dist/components/base/form/form_checkbox/form_checkbox.js +342 -0
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +188 -0
- package/dist/components/base/form/form_combobox/constants.js +55 -0
- package/dist/components/base/form/form_combobox/form_combobox.js +239 -0
- package/dist/components/base/form/form_date/form_date.js +143 -0
- package/dist/components/base/form/form_fields/form_field_validator.js +93 -0
- package/dist/components/base/form/form_fields/form_fields.js +289 -0
- package/dist/components/base/form/form_fields/form_fields_loop.js +75 -0
- package/dist/components/base/form/form_fields/mappers.js +13 -0
- package/dist/components/base/form/form_fields/validators.js +48 -0
- package/dist/components/base/form/form_group/form_group.js +119 -0
- package/dist/components/base/form/form_input/form_input.js +695 -0
- package/dist/components/base/form/form_input_group/form_input_group.js +120 -0
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +41 -0
- package/dist/components/base/form/form_radio/form_radio.js +259 -0
- package/dist/components/base/form/form_radio_group/form_radio_group.js +189 -0
- package/dist/components/base/form/form_select/constants.js +12 -0
- package/dist/components/base/form/form_select/form_select.js +96 -0
- package/dist/components/base/form/form_textarea/form_textarea.js +166 -0
- package/dist/components/base/form/input_group_text/input_group_text.js +43 -0
- package/dist/components/base/icon/icon.js +113 -0
- package/dist/components/base/illustration/illustration.js +80 -0
- package/dist/components/base/infinite_scroll/infinite_scroll.js +196 -0
- package/dist/components/base/keyset_pagination/keyset_pagination.js +152 -0
- package/dist/components/base/label/label.js +174 -0
- package/dist/components/base/link/link.js +330 -0
- package/dist/components/base/loading_icon/loading_icon.js +120 -0
- package/dist/components/base/markdown/markdown.js +50 -0
- package/dist/components/base/modal/modal.js +259 -0
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +716 -0
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +5 -0
- package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +32 -0
- package/dist/components/base/new_dropdowns/constants.js +24 -0
- package/dist/components/base/new_dropdowns/disclosure/constants.js +8 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +400 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +112 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +196 -0
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +168 -0
- package/dist/components/base/new_dropdowns/disclosure/utils.js +84 -0
- package/dist/components/base/new_dropdowns/listbox/listbox.js +997 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +58 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +112 -0
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +94 -0
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +131 -0
- package/dist/components/base/new_dropdowns/listbox/utils.js +33 -0
- package/dist/components/base/pagination/pagination.js +397 -0
- package/dist/components/base/path/data.js +34 -0
- package/dist/components/base/path/path.js +177 -0
- package/dist/components/base/popover/popover.js +142 -0
- package/dist/components/base/progress_bar/progress_bar.js +117 -0
- package/dist/components/base/search_box_by_click/search_box_by_click.js +245 -0
- package/dist/components/base/search_box_by_type/search_box_by_type.js +187 -0
- package/dist/components/base/segmented_control/segmented_control.js +73 -0
- package/dist/components/base/skeleton_loader/skeleton_loader.js +232 -0
- package/dist/components/base/sorting/sorting.js +180 -0
- package/dist/components/base/table/constants.js +5 -0
- package/dist/components/base/table/table.js +187 -0
- package/dist/components/base/table_lite/table_lite.js +80 -0
- package/dist/components/base/tabs/constants.js +3 -0
- package/dist/components/base/tabs/tab/tab.js +113 -0
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +162 -0
- package/dist/components/base/tabs/tabs/tabs.js +223 -0
- package/dist/components/base/toast/index.js +66 -0
- package/dist/components/base/toast/toast.js +125 -0
- package/dist/components/base/toast/toaster.js +87 -0
- package/dist/components/base/toggle/toggle.js +178 -0
- package/dist/components/base/token/token.js +97 -0
- package/dist/components/base/token_selector/helpers.js +5 -0
- package/dist/components/base/token_selector/token_container.js +160 -0
- package/dist/components/base/token_selector/token_selector.js +454 -0
- package/dist/components/base/token_selector/token_selector_dropdown.js +223 -0
- package/dist/components/base/tooltip/tooltip.js +54 -0
- package/dist/components/charts/area/area.js +329 -0
- package/dist/components/charts/bar/bar.js +207 -0
- package/dist/components/charts/chart/chart.js +215 -0
- package/dist/components/charts/column/column.js +221 -0
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +199 -0
- package/dist/components/charts/gauge/gauge.js +205 -0
- package/dist/components/charts/heatmap/heatmap.js +299 -0
- package/dist/components/charts/heatmap/index.js +2 -0
- package/dist/components/charts/legend/legend.js +245 -0
- package/dist/components/charts/line/line.js +340 -0
- package/dist/components/charts/series_label/series_label.js +101 -0
- package/dist/components/charts/shared/tooltip/tooltip.js +369 -0
- package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +53 -0
- package/dist/components/charts/single_stat/single_stat.js +164 -0
- package/dist/components/charts/sparkline/sparkline.js +299 -0
- package/dist/components/charts/stacked_column/stacked_column.js +380 -0
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +125 -0
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +326 -0
- package/dist/components/dashboards/dashboard_layout/validators.js +14 -0
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +236 -0
- package/dist/components/dashboards/mock_data.js +49 -0
- package/dist/components/experimental/experiment_badge/constants.js +4 -0
- package/dist/components/experimental/experiment_badge/experiment_badge.js +102 -0
- package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +87 -0
- package/dist/components/index.js +107 -0
- package/dist/components/mixins/button_mixin.js +11 -0
- package/dist/components/mixins/safe_link_mixin.js +30 -0
- package/dist/components/mixins/tooltip_mixin.js +21 -0
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +53 -0
- package/dist/components/regions/empty_state/empty_state.js +181 -0
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +64 -0
- package/dist/components/shared_components/clipboard_button/clipboard_button.js +100 -0
- package/dist/components/shared_components/close_button/close_button.js +55 -0
- package/dist/components/utilities/animated_number/animated_number.js +131 -0
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +75 -0
- package/dist/components/utilities/intersection_observer/intersection_observer.js +88 -0
- package/dist/components/utilities/intersperse/intersperse.js +104 -0
- package/dist/components/utilities/sprintf/sprintf.js +171 -0
- package/dist/components/utilities/truncate/constants.js +8 -0
- package/dist/components/utilities/truncate/truncate.js +154 -0
- package/dist/components/utilities/truncate_text/constants.js +7 -0
- package/dist/components/utilities/truncate_text/truncate_text.js +146 -0
- package/dist/config.js +53 -0
- package/dist/directives/hover_load/hover_load.js +45 -0
- package/dist/directives/index.js +8 -0
- package/dist/directives/modal.js +1 -0
- package/dist/directives/outside/outside.js +149 -0
- package/dist/directives/resize_observer/resize_observer.js +58 -0
- package/dist/directives/safe_html/constants.js +6 -0
- package/dist/directives/safe_html/safe_html.js +39 -0
- package/dist/directives/safe_link/mock_data.js +10 -0
- package/dist/directives/safe_link/safe_link.js +67 -0
- package/dist/directives/tooltip/container.js +7 -0
- package/dist/directives/tooltip/tooltip.js +18 -0
- package/dist/index.css +7 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +2 -0
- package/dist/tailwind.css +2 -0
- package/dist/tailwind.css.map +1 -0
- package/dist/tokens/build/js/tokens.dark.js +1410 -0
- package/dist/tokens/build/js/tokens.js +1410 -0
- package/dist/tokens/common_story_options.js +29 -0
- package/dist/tokens/tokens_story.js +76 -0
- package/dist/utils/breakpoints.js +20 -0
- package/dist/utils/charts/config.js +616 -0
- package/dist/utils/charts/constants.js +69 -0
- package/dist/utils/charts/mock_data.js +191 -0
- package/dist/utils/charts/story_config.js +24 -0
- package/dist/utils/charts/theme.js +200 -0
- package/dist/utils/charts/utils.js +54 -0
- package/dist/utils/constants.js +331 -0
- package/dist/utils/data_utils.js +19 -0
- package/dist/utils/datetime_utility.js +61 -0
- package/dist/utils/equality_utils.js +84 -0
- package/dist/utils/form_options_utils.js +46 -0
- package/dist/utils/i18n.js +65 -0
- package/dist/utils/is_slot_empty.js +34 -0
- package/dist/utils/number_utils.js +132 -0
- package/dist/utils/play_utils.js +11 -0
- package/dist/utils/set_utils.js +25 -0
- package/dist/utils/stories_constants.js +29 -0
- package/dist/utils/stories_utils.js +62 -0
- package/dist/utils/story_decorators/container.js +19 -0
- package/dist/utils/string_utils.js +69 -0
- package/dist/utils/svgs/svg_paths.js +7 -0
- package/dist/utils/test_utils.js +33 -0
- package/dist/utils/use_fake_date.js +29 -0
- package/dist/utils/use_mock_intersection_observer.js +105 -0
- package/dist/utils/utils.js +205 -0
- package/dist/utils/vue_utils.js +57 -0
- package/dist/utils.js +5 -0
- package/dist/vendor/bootstrap-vue/src/bv-config.js +8 -0
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +81 -0
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +204 -0
- package/dist/vendor/bootstrap-vue/src/components/button/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +41 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +52 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +75 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +52 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +85 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +97 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +60 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +270 -0
- package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +8 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +53 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +55 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +53 -0
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +56 -0
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +4 -0
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +347 -0
- package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +54 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +41 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +143 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +56 -0
- package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +3 -0
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +217 -0
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +155 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +34 -0
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/link/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +283 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +21 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +212 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +1059 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +55 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +31 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +49 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +22 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +64 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +40 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +43 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +83 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +50 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +32 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +82 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +292 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +154 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +44 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +191 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +213 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +274 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +39 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +186 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +338 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +243 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +50 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +218 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +42 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +86 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +31 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +11 -0
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +14 -0
- package/dist/vendor/bootstrap-vue/src/components/table/index.js +9 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +51 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +44 -0
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +67 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +116 -0
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +204 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +96 -0
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +26 -0
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +99 -0
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +121 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +238 -0
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +690 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +251 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +118 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +932 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +337 -0
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +103 -0
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +205 -0
- package/dist/vendor/bootstrap-vue/src/constants/components.js +55 -0
- package/dist/vendor/bootstrap-vue/src/constants/config.js +11 -0
- package/dist/vendor/bootstrap-vue/src/constants/env.js +36 -0
- package/dist/vendor/bootstrap-vue/src/constants/events.js +56 -0
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +11 -0
- package/dist/vendor/bootstrap-vue/src/constants/popper.js +10 -0
- package/dist/vendor/bootstrap-vue/src/constants/props.js +24 -0
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +35 -0
- package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +15 -0
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +36 -0
- package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +112 -0
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +267 -0
- package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +1 -0
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +187 -0
- package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +5 -0
- package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +54 -0
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +470 -0
- package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +46 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +73 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +26 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +91 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +26 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +50 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +293 -0
- package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +50 -0
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +29 -0
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +57 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +120 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +62 -0
- package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +25 -0
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +10 -0
- package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +30 -0
- package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +18 -0
- package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/array.js +27 -0
- package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +60 -0
- package/dist/vendor/bootstrap-vue/src/utils/cache.js +60 -0
- package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +18 -0
- package/dist/vendor/bootstrap-vue/src/utils/config-set.js +86 -0
- package/dist/vendor/bootstrap-vue/src/utils/config.js +71 -0
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +133 -0
- package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +70 -0
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +298 -0
- package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +28 -0
- package/dist/vendor/bootstrap-vue/src/utils/env.js +16 -0
- package/dist/vendor/bootstrap-vue/src/utils/events.js +78 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +5 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +9 -0
- package/dist/vendor/bootstrap-vue/src/utils/get.js +63 -0
- package/dist/vendor/bootstrap-vue/src/utils/html.js +16 -0
- package/dist/vendor/bootstrap-vue/src/utils/identity.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +35 -0
- package/dist/vendor/bootstrap-vue/src/utils/locale.js +18 -0
- package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +59 -0
- package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +13 -0
- package/dist/vendor/bootstrap-vue/src/utils/math.js +9 -0
- package/dist/vendor/bootstrap-vue/src/utils/memoize.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/model.js +33 -0
- package/dist/vendor/bootstrap-vue/src/utils/noop.js +3 -0
- package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +51 -0
- package/dist/vendor/bootstrap-vue/src/utils/number.js +23 -0
- package/dist/vendor/bootstrap-vue/src/utils/object.js +72 -0
- package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +76 -0
- package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +22 -0
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +124 -0
- package/dist/vendor/bootstrap-vue/src/utils/props.js +67 -0
- package/dist/vendor/bootstrap-vue/src/utils/router.js +150 -0
- package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +14 -0
- package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +28 -0
- package/dist/vendor/bootstrap-vue/src/utils/string.js +47 -0
- package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +31 -0
- package/dist/vendor/bootstrap-vue/src/utils/warn.js +45 -0
- package/dist/vendor/bootstrap-vue/src/vue.js +55 -0
- package/package.json +6 -5
- package/src/components/base/link/link.vue +5 -8
- package/src/utils/constants.js +0 -3
- package/src/utils/vue_utils.js +56 -0
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/form-group/form-group.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/layout/col.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/modal/modal.js +219 -52
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +30 -11
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +3 -3
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +1 -2
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +4 -4
- package/src/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +2 -3
- package/src/vendor/bootstrap-vue/src/components/tabs/tabs.js +2 -2
- package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +8 -9
- package/src/vendor/bootstrap-vue/src/constants/config.js +2 -2
- package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +1 -1
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.js +1 -2
- package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.js +1 -2
- package/src/vendor/bootstrap-vue/src/utils/array.js +0 -1
- package/src/vendor/bootstrap-vue/src/utils/locale.js +1 -2
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import CloseButton from '../../shared_components/close_button/close_button';
|
|
2
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
+
|
|
4
|
+
const MIN_DURATION = 1000;
|
|
5
|
+
const DEFAULT_AUTO_HIDE_DELAY = 5000;
|
|
6
|
+
const hasAnimateSupport = typeof Element !== 'undefined' && Boolean(Element.prototype.animate);
|
|
7
|
+
var script = {
|
|
8
|
+
name: 'GlToast',
|
|
9
|
+
components: {
|
|
10
|
+
CloseButton
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
toastId: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
message: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
action: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: false,
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
autoHideDelay: {
|
|
27
|
+
type: Number,
|
|
28
|
+
required: false,
|
|
29
|
+
default: DEFAULT_AUTO_HIDE_DELAY
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
visible: true
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
effectiveDelay() {
|
|
39
|
+
return Math.max(this.autoHideDelay, MIN_DURATION);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
this.useCssTransition = hasAnimateSupport;
|
|
44
|
+
this.dismissTimer = null;
|
|
45
|
+
this.deadline = 0;
|
|
46
|
+
this.timeRemaining = this.effectiveDelay;
|
|
47
|
+
this.isHiding = false;
|
|
48
|
+
},
|
|
49
|
+
beforeDestroy() {
|
|
50
|
+
clearTimeout(this.dismissTimer);
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
startDismissTimer() {
|
|
54
|
+
clearTimeout(this.dismissTimer);
|
|
55
|
+
this.deadline = Date.now() + this.timeRemaining;
|
|
56
|
+
this.dismissTimer = setTimeout(() => this.hide(), this.timeRemaining);
|
|
57
|
+
},
|
|
58
|
+
onPause() {
|
|
59
|
+
if (!this.dismissTimer) return;
|
|
60
|
+
clearTimeout(this.dismissTimer);
|
|
61
|
+
this.dismissTimer = null;
|
|
62
|
+
this.timeRemaining = Math.max(this.deadline - Date.now(), MIN_DURATION);
|
|
63
|
+
},
|
|
64
|
+
onResume() {
|
|
65
|
+
if (!this.timeRemaining || this.dismissTimer) return;
|
|
66
|
+
this.startDismissTimer();
|
|
67
|
+
},
|
|
68
|
+
hide() {
|
|
69
|
+
if (this.isHiding) return;
|
|
70
|
+
this.isHiding = true;
|
|
71
|
+
clearTimeout(this.dismissTimer);
|
|
72
|
+
this.dismissTimer = null;
|
|
73
|
+
this.visible = false;
|
|
74
|
+
},
|
|
75
|
+
onAfterLeave() {
|
|
76
|
+
this.$emit('hidden', this.toastId);
|
|
77
|
+
},
|
|
78
|
+
onActionClick(e) {
|
|
79
|
+
if (this.action && this.action.onClick) {
|
|
80
|
+
this.action.onClick(e, {
|
|
81
|
+
id: this.toastId,
|
|
82
|
+
hide: () => this.hide()
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/* script */
|
|
90
|
+
const __vue_script__ = script;
|
|
91
|
+
|
|
92
|
+
/* template */
|
|
93
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-toast b-toast-append",attrs:{"id":(_vm.toastId + "_toast_outer"),"role":"status","aria-live":"polite","aria-atomic":"true"}},[_c('transition',{attrs:{"enter-active-class":"fade","enter-to-class":"show","leave-class":"show","leave-active-class":"fade","appear":"","appear-active-class":"fade","appear-to-class":"show","css":_vm.useCssTransition},on:{"after-appear":_vm.startDismissTimer,"after-leave":_vm.onAfterLeave}},[(_vm.visible)?_c('div',{staticClass:"toast gl-toast",attrs:{"id":_vm.toastId,"tabindex":"0"},on:{"mouseenter":_vm.onPause,"mouseleave":_vm.onResume}},[_c('div',{staticClass:"toast-body"},[_vm._v(_vm._s(_vm.message))]),_vm._v(" "),_c('header',{staticClass:"toast-header"},[(_vm.action)?_c('a',{staticClass:"gl-toast-action",attrs:{"role":_vm.action.href ? undefined : 'button',"href":_vm.action.href},on:{"click":_vm.onActionClick}},[_vm._v(_vm._s(_vm.action.text))]):_vm._e(),_vm._v(" "),_c('close-button',{staticClass:"gl-toast-close-button",on:{"click":_vm.hide}})],1)]):_vm._e()])],1)};
|
|
94
|
+
var __vue_staticRenderFns__ = [];
|
|
95
|
+
|
|
96
|
+
/* style */
|
|
97
|
+
const __vue_inject_styles__ = undefined;
|
|
98
|
+
/* scoped */
|
|
99
|
+
const __vue_scope_id__ = undefined;
|
|
100
|
+
/* module identifier */
|
|
101
|
+
const __vue_module_identifier__ = undefined;
|
|
102
|
+
/* functional template */
|
|
103
|
+
const __vue_is_functional_template__ = false;
|
|
104
|
+
/* style inject */
|
|
105
|
+
|
|
106
|
+
/* style inject SSR */
|
|
107
|
+
|
|
108
|
+
/* style inject shadow dom */
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
113
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
114
|
+
__vue_inject_styles__,
|
|
115
|
+
__vue_script__,
|
|
116
|
+
__vue_scope_id__,
|
|
117
|
+
__vue_is_functional_template__,
|
|
118
|
+
__vue_module_identifier__,
|
|
119
|
+
false,
|
|
120
|
+
undefined,
|
|
121
|
+
undefined,
|
|
122
|
+
undefined
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { MountingPortal } from 'portal-vue';
|
|
2
|
+
import GlToast from './toast';
|
|
3
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
4
|
+
|
|
5
|
+
const hasViewTransitions = typeof document !== 'undefined' && typeof document.startViewTransition === 'function';
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'GlToaster',
|
|
8
|
+
components: {
|
|
9
|
+
MountingPortal,
|
|
10
|
+
GlToast
|
|
11
|
+
},
|
|
12
|
+
expose: ['addToast', 'hideToast', 'removeToast'],
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
toasts: []
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
addToast(config) {
|
|
20
|
+
const add = () => this.toasts.push(config);
|
|
21
|
+
if (hasViewTransitions && this.toasts.length > 0) {
|
|
22
|
+
document.startViewTransition(add);
|
|
23
|
+
} else {
|
|
24
|
+
add();
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
hideToast(id) {
|
|
28
|
+
const refs = this.$refs.toastRefs;
|
|
29
|
+
if (!refs) return;
|
|
30
|
+
const toastComponents = Array.isArray(refs) ? refs : [refs];
|
|
31
|
+
const component = toastComponents.find(c => c.toastId === id);
|
|
32
|
+
if (component) {
|
|
33
|
+
component.hide();
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
removeToast(id) {
|
|
37
|
+
const idx = this.toasts.findIndex(t => t.id === id);
|
|
38
|
+
if (idx !== -1) {
|
|
39
|
+
const toast = this.toasts[idx];
|
|
40
|
+
this.toasts.splice(idx, 1);
|
|
41
|
+
if (toast.onComplete) {
|
|
42
|
+
toast.onComplete({
|
|
43
|
+
componentId: id
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/* script */
|
|
52
|
+
const __vue_script__ = script;
|
|
53
|
+
|
|
54
|
+
/* template */
|
|
55
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('mounting-portal',{attrs:{"mount-to":"body","append":""}},[_c('div',{staticClass:"b-toaster b-toaster-bottom-left",attrs:{"id":"gl-toaster"}},[_c('div',{staticClass:"b-toaster-slot"},_vm._l((_vm.toasts),function(toast){return _c('gl-toast',{key:toast.id,ref:"toastRefs",refInFor:true,attrs:{"toast-id":toast.id,"message":toast.message,"action":toast.action,"auto-hide-delay":toast.autoHideDelay},on:{"hidden":_vm.removeToast}})}),1)])])};
|
|
56
|
+
var __vue_staticRenderFns__ = [];
|
|
57
|
+
|
|
58
|
+
/* style */
|
|
59
|
+
const __vue_inject_styles__ = undefined;
|
|
60
|
+
/* scoped */
|
|
61
|
+
const __vue_scope_id__ = undefined;
|
|
62
|
+
/* module identifier */
|
|
63
|
+
const __vue_module_identifier__ = undefined;
|
|
64
|
+
/* functional template */
|
|
65
|
+
const __vue_is_functional_template__ = false;
|
|
66
|
+
/* style inject */
|
|
67
|
+
|
|
68
|
+
/* style inject SSR */
|
|
69
|
+
|
|
70
|
+
/* style inject shadow dom */
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
75
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
76
|
+
__vue_inject_styles__,
|
|
77
|
+
__vue_script__,
|
|
78
|
+
__vue_scope_id__,
|
|
79
|
+
__vue_is_functional_template__,
|
|
80
|
+
__vue_module_identifier__,
|
|
81
|
+
false,
|
|
82
|
+
undefined,
|
|
83
|
+
undefined,
|
|
84
|
+
undefined
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { uniqueId } from 'lodash-es';
|
|
2
|
+
import { toggleLabelPosition } from '../../../utils/constants';
|
|
3
|
+
import GlIcon from '../icon/icon';
|
|
4
|
+
import GlLoadingIcon from '../loading_icon/loading_icon';
|
|
5
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
|
+
|
|
7
|
+
let uuid = 0;
|
|
8
|
+
var script = {
|
|
9
|
+
name: 'GlToggle',
|
|
10
|
+
components: {
|
|
11
|
+
GlIcon,
|
|
12
|
+
GlLoadingIcon
|
|
13
|
+
},
|
|
14
|
+
model: {
|
|
15
|
+
prop: 'value',
|
|
16
|
+
event: 'change'
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
name: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: false,
|
|
22
|
+
default: null
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* The toggle's state.
|
|
26
|
+
* @model
|
|
27
|
+
*/
|
|
28
|
+
value: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
required: false,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Whether the toggle should be disabled.
|
|
35
|
+
*/
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Whether the toggle is in the loading state.
|
|
43
|
+
*/
|
|
44
|
+
isLoading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: false,
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* The toggle's label.
|
|
51
|
+
*/
|
|
52
|
+
label: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false,
|
|
55
|
+
default: null
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* The toggle's description.
|
|
59
|
+
*/
|
|
60
|
+
description: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false,
|
|
63
|
+
default: undefined
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* A help text to be shown below the toggle.
|
|
67
|
+
*/
|
|
68
|
+
help: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: false,
|
|
71
|
+
default: undefined
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* The label's position relative to the toggle. If 'hidden', the toggle will add the .gl-sr-only class so the label is still accessible to screen readers.
|
|
75
|
+
*/
|
|
76
|
+
labelPosition: {
|
|
77
|
+
type: String,
|
|
78
|
+
required: false,
|
|
79
|
+
default: 'top',
|
|
80
|
+
validator(position) {
|
|
81
|
+
return Object.values(toggleLabelPosition).includes(position);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
labelId: uniqueId('toggle-label-')
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
shouldRenderDescription() {
|
|
92
|
+
return Boolean(this.$scopedSlots.description || this.description) && this.isVerticalLayout;
|
|
93
|
+
},
|
|
94
|
+
shouldRenderHelp() {
|
|
95
|
+
// eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
|
|
96
|
+
return Boolean(this.$slots.help || this.help) && this.isVerticalLayout;
|
|
97
|
+
},
|
|
98
|
+
toggleClasses() {
|
|
99
|
+
return [{
|
|
100
|
+
'gl-sr-only': this.labelPosition === 'hidden'
|
|
101
|
+
}, this.shouldRenderDescription ? 'gl-mb-2' : 'gl-mb-3'];
|
|
102
|
+
},
|
|
103
|
+
icon() {
|
|
104
|
+
return this.value ? 'check-xs' : 'close-xs';
|
|
105
|
+
},
|
|
106
|
+
helpId() {
|
|
107
|
+
return this.shouldRenderHelp ? `toggle-help-${this.uuid}` : undefined;
|
|
108
|
+
},
|
|
109
|
+
isChecked() {
|
|
110
|
+
return this.value ? 'true' : 'false';
|
|
111
|
+
},
|
|
112
|
+
isVerticalLayout() {
|
|
113
|
+
return this.labelPosition === 'top' || this.labelPosition === 'hidden';
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
beforeCreate() {
|
|
117
|
+
this.uuid = uuid;
|
|
118
|
+
uuid += 1;
|
|
119
|
+
},
|
|
120
|
+
methods: {
|
|
121
|
+
toggleFeature() {
|
|
122
|
+
if (!this.disabled) {
|
|
123
|
+
/**
|
|
124
|
+
* Emitted when the state changes.
|
|
125
|
+
*
|
|
126
|
+
* @event change
|
|
127
|
+
* @property {boolean} value Whether the toggle is enabled.
|
|
128
|
+
*/
|
|
129
|
+
this.$emit('change', !this.value);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/* script */
|
|
136
|
+
const __vue_script__ = script;
|
|
137
|
+
|
|
138
|
+
/* template */
|
|
139
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-toggle-wrapper gl-mb-0 gl-flex",class:{
|
|
140
|
+
'gl-flex-col': _vm.isVerticalLayout,
|
|
141
|
+
'gl-toggle-label-inline': !_vm.isVerticalLayout,
|
|
142
|
+
'is-disabled': _vm.disabled,
|
|
143
|
+
},attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label gl-shrink-0",class:_vm.toggleClasses,attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_vm._v(" "),(_vm.shouldRenderDescription)?_c('span',{staticClass:"gl-description-label gl-mb-3",attrs:{"data-testid":"toggle-description"}},[_vm._t("description",function(){return [_vm._v(_vm._s(_vm.description))]})],2):_vm._e(),_vm._v(" "),(_vm.name)?_c('input',{attrs:{"name":_vm.name,"type":"hidden"},domProps:{"value":_vm.value}}):_vm._e(),_vm._v(" "),_c('button',{staticClass:"gl-toggle gl-shrink-0",class:{
|
|
144
|
+
'is-checked': _vm.value,
|
|
145
|
+
'is-disabled': _vm.disabled || _vm.isLoading,
|
|
146
|
+
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"aria-disabled":_vm.disabled,"type":"button","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature.apply(null, arguments)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"dark"}}):_c('span',{staticClass:"toggle-icon"},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":12}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",function(){return [_vm._v(_vm._s(_vm.help))]})],2):_vm._e()])};
|
|
147
|
+
var __vue_staticRenderFns__ = [];
|
|
148
|
+
|
|
149
|
+
/* style */
|
|
150
|
+
const __vue_inject_styles__ = undefined;
|
|
151
|
+
/* scoped */
|
|
152
|
+
const __vue_scope_id__ = undefined;
|
|
153
|
+
/* module identifier */
|
|
154
|
+
const __vue_module_identifier__ = undefined;
|
|
155
|
+
/* functional template */
|
|
156
|
+
const __vue_is_functional_template__ = false;
|
|
157
|
+
/* style inject */
|
|
158
|
+
|
|
159
|
+
/* style inject SSR */
|
|
160
|
+
|
|
161
|
+
/* style inject shadow dom */
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
166
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
167
|
+
__vue_inject_styles__,
|
|
168
|
+
__vue_script__,
|
|
169
|
+
__vue_scope_id__,
|
|
170
|
+
__vue_is_functional_template__,
|
|
171
|
+
__vue_module_identifier__,
|
|
172
|
+
false,
|
|
173
|
+
undefined,
|
|
174
|
+
undefined,
|
|
175
|
+
undefined
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { tokenVariants } from '../../../utils/constants';
|
|
2
|
+
import { translate } from '../../../utils/i18n';
|
|
3
|
+
import CloseButton from '../../shared_components/close_button/close_button';
|
|
4
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
+
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'GlToken',
|
|
8
|
+
components: {
|
|
9
|
+
CloseButton
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* When true, hides the close button and makes the token non-removable.
|
|
14
|
+
*/
|
|
15
|
+
viewOnly: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
required: false,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Token visual variants: default, search-type, and search-value.
|
|
22
|
+
*/
|
|
23
|
+
variant: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false,
|
|
26
|
+
default: 'default',
|
|
27
|
+
validator: variant => tokenVariants.includes(variant)
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* The close button's label, it is used for the button's aria-label attribute.
|
|
31
|
+
*/
|
|
32
|
+
removeLabel: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false,
|
|
35
|
+
default: () => translate('GlToken.closeButtonTitle', 'Remove')
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
variantClass() {
|
|
40
|
+
// eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility
|
|
41
|
+
return `gl-token-${this.variant}-variant`;
|
|
42
|
+
},
|
|
43
|
+
viewOnlyClass() {
|
|
44
|
+
return {
|
|
45
|
+
'gl-token-view-only': this.viewOnly
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
close($event) {
|
|
51
|
+
/**
|
|
52
|
+
* Emitted when x is clicked
|
|
53
|
+
*
|
|
54
|
+
* @event close
|
|
55
|
+
*/
|
|
56
|
+
this.$emit('close', $event);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/* script */
|
|
62
|
+
const __vue_script__ = script;
|
|
63
|
+
|
|
64
|
+
/* template */
|
|
65
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._g({class:['gl-token', _vm.variantClass, _vm.viewOnlyClass]},_vm.$listeners),[_c('span',{staticClass:"gl-token-content"},[_vm._t("default"),_vm._v(" "),(!_vm.viewOnly)?_c('close-button',{staticClass:"gl-token-close",attrs:{"label":_vm.removeLabel},on:{"click":_vm.close}}):_vm._e()],2)])};
|
|
66
|
+
var __vue_staticRenderFns__ = [];
|
|
67
|
+
|
|
68
|
+
/* style */
|
|
69
|
+
const __vue_inject_styles__ = undefined;
|
|
70
|
+
/* scoped */
|
|
71
|
+
const __vue_scope_id__ = undefined;
|
|
72
|
+
/* module identifier */
|
|
73
|
+
const __vue_module_identifier__ = undefined;
|
|
74
|
+
/* functional template */
|
|
75
|
+
const __vue_is_functional_template__ = false;
|
|
76
|
+
/* style inject */
|
|
77
|
+
|
|
78
|
+
/* style inject SSR */
|
|
79
|
+
|
|
80
|
+
/* style inject shadow dom */
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
85
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
86
|
+
__vue_inject_styles__,
|
|
87
|
+
__vue_script__,
|
|
88
|
+
__vue_scope_id__,
|
|
89
|
+
__vue_is_functional_template__,
|
|
90
|
+
__vue_module_identifier__,
|
|
91
|
+
false,
|
|
92
|
+
undefined,
|
|
93
|
+
undefined,
|
|
94
|
+
undefined
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
export { __vue_component__ as default };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import GlToken from '../token/token';
|
|
2
|
+
import GlButton from '../button/button';
|
|
3
|
+
import { tokensValidator } from './helpers';
|
|
4
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
|
+
|
|
6
|
+
var script = {
|
|
7
|
+
name: 'GlTokenContainer',
|
|
8
|
+
components: {
|
|
9
|
+
GlToken,
|
|
10
|
+
GlButton
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
tokens: {
|
|
14
|
+
type: Array,
|
|
15
|
+
// All tokens need to have an `id` key
|
|
16
|
+
validator: tokensValidator,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
registerFocusOnToken: {
|
|
20
|
+
type: Function,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
viewOnly: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: false,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
showClearAllButton: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
required: false,
|
|
31
|
+
default: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
bindFocusEvent: true,
|
|
37
|
+
focusedTokenIndex: null
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
focusedToken() {
|
|
42
|
+
return this.tokens[this.focusedTokenIndex] || null;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
focusedToken(newValue) {
|
|
47
|
+
var _this$$refs$tokens;
|
|
48
|
+
if (newValue === null) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const tokenRef = (_this$$refs$tokens = this.$refs.tokens) === null || _this$$refs$tokens === void 0 ? void 0 : _this$$refs$tokens.find(ref => ref.dataset.tokenId === newValue.id.toString());
|
|
52
|
+
if (tokenRef) {
|
|
53
|
+
// Prevent `handleTokenFocus` from being called when we manually focus on a token
|
|
54
|
+
this.bindFocusEvent = false;
|
|
55
|
+
tokenRef.focus();
|
|
56
|
+
this.bindFocusEvent = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
created() {
|
|
61
|
+
this.registerFocusOnToken(this.focusOnToken);
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
handleClose(token) {
|
|
65
|
+
this.$emit('token-remove', token);
|
|
66
|
+
this.focusedTokenIndex = null;
|
|
67
|
+
},
|
|
68
|
+
handleLeftArrow() {
|
|
69
|
+
if (this.focusedTokenIndex === 0) {
|
|
70
|
+
this.focusLastToken();
|
|
71
|
+
} else {
|
|
72
|
+
this.focusPrevToken();
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
handleRightArrow() {
|
|
76
|
+
if (this.focusedTokenIndex === this.tokens.length - 1) {
|
|
77
|
+
this.focusFirstToken();
|
|
78
|
+
} else {
|
|
79
|
+
this.focusNextToken();
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
handleHome() {
|
|
83
|
+
this.focusFirstToken();
|
|
84
|
+
},
|
|
85
|
+
handleEnd() {
|
|
86
|
+
this.focusLastToken();
|
|
87
|
+
},
|
|
88
|
+
handleDelete() {
|
|
89
|
+
this.$emit('token-remove', this.focusedToken);
|
|
90
|
+
if (this.focusedTokenIndex > 0) {
|
|
91
|
+
this.focusPrevToken();
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
handleEscape() {
|
|
95
|
+
this.focusedTokenIndex = null;
|
|
96
|
+
this.$emit('cancel-focus');
|
|
97
|
+
},
|
|
98
|
+
handleTab() {
|
|
99
|
+
this.$emit('cancel-focus');
|
|
100
|
+
},
|
|
101
|
+
// Only called when a token is focused by a click/tap
|
|
102
|
+
handleTokenFocus(index) {
|
|
103
|
+
this.focusedTokenIndex = index;
|
|
104
|
+
},
|
|
105
|
+
focusLastToken() {
|
|
106
|
+
this.focusedTokenIndex = this.tokens.length - 1;
|
|
107
|
+
},
|
|
108
|
+
focusFirstToken() {
|
|
109
|
+
this.focusedTokenIndex = 0;
|
|
110
|
+
},
|
|
111
|
+
focusNextToken() {
|
|
112
|
+
this.focusedTokenIndex += 1;
|
|
113
|
+
},
|
|
114
|
+
focusPrevToken() {
|
|
115
|
+
this.focusedTokenIndex -= 1;
|
|
116
|
+
},
|
|
117
|
+
focusOnToken() {
|
|
118
|
+
let tokenIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
119
|
+
this.focusedTokenIndex = tokenIndex;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/* script */
|
|
125
|
+
const __vue_script__ = script;
|
|
126
|
+
|
|
127
|
+
/* template */
|
|
128
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-flex gl-w-full gl-flex-nowrap gl-items-start"},[_c('div',{staticClass:"gl-flex gl-grow gl-flex-wrap gl-items-start"},[_c('div',{ref:"tokenContainer",staticClass:"-gl-mx-1 -gl-my-1 gl-flex gl-w-auto gl-list-none gl-flex-wrap gl-items-center gl-p-0",on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){ return null; }if('button' in $event && $event.button !== 0){ return null; }return _vm.handleLeftArrow.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"right",39,$event.key,["Right","ArrowRight"])){ return null; }if('button' in $event && $event.button !== 2){ return null; }return _vm.handleRightArrow.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"home",undefined,$event.key,undefined)){ return null; }return _vm.handleHome.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"end",undefined,$event.key,undefined)){ return null; }return _vm.handleEnd.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){ return null; }return _vm.handleDelete.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }return _vm.handleEscape.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();return _vm.handleTab.apply(null, arguments)}]}},_vm._l((_vm.tokens),function(token,index){return _c('div',{key:token.id,ref:"tokens",refInFor:true,staticClass:"gl-token-selector-token-container gl-px-1 gl-py-2 gl-outline-none",attrs:{"data-token-id":token.id,"data-testid":"gl-token-selector-tokens","tabindex":"-1"},on:{"focus":function($event){_vm.bindFocusEvent ? _vm.handleTokenFocus(index) : null;}}},[_c('gl-token',{staticClass:"gl-cursor-default",class:token.class,style:(token.style),attrs:{"view-only":_vm.viewOnly},on:{"close":function($event){return _vm.handleClose(token)}}},[_vm._t("token-content",function(){return [_c('span',[_vm._v("\n "+_vm._s(token.name)+"\n ")])]},{"token":token})],2)],1)}),0),_vm._v(" "),_vm._t("text-input")],2),_vm._v(" "),(_vm.showClearAllButton)?_c('div',{staticClass:"gl-ml-3 gl-p-1"},[_c('gl-button',{attrs:{"size":"small","aria-label":"Clear all","icon":"clear","category":"tertiary","data-testid":"clear-all-button"},on:{"click":function($event){$event.stopPropagation();return _vm.$emit('clear-all')}}})],1):_vm._e()])};
|
|
129
|
+
var __vue_staticRenderFns__ = [];
|
|
130
|
+
|
|
131
|
+
/* style */
|
|
132
|
+
const __vue_inject_styles__ = undefined;
|
|
133
|
+
/* scoped */
|
|
134
|
+
const __vue_scope_id__ = undefined;
|
|
135
|
+
/* module identifier */
|
|
136
|
+
const __vue_module_identifier__ = undefined;
|
|
137
|
+
/* functional template */
|
|
138
|
+
const __vue_is_functional_template__ = false;
|
|
139
|
+
/* style inject */
|
|
140
|
+
|
|
141
|
+
/* style inject SSR */
|
|
142
|
+
|
|
143
|
+
/* style inject shadow dom */
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
148
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
149
|
+
__vue_inject_styles__,
|
|
150
|
+
__vue_script__,
|
|
151
|
+
__vue_scope_id__,
|
|
152
|
+
__vue_is_functional_template__,
|
|
153
|
+
__vue_module_identifier__,
|
|
154
|
+
false,
|
|
155
|
+
undefined,
|
|
156
|
+
undefined,
|
|
157
|
+
undefined
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
export { __vue_component__ as default };
|