@oaknational/oak-components 0.32.0 → 0.32.2

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/types.d.ts CHANGED
@@ -58,8 +58,9 @@ declare const oakColorTokens: {
58
58
  transparent: string;
59
59
  };
60
60
  type OakColorToken = keyof typeof oakColorTokens;
61
- declare const oakUiRoleTokens: string[];
62
- type OakUiRoleToken = (typeof oakUiRoleTokens)[number];
61
+ declare const oakUiRoleTokensConst: readonly ["text-primary", "text-subdued", "text-error", "text-disabled", "text-link-active", "text-link-hover", "text-link-visited", "text-link-pressed", "text-inverted", "text-success", "text-warning", "bg-primary", "bg-neutral", "bg-neutral-stronger", "bg-btn-primary", "bg-btn-primary-hover", "bg-btn-primary-disabled", "bg-btn-secondary", "bg-btn-secondary-hover", "bg-btn-secondary-disabled", "bg-icon", "bg-icon-hover", "bg-decorative1-main", "bg-decorative1-subdued", "bg-decorative1-very-subdued", "bg-decorative2-main", "bg-decorative2-subdued", "bg-decorative2-very-subdued", "bg-decorative3-main", "bg-decorative3-subdued", "bg-decorative3-very-subdued", "bg-decorative4-main", "bg-decorative4-subdued", "bg-decorative4-very-subdued", "bg-decorative5-main", "bg-decorative5-subdued", "bg-decorative5-very-subdued", "bg-correct", "bg-incorrect", "icon-main", "icon-inverted", "icon-disabled", "icon-brand", "icon-success", "icon-error", "icon-warning", "border-primary", "border-inverted", "border-neutral", "border-neutral-lighter", "border-brand", "border-success", "border-error", "border-warning", "border-decorative1", "border-decorative1-stronger", "border-decorative2", "border-decorative2-stronger", "border-decorative3", "border-decorative3-stronger", "border-decorative4", "border-decorative4-stronger", "border-decorative5", "border-decorative5-stronger", "border-decorative6", "border-decorative6-stronger", "transparent"];
62
+ type OakUiRoleToken = (typeof oakUiRoleTokensConst)[number];
63
+ declare const oakUiRoleTokens: ("transparent" | "text-primary" | "text-subdued" | "text-error" | "text-disabled" | "text-link-active" | "text-link-hover" | "text-link-visited" | "text-link-pressed" | "text-inverted" | "text-success" | "text-warning" | "bg-primary" | "bg-neutral" | "bg-neutral-stronger" | "bg-btn-primary" | "bg-btn-primary-hover" | "bg-btn-primary-disabled" | "bg-btn-secondary" | "bg-btn-secondary-hover" | "bg-btn-secondary-disabled" | "bg-icon" | "bg-icon-hover" | "bg-decorative1-main" | "bg-decorative1-subdued" | "bg-decorative1-very-subdued" | "bg-decorative2-main" | "bg-decorative2-subdued" | "bg-decorative2-very-subdued" | "bg-decorative3-main" | "bg-decorative3-subdued" | "bg-decorative3-very-subdued" | "bg-decorative4-main" | "bg-decorative4-subdued" | "bg-decorative4-very-subdued" | "bg-decorative5-main" | "bg-decorative5-subdued" | "bg-decorative5-very-subdued" | "bg-correct" | "bg-incorrect" | "icon-main" | "icon-inverted" | "icon-disabled" | "icon-brand" | "icon-success" | "icon-error" | "icon-warning" | "border-primary" | "border-inverted" | "border-neutral" | "border-neutral-lighter" | "border-brand" | "border-success" | "border-error" | "border-warning" | "border-decorative1" | "border-decorative1-stronger" | "border-decorative2" | "border-decorative2-stronger" | "border-decorative3" | "border-decorative3-stronger" | "border-decorative4" | "border-decorative4-stronger" | "border-decorative5" | "border-decorative5-stronger" | "border-decorative6" | "border-decorative6-stronger")[];
63
64
  type UiRoleMap = Record<OakUiRoleToken, OakColorToken | null | undefined>;
64
65
  type OakCombinedColorToken = OakColorToken | OakUiRoleToken;
65
66
 
@@ -580,39 +581,39 @@ declare const oakFontSizeTokens: {
580
581
  };
581
582
  type OakFontSizeToken = keyof typeof oakFontSizeTokens;
582
583
  declare const oakFontTokens: {
583
- "heading-1": ["font-size-10", number, number, string];
584
- "heading-2": ["font-size-9", number, number, string];
585
- "heading-3": ["font-size-8", number, number, string];
586
- "heading-4": ["font-size-7", number, number, string];
587
- "heading-5": ["font-size-6", number, number, string];
588
- "heading-6": ["font-size-5", number, number, string];
589
- "heading-7": ["font-size-3", number, number, string];
590
- "heading-light-1": ["font-size-10", number, number, string];
591
- "heading-light-2": ["font-size-9", number, number, string];
592
- "heading-light-3": ["font-size-8", number, number, string];
593
- "heading-light-4": ["font-size-7", number, number, string];
594
- "heading-light-5": ["font-size-6", number, number, string];
595
- "heading-light-6": ["font-size-5", number, number, string];
596
- "heading-light-7": ["font-size-3", number, number, string];
597
- "body-1": ["font-size-4", number, number, string];
598
- "body-2": ["font-size-3", number, number, string];
599
- "body-3": ["font-size-2", number, number, string];
600
- "body-4": ["font-size-1", number, number, string];
601
- "body-1-bold": ["font-size-4", number, number, string];
602
- "body-2-bold": ["font-size-3", number, number, string];
603
- "body-3-bold": ["font-size-2", number, number, string];
604
- "list-item-1": ["font-size-4", number, number, string];
605
- "list-item-2": ["font-size-3", number, number, string];
584
+ "heading-1": ["font-size-10", 64, 600, "0.0115rem"];
585
+ "heading-2": ["font-size-9", 56, 600, "0.0115rem"];
586
+ "heading-3": ["font-size-8", 48, 600, "0.0115rem"];
587
+ "heading-4": ["font-size-7", 40, 600, "0.0115rem"];
588
+ "heading-5": ["font-size-6", 32, 600, "0.0115rem"];
589
+ "heading-6": ["font-size-5", 24, 600, "0.0115rem"];
590
+ "heading-7": ["font-size-3", 20, 600, "0.0115rem"];
591
+ "heading-light-1": ["font-size-10", 64, 400, "0.0115rem"];
592
+ "heading-light-2": ["font-size-9", 56, 400, "0.0115rem"];
593
+ "heading-light-3": ["font-size-8", 48, 400, "0.0115rem"];
594
+ "heading-light-4": ["font-size-7", 40, 400, "0.0115rem"];
595
+ "heading-light-5": ["font-size-6", 32, 400, "0.0115rem"];
596
+ "heading-light-6": ["font-size-5", 24, 400, "0.0115rem"];
597
+ "heading-light-7": ["font-size-3", 20, 400, "0.0115rem"];
598
+ "body-1": ["font-size-4", 28, 300, "-0.005rem"];
599
+ "body-2": ["font-size-3", 24, 300, "-0.005rem"];
600
+ "body-3": ["font-size-2", 20, 300, "-0.005rem"];
601
+ "body-4": ["font-size-1", 16, 300, "-0.005rem"];
602
+ "body-1-bold": ["font-size-4", 28, 700, "-0.005rem"];
603
+ "body-2-bold": ["font-size-3", 24, 700, "-0.005rem"];
604
+ "body-3-bold": ["font-size-2", 20, 700, "-0.005rem"];
605
+ "list-item-1": ["font-size-4", 32, 300, "-0.005rem"];
606
+ "list-item-2": ["font-size-3", 24, 300, "-0.005rem"];
606
607
  };
607
608
  type OakFontToken = keyof typeof oakFontTokens;
608
- declare const oakTextDecorations: string[];
609
- declare const oakWhiteSpaces: string[];
610
- declare const oakWordWraps: string[];
611
- declare const oakTextOverflows: string[];
612
- type OakTextDecoration = (typeof oakTextDecorations)[number];
613
- type OakWhiteSpace = (typeof oakWhiteSpaces)[number];
614
- type OakWordWrap = (typeof oakWordWraps)[number];
615
- type OakTextOverflow = (typeof oakTextOverflows)[number];
609
+ declare const oakTextDecorationsConst: readonly ["underline", "overline", "line-through", "none"];
610
+ declare const oakWhiteSpacesConst: readonly ["normal", "nowrap", "pre", "pre-wrap", "pre-line", "break-spaces"];
611
+ declare const oakWordWrapsConst: readonly ["normal", "break-word", "initial", "inherit"];
612
+ declare const oakTextOverflowsConst: readonly ["clip", "ellipsis"];
613
+ type OakTextDecoration = (typeof oakTextDecorationsConst)[number];
614
+ type OakWhiteSpace = (typeof oakWhiteSpacesConst)[number];
615
+ type OakWordWrap = (typeof oakWordWrapsConst)[number];
616
+ type OakTextOverflow = (typeof oakTextOverflowsConst)[number];
616
617
 
617
618
  type TypographyStyleProps = {
618
619
  /**
@@ -904,8 +905,9 @@ declare const OakTypography: styled_components.StyledComponent<"div", styled_com
904
905
  onClick?: React$1.MouseEventHandler | undefined;
905
906
  }, never>;
906
907
 
907
- declare const oakHeadingTags: string[];
908
- type OakHeadingTag = (typeof oakHeadingTags)[number];
908
+ declare const oakHeadingTagsConst: readonly ["div", "h1", "h2", "h3", "h4", "h5", "h6"];
909
+ type OakHeadingTag = (typeof oakHeadingTagsConst)[number];
910
+ declare const oakHeadingTags: ("div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6")[];
909
911
  type OakHeadingTagProps = {
910
912
  children?: React__default.ReactNode;
911
913
  id?: string;
@@ -1650,7 +1652,7 @@ declare const OakRadioButton: React__default.ForwardRefExoticComponent<{
1650
1652
  /**
1651
1653
  * Allows the background color of the radio button to be customized.
1652
1654
  */
1653
- radioBackground?: string | undefined;
1655
+ radioBackground?: OakCombinedColorToken | undefined;
1654
1656
  /**
1655
1657
  * Allows the width of the radio button border to be customized when the radio button is checked.
1656
1658
  */
@@ -1946,6 +1948,18 @@ type OakHandDrawnBoxWithIconProps = Omit<OakHandDrawnCardProps, "children"> & {
1946
1948
  */
1947
1949
  declare const OakHandDrawnCardWithIcon: ({ iconName, iconColor, iconWidth, iconHeight, alt, $width, $height, $alignItems, $justifyContent, ...props }: OakHandDrawnBoxWithIconProps) => React__default.JSX.Element;
1948
1950
 
1951
+ type OakHandDrawnHRProps = {
1952
+ hrColor?: InternalStyledSvgProps["$fill"];
1953
+ } & SpacingStyleProps & SizeStyleProps;
1954
+ /**
1955
+ * A Drawn HR svg inside a flex container
1956
+ *
1957
+ * use prop hrColor to change the color of the HR
1958
+ *
1959
+ * change the sizeProps of the flex container to change the size and dimentions of the HR
1960
+ */
1961
+ declare const OakHandDrawnHR: (props: OakHandDrawnHRProps) => React__default.JSX.Element;
1962
+
1949
1963
  /**
1950
1964
  * Renders a tag with the text "New"
1951
1965
  */
@@ -2572,7 +2586,7 @@ type OakPupilJourneyYearButtonProps = {
2572
2586
  */
2573
2587
  declare const OakPupilJourneyYearButton: <C extends React__default.ElementType = "button">({ phase, element, ...rest }: {
2574
2588
  phase: "primary" | "secondary";
2575
- } & Omit<InternalShadowRectButtonProps, "defaultBackground" | "defaultBorderColor" | "defaultTextColor" | "disabledTextColor" | "hoverTextColor" | "hoverBackground" | "hoverBorderColor" | "disabledBackground" | "disabledBorderColor" | "pv" | "ph" | "font"> & {
2589
+ } & Omit<InternalShadowRectButtonProps, "font" | "defaultBackground" | "defaultBorderColor" | "defaultTextColor" | "disabledTextColor" | "hoverTextColor" | "hoverBackground" | "hoverBorderColor" | "disabledBackground" | "disabledBorderColor" | "pv" | "ph"> & {
2576
2590
  element?: C | undefined;
2577
2591
  } & React__default.PropsWithoutRef<React__default.ComponentProps<C>>) => React__default.JSX.Element;
2578
2592
 
@@ -2597,7 +2611,7 @@ type OakPupilJourneySubjectButtonProps = {
2597
2611
  declare const OakPupilJourneySubjectButton: <C extends React__default.ElementType = "button">({ phase, element, subjectIconName, ...rest }: {
2598
2612
  phase: "primary" | "secondary";
2599
2613
  subjectIconName: OakIconName;
2600
- } & Omit<InternalShadowRectButtonProps, "defaultBackground" | "defaultBorderColor" | "defaultTextColor" | "disabledTextColor" | "hoverTextColor" | "hoverBackground" | "hoverBorderColor" | "disabledBackground" | "disabledBorderColor" | "pv" | "ph" | "font"> & {
2614
+ } & Omit<InternalShadowRectButtonProps, "font" | "defaultBackground" | "defaultBorderColor" | "defaultTextColor" | "disabledTextColor" | "hoverTextColor" | "hoverBackground" | "hoverBorderColor" | "disabledBackground" | "disabledBorderColor" | "pv" | "ph"> & {
2601
2615
  element?: C | undefined;
2602
2616
  } & React__default.PropsWithoutRef<React__default.ComponentProps<C>>) => React__default.JSX.Element;
2603
2617
 
@@ -2976,4 +2990,4 @@ type OakHeaderHeroProps = {
2976
2990
  */
2977
2991
  declare const OakHeaderHero: styled_components.StyledComponent<(props: OakHeaderHeroProps) => React__default.JSX.Element, styled_components.DefaultTheme, {}, never>;
2978
2992
 
2979
- export { HeadingTagComponent, OakAccordion, type OakAccordionProps, type OakAllSpacingToken, OakAnchorTarget, type OakAnchorTargetProps, OakBackLink, type OakBackLinkProps, type OakBorderRadiusToken, type OakBorderWidthToken, OakBox, type OakBoxProps, OakBulletList, type OakBulletListProps, OakCardHeader, type OakCardHeaderprops, OakCheckBox, type OakCheckBoxProps, OakCloudinaryConfigProvider, OakCloudinaryImage, type OakCloudinaryImageProps, OakCollapsibleContent, type OakCollapsibleContentProps, type OakColorToken, type OakCombinedColorToken, type OakCombinedSpacingToken, OakCookieBanner, type OakCookieBannerProps, OakCookieConsent, type OakCookieConsentProps, OakCookieConsentProvider, OakCookieSettingsModal, type OakCookieSettingsModalProps, OakDragAndDropInstructions, OakDraggable, OakDraggableFeedback, type OakDropShadowToken, OakDroppable, type OakDroppableProps, OakFieldError, type OakFieldErrorProps, OakFlex, type OakFlexProps, type OakFontSizeToken, type OakFontToken, OakForm, type OakFormProps, OakGlobalStyle, OakGrid, OakGridArea, type OakGridAreaProps, type OakGridProps, type OakHandDrawnBoxWithIconProps, OakHandDrawnCard, type OakHandDrawnCardProps, OakHandDrawnCardWithIcon, OakHeaderHero, type OakHeaderHeroProps, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, OakInfo, OakInfoButton, type OakInfoButtonProps, type OakInfoCardProps, type OakInfoProps, type OakInnerPaddingToken, OakKbd, type OakKbdProps, OakLI, type OakLIProps, OakLabel, type OakLabelProps, OakLessonBottomNav, type OakLessonBottomNavProps, OakLessonInfoCard, OakLessonLayout, type OakLessonLayoutProps, OakLessonNavItem, type OakLessonNavItemProps, OakLessonReviewItem, type OakLessonReviewItemProps, OakLessonTopNav, type OakLessonTopNavProps, OakLessonVideoTranscript, OakLink, type OakLinkProps, OakLoadingSpinner, type OakLoadingSpinnerProps, OakMaxWidth, OakModal, OakModalBody, type OakModalBodyProps, OakModalFooter, type OakModalFooterProps, type OakModalProps, OakOL, type OakOLProps, type OakOpacityToken, OakP, type OakPProps, OakPrimaryButton, type OakPrimaryButtonProps, OakPrimaryInvertedButton, type OakPrimaryInvertedButtonProps, OakPrimaryNav, OakPrimaryNavItem, type OakPrimaryNavItemProps, type OakPrimaryNavProps, OakPromoTag, OakPupilJourneyHeader, type OakPupilJourneyHeaderProps, OakPupilJourneyLayout, type OakPupilJourneyLayoutProps, OakPupilJourneyList, OakPupilJourneyListCounter, OakPupilJourneyListItem, type OakPupilJourneyListProps, OakPupilJourneyPreviousLessons, type OakPupilJourneyPreviousLessonsProps, OakPupilJourneySubjectButton, type OakPupilJourneySubjectButtonProps, OakPupilJourneyYearButton, type OakPupilJourneyYearButtonProps, OakQuizCheckBox, type OakQuizCheckBoxProps, OakQuizCounter, type OakQuizCounterProps, OakQuizFeedback, type OakQuizFeedbackProps, OakQuizHint, type OakQuizHintProps, OakQuizMatch, type OakQuizMatchProps, OakQuizOrder, type OakQuizOrderProps, OakQuizRadioButton, type OakQuizRadioButtonProps, OakQuizTextInput, OakRadioButton, OakRadioGroup, OakRoundIcon, type OakRoundIconProps, OakSearchFilterCheckBox, type OakSearchFilterCheckBoxProps, OakSecondaryButton, type OakSecondaryButtonProps, OakSecondaryLink, type OakSecondaryLinkProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakStaticMessageCard, OakSubjectIcon, type OakSubjectIconProps, OakTertiaryButton, OakTertiaryOLNav, type OakTertiaryOLNavProps, OakTextInput, type OakTextInputProps, type OakTheme, OakThemeProvider, type OakThemeProviderProps, OakTooltip, type OakTooltipProps, type OakTransitionToken, OakTypography, type OakTypographyProps, OakUL, type OakULProps, type OakUiRoleToken, isValidIconName, oakAllSpacingTokens, oakBorderRadiusTokens, oakBorderWidthTokens, oakBoxCss, oakColorTokens, oakDefaultTheme, oakDropShadowTokens, oakFontSizeTokens, oakFontTokens, oakHeadingTags, oakIconNames, oakInnerPaddingTokens, oakOpacityTokens, oakSpaceBetweenTokens, oakTransitionTokens, oakUiRoleTokens, useCookieConsent };
2993
+ export { HeadingTagComponent, OakAccordion, type OakAccordionProps, type OakAllSpacingToken, OakAnchorTarget, type OakAnchorTargetProps, OakBackLink, type OakBackLinkProps, type OakBorderRadiusToken, type OakBorderWidthToken, OakBox, type OakBoxProps, OakBulletList, type OakBulletListProps, OakCardHeader, type OakCardHeaderprops, OakCheckBox, type OakCheckBoxProps, OakCloudinaryConfigProvider, OakCloudinaryImage, type OakCloudinaryImageProps, OakCollapsibleContent, type OakCollapsibleContentProps, type OakColorToken, type OakCombinedColorToken, type OakCombinedSpacingToken, OakCookieBanner, type OakCookieBannerProps, OakCookieConsent, type OakCookieConsentProps, OakCookieConsentProvider, OakCookieSettingsModal, type OakCookieSettingsModalProps, OakDragAndDropInstructions, OakDraggable, OakDraggableFeedback, type OakDropShadowToken, OakDroppable, type OakDroppableProps, OakFieldError, type OakFieldErrorProps, OakFlex, type OakFlexProps, type OakFontSizeToken, type OakFontToken, OakForm, type OakFormProps, OakGlobalStyle, OakGrid, OakGridArea, type OakGridAreaProps, type OakGridProps, type OakHandDrawnBoxWithIconProps, OakHandDrawnCard, type OakHandDrawnCardProps, OakHandDrawnCardWithIcon, OakHandDrawnHR, type OakHandDrawnHRProps, OakHeaderHero, type OakHeaderHeroProps, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, OakInfo, OakInfoButton, type OakInfoButtonProps, type OakInfoCardProps, type OakInfoProps, type OakInnerPaddingToken, OakKbd, type OakKbdProps, OakLI, type OakLIProps, OakLabel, type OakLabelProps, OakLessonBottomNav, type OakLessonBottomNavProps, OakLessonInfoCard, OakLessonLayout, type OakLessonLayoutProps, OakLessonNavItem, type OakLessonNavItemProps, OakLessonReviewItem, type OakLessonReviewItemProps, OakLessonTopNav, type OakLessonTopNavProps, OakLessonVideoTranscript, OakLink, type OakLinkProps, OakLoadingSpinner, type OakLoadingSpinnerProps, OakMaxWidth, OakModal, OakModalBody, type OakModalBodyProps, OakModalFooter, type OakModalFooterProps, type OakModalProps, OakOL, type OakOLProps, type OakOpacityToken, OakP, type OakPProps, OakPrimaryButton, type OakPrimaryButtonProps, OakPrimaryInvertedButton, type OakPrimaryInvertedButtonProps, OakPrimaryNav, OakPrimaryNavItem, type OakPrimaryNavItemProps, type OakPrimaryNavProps, OakPromoTag, OakPupilJourneyHeader, type OakPupilJourneyHeaderProps, OakPupilJourneyLayout, type OakPupilJourneyLayoutProps, OakPupilJourneyList, OakPupilJourneyListCounter, OakPupilJourneyListItem, type OakPupilJourneyListProps, OakPupilJourneyPreviousLessons, type OakPupilJourneyPreviousLessonsProps, OakPupilJourneySubjectButton, type OakPupilJourneySubjectButtonProps, OakPupilJourneyYearButton, type OakPupilJourneyYearButtonProps, OakQuizCheckBox, type OakQuizCheckBoxProps, OakQuizCounter, type OakQuizCounterProps, OakQuizFeedback, type OakQuizFeedbackProps, OakQuizHint, type OakQuizHintProps, OakQuizMatch, type OakQuizMatchProps, OakQuizOrder, type OakQuizOrderProps, OakQuizRadioButton, type OakQuizRadioButtonProps, OakQuizTextInput, OakRadioButton, OakRadioGroup, OakRoundIcon, type OakRoundIconProps, OakSearchFilterCheckBox, type OakSearchFilterCheckBoxProps, OakSecondaryButton, type OakSecondaryButtonProps, OakSecondaryLink, type OakSecondaryLinkProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakStaticMessageCard, OakSubjectIcon, type OakSubjectIconProps, OakTertiaryButton, OakTertiaryOLNav, type OakTertiaryOLNavProps, OakTextInput, type OakTextInputProps, type OakTheme, OakThemeProvider, type OakThemeProviderProps, OakTooltip, type OakTooltipProps, type OakTransitionToken, OakTypography, type OakTypographyProps, OakUL, type OakULProps, type OakUiRoleToken, isValidIconName, oakAllSpacingTokens, oakBorderRadiusTokens, oakBorderWidthTokens, oakBoxCss, oakColorTokens, oakDefaultTheme, oakDropShadowTokens, oakFontSizeTokens, oakFontTokens, oakHeadingTags, oakIconNames, oakInnerPaddingTokens, oakOpacityTokens, oakSpaceBetweenTokens, oakTransitionTokens, oakUiRoleTokens, useCookieConsent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-components",
3
- "version": "0.32.0",
3
+ "version": "0.32.2",
4
4
  "licence": "MIT",
5
5
  "description": "Shared components for Oak applications",
6
6
  "main": "dist/cjs/index.js",