@shohojdhara/atomix 0.1.16 → 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 -2
- package/dist/js/194.js +1 -2
- package/dist/js/244.js +1 -0
- package/dist/js/atomix.react.cjs.js +1 -0
- package/dist/js/atomix.react.esm.js +1 -2
- package/dist/js/atomix.react.umd.js +1 -2
- 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/js/chunks/esm/{202.ff48d27672233280e021.js → 202.82aa7b3244e53c9edb72.js} +1 -2
- package/dist/js/chunks/esm/{308.f873332126eba90e5c62.js → 308.27e1e4005705ae320432.js} +1 -2
- package/dist/js/chunks/esm/{54.4db919e5e4e5cc6d7c72.js → 54.ece1fd6964f98d4d994f.js} +1 -2
- package/dist/js/chunks/esm/{619.afc5a718eff77fa423b5.js → 619.ebeb0298432a066ac05c.js} +1 -2
- package/dist/js/chunks/esm/{690.a9e968c7497d61e56cdc.js → 690.c5f412cc979b55740359.js} +1 -2
- package/dist/js/chunks/esm/{894.f1091a4a8758c26d29e4.js → 894.3604ddc9367d75191198.js} +1 -2
- package/dist/js/chunks/esm/{897.561a50f7d043d42169da.js → 897.a4aab2fad9401693eb12.js} +1 -2
- package/dist/js/chunks/umd/{202.dac7605cc555b6bda542.js → 202.5017dd0403d696bf1644.js} +1 -2
- package/dist/js/chunks/umd/{308.6709979849dcbdb90c9b.js → 308.4bc14b9d7b16b6ee0ab8.js} +1 -2
- package/dist/js/chunks/umd/{54.403470e1f7d0ef4424a7.js → 54.7fdfb4a031989470a70d.js} +1 -2
- package/dist/js/chunks/umd/{619.fa05ea98c10270eb64c5.js → 619.84a0c35ecee695250085.js} +1 -2
- package/dist/js/chunks/umd/{690.aa7054d1c53e5402c2d6.js → 690.d7041094a34a4a434be2.js} +1 -2
- package/dist/js/chunks/umd/{894.3e1eaf0a2aadf4434390.js → 894.c127ee4e9513c22ee97d.js} +1 -2
- package/dist/js/chunks/umd/{897.554ea37be4453698c167.js → 897.26932ac837a39fc91907.js} +1 -2
- package/dist/types/components/Badge/index.d.ts +3 -3
- 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/PhotoViewer/PhotoViewer.d.ts +2 -2
- package/dist/types/components/PhotoViewer/PhotoViewerHeader.d.ts +2 -2
- package/dist/types/components/Tab/index.d.ts +2 -2
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Tooltip/index.d.ts +3 -3
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/lib/composables/index.d.ts +1 -0
- package/dist/types/lib/composables/useDatePicker.d.ts +1 -1
- package/dist/types/lib/composables/useDropdown.d.ts +1 -1
- package/dist/types/lib/composables/useModal.d.ts +1 -1
- package/dist/types/lib/composables/usePhotoViewer.d.ts +1 -1
- package/dist/types/lib/composables/useRating.d.ts +1 -1
- 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 +80 -42
- package/postcss.config.js +28 -0
- package/src/Introduction.mdx +3 -5
- package/src/assets/fonts/HelveticaNeue/stylesheet.css +140 -127
- package/src/components/Accordion/Accordion.stories.tsx +58 -45
- package/src/components/Accordion/Accordion.tsx +14 -4
- package/src/components/Accordion/scripts/accordionInteractions.ts +9 -9
- package/src/components/Accordion/scripts/bundle.ts +1 -1
- package/src/components/Accordion/scripts/index.ts +3 -3
- package/src/components/AtomixLogo.tsx +13 -19
- package/src/components/Avatar/Avatar.stories.tsx +24 -21
- package/src/components/Avatar/Avatar.tsx +5 -8
- package/src/components/Avatar/AvatarGroup.tsx +11 -11
- package/src/components/Avatar/index.ts +1 -1
- package/src/components/Avatar/scripts/index.ts +66 -71
- package/src/components/Badge/Badge.stories.tsx +51 -21
- package/src/components/Badge/Badge.tsx +14 -12
- package/src/components/Badge/index.ts +3 -3
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +40 -40
- package/src/components/Breadcrumb/Breadcrumb.tsx +19 -26
- package/src/components/Breadcrumb/index.ts +1 -1
- package/src/components/Breadcrumb/scripts/breadcrumb.ts +36 -34
- package/src/components/Breadcrumb/scripts/index.ts +1 -1
- package/src/components/Breadcrumb/scripts/types.ts +9 -9
- package/src/components/Button/Button.stories.tsx +36 -12
- package/src/components/Button/Button.tsx +52 -39
- package/src/components/Button/index.ts +1 -1
- package/src/components/Button/scripts/buttonInteractions.ts +9 -9
- package/src/components/Button/scripts/index.ts +1 -1
- package/src/components/Callout/Callout.stories.tsx +207 -114
- package/src/components/Callout/Callout.tsx +12 -12
- package/src/components/Callout/index.ts +1 -1
- package/src/components/Callout/scripts/CalloutInteractions.ts +58 -48
- package/src/components/Callout/scripts/bundle.ts +2 -2
- package/src/components/Callout/scripts/index.ts +19 -15
- package/src/components/Card/Card.stories.tsx +2 -2
- package/src/components/Card/Card.tsx +49 -72
- package/src/components/Card/ElevationCard.tsx +4 -8
- package/src/components/Card/index.ts +1 -1
- package/src/components/Card/scripts/bundle.ts +7 -7
- package/src/components/Card/scripts/cardInteractions.ts +24 -24
- package/src/components/Card/scripts/index.ts +25 -26
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -3
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +12 -15
- package/src/components/ColorModeToggle/index.ts +1 -1
- package/src/components/Countdown/Countdown.stories.tsx +6 -2
- package/src/components/Countdown/Countdown.tsx +56 -48
- package/src/components/Countdown/index.ts +1 -1
- package/src/components/Countdown/scripts/index.ts +33 -28
- package/src/components/DataTable/DataTable.stories.tsx +23 -18
- package/src/components/DataTable/DataTable.tsx +39 -39
- package/src/components/DataTable/index.ts +1 -1
- package/src/components/DataTable/scripts/bundle.ts +8 -3
- package/src/components/DataTable/scripts/index.ts +182 -164
- package/src/components/DatePicker/DatePicker.stories.tsx +136 -148
- package/src/components/DatePicker/DatePicker.tsx +461 -420
- package/src/components/DatePicker/scripts/bundle.ts +12 -7
- package/src/components/DatePicker/scripts/componentInteractions.ts +76 -46
- package/src/components/DatePicker/scripts/index.ts +176 -156
- package/src/components/DatePicker/types.ts +32 -32
- package/src/components/DatePicker/utils.ts +41 -30
- package/src/components/Dropdown/Dropdown.stories.tsx +85 -55
- package/src/components/Dropdown/Dropdown.tsx +97 -88
- package/src/components/Dropdown/index.ts +5 -10
- package/src/components/Dropdown/scripts/bundle.ts +10 -10
- package/src/components/Dropdown/scripts/componentInteractions.ts +10 -2
- package/src/components/Dropdown/scripts/index.ts +122 -117
- package/src/components/EdgePanel/EdgePanel.stories.tsx +142 -58
- package/src/components/EdgePanel/EdgePanel.tsx +7 -13
- package/src/components/EdgePanel/index.ts +1 -1
- package/src/components/EdgePanel/scripts/bundle.ts +5 -5
- package/src/components/EdgePanel/scripts/edgePanelInteractions.ts +26 -26
- package/src/components/EdgePanel/scripts/index.ts +53 -53
- package/src/components/Form/Checkbox.stories.tsx +2 -2
- package/src/components/Form/Checkbox.tsx +13 -7
- package/src/components/Form/Form.stories.tsx +144 -218
- package/src/components/Form/Form.tsx +6 -6
- package/src/components/Form/FormGroup.stories.tsx +21 -38
- package/src/components/Form/FormGroup.tsx +18 -20
- package/src/components/Form/Input.stories.tsx +1 -1
- package/src/components/Form/Input.tsx +18 -8
- package/src/components/Form/Radio.stories.tsx +12 -25
- package/src/components/Form/Radio.tsx +11 -6
- package/src/components/Form/Select.stories.tsx +6 -6
- package/src/components/Form/Select.tsx +31 -33
- package/src/components/Form/Textarea.stories.tsx +7 -2
- package/src/components/Form/Textarea.tsx +17 -8
- package/src/components/Form/index.ts +1 -1
- package/src/components/Hero/Hero.stories.tsx +44 -42
- package/src/components/Hero/Hero.tsx +28 -38
- package/src/components/Hero/index.ts +1 -1
- package/src/components/Hero/scripts/bundle.ts +6 -6
- package/src/components/Hero/scripts/heroInteractions.ts +24 -29
- package/src/components/Hero/scripts/index.ts +16 -17
- package/src/components/Icon/Icon.tsx +16 -18
- package/src/components/Icon/index.ts +1 -1
- package/src/components/List/List.stories.tsx +1 -3
- package/src/components/List/List.tsx +6 -10
- package/src/components/List/ListGroup.tsx +1 -1
- package/src/components/List/index.ts +1 -1
- package/src/components/Messages/Messages.stories.tsx +30 -29
- package/src/components/Messages/Messages.tsx +60 -55
- package/src/components/Messages/index.ts +1 -1
- package/src/components/Messages/scripts/bundle.ts +1 -6
- package/src/components/Messages/scripts/componentInteractions.ts +32 -37
- package/src/components/Messages/scripts/index.ts +61 -55
- package/src/components/Modal/Modal.stories.tsx +77 -53
- package/src/components/Modal/Modal.tsx +63 -62
- package/src/components/Modal/index.ts +1 -1
- package/src/components/Modal/scripts/bundle.ts +3 -3
- package/src/components/Modal/scripts/index.ts +96 -84
- package/src/components/Modal/scripts/modalInteractions.ts +16 -14
- package/src/components/{Navbar → Navigation/Menu}/MegaMenu.tsx +50 -59
- 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/{Navbar → Navigation/Navbar}/Navbar.stories.tsx +198 -104
- 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 +34 -33
- package/src/components/Pagination/Pagination.tsx +25 -35
- package/src/components/Pagination/index.ts +1 -1
- package/src/components/Pagination/scripts/index.ts +42 -37
- package/src/components/PhotoViewer/PhotoViewer.stories.tsx +48 -48
- package/src/components/PhotoViewer/PhotoViewer.tsx +29 -46
- package/src/components/PhotoViewer/PhotoViewerHeader.tsx +20 -26
- package/src/components/PhotoViewer/PhotoViewerImage.tsx +19 -17
- package/src/components/PhotoViewer/PhotoViewerInfo.tsx +13 -5
- package/src/components/PhotoViewer/PhotoViewerNavigation.tsx +5 -5
- package/src/components/PhotoViewer/PhotoViewerThumbnails.tsx +31 -30
- package/src/components/PhotoViewer/examples/ImageGallery.tsx +27 -37
- package/src/components/PhotoViewer/examples/SimpleGallery.tsx +19 -13
- package/src/components/PhotoViewer/examples/index.ts +1 -1
- package/src/components/PhotoViewer/index.ts +1 -1
- package/src/components/PhotoViewer/scripts/PhotoViewerInteractions.ts +43 -33
- package/src/components/PhotoViewer/scripts/bundle.ts +14 -14
- package/src/components/PhotoViewer/scripts/index.ts +173 -129
- package/src/components/Popover/Popover.stories.tsx +11 -12
- package/src/components/Popover/Popover.tsx +36 -36
- package/src/components/Popover/index.ts +1 -1
- package/src/components/Popover/scripts/bundle.ts +1 -1
- package/src/components/Popover/scripts/componentInteractions.ts +34 -46
- package/src/components/Popover/scripts/index.ts +64 -53
- package/src/components/ProductReview/ProductReview.stories.tsx +10 -8
- package/src/components/ProductReview/ProductReview.tsx +28 -32
- package/src/components/ProductReview/scripts/componentInteractions.ts +20 -20
- package/src/components/Progress/Progress.tsx +36 -34
- package/src/components/Progress/scripts/bundle.ts +7 -2
- package/src/components/Progress/scripts/componentInteractions.ts +29 -23
- package/src/components/Progress/scripts/index.ts +45 -39
- package/src/components/Rating/Rating.stories.tsx +3 -16
- package/src/components/Rating/Rating.tsx +250 -231
- package/src/components/Rating/scripts/bundle.ts +11 -6
- package/src/components/Rating/scripts/index.ts +85 -80
- package/src/components/Rating/scripts/ratingInteractions.ts +27 -24
- package/src/components/River/River.stories.tsx +70 -24
- package/src/components/River/River.tsx +28 -38
- package/src/components/River/index.ts +1 -1
- package/src/components/River/scripts/index.ts +11 -12
- package/src/components/SectionIntro/SectionIntro.stories.tsx +12 -9
- package/src/components/SectionIntro/SectionIntro.tsx +25 -31
- package/src/components/SectionIntro/scripts/componentInteractions.ts +1 -1
- package/src/components/SectionIntro/scripts/index.ts +30 -16
- package/src/components/Spinner/Spinner.stories.tsx +5 -7
- package/src/components/Spinner/Spinner.tsx +11 -6
- package/src/components/Spinner/index.ts +2 -2
- package/src/components/Steps/Steps.stories.tsx +44 -48
- package/src/components/Steps/Steps.tsx +20 -20
- package/src/components/Steps/index.ts +1 -1
- package/src/components/Steps/scripts/index.ts +9 -9
- package/src/components/Tab/Tab.stories.tsx +14 -6
- package/src/components/Tab/Tab.tsx +16 -18
- package/src/components/Tab/index.ts +2 -2
- package/src/components/Tab/scripts/index.ts +13 -13
- package/src/components/Testimonial/Testimonial.stories.tsx +54 -51
- package/src/components/Testimonial/Testimonial.tsx +18 -19
- package/src/components/Testimonial/index.ts +1 -1
- package/src/components/Testimonial/scripts/index.ts +19 -8
- package/src/components/Todo/Todo.stories.tsx +7 -24
- package/src/components/Todo/Todo.tsx +35 -46
- package/src/components/Todo/index.ts +1 -1
- package/src/components/Todo/scripts/bundle.ts +1 -1
- package/src/components/Todo/scripts/index.ts +99 -81
- package/src/components/Todo/scripts/todoInteractions.ts +12 -12
- package/src/components/Todo/scripts/types.ts +3 -3
- package/src/components/Toggle/Toggle.stories.tsx +2 -2
- package/src/components/Toggle/Toggle.tsx +18 -18
- package/src/components/Toggle/index.ts +2 -2
- package/src/components/Toggle/scripts/bundle.ts +7 -2
- package/src/components/Toggle/scripts/index.ts +14 -10
- package/src/components/Toggle/scripts/toggleInteractions.ts +11 -14
- package/src/components/Tooltip/Tooltip.stories.tsx +13 -6
- package/src/components/Tooltip/Tooltip.tsx +25 -15
- package/src/components/Tooltip/index.ts +3 -3
- package/src/components/Tooltip/scripts/bundle.ts +0 -1
- package/src/components/Tooltip/scripts/index.ts +44 -41
- package/src/components/Tooltip/scripts/tooltipInteractions.ts +22 -22
- package/src/components/Upload/Upload.stories.tsx +28 -34
- package/src/components/Upload/Upload.tsx +86 -71
- package/src/components/Upload/index.ts +1 -1
- package/src/components/Upload/scripts/index.ts +58 -43
- package/src/components/index.ts +5 -6
- package/src/design-tokens/BoxShadow/BoxShadow.stories.tsx +13 -10
- package/src/design-tokens/Colors/colors.scss +10 -7
- package/src/design-tokens/Colors/colors.stories.tsx +46 -59
- package/src/design-tokens/Spacing/Spacing.scss +7 -5
- package/src/design-tokens/Spacing/Spacing.stories.tsx +19 -18
- package/src/design-tokens/Typography/Typography.scss +88 -25
- package/src/design-tokens/Typography/Typography.stories.tsx +22 -25
- package/src/docs/implementation-guide.mdx +2 -2
- package/src/htmlComponentsEntry.ts +23 -23
- package/src/index.ts +1 -1
- package/src/layouts/Grid/Container.tsx +6 -10
- package/src/layouts/Grid/Grid.stories.tsx +72 -34
- package/src/layouts/Grid/Grid.tsx +6 -13
- package/src/layouts/Grid/GridCol.tsx +29 -26
- package/src/layouts/Grid/Row.tsx +6 -13
- package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +79 -72
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +23 -25
- package/src/layouts/MasonryGrid/MasonryGridItem.tsx +4 -12
- package/src/layouts/index.ts +3 -4
- package/src/lib/composables/index.ts +3 -3
- package/src/lib/composables/useAccordion.ts +15 -6
- package/src/lib/composables/useBadge.ts +3 -3
- package/src/lib/composables/useBreadcrumb.ts +6 -12
- package/src/lib/composables/useButton.ts +3 -3
- package/src/lib/composables/useCallout.ts +3 -3
- package/src/lib/composables/useCard.ts +50 -28
- package/src/lib/composables/useCheckbox.ts +7 -7
- package/src/lib/composables/useDataTable.ts +61 -57
- package/src/lib/composables/useDatePicker.ts +255 -231
- package/src/lib/composables/useDropdown.ts +90 -75
- package/src/lib/composables/useEdgePanel.ts +50 -47
- package/src/lib/composables/useForm.ts +4 -7
- package/src/lib/composables/useFormGroup.ts +11 -12
- package/src/lib/composables/useHero.ts +36 -38
- package/src/lib/composables/useInput.ts +9 -10
- package/src/lib/composables/useMessages.ts +12 -14
- package/src/lib/composables/useModal.ts +37 -34
- package/src/lib/composables/useNavbar.ts +33 -22
- package/src/lib/composables/usePagination.ts +3 -10
- package/src/lib/composables/usePhotoViewer.ts +625 -578
- package/src/lib/composables/usePopover.ts +68 -62
- package/src/lib/composables/useProgress.ts +9 -12
- package/src/lib/composables/useRadio.ts +4 -4
- package/src/lib/composables/useRating.ts +82 -70
- package/src/lib/composables/useRiver.ts +28 -31
- package/src/lib/composables/useSelect.ts +7 -8
- package/src/lib/composables/useSideMenu.ts +197 -0
- package/src/lib/composables/useSpinner.ts +3 -3
- package/src/lib/composables/useTextarea.ts +8 -9
- package/src/lib/composables/useTodo.ts +14 -18
- package/src/lib/constants/components.ts +191 -118
- package/src/lib/constants/index.ts +1 -1
- package/src/lib/types/components.ts +454 -324
- package/src/lib/utils/dom.ts +2 -6
- package/src/lib/utils/icons.ts +20 -12
- package/src/lib/utils/index.ts +2 -2
- package/src/lib/utils/useForkRef.ts +1 -2
- package/src/styles/01-settings/_index.scss +59 -59
- package/src/styles/01-settings/_settings.accordion.scss +21 -21
- package/src/styles/01-settings/_settings.animations.scss +2 -2
- package/src/styles/01-settings/_settings.avatar-group.scss +14 -14
- package/src/styles/01-settings/_settings.avatar.scss +31 -31
- package/src/styles/01-settings/_settings.badge.scss +11 -11
- package/src/styles/01-settings/_settings.border-radius.scss +10 -9
- package/src/styles/01-settings/_settings.border.scss +7 -7
- package/src/styles/01-settings/_settings.box-shadow.scss +24 -12
- package/src/styles/01-settings/_settings.breadcrumb.scss +18 -18
- package/src/styles/01-settings/_settings.btn-group.scss +1 -1
- package/src/styles/01-settings/_settings.button.scss +63 -49
- package/src/styles/01-settings/_settings.callout.scss +27 -7
- package/src/styles/01-settings/_settings.card.scss +27 -30
- package/src/styles/01-settings/_settings.checkbox-group.scss +2 -3
- package/src/styles/01-settings/_settings.checkbox.scss +17 -18
- package/src/styles/01-settings/_settings.color-mode.scss +1 -1
- package/src/styles/01-settings/_settings.colors.scss +197 -214
- package/src/styles/01-settings/_settings.config.scss +1 -3
- package/src/styles/01-settings/_settings.countdown.scss +14 -14
- package/src/styles/01-settings/_settings.data-table.scss +6 -6
- package/src/styles/01-settings/_settings.datepicker.scss +40 -42
- package/src/styles/01-settings/_settings.dropdown.scss +30 -30
- package/src/styles/01-settings/_settings.edge-panel.scss +16 -16
- package/src/styles/01-settings/_settings.fonts.scss +14 -12
- package/src/styles/01-settings/_settings.form-group.scss +10 -10
- package/src/styles/01-settings/_settings.form.scss +3 -3
- package/src/styles/01-settings/_settings.grid.scss +1 -1
- package/src/styles/01-settings/_settings.hero.scss +23 -23
- package/src/styles/01-settings/_settings.input.scss +32 -32
- package/src/styles/01-settings/_settings.link.scss +6 -6
- package/src/styles/01-settings/_settings.list-group.scss +12 -12
- package/src/styles/01-settings/_settings.list.scss +2 -2
- package/src/styles/01-settings/_settings.maps.scss +183 -188
- package/src/styles/01-settings/_settings.masonry-grid.scss +2 -2
- package/src/styles/01-settings/_settings.menu.scss +35 -38
- package/src/styles/01-settings/_settings.messages.scss +71 -77
- package/src/styles/01-settings/_settings.modal.scss +24 -24
- package/src/styles/01-settings/_settings.nav.scss +15 -15
- package/src/styles/01-settings/_settings.navbar.scss +39 -12
- package/src/styles/01-settings/_settings.pagination.scss +21 -21
- package/src/styles/01-settings/_settings.photoviewer.scss +1 -1
- package/src/styles/01-settings/_settings.popover.scss +3 -3
- package/src/styles/01-settings/_settings.position.scss +2 -2
- package/src/styles/01-settings/_settings.progress.scss +15 -18
- package/src/styles/01-settings/_settings.rating.scss +7 -7
- package/src/styles/01-settings/_settings.river.scss +25 -25
- package/src/styles/01-settings/_settings.sectionintro.scss +15 -16
- package/src/styles/01-settings/_settings.select.scss +31 -31
- package/src/styles/01-settings/_settings.side-menu.scss +64 -16
- package/src/styles/01-settings/_settings.skeleton.scss +12 -12
- package/src/styles/01-settings/_settings.spacing.scss +62 -33
- package/src/styles/01-settings/_settings.spinner.scss +10 -10
- package/src/styles/01-settings/_settings.steps.scss +22 -22
- package/src/styles/01-settings/_settings.tabs.scss +25 -25
- package/src/styles/01-settings/_settings.testimonials.scss +17 -19
- package/src/styles/01-settings/_settings.todo.scss +1 -1
- package/src/styles/01-settings/_settings.toggle.scss +26 -26
- package/src/styles/01-settings/_settings.tooltip.scss +15 -15
- package/src/styles/01-settings/_settings.typography.scss +65 -48
- package/src/styles/01-settings/_settings.upload.scss +70 -77
- package/src/styles/01-settings/_settings.z-layers.scss +1 -1
- package/src/styles/02-tools/_index.scss +19 -19
- package/src/styles/02-tools/_tools.animations.scss +4 -4
- package/src/styles/02-tools/_tools.border-radius.scss +4 -5
- package/src/styles/02-tools/_tools.breakpoints.scss +33 -34
- package/src/styles/02-tools/_tools.button.scss +49 -25
- package/src/styles/02-tools/_tools.color-mode.scss +11 -11
- package/src/styles/02-tools/_tools.event.scss +1 -1
- package/src/styles/02-tools/_tools.hidden-visually.scss +1 -1
- package/src/styles/02-tools/_tools.hidden.scss +1 -1
- package/src/styles/02-tools/_tools.map-loop.scss +9 -9
- package/src/styles/02-tools/_tools.media-queries.scss +5 -3
- package/src/styles/02-tools/_tools.object-fit.scss +3 -3
- package/src/styles/02-tools/_tools.placeholder.scss +0 -1
- package/src/styles/02-tools/_tools.rem.scss +1 -1
- package/src/styles/02-tools/_tools.spacing.scss +8 -34
- package/src/styles/02-tools/_tools.to-rgb.scss +3 -3
- package/src/styles/02-tools/_tools.transition.scss +1 -1
- package/src/styles/02-tools/_tools.utility-api.scss +29 -14
- package/src/styles/03-generic/_generic.fonts.scss +0 -1
- package/src/styles/03-generic/_generic.reset.scss +13 -8
- package/src/styles/03-generic/_generic.root.scss +5 -5
- package/src/styles/03-generic/_index.scss +4 -4
- package/src/styles/04-elements/_elements.all.scss +2 -2
- package/src/styles/04-elements/_elements.body.scss +1 -2
- package/src/styles/04-elements/_elements.heading.scss +37 -21
- package/src/styles/04-elements/_elements.links.scss +0 -1
- package/src/styles/04-elements/_index.scss +5 -5
- package/src/styles/05-objects/_index.scss +3 -3
- package/src/styles/05-objects/_objects.container.scss +5 -4
- package/src/styles/05-objects/_objects.grid.scss +12 -12
- package/src/styles/05-objects/_objects.masonry-grid.scss +80 -74
- package/src/styles/06-components/_components.accordion.scss +12 -6
- package/src/styles/06-components/_components.avatar-group.scss +9 -8
- package/src/styles/06-components/_components.avatar.scss +78 -77
- package/src/styles/06-components/_components.badge.scss +48 -48
- package/src/styles/06-components/_components.breadcrumb.scss +57 -58
- package/src/styles/06-components/_components.btn-group.scss +22 -22
- package/src/styles/06-components/_components.button.scss +118 -110
- package/src/styles/06-components/_components.callout.scss +21 -15
- package/src/styles/06-components/_components.card.scss +6 -10
- package/src/styles/06-components/_components.checkbox-group.scss +9 -10
- package/src/styles/06-components/_components.checkbox.scss +10 -17
- package/src/styles/06-components/_components.color-mode-toggle.scss +6 -6
- package/src/styles/06-components/_components.countdown.scss +53 -54
- package/src/styles/06-components/_components.data-table.scss +40 -36
- package/src/styles/06-components/_components.datepicker.scss +95 -73
- package/src/styles/06-components/_components.dropdown.scss +15 -9
- package/src/styles/06-components/_components.edge-panel.scss +87 -46
- package/src/styles/06-components/_components.form-group.scss +5 -4
- package/src/styles/06-components/_components.hero.scss +128 -132
- package/src/styles/06-components/_components.icon.scss +16 -16
- package/src/styles/06-components/_components.image-gallery.scss +9 -7
- package/src/styles/06-components/_components.input.scss +18 -16
- package/src/styles/06-components/_components.list-group.scss +52 -51
- package/src/styles/06-components/_components.list.scss +15 -15
- package/src/styles/06-components/_components.menu.scss +225 -220
- package/src/styles/06-components/_components.messages.scss +45 -32
- package/src/styles/06-components/_components.modal.scss +0 -1
- package/src/styles/06-components/_components.nav.scss +56 -11
- package/src/styles/06-components/_components.navbar.scss +278 -202
- package/src/styles/06-components/_components.pagination.scss +7 -6
- package/src/styles/06-components/_components.photoviewer.scss +121 -116
- package/src/styles/06-components/_components.popover.scss +10 -10
- package/src/styles/06-components/_components.product-review.scss +3 -3
- package/src/styles/06-components/_components.progress.scss +32 -35
- package/src/styles/06-components/_components.rating.scss +9 -8
- package/src/styles/06-components/_components.river.scss +4 -2
- package/src/styles/06-components/_components.sectionintro.scss +19 -26
- package/src/styles/06-components/_components.select.scss +7 -8
- package/src/styles/06-components/_components.side-menu.scss +154 -28
- package/src/styles/06-components/_components.skeleton.scss +0 -1
- package/src/styles/06-components/_components.spinner.scss +2 -4
- package/src/styles/06-components/_components.steps.scss +76 -77
- package/src/styles/06-components/_components.tabs.scss +17 -12
- package/src/styles/06-components/_components.testimonials.scss +49 -52
- package/src/styles/06-components/_components.todo.scss +26 -26
- package/src/styles/06-components/_components.tooltip.scss +114 -115
- package/src/styles/06-components/_components.upload.scss +8 -18
- package/src/styles/06-components/_index.scss +48 -48
- package/src/styles/99-utilities/_index.scss +18 -18
- package/src/styles/99-utilities/_utilities.background.scss +13 -13
- package/src/styles/99-utilities/_utilities.border.scss +30 -30
- package/src/styles/99-utilities/_utilities.clearfix.scss +1 -1
- package/src/styles/99-utilities/_utilities.display.scss +5 -4
- package/src/styles/99-utilities/_utilities.flex.scss +19 -19
- package/src/styles/99-utilities/_utilities.link.scss +52 -35
- package/src/styles/99-utilities/_utilities.object-fit.scss +3 -3
- package/src/styles/99-utilities/_utilities.opacity.scss +6 -6
- package/src/styles/99-utilities/_utilities.overflow.scss +4 -4
- package/src/styles/99-utilities/_utilities.position.scss +8 -8
- package/src/styles/99-utilities/_utilities.shadow.scss +13 -13
- package/src/styles/99-utilities/_utilities.sizes.scss +17 -17
- package/src/styles/99-utilities/_utilities.spacing.scss +72 -37
- package/src/styles/99-utilities/_utilities.text.scss +15 -15
- package/src/styles/99-utilities/_utilities.visibility.scss +8 -8
- package/src/styles/99-utilities/_utilities.visually-hidden.scss +1 -1
- package/src/styles/99-utilities/_utilities.z-index.scss +2 -2
- package/tsconfig.json +74 -0
- package/webpack.config.js +463 -0
- package/NPM_PUBLISHING.md +0 -221
- package/dist/css/atomix.css.map +0 -1
- package/dist/js/194.js.map +0 -1
- package/dist/js/atomix.react.esm.js.map +0 -1
- package/dist/js/atomix.react.umd.js.map +0 -1
- package/dist/js/chunks/esm/202.ff48d27672233280e021.js.map +0 -1
- package/dist/js/chunks/esm/308.f873332126eba90e5c62.js.map +0 -1
- package/dist/js/chunks/esm/54.4db919e5e4e5cc6d7c72.js.map +0 -1
- package/dist/js/chunks/esm/619.afc5a718eff77fa423b5.js.map +0 -1
- package/dist/js/chunks/esm/690.a9e968c7497d61e56cdc.js.map +0 -1
- package/dist/js/chunks/esm/894.f1091a4a8758c26d29e4.js.map +0 -1
- package/dist/js/chunks/esm/897.561a50f7d043d42169da.js.map +0 -1
- package/dist/js/chunks/umd/202.dac7605cc555b6bda542.js.map +0 -1
- package/dist/js/chunks/umd/308.6709979849dcbdb90c9b.js.map +0 -1
- package/dist/js/chunks/umd/54.403470e1f7d0ef4424a7.js.map +0 -1
- package/dist/js/chunks/umd/619.fa05ea98c10270eb64c5.js.map +0 -1
- package/dist/js/chunks/umd/690.aa7054d1c53e5402c2d6.js.map +0 -1
- package/dist/js/chunks/umd/894.3e1eaf0a2aadf4434390.js.map +0 -1
- package/dist/js/chunks/umd/897.554ea37be4453698c167.js.map +0 -1
- 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
- package/src/components/Navbar/Menu.tsx +0 -122
- package/src/components/Navbar/Nav.tsx +0 -35
- package/src/components/Navbar/NavDropdown.tsx +0 -108
- package/src/components/Navbar/NavItem.tsx +0 -128
- package/src/components/Navbar/Navbar.tsx +0 -124
- package/src/components/Navbar/index.ts +0 -6
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
} as Meta<typeof River>;
|
|
37
37
|
|
|
38
|
-
const Template: StoryFn<typeof River> =
|
|
38
|
+
const Template: StoryFn<typeof River> = args => (
|
|
39
39
|
<div style={{ padding: '0', maxWidth: '100%' }}>
|
|
40
40
|
<River {...args} />
|
|
41
41
|
</div>
|
|
@@ -46,7 +46,11 @@ export const Default = Template.bind({});
|
|
|
46
46
|
Default.args = {
|
|
47
47
|
title: 'Streamline Your Workflow',
|
|
48
48
|
text: 'Our platform provides a comprehensive suite of tools to optimize your workflow and increase productivity. With intuitive interfaces and powerful features, you can accomplish more in less time.',
|
|
49
|
-
actions:
|
|
49
|
+
actions: (
|
|
50
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
51
|
+
Get Started
|
|
52
|
+
</a>
|
|
53
|
+
),
|
|
50
54
|
imageSrc: 'https://unsplash.it/g/500/300',
|
|
51
55
|
imageAlt: 'Workflow diagram',
|
|
52
56
|
};
|
|
@@ -74,7 +78,7 @@ export const Breakout = Template.bind({});
|
|
|
74
78
|
Breakout.args = {
|
|
75
79
|
...Default.args,
|
|
76
80
|
title: 'Scale With Confidence',
|
|
77
|
-
text:
|
|
81
|
+
text: "Our robust infrastructure adapts to your needs, whether you're a small business or a global enterprise. Grow your operations without worrying about technical limitations.",
|
|
78
82
|
breakout: true,
|
|
79
83
|
};
|
|
80
84
|
|
|
@@ -85,10 +89,14 @@ MultiParagraph.args = {
|
|
|
85
89
|
title: 'Revolutionize Your Approach',
|
|
86
90
|
text: [
|
|
87
91
|
'Our innovative solutions are designed to transform how you work, making complex tasks simple and intuitive.',
|
|
88
|
-
|
|
89
|
-
'Experience the difference that thoughtful design and powerful technology can make in your daily operations.'
|
|
92
|
+
"By focusing on user experience and practical functionality, we've created tools that adapt to your workflow rather than forcing you to adapt to them.",
|
|
93
|
+
'Experience the difference that thoughtful design and powerful technology can make in your daily operations.',
|
|
90
94
|
],
|
|
91
|
-
actions:
|
|
95
|
+
actions: (
|
|
96
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
97
|
+
Learn More
|
|
98
|
+
</a>
|
|
99
|
+
),
|
|
92
100
|
};
|
|
93
101
|
|
|
94
102
|
// Content columns
|
|
@@ -103,13 +111,23 @@ ContentColumns.args = {
|
|
|
103
111
|
type: 'text',
|
|
104
112
|
content: (
|
|
105
113
|
<div>
|
|
106
|
-
<p className="c-river__text">
|
|
107
|
-
|
|
114
|
+
<p className="c-river__text">
|
|
115
|
+
Use content columns to create custom layouts with different types of content. This
|
|
116
|
+
approach gives you more control over the structure and presentation of your information.
|
|
117
|
+
</p>
|
|
118
|
+
<p className="c-river__text">
|
|
119
|
+
Perfect for featuring important statistics, quotes, or highlighting key information
|
|
120
|
+
alongside your main content.
|
|
121
|
+
</p>
|
|
108
122
|
</div>
|
|
109
123
|
),
|
|
110
124
|
},
|
|
111
125
|
],
|
|
112
|
-
actions:
|
|
126
|
+
actions: (
|
|
127
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
128
|
+
Explore Options
|
|
129
|
+
</a>
|
|
130
|
+
),
|
|
113
131
|
imageSrc: 'https://unsplash.it/g/500/300',
|
|
114
132
|
};
|
|
115
133
|
|
|
@@ -118,7 +136,11 @@ export const CustomTitle = Template.bind({});
|
|
|
118
136
|
CustomTitle.args = {
|
|
119
137
|
title: <h1 className="c-river__title u-text-gradient">Custom Title with Gradient</h1>,
|
|
120
138
|
text: 'The sun had set, leaving the sky painted in shades of orange and pink as the stars twinkled above. The air was filled with the sound of crickets and the rustle of leaves in the gentle breeze.',
|
|
121
|
-
actions:
|
|
139
|
+
actions: (
|
|
140
|
+
<a href="#" className="c-btn u-pl-0">
|
|
141
|
+
Text Link <i className="icon-lux-circle"></i>
|
|
142
|
+
</a>
|
|
143
|
+
),
|
|
122
144
|
imageSrc: 'https://unsplash.it/g/712/196',
|
|
123
145
|
imageAlt: 'Image',
|
|
124
146
|
};
|
|
@@ -128,7 +150,11 @@ export const WithBackgroundAndContent = Template.bind({});
|
|
|
128
150
|
WithBackgroundAndContent.args = {
|
|
129
151
|
title: 'Build Faster Applications',
|
|
130
152
|
text: 'Our component library is designed for developers who want to create beautiful interfaces with minimal effort. With built-in TypeScript support and comprehensive documentation, you can focus on building features, not fighting with UI.',
|
|
131
|
-
actions:
|
|
153
|
+
actions: (
|
|
154
|
+
<a href="#" className="c-btn c-btn--light">
|
|
155
|
+
View Documentation
|
|
156
|
+
</a>
|
|
157
|
+
),
|
|
132
158
|
imageSrc: 'https://unsplash.it/g/500/300',
|
|
133
159
|
backgroundImageSrc: 'https://unsplash.it/g/1920/600',
|
|
134
160
|
showOverlay: true,
|
|
@@ -139,7 +165,11 @@ export const CustomContentWidth = Template.bind({});
|
|
|
139
165
|
CustomContentWidth.args = {
|
|
140
166
|
title: 'Powerful Developer Experience',
|
|
141
167
|
text: 'Our River component gives you complete control over your content layout. Customize content width, background images, and layouts to create engaging sections that convert visitors into customers.',
|
|
142
|
-
actions:
|
|
168
|
+
actions: (
|
|
169
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
170
|
+
Explore API
|
|
171
|
+
</a>
|
|
172
|
+
),
|
|
143
173
|
imageSrc: 'https://unsplash.it/g/500/300',
|
|
144
174
|
contentWidth: '800px',
|
|
145
175
|
};
|
|
@@ -148,37 +178,53 @@ CustomContentWidth.args = {
|
|
|
148
178
|
const MultipeRiversExample: React.FC = () => {
|
|
149
179
|
return (
|
|
150
180
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '40px' }}>
|
|
151
|
-
<River
|
|
181
|
+
<River
|
|
152
182
|
title="Component-Driven Development"
|
|
153
183
|
text="Build your UI from the ground up using our composable components. Each component is designed to work seamlessly with the rest of the library."
|
|
154
|
-
actions={
|
|
184
|
+
actions={
|
|
185
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
186
|
+
Get Started
|
|
187
|
+
</a>
|
|
188
|
+
}
|
|
155
189
|
imageSrc="https://unsplash.it/g/712/196"
|
|
156
190
|
/>
|
|
157
|
-
|
|
158
|
-
<River
|
|
191
|
+
|
|
192
|
+
<River
|
|
159
193
|
title="TypeScript First"
|
|
160
194
|
text="Every component includes full TypeScript definitions, giving you complete type safety and excellent IDE integration."
|
|
161
|
-
actions={
|
|
195
|
+
actions={
|
|
196
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
197
|
+
Read Docs
|
|
198
|
+
</a>
|
|
199
|
+
}
|
|
162
200
|
imageSrc="https://unsplash.it/g/712/196"
|
|
163
201
|
reverse={true}
|
|
164
202
|
/>
|
|
165
|
-
|
|
166
|
-
<River
|
|
203
|
+
|
|
204
|
+
<River
|
|
167
205
|
title="Flexible Layouts"
|
|
168
206
|
text="Create engaging content sections with various layout options. Center, reverse, or breakout - all with simple props."
|
|
169
|
-
actions={
|
|
207
|
+
actions={
|
|
208
|
+
<a href="#" className="c-btn c-btn--primary">
|
|
209
|
+
See Examples
|
|
210
|
+
</a>
|
|
211
|
+
}
|
|
170
212
|
imageSrc="https://unsplash.it/g/1920/320"
|
|
171
213
|
center={true}
|
|
172
214
|
/>
|
|
173
|
-
|
|
174
|
-
<River
|
|
215
|
+
|
|
216
|
+
<River
|
|
175
217
|
title="Pixel-Perfect Design"
|
|
176
218
|
text="Our components follow a consistent design system, ensuring your application looks professional across all pages and states."
|
|
177
|
-
actions={
|
|
219
|
+
actions={
|
|
220
|
+
<a href="#" className="c-btn c-btn--light">
|
|
221
|
+
View Design System
|
|
222
|
+
</a>
|
|
223
|
+
}
|
|
178
224
|
backgroundImageSrc="https://unsplash.it/g/1920/600"
|
|
179
225
|
/>
|
|
180
226
|
</div>
|
|
181
227
|
);
|
|
182
228
|
};
|
|
183
229
|
|
|
184
|
-
export const MultipleRivers: StoryFn<typeof River> = () => <MultipeRiversExample />;
|
|
230
|
+
export const MultipleRivers: StoryFn<typeof River> = () => <MultipeRiversExample />;
|
|
@@ -22,14 +22,14 @@ export const River: React.FC<RiverProps> = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const riverRef = useRef<HTMLDivElement>(null);
|
|
24
24
|
const riverInstance = useRef<any>(null);
|
|
25
|
-
|
|
26
|
-
const {
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
27
|
generateRiverClassNames,
|
|
28
28
|
generateContentClass,
|
|
29
29
|
generateVisualClass,
|
|
30
30
|
hasBackgroundImage,
|
|
31
31
|
hasForegroundImage,
|
|
32
|
-
textContent
|
|
32
|
+
textContent,
|
|
33
33
|
} = useRiver({
|
|
34
34
|
title,
|
|
35
35
|
text,
|
|
@@ -40,9 +40,9 @@ export const River: React.FC<RiverProps> = ({
|
|
|
40
40
|
reverse,
|
|
41
41
|
backgroundImageSrc,
|
|
42
42
|
showOverlay,
|
|
43
|
-
contentWidth
|
|
43
|
+
contentWidth,
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
useEffect(() => {
|
|
47
47
|
// Only run on client-side
|
|
48
48
|
if (typeof window === 'undefined' || !riverRef.current) return undefined;
|
|
@@ -55,11 +55,11 @@ export const River: React.FC<RiverProps> = ({
|
|
|
55
55
|
breakout,
|
|
56
56
|
reverse,
|
|
57
57
|
backgroundImageSrc,
|
|
58
|
-
showOverlay
|
|
58
|
+
showOverlay,
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
// Cleanup on unmount
|
|
64
64
|
return () => {
|
|
65
65
|
if (riverInstance.current) {
|
|
@@ -67,15 +67,17 @@ export const River: React.FC<RiverProps> = ({
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}, [center, breakout, reverse, backgroundImageSrc, showOverlay]);
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
// Create custom style for river element with content width if provided
|
|
72
|
-
const riverStyle: React.CSSProperties | undefined = contentWidth
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
const riverStyle: React.CSSProperties | undefined = contentWidth
|
|
73
|
+
? ({
|
|
74
|
+
[RIVER.ATTRIBUTES.CONTENT_WIDTH]: contentWidth,
|
|
75
|
+
} as React.CSSProperties)
|
|
76
|
+
: undefined;
|
|
77
|
+
|
|
76
78
|
const renderBackground = () => {
|
|
77
79
|
if (!hasBackgroundImage) return null;
|
|
78
|
-
|
|
80
|
+
|
|
79
81
|
return (
|
|
80
82
|
<div className={RIVER.SELECTORS.BG.replace('.', '')}>
|
|
81
83
|
<img
|
|
@@ -87,39 +89,31 @@ export const River: React.FC<RiverProps> = ({
|
|
|
87
89
|
</div>
|
|
88
90
|
);
|
|
89
91
|
};
|
|
90
|
-
|
|
92
|
+
|
|
91
93
|
const renderContent = () => (
|
|
92
94
|
<div className={generateContentClass()}>
|
|
93
|
-
{title && (
|
|
94
|
-
<h2 className={RIVER.SELECTORS.TITLE.replace('.', '')}>{title}</h2>
|
|
95
|
-
)}
|
|
95
|
+
{title && <h2 className={RIVER.SELECTORS.TITLE.replace('.', '')}>{title}</h2>}
|
|
96
96
|
{textContent.map((paragraph, index) => (
|
|
97
|
-
<p key={index} className={RIVER.SELECTORS.TEXT.replace('.', '')}>
|
|
97
|
+
<p key={index} className={RIVER.SELECTORS.TEXT.replace('.', '')}>
|
|
98
|
+
{paragraph}
|
|
99
|
+
</p>
|
|
98
100
|
))}
|
|
99
|
-
{actions && (
|
|
100
|
-
<div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>
|
|
101
|
-
{actions}
|
|
102
|
-
</div>
|
|
103
|
-
)}
|
|
101
|
+
{actions && <div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>{actions}</div>}
|
|
104
102
|
</div>
|
|
105
103
|
);
|
|
106
104
|
|
|
107
105
|
const renderImage = () => {
|
|
108
106
|
if (!hasForegroundImage) return null;
|
|
109
|
-
|
|
107
|
+
|
|
110
108
|
return (
|
|
111
109
|
<div className={generateVisualClass()}>
|
|
112
110
|
<div className={RIVER.SELECTORS.IMAGE_WRAPPER.replace('.', '')}>
|
|
113
|
-
<img
|
|
114
|
-
src={imageSrc}
|
|
115
|
-
alt={imageAlt}
|
|
116
|
-
className={RIVER.SELECTORS.IMAGE.replace('.', '')}
|
|
117
|
-
/>
|
|
111
|
+
<img src={imageSrc} alt={imageAlt} className={RIVER.SELECTORS.IMAGE.replace('.', '')} />
|
|
118
112
|
</div>
|
|
119
113
|
</div>
|
|
120
114
|
);
|
|
121
115
|
};
|
|
122
|
-
|
|
116
|
+
|
|
123
117
|
// Render with content columns (advanced layout)
|
|
124
118
|
if (contentColumns && contentColumns.length > 0) {
|
|
125
119
|
return (
|
|
@@ -130,18 +124,14 @@ export const River: React.FC<RiverProps> = ({
|
|
|
130
124
|
{!reverse && renderImage()}
|
|
131
125
|
<div className={generateContentClass()}>
|
|
132
126
|
{contentColumns.map((column, index) => (
|
|
133
|
-
<div
|
|
127
|
+
<div
|
|
134
128
|
key={index}
|
|
135
129
|
className={`${RIVER.SELECTORS.CONTENT_COL.replace('.', '')} ${RIVER.SELECTORS[`CONTENT_COL_${column.type.toUpperCase()}` as keyof typeof RIVER.SELECTORS].replace('.', '')}`}
|
|
136
130
|
>
|
|
137
131
|
{column.content}
|
|
138
132
|
</div>
|
|
139
133
|
))}
|
|
140
|
-
{actions && (
|
|
141
|
-
<div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>
|
|
142
|
-
{actions}
|
|
143
|
-
</div>
|
|
144
|
-
)}
|
|
134
|
+
{actions && <div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>{actions}</div>}
|
|
145
135
|
</div>
|
|
146
136
|
{reverse && renderImage()}
|
|
147
137
|
</div>
|
|
@@ -149,7 +139,7 @@ export const River: React.FC<RiverProps> = ({
|
|
|
149
139
|
</div>
|
|
150
140
|
);
|
|
151
141
|
}
|
|
152
|
-
|
|
142
|
+
|
|
153
143
|
// Render with standard layout
|
|
154
144
|
return (
|
|
155
145
|
<div className={generateRiverClassNames(className)} ref={riverRef} style={riverStyle}>
|
|
@@ -165,7 +155,7 @@ export const River: React.FC<RiverProps> = ({
|
|
|
165
155
|
);
|
|
166
156
|
};
|
|
167
157
|
|
|
168
|
-
export type { RiverProps
|
|
158
|
+
export type { RiverProps };
|
|
169
159
|
|
|
170
160
|
River.displayName = 'River';
|
|
171
161
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { River } from './River';
|
|
2
|
-
export type { RiverProps } from './River';
|
|
2
|
+
export type { RiverProps } from './River';
|
|
@@ -28,7 +28,7 @@ const DEFAULT_OPTIONS: RiverOptions = {
|
|
|
28
28
|
center: false,
|
|
29
29
|
breakout: false,
|
|
30
30
|
reverse: false,
|
|
31
|
-
showOverlay: true
|
|
31
|
+
showOverlay: true,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -54,10 +54,7 @@ class River implements RiverInstance {
|
|
|
54
54
|
*/
|
|
55
55
|
init(): void {
|
|
56
56
|
if (this.options.contentWidth) {
|
|
57
|
-
this.$element.style.setProperty(
|
|
58
|
-
RIVER.ATTRIBUTES.CONTENT_WIDTH,
|
|
59
|
-
this.options.contentWidth
|
|
60
|
-
);
|
|
57
|
+
this.$element.style.setProperty(RIVER.ATTRIBUTES.CONTENT_WIDTH, this.options.contentWidth);
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
// Add background image if provided
|
|
@@ -74,26 +71,26 @@ class River implements RiverInstance {
|
|
|
74
71
|
|
|
75
72
|
// Check if background already exists
|
|
76
73
|
let $bg = this.$element.querySelector(RIVER.SELECTORS.BG);
|
|
77
|
-
|
|
74
|
+
|
|
78
75
|
if (!$bg) {
|
|
79
76
|
// Create background container
|
|
80
77
|
$bg = document.createElement('div');
|
|
81
78
|
$bg.className = RIVER.SELECTORS.BG.replace('.', '');
|
|
82
|
-
|
|
79
|
+
|
|
83
80
|
// Create background image
|
|
84
81
|
const $bgImage = document.createElement('img');
|
|
85
82
|
$bgImage.src = this.options.backgroundImageSrc;
|
|
86
83
|
$bgImage.alt = 'Background';
|
|
87
84
|
$bgImage.className = RIVER.SELECTORS.BG_IMAGE.replace('.', '');
|
|
88
85
|
$bg.appendChild($bgImage);
|
|
89
|
-
|
|
86
|
+
|
|
90
87
|
// Create overlay if needed
|
|
91
88
|
if (this.options.showOverlay) {
|
|
92
89
|
const $overlay = document.createElement('div');
|
|
93
90
|
$overlay.className = RIVER.SELECTORS.OVERLAY.replace('.', '');
|
|
94
91
|
$bg.appendChild($overlay);
|
|
95
92
|
}
|
|
96
|
-
|
|
93
|
+
|
|
97
94
|
// Add background to the element (as first child)
|
|
98
95
|
if (this.$element.firstChild) {
|
|
99
96
|
this.$element.insertBefore($bg, this.$element.firstChild);
|
|
@@ -119,11 +116,13 @@ class River implements RiverInstance {
|
|
|
119
116
|
*/
|
|
120
117
|
export function initializeRivers(selector = RIVER.SELECTORS.RIVER, options = {}): RiverInstance[] {
|
|
121
118
|
const riverInstances: RiverInstance[] = [];
|
|
122
|
-
const riverElements = document.querySelectorAll<HTMLElement>(
|
|
119
|
+
const riverElements = document.querySelectorAll<HTMLElement>(
|
|
120
|
+
typeof selector === 'string' ? selector : RIVER.SELECTORS.RIVER
|
|
121
|
+
);
|
|
123
122
|
|
|
124
123
|
if (!riverElements.length) return riverInstances;
|
|
125
124
|
|
|
126
|
-
riverElements.forEach(
|
|
125
|
+
riverElements.forEach(element => {
|
|
127
126
|
try {
|
|
128
127
|
const instance = new River(element, options);
|
|
129
128
|
riverInstances.push(instance);
|
|
@@ -135,4 +134,4 @@ export function initializeRivers(selector = RIVER.SELECTORS.RIVER, options = {})
|
|
|
135
134
|
return riverInstances;
|
|
136
135
|
}
|
|
137
136
|
|
|
138
|
-
export default River;
|
|
137
|
+
export default River;
|
|
@@ -14,13 +14,13 @@ const meta: Meta<typeof SectionIntro> = {
|
|
|
14
14
|
title: { control: 'text' },
|
|
15
15
|
label: { control: 'text' },
|
|
16
16
|
text: { control: 'text' },
|
|
17
|
-
alignment: {
|
|
18
|
-
control: { type: 'select' },
|
|
19
|
-
options: ['left', 'center', 'right']
|
|
17
|
+
alignment: {
|
|
18
|
+
control: { type: 'select' },
|
|
19
|
+
options: ['left', 'center', 'right'],
|
|
20
20
|
},
|
|
21
|
-
size: {
|
|
22
|
-
control: { type: 'select' },
|
|
23
|
-
options: ['sm', 'md', 'lg']
|
|
21
|
+
size: {
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: ['sm', 'md', 'lg'],
|
|
24
24
|
},
|
|
25
25
|
skeleton: { control: 'boolean' },
|
|
26
26
|
showOverlay: { control: 'boolean' },
|
|
@@ -80,7 +80,8 @@ export const RightAligned: Story = {
|
|
|
80
80
|
export const WithBackground: Story = {
|
|
81
81
|
args: {
|
|
82
82
|
...Default.args,
|
|
83
|
-
backgroundImageSrc:
|
|
83
|
+
backgroundImageSrc:
|
|
84
|
+
'https://images.unsplash.com/photo-1557682250-33bd709cbe85?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
|
|
84
85
|
showOverlay: true,
|
|
85
86
|
alignment: 'center',
|
|
86
87
|
title: 'Discover Our Vision',
|
|
@@ -93,7 +94,8 @@ export const WithBackground: Story = {
|
|
|
93
94
|
export const WithImage: Story = {
|
|
94
95
|
args: {
|
|
95
96
|
...Default.args,
|
|
96
|
-
imageSrc:
|
|
97
|
+
imageSrc:
|
|
98
|
+
'https://images.unsplash.com/photo-1581291518633-83b4ebd1d83e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
|
|
97
99
|
imageAlt: 'Team collaboration',
|
|
98
100
|
},
|
|
99
101
|
};
|
|
@@ -130,7 +132,8 @@ export const FullExample: Story = {
|
|
|
130
132
|
text: 'We believe in creating technology that empowers people to achieve more. Our components are designed with accessibility, performance, and developer experience in mind.',
|
|
131
133
|
alignment: 'center',
|
|
132
134
|
size: 'lg',
|
|
133
|
-
backgroundImageSrc:
|
|
135
|
+
backgroundImageSrc:
|
|
136
|
+
'https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
|
|
134
137
|
showOverlay: true,
|
|
135
138
|
actions: (
|
|
136
139
|
<div className="u-flex u-gap-md u-justify-center">
|
|
@@ -6,7 +6,7 @@ export interface SectionIntroProps {
|
|
|
6
6
|
* The section title
|
|
7
7
|
*/
|
|
8
8
|
title: ReactNode;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
/**
|
|
11
11
|
* Optional subtitle or overline text
|
|
12
12
|
*/
|
|
@@ -14,7 +14,7 @@ export interface SectionIntroProps {
|
|
|
14
14
|
* Optional label text (equivalent to subtitle in the UI)
|
|
15
15
|
*/
|
|
16
16
|
label?: ReactNode;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
/**
|
|
19
19
|
* Optional description text
|
|
20
20
|
*/
|
|
@@ -22,47 +22,47 @@ export interface SectionIntroProps {
|
|
|
22
22
|
* Optional text content
|
|
23
23
|
*/
|
|
24
24
|
text?: ReactNode;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
/**
|
|
27
27
|
* Optional call to action elements
|
|
28
28
|
*/
|
|
29
29
|
actions?: ReactNode;
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
/**
|
|
32
32
|
* Alignment of the content
|
|
33
33
|
*/
|
|
34
34
|
alignment?: 'left' | 'center' | 'right';
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
/**
|
|
37
37
|
* Optional background image URL
|
|
38
38
|
*/
|
|
39
39
|
backgroundImageSrc?: string;
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
/**
|
|
42
42
|
* Whether to show an overlay on the background
|
|
43
43
|
*/
|
|
44
44
|
showOverlay?: boolean;
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
/**
|
|
47
47
|
* Optional foreground image URL
|
|
48
48
|
*/
|
|
49
49
|
imageSrc?: string;
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
/**
|
|
52
52
|
* Alternative text for the image
|
|
53
53
|
*/
|
|
54
54
|
imageAlt?: string;
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
/**
|
|
57
57
|
* Size variant
|
|
58
58
|
*/
|
|
59
59
|
size?: 'sm' | 'md' | 'lg';
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
/**
|
|
62
62
|
* Whether to show a skeleton loading state
|
|
63
63
|
*/
|
|
64
64
|
skeleton?: boolean;
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
/**
|
|
67
67
|
* Additional CSS class
|
|
68
68
|
*/
|
|
@@ -88,7 +88,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
88
88
|
}) => {
|
|
89
89
|
const sectionIntroRef = useRef<HTMLDivElement>(null);
|
|
90
90
|
const sectionIntroInstance = useRef<any>(null);
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
useEffect(() => {
|
|
93
93
|
// Only run on client-side
|
|
94
94
|
if (typeof window === 'undefined' || !sectionIntroRef.current) return undefined;
|
|
@@ -101,11 +101,11 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
101
101
|
backgroundImageSrc,
|
|
102
102
|
showOverlay,
|
|
103
103
|
size,
|
|
104
|
-
skeleton
|
|
104
|
+
skeleton,
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
// Cleanup on unmount
|
|
110
110
|
return () => {
|
|
111
111
|
if (sectionIntroInstance.current) {
|
|
@@ -113,7 +113,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
}, [alignment, backgroundImageSrc, showOverlay, size, skeleton]);
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
// Determine CSS classes
|
|
118
118
|
const sectionIntroClasses = [
|
|
119
119
|
'c-sectionintro',
|
|
@@ -121,9 +121,11 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
121
121
|
size === 'sm' ? SECTION_INTRO.CLASSES.SMALL : '',
|
|
122
122
|
size === 'lg' ? SECTION_INTRO.CLASSES.LARGE : '',
|
|
123
123
|
backgroundImageSrc ? 'c-sectionintro--has-bg' : '',
|
|
124
|
-
className
|
|
125
|
-
]
|
|
126
|
-
|
|
124
|
+
className,
|
|
125
|
+
]
|
|
126
|
+
.filter(Boolean)
|
|
127
|
+
.join(' ');
|
|
128
|
+
|
|
127
129
|
// Render skeleton version
|
|
128
130
|
if (skeleton) {
|
|
129
131
|
return (
|
|
@@ -158,23 +160,19 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
158
160
|
</div>
|
|
159
161
|
);
|
|
160
162
|
}
|
|
161
|
-
|
|
163
|
+
|
|
162
164
|
// Render background if provided
|
|
163
165
|
const renderBackground = () => {
|
|
164
166
|
if (!backgroundImageSrc) return null;
|
|
165
|
-
|
|
167
|
+
|
|
166
168
|
return (
|
|
167
169
|
<div className="c-sectionintro__bg">
|
|
168
|
-
<img
|
|
169
|
-
src={backgroundImageSrc}
|
|
170
|
-
alt="Background"
|
|
171
|
-
className="c-sectionintro__bg-image"
|
|
172
|
-
/>
|
|
170
|
+
<img src={backgroundImageSrc} alt="Background" className="c-sectionintro__bg-image" />
|
|
173
171
|
{showOverlay && <div className="c-sectionintro__overlay"></div>}
|
|
174
172
|
</div>
|
|
175
173
|
);
|
|
176
174
|
};
|
|
177
|
-
|
|
175
|
+
|
|
178
176
|
// Render normal version
|
|
179
177
|
return (
|
|
180
178
|
<div className={sectionIntroClasses} ref={sectionIntroRef}>
|
|
@@ -186,11 +184,7 @@ export const SectionIntro: React.FC<SectionIntroProps> = ({
|
|
|
186
184
|
{actions && <div className="c-sectionintro__actions">{actions}</div>}
|
|
187
185
|
{imageSrc && (
|
|
188
186
|
<div className="c-sectionintro__image-wrapper">
|
|
189
|
-
<img
|
|
190
|
-
src={imageSrc}
|
|
191
|
-
alt={imageAlt}
|
|
192
|
-
className="c-sectionintro__image"
|
|
193
|
-
/>
|
|
187
|
+
<img src={imageSrc} alt={imageAlt} className="c-sectionintro__image" />
|
|
194
188
|
</div>
|
|
195
189
|
)}
|
|
196
190
|
</div>
|
|
@@ -19,7 +19,7 @@ export function enhanceSectionIntro(element: HTMLElement): void {
|
|
|
19
19
|
*/
|
|
20
20
|
export function initializeSectionIntroInteractions(): void {
|
|
21
21
|
const sectionIntros = document.querySelectorAll(SECTION_INTRO.SELECTORS.SECTION_INTRO);
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
sectionIntros.forEach(element => {
|
|
24
24
|
if (element instanceof HTMLElement) {
|
|
25
25
|
enhanceSectionIntro(element);
|