@gitlab/ui 88.6.0 → 89.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.css.map +1 -1
  4. package/dist/index.js +0 -2
  5. package/dist/vendor/bootstrap-vue/src/components/index.js +0 -2
  6. package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +1 -1
  7. package/dist/vendor/bootstrap-vue/src/constants/components.js +1 -3
  8. package/dist/vendor/bootstrap-vue/src/index.js +0 -3
  9. package/package.json +1 -1
  10. package/src/index.js +0 -2
  11. package/src/scss/bootstrap.scss +0 -1
  12. package/src/scss/components.scss +0 -1
  13. package/src/vendor/bootstrap-vue/nuxt/index.js +0 -1
  14. package/src/vendor/bootstrap-vue/package.json +0 -1
  15. package/src/vendor/bootstrap-vue/src/components/index.d.ts +0 -1
  16. package/src/vendor/bootstrap-vue/src/components/index.js +0 -2
  17. package/src/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +1 -1
  18. package/src/vendor/bootstrap-vue/src/constants/components.js +0 -2
  19. package/src/vendor/bootstrap-vue/src/index.js +0 -5
  20. package/dist/components/base/carousel/carousel.js +0 -48
  21. package/dist/components/base/carousel/carousel_slide.js +0 -47
  22. package/dist/vendor/bootstrap-vue/src/components/carousel/carousel-slide.js +0 -123
  23. package/dist/vendor/bootstrap-vue/src/components/carousel/carousel.js +0 -617
  24. package/dist/vendor/bootstrap-vue/src/components/carousel/index.js +0 -14
  25. package/src/components/base/carousel/carousel.md +0 -3
  26. package/src/components/base/carousel/carousel.scss +0 -29
  27. package/src/components/base/carousel/carousel.vue +0 -19
  28. package/src/components/base/carousel/carousel_slide.vue +0 -18
  29. package/src/vendor/bootstrap-vue/src/components/carousel/README.md +0 -320
  30. package/src/vendor/bootstrap-vue/src/components/carousel/carousel-slide.js +0 -132
  31. package/src/vendor/bootstrap-vue/src/components/carousel/carousel-slide.spec.js +0 -276
  32. package/src/vendor/bootstrap-vue/src/components/carousel/carousel.js +0 -655
  33. package/src/vendor/bootstrap-vue/src/components/carousel/carousel.spec.js +0 -1069
  34. package/src/vendor/bootstrap-vue/src/components/carousel/index.d.ts +0 -20
  35. package/src/vendor/bootstrap-vue/src/components/carousel/index.js +0 -12
  36. package/src/vendor/bootstrap-vue/src/components/carousel/package.json +0 -185
package/dist/index.js CHANGED
@@ -87,8 +87,6 @@ export { default as GlBroadcastMessage } from './components/base/broadcast_messa
87
87
  export { default as GlCollapse } from './components/base/collapse/collapse';
88
88
  export { default as GlAccordion } from './components/base/accordion/accordion';
89
89
  export { default as GlAccordionItem } from './components/base/accordion/accordion_item';
90
- export { default as GlCarousel } from './components/base/carousel/carousel';
91
- export { default as GlCarouselSlide } from './components/base/carousel/carousel_slide';
92
90
  export { default as GlExperimentBadge } from './components/experimental/experiment_badge/experiment_badge';
93
91
  export { default as GlDuoUserFeedback } from './components/experimental/duo/user_feedback/user_feedback';
94
92
  export { default as GlDuoChat } from './components/experimental/duo/chat/duo_chat';
@@ -9,7 +9,6 @@ import { ButtonGroupPlugin } from './button-group';
9
9
  import { ButtonToolbarPlugin } from './button-toolbar';
10
10
  import { CalendarPlugin } from './calendar';
11
11
  import { CardPlugin } from './card';
12
- import { CarouselPlugin } from './carousel';
13
12
  import { CollapsePlugin } from './collapse';
14
13
  import { DropdownPlugin } from './dropdown';
15
14
  import { EmbedPlugin } from './embed';
@@ -63,7 +62,6 @@ const componentsPlugin = /*#__PURE__*/pluginFactory({
63
62
  ButtonToolbarPlugin,
64
63
  CalendarPlugin,
65
64
  CardPlugin,
66
- CarouselPlugin,
67
65
  CollapsePlugin,
68
66
  DropdownPlugin,
69
67
  EmbedPlugin,
@@ -697,7 +697,7 @@ const BVTooltip = /*#__PURE__*/extend({
697
697
  // Dropdown open events (if we are attached to a dropdown)
698
698
  this.setDropdownListener(on);
699
699
  // Periodic $element visibility check
700
- // For handling when tip target is in <keepalive>, tabs, carousel, etc
700
+ // For handling when tip target is in <keepalive>, tabs, etc
701
701
  this.visibleCheck(on);
702
702
  // On-touch start listeners
703
703
  this.setOnTouchStartListener(on);
@@ -22,8 +22,6 @@ const NAME_CARD_IMG_LAZY = 'BCardImgLazy';
22
22
  const NAME_CARD_SUB_TITLE = 'BCardSubTitle';
23
23
  const NAME_CARD_TEXT = 'BCardText';
24
24
  const NAME_CARD_TITLE = 'BCardTitle';
25
- const NAME_CAROUSEL = 'BCarousel';
26
- const NAME_CAROUSEL_SLIDE = 'BCarouselSlide';
27
25
  const NAME_COL = 'BCol';
28
26
  const NAME_COLLAPSE = 'BCollapse';
29
27
  const NAME_CONTAINER = 'BContainer';
@@ -132,4 +130,4 @@ const NAME_TRANSITION = 'BVTransition';
132
130
  const NAME_TRANSPORTER = 'BVTransporter';
133
131
  const NAME_TRANSPORTER_TARGET = 'BVTransporterTarget';
134
132
 
135
- export { NAME_ALERT, NAME_ASPECT, NAME_AVATAR, NAME_AVATAR_GROUP, NAME_BADGE, NAME_BREADCRUMB, NAME_BREADCRUMB_ITEM, NAME_BREADCRUMB_LINK, NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_BUTTON_GROUP, NAME_BUTTON_TOOLBAR, NAME_CALENDAR, NAME_CARD, NAME_CARD_BODY, NAME_CARD_FOOTER, NAME_CARD_GROUP, NAME_CARD_HEADER, NAME_CARD_IMG, NAME_CARD_IMG_LAZY, NAME_CARD_SUB_TITLE, NAME_CARD_TEXT, NAME_CARD_TITLE, NAME_CAROUSEL, NAME_CAROUSEL_SLIDE, NAME_COL, NAME_COLLAPSE, NAME_COLLAPSE_HELPER, NAME_CONTAINER, NAME_DROPDOWN, NAME_DROPDOWN_DIVIDER, NAME_DROPDOWN_FORM, NAME_DROPDOWN_GROUP, NAME_DROPDOWN_HEADER, NAME_DROPDOWN_ITEM, NAME_DROPDOWN_ITEM_BUTTON, NAME_DROPDOWN_TEXT, NAME_EMBED, NAME_FORM, NAME_FORM_BUTTON_LABEL_CONTROL, NAME_FORM_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_DATALIST, NAME_FORM_DATEPICKER, NAME_FORM_FILE, NAME_FORM_GROUP, NAME_FORM_INPUT, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, NAME_FORM_RATING, NAME_FORM_RATING_STAR, NAME_FORM_ROW, NAME_FORM_SELECT, NAME_FORM_SELECT_OPTION, NAME_FORM_SELECT_OPTION_GROUP, NAME_FORM_SPINBUTTON, NAME_FORM_TAG, NAME_FORM_TAGS, NAME_FORM_TEXT, NAME_FORM_TEXTAREA, NAME_FORM_TIMEPICKER, NAME_FORM_VALID_FEEDBACK, NAME_ICON, NAME_ICONSTACK, NAME_ICON_BASE, NAME_IMG, NAME_IMG_LAZY, NAME_INPUT_GROUP, NAME_INPUT_GROUP_ADDON, NAME_INPUT_GROUP_APPEND, NAME_INPUT_GROUP_PREPEND, NAME_INPUT_GROUP_TEXT, NAME_JUMBOTRON, NAME_LINK, NAME_LIST_GROUP, NAME_LIST_GROUP_ITEM, NAME_MEDIA, NAME_MEDIA_ASIDE, NAME_MEDIA_BODY, NAME_MODAL, NAME_MSG_BOX, NAME_NAV, NAME_NAVBAR, NAME_NAVBAR_BRAND, NAME_NAVBAR_NAV, NAME_NAVBAR_TOGGLE, NAME_NAV_FORM, NAME_NAV_ITEM, NAME_NAV_ITEM_DROPDOWN, NAME_NAV_TEXT, NAME_OVERLAY, NAME_PAGINATION, NAME_PAGINATION_NAV, NAME_POPOVER, NAME_POPOVER_HELPER, NAME_POPOVER_TEMPLATE, NAME_POPPER, NAME_PROGRESS, NAME_PROGRESS_BAR, NAME_ROW, NAME_SIDEBAR, NAME_SKELETON, NAME_SKELETON_ICON, NAME_SKELETON_IMG, NAME_SKELETON_TABLE, NAME_SKELETON_WRAPPER, NAME_SPINNER, NAME_TAB, NAME_TABLE, NAME_TABLE_CELL, NAME_TABLE_LITE, NAME_TABLE_SIMPLE, NAME_TABS, NAME_TAB_BUTTON_HELPER, NAME_TBODY, NAME_TFOOT, NAME_TH, NAME_THEAD, NAME_TIME, NAME_TOAST, NAME_TOASTER, NAME_TOAST_POP, NAME_TOOLTIP, NAME_TOOLTIP_HELPER, NAME_TOOLTIP_TEMPLATE, NAME_TR, NAME_TRANSITION, NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET };
133
+ export { NAME_ALERT, NAME_ASPECT, NAME_AVATAR, NAME_AVATAR_GROUP, NAME_BADGE, NAME_BREADCRUMB, NAME_BREADCRUMB_ITEM, NAME_BREADCRUMB_LINK, NAME_BUTTON, NAME_BUTTON_CLOSE, NAME_BUTTON_GROUP, NAME_BUTTON_TOOLBAR, NAME_CALENDAR, NAME_CARD, NAME_CARD_BODY, NAME_CARD_FOOTER, NAME_CARD_GROUP, NAME_CARD_HEADER, NAME_CARD_IMG, NAME_CARD_IMG_LAZY, NAME_CARD_SUB_TITLE, NAME_CARD_TEXT, NAME_CARD_TITLE, NAME_COL, NAME_COLLAPSE, NAME_COLLAPSE_HELPER, NAME_CONTAINER, NAME_DROPDOWN, NAME_DROPDOWN_DIVIDER, NAME_DROPDOWN_FORM, NAME_DROPDOWN_GROUP, NAME_DROPDOWN_HEADER, NAME_DROPDOWN_ITEM, NAME_DROPDOWN_ITEM_BUTTON, NAME_DROPDOWN_TEXT, NAME_EMBED, NAME_FORM, NAME_FORM_BUTTON_LABEL_CONTROL, NAME_FORM_CHECKBOX, NAME_FORM_CHECKBOX_GROUP, NAME_FORM_DATALIST, NAME_FORM_DATEPICKER, NAME_FORM_FILE, NAME_FORM_GROUP, NAME_FORM_INPUT, NAME_FORM_INVALID_FEEDBACK, NAME_FORM_RADIO, NAME_FORM_RADIO_GROUP, NAME_FORM_RATING, NAME_FORM_RATING_STAR, NAME_FORM_ROW, NAME_FORM_SELECT, NAME_FORM_SELECT_OPTION, NAME_FORM_SELECT_OPTION_GROUP, NAME_FORM_SPINBUTTON, NAME_FORM_TAG, NAME_FORM_TAGS, NAME_FORM_TEXT, NAME_FORM_TEXTAREA, NAME_FORM_TIMEPICKER, NAME_FORM_VALID_FEEDBACK, NAME_ICON, NAME_ICONSTACK, NAME_ICON_BASE, NAME_IMG, NAME_IMG_LAZY, NAME_INPUT_GROUP, NAME_INPUT_GROUP_ADDON, NAME_INPUT_GROUP_APPEND, NAME_INPUT_GROUP_PREPEND, NAME_INPUT_GROUP_TEXT, NAME_JUMBOTRON, NAME_LINK, NAME_LIST_GROUP, NAME_LIST_GROUP_ITEM, NAME_MEDIA, NAME_MEDIA_ASIDE, NAME_MEDIA_BODY, NAME_MODAL, NAME_MSG_BOX, NAME_NAV, NAME_NAVBAR, NAME_NAVBAR_BRAND, NAME_NAVBAR_NAV, NAME_NAVBAR_TOGGLE, NAME_NAV_FORM, NAME_NAV_ITEM, NAME_NAV_ITEM_DROPDOWN, NAME_NAV_TEXT, NAME_OVERLAY, NAME_PAGINATION, NAME_PAGINATION_NAV, NAME_POPOVER, NAME_POPOVER_HELPER, NAME_POPOVER_TEMPLATE, NAME_POPPER, NAME_PROGRESS, NAME_PROGRESS_BAR, NAME_ROW, NAME_SIDEBAR, NAME_SKELETON, NAME_SKELETON_ICON, NAME_SKELETON_IMG, NAME_SKELETON_TABLE, NAME_SKELETON_WRAPPER, NAME_SPINNER, NAME_TAB, NAME_TABLE, NAME_TABLE_CELL, NAME_TABLE_LITE, NAME_TABLE_SIMPLE, NAME_TABS, NAME_TAB_BUTTON_HELPER, NAME_TBODY, NAME_TFOOT, NAME_TH, NAME_THEAD, NAME_TIME, NAME_TOAST, NAME_TOASTER, NAME_TOAST_POP, NAME_TOOLTIP, NAME_TOOLTIP_HELPER, NAME_TOOLTIP_TEMPLATE, NAME_TR, NAME_TRANSITION, NAME_TRANSPORTER, NAME_TRANSPORTER_TARGET };
@@ -40,9 +40,6 @@ export { BCardImgLazy } from './components/card/card-img-lazy';
40
40
  export { BCardSubTitle } from './components/card/card-sub-title';
41
41
  export { BCardText } from './components/card/card-text';
42
42
  export { BCardTitle } from './components/card/card-title';
43
- export { CarouselPlugin } from './components/carousel';
44
- export { BCarousel } from './components/carousel/carousel';
45
- export { BCarouselSlide } from './components/carousel/carousel-slide';
46
43
  export { CollapsePlugin } from './components/collapse';
47
44
  export { BCollapse } from './components/collapse/collapse';
48
45
  export { DropdownPlugin } from './components/dropdown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "88.6.0",
3
+ "version": "89.0.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
package/src/index.js CHANGED
@@ -96,8 +96,6 @@ export { default as GlBroadcastMessage } from './components/base/broadcast_messa
96
96
  export { default as GlCollapse } from './components/base/collapse/collapse.vue';
97
97
  export { default as GlAccordion } from './components/base/accordion/accordion.vue';
98
98
  export { default as GlAccordionItem } from './components/base/accordion/accordion_item.vue';
99
- export { default as GlCarousel } from './components/base/carousel/carousel.vue';
100
- export { default as GlCarouselSlide } from './components/base/carousel/carousel_slide.vue';
101
99
 
102
100
  // Experimental
103
101
  export { default as GlExperimentBadge } from './components/experimental/experiment_badge/experiment_badge.vue';
@@ -30,6 +30,5 @@
30
30
  @import 'bootstrap/scss/modal';
31
31
  @import 'bootstrap/scss/tooltip';
32
32
  @import 'bootstrap/scss/popover';
33
- @import 'bootstrap/scss/carousel';
34
33
  @import 'bootstrap/scss/utilities';
35
34
  @import 'bootstrap/scss/print';
@@ -23,7 +23,6 @@
23
23
  @import '../components/base/breadcrumb/breadcrumb';
24
24
  @import '../components/base/banner/banner';
25
25
  @import '../components/base/broadcast_message/broadcast_message';
26
- @import '../components/base/carousel/carousel';
27
26
  @import '../components/base/datepicker/datepicker';
28
27
  @import '../components/base/daterange_picker/daterange_picker';
29
28
  @import '../components/base/drawer/drawer';
@@ -79,7 +79,6 @@ module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
79
79
  'b-card': 'img-src',
80
80
  'b-card-img': 'src',
81
81
  'b-card-img-lazy': ['src', 'blank-src'],
82
- 'b-carousel-slide': 'img-src',
83
82
  'b-embed': 'src',
84
83
  // Ensure super supplied values/overrides are not lost
85
84
  ...this.options.build.loaders.vue.transformAssetUrls
@@ -167,7 +167,6 @@
167
167
  "Button",
168
168
  "Calendar",
169
169
  "Card",
170
- "Carousel",
171
170
  "Checkbox",
172
171
  "Collapse",
173
172
  "Collapse",
@@ -14,7 +14,6 @@ export * from './button-group'
14
14
  export * from './button-toolbar'
15
15
  export * from './calendar'
16
16
  export * from './card'
17
- export * from './carousel'
18
17
  export * from './collapse'
19
18
  export * from './dropdown'
20
19
  export * from './embed'
@@ -11,7 +11,6 @@ import { ButtonGroupPlugin } from './button-group'
11
11
  import { ButtonToolbarPlugin } from './button-toolbar'
12
12
  import { CalendarPlugin } from './calendar'
13
13
  import { CardPlugin } from './card'
14
- import { CarouselPlugin } from './carousel'
15
14
  import { CollapsePlugin } from './collapse'
16
15
  import { DropdownPlugin } from './dropdown'
17
16
  import { EmbedPlugin } from './embed'
@@ -66,7 +65,6 @@ export const componentsPlugin = /*#__PURE__*/ pluginFactory({
66
65
  ButtonToolbarPlugin,
67
66
  CalendarPlugin,
68
67
  CardPlugin,
69
- CarouselPlugin,
70
68
  CollapsePlugin,
71
69
  DropdownPlugin,
72
70
  EmbedPlugin,
@@ -746,7 +746,7 @@ export const BVTooltip = /*#__PURE__*/ extend({
746
746
  // Dropdown open events (if we are attached to a dropdown)
747
747
  this.setDropdownListener(on)
748
748
  // Periodic $element visibility check
749
- // For handling when tip target is in <keepalive>, tabs, carousel, etc
749
+ // For handling when tip target is in <keepalive>, tabs, etc
750
750
  this.visibleCheck(on)
751
751
  // On-touch start listeners
752
752
  this.setOnTouchStartListener(on)
@@ -22,8 +22,6 @@ export const NAME_CARD_IMG_LAZY = 'BCardImgLazy'
22
22
  export const NAME_CARD_SUB_TITLE = 'BCardSubTitle'
23
23
  export const NAME_CARD_TEXT = 'BCardText'
24
24
  export const NAME_CARD_TITLE = 'BCardTitle'
25
- export const NAME_CAROUSEL = 'BCarousel'
26
- export const NAME_CAROUSEL_SLIDE = 'BCarouselSlide'
27
25
  export const NAME_COL = 'BCol'
28
26
  export const NAME_COLLAPSE = 'BCollapse'
29
27
  export const NAME_CONTAINER = 'BContainer'
@@ -115,11 +115,6 @@ export { BCardSubTitle } from './components/card/card-sub-title'
115
115
  export { BCardText } from './components/card/card-text'
116
116
  export { BCardTitle } from './components/card/card-title'
117
117
 
118
- // export * from './components/carousel'
119
- export { CarouselPlugin } from './components/carousel'
120
- export { BCarousel } from './components/carousel/carousel'
121
- export { BCarouselSlide } from './components/carousel/carousel-slide'
122
-
123
118
  // export * from './components/collapse'
124
119
  export { CollapsePlugin } from './components/collapse'
125
120
  export { BCollapse } from './components/collapse/collapse'
@@ -1,48 +0,0 @@
1
- import { BCarousel } from '../../../vendor/bootstrap-vue/src/components/carousel/carousel';
2
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
-
4
- //
5
- var script = {
6
- name: 'GlCarousel',
7
- components: {
8
- BCarousel
9
- }
10
- };
11
-
12
- /* script */
13
- const __vue_script__ = script;
14
-
15
- /* template */
16
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-carousel',_vm._g(_vm._b({scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$slots)),function(slot){return {key:slot,fn:function(){return [_vm._t(slot)]},proxy:true}})],null,true)},'b-carousel',_vm.$attrs,false),_vm.$listeners))};
17
- var __vue_staticRenderFns__ = [];
18
-
19
- /* style */
20
- const __vue_inject_styles__ = undefined;
21
- /* scoped */
22
- const __vue_scope_id__ = undefined;
23
- /* module identifier */
24
- const __vue_module_identifier__ = undefined;
25
- /* functional template */
26
- const __vue_is_functional_template__ = false;
27
- /* style inject */
28
-
29
- /* style inject SSR */
30
-
31
- /* style inject shadow dom */
32
-
33
-
34
-
35
- const __vue_component__ = __vue_normalize__(
36
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
37
- __vue_inject_styles__,
38
- __vue_script__,
39
- __vue_scope_id__,
40
- __vue_is_functional_template__,
41
- __vue_module_identifier__,
42
- false,
43
- undefined,
44
- undefined,
45
- undefined
46
- );
47
-
48
- export default __vue_component__;
@@ -1,47 +0,0 @@
1
- import { BCarouselSlide } from '../../../vendor/bootstrap-vue/src/components/carousel/carousel-slide';
2
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
3
-
4
- var script = {
5
- name: 'GlCarouselSlide',
6
- components: {
7
- BCarouselSlide
8
- }
9
- };
10
-
11
- /* script */
12
- const __vue_script__ = script;
13
-
14
- /* template */
15
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-carousel-slide',_vm._g(_vm._b({scopedSlots:_vm._u([_vm._l((Object.keys(_vm.$slots)),function(slot){return {key:slot,fn:function(){return [_vm._t(slot)]},proxy:true}})],null,true)},'b-carousel-slide',_vm.$attrs,false),_vm.$listeners))};
16
- var __vue_staticRenderFns__ = [];
17
-
18
- /* style */
19
- const __vue_inject_styles__ = undefined;
20
- /* scoped */
21
- const __vue_scope_id__ = undefined;
22
- /* module identifier */
23
- const __vue_module_identifier__ = undefined;
24
- /* functional template */
25
- const __vue_is_functional_template__ = false;
26
- /* style inject */
27
-
28
- /* style inject SSR */
29
-
30
- /* style inject shadow dom */
31
-
32
-
33
-
34
- const __vue_component__ = __vue_normalize__(
35
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
36
- __vue_inject_styles__,
37
- __vue_script__,
38
- __vue_scope_id__,
39
- __vue_is_functional_template__,
40
- __vue_module_identifier__,
41
- false,
42
- undefined,
43
- undefined,
44
- undefined
45
- );
46
-
47
- export default __vue_component__;
@@ -1,123 +0,0 @@
1
- import { extend } from '../../vue';
2
- import { NAME_CAROUSEL_SLIDE } from '../../constants/components';
3
- import { HAS_TOUCH_SUPPORT } from '../../constants/env';
4
- import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING } from '../../constants/props';
5
- import { SLOT_NAME_IMG } from '../../constants/slots';
6
- import { stopEvent } from '../../utils/events';
7
- import { htmlOrText } from '../../utils/html';
8
- import { identity } from '../../utils/identity';
9
- import { sortKeys } from '../../utils/object';
10
- import { makeProp, makePropsConfigurable, pluckProps, unprefixPropName } from '../../utils/props';
11
- import { props as props$1, idMixin } from '../../mixins/id';
12
- import { normalizeSlotMixin } from '../../mixins/normalize-slot';
13
- import { BImg } from '../image/img';
14
-
15
- // --- Props ---
16
-
17
- const imgProps = {
18
- imgAlt: makeProp(PROP_TYPE_STRING),
19
- imgBlank: makeProp(PROP_TYPE_BOOLEAN, false),
20
- imgBlankColor: makeProp(PROP_TYPE_STRING, 'transparent'),
21
- imgHeight: makeProp(PROP_TYPE_NUMBER_STRING),
22
- imgSrc: makeProp(PROP_TYPE_STRING),
23
- imgWidth: makeProp(PROP_TYPE_NUMBER_STRING)
24
- };
25
- const props = makePropsConfigurable(sortKeys({
26
- ...props$1,
27
- ...imgProps,
28
- background: makeProp(PROP_TYPE_STRING),
29
- caption: makeProp(PROP_TYPE_STRING),
30
- captionHtml: makeProp(PROP_TYPE_STRING),
31
- captionTag: makeProp(PROP_TYPE_STRING, 'h3'),
32
- contentTag: makeProp(PROP_TYPE_STRING, 'div'),
33
- contentVisibleUp: makeProp(PROP_TYPE_STRING),
34
- text: makeProp(PROP_TYPE_STRING),
35
- textHtml: makeProp(PROP_TYPE_STRING),
36
- textTag: makeProp(PROP_TYPE_STRING, 'p')
37
- }), NAME_CAROUSEL_SLIDE);
38
-
39
- // --- Main component ---
40
-
41
- // @vue/component
42
- const BCarouselSlide = /*#__PURE__*/extend({
43
- name: NAME_CAROUSEL_SLIDE,
44
- mixins: [idMixin, normalizeSlotMixin],
45
- inject: {
46
- getBvCarousel: {
47
- // Explicitly disable touch if not a child of carousel
48
- default: () => () => ({
49
- noTouch: true
50
- })
51
- }
52
- },
53
- props,
54
- computed: {
55
- bvCarousel() {
56
- return this.getBvCarousel();
57
- },
58
- contentClasses() {
59
- return [this.contentVisibleUp ? 'd-none' : '', this.contentVisibleUp ? `d-${this.contentVisibleUp}-block` : ''];
60
- },
61
- computedWidth() {
62
- // Use local width, or try parent width
63
- return this.imgWidth || this.bvCarousel.imgWidth || null;
64
- },
65
- computedHeight() {
66
- // Use local height, or try parent height
67
- return this.imgHeight || this.bvCarousel.imgHeight || null;
68
- }
69
- },
70
- render(h) {
71
- let $img = this.normalizeSlot(SLOT_NAME_IMG);
72
- if (!$img && (this.imgSrc || this.imgBlank)) {
73
- const on = {};
74
- // Touch support event handler
75
- /* istanbul ignore if: difficult to test in JSDOM */
76
- if (!this.bvCarousel.noTouch && HAS_TOUCH_SUPPORT) {
77
- on.dragstart = event => stopEvent(event, {
78
- propagation: false
79
- });
80
- }
81
- $img = h(BImg, {
82
- props: {
83
- ...pluckProps(imgProps, this.$props, unprefixPropName.bind(null, 'img')),
84
- width: this.computedWidth,
85
- height: this.computedHeight,
86
- fluidGrow: true,
87
- block: true
88
- },
89
- on
90
- });
91
- }
92
- const $contentChildren = [
93
- // Caption
94
- this.caption || this.captionHtml ? h(this.captionTag, {
95
- domProps: htmlOrText(this.captionHtml, this.caption)
96
- }) : false,
97
- // Text
98
- this.text || this.textHtml ? h(this.textTag, {
99
- domProps: htmlOrText(this.textHtml, this.text)
100
- }) : false,
101
- // Children
102
- this.normalizeSlot() || false];
103
- let $content = h();
104
- if ($contentChildren.some(identity)) {
105
- $content = h(this.contentTag, {
106
- staticClass: 'carousel-caption',
107
- class: this.contentClasses
108
- }, $contentChildren.map($child => $child || h()));
109
- }
110
- return h('div', {
111
- staticClass: 'carousel-item',
112
- style: {
113
- background: this.background || this.bvCarousel.background || null
114
- },
115
- attrs: {
116
- id: this.safeId(),
117
- role: 'listitem'
118
- }
119
- }, [$img, $content]);
120
- }
121
- });
122
-
123
- export { BCarouselSlide, props };