@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,66 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Spinner } from './Spinner';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Spinner',
|
|
6
|
+
component: Spinner,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
variant: {
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
options: ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'light', 'dark'],
|
|
15
|
+
description: 'The color variant of the spinner',
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
control: { type: 'select' },
|
|
19
|
+
options: ['sm', 'md', 'lg'],
|
|
20
|
+
description: 'The size of the spinner',
|
|
21
|
+
},
|
|
22
|
+
fullscreen: {
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
description: 'Whether the spinner should be centered and fixed in the viewport',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
} satisfies Meta<typeof Spinner>;
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof Spinner>;
|
|
31
|
+
|
|
32
|
+
// Default Spinner
|
|
33
|
+
export const Default: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
variant: 'primary',
|
|
36
|
+
size: 'md',
|
|
37
|
+
fullscreen: false,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Size Variants
|
|
42
|
+
export const Sizes: Story = {
|
|
43
|
+
render: () => (
|
|
44
|
+
<div className="u-d-flex u-flex-wrap u-gap-3 u-align-items-center">
|
|
45
|
+
<Spinner size="sm" />
|
|
46
|
+
<Spinner size="md" />
|
|
47
|
+
<Spinner size="lg" />
|
|
48
|
+
</div>
|
|
49
|
+
),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Color Variants
|
|
53
|
+
export const ColorVariants: Story = {
|
|
54
|
+
render: () => (
|
|
55
|
+
<div className="u-d-flex u-flex-wrap u-gap-3 u-align-items-center">
|
|
56
|
+
<Spinner variant="primary" />
|
|
57
|
+
<Spinner variant="secondary" />
|
|
58
|
+
<Spinner variant="success" />
|
|
59
|
+
<Spinner variant="info" />
|
|
60
|
+
<Spinner variant="warning" />
|
|
61
|
+
<Spinner variant="error" />
|
|
62
|
+
<Spinner variant="light" />
|
|
63
|
+
<Spinner variant="dark" />
|
|
64
|
+
</div>
|
|
65
|
+
),
|
|
66
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpinnerProps } from '../../lib/types/components';
|
|
3
|
+
import { useSpinner } from '../../lib/composables/useSpinner';
|
|
4
|
+
import { SPINNER } from '../../lib/constants/components';
|
|
5
|
+
|
|
6
|
+
export const Spinner: React.FC<SpinnerProps> = ({
|
|
7
|
+
size = 'md',
|
|
8
|
+
variant = 'primary',
|
|
9
|
+
fullscreen = false,
|
|
10
|
+
className = '',
|
|
11
|
+
}) => {
|
|
12
|
+
const { generateSpinnerClass } = useSpinner({
|
|
13
|
+
size,
|
|
14
|
+
variant,
|
|
15
|
+
fullscreen,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const spinnerClass = generateSpinnerClass({
|
|
19
|
+
size,
|
|
20
|
+
variant,
|
|
21
|
+
fullscreen,
|
|
22
|
+
className,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className={spinnerClass} role="status">
|
|
27
|
+
<span className={SPINNER.VISUALLY_HIDDEN}>Loading...</span>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type { SpinnerProps };
|
|
33
|
+
|
|
34
|
+
Spinner.displayName = 'Spinner';
|
|
35
|
+
|
|
36
|
+
export default Spinner;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryFn, Meta } from '@storybook/react';
|
|
3
|
+
import { Steps } from './Steps';
|
|
4
|
+
import type { StepsProps } from './Steps';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/Steps',
|
|
8
|
+
component: Steps,
|
|
9
|
+
argTypes: {
|
|
10
|
+
activeIndex: {
|
|
11
|
+
control: { type: 'number' },
|
|
12
|
+
defaultValue: 1,
|
|
13
|
+
},
|
|
14
|
+
vertical: {
|
|
15
|
+
control: { type: 'boolean' },
|
|
16
|
+
defaultValue: false,
|
|
17
|
+
},
|
|
18
|
+
onStepChange: { action: 'step changed' },
|
|
19
|
+
},
|
|
20
|
+
} as Meta<typeof Steps>;
|
|
21
|
+
|
|
22
|
+
const Template: StoryFn<typeof Steps> = args => (
|
|
23
|
+
<div style={{ padding: '30px' }}>
|
|
24
|
+
<Steps {...args} />
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// Default horizontal steps
|
|
29
|
+
export const Default = Template.bind({});
|
|
30
|
+
Default.args = {
|
|
31
|
+
items: [
|
|
32
|
+
{ number: 1, text: 'Step 1' },
|
|
33
|
+
{ number: 2, text: 'Step 2' },
|
|
34
|
+
{ number: 3, text: 'Step 3' },
|
|
35
|
+
{ number: 4, text: 'Step 4' },
|
|
36
|
+
{ number: 5, text: 'Step 5' },
|
|
37
|
+
],
|
|
38
|
+
activeIndex: 1,
|
|
39
|
+
vertical: false,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Vertical steps
|
|
43
|
+
export const Vertical = Template.bind({});
|
|
44
|
+
Vertical.args = {
|
|
45
|
+
items: [
|
|
46
|
+
{ number: 1, text: 'Step 1' },
|
|
47
|
+
{ number: 2, text: 'Step 2' },
|
|
48
|
+
{ number: 3, text: 'Step 3' },
|
|
49
|
+
{ number: 4, text: 'Step 4' },
|
|
50
|
+
{ number: 5, text: 'Step 5' },
|
|
51
|
+
],
|
|
52
|
+
activeIndex: 1,
|
|
53
|
+
vertical: true,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// Steps with custom content
|
|
57
|
+
export const WithCustomContent = Template.bind({});
|
|
58
|
+
WithCustomContent.args = {
|
|
59
|
+
items: [
|
|
60
|
+
{
|
|
61
|
+
number: 1,
|
|
62
|
+
text: 'Registration',
|
|
63
|
+
content: <p style={{ marginTop: '10px', fontSize: '0.85em' }}>Create your account</p>,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
number: 2,
|
|
67
|
+
text: 'Personal Info',
|
|
68
|
+
content: <p style={{ marginTop: '10px', fontSize: '0.85em' }}>Tell us about yourself</p>,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
number: 3,
|
|
72
|
+
text: 'Preferences',
|
|
73
|
+
content: <p style={{ marginTop: '10px', fontSize: '0.85em' }}>Select your preferences</p>,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
number: 4,
|
|
77
|
+
text: 'Payment',
|
|
78
|
+
content: <p style={{ marginTop: '10px', fontSize: '0.85em' }}>Add payment information</p>,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
number: 5,
|
|
82
|
+
text: 'Confirmation',
|
|
83
|
+
content: <p style={{ marginTop: '10px', fontSize: '0.85em' }}>Complete your signup</p>,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
activeIndex: 1,
|
|
87
|
+
vertical: false,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// Steps with custom icons instead of numbers
|
|
91
|
+
export const WithIcons = Template.bind({});
|
|
92
|
+
WithIcons.args = {
|
|
93
|
+
items: [
|
|
94
|
+
{
|
|
95
|
+
number: <i className="icon-lux-user" style={{ fontSize: '16px' }}></i>,
|
|
96
|
+
text: 'Account',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
number: <i className="icon-lux-settings" style={{ fontSize: '16px' }}></i>,
|
|
100
|
+
text: 'Settings',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
number: <i className="icon-lux-calendar" style={{ fontSize: '16px' }}></i>,
|
|
104
|
+
text: 'Schedule',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
number: <i className="icon-lux-card" style={{ fontSize: '16px' }}></i>,
|
|
108
|
+
text: 'Payment',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
number: <i className="icon-lux-check" style={{ fontSize: '16px' }}></i>,
|
|
112
|
+
text: 'Complete',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
activeIndex: 1,
|
|
116
|
+
vertical: false,
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// Interactive steps with buttons for navigation
|
|
120
|
+
const InteractiveSteps: React.FC = () => {
|
|
121
|
+
const [activeStep, setActiveStep] = React.useState(0);
|
|
122
|
+
|
|
123
|
+
const items = [
|
|
124
|
+
{ number: 1, text: 'Step 1' },
|
|
125
|
+
{ number: 2, text: 'Step 2' },
|
|
126
|
+
{ number: 3, text: 'Step 3' },
|
|
127
|
+
{ number: 4, text: 'Step 4' },
|
|
128
|
+
{ number: 5, text: 'Step 5' },
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<div>
|
|
133
|
+
<Steps items={items} activeIndex={activeStep} onStepChange={setActiveStep} />
|
|
134
|
+
<div style={{ marginTop: '30px', display: 'flex', gap: '10px' }}>
|
|
135
|
+
<button
|
|
136
|
+
className="c-btn c-btn--primary"
|
|
137
|
+
onClick={() => setActiveStep(Math.max(0, activeStep - 1))}
|
|
138
|
+
disabled={activeStep === 0}
|
|
139
|
+
>
|
|
140
|
+
Previous
|
|
141
|
+
</button>
|
|
142
|
+
<button
|
|
143
|
+
className="c-btn c-btn--primary"
|
|
144
|
+
onClick={() => setActiveStep(Math.min(items.length - 1, activeStep + 1))}
|
|
145
|
+
disabled={activeStep === items.length - 1}
|
|
146
|
+
>
|
|
147
|
+
Next
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const Interactive: StoryFn<typeof Steps> = () => (
|
|
155
|
+
<div style={{ padding: '30px' }}>
|
|
156
|
+
<InteractiveSteps />
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import React, { useRef, useEffect, useState, ReactNode } from 'react';
|
|
2
|
+
import { STEPS } from '../../lib/constants/components';
|
|
3
|
+
|
|
4
|
+
export interface StepItem {
|
|
5
|
+
/**
|
|
6
|
+
* The number for the step
|
|
7
|
+
*/
|
|
8
|
+
number: number | string | ReactNode;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The text label for the step
|
|
12
|
+
*/
|
|
13
|
+
text: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Optional custom content for the step
|
|
17
|
+
*/
|
|
18
|
+
content?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface StepsProps {
|
|
22
|
+
/**
|
|
23
|
+
* Array of step items
|
|
24
|
+
*/
|
|
25
|
+
items: StepItem[];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Current active step index (0-based)
|
|
29
|
+
*/
|
|
30
|
+
activeIndex?: number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether to display steps vertically
|
|
34
|
+
*/
|
|
35
|
+
vertical?: boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Called when active step changes
|
|
39
|
+
*/
|
|
40
|
+
onStepChange?: (index: number) => void;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Additional CSS class
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Steps component for displaying a sequence of steps
|
|
50
|
+
*/
|
|
51
|
+
export const Steps: React.FC<StepsProps> = ({
|
|
52
|
+
items,
|
|
53
|
+
activeIndex = 0,
|
|
54
|
+
vertical = false,
|
|
55
|
+
onStepChange,
|
|
56
|
+
className = '',
|
|
57
|
+
}) => {
|
|
58
|
+
const [currentStep, setCurrentStep] = useState(activeIndex);
|
|
59
|
+
const stepsRef = useRef<HTMLDivElement>(null);
|
|
60
|
+
const stepsInstance = useRef<any>(null);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
// Only run on client-side
|
|
64
|
+
if (typeof window === 'undefined' || !stepsRef.current) return undefined;
|
|
65
|
+
|
|
66
|
+
// Dynamically import the steps script to avoid server-side rendering issues
|
|
67
|
+
import('./scripts').then(({ default: StepsClass }) => {
|
|
68
|
+
if (stepsRef.current) {
|
|
69
|
+
stepsInstance.current = new StepsClass(stepsRef.current, {
|
|
70
|
+
activeIndex: currentStep,
|
|
71
|
+
vertical,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// Cleanup on unmount
|
|
77
|
+
return () => {
|
|
78
|
+
if (stepsInstance.current) {
|
|
79
|
+
stepsInstance.current.destroy();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
// Update steps when activeIndex prop changes
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (currentStep !== activeIndex) {
|
|
87
|
+
setCurrentStep(activeIndex);
|
|
88
|
+
|
|
89
|
+
if (stepsInstance.current) {
|
|
90
|
+
stepsInstance.current.setActive(activeIndex);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, [activeIndex]);
|
|
94
|
+
|
|
95
|
+
// Method to go to next step
|
|
96
|
+
const goToNextStep = () => {
|
|
97
|
+
const nextIndex = currentStep + 1;
|
|
98
|
+
if (nextIndex < items.length) {
|
|
99
|
+
setCurrentStep(nextIndex);
|
|
100
|
+
|
|
101
|
+
if (stepsInstance.current) {
|
|
102
|
+
stepsInstance.current.next();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (onStepChange) {
|
|
106
|
+
onStepChange(nextIndex);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// Method to go to previous step
|
|
112
|
+
const goToPreviousStep = () => {
|
|
113
|
+
const prevIndex = currentStep - 1;
|
|
114
|
+
if (prevIndex >= 0) {
|
|
115
|
+
setCurrentStep(prevIndex);
|
|
116
|
+
|
|
117
|
+
if (stepsInstance.current) {
|
|
118
|
+
stepsInstance.current.previous();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (onStepChange) {
|
|
122
|
+
onStepChange(prevIndex);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<div
|
|
129
|
+
className={`c-steps ${vertical ? STEPS.CLASSES.VERTICAL : ''} ${className}`}
|
|
130
|
+
ref={stepsRef}
|
|
131
|
+
role="navigation"
|
|
132
|
+
aria-label="Steps"
|
|
133
|
+
>
|
|
134
|
+
{items.map((item, index) => (
|
|
135
|
+
<div
|
|
136
|
+
key={`step-${index}`}
|
|
137
|
+
className={`c-steps__item ${index <= currentStep ? STEPS.CLASSES.ACTIVE : ''} ${index < currentStep ? STEPS.CLASSES.COMPLETED : ''}`}
|
|
138
|
+
aria-current={index === currentStep ? 'step' : undefined}
|
|
139
|
+
>
|
|
140
|
+
<div className="c-steps__line"></div>
|
|
141
|
+
<div className="c-steps__content">
|
|
142
|
+
<div className="c-steps__number">{item.number}</div>
|
|
143
|
+
<div className="c-steps__text">{item.text}</div>
|
|
144
|
+
{item.content && <div className="c-steps__custom-content">{item.content}</div>}
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
))}
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
Steps.displayName = 'Steps';
|
|
153
|
+
|
|
154
|
+
export default Steps;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { STEPS } from '../../../lib/constants/components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Steps options
|
|
5
|
+
*/
|
|
6
|
+
interface StepsOptions {
|
|
7
|
+
activeIndex?: number;
|
|
8
|
+
vertical?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Interface for Steps instance
|
|
14
|
+
*/
|
|
15
|
+
interface StepsInstance {
|
|
16
|
+
setActive: (index: number) => void;
|
|
17
|
+
next: () => void;
|
|
18
|
+
previous: () => void;
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Default options for the Steps component
|
|
24
|
+
*/
|
|
25
|
+
const DEFAULT_OPTIONS: StepsOptions = {
|
|
26
|
+
activeIndex: 0,
|
|
27
|
+
vertical: false,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Class representing a Steps component
|
|
32
|
+
*/
|
|
33
|
+
class Steps implements StepsInstance {
|
|
34
|
+
private selector: string | Element;
|
|
35
|
+
private $element: HTMLElement | null;
|
|
36
|
+
private options: StepsOptions;
|
|
37
|
+
private $items: NodeListOf<HTMLElement> | null;
|
|
38
|
+
private activeIndex: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Creates an instance of Steps
|
|
42
|
+
* @param selector - CSS selector string or DOM Element
|
|
43
|
+
* @param options - Custom options to override defaults
|
|
44
|
+
*/
|
|
45
|
+
constructor(selector: string | Element, options = {}) {
|
|
46
|
+
this.selector = selector || STEPS.SELECTORS.STEPS;
|
|
47
|
+
this.$element =
|
|
48
|
+
typeof selector === 'string'
|
|
49
|
+
? document.querySelector<HTMLElement>(selector)
|
|
50
|
+
: (selector as HTMLElement);
|
|
51
|
+
this.options = { ...DEFAULT_OPTIONS, ...options } as StepsOptions;
|
|
52
|
+
this.$items = null;
|
|
53
|
+
this.activeIndex = this.options.activeIndex || 0;
|
|
54
|
+
this._initialize();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Initialize the steps component
|
|
59
|
+
*/
|
|
60
|
+
private _initialize(): void {
|
|
61
|
+
if (!this.$element) return;
|
|
62
|
+
|
|
63
|
+
this._initializeElements();
|
|
64
|
+
|
|
65
|
+
// Set vertical mode if specified
|
|
66
|
+
if (this.options.vertical && !this.$element.classList.contains(STEPS.CLASSES.VERTICAL)) {
|
|
67
|
+
this.$element.classList.add(STEPS.CLASSES.VERTICAL);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
this.setActive(this.activeIndex);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Initialize DOM elements
|
|
75
|
+
*/
|
|
76
|
+
private _initializeElements(): void {
|
|
77
|
+
if (!this.$element) return;
|
|
78
|
+
|
|
79
|
+
this.$items = this.$element.querySelectorAll<HTMLElement>(STEPS.SELECTORS.ITEM);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Sets the active step
|
|
84
|
+
* @param index - The index of the step to make active
|
|
85
|
+
*/
|
|
86
|
+
public setActive(index: number): void {
|
|
87
|
+
if (!this.$items || index < 0 || index >= this.$items.length) return;
|
|
88
|
+
|
|
89
|
+
// Update all items
|
|
90
|
+
this.$items.forEach((item, i) => {
|
|
91
|
+
if (i < index) {
|
|
92
|
+
// Steps before active are completed
|
|
93
|
+
item.classList.add(STEPS.CLASSES.ACTIVE);
|
|
94
|
+
item.classList.add(STEPS.CLASSES.COMPLETED);
|
|
95
|
+
} else if (i === index) {
|
|
96
|
+
// Current step is active but not completed
|
|
97
|
+
item.classList.add(STEPS.CLASSES.ACTIVE);
|
|
98
|
+
item.classList.remove(STEPS.CLASSES.COMPLETED);
|
|
99
|
+
} else {
|
|
100
|
+
// Future steps are neither active nor completed
|
|
101
|
+
item.classList.remove(STEPS.CLASSES.ACTIVE);
|
|
102
|
+
item.classList.remove(STEPS.CLASSES.COMPLETED);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
this.activeIndex = index;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Moves to the next step
|
|
111
|
+
*/
|
|
112
|
+
public next(): void {
|
|
113
|
+
if (this.activeIndex < (this.$items?.length || 0) - 1) {
|
|
114
|
+
this.setActive(this.activeIndex + 1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Moves to the previous step
|
|
120
|
+
*/
|
|
121
|
+
public previous(): void {
|
|
122
|
+
if (this.activeIndex > 0) {
|
|
123
|
+
this.setActive(this.activeIndex - 1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Clean up event listeners
|
|
129
|
+
*/
|
|
130
|
+
public destroy(): void {
|
|
131
|
+
// No specific cleanup needed for steps component
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Initialize all steps in the document
|
|
137
|
+
* @param {string|Element} selector - CSS selector string or DOM Element
|
|
138
|
+
* @param {Object} options - Custom options to override defaults
|
|
139
|
+
* @returns {StepsInstance[]} Array of Steps instances
|
|
140
|
+
*/
|
|
141
|
+
export function initializeSteps(selector = STEPS.SELECTORS.STEPS, options = {}): StepsInstance[] {
|
|
142
|
+
const stepsInstances: StepsInstance[] = [];
|
|
143
|
+
const stepsElements = document.querySelectorAll<HTMLElement>(selector);
|
|
144
|
+
|
|
145
|
+
if (!stepsElements.length) return stepsInstances;
|
|
146
|
+
|
|
147
|
+
stepsElements.forEach(element => {
|
|
148
|
+
try {
|
|
149
|
+
const instance = new Steps(element, options);
|
|
150
|
+
stepsInstances.push(instance);
|
|
151
|
+
} catch (error) {
|
|
152
|
+
console.error('Error initializing steps:', error);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
return stepsInstances;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export default Steps;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryFn, Meta } from '@storybook/react';
|
|
3
|
+
import { Tab } from './Tab';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Tab',
|
|
7
|
+
component: Tab,
|
|
8
|
+
argTypes: {
|
|
9
|
+
activeIndex: {
|
|
10
|
+
control: { type: 'number' },
|
|
11
|
+
defaultValue: 0,
|
|
12
|
+
},
|
|
13
|
+
onTabChange: { action: 'tab changed' },
|
|
14
|
+
},
|
|
15
|
+
} as Meta<typeof Tab>;
|
|
16
|
+
|
|
17
|
+
const Template: StoryFn<typeof Tab> = args => (
|
|
18
|
+
<div style={{ maxWidth: '600px', margin: '0 auto', padding: '30px' }}>
|
|
19
|
+
<Tab {...args} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const Default = Template.bind({});
|
|
24
|
+
Default.args = {
|
|
25
|
+
items: [
|
|
26
|
+
{
|
|
27
|
+
label: 'Tab 1',
|
|
28
|
+
content: <p>This is the content for Tab 1. Default tab content.</p>,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'Tab 2',
|
|
32
|
+
content: <p>This is the content for Tab 2. It contains different information.</p>,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Tab 3',
|
|
36
|
+
content: <p>This is the content for Tab 3. Another unique content section.</p>,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
activeIndex: 0,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const WithDifferentActiveTab = Template.bind({});
|
|
43
|
+
WithDifferentActiveTab.args = {
|
|
44
|
+
items: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Tab 1',
|
|
47
|
+
content: <p>This is the content for Tab 1.</p>,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'Tab 2',
|
|
51
|
+
content: <p>This is the content for Tab 2. It's initially active.</p>,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'Tab 3',
|
|
55
|
+
content: <p>This is the content for Tab 3.</p>,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
activeIndex: 1,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const WithRichContent = Template.bind({});
|
|
62
|
+
WithRichContent.args = {
|
|
63
|
+
items: [
|
|
64
|
+
{
|
|
65
|
+
label: 'Features',
|
|
66
|
+
content: (
|
|
67
|
+
<div>
|
|
68
|
+
<h3>Key Features</h3>
|
|
69
|
+
<ul>
|
|
70
|
+
<li>Responsive design</li>
|
|
71
|
+
<li>Accessible navigation</li>
|
|
72
|
+
<li>Smooth transitions</li>
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: 'Specifications',
|
|
79
|
+
content: (
|
|
80
|
+
<div>
|
|
81
|
+
<h3>Technical Specifications</h3>
|
|
82
|
+
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
|
|
83
|
+
<thead>
|
|
84
|
+
<tr>
|
|
85
|
+
<th style={{ border: '1px solid #ddd', padding: '8px', textAlign: 'left' }}>
|
|
86
|
+
Property
|
|
87
|
+
</th>
|
|
88
|
+
<th style={{ border: '1px solid #ddd', padding: '8px', textAlign: 'left' }}>
|
|
89
|
+
Value
|
|
90
|
+
</th>
|
|
91
|
+
</tr>
|
|
92
|
+
</thead>
|
|
93
|
+
<tbody>
|
|
94
|
+
<tr>
|
|
95
|
+
<td style={{ border: '1px solid #ddd', padding: '8px' }}>Size</td>
|
|
96
|
+
<td style={{ border: '1px solid #ddd', padding: '8px' }}>Medium</td>
|
|
97
|
+
</tr>
|
|
98
|
+
<tr>
|
|
99
|
+
<td style={{ border: '1px solid #ddd', padding: '8px' }}>Material</td>
|
|
100
|
+
<td style={{ border: '1px solid #ddd', padding: '8px' }}>Aluminum</td>
|
|
101
|
+
</tr>
|
|
102
|
+
</tbody>
|
|
103
|
+
</table>
|
|
104
|
+
</div>
|
|
105
|
+
),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Reviews',
|
|
109
|
+
content: (
|
|
110
|
+
<div>
|
|
111
|
+
<h3>Customer Reviews</h3>
|
|
112
|
+
<div style={{ padding: '10px', marginBottom: '10px', backgroundColor: '#f9f9f9' }}>
|
|
113
|
+
<p style={{ marginBottom: '5px' }}>
|
|
114
|
+
<strong>John D.</strong> ★★★★★
|
|
115
|
+
</p>
|
|
116
|
+
<p>Great product, highly recommended!</p>
|
|
117
|
+
</div>
|
|
118
|
+
<div style={{ padding: '10px', backgroundColor: '#f9f9f9' }}>
|
|
119
|
+
<p style={{ marginBottom: '5px' }}>
|
|
120
|
+
<strong>Sarah T.</strong> ★★★★☆
|
|
121
|
+
</p>
|
|
122
|
+
<p>Very good quality and fast shipping.</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
),
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
activeIndex: 0,
|
|
129
|
+
};
|