@oaknational/oak-components 0.0.30 → 0.0.32

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
@@ -1,7 +1,7 @@
1
1
  import * as styled_components from 'styled-components';
2
2
  import { CSSProperties as CSSProperties$1 } from 'styled-components';
3
3
  import * as React$1 from 'react';
4
- import React__default, { CSSProperties, MouseEventHandler, ElementType, ComponentPropsWithoutRef, FC, ReactNode, FocusEvent, DetailedHTMLProps, InputHTMLAttributes, ChangeEventHandler, ReactElement } from 'react';
4
+ import React__default, { CSSProperties, MouseEventHandler, ElementType, ComponentPropsWithoutRef, FC, ReactNode, FocusEvent, DetailedHTMLProps, InputHTMLAttributes, ChangeEventHandler, ReactElement, ComponentProps } from 'react';
5
5
  import * as Image from 'next/image';
6
6
  import Image__default, { ImageProps as ImageProps$1 } from 'next/image';
7
7
  import * as next_dist_shared_lib_get_img_props from 'next/dist/shared/lib/get-img-props';
@@ -536,6 +536,7 @@ type OakLabelProps = TypographyStyleProps & ColorStyleProps;
536
536
  declare const OakLabel: styled_components.StyledComponent<"label", styled_components.DefaultTheme, TypographyStyleProps & ColorStyleProps, never>;
537
537
 
538
538
  declare const icons: {
539
+ readonly "question-mark": "v1706872277/icons/question-mark.svg";
539
540
  readonly home: "v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg";
540
541
  readonly send: "v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg";
541
542
  readonly rocket: "v1699894015/icons/u26xm5hteot875ozfnk9.svg";
@@ -547,9 +548,9 @@ declare const icons: {
547
548
  readonly worksheet: "v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg";
548
549
  readonly facebook: "v1699895330/icons/iojlvh3o5lshy2jupyph.svg";
549
550
  readonly share: "v1699895363/icons/agcmduftef3wcla6gzec.svg";
550
- readonly "arrow-right": "v1699895398/icons/fv0z57zerrioft52dd9n.svg";
551
+ readonly "arrow-right": "v1707149070/icons/fv0z57zerrioft52dd9n.svg";
551
552
  readonly "worksheet-3": "v1699895429/icons/bzhojpjxp9rukdvh7daz.svg";
552
- readonly "chevron-right": "v1699895475/icons/rhzft6wnpdp3nvsmlyei.svg";
553
+ readonly "chevron-right": "v1707146553/icons/rhzft6wnpdp3nvsmlyei.svg";
553
554
  readonly save: "v1699895505/icons/rh1ahwwtbemvz0ihluew.svg";
554
555
  readonly "quiz-3": "v1699895534/icons/zoayhgtrotv32fad7d3k.svg";
555
556
  readonly "chevron-down": "v1699953557/icons/botfld6brychmttwtv6u.svg";
@@ -558,13 +559,13 @@ declare const icons: {
558
559
  readonly books: "v1699953657/icons/hz4l3iq6i68kazvkvorq.svg";
559
560
  readonly "supervision-level": "v1699953696/icons/cwqhknapp3maa4g0t3lj.svg";
560
561
  readonly "quiz-white": "v1699953730/icons/gpcehpgr9mqoumsa25xe.svg";
561
- readonly "arrow-left": "v1699953763/icons/ejrm9dpgpzb7ddbo8z2i.svg";
562
+ readonly "arrow-left": "v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg";
562
563
  readonly "additional-material": "v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg";
563
564
  readonly "slide-deck-3": "v1699953830/icons/sm92moja9d5utu3cj16c.svg";
564
565
  readonly "sign-language": "v1699953861/icons/ns94ozvozzi22enxkx0x.svg";
565
566
  readonly external: "v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg";
566
567
  readonly "equipment-required": "v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg";
567
- readonly "chevron-left": "v1699953962/icons/xpp10hijwzhyeqt6ylqf.svg";
568
+ readonly "chevron-left": "v1707146774/icons/xpp10hijwzhyeqt6ylqf.svg";
568
569
  readonly download: "v1699953991/icons/dk0f6a6hdpzxftjosngn.svg";
569
570
  readonly search: "v1704901279/icons/canbi3fuz5fanzom2hvi.svg";
570
571
  readonly "chevron-up": "v1699954058/icons/pay71thmhhylj7z28sj1.svg";
@@ -624,7 +625,7 @@ declare const icons: {
624
625
  };
625
626
  type IconName = keyof typeof icons;
626
627
 
627
- declare const oakIconNames: ("search" | "video" | "download" | "home" | "send" | "rocket" | "edit" | "hamburger" | "cross" | "bell" | "twitter" | "worksheet" | "facebook" | "share" | "arrow-right" | "worksheet-3" | "chevron-right" | "save" | "quiz-3" | "chevron-down" | "linkedin" | "magic-carpet" | "books" | "supervision-level" | "quiz-white" | "arrow-left" | "additional-material" | "slide-deck-3" | "sign-language" | "external" | "equipment-required" | "chevron-left" | "chevron-up" | "go" | "copyright" | "arrow-down" | "project" | "slide-deck" | "content-guidance" | "tick" | "instagram" | "dot" | "dot-png" | "warning" | "lightbulb-yellow" | "lightbulb" | "quiz" | "intro" | "subject-art" | "subject-biology" | "subject-chemistry" | "subject-citizenship" | "subject-combined-science" | "subject-communication-and-language" | "subject-computing" | "subject-computing-non-gcse" | "subject-creative-arts" | "subject-design-technology" | "subject-drama" | "subject-english" | "subject-english-grammar" | "subject-english-reading-for-pleasure" | "subject-english-spelling" | "subject-french" | "subject-geography" | "subject-german" | "subject-history" | "subject-independent-living" | "subject-latin" | "subject-maths" | "subject-music" | "subject-numeracy" | "occupational-therapy" | "subject-physical-development" | "subject-physical-education" | "subject-physical-therapy" | "subject-physics" | "subject-religious-education" | "subject-rshe-pshe" | "subject-science" | "subject-sensory-integration" | "subject-spanish" | "subject-speech-and-language-therapy" | "subject-therapy" | "subject-understanding-the-world")[];
628
+ declare const oakIconNames: ("search" | "video" | "download" | "question-mark" | "home" | "send" | "rocket" | "edit" | "hamburger" | "cross" | "bell" | "twitter" | "worksheet" | "facebook" | "share" | "arrow-right" | "worksheet-3" | "chevron-right" | "save" | "quiz-3" | "chevron-down" | "linkedin" | "magic-carpet" | "books" | "supervision-level" | "quiz-white" | "arrow-left" | "additional-material" | "slide-deck-3" | "sign-language" | "external" | "equipment-required" | "chevron-left" | "chevron-up" | "go" | "copyright" | "arrow-down" | "project" | "slide-deck" | "content-guidance" | "tick" | "instagram" | "dot" | "dot-png" | "warning" | "lightbulb-yellow" | "lightbulb" | "quiz" | "intro" | "subject-art" | "subject-biology" | "subject-chemistry" | "subject-citizenship" | "subject-combined-science" | "subject-communication-and-language" | "subject-computing" | "subject-computing-non-gcse" | "subject-creative-arts" | "subject-design-technology" | "subject-drama" | "subject-english" | "subject-english-grammar" | "subject-english-reading-for-pleasure" | "subject-english-spelling" | "subject-french" | "subject-geography" | "subject-german" | "subject-history" | "subject-independent-living" | "subject-latin" | "subject-maths" | "subject-music" | "subject-numeracy" | "occupational-therapy" | "subject-physical-development" | "subject-physical-education" | "subject-physical-therapy" | "subject-physics" | "subject-religious-education" | "subject-rshe-pshe" | "subject-science" | "subject-sensory-integration" | "subject-spanish" | "subject-speech-and-language-therapy" | "subject-therapy" | "subject-understanding-the-world")[];
628
629
  type OakIconName = IconName;
629
630
  type OakIconProps = Omit<OakImageProps, "alt" | "src"> & {
630
631
  iconName: OakIconName;
@@ -833,7 +834,7 @@ declare const OakTertiaryButton: <C extends React__default.ElementType = "button
833
834
  iconBackground?: OakRoundIconProps["$background"];
834
835
  iconColorFilter?: OakRoundIconProps["$colorFilter"];
835
836
  isTrailingIcon?: boolean | undefined;
836
- iconName?: "search" | "video" | "download" | "home" | "send" | "rocket" | "edit" | "hamburger" | "cross" | "bell" | "twitter" | "worksheet" | "facebook" | "share" | "arrow-right" | "worksheet-3" | "chevron-right" | "save" | "quiz-3" | "chevron-down" | "linkedin" | "magic-carpet" | "books" | "supervision-level" | "quiz-white" | "arrow-left" | "additional-material" | "slide-deck-3" | "sign-language" | "external" | "equipment-required" | "chevron-left" | "chevron-up" | "go" | "copyright" | "arrow-down" | "project" | "slide-deck" | "content-guidance" | "tick" | "instagram" | "dot" | "dot-png" | "warning" | "lightbulb-yellow" | "lightbulb" | "quiz" | "intro" | "subject-art" | "subject-biology" | "subject-chemistry" | "subject-citizenship" | "subject-combined-science" | "subject-communication-and-language" | "subject-computing" | "subject-computing-non-gcse" | "subject-creative-arts" | "subject-design-technology" | "subject-drama" | "subject-english" | "subject-english-grammar" | "subject-english-reading-for-pleasure" | "subject-english-spelling" | "subject-french" | "subject-geography" | "subject-german" | "subject-history" | "subject-independent-living" | "subject-latin" | "subject-maths" | "subject-music" | "subject-numeracy" | "occupational-therapy" | "subject-physical-development" | "subject-physical-education" | "subject-physical-therapy" | "subject-physics" | "subject-religious-education" | "subject-rshe-pshe" | "subject-science" | "subject-sensory-integration" | "subject-spanish" | "subject-speech-and-language-therapy" | "subject-therapy" | "subject-understanding-the-world" | undefined;
837
+ iconName?: "search" | "video" | "download" | "question-mark" | "home" | "send" | "rocket" | "edit" | "hamburger" | "cross" | "bell" | "twitter" | "worksheet" | "facebook" | "share" | "arrow-right" | "worksheet-3" | "chevron-right" | "save" | "quiz-3" | "chevron-down" | "linkedin" | "magic-carpet" | "books" | "supervision-level" | "quiz-white" | "arrow-left" | "additional-material" | "slide-deck-3" | "sign-language" | "external" | "equipment-required" | "chevron-left" | "chevron-up" | "go" | "copyright" | "arrow-down" | "project" | "slide-deck" | "content-guidance" | "tick" | "instagram" | "dot" | "dot-png" | "warning" | "lightbulb-yellow" | "lightbulb" | "quiz" | "intro" | "subject-art" | "subject-biology" | "subject-chemistry" | "subject-citizenship" | "subject-combined-science" | "subject-communication-and-language" | "subject-computing" | "subject-computing-non-gcse" | "subject-creative-arts" | "subject-design-technology" | "subject-drama" | "subject-english" | "subject-english-grammar" | "subject-english-reading-for-pleasure" | "subject-english-spelling" | "subject-french" | "subject-geography" | "subject-german" | "subject-history" | "subject-independent-living" | "subject-latin" | "subject-maths" | "subject-music" | "subject-numeracy" | "occupational-therapy" | "subject-physical-development" | "subject-physical-education" | "subject-physical-therapy" | "subject-physics" | "subject-religious-education" | "subject-rshe-pshe" | "subject-science" | "subject-sensory-integration" | "subject-spanish" | "subject-speech-and-language-therapy" | "subject-therapy" | "subject-understanding-the-world" | undefined;
837
838
  } & {
838
839
  element?: C | undefined;
839
840
  } & React__default.PropsWithoutRef<React__default.ComponentProps<C>>) => React__default.JSX.Element;
@@ -1038,14 +1039,17 @@ type OakTextInputProps = {
1038
1039
  readOnlyBorderColor?: OakCombinedColorToken;
1039
1040
  disabledColor?: OakCombinedColorToken;
1040
1041
  readOnlyColor?: OakCombinedColorToken;
1041
- width?: SizeStyleProps["$width"];
1042
- maxWidth?: SizeStyleProps["$maxWidth"];
1042
+ /**
1043
+ * The width of the surrounding div - the input and icon will fill this
1044
+ */
1045
+ wrapperWidth?: SizeStyleProps["$width"];
1046
+ wrapperMaxWidth?: SizeStyleProps["$maxWidth"];
1043
1047
  iconAlt?: string;
1044
1048
  } & InternalTextInputProps;
1045
1049
  /**
1046
1050
  * Default input which can be extended to create specialised inputs.
1047
1051
  */
1048
- declare const OakTextInput: ({ type, borderColor, readOnlyBorderColor, focusRingDropShadows, background, hoverBackground, disabledBackgroundColor, color, disabledColor, readOnlyColor, validity, iconColor, validBorderColor, invalidBorderColor, validIconColor, invalidIconColor, iconName, iconAlt, isTrailingIcon, width, maxWidth, ...props }: OakTextInputProps) => React__default.JSX.Element;
1052
+ declare const OakTextInput: ({ type, borderColor, readOnlyBorderColor, focusRingDropShadows, background, hoverBackground, disabledBackgroundColor, color, disabledColor, readOnlyColor, validity, iconColor, validBorderColor, invalidBorderColor, validIconColor, invalidIconColor, iconName, iconAlt, isTrailingIcon, wrapperWidth, wrapperMaxWidth, ...props }: OakTextInputProps) => React__default.JSX.Element;
1049
1053
 
1050
1054
  type InternalTooltipProps = OakFlexProps & {
1051
1055
  isOpen: boolean;
@@ -1120,6 +1124,30 @@ declare const OakHandDrawnCardWithIcon: ({ iconName, iconColor, iconWidth, iconH
1120
1124
  */
1121
1125
  declare const OakPromoTag: () => React__default.JSX.Element;
1122
1126
 
1127
+ type OakInfoCardProps = {
1128
+ children: React__default.ReactNode;
1129
+ };
1130
+ type OakCardHeaderprops = {
1131
+ iconName: OakIconName;
1132
+ tag: OakHeadingTag;
1133
+ children: string;
1134
+ };
1135
+ declare const OakCardHeader: (props: OakCardHeaderprops) => React__default.JSX.Element;
1136
+ declare const OakLessonInfoCard: (props: OakInfoCardProps) => React__default.JSX.Element;
1137
+ declare const OakStaticMessageCard: (props: OakInfoCardProps) => React__default.JSX.Element;
1138
+
1139
+ type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {
1140
+ /**
1141
+ * Whether the content is displayed or not
1142
+ */
1143
+ isOpen: boolean;
1144
+ };
1145
+ /**
1146
+ * A filled scrollable box that can be hidden with the `isOpen` prop.
1147
+ * Useful for hiding content that is not immediately relevant
1148
+ */
1149
+ declare const OakCollapsibleContent: ({ isOpen, children, id, ...rest }: OakCollapsibleContentProps) => React__default.JSX.Element;
1150
+
1123
1151
  type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, "defaultChecked"> & {
1124
1152
  feedback?: "correct" | "incorrect" | null;
1125
1153
  image?: React__default.JSX.Element;
@@ -1323,4 +1351,23 @@ type OakPrimaryNavProps = {
1323
1351
  };
1324
1352
  declare const OakPrimaryNav: ({ ariaLabel, navItems }: OakPrimaryNavProps) => React__default.JSX.Element;
1325
1353
 
1326
- export { HeadingTagComponent, type OakAllSpacingToken, OakBackLink, type OakBackLinkProps, type OakBorderRadiusToken, type OakBorderWidthToken, OakBox, type OakBoxProps, OakBulletList, type OakBulletListProps, OakCheckBox, type OakCheckBoxProps, OakCloudinaryConfigProvider, OakCloudinaryImage, type OakCloudinaryImageProps, type OakColorToken, type OakCombinedColorToken, type OakCombinedSpacingToken, type OakDropShadowToken, OakFieldError, type OakFieldErrorProps, OakFlex, type OakFlexProps, type OakFontSizeToken, type OakFontToken, OakForm, type OakFormProps, OakGrid, OakGridArea, type OakGridAreaProps, type OakGridProps, type OakHandDrawnBoxWithIconProps, OakHandDrawnCard, type OakHandDrawnCardProps, OakHandDrawnCardWithIcon, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, type OakInnerPaddingToken, OakLI, type OakLIProps, OakLabel, type OakLabelProps, OakLessonBottomNav, type OakLessonBottomNavProps, OakLessonLayout, type OakLessonLayoutProps, OakLessonNavItem, type OakLessonNavItemProps, OakLessonReviewItem, type OakLessonReviewItemProps, OakLessonTopNav, type OakLessonTopNavProps, OakLoadingSpinner, type OakLoadingSpinnerProps, OakMaxWidth, OakOL, type OakOLProps, type OakOpacityToken, OakP, type OakPProps, OakPrimaryButton, type OakPrimaryButtonProps, OakPrimaryInvertedButton, type OakPrimaryInvertedButtonProps, OakPrimaryNav, OakPrimaryNavItem, type OakPrimaryNavItemProps, type OakPrimaryNavProps, OakPromoTag, OakQuizCheckBox, type OakQuizCheckBoxProps, OakQuizCounter, type OakQuizCounterProps, OakQuizFeedback, type OakQuizFeedbackProps, OakQuizHint, type OakQuizHintProps, OakQuizRadioButton, type OakQuizRadioButtonProps, OakQuizTextInput, OakRadioButton, OakRadioGroup, OakRoundIcon, type OakRoundIconProps, OakSecondaryButton, type OakSecondaryButtonProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakSubjectIcon, type OakSubjectIconProps, OakTertiaryButton, OakTextInput, type OakTextInputProps, type OakTheme, OakThemeProvider, type OakThemeProviderProps, OakTooltip, 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 };
1354
+ type OakLessonVideoTranscriptProps = {
1355
+ /**
1356
+ * The transcript content
1357
+ */
1358
+ children: ReactNode;
1359
+ /**
1360
+ * The id of the collapsible content element. This is used to link the button to the content
1361
+ */
1362
+ id: string;
1363
+ /**
1364
+ * A control to toggle the video to display sign language
1365
+ */
1366
+ signLanguageControl?: ReactNode;
1367
+ };
1368
+ /**
1369
+ * Display a togglable video transcript with a slot to display a sign language control
1370
+ */
1371
+ declare const OakLessonVideoTranscript: ({ children, id, signLanguageControl, }: OakLessonVideoTranscriptProps) => React__default.JSX.Element;
1372
+
1373
+ export { HeadingTagComponent, type OakAllSpacingToken, 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, type OakDropShadowToken, OakFieldError, type OakFieldErrorProps, OakFlex, type OakFlexProps, type OakFontSizeToken, type OakFontToken, OakForm, type OakFormProps, OakGrid, OakGridArea, type OakGridAreaProps, type OakGridProps, type OakHandDrawnBoxWithIconProps, OakHandDrawnCard, type OakHandDrawnCardProps, OakHandDrawnCardWithIcon, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, type OakInfoCardProps, type OakInnerPaddingToken, OakLI, type OakLIProps, OakLabel, type OakLabelProps, OakLessonBottomNav, type OakLessonBottomNavProps, OakLessonInfoCard, OakLessonLayout, type OakLessonLayoutProps, OakLessonNavItem, type OakLessonNavItemProps, OakLessonReviewItem, type OakLessonReviewItemProps, OakLessonTopNav, type OakLessonTopNavProps, OakLessonVideoTranscript, OakLoadingSpinner, type OakLoadingSpinnerProps, OakMaxWidth, OakOL, type OakOLProps, type OakOpacityToken, OakP, type OakPProps, OakPrimaryButton, type OakPrimaryButtonProps, OakPrimaryInvertedButton, type OakPrimaryInvertedButtonProps, OakPrimaryNav, OakPrimaryNavItem, type OakPrimaryNavItemProps, type OakPrimaryNavProps, OakPromoTag, OakQuizCheckBox, type OakQuizCheckBoxProps, OakQuizCounter, type OakQuizCounterProps, OakQuizFeedback, type OakQuizFeedbackProps, OakQuizHint, type OakQuizHintProps, OakQuizRadioButton, type OakQuizRadioButtonProps, OakQuizTextInput, OakRadioButton, OakRadioGroup, OakRoundIcon, type OakRoundIconProps, OakSecondaryButton, type OakSecondaryButtonProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakStaticMessageCard, OakSubjectIcon, type OakSubjectIconProps, OakTertiaryButton, OakTextInput, type OakTextInputProps, type OakTheme, OakThemeProvider, type OakThemeProviderProps, OakTooltip, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-components",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "licence": "MIT",
5
5
  "description": "Shared components for Oak applications",
6
6
  "main": "dist/cjs/index.js",