| 
									
										
										
										
											2024-01-21 01:12:57 +01:00
										 |  |  | import { html, domtools, cssManager } from '@design.estate/dees-element'; | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  | import type { DeesForm } from './dees-form.js'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const demoFunc = () => html`
 | 
					
						
							|  |  |  |   <style> | 
					
						
							|  |  |  |     .demoContainer { | 
					
						
							|  |  |  |       max-width: 400px; | 
					
						
							| 
									
										
										
										
											2024-01-21 01:12:57 +01:00
										 |  |  |       margin: 24px auto; | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  |       padding: 16px; | 
					
						
							| 
									
										
										
										
											2024-01-21 01:12:57 +01:00
										 |  |  |       background: ${cssManager.bdTheme('#eeeeeb', '#111')}; | 
					
						
							|  |  |  |       box-shadow: 0px 1px 3px #00000030; | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  |     } | 
					
						
							|  |  |  |   </style> | 
					
						
							|  |  |  |   <div class="demoContainer"> | 
					
						
							|  |  |  |     <dees-form | 
					
						
							|  |  |  |       style="display: block; margin:auto; max-width: 500px; padding: 20px" | 
					
						
							|  |  |  |       @formData=${async (eventArg) => { | 
					
						
							|  |  |  |         const form: DeesForm = eventArg.currentTarget; | 
					
						
							|  |  |  |         form.setStatus('pending', 'authenticating...'); | 
					
						
							|  |  |  |         await domtools.plugins.smartdelay.delayFor(1000); | 
					
						
							|  |  |  |         form.setStatus('success', 'authenticated!'); | 
					
						
							|  |  |  |       }} | 
					
						
							|  |  |  |     > | 
					
						
							| 
									
										
										
										
											2023-12-08 18:15:40 +01:00
										 |  |  |       <dees-input-dropdown | 
					
						
							|  |  |  |         .label=${'title'} | 
					
						
							|  |  |  |         .options=${[ | 
					
						
							|  |  |  |           { option: 'option 1', key: 'option1' }, | 
					
						
							|  |  |  |           { option: 'option 2', key: 'option2' }, | 
					
						
							|  |  |  |           { option: 'option 3', key: 'option3' }, | 
					
						
							|  |  |  |         ]} | 
					
						
							|  |  |  |       ></dees-input-dropdown> | 
					
						
							| 
									
										
										
										
											2024-01-09 13:57:53 +01:00
										 |  |  |       <dees-input-multiselect | 
					
						
							|  |  |  |         .label=${'title'} | 
					
						
							|  |  |  |         .options=${[ | 
					
						
							|  |  |  |           { option: 'option 1', key: 'option1' }, | 
					
						
							|  |  |  |           { option: 'option 2', key: 'option2' }, | 
					
						
							|  |  |  |           { option: 'option 3', key: 'option3' }, | 
					
						
							|  |  |  |         ]}></dees-input-multiselect> | 
					
						
							| 
									
										
										
										
											2024-01-18 02:08:19 +01:00
										 |  |  |       <dees-input-typelist | 
					
						
							|  |  |  |         .label=${'a type list'} | 
					
						
							|  |  |  |       ></dees-input-typelist> | 
					
						
							| 
									
										
										
										
											2024-01-21 01:12:57 +01:00
										 |  |  |       <dees-input-text .required="${true}" key="hello1" label="a text" .description=${`
 | 
					
						
							|  |  |  |         This is an awesome description. | 
					
						
							|  |  |  |       `}></dees-input-text>
 | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  |       <dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text> | 
					
						
							| 
									
										
										
										
											2023-12-08 18:15:40 +01:00
										 |  |  |       <dees-input-text | 
					
						
							|  |  |  |         .required="${true}" | 
					
						
							|  |  |  |         key="hello3" | 
					
						
							|  |  |  |         label="a password" | 
					
						
							|  |  |  |         isPasswordBool | 
					
						
							|  |  |  |       ></dees-input-text> | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  |       <dees-input-checkbox | 
					
						
							|  |  |  |         .required="${true}" | 
					
						
							|  |  |  |         key="hello3" | 
					
						
							|  |  |  |         label="another text" | 
					
						
							|  |  |  |       ></dees-input-checkbox> | 
					
						
							|  |  |  |       <dees-input-iban></dees-input-iban> | 
					
						
							| 
									
										
										
										
											2024-01-18 02:08:19 +01:00
										 |  |  |       <dees-input-multitoggle | 
					
						
							|  |  |  |         .label=${'multi select'} | 
					
						
							|  |  |  |         .options=${['option 1', 'option 2', 'option 3']} | 
					
						
							|  |  |  |         .selectedOption=${'option 1'} | 
					
						
							|  |  |  |       ></dees-input-multitoggle> | 
					
						
							|  |  |  |       <dees-input-fileupload | 
					
						
							|  |  |  |         .label=${'attachments'} | 
					
						
							|  |  |  |       ></dees-input-fileupload> | 
					
						
							| 
									
										
										
										
											2023-10-23 16:13:02 +02:00
										 |  |  |       <dees-form-submit>Submit</dees-form-submit> | 
					
						
							|  |  |  |     </dees-form> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | `;
 |