@shohojdhara/atomix 0.1.17 → 0.1.18
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.
- package/CONTRIBUTING.md +151 -0
- package/NEXTJS_INTEGRATION.md +358 -0
- package/README.md +168 -119
- package/babel.config.js +58 -0
- package/css.d.ts +10 -0
- package/dist/css/atomix.css +1 -1
- package/dist/js/244.js +1 -0
- package/dist/js/atomix.react.cjs.js +1 -0
- package/dist/js/atomix.react.esm.js +1 -1
- package/dist/js/atomix.react.umd.js +1 -1
- package/dist/js/chunks/cjs/202.9d3b1ef1eaa0d5c8a309.js +1 -0
- package/dist/js/chunks/cjs/308.6ea9685ea38ead4120d0.js +1 -0
- package/dist/js/chunks/cjs/54.73db6922594e421ba6b1.js +1 -0
- package/dist/js/chunks/cjs/619.51feecaadcab819780d4.js +1 -0
- package/dist/js/chunks/cjs/690.90f6d11164081cbcbc4d.js +1 -0
- package/dist/js/chunks/cjs/894.24877561df336a8dfd14.js +1 -0
- package/dist/js/chunks/cjs/897.6c2a71fae95338890de7.js +1 -0
- package/dist/types/components/{Navbar → Navigation/Menu}/MegaMenu.d.ts +1 -1
- package/dist/types/components/{Navbar → Navigation/Menu}/Menu.d.ts +1 -1
- package/dist/types/components/Navigation/Nav/Nav.d.ts +20 -0
- package/dist/types/components/{Navbar → Navigation/Nav}/NavDropdown.d.ts +1 -1
- package/dist/types/components/Navigation/Nav/NavItem.d.ts +33 -0
- package/dist/types/components/Navigation/Navbar/Navbar.d.ts +19 -0
- package/dist/types/components/Navigation/SideMenu/SideMenu.d.ts +20 -0
- package/dist/types/components/Navigation/SideMenu/SideMenuItem.d.ts +30 -0
- package/dist/types/components/Navigation/SideMenu/SideMenuList.d.ts +17 -0
- package/dist/types/components/Navigation/index.d.ts +10 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/lib/composables/index.d.ts +1 -0
- package/dist/types/lib/composables/useSideMenu.d.ts +28 -0
- package/dist/types/lib/constants/components.d.ts +72 -0
- package/dist/types/lib/types/components.d.ts +103 -0
- package/examples/nextjs-example.tsx +271 -0
- package/implementation-guide.md +505 -0
- package/next.config.js +69 -0
- package/package.json +26 -5
- package/postcss.config.js +28 -0
- package/src/Introduction.mdx +44 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Alternatives.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Alternatives.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Alternatives.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Alternatives.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Expert.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Expert.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Expert.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-Expert.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-ItalicSwash.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-ItalicSwash.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-ItalicSwash.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-ItalicSwash.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-SmallCaps.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-SmallCaps.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-SmallCaps.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslon-SmallCaps.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Black.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Black.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Black.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Black.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BlackItalic.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BlackItalic.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BlackItalic.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BlackItalic.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Bold.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Bold.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Bold.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Bold.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BoldItalic.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BoldItalic.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BoldItalic.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Italic.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Italic.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Italic.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Italic.woff2 +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Regular.eot +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Regular.ttf +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Regular.woff +0 -0
- package/src/assets/fonts/BigCaslon/BigCaslonFB-Regular.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Black.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Black.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Black.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Black.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BlackItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BlackItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BlackItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BlackItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Bold.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Bold.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Bold.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Bold.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BoldItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BoldItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BoldItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Book.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Book.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Book.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Book.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BookItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BookItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BookItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-BookItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Heavy.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Heavy.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Heavy.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Heavy.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-HeavyItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-HeavyItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-HeavyItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-HeavyItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Light.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Light.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Light.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Light.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-LightItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-LightItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-LightItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-LightItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Medium.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Medium.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Medium.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Medium.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-MediumItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-MediumItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-MediumItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Regular.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Regular.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Regular.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Regular.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-RegularItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-RegularItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-RegularItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-RegularItalic.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Thin.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Thin.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Thin.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-Thin.woff2 +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-ThinItalic.eot +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-ThinItalic.ttf +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-ThinItalic.woff +0 -0
- package/src/assets/fonts/FilsonPro/FilsonPro-ThinItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Bold.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Bold.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Bold.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Bold.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-BoldItalic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-BoldItalic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-BoldItalic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBlack.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBlack.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBlack.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBlack.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBold.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBold.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBold.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-CondensedBold.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Italic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Italic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Italic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Italic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Light.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Light.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Light.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Light.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-LightItalic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-LightItalic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-LightItalic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-LightItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Medium.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Medium.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Medium.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Medium.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-MediumItalic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-MediumItalic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-MediumItalic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Thin.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Thin.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Thin.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-Thin.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-ThinItalic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-ThinItalic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-ThinItalic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-ThinItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLight.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLight.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLight.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLight.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLightItalic.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLightItalic.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLightItalic.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue-UltraLightItalic.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue.eot +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue.ttf +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue.woff +0 -0
- package/src/assets/fonts/HelveticaNeue/HelveticaNeue.woff2 +0 -0
- package/src/assets/fonts/HelveticaNeue/demo.html +569 -0
- package/src/assets/fonts/HelveticaNeue/stylesheet.css +181 -0
- package/src/assets/fonts/Lato/Lato-Black.eot +0 -0
- package/src/assets/fonts/Lato/Lato-Black.ttf +0 -0
- package/src/assets/fonts/Lato/Lato-Black.woff +0 -0
- package/src/assets/fonts/Lato/Lato-Black.woff2 +0 -0
- package/src/assets/fonts/Lato/Lato-Bold.eot +0 -0
- package/src/assets/fonts/Lato/Lato-Bold.ttf +0 -0
- package/src/assets/fonts/Lato/Lato-Bold.woff +0 -0
- package/src/assets/fonts/Lato/Lato-Bold.woff2 +0 -0
- package/src/assets/fonts/Lato/Lato-Light.eot +0 -0
- package/src/assets/fonts/Lato/Lato-Light.ttf +0 -0
- package/src/assets/fonts/Lato/Lato-Light.woff +0 -0
- package/src/assets/fonts/Lato/Lato-Light.woff2 +0 -0
- package/src/assets/fonts/Lato/Lato-Regular.eot +0 -0
- package/src/assets/fonts/Lato/Lato-Regular.ttf +0 -0
- package/src/assets/fonts/Lato/Lato-Regular.woff +0 -0
- package/src/assets/fonts/Lato/Lato-Regular.woff2 +0 -0
- package/src/assets/fonts/Lux-Icons.woff2 +0 -0
- package/src/assets/fonts/MaterialIcons-Regular.eot +0 -0
- package/src/assets/fonts/MaterialIcons-Regular.ttf +0 -0
- package/src/assets/fonts/MaterialIcons-Regular.woff +0 -0
- package/src/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
- package/src/assets/fonts/OpenSans-Regular.ttf +0 -0
- package/src/assets/fonts/Roboto-Regular.ttf +0 -0
- package/src/assets/images/logo-transparent.png +0 -0
- package/src/assets/svgs/atomix-logo.svg +9 -0
- package/src/components/Accordion/Accordion.stories.tsx +271 -0
- package/src/components/Accordion/Accordion.tsx +131 -0
- package/src/components/Accordion/index.ts +3 -0
- package/src/components/Accordion/scripts/accordionInteractions.ts +70 -0
- package/src/components/Accordion/scripts/bundle.ts +24 -0
- package/src/components/Accordion/scripts/constants.ts +11 -0
- package/src/components/Accordion/scripts/index.ts +212 -0
- package/src/components/AtomixLogo/AtomixLogo.tsx +36 -0
- package/src/components/AtomixLogo/index.ts +3 -0
- package/src/components/AtomixLogo.tsx +40 -0
- package/src/components/Avatar/Avatar.stories.tsx +263 -0
- package/src/components/Avatar/Avatar.tsx +68 -0
- package/src/components/Avatar/AvatarGroup.tsx +73 -0
- package/src/components/Avatar/index.ts +3 -0
- package/src/components/Avatar/scripts/index.ts +497 -0
- package/src/components/Badge/Badge.stories.tsx +374 -0
- package/src/components/Badge/Badge.tsx +39 -0
- package/src/components/Badge/index.ts +3 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +108 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +98 -0
- package/src/components/Breadcrumb/index.ts +3 -0
- package/src/components/Breadcrumb/scripts/breadcrumb.ts +208 -0
- package/src/components/Breadcrumb/scripts/demo.html +246 -0
- package/src/components/Breadcrumb/scripts/index.ts +5 -0
- package/src/components/Breadcrumb/scripts/types.ts +69 -0
- package/src/components/Button/Button.stories.tsx +313 -0
- package/src/components/Button/Button.tsx +70 -0
- package/src/components/Button/index.ts +3 -0
- package/src/components/Button/scripts/buttonInteractions.ts +73 -0
- package/src/components/Button/scripts/index.ts +1 -0
- package/src/components/Callout/Callout.stories.tsx +595 -0
- package/src/components/Callout/Callout.tsx +78 -0
- package/src/components/Callout/index.ts +1 -0
- package/src/components/Callout/scripts/CalloutInteractions.ts +350 -0
- package/src/components/Callout/scripts/bundle.ts +18 -0
- package/src/components/Callout/scripts/index.ts +130 -0
- package/src/components/Card/Card.stories.tsx +107 -0
- package/src/components/Card/Card.tsx +69 -0
- package/src/components/Card/ElevationCard.tsx +47 -0
- package/src/components/Card/index.ts +15 -0
- package/src/components/Card/scripts/bundle.ts +30 -0
- package/src/components/Card/scripts/cardInteractions.ts +171 -0
- package/src/components/Card/scripts/demo.html +322 -0
- package/src/components/Card/scripts/index.ts +318 -0
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +46 -0
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +85 -0
- package/src/components/ColorModeToggle/index.ts +2 -0
- package/src/components/Countdown/Countdown.stories.tsx +47 -0
- package/src/components/Countdown/Countdown.tsx +90 -0
- package/src/components/Countdown/index.ts +2 -0
- package/src/components/Countdown/scripts/index.ts +238 -0
- package/src/components/DataTable/DataTable.stories.tsx +249 -0
- package/src/components/DataTable/DataTable.tsx +213 -0
- package/src/components/DataTable/index.ts +3 -0
- package/src/components/DataTable/scripts/bundle.ts +20 -0
- package/src/components/DataTable/scripts/index.ts +781 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +365 -0
- package/src/components/DatePicker/DatePicker.tsx +504 -0
- package/src/components/DatePicker/index.ts +4 -0
- package/src/components/DatePicker/readme.md +106 -0
- package/src/components/DatePicker/scripts/bundle.ts +39 -0
- package/src/components/DatePicker/scripts/componentInteractions.ts +230 -0
- package/src/components/DatePicker/scripts/index.ts +907 -0
- package/src/components/DatePicker/types.ts +167 -0
- package/src/components/DatePicker/utils.ts +163 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +359 -0
- package/src/components/Dropdown/Dropdown.tsx +342 -0
- package/src/components/Dropdown/index.ts +14 -0
- package/src/components/Dropdown/readme.md +151 -0
- package/src/components/Dropdown/scripts/bundle.ts +24 -0
- package/src/components/Dropdown/scripts/componentInteractions.ts +39 -0
- package/src/components/Dropdown/scripts/index.ts +612 -0
- package/src/components/EdgePanel/EdgePanel.stories.tsx +267 -0
- package/src/components/EdgePanel/EdgePanel.tsx +73 -0
- package/src/components/EdgePanel/index.ts +1 -0
- package/src/components/EdgePanel/scripts/bundle.ts +30 -0
- package/src/components/EdgePanel/scripts/edgePanelInteractions.ts +206 -0
- package/src/components/EdgePanel/scripts/index.ts +415 -0
- package/src/components/Form/Checkbox.stories.tsx +77 -0
- package/src/components/Form/Checkbox.tsx +69 -0
- package/src/components/Form/Form.stories.tsx +491 -0
- package/src/components/Form/Form.tsx +46 -0
- package/src/components/Form/FormGroup.stories.tsx +163 -0
- package/src/components/Form/FormGroup.tsx +53 -0
- package/src/components/Form/Input.stories.tsx +107 -0
- package/src/components/Form/Input.tsx +87 -0
- package/src/components/Form/Radio.stories.tsx +95 -0
- package/src/components/Form/Radio.tsx +65 -0
- package/src/components/Form/Select.stories.tsx +152 -0
- package/src/components/Form/Select.tsx +191 -0
- package/src/components/Form/Textarea.stories.tsx +124 -0
- package/src/components/Form/Textarea.tsx +78 -0
- package/src/components/Form/index.ts +7 -0
- package/src/components/Hero/Hero.stories.tsx +297 -0
- package/src/components/Hero/Hero.tsx +175 -0
- package/src/components/Hero/index.ts +6 -0
- package/src/components/Hero/scripts/bundle.ts +33 -0
- package/src/components/Hero/scripts/heroInteractions.ts +130 -0
- package/src/components/Hero/scripts/index.ts +144 -0
- package/src/components/Icon/Icon.tsx +87 -0
- package/src/components/Icon/index.ts +2 -0
- package/src/components/List/List.stories.tsx +123 -0
- package/src/components/List/List.tsx +35 -0
- package/src/components/List/ListGroup.tsx +34 -0
- package/src/components/List/index.ts +2 -0
- package/src/components/Messages/Messages.stories.tsx +161 -0
- package/src/components/Messages/Messages.tsx +172 -0
- package/src/components/Messages/index.ts +3 -0
- package/src/components/Messages/scripts/bundle.ts +47 -0
- package/src/components/Messages/scripts/componentInteractions.ts +132 -0
- package/src/components/Messages/scripts/index.ts +378 -0
- package/src/components/Modal/Modal.stories.tsx +288 -0
- package/src/components/Modal/Modal.tsx +198 -0
- package/src/components/Modal/README.md +169 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/Modal/scripts/bundle.ts +23 -0
- package/src/components/Modal/scripts/index.ts +374 -0
- package/src/components/Modal/scripts/modalInteractions.ts +141 -0
- package/src/components/Navigation/Menu/MegaMenu.tsx +107 -0
- package/src/components/Navigation/Menu/Menu.stories.tsx +340 -0
- package/src/components/Navigation/Menu/Menu.tsx +110 -0
- package/src/components/Navigation/Nav/Nav.stories.tsx +458 -0
- package/src/components/Navigation/Nav/Nav.tsx +50 -0
- package/src/components/Navigation/Nav/NavDropdown.tsx +105 -0
- package/src/components/Navigation/Nav/NavItem.tsx +159 -0
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +552 -0
- package/src/components/Navigation/Navbar/Navbar.tsx +150 -0
- package/src/components/Navigation/README.md +314 -0
- package/src/components/Navigation/SideMenu/SideMenu.README.md +494 -0
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +618 -0
- package/src/components/Navigation/SideMenu/SideMenu.tsx +101 -0
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +95 -0
- package/src/components/Navigation/SideMenu/SideMenuList.tsx +41 -0
- package/src/components/Navigation/index.ts +23 -0
- package/src/components/Navigation/scripts/NavbarInteractions.ts +171 -0
- package/src/components/Navigation/scripts/SideMenu.ts +319 -0
- package/src/components/Navigation/scripts/SideMenuBundle.ts +69 -0
- package/src/components/Navigation/scripts/SideMenuInteractions.ts +250 -0
- package/src/components/Navigation/scripts/bundle.ts +58 -0
- package/src/components/Navigation/scripts/index.ts +248 -0
- package/src/components/Pagination/Pagination.stories.tsx +194 -0
- package/src/components/Pagination/Pagination.tsx +162 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/Pagination/scripts/bundle.ts +15 -0
- package/src/components/Pagination/scripts/index.ts +315 -0
- package/src/components/PhotoViewer/PhotoViewer.stories.tsx +160 -0
- package/src/components/PhotoViewer/PhotoViewer.tsx +246 -0
- package/src/components/PhotoViewer/PhotoViewerHeader.tsx +177 -0
- package/src/components/PhotoViewer/PhotoViewerImage.tsx +173 -0
- package/src/components/PhotoViewer/PhotoViewerInfo.tsx +65 -0
- package/src/components/PhotoViewer/PhotoViewerNavigation.tsx +82 -0
- package/src/components/PhotoViewer/PhotoViewerThumbnails.tsx +53 -0
- package/src/components/PhotoViewer/README.md +358 -0
- package/src/components/PhotoViewer/examples/ImageGallery.tsx +190 -0
- package/src/components/PhotoViewer/examples/SimpleGallery.tsx +77 -0
- package/src/components/PhotoViewer/examples/index.ts +2 -0
- package/src/components/PhotoViewer/index.ts +14 -0
- package/src/components/PhotoViewer/scripts/PhotoViewerInteractions.ts +253 -0
- package/src/components/PhotoViewer/scripts/bundle.ts +81 -0
- package/src/components/PhotoViewer/scripts/index.ts +947 -0
- package/src/components/Popover/Popover.stories.tsx +143 -0
- package/src/components/Popover/Popover.tsx +137 -0
- package/src/components/Popover/index.ts +5 -0
- package/src/components/Popover/readme.md +120 -0
- package/src/components/Popover/scripts/bundle.ts +12 -0
- package/src/components/Popover/scripts/componentInteractions.ts +299 -0
- package/src/components/Popover/scripts/index.ts +342 -0
- package/src/components/ProductReview/ProductReview.stories.tsx +88 -0
- package/src/components/ProductReview/ProductReview.tsx +169 -0
- package/src/components/ProductReview/index.ts +3 -0
- package/src/components/ProductReview/scripts/bundle.ts +3 -0
- package/src/components/ProductReview/scripts/componentInteractions.ts +129 -0
- package/src/components/ProductReview/scripts/index.ts +3 -0
- package/src/components/Progress/Progress.stories.tsx +75 -0
- package/src/components/Progress/Progress.tsx +45 -0
- package/src/components/Progress/index.ts +1 -0
- package/src/components/Progress/scripts/bundle.ts +17 -0
- package/src/components/Progress/scripts/componentInteractions.ts +101 -0
- package/src/components/Progress/scripts/index.ts +184 -0
- package/src/components/Rating/Rating.stories.tsx +109 -0
- package/src/components/Rating/Rating.tsx +286 -0
- package/src/components/Rating/index.ts +6 -0
- package/src/components/Rating/scripts/bundle.ts +39 -0
- package/src/components/Rating/scripts/index.d.ts +12 -0
- package/src/components/Rating/scripts/index.ts +336 -0
- package/src/components/Rating/scripts/ratingInteractions.ts +160 -0
- package/src/components/River/River.stories.tsx +230 -0
- package/src/components/River/River.tsx +162 -0
- package/src/components/River/examples.html +223 -0
- package/src/components/River/index.ts +2 -0
- package/src/components/River/scripts/index.ts +137 -0
- package/src/components/SectionIntro/SectionIntro.stories.tsx +145 -0
- package/src/components/SectionIntro/SectionIntro.tsx +197 -0
- package/src/components/SectionIntro/index.ts +3 -0
- package/src/components/SectionIntro/scripts/bundle.ts +9 -0
- package/src/components/SectionIntro/scripts/componentInteractions.ts +37 -0
- package/src/components/SectionIntro/scripts/index.ts +163 -0
- package/src/components/Spinner/Spinner.stories.tsx +66 -0
- package/src/components/Spinner/Spinner.tsx +36 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Steps/Steps.stories.tsx +158 -0
- package/src/components/Steps/Steps.tsx +154 -0
- package/src/components/Steps/index.ts +3 -0
- package/src/components/Steps/scripts/index.ts +159 -0
- package/src/components/Tab/Tab.stories.tsx +129 -0
- package/src/components/Tab/Tab.tsx +133 -0
- package/src/components/Tab/index.ts +2 -0
- package/src/components/Tab/scripts/index.ts +200 -0
- package/src/components/Testimonial/Testimonial.stories.tsx +180 -0
- package/src/components/Testimonial/Testimonial.tsx +148 -0
- package/src/components/Testimonial/index.ts +3 -0
- package/src/components/Testimonial/scripts/index.ts +107 -0
- package/src/components/Todo/Todo.stories.tsx +155 -0
- package/src/components/Todo/Todo.tsx +158 -0
- package/src/components/Todo/index.ts +1 -0
- package/src/components/Todo/scripts/bundle.ts +14 -0
- package/src/components/Todo/scripts/index.ts +534 -0
- package/src/components/Todo/scripts/todoInteractions.ts +118 -0
- package/src/components/Todo/scripts/types.ts +19 -0
- package/src/components/Toggle/Toggle.stories.tsx +50 -0
- package/src/components/Toggle/Toggle.tsx +114 -0
- package/src/components/Toggle/index.ts +2 -0
- package/src/components/Toggle/scripts/bundle.ts +19 -0
- package/src/components/Toggle/scripts/index.ts +118 -0
- package/src/components/Toggle/scripts/toggleInteractions.ts +77 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +115 -0
- package/src/components/Tooltip/Tooltip.tsx +105 -0
- package/src/components/Tooltip/index.ts +3 -0
- package/src/components/Tooltip/scripts/bundle.ts +0 -0
- package/src/components/Tooltip/scripts/index.ts +395 -0
- package/src/components/Tooltip/scripts/tooltipInteractions.ts +165 -0
- package/src/components/Upload/Upload.stories.tsx +221 -0
- package/src/components/Upload/Upload.tsx +422 -0
- package/src/components/Upload/index.ts +3 -0
- package/src/components/Upload/scripts/index.ts +467 -0
- package/src/components/index.ts +117 -0
- package/src/design-tokens/BoxShadow/BoxShadow.stories.tsx +115 -0
- package/src/design-tokens/Colors/colors.scss +121 -0
- package/src/design-tokens/Colors/colors.stories.tsx +313 -0
- package/src/design-tokens/Spacing/Spacing.scss +62 -0
- package/src/design-tokens/Spacing/Spacing.stories.tsx +115 -0
- package/src/design-tokens/Typography/Typography.scss +240 -0
- package/src/design-tokens/Typography/Typography.stories.tsx +167 -0
- package/src/docs/atomix-component-guidelines.mdx +942 -0
- package/src/docs/atomix-roadmap.mdx +325 -0
- package/src/docs/implementation-guide.mdx +506 -0
- package/src/htmlComponentsEntry.ts +318 -0
- package/src/index.ts +21 -0
- package/src/layouts/Grid/Container.tsx +56 -0
- package/src/layouts/Grid/Grid.stories.tsx +560 -0
- package/src/layouts/Grid/Grid.tsx +67 -0
- package/src/layouts/Grid/GridCol.tsx +160 -0
- package/src/layouts/Grid/README.md +108 -0
- package/src/layouts/Grid/Row.tsx +68 -0
- package/src/layouts/Grid/index.ts +8 -0
- package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +388 -0
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +406 -0
- package/src/layouts/MasonryGrid/MasonryGridItem.tsx +42 -0
- package/src/layouts/MasonryGrid/README.md +117 -0
- package/src/layouts/MasonryGrid/index.ts +4 -0
- package/src/layouts/index.ts +9 -0
- package/src/lib/README.md +89 -0
- package/src/lib/composables/index.ts +44 -0
- package/src/lib/composables/useAccordion.ts +129 -0
- package/src/lib/composables/useBadge.ts +42 -0
- package/src/lib/composables/useBreadcrumb.ts +74 -0
- package/src/lib/composables/useButton.ts +59 -0
- package/src/lib/composables/useCallout.ts +55 -0
- package/src/lib/composables/useCard.ts +155 -0
- package/src/lib/composables/useCheckbox.ts +70 -0
- package/src/lib/composables/useDataTable.ts +208 -0
- package/src/lib/composables/useDatePicker.ts +562 -0
- package/src/lib/composables/useDropdown.ts +272 -0
- package/src/lib/composables/useEdgePanel.ts +261 -0
- package/src/lib/composables/useForm.ts +62 -0
- package/src/lib/composables/useFormGroup.ts +51 -0
- package/src/lib/composables/useHero.ts +250 -0
- package/src/lib/composables/useInput.ts +58 -0
- package/src/lib/composables/useMessages.ts +77 -0
- package/src/lib/composables/useModal.ts +110 -0
- package/src/lib/composables/useNavbar.ts +288 -0
- package/src/lib/composables/usePagination.ts +101 -0
- package/src/lib/composables/usePhotoViewer.ts +904 -0
- package/src/lib/composables/usePopover.ts +354 -0
- package/src/lib/composables/useProgress.ts +74 -0
- package/src/lib/composables/useRadio.ts +47 -0
- package/src/lib/composables/useRating.ts +174 -0
- package/src/lib/composables/useRiver.ts +205 -0
- package/src/lib/composables/useSelect.ts +52 -0
- package/src/lib/composables/useSideMenu.ts +197 -0
- package/src/lib/composables/useSpinner.ts +42 -0
- package/src/lib/composables/useTextarea.ts +55 -0
- package/src/lib/composables/useTodo.ts +142 -0
- package/src/lib/constants/components.ts +1050 -0
- package/src/lib/constants/index.ts +4 -0
- package/src/lib/index.ts +11 -0
- package/src/lib/types/components.ts +2498 -0
- package/src/lib/types/index.ts +2 -0
- package/src/lib/utils/dom.ts +41 -0
- package/src/lib/utils/icons.ts +74 -0
- package/src/lib/utils/index.ts +7 -0
- package/src/lib/utils/useForkRef.ts +36 -0
- package/src/styles/01-settings/_index.scss +64 -0
- package/src/styles/01-settings/_settings.accordion.scss +29 -0
- package/src/styles/01-settings/_settings.animations.scss +2 -0
- package/src/styles/01-settings/_settings.avatar-group.scss +20 -0
- package/src/styles/01-settings/_settings.avatar.scss +46 -0
- package/src/styles/01-settings/_settings.badge.scss +12 -0
- package/src/styles/01-settings/_settings.border-radius.scss +12 -0
- package/src/styles/01-settings/_settings.border.scss +14 -0
- package/src/styles/01-settings/_settings.box-shadow.scss +28 -0
- package/src/styles/01-settings/_settings.breadcrumb.scss +19 -0
- package/src/styles/01-settings/_settings.breakpoints.scss +8 -0
- package/src/styles/01-settings/_settings.btn-group.scss +1 -0
- package/src/styles/01-settings/_settings.button.scss +81 -0
- package/src/styles/01-settings/_settings.callout.scss +61 -0
- package/src/styles/01-settings/_settings.card.scss +36 -0
- package/src/styles/01-settings/_settings.checkbox-group.scss +2 -0
- package/src/styles/01-settings/_settings.checkbox.scss +20 -0
- package/src/styles/01-settings/_settings.color-mode.scss +5 -0
- package/src/styles/01-settings/_settings.colors.scss +252 -0
- package/src/styles/01-settings/_settings.config.scss +4 -0
- package/src/styles/01-settings/_settings.countdown.scss +15 -0
- package/src/styles/01-settings/_settings.data-table.scss +52 -0
- package/src/styles/01-settings/_settings.datepicker.scss +44 -0
- package/src/styles/01-settings/_settings.dropdown.scss +38 -0
- package/src/styles/01-settings/_settings.edge-panel.scss +17 -0
- package/src/styles/01-settings/_settings.fonts.scss +17 -0
- package/src/styles/01-settings/_settings.form-group.scss +11 -0
- package/src/styles/01-settings/_settings.form.scss +3 -0
- package/src/styles/01-settings/_settings.grid.scss +15 -0
- package/src/styles/01-settings/_settings.hero.scss +30 -0
- package/src/styles/01-settings/_settings.input.scss +38 -0
- package/src/styles/01-settings/_settings.link.scss +12 -0
- package/src/styles/01-settings/_settings.list-group.scss +14 -0
- package/src/styles/01-settings/_settings.list.scss +10 -0
- package/src/styles/01-settings/_settings.maps.scss +278 -0
- package/src/styles/01-settings/_settings.masonry-grid.scss +17 -0
- package/src/styles/01-settings/_settings.menu.scss +35 -0
- package/src/styles/01-settings/_settings.messages.scss +71 -0
- package/src/styles/01-settings/_settings.modal.scss +31 -0
- package/src/styles/01-settings/_settings.nav.scss +18 -0
- package/src/styles/01-settings/_settings.navbar.scss +46 -0
- package/src/styles/01-settings/_settings.pagination.scss +29 -0
- package/src/styles/01-settings/_settings.photoviewer.scss +35 -0
- package/src/styles/01-settings/_settings.popover.scss +13 -0
- package/src/styles/01-settings/_settings.position.scss +7 -0
- package/src/styles/01-settings/_settings.progress.scss +15 -0
- package/src/styles/01-settings/_settings.rating.scss +8 -0
- package/src/styles/01-settings/_settings.river.scss +34 -0
- package/src/styles/01-settings/_settings.sectionintro.scss +21 -0
- package/src/styles/01-settings/_settings.select.scss +32 -0
- package/src/styles/01-settings/_settings.side-menu.scss +64 -0
- package/src/styles/01-settings/_settings.skeleton.scss +14 -0
- package/src/styles/01-settings/_settings.spacing.scss +68 -0
- package/src/styles/01-settings/_settings.spinner.scss +13 -0
- package/src/styles/01-settings/_settings.steps.scss +26 -0
- package/src/styles/01-settings/_settings.tabs.scss +28 -0
- package/src/styles/01-settings/_settings.testimonials.scss +18 -0
- package/src/styles/01-settings/_settings.todo.scss +50 -0
- package/src/styles/01-settings/_settings.toggle.scss +34 -0
- package/src/styles/01-settings/_settings.tooltip.scss +19 -0
- package/src/styles/01-settings/_settings.typography.scss +93 -0
- package/src/styles/01-settings/_settings.upload.scss +70 -0
- package/src/styles/01-settings/_settings.z-layers.scss +9 -0
- package/src/styles/02-tools/_index.scss +20 -0
- package/src/styles/02-tools/_tools.animations.scss +19 -0
- package/src/styles/02-tools/_tools.border-radius.scss +78 -0
- package/src/styles/02-tools/_tools.breakpoints.scss +48 -0
- package/src/styles/02-tools/_tools.button.scss +115 -0
- package/src/styles/02-tools/_tools.clearfix.scss +10 -0
- package/src/styles/02-tools/_tools.color-functions.scss +28 -0
- package/src/styles/02-tools/_tools.color-mode.scss +22 -0
- package/src/styles/02-tools/_tools.event.scss +22 -0
- package/src/styles/02-tools/_tools.grid.scss +76 -0
- package/src/styles/02-tools/_tools.hidden-visually.scss +32 -0
- package/src/styles/02-tools/_tools.hidden.scss +2 -0
- package/src/styles/02-tools/_tools.map-loop.scss +31 -0
- package/src/styles/02-tools/_tools.media-queries.scss +69 -0
- package/src/styles/02-tools/_tools.object-fit.scss +4 -0
- package/src/styles/02-tools/_tools.placeholder.scss +17 -0
- package/src/styles/02-tools/_tools.rem.scss +5 -0
- package/src/styles/02-tools/_tools.size.scss +8 -0
- package/src/styles/02-tools/_tools.spacing.scss +140 -0
- package/src/styles/02-tools/_tools.to-rgb.scss +9 -0
- package/src/styles/02-tools/_tools.transition.scss +50 -0
- package/src/styles/02-tools/_tools.utilities.scss +14 -0
- package/src/styles/02-tools/_tools.utility-api.scss +144 -0
- package/src/styles/03-generic/_generic.fonts.scss +24 -0
- package/src/styles/03-generic/_generic.reset.scss +402 -0
- package/src/styles/03-generic/_generic.root.scss +184 -0
- package/src/styles/03-generic/_generic.selection.scss +15 -0
- package/src/styles/03-generic/_index.scss +5 -0
- package/src/styles/04-elements/_elements.all.scss +16 -0
- package/src/styles/04-elements/_elements.body.scss +15 -0
- package/src/styles/04-elements/_elements.heading.scss +54 -0
- package/src/styles/04-elements/_elements.html.scss +9 -0
- package/src/styles/04-elements/_elements.links.scss +11 -0
- package/src/styles/04-elements/_index.scss +6 -0
- package/src/styles/05-objects/_index.scss +4 -0
- package/src/styles/05-objects/_objects.container.scss +36 -0
- package/src/styles/05-objects/_objects.grid.scss +25 -0
- package/src/styles/05-objects/_objects.masonry-grid.scss +96 -0
- package/src/styles/06-components/_components.accordion.scss +109 -0
- package/src/styles/06-components/_components.avatar-group.scss +85 -0
- package/src/styles/06-components/_components.avatar.scss +101 -0
- package/src/styles/06-components/_components.badge.scss +62 -0
- package/src/styles/06-components/_components.breadcrumb.scss +80 -0
- package/src/styles/06-components/_components.btn-group.scss +35 -0
- package/src/styles/06-components/_components.button.scss +134 -0
- package/src/styles/06-components/_components.callout.scss +272 -0
- package/src/styles/06-components/_components.card.scss +148 -0
- package/src/styles/06-components/_components.checkbox-group.scss +17 -0
- package/src/styles/06-components/_components.checkbox.scss +135 -0
- package/src/styles/06-components/_components.color-mode-toggle.scss +36 -0
- package/src/styles/06-components/_components.countdown.scss +63 -0
- package/src/styles/06-components/_components.data-table.scss +183 -0
- package/src/styles/06-components/_components.datepicker.scss +546 -0
- package/src/styles/06-components/_components.dropdown.scss +255 -0
- package/src/styles/06-components/_components.edge-panel.scss +350 -0
- package/src/styles/06-components/_components.form-group.scss +78 -0
- package/src/styles/06-components/_components.form.scss +21 -0
- package/src/styles/06-components/_components.hero.scss +147 -0
- package/src/styles/06-components/_components.icon.scss +80 -0
- package/src/styles/06-components/_components.image-gallery.scss +72 -0
- package/src/styles/06-components/_components.input.scss +107 -0
- package/src/styles/06-components/_components.list-group.scss +63 -0
- package/src/styles/06-components/_components.list.scss +57 -0
- package/src/styles/06-components/_components.menu.scss +239 -0
- package/src/styles/06-components/_components.messages.scss +332 -0
- package/src/styles/06-components/_components.modal.scss +153 -0
- package/src/styles/06-components/_components.nav.scss +172 -0
- package/src/styles/06-components/_components.navbar.scss +310 -0
- package/src/styles/06-components/_components.pagination.scss +155 -0
- package/src/styles/06-components/_components.photoviewer.scss +878 -0
- package/src/styles/06-components/_components.popover.scss +99 -0
- package/src/styles/06-components/_components.product-review.scss +128 -0
- package/src/styles/06-components/_components.progress.scss +43 -0
- package/src/styles/06-components/_components.rating.scss +161 -0
- package/src/styles/06-components/_components.river.scss +216 -0
- package/src/styles/06-components/_components.sectionintro.scss +163 -0
- package/src/styles/06-components/_components.select.scss +125 -0
- package/src/styles/06-components/_components.side-menu.scss +234 -0
- package/src/styles/06-components/_components.skeleton.scss +55 -0
- package/src/styles/06-components/_components.spinner.scss +45 -0
- package/src/styles/06-components/_components.steps.scss +99 -0
- package/src/styles/06-components/_components.tabs.scss +124 -0
- package/src/styles/06-components/_components.testimonials.scss +65 -0
- package/src/styles/06-components/_components.todo.scss +163 -0
- package/src/styles/06-components/_components.toggle.scss +100 -0
- package/src/styles/06-components/_components.tooltip.scss +136 -0
- package/src/styles/06-components/_components.upload.scss +250 -0
- package/src/styles/06-components/_index.scss +49 -0
- package/src/styles/99-utilities/_index.scss +21 -0
- package/src/styles/99-utilities/_utilities.background.scss +28 -0
- package/src/styles/99-utilities/_utilities.border.scss +157 -0
- package/src/styles/99-utilities/_utilities.clearfix.scss +5 -0
- package/src/styles/99-utilities/_utilities.display.scss +13 -0
- package/src/styles/99-utilities/_utilities.flex.scss +109 -0
- package/src/styles/99-utilities/_utilities.link.scss +96 -0
- package/src/styles/99-utilities/_utilities.object-fit.scss +17 -0
- package/src/styles/99-utilities/_utilities.opacity.scss +16 -0
- package/src/styles/99-utilities/_utilities.overflow.scss +20 -0
- package/src/styles/99-utilities/_utilities.position.scss +40 -0
- package/src/styles/99-utilities/_utilities.scss +42 -0
- package/src/styles/99-utilities/_utilities.shadow.scss +19 -0
- package/src/styles/99-utilities/_utilities.sizes.scss +81 -0
- package/src/styles/99-utilities/_utilities.spacing.scss +188 -0
- package/src/styles/99-utilities/_utilities.text.scss +87 -0
- package/src/styles/99-utilities/_utilities.visibility.scss +13 -0
- package/src/styles/99-utilities/_utilities.visually-hidden.scss +5 -0
- package/src/styles/99-utilities/_utilities.z-index.scss +11 -0
- package/src/styles/index.scss +12 -0
- package/tsconfig.json +74 -0
- package/webpack.config.js +463 -0
- package/dist/types/components/Navbar/Nav.d.ts +0 -5
- package/dist/types/components/Navbar/NavItem.d.ts +0 -5
- package/dist/types/components/Navbar/Navbar.d.ts +0 -5
- package/dist/types/components/Navbar/index.d.ts +0 -6
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React, { CSSProperties, useEffect } from 'react';
|
|
2
|
+
import { HeroProps, HeroAlignment } from '../../lib/types/components';
|
|
3
|
+
import { useHero } from '../../lib/composables/useHero';
|
|
4
|
+
import { HERO } from '../../lib/constants/components';
|
|
5
|
+
|
|
6
|
+
export const Hero: React.FC<HeroProps> = ({
|
|
7
|
+
title,
|
|
8
|
+
subtitle,
|
|
9
|
+
text,
|
|
10
|
+
imageSrc,
|
|
11
|
+
imageAlt = 'Hero image',
|
|
12
|
+
alignment = 'left',
|
|
13
|
+
backgroundImageSrc,
|
|
14
|
+
showOverlay = true,
|
|
15
|
+
fullViewportHeight = false,
|
|
16
|
+
actions,
|
|
17
|
+
imageColSize = 7,
|
|
18
|
+
contentColSize = 5,
|
|
19
|
+
contentWidth,
|
|
20
|
+
className = '',
|
|
21
|
+
parallax = false,
|
|
22
|
+
parallaxIntensity = 0.5,
|
|
23
|
+
videoBackground,
|
|
24
|
+
videoOptions = {
|
|
25
|
+
autoplay: true,
|
|
26
|
+
loop: true,
|
|
27
|
+
muted: true,
|
|
28
|
+
},
|
|
29
|
+
}) => {
|
|
30
|
+
const {
|
|
31
|
+
generateHeroClassNames,
|
|
32
|
+
generateImageColClass,
|
|
33
|
+
generateContentColClass,
|
|
34
|
+
hasBackgroundImage,
|
|
35
|
+
hasForegroundImage,
|
|
36
|
+
useGridLayout,
|
|
37
|
+
heroRef,
|
|
38
|
+
videoRef,
|
|
39
|
+
} = useHero({
|
|
40
|
+
alignment,
|
|
41
|
+
imageColSize,
|
|
42
|
+
contentColSize,
|
|
43
|
+
imageSrc,
|
|
44
|
+
backgroundImageSrc,
|
|
45
|
+
showOverlay,
|
|
46
|
+
fullViewportHeight,
|
|
47
|
+
contentWidth,
|
|
48
|
+
parallax,
|
|
49
|
+
parallaxIntensity,
|
|
50
|
+
videoBackground,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Create custom style for hero element with content width if provided
|
|
54
|
+
const heroStyle: React.CSSProperties | undefined = contentWidth
|
|
55
|
+
? ({
|
|
56
|
+
'--atomix-hero-content-width': contentWidth,
|
|
57
|
+
} as React.CSSProperties)
|
|
58
|
+
: undefined;
|
|
59
|
+
|
|
60
|
+
const renderVideoBackground = () => {
|
|
61
|
+
if (!videoBackground) return null;
|
|
62
|
+
|
|
63
|
+
const { autoplay, loop, muted, posterUrl } = videoOptions;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<video
|
|
67
|
+
ref={videoRef}
|
|
68
|
+
className="c-hero__video"
|
|
69
|
+
autoPlay={autoplay}
|
|
70
|
+
loop={loop}
|
|
71
|
+
muted={muted}
|
|
72
|
+
playsInline
|
|
73
|
+
poster={posterUrl}
|
|
74
|
+
>
|
|
75
|
+
<source src={videoBackground} type={`video/${videoBackground.split('.').pop() || 'mp4'}`} />
|
|
76
|
+
Your browser does not support the video tag.
|
|
77
|
+
</video>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const renderBackground = () => {
|
|
82
|
+
if (!hasBackgroundImage && !videoBackground) return null;
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className={HERO.SELECTORS.BG.replace('.', '')}>
|
|
86
|
+
{backgroundImageSrc && (
|
|
87
|
+
<img
|
|
88
|
+
src={backgroundImageSrc}
|
|
89
|
+
alt="Background"
|
|
90
|
+
className={HERO.SELECTORS.BG_IMAGE.replace('.', '')}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
{renderVideoBackground()}
|
|
94
|
+
{showOverlay && <div className={HERO.SELECTORS.OVERLAY.replace('.', '')}></div>}
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const renderContent = () => (
|
|
100
|
+
<div className={HERO.SELECTORS.CONTENT.replace('.', '')}>
|
|
101
|
+
{subtitle && <p className={HERO.SELECTORS.SUBTITLE.replace('.', '')}>{subtitle}</p>}
|
|
102
|
+
<h1 className={HERO.SELECTORS.TITLE.replace('.', '')}>{title}</h1>
|
|
103
|
+
{text && <p className={HERO.SELECTORS.TEXT.replace('.', '')}>{text}</p>}
|
|
104
|
+
{actions && <div className={HERO.SELECTORS.ACTIONS.replace('.', '')}>{actions}</div>}
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const renderForegroundImage = () => {
|
|
109
|
+
if (!hasForegroundImage) return null;
|
|
110
|
+
|
|
111
|
+
if (alignment === 'center') {
|
|
112
|
+
return (
|
|
113
|
+
<div className={HERO.SELECTORS.IMAGE_WRAPPER.replace('.', '')}>
|
|
114
|
+
<img src={imageSrc} alt={imageAlt} className={HERO.SELECTORS.IMAGE.replace('.', '')} />
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<div className={generateImageColClass()}>
|
|
121
|
+
<img src={imageSrc} alt={imageAlt} className={HERO.SELECTORS.IMAGE.replace('.', '')} />
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const renderGridContent = () => {
|
|
127
|
+
// For left-aligned content, render content first then image
|
|
128
|
+
if (alignment === 'left') {
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<div className={generateContentColClass()}>{renderContent()}</div>
|
|
132
|
+
{renderForegroundImage()}
|
|
133
|
+
</>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// For right-aligned or default, render image first then content
|
|
138
|
+
return (
|
|
139
|
+
<>
|
|
140
|
+
{renderForegroundImage()}
|
|
141
|
+
<div className={generateContentColClass()}>{renderContent()}</div>
|
|
142
|
+
</>
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<div
|
|
148
|
+
ref={heroRef}
|
|
149
|
+
className={generateHeroClassNames(className)}
|
|
150
|
+
style={heroStyle}
|
|
151
|
+
data-parallax={parallax ? 'true' : undefined}
|
|
152
|
+
data-parallax-intensity={parallax ? parallaxIntensity : undefined}
|
|
153
|
+
>
|
|
154
|
+
{renderBackground()}
|
|
155
|
+
<div className={`${HERO.SELECTORS.CONTAINER.replace('.', '')} o-container`}>
|
|
156
|
+
{useGridLayout ? (
|
|
157
|
+
<div className={`${HERO.SELECTORS.GRID.replace('.', '')} o-grid`}>
|
|
158
|
+
{renderGridContent()}
|
|
159
|
+
</div>
|
|
160
|
+
) : (
|
|
161
|
+
<>
|
|
162
|
+
{renderContent()}
|
|
163
|
+
{renderForegroundImage()}
|
|
164
|
+
</>
|
|
165
|
+
)}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export type { HeroProps };
|
|
172
|
+
|
|
173
|
+
Hero.displayName = 'Hero';
|
|
174
|
+
|
|
175
|
+
export default Hero;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle file for Hero component
|
|
3
|
+
* Used for global exports and browser usage
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Hero, initHeroes } from './index';
|
|
7
|
+
import {
|
|
8
|
+
applyParallaxEffect,
|
|
9
|
+
removeParallaxEffect,
|
|
10
|
+
applyVideoBackground,
|
|
11
|
+
initializeHeroesWithCustomBehavior,
|
|
12
|
+
} from './heroInteractions';
|
|
13
|
+
|
|
14
|
+
// Export for global use
|
|
15
|
+
export {
|
|
16
|
+
Hero,
|
|
17
|
+
initHeroes,
|
|
18
|
+
applyParallaxEffect,
|
|
19
|
+
removeParallaxEffect,
|
|
20
|
+
applyVideoBackground,
|
|
21
|
+
initializeHeroesWithCustomBehavior,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Add to global namespace for direct browser usage
|
|
25
|
+
if (typeof window !== 'undefined') {
|
|
26
|
+
(window as any).Atomix = (window as any).Atomix || {};
|
|
27
|
+
(window as any).Atomix.Hero = Hero;
|
|
28
|
+
(window as any).Atomix.initHeroes = initHeroes;
|
|
29
|
+
(window as any).Atomix.applyParallaxEffect = applyParallaxEffect;
|
|
30
|
+
(window as any).Atomix.removeParallaxEffect = removeParallaxEffect;
|
|
31
|
+
(window as any).Atomix.applyVideoBackground = applyVideoBackground;
|
|
32
|
+
(window as any).Atomix.initializeHeroesWithCustomBehavior = initializeHeroesWithCustomBehavior;
|
|
33
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Hero } from './index';
|
|
2
|
+
import { HERO } from '../../../lib/constants/components';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Apply parallax effect to hero background
|
|
6
|
+
* @param hero - Hero element
|
|
7
|
+
* @param intensity - Parallax effect intensity (0-1)
|
|
8
|
+
*/
|
|
9
|
+
export function applyParallaxEffect(hero: HTMLElement, intensity: number = 0.5): void {
|
|
10
|
+
if (!hero) return;
|
|
11
|
+
|
|
12
|
+
// Ensure intensity is between 0 and 1
|
|
13
|
+
const safeIntensity = Math.max(0, Math.min(1, intensity));
|
|
14
|
+
|
|
15
|
+
// Add parallax class
|
|
16
|
+
hero.classList.add('c-hero--parallax');
|
|
17
|
+
|
|
18
|
+
// Handle scroll event
|
|
19
|
+
const handleScroll = (): void => {
|
|
20
|
+
const scrollPosition = window.pageYOffset;
|
|
21
|
+
const offset = scrollPosition * safeIntensity;
|
|
22
|
+
|
|
23
|
+
// Apply transform
|
|
24
|
+
hero.style.backgroundPositionY = `calc(50% + ${offset}px)`;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Add event listener
|
|
28
|
+
window.addEventListener('scroll', handleScroll);
|
|
29
|
+
|
|
30
|
+
// Store the handler for cleanup
|
|
31
|
+
(hero as any)._parallaxHandler = handleScroll;
|
|
32
|
+
|
|
33
|
+
// Initial call
|
|
34
|
+
handleScroll();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Remove parallax effect from hero
|
|
39
|
+
* @param hero - Hero element
|
|
40
|
+
*/
|
|
41
|
+
export function removeParallaxEffect(hero: HTMLElement): void {
|
|
42
|
+
if (!hero) return;
|
|
43
|
+
|
|
44
|
+
// Remove class
|
|
45
|
+
hero.classList.remove('c-hero--parallax');
|
|
46
|
+
|
|
47
|
+
// Remove style
|
|
48
|
+
hero.style.backgroundPositionY = '';
|
|
49
|
+
|
|
50
|
+
// Remove event listener
|
|
51
|
+
if ((hero as any)._parallaxHandler) {
|
|
52
|
+
window.removeEventListener('scroll', (hero as any)._parallaxHandler);
|
|
53
|
+
delete (hero as any)._parallaxHandler;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Apply video background to hero
|
|
59
|
+
* @param hero - Hero element
|
|
60
|
+
* @param videoUrl - URL of the video
|
|
61
|
+
* @param options - Video options
|
|
62
|
+
*/
|
|
63
|
+
export function applyVideoBackground(
|
|
64
|
+
hero: HTMLElement,
|
|
65
|
+
videoUrl: string,
|
|
66
|
+
options: {
|
|
67
|
+
autoplay?: boolean;
|
|
68
|
+
loop?: boolean;
|
|
69
|
+
muted?: boolean;
|
|
70
|
+
posterUrl?: string;
|
|
71
|
+
} = {}
|
|
72
|
+
): void {
|
|
73
|
+
if (!hero) return;
|
|
74
|
+
|
|
75
|
+
// Default options
|
|
76
|
+
const { autoplay = true, loop = true, muted = true, posterUrl } = options;
|
|
77
|
+
|
|
78
|
+
// Create video element
|
|
79
|
+
const video = document.createElement('video');
|
|
80
|
+
video.className = 'c-hero__video';
|
|
81
|
+
video.autoplay = autoplay;
|
|
82
|
+
video.loop = loop;
|
|
83
|
+
video.muted = muted;
|
|
84
|
+
video.setAttribute('playsinline', '');
|
|
85
|
+
|
|
86
|
+
if (posterUrl) {
|
|
87
|
+
video.poster = posterUrl;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Add source
|
|
91
|
+
const source = document.createElement('source');
|
|
92
|
+
source.src = videoUrl;
|
|
93
|
+
source.type = `video/${videoUrl.split('.').pop() || 'mp4'}`;
|
|
94
|
+
|
|
95
|
+
video.appendChild(source);
|
|
96
|
+
|
|
97
|
+
// Add to hero
|
|
98
|
+
hero.appendChild(video);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Initialize hero with custom behavior
|
|
103
|
+
* @param selector - CSS selector for hero elements
|
|
104
|
+
*/
|
|
105
|
+
export function initializeHeroesWithCustomBehavior(selector = HERO.SELECTORS.HERO): Hero[] {
|
|
106
|
+
const heroes = Hero.initializeAll(selector);
|
|
107
|
+
|
|
108
|
+
// Apply custom behaviors based on data attributes
|
|
109
|
+
heroes.forEach(heroInstance => {
|
|
110
|
+
const element = heroInstance['element'] as HTMLElement;
|
|
111
|
+
|
|
112
|
+
// Apply parallax if data attribute is present
|
|
113
|
+
if (element.dataset.parallax === 'true') {
|
|
114
|
+
const intensity = parseFloat(element.dataset.parallaxIntensity || '0.5');
|
|
115
|
+
applyParallaxEffect(element, intensity);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Apply video background if data attribute is present
|
|
119
|
+
if (element.dataset.videoBackground) {
|
|
120
|
+
applyVideoBackground(element, element.dataset.videoBackground, {
|
|
121
|
+
autoplay: element.dataset.videoAutoplay !== 'false',
|
|
122
|
+
loop: element.dataset.videoLoop !== 'false',
|
|
123
|
+
muted: element.dataset.videoMuted !== 'false',
|
|
124
|
+
posterUrl: element.dataset.videoPoster,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return heroes;
|
|
130
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { HERO } from '../../../lib/constants/components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HeroOptions interface for the vanilla JS implementation
|
|
5
|
+
*/
|
|
6
|
+
export interface HeroOptions {
|
|
7
|
+
backgroundImage?: string;
|
|
8
|
+
overlay?: boolean;
|
|
9
|
+
overlayOpacity?: number;
|
|
10
|
+
fullHeight?: boolean;
|
|
11
|
+
centered?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* HeroInstance interface
|
|
17
|
+
*/
|
|
18
|
+
export interface HeroInstance {
|
|
19
|
+
init(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Default options for the Hero component
|
|
25
|
+
*/
|
|
26
|
+
const DEFAULT_OPTIONS: HeroOptions = {
|
|
27
|
+
overlay: true,
|
|
28
|
+
overlayOpacity: 0.5,
|
|
29
|
+
fullHeight: false,
|
|
30
|
+
centered: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Hero Class - Vanilla JS implementation
|
|
35
|
+
*/
|
|
36
|
+
export class Hero implements HeroInstance {
|
|
37
|
+
private element: HTMLElement;
|
|
38
|
+
private options: HeroOptions;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Constructor
|
|
42
|
+
* @param element - DOM element or selector
|
|
43
|
+
* @param options - Configuration options
|
|
44
|
+
*/
|
|
45
|
+
constructor(element: string | HTMLElement, options: HeroOptions = {}) {
|
|
46
|
+
// Get element reference
|
|
47
|
+
this.element =
|
|
48
|
+
typeof element === 'string' ? (document.querySelector(element) as HTMLElement) : element;
|
|
49
|
+
|
|
50
|
+
if (!this.element) {
|
|
51
|
+
throw new Error('Hero: Element not found');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Merge default options with provided options
|
|
55
|
+
this.options = { ...DEFAULT_OPTIONS, ...options };
|
|
56
|
+
|
|
57
|
+
// Initialize the component
|
|
58
|
+
this.init();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Initialize the hero component
|
|
63
|
+
*/
|
|
64
|
+
public init(): void {
|
|
65
|
+
// Apply classes and styles based on options
|
|
66
|
+
if (this.options.fullHeight) {
|
|
67
|
+
this.element.classList.add('c-hero--full-height');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (this.options.centered) {
|
|
71
|
+
this.element.classList.add('c-hero--centered');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (this.options.className) {
|
|
75
|
+
this.element.classList.add(this.options.className);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (this.options.backgroundImage) {
|
|
79
|
+
this.element.style.backgroundImage = `url(${this.options.backgroundImage})`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Set up overlay if needed
|
|
83
|
+
if (this.options.overlay) {
|
|
84
|
+
const overlay = document.createElement('div');
|
|
85
|
+
overlay.className = 'c-hero__overlay';
|
|
86
|
+
|
|
87
|
+
if (this.options.overlayOpacity !== undefined) {
|
|
88
|
+
overlay.style.opacity = this.options.overlayOpacity.toString();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
this.element.appendChild(overlay);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Destroy the hero component
|
|
97
|
+
*/
|
|
98
|
+
public destroy(): void {
|
|
99
|
+
// Remove added classes
|
|
100
|
+
this.element.classList.remove('c-hero--full-height');
|
|
101
|
+
this.element.classList.remove('c-hero--centered');
|
|
102
|
+
|
|
103
|
+
if (this.options.className) {
|
|
104
|
+
this.element.classList.remove(this.options.className);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Remove background image
|
|
108
|
+
if (this.options.backgroundImage) {
|
|
109
|
+
this.element.style.backgroundImage = '';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Remove overlay
|
|
113
|
+
const overlay = this.element.querySelector('.c-hero__overlay');
|
|
114
|
+
if (overlay) {
|
|
115
|
+
this.element.removeChild(overlay);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Initialize all hero components in the document
|
|
121
|
+
*/
|
|
122
|
+
public static initializeAll(selector = '[data-component="hero"]'): Hero[] {
|
|
123
|
+
const elements = document.querySelectorAll(selector);
|
|
124
|
+
return Array.from(elements).map(element => {
|
|
125
|
+
return new Hero(element as HTMLElement);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Initialize all hero components in the document
|
|
132
|
+
*/
|
|
133
|
+
export function initHeroes(): void {
|
|
134
|
+
Hero.initializeAll();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Automatically initialize heroes when the DOM is ready
|
|
138
|
+
if (typeof document !== 'undefined') {
|
|
139
|
+
if (document.readyState === 'loading') {
|
|
140
|
+
document.addEventListener('DOMContentLoaded', initHeroes);
|
|
141
|
+
} else {
|
|
142
|
+
initHeroes();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as PhosphorIcons from 'phosphor-react';
|
|
3
|
+
|
|
4
|
+
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type IconWeight = 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
6
|
+
|
|
7
|
+
// We need to filter out non-icon exports from the Phosphor package
|
|
8
|
+
type PhosphorIconsType = Exclude<
|
|
9
|
+
keyof typeof PhosphorIcons,
|
|
10
|
+
'Icon' | 'IconContext' | 'IconBase' | 'IconProps' | 'createIcon' | 'default' | 'SSR'
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export interface IconProps {
|
|
14
|
+
/**
|
|
15
|
+
* Icon name from Phosphor Icons
|
|
16
|
+
*/
|
|
17
|
+
name: PhosphorIconsType;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Icon size
|
|
21
|
+
*/
|
|
22
|
+
size?: IconSize | number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Icon weight/style
|
|
26
|
+
*/
|
|
27
|
+
weight?: IconWeight;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Icon color
|
|
31
|
+
*/
|
|
32
|
+
color?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Additional CSS class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Alt text for accessibility
|
|
41
|
+
*/
|
|
42
|
+
alt?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Map string sizes to pixel values
|
|
46
|
+
const sizeMap: Record<IconSize, number> = {
|
|
47
|
+
xs: 16,
|
|
48
|
+
sm: 20,
|
|
49
|
+
md: 24,
|
|
50
|
+
lg: 32,
|
|
51
|
+
xl: 40,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Icon component that displays a Phosphor icon
|
|
56
|
+
*/
|
|
57
|
+
export const Icon: React.FC<IconProps> = ({
|
|
58
|
+
name,
|
|
59
|
+
size = 'md',
|
|
60
|
+
weight = 'regular',
|
|
61
|
+
color,
|
|
62
|
+
className = '',
|
|
63
|
+
alt,
|
|
64
|
+
}) => {
|
|
65
|
+
// Get the icon component from Phosphor
|
|
66
|
+
const IconComponent = PhosphorIcons[name] as React.FC<
|
|
67
|
+
PhosphorIcons.IconProps & { ref?: React.Ref<SVGSVGElement> }
|
|
68
|
+
>;
|
|
69
|
+
|
|
70
|
+
if (!IconComponent) {
|
|
71
|
+
console.warn(`Icon "${name}" not found in Phosphor Icons`);
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Convert string size to pixel value if needed
|
|
76
|
+
const pixelSize = typeof size === 'string' ? sizeMap[size as IconSize] || 24 : size;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<span className={`c-icon c-icon--${size} ${className}`} aria-hidden={!alt} title={alt}>
|
|
80
|
+
<IconComponent size={pixelSize} weight={weight} color={color} aria-label={alt} />
|
|
81
|
+
</span>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
Icon.displayName = 'Icon';
|
|
86
|
+
|
|
87
|
+
export default Icon;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { List } from './List';
|
|
4
|
+
import { ListGroup } from './ListGroup';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/List',
|
|
8
|
+
component: List,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
variant: {
|
|
15
|
+
control: { type: 'select' },
|
|
16
|
+
options: ['default', 'dash', 'number', 'text'],
|
|
17
|
+
description: 'List style variant',
|
|
18
|
+
},
|
|
19
|
+
children: {
|
|
20
|
+
control: { type: 'text' },
|
|
21
|
+
description: 'List items content',
|
|
22
|
+
},
|
|
23
|
+
className: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
description: 'Additional CSS class names',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
} satisfies Meta<typeof List>;
|
|
29
|
+
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
|
|
33
|
+
// Basic list items for reuse
|
|
34
|
+
const ITEMS = ['item 1', 'item 2', 'item 3'];
|
|
35
|
+
|
|
36
|
+
const sectionStyle = { marginBottom: '16px' };
|
|
37
|
+
const titleStyle = { fontWeight: 'normal', marginBottom: '8px' };
|
|
38
|
+
|
|
39
|
+
const ListItem = ({ children }: { children: React.ReactNode }) => <span>{children}</span>;
|
|
40
|
+
const ListItems = ({ variant }: { variant: string }) => (
|
|
41
|
+
<>
|
|
42
|
+
{ITEMS.map((item, index) => (
|
|
43
|
+
<ListItem key={index}>{variant === 'number' ? `${index + 1}. ${item}` : item}</ListItem>
|
|
44
|
+
))}
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const createListSection = (title: string, variant: string) => (
|
|
49
|
+
<div style={sectionStyle}>
|
|
50
|
+
<h3 style={titleStyle}>{title}</h3>
|
|
51
|
+
<List variant={variant as any}>
|
|
52
|
+
<ListItems variant={variant} />
|
|
53
|
+
</List>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// Basic List example
|
|
58
|
+
export const Basic: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
children: ITEMS,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// List Variants Showcase
|
|
65
|
+
export const VariantsShowcase: Story = {
|
|
66
|
+
render: () => {
|
|
67
|
+
return (
|
|
68
|
+
<div className="u-d-flex u-flex-column u-gap-8">
|
|
69
|
+
{['Default', 'Dash', 'Number', 'Text'].map((title, index) => {
|
|
70
|
+
const variant = index === 0 ? 'default' : title.toLowerCase();
|
|
71
|
+
return createListSection(`${title} List`, variant);
|
|
72
|
+
})}
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// ListGroup Showcase
|
|
79
|
+
export const ListGroupShowcase: Story = {
|
|
80
|
+
render: () => {
|
|
81
|
+
const listGroupConfig = [
|
|
82
|
+
{ title: 'Standard', compact: false, divided: false },
|
|
83
|
+
{ title: 'Compact', compact: true, divided: false },
|
|
84
|
+
{ title: 'Divided', compact: false, divided: true },
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<div className="u-d-flex u-flex-column u-gap-8">
|
|
89
|
+
<div>
|
|
90
|
+
<h3 style={titleStyle}>Mixed Variants ListGroup</h3>
|
|
91
|
+
<ListGroup>
|
|
92
|
+
<List variant="dash">
|
|
93
|
+
<ListItems variant="dash" />
|
|
94
|
+
</List>
|
|
95
|
+
<List variant="number">
|
|
96
|
+
<ListItems variant="number" />
|
|
97
|
+
</List>
|
|
98
|
+
<List variant="text">
|
|
99
|
+
<ListItems variant="text" />
|
|
100
|
+
</List>
|
|
101
|
+
</ListGroup>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{listGroupConfig.map(({ title, compact, divided }) => (
|
|
105
|
+
<div key={title}>
|
|
106
|
+
<h3 style={titleStyle}>{title} ListGroup</h3>
|
|
107
|
+
<ListGroup>
|
|
108
|
+
{ITEMS.map((section, idx) => (
|
|
109
|
+
<List key={idx}>
|
|
110
|
+
{[1, 2].map(item => (
|
|
111
|
+
<ListItem key={item}>
|
|
112
|
+
{`${section.charAt(0).toUpperCase() + section.slice(1)} - item ${item}`}
|
|
113
|
+
</ListItem>
|
|
114
|
+
))}
|
|
115
|
+
</List>
|
|
116
|
+
))}
|
|
117
|
+
</ListGroup>
|
|
118
|
+
</div>
|
|
119
|
+
))}
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
},
|
|
123
|
+
};
|