@oaknational/oak-components 3.18.0 → 3.19.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 +196 -314
- package/dist/npm/cjs/types.d.ts +2 -52
- package/dist/npm/es/index.js +0 -2
- package/dist/npm/es/types.d.ts +2 -52
- package/package.json +1 -1
- package/dist/npm/es/components/house-cat/OakCaptionCard/OakCaptionCard.js +0 -81
- package/dist/npm/es/components/house-cat/OakCaptionSearch/OakCaptionSearch.js +0 -24
- package/dist/npm/es/components/house-cat/utils.js +0 -33
package/dist/npm/cjs/types.d.ts
CHANGED
|
@@ -2703,56 +2703,6 @@ type OakSearchFilterCheckBoxProps = Omit<BaseCheckBoxProps, "defaultChecked"> &
|
|
|
2703
2703
|
*/
|
|
2704
2704
|
declare const OakSearchFilterCheckBox: (props: OakSearchFilterCheckBoxProps) => React$1.JSX.Element;
|
|
2705
2705
|
|
|
2706
|
-
interface OakCaptionCardProps {
|
|
2707
|
-
captionId: string;
|
|
2708
|
-
videoTitle: string;
|
|
2709
|
-
lessonUid: string;
|
|
2710
|
-
videoType: "lesson";
|
|
2711
|
-
lastUpdated: string;
|
|
2712
|
-
lastEdited?: string;
|
|
2713
|
-
checked?: boolean;
|
|
2714
|
-
highlighted?: boolean;
|
|
2715
|
-
disabled?: boolean;
|
|
2716
|
-
onCheckChanged?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
2717
|
-
onClick?: (event: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
2718
|
-
editHref: string;
|
|
2719
|
-
lessonHref: string;
|
|
2720
|
-
"data-testid"?: string;
|
|
2721
|
-
}
|
|
2722
|
-
/**
|
|
2723
|
-
* A caption card with links to the associated lesson and rev edit page.
|
|
2724
|
-
*
|
|
2725
|
-
* ## Events
|
|
2726
|
-
* The following callbacks are available for tracking checkbox events:
|
|
2727
|
-
*
|
|
2728
|
-
* ### onCheckChanged
|
|
2729
|
-
* onCheckChanged?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
2730
|
-
*
|
|
2731
|
-
*/
|
|
2732
|
-
declare const OakCaptionCard: (props: OakCaptionCardProps) => React$1.JSX.Element;
|
|
2733
|
-
|
|
2734
|
-
interface OakCaptionSearchProps {
|
|
2735
|
-
defaultValue?: string;
|
|
2736
|
-
/**
|
|
2737
|
-
* Callback function that is called when the search is submitted.
|
|
2738
|
-
* It receives the caption ID string as an argument.
|
|
2739
|
-
*/
|
|
2740
|
-
onSearch?: (captionIdString: string) => void;
|
|
2741
|
-
/**
|
|
2742
|
-
* Indicates if there is an error in the search input.
|
|
2743
|
-
*/
|
|
2744
|
-
hasError?: boolean;
|
|
2745
|
-
/**
|
|
2746
|
-
* Text to display when there is an error in the search input.
|
|
2747
|
-
*/
|
|
2748
|
-
errorText?: string;
|
|
2749
|
-
/**
|
|
2750
|
-
* Indicates if the search is currently loading. will disable the input and button.
|
|
2751
|
-
*/
|
|
2752
|
-
isLoading?: boolean;
|
|
2753
|
-
}
|
|
2754
|
-
declare const OakCaptionSearch: ({ onSearch, hasError, errorText, isLoading, defaultValue, }: OakCaptionSearchProps) => React$1.JSX.Element;
|
|
2755
|
-
|
|
2756
2706
|
type OakFlexProps = FlexStyleProps & OakBoxProps;
|
|
2757
2707
|
declare const oakFlexCss: styled_components.FlattenInterpolation<styled_components.ThemedStyledProps<FlexStyleProps, styled_components.DefaultTheme>>;
|
|
2758
2708
|
/**
|
|
@@ -5398,5 +5348,5 @@ declare const useIsScrolled: () => {
|
|
|
5398
5348
|
|
|
5399
5349
|
declare const useBreakpoint: () => Device;
|
|
5400
5350
|
|
|
5401
|
-
export { DropdownContext, HeadingTagComponent, IconDown, IconUp, OakAccordion, OakAnchorTarget, OakAspectRatio, OakBackLink, OakBasicAccordion, OakBox, OakBreadcrumbs, OakBulletList, OakButtonAsRadioGroup, OakButtonWithDropdown, OakButtonWithDropdownProvider,
|
|
5402
|
-
export type { BannerTypes, BreakpointName, Consent, Device, InternalQuizResultItemProps, LessonSectionName$1 as LessonSectionName, MenuItemProps, OakAccordionProps, OakAllSpacingToken, OakAnchorTargetProps, OakAspectRatioProps, OakBackLinkProps, OakBasicAccordionProps, OakBorderRadiusToken, OakBorderWidthToken, OakBoxProps, OakBreadcrumb, OakBreadcrumbWithoutHref, OakBreadcrumbsProps, OakBulletListProps, OakButtonWithDropdownProps,
|
|
5351
|
+
export { DropdownContext, HeadingTagComponent, IconDown, IconUp, OakAccordion, OakAnchorTarget, OakAspectRatio, OakBackLink, OakBasicAccordion, OakBox, OakBreadcrumbs, OakBulletList, OakButtonAsRadioGroup, OakButtonWithDropdown, OakButtonWithDropdownProvider, OakCard, OakCardHeader, OakCardWithHandDrawnBorder, OakCarousel, OakCheckBox, OakCloseButton, OakCloudinaryConfigProvider, OakCloudinaryImage, OakCodeRenderer, OakCollapsibleContent, OakCookieBanner, OakCookieConsent, OakCookieConsentContext, OakCookieConsentProvider, OakCookieSettingsModal, OakCopyLinkButton, OakDownloadsJourneyChildSubjectTierSelector, OakDragAndDropInstructions, OakDraggable, OakDraggableFeedback, OakDroppable, OakErrorBoundary, OakErrorBoundaryBorderColor, OakFieldError, OakFieldset, OakFilterDrawer, OakFlex, OakFocusIndicator, OakForm, OakFormInput, OakFormInputWithLabels, OakGlobalStyle, OakGrid, OakGridArea, OakHandDrawnCard, OakHandDrawnCardWithIcon, OakHandDrawnFocusUnderline, OakHandDrawnHR, OakHeaderHero, OakHeading, OakHintButton, OakHomepageTabButton, OakHoverLink, OakIcon, OakImage, OakInfo, OakInfoButton, OakInformativeModal, OakInformativeModalBody, OakInformativeModalBorderColor, OakInformativeModalFooter, OakInlineBanner, OakInlineRegistrationBanner, OakJauntyAngleLabel, OakKbd, OakLI, OakLabel, OakLeftAlignedButton, OakLessonBottomNav, OakLessonInfoCard, OakLessonLayout, OakLessonNavItem, OakLessonReviewIntroVideo, OakLessonReviewItem, OakLessonReviewQuiz, OakLessonTopNav, OakLessonVideoTranscript, OakLink, OakLinkCard, OakListItem, OakLoadingSpinner, OakMaxWidth, OakMediaClip, OakMediaClipList, OakMediaClipListAccordion, OakMediaClipStackListItem, OakModalCenter, OakModalCenterBody, OakMultilineText, OakOL, OakOptGroup, OakOption, OakOutlineAccordion, OakP, OakPagination, OakPrimaryButton, OakPrimaryInvertedButton, OakPrimaryNav, OakPrimaryNavItem, OakPromoTag, OakPupilJourneyContentGuidance, OakPupilJourneyHeader, OakPupilJourneyLayout, OakPupilJourneyList, OakPupilJourneyListCounter, OakPupilJourneyListItem, OakPupilJourneyListItemSubheading, OakPupilJourneyOptionalityButton, OakPupilJourneyOptionalityItem, OakPupilJourneyProgrammeOptions, OakPupilJourneyUnitsFilter, OakPupilJourneyYearButton, OakQuizCheckBox, OakQuizCounter, OakQuizFeedback, OakQuizHint, OakQuizMatch, OakQuizMatchItemId, OakQuizOrder, OakQuizOrderitemId, OakQuizPrintableHeader, OakQuizPrintableSubHeader, OakQuizRadioButton, OakQuizResultItem, OakQuizTextInput, OakQuote, OakRadioAsButton, OakRadioButton, OakRadioGroup, OakRadioTile, OakResourceCard, OakResourcesAccordion, OakRoundIcon, OakSaveCount, OakScaleImageButton, OakScreenReader, OakSearchFilterCheckBox, OakSecondaryButton, OakSecondaryButtonAsRadio, OakSecondaryButtonWithDropdown, OakSecondaryLink, OakSelect, OakSideMenuNav, OakSideMenuNavLink, OakSignLanguageButton, OakSmallPrimaryButton, OakSmallPrimaryInvertedButton, OakSmallSecondaryButton, OakSmallSecondaryButtonWithDropdown, OakSmallSecondaryToggleButton, OakSmallTertiaryInvertedButton, OakSpan, OakStaticMessageCard, OakSubjectIcon, OakSubjectIconButton, OakSvg, OakTabs, OakTagFunctional, OakTeacherNotesInline, OakTeacherNotesModal, OakTertiaryButton, OakTertiaryInvertedButton, OakTertiaryOLNav, OakTextArea, OakTextInput, OakThemeProvider, OakTimer, OakToast, OakTooltip, OakTypography, OakUL, OakUnitListItem, OakUnitListOptionalityItem, OakVideo, OakVideoTranscript, RadioContext, ReviewItemContainer, ReviewItemTitleSection, StyledMediaClipImage, UnstyledChevronAccordion, announcements, bannerTypes, bannerVariants, colorSchemes, formatTimeCode, generateOakIconURL, getBackgroundUrlForSection, getBreakpoint, getDefaultContextState, getMediaQuery, installMockIntersectionObserver, installMockResizeObserver, isTileItem, isValidIconName, lessonSectionNames, oakAllSpacingTokens, oakBorderRadiusTokens, oakBorderWidthTokens, oakBoxCss, oakColorTokens, oakDarkTheme, oakDefaultTheme, oakDropShadowTokens, oakFlexCss, oakFontSizeTokens, oakFontTokens, oakHeadingTags, oakIconNames, oakLIDefaults, oakOpacityTokens, oakPlaceholder, oakSpaceBetweenTokens, oakTransitionTokens, oakUiRoleTokens, oakZIndexTokens, parseBorder, parseBorderRadius, parseBorderWidth, parseColor, parseColorFilter, parseDropShadow, parseFontSize, parseFontWeight, parseLetterSpacing, parseLineHeight, parseOpacity, parseSpacing, parseTransitions, parseZIndex, placeholderStyles, removedGuidanceDuplicates, responsiveStyle, rgbToHex, useBreakpoint, useCookieConsent, useDevice, useDropdownContext, useIsScrolled, useMediaQuery, useMounted };
|
|
5352
|
+
export type { BannerTypes, BreakpointName, Consent, Device, InternalQuizResultItemProps, LessonSectionName$1 as LessonSectionName, MenuItemProps, OakAccordionProps, OakAllSpacingToken, OakAnchorTargetProps, OakAspectRatioProps, OakBackLinkProps, OakBasicAccordionProps, OakBorderRadiusToken, OakBorderWidthToken, OakBoxProps, OakBreadcrumb, OakBreadcrumbWithoutHref, OakBreadcrumbsProps, OakBulletListProps, OakButtonWithDropdownProps, OakCardHeaderprops, OakCardProps, OakCardWithHandDrawnBorderProps, OakCarouselProps, OakCheckBoxProps, OakCloseButtonProps, OakCloudinaryImageProps, OakCodeRendererProps, OakCollapsibleContentProps, OakColorFilterToken, OakColorToken, OakCombinedSpacingToken, OakCookieBannerProps, OakCookieConsentProps, OakCookieSettingsModalProps, OakDownloadsJourneyChildSubjectTierSelectorProps, OakDropShadowToken, OakDroppableProps, OakErrorBoundaryCloseAction, OakErrorBoundaryProps, OakFieldErrorProps, OakFieldsetProps, OakFlexProps, OakFocusIndicatorProps, OakFontSizeToken, OakFontToken, OakFormInputProps, OakFormInputWithLabelsProps, OakFormProps, OakGridAreaProps, OakGridProps, OakHandDrawnBoxWithIconProps, OakHandDrawnCardProps, OakHandDrawnFocusUnderlineProps, OakHandDrawnHRProps, OakHeaderHeroProps, OakHeadingProps, OakHeadingTag, OakHintButtonProps, OakHomepageTabButtonProps, OakHoverLinkProps, OakIconName, OakIconProps, OakImageProps, OakInfoButtonProps, OakInfoCardProps, OakInfoProps, OakInformativeModalBodyProps, OakInformativeModalCloseAction, OakInformativeModalFooterProps, OakInformativeModalProps, OakInlineBannerProps, OakInlineBannerTypes, OakInlineBannerVariantProps, OakInlineBannerVariants, OakInlineRegistrationBannerProps, OakJauntyAngleLabelProps, OakKbdProps, OakLIProps, OakLabelProps, OakLeftAlignedButtonProps, OakLessonBottomNavProps, OakLessonLayoutProps, OakLessonNavItemProps, OakLessonReviewIntroVideoProps, OakLessonReviewItemProps, OakLessonTopNavProps, OakLinkCardProps, OakLinkProps, OakListItemProps, OakLoadingSpinnerProps, OakMediaClipListProps, OakMediaClipProps, OakMediaClipStackListItemProps, OakModalCenterBodyProps, OakModalCenterProps, OakMultilineTextProps, OakOLProps, OakOpacityToken, OakOptGroupProps, OakOptionProps, OakOutlineAccordionProps, OakPProps, OakPaginationProps, OakPrimaryButtonProps, OakPrimaryInvertedButtonProps, OakPrimaryNavItemProps, OakPrimaryNavProps, OakPromoTagProps, OakPupilContentGuidance, OakPupilJourneyContentGuidanceProps, OakPupilJourneyHeaderProps, OakPupilJourneyLayoutProps, OakPupilJourneyListItemSubheadingProps, OakPupilJourneyListProps, OakPupilJourneyOptionalityItemProps, OakPupilJourneyProgrammeOptionsProps, OakPupilJourneyUnitsFilterProps, OakPupilJourneyYearButtonProps, OakQuizCheckBoxProps, OakQuizCounterProps, OakQuizFeedbackProps, OakQuizHintProps, OakQuizMatchProps, OakQuizOrderProps, OakQuizPrintableHeaderProps, OakQuizPrintableSubHeaderProps, OakQuizRadioButtonProps, OakQuoteProps, OakRadioAsButtonProps, OakRadioGroupProps, OakRadioTileProps, OakResourceCardProps, OakResourcesAccordionProps, OakRoundIconProps, OakSaveCountProps, OakScaleImageButtonProps, OakSearchFilterCheckBoxProps, OakSecondaryButtonAsRadioProps, OakSecondaryButtonProps, OakSecondaryButtonWithDropdownProps, OakSecondaryLinkProps, OakSelectProps, OakSideMenuNavLinkProps, OakSideMenuNavProps, OakSmallPrimaryButtonProps, OakSmallPrimaryInvertedButtonProps, OakSmallSecondaryButtonProps, OakSmallSecondaryButtonWithDropdownProps, OakSmallSecondaryToggleButtonProps, OakSmallTertiaryInvertedButtonProps, OakSolidBorderAccordionProps, OakSpaceBetweenToken, OakSpanProps, OakSubjectIconButtonProps, OakSubjectIconProps, OakSvgNames, OakSvgProps, OakTabsProps, OakTagFunctionalProps, OakTeacherNotesInlineProps, OakTeacherNotesModalProps, OakTertiaryOLNavProps, OakTextAreaProps, OakTextInputProps, OakTheme, OakThemeProviderProps, OakTimerProps, OakToastProps, OakTooltipProps, OakTransitionToken, OakTypographyProps, OakULProps, OakUiRoleToken, OakUnitListItemProps, OakUnitListOptionalityItemProps, OakVideoProps, OakZIndexToken, Phase$1 as Phase, PolicyConsent, PupilJourneySectionName, Subject, Tier, TileItem, UnstyledChevronAccordionProps };
|
package/dist/npm/es/index.js
CHANGED
|
@@ -38,8 +38,6 @@ export { OakOptGroup } from './components/form-elements/OakSelect/OakOptGroup.js
|
|
|
38
38
|
export { OakTextInput } from './components/form-elements/OakTextInput/OakTextInput.js';
|
|
39
39
|
export { OakRadioAsButton, colorSchemes } from './components/form-elements/OakRadioAsButton/OakRadioAsButton.js';
|
|
40
40
|
export { OakSearchFilterCheckBox } from './components/form-elements/OakSearchFilterCheckBox/OakSearchFilterCheckBox.js';
|
|
41
|
-
export { OakCaptionCard } from './components/house-cat/OakCaptionCard/OakCaptionCard.js';
|
|
42
|
-
export { OakCaptionSearch } from './components/house-cat/OakCaptionSearch/OakCaptionSearch.js';
|
|
43
41
|
export { OakAspectRatio } from './components/images-and-icons/OakAspectRatio/OakAspectRatio.js';
|
|
44
42
|
export { OakIcon } from './components/images-and-icons/OakIcon/OakIcon.js';
|
|
45
43
|
export { OakImage, oakPlaceholder, placeholderStyles } from './components/images-and-icons/OakImage/OakImage.js';
|
package/dist/npm/es/types.d.ts
CHANGED
|
@@ -2703,56 +2703,6 @@ type OakSearchFilterCheckBoxProps = Omit<BaseCheckBoxProps, "defaultChecked"> &
|
|
|
2703
2703
|
*/
|
|
2704
2704
|
declare const OakSearchFilterCheckBox: (props: OakSearchFilterCheckBoxProps) => React$1.JSX.Element;
|
|
2705
2705
|
|
|
2706
|
-
interface OakCaptionCardProps {
|
|
2707
|
-
captionId: string;
|
|
2708
|
-
videoTitle: string;
|
|
2709
|
-
lessonUid: string;
|
|
2710
|
-
videoType: "lesson";
|
|
2711
|
-
lastUpdated: string;
|
|
2712
|
-
lastEdited?: string;
|
|
2713
|
-
checked?: boolean;
|
|
2714
|
-
highlighted?: boolean;
|
|
2715
|
-
disabled?: boolean;
|
|
2716
|
-
onCheckChanged?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
2717
|
-
onClick?: (event: React$1.MouseEvent<HTMLDivElement>) => void;
|
|
2718
|
-
editHref: string;
|
|
2719
|
-
lessonHref: string;
|
|
2720
|
-
"data-testid"?: string;
|
|
2721
|
-
}
|
|
2722
|
-
/**
|
|
2723
|
-
* A caption card with links to the associated lesson and rev edit page.
|
|
2724
|
-
*
|
|
2725
|
-
* ## Events
|
|
2726
|
-
* The following callbacks are available for tracking checkbox events:
|
|
2727
|
-
*
|
|
2728
|
-
* ### onCheckChanged
|
|
2729
|
-
* onCheckChanged?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
2730
|
-
*
|
|
2731
|
-
*/
|
|
2732
|
-
declare const OakCaptionCard: (props: OakCaptionCardProps) => React$1.JSX.Element;
|
|
2733
|
-
|
|
2734
|
-
interface OakCaptionSearchProps {
|
|
2735
|
-
defaultValue?: string;
|
|
2736
|
-
/**
|
|
2737
|
-
* Callback function that is called when the search is submitted.
|
|
2738
|
-
* It receives the caption ID string as an argument.
|
|
2739
|
-
*/
|
|
2740
|
-
onSearch?: (captionIdString: string) => void;
|
|
2741
|
-
/**
|
|
2742
|
-
* Indicates if there is an error in the search input.
|
|
2743
|
-
*/
|
|
2744
|
-
hasError?: boolean;
|
|
2745
|
-
/**
|
|
2746
|
-
* Text to display when there is an error in the search input.
|
|
2747
|
-
*/
|
|
2748
|
-
errorText?: string;
|
|
2749
|
-
/**
|
|
2750
|
-
* Indicates if the search is currently loading. will disable the input and button.
|
|
2751
|
-
*/
|
|
2752
|
-
isLoading?: boolean;
|
|
2753
|
-
}
|
|
2754
|
-
declare const OakCaptionSearch: ({ onSearch, hasError, errorText, isLoading, defaultValue, }: OakCaptionSearchProps) => React$1.JSX.Element;
|
|
2755
|
-
|
|
2756
2706
|
type OakFlexProps = FlexStyleProps & OakBoxProps;
|
|
2757
2707
|
declare const oakFlexCss: styled_components.FlattenInterpolation<styled_components.ThemedStyledProps<FlexStyleProps, styled_components.DefaultTheme>>;
|
|
2758
2708
|
/**
|
|
@@ -5398,5 +5348,5 @@ declare const useIsScrolled: () => {
|
|
|
5398
5348
|
|
|
5399
5349
|
declare const useBreakpoint: () => Device;
|
|
5400
5350
|
|
|
5401
|
-
export { DropdownContext, HeadingTagComponent, IconDown, IconUp, OakAccordion, OakAnchorTarget, OakAspectRatio, OakBackLink, OakBasicAccordion, OakBox, OakBreadcrumbs, OakBulletList, OakButtonAsRadioGroup, OakButtonWithDropdown, OakButtonWithDropdownProvider,
|
|
5402
|
-
export type { BannerTypes, BreakpointName, Consent, Device, InternalQuizResultItemProps, LessonSectionName$1 as LessonSectionName, MenuItemProps, OakAccordionProps, OakAllSpacingToken, OakAnchorTargetProps, OakAspectRatioProps, OakBackLinkProps, OakBasicAccordionProps, OakBorderRadiusToken, OakBorderWidthToken, OakBoxProps, OakBreadcrumb, OakBreadcrumbWithoutHref, OakBreadcrumbsProps, OakBulletListProps, OakButtonWithDropdownProps,
|
|
5351
|
+
export { DropdownContext, HeadingTagComponent, IconDown, IconUp, OakAccordion, OakAnchorTarget, OakAspectRatio, OakBackLink, OakBasicAccordion, OakBox, OakBreadcrumbs, OakBulletList, OakButtonAsRadioGroup, OakButtonWithDropdown, OakButtonWithDropdownProvider, OakCard, OakCardHeader, OakCardWithHandDrawnBorder, OakCarousel, OakCheckBox, OakCloseButton, OakCloudinaryConfigProvider, OakCloudinaryImage, OakCodeRenderer, OakCollapsibleContent, OakCookieBanner, OakCookieConsent, OakCookieConsentContext, OakCookieConsentProvider, OakCookieSettingsModal, OakCopyLinkButton, OakDownloadsJourneyChildSubjectTierSelector, OakDragAndDropInstructions, OakDraggable, OakDraggableFeedback, OakDroppable, OakErrorBoundary, OakErrorBoundaryBorderColor, OakFieldError, OakFieldset, OakFilterDrawer, OakFlex, OakFocusIndicator, OakForm, OakFormInput, OakFormInputWithLabels, OakGlobalStyle, OakGrid, OakGridArea, OakHandDrawnCard, OakHandDrawnCardWithIcon, OakHandDrawnFocusUnderline, OakHandDrawnHR, OakHeaderHero, OakHeading, OakHintButton, OakHomepageTabButton, OakHoverLink, OakIcon, OakImage, OakInfo, OakInfoButton, OakInformativeModal, OakInformativeModalBody, OakInformativeModalBorderColor, OakInformativeModalFooter, OakInlineBanner, OakInlineRegistrationBanner, OakJauntyAngleLabel, OakKbd, OakLI, OakLabel, OakLeftAlignedButton, OakLessonBottomNav, OakLessonInfoCard, OakLessonLayout, OakLessonNavItem, OakLessonReviewIntroVideo, OakLessonReviewItem, OakLessonReviewQuiz, OakLessonTopNav, OakLessonVideoTranscript, OakLink, OakLinkCard, OakListItem, OakLoadingSpinner, OakMaxWidth, OakMediaClip, OakMediaClipList, OakMediaClipListAccordion, OakMediaClipStackListItem, OakModalCenter, OakModalCenterBody, OakMultilineText, OakOL, OakOptGroup, OakOption, OakOutlineAccordion, OakP, OakPagination, OakPrimaryButton, OakPrimaryInvertedButton, OakPrimaryNav, OakPrimaryNavItem, OakPromoTag, OakPupilJourneyContentGuidance, OakPupilJourneyHeader, OakPupilJourneyLayout, OakPupilJourneyList, OakPupilJourneyListCounter, OakPupilJourneyListItem, OakPupilJourneyListItemSubheading, OakPupilJourneyOptionalityButton, OakPupilJourneyOptionalityItem, OakPupilJourneyProgrammeOptions, OakPupilJourneyUnitsFilter, OakPupilJourneyYearButton, OakQuizCheckBox, OakQuizCounter, OakQuizFeedback, OakQuizHint, OakQuizMatch, OakQuizMatchItemId, OakQuizOrder, OakQuizOrderitemId, OakQuizPrintableHeader, OakQuizPrintableSubHeader, OakQuizRadioButton, OakQuizResultItem, OakQuizTextInput, OakQuote, OakRadioAsButton, OakRadioButton, OakRadioGroup, OakRadioTile, OakResourceCard, OakResourcesAccordion, OakRoundIcon, OakSaveCount, OakScaleImageButton, OakScreenReader, OakSearchFilterCheckBox, OakSecondaryButton, OakSecondaryButtonAsRadio, OakSecondaryButtonWithDropdown, OakSecondaryLink, OakSelect, OakSideMenuNav, OakSideMenuNavLink, OakSignLanguageButton, OakSmallPrimaryButton, OakSmallPrimaryInvertedButton, OakSmallSecondaryButton, OakSmallSecondaryButtonWithDropdown, OakSmallSecondaryToggleButton, OakSmallTertiaryInvertedButton, OakSpan, OakStaticMessageCard, OakSubjectIcon, OakSubjectIconButton, OakSvg, OakTabs, OakTagFunctional, OakTeacherNotesInline, OakTeacherNotesModal, OakTertiaryButton, OakTertiaryInvertedButton, OakTertiaryOLNav, OakTextArea, OakTextInput, OakThemeProvider, OakTimer, OakToast, OakTooltip, OakTypography, OakUL, OakUnitListItem, OakUnitListOptionalityItem, OakVideo, OakVideoTranscript, RadioContext, ReviewItemContainer, ReviewItemTitleSection, StyledMediaClipImage, UnstyledChevronAccordion, announcements, bannerTypes, bannerVariants, colorSchemes, formatTimeCode, generateOakIconURL, getBackgroundUrlForSection, getBreakpoint, getDefaultContextState, getMediaQuery, installMockIntersectionObserver, installMockResizeObserver, isTileItem, isValidIconName, lessonSectionNames, oakAllSpacingTokens, oakBorderRadiusTokens, oakBorderWidthTokens, oakBoxCss, oakColorTokens, oakDarkTheme, oakDefaultTheme, oakDropShadowTokens, oakFlexCss, oakFontSizeTokens, oakFontTokens, oakHeadingTags, oakIconNames, oakLIDefaults, oakOpacityTokens, oakPlaceholder, oakSpaceBetweenTokens, oakTransitionTokens, oakUiRoleTokens, oakZIndexTokens, parseBorder, parseBorderRadius, parseBorderWidth, parseColor, parseColorFilter, parseDropShadow, parseFontSize, parseFontWeight, parseLetterSpacing, parseLineHeight, parseOpacity, parseSpacing, parseTransitions, parseZIndex, placeholderStyles, removedGuidanceDuplicates, responsiveStyle, rgbToHex, useBreakpoint, useCookieConsent, useDevice, useDropdownContext, useIsScrolled, useMediaQuery, useMounted };
|
|
5352
|
+
export type { BannerTypes, BreakpointName, Consent, Device, InternalQuizResultItemProps, LessonSectionName$1 as LessonSectionName, MenuItemProps, OakAccordionProps, OakAllSpacingToken, OakAnchorTargetProps, OakAspectRatioProps, OakBackLinkProps, OakBasicAccordionProps, OakBorderRadiusToken, OakBorderWidthToken, OakBoxProps, OakBreadcrumb, OakBreadcrumbWithoutHref, OakBreadcrumbsProps, OakBulletListProps, OakButtonWithDropdownProps, OakCardHeaderprops, OakCardProps, OakCardWithHandDrawnBorderProps, OakCarouselProps, OakCheckBoxProps, OakCloseButtonProps, OakCloudinaryImageProps, OakCodeRendererProps, OakCollapsibleContentProps, OakColorFilterToken, OakColorToken, OakCombinedSpacingToken, OakCookieBannerProps, OakCookieConsentProps, OakCookieSettingsModalProps, OakDownloadsJourneyChildSubjectTierSelectorProps, OakDropShadowToken, OakDroppableProps, OakErrorBoundaryCloseAction, OakErrorBoundaryProps, OakFieldErrorProps, OakFieldsetProps, OakFlexProps, OakFocusIndicatorProps, OakFontSizeToken, OakFontToken, OakFormInputProps, OakFormInputWithLabelsProps, OakFormProps, OakGridAreaProps, OakGridProps, OakHandDrawnBoxWithIconProps, OakHandDrawnCardProps, OakHandDrawnFocusUnderlineProps, OakHandDrawnHRProps, OakHeaderHeroProps, OakHeadingProps, OakHeadingTag, OakHintButtonProps, OakHomepageTabButtonProps, OakHoverLinkProps, OakIconName, OakIconProps, OakImageProps, OakInfoButtonProps, OakInfoCardProps, OakInfoProps, OakInformativeModalBodyProps, OakInformativeModalCloseAction, OakInformativeModalFooterProps, OakInformativeModalProps, OakInlineBannerProps, OakInlineBannerTypes, OakInlineBannerVariantProps, OakInlineBannerVariants, OakInlineRegistrationBannerProps, OakJauntyAngleLabelProps, OakKbdProps, OakLIProps, OakLabelProps, OakLeftAlignedButtonProps, OakLessonBottomNavProps, OakLessonLayoutProps, OakLessonNavItemProps, OakLessonReviewIntroVideoProps, OakLessonReviewItemProps, OakLessonTopNavProps, OakLinkCardProps, OakLinkProps, OakListItemProps, OakLoadingSpinnerProps, OakMediaClipListProps, OakMediaClipProps, OakMediaClipStackListItemProps, OakModalCenterBodyProps, OakModalCenterProps, OakMultilineTextProps, OakOLProps, OakOpacityToken, OakOptGroupProps, OakOptionProps, OakOutlineAccordionProps, OakPProps, OakPaginationProps, OakPrimaryButtonProps, OakPrimaryInvertedButtonProps, OakPrimaryNavItemProps, OakPrimaryNavProps, OakPromoTagProps, OakPupilContentGuidance, OakPupilJourneyContentGuidanceProps, OakPupilJourneyHeaderProps, OakPupilJourneyLayoutProps, OakPupilJourneyListItemSubheadingProps, OakPupilJourneyListProps, OakPupilJourneyOptionalityItemProps, OakPupilJourneyProgrammeOptionsProps, OakPupilJourneyUnitsFilterProps, OakPupilJourneyYearButtonProps, OakQuizCheckBoxProps, OakQuizCounterProps, OakQuizFeedbackProps, OakQuizHintProps, OakQuizMatchProps, OakQuizOrderProps, OakQuizPrintableHeaderProps, OakQuizPrintableSubHeaderProps, OakQuizRadioButtonProps, OakQuoteProps, OakRadioAsButtonProps, OakRadioGroupProps, OakRadioTileProps, OakResourceCardProps, OakResourcesAccordionProps, OakRoundIconProps, OakSaveCountProps, OakScaleImageButtonProps, OakSearchFilterCheckBoxProps, OakSecondaryButtonAsRadioProps, OakSecondaryButtonProps, OakSecondaryButtonWithDropdownProps, OakSecondaryLinkProps, OakSelectProps, OakSideMenuNavLinkProps, OakSideMenuNavProps, OakSmallPrimaryButtonProps, OakSmallPrimaryInvertedButtonProps, OakSmallSecondaryButtonProps, OakSmallSecondaryButtonWithDropdownProps, OakSmallSecondaryToggleButtonProps, OakSmallTertiaryInvertedButtonProps, OakSolidBorderAccordionProps, OakSpaceBetweenToken, OakSpanProps, OakSubjectIconButtonProps, OakSubjectIconProps, OakSvgNames, OakSvgProps, OakTabsProps, OakTagFunctionalProps, OakTeacherNotesInlineProps, OakTeacherNotesModalProps, OakTertiaryOLNavProps, OakTextAreaProps, OakTextInputProps, OakTheme, OakThemeProviderProps, OakTimerProps, OakToastProps, OakTooltipProps, OakTransitionToken, OakTypographyProps, OakULProps, OakUiRoleToken, OakUnitListItemProps, OakUnitListOptionalityItemProps, OakVideoProps, OakZIndexToken, Phase$1 as Phase, PolicyConsent, PupilJourneySectionName, Subject, Tier, TileItem, UnstyledChevronAccordionProps };
|
package/package.json
CHANGED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from 'tslib';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { getTimeText } from '../utils.js';
|
|
5
|
-
import { OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
6
|
-
import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
7
|
-
import { OakIcon } from '../../images-and-icons/OakIcon/OakIcon.js';
|
|
8
|
-
import { OakSpan } from '../../typography/OakSpan/OakSpan.js';
|
|
9
|
-
import { InternalCheckBoxLabelHoverDecor } from '../../internal-components/InternalCheckBoxLabel/InternalCheckBoxLabel.js';
|
|
10
|
-
import { parseColor } from '../../../styles/helpers/parseColor.js';
|
|
11
|
-
import { parseDropShadow } from '../../../styles/helpers/parseDropShadow.js';
|
|
12
|
-
import { OakCheckBox } from '../../form-elements/OakCheckBox/OakCheckBox.js';
|
|
13
|
-
import { OakLink } from '../../navigation/OakLink/OakLink.js';
|
|
14
|
-
|
|
15
|
-
var StyledFlexBox = styled(OakFlex)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n &:hover:has(input:not(:disabled)) ", " {\n text-decoration: underline;\n }\n\n &:has(input:focus-visible) {\n box-shadow:\n ", ",\n ", ";\n }\n\n ", "\n\n ", "\n ", "\n"], ["\n &:hover:has(input:not(:disabled)) ", " {\n text-decoration: underline;\n }\n\n &:has(input:focus-visible) {\n box-shadow:\n ", ",\n ", ";\n }\n\n ", "\n\n ", "\n ", "\n"])), InternalCheckBoxLabelHoverDecor, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) {
|
|
16
|
-
return props.$disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: not-allowed;\n background-color: ", ";\n color: ", ";\n "], ["\n cursor: not-allowed;\n background-color: ", ";\n color: ", ";\n "])), parseColor("bg-neutral-stronger"), parseColor("text-disabled"));
|
|
17
|
-
}, function (props) {
|
|
18
|
-
return !props.$disabled &&
|
|
19
|
-
props.$highlighted && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n &:hover {\n background-color: ", ";\n }\n "], ["\n background-color: ", ";\n border-color: ", ";\n &:hover {\n background-color: ", ";\n }\n "])), parseColor("bg-decorative3-very-subdued"), parseColor("bg-decorative3-main"), parseColor("bg-decorative3-subdued"));
|
|
20
|
-
}, function (props) {
|
|
21
|
-
return !props.$disabled &&
|
|
22
|
-
!props.$highlighted && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n "], ["\n &:hover {\n background-color: ", ";\n }\n "])), parseColor("bg-decorative3-subdued"));
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* A caption card with links to the associated lesson and rev edit page.
|
|
26
|
-
*
|
|
27
|
-
* ## Events
|
|
28
|
-
* The following callbacks are available for tracking checkbox events:
|
|
29
|
-
*
|
|
30
|
-
* ### onCheckChanged
|
|
31
|
-
* onCheckChanged?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
var OakCaptionCard = function (props) {
|
|
35
|
-
var checked = props.checked, onCheckChanged = props.onCheckChanged, onClick = props.onClick, captionId = props.captionId, videoTitle = props.videoTitle, lessonUid = props.lessonUid, videoType = props.videoType, lastUpdated = props.lastUpdated, lastEdited = props.lastEdited, _a = props.highlighted, highlighted = _a === void 0 ? false : _a, _b = props.disabled, disabled = _b === void 0 ? false : _b, _c = props["data-testid"], dataTestId = _c === void 0 ? "caption-card" : _c, editHref = props.editHref, lessonHref = props.lessonHref;
|
|
36
|
-
var filterColor = disabled ? "icon-disabled" : null;
|
|
37
|
-
return (React.createElement(StyledFlexBox, { "data-testid": dataTestId, "$minHeight": "spacing-40", "$position": "relative", "$background": "bg-primary", "$borderRadius": "border-radius-s", "$pa": "spacing-16", "$gap": "spacing-12", "$flexDirection": "column", "$width": "100%", "$highlighted": !!highlighted, "$disabled": !!disabled, onClick: onClick },
|
|
38
|
-
React.createElement(OakFlex, { "$justifyContent": "flex-start", "$alignItems": "center", "$width": "100%", "$gap": "spacing-12", "$font": "heading-7" },
|
|
39
|
-
React.createElement(OakCheckBox, { checked: checked, value: "Caption ID: ".concat(captionId), displayValue: "", disabled: disabled, onChange: onCheckChanged, "aria-labelledby": captionId, "aria-label": "check caption ".concat(captionId), "data-testid": "checkbox", id: captionId }),
|
|
40
|
-
React.createElement(OakFlex, { "$font": "heading-7", "$justifyContent": "flex-start", "$gap": "spacing-8", "$flexWrap": "wrap" },
|
|
41
|
-
React.createElement(OakSpan, { "$font": "heading-7" },
|
|
42
|
-
"Caption ID: ",
|
|
43
|
-
captionId),
|
|
44
|
-
React.createElement(OakSpan, null, " \u2022 "),
|
|
45
|
-
React.createElement(OakBox, null,
|
|
46
|
-
"Video Title: ",
|
|
47
|
-
videoTitle)),
|
|
48
|
-
React.createElement(OakFlex, { "$flexGrow": 10, "$justifyContent": "flex-end" },
|
|
49
|
-
React.createElement(OakLink, { variant: "secondary", href: editHref, iconName: "external", isTrailingIcon: true, "aria-label": "edit caption ".concat(captionId, " in a new tab in rev"), target: "_blank", onClick: function (e) {
|
|
50
|
-
e.stopPropagation();
|
|
51
|
-
} }, "Edit"))),
|
|
52
|
-
React.createElement(OakFlex, { "$justifyContent": "flex-start", "$alignItems": "center", "$width": "100%", "$gap": "spacing-32", "$font": "body-2" },
|
|
53
|
-
React.createElement(OakLink, { variant: "secondary", href: lessonHref, "aria-label": "view lesson ".concat(lessonUid, " in a new tab"), "data-testid": "lesson_uid", iconName: "external", isTrailingIcon: true, target: "_blank", onClick: function (e) {
|
|
54
|
-
e.stopPropagation();
|
|
55
|
-
} }, lessonUid),
|
|
56
|
-
React.createElement(OakFlex, { "$alignItems": "center", "$gap": "spacing-4" },
|
|
57
|
-
" ",
|
|
58
|
-
React.createElement(OakIcon, { alt: "", iconName: "video", iconWidth: "spacing-24", iconHeight: "spacing-24", "$colorFilter": filterColor }),
|
|
59
|
-
getVideoTypeText(videoType)),
|
|
60
|
-
lastEdited ? (React.createElement(OakFlex, { "$alignItems": "center" },
|
|
61
|
-
React.createElement(OakIcon, { alt: "", iconName: "equipment-required", iconWidth: "spacing-24", iconHeight: "spacing-24", "$colorFilter": filterColor }),
|
|
62
|
-
"Edited ",
|
|
63
|
-
getTimeText(lastEdited))) : null,
|
|
64
|
-
React.createElement(OakFlex, { "$alignItems": "center" },
|
|
65
|
-
React.createElement(OakIcon, { alt: "", iconName: "success", iconWidth: "spacing-24", iconHeight: "spacing-24", "$colorFilter": filterColor }),
|
|
66
|
-
"Updated ",
|
|
67
|
-
getTimeText(lastUpdated)))));
|
|
68
|
-
};
|
|
69
|
-
function getVideoTypeText(videoType) {
|
|
70
|
-
switch (videoType) {
|
|
71
|
-
case "lesson":
|
|
72
|
-
return "Lesson video";
|
|
73
|
-
case "media clip":
|
|
74
|
-
return "Media clip";
|
|
75
|
-
default:
|
|
76
|
-
return "Unknown";
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
80
|
-
|
|
81
|
-
export { OakCaptionCard };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
3
|
-
import { OakPrimaryButton } from '../../buttons/OakPrimaryButton/OakPrimaryButton.js';
|
|
4
|
-
import { OakFormInputWithLabels } from '../../owa/OakFormInputWithLabels/OakFormInputWithLabels.js';
|
|
5
|
-
|
|
6
|
-
var OakCaptionSearch = function (_a) {
|
|
7
|
-
var onSearch = _a.onSearch, hasError = _a.hasError, errorText = _a.errorText, _b = _a.isLoading, isLoading = _b === void 0 ? false : _b, defaultValue = _a.defaultValue;
|
|
8
|
-
var handleFormSubmit = function (event) {
|
|
9
|
-
// NB. we don't handle caption ID validation here to remain decoupled from the application logic
|
|
10
|
-
event.preventDefault();
|
|
11
|
-
// get the input value from the form
|
|
12
|
-
var form = event.target;
|
|
13
|
-
var input = form.querySelector('input[name="caption-id"]');
|
|
14
|
-
var captionIdString = input.value.trim();
|
|
15
|
-
if (onSearch) {
|
|
16
|
-
onSearch(captionIdString);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
return (React.createElement(OakFlex, { as: "form", "$flexDirection": "column", "$color": "text-primary", "$background": "bg-primary", "$pa": "spacing-24", "$gap": "spacing-24", "$borderRadius": "border-radius-s", onSubmit: handleFormSubmit },
|
|
20
|
-
React.createElement(OakFormInputWithLabels, { label: "Caption ID", inputName: "caption-id", helperText: "Enter on or more IDs (separated by commas).", invalid: hasError, invalidText: errorText, disabled: isLoading, defaultValue: defaultValue, required: true }),
|
|
21
|
-
React.createElement(OakPrimaryButton, { type: "submit", iconName: "search", isTrailingIcon: true, isLoading: isLoading }, "Search")));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { OakCaptionSearch };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
function getTimeText(timestamp) {
|
|
2
|
-
var date = new Date(timestamp);
|
|
3
|
-
if (isNaN(date.getTime())) {
|
|
4
|
-
return "at an unknown time";
|
|
5
|
-
}
|
|
6
|
-
var now = Date.now();
|
|
7
|
-
var diff = now - date.getTime();
|
|
8
|
-
var seconds = Math.floor(diff / 1000);
|
|
9
|
-
if (seconds < 1) {
|
|
10
|
-
return "just now";
|
|
11
|
-
}
|
|
12
|
-
if (seconds < 60) {
|
|
13
|
-
return "".concat(seconds, " secs ago");
|
|
14
|
-
}
|
|
15
|
-
if (seconds < 3600) {
|
|
16
|
-
return "".concat(Math.floor(seconds / 60), " mins ago");
|
|
17
|
-
}
|
|
18
|
-
if (seconds < 86400) {
|
|
19
|
-
return "".concat(Math.floor(seconds / 3600), " hrs ago");
|
|
20
|
-
}
|
|
21
|
-
if (seconds < 604800) {
|
|
22
|
-
return "".concat(Math.floor(seconds / 86400), " days ago");
|
|
23
|
-
}
|
|
24
|
-
if (seconds < 2592000) {
|
|
25
|
-
return "".concat(Math.floor(seconds / 604800), " weeks ago");
|
|
26
|
-
}
|
|
27
|
-
if (seconds < 31536000) {
|
|
28
|
-
return "".concat(Math.floor(seconds / 2592000), " months ago");
|
|
29
|
-
}
|
|
30
|
-
return "".concat(Math.floor(seconds / 31536000), " years ago");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { getTimeText };
|