@@ -145,6 +145,12 @@ export default class Carousel extends LitElement {
145145 @property ( { type : Boolean , attribute : 'with-dots' } )
146146 withDots = false ;
147147
148+ @property ( { type : Boolean , attribute : 'with-scrollbar' } )
149+ withScrollbar = false ;
150+
151+ @property ( { type : Boolean , attribute : 'with-fullscreen' } )
152+ withFullscreen = false ;
153+
148154 @query ( '.button-prev' ) previousBtn ! : HTMLButtonElement ;
149155 @query ( '.button-next' ) nextBtn ! : HTMLButtonElement ;
150156 @query ( '.container' ) container ! : HTMLSlotElement ;
@@ -335,23 +341,51 @@ export default class Carousel extends LitElement {
335341 return this . embla ?. internalEngine ( ) . options . active ;
336342 }
337343
344+ renderFullscreenButton ( ) {
345+ return html `< button
346+ type ="button "
347+ part ="button button-fullscreen "
348+ class ="button button-fullscreen "
349+ @click =${ dispatchEvent ( this , 'fullscreen' ) }
350+ >
351+ < svg
352+ xmlns ="http://www.w3.org/2000/svg "
353+ viewBox ="0 0 512 512 "
354+ fill ="currentColor "
355+ part ="button-icon button-icon-fullscreen "
356+ >
357+ < path
358+ d ="M295 183c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135 0 86.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-144c0-13.3-10.7-24-24-24L344 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l86.1 0-135 135zM217 329c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L48 430.1 48 344c0-13.3-10.7-24-24-24S0 330.7 0 344L0 488c0 13.3 10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-86.1 0 135-135z "
359+ />
360+ </ svg >
361+ </ button > ` ;
362+ }
363+
338364 renderNextPrevButtons ( ) {
339365 return html `< div class ="buttons ">
340366 < button part ="button button-prev " class ="button button-prev " type ="button ">
341- < svg xmlns ="http://www.w3.org/2000/svg " fill ="currentColor " viewBox ="0 0 16 16 " part ="svg ">
367+ < svg
368+ xmlns ="http://www.w3.org/2000/svg "
369+ viewBox ="0 0 512 512 "
370+ fill ="currentColor "
371+ part ="button-icon button-icon-prev "
372+ >
342373 < path
343- fill-rule ="evenodd "
344- d ="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z "
345- > </ path >
374+ d ="M7 239c-9.4 9.4-9.4 24.6 0 33.9L175 441c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L81.9 280 488 280c13.3 0 24-10.7 24-24s-10.7-24-24-24L81.9 232 209 105c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239z "
375+ />
346376 </ svg >
347377 </ button >
348378
349379 < button part ="button button-next " class ="button button-next " type ="button ">
350- < svg xmlns ="http://www.w3.org/2000/svg " fill ="currentColor " viewBox ="0 0 16 16 " part ="svg ">
380+ < svg
381+ xmlns ="http://www.w3.org/2000/svg "
382+ viewBox ="0 0 512 512 "
383+ fill ="currentColor "
384+ part ="button-icon button-icon-next "
385+ >
351386 < path
352- fill-rule ="evenodd "
353- d ="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z "
354- > </ path >
387+ d ="M505 273c9.4-9.4 9.4-24.6 0-33.9L337 71c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l127 127-406.1 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l406.1 0-127 127c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L505 273z "
388+ />
355389 </ svg >
356390 </ button >
357391 </ div > ` ;
@@ -363,7 +397,7 @@ export default class Carousel extends LitElement {
363397 < div part ="viewport " class ="viewport ">
364398 < slot part ="container " class ="container " @slotchange =${ this . handleSlotChange } > </ slot >
365399 </ div >
366- ${ this . renderNextPrevButtons ( ) }
400+ ${ this . withFullscreen ? this . renderFullscreenButton ( ) : '' } ${ this . renderNextPrevButtons ( ) }
367401 ${ this . withDots
368402 ? html `< div class ="dots ">
369403 ${ map ( this . embla . scrollSnapList ( ) , ( _ , index ) => {
0 commit comments