@shohojdhara/atomix 0.4.4 → 0.4.6

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.
Files changed (62) hide show
  1. package/dist/atomix.css +50 -11
  2. package/dist/atomix.css.map +1 -1
  3. package/dist/atomix.min.css +1 -1
  4. package/dist/atomix.min.css.map +1 -1
  5. package/dist/charts.js +184 -189
  6. package/dist/charts.js.map +1 -1
  7. package/dist/core.d.ts +4 -4
  8. package/dist/core.js +194 -199
  9. package/dist/core.js.map +1 -1
  10. package/dist/forms.js +184 -189
  11. package/dist/forms.js.map +1 -1
  12. package/dist/heavy.js +189 -194
  13. package/dist/heavy.js.map +1 -1
  14. package/dist/index.d.ts +44 -47
  15. package/dist/index.esm.js +496 -613
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +528 -631
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.min.js +1 -1
  20. package/dist/index.min.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/AtomixGlass/AtomixGlass.tsx +60 -39
  23. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +8 -42
  24. package/src/components/AtomixGlass/glass-utils.ts +27 -14
  25. package/src/components/AtomixGlass/stories/Overview.stories.tsx +19 -21
  26. package/src/components/AtomixGlass/stories/Playground.stories.tsx +1162 -515
  27. package/src/components/AtomixGlass/stories/shared-components.tsx +11 -3
  28. package/src/components/Breadcrumb/Breadcrumb.tsx +5 -5
  29. package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +2 -2
  30. package/src/components/Button/Button.tsx +6 -6
  31. package/src/components/Card/Card.tsx +3 -3
  32. package/src/components/Dropdown/Dropdown.tsx +5 -3
  33. package/src/components/Footer/Footer.tsx +124 -166
  34. package/src/components/Footer/FooterLink.tsx +16 -19
  35. package/src/components/Footer/FooterSection.tsx +40 -39
  36. package/src/components/Footer/FooterSocialLink.tsx +59 -58
  37. package/src/components/Footer/README.md +1 -1
  38. package/src/components/Hero/Hero.tsx +72 -142
  39. package/src/components/Navigation/Menu/MegaMenu.tsx +17 -12
  40. package/src/components/Navigation/Menu/Menu.tsx +49 -24
  41. package/src/components/Navigation/Nav/NavItem.tsx +5 -3
  42. package/src/components/Navigation/Navbar/Navbar.tsx +13 -5
  43. package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -2
  44. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +4 -4
  45. package/src/components/Slider/Slider.tsx +7 -4
  46. package/src/lib/composables/index.ts +1 -2
  47. package/src/lib/composables/useAtomixGlass.ts +246 -222
  48. package/src/lib/composables/useAtomixGlassStyles.ts +46 -23
  49. package/src/lib/composables/useFooter.ts +117 -20
  50. package/src/lib/composables/useSlider.ts +3 -1
  51. package/src/lib/constants/components.ts +3 -1
  52. package/src/lib/types/components.ts +44 -12
  53. package/src/styles/06-components/_components.atomix-glass.scss +72 -14
  54. package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +0 -222
  55. package/src/lib/composables/atomix-glass/useGlassBackgroundDetection.ts +0 -329
  56. package/src/lib/composables/atomix-glass/useGlassCornerRadius.ts +0 -82
  57. package/src/lib/composables/atomix-glass/useGlassMouseTracking.ts +0 -153
  58. package/src/lib/composables/atomix-glass/useGlassOverLight.ts +0 -198
  59. package/src/lib/composables/atomix-glass/useGlassState.ts +0 -112
  60. package/src/lib/composables/atomix-glass/useGlassTransforms.ts +0 -160
  61. package/src/lib/composables/glass-styles.ts +0 -302
  62. package/src/lib/composables/useGlassContainer.ts +0 -177
@@ -12,8 +12,7 @@
12
12
  import { Meta, StoryObj } from '@storybook/react';
13
13
  import AtomixGlass from '../AtomixGlass';
14
14
  import Button from '../../Button/Button';
15
- import { Toggle } from '../../Toggle/Toggle';
16
- import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
15
+ import { useState, useEffect, useCallback, useRef } from 'react';
17
16
  import React from 'react';
18
17
  import type { RefObject } from 'react';
19
18
 
@@ -162,19 +161,19 @@ type Story = StoryObj<typeof AtomixGlass>;
162
161
  *
163
162
  * @component BackgroundWrapper
164
163
  */
164
+ interface BgItem {
165
+ url: string;
166
+ label: string;
167
+ tag: 'dark' | 'colorful' | 'light' | 'nature';
168
+ }
169
+
165
170
  interface BackgroundWrapperProps {
166
171
  /** Child elements to render inside the wrapper */
167
172
  children: React.ReactNode;
168
- /** Array of background images */
169
- backgrounds?: string[];
173
+ /** Array of background image objects */
174
+ backgrounds?: BgItem[];
170
175
  /** Active background index */
171
176
  activeIndex?: number;
172
- /** Optional overlay flag for quick overlay application */
173
- overlay?: boolean;
174
- /** Custom overlay color in CSS format */
175
- overlayColor?: string;
176
- /** Overlay opacity (0-1) */
177
- overlayOpacity?: number;
178
177
  /** Container height */
179
178
  height?: string;
180
179
  /** Container width */
@@ -187,8 +186,6 @@ interface BackgroundWrapperProps {
187
186
  className?: string;
188
187
  /** Additional inline styles */
189
188
  style?: React.CSSProperties;
190
- /** Enable interactive background movement */
191
- interactive?: boolean;
192
189
  }
193
190
 
194
191
  /**
@@ -254,16 +251,15 @@ const BackgroundWrapper = ({
254
251
  >
255
252
  {backgrounds.map((bg, i) => (
256
253
  <div
257
- key={bg}
254
+ key={bg.url}
258
255
  style={{
259
256
  position: 'absolute',
260
257
  inset: 0,
261
- backgroundImage: `url(${bg})`,
258
+ backgroundImage: `url(${bg.url})`,
262
259
  backgroundSize: 'cover',
263
260
  backgroundPosition: 'center',
264
261
  opacity: i === activeIndex ? 1 : 0,
265
- visibility: i === activeIndex ? 'visible' : 'hidden',
266
- transition: 'opacity 800ms ease-in-out',
262
+ transition: 'opacity 900ms cubic-bezier(0.4, 0, 0.2, 1)',
267
263
  }}
268
264
  />
269
265
  ))}
@@ -311,6 +307,12 @@ export const Playground: Story = {
311
307
  // eslint-disable-next-line react-hooks/rules-of-hooks
312
308
  const [backgroundIndex, setBackgroundIndex] = useState(0);
313
309
  // eslint-disable-next-line react-hooks/rules-of-hooks
310
+ const [autoPlay, setAutoPlay] = useState(false);
311
+ // eslint-disable-next-line react-hooks/rules-of-hooks
312
+ const [activeTag, setActiveTag] = useState<'all' | 'dark' | 'colorful' | 'light' | 'nature'>(
313
+ 'all'
314
+ );
315
+ // eslint-disable-next-line react-hooks/rules-of-hooks
314
316
  const [selectedMode, setSelectedMode] = useState<'standard' | 'polar' | 'prominent' | 'shader'>(
315
317
  'standard'
316
318
  );
@@ -322,6 +324,10 @@ export const Playground: Story = {
322
324
  const [showCode, setShowCode] = useState(false);
323
325
  // eslint-disable-next-line react-hooks/rules-of-hooks
324
326
  const [copiedCode, setCopiedCode] = useState(false);
327
+ // eslint-disable-next-line react-hooks/rules-of-hooks
328
+ const [controlTab, setControlTab] = useState<'optics' | 'physics' | 'flags'>('optics');
329
+ // eslint-disable-next-line react-hooks/rules-of-hooks
330
+ const backgroundsArrayRef = useRef<typeof backgrounds | null>(null);
325
331
 
326
332
  const presets = {
327
333
  minimal: {
@@ -438,6 +444,31 @@ export const Playground: Story = {
438
444
 
439
445
  // ... rest of the component
440
446
 
447
+ // eslint-disable-next-line react-hooks/rules-of-hooks
448
+ useEffect(() => {
449
+ if (!autoPlay) return;
450
+ const interval = setInterval(() => {
451
+ setBackgroundIndex(prev => (prev + 1) % (backgroundsArrayRef.current?.length ?? 20));
452
+ }, 4000);
453
+ return () => clearInterval(interval);
454
+ }, [autoPlay]);
455
+
456
+ // eslint-disable-next-line react-hooks/rules-of-hooks
457
+ useEffect(() => {
458
+ const handler = (e: KeyboardEvent) => {
459
+ if (e.key === 'ArrowRight')
460
+ setBackgroundIndex(prev => (prev + 1) % (backgroundsArrayRef.current?.length ?? 20));
461
+ if (e.key === 'ArrowLeft')
462
+ setBackgroundIndex(
463
+ prev =>
464
+ (prev - 1 + (backgroundsArrayRef.current?.length ?? 20)) %
465
+ (backgroundsArrayRef.current?.length ?? 20)
466
+ );
467
+ };
468
+ window.addEventListener('keydown', handler);
469
+ return () => window.removeEventListener('keydown', handler);
470
+ }, []);
471
+
441
472
  const options = [
442
473
  { value: 'liquidGlass', label: 'Liquid Glass (Standard)' },
443
474
  { value: 'premiumGlass', label: 'Premium Glass' },
@@ -493,127 +524,261 @@ export const Playground: Story = {
493
524
  return 'Heavy';
494
525
  };
495
526
 
496
- const backgrounds = [
497
- 'https://images.unsplash.com/photo-1579546929518-9e396f3cc809',
498
- 'https://images.unsplash.com/photo-1734760858517-ff3e30c4a420?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=987',
499
- 'https://images.unsplash.com/photo-1590634875052-89c137f8df21?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2072',
500
- 'https://images.unsplash.com/photo-1592880476174-2932b3061c30?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2070',
501
- 'https://images.unsplash.com/photo-1591241902480-6cf22542003c?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2070',
502
- 'https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?auto=format&fit=crop&q=80&w=2013',
503
- 'https://images.unsplash.com/photo-1706983677486-3ac9ecbad2e5?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=3132',
504
- 'https://images.unsplash.com/photo-1591322874022-2f5daab8d3d5?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2070',
505
- 'https://images.unsplash.com/photo-1709653600438-08b8088fe0c3?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2670',
506
- 'https://images.unsplash.com/photo-1670758144077-b655e19c75e9?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1974',
507
- 'https://images.unsplash.com/photo-1719583225873-ea5993eb4fcd?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2070',
508
- 'https://images.unsplash.com/photo-1639135650365-516c5bdb40fc?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2073',
509
- 'https://images.unsplash.com/photo-1760592150404-adacb88548e2?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1035',
510
- 'https://images.unsplash.com/photo-1638403338703-672ec4b3c19e?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=1974',
511
- 'https://images.unsplash.com/photo-1639680774410-ced42af91b80?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=987',
512
- 'https://images.unsplash.com/photo-1636757577341-5c135250786d?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=987',
513
- 'https://images.unsplash.com/photo-1653443688877-ff1d74f1e4a0?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=987',
514
- 'https://images.unsplash.com/photo-1495164678535-ecbd76d9fa7d?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2669',
515
- 'https://images.unsplash.com/photo-1742502575383-b908da0fb3ba?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2673',
516
- 'https://images.unsplash.com/photo-1627057075078-26c7caf11dc2?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2674',
527
+ // Backgrounds curated for glass testing: vivid colors, high contrast, varied light conditions
528
+ const backgrounds: {
529
+ url: string;
530
+ label: string;
531
+ tag: 'dark' | 'colorful' | 'light' | 'nature';
532
+ }[] = [
533
+ {
534
+ url: 'https://images.unsplash.com/photo-1579546929518-9e396f3cc809?auto=format&fit=crop&q=80&w=1600',
535
+ label: 'Rainbow Gradient',
536
+ tag: 'colorful',
537
+ },
538
+ {
539
+ url: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&q=80&w=1600',
540
+ label: 'Mountain Peaks',
541
+ tag: 'nature',
542
+ },
543
+ {
544
+ url: 'https://images.unsplash.com/photo-1531366936337-7c912a4589a7?auto=format&fit=crop&q=80&w=1600',
545
+ label: 'Aurora Borealis',
546
+ tag: 'dark',
547
+ },
548
+ {
549
+ url: 'https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&q=80&w=1600',
550
+ label: 'Neon City',
551
+ tag: 'dark',
552
+ },
553
+ {
554
+ url: 'https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&q=80&w=1600',
555
+ label: 'Purple Nebula',
556
+ tag: 'dark',
557
+ },
558
+ {
559
+ url: 'https://images.unsplash.com/photo-1635776062127-d379bfcba9f8?auto=format&fit=crop&q=80&w=1600',
560
+ label: 'Liquid Ink',
561
+ tag: 'colorful',
562
+ },
563
+ {
564
+ url: 'https://images.unsplash.com/photo-1519608425089-7f3bfa6f6bb8?auto=format&fit=crop&q=80&w=1600',
565
+ label: 'Ocean Waves',
566
+ tag: 'nature',
567
+ },
568
+ {
569
+ url: 'https://images.unsplash.com/photo-1536514498073-50e69d39c6cf?auto=format&fit=crop&q=80&w=1600',
570
+ label: 'Pink Sunset',
571
+ tag: 'colorful',
572
+ },
573
+ {
574
+ url: 'https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?auto=format&fit=crop&q=80&w=1600',
575
+ label: 'Starfield',
576
+ tag: 'dark',
577
+ },
578
+ {
579
+ url: 'https://images.unsplash.com/photo-1498036882173-b41c28a8ba34?auto=format&fit=crop&q=80&w=1600',
580
+ label: 'Flower Bloom',
581
+ tag: 'colorful',
582
+ },
583
+ {
584
+ url: 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&q=80&w=1600',
585
+ label: 'Alpine Lake',
586
+ tag: 'nature',
587
+ },
588
+ {
589
+ url: 'https://images.unsplash.com/photo-1518020382113-a7e8fc38eac9?auto=format&fit=crop&q=80&w=1600',
590
+ label: 'Coral Reef',
591
+ tag: 'colorful',
592
+ },
593
+ {
594
+ url: 'https://images.unsplash.com/photo-1483347756197-71ef80e95f73?auto=format&fit=crop&q=80&w=1600',
595
+ label: 'Storm Clouds',
596
+ tag: 'dark',
597
+ },
598
+ {
599
+ url: 'https://images.unsplash.com/photo-1501854140801-50d01698950b?auto=format&fit=crop&q=80&w=1600',
600
+ label: 'Green Forest',
601
+ tag: 'nature',
602
+ },
603
+ {
604
+ url: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&q=80&w=1600',
605
+ label: 'Tropical Beach',
606
+ tag: 'light',
607
+ },
608
+ {
609
+ url: 'https://images.unsplash.com/photo-1544553543-ad91a1373103?auto=format&fit=crop&q=80&w=1600',
610
+ label: 'Abstract Prism',
611
+ tag: 'colorful',
612
+ },
613
+ {
614
+ url: 'https://images.unsplash.com/photo-1517816630506-a8c5ccf61608?auto=format&fit=crop&q=80&w=1600',
615
+ label: 'Desert Dunes',
616
+ tag: 'light',
617
+ },
618
+ {
619
+ url: 'https://images.unsplash.com/photo-1553984840-b8cbc34f5215?auto=format&fit=crop&q=80&w=1600',
620
+ label: 'Neon Lights',
621
+ tag: 'dark',
622
+ },
623
+ {
624
+ url: 'https://images.unsplash.com/photo-1502134249126-9f3755a50d78?auto=format&fit=crop&q=80&w=1600',
625
+ label: 'Sunrise Mist',
626
+ tag: 'light',
627
+ },
628
+ {
629
+ url: 'https://images.unsplash.com/photo-1604871000636-074fa5117945?auto=format&fit=crop&q=80&w=1600',
630
+ label: 'Vivid Abstract',
631
+ tag: 'colorful',
632
+ },
517
633
  ];
518
634
 
519
635
  return (
520
- <BackgroundWrapper backgrounds={backgrounds} activeIndex={backgroundIndex}>
521
- <div className="o-container">
522
- <div className="o-grid">
523
- <div className="o-grid__col o-grid__col--4">
524
- {/* Control Panel */}
525
-
526
- <AtomixGlass blurAmount={10} elasticity={0} displacementScale={20} padding="20px">
636
+ <BackgroundWrapper backgrounds={backgrounds} activeIndex={backgroundIndex} padding="0">
637
+ <style
638
+ dangerouslySetInnerHTML={{
639
+ __html: `
640
+ .custom-scrollbar::-webkit-scrollbar {
641
+ width: 6px;
642
+ }
643
+ .custom-scrollbar::-webkit-scrollbar-track {
644
+ background: transparent;
645
+ }
646
+ .custom-scrollbar::-webkit-scrollbar-thumb {
647
+ background: rgba(255, 255, 255, 0.2);
648
+ border-radius: 10px;
649
+ }
650
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
651
+ background: rgba(255, 255, 255, 0.3);
652
+ }
653
+ .premium-slider::-webkit-slider-thumb {
654
+ -webkit-appearance: none;
655
+ height: 16px;
656
+ width: 16px;
657
+ border-radius: 50%;
658
+ background: #fff;
659
+ cursor: pointer;
660
+ box-shadow: 0 0 10px rgba(0,0,0,0.5);
661
+ border: 2px solid #7AFFD7;
662
+ margin-top: -6px;
663
+ transition: transform 0.2s;
664
+ }
665
+ .premium-slider::-webkit-slider-thumb:hover {
666
+ transform: scale(1.2);
667
+ }
668
+ .premium-slider::-webkit-slider-runnable-track {
669
+ -webkit-appearance: none;
670
+ height: 4px;
671
+ background: transparent;
672
+ }
673
+ `,
674
+ }}
675
+ />
676
+ <div className="u-w-100 u-p-3 u-p-lg-4" style={{ boxSizing: 'border-box' }}>
677
+ <div
678
+ className="u-grid u-gap-3 u-mx-auto"
679
+ style={{
680
+ gridTemplateColumns: 'minmax(300px, 340px) 1fr',
681
+ maxWidth: '1600px',
682
+ height: '100%',
683
+ maxHeight: '100%',
684
+ }}
685
+ >
686
+ {/* Control Panel Sidebar */}
687
+ <div className="u-h-100 u-relative">
688
+ <AtomixGlass blurAmount={3} elasticity={0} displacementScale={100} borderRadius={20}>
527
689
  <div
690
+ className="u-h-100 u-p-3 custom-scrollbar"
528
691
  style={{
529
- height: '90vh',
530
692
  overflowY: 'auto',
531
- borderRight: '1px solid rgba(255,255,255,0.1)',
532
- padding: '20px',
693
+ border: '1px solid rgba(255,255,255,0.08)',
694
+ borderRadius: '20px',
533
695
  }}
534
696
  >
535
- <div className="u-mb-8">
697
+ {/* === HEADER === */}
698
+ <div className="u-mb-4">
536
699
  <div
700
+ className="u-p-2 u-rounded u-mb-3"
537
701
  style={{
538
- display: 'flex',
539
- alignItems: 'center',
540
- gap: '12px',
541
- marginBottom: '16px',
702
+ background:
703
+ 'linear-gradient(135deg, rgba(102,126,234,0.2) 0%, rgba(118,75,162,0.2) 100%)',
704
+ border: '1px solid rgba(102,126,234,0.3)',
542
705
  }}
543
706
  >
544
- <div
545
- style={{
546
- width: '48px',
547
- height: '48px',
548
- borderRadius: '14px',
549
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
550
- display: 'flex',
551
- alignItems: 'center',
552
- justifyContent: 'center',
553
- fontSize: '24px',
554
- boxShadow: '0 8px 24px rgba(102, 126, 234, 0.4)',
555
- }}
556
- >
557
- 🎮
558
- </div>
559
- <div>
560
- <h2
561
- className="u-m-0 u-text-white u-font-bold"
707
+ <div className="u-flex u-items-center u-gap-3">
708
+ <div
562
709
  style={{
563
- fontSize: '1.75rem',
564
- background:
565
- 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
566
- WebkitBackgroundClip: 'text',
567
- WebkitTextFillColor: 'transparent',
568
- backgroundClip: 'text',
710
+ width: '32px',
711
+ height: '32px',
712
+ borderRadius: '10px',
713
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
714
+ display: 'flex',
715
+ alignItems: 'center',
716
+ justifyContent: 'center',
717
+ fontSize: '16px',
718
+ flexShrink: 0,
719
+ boxShadow: '0 4px 16px rgba(102, 126, 234, 0.5)',
569
720
  }}
570
721
  >
571
- Advanced Playground
572
- </h2>
573
- <p
574
- className="u-m-0 u-text-white u-opacity-80"
575
- style={{ fontSize: '13px', marginTop: '4px' }}
576
- >
577
- Fine-tune every parameter with live preview
578
- </p>
722
+
723
+ </div>
724
+ <div>
725
+ <div
726
+ className="u-font-bold u-fs-sm"
727
+ style={{
728
+ background:
729
+ 'linear-gradient(90deg, #fff 0%, rgba(122,255,215,0.9) 100%)',
730
+ WebkitBackgroundClip: 'text',
731
+ WebkitTextFillColor: 'transparent',
732
+ backgroundClip: 'text',
733
+ letterSpacing: '-0.3px',
734
+ }}
735
+ >
736
+ AtomixGlass Playground
737
+ </div>
738
+ <div className="u-fs-xs u-opacity-60 u-mt-1">Live parameter editor</div>
739
+ </div>
579
740
  </div>
580
741
  </div>
581
742
  </div>
582
743
 
583
744
  {/* Performance Indicator */}
584
745
  <div
585
- className="u-mb-6 u-p-4 u-rounded"
746
+ className="u-mb-4 u-p-2 u-rounded"
586
747
  style={{
587
748
  background: 'rgba(255,255,255,0.05)',
588
- border: `2px solid ${getPerformanceColor()}`,
749
+ border: `1px solid ${getPerformanceColor()}`,
589
750
  }}
590
751
  >
591
752
  <div className="u-flex u-justify-between u-items-center u-mb-2">
592
- <span className="u-text-white u-font-semibold">Performance Score</span>
593
- <span className="u-font-bold" style={{ color: getPerformanceColor() }}>
753
+ <span className="u-text-white u-font-semibold u-fs-xs">
754
+ Performance Score
755
+ </span>
756
+ <span
757
+ className="u-font-bold u-fs-sm"
758
+ style={{ color: getPerformanceColor() }}
759
+ >
594
760
  {Math.round(performanceScore)}/100
595
761
  </span>
596
762
  </div>
597
763
  <div
764
+ className="u-w-100 u-rounded u-overflow-hidden"
598
765
  style={{
599
- height: '8px',
766
+ height: '4px',
600
767
  background: 'rgba(255,255,255,0.1)',
601
- borderRadius: '4px',
602
- overflow: 'hidden',
603
768
  }}
604
769
  >
605
770
  <div
771
+ className="u-h-100"
606
772
  style={{
607
- height: '100%',
608
773
  width: `${performanceScore}%`,
609
774
  background: getPerformanceColor(),
610
- transition: 'all 0.3s',
775
+ transition: 'all 0.3s ease-out',
611
776
  }}
612
777
  />
613
778
  </div>
614
779
  <div
615
- className="u-mt-2 u-text-center u-text-xs"
616
- style={{ color: getPerformanceColor() }}
780
+ className="u-mt-1 u-text-center u-font-medium"
781
+ style={{ color: getPerformanceColor(), fontSize: '10px' }}
617
782
  >
618
783
  {getPerformanceLabel()} -{' '}
619
784
  {performanceScore >= 80
@@ -625,60 +790,51 @@ export const Playground: Story = {
625
790
  </div>
626
791
 
627
792
  {/* Quick Presets */}
628
- <div className="u-mb-6">
793
+ <div className="u-mb-4">
629
794
  <label
630
- className="u-block u-mb-3 u-text-white u-font-semibold"
631
- style={{ fontSize: '14px', letterSpacing: '0.5px' }}
795
+ className="u-block u-mb-2 u-text-white u-font-semibold u-fs-xs"
796
+ style={{ letterSpacing: '0.5px' }}
632
797
  >
633
798
  ⚡ Quick Presets
634
799
  </label>
635
800
  <div
636
- style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '0.75rem' }}
801
+ className="u-grid u-gap-2"
802
+ style={{ gridTemplateColumns: 'repeat(4, 1fr)' }}
637
803
  >
638
804
  {Object.entries(presets).map(([key, preset]) => (
639
805
  <button
640
806
  key={key}
641
807
  onClick={() => applyPreset(key as keyof typeof presets)}
808
+ className="u-px-1 u-py-1 u-rounded u-text-white u-text-center u-relative u-overflow-hidden u-flex u-flex-column u-items-center u-justify-center"
642
809
  style={{
643
- padding: '16px 12px',
644
810
  background: 'rgba(255,255,255,0.08)',
645
- border: '2px solid rgba(255,255,255,0.15)',
646
- borderRadius: '16px',
647
- color: 'white',
811
+ border: '1px solid rgba(255,255,255,0.15)',
648
812
  cursor: 'pointer',
649
- transition: 'all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)',
650
- textAlign: 'center',
651
- position: 'relative',
652
- overflow: 'hidden',
813
+ transition: 'all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1)',
653
814
  }}
654
815
  onMouseEnter={e => {
655
816
  e.currentTarget.style.background = 'rgba(255,255,255,0.15)';
656
817
  e.currentTarget.style.borderColor = 'rgba(255,255,255,0.3)';
657
- e.currentTarget.style.transform = 'translateY(-2px) scale(1.02)';
658
- e.currentTarget.style.boxShadow = '0 8px 24px rgba(0,0,0,0.2)';
818
+ e.currentTarget.style.transform = 'translateY(-1px) scale(1.02)';
659
819
  }}
660
820
  onMouseLeave={e => {
661
821
  e.currentTarget.style.background = 'rgba(255,255,255,0.08)';
662
822
  e.currentTarget.style.borderColor = 'rgba(255,255,255,0.15)';
663
823
  e.currentTarget.style.transform = 'translateY(0) scale(1)';
664
- e.currentTarget.style.boxShadow = 'none';
665
824
  }}
666
825
  >
667
826
  <div
827
+ className="u-mb-1"
668
828
  style={{
669
- fontSize: '2rem',
670
- marginBottom: '8px',
671
- filter: 'drop-shadow(0 4px 8px rgba(0,0,0,0.2))',
829
+ fontSize: '1.25rem',
830
+ filter: 'drop-shadow(0 2px 4px rgba(0,0,0,0.2))',
672
831
  }}
673
832
  >
674
833
  {preset.icon}
675
834
  </div>
676
835
  <div
677
- style={{
678
- fontSize: '0.875rem',
679
- fontWeight: 700,
680
- letterSpacing: '0.3px',
681
- }}
836
+ className="u-font-bold"
837
+ style={{ fontSize: '9px', letterSpacing: '0.3px' }}
682
838
  >
683
839
  {preset.name}
684
840
  </div>
@@ -687,184 +843,665 @@ export const Playground: Story = {
687
843
  </div>
688
844
  </div>
689
845
 
690
- {/* Controls */}
691
- {Object.entries(settings).map(([key, value]) => (
692
- <div key={key} className="u-mb-5">
693
- <div className="u-flex u-justify-between u-items-center u-mb-2">
694
- <label
695
- className="u-text-white u-text-sm u-font-medium"
696
- style={{ textTransform: 'capitalize' }}
697
- >
698
- {key.replace(/([A-Z])/g, ' $1').trim()}
699
- </label>
700
- <span className="u-text-white u-opacity-80 u-text-sm u-font-semibold">
701
- {typeof value === 'boolean'
702
- ? value
703
- ? 'On'
704
- : 'Off'
705
- : typeof value === 'number'
706
- ? value.toFixed(
707
- key.includes('Amount') ||
708
- key.includes('elasticity') ||
709
- key.includes('aberration')
710
- ? 2
711
- : 0
712
- )
713
- : value}
714
- </span>
715
- </div>
716
- {typeof value === 'boolean' ? (
717
- <Toggle
718
- checked={value as boolean}
719
- onChange={checked => setSettings(prev => ({ ...prev, [key]: checked }))}
720
- />
721
- ) : (
722
- <input
723
- type="range"
724
- min={0}
725
- max={
846
+ {/* === TAB NAVIGATION === */}
847
+ <div
848
+ className="u-flex u-gap-2 u-mb-4 u-p-1 u-rounded-pill"
849
+ style={{
850
+ background: 'rgba(255,255,255,0.05)',
851
+ border: '1px solid rgba(255,255,255,0.1)',
852
+ }}
853
+ >
854
+ {(['optics', 'physics', 'flags'] as const).map(tab => (
855
+ <button
856
+ key={tab}
857
+ onClick={() => setControlTab(tab)}
858
+ className="u-flex-grow-1 u-py-2 u-fs-xs u-font-bold u-rounded-pill u-cursor-pointer"
859
+ style={{
860
+ background: controlTab === tab ? 'rgba(255,255,255,0.1)' : 'transparent',
861
+ color: controlTab === tab ? '#fff' : 'rgba(255,255,255,0.5)',
862
+ border: 'none',
863
+ textTransform: 'capitalize',
864
+ transition: 'all 0.2s',
865
+ boxShadow: controlTab === tab ? '0 2px 8px rgba(0,0,0,0.2)' : 'none',
866
+ }}
867
+ >
868
+ {tab}
869
+ </button>
870
+ ))}
871
+ </div>
872
+
873
+ <div style={{ minHeight: '300px' }}>
874
+ {/* === CONTROLS: OPTICS === */}
875
+ {controlTab === 'optics' && (
876
+ <div className="u-mb-4 u-animation-fade-in">
877
+ <div className="u-flex u-items-center u-gap-2 u-mb-3">
878
+ <div
879
+ style={{
880
+ width: '3px',
881
+ height: '14px',
882
+ background: 'linear-gradient(180deg, #7AFFD7 0%, #667eea 100%)',
883
+ borderRadius: '2px',
884
+ flexShrink: 0,
885
+ }}
886
+ />
887
+ <span
888
+ className="u-fs-xs u-font-bold u-opacity-60"
889
+ style={{ letterSpacing: '1px', textTransform: 'uppercase' }}
890
+ >
891
+ Optics
892
+ </span>
893
+ </div>
894
+ {(
895
+ [
896
+ 'displacementScale',
897
+ 'blurAmount',
898
+ 'saturation',
899
+ 'aberrationIntensity',
900
+ ] as const
901
+ ).map(key => {
902
+ const value = settings[key];
903
+ const max =
726
904
  key === 'displacementScale'
727
905
  ? 200
728
906
  : key === 'saturation'
729
907
  ? 300
730
908
  : key === 'aberrationIntensity'
731
909
  ? 10
732
- : key === 'borderRadius'
733
- ? 100
734
- : key === 'blurAmount'
735
- ? 10
736
- : 1
737
- }
738
- step={
739
- key === 'aberrationIntensity' ||
740
- key === 'elasticity' ||
741
- key === 'blurAmount'
742
- ? 0.01
743
- : 1
744
- }
745
- value={value as number}
746
- onChange={e =>
747
- setSettings(prev => ({ ...prev, [key]: parseFloat(e.target.value) }))
748
- }
749
- style={{ width: '100%', height: '6px', accentColor: '#7AFFD7' }}
750
- />
751
- )}
752
- </div>
753
- ))}
910
+ : key === 'blurAmount'
911
+ ? 10
912
+ : 1;
913
+ const step =
914
+ key === 'aberrationIntensity' || key === 'blurAmount' ? 0.01 : 1;
915
+ const label = key
916
+ .replace(/([A-Z])/g, ' $1')
917
+ .replace(/^./, s => s.toUpperCase());
918
+ return (
919
+ <div key={key} className="u-mb-4">
920
+ <div className="u-flex u-justify-between u-items-baseline u-mb-1">
921
+ <label className="u-fs-xs u-font-medium u-opacity-80">
922
+ {label}
923
+ </label>
924
+ <span
925
+ className="u-fs-xs u-font-bold u-px-2 u-py-1 u-rounded"
926
+ style={{
927
+ background: 'rgba(122,255,215,0.12)',
928
+ color: '#7AFFD7',
929
+ fontVariantNumeric: 'tabular-nums',
930
+ minWidth: '40px',
931
+ textAlign: 'center',
932
+ }}
933
+ >
934
+ {(value as number).toFixed(
935
+ key === 'aberrationIntensity' || key === 'blurAmount' ? 2 : 0
936
+ )}
937
+ </span>
938
+ </div>
939
+ <div className="u-relative" style={{ height: '20px' }}>
940
+ <input
941
+ type="range"
942
+ min={0}
943
+ max={max}
944
+ step={step}
945
+ value={value as number}
946
+ onChange={e =>
947
+ setSettings(prev => ({
948
+ ...prev,
949
+ [key]: parseFloat(e.target.value),
950
+ }))
951
+ }
952
+ className="premium-slider u-absolute u-w-100 u-m-0"
953
+ style={{
954
+ height: '2px',
955
+ background: `linear-gradient(to right, #7AFFD7 ${((value as number) / max) * 100}%, rgba(255,255,255,0.15) ${((value as number) / max) * 100}%)`,
956
+ borderRadius: '2px',
957
+ outline: 'none',
958
+ appearance: 'none',
959
+ WebkitAppearance: 'none',
960
+ top: '50%',
961
+ transform: 'translateY(-50%)',
962
+ }}
963
+ />
964
+ </div>
965
+ </div>
966
+ );
967
+ })}
968
+ </div>
969
+ )}
754
970
 
755
- {/* Mode Selector */}
756
- <div className="u-mb-5">
757
- <label className="u-block u-mb-2 u-text-white u-font-semibold">
758
- Glass Mode
759
- </label>
760
- <select
761
- value={selectedMode}
762
- onChange={e => setSelectedMode(e.target.value as any)}
763
- style={{
764
- width: '100%',
765
- padding: '12px',
766
- background: 'rgba(255,255,255,0.1)',
767
- border: '1px solid rgba(255,255,255,0.2)',
768
- borderRadius: '8px',
769
- color: 'white',
770
- fontSize: '1rem',
771
- }}
772
- >
773
- <option value="standard" style={{ background: '#1a1a1a' }}>
774
- Standard
775
- </option>
776
- <option value="polar" style={{ background: '#1a1a1a' }}>
777
- Polar
778
- </option>
779
- <option value="prominent" style={{ background: '#1a1a1a' }}>
780
- Prominent
781
- </option>
782
- <option value="shader" style={{ background: '#1a1a1a' }}>
783
- Shader
784
- </option>
785
- </select>
971
+ {/* === CONTROLS: PHYSICS === */}
972
+ {controlTab === 'physics' && (
973
+ <div className="u-mb-4 u-animation-fade-in">
974
+ <div className="u-flex u-items-center u-gap-2 u-mb-3">
975
+ <div
976
+ style={{
977
+ width: '3px',
978
+ height: '14px',
979
+ background: 'linear-gradient(180deg, #a78bfa 0%, #ec4899 100%)',
980
+ borderRadius: '2px',
981
+ flexShrink: 0,
982
+ }}
983
+ />
984
+ <span
985
+ className="u-fs-xs u-font-bold u-opacity-60"
986
+ style={{ letterSpacing: '1px', textTransform: 'uppercase' }}
987
+ >
988
+ Physics
989
+ </span>
990
+ </div>
991
+ {(['elasticity', 'borderRadius'] as const).map(key => {
992
+ const value = settings[key];
993
+ const max = key === 'borderRadius' ? 100 : 1;
994
+ const step = key === 'elasticity' ? 0.01 : 1;
995
+ const label = key
996
+ .replace(/([A-Z])/g, ' $1')
997
+ .replace(/^./, s => s.toUpperCase());
998
+ return (
999
+ <div key={key} className="u-mb-4">
1000
+ <div className="u-flex u-justify-between u-items-baseline u-mb-1">
1001
+ <label className="u-fs-xs u-font-medium u-opacity-80">
1002
+ {label}
1003
+ </label>
1004
+ <span
1005
+ className="u-fs-xs u-font-bold u-px-2 u-py-1 u-rounded"
1006
+ style={{
1007
+ background: 'rgba(167,139,250,0.12)',
1008
+ color: '#a78bfa',
1009
+ fontVariantNumeric: 'tabular-nums',
1010
+ minWidth: '40px',
1011
+ textAlign: 'center',
1012
+ }}
1013
+ >
1014
+ {(value as number).toFixed(key === 'elasticity' ? 2 : 0)}
1015
+ </span>
1016
+ </div>
1017
+ <div className="u-relative" style={{ height: '20px' }}>
1018
+ <input
1019
+ type="range"
1020
+ min={0}
1021
+ max={max}
1022
+ step={step}
1023
+ value={value as number}
1024
+ onChange={e =>
1025
+ setSettings(prev => ({
1026
+ ...prev,
1027
+ [key]: parseFloat(e.target.value),
1028
+ }))
1029
+ }
1030
+ className="premium-slider u-absolute u-w-100 u-m-0"
1031
+ style={{
1032
+ height: '2px',
1033
+ background: `linear-gradient(to right, #a78bfa ${((value as number) / max) * 100}%, rgba(255,255,255,0.15) ${((value as number) / max) * 100}%)`,
1034
+ borderRadius: '2px',
1035
+ outline: 'none',
1036
+ appearance: 'none',
1037
+ WebkitAppearance: 'none',
1038
+ top: '50%',
1039
+ transform: 'translateY(-50%)',
1040
+ }}
1041
+ />
1042
+ </div>
1043
+ </div>
1044
+ );
1045
+ })}
1046
+ </div>
1047
+ )}
1048
+
1049
+ {/* === CONTROLS: ACCESSIBILITY FLAGS === */}
1050
+ {controlTab === 'flags' && (
1051
+ <div className="u-mb-4 u-animation-fade-in">
1052
+ <div className="u-flex u-items-center u-gap-2 u-mb-3">
1053
+ <div
1054
+ style={{
1055
+ width: '3px',
1056
+ height: '14px',
1057
+ background: 'linear-gradient(180deg, #f59e0b 0%, #ef4444 100%)',
1058
+ borderRadius: '2px',
1059
+ flexShrink: 0,
1060
+ }}
1061
+ />
1062
+ <span
1063
+ className="u-fs-xs u-font-bold u-opacity-60"
1064
+ style={{ letterSpacing: '1px', textTransform: 'uppercase' }}
1065
+ >
1066
+ Flags
1067
+ </span>
1068
+ </div>
1069
+ <div className="u-grid u-gap-3" style={{ gridTemplateColumns: '1fr 1fr' }}>
1070
+ {(
1071
+ [
1072
+ 'overLight',
1073
+ 'reducedMotion',
1074
+ 'highContrast',
1075
+ 'withoutEffects',
1076
+ 'withLiquidBlur',
1077
+ 'withBorder',
1078
+ ] as const
1079
+ ).map(key => {
1080
+ const isOn = settings[key] as boolean;
1081
+ const label = key
1082
+ .replace(/([A-Z])/g, ' $1')
1083
+ .replace(/^./, s => s.toUpperCase());
1084
+ return (
1085
+ <button
1086
+ key={key}
1087
+ onClick={() => setSettings(prev => ({ ...prev, [key]: !isOn }))}
1088
+ className="u-flex u-items-center u-gap-2 u-px-3 u-py-2 u-rounded u-text-start"
1089
+ style={{
1090
+ background: isOn
1091
+ ? 'rgba(122,255,215,0.1)'
1092
+ : 'rgba(255,255,255,0.04)',
1093
+ border: isOn
1094
+ ? '1px solid rgba(122,255,215,0.35)'
1095
+ : '1px solid rgba(255,255,255,0.1)',
1096
+ cursor: 'pointer',
1097
+ transition: 'all 0.2s',
1098
+ outline: 'none',
1099
+ }}
1100
+ >
1101
+ <div
1102
+ style={{
1103
+ width: '10px',
1104
+ height: '10px',
1105
+ borderRadius: '50%',
1106
+ background: isOn ? '#7AFFD7' : 'rgba(255,255,255,0.2)',
1107
+ flexShrink: 0,
1108
+ boxShadow: isOn ? '0 0 8px rgba(122,255,215,0.6)' : 'none',
1109
+ transition: 'all 0.2s',
1110
+ }}
1111
+ />
1112
+ <span
1113
+ className="u-fs-xs u-font-medium"
1114
+ style={{ color: isOn ? '#7AFFD7' : 'rgba(255,255,255,0.6)' }}
1115
+ >
1116
+ {label}
1117
+ </span>
1118
+ </button>
1119
+ );
1120
+ })}
1121
+ </div>
1122
+ </div>
1123
+ )}
786
1124
  </div>
787
1125
 
788
- {/* Shader Variant Selector */}
789
- {selectedMode === 'shader' && (
790
- <div className="u-mb-5">
791
- <label className="u-block u-mb-2 u-text-white u-font-semibold">
792
- Shader Variant
793
- </label>
794
- <select
795
- value={selectedShader}
796
- onChange={e => setSelectedShader(e.target.value as any)}
1126
+ {/* === GLASS MODE === */}
1127
+ <div className="u-mb-4">
1128
+ <div className="u-flex u-items-center u-gap-2 u-mb-2">
1129
+ <div
797
1130
  style={{
798
- width: '100%',
799
- padding: '12px',
800
- background: 'rgba(255,255,255,0.1)',
801
- border: '1px solid rgba(255,255,255,0.2)',
802
- borderRadius: '8px',
803
- color: 'white',
804
- fontSize: '1rem',
1131
+ width: '3px',
1132
+ height: '14px',
1133
+ background: 'linear-gradient(180deg, #60a5fa 0%, #7AFFD7 100%)',
1134
+ borderRadius: '2px',
1135
+ flexShrink: 0,
805
1136
  }}
1137
+ />
1138
+ <span
1139
+ className="u-fs-xs u-font-bold u-opacity-60"
1140
+ style={{ letterSpacing: '1px', textTransform: 'uppercase' }}
806
1141
  >
1142
+ Glass Mode
1143
+ </span>
1144
+ </div>
1145
+ <div
1146
+ className="u-grid u-gap-2"
1147
+ style={{ gridTemplateColumns: 'repeat(4, 1fr)' }}
1148
+ >
1149
+ {(['standard', 'polar', 'prominent', 'shader'] as const).map(mode => (
1150
+ <button
1151
+ key={mode}
1152
+ onClick={() => setSelectedMode(mode)}
1153
+ className="u-py-2 u-rounded u-text-center u-fs-xs u-font-bold"
1154
+ style={{
1155
+ background:
1156
+ selectedMode === mode
1157
+ ? 'linear-gradient(135deg, rgba(96,165,250,0.3) 0%, rgba(122,255,215,0.2) 100%)'
1158
+ : 'rgba(255,255,255,0.05)',
1159
+ border:
1160
+ selectedMode === mode
1161
+ ? '1px solid rgba(122,255,215,0.5)'
1162
+ : '1px solid rgba(255,255,255,0.1)',
1163
+ color: selectedMode === mode ? '#7AFFD7' : 'rgba(255,255,255,0.55)',
1164
+ cursor: 'pointer',
1165
+ transition: 'all 0.2s',
1166
+ outline: 'none',
1167
+ textTransform: 'capitalize',
1168
+ boxShadow:
1169
+ selectedMode === mode ? '0 2px 12px rgba(122,255,215,0.15)' : 'none',
1170
+ }}
1171
+ >
1172
+ {mode}
1173
+ </button>
1174
+ ))}
1175
+ </div>
1176
+ </div>
1177
+
1178
+ {/* === SHADER VARIANT === */}
1179
+ {selectedMode === 'shader' && (
1180
+ <div className="u-mb-4">
1181
+ <div className="u-flex u-items-center u-gap-2 u-mb-2">
1182
+ <div
1183
+ style={{
1184
+ width: '3px',
1185
+ height: '14px',
1186
+ background: 'linear-gradient(180deg, #f472b6 0%, #a78bfa 100%)',
1187
+ borderRadius: '2px',
1188
+ flexShrink: 0,
1189
+ }}
1190
+ />
1191
+ <span
1192
+ className="u-fs-xs u-font-bold u-opacity-60"
1193
+ style={{ letterSpacing: '1px', textTransform: 'uppercase' }}
1194
+ >
1195
+ Shader Variant
1196
+ </span>
1197
+ </div>
1198
+ <div className="u-grid u-gap-2" style={{ gridTemplateColumns: '1fr 1fr' }}>
807
1199
  {options.map(opt => (
808
- <option
1200
+ <button
809
1201
  key={opt.value}
810
- value={opt.value}
811
- style={{ background: '#1a1a1a' }}
1202
+ onClick={() => setSelectedShader(opt.value as any)}
1203
+ className="u-py-2 u-px-3 u-rounded u-text-start u-fs-xs u-font-medium"
1204
+ style={{
1205
+ background:
1206
+ selectedShader === opt.value
1207
+ ? 'rgba(167,139,250,0.15)'
1208
+ : 'rgba(255,255,255,0.04)',
1209
+ border:
1210
+ selectedShader === opt.value
1211
+ ? '1px solid rgba(167,139,250,0.45)'
1212
+ : '1px solid rgba(255,255,255,0.08)',
1213
+ color:
1214
+ selectedShader === opt.value ? '#a78bfa' : 'rgba(255,255,255,0.5)',
1215
+ cursor: 'pointer',
1216
+ transition: 'all 0.2s',
1217
+ outline: 'none',
1218
+ }}
812
1219
  >
813
- {opt.label}
814
- </option>
1220
+ {opt.label.split(' ')[0]}
1221
+ </button>
815
1222
  ))}
816
- </select>
1223
+ </div>
817
1224
  </div>
818
1225
  )}
819
1226
 
820
1227
  {/* Background Control */}
821
- <div className="u-mb-6">
822
- <label className="u-block u-mb-2 u-text-white u-font-semibold">
823
- Background Image
824
- </label>
825
- <input
826
- type="range"
827
- min={0}
828
- max={backgrounds.length}
829
- step={1}
830
- value={backgroundIndex}
831
- onChange={e => setBackgroundIndex(parseInt(e.target.value))}
832
- style={{ width: '100%', height: '6px', accentColor: '#7AFFD7' }}
833
- />
834
- <div className="u-mt-2 u-text-center u-text-white u-opacity-70 u-text-xs">
835
- Background {backgroundIndex + 1} of {backgrounds.length}
1228
+ <div className="u-mb-4">
1229
+ {/* Header row: label + nav controls */}
1230
+ <div className="u-flex u-items-center u-justify-between u-mb-2">
1231
+ <label className="u-block u-text-white u-font-semibold u-fs-sm">
1232
+ 🌄 Background
1233
+ </label>
1234
+ <div className="u-flex u-items-center u-gap-2">
1235
+ {/* Prev / Next */}
1236
+ <button
1237
+ onClick={() =>
1238
+ setBackgroundIndex(
1239
+ prev => (prev - 1 + backgrounds.length) % backgrounds.length
1240
+ )
1241
+ }
1242
+ title="Previous background (←)"
1243
+ style={{
1244
+ background: 'rgba(255,255,255,0.1)',
1245
+ border: '1px solid rgba(255,255,255,0.15)',
1246
+ borderRadius: '6px',
1247
+ color: '#fff',
1248
+ cursor: 'pointer',
1249
+ width: '28px',
1250
+ height: '28px',
1251
+ display: 'flex',
1252
+ alignItems: 'center',
1253
+ justifyContent: 'center',
1254
+ fontSize: '14px',
1255
+ transition: 'all 0.2s',
1256
+ }}
1257
+ onMouseEnter={e => {
1258
+ e.currentTarget.style.background = 'rgba(255,255,255,0.2)';
1259
+ }}
1260
+ onMouseLeave={e => {
1261
+ e.currentTarget.style.background = 'rgba(255,255,255,0.1)';
1262
+ }}
1263
+ >
1264
+
1265
+ </button>
1266
+ <span
1267
+ className="u-fs-xs u-opacity-60"
1268
+ style={{
1269
+ minWidth: '36px',
1270
+ textAlign: 'center',
1271
+ fontVariantNumeric: 'tabular-nums',
1272
+ }}
1273
+ >
1274
+ {backgroundIndex + 1}/{backgrounds.length}
1275
+ </span>
1276
+ <button
1277
+ onClick={() =>
1278
+ setBackgroundIndex(prev => (prev + 1) % backgrounds.length)
1279
+ }
1280
+ title="Next background (→)"
1281
+ style={{
1282
+ background: 'rgba(255,255,255,0.1)',
1283
+ border: '1px solid rgba(255,255,255,0.15)',
1284
+ borderRadius: '6px',
1285
+ color: '#fff',
1286
+ cursor: 'pointer',
1287
+ width: '28px',
1288
+ height: '28px',
1289
+ display: 'flex',
1290
+ alignItems: 'center',
1291
+ justifyContent: 'center',
1292
+ fontSize: '14px',
1293
+ transition: 'all 0.2s',
1294
+ }}
1295
+ onMouseEnter={e => {
1296
+ e.currentTarget.style.background = 'rgba(255,255,255,0.2)';
1297
+ }}
1298
+ onMouseLeave={e => {
1299
+ e.currentTarget.style.background = 'rgba(255,255,255,0.1)';
1300
+ }}
1301
+ >
1302
+
1303
+ </button>
1304
+ {/* Auto-play */}
1305
+ <button
1306
+ onClick={() => setAutoPlay(p => !p)}
1307
+ title={autoPlay ? 'Pause slideshow' : 'Start slideshow'}
1308
+ style={{
1309
+ background: autoPlay
1310
+ ? 'rgba(122,255,215,0.15)'
1311
+ : 'rgba(255,255,255,0.08)',
1312
+ border: autoPlay
1313
+ ? '1px solid rgba(122,255,215,0.4)'
1314
+ : '1px solid rgba(255,255,255,0.15)',
1315
+ borderRadius: '6px',
1316
+ color: autoPlay ? '#7AFFD7' : 'rgba(255,255,255,0.7)',
1317
+ cursor: 'pointer',
1318
+ width: '28px',
1319
+ height: '28px',
1320
+ display: 'flex',
1321
+ alignItems: 'center',
1322
+ justifyContent: 'center',
1323
+ fontSize: '13px',
1324
+ transition: 'all 0.2s',
1325
+ }}
1326
+ >
1327
+ {autoPlay ? '⏸' : '▶'}
1328
+ </button>
1329
+ </div>
1330
+ </div>
1331
+ {/* Tag filter row */}
1332
+ <div className="u-flex u-gap-2 u-mb-3" style={{ flexWrap: 'wrap' }}>
1333
+ {(['all', 'dark', 'colorful', 'light', 'nature'] as const).map(tag => (
1334
+ <button
1335
+ key={tag}
1336
+ onClick={() => setActiveTag(tag)}
1337
+ style={{
1338
+ padding: '2px 10px',
1339
+ borderRadius: '20px',
1340
+ fontSize: '10px',
1341
+ fontWeight: 700,
1342
+ textTransform: 'capitalize',
1343
+ letterSpacing: '0.5px',
1344
+ cursor: 'pointer',
1345
+ border:
1346
+ activeTag === tag
1347
+ ? '1px solid rgba(122,255,215,0.5)'
1348
+ : '1px solid rgba(255,255,255,0.15)',
1349
+ background:
1350
+ activeTag === tag
1351
+ ? 'rgba(122,255,215,0.15)'
1352
+ : 'rgba(255,255,255,0.06)',
1353
+ color: activeTag === tag ? '#7AFFD7' : 'rgba(255,255,255,0.55)',
1354
+ transition: 'all 0.18s',
1355
+ }}
1356
+ >
1357
+ {tag}
1358
+ </button>
1359
+ ))}
1360
+ </div>
1361
+ {/* Thumbnail grid */}
1362
+ <div
1363
+ className="u-grid u-gap-2"
1364
+ style={{
1365
+ gridTemplateColumns: 'repeat(4, 1fr)',
1366
+ maxHeight: '200px',
1367
+ overflowY: 'auto',
1368
+ paddingRight: '4px',
1369
+ }}
1370
+ >
1371
+ {backgrounds
1372
+ .map((bg, idx) => ({ bg, idx }))
1373
+ .filter(({ bg }) => activeTag === 'all' || bg.tag === activeTag)
1374
+ .map(({ bg, idx }) => (
1375
+ <button
1376
+ key={idx}
1377
+ onClick={() => setBackgroundIndex(idx)}
1378
+ className="u-relative u-rounded u-overflow-hidden u-cursor-pointer"
1379
+ title={bg.label}
1380
+ style={{
1381
+ aspectRatio: '1.4',
1382
+ border:
1383
+ backgroundIndex === idx
1384
+ ? '2px solid #7AFFD7'
1385
+ : '2px solid rgba(255,255,255,0.1)',
1386
+ padding: 0,
1387
+ background: 'transparent',
1388
+ transition: 'all 0.2s',
1389
+ transform: backgroundIndex === idx ? 'scale(0.95)' : 'scale(1)',
1390
+ opacity: backgroundIndex === idx ? 1 : 0.7,
1391
+ boxShadow:
1392
+ backgroundIndex === idx
1393
+ ? '0 0 0 1px rgba(122,255,215,0.3), 0 4px 12px rgba(0,0,0,0.3)'
1394
+ : 'none',
1395
+ }}
1396
+ onMouseEnter={e => {
1397
+ if (backgroundIndex !== idx) {
1398
+ e.currentTarget.style.opacity = '1';
1399
+ e.currentTarget.style.transform = 'scale(1.06)';
1400
+ e.currentTarget.style.borderColor = 'rgba(255,255,255,0.35)';
1401
+ }
1402
+ }}
1403
+ onMouseLeave={e => {
1404
+ if (backgroundIndex !== idx) {
1405
+ e.currentTarget.style.opacity = '0.7';
1406
+ e.currentTarget.style.transform = 'scale(1)';
1407
+ e.currentTarget.style.borderColor = 'rgba(255,255,255,0.1)';
1408
+ }
1409
+ }}
1410
+ >
1411
+ <img
1412
+ src={bg.url}
1413
+ alt={bg.label}
1414
+ className="u-w-100 u-h-100"
1415
+ style={{ objectFit: 'cover', display: 'block' }}
1416
+ />
1417
+ {backgroundIndex === idx && (
1418
+ <div
1419
+ style={{
1420
+ position: 'absolute',
1421
+ inset: 0,
1422
+ background: 'rgba(122,255,215,0.12)',
1423
+ display: 'flex',
1424
+ alignItems: 'flex-end',
1425
+ padding: '3px 4px',
1426
+ }}
1427
+ >
1428
+ <span
1429
+ style={{
1430
+ fontSize: '8px',
1431
+ fontWeight: 700,
1432
+ color: '#7AFFD7',
1433
+ letterSpacing: '0.3px',
1434
+ lineHeight: 1,
1435
+ textShadow: '0 1px 3px rgba(0,0,0,0.8)',
1436
+ }}
1437
+ >
1438
+ ✓ Active
1439
+ </span>
1440
+ </div>
1441
+ )}
1442
+ </button>
1443
+ ))}
1444
+ </div>
1445
+ {/* Current bg label */}
1446
+ <div className="u-mt-2 u-flex u-items-center u-gap-2">
1447
+ <div
1448
+ style={{
1449
+ width: '8px',
1450
+ height: '8px',
1451
+ borderRadius: '50%',
1452
+ background: '#7AFFD7',
1453
+ boxShadow: '0 0 6px rgba(122,255,215,0.6)',
1454
+ flexShrink: 0,
1455
+ }}
1456
+ />
1457
+ <span className="u-fs-xs u-opacity-70" style={{ fontWeight: 600 }}>
1458
+ {backgrounds[backgroundIndex]?.label}
1459
+ </span>
1460
+ <span
1461
+ className="u-fs-xs u-opacity-40"
1462
+ style={{ textTransform: 'capitalize', marginLeft: 'auto' }}
1463
+ >
1464
+ {backgrounds[backgroundIndex]?.tag}
1465
+ </span>
1466
+ </div>
1467
+ <div className="u-mt-1 u-fs-xs u-opacity-35" style={{ letterSpacing: '0.3px' }}>
1468
+ Use ← → arrow keys to navigate
836
1469
  </div>
837
1470
  </div>
838
1471
 
839
1472
  {/* Action Buttons */}
840
- <div style={{ display: 'flex', flexDirection: 'column', gap: '0.75rem' }}>
1473
+ <div className="u-grid u-gap-2" style={{ gridTemplateColumns: '1fr 1fr' }}>
841
1474
  <Button
842
1475
  variant="primary"
843
- size="md"
1476
+ size="sm"
844
1477
  onClick={() => setShowCode(!showCode)}
845
- style={{ width: '100%' }}
1478
+ className="u-w-100"
846
1479
  >
847
- {showCode ? '👁️ Hide Code' : '💻 Show Code'}
1480
+ {showCode ? '👁️ Hide' : '💻 Code'}
848
1481
  </Button>
849
1482
  <Button
850
1483
  variant="outline-light"
851
- size="md"
1484
+ size="sm"
852
1485
  onClick={copyCode}
853
- style={{ width: '100%' }}
1486
+ className="u-w-100 u-relative u-overflow-hidden"
854
1487
  >
855
- {copiedCode ? '✓ Copied!' : '📋 Copy Code'}
1488
+ {copiedCode ? (
1489
+ <span className="u-text-success u-font-bold">✓ Copied!</span>
1490
+ ) : (
1491
+ '📋 Copy'
1492
+ )}
856
1493
  </Button>
857
1494
  <Button
858
1495
  variant="outline-light"
859
- size="md"
1496
+ size="sm"
860
1497
  onClick={exportConfig}
861
- style={{ width: '100%' }}
1498
+ className="u-w-100"
862
1499
  >
863
- 💾 Export Config
1500
+ 💾 Export
864
1501
  </Button>
865
1502
  <Button
866
1503
  variant="ghost"
867
- size="md"
1504
+ size="sm"
868
1505
  onClick={() => {
869
1506
  setSettings({
870
1507
  displacementScale: 120,
@@ -883,7 +1520,7 @@ export const Playground: Story = {
883
1520
  setSelectedMode('standard');
884
1521
  setSelectedShader('liquidGlass');
885
1522
  }}
886
- style={{ width: '100%' }}
1523
+ className="u-w-100"
887
1524
  >
888
1525
  🔄 Reset
889
1526
  </Button>
@@ -892,50 +1529,32 @@ export const Playground: Story = {
892
1529
  </AtomixGlass>
893
1530
  </div>
894
1531
  {/* Preview Area */}
895
- <div className="o-grid__col o-grid__col--8">
896
- <div
897
- style={{
898
- display: 'flex',
899
- alignItems: 'center',
900
- justifyContent: 'center',
901
- padding: '3rem',
902
- }}
903
- >
1532
+ <div className="u-h-100 u-flex u-items-center u-justify-center u-relative u-overflow-hidden">
1533
+ <div className="u-w-100 u-h-100 u-flex u-items-center u-justify-center u-p-2 u-p-lg-4">
904
1534
  {showCode ? (
905
- <div style={{ width: '100%' }}>
1535
+ <div className="u-w-100 u-h-100 u-flex u-items-center">
906
1536
  <AtomixGlass
907
1537
  displacementScale={80}
908
1538
  aberrationIntensity={1}
909
- borderRadius={16}
1539
+ borderRadius={20}
910
1540
  saturation={120}
911
1541
  >
912
- <div style={{ padding: '2.5rem' }}>
913
- <div
914
- className="u-flex u-justify-between u-items-center u-mb-4"
915
- style={{ marginBottom: '24px' }}
916
- >
1542
+ <div className="u-p-6">
1543
+ <div className="u-flex u-justify-between u-items-center u-mb-6">
917
1544
  <div>
918
1545
  <h3
919
- className="u-m-0 u-font-bold"
1546
+ className="u-m-0 u-font-bold u-fs-xl"
920
1547
  style={{
921
- fontSize: '1.75rem',
922
1548
  background:
923
1549
  'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
924
1550
  WebkitBackgroundClip: 'text',
925
1551
  WebkitTextFillColor: 'transparent',
926
1552
  backgroundClip: 'text',
927
- marginBottom: '8px',
928
1553
  }}
929
1554
  >
930
1555
  💻 Generated Code
931
1556
  </h3>
932
- <p
933
- className="u-m-0"
934
- style={{
935
- fontSize: '13px',
936
- color: 'rgba(255, 255, 255, 0.7)',
937
- }}
938
- >
1557
+ <p className="u-m-0 u-fs-sm u-text-white u-opacity-70 u-mt-1">
939
1558
  Copy this code to use in your project
940
1559
  </p>
941
1560
  </div>
@@ -954,14 +1573,14 @@ export const Playground: Story = {
954
1573
  </Button>
955
1574
  </div>
956
1575
  <pre
1576
+ className="custom-scrollbar u-rounded u-fs-sm"
957
1577
  style={{
1578
+ overflowX: 'auto',
1579
+ overflowY: 'auto',
958
1580
  background: 'rgba(0,0,0,0.6)',
959
1581
  padding: '1.75rem',
960
- borderRadius: '12px',
961
- overflow: 'auto',
962
- maxHeight: '500px',
1582
+ maxHeight: '400px',
963
1583
  color: '#7AFFD7',
964
- fontSize: '0.875rem',
965
1584
  lineHeight: 1.7,
966
1585
  border: '1px solid rgba(122, 255, 215, 0.2)',
967
1586
  fontFamily: 'Monaco, "Courier New", monospace',
@@ -989,269 +1608,297 @@ export const Playground: Story = {
989
1608
  withoutEffects={settings.withoutEffects}
990
1609
  withLiquidBlur={settings.withLiquidBlur}
991
1610
  withBorder={settings.withBorder}
992
- style={{ width: '100%' }}
993
1611
  >
994
- <div style={{ padding: '2.5rem', textAlign: 'center' }}>
995
- <div
996
- style={{
997
- display: 'inline-flex',
998
- alignItems: 'center',
999
- gap: '8px',
1000
- padding: '10px 24px',
1001
- borderRadius: '28px',
1002
- background:
1003
- 'linear-gradient(135deg, rgba(122, 255, 215, 0.25) 0%, rgba(102, 126, 234, 0.25) 100%)',
1004
- border: '1px solid rgba(122, 255, 215, 0.3)',
1005
- color: '#7AFFD7',
1006
- fontSize: '0.875rem',
1007
- fontWeight: 700,
1008
- letterSpacing: '0.5px',
1009
- marginBottom: '2rem',
1010
- boxShadow: '0 4px 16px rgba(122, 255, 215, 0.2)',
1011
- }}
1012
- >
1013
- <span style={{ fontSize: '18px' }}>✨</span>
1014
- <span>LIVE PREVIEW</span>
1015
- </div>
1016
- <div
1017
- style={{
1018
- width: '96px',
1019
- height: '96px',
1020
- margin: '0 auto 24px',
1021
- borderRadius: '24px',
1022
- background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
1023
- display: 'flex',
1024
- alignItems: 'center',
1025
- justifyContent: 'center',
1026
- fontSize: '48px',
1027
- boxShadow: '0 12px 32px rgba(102, 126, 234, 0.4)',
1028
- }}
1029
- >
1030
-
1031
- </div>
1032
- <h2
1033
- className="u-mb-4 u-font-bold"
1034
- style={{
1035
- fontSize: '2.75rem',
1036
- background:
1037
- 'linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%)',
1038
- WebkitBackgroundClip: 'text',
1039
- WebkitTextFillColor: 'transparent',
1040
- backgroundClip: 'text',
1041
- letterSpacing: '-1px',
1042
- }}
1043
- >
1044
- AtomixGlass
1045
- </h2>
1046
- <p
1047
- className="u-mb-6"
1048
- style={{
1049
- fontSize: '1.125rem',
1050
- lineHeight: 1.7,
1051
- color: 'rgba(255, 255, 255, 0.9)',
1052
- maxWidth: '600px',
1053
- margin: '0 auto 2rem',
1054
- }}
1055
- >
1056
- Adjust the controls on the left to see real-time changes. Each parameter
1057
- affects the visual appearance and performance characteristics of the glass
1058
- effect.
1059
- </p>
1060
- <div className="u-flex u-justify-center u-flex-wrap" style={{ gap: '1rem' }}>
1061
- <Button variant="primary" size="lg">
1062
- Primary Action
1063
- </Button>
1064
- <Button variant="outline-light" size="lg">
1065
- Secondary
1066
- </Button>
1067
- </div>
1068
- {/* Dynamic Info Panel */}
1069
- <div className="u-mt-8" style={{ display: 'grid', gap: '1rem' }}>
1070
- {/* Current Configuration */}
1612
+ <div className="u-h-100 u-w-100 custom-scrollbar" style={{ overflowY: 'auto' }}>
1613
+ <div className="u-p-4 u-p-lg-5 u-text-center">
1071
1614
  <div
1072
- className="u-p-4 u-rounded"
1615
+ className="u-inline-flex u-items-center u-gap-2 u-px-3 u-py-1 u-rounded-pill u-mb-4 u-fs-xs u-font-bold"
1073
1616
  style={{
1074
- background: 'rgba(255,255,255,0.08)',
1075
- border: '1px solid rgba(255,255,255,0.15)',
1617
+ background:
1618
+ 'linear-gradient(135deg, rgba(122, 255, 215, 0.2) 0%, rgba(102, 126, 234, 0.2) 100%)',
1619
+ border: '1px solid rgba(122, 255, 215, 0.3)',
1620
+ color: '#7AFFD7',
1621
+ letterSpacing: '0.5px',
1622
+ boxShadow: '0 4px 16px rgba(122, 255, 215, 0.1)',
1623
+ backdropFilter: 'blur(8px)',
1076
1624
  }}
1077
1625
  >
1626
+ <span className="u-fs-base">✨</span>
1627
+ <span>LIVE PREVIEW</span>
1628
+ </div>
1629
+
1630
+ <div className="u-w-100 u-flex u-justify-center u-mb-6">
1078
1631
  <div
1079
- className="u-mb-3 u-font-semibold u-text-sm"
1080
- style={{ color: '#7AFFD7' }}
1081
- >
1082
- 📊 Current Configuration
1083
- </div>
1084
- <div
1632
+ className="u-flex u-items-center u-justify-center u-rounded-circle"
1085
1633
  style={{
1086
- display: 'grid',
1087
- gridTemplateColumns: '1fr 1fr 1fr 1fr 1fr 1fr',
1088
- gap: '0.75rem',
1634
+ width: '80px',
1635
+ height: '80px',
1636
+ background:
1637
+ 'linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 100%)',
1638
+ border: '1px solid rgba(255,255,255,0.3)',
1639
+ fontSize: '48px',
1640
+ boxShadow:
1641
+ '0 12px 32px rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255,255,255,0.4)',
1642
+ backdropFilter: 'blur(12px)',
1643
+ animation: 'float 6s ease-in-out infinite',
1089
1644
  }}
1090
1645
  >
1091
- <div>
1092
- <div className="u-text-xs u-opacity-70">Mode</div>
1093
- <div
1094
- className="u-font-semibold"
1095
- style={{ textTransform: 'capitalize' }}
1096
- >
1097
- {selectedMode}
1098
- </div>
1099
- </div>
1100
- <div>
1101
- <div className="u-text-xs u-opacity-70">Shader</div>
1102
- <div
1103
- className="u-font-semibold"
1104
- style={{ textTransform: 'capitalize' }}
1105
- >
1106
- {selectedShader}
1107
- </div>
1108
- </div>
1109
- <div>
1110
- <div className="u-text-xs u-opacity-70">Displacement</div>
1111
- <div className="u-font-semibold">{settings.displacementScale}px</div>
1112
- </div>
1113
- <div>
1114
- <div className="u-text-xs u-opacity-70">Aberration</div>
1115
- <div className="u-font-semibold">
1116
- {settings.aberrationIntensity.toFixed(1)}
1117
- </div>
1118
- </div>
1119
- <div>
1120
- <div className="u-text-xs u-opacity-70">Blur</div>
1121
- <div className="u-font-semibold">
1122
- {settings.blurAmount.toFixed(2)}
1123
- </div>
1124
- </div>
1125
- <div>
1126
- <div className="u-text-xs u-opacity-70">Elasticity</div>
1127
- <div className="u-font-semibold">
1128
- {settings.elasticity.toFixed(2)}
1129
- </div>
1130
- </div>
1646
+ <style>{`
1647
+ @keyframes float {
1648
+ 0% { transform: translateY(0px) rotate(0deg); }
1649
+ 50% { transform: translateY(-10px) rotate(5deg); }
1650
+ 100% { transform: translateY(0px) rotate(0deg); }
1651
+ }
1652
+ `}</style>
1653
+ 💎
1131
1654
  </div>
1132
1655
  </div>
1133
1656
 
1134
- {/* Visual Characteristics */}
1135
- <div
1136
- className="u-p-4 u-rounded"
1657
+ <h2
1658
+ className="u-mb-2 u-font-bold"
1137
1659
  style={{
1138
- background: 'rgba(255,255,255,0.08)',
1139
- border: '1px solid rgba(255,255,255,0.15)',
1660
+ fontSize: '2.5rem',
1661
+ lineHeight: '1.1',
1662
+ background:
1663
+ 'linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.6) 100%)',
1664
+ WebkitBackgroundClip: 'text',
1665
+ WebkitTextFillColor: 'transparent',
1666
+ backgroundClip: 'text',
1667
+ letterSpacing: '-1.5px',
1668
+ textShadow: '0 4px 24px rgba(255,255,255,0.2)',
1669
+ }}
1670
+ >
1671
+ Atomix Glass
1672
+ </h2>
1673
+ <p
1674
+ className="u-mb-6 u-mx-auto u-opacity-90"
1675
+ style={{
1676
+ fontSize: '1rem',
1677
+ lineHeight: 1.5,
1678
+ maxWidth: '540px',
1679
+ textShadow: '0 2px 4px rgba(0,0,0,0.5)',
1140
1680
  }}
1141
1681
  >
1682
+ A meticulously crafted, highly performant WebGL displacement system for
1683
+ creating stunning frosted glass effects in modern web applications.
1684
+ </p>
1685
+
1686
+ <div className="u-flex u-justify-center u-gap-3 u-flex-wrap">
1687
+ <Button
1688
+ variant="primary"
1689
+ size="md"
1690
+ className="u-px-5 u-font-bold"
1691
+ style={{ borderRadius: '12px' }}
1692
+ >
1693
+ Get Started Today
1694
+ </Button>
1695
+ <Button
1696
+ variant="outline-light"
1697
+ size="md"
1698
+ className="u-px-5 u-font-bold"
1699
+ style={{ borderRadius: '12px', background: 'rgba(255,255,255,0.05)' }}
1700
+ >
1701
+ View Documentation
1702
+ </Button>
1703
+ </div>
1704
+ {/* Dynamic Info Panel */}
1705
+ <div className="u-mt-6 u-grid u-gap-3">
1706
+ {/* Current Configuration */}
1142
1707
  <div
1143
- className="u-mb-3 u-font-semibold u-text-sm"
1144
- style={{ color: '#7AFFD7' }}
1708
+ className="u-p-4 u-rounded u-text-start"
1709
+ style={{
1710
+ background: 'rgba(255,255,255,0.06)',
1711
+ border: '1px solid rgba(255,255,255,0.12)',
1712
+ backdropFilter: 'blur(8px)',
1713
+ }}
1145
1714
  >
1146
- 🎨 Visual Characteristics
1147
- </div>
1148
- <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}>
1149
1715
  <div
1150
- style={{
1151
- padding: '4px 12px',
1152
- borderRadius: '12px',
1153
- background: settings.withLiquidBlur
1154
- ? 'rgba(122, 255, 215, 0.2)'
1155
- : 'rgba(255,255,255,0.1)',
1156
- fontSize: '0.75rem',
1157
- border: settings.withLiquidBlur
1158
- ? '1px solid #7AFFD7'
1159
- : '1px solid transparent',
1160
- }}
1716
+ className="u-mb-3 u-font-bold u-fs-sm"
1717
+ style={{ color: '#7AFFD7', letterSpacing: '0.5px' }}
1161
1718
  >
1162
- {settings.withLiquidBlur ? '✓' : '○'} Liquid Blur
1719
+ 📊 Current Configuration Stack
1163
1720
  </div>
1164
1721
  <div
1165
- style={{
1166
- padding: '4px 12px',
1167
- borderRadius: '12px',
1168
- background: settings.withBorder
1169
- ? 'rgba(122, 255, 215, 0.2)'
1170
- : 'rgba(255,255,255,0.1)',
1171
- fontSize: '0.75rem',
1172
- border: settings.withBorder
1173
- ? '1px solid #7AFFD7'
1174
- : '1px solid transparent',
1175
- }}
1722
+ className="u-grid u-gap-3"
1723
+ style={{ gridTemplateColumns: 'repeat(6, 1fr)' }}
1176
1724
  >
1177
- {settings.withBorder ? '✓' : '○'} Border Effect
1725
+ <div className="u-flex u-flex-column u-gap-1">
1726
+ <span className="u-fs-xs u-opacity-60 u-font-medium">Mode</span>
1727
+ <span
1728
+ className="u-fs-sm u-font-bold u-text-white"
1729
+ style={{ textTransform: 'capitalize' }}
1730
+ >
1731
+ {selectedMode}
1732
+ </span>
1733
+ </div>
1734
+ <div className="u-flex u-flex-column u-gap-1">
1735
+ <span className="u-fs-xs u-opacity-60 u-font-medium">Shader</span>
1736
+ <span
1737
+ className="u-fs-sm u-font-bold u-text-white"
1738
+ style={{ textTransform: 'capitalize' }}
1739
+ >
1740
+ {selectedShader}
1741
+ </span>
1742
+ </div>
1743
+ <div className="u-flex u-flex-column u-gap-1">
1744
+ <span className="u-fs-xs u-opacity-60 u-font-medium">
1745
+ Displacement
1746
+ </span>
1747
+ <span className="u-fs-sm u-font-bold u-text-white">
1748
+ {settings.displacementScale}px
1749
+ </span>
1750
+ </div>
1751
+ <div className="u-flex u-flex-column u-gap-1">
1752
+ <span className="u-fs-xs u-opacity-60 u-font-medium">
1753
+ Aberration
1754
+ </span>
1755
+ <span className="u-fs-sm u-font-bold u-text-white">
1756
+ {settings.aberrationIntensity.toFixed(1)}
1757
+ </span>
1758
+ </div>
1759
+ <div className="u-flex u-flex-column u-gap-1">
1760
+ <span className="u-fs-xs u-opacity-60 u-font-medium">Blur</span>
1761
+ <span className="u-fs-sm u-font-bold u-text-white">
1762
+ {settings.blurAmount.toFixed(2)}
1763
+ </span>
1764
+ </div>
1765
+ <div className="u-flex u-flex-column u-gap-1">
1766
+ <span className="u-fs-xs u-opacity-60 u-font-medium">
1767
+ Elasticity
1768
+ </span>
1769
+ <span className="u-fs-sm u-font-bold u-text-white">
1770
+ {settings.elasticity.toFixed(2)}
1771
+ </span>
1772
+ </div>
1178
1773
  </div>
1774
+ </div>
1775
+
1776
+ {/* Visual Characteristics */}
1777
+ <div
1778
+ className="u-p-4 u-rounded u-text-start"
1779
+ style={{
1780
+ background: 'rgba(255,255,255,0.06)',
1781
+ border: '1px solid rgba(255,255,255,0.12)',
1782
+ backdropFilter: 'blur(8px)',
1783
+ }}
1784
+ >
1179
1785
  <div
1180
- style={{
1181
- padding: '4px 12px',
1182
- borderRadius: '12px',
1183
- background: settings.reducedMotion
1184
- ? 'rgba(239, 68, 68, 0.2)'
1185
- : 'rgba(255,255,255,0.1)',
1186
- fontSize: '0.75rem',
1187
- border: settings.reducedMotion
1188
- ? '1px solid #EF4444'
1189
- : '1px solid transparent',
1190
- }}
1786
+ className="u-mb-3 u-font-bold u-fs-sm"
1787
+ style={{ color: '#7AFFD7', letterSpacing: '0.5px' }}
1191
1788
  >
1192
- {settings.reducedMotion ? '✓' : '○'} Reduced Motion
1789
+ 🎨 Visual Characteristics
1193
1790
  </div>
1194
- <div
1195
- style={{
1196
- padding: '4px 12px',
1197
- borderRadius: '12px',
1198
- background: settings.highContrast
1199
- ? 'rgba(245, 158, 11, 0.2)'
1200
- : 'rgba(255,255,255,0.1)',
1201
- fontSize: '0.75rem',
1202
- border: settings.highContrast
1203
- ? '1px solid #F59E0B'
1204
- : '1px solid transparent',
1205
- }}
1206
- >
1207
- {settings.highContrast ? '✓' : '○'} High Contrast
1791
+ <div className="u-flex u-flex-wrap u-gap-2">
1792
+ <div
1793
+ className="u-px-3 u-py-1 u-rounded-pill u-fs-xs u-font-bold"
1794
+ style={{
1795
+ background: settings.withLiquidBlur
1796
+ ? 'rgba(122, 255, 215, 0.15)'
1797
+ : 'rgba(255,255,255,0.05)',
1798
+ border: settings.withLiquidBlur
1799
+ ? '1px solid rgba(122, 255, 215, 0.4)'
1800
+ : '1px solid transparent',
1801
+ color: settings.withLiquidBlur
1802
+ ? '#7AFFD7'
1803
+ : 'rgba(255,255,255,0.6)',
1804
+ transition: 'all 0.2s',
1805
+ }}
1806
+ >
1807
+ {settings.withLiquidBlur ? '✓' : '○'} Liquid Blur
1808
+ </div>
1809
+ <div
1810
+ className="u-px-3 u-py-1 u-rounded-pill u-fs-xs u-font-bold"
1811
+ style={{
1812
+ background: settings.withBorder
1813
+ ? 'rgba(122, 255, 215, 0.15)'
1814
+ : 'rgba(255,255,255,0.05)',
1815
+ border: settings.withBorder
1816
+ ? '1px solid rgba(122, 255, 215, 0.4)'
1817
+ : '1px solid transparent',
1818
+ color: settings.withBorder ? '#7AFFD7' : 'rgba(255,255,255,0.6)',
1819
+ transition: 'all 0.2s',
1820
+ }}
1821
+ >
1822
+ {settings.withBorder ? '✓' : '○'} Border Effect
1823
+ </div>
1824
+ <div
1825
+ className="u-px-3 u-py-1 u-rounded-pill u-fs-xs u-font-bold"
1826
+ style={{
1827
+ background: settings.reducedMotion
1828
+ ? 'rgba(239, 68, 68, 0.15)'
1829
+ : 'rgba(255,255,255,0.05)',
1830
+ border: settings.reducedMotion
1831
+ ? '1px solid rgba(239, 68, 68, 0.4)'
1832
+ : '1px solid transparent',
1833
+ color: settings.reducedMotion
1834
+ ? '#EF4444'
1835
+ : 'rgba(255,255,255,0.6)',
1836
+ transition: 'all 0.2s',
1837
+ }}
1838
+ >
1839
+ {settings.reducedMotion ? '✓' : '○'} Reduced Motion
1840
+ </div>
1841
+ <div
1842
+ className="u-px-3 u-py-1 u-rounded-pill u-fs-xs u-font-bold"
1843
+ style={{
1844
+ background: settings.highContrast
1845
+ ? 'rgba(245, 158, 11, 0.15)'
1846
+ : 'rgba(255,255,255,0.05)',
1847
+ border: settings.highContrast
1848
+ ? '1px solid rgba(245, 158, 11, 0.4)'
1849
+ : '1px solid transparent',
1850
+ color: settings.highContrast
1851
+ ? '#F59E0B'
1852
+ : 'rgba(255,255,255,0.6)',
1853
+ transition: 'all 0.2s',
1854
+ }}
1855
+ >
1856
+ {settings.highContrast ? '✓' : '○'} High Contrast
1857
+ </div>
1208
1858
  </div>
1209
1859
  </div>
1210
- </div>
1211
1860
 
1212
- {/* Quick Stats */}
1213
- <div
1214
- className="u-p-4 u-rounded"
1215
- style={{
1216
- background: 'rgba(255,255,255,0.08)',
1217
- border: '1px solid rgba(255,255,255,0.15)',
1218
- }}
1219
- >
1220
- <div
1221
- className="u-mb-3 u-font-semibold u-text-sm"
1222
- style={{ color: '#7AFFD7' }}
1223
- >
1224
- 📈 Quick Stats
1225
- </div>
1861
+ {/* Quick Stats */}
1226
1862
  <div
1863
+ className="u-p-4 u-rounded u-text-start"
1227
1864
  style={{
1228
- display: 'grid',
1229
- gridTemplateColumns: '1fr 1fr 1fr 1fr',
1230
- gap: '0.75rem',
1231
- fontSize: '0.875rem',
1865
+ background: 'rgba(255,255,255,0.06)',
1866
+ border: '1px solid rgba(255,255,255,0.12)',
1867
+ backdropFilter: 'blur(8px)',
1232
1868
  }}
1233
1869
  >
1234
- <div>
1235
- <span className="u-opacity-70">Saturation:</span>
1236
- <span className="u-font-semibold u-ml-2">{settings.saturation}%</span>
1237
- </div>
1238
- <div>
1239
- <span className="u-opacity-70">Radius:</span>
1240
- <span className="u-font-semibold u-ml-2">
1241
- {settings.borderRadius}px
1242
- </span>
1243
- </div>
1244
- <div>
1245
- <span className="u-opacity-70">Background:</span>
1246
- <span className="u-font-semibold u-ml-2">
1247
- {backgroundIndex + 1}/{backgrounds.length}
1248
- </span>
1870
+ <div
1871
+ className="u-mb-3 u-font-bold u-fs-sm"
1872
+ style={{ color: '#7AFFD7', letterSpacing: '0.5px' }}
1873
+ >
1874
+ 📈 Quick Stats
1249
1875
  </div>
1250
- <div>
1251
- <span className="u-opacity-70">Effects:</span>
1252
- <span className="u-font-semibold u-ml-2">
1253
- {settings.withoutEffects ? 'Disabled' : 'Enabled'}
1254
- </span>
1876
+ <div
1877
+ className="u-grid u-gap-3"
1878
+ style={{ gridTemplateColumns: 'repeat(4, 1fr)' }}
1879
+ >
1880
+ <div className="u-flex u-items-center u-fs-sm">
1881
+ <span className="u-opacity-60 u-font-medium">Saturation:</span>
1882
+ <span className="u-font-bold u-ml-2">{settings.saturation}%</span>
1883
+ </div>
1884
+ <div className="u-flex u-items-center u-fs-sm">
1885
+ <span className="u-opacity-60 u-font-medium">Radius:</span>
1886
+ <span className="u-font-bold u-ml-2">
1887
+ {settings.borderRadius}px
1888
+ </span>
1889
+ </div>
1890
+ <div className="u-flex u-items-center u-fs-sm">
1891
+ <span className="u-opacity-60 u-font-medium">Bg:</span>
1892
+ <span className="u-font-bold u-ml-2">
1893
+ {backgroundIndex + 1}/{backgrounds.length}
1894
+ </span>
1895
+ </div>
1896
+ <div className="u-flex u-items-center u-fs-sm">
1897
+ <span className="u-opacity-60 u-font-medium">Effects:</span>
1898
+ <span className="u-font-bold u-ml-2">
1899
+ {settings.withoutEffects ? 'Off' : 'On'}
1900
+ </span>
1901
+ </div>
1255
1902
  </div>
1256
1903
  </div>
1257
1904
  </div>