igniteui-webcomponents 7.3.0-beta.0 → 7.3.0-beta.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 +20 -0
- package/animations/player.d.ts +7 -2
- package/animations/player.js +1 -2
- package/animations/player.js.map +1 -1
- package/components/accordion/accordion.js +4 -16
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.d.ts +0 -1
- package/components/avatar/avatar.js +5 -9
- package/components/avatar/avatar.js.map +1 -1
- package/components/badge/badge.d.ts +1 -3
- package/components/badge/badge.js +4 -8
- package/components/badge/badge.js.map +1 -1
- package/components/banner/banner.d.ts +6 -5
- package/components/banner/banner.js +19 -17
- package/components/banner/banner.js.map +1 -1
- package/components/button/button-base.d.ts +1 -1
- package/components/button/button-base.js.map +1 -1
- package/components/button-group/button-group.d.ts +0 -1
- package/components/button-group/button-group.js +12 -17
- package/components/button-group/button-group.js.map +1 -1
- package/components/calendar/base.d.ts +3 -13
- package/components/calendar/base.js +10 -31
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +2 -2
- package/components/calendar/months-view/months-view.d.ts +1 -1
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/carousel/carousel-indicator.d.ts +1 -1
- package/components/carousel/carousel-indicator.js +13 -13
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.d.ts +0 -2
- package/components/carousel/carousel-slide.js +7 -9
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.d.ts +52 -35
- package/components/carousel/carousel.js +136 -122
- package/components/carousel/carousel.js.map +1 -1
- package/components/carousel/themes/carousel.base.css.js +1 -1
- package/components/carousel/themes/carousel.base.css.js.map +1 -1
- package/components/chat/chat-input.d.ts +1 -1
- package/components/chat/chat-input.js +21 -21
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat.d.ts +0 -2
- package/components/chat/chat.js +6 -12
- package/components/chat/chat.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +1 -1
- package/components/checkbox/checkbox.d.ts +3 -5
- package/components/checkbox/checkbox.js +33 -44
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.d.ts +1 -1
- package/components/checkbox/switch.js +23 -34
- package/components/checkbox/switch.js.map +1 -1
- package/components/chip/chip.d.ts +1 -14
- package/components/chip/chip.js +12 -33
- package/components/chip/chip.js.map +1 -1
- package/components/combo/combo-item.d.ts +1 -3
- package/components/combo/combo-item.js +5 -12
- package/components/combo/combo-item.js.map +1 -1
- package/components/combo/combo.d.ts +7 -20
- package/components/combo/combo.js +59 -81
- package/components/combo/combo.js.map +1 -1
- package/components/date-picker/date-picker.base.d.ts +12 -9
- package/components/date-picker/date-picker.base.js +24 -31
- package/components/date-picker/date-picker.base.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +3 -5
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-input.d.ts +2 -4
- package/components/date-range-picker/date-range-input.js +6 -37
- package/components/date-range-picker/date-range-input.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +2 -5
- package/components/date-range-picker/date-range-picker.js +15 -28
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.d.ts +2 -2
- package/components/date-range-picker/predefined-ranges-area.js +4 -6
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-range-picker/validators.d.ts +1 -1
- package/components/date-range-picker/validators.js +5 -18
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-part.d.ts +2 -1
- package/components/date-time-input/date-part.js +38 -75
- package/components/date-time-input/date-part.js.map +1 -1
- package/components/date-time-input/date-time-input.base.d.ts +31 -12
- package/components/date-time-input/date-time-input.base.js +43 -11
- package/components/date-time-input/date-time-input.base.js.map +1 -1
- package/components/date-time-input/date-time-input.d.ts +1 -3
- package/components/date-time-input/date-time-input.js +7 -40
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/datetime-mask-parser.d.ts +8 -0
- package/components/date-time-input/datetime-mask-parser.js +8 -8
- package/components/date-time-input/datetime-mask-parser.js.map +1 -1
- package/components/date-time-input/validators.js +3 -14
- package/components/date-time-input/validators.js.map +1 -1
- package/components/dialog/dialog.d.ts +6 -7
- package/components/dialog/dialog.js +21 -26
- package/components/dialog/dialog.js.map +1 -1
- package/components/divider/divider.d.ts +1 -4
- package/components/divider/divider.js +8 -17
- package/components/divider/divider.js.map +1 -1
- package/components/dropdown/dropdown-group.js +1 -6
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/expansion-panel/expansion-panel.d.ts +15 -5
- package/components/expansion-panel/expansion-panel.js +23 -34
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/file-input/file-input.d.ts +2 -14
- package/components/file-input/file-input.js +5 -23
- package/components/file-input/file-input.js.map +1 -1
- package/components/highlight/highlight.d.ts +6 -8
- package/components/highlight/highlight.js +12 -20
- package/components/highlight/highlight.js.map +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/registry/types.d.ts +1 -1
- package/components/icon/registry/types.js.map +1 -1
- package/components/input/input.d.ts +9 -19
- package/components/input/input.js +30 -60
- package/components/input/input.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +1 -1
- package/components/mask-input/mask-input.js +2 -4
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +7 -7
- package/components/nav-drawer/nav-drawer.js +12 -23
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/progress/base.d.ts +4 -7
- package/components/progress/base.js +21 -45
- package/components/progress/base.js.map +1 -1
- package/components/qr-code/qr-code.d.ts +1 -1
- package/components/qr-code/qr-code.js +3 -2
- package/components/qr-code/qr-code.js.map +1 -1
- package/components/qr-code/types.d.ts +1 -1
- package/components/qr-code/types.js.map +1 -1
- package/components/radio/controller.d.ts +2 -30
- package/components/radio/controller.js +8 -94
- package/components/radio/controller.js.map +1 -1
- package/components/radio/radio.d.ts +5 -5
- package/components/radio/radio.js +48 -58
- package/components/radio/radio.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +1 -2
- package/components/radio-group/radio-group.js +2 -9
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +24 -12
- package/components/rating/rating.js +79 -73
- package/components/rating/rating.js.map +1 -1
- package/components/resize-container/default-ghost.js +4 -3
- package/components/resize-container/default-ghost.js.map +1 -1
- package/components/resize-container/resize-container.d.ts +1 -1
- package/components/resize-container/resize-container.js +5 -3
- package/components/resize-container/resize-container.js.map +1 -1
- package/components/resize-container/resize-controller.js +4 -3
- package/components/resize-container/resize-controller.js.map +1 -1
- package/components/select/select-group.d.ts +2 -1
- package/components/select/select-group.js +7 -11
- package/components/select/select-group.js.map +1 -1
- package/components/select/select.d.ts +3 -4
- package/components/select/select.js +23 -28
- package/components/select/select.js.map +1 -1
- package/components/slider/range-slider.d.ts +3 -2
- package/components/slider/range-slider.js +22 -70
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.d.ts +9 -6
- package/components/slider/slider-base.js +27 -28
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider.js +9 -5
- package/components/slider/slider.js.map +1 -1
- package/components/splitter/splitter.d.ts +1 -1
- package/components/splitter/splitter.js.map +1 -1
- package/components/stepper/step.d.ts +3 -0
- package/components/stepper/step.js +9 -5
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.d.ts +0 -11
- package/components/stepper/stepper.js +21 -86
- package/components/stepper/stepper.js.map +1 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +6 -5
- package/components/tabs/tab.js.map +1 -1
- package/components/tabs/tabs.d.ts +1 -5
- package/components/tabs/tabs.js +12 -34
- package/components/tabs/tabs.js.map +1 -1
- package/components/textarea/textarea.d.ts +6 -7
- package/components/textarea/textarea.js +3 -10
- package/components/textarea/textarea.js.map +1 -1
- package/components/theme-provider/theme-provider.d.ts +2 -4
- package/components/theme-provider/theme-provider.js +11 -21
- package/components/theme-provider/theme-provider.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +10 -21
- package/components/tile-manager/tile-manager.js +43 -74
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.d.ts +10 -18
- package/components/tile-manager/tile.js +50 -67
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tooltip/tooltip.d.ts +4 -7
- package/components/tooltip/tooltip.js +20 -28
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree.d.ts +1 -14
- package/components/tree/tree.js +5 -23
- package/components/tree/tree.js.map +1 -1
- package/components/tree/tree.navigation.d.ts +1 -1
- package/components/tree/tree.navigation.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +1 -2
- package/components/validation-container/validation-container.js.map +1 -1
- package/components/virtualization/engine.d.ts +40 -38
- package/components/virtualization/engine.js.map +1 -1
- package/components/virtualization/types.d.ts +6 -5
- package/components/virtualization/types.js.map +1 -1
- package/components/virtualization/virtualization.d.ts +94 -80
- package/components/virtualization/virtualization.js +10 -2
- package/components/virtualization/virtualization.js.map +1 -1
- package/custom-elements.json +9940 -7738
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/internals/controllers/aria-projection.d.ts +6 -6
- package/internals/controllers/aria-projection.js.map +1 -1
- package/internals/controllers/context-provider.d.ts +48 -0
- package/internals/controllers/context-provider.js +29 -0
- package/internals/controllers/context-provider.js.map +1 -0
- package/internals/controllers/drag.js +6 -6
- package/internals/controllers/drag.js.map +1 -1
- package/internals/controllers/gestures.js +3 -0
- package/internals/controllers/gestures.js.map +1 -1
- package/internals/controllers/group.d.ts +64 -0
- package/internals/controllers/group.js +104 -0
- package/internals/controllers/group.js.map +1 -0
- package/internals/controllers/internals.d.ts +16 -3
- package/internals/controllers/internals.js +10 -3
- package/internals/controllers/internals.js.map +1 -1
- package/internals/controllers/key-bindings.d.ts +6 -0
- package/internals/controllers/key-bindings.js +3 -0
- package/internals/controllers/key-bindings.js.map +1 -1
- package/internals/controllers/roving-focus.d.ts +72 -0
- package/internals/controllers/roving-focus.js +61 -0
- package/internals/controllers/roving-focus.js.map +1 -0
- package/internals/controllers/slot.d.ts +8 -0
- package/internals/controllers/slot.js +4 -0
- package/internals/controllers/slot.js.map +1 -1
- package/internals/controllers/toggle.d.ts +96 -0
- package/internals/controllers/toggle.js +65 -0
- package/internals/controllers/toggle.js.map +1 -0
- package/internals/date/converters.js +2 -5
- package/internals/date/converters.js.map +1 -1
- package/internals/date/model.d.ts +4 -0
- package/internals/date/model.js +6 -0
- package/internals/date/model.js.map +1 -1
- package/internals/decorators/coerced-property.d.ts +47 -0
- package/internals/decorators/coerced-property.js +36 -0
- package/internals/decorators/coerced-property.js.map +1 -0
- package/internals/i18n/i18n-controller.d.ts +22 -3
- package/internals/i18n/i18n-controller.js +28 -6
- package/internals/i18n/i18n-controller.js.map +1 -1
- package/internals/mixins/alert.d.ts +1 -1
- package/internals/mixins/alert.js +5 -3
- package/internals/mixins/alert.js.map +1 -1
- package/internals/mixins/combo-box.d.ts +3 -12
- package/internals/mixins/combo-box.js +6 -32
- package/internals/mixins/combo-box.js.map +1 -1
- package/internals/mixins/forms/associated.js +18 -0
- package/internals/mixins/forms/associated.js.map +1 -1
- package/internals/mixins/forms/types.d.ts +20 -1
- package/internals/mixins/forms/types.js.map +1 -1
- package/internals/mixins/i18n.d.ts +31 -0
- package/internals/mixins/i18n.js +36 -0
- package/internals/mixins/i18n.js.map +1 -0
- package/internals/mixins/mask-behavior.d.ts +6 -5
- package/internals/mixins/mask-behavior.js +1 -2
- package/internals/mixins/mask-behavior.js.map +1 -1
- package/internals/mixins/option.js +4 -2
- package/internals/mixins/option.js.map +1 -1
- package/internals/templates/masked-input.d.ts +1 -1
- package/internals/templates/masked-input.js.map +1 -1
- package/internals/templates/slotted-icon.d.ts +32 -0
- package/internals/templates/slotted-icon.js +19 -0
- package/internals/templates/slotted-icon.js.map +1 -0
- package/internals/templates/toggle-shell.d.ts +46 -0
- package/internals/templates/toggle-shell.js +38 -0
- package/internals/templates/toggle-shell.js.map +1 -0
- package/internals/timing.d.ts +32 -0
- package/internals/timing.js +20 -0
- package/internals/timing.js.map +1 -0
- package/internals/utils/arrays.d.ts +2 -2
- package/internals/utils/arrays.js.map +1 -1
- package/internals/utils/dom.d.ts +22 -0
- package/internals/utils/dom.js +15 -1
- package/internals/utils/dom.js.map +1 -1
- package/internals/utils/math.d.ts +1 -1
- package/internals/utils/math.js.map +1 -1
- package/internals/utils/types.d.ts +1 -1
- package/internals/utils/types.js.map +1 -1
- package/internals/validators.d.ts +23 -0
- package/internals/validators.js +21 -0
- package/internals/validators.js.map +1 -1
- package/package.json +1 -1
- package/theming/theming-controller.d.ts +3 -3
- package/theming/theming-controller.js.map +1 -1
- package/web-types.json +2 -2
- package/internals/decorators/watch.d.ts +0 -5
- package/internals/decorators/watch.js +0 -19
- package/internals/decorators/watch.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ICarouselResourceStrings } from 'igniteui-i18n-core';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
2
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
3
3
|
import type { Constructor } from '#internals/mixins/constructor.js';
|
|
4
4
|
import type { CarouselIndicatorsOrientation, HorizontalTransitionAnimation } from '../types.js';
|
|
5
5
|
import IgcCarouselSlideComponent from './carousel-slide.js';
|
|
@@ -8,13 +8,14 @@ export interface IgcCarouselComponentEventMap {
|
|
|
8
8
|
igcPlaying: CustomEvent<void>;
|
|
9
9
|
igcPaused: CustomEvent<void>;
|
|
10
10
|
}
|
|
11
|
-
declare const IgcCarouselComponent_base: Constructor<import("#internals/mixins/event-emitter.js").EventEmitterInterface<IgcCarouselComponentEventMap>> & Constructor<LitElement>;
|
|
11
|
+
declare const IgcCarouselComponent_base: import("#internals/mixins/constructor.js").AbstractConstructor<import("#internals/mixins/i18n.js").I18nInterface<ICarouselResourceStrings, Required<ICarouselResourceStrings>>> & Constructor<import("#internals/mixins/event-emitter.js").EventEmitterInterface<IgcCarouselComponentEventMap>> & Constructor<LitElement>;
|
|
12
12
|
/**
|
|
13
13
|
* The carousel presents a set of slides by sequentially displaying a subset of one or more.
|
|
14
14
|
*
|
|
15
15
|
* @element igc-carousel
|
|
16
16
|
*
|
|
17
17
|
* @slot Default slot for the carousel. Any carousel slides should be projected here.
|
|
18
|
+
* @slot indicator - Renders the custom indicators of the carousel. An indicator element sets this slot itself.
|
|
18
19
|
* @slot previous-button - Renders content inside the previous button.
|
|
19
20
|
* @slot next-button - Renders content inside the next button.
|
|
20
21
|
*
|
|
@@ -40,51 +41,68 @@ export default class IgcCarouselComponent extends IgcCarouselComponent_base {
|
|
|
40
41
|
private _hasKeyboardInteractionOnIndicators;
|
|
41
42
|
private _hasPointerInteraction;
|
|
42
43
|
private _hasInnerFocus;
|
|
44
|
+
/**
|
|
45
|
+
* Whether an interaction - a pointer over the carousel, or focus inside it -
|
|
46
|
+
* caused the current paused state. An explicit `pause()` call does not set it.
|
|
47
|
+
*/
|
|
48
|
+
private _pausedByInteraction;
|
|
43
49
|
private _slides;
|
|
44
50
|
private _projectedIndicators;
|
|
45
|
-
private _activeSlide
|
|
51
|
+
private _activeSlide?;
|
|
46
52
|
private _playing;
|
|
47
53
|
private readonly _slots;
|
|
48
|
-
private readonly _i18nController;
|
|
49
54
|
private readonly _context;
|
|
50
|
-
private _setCarouselContext;
|
|
51
55
|
private readonly _defaultIndicators;
|
|
52
56
|
private readonly _carouselSlidesContainerRef;
|
|
53
57
|
private readonly _indicatorsContainerRef;
|
|
54
58
|
private readonly _prevButtonRef;
|
|
55
59
|
private readonly _nextButtonRef;
|
|
56
60
|
private get _hasProjectedIndicators();
|
|
61
|
+
/** The indicators that the carousel shows. */
|
|
62
|
+
private get _indicators();
|
|
57
63
|
private get _showIndicatorsLabel();
|
|
58
64
|
private get _nextIndex();
|
|
59
65
|
private get _previousIndex();
|
|
60
66
|
/**
|
|
61
67
|
* Whether the carousel should skip rotating to the first slide after it reaches the last.
|
|
68
|
+
*
|
|
62
69
|
* @attr disable-loop
|
|
70
|
+
* @default false
|
|
63
71
|
*/
|
|
64
72
|
disableLoop: boolean;
|
|
65
73
|
/**
|
|
66
74
|
* Whether the carousel should ignore use interactions and not pause on them.
|
|
75
|
+
*
|
|
67
76
|
* @attr disable-pause-on-interaction
|
|
77
|
+
* @default false
|
|
68
78
|
*/
|
|
69
79
|
disablePauseOnInteraction: boolean;
|
|
70
80
|
/**
|
|
71
81
|
* Whether the carousel should skip rendering of the default navigation buttons.
|
|
82
|
+
*
|
|
72
83
|
* @attr hide-navigation
|
|
84
|
+
* @default false
|
|
73
85
|
*/
|
|
74
86
|
hideNavigation: boolean;
|
|
75
87
|
/**
|
|
76
88
|
* Whether the carousel should render the indicator controls (dots).
|
|
89
|
+
*
|
|
77
90
|
* @attr hide-indicators
|
|
91
|
+
* @default false
|
|
78
92
|
*/
|
|
79
93
|
hideIndicators: boolean;
|
|
80
94
|
/**
|
|
81
95
|
* Whether the carousel has vertical alignment.
|
|
96
|
+
*
|
|
82
97
|
* @attr vertical
|
|
98
|
+
* @default false
|
|
83
99
|
*/
|
|
84
100
|
vertical: boolean;
|
|
85
101
|
/**
|
|
86
|
-
*
|
|
102
|
+
* The orientation of the indicator controls (dots).
|
|
103
|
+
*
|
|
87
104
|
* @attr indicators-orientation
|
|
105
|
+
* @default end
|
|
88
106
|
*/
|
|
89
107
|
indicatorsOrientation: CarouselIndicatorsOrientation;
|
|
90
108
|
/**
|
|
@@ -114,50 +132,36 @@ export default class IgcCarouselComponent extends IgcCarouselComponent_base {
|
|
|
114
132
|
interval: number | undefined;
|
|
115
133
|
/**
|
|
116
134
|
* The maximum number of indicator controls (dots) that can be shown. Default value is `10`.
|
|
135
|
+
*
|
|
117
136
|
* @attr maximum-indicators-count
|
|
137
|
+
* @default 10
|
|
118
138
|
*/
|
|
119
139
|
maximumIndicatorsCount: number;
|
|
120
140
|
/**
|
|
121
141
|
* The animation type.
|
|
142
|
+
*
|
|
122
143
|
* @attr animation-type
|
|
144
|
+
* @default 'slide'
|
|
123
145
|
*/
|
|
124
146
|
animationType: HorizontalTransitionAnimation;
|
|
125
|
-
/**
|
|
126
|
-
* Gets/Sets the locale used for getting language, affecting resource strings.
|
|
127
|
-
* @attr locale
|
|
128
|
-
*/
|
|
129
|
-
set locale(value: string);
|
|
130
|
-
get locale(): string;
|
|
131
|
-
/**
|
|
132
|
-
* The resource strings for localization.
|
|
133
|
-
* Currently only aria-label attributes are localized for the carousel.
|
|
134
|
-
*/
|
|
135
|
-
set resourceStrings(value: ICarouselResourceStrings);
|
|
136
|
-
get resourceStrings(): ICarouselResourceStrings;
|
|
137
|
-
/**
|
|
138
|
-
* The slides of the carousel.
|
|
139
|
-
*/
|
|
147
|
+
/** The slides of the carousel. */
|
|
140
148
|
get slides(): IgcCarouselSlideComponent[];
|
|
141
|
-
/**
|
|
142
|
-
* The total number of slides.
|
|
143
|
-
*/
|
|
149
|
+
/** Total number of slides. */
|
|
144
150
|
get total(): number;
|
|
145
|
-
/**
|
|
146
|
-
* The index of the current active slide.
|
|
147
|
-
*/
|
|
151
|
+
/** The index of the current active slide. */
|
|
148
152
|
get current(): number;
|
|
149
|
-
/**
|
|
150
|
-
* Whether the carousel is in playing state.
|
|
151
|
-
*/
|
|
153
|
+
/** Whether the carousel is in playing state. */
|
|
152
154
|
get isPlaying(): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Whether the carousel in in paused state.
|
|
155
|
-
*/
|
|
155
|
+
/** Whether the carousel is in paused state. */
|
|
156
156
|
get isPaused(): boolean;
|
|
157
|
-
protected _contextChanged(): void;
|
|
158
|
-
protected _intervalChange(): void;
|
|
159
157
|
constructor();
|
|
158
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
159
|
+
/** @internal */
|
|
160
|
+
connectedCallback(): void;
|
|
161
|
+
/** @internal */
|
|
162
|
+
disconnectedCallback(): void;
|
|
160
163
|
protected firstUpdated(): Promise<void>;
|
|
164
|
+
protected updated(): void;
|
|
161
165
|
private _observerCallback;
|
|
162
166
|
private _handleSlotChange;
|
|
163
167
|
private _handlePointerInteraction;
|
|
@@ -174,7 +178,20 @@ export default class IgcCarouselComponent extends IgcCarouselComponent_base {
|
|
|
174
178
|
private _handleInteraction;
|
|
175
179
|
private _handlePauseOnInteraction;
|
|
176
180
|
private _activateSlide;
|
|
181
|
+
/** Activates the authored active slide, or the first slide. */
|
|
182
|
+
private _activateInitialSlide;
|
|
183
|
+
/**
|
|
184
|
+
* Moves the active state from a slide that left the carousel to the slide
|
|
185
|
+
* that takes its position.
|
|
186
|
+
*/
|
|
187
|
+
private _reactivateSlide;
|
|
177
188
|
private _updateProjectedIndicators;
|
|
189
|
+
/**
|
|
190
|
+
* Sets the rotation state of the carousel, and starts or clears its timer.
|
|
191
|
+
*/
|
|
192
|
+
private _setRotation;
|
|
193
|
+
/** Stops the rotation, and keeps the interaction state as it is. */
|
|
194
|
+
private _pause;
|
|
178
195
|
private _resetInterval;
|
|
179
196
|
private _restartInterval;
|
|
180
197
|
private _animateSlides;
|
|
@@ -5,7 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var IgcCarouselComponent_1;
|
|
8
|
-
import { ContextProvider } from '@lit/context';
|
|
9
8
|
import { CarouselResourceStringsEN, } from 'igniteui-i18n-core';
|
|
10
9
|
import { html, LitElement, nothing } from 'lit';
|
|
11
10
|
import { property, queryAll, state } from 'lit/decorators.js';
|
|
@@ -13,17 +12,18 @@ import { cache } from 'lit/directives/cache.js';
|
|
|
13
12
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
14
13
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
15
14
|
import { carouselContext } from '#internals/context.js';
|
|
15
|
+
import { addContextProvider } from '#internals/controllers/context-provider.js';
|
|
16
16
|
import { addGesturesController, } from '#internals/controllers/gestures.js';
|
|
17
17
|
import { addInternalsController } from '#internals/controllers/internals.js';
|
|
18
18
|
import { addKeybindings, arrowLeft, arrowRight, endKey, homeKey, } from '#internals/controllers/key-bindings.js';
|
|
19
19
|
import { createMutationController, } from '#internals/controllers/mutation-observer.js';
|
|
20
20
|
import { addSlotController, setSlots, } from '#internals/controllers/slot.js';
|
|
21
21
|
import { shadowOptions } from '#internals/decorators/shadow-options.js';
|
|
22
|
-
import { watch } from '#internals/decorators/watch.js';
|
|
23
22
|
import { registerComponent } from '#internals/definitions/register.js';
|
|
24
|
-
import { addI18nController } from '#internals/i18n/i18n-controller.js';
|
|
25
23
|
import { EventEmitterMixin } from '#internals/mixins/event-emitter.js';
|
|
24
|
+
import { I18nMixin } from '#internals/mixins/i18n.js';
|
|
26
25
|
import { partMap } from '#internals/part-map.js';
|
|
26
|
+
import { renderSlottedIcon } from '#internals/templates/slotted-icon.js';
|
|
27
27
|
import { firstOf, isEmpty, lastOf } from '#internals/utils/arrays.js';
|
|
28
28
|
import { isLTR } from '#internals/utils/dom.js';
|
|
29
29
|
import { addSafeEventListener, getElementFromPath, } from '#internals/utils/events.js';
|
|
@@ -40,19 +40,24 @@ import { all } from './themes/container.js';
|
|
|
40
40
|
import { styles as shared } from './themes/shared/carousel.common.css.js';
|
|
41
41
|
const nextId = createIdGenerator('igc-carousel');
|
|
42
42
|
const Slots = setSlots('indicator', 'previous-button', 'next-button');
|
|
43
|
-
|
|
43
|
+
const i18n = {
|
|
44
|
+
defaultEN: CarouselResourceStringsEN,
|
|
45
|
+
};
|
|
46
|
+
let IgcCarouselComponent = class IgcCarouselComponent extends I18nMixin(EventEmitterMixin(LitElement), i18n) {
|
|
44
47
|
static { IgcCarouselComponent_1 = this; }
|
|
45
48
|
static { this.styles = [styles, shared]; }
|
|
46
49
|
static { this.tagName = 'igc-carousel'; }
|
|
47
50
|
static register() {
|
|
48
51
|
registerComponent(IgcCarouselComponent_1, IgcCarouselIndicatorComponent, IgcCarouselIndicatorContainerComponent, IgcCarouselSlideComponent, IgcIconComponent, IgcButtonComponent);
|
|
49
52
|
}
|
|
50
|
-
_setCarouselContext() {
|
|
51
|
-
this._context.setValue(this, true);
|
|
52
|
-
}
|
|
53
53
|
get _hasProjectedIndicators() {
|
|
54
54
|
return !isEmpty(this._projectedIndicators);
|
|
55
55
|
}
|
|
56
|
+
get _indicators() {
|
|
57
|
+
return this._hasProjectedIndicators
|
|
58
|
+
? this._projectedIndicators
|
|
59
|
+
: Array.from(this._defaultIndicators);
|
|
60
|
+
}
|
|
56
61
|
get _showIndicatorsLabel() {
|
|
57
62
|
return this.total > this.maximumIndicatorsCount;
|
|
58
63
|
}
|
|
@@ -75,18 +80,6 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
75
80
|
get slidesLabelFormat() {
|
|
76
81
|
return (this._slidesLabelFormat ?? `{0} ${this.resourceStrings.carousel_of} {1}`);
|
|
77
82
|
}
|
|
78
|
-
set locale(value) {
|
|
79
|
-
this._i18nController.locale = value;
|
|
80
|
-
}
|
|
81
|
-
get locale() {
|
|
82
|
-
return this._i18nController.locale;
|
|
83
|
-
}
|
|
84
|
-
set resourceStrings(value) {
|
|
85
|
-
this._i18nController.resourceStrings = value;
|
|
86
|
-
}
|
|
87
|
-
get resourceStrings() {
|
|
88
|
-
return this._i18nController.resourceStrings;
|
|
89
|
-
}
|
|
90
83
|
get slides() {
|
|
91
84
|
return Array.from(this._slides);
|
|
92
85
|
}
|
|
@@ -94,7 +87,9 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
94
87
|
return this._slides.length;
|
|
95
88
|
}
|
|
96
89
|
get current() {
|
|
97
|
-
return
|
|
90
|
+
return this._activeSlide
|
|
91
|
+
? Math.max(0, this._slides.indexOf(this._activeSlide))
|
|
92
|
+
: 0;
|
|
98
93
|
}
|
|
99
94
|
get isPlaying() {
|
|
100
95
|
return this._playing;
|
|
@@ -102,22 +97,15 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
102
97
|
get isPaused() {
|
|
103
98
|
return this._paused;
|
|
104
99
|
}
|
|
105
|
-
_contextChanged() {
|
|
106
|
-
this._setCarouselContext();
|
|
107
|
-
}
|
|
108
|
-
_intervalChange() {
|
|
109
|
-
if (!this.isPlaying) {
|
|
110
|
-
this._playing = true;
|
|
111
|
-
}
|
|
112
|
-
this._restartInterval();
|
|
113
|
-
}
|
|
114
100
|
constructor() {
|
|
115
101
|
super();
|
|
116
102
|
this._carouselId = nextId();
|
|
117
103
|
this._paused = false;
|
|
104
|
+
this._lastInterval = null;
|
|
118
105
|
this._hasKeyboardInteractionOnIndicators = false;
|
|
119
106
|
this._hasPointerInteraction = false;
|
|
120
107
|
this._hasInnerFocus = false;
|
|
108
|
+
this._pausedByInteraction = false;
|
|
121
109
|
this._slides = [];
|
|
122
110
|
this._projectedIndicators = [];
|
|
123
111
|
this._playing = false;
|
|
@@ -126,12 +114,10 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
126
114
|
onChange: this._handleSlotChange,
|
|
127
115
|
initial: true,
|
|
128
116
|
});
|
|
129
|
-
this.
|
|
130
|
-
defaultEN: CarouselResourceStringsEN,
|
|
131
|
-
});
|
|
132
|
-
this._context = new ContextProvider(this, {
|
|
117
|
+
this._context = addContextProvider(this, {
|
|
133
118
|
context: carouselContext,
|
|
134
|
-
|
|
119
|
+
watch: ['animationType', 'slidesLabelFormat', 'indicatorsLabelFormat'],
|
|
120
|
+
value: () => this,
|
|
135
121
|
});
|
|
136
122
|
this._carouselSlidesContainerRef = createRef();
|
|
137
123
|
this._indicatorsContainerRef = createRef();
|
|
@@ -187,11 +173,34 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
187
173
|
},
|
|
188
174
|
});
|
|
189
175
|
}
|
|
176
|
+
willUpdate(changedProperties) {
|
|
177
|
+
if (changedProperties.has('interval')) {
|
|
178
|
+
const play = asNumber(this.interval) > 0;
|
|
179
|
+
const interacting = play &&
|
|
180
|
+
!this.disablePauseOnInteraction &&
|
|
181
|
+
(this._hasPointerInteraction || this._hasInnerFocus);
|
|
182
|
+
this._setRotation(play && !interacting, interacting);
|
|
183
|
+
this._pausedByInteraction = interacting;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
connectedCallback() {
|
|
187
|
+
super.connectedCallback();
|
|
188
|
+
if (this.hasUpdated) {
|
|
189
|
+
this._restartInterval();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
disconnectedCallback() {
|
|
193
|
+
this._resetInterval();
|
|
194
|
+
super.disconnectedCallback();
|
|
195
|
+
}
|
|
190
196
|
async firstUpdated() {
|
|
191
197
|
await this.updateComplete;
|
|
192
|
-
this.
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
this._context.publish();
|
|
199
|
+
this._activateInitialSlide();
|
|
200
|
+
}
|
|
201
|
+
updated() {
|
|
202
|
+
if (this._hasProjectedIndicators) {
|
|
203
|
+
this._updateProjectedIndicators();
|
|
195
204
|
}
|
|
196
205
|
}
|
|
197
206
|
_observerCallback({ changes: { added, attributes }, }) {
|
|
@@ -199,7 +208,10 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
199
208
|
if (activeSlides.length <= 1) {
|
|
200
209
|
return;
|
|
201
210
|
}
|
|
202
|
-
const
|
|
211
|
+
const node = isEmpty(added)
|
|
212
|
+
? (lastOf(attributes)?.node ?? lastOf(activeSlides))
|
|
213
|
+
: lastOf(added).node;
|
|
214
|
+
const idx = this._slides.indexOf(node);
|
|
203
215
|
for (const [i, slide] of this._slides.entries()) {
|
|
204
216
|
if (slide.active && i !== idx) {
|
|
205
217
|
slide.active = false;
|
|
@@ -209,9 +221,17 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
209
221
|
}
|
|
210
222
|
_handleSlotChange(params) {
|
|
211
223
|
if (params.isDefault || params.isInitial) {
|
|
224
|
+
const previousSlide = this._activeSlide;
|
|
225
|
+
const previousIndex = this.current;
|
|
212
226
|
this._slides = this._slots.getAssignedElements('[default]', {
|
|
213
227
|
selector: IgcCarouselSlideComponent.tagName,
|
|
214
228
|
});
|
|
229
|
+
if (previousSlide && !this._slides.includes(previousSlide)) {
|
|
230
|
+
this._reactivateSlide(previousSlide, previousIndex);
|
|
231
|
+
}
|
|
232
|
+
else if (this.hasUpdated && !this._activeSlide) {
|
|
233
|
+
this._activateInitialSlide();
|
|
234
|
+
}
|
|
215
235
|
}
|
|
216
236
|
if (params.slot === 'indicator') {
|
|
217
237
|
this._projectedIndicators = this._slots.getAssignedElements('indicator', {
|
|
@@ -221,9 +241,7 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
221
241
|
}
|
|
222
242
|
_handlePointerInteraction(event) {
|
|
223
243
|
this._hasPointerInteraction = event.type === 'pointerenter';
|
|
224
|
-
|
|
225
|
-
this._handlePauseOnInteraction();
|
|
226
|
-
}
|
|
244
|
+
this._handlePauseOnInteraction();
|
|
227
245
|
}
|
|
228
246
|
_handleFocusInteraction(event) {
|
|
229
247
|
const node = event.relatedTarget;
|
|
@@ -231,30 +249,26 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
231
249
|
return;
|
|
232
250
|
}
|
|
233
251
|
this._hasInnerFocus = event.type === 'focusin';
|
|
234
|
-
|
|
235
|
-
this._handlePauseOnInteraction();
|
|
236
|
-
}
|
|
252
|
+
this._handlePauseOnInteraction();
|
|
237
253
|
}
|
|
238
|
-
|
|
254
|
+
_handleIndicatorClick(event) {
|
|
239
255
|
const indicator = getElementFromPath(IgcCarouselIndicatorComponent.tagName, event);
|
|
240
|
-
const index = this.
|
|
241
|
-
? this._projectedIndicators.indexOf(indicator)
|
|
242
|
-
: Array.from(this._defaultIndicators).indexOf(indicator);
|
|
256
|
+
const index = this._indicators.indexOf(indicator);
|
|
243
257
|
this._handleInteraction(() => this.select(this._slides[index], index > this.current ? 'next' : 'prev'));
|
|
244
258
|
}
|
|
245
|
-
|
|
259
|
+
_handleArrowLeft() {
|
|
246
260
|
this._hasKeyboardInteractionOnIndicators = true;
|
|
247
261
|
this._handleInteraction(isLTR(this) ? this.prev : this.next);
|
|
248
262
|
}
|
|
249
|
-
|
|
263
|
+
_handleArrowRight() {
|
|
250
264
|
this._hasKeyboardInteractionOnIndicators = true;
|
|
251
265
|
this._handleInteraction(isLTR(this) ? this.next : this.prev);
|
|
252
266
|
}
|
|
253
|
-
|
|
267
|
+
_handleHomeKey() {
|
|
254
268
|
this._hasKeyboardInteractionOnIndicators = true;
|
|
255
269
|
this._handleInteraction(() => this.select(isLTR(this) ? firstOf(this._slides) : lastOf(this._slides)));
|
|
256
270
|
}
|
|
257
|
-
|
|
271
|
+
_handleEndKey() {
|
|
258
272
|
this._hasKeyboardInteractionOnIndicators = true;
|
|
259
273
|
this._handleInteraction(() => this.select(isLTR(this) ? lastOf(this._slides) : firstOf(this._slides)));
|
|
260
274
|
}
|
|
@@ -287,6 +301,7 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
287
301
|
if (await callback.call(this)) {
|
|
288
302
|
this.emitEvent('igcSlideChanged', { detail: this.current });
|
|
289
303
|
}
|
|
304
|
+
this._hasKeyboardInteractionOnIndicators = false;
|
|
290
305
|
if (this.interval) {
|
|
291
306
|
this._restartInterval();
|
|
292
307
|
}
|
|
@@ -294,11 +309,16 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
294
309
|
_handlePauseOnInteraction() {
|
|
295
310
|
if (!this.interval || this.disablePauseOnInteraction)
|
|
296
311
|
return;
|
|
297
|
-
|
|
298
|
-
|
|
312
|
+
const interacting = this._hasPointerInteraction || this._hasInnerFocus;
|
|
313
|
+
if (interacting) {
|
|
314
|
+
if (!this.isPlaying)
|
|
315
|
+
return;
|
|
316
|
+
this._pause();
|
|
317
|
+
this._pausedByInteraction = true;
|
|
299
318
|
this.emitEvent('igcPaused');
|
|
319
|
+
return;
|
|
300
320
|
}
|
|
301
|
-
|
|
321
|
+
if (this._pausedByInteraction) {
|
|
302
322
|
this.play();
|
|
303
323
|
this.emitEvent('igcPlaying');
|
|
304
324
|
}
|
|
@@ -310,20 +330,45 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
310
330
|
this._activeSlide = slide;
|
|
311
331
|
this._activeSlide.active = true;
|
|
312
332
|
if (this._hasKeyboardInteractionOnIndicators) {
|
|
313
|
-
this.
|
|
314
|
-
? this._projectedIndicators[this.current].focus()
|
|
315
|
-
: this._defaultIndicators[this.current].focus();
|
|
333
|
+
this._indicators[this.current]?.focus();
|
|
316
334
|
this._hasKeyboardInteractionOnIndicators = false;
|
|
317
335
|
}
|
|
318
336
|
}
|
|
337
|
+
_activateInitialSlide() {
|
|
338
|
+
if (!isEmpty(this._slides)) {
|
|
339
|
+
this._activateSlide(this._slides.findLast((slide) => slide.active) ?? firstOf(this._slides));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
_reactivateSlide(removed, index) {
|
|
343
|
+
removed.active = false;
|
|
344
|
+
this._activeSlide = undefined;
|
|
345
|
+
if (!isEmpty(this._slides)) {
|
|
346
|
+
this._activateSlide(this._slides[Math.min(index, this.total - 1)]);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
319
349
|
_updateProjectedIndicators() {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
350
|
+
const current = this.current;
|
|
351
|
+
for (const [idx, indicator] of this._projectedIndicators.entries()) {
|
|
352
|
+
const slide = this._slides.at(idx);
|
|
353
|
+
indicator.active = Boolean(slide) && idx === current;
|
|
323
354
|
indicator.index = idx;
|
|
355
|
+
if (slide) {
|
|
356
|
+
indicator.setAttribute('aria-controls', slide.id);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
indicator.removeAttribute('aria-controls');
|
|
360
|
+
}
|
|
324
361
|
}
|
|
325
|
-
|
|
326
|
-
|
|
362
|
+
}
|
|
363
|
+
_setRotation(playing, paused = false) {
|
|
364
|
+
this._playing = playing;
|
|
365
|
+
this._paused = paused;
|
|
366
|
+
this._pausedByInteraction = false;
|
|
367
|
+
this._restartInterval();
|
|
368
|
+
}
|
|
369
|
+
_pause() {
|
|
370
|
+
if (this.isPlaying) {
|
|
371
|
+
this._setRotation(false, true);
|
|
327
372
|
}
|
|
328
373
|
}
|
|
329
374
|
_resetInterval() {
|
|
@@ -334,19 +379,20 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
334
379
|
}
|
|
335
380
|
_restartInterval() {
|
|
336
381
|
this._resetInterval();
|
|
337
|
-
if (asNumber(this.interval)
|
|
338
|
-
|
|
339
|
-
if (this.isPlaying &&
|
|
340
|
-
this.total &&
|
|
341
|
-
!(this.disableLoop && this._nextIndex === 0)) {
|
|
342
|
-
this.select(this.slides[this._nextIndex], 'next');
|
|
343
|
-
this.emitEvent('igcSlideChanged', { detail: this.current });
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
this.pause();
|
|
347
|
-
}
|
|
348
|
-
}, this.interval);
|
|
382
|
+
if (!this.isConnected || !this.isPlaying || asNumber(this.interval) <= 0) {
|
|
383
|
+
return;
|
|
349
384
|
}
|
|
385
|
+
this._lastInterval = setInterval(() => {
|
|
386
|
+
if (this.isPlaying &&
|
|
387
|
+
this.total &&
|
|
388
|
+
!(this.disableLoop && this._nextIndex === 0)) {
|
|
389
|
+
this.select(this._slides[this._nextIndex], 'next');
|
|
390
|
+
this.emitEvent('igcSlideChanged', { detail: this.current });
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
this._pause();
|
|
394
|
+
}
|
|
395
|
+
}, this.interval);
|
|
350
396
|
}
|
|
351
397
|
async _animateSlides(nextSlide, currentSlide, dir) {
|
|
352
398
|
if (dir === 'next') {
|
|
@@ -366,28 +412,23 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
366
412
|
}
|
|
367
413
|
play() {
|
|
368
414
|
if (!this.isPlaying) {
|
|
369
|
-
this.
|
|
370
|
-
this._playing = true;
|
|
371
|
-
this._restartInterval();
|
|
415
|
+
this._setRotation(true);
|
|
372
416
|
}
|
|
373
417
|
}
|
|
374
418
|
pause() {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
this._paused = true;
|
|
378
|
-
this._resetInterval();
|
|
379
|
-
}
|
|
419
|
+
this._pause();
|
|
420
|
+
this._pausedByInteraction = false;
|
|
380
421
|
}
|
|
381
422
|
async next() {
|
|
382
423
|
if (this.disableLoop && this._nextIndex === 0) {
|
|
383
|
-
this.
|
|
424
|
+
this._pause();
|
|
384
425
|
return false;
|
|
385
426
|
}
|
|
386
427
|
return await this.select(this._slides[this._nextIndex], 'next');
|
|
387
428
|
}
|
|
388
429
|
async prev() {
|
|
389
430
|
if (this.disableLoop && this._previousIndex === this.total - 1) {
|
|
390
|
-
this.
|
|
431
|
+
this._pause();
|
|
391
432
|
return false;
|
|
392
433
|
}
|
|
393
434
|
return await this.select(this._slides[this._previousIndex], 'prev');
|
|
@@ -407,6 +448,10 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
407
448
|
return false;
|
|
408
449
|
}
|
|
409
450
|
const dir = animationDirection ?? (index > this.current ? 'next' : 'prev');
|
|
451
|
+
if (!this._activeSlide) {
|
|
452
|
+
this._activateSlide(slide);
|
|
453
|
+
return true;
|
|
454
|
+
}
|
|
410
455
|
await this._animateSlides(slide, this._activeSlide, dir);
|
|
411
456
|
return true;
|
|
412
457
|
}
|
|
@@ -416,36 +461,24 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
416
461
|
${ref(this._prevButtonRef)}
|
|
417
462
|
type="button"
|
|
418
463
|
part="navigation previous"
|
|
419
|
-
aria-label=${this.resourceStrings.carousel_previous_slide
|
|
464
|
+
aria-label=${this.resourceStrings.carousel_previous_slide}
|
|
420
465
|
aria-controls=${this._carouselId}
|
|
421
466
|
?disabled=${this.disableLoop && this.current === 0}
|
|
422
467
|
@click=${this._handleNavigationInteractionPrevious}
|
|
423
468
|
>
|
|
424
|
-
|
|
425
|
-
<igc-icon
|
|
426
|
-
name="carousel_prev"
|
|
427
|
-
collection="default"
|
|
428
|
-
aria-hidden="true"
|
|
429
|
-
></igc-icon>
|
|
430
|
-
</slot>
|
|
469
|
+
${renderSlottedIcon({ slot: 'previous-button', icon: 'carousel_prev' })}
|
|
431
470
|
</igc-button>
|
|
432
471
|
|
|
433
472
|
<igc-button
|
|
434
473
|
${ref(this._nextButtonRef)}
|
|
435
474
|
type="button"
|
|
436
475
|
part="navigation next"
|
|
437
|
-
aria-label=${this.resourceStrings.carousel_next_slide
|
|
476
|
+
aria-label=${this.resourceStrings.carousel_next_slide}
|
|
438
477
|
aria-controls=${this._carouselId}
|
|
439
478
|
?disabled=${this.disableLoop && this.current === this.total - 1}
|
|
440
479
|
@click=${this._handleNavigationInteractionNext}
|
|
441
480
|
>
|
|
442
|
-
|
|
443
|
-
<igc-icon
|
|
444
|
-
name="carousel_next"
|
|
445
|
-
collection="default"
|
|
446
|
-
aria-hidden="true"
|
|
447
|
-
></igc-icon>
|
|
448
|
-
</slot>
|
|
481
|
+
${renderSlottedIcon({ slot: 'next-button', icon: 'carousel_next' })}
|
|
449
482
|
</igc-button>
|
|
450
483
|
`;
|
|
451
484
|
}
|
|
@@ -459,10 +492,7 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
459
492
|
.active=${slide.active}
|
|
460
493
|
.index=${i}
|
|
461
494
|
>
|
|
462
|
-
<div
|
|
463
|
-
part="dot"
|
|
464
|
-
style=${styleMap({ visibility: backward, zIndex: 1 })}
|
|
465
|
-
></div>
|
|
495
|
+
<div part="dot" style=${styleMap({ visibility: backward })}></div>
|
|
466
496
|
<div
|
|
467
497
|
part="dot active"
|
|
468
498
|
slot="active"
|
|
@@ -485,9 +515,7 @@ let IgcCarouselComponent = class IgcCarouselComponent extends EventEmitterMixin(
|
|
|
485
515
|
part=${partMap(parts)}
|
|
486
516
|
>
|
|
487
517
|
<slot name="indicator" @click=${this._handleIndicatorClick}>
|
|
488
|
-
${cache(this._hasProjectedIndicators
|
|
489
|
-
? this._updateProjectedIndicators()
|
|
490
|
-
: this._renderIndicators())}
|
|
518
|
+
${cache(this._hasProjectedIndicators ? nothing : this._renderIndicators())}
|
|
491
519
|
</slot>
|
|
492
520
|
</div>
|
|
493
521
|
</igc-carousel-indicator-container>
|
|
@@ -571,20 +599,6 @@ __decorate([
|
|
|
571
599
|
__decorate([
|
|
572
600
|
property({ attribute: 'animation-type' })
|
|
573
601
|
], IgcCarouselComponent.prototype, "animationType", void 0);
|
|
574
|
-
__decorate([
|
|
575
|
-
property()
|
|
576
|
-
], IgcCarouselComponent.prototype, "locale", null);
|
|
577
|
-
__decorate([
|
|
578
|
-
property({ attribute: false })
|
|
579
|
-
], IgcCarouselComponent.prototype, "resourceStrings", null);
|
|
580
|
-
__decorate([
|
|
581
|
-
watch('animationType'),
|
|
582
|
-
watch('slidesLabelFormat'),
|
|
583
|
-
watch('indicatorsLabelFormat')
|
|
584
|
-
], IgcCarouselComponent.prototype, "_contextChanged", null);
|
|
585
|
-
__decorate([
|
|
586
|
-
watch('interval')
|
|
587
|
-
], IgcCarouselComponent.prototype, "_intervalChange", null);
|
|
588
602
|
IgcCarouselComponent = IgcCarouselComponent_1 = __decorate([
|
|
589
603
|
shadowOptions({ delegatesFocus: true })
|
|
590
604
|
], IgcCarouselComponent);
|