@4alldigital/foundation-ui--core 3.0.0
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/LICENSE.txt +21 -0
- package/package.json +35 -0
- package/src/__mocks__/_examples/cnbc.ts +146 -0
- package/src/__mocks__/_examples/nrg.ts +222 -0
- package/src/__mocks__/empty-module.js +0 -0
- package/src/__mocks__/fileMock.js +3 -0
- package/src/__mocks__/fileTransformer.js +8 -0
- package/src/__mocks__/mockSearchData.js +511 -0
- package/src/__mocks__/nrglogo.svg +74 -0
- package/src/__mocks__/styleMock.js +3 -0
- package/src/__mocks__/tempPolyFills.js +5 -0
- package/src/components/Accordion/Accordion.stories.tsx +33 -0
- package/src/components/Accordion/Accordion.tsx +53 -0
- package/src/components/Accordion/Accordion.types.ts +8 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AnimationCounter/AnimationCounter.stories.tsx +22 -0
- package/src/components/AnimationCounter/AnimationCounter.tsx +51 -0
- package/src/components/AnimationCounter/AnimationCounter.types.ts +10 -0
- package/src/components/AnimationCounter/index.ts +1 -0
- package/src/components/AnimationSet1/AnimationSet1.stories.tsx +36 -0
- package/src/components/AnimationSet1/AnimationSet1.tsx +107 -0
- package/src/components/AnimationSet1/AnimationSet1.types.ts +12 -0
- package/src/components/AnimationSet1/index.ts +1 -0
- package/src/components/Authenticator/Authenticator.stories.tsx +37 -0
- package/src/components/Authenticator/Authenticator.tsx +84 -0
- package/src/components/Authenticator/Authenticator.types.ts +7 -0
- package/src/components/Authenticator/index.ts +1 -0
- package/src/components/Avatar/Avatar.stories.tsx +26 -0
- package/src/components/Avatar/Avatar.tsx +88 -0
- package/src/components/Avatar/Avatar.types.ts +8 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Banner/Banner.stories.tsx +59 -0
- package/src/components/Banner/Banner.tsx +60 -0
- package/src/components/Banner/Banner.types.ts +9 -0
- package/src/components/Banner/index.ts +1 -0
- package/src/components/Blockquote/Blockquote.stories.tsx +20 -0
- package/src/components/Blockquote/Blockquote.tsx +32 -0
- package/src/components/Blockquote/Blockquote.types.ts +8 -0
- package/src/components/Blockquote/index.ts +1 -0
- package/src/components/Button/Button.stories.tsx +50 -0
- package/src/components/Button/Button.tsx +117 -0
- package/src/components/Button/Button.types.ts +43 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +59 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +35 -0
- package/src/components/ButtonGroup/ButtonGroup.types.ts +5 -0
- package/src/components/ButtonGroup/index.ts +1 -0
- package/src/components/Calendar/Calendar.stories.tsx +100 -0
- package/src/components/Calendar/Calendar.tsx +91 -0
- package/src/components/Calendar/Calendar.types.ts +10 -0
- package/src/components/Calendar/index.ts +2 -0
- package/src/components/Card/Card.stories.tsx +487 -0
- package/src/components/Card/Card.tsx +32 -0
- package/src/components/Card/Card.types.ts +79 -0
- package/src/components/Card/constants/index.ts +8 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Card/types/CardBasic/CardBasic.tsx +262 -0
- package/src/components/Card/types/CardBasic/CardBasic.types.ts +7 -0
- package/src/components/Card/types/CardBasic/index.ts +1 -0
- package/src/components/Card/types/CardData/CardData.tsx +68 -0
- package/src/components/Card/types/CardData/CardData.types.ts +21 -0
- package/src/components/Card/types/CardData/index.ts +1 -0
- package/src/components/Card/types/CardHorz/CardHorz.tsx +80 -0
- package/src/components/Card/types/CardHorz/CardHorz.types.ts +8 -0
- package/src/components/Card/types/CardHorz/index.ts +1 -0
- package/src/components/Card/types/CardIcon/CardIcon.tsx +76 -0
- package/src/components/Card/types/CardIcon/CardIcon.types.ts +8 -0
- package/src/components/Card/types/CardIcon/index.ts +1 -0
- package/src/components/Card/types/CardMedia/CardMedia.tsx +277 -0
- package/src/components/Card/types/CardMedia/CardMedia.types.ts +5 -0
- package/src/components/Card/types/CardMedia/index.ts +1 -0
- package/src/components/Card/types/CardVideo/CardVideo.tsx +262 -0
- package/src/components/Card/types/CardVideo/CardVideo.types.ts +11 -0
- package/src/components/Card/types/CardVideo/index.ts +1 -0
- package/src/components/CardGrid/CardGrid.stories.tsx +122 -0
- package/src/components/CardGrid/CardGrid.tsx +25 -0
- package/src/components/CardGrid/CardGrid.types.ts +7 -0
- package/src/components/CardGrid/index.ts +1 -0
- package/src/components/Carousel/Carousel.stories.tsx +351 -0
- package/src/components/Carousel/Carousel.tsx +174 -0
- package/src/components/Carousel/Carousel.types.ts +32 -0
- package/src/components/Carousel/MIGRATION.md +156 -0
- package/src/components/Carousel/index.ts +1 -0
- package/src/components/Cart/Cart.stories.tsx +92 -0
- package/src/components/Cart/Cart.tsx +194 -0
- package/src/components/Cart/Cart.types.ts +4 -0
- package/src/components/Cart/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +18 -0
- package/src/components/Checkbox/Checkbox.tsx +38 -0
- package/src/components/Checkbox/Checkbox.types.ts +15 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/Chip.stories.tsx +37 -0
- package/src/components/Chip/Chip.tsx +104 -0
- package/src/components/Chip/Chip.types.ts +13 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/Collapsible/Collapsible.stories.tsx +139 -0
- package/src/components/Collapsible/Collapsible.tsx +75 -0
- package/src/components/Collapsible/Collapsible.types.ts +14 -0
- package/src/components/Collapsible/index.ts +3 -0
- package/src/components/Container/Container.stories.tsx +17 -0
- package/src/components/Container/Container.tsx +51 -0
- package/src/components/Container/Container.types.ts +17 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/ContentPageLayout/ContentPageLayout.stories.tsx +17 -0
- package/src/components/ContentPageLayout/ContentPageLayout.tsx +38 -0
- package/src/components/ContentPageLayout/ContentPageLayout.types.ts +17 -0
- package/src/components/ContentPageLayout/index.ts +1 -0
- package/src/components/ContentRowsLayout/ContentRowsLayout.stories.tsx +19 -0
- package/src/components/ContentRowsLayout/ContentRowsLayout.tsx +30 -0
- package/src/components/ContentRowsLayout/ContentRowsLayout.types.ts +15 -0
- package/src/components/ContentRowsLayout/index.ts +1 -0
- package/src/components/Copy/Copy.stories.tsx +28 -0
- package/src/components/Copy/Copy.tsx +43 -0
- package/src/components/Copy/Copy.types.tsx +53 -0
- package/src/components/Copy/index.tsx +1 -0
- package/src/components/DisplayHeading/DisplayHeading.stories.tsx +17 -0
- package/src/components/DisplayHeading/DisplayHeading.tsx +43 -0
- package/src/components/DisplayHeading/DisplayHeading.types.ts +8 -0
- package/src/components/DisplayHeading/index.ts +1 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +18 -0
- package/src/components/FileUpload/FileUpload.tsx +41 -0
- package/src/components/FileUpload/FileUpload.types.ts +9 -0
- package/src/components/FileUpload/index.ts +1 -0
- package/src/components/Footer/Footer.stories.tsx +17 -0
- package/src/components/Footer/Footer.tsx +78 -0
- package/src/components/Footer/Footer.types.ts +4 -0
- package/src/components/Footer/index.ts +1 -0
- package/src/components/Form/Form.stories.tsx +81 -0
- package/src/components/Form/Form.tsx +98 -0
- package/src/components/Form/Form.types.ts +34 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/FormField/FormField.stories.tsx +205 -0
- package/src/components/FormField/FormField.tsx +258 -0
- package/src/components/FormField/FormField.types.ts +89 -0
- package/src/components/FormField/index.ts +1 -0
- package/src/components/FormSelect/FormSelect.stories.tsx +27 -0
- package/src/components/FormSelect/FormSelect.tsx +46 -0
- package/src/components/FormSelect/FormSelect.types.ts +45 -0
- package/src/components/FormSelect/index.ts +1 -0
- package/src/components/FullContentBackgroundImage/FullContentBackgroundImage.stories.tsx +18 -0
- package/src/components/FullContentBackgroundImage/FullContentBackgroundImage.tsx +26 -0
- package/src/components/FullContentBackgroundImage/FullContentBackgroundImage.types.ts +6 -0
- package/src/components/FullContentBackgroundImage/index.ts +1 -0
- package/src/components/FullScreenVideoModal/FullScreenVideoModal.stories.tsx +34 -0
- package/src/components/FullScreenVideoModal/FullScreenVideoModal.tsx +41 -0
- package/src/components/FullScreenVideoModal/FullScreenVideoModal.types.ts +9 -0
- package/src/components/FullScreenVideoModal/index.ts +1 -0
- package/src/components/Header/Header.stories.tsx +51 -0
- package/src/components/Header/Header.tsx +170 -0
- package/src/components/Header/Header.types.ts +11 -0
- package/src/components/Header/index.ts +1 -0
- package/src/components/Heading/Heading.stories.tsx +57 -0
- package/src/components/Heading/Heading.tsx +47 -0
- package/src/components/Heading/Heading.types.ts +35 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/Hero/Hero.stories.tsx +17 -0
- package/src/components/Hero/Hero.tsx +28 -0
- package/src/components/Hero/Hero.types.ts +17 -0
- package/src/components/Hero/index.ts +1 -0
- package/src/components/Hr/Hr.stories.tsx +13 -0
- package/src/components/Hr/Hr.tsx +16 -0
- package/src/components/Hr/Hr.types.ts +3 -0
- package/src/components/Hr/index.ts +1 -0
- package/src/components/HtmlContent/HtmlContent.stories.tsx +29 -0
- package/src/components/HtmlContent/HtmlContent.tsx +36 -0
- package/src/components/HtmlContent/HtmlContent.types.ts +6 -0
- package/src/components/HtmlContent/index.ts +1 -0
- package/src/components/Icon/Icon.stories.tsx +26 -0
- package/src/components/Icon/Icon.tsx +24 -0
- package/src/components/Icon/Icon.types.ts +8 -0
- package/src/components/Icon/index.ts +2 -0
- package/src/components/Image/Image.stories.tsx +32 -0
- package/src/components/Image/Image.tsx +71 -0
- package/src/components/Image/Image.types.ts +20 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Label/Label.stories.tsx +18 -0
- package/src/components/Label/Label.tsx +17 -0
- package/src/components/Label/Label.types.ts +9 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.stories.tsx +25 -0
- package/src/components/Link/Link.tsx +85 -0
- package/src/components/Link/Link.types.ts +14 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/List/List.stories.tsx +38 -0
- package/src/components/List/List.tsx +17 -0
- package/src/components/List/List.types.ts +27 -0
- package/src/components/List/index.ts +1 -0
- package/src/components/ListItem/ListItem.stories.tsx +61 -0
- package/src/components/ListItem/ListItem.tsx +53 -0
- package/src/components/ListItem/ListItem.types.ts +10 -0
- package/src/components/ListItem/index.ts +1 -0
- package/src/components/Loader/Loader.stories.tsx +17 -0
- package/src/components/Loader/Loader.tsx +34 -0
- package/src/components/Loader/Loader.types.ts +5 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Logo/Logo.stories.tsx +17 -0
- package/src/components/Logo/Logo.tsx +17 -0
- package/src/components/Logo/Logo.types.ts +6 -0
- package/src/components/Logo/index.ts +1 -0
- package/src/components/Menu/Menu.stories.tsx +37 -0
- package/src/components/Menu/Menu.tsx +45 -0
- package/src/components/Menu/Menu.types.ts +15 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Notice/Notice.stories.tsx +49 -0
- package/src/components/Notice/Notice.tsx +63 -0
- package/src/components/Notice/Notice.types.ts +11 -0
- package/src/components/Notice/index.ts +1 -0
- package/src/components/OTPInput/OTPInput.stories.tsx +18 -0
- package/src/components/OTPInput/OTPInput.tsx +80 -0
- package/src/components/OTPInput/OTPInput.types.ts +8 -0
- package/src/components/OTPInput/index.ts +1 -0
- package/src/components/PanelCards/PanelCards.stories.tsx +125 -0
- package/src/components/PanelCards/PanelCards.tsx +81 -0
- package/src/components/PanelCards/PanelCards.types.ts +11 -0
- package/src/components/PanelCards/index.ts +1 -0
- package/src/components/PanelCustom/PanelCustom.stories.tsx +18 -0
- package/src/components/PanelCustom/PanelCustom.tsx +39 -0
- package/src/components/PanelCustom/PanelCustom.types.ts +20 -0
- package/src/components/PanelCustom/index.ts +1 -0
- package/src/components/PanelFeature/PanelFeature.stories.tsx +46 -0
- package/src/components/PanelFeature/PanelFeature.tsx +83 -0
- package/src/components/PanelFeature/PanelFeature.types.ts +27 -0
- package/src/components/PanelFeature/index.ts +1 -0
- package/src/components/PanelHero/PanelHero.stories.tsx +126 -0
- package/src/components/PanelHero/PanelHero.tsx +184 -0
- package/src/components/PanelHero/PanelHero.types.ts +19 -0
- package/src/components/PanelHero/index.ts +1 -0
- package/src/components/PanelIntro/PanelIntro.stories.tsx +38 -0
- package/src/components/PanelIntro/PanelIntro.tsx +139 -0
- package/src/components/PanelIntro/PanelIntro.types.ts +19 -0
- package/src/components/PanelIntro/index.ts +1 -0
- package/src/components/PanelProduct/PanelProduct.stories.tsx +24 -0
- package/src/components/PanelProduct/PanelProduct.tsx +87 -0
- package/src/components/PanelProduct/PanelProduct.types.ts +14 -0
- package/src/components/PanelProduct/index.ts +1 -0
- package/src/components/PanelScroller/PanelScroller.stories.tsx +81 -0
- package/src/components/PanelScroller/PanelScroller.tsx +58 -0
- package/src/components/PanelScroller/PanelScroller.types.ts +8 -0
- package/src/components/PanelScroller/index.ts +1 -0
- package/src/components/PanelVideo/PanelVideo.stories.tsx +42 -0
- package/src/components/PanelVideo/PanelVideo.tsx +81 -0
- package/src/components/PanelVideo/PanelVideo.types.ts +11 -0
- package/src/components/PanelVideo/index.ts +1 -0
- package/src/components/Radio/Radio.stories.tsx +24 -0
- package/src/components/Radio/Radio.tsx +44 -0
- package/src/components/Radio/Radio.types.ts +13 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/Schedule/Schedule.stories.tsx +96 -0
- package/src/components/Schedule/Schedule.tsx +118 -0
- package/src/components/Schedule/Schedule.types.ts +64 -0
- package/src/components/Schedule/index.ts +1 -0
- package/src/components/ScheduleItem/ScheduleItem.stories.tsx +21 -0
- package/src/components/ScheduleItem/ScheduleItem.tsx +77 -0
- package/src/components/ScheduleItem/ScheduleItem.types.ts +8 -0
- package/src/components/ScheduleItem/index.ts +1 -0
- package/src/components/Screen/Screen.stories.tsx +27 -0
- package/src/components/Screen/Screen.tsx +63 -0
- package/src/components/Screen/Screen.types.ts +16 -0
- package/src/components/Screen/index.ts +1 -0
- package/src/components/ShadcnButton/ShadcnButton.tsx +57 -0
- package/src/components/ShadcnButton/index.ts +2 -0
- package/src/components/ShadcnCarousel/ShadcnCarousel.tsx +261 -0
- package/src/components/ShadcnCarousel/index.ts +9 -0
- package/src/components/Share/Share.stories.tsx +17 -0
- package/src/components/Share/Share.tsx +60 -0
- package/src/components/Share/Share.types.ts +12 -0
- package/src/components/Share/index.ts +1 -0
- package/src/components/SubscriptionManager/SubscriptionManager.stories.tsx +177 -0
- package/src/components/SubscriptionManager/SubscriptionManager.tsx +369 -0
- package/src/components/SubscriptionManager/SubscriptionManager.types.ts +36 -0
- package/src/components/SubscriptionManager/index.ts +1 -0
- package/src/components/Switch/Switch.stories.tsx +20 -0
- package/src/components/Switch/Switch.tsx +30 -0
- package/src/components/Switch/Switch.types.ts +7 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Tabs/Tabs.stories.tsx +34 -0
- package/src/components/Tabs/Tabs.tsx +42 -0
- package/src/components/Tabs/Tabs.types.ts +8 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/TextInput/TextInput.stories.tsx +18 -0
- package/src/components/TextInput/TextInput.tsx +78 -0
- package/src/components/TextInput/TextInput.types.ts +81 -0
- package/src/components/TextInput/index.ts +1 -0
- package/src/components/Video/Video.stories.tsx +75 -0
- package/src/components/Video/Video.tsx +280 -0
- package/src/components/Video/Video.types.ts +147 -0
- package/src/components/Video/index.ts +1 -0
- package/src/components/VisitUs/VisitUs.stories.tsx +32 -0
- package/src/components/VisitUs/VisitUs.tsx +56 -0
- package/src/components/VisitUs/VisitUs.types.ts +13 -0
- package/src/components/VisitUs/index.ts +1 -0
- package/src/components/index.ts +143 -0
- package/src/constants/index.ts +6 -0
- package/src/context/Amplify/index.tsx +65 -0
- package/src/context/App/index.tsx +93 -0
- package/src/context/Cart/index.tsx +64 -0
- package/src/context/ExampleContext/index.tsx +34 -0
- package/src/context/Theme/index.tsx +37 -0
- package/src/context/index.ts +18 -0
- package/src/features/Search/Search.stories.tsx +395 -0
- package/src/features/Search/Search.tsx +204 -0
- package/src/features/Search/Search.types.ts +41 -0
- package/src/features/Search/config/config-helper.ts +219 -0
- package/src/features/Search/index.ts +1 -0
- package/src/features/Search/view-helpers/appendClassName.ts +14 -0
- package/src/features/Search/view-helpers/formatResult.ts +97 -0
- package/src/features/Search/view-helpers/getFilterValueDisplay.ts +10 -0
- package/src/features/Search/view-helpers/getUrlSanitizer.ts +23 -0
- package/src/features/Search/view-helpers/index.ts +4 -0
- package/src/features/Search/views/Layout/Layout.tsx +50 -0
- package/src/features/Search/views/Layout/Layout.types.ts +13 -0
- package/src/features/Search/views/Layout/index.ts +1 -0
- package/src/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.tsx +85 -0
- package/src/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.types.ts +5 -0
- package/src/features/Search/views/MultiCheckboxFacet/index.ts +1 -0
- package/src/features/Search/views/Paging/Paging.tsx +35 -0
- package/src/features/Search/views/Paging/Paging.types.ts +24 -0
- package/src/features/Search/views/Paging/index.ts +1 -0
- package/src/features/Search/views/PagingInfo/PagingInfo.tsx +34 -0
- package/src/features/Search/views/PagingInfo/PagingInfo.types.ts +26 -0
- package/src/features/Search/views/PagingInfo/index.ts +1 -0
- package/src/features/Search/views/Result/Result.tsx +84 -0
- package/src/features/Search/views/Result/Result.types.ts +47 -0
- package/src/features/Search/views/Result/index.ts +1 -0
- package/src/features/Search/views/Results/Results.tsx +16 -0
- package/src/features/Search/views/Results/Results.types.ts +24 -0
- package/src/features/Search/views/Results/index.ts +1 -0
- package/src/features/Search/views/ResultsPerPage/ResultsPerPage.tsx +32 -0
- package/src/features/Search/views/ResultsPerPage/ResultsPerPage.types.ts +26 -0
- package/src/features/Search/views/ResultsPerPage/index.ts +1 -0
- package/src/features/Search/views/SearchBox/SearchBox.tsx +51 -0
- package/src/features/Search/views/SearchBox/SearchBox.types.ts +10 -0
- package/src/features/Search/views/SearchBox/index.ts +1 -0
- package/src/features/Search/views/Sidebar/Sidebar.tsx +14 -0
- package/src/features/Search/views/Sidebar/Sidebar.types.ts +3 -0
- package/src/features/Search/views/Sidebar/index.ts +1 -0
- package/src/features/Search/views/SingleLinksFacet/SingleLinksFacet.tsx +62 -0
- package/src/features/Search/views/SingleLinksFacet/SingleLinksFacet.types.ts +5 -0
- package/src/features/Search/views/SingleLinksFacet/index.ts +1 -0
- package/src/features/Search/views/SingleSelectFacet/SingleSelectFacet.tsx +34 -0
- package/src/features/Search/views/SingleSelectFacet/SingleSelectFacet.types.ts +5 -0
- package/src/features/Search/views/SingleSelectFacet/index.ts +1 -0
- package/src/features/Search/views/Sorting/Sorting.tsx +24 -0
- package/src/features/Search/views/Sorting/Sorting.types.ts +25 -0
- package/src/features/Search/views/Sorting/index.ts +1 -0
- package/src/features/index.ts +11 -0
- package/src/forms/ForgotPasswordForm/ForgotPasswordForm.stories.tsx +19 -0
- package/src/forms/ForgotPasswordForm/ForgotPasswordForm.tsx +28 -0
- package/src/forms/ForgotPasswordForm/ForgotPasswordForm.types.ts +3 -0
- package/src/forms/ForgotPasswordForm/index.ts +1 -0
- package/src/forms/LoginForm/LoginForm.stories.tsx +67 -0
- package/src/forms/LoginForm/LoginForm.tsx +112 -0
- package/src/forms/LoginForm/LoginForm.types.ts +7 -0
- package/src/forms/LoginForm/index.ts +1 -0
- package/src/forms/ProfileForm/ProfileForm.stories.tsx +23 -0
- package/src/forms/ProfileForm/ProfileForm.tsx +40 -0
- package/src/forms/ProfileForm/ProfileForm.types.ts +6 -0
- package/src/forms/ProfileForm/index.ts +1 -0
- package/src/forms/PromoCodeForm/PromoCodeForm.stories.tsx +19 -0
- package/src/forms/PromoCodeForm/PromoCodeForm.tsx +22 -0
- package/src/forms/PromoCodeForm/PromoCodeForm.types.ts +4 -0
- package/src/forms/PromoCodeForm/index.ts +1 -0
- package/src/forms/RegisterForm/RegisterForm.stories.tsx +85 -0
- package/src/forms/RegisterForm/RegisterForm.tsx +108 -0
- package/src/forms/RegisterForm/RegisterForm.types.ts +6 -0
- package/src/forms/RegisterForm/index.ts +1 -0
- package/src/forms/ResetPasswordAuthForm/ResetPasswordAuthForm.stories.tsx +23 -0
- package/src/forms/ResetPasswordAuthForm/ResetPasswordAuthForm.tsx +39 -0
- package/src/forms/ResetPasswordAuthForm/ResetPasswordAuthForm.types.ts +3 -0
- package/src/forms/ResetPasswordAuthForm/index.ts +1 -0
- package/src/forms/ResetPasswordForm/ResetPasswordForm.stories.tsx +23 -0
- package/src/forms/ResetPasswordForm/ResetPasswordForm.tsx +30 -0
- package/src/forms/ResetPasswordForm/ResetPasswordForm.types.ts +3 -0
- package/src/forms/ResetPasswordForm/index.ts +1 -0
- package/src/forms/SubscriptionForm/SubscriptionForm.stories.tsx +31 -0
- package/src/forms/SubscriptionForm/SubscriptionForm.tsx +46 -0
- package/src/forms/SubscriptionForm/SubscriptionForm.types.ts +6 -0
- package/src/forms/SubscriptionForm/index.ts +1 -0
- package/src/forms/constants/index.ts +13 -0
- package/src/forms/index.ts +17 -0
- package/src/forms/validations/index.ts +39 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useLanguage.ts +18 -0
- package/src/hooks/useTheme.ts +6 -0
- package/src/index.ts +8 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/setupTests.ts +5 -0
- package/src/templates/AccountScreen/AccountScreen.stories.tsx +67 -0
- package/src/templates/AccountScreen/AccountScreen.tsx +78 -0
- package/src/templates/AccountScreen/AccountScreen.types.ts +31 -0
- package/src/templates/AccountScreen/index.ts +1 -0
- package/src/templates/AuthScreen/AuthScreen.stories.tsx +33 -0
- package/src/templates/AuthScreen/AuthScreen.tsx +21 -0
- package/src/templates/AuthScreen/AuthScreen.types.ts +8 -0
- package/src/templates/AuthScreen/index.ts +1 -0
- package/src/templates/CardGridScreen/CardGridScreen.stories.tsx +95 -0
- package/src/templates/CardGridScreen/CardGridScreen.tsx +43 -0
- package/src/templates/CardGridScreen/CardGridScreen.types.ts +11 -0
- package/src/templates/CardGridScreen/index.ts +1 -0
- package/src/templates/CatalogueScreen/CatalogueScreen.stories.tsx +31 -0
- package/src/templates/CatalogueScreen/CatalogueScreen.tsx +21 -0
- package/src/templates/CatalogueScreen/CatalogueScreen.types.ts +8 -0
- package/src/templates/CatalogueScreen/index.ts +1 -0
- package/src/templates/ChallengeLibraryScreen/ChallengeLibraryScreen.stories.tsx +171 -0
- package/src/templates/ChallengeLibraryScreen/ChallengeLibraryScreen.tsx +36 -0
- package/src/templates/ChallengeLibraryScreen/ChallengeLibraryScreen.types.ts +9 -0
- package/src/templates/ChallengeLibraryScreen/index.ts +1 -0
- package/src/templates/ChallengeScreen/ChallengeScreen.stories.tsx +65 -0
- package/src/templates/ChallengeScreen/ChallengeScreen.tsx +88 -0
- package/src/templates/ChallengeScreen/ChallengeScreen.types.ts +22 -0
- package/src/templates/ChallengeScreen/index.ts +1 -0
- package/src/templates/ContentScreen/ContentScreen.stories.tsx +71 -0
- package/src/templates/ContentScreen/ContentScreen.tsx +55 -0
- package/src/templates/ContentScreen/ContentScreen.types.ts +9 -0
- package/src/templates/ContentScreen/index.ts +1 -0
- package/src/templates/DashboardScreen/DashboardScreen.stories.tsx +490 -0
- package/src/templates/DashboardScreen/DashboardScreen.tsx +156 -0
- package/src/templates/DashboardScreen/DashboardScreen.types.ts +28 -0
- package/src/templates/DashboardScreen/index.ts +1 -0
- package/src/templates/FAQScreen/FAQScreen.stories.tsx +278 -0
- package/src/templates/FAQScreen/FAQScreen.tsx +32 -0
- package/src/templates/FAQScreen/FAQScreen.types.ts +14 -0
- package/src/templates/FAQScreen/index.ts +1 -0
- package/src/templates/HomeScreen/HomeScreen.stories.tsx +315 -0
- package/src/templates/HomeScreen/HomeScreen.tsx +50 -0
- package/src/templates/HomeScreen/HomeScreen.types.ts +23 -0
- package/src/templates/HomeScreen/index.ts +1 -0
- package/src/templates/LogoutScreen/LogoutScreen.stories.tsx +20 -0
- package/src/templates/LogoutScreen/LogoutScreen.tsx +25 -0
- package/src/templates/LogoutScreen/LogoutScreen.types.ts +4 -0
- package/src/templates/LogoutScreen/index.ts +1 -0
- package/src/templates/MenuScreen/MenuScreen.stories.tsx +36 -0
- package/src/templates/MenuScreen/MenuScreen.tsx +32 -0
- package/src/templates/MenuScreen/MenuScreen.types.ts +11 -0
- package/src/templates/MenuScreen/index.ts +1 -0
- package/src/templates/NotFoundScreen/NotFoundScreen.stories.tsx +20 -0
- package/src/templates/NotFoundScreen/NotFoundScreen.tsx +31 -0
- package/src/templates/NotFoundScreen/NotFoundScreen.types.ts +5 -0
- package/src/templates/NotFoundScreen/index.ts +1 -0
- package/src/templates/PasswordResetAuthScreen/PasswordResetAuthScreen.stories.tsx +27 -0
- package/src/templates/PasswordResetAuthScreen/PasswordResetAuthScreen.tsx +20 -0
- package/src/templates/PasswordResetAuthScreen/PasswordResetAuthScreen.types.ts +6 -0
- package/src/templates/PasswordResetAuthScreen/index.ts +1 -0
- package/src/templates/PasswordResetScreen/PasswordResetScreen.stories.tsx +22 -0
- package/src/templates/PasswordResetScreen/PasswordResetScreen.tsx +19 -0
- package/src/templates/PasswordResetScreen/PasswordResetScreen.types.ts +6 -0
- package/src/templates/PasswordResetScreen/index.ts +1 -0
- package/src/templates/ProfileScreen/ProfileScreen.stories.tsx +41 -0
- package/src/templates/ProfileScreen/ProfileScreen.tsx +30 -0
- package/src/templates/ProfileScreen/ProfileScreen.types.ts +24 -0
- package/src/templates/ProfileScreen/index.ts +1 -0
- package/src/templates/ScheduleScreen/ScheduleScreen.stories.tsx +174 -0
- package/src/templates/ScheduleScreen/ScheduleScreen.tsx +29 -0
- package/src/templates/ScheduleScreen/ScheduleScreen.types.ts +9 -0
- package/src/templates/ScheduleScreen/index.ts +1 -0
- package/src/templates/SubscriptionScreen/SubscriptionScreen.stories.tsx +98 -0
- package/src/templates/SubscriptionScreen/SubscriptionScreen.tsx +49 -0
- package/src/templates/SubscriptionScreen/SubscriptionScreen.types.ts +28 -0
- package/src/templates/SubscriptionScreen/index.ts +1 -0
- package/src/templates/WorkoutScreen/WorkoutScreen.stories.tsx +173 -0
- package/src/templates/WorkoutScreen/WorkoutScreen.tsx +230 -0
- package/src/templates/WorkoutScreen/WorkoutScreen.types.ts +34 -0
- package/src/templates/WorkoutScreen/index.ts +1 -0
- package/src/templates/index.ts +40 -0
- package/src/translations/en.ts +777 -0
- package/src/translations/fr.ts +182 -0
- package/src/translations/index.ts +2 -0
- package/src/utils/htmlParser/index.tsx +22 -0
- package/src/utils/index.ts +38 -0
- package/src/utils/parseDuration/index.ts +94 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { Props } from './PanelProduct.types';
|
|
4
|
+
import Image from '../Image';
|
|
5
|
+
import DisplayHeading from '../DisplayHeading';
|
|
6
|
+
import Copy from '../Copy';
|
|
7
|
+
import Link from '../Link';
|
|
8
|
+
import Container from '../Container';
|
|
9
|
+
import { SPACING } from '../Hero/Hero.types';
|
|
10
|
+
|
|
11
|
+
const PanelProduct = ({
|
|
12
|
+
testID,
|
|
13
|
+
title,
|
|
14
|
+
description,
|
|
15
|
+
image1,
|
|
16
|
+
image2,
|
|
17
|
+
iosLink = '#',
|
|
18
|
+
androidLink = '#',
|
|
19
|
+
inversed = false,
|
|
20
|
+
withBg = true,
|
|
21
|
+
spacing = SPACING.MODULE,
|
|
22
|
+
}: Props) => {
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
data-testid={testID || 'PanelFeature'}
|
|
26
|
+
className={cx('relative m-auto w-full flex flex-none flex-nowrap', spacing)}>
|
|
27
|
+
{withBg && (
|
|
28
|
+
<div className="rounded-full blur-[250px] flex flex-none aspect-square absolute -bottom-24 -right-48 w-[500px] opacity-20 bg-gradient-to-r from-primary-700 to-primary-300" />
|
|
29
|
+
)}
|
|
30
|
+
<Container>
|
|
31
|
+
<div
|
|
32
|
+
className={cx(
|
|
33
|
+
'relative flex flex-col md:flex-row flex-nowrap w-full h-full overflow-visible gap-16 border border-solid border-primary bg-tertiary-300 dark:bg-secondary rounded p-8 shadow',
|
|
34
|
+
{
|
|
35
|
+
'flex-row-reverse': inversed,
|
|
36
|
+
},
|
|
37
|
+
)}>
|
|
38
|
+
<div className="w-full md:w-1/2 top-0 relative">
|
|
39
|
+
<div className="absolute aspect-[8/17] -rotate-12 w-[135px] left-1/3 top-4 md:w-[180px] md:left-1/3 md:top-4 lg:w-[210px] lg:left-1/2 lg:top-0 xl:-top-1/4">
|
|
40
|
+
<Image src={image2} alt={title} />
|
|
41
|
+
</div>
|
|
42
|
+
<div className="relative md:absolute aspect-[8/17] -rotate-0 w-[150px] left-0 top-0 md:w-[220px] md:left-0 md:-top-6 lg:w-[250px] lg:left-1/4 lg:-top-12 xl:-top-1/3">
|
|
43
|
+
<Image src={image1} alt={title} />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div className="w-full md:w-1/2">
|
|
47
|
+
<div>
|
|
48
|
+
<DisplayHeading text={title} />
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<Copy>{description}</Copy>
|
|
52
|
+
</div>
|
|
53
|
+
<div className="flex items-center justify-start gap-4">
|
|
54
|
+
<div className="relative w-[150px] h-[50px]">
|
|
55
|
+
<Link href={iosLink} target="_blank" hideExternalIcon>
|
|
56
|
+
<Image
|
|
57
|
+
src="https://apple-resources.s3.amazonaws.com/media-badges/download-on-the-app-store/black/en-us.svg"
|
|
58
|
+
alt="App Store"
|
|
59
|
+
// fill={false}
|
|
60
|
+
// width={150}
|
|
61
|
+
// height={50}
|
|
62
|
+
/>
|
|
63
|
+
</Link>
|
|
64
|
+
</div>
|
|
65
|
+
<div className="relative w-[190px] h-[75px]">
|
|
66
|
+
<Link href={androidLink} target="_blank" hideExternalIcon>
|
|
67
|
+
<Image
|
|
68
|
+
src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
|
|
69
|
+
alt="Google Play"
|
|
70
|
+
// fill={false}
|
|
71
|
+
// width={190}
|
|
72
|
+
// height={70}
|
|
73
|
+
/>
|
|
74
|
+
</Link>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</Container>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
PanelProduct.displayName = 'PanelProduct';
|
|
85
|
+
|
|
86
|
+
export default PanelProduct;
|
|
87
|
+
export type { Props };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SPACING } from "../Hero/Hero.types";
|
|
2
|
+
|
|
3
|
+
export interface Props {
|
|
4
|
+
testID?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
image1: string;
|
|
8
|
+
image2: string;
|
|
9
|
+
iosLink: string;
|
|
10
|
+
androidLink: string;
|
|
11
|
+
inversed?: boolean;
|
|
12
|
+
withBg?: boolean;
|
|
13
|
+
spacing?: SPACING;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PanelProduct';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs';
|
|
2
|
+
import PanelScroller from '.';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof PanelScroller> = {
|
|
5
|
+
title: 'ORGANISMS/PanelScroller',
|
|
6
|
+
component: PanelScroller,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<typeof PanelScroller>;
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
cols: [
|
|
17
|
+
{
|
|
18
|
+
images: [
|
|
19
|
+
'https://picsum.photos/450/800',
|
|
20
|
+
'https://picsum.photos/450/800',
|
|
21
|
+
'https://picsum.photos/450/800',
|
|
22
|
+
'https://picsum.photos/450/800',
|
|
23
|
+
'https://picsum.photos/450/800',
|
|
24
|
+
'https://picsum.photos/450/800',
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
images: [
|
|
29
|
+
'https://picsum.photos/450/800',
|
|
30
|
+
'https://picsum.photos/450/800',
|
|
31
|
+
'https://picsum.photos/450/800',
|
|
32
|
+
'https://picsum.photos/450/800',
|
|
33
|
+
'https://picsum.photos/450/800',
|
|
34
|
+
'https://picsum.photos/450/800',
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
images: [
|
|
39
|
+
'https://picsum.photos/450/800',
|
|
40
|
+
'https://picsum.photos/450/800',
|
|
41
|
+
'https://picsum.photos/450/800',
|
|
42
|
+
'https://picsum.photos/450/800',
|
|
43
|
+
'https://picsum.photos/450/800',
|
|
44
|
+
'https://picsum.photos/450/800',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
images: [
|
|
49
|
+
'https://picsum.photos/450/800',
|
|
50
|
+
'https://picsum.photos/450/800',
|
|
51
|
+
'https://picsum.photos/450/800',
|
|
52
|
+
'https://picsum.photos/450/800',
|
|
53
|
+
'https://picsum.photos/450/800',
|
|
54
|
+
'https://picsum.photos/450/800',
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
images: [
|
|
59
|
+
'https://picsum.photos/450/800',
|
|
60
|
+
'https://picsum.photos/450/800',
|
|
61
|
+
'https://picsum.photos/450/800',
|
|
62
|
+
'https://picsum.photos/450/800',
|
|
63
|
+
'https://picsum.photos/450/800',
|
|
64
|
+
'https://picsum.photos/450/800',
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
images: [
|
|
69
|
+
'https://picsum.photos/450/800',
|
|
70
|
+
'https://picsum.photos/450/800',
|
|
71
|
+
'https://picsum.photos/450/800',
|
|
72
|
+
'https://picsum.photos/450/800',
|
|
73
|
+
'https://picsum.photos/450/800',
|
|
74
|
+
'https://picsum.photos/450/800',
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default meta;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { Props } from './PanelScroller.types';
|
|
4
|
+
import Carousel from '../Carousel';
|
|
5
|
+
import { CardVariant } from '../Card/Card.types';
|
|
6
|
+
|
|
7
|
+
const PanelScroller = ({ testID, cols }: Props) => {
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
const aspectRatioClass = 'aspect-[9/16]';
|
|
10
|
+
return (
|
|
11
|
+
<div ref={ref} data-testid={testID || 'PanelScroller'} className="relative">
|
|
12
|
+
<div
|
|
13
|
+
className={cx(
|
|
14
|
+
'grid gap-0 grid-cols-2',
|
|
15
|
+
{ 'md:grid-cols-2': cols.length === 2 },
|
|
16
|
+
{ 'md:grid-cols-3': cols.length === 3 },
|
|
17
|
+
{ 'md:grid-cols-4': cols.length === 4 },
|
|
18
|
+
{ 'md:grid-cols-5': cols.length === 5 },
|
|
19
|
+
{ 'md:grid-cols-6': cols.length === 6 },
|
|
20
|
+
)}>
|
|
21
|
+
{cols.map((col, index) => {
|
|
22
|
+
// const isOdd = index % 2 === 0;
|
|
23
|
+
return (
|
|
24
|
+
<div key={index} className="relative">
|
|
25
|
+
<Carousel
|
|
26
|
+
data={col?.images?.map((image, index) => ({
|
|
27
|
+
variant: CardVariant.BASIC,
|
|
28
|
+
data: {
|
|
29
|
+
id: `image-${index}`,
|
|
30
|
+
image: {
|
|
31
|
+
src: image,
|
|
32
|
+
alt: `Image ${index + 1}`,
|
|
33
|
+
aspectRatio: aspectRatioClass,
|
|
34
|
+
},
|
|
35
|
+
scaleOnHover: false,
|
|
36
|
+
},
|
|
37
|
+
className: aspectRatioClass,
|
|
38
|
+
}))}
|
|
39
|
+
carouselOptions={{
|
|
40
|
+
slidesPerView: { base: 1 },
|
|
41
|
+
vertical: true,
|
|
42
|
+
loop: true,
|
|
43
|
+
showArrows: false,
|
|
44
|
+
// Note: autoPlay and rtl features not yet implemented in new carousel
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
})}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
PanelScroller.displayName = 'PanelScroller';
|
|
56
|
+
|
|
57
|
+
export default PanelScroller;
|
|
58
|
+
export type { Props };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PanelScroller';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/nextjs';
|
|
3
|
+
import PanelVideo from '.';
|
|
4
|
+
import Container from '../Container';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof PanelVideo> = {
|
|
7
|
+
title: 'ORGANISMS/PanelVideo',
|
|
8
|
+
component: PanelVideo,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof PanelVideo>;
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
title: 'Elegant workouts, real results',
|
|
19
|
+
description: 'Achieve the elegance of a ballerina and the strength of an athlete with NRG at home.',
|
|
20
|
+
videoProps: {
|
|
21
|
+
sources: [
|
|
22
|
+
{
|
|
23
|
+
src: 'https://assets.nrgbarrebody.app/2022-01/VideoPanel2%20-%20HD%201080p.mp4.mp4',
|
|
24
|
+
type: 'video/mp4',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
options: {
|
|
28
|
+
aspectRatio: undefined,
|
|
29
|
+
},
|
|
30
|
+
aspectRatioValue: '16/7',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
render: (props) => {
|
|
34
|
+
return (
|
|
35
|
+
<Container isFlush>
|
|
36
|
+
<PanelVideo {...props} />
|
|
37
|
+
</Container>
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default meta;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import cx from 'classnames';
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import { Props } from './PanelVideo.types';
|
|
4
|
+
import Video from '../Video';
|
|
5
|
+
import Copy from '../Copy';
|
|
6
|
+
import { SPACING } from '../Hero/Hero.types';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import DisplayHeading from '../DisplayHeading';
|
|
9
|
+
|
|
10
|
+
const PanelVideo = ({
|
|
11
|
+
testID,
|
|
12
|
+
className,
|
|
13
|
+
title,
|
|
14
|
+
description,
|
|
15
|
+
spacing = SPACING.NONE,
|
|
16
|
+
videoProps,
|
|
17
|
+
}: Props) => {
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
data-testid={testID || '"PanelVideo"'}
|
|
21
|
+
className={twMerge(
|
|
22
|
+
cx('relative w-full overflow-hidden', `md:aspect-[${videoProps.aspectRatioValue}]`, spacing, className),
|
|
23
|
+
)}>
|
|
24
|
+
<Video
|
|
25
|
+
rounded={false}
|
|
26
|
+
className="xl:max-h-[750px]"
|
|
27
|
+
aspectRatioValue={videoProps.aspectRatioValue}
|
|
28
|
+
options={{
|
|
29
|
+
autoplay: true,
|
|
30
|
+
muted: true,
|
|
31
|
+
controls: false,
|
|
32
|
+
loop: true,
|
|
33
|
+
playsinline: true,
|
|
34
|
+
preferFullWindow: false,
|
|
35
|
+
...videoProps?.options,
|
|
36
|
+
}}
|
|
37
|
+
sources={videoProps?.sources}
|
|
38
|
+
/>
|
|
39
|
+
<div className="absolute top-0 left-0 w-full h-full z-10">
|
|
40
|
+
<div className="absolute top-0 left-0 w-full h-full bg-gradient-to-r from-black to-black md:from-transparent md:to-black opacity-50" />
|
|
41
|
+
<div className="absolute top-0 right-2 lg:right-4 w-full md:w-3/4 h-full flex flex-col items-end justify-center text-white pt-8 lg:pt-0 text-right">
|
|
42
|
+
{title && (
|
|
43
|
+
<motion.div
|
|
44
|
+
initial={{
|
|
45
|
+
transform: 'translateX(25px)',
|
|
46
|
+
}}
|
|
47
|
+
animate={{
|
|
48
|
+
transform: 'none',
|
|
49
|
+
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
50
|
+
}}
|
|
51
|
+
transition={{ duration: 0.5 }}>
|
|
52
|
+
<div>
|
|
53
|
+
<DisplayHeading text={title} colorOverride="text-white before:bg-white border-white" />
|
|
54
|
+
</div>
|
|
55
|
+
</motion.div>
|
|
56
|
+
)}
|
|
57
|
+
{description && (
|
|
58
|
+
<motion.div
|
|
59
|
+
initial={{
|
|
60
|
+
transform: 'translateX(25px)',
|
|
61
|
+
}}
|
|
62
|
+
animate={{
|
|
63
|
+
transform: 'none',
|
|
64
|
+
transition: { damping: 60, delay: 0, mass: 1.2, stiffness: 300, type: 'spring' },
|
|
65
|
+
}}
|
|
66
|
+
transition={{ duration: 0.5 }}>
|
|
67
|
+
<div>
|
|
68
|
+
<Copy>{description}</Copy>
|
|
69
|
+
</div>
|
|
70
|
+
</motion.div>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
PanelVideo.displayName = 'PanelVideo';
|
|
79
|
+
|
|
80
|
+
export default PanelVideo;
|
|
81
|
+
export type { Props };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SPACING } from '../Hero/Hero.types';
|
|
2
|
+
import { Props as videoProps } from '../Video/Video.types';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
testID?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
spacing?: SPACING;
|
|
10
|
+
videoProps: videoProps;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PanelVideo';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs';
|
|
2
|
+
import Radio from '.';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Radio> = {
|
|
5
|
+
title: 'ATOMS/Radio',
|
|
6
|
+
component: Radio,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Story = StoryObj<typeof Radio>;
|
|
10
|
+
|
|
11
|
+
export const Default: Story = {};
|
|
12
|
+
|
|
13
|
+
Default.args = {
|
|
14
|
+
id: 'id',
|
|
15
|
+
label: 'My Radio Label',
|
|
16
|
+
name: 'example-options',
|
|
17
|
+
options: [
|
|
18
|
+
{ value: 'value-1', label: 'Option one' },
|
|
19
|
+
{ value: 'value-2', label: 'Option two' },
|
|
20
|
+
{ value: 'value-3', label: 'Option three' },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { Props } from './Radio.types';
|
|
4
|
+
import Icon from '../Icon';
|
|
5
|
+
|
|
6
|
+
const Radio = React.forwardRef(function MyInput({ name, required, className, options, ...rest }: Props, ref: any) {
|
|
7
|
+
return (
|
|
8
|
+
<div data-testid="Radio" className={cx('flex items-center', className)}>
|
|
9
|
+
<div className={cx('flex flex-col gap-2', className)}>
|
|
10
|
+
{options?.map((option) => {
|
|
11
|
+
const value = option?.value?.toString() || undefined;
|
|
12
|
+
return (
|
|
13
|
+
<div key={value} className="flex items-center relative">
|
|
14
|
+
<div className="relative flex items-center">
|
|
15
|
+
<input
|
|
16
|
+
ref={ref}
|
|
17
|
+
name={name}
|
|
18
|
+
type="radio"
|
|
19
|
+
required={required}
|
|
20
|
+
className="form-item radio peer appearance-none m-0 p-0 w-4 h-4"
|
|
21
|
+
{...rest}
|
|
22
|
+
// Prevent controller overriding radio values.
|
|
23
|
+
id={value}
|
|
24
|
+
value={value}
|
|
25
|
+
/>
|
|
26
|
+
<div className="form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none">
|
|
27
|
+
<Icon name="mdi:circle" size={12} />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<label className="label pl-2 leading-none" htmlFor={value}>
|
|
31
|
+
{option.label}
|
|
32
|
+
</label>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
})}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
Radio.displayName = 'Radio';
|
|
42
|
+
|
|
43
|
+
export default Radio;
|
|
44
|
+
export type { Props };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OptionsType } from '../FormSelect/FormSelect.types';
|
|
2
|
+
|
|
3
|
+
export interface Props {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
label?: string | React.ReactNode[];
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
//options?: { value: string; label: string }[];
|
|
12
|
+
options?: Array<OptionsType>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Radio';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs';
|
|
2
|
+
import Schedule from '.';
|
|
3
|
+
import { ESSchedule, formatSchedule } from '@techstuff-dev/foundation-api-utils';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Schedule> = {
|
|
6
|
+
title: 'ORGANISMS/Schedule',
|
|
7
|
+
component: Schedule,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type Story = StoryObj<typeof Schedule>;
|
|
11
|
+
|
|
12
|
+
const exampleData = [
|
|
13
|
+
{
|
|
14
|
+
_index: 'prod-schedule_cloud',
|
|
15
|
+
_id: 'entity:node/773:en',
|
|
16
|
+
_score: null,
|
|
17
|
+
_source: {
|
|
18
|
+
created: [1670150946],
|
|
19
|
+
friday_end: [1760681700],
|
|
20
|
+
friday_live: ['https://youtube.com/live/cEtZzyfKokk?feature=share'],
|
|
21
|
+
friday_start: [1760679900],
|
|
22
|
+
friday_title: ['Barre Floor 30min'],
|
|
23
|
+
friday_video: [
|
|
24
|
+
'https://assets.nrgbarrebody.app/2025-09/NRG%20Live%20-%20Barre%20Floor%20Express%20%5BA93Nyi7YqjM%5D.mp4',
|
|
25
|
+
],
|
|
26
|
+
langcode: ['en'],
|
|
27
|
+
monday_end: [1760337000],
|
|
28
|
+
monday_start: [1760334300],
|
|
29
|
+
monday_title: ['3 x 15 legs / booty / arms'],
|
|
30
|
+
monday_video: ['https://assets.nrgbarrebody.app/2025-10/NRG%20Live%20-%203x15%20Legs_%20Booty%20_Arms.mp4'],
|
|
31
|
+
saturday_end: [1760197500],
|
|
32
|
+
saturday_live: ['https://www.youtube.com/live/ChezUgSC9dI'],
|
|
33
|
+
saturday_start: [1760194800],
|
|
34
|
+
saturday_title: ['No Class'],
|
|
35
|
+
saturday_video: [
|
|
36
|
+
'https://assets.nrgbarrebody.app/2025-09/NRG%20Live%20-%203%20x15%20Legs%E2%A7%B8Arms%20%E2%A7%B8Core%20%5BChezUgSC9dI%5D.mp4',
|
|
37
|
+
],
|
|
38
|
+
sunday_end: [1760283900],
|
|
39
|
+
sunday_live: ['https://youtube.com/live/q87MFtoRJeM?feature=share'],
|
|
40
|
+
sunday_start: [1760281200],
|
|
41
|
+
sunday_title: ['No Class'],
|
|
42
|
+
sunday_video: ['https://assets.nrgbarrebody.app/2025-09/STRONG%20YOU%20-%20STRETCH%20%5Bq87MFtoRJeM%5D.mp4'],
|
|
43
|
+
thursday_end: [1760595300],
|
|
44
|
+
thursday_live: ['https://youtube.com/live/B9pbo2wY3no?feature=share'],
|
|
45
|
+
thursday_start: [1760593500],
|
|
46
|
+
thursday_title: ['Legs and Abs with the Pilates ball'],
|
|
47
|
+
thursday_video: [
|
|
48
|
+
'https://assets.nrgbarrebody.app/2025-09/NRG%20Live%20-%20Sideline%20Sculpt%20%5Bg9IKnc7CCzQ%5D.mp4',
|
|
49
|
+
],
|
|
50
|
+
tuesday_end: [1760422500],
|
|
51
|
+
tuesday_start: [1760420700],
|
|
52
|
+
tuesday_title: ['Special hamstrings & glutes 30'],
|
|
53
|
+
tuesday_video: [
|
|
54
|
+
'https://assets.nrgbarrebody.app/2025-10/NRG%20Live%20-%20Hamstrings%20and%20Booty%2030_0.mp4',
|
|
55
|
+
],
|
|
56
|
+
updated: [1760679615],
|
|
57
|
+
uuid: ['816ba984-e6b9-4171-84bd-f3fa7e418f26'],
|
|
58
|
+
wednesday_end: [1760509800],
|
|
59
|
+
wednesday_live: ['https://youtube.com/live/ZR1mjzHENRQ?feature=share'],
|
|
60
|
+
wednesday_start: [1760507100],
|
|
61
|
+
wednesday_title: ['Signature barre'],
|
|
62
|
+
wednesday_video: [
|
|
63
|
+
'https://assets.nrgbarrebody.app/2025-09/NRG%20Live%20-%203x15mn%20Legs%20%E2%A7%B8Arms%20%E2%A7%B8Stretch%20%5B46wjyKeG5LY%5D.mp4',
|
|
64
|
+
],
|
|
65
|
+
search_api_id: ['entity:node/773:en'],
|
|
66
|
+
search_api_datasource: ['entity:node'],
|
|
67
|
+
search_api_language: ['en'],
|
|
68
|
+
},
|
|
69
|
+
sort: [1670150946000],
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
const formattedSchedule = formatSchedule(exampleData as ESSchedule[])[0];
|
|
74
|
+
|
|
75
|
+
export const Default: Story = {
|
|
76
|
+
args: {
|
|
77
|
+
raised: false,
|
|
78
|
+
scheduleItems: formattedSchedule,
|
|
79
|
+
},
|
|
80
|
+
render: args => {
|
|
81
|
+
return <Schedule {...args} />;
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const HasAccess: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
raised: false,
|
|
88
|
+
scheduleItems: formattedSchedule,
|
|
89
|
+
hasAccess: true,
|
|
90
|
+
},
|
|
91
|
+
render: args => {
|
|
92
|
+
return <Schedule {...args} />;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default meta;
|