@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,942 @@
|
|
|
1
|
+
# Atomix Component Development Guidelines
|
|
2
|
+
|
|
3
|
+
This document outlines the approach and best practices for creating components in the Atomix design system. Follow these guidelines when developing new components to ensure consistency and quality.
|
|
4
|
+
|
|
5
|
+
## Component Structure
|
|
6
|
+
|
|
7
|
+
### 1. React Component Implementation
|
|
8
|
+
|
|
9
|
+
- Create a dedicated directory under `src/components/[ComponentName]/`
|
|
10
|
+
- Implement these core files:
|
|
11
|
+
- `[ComponentName].tsx`: The React component with JSDoc comments
|
|
12
|
+
- `index.ts`: Export file that re-exports the component and its types
|
|
13
|
+
- `[ComponentName].stories.tsx`: Storybook examples showcasing all variants
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
// index.ts example
|
|
17
|
+
export { default, [ComponentName] } from "./[ComponentName]";
|
|
18
|
+
export type { [ComponentName]Props } from "./[ComponentName]";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Vanilla JS Implementation
|
|
22
|
+
|
|
23
|
+
- Create a `scripts` subdirectory with these files:
|
|
24
|
+
- `index.ts`: Main component class with core functionality
|
|
25
|
+
- `[ComponentName]Interactions.ts`: Event handlers, utility functions, and initialization helpers
|
|
26
|
+
- `bundle.ts`: Module bundling and global registration
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
// scripts/index.ts example (main component class)
|
|
30
|
+
export default class ComponentName {
|
|
31
|
+
private element: HTMLElement;
|
|
32
|
+
private options: any;
|
|
33
|
+
|
|
34
|
+
constructor(element: string | HTMLElement, options: any = {}) {
|
|
35
|
+
this.element = typeof element === 'string' ? document.querySelector(element) as HTMLElement : element;
|
|
36
|
+
this.options = { ...DEFAULTS, ...options };
|
|
37
|
+
this._init();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private _init(): void {
|
|
41
|
+
// Initialize component
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Public methods for external API
|
|
45
|
+
public open(): void {}
|
|
46
|
+
public close(): void {}
|
|
47
|
+
public destroy(): void {}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
// scripts/[ComponentName]Interactions.ts example
|
|
53
|
+
import ComponentName from './index';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Initialize components with data attributes
|
|
57
|
+
*/
|
|
58
|
+
export function initFromDataAttributes(): ComponentName[] {
|
|
59
|
+
const instances: ComponentName[] = [];
|
|
60
|
+
|
|
61
|
+
document.querySelectorAll('[data-component-name]').forEach(element => {
|
|
62
|
+
const options = parseDataAttributes(element);
|
|
63
|
+
const instance = new ComponentName(element as HTMLElement, options);
|
|
64
|
+
instances.push(instance);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return instances;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get a component instance from an element
|
|
72
|
+
*/
|
|
73
|
+
export function getInstance(element: string | HTMLElement): ComponentName | null {
|
|
74
|
+
// Implementation
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Dispose all component instances
|
|
79
|
+
*/
|
|
80
|
+
export function disposeAll(): void {
|
|
81
|
+
// Implementation
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
// scripts/bundle.ts example
|
|
87
|
+
import ComponentName from './index';
|
|
88
|
+
import { initFromDataAttributes, getInstance, disposeAll } from './[ComponentName]Interactions';
|
|
89
|
+
|
|
90
|
+
if (typeof window !== 'undefined') {
|
|
91
|
+
// Initialize the Atomix global object if it doesn't exist
|
|
92
|
+
(window as any).Atomix = (window as any).Atomix || {};
|
|
93
|
+
|
|
94
|
+
// Add component to the global Atomix object
|
|
95
|
+
(window as any).Atomix.ComponentName = {
|
|
96
|
+
create: ComponentName,
|
|
97
|
+
init: initFromDataAttributes,
|
|
98
|
+
get: getInstance,
|
|
99
|
+
disposeAll: disposeAll
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Auto-initialize components when DOM is ready
|
|
103
|
+
if (document.readyState === 'loading') {
|
|
104
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
105
|
+
initFromDataAttributes();
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
initFromDataAttributes();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Export everything for module bundling
|
|
113
|
+
export {
|
|
114
|
+
ComponentName as default,
|
|
115
|
+
initFromDataAttributes,
|
|
116
|
+
getInstance,
|
|
117
|
+
disposeAll
|
|
118
|
+
};
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. Type Definitions
|
|
122
|
+
|
|
123
|
+
- Define component props interface in `src/lib/types/components.ts`
|
|
124
|
+
- Use descriptive JSDoc comments for each prop
|
|
125
|
+
- Export interfaces for all component variants and options
|
|
126
|
+
- Use TypeScript's utility types when appropriate (Partial, Pick, etc.)
|
|
127
|
+
|
|
128
|
+
### 4. Hooks (for React)
|
|
129
|
+
|
|
130
|
+
- Create a dedicated hook in `src/lib/composables/use[ComponentName].ts`
|
|
131
|
+
- Extract component logic for reusability and state management
|
|
132
|
+
- Support both controlled and uncontrolled modes
|
|
133
|
+
- Return all necessary state variables, refs, and handler functions
|
|
134
|
+
|
|
135
|
+
### 5. Styling
|
|
136
|
+
|
|
137
|
+
- Add component-specific SCSS in `src/styles/06-components/_components.[component-name].scss`
|
|
138
|
+
- Define component variables in `src/styles/01-settings/_settings.[component-name].scss`
|
|
139
|
+
- Use CSS custom properties with the established prefix pattern
|
|
140
|
+
- Follow the ITCSS (Inverted Triangle CSS) architecture
|
|
141
|
+
|
|
142
|
+
```scss
|
|
143
|
+
// settings.[component-name].scss example
|
|
144
|
+
$component-size: 32px !default;
|
|
145
|
+
$component-size-sm: 16px !default;
|
|
146
|
+
$component-size-lg: 48px !default;
|
|
147
|
+
$component-color: var(--#{$prefix}primary) !default;
|
|
148
|
+
$component-spacing: 8px !default;
|
|
149
|
+
|
|
150
|
+
// components.[component-name].scss example
|
|
151
|
+
.c-component {
|
|
152
|
+
$root: &;
|
|
153
|
+
|
|
154
|
+
// CSS Variables
|
|
155
|
+
--#{config.$prefix}component-size: #{$component-size};
|
|
156
|
+
--#{config.$prefix}component-color: #{$component-color};
|
|
157
|
+
--#{config.$prefix}component-spacing: #{rem($component-spacing)};
|
|
158
|
+
|
|
159
|
+
// Component styles
|
|
160
|
+
display: flex;
|
|
161
|
+
gap: var(--#{config.$prefix}component-spacing);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Implementation Guidelines
|
|
166
|
+
|
|
167
|
+
## Constants & Configuration
|
|
168
|
+
|
|
169
|
+
1. **Component Constants**
|
|
170
|
+
|
|
171
|
+
- Add component-specific constants in `src/lib/constants/components.ts`
|
|
172
|
+
- Define selectors, classes, and default values
|
|
173
|
+
|
|
174
|
+
2. **Component Configuration in src/lib**
|
|
175
|
+
|
|
176
|
+
- **Types Definition**
|
|
177
|
+
|
|
178
|
+
- Add component props interface in `src/lib/types/components.ts`
|
|
179
|
+
- Define all possible component variants, states, and event handlers
|
|
180
|
+
- Use descriptive JSDoc comments for each prop
|
|
181
|
+
- Example:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
export interface RatingProps {
|
|
185
|
+
/**
|
|
186
|
+
* The rating value (0-5)
|
|
187
|
+
*/
|
|
188
|
+
value: number;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Maximum possible rating value
|
|
192
|
+
*/
|
|
193
|
+
maxValue?: number;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Whether to allow half-star ratings
|
|
197
|
+
*/
|
|
198
|
+
allowHalf?: boolean;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Callback when rating changes
|
|
202
|
+
*/
|
|
203
|
+
onChange?: (value: number) => void;
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- **Composable Hooks**
|
|
208
|
+
|
|
209
|
+
- Create a dedicated hook in `src/lib/composables/use[ComponentName].ts`
|
|
210
|
+
- Extract component logic for reusability and state management
|
|
211
|
+
- Implement both controlled and uncontrolled state handling
|
|
212
|
+
- Return all necessary state variables and handlers
|
|
213
|
+
- Example:
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
export function useRating({
|
|
217
|
+
value: initialValue = 0,
|
|
218
|
+
maxValue = 5,
|
|
219
|
+
allowHalf = false,
|
|
220
|
+
onChange,
|
|
221
|
+
readOnly = false,
|
|
222
|
+
}: RatingProps) {
|
|
223
|
+
const [internalValue, setInternalValue] = useState(initialValue);
|
|
224
|
+
|
|
225
|
+
// Determine if component is controlled or uncontrolled
|
|
226
|
+
const isControlled = typeof onChange !== "undefined";
|
|
227
|
+
const value = isControlled ? initialValue : internalValue;
|
|
228
|
+
|
|
229
|
+
const handleRatingChange = (newValue: number) => {
|
|
230
|
+
if (readOnly) return;
|
|
231
|
+
|
|
232
|
+
if (!isControlled) {
|
|
233
|
+
setInternalValue(newValue);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (onChange) {
|
|
237
|
+
onChange(newValue);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
return {
|
|
242
|
+
value,
|
|
243
|
+
handleRatingChange,
|
|
244
|
+
maxValue,
|
|
245
|
+
allowHalf,
|
|
246
|
+
readOnly,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
- **Constants Definition**
|
|
252
|
+
|
|
253
|
+
- Define component-specific constants in `src/lib/constants/components.ts`
|
|
254
|
+
- Group related constants in a named export object
|
|
255
|
+
- Include selectors, class names, attributes, and default values
|
|
256
|
+
- Example:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
export const RATING = {
|
|
260
|
+
SELECTORS: {
|
|
261
|
+
RATING: ".c-rating",
|
|
262
|
+
STAR: ".c-rating__star",
|
|
263
|
+
STAR_FULL: ".c-rating__star-full",
|
|
264
|
+
STAR_HALF: ".c-rating__star-half",
|
|
265
|
+
},
|
|
266
|
+
CLASSES: {
|
|
267
|
+
FULL: "c-rating__star--full",
|
|
268
|
+
HALF: "c-rating__star--half",
|
|
269
|
+
SMALL: "c-rating--sm",
|
|
270
|
+
LARGE: "c-rating--lg",
|
|
271
|
+
},
|
|
272
|
+
ATTRIBUTES: {
|
|
273
|
+
READONLY: "data-readonly",
|
|
274
|
+
VALUE: "data-value",
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
- **Utility Functions**
|
|
280
|
+
- Create component-specific utility functions in `src/lib/utils/` when needed
|
|
281
|
+
- Keep functions pure and focused on a single responsibility
|
|
282
|
+
- Export functions individually for better tree-shaking
|
|
283
|
+
- Example:
|
|
284
|
+
```typescript
|
|
285
|
+
// src/lib/utils/rating.ts
|
|
286
|
+
export function calculateRoundedRating(
|
|
287
|
+
value: number,
|
|
288
|
+
allowHalf: boolean
|
|
289
|
+
): number {
|
|
290
|
+
return allowHalf ? Math.floor(value * 2) / 2 : Math.round(value);
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### React Component
|
|
295
|
+
|
|
296
|
+
1. **Props Interface**
|
|
297
|
+
|
|
298
|
+
- Define a clear props interface with JSDoc comments for each prop
|
|
299
|
+
- Use sensible defaults for optional props in component destructuring
|
|
300
|
+
- Include callback props for state changes (e.g., `onOpenChange`, `onChange`)
|
|
301
|
+
- Extend from `BaseComponentProps` for common props like `className`
|
|
302
|
+
|
|
303
|
+
```typescript
|
|
304
|
+
export interface ButtonProps extends BaseComponentProps {
|
|
305
|
+
/**
|
|
306
|
+
* Button label text
|
|
307
|
+
*/
|
|
308
|
+
label: string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Click handler function
|
|
312
|
+
*/
|
|
313
|
+
onClick?: () => void;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Button visual style variant
|
|
317
|
+
*/
|
|
318
|
+
variant?: Variant;
|
|
319
|
+
|
|
320
|
+
// Additional props...
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
2. **Component Structure**
|
|
325
|
+
|
|
326
|
+
- Use `forwardRef` for components that need ref forwarding
|
|
327
|
+
- Destructure props with default values
|
|
328
|
+
- Use composable hooks for logic and state management
|
|
329
|
+
- Implement clear return statements with proper JSX structure
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(({
|
|
333
|
+
label,
|
|
334
|
+
onClick,
|
|
335
|
+
variant = 'primary',
|
|
336
|
+
size = 'md',
|
|
337
|
+
disabled = false,
|
|
338
|
+
// Additional props with defaults...
|
|
339
|
+
}, ref) => {
|
|
340
|
+
const { generateButtonClass, handleClick } = useButton({
|
|
341
|
+
variant, size, disabled
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
// Component implementation...
|
|
345
|
+
|
|
346
|
+
return (
|
|
347
|
+
<button
|
|
348
|
+
ref={ref}
|
|
349
|
+
className={buttonClass}
|
|
350
|
+
onClick={handleClick(onClick)}
|
|
351
|
+
disabled={disabled}
|
|
352
|
+
aria-disabled={disabled}
|
|
353
|
+
>
|
|
354
|
+
{/* Component content */}
|
|
355
|
+
</button>
|
|
356
|
+
);
|
|
357
|
+
});
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
3. **Controlled & Uncontrolled Modes**
|
|
361
|
+
|
|
362
|
+
- Support both controlled mode (parent manages state) and uncontrolled mode
|
|
363
|
+
- For controlled mode: Use props for state and callbacks for changes
|
|
364
|
+
- For uncontrolled mode: Manage state internally with useState
|
|
365
|
+
- Determine mode based on whether state-changing callbacks are provided
|
|
366
|
+
|
|
367
|
+
```typescript
|
|
368
|
+
// In hook implementation
|
|
369
|
+
const isControlled = typeof onChange !== "undefined";
|
|
370
|
+
const value = isControlled ? externalValue : internalValue;
|
|
371
|
+
|
|
372
|
+
const handleChange = (newValue) => {
|
|
373
|
+
if (!isControlled) {
|
|
374
|
+
setInternalValue(newValue);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (onChange) {
|
|
378
|
+
onChange(newValue);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
4. **Accessibility**
|
|
384
|
+
|
|
385
|
+
- Include proper ARIA attributes (roles, states, properties)
|
|
386
|
+
- Ensure keyboard navigation works (tab order, key handlers)
|
|
387
|
+
- Support screen readers with descriptive labels and announcements
|
|
388
|
+
- Follow WCAG guidelines for color contrast and focus states
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
// Accessibility example
|
|
392
|
+
<button
|
|
393
|
+
aria-expanded={isOpen}
|
|
394
|
+
aria-controls={contentId}
|
|
395
|
+
aria-label={ariaLabel || label}
|
|
396
|
+
tabIndex={0}
|
|
397
|
+
onKeyDown={handleKeyDown}
|
|
398
|
+
>
|
|
399
|
+
{label}
|
|
400
|
+
</button>
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Vanilla JS Implementation
|
|
404
|
+
|
|
405
|
+
1. **Class Structure**
|
|
406
|
+
|
|
407
|
+
- Create a main class with clear constructor, private methods, and public API
|
|
408
|
+
- Accept both element reference and configuration options
|
|
409
|
+
- Use TypeScript for better type safety and documentation
|
|
410
|
+
- Implement initialization, event binding, and cleanup methods
|
|
411
|
+
|
|
412
|
+
```typescript
|
|
413
|
+
export default class ComponentName {
|
|
414
|
+
element: HTMLElement;
|
|
415
|
+
options: any;
|
|
416
|
+
private _state: any;
|
|
417
|
+
|
|
418
|
+
constructor(element: HTMLElement, options: any = {}) {
|
|
419
|
+
this.element = element;
|
|
420
|
+
this.options = { ...defaults, ...options };
|
|
421
|
+
this._initialize();
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
private _initialize(): void {
|
|
425
|
+
// Setup logic
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Public API methods
|
|
429
|
+
open() {}
|
|
430
|
+
close() {}
|
|
431
|
+
destroy() {}
|
|
432
|
+
|
|
433
|
+
// Static initialization method
|
|
434
|
+
static initializeAll() {
|
|
435
|
+
// Find and initialize all instances
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
2. **Event Handling**
|
|
441
|
+
|
|
442
|
+
- Use proper event delegation for better performance
|
|
443
|
+
- Bind event handlers to class instance with proper context
|
|
444
|
+
- Clean up all event listeners in destroy method
|
|
445
|
+
- Implement custom events for component state changes
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
private _bindEvents(): void {
|
|
449
|
+
this._handleClick = this._handleClick.bind(this);
|
|
450
|
+
this.element.addEventListener('click', this._handleClick);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
private _handleClick(event: MouseEvent): void {
|
|
454
|
+
// Event handling logic
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
public destroy(): void {
|
|
458
|
+
this.element.removeEventListener('click', this._handleClick);
|
|
459
|
+
// Clean up other resources
|
|
460
|
+
}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
3. **State Management**
|
|
464
|
+
|
|
465
|
+
- Maintain internal state with proper getters and setters
|
|
466
|
+
- Implement state change methods that update DOM accordingly
|
|
467
|
+
- Support external state updates through public API
|
|
468
|
+
- Dispatch custom events when state changes
|
|
469
|
+
|
|
470
|
+
```typescript
|
|
471
|
+
private _setState(newState: Partial<State>): void {
|
|
472
|
+
this._state = { ...this._state, ...newState };
|
|
473
|
+
this._render();
|
|
474
|
+
|
|
475
|
+
// Dispatch custom event
|
|
476
|
+
const event = new CustomEvent('componentname:change', {
|
|
477
|
+
detail: { state: this._state }
|
|
478
|
+
});
|
|
479
|
+
this.element.dispatchEvent(event);
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
## Styling Architecture
|
|
484
|
+
|
|
485
|
+
The Atomix design system follows the ITCSS (Inverted Triangle CSS) architecture, organizing styles in layers of increasing specificity:
|
|
486
|
+
|
|
487
|
+
```
|
|
488
|
+
src/styles/
|
|
489
|
+
├── 01-settings/ # Variables, config
|
|
490
|
+
├── 02-tools/ # Mixins, functions
|
|
491
|
+
├── 03-generic/ # Reset, normalize
|
|
492
|
+
├── 04-elements/ # Bare HTML elements
|
|
493
|
+
├── 05-objects/ # Layout patterns
|
|
494
|
+
├── 06-components/ # UI components
|
|
495
|
+
└── 99-utilities/ # Helper classes
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### 1. Settings Layer
|
|
499
|
+
|
|
500
|
+
Each component should have its own settings file in `01-settings/` that defines all variables used by the component:
|
|
501
|
+
|
|
502
|
+
```scss
|
|
503
|
+
// _settings.component-name.scss
|
|
504
|
+
@use "settings.config" as config;
|
|
505
|
+
|
|
506
|
+
// Define all component variables with !default flag for overriding
|
|
507
|
+
$component-size: 32px !default;
|
|
508
|
+
$component-size-sm: 16px !default;
|
|
509
|
+
$component-size-lg: 48px !default;
|
|
510
|
+
$component-color: var(--#{config.$prefix}primary) !default;
|
|
511
|
+
$component-bg: transparent !default;
|
|
512
|
+
$component-border-width: 1px !default;
|
|
513
|
+
$component-border-radius: var(--#{config.$prefix}border-radius) !default;
|
|
514
|
+
$component-spacing: 8px !default;
|
|
515
|
+
$component-transition: all 0.2s ease-in-out !default;
|
|
516
|
+
|
|
517
|
+
// Define dark mode variables if needed
|
|
518
|
+
$component-color-dark: var(--#{config.$prefix}primary-dark) !default;
|
|
519
|
+
$component-bg-dark: var(--#{config.$prefix}gray-9) !default;
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### 2. Component Styling
|
|
523
|
+
|
|
524
|
+
Component styles should be defined in `06-components/` following these guidelines:
|
|
525
|
+
|
|
526
|
+
```scss
|
|
527
|
+
// _components.component-name.scss
|
|
528
|
+
@use "../01-settings/settings.config" as config;
|
|
529
|
+
@use "../01-settings/settings.component-name" as component;
|
|
530
|
+
@use "../01-settings/settings.colors" as *;
|
|
531
|
+
@use "../02-tools/tools.rem" as rem;
|
|
532
|
+
@use "../02-tools/tools.grid" as *;
|
|
533
|
+
|
|
534
|
+
.c-component {
|
|
535
|
+
$root: &; // Store reference to component root for nesting
|
|
536
|
+
|
|
537
|
+
// 1. CSS Custom Properties
|
|
538
|
+
// Define all component-specific CSS variables
|
|
539
|
+
--#{config.$prefix}component-size: #{component.$component-size};
|
|
540
|
+
--#{config.$prefix}component-color: #{component.$component-color};
|
|
541
|
+
--#{config.$prefix}component-bg: #{component.$component-bg};
|
|
542
|
+
--#{config.$prefix}component-border-width: #{component.$component-border-width};
|
|
543
|
+
--#{config.$prefix}component-border-radius: #{component.$component-border-radius};
|
|
544
|
+
--#{config.$prefix}component-spacing: #{rem.rem(component.$component-spacing)};
|
|
545
|
+
|
|
546
|
+
// 2. Base Component Styles
|
|
547
|
+
display: flex;
|
|
548
|
+
align-items: center;
|
|
549
|
+
gap: var(--#{config.$prefix}component-spacing);
|
|
550
|
+
color: var(--#{config.$prefix}component-color);
|
|
551
|
+
background-color: var(--#{config.$prefix}component-bg);
|
|
552
|
+
border: var(--#{config.$prefix}component-border-width) solid;
|
|
553
|
+
border-radius: var(--#{config.$prefix}component-border-radius);
|
|
554
|
+
transition: component.$component-transition;
|
|
555
|
+
|
|
556
|
+
// 3. Element Styles (BEM Elements)
|
|
557
|
+
&__element {
|
|
558
|
+
// Element-specific styles
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// 4. Modifier Styles (BEM Modifiers)
|
|
562
|
+
&--modifier {
|
|
563
|
+
// Modifier-specific styles
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// 5. State Classes
|
|
567
|
+
&.is-active {
|
|
568
|
+
// Active state styles
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
&.has-icon {
|
|
572
|
+
// Styles when component has an icon
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// 6. Theme Variants
|
|
576
|
+
@each $color, $value in $theme-colors {
|
|
577
|
+
&--#{$color} {
|
|
578
|
+
--#{config.$prefix}component-color: #{$value};
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// 7. Size Variants
|
|
583
|
+
&--sm {
|
|
584
|
+
--#{config.$prefix}component-size: #{component.$component-size-sm};
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
&--lg {
|
|
588
|
+
--#{config.$prefix}component-size: #{component.$component-size-lg};
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
// 8. Responsive Styles
|
|
592
|
+
@include media-breakpoint-up(md) {
|
|
593
|
+
// Medium screen adjustments
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@include media-breakpoint-up(lg) {
|
|
597
|
+
// Large screen adjustments
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// 9. Dark Mode Support
|
|
601
|
+
.dark-mode & {
|
|
602
|
+
--#{config.$prefix}component-color: #{component.$component-color-dark};
|
|
603
|
+
--#{config.$prefix}component-bg: #{component.$component-bg-dark};
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// 10. Accessibility Considerations
|
|
607
|
+
@media (prefers-reduced-motion: reduce) {
|
|
608
|
+
transition: none;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
## Styling Best Practices
|
|
614
|
+
|
|
615
|
+
### 1. BEM Methodology
|
|
616
|
+
|
|
617
|
+
Follow Block-Element-Modifier naming convention for component classes:
|
|
618
|
+
|
|
619
|
+
```scss
|
|
620
|
+
.c-component {
|
|
621
|
+
} // Block (with 'c-' prefix for component)
|
|
622
|
+
.c-component__element {
|
|
623
|
+
} // Element (double underscore)
|
|
624
|
+
.c-component--modifier {
|
|
625
|
+
} // Modifier (double dash)
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
Use state classes with appropriate prefixes:
|
|
629
|
+
|
|
630
|
+
```scss
|
|
631
|
+
.c-component.is-active {
|
|
632
|
+
} // State class for active state
|
|
633
|
+
.c-component.has-icon {
|
|
634
|
+
} // Feature class for components with icons
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
### 2. CSS Custom Properties
|
|
638
|
+
|
|
639
|
+
- Define component-specific variables at the top of the component stylesheet
|
|
640
|
+
- Use the established prefix pattern: `--#{$prefix}component-name-property`
|
|
641
|
+
- Reference SCSS variables from settings files as default values
|
|
642
|
+
- Group related variables together for better organization
|
|
643
|
+
|
|
644
|
+
```scss
|
|
645
|
+
.c-component {
|
|
646
|
+
// Primary variables
|
|
647
|
+
--#{config.$prefix}component-color: #{$component-color};
|
|
648
|
+
--#{config.$prefix}component-bg: #{$component-bg};
|
|
649
|
+
|
|
650
|
+
// Size variables
|
|
651
|
+
--#{config.$prefix}component-padding-x: #{rem.rem($component-padding-x)};
|
|
652
|
+
--#{config.$prefix}component-padding-y: #{rem.rem($component-padding-y)};
|
|
653
|
+
|
|
654
|
+
// Animation variables
|
|
655
|
+
--#{config.$prefix}component-transition-duration: 0.2s;
|
|
656
|
+
--#{config.$prefix}component-transition-easing: ease-in-out;
|
|
657
|
+
}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
### 3. Responsive Design
|
|
661
|
+
|
|
662
|
+
- Use mobile-first approach with min-width media queries
|
|
663
|
+
- Utilize the grid mixins and breakpoint functions consistently
|
|
664
|
+
- Group responsive adjustments by component or element
|
|
665
|
+
|
|
666
|
+
```scss
|
|
667
|
+
.c-component {
|
|
668
|
+
padding: rem.rem(16px);
|
|
669
|
+
font-size: rem.rem(14px);
|
|
670
|
+
|
|
671
|
+
@include media-breakpoint-up(md) {
|
|
672
|
+
padding: rem.rem(24px);
|
|
673
|
+
font-size: rem.rem(16px);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
### 4. Theme Support
|
|
679
|
+
|
|
680
|
+
- Support both light and dark themes with appropriate color variables
|
|
681
|
+
- Use CSS custom properties for theme-specific values
|
|
682
|
+
- Define dark mode variables in settings files
|
|
683
|
+
|
|
684
|
+
```scss
|
|
685
|
+
// In settings file
|
|
686
|
+
$component-bg: $white !default;
|
|
687
|
+
$component-bg-dark: $gray-900 !default;
|
|
688
|
+
|
|
689
|
+
// In component file
|
|
690
|
+
.c-component {
|
|
691
|
+
--#{config.$prefix}component-bg: #{$component-bg};
|
|
692
|
+
background-color: var(--#{config.$prefix}component-bg);
|
|
693
|
+
|
|
694
|
+
.dark-mode & {
|
|
695
|
+
--#{config.$prefix}component-bg: #{$component-bg-dark};
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### 5. Performance Optimization
|
|
701
|
+
|
|
702
|
+
- Use hardware-accelerated properties for animations (transform, opacity)
|
|
703
|
+
- Minimize repaints and reflows by animating composite properties
|
|
704
|
+
- Support reduced motion preferences for accessibility
|
|
705
|
+
|
|
706
|
+
```scss
|
|
707
|
+
.c-component {
|
|
708
|
+
transition:
|
|
709
|
+
transform 0.2s ease,
|
|
710
|
+
opacity 0.2s ease;
|
|
711
|
+
|
|
712
|
+
&.is-entering {
|
|
713
|
+
opacity: 0;
|
|
714
|
+
transform: translateY(10px);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
@media (prefers-reduced-motion: reduce) {
|
|
718
|
+
transition: none;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### 6. Utility Functions and Mixins
|
|
724
|
+
|
|
725
|
+
Leverage the tools provided in the `02-tools/` directory:
|
|
726
|
+
|
|
727
|
+
```scss
|
|
728
|
+
// Using rem function for consistent sizing
|
|
729
|
+
padding: rem.rem(16px);
|
|
730
|
+
|
|
731
|
+
// Using media query mixins for responsive design
|
|
732
|
+
@include media-breakpoint-up(md) {
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Using color functions
|
|
736
|
+
@include color-mode-dark {
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// Using spacing utilities
|
|
740
|
+
@include margin-x(auto);
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
## Color System & Utilities
|
|
744
|
+
|
|
745
|
+
The Atomix design system includes a comprehensive color system defined in `src/styles/01-settings/_settings.colors.scss`. Understanding this system is essential for creating components that align with the design language.
|
|
746
|
+
|
|
747
|
+
### Color Palette
|
|
748
|
+
|
|
749
|
+
The color system is organized into several categories:
|
|
750
|
+
|
|
751
|
+
1. **Primary Colors**: The main brand colors used throughout the interface
|
|
752
|
+
|
|
753
|
+
```scss
|
|
754
|
+
$primary-1: #f2e8fd !default; // Lightest
|
|
755
|
+
$primary-2: #e4d0fa !default;
|
|
756
|
+
$primary-3: #d0b2f5 !default;
|
|
757
|
+
$primary-4: #b88cef !default;
|
|
758
|
+
$primary-5: #9c63e9 !default;
|
|
759
|
+
$primary-6: #7c3aed !default; // Base primary purple
|
|
760
|
+
$primary-7: #6425ca !default;
|
|
761
|
+
$primary-8: #501ba6 !default;
|
|
762
|
+
$primary-9: #3c1583 !default;
|
|
763
|
+
$primary-10: #2a0e60 !default; // Darkest
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
2. **Semantic Colors**: Colors that convey specific meanings
|
|
767
|
+
|
|
768
|
+
```scss
|
|
769
|
+
// Success (Green)
|
|
770
|
+
$success: $green-6 !default;
|
|
771
|
+
|
|
772
|
+
// Warning (Yellow)
|
|
773
|
+
$warning: $yellow-6 !default;
|
|
774
|
+
|
|
775
|
+
// Danger (Red)
|
|
776
|
+
$danger: $red-6 !default;
|
|
777
|
+
|
|
778
|
+
// Info (Blue)
|
|
779
|
+
$info: $blue-6 !default;
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
3. **Neutral Colors**: Grayscale colors for text, backgrounds, and borders
|
|
783
|
+
```scss
|
|
784
|
+
$gray-1: #f9fafb !default; // Lightest
|
|
785
|
+
$gray-2: #f3f4f6 !default;
|
|
786
|
+
$gray-3: #e5e7eb !default;
|
|
787
|
+
$gray-4: #d1d5db !default;
|
|
788
|
+
$gray-5: #9ca3af !default;
|
|
789
|
+
$gray-6: #6b7280 !default;
|
|
790
|
+
$gray-7: #4b5563 !default;
|
|
791
|
+
$gray-8: #374151 !default;
|
|
792
|
+
$gray-9: #1f2937 !default;
|
|
793
|
+
$gray-10: #111827 !default; // Darkest
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
### Using Colors in Components
|
|
797
|
+
|
|
798
|
+
When creating components, reference the color system using CSS custom properties:
|
|
799
|
+
|
|
800
|
+
```scss
|
|
801
|
+
.c-component {
|
|
802
|
+
// Use theme colors
|
|
803
|
+
color: var(--#{config.$prefix}primary);
|
|
804
|
+
background-color: var(--#{config.$prefix}gray-1);
|
|
805
|
+
border-color: var(--#{config.$prefix}gray-3);
|
|
806
|
+
|
|
807
|
+
// Use semantic colors
|
|
808
|
+
&--success {
|
|
809
|
+
color: var(--#{config.$prefix}success);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
&--danger {
|
|
813
|
+
color: var(--#{config.$prefix}danger);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
### Dark Mode Support
|
|
819
|
+
|
|
820
|
+
The color system includes dark mode variants for all colors. Use these variables when implementing dark mode support:
|
|
821
|
+
|
|
822
|
+
```scss
|
|
823
|
+
.c-component {
|
|
824
|
+
color: var(--#{config.$prefix}body-color);
|
|
825
|
+
background-color: var(--#{config.$prefix}body-bg);
|
|
826
|
+
border-color: var(--#{config.$prefix}border-color);
|
|
827
|
+
|
|
828
|
+
// These variables automatically switch in dark mode
|
|
829
|
+
// when the .dark-mode class is applied to the body
|
|
830
|
+
}
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
### Color Utility Functions
|
|
834
|
+
|
|
835
|
+
The Atomix system provides several utility functions for working with colors:
|
|
836
|
+
|
|
837
|
+
```scss
|
|
838
|
+
// Convert color to RGB format for use in rgba() functions
|
|
839
|
+
@use "../02-tools/tools.to-rgb" as *;
|
|
840
|
+
background-color: rgba(to-rgb($primary), 0.5);
|
|
841
|
+
|
|
842
|
+
// Lighten or darken colors
|
|
843
|
+
@use "../02-tools/tools.color-functions" as *;
|
|
844
|
+
$lighter-color: tint-color($primary, 20%);
|
|
845
|
+
$darker-color: shade-color($primary, 20%);
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
## Testing & Documentation
|
|
849
|
+
|
|
850
|
+
1. **Storybook Stories**
|
|
851
|
+
|
|
852
|
+
- Create comprehensive stories for all variants
|
|
853
|
+
- Add proper documentation with usage examples
|
|
854
|
+
- Test edge cases and different prop combinations
|
|
855
|
+
|
|
856
|
+
2. **Example Usage**
|
|
857
|
+
- Provide clear examples of how to use the component in different scenarios
|
|
858
|
+
- Include screenshots and code snippets
|
|
859
|
+
- Document all available options and APIs
|
|
860
|
+
|
|
861
|
+
## Implementation Example (EdgePanel)
|
|
862
|
+
|
|
863
|
+
### React Component
|
|
864
|
+
|
|
865
|
+
```tsx
|
|
866
|
+
// Basic structure of React component
|
|
867
|
+
export const EdgePanel: React.FC<EdgePanelProps> = ({
|
|
868
|
+
title,
|
|
869
|
+
children,
|
|
870
|
+
position = "start",
|
|
871
|
+
mode = "slide",
|
|
872
|
+
isOpen = false,
|
|
873
|
+
onOpenChange,
|
|
874
|
+
backdrop = true,
|
|
875
|
+
// ... other props
|
|
876
|
+
}) => {
|
|
877
|
+
const {
|
|
878
|
+
isOpen: isOpenState,
|
|
879
|
+
containerRef,
|
|
880
|
+
// ... other state
|
|
881
|
+
} = useEdgePanel({
|
|
882
|
+
position,
|
|
883
|
+
mode,
|
|
884
|
+
isOpen,
|
|
885
|
+
onOpenChange,
|
|
886
|
+
// ... other props
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
return (
|
|
890
|
+
<div className={generateComponentClass()} data-position={position}>
|
|
891
|
+
{/* Component structure */}
|
|
892
|
+
</div>
|
|
893
|
+
);
|
|
894
|
+
};
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
### Vanilla JS Implementation
|
|
898
|
+
|
|
899
|
+
```js
|
|
900
|
+
// Basic structure of vanilla JS class
|
|
901
|
+
class ComponentName {
|
|
902
|
+
constructor(element, options = {}) {
|
|
903
|
+
this.$element =
|
|
904
|
+
typeof element === "string" ? document.querySelector(element) : element;
|
|
905
|
+
this.options = { ...defaults, ...options };
|
|
906
|
+
this._initialize();
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
_initialize() {
|
|
910
|
+
// Setup logic
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
// Public API methods
|
|
914
|
+
open() {}
|
|
915
|
+
close() {}
|
|
916
|
+
destroy() {}
|
|
917
|
+
|
|
918
|
+
// Static initialization method
|
|
919
|
+
static initializeAll() {
|
|
920
|
+
// Find and initialize all instances
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
## Accessibility Checklist
|
|
926
|
+
|
|
927
|
+
- [ ] Keyboard navigation support
|
|
928
|
+
- [ ] Proper focus management
|
|
929
|
+
- [ ] ARIA roles and attributes
|
|
930
|
+
- [ ] Color contrast compliance
|
|
931
|
+
- [ ] Screen reader compatibility
|
|
932
|
+
|
|
933
|
+
## Performance Considerations
|
|
934
|
+
|
|
935
|
+
- Minimize DOM operations
|
|
936
|
+
- Use efficient event handling
|
|
937
|
+
- Clean up resources when components are destroyed
|
|
938
|
+
- Implement lazy initialization where appropriate
|
|
939
|
+
|
|
940
|
+
By following these guidelines, you'll create components that integrate seamlessly with the Atomix design system and provide a consistent, high-quality user experience.
|
|
941
|
+
|
|
942
|
+
```
|