2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								// Copyright 2022 Signal Messenger, LLC
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								// SPDX-License-Identifier: AGPL-3.0-only
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-11 12:06:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								import  type  {  Meta ,  StoryFn  }  from  '@storybook/react' ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								import  React  from  'react' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								import  {  ListTile  }  from  './ListTile' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								import  type  {  Props  }  from  './ListTile' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								import  {  CircleCheckbox  }  from  './CircleCheckbox' ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-20 10:03:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								import  {  UserText  }  from  './UserText' ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export  default  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  title :  'Components/ListTile' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  component : ListTile , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-11 12:06:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								}  satisfies  Meta < Props > ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  lorem  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam feugiat quam vitae semper facilisis. Praesent eu efficitur dui. Donec semper mattis nisl non hendrerit.' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-11 12:06:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  TemplateList ( width : number ) :  StoryFn < Props >  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								  // eslint-disable-next-line react/display-name
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  return  args  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      < div 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        style = { { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          width , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          height : 400 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          overflow :  'auto' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          outline :  '1px solid gray' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = "Checkbox" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          trailing = { < CircleCheckbox  / > } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          clickable 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = "Checkbox" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          trailing = { < CircleCheckbox  checked  / > } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          clickable 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile  { ...args }  trailing = { undefined }  / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile  { ...args }  title = { ` Long title -  ${ lorem } ` }  / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile  { ...args }  subtitle = "Disabled"  disabled  / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-20 10:03:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          title = { < UserText  text = "Emoji in title 📞"  / > } 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = "Clickable" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          clickable 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-20 10:03:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          title = { < UserText  text = "With a LOT of emoji 🚗"  / > } 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-20 10:03:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            < UserText  text = "😂, 😃, 🧘🏻♂️, 🌍, 🌦️, 🍞, 🚗, 📞, 🎉, ❤️, 🍆, 🍑 and 🏁"  / > 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = { ` One line max -  ${ lorem } ` } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitleMaxLines = { 1 } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = { ` Two lines max -  ${ lorem } ` } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitleMaxLines = { 2 } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = { ` Three lines max -  ${ lorem } ` } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitleMaxLines = { 3 } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        < ListTile 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          { . . . args } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          subtitle = "Button root element" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          rootElement = "button" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      < / div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								const  circleAvatar  =  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  < div 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    style = { {  borderRadius :  '100%' ,  background :  'gray' ,  width : 36 ,  height : 36  } } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  / > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export  const  Item  =  TemplateList ( 400 ) . bind ( { } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Item . args  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  leading : circleAvatar , 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-20 10:03:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  title :  < UserText  text = "Some user"  / > , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-25 09:54:32 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								  subtitle :  'Hello my friend' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  clickable : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export  const  PanelRow  =  TemplateList ( 800 ) . bind ( { } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								PanelRow . args  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  leading : circleAvatar , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  title :  'Some user' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  subtitle :  'Hello my friend' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  trailing :  < div  className = "ConversationDetails-panel-row__right" > Admin < / div > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  clickable : false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  variant :  'panelrow' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ;