@oaknational/oak-components 2.45.1 → 3.1.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/dist/npm/cjs/index.js +7949 -0
- package/dist/{types.d.ts → npm/cjs/types.d.ts} +2 -16
- package/dist/npm/es/animation/usePrefersReducedMotion.js +16 -0
- package/dist/npm/es/components/OakGlobalStyle/OakGlobalStyle.js +14 -0
- package/dist/npm/es/components/OakThemeProvider/OakThemeProvider.js +14 -0
- package/dist/npm/es/components/buttons/OakButtonWithDropdown/OakButtonWithDropdown.js +105 -0
- package/dist/npm/es/components/buttons/OakCloseButton/OakCloseButton.js +18 -0
- package/dist/npm/es/components/buttons/OakLeftAlignedButton/OakLeftAlignedButton.js +57 -0
- package/dist/npm/es/components/buttons/OakPrimaryButton/OakPrimaryButton.js +23 -0
- package/dist/npm/es/components/buttons/OakPrimaryInvertedButton/OakPrimaryInvertedButton.js +23 -0
- package/dist/npm/es/components/buttons/OakSecondaryButton/OakSecondaryButton.js +23 -0
- package/dist/npm/es/components/buttons/OakSecondaryButtonWithDropdown/OakSecondaryButtonWithDropdown.js +20 -0
- package/dist/npm/es/components/buttons/OakSmallPrimaryButton/OakSmallPrimaryButton.js +23 -0
- package/dist/npm/es/components/buttons/OakSmallPrimaryInvertedButton/OakSmallPrimaryInvertedButton.js +23 -0
- package/dist/npm/es/components/buttons/OakSmallSecondaryButton/OakSmallSecondaryButton.js +23 -0
- package/dist/npm/es/components/buttons/OakSmallSecondaryButtonWithDropdown/OakSmallSecondaryButtonWithDropdown.js +20 -0
- package/dist/npm/es/components/buttons/OakSmallSecondaryToggleButton/OakSmallSecondaryToggleButton.js +37 -0
- package/dist/npm/es/components/buttons/OakSmallTertiaryInvertedButton/OakSmallTertiaryInvertedButton.js +23 -0
- package/dist/npm/es/components/buttons/OakTertiaryButton/OakTertiaryButton.js +14 -0
- package/dist/npm/es/components/buttons/OakTertiaryInvertedButton/OakTertiaryInvertedButton.js +14 -0
- package/dist/npm/es/components/cookies/OakCookieBanner/OakCookieBanner.js +62 -0
- package/dist/npm/es/components/cookies/OakCookieConsent/OakCookieConsent.js +17 -0
- package/dist/npm/es/components/cookies/OakCookieConsentProvider/OakCookieConsentProvider.js +103 -0
- package/dist/npm/es/components/cookies/OakCookieConsentProvider/cookieConsentReducer.js +32 -0
- package/dist/npm/es/components/cookies/OakCookieSettingsModal/OakCookieSettingsModal.js +91 -0
- package/dist/npm/es/components/form-elements/OakButtonAsRadioGroup/OakButtonAsRadioGroup.js +44 -0
- package/dist/npm/es/components/form-elements/OakCheckBox/OakCheckBox.js +71 -0
- package/dist/npm/es/components/form-elements/OakFieldError/OakFieldError.js +25 -0
- package/dist/npm/es/components/form-elements/OakFieldset/OakFieldset.js +12 -0
- package/dist/npm/es/components/form-elements/OakForm/OakForm.js +16 -0
- package/dist/npm/es/components/form-elements/OakFormInput/OakFormInput.js +26 -0
- package/dist/npm/es/components/form-elements/OakJauntyAngleLabel/OakJauntyAngleLabel.js +10 -0
- package/dist/npm/es/components/form-elements/OakLabel/OakLabel.js +15 -0
- package/dist/npm/es/components/form-elements/OakMultilineText/OakMultilineText.js +96 -0
- package/dist/npm/es/components/form-elements/OakRadioAsButton/OakRadioAsButton.js +96 -0
- package/dist/npm/es/components/form-elements/OakRadioButton/OakRadioButton.js +31 -0
- package/dist/npm/es/components/form-elements/OakRadioGroup/OakRadioGroup.js +44 -0
- package/dist/npm/es/components/form-elements/OakSearchFilterCheckBox/OakSearchFilterCheckBox.js +64 -0
- package/dist/npm/es/components/form-elements/OakSecondaryButtonAsRadio/OakSecondaryButtonAsRadio.js +25 -0
- package/dist/npm/es/components/form-elements/OakSelect/NativeLegend.js +9 -0
- package/dist/npm/es/components/form-elements/OakSelect/NativeOptGroup.js +7 -0
- package/dist/npm/es/components/form-elements/OakSelect/NativeOption.js +22 -0
- package/dist/npm/es/components/form-elements/OakSelect/NativeSelect.js +23 -0
- package/dist/npm/es/components/form-elements/OakSelect/OakOptGroup.js +12 -0
- package/dist/npm/es/components/form-elements/OakSelect/OakOption.js +12 -0
- package/dist/npm/es/components/form-elements/OakSelect/OakSelect.js +44 -0
- package/dist/npm/es/components/form-elements/OakTextArea/OakTextArea.js +23 -0
- package/dist/npm/es/components/form-elements/OakTextInput/OakTextInput.js +59 -0
- package/dist/npm/es/components/house-cat/OakCaptionCard/OakCaptionCard.js +81 -0
- package/dist/npm/es/components/house-cat/OakCaptionSearch/OakCaptionSearch.js +24 -0
- package/dist/npm/es/components/house-cat/utils.js +33 -0
- package/dist/npm/es/components/images-and-icons/OakAspectRatio/OakAspectRatio.js +39 -0
- package/dist/npm/es/components/images-and-icons/OakIcon/OakIcon.js +38 -0
- package/dist/npm/es/components/images-and-icons/OakImage/OakImage.js +51 -0
- package/dist/npm/es/components/images-and-icons/OakImage/useShowPlaceholder.js +29 -0
- package/dist/npm/es/components/images-and-icons/OakRoundIcon/OakRoundIcon.js +17 -0
- package/dist/npm/es/components/images-and-icons/OakSvg/OakSvg.js +47 -0
- package/dist/npm/es/components/internal-components/InternalAccordion/InternalAccordion.js +36 -0
- package/dist/npm/es/components/internal-components/InternalAccordion/InternalAccordionProvider.js +24 -0
- package/dist/npm/es/components/internal-components/InternalAccordion/useAccordionContext.js +12 -0
- package/dist/npm/es/components/internal-components/InternalButton/InternalButton.js +48 -0
- package/dist/npm/es/components/internal-components/InternalCard/InternalCard.js +19 -0
- package/dist/npm/es/components/internal-components/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement.js +22 -0
- package/dist/npm/es/components/internal-components/InternalCheckBox/InternalCheckBox.js +82 -0
- package/dist/npm/es/components/internal-components/InternalCheckBoxLabel/InternalCheckBoxLabel.js +16 -0
- package/dist/npm/es/components/internal-components/InternalCheckBoxWrapper/InternalCheckBoxWrapper.js +24 -0
- package/dist/npm/es/components/internal-components/InternalChevronAccordion/InternalChevronAccordion.js +83 -0
- package/dist/npm/es/components/internal-components/InternalClientPortal/InternalClientPortal.js +13 -0
- package/dist/npm/es/components/internal-components/InternalDndContext/InternalDndContext.js +28 -0
- package/dist/npm/es/components/internal-components/InternalLink/InternalLink.js +54 -0
- package/dist/npm/es/components/internal-components/InternalModalTransition/InternalModalTransition.js +31 -0
- package/dist/npm/es/components/internal-components/InternalRadio/InternalRadio.js +82 -0
- package/dist/npm/es/components/internal-components/InternalRadioWrapper/InternalRadioWrapper.js +36 -0
- package/dist/npm/es/components/internal-components/InternalReviewAccordion/InternalReviewAccordion.js +38 -0
- package/dist/npm/es/components/internal-components/InternalShadowIconButton/InternalShadowIconButton.js +56 -0
- package/dist/npm/es/components/internal-components/InternalShadowRectButton/InternalShadowRectButton.js +56 -0
- package/dist/npm/es/components/internal-components/InternalShadowRoundButton/InternalShadowRoundButton.js +56 -0
- package/dist/npm/es/components/internal-components/InternalSlideInFlex/InternalSlideInFlex.js +30 -0
- package/dist/npm/es/components/internal-components/InternalStyledSvg/InternalStyledSvg.js +14 -0
- package/dist/npm/es/components/internal-components/InternalTextInput/InternalTextInput.js +50 -0
- package/dist/npm/es/components/internal-components/InternalTooltip/InternalTooltip.js +36 -0
- package/dist/npm/es/components/layout-and-structure/OakAccordion/OakAccordion.js +39 -0
- package/dist/npm/es/components/layout-and-structure/OakBasicAccordion/OakBasicAccordion.js +10 -0
- package/dist/npm/es/components/layout-and-structure/OakBox/OakBox.js +41 -0
- package/dist/npm/es/components/layout-and-structure/OakCollapsibleContent/OakCollapsibleContent.js +23 -0
- package/dist/npm/es/components/layout-and-structure/OakFlex/OakFlex.js +18 -0
- package/dist/npm/es/components/layout-and-structure/OakGrid/OakGrid.js +16 -0
- package/dist/npm/es/components/layout-and-structure/OakGridArea/OakGridArea.js +51 -0
- package/dist/npm/es/components/layout-and-structure/OakMaxWidth/OakMaxWidth.js +23 -0
- package/dist/npm/es/components/messaging-and-feedback/OakFocusIndicator/OakFocusIndicator.js +38 -0
- package/dist/npm/es/components/messaging-and-feedback/OakHandDrawnFocusUnderline/OakHandDrawnFocusUnderline.js +22 -0
- package/dist/npm/es/components/messaging-and-feedback/OakHandDrawnFocusUnderline/SubHandDrawnFocusUnderline.js +17 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModal.js +41 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModalBody.js +14 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModalFooter.js +16 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInlineBanner/OakInlineBanner.js +129 -0
- package/dist/npm/es/components/messaging-and-feedback/OakKbd/OakKbd.js +12 -0
- package/dist/npm/es/components/messaging-and-feedback/OakLoadingSpinner/OakLoadingSpinner.js +34 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModalCenter/OakModalCenter.js +106 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModalCenter/OakModalCenterBody.js +36 -0
- package/dist/npm/es/components/messaging-and-feedback/OakScreenReader/OakScreenReader.js +15 -0
- package/dist/npm/es/components/messaging-and-feedback/OakTagFunctional/OakTagFunctional.js +18 -0
- package/dist/npm/es/components/messaging-and-feedback/OakToast/OakToast.js +96 -0
- package/dist/npm/es/components/messaging-and-feedback/OakTooltip/OakTooltip.js +122 -0
- package/dist/npm/es/components/navigation/OakAnchorTarget/OakAnchorTarget.js +20 -0
- package/dist/npm/es/components/navigation/OakBreadcrumbs/OakBreadcrumbs.js +46 -0
- package/dist/npm/es/components/navigation/OakCard/OakCard.js +64 -0
- package/dist/npm/es/components/navigation/OakHoverLink/OakHoverLink.js +23 -0
- package/dist/npm/es/components/navigation/OakLink/OakLink.js +17 -0
- package/dist/npm/es/components/navigation/OakLink/config.js +18 -0
- package/dist/npm/es/components/navigation/OakPagination/OakPagination.js +106 -0
- package/dist/npm/es/components/navigation/OakPagination/utils.js +19 -0
- package/dist/npm/es/components/navigation/OakPrimaryNav/OakPrimaryNav.js +22 -0
- package/dist/npm/es/components/navigation/OakPrimaryNavItem/OakPrimaryNavItem.js +23 -0
- package/dist/npm/es/components/navigation/OakSecondaryLink/OakSecondaryLink.js +25 -0
- package/dist/npm/es/components/navigation/OakTabs/OakTabs.js +47 -0
- package/dist/npm/es/components/owa/OakBackLink/OakBackLink.js +28 -0
- package/dist/npm/es/components/owa/OakBulletList/OakBulletList.js +17 -0
- package/dist/npm/es/components/owa/OakCardWithHandDrawnBorder/OakCardWithHandDrawnBorder.js +17 -0
- package/dist/npm/es/components/owa/OakCloudinaryImage/OakCloudinaryImage.js +35 -0
- package/dist/npm/es/components/owa/OakCloudinaryImage/cloudinary.js +17 -0
- package/dist/npm/es/components/owa/OakCodeRenderer/OakCodeRenderer.js +135 -0
- package/dist/npm/es/components/owa/OakCopyLinkButton/OakCopyLinkButton.js +42 -0
- package/dist/npm/es/components/owa/OakDownloadCard/OakDownloadCard.js +72 -0
- package/dist/npm/es/components/owa/OakDownloadsJourneyChildSubjectTierSelector/OakDownloadsJourneyChildSubjectTierSelector.js +54 -0
- package/dist/npm/es/components/owa/OakDragAndDropInstructions/OakDragAndDropInstructions.js +41 -0
- package/dist/npm/es/components/owa/OakDraggable/OakDraggable.js +30 -0
- package/dist/npm/es/components/owa/OakDraggableFeedback/OakDraggableFeedback.js +13 -0
- package/dist/npm/es/components/owa/OakDroppable/OakDroppable.js +45 -0
- package/dist/npm/es/components/owa/OakFilterDrawer/OakFilterDrawer.js +43 -0
- package/dist/npm/es/components/owa/OakFormInputWithLabels/OakFormInputWithLabels.js +18 -0
- package/dist/npm/es/components/owa/OakHandDrawnCard/OakHandDrawnCard.js +17 -0
- package/dist/npm/es/components/owa/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.js +15 -0
- package/dist/npm/es/components/owa/OakHandDrawnHR/HandDrawnHRSvg.js +11 -0
- package/dist/npm/es/components/owa/OakHandDrawnHR/OakHandDrawnHR.js +22 -0
- package/dist/npm/es/components/owa/OakHeaderHero/OakHeaderHero.js +45 -0
- package/dist/npm/es/components/owa/OakHomepageTabButton/OakHomepageTabButton.js +35 -0
- package/dist/npm/es/components/owa/OakInfo/OakInfo.js +22 -0
- package/dist/npm/es/components/owa/OakInfoButton/OakInfoButton.js +20 -0
- package/dist/npm/es/components/owa/OakLessonInfoCard/OakLessonInfoCard.js +33 -0
- package/dist/npm/es/components/owa/OakLinkCard/OakLinkCard.js +42 -0
- package/dist/npm/es/components/owa/OakListItem/OakListItem.js +93 -0
- package/dist/npm/es/components/owa/OakMediaClip/OakMediaClip.js +90 -0
- package/dist/npm/es/components/owa/OakMediaClipList/OakMediaClipList.js +26 -0
- package/dist/npm/es/components/owa/OakMediaClipListAccordion/OakMediaClipListAccordion.js +29 -0
- package/dist/npm/es/components/owa/OakMediaClipStackListItem/OakMediaClipStackListItem.js +41 -0
- package/dist/npm/es/components/owa/OakOutlineAccordion/OakOutlineAccordion.js +21 -0
- package/dist/npm/es/components/owa/OakPromoTag/OakPromoTag.js +22 -0
- package/dist/npm/es/components/owa/OakRadioTile/OakRadioTile.js +40 -0
- package/dist/npm/es/components/owa/OakSaveCount/OakSaveCount.js +33 -0
- package/dist/npm/es/components/owa/OakScaleImageButton/OakScaleImageButton.js +19 -0
- package/dist/npm/es/components/owa/OakSideMenuNav/OakSideMenuNav.js +24 -0
- package/dist/npm/es/components/owa/OakSideMenuNavLink/OakSideMenuNavLink.js +48 -0
- package/dist/npm/es/components/owa/OakSignLanguageButton/OakSignLanguageButton.js +23 -0
- package/dist/npm/es/components/owa/OakSubjectIcon/OakSubjectIcon.js +20 -0
- package/dist/npm/es/components/owa/OakSubjectIconButton/OakSubjectIconButton.js +44 -0
- package/dist/npm/es/components/owa/OakTimer/OakTimer.js +26 -0
- package/dist/npm/es/components/owa/OakVideoTranscript/OakVideoTranscript.js +32 -0
- package/dist/npm/es/components/owa/pupil/OakUnitListItem/OakUnitListItem.js +63 -0
- package/dist/npm/es/components/owa/pupil/OakUnitListOptionalityItem/OakUnitListOptionalityItem.js +57 -0
- package/dist/npm/es/components/owa/pupil/OakUnitListOptionalityItemCard/OakUnitListOptionalityItemCard.js +36 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyContentGuidance/OakPupilJourneyContentGuidance.js +44 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyHeader/OakPupilJourneyHeader.js +29 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyLayout/OakPupilJourneyLayout.js +62 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyList/OakPupilJourneyList.js +46 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyListCounter/OakPupilJourneyListCounter.js +12 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyListItem/OakPupilJourneyListItem.js +45 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyListItemSubheading/OakPupilJourneyListItemSubheading.js +20 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyOptionalityButton/OakPupilJourneyOptionalityButton.js +35 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyOptionalityItem/OakPupilJourneyOptionalityItem.js +23 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyProgrammeOptions/OakPupilJourneyProgrammeOptions.js +27 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyUnitsFilter/OakPupilJourneyUnitsFilter.js +42 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyYearButton/OakPupilJourneyYearButton.js +31 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonBottomNav/OakLessonBottomNav.js +34 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonLayout/OakLessonLayout.js +153 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonNavItem/OakLessonNavItem.js +167 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonReviewIntroVideo/OakPupilLessonReviewIntroVideo.js +30 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonReviewItem/OakPupilLessonReviewItem.js +106 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonReviewQuiz/OakPupilLessonReviewQuiz.js +56 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonTopNav/OakLessonTopNav.js +58 -0
- package/dist/npm/es/components/owa/pupil/lesson/OakLessonVideoTranscript/OakLessonVideoTranscript.js +27 -0
- package/dist/npm/es/components/owa/pupil/quiz/InternalDroppableHoldingPen/InternalDroppableHoldingPen.js +60 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakHintButton/OakHintButton.js +27 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizCheckBox/OakQuizCheckBox.js +58 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizCounter/OakQuizCounter.js +33 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizFeedback/OakQuizFeedback.js +31 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizHint/OakQuizHint.js +28 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizMatch/OakQuizMatch.js +121 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizOrder/OakQuizOrder.js +88 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizPrintableHeader/OakQuizPrintableHeader.js +29 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizPrintableSubHeader/OakQuizPrintableSubHeader.js +28 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizRadioButton/OakQuizRadioButton.js +78 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizResultItem/OakQuizResultItem.js +70 -0
- package/dist/npm/es/components/owa/pupil/quiz/OakQuizTextInput/OakQuizTextInput.js +28 -0
- package/dist/npm/es/components/owa/teacher/OakDownloadsAccordion/OakDownloadsAccordion.js +56 -0
- package/dist/npm/es/components/owa/teacher/OakInlineRegistrationBanner/OakInlineRegistrationBanner.js +62 -0
- package/dist/npm/es/components/owa/teacher/OakInlineRegistrationBanner/SurfingStudentSVG.js +15 -0
- package/dist/npm/es/components/owa/teacher/OakTeacherNotesInline/OakTeacherNotesInline.js +16 -0
- package/dist/npm/es/components/owa/teacher/OakTeacherNotesModal/OakTeacherNotesModal.js +72 -0
- package/dist/npm/es/components/owa/teacher/OakTertiaryOLNav/OakTertiaryOLNav.js +34 -0
- package/dist/npm/es/components/presentational/OakCarousel/OakCarousel.js +39 -0
- package/dist/npm/es/components/presentational/OakCarousel/SubCarouselPositionControl.js +12 -0
- package/dist/npm/es/components/presentational/OakCarousel/SubCarouselPositionIndicator.js +17 -0
- package/dist/npm/es/components/presentational/OakQuote/OakQuote.js +34 -0
- package/dist/npm/es/components/typography/OakHeading/OakHeading.js +33 -0
- package/dist/npm/es/components/typography/OakLI/OakLI.js +23 -0
- package/dist/npm/es/components/typography/OakOL/OakOL.js +22 -0
- package/dist/npm/es/components/typography/OakP/OakP.js +17 -0
- package/dist/npm/es/components/typography/OakSpan/OakSpan.js +18 -0
- package/dist/npm/es/components/typography/OakTypography/OakTypography.js +16 -0
- package/dist/npm/es/components/typography/OakUL/OakUL.js +19 -0
- package/dist/npm/es/components/unstyled/UnstyledChevronAccordion/UnstyledChevronAccordion.js +55 -0
- package/dist/npm/es/hooks/useBreakpoint.js +38 -0
- package/dist/npm/es/hooks/useIsScrolled.js +30 -0
- package/dist/npm/es/hooks/useMediaQuery.js +20 -0
- package/dist/npm/es/hooks/useMounted.js +12 -0
- package/dist/npm/es/image-map.js +205 -0
- package/dist/npm/es/index.js +196 -0
- package/dist/npm/es/styles/global/oak.styles.js +17 -0
- package/dist/npm/es/styles/global/reset.styles.js +11 -0
- package/dist/npm/es/styles/helpers/getFontSize.js +9 -0
- package/dist/npm/es/styles/helpers/getInternalPadding.js +15 -0
- package/dist/npm/es/styles/helpers/parseBorder.js +13 -0
- package/dist/npm/es/styles/helpers/parseBorderRadius.js +13 -0
- package/dist/npm/es/styles/helpers/parseBorderWidth.js +15 -0
- package/dist/npm/es/styles/helpers/parseColor.js +19 -0
- package/dist/npm/es/styles/helpers/parseColorFilter.js +19 -0
- package/dist/npm/es/styles/helpers/parseDropShadow.js +15 -0
- package/dist/npm/es/styles/helpers/parseOpacity.js +12 -0
- package/dist/npm/es/styles/helpers/parseSpacing.js +29 -0
- package/dist/npm/es/styles/helpers/parseTransitions.js +12 -0
- package/dist/npm/es/styles/helpers/parseTypography.js +36 -0
- package/dist/npm/es/styles/helpers/parseZIndex.js +13 -0
- package/dist/npm/es/styles/helpers/pxToRem.js +7 -0
- package/dist/npm/es/styles/helpers/truthy.js +13 -0
- package/dist/npm/es/styles/theme/borders.js +22 -0
- package/dist/npm/es/styles/theme/color.js +207 -0
- package/dist/npm/es/styles/theme/dark.theme.js +99 -0
- package/dist/npm/es/styles/theme/default.theme.js +99 -0
- package/dist/npm/es/styles/theme/dropShadow.js +13 -0
- package/dist/npm/es/styles/theme/opacity.js +8 -0
- package/dist/npm/es/styles/theme/spacing.js +48 -0
- package/dist/npm/es/styles/theme/transitions.js +6 -0
- package/dist/npm/es/styles/theme/typography.js +73 -0
- package/dist/npm/es/styles/theme/zIndex.js +17 -0
- package/dist/npm/es/styles/utils/borderStyle.js +27 -0
- package/dist/npm/es/styles/utils/colorFilterStyle.js +9 -0
- package/dist/npm/es/styles/utils/colorStyle.js +9 -0
- package/dist/npm/es/styles/utils/displayStyle.js +8 -0
- package/dist/npm/es/styles/utils/dropShadowStyle.js +9 -0
- package/dist/npm/es/styles/utils/flexStyle.js +9 -0
- package/dist/npm/es/styles/utils/listStyle.js +8 -0
- package/dist/npm/es/styles/utils/opacityStyle.js +9 -0
- package/dist/npm/es/styles/utils/positionStyle.js +9 -0
- package/dist/npm/es/styles/utils/responsiveStyle.js +69 -0
- package/dist/npm/es/styles/utils/scrollSnapStyle.js +11 -0
- package/dist/npm/es/styles/utils/sizeStyle.js +9 -0
- package/dist/npm/es/styles/utils/spacingStyle.js +25 -0
- package/dist/npm/es/styles/utils/transformStyle.js +8 -0
- package/dist/npm/es/styles/utils/transitionStyle.js +9 -0
- package/dist/npm/es/styles/utils/typographyStyle.js +9 -0
- package/dist/npm/es/styles/utils/zIndexStyle.js +9 -0
- package/dist/npm/es/svgs/button-border-bottom.js +6 -0
- package/dist/npm/es/svgs/button-border-left.js +6 -0
- package/dist/npm/es/svgs/button-border-right.js +6 -0
- package/dist/npm/es/svgs/button-border-top.js +6 -0
- package/dist/npm/es/svgs/header-underline.js +6 -0
- package/dist/npm/es/svgs/horizontal-rule.js +6 -0
- package/dist/npm/es/svgs/icon-background.js +6 -0
- package/dist/npm/es/svgs/scribble.js +11 -0
- package/dist/npm/es/svgs/underline-3.js +6 -0
- package/dist/npm/es/svgs/underline.js +6 -0
- package/dist/npm/es/test-helpers/colorConversion.js +14 -0
- package/dist/npm/es/test-helpers/mockIntersectionObserver.js +50 -0
- package/dist/npm/es/test-helpers/mockResizeObserver.js +25 -0
- package/dist/npm/es/types.d.ts +5249 -0
- package/package.json +28 -12
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -1
- package/dist/esm/index.js +0 -15
- package/dist/esm/index.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { __spreadArray, __read, __makeTemplateObject, __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { colorStyle } from '../../../styles/utils/colorStyle.js';
|
|
5
|
+
import { marginStyle } from '../../../styles/utils/spacingStyle.js';
|
|
6
|
+
import { opacityStyle } from '../../../styles/utils/opacityStyle.js';
|
|
7
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
8
|
+
|
|
9
|
+
var oakHeadingTagsConst = [
|
|
10
|
+
"div",
|
|
11
|
+
"h1",
|
|
12
|
+
"h2",
|
|
13
|
+
"h3",
|
|
14
|
+
"h4",
|
|
15
|
+
"h5",
|
|
16
|
+
"h6",
|
|
17
|
+
];
|
|
18
|
+
var oakHeadingTags = __spreadArray([], __read(oakHeadingTagsConst), false);
|
|
19
|
+
var HeadingTagComponent = function (props) {
|
|
20
|
+
var tag = props.tag, ariaLabel = props.ariaLabel, ariaHidden = props.ariaHidden, otherProps = __rest(props, ["tag", "ariaLabel", "ariaHidden"]);
|
|
21
|
+
var Tag = tag;
|
|
22
|
+
return (React.createElement(Tag, __assign({}, otherProps, { "aria-label": ariaLabel, "aria-hidden": ariaHidden })));
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* OakHeading can be one of the following style tags dependant on its role: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6".
|
|
27
|
+
* Use the controls to view different font styles.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
var OakHeading = styled(HeadingTagComponent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), typographyStyle, marginStyle, colorStyle, opacityStyle);
|
|
31
|
+
var templateObject_1;
|
|
32
|
+
|
|
33
|
+
export { HeadingTagComponent, OakHeading, oakHeadingTags };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { oakBoxCss } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
4
|
+
import { displayStyle } from '../../../styles/utils/displayStyle.js';
|
|
5
|
+
import { listStyle } from '../../../styles/utils/listStyle.js';
|
|
6
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
7
|
+
import { flexStyle } from '../../../styles/utils/flexStyle.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Styled `li` (list item) component.
|
|
11
|
+
*
|
|
12
|
+
* ## Usage
|
|
13
|
+
*
|
|
14
|
+
* Places where we directly want to style a list item
|
|
15
|
+
*
|
|
16
|
+
**/
|
|
17
|
+
var oakLIDefaults = {
|
|
18
|
+
$display: "revert",
|
|
19
|
+
};
|
|
20
|
+
var OakLI = styled.li.attrs(function (props) { return (__assign(__assign({}, oakLIDefaults), props)); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n // FIXME - Flex props will only work when display is set to flex, can we conditionally apply this + props above ?\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n // FIXME - Flex props will only work when display is set to flex, can we conditionally apply this + props above ?\n ", "\n"])), oakBoxCss, typographyStyle, listStyle, displayStyle, flexStyle);
|
|
21
|
+
var templateObject_1;
|
|
22
|
+
|
|
23
|
+
export { OakLI, oakLIDefaults };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { colorStyle } from '../../../styles/utils/colorStyle.js';
|
|
4
|
+
import { marginStyle } from '../../../styles/utils/spacingStyle.js';
|
|
5
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Styled `ol` (ordered list) component.
|
|
9
|
+
*
|
|
10
|
+
* ## Usage
|
|
11
|
+
*
|
|
12
|
+
* Use where we have an ordered list to ensure numbers are styled
|
|
13
|
+
*
|
|
14
|
+
* */
|
|
15
|
+
var OakOL = styled.ol(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ", ";\n }\n ", "\n ", "\n ", "\n"], ["\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ", ";\n }\n ", "\n ", "\n ", "\n"])), function (props) {
|
|
16
|
+
return props.theme &&
|
|
17
|
+
props.theme.uiColors &&
|
|
18
|
+
props.theme.uiColors["text-link-active"];
|
|
19
|
+
}, marginStyle, colorStyle, typographyStyle);
|
|
20
|
+
var templateObject_1;
|
|
21
|
+
|
|
22
|
+
export { OakOL };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { colorStyle } from '../../../styles/utils/colorStyle.js';
|
|
4
|
+
import { marginStyle } from '../../../styles/utils/spacingStyle.js';
|
|
5
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Styled `p` (paragraph) component.
|
|
9
|
+
* ## Usage
|
|
10
|
+
* In general, using a `p` as a descendant of `<Body>` should suffice.
|
|
11
|
+
* However, if you want different styles for a particular paragraph,
|
|
12
|
+
* you can use this component to apply additional styles.
|
|
13
|
+
*/
|
|
14
|
+
var OakP = styled.p(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n"])), typographyStyle, colorStyle, marginStyle);
|
|
15
|
+
var templateObject_1;
|
|
16
|
+
|
|
17
|
+
export { OakP };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { colorStyle } from '../../../styles/utils/colorStyle.js';
|
|
4
|
+
import { opacityStyle } from '../../../styles/utils/opacityStyle.js';
|
|
5
|
+
import { marginStyle, paddingStyle } from '../../../styles/utils/spacingStyle.js';
|
|
6
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
7
|
+
import { borderStyle } from '../../../styles/utils/borderStyle.js';
|
|
8
|
+
import { positionStyle } from '../../../styles/utils/positionStyle.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Span renders a `span` (inline text) component, exposing all the typography props.
|
|
12
|
+
* ## Usage
|
|
13
|
+
* Use this component when you want to apply styles to a piece of inline text.
|
|
14
|
+
*/
|
|
15
|
+
var OakSpan = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), colorStyle, opacityStyle, marginStyle, paddingStyle, borderStyle, typographyStyle, positionStyle);
|
|
16
|
+
var templateObject_1;
|
|
17
|
+
|
|
18
|
+
export { OakSpan };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { typographyStyle } from '../../../styles/utils/typographyStyle.js';
|
|
4
|
+
import { OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Typography component sets a typography style context from which children
|
|
8
|
+
* inherit style properties through the cascade.
|
|
9
|
+
* ## Usage
|
|
10
|
+
* This should be the primary component to set a typography context.
|
|
11
|
+
* Use this component whenever you want to style blocks of 'body' text.
|
|
12
|
+
*/
|
|
13
|
+
var OakTypography = styled(OakBox)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), typographyStyle);
|
|
14
|
+
var templateObject_1;
|
|
15
|
+
|
|
16
|
+
export { OakTypography };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __makeTemplateObject } from 'tslib';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { oakFlexCss } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
4
|
+
import { oakBoxCss } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Styled `ul` (unordered list) component.
|
|
8
|
+
*
|
|
9
|
+
* ## Usage
|
|
10
|
+
*
|
|
11
|
+
* Resets browser spacing and other styles, accepts BoxProps' style props.
|
|
12
|
+
*
|
|
13
|
+
* */
|
|
14
|
+
var OakUL = styled.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n margin: 0;\n display: block;\n ", "\n ", "\n"], ["\n ", "\n margin: 0;\n display: block;\n ", "\n ", "\n"])), function (props) {
|
|
15
|
+
return props.$reset && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n list-style: none;\n padding: 0;\n "], ["\n list-style: none;\n padding: 0;\n "])));
|
|
16
|
+
}, oakBoxCss, function (props) { return props.$display && oakFlexCss; });
|
|
17
|
+
var templateObject_1, templateObject_2;
|
|
18
|
+
|
|
19
|
+
export { OakUL };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __makeTemplateObject, __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { oakBoxCss, OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
5
|
+
import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
6
|
+
import { OakIcon } from '../../images-and-icons/OakIcon/OakIcon.js';
|
|
7
|
+
import { InternalAccordionButton, InternalAccordionContent } from '../../internal-components/InternalAccordion/InternalAccordion.js';
|
|
8
|
+
import useAccordionContext from '../../internal-components/InternalAccordion/useAccordionContext.js';
|
|
9
|
+
import { accordionContext, InternalAccordionProvider } from '../../internal-components/InternalAccordion/InternalAccordionProvider.js';
|
|
10
|
+
import { flexStyle } from '../../../styles/utils/flexStyle.js';
|
|
11
|
+
import { parseDropShadow } from '../../../styles/helpers/parseDropShadow.js';
|
|
12
|
+
import { parseColorFilter } from '../../../styles/helpers/parseColorFilter.js';
|
|
13
|
+
|
|
14
|
+
var StyledAccordionButton = styled(InternalAccordionButton)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n &:hover {\n .chevron-icon {\n filter: ", ";\n }\n }\n &:focus-visible {\n .focus-outline {\n box-shadow:\n ", ",\n ", ";\n }\n }\n"], ["\n ", "\n ", "\n &:hover {\n .chevron-icon {\n filter: ", ";\n }\n }\n &:focus-visible {\n .focus-outline {\n box-shadow:\n ", ",\n ", ";\n }\n }\n"])), flexStyle, oakBoxCss, parseColorFilter("icon-subdued"), parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"));
|
|
15
|
+
/**
|
|
16
|
+
* An accordion component that can be used to show/hide content.
|
|
17
|
+
*/
|
|
18
|
+
var Accordion = function (_a) {
|
|
19
|
+
var header = _a.header, content = _a.content, id = _a.id, subheader = _a.subheader, _b = _a.ariaLabelOpen, ariaLabelOpen = _b === void 0 ? "Close accordion" : _b, _c = _a.ariaLabelClose, ariaLabelClose = _c === void 0 ? "Open accordion" : _c, styleProps = __rest(_a, ["header", "content", "id", "subheader", "ariaLabelOpen", "ariaLabelClose"]);
|
|
20
|
+
var isOpen = useAccordionContext().isOpen;
|
|
21
|
+
return (React.createElement(OakFlex, __assign({ "$flexDirection": "column", "$pt": "spacing-40", "$pb": "spacing-40" }, styleProps),
|
|
22
|
+
React.createElement(OakFlex, { "$justifyContent": "space-between", "$alignItems": "center" },
|
|
23
|
+
header,
|
|
24
|
+
React.createElement(OakBox, null,
|
|
25
|
+
React.createElement(StyledAccordionButton, { id: id, "aria-label": isOpen ? ariaLabelOpen : ariaLabelClose },
|
|
26
|
+
React.createElement(OakBox, { className: "focus-outline", "$borderRadius": "border-radius-s", "$mr": "spacing-12" },
|
|
27
|
+
React.createElement(OakIcon, { className: "chevron-icon", iconName: "chevron-down", "$width": "spacing-32", "$height": "spacing-32", alt: "An arrow to indicate whether the item is open or closed", style: {
|
|
28
|
+
transform: isOpen ? "rotate(180deg)" : "none",
|
|
29
|
+
transition: "all 0.3s ease 0s",
|
|
30
|
+
} }))))),
|
|
31
|
+
subheader,
|
|
32
|
+
React.createElement(InternalAccordionContent, { "$position": "relative", "$overflow": "auto", "aria-labelledby": id }, content)));
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* - UnstyledChevronAccordion has a chevron icon that rotates when the accordion is open.
|
|
36
|
+
* - Unlike InternalChevronAccordion, it has no border effects for hover or focus states.
|
|
37
|
+
* - Only the chevron is interactive so as to allow interactive elements to be placed in the header.
|
|
38
|
+
* - The intention is for these to be added by consuming components as needed.
|
|
39
|
+
* - Can be used as an uncontrolled component (via `isInitiallyOpen`) or as a
|
|
40
|
+
* controlled component (via `isOpen` + `onOpenChange`).
|
|
41
|
+
*/
|
|
42
|
+
var UnstyledChevronAccordion = function (props) {
|
|
43
|
+
// Is the accordion being used as a controlled component?
|
|
44
|
+
if (props.isOpen !== undefined) {
|
|
45
|
+
var isOpen = props.isOpen, onOpenChange = props.onOpenChange, accordionProps_1 = __rest(props, ["isOpen", "onOpenChange"]);
|
|
46
|
+
return (React.createElement(accordionContext.Provider, { value: { isOpen: isOpen, setOpen: onOpenChange } },
|
|
47
|
+
React.createElement(Accordion, __assign({}, accordionProps_1))));
|
|
48
|
+
}
|
|
49
|
+
var _a = props.isInitiallyOpen, isInitiallyOpen = _a === void 0 ? false : _a, accordionProps = __rest(props, ["isInitiallyOpen"]);
|
|
50
|
+
return (React.createElement(InternalAccordionProvider, { isInitialOpen: isInitiallyOpen },
|
|
51
|
+
React.createElement(Accordion, __assign({}, accordionProps))));
|
|
52
|
+
};
|
|
53
|
+
var templateObject_1;
|
|
54
|
+
|
|
55
|
+
export { UnstyledChevronAccordion };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __read } from 'tslib';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { getMediaQuery } from '../styles/utils/responsiveStyle.js';
|
|
4
|
+
|
|
5
|
+
function getMediaQueries() {
|
|
6
|
+
var mediaDesktop = globalThis.matchMedia(getMediaQuery("desktop"));
|
|
7
|
+
var mediaTablet = globalThis.matchMedia(getMediaQuery("tablet"));
|
|
8
|
+
return { mediaDesktop: mediaDesktop, mediaTablet: mediaTablet };
|
|
9
|
+
}
|
|
10
|
+
function matchBreakpoint(_a) {
|
|
11
|
+
var mediaDesktop = _a.mediaDesktop, mediaTablet = _a.mediaTablet;
|
|
12
|
+
if (mediaDesktop.matches) {
|
|
13
|
+
return "desktop";
|
|
14
|
+
}
|
|
15
|
+
else if (mediaTablet.matches) {
|
|
16
|
+
return "tablet";
|
|
17
|
+
}
|
|
18
|
+
return "mobile";
|
|
19
|
+
}
|
|
20
|
+
var useBreakpoint = function () {
|
|
21
|
+
var _a = __read(useState(function () {
|
|
22
|
+
if (globalThis) {
|
|
23
|
+
return matchBreakpoint(getMediaQueries());
|
|
24
|
+
}
|
|
25
|
+
return "desktop";
|
|
26
|
+
}), 2), value = _a[0], setValue = _a[1];
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
var queries = getMediaQueries();
|
|
29
|
+
var listener = function () { return setValue(matchBreakpoint(queries)); };
|
|
30
|
+
globalThis.addEventListener("resize", listener);
|
|
31
|
+
return function () {
|
|
32
|
+
globalThis.removeEventListener("resize", listener);
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useBreakpoint };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __read } from 'tslib';
|
|
2
|
+
import React, { useState, useCallback, useLayoutEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
var useIsScrolled = function () {
|
|
5
|
+
var _a = __read(useState(false), 2), isScrolled = _a[0], setIsScrolled = _a[1];
|
|
6
|
+
var _b = __read(useState(null), 2), canaryElement = _b[0], setCanaryElement = _b[1];
|
|
7
|
+
var ObserveScroll = useCallback(function (_a) {
|
|
8
|
+
var children = _a.children;
|
|
9
|
+
return (React.createElement(React.Fragment, null,
|
|
10
|
+
React.createElement("div", { ref: setCanaryElement }),
|
|
11
|
+
children));
|
|
12
|
+
}, []);
|
|
13
|
+
useLayoutEffect(function () {
|
|
14
|
+
if (!canaryElement) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
var observer = new IntersectionObserver(function (mutations) {
|
|
18
|
+
setIsScrolled(!mutations.some(function (mutation) { return mutation.isIntersecting; }));
|
|
19
|
+
}, {
|
|
20
|
+
root: canaryElement.parentElement,
|
|
21
|
+
});
|
|
22
|
+
observer.observe(canaryElement);
|
|
23
|
+
return function () {
|
|
24
|
+
observer.disconnect();
|
|
25
|
+
};
|
|
26
|
+
}, [canaryElement]);
|
|
27
|
+
return { isScrolled: isScrolled, ObserveScroll: ObserveScroll };
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { useIsScrolled };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __read } from 'tslib';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { getMediaQuery } from '../styles/utils/responsiveStyle.js';
|
|
4
|
+
|
|
5
|
+
var useMediaQuery = function (device) {
|
|
6
|
+
var _a = __read(useState(false), 2), matches = _a[0], setMatches = _a[1];
|
|
7
|
+
var query = getMediaQuery(device);
|
|
8
|
+
useEffect(function () {
|
|
9
|
+
var media = globalThis.matchMedia(query);
|
|
10
|
+
if (media.matches !== matches) {
|
|
11
|
+
setMatches(media.matches);
|
|
12
|
+
}
|
|
13
|
+
var listener = function () { return setMatches(media.matches); };
|
|
14
|
+
globalThis.addEventListener("resize", listener);
|
|
15
|
+
return function () { return globalThis.removeEventListener("resize", listener); };
|
|
16
|
+
}, [matches, query]);
|
|
17
|
+
return matches;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { useMediaQuery };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __read } from 'tslib';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
var useMounted = function () {
|
|
5
|
+
var _a = __read(useState(false), 2), isMounted = _a[0], setIsMounted = _a[1];
|
|
6
|
+
useEffect(function () {
|
|
7
|
+
setIsMounted(true);
|
|
8
|
+
}, []);
|
|
9
|
+
return isMounted;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { useMounted };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
// the values of the icons object are the paths to the versioned images in the Cloudinary
|
|
2
|
+
var icons = {
|
|
3
|
+
// icons
|
|
4
|
+
"question-mark": "v1706872277/icons/question-mark.svg",
|
|
5
|
+
ai: "v1754063273/icons/ai_cqaksa.svg",
|
|
6
|
+
"ai-additional-material": "v1756224441/icons/AI_additional_material_oopjax.svg",
|
|
7
|
+
"ai-quiz": "v1756224440/icons/AI_quiz_eivb2s.svg",
|
|
8
|
+
"ai-slide-deck": "v1756224440/icons/Ai_slidedeck_xuo49n.svg",
|
|
9
|
+
"ai-worksheet": "v1756224441/icons/AI_worksheet_cm4f0q.svg",
|
|
10
|
+
"ai-teaching-resources": "v1779438987/icons/ai-teaching-resources.svg",
|
|
11
|
+
home: "v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg",
|
|
12
|
+
send: "v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg",
|
|
13
|
+
rocket: "v1699894015/icons/u26xm5hteot875ozfnk9.svg",
|
|
14
|
+
edit: "v1699894149/icons/qxlunbg5tfrdherzsvlt.svg",
|
|
15
|
+
expand: "v1730982187/Icon_Expand_arrktl.svg",
|
|
16
|
+
minimise: "v1730982213/Icon_Minimise_btcdbz.svg",
|
|
17
|
+
hamburger: "v1699895123/icons/jaqdnomtbhqvjcap962u.svg",
|
|
18
|
+
cross: "v1699895179/icons/xigimrbivcaxt4omxamp.svg",
|
|
19
|
+
copy: "v1727861316/icons/Icon_Copy_qxgynv.svg",
|
|
20
|
+
bell: "v1699895207/icons/ecejtvqerx81prxyxh9b.svg",
|
|
21
|
+
twitter: "v1699895251/icons/bq6a50xtkvnzhltfggzz.svg",
|
|
22
|
+
x: "v1748452854/icons/x_fpmv5f.svg",
|
|
23
|
+
worksheet: "v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg",
|
|
24
|
+
facebook: "v1699895330/icons/iojlvh3o5lshy2jupyph.svg",
|
|
25
|
+
share: "v1699895363/icons/agcmduftef3wcla6gzec.svg",
|
|
26
|
+
"arrow-right": "v1707149070/icons/fv0z57zerrioft52dd9n.svg",
|
|
27
|
+
"arrow-down": "v1699954152/icons/wpfmbmwpyfinipg0d61y.svg",
|
|
28
|
+
"arrow-left": "v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg",
|
|
29
|
+
"arrow-up": "v1699954152/icons/arrow-up.svg",
|
|
30
|
+
"worksheet-3": "v1699895429/icons/bzhojpjxp9rukdvh7daz.svg",
|
|
31
|
+
"chevron-right": "v1707752509/icons/vk9xxxhnsltsickom6q9.svg",
|
|
32
|
+
save: "v1699895505/icons/rh1ahwwtbemvz0ihluew.svg",
|
|
33
|
+
success: "v1699895534/icons/Icon-Success_aiiprx.svg",
|
|
34
|
+
error: "v1699895534/icons/Icon-Error_r25aza.svg",
|
|
35
|
+
filter: "v1727783280/icons/Icon_Filter_eitb2p.svg",
|
|
36
|
+
"quiz-3": "v1699895534/icons/zoayhgtrotv32fad7d3k.svg",
|
|
37
|
+
"chevron-down": "v1699953557/icons/botfld6brychmttwtv6u.svg",
|
|
38
|
+
linkedin: "v1699953592/icons/leqneklorqqzb1zo6rf1.svg",
|
|
39
|
+
"magic-carpet": "v1699953622/icons/jifivg9xxm7sb0fjdilm.svg",
|
|
40
|
+
books: "v1699953657/icons/hz4l3iq6i68kazvkvorq.svg",
|
|
41
|
+
"supervision-level": "v1699953696/icons/cwqhknapp3maa4g0t3lj.svg",
|
|
42
|
+
"quiz-white": "v1699953730/icons/gpcehpgr9mqoumsa25xe.svg",
|
|
43
|
+
"additional-material": "v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg",
|
|
44
|
+
"slide-deck-3": "v1699953830/icons/sm92moja9d5utu3cj16c.svg",
|
|
45
|
+
"sign-language": "v1699953861/icons/ns94ozvozzi22enxkx0x.svg",
|
|
46
|
+
external: "v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg",
|
|
47
|
+
"equipment-required": "v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg",
|
|
48
|
+
"chevron-left": "v1707752509/icons/rbvzan0ozubmr4j0uqdn.svg",
|
|
49
|
+
download: "v1699953991/icons/dk0f6a6hdpzxftjosngn.svg",
|
|
50
|
+
search: "v1704901279/icons/canbi3fuz5fanzom2hvi.svg",
|
|
51
|
+
"chevron-up": "v1699954058/icons/pay71thmhhylj7z28sj1.svg",
|
|
52
|
+
go: "v1699954090/icons/vdzptyvmitylra8x4usy.svg",
|
|
53
|
+
copyright: "v1699954118/icons/boiod3rflocgsnfokyo8.svg",
|
|
54
|
+
project: "v1699954186/icons/zofq5pheud6spnwjpewk.svg",
|
|
55
|
+
"slide-deck": "v1699954241/icons/sjjy5f3g4eciwcuxxr33.svg",
|
|
56
|
+
"content-guidance": "v1699954277/icons/tm3uhcqenaznq4fxys7j.svg",
|
|
57
|
+
tick: "v1699954310/icons/efd3esaor6zqk7seh6kt.svg",
|
|
58
|
+
instagram: "v1699954343/icons/ayfeljric0kkimdymvva.svg",
|
|
59
|
+
dot: "v1699954371/icons/knykdclphkm8lgff4u2g.svg",
|
|
60
|
+
warning: "v1704901279/icons/zzszodmk7fvxm9xzzg9s.svg",
|
|
61
|
+
"lightbulb-yellow": "v1705078631/icons/q2v4sqxouy1ngcajoavv.svg",
|
|
62
|
+
lightbulb: "v1705078631/icons/zldisxmbff36z68rwcef.svg",
|
|
63
|
+
pencil: "v1765890807/icons/pencil.svg",
|
|
64
|
+
quiz: "v1705416077/icons/kaaizjcudy0jfgfrrdel.svg",
|
|
65
|
+
video: "v1705416078/icons/wzey1zfxrvv3apeebbf5.svg",
|
|
66
|
+
intro: "v1705662092/icons/pl7bnmb13txese9yxkjv.svg",
|
|
67
|
+
loopdown: "v1699887218/ui-graphics/loopdown.svg",
|
|
68
|
+
"teacher-lesson": "v1714060653/icons/teacher-lesson.svg",
|
|
69
|
+
"teacher-unit": "v1714060657/icons/teacher-unit.svg",
|
|
70
|
+
"move-arrows": "v1709052869/icons/hoddjsgpzkszgvnmn91q.svg",
|
|
71
|
+
info: "v1709052869/icons/Icon_Info_vsx3xi.svg",
|
|
72
|
+
play: "v1732099511/icons/g1xehzuhjnb0xeftmdno.svg",
|
|
73
|
+
"bookmark-outlined": "v1734519491/icons/bookmark-outlined_rxe5v0.svg",
|
|
74
|
+
"bookmark-filled": "v1734519491/icons/bookmark-filled_jz828n.svg",
|
|
75
|
+
"microsoft-teams": "v1736429692/microsoft-teams_gelfmi.svg",
|
|
76
|
+
"google-classroom": "v1736429692/google-classroom_pedfpd.svg",
|
|
77
|
+
clipboard: "v1749031463/icons/clipboard_yll2yj.svg",
|
|
78
|
+
"book-steps": "v1749034739/icons/book-steps_qwku6h.svg",
|
|
79
|
+
"free-tag": "v1749033815/icons/free-tag_lijptf.svg",
|
|
80
|
+
threads: "v1749034800/icons/threads_sqlqoe.svg",
|
|
81
|
+
spreadsheet: "v1754386968/icons/spreadsheet_rsndeb.svg",
|
|
82
|
+
"curriculum-plan": "v1754386969/icons/curriculum-plan_qygyuo.svg",
|
|
83
|
+
data: "v1763393164/icons/data-illustration_ukwdxg.svg",
|
|
84
|
+
chatting: "v1763393163/icons/chatting-illustration_l52zaf.svg",
|
|
85
|
+
"snack-break": "v1763393167/icons/snackbreak_illustration_fguw7l.svg",
|
|
86
|
+
"class-grouping": "v1776785621/icons/class-grouping.svg",
|
|
87
|
+
strand: "v1776850533/icons/strand.svg",
|
|
88
|
+
plus: "v1781533362/icons/plus.svg",
|
|
89
|
+
// subject icons
|
|
90
|
+
"subject-art": "v1706616347/subject-icons/art.svg",
|
|
91
|
+
"subject-biology": "v1706616415/subject-icons/biology.svg",
|
|
92
|
+
"subject-chemistry": "v1706616415/subject-icons/chemistry.svg",
|
|
93
|
+
"subject-citizenship": "v1706616415/subject-icons/citizenship.svg",
|
|
94
|
+
"subject-gcse-citizenship": "v1706616415/subject-icons/citizenship.svg",
|
|
95
|
+
"subject-core-citizenship": "v1706616415/subject-icons/citizenship.svg",
|
|
96
|
+
"subject-combined-science": "v1734523570/subject-icons/science.svg",
|
|
97
|
+
"subject-communication-and-language": "v1706616415/subject-icons/communication-and-language.svg",
|
|
98
|
+
"subject-computing": "v1729171080/subject-icons/computing.svg",
|
|
99
|
+
"subject-computer-science": "v1729171080/subject-icons/computing.svg",
|
|
100
|
+
"subject-core-computing": "v1729171080/subject-icons/computing.svg",
|
|
101
|
+
"subject-cooking-nutrition": "v1734523014/subject-icons/cooking-nutrition.svg",
|
|
102
|
+
"subject-computing-non-gcse": "v1729171080/subject-icons/computing.svg",
|
|
103
|
+
"subject-creative-arts": "v1706616415/subject-icons/creative-arts.svg",
|
|
104
|
+
"subject-design-technology": "v1706616417/subject-icons/design-technology.svg",
|
|
105
|
+
"subject-digital-literacy": "v1729171080/subject-icons/computing.svg",
|
|
106
|
+
"subject-drama": "v1706616417/subject-icons/drama.svg",
|
|
107
|
+
"subject-english": "v1706616417/subject-icons/english.svg",
|
|
108
|
+
"subject-english-language": "v1706616419/subject-icons/language.svg",
|
|
109
|
+
"subject-english-grammar": "v1706616417/subject-icons/english-grammar.svg",
|
|
110
|
+
"subject-english-handwriting": "v1706616419/subject-icons/handwriting.svg",
|
|
111
|
+
"subject-english-reading-for-pleasure": "v1706616421/subject-icons/literature.svg",
|
|
112
|
+
"subject-english-spelling": "v1706616417/subject-icons/english-spelling.svg",
|
|
113
|
+
"subject-english-reading-writing-oracy": "v1706616424/subject-icons/reading-writing-oracy.svg",
|
|
114
|
+
"subject-english-vocabulary": "v1706616425/subject-icons/vocabulary.svg",
|
|
115
|
+
"subject-expressive-arts-and-design": "v1706616415/subject-icons/creative-arts.svg",
|
|
116
|
+
"subject-financial-education": "v1729171111/subject-icons/finance.svg",
|
|
117
|
+
"subject-french": "v1729171111/subject-icons/french.svg",
|
|
118
|
+
"subject-geography": "v1734523108/subject-icons/geography.svg",
|
|
119
|
+
"subject-german": "v1734523165/subject-icons/german.svg",
|
|
120
|
+
"subject-history": "v1728568980/subject-icons/history.svg",
|
|
121
|
+
"subject-independent-living": "v1706616419/subject-icons/independent-living.svg",
|
|
122
|
+
"subject-latin": "v1706616420/subject-icons/latin.svg",
|
|
123
|
+
"subject-literacy": "v1706616417/subject-icons/english.svg",
|
|
124
|
+
"subject-maths": "v1706616421/subject-icons/maths.svg",
|
|
125
|
+
"subject-music": "v1728570203/subject-icons/music-hollow.svg",
|
|
126
|
+
"subject-numeracy": "v1706616422/subject-icons/numeracy.svg",
|
|
127
|
+
"occupational-therapy": "v1706616424/subject-icons/therapy.svg",
|
|
128
|
+
"subject-personal-social-and-emotional-development": "v1706616423/subject-icons/rshe-pshe.svg",
|
|
129
|
+
"subject-physical-development": "v1706616422/subject-icons/physical-development.svg",
|
|
130
|
+
"subject-physical-education": "v1728568932/subject-icons/physical-education.svg",
|
|
131
|
+
"subject-core-physical-education": "v1728568932/subject-icons/physical-education.svg",
|
|
132
|
+
"subject-gcse-physical-education": "v1728568932/subject-icons/physical-education.svg",
|
|
133
|
+
"subject-physical-therapy": "v1706632882/subject-icons/physical-therapy.svg",
|
|
134
|
+
"subject-physics": "v1728568898/subject-icons/physics.svg",
|
|
135
|
+
"subject-religious-education": "v1706616425/subject-icons/religious-education.svg",
|
|
136
|
+
"subject-core-religious-education": "v1706616425/subject-icons/religious-education.svg",
|
|
137
|
+
"subject-gcse-religious-education": "v1706616425/subject-icons/religious-education.svg",
|
|
138
|
+
"subject-rshe-pshe": "v1706616423/subject-icons/rshe-pshe.svg",
|
|
139
|
+
"subject-rshe": "v1706616423/subject-icons/rshe-pshe.svg",
|
|
140
|
+
"subject-rule-of-law": "v1706616415/subject-icons/citizenship.svg",
|
|
141
|
+
"subject-philosophy": "v1741794495/subject-icons/philosophy.svg",
|
|
142
|
+
"subject-social-science": "v1741794495/subject-icons/social-science.svg",
|
|
143
|
+
"subject-theology": "v1741794496/subject-icons/theology.svg",
|
|
144
|
+
"subject-science": "v1734523570/subject-icons/science.svg",
|
|
145
|
+
"subject-sensory-integration": "v1706626743/subject-icons/sensory-integration.svg",
|
|
146
|
+
"subject-spanish": "v1729171166/subject-icons/spanish.svg",
|
|
147
|
+
"subject-speech-and-language-therapy": "v1706632882/subject-icons/speech-and-language.svg",
|
|
148
|
+
"subject-specialist": "v1706616415/subject-icons/communication-and-language.svg",
|
|
149
|
+
"subject-therapy": "v1706616424/subject-icons/therapy.svg",
|
|
150
|
+
"subject-therapies": "v1706616424/subject-icons/therapy.svg",
|
|
151
|
+
"subject-occupational-therapy": "v1706616424/subject-icons/therapy.svg",
|
|
152
|
+
"subject-understanding-the-world": "v1706616425/subject-icons/understanding-the-world.svg",
|
|
153
|
+
swimming: "v1728649514/subject-icons/swimming.svg",
|
|
154
|
+
// homepage icons
|
|
155
|
+
"homepage-robot-waving": "v1734523528/homepage/robot_waving_malpc3.svg",
|
|
156
|
+
"homepage-three-pupils": "v1734523221/homepage/image-students_g0jtxe.svg",
|
|
157
|
+
"homepage-teacher": "v1734523680/homepage/teacher-carrying-stuff_gab2ec.svg",
|
|
158
|
+
"homepage-teacher-map": "v1734523721/homepage/teacher-reading-map_glwhyh.svg",
|
|
159
|
+
// teacher journey icons
|
|
160
|
+
"audio-clip-large": "v1731950937/teacher-journey/audio_clip.svg",
|
|
161
|
+
"audio-clip-small": "v1731951210/teacher-journey/audio_clip_small.svg",
|
|
162
|
+
// OWA UI Graphics
|
|
163
|
+
"box-border-bottom": "v1734537219/OWA/ui-graphics/box-border-bottom_oa1riy.svg",
|
|
164
|
+
"box-border-left": "v1734537223/OWA/ui-graphics/box-border-left_eqgplm.svg",
|
|
165
|
+
"box-border-right": "v1734537228/OWA/ui-graphics/box-border-right_unznsm.svg",
|
|
166
|
+
"box-border-top": "v1734537228/OWA/ui-graphics/box-border-right_unznsm.svg",
|
|
167
|
+
"bubble-1": "v1734537172/OWA/ui-graphics/bubble-1_nhgg0w.svg",
|
|
168
|
+
"bubble-2": "v1734537180/OWA/ui-graphics/bubble-2_mfms6f.svg",
|
|
169
|
+
burst: "v1734537152/OWA/ui-graphics/burst_k0mkht.svg",
|
|
170
|
+
confetti: "v1763546694/ui-graphics/confetti-background_xbvfrc.svg",
|
|
171
|
+
"header-underline": "v1734536947/OWA/ui-graphics/header-underline_ejbffz.svg",
|
|
172
|
+
"icon-background-square": "v1734537276/OWA/ui-graphics/icon-background-square_qajipb.svg",
|
|
173
|
+
"looping-arrow-1": "v1734537133/OWA/ui-graphics/looping-arrow-1_zizllb.svg",
|
|
174
|
+
"looping-line-1": "v1734536929/OWA/ui-graphics/looping-line-1_krbrht.svg",
|
|
175
|
+
"looping-line-2": "v1734536933/OWA/ui-graphics/looping-line-2_sdinei.svg",
|
|
176
|
+
"looping-line-3": "v1734537015/OWA/ui-graphics/looping-line-3_b8dque.svg",
|
|
177
|
+
"looping-line-4": "v1734537039/OWA/ui-graphics/looping-line-4_xtjj4r.svg",
|
|
178
|
+
"looping-line-5": "v1740665310/OWA/ui-graphics/looping-line-5_vdknco.svg",
|
|
179
|
+
"speech-bubble": "v1734537300/OWA/ui-graphics/speech-bubble_magqjf.svg",
|
|
180
|
+
"tag-promotional": "v1734537244/OWA/ui-graphics/tag-promotional_v4p3oa.svg",
|
|
181
|
+
"tick-mark-happiness": "v1734537080/OWA/ui-graphics/tick-mark-happiness_fyst07.svg",
|
|
182
|
+
"underline-1": "v1734537060/OWA/ui-graphics/underline-1_zaegqi.svg",
|
|
183
|
+
image: "v1763680546/icons/Icon_Image_uatq6d.svg",
|
|
184
|
+
logo: "v1711468346/logo-mark.svg",
|
|
185
|
+
trash: "v1764692488/icons/icon_delete_edzcua.svg",
|
|
186
|
+
list: "v1774882349/icons/List.svg",
|
|
187
|
+
"media-clips": "v1774884267/icons/media-clips_nw3zpt.svg",
|
|
188
|
+
retake: "v1775141914/icons/retake-icon_xgqxzv.svg",
|
|
189
|
+
globe: "v1776851811/icons/globe.svg",
|
|
190
|
+
};
|
|
191
|
+
var backgrounds = {
|
|
192
|
+
"confetti-pink": "v1734522868/pupil-journey/confetti-pink.svg",
|
|
193
|
+
"confetti-lavender": "v1734519662/pupil-journey/confetti-lavender.svg",
|
|
194
|
+
"confetti-mint": "v1734522739/pupil-journey/confetti-mint.svg",
|
|
195
|
+
"lesson-confetti-green": "v1734522917/pupil-journey/lesson/lesson-confetti-green.svg",
|
|
196
|
+
"lesson-confetti-mint": "v1734523422/pupil-journey/lesson/lesson-confetti-mint.svg",
|
|
197
|
+
"lesson-confetti-pink": "v1734523482/pupil-journey/lesson/lesson-confetti-pink.svg",
|
|
198
|
+
"lesson-confetti-green-lemon": "v1734523276/pupil-journey/lesson/lesson-confetti-green-lemon.svg",
|
|
199
|
+
"lesson-confetti-lavender": "v1734523381/pupil-journey/lesson/lesson-confetti-lavender.svg",
|
|
200
|
+
"line-pink": "v1712912389/pupil-journey/line-pink.svg",
|
|
201
|
+
"line-lavender": "v1712912348/pupil-journey/line-lavender.svg",
|
|
202
|
+
"line-mint": "v1715356384/pupil-journey/line-mint.svg",
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export { backgrounds, icons };
|