askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
test-modal-sizes.html · 30.4 KB · 778 lines
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>Semantic Modal Size Testing</title> |
| 7 | <script src="semantic-components.js"></script> |
| 8 | <style> |
| 9 | body { |
| 10 | background: #000; |
| 11 | color: #fff; |
| 12 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 13 | padding: 40px; |
| 14 | max-width: 1200px; |
| 15 | margin: 0 auto; |
| 16 | } |
| 17 | |
| 18 | h1 { |
| 19 | margin-bottom: 40px; |
| 20 | } |
| 21 | |
| 22 | .demo-section { |
| 23 | margin-bottom: 60px; |
| 24 | } |
| 25 | |
| 26 | .demo-section h2 { |
| 27 | font-size: 20px; |
| 28 | color: #8e8e93; |
| 29 | margin-bottom: 30px; |
| 30 | } |
| 31 | |
| 32 | .demo-section p { |
| 33 | color: #8e8e93; |
| 34 | margin-bottom: 20px; |
| 35 | line-height: 1.6; |
| 36 | } |
| 37 | |
| 38 | .button-grid { |
| 39 | display: grid; |
| 40 | grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); |
| 41 | gap: 16px; |
| 42 | margin-bottom: 20px; |
| 43 | } |
| 44 | |
| 45 | .demo-box { |
| 46 | background: #1c1c1e; |
| 47 | padding: 30px; |
| 48 | border-radius: 12px; |
| 49 | margin-bottom: 20px; |
| 50 | } |
| 51 | |
| 52 | .modal-title { |
| 53 | font-size: 20px; |
| 54 | font-weight: 600; |
| 55 | margin: 0 0 16px 0; |
| 56 | } |
| 57 | |
| 58 | .modal-body { |
| 59 | line-height: 1.6; |
| 60 | color: #ebebf5; |
| 61 | margin-bottom: 24px; |
| 62 | } |
| 63 | |
| 64 | .modal-actions { |
| 65 | display: flex; |
| 66 | gap: 12px; |
| 67 | justify-content: flex-end; |
| 68 | } |
| 69 | |
| 70 | .form-group { |
| 71 | margin-bottom: 20px; |
| 72 | } |
| 73 | |
| 74 | .form-label { |
| 75 | display: block; |
| 76 | margin-bottom: 8px; |
| 77 | font-size: 14px; |
| 78 | font-weight: 500; |
| 79 | } |
| 80 | |
| 81 | .form-row { |
| 82 | display: grid; |
| 83 | grid-template-columns: repeat(2, 1fr); |
| 84 | gap: 16px; |
| 85 | margin-bottom: 20px; |
| 86 | } |
| 87 | |
| 88 | .feature-list { |
| 89 | list-style: none; |
| 90 | padding: 0; |
| 91 | margin: 20px 0; |
| 92 | } |
| 93 | |
| 94 | .feature-list li { |
| 95 | padding: 12px 0; |
| 96 | border-bottom: 1px solid #3a3a3c; |
| 97 | display: flex; |
| 98 | align-items: center; |
| 99 | gap: 12px; |
| 100 | } |
| 101 | |
| 102 | .feature-list li:last-child { |
| 103 | border-bottom: none; |
| 104 | } |
| 105 | |
| 106 | .price-tag { |
| 107 | font-size: 32px; |
| 108 | font-weight: 700; |
| 109 | color: #409cff; |
| 110 | margin: 24px 0; |
| 111 | } |
| 112 | |
| 113 | .price-tag small { |
| 114 | font-size: 16px; |
| 115 | color: #8e8e93; |
| 116 | font-weight: 400; |
| 117 | } |
| 118 | |
| 119 | .alert-icon { |
| 120 | font-size: 48px; |
| 121 | text-align: center; |
| 122 | margin-bottom: 16px; |
| 123 | } |
| 124 | |
| 125 | .image-preview { |
| 126 | width: 100%; |
| 127 | height: 300px; |
| 128 | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| 129 | border-radius: 8px; |
| 130 | display: flex; |
| 131 | align-items: center; |
| 132 | justify-content: center; |
| 133 | font-size: 64px; |
| 134 | margin-bottom: 20px; |
| 135 | } |
| 136 | |
| 137 | .stats-grid { |
| 138 | display: grid; |
| 139 | grid-template-columns: repeat(3, 1fr); |
| 140 | gap: 16px; |
| 141 | margin: 24px 0; |
| 142 | } |
| 143 | |
| 144 | .stat-box { |
| 145 | background: #2c2c2e; |
| 146 | padding: 16px; |
| 147 | border-radius: 8px; |
| 148 | text-align: center; |
| 149 | } |
| 150 | |
| 151 | .stat-value { |
| 152 | font-size: 24px; |
| 153 | font-weight: 700; |
| 154 | color: #409cff; |
| 155 | } |
| 156 | |
| 157 | .stat-label { |
| 158 | font-size: 12px; |
| 159 | color: #8e8e93; |
| 160 | margin-top: 4px; |
| 161 | } |
| 162 | |
| 163 | .content-grid { |
| 164 | display: grid; |
| 165 | grid-template-columns: repeat(2, 1fr); |
| 166 | gap: 20px; |
| 167 | margin: 20px 0; |
| 168 | } |
| 169 | |
| 170 | .content-card { |
| 171 | background: #2c2c2e; |
| 172 | padding: 20px; |
| 173 | border-radius: 8px; |
| 174 | } |
| 175 | |
| 176 | .content-card h4 { |
| 177 | margin: 0 0 8px 0; |
| 178 | font-size: 16px; |
| 179 | } |
| 180 | |
| 181 | .content-card p { |
| 182 | margin: 0; |
| 183 | font-size: 14px; |
| 184 | color: #8e8e93; |
| 185 | } |
| 186 | </style> |
| 187 | </head> |
| 188 | <body> |
| 189 | <h1>semantic-modal Size Testing</h1> |
| 190 | |
| 191 | <div class="demo-section"> |
| 192 | <h2>Modal Sizes</h2> |
| 193 | <p>Test different modal sizes and their content layouts.</p> |
| 194 | |
| 195 | <div class="button-grid"> |
| 196 | <semantic-action intent="primary" id="btn-small">Small Modal</semantic-action> |
| 197 | <semantic-action intent="primary" id="btn-medium">Medium Modal (Default)</semantic-action> |
| 198 | <semantic-action intent="primary" id="btn-large">Large Modal</semantic-action> |
| 199 | <semantic-action intent="primary" id="btn-fullscreen">Fullscreen Modal</semantic-action> |
| 200 | </div> |
| 201 | </div> |
| 202 | |
| 203 | <div class="demo-section"> |
| 204 | <h2>Common Modal Patterns</h2> |
| 205 | <p>Real-world modal use cases with appropriate sizes.</p> |
| 206 | |
| 207 | <div class="button-grid"> |
| 208 | <semantic-action intent="primary" id="btn-confirm">Confirmation Dialog</semantic-action> |
| 209 | <semantic-action intent="primary" id="btn-form">Form Modal</semantic-action> |
| 210 | <semantic-action intent="primary" id="btn-details">Details View</semantic-action> |
| 211 | <semantic-action intent="success" id="btn-success">Success Message</semantic-action> |
| 212 | <semantic-action intent="danger" id="btn-delete">Delete Warning</semantic-action> |
| 213 | <semantic-action intent="warning" id="btn-warning">Warning Alert</semantic-action> |
| 214 | </div> |
| 215 | </div> |
| 216 | |
| 217 | <div class="demo-section"> |
| 218 | <h2>Complex Content Modals</h2> |
| 219 | <p>Modals with rich content and multiple sections.</p> |
| 220 | |
| 221 | <div class="button-grid"> |
| 222 | <semantic-action intent="primary" id="btn-pricing">Pricing Plans</semantic-action> |
| 223 | <semantic-action intent="primary" id="btn-gallery">Image Gallery</semantic-action> |
| 224 | <semantic-action intent="primary" id="btn-settings">Settings Panel</semantic-action> |
| 225 | <semantic-action intent="primary" id="btn-dashboard">Dashboard Stats</semantic-action> |
| 226 | <semantic-action intent="primary" id="btn-checkout">Checkout Flow</semantic-action> |
| 227 | <semantic-action intent="primary" id="btn-profile">User Profile</semantic-action> |
| 228 | </div> |
| 229 | </div> |
| 230 | |
| 231 | <!-- Small Modal --> |
| 232 | <semantic-modal id="modal-small" size="small"> |
| 233 | <div slot="header"> |
| 234 | <h3 class="modal-title">Quick Note</h3> |
| 235 | </div> |
| 236 | <div slot="body"> |
| 237 | <p class="modal-body"> |
| 238 | This is a small modal, perfect for brief messages or simple confirmations. |
| 239 | </p> |
| 240 | </div> |
| 241 | <div slot="footer"> |
| 242 | <div class="modal-actions"> |
| 243 | <semantic-action intent="primary" onclick="document.getElementById('modal-small').close()">OK</semantic-action> |
| 244 | </div> |
| 245 | </div> |
| 246 | </semantic-modal> |
| 247 | |
| 248 | <!-- Medium Modal --> |
| 249 | <semantic-modal id="modal-medium"> |
| 250 | <div slot="header"> |
| 251 | <h3 class="modal-title">Medium Modal</h3> |
| 252 | </div> |
| 253 | <div slot="body"> |
| 254 | <p class="modal-body"> |
| 255 | This is the default medium-sized modal. It's suitable for most content including forms, messages, and moderate amounts of information. The width provides good readability without overwhelming the screen. |
| 256 | </p> |
| 257 | <p class="modal-body"> |
| 258 | Medium modals work well for signup forms, contact forms, and detailed messages that require user attention. |
| 259 | </p> |
| 260 | </div> |
| 261 | <div slot="footer"> |
| 262 | <div class="modal-actions"> |
| 263 | <semantic-action intent="secondary" onclick="document.getElementById('modal-medium').close()">Close</semantic-action> |
| 264 | <semantic-action intent="primary" onclick="document.getElementById('modal-medium').close()">Confirm</semantic-action> |
| 265 | </div> |
| 266 | </div> |
| 267 | </semantic-modal> |
| 268 | |
| 269 | <!-- Large Modal --> |
| 270 | <semantic-modal id="modal-large" size="large"> |
| 271 | <div slot="header"> |
| 272 | <h3 class="modal-title">Large Modal</h3> |
| 273 | </div> |
| 274 | <div slot="body"> |
| 275 | <p class="modal-body"> |
| 276 | Large modals provide ample space for complex content, detailed forms, or multiple sections of information. They're ideal for admin panels, data tables, or comprehensive settings pages. |
| 277 | </p> |
| 278 | <div class="content-grid"> |
| 279 | <div class="content-card"> |
| 280 | <h4>Section 1</h4> |
| 281 | <p>Content for the first section with detailed information.</p> |
| 282 | </div> |
| 283 | <div class="content-card"> |
| 284 | <h4>Section 2</h4> |
| 285 | <p>Content for the second section with additional details.</p> |
| 286 | </div> |
| 287 | <div class="content-card"> |
| 288 | <h4>Section 3</h4> |
| 289 | <p>Content for the third section with more information.</p> |
| 290 | </div> |
| 291 | <div class="content-card"> |
| 292 | <h4>Section 4</h4> |
| 293 | <p>Content for the fourth section completing the grid.</p> |
| 294 | </div> |
| 295 | </div> |
| 296 | </div> |
| 297 | <div slot="footer"> |
| 298 | <div class="modal-actions"> |
| 299 | <semantic-action intent="secondary" onclick="document.getElementById('modal-large').close()">Cancel</semantic-action> |
| 300 | <semantic-action intent="primary" onclick="document.getElementById('modal-large').close()">Save Changes</semantic-action> |
| 301 | </div> |
| 302 | </div> |
| 303 | </semantic-modal> |
| 304 | |
| 305 | <!-- Fullscreen Modal --> |
| 306 | <semantic-modal id="modal-fullscreen" size="fullscreen"> |
| 307 | <div slot="header"> |
| 308 | <h3 class="modal-title">Fullscreen Modal</h3> |
| 309 | </div> |
| 310 | <div slot="body"> |
| 311 | <p class="modal-body"> |
| 312 | Fullscreen modals take over the entire viewport, perfect for immersive experiences, complex workflows, or when you need maximum space for content. |
| 313 | </p> |
| 314 | <div class="stats-grid"> |
| 315 | <div class="stat-box"> |
| 316 | <div class="stat-value">1,234</div> |
| 317 | <div class="stat-label">Total Users</div> |
| 318 | </div> |
| 319 | <div class="stat-box"> |
| 320 | <div class="stat-value">$45.2K</div> |
| 321 | <div class="stat-label">Revenue</div> |
| 322 | </div> |
| 323 | <div class="stat-box"> |
| 324 | <div class="stat-value">89%</div> |
| 325 | <div class="stat-label">Satisfaction</div> |
| 326 | </div> |
| 327 | </div> |
| 328 | <p class="modal-body"> |
| 329 | Use fullscreen modals for media viewers, rich text editors, data visualization dashboards, or multi-step forms that require focus. |
| 330 | </p> |
| 331 | </div> |
| 332 | <div slot="footer"> |
| 333 | <div class="modal-actions"> |
| 334 | <semantic-action intent="secondary" onclick="document.getElementById('modal-fullscreen').close()">Close</semantic-action> |
| 335 | </div> |
| 336 | </div> |
| 337 | </semantic-modal> |
| 338 | |
| 339 | <!-- Confirmation Dialog --> |
| 340 | <semantic-modal id="modal-confirm" size="small"> |
| 341 | <div slot="header"> |
| 342 | <h3 class="modal-title">Confirm Action</h3> |
| 343 | </div> |
| 344 | <div slot="body"> |
| 345 | <p class="modal-body"> |
| 346 | Are you sure you want to proceed with this action? This operation cannot be undone. |
| 347 | </p> |
| 348 | </div> |
| 349 | <div slot="footer"> |
| 350 | <div class="modal-actions"> |
| 351 | <semantic-action intent="secondary" onclick="document.getElementById('modal-confirm').close()">Cancel</semantic-action> |
| 352 | <semantic-action intent="primary" onclick="document.getElementById('modal-confirm').close()">Confirm</semantic-action> |
| 353 | </div> |
| 354 | </div> |
| 355 | </semantic-modal> |
| 356 | |
| 357 | <!-- Form Modal --> |
| 358 | <semantic-modal id="modal-form"> |
| 359 | <div slot="header"> |
| 360 | <h3 class="modal-title">Create New Project</h3> |
| 361 | </div> |
| 362 | <div slot="body"> |
| 363 | <div class="form-group"> |
| 364 | <label class="form-label">Project Name</label> |
| 365 | <semantic-input type="text" placeholder="My Awesome Project" intent="primary"></semantic-input> |
| 366 | </div> |
| 367 | <div class="form-group"> |
| 368 | <label class="form-label">Description</label> |
| 369 | <semantic-input type="text" placeholder="Describe your project..." intent="primary"></semantic-input> |
| 370 | </div> |
| 371 | <div class="form-row"> |
| 372 | <div class="form-group"> |
| 373 | <label class="form-label">Start Date</label> |
| 374 | <semantic-input type="date" intent="primary"></semantic-input> |
| 375 | </div> |
| 376 | <div class="form-group"> |
| 377 | <label class="form-label">End Date</label> |
| 378 | <semantic-input type="date" intent="primary"></semantic-input> |
| 379 | </div> |
| 380 | </div> |
| 381 | <div class="form-group"> |
| 382 | <label class="form-label">Team Members</label> |
| 383 | <semantic-input type="text" placeholder="Invite team members..." intent="primary"></semantic-input> |
| 384 | </div> |
| 385 | </div> |
| 386 | <div slot="footer"> |
| 387 | <div class="modal-actions"> |
| 388 | <semantic-action intent="secondary" onclick="document.getElementById('modal-form').close()">Cancel</semantic-action> |
| 389 | <semantic-action intent="primary" onclick="document.getElementById('modal-form').close()">Create Project</semantic-action> |
| 390 | </div> |
| 391 | </div> |
| 392 | </semantic-modal> |
| 393 | |
| 394 | <!-- Details View --> |
| 395 | <semantic-modal id="modal-details" size="large"> |
| 396 | <div slot="header"> |
| 397 | <h3 class="modal-title">Project Details: Website Redesign</h3> |
| 398 | </div> |
| 399 | <div slot="body"> |
| 400 | <p class="modal-body"> |
| 401 | <strong>Status:</strong> <semantic-badge intent="success">Active</semantic-badge> |
| 402 | <strong style="margin-left: 20px;">Priority:</strong> <semantic-badge intent="warning">High</semantic-badge> |
| 403 | </p> |
| 404 | |
| 405 | <div class="stats-grid"> |
| 406 | <div class="stat-box"> |
| 407 | <div class="stat-value">12</div> |
| 408 | <div class="stat-label">Team Members</div> |
| 409 | </div> |
| 410 | <div class="stat-box"> |
| 411 | <div class="stat-value">68%</div> |
| 412 | <div class="stat-label">Complete</div> |
| 413 | </div> |
| 414 | <div class="stat-box"> |
| 415 | <div class="stat-value">15</div> |
| 416 | <div class="stat-label">Days Remaining</div> |
| 417 | </div> |
| 418 | </div> |
| 419 | |
| 420 | <h4 style="margin: 24px 0 12px 0; font-size: 16px;">Description</h4> |
| 421 | <p class="modal-body"> |
| 422 | Complete redesign of the company website with modern UI/UX, improved performance, and mobile-first approach. The project includes user research, wireframing, design mockups, and full implementation. |
| 423 | </p> |
| 424 | |
| 425 | <h4 style="margin: 24px 0 12px 0; font-size: 16px;">Key Deliverables</h4> |
| 426 | <ul class="feature-list"> |
| 427 | <li>✓ User research and personas</li> |
| 428 | <li>✓ Wireframes and prototypes</li> |
| 429 | <li>⏳ Visual design mockups (In Progress)</li> |
| 430 | <li>⏳ Frontend implementation</li> |
| 431 | <li>○ Testing and QA</li> |
| 432 | <li>○ Launch and deployment</li> |
| 433 | </ul> |
| 434 | </div> |
| 435 | <div slot="footer"> |
| 436 | <div class="modal-actions"> |
| 437 | <semantic-action intent="secondary" onclick="document.getElementById('modal-details').close()">Close</semantic-action> |
| 438 | <semantic-action intent="primary" onclick="document.getElementById('modal-details').close()">Edit Project</semantic-action> |
| 439 | </div> |
| 440 | </div> |
| 441 | </semantic-modal> |
| 442 | |
| 443 | <!-- Success Message --> |
| 444 | <semantic-modal id="modal-success" size="small"> |
| 445 | <div slot="body"> |
| 446 | <div class="alert-icon">✅</div> |
| 447 | <h3 class="modal-title" style="text-align: center;">Success!</h3> |
| 448 | <p class="modal-body" style="text-align: center;"> |
| 449 | Your changes have been saved successfully. |
| 450 | </p> |
| 451 | </div> |
| 452 | <div slot="footer"> |
| 453 | <div class="modal-actions" style="justify-content: center;"> |
| 454 | <semantic-action intent="success" onclick="document.getElementById('modal-success').close()">Great!</semantic-action> |
| 455 | </div> |
| 456 | </div> |
| 457 | </semantic-modal> |
| 458 | |
| 459 | <!-- Delete Warning --> |
| 460 | <semantic-modal id="modal-delete" size="small"> |
| 461 | <div slot="body"> |
| 462 | <div class="alert-icon">⚠️</div> |
| 463 | <h3 class="modal-title" style="text-align: center;">Delete Item?</h3> |
| 464 | <p class="modal-body" style="text-align: center;"> |
| 465 | This action cannot be undone. Are you sure you want to permanently delete this item? |
| 466 | </p> |
| 467 | </div> |
| 468 | <div slot="footer"> |
| 469 | <div class="modal-actions"> |
| 470 | <semantic-action intent="secondary" onclick="document.getElementById('modal-delete').close()">Cancel</semantic-action> |
| 471 | <semantic-action intent="danger" onclick="document.getElementById('modal-delete').close()">Delete</semantic-action> |
| 472 | </div> |
| 473 | </div> |
| 474 | </semantic-modal> |
| 475 | |
| 476 | <!-- Warning Alert --> |
| 477 | <semantic-modal id="modal-warning" size="small"> |
| 478 | <div slot="body"> |
| 479 | <div class="alert-icon">⚡</div> |
| 480 | <h3 class="modal-title" style="text-align: center;">Warning</h3> |
| 481 | <p class="modal-body" style="text-align: center;"> |
| 482 | Your session will expire in 5 minutes. Please save your work to avoid losing any changes. |
| 483 | </p> |
| 484 | </div> |
| 485 | <div slot="footer"> |
| 486 | <div class="modal-actions" style="justify-content: center;"> |
| 487 | <semantic-action intent="warning" onclick="document.getElementById('modal-warning').close()">Extend Session</semantic-action> |
| 488 | </div> |
| 489 | </div> |
| 490 | </semantic-modal> |
| 491 | |
| 492 | <!-- Pricing Plans --> |
| 493 | <semantic-modal id="modal-pricing" size="large"> |
| 494 | <div slot="header"> |
| 495 | <h3 class="modal-title">Choose Your Plan</h3> |
| 496 | </div> |
| 497 | <div slot="body"> |
| 498 | <div class="content-grid"> |
| 499 | <div class="content-card" style="border: 2px solid #3a3a3c;"> |
| 500 | <h4>Starter</h4> |
| 501 | <div class="price-tag">$9<small>/month</small></div> |
| 502 | <ul class="feature-list"> |
| 503 | <li>✓ 10 Projects</li> |
| 504 | <li>✓ 5GB Storage</li> |
| 505 | <li>✓ Email Support</li> |
| 506 | <li>✓ Basic Analytics</li> |
| 507 | </ul> |
| 508 | <semantic-action intent="secondary" style="width: 100%;">Select Plan</semantic-action> |
| 509 | </div> |
| 510 | <div class="content-card" style="border: 2px solid #409cff;"> |
| 511 | <semantic-badge intent="primary">Popular</semantic-badge> |
| 512 | <h4>Professional</h4> |
| 513 | <div class="price-tag">$29<small>/month</small></div> |
| 514 | <ul class="feature-list"> |
| 515 | <li>✓ Unlimited Projects</li> |
| 516 | <li>✓ 100GB Storage</li> |
| 517 | <li>✓ Priority Support</li> |
| 518 | <li>✓ Advanced Analytics</li> |
| 519 | <li>✓ Custom Domains</li> |
| 520 | </ul> |
| 521 | <semantic-action intent="primary" style="width: 100%;">Select Plan</semantic-action> |
| 522 | </div> |
| 523 | </div> |
| 524 | </div> |
| 525 | <div slot="footer"> |
| 526 | <div class="modal-actions"> |
| 527 | <semantic-action intent="secondary" onclick="document.getElementById('modal-pricing').close()">Maybe Later</semantic-action> |
| 528 | </div> |
| 529 | </div> |
| 530 | </semantic-modal> |
| 531 | |
| 532 | <!-- Image Gallery --> |
| 533 | <semantic-modal id="modal-gallery" size="large"> |
| 534 | <div slot="header"> |
| 535 | <h3 class="modal-title">Product Gallery</h3> |
| 536 | </div> |
| 537 | <div slot="body"> |
| 538 | <div class="image-preview">📷</div> |
| 539 | <p class="modal-body" style="text-align: center;"> |
| 540 | <strong>Premium Wireless Headphones</strong><br> |
| 541 | Professional audio quality with active noise cancellation |
| 542 | </p> |
| 543 | </div> |
| 544 | <div slot="footer"> |
| 545 | <div class="modal-actions"> |
| 546 | <semantic-action intent="secondary" onclick="document.getElementById('modal-gallery').close()">Close</semantic-action> |
| 547 | <semantic-action intent="primary" onclick="document.getElementById('modal-gallery').close()">Add to Cart</semantic-action> |
| 548 | </div> |
| 549 | </div> |
| 550 | </semantic-modal> |
| 551 | |
| 552 | <!-- Settings Panel --> |
| 553 | <semantic-modal id="modal-settings" size="large"> |
| 554 | <div slot="header"> |
| 555 | <h3 class="modal-title">Application Settings</h3> |
| 556 | </div> |
| 557 | <div slot="body"> |
| 558 | <semantic-tabs> |
| 559 | <tab-item label="General" active></tab-item> |
| 560 | <tab-item label="Privacy"></tab-item> |
| 561 | <tab-item label="Notifications"></tab-item> |
| 562 | </semantic-tabs> |
| 563 | |
| 564 | <div style="margin-top: 24px;"> |
| 565 | <div class="form-group"> |
| 566 | <label class="form-label">App Language</label> |
| 567 | <semantic-input type="text" value="English" intent="primary"></semantic-input> |
| 568 | </div> |
| 569 | <div class="form-group"> |
| 570 | <label class="form-label">Time Zone</label> |
| 571 | <semantic-input type="text" value="Pacific Time (PT)" intent="primary"></semantic-input> |
| 572 | </div> |
| 573 | <div class="form-group"> |
| 574 | <label class="form-label">Theme</label> |
| 575 | <semantic-input type="text" value="Dark Mode" intent="primary"></semantic-input> |
| 576 | </div> |
| 577 | </div> |
| 578 | </div> |
| 579 | <div slot="footer"> |
| 580 | <div class="modal-actions"> |
| 581 | <semantic-action intent="secondary" onclick="document.getElementById('modal-settings').close()">Cancel</semantic-action> |
| 582 | <semantic-action intent="primary" onclick="document.getElementById('modal-settings').close()">Save Settings</semantic-action> |
| 583 | </div> |
| 584 | </div> |
| 585 | </semantic-modal> |
| 586 | |
| 587 | <!-- Dashboard Stats --> |
| 588 | <semantic-modal id="modal-dashboard" size="fullscreen"> |
| 589 | <div slot="header"> |
| 590 | <h3 class="modal-title">Analytics Dashboard</h3> |
| 591 | </div> |
| 592 | <div slot="body"> |
| 593 | <div class="stats-grid"> |
| 594 | <div class="stat-box"> |
| 595 | <div class="stat-value">12,458</div> |
| 596 | <div class="stat-label">Total Visitors</div> |
| 597 | </div> |
| 598 | <div class="stat-box"> |
| 599 | <div class="stat-value">$67.5K</div> |
| 600 | <div class="stat-label">Revenue</div> |
| 601 | </div> |
| 602 | <div class="stat-box"> |
| 603 | <div class="stat-value">3,247</div> |
| 604 | <div class="stat-label">Conversions</div> |
| 605 | </div> |
| 606 | <div class="stat-box"> |
| 607 | <div class="stat-value">4.8%</div> |
| 608 | <div class="stat-label">Bounce Rate</div> |
| 609 | </div> |
| 610 | <div class="stat-box"> |
| 611 | <div class="stat-value">2m 34s</div> |
| 612 | <div class="stat-label">Avg. Session</div> |
| 613 | </div> |
| 614 | <div class="stat-box"> |
| 615 | <div class="stat-value">92%</div> |
| 616 | <div class="stat-label">Satisfaction</div> |
| 617 | </div> |
| 618 | </div> |
| 619 | |
| 620 | <div style="margin-top: 40px;"> |
| 621 | <h4 style="font-size: 16px; margin-bottom: 16px;">Recent Activity</h4> |
| 622 | <div style="background: #2c2c2e; padding: 20px; border-radius: 8px;"> |
| 623 | <p style="margin: 0; color: #8e8e93;"> |
| 624 | Chart and detailed analytics would be displayed here in a real dashboard. |
| 625 | </p> |
| 626 | </div> |
| 627 | </div> |
| 628 | </div> |
| 629 | <div slot="footer"> |
| 630 | <div class="modal-actions"> |
| 631 | <semantic-action intent="secondary" onclick="document.getElementById('modal-dashboard').close()">Close</semantic-action> |
| 632 | <semantic-action intent="primary" onclick="document.getElementById('modal-dashboard').close()">Export Data</semantic-action> |
| 633 | </div> |
| 634 | </div> |
| 635 | </semantic-modal> |
| 636 | |
| 637 | <!-- Checkout Flow --> |
| 638 | <semantic-modal id="modal-checkout"> |
| 639 | <div slot="header"> |
| 640 | <h3 class="modal-title">Secure Checkout</h3> |
| 641 | </div> |
| 642 | <div slot="body"> |
| 643 | <semantic-progress value="66" max="100" intent="success"></semantic-progress> |
| 644 | <p style="color: #8e8e93; font-size: 13px; margin: 8px 0 24px 0;">Step 2 of 3: Payment Information</p> |
| 645 | |
| 646 | <div class="form-group"> |
| 647 | <label class="form-label">Card Number</label> |
| 648 | <semantic-input type="text" placeholder="1234 5678 9012 3456" intent="primary"></semantic-input> |
| 649 | </div> |
| 650 | <div class="form-row"> |
| 651 | <div class="form-group"> |
| 652 | <label class="form-label">Expiry Date</label> |
| 653 | <semantic-input type="text" placeholder="MM/YY" intent="primary"></semantic-input> |
| 654 | </div> |
| 655 | <div class="form-group"> |
| 656 | <label class="form-label">CVV</label> |
| 657 | <semantic-input type="text" placeholder="123" intent="primary"></semantic-input> |
| 658 | </div> |
| 659 | </div> |
| 660 | </div> |
| 661 | <div slot="footer"> |
| 662 | <div class="modal-actions"> |
| 663 | <semantic-action intent="secondary" onclick="document.getElementById('modal-checkout').close()">Back</semantic-action> |
| 664 | <semantic-action intent="primary" onclick="document.getElementById('modal-checkout').close()">Continue</semantic-action> |
| 665 | </div> |
| 666 | </div> |
| 667 | </semantic-modal> |
| 668 | |
| 669 | <!-- User Profile --> |
| 670 | <semantic-modal id="modal-profile"> |
| 671 | <div slot="header"> |
| 672 | <h3 class="modal-title">Edit Profile</h3> |
| 673 | </div> |
| 674 | <div slot="body"> |
| 675 | <div style="text-align: center; margin-bottom: 24px;"> |
| 676 | <div style="width: 80px; height: 80px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 40px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 32px;"> |
| 677 | 👤 |
| 678 | </div> |
| 679 | <semantic-action intent="secondary" size="small">Change Photo</semantic-action> |
| 680 | </div> |
| 681 | |
| 682 | <div class="form-row"> |
| 683 | <div class="form-group"> |
| 684 | <label class="form-label">First Name</label> |
| 685 | <semantic-input type="text" value="John" intent="primary"></semantic-input> |
| 686 | </div> |
| 687 | <div class="form-group"> |
| 688 | <label class="form-label">Last Name</label> |
| 689 | <semantic-input type="text" value="Doe" intent="primary"></semantic-input> |
| 690 | </div> |
| 691 | </div> |
| 692 | <div class="form-group"> |
| 693 | <label class="form-label">Email</label> |
| 694 | <semantic-input type="email" value="john@example.com" intent="primary"></semantic-input> |
| 695 | </div> |
| 696 | <div class="form-group"> |
| 697 | <label class="form-label">Bio</label> |
| 698 | <semantic-input type="text" value="Designer & Developer" intent="primary"></semantic-input> |
| 699 | </div> |
| 700 | </div> |
| 701 | <div slot="footer"> |
| 702 | <div class="modal-actions"> |
| 703 | <semantic-action intent="secondary" onclick="document.getElementById('modal-profile').close()">Cancel</semantic-action> |
| 704 | <semantic-action intent="primary" onclick="document.getElementById('modal-profile').close()">Save Changes</semantic-action> |
| 705 | </div> |
| 706 | </div> |
| 707 | </semantic-modal> |
| 708 | |
| 709 | <script> |
| 710 | // Trigger buttons |
| 711 | document.getElementById('btn-small').addEventListener('click', () => { |
| 712 | document.getElementById('modal-small').open(); |
| 713 | }); |
| 714 | |
| 715 | document.getElementById('btn-medium').addEventListener('click', () => { |
| 716 | document.getElementById('modal-medium').open(); |
| 717 | }); |
| 718 | |
| 719 | document.getElementById('btn-large').addEventListener('click', () => { |
| 720 | document.getElementById('modal-large').open(); |
| 721 | }); |
| 722 | |
| 723 | document.getElementById('btn-fullscreen').addEventListener('click', () => { |
| 724 | document.getElementById('modal-fullscreen').open(); |
| 725 | }); |
| 726 | |
| 727 | document.getElementById('btn-confirm').addEventListener('click', () => { |
| 728 | document.getElementById('modal-confirm').open(); |
| 729 | }); |
| 730 | |
| 731 | document.getElementById('btn-form').addEventListener('click', () => { |
| 732 | document.getElementById('modal-form').open(); |
| 733 | }); |
| 734 | |
| 735 | document.getElementById('btn-details').addEventListener('click', () => { |
| 736 | document.getElementById('modal-details').open(); |
| 737 | }); |
| 738 | |
| 739 | document.getElementById('btn-success').addEventListener('click', () => { |
| 740 | document.getElementById('modal-success').open(); |
| 741 | }); |
| 742 | |
| 743 | document.getElementById('btn-delete').addEventListener('click', () => { |
| 744 | document.getElementById('modal-delete').open(); |
| 745 | }); |
| 746 | |
| 747 | document.getElementById('btn-warning').addEventListener('click', () => { |
| 748 | document.getElementById('modal-warning').open(); |
| 749 | }); |
| 750 | |
| 751 | document.getElementById('btn-pricing').addEventListener('click', () => { |
| 752 | document.getElementById('modal-pricing').open(); |
| 753 | }); |
| 754 | |
| 755 | document.getElementById('btn-gallery').addEventListener('click', () => { |
| 756 | document.getElementById('modal-gallery').open(); |
| 757 | }); |
| 758 | |
| 759 | document.getElementById('btn-settings').addEventListener('click', () => { |
| 760 | document.getElementById('modal-settings').open(); |
| 761 | }); |
| 762 | |
| 763 | document.getElementById('btn-dashboard').addEventListener('click', () => { |
| 764 | document.getElementById('modal-dashboard').open(); |
| 765 | }); |
| 766 | |
| 767 | document.getElementById('btn-checkout').addEventListener('click', () => { |
| 768 | document.getElementById('modal-checkout').open(); |
| 769 | }); |
| 770 | |
| 771 | document.getElementById('btn-profile').addEventListener('click', () => { |
| 772 | document.getElementById('modal-profile').open(); |
| 773 | }); |
| 774 | |
| 775 | console.log('Total modals on page:', document.querySelectorAll('semantic-modal').length); |
| 776 | </script> |
| 777 | </body> |
| 778 | </html> |