@oaknational/oak-components 0.8.1 → 0.9.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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +72 -4
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1916,18 +1916,43 @@ type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {
|
|
|
1916
1916
|
*/
|
|
1917
1917
|
declare const OakCollapsibleContent: ({ isOpen, children, id, ...rest }: OakCollapsibleContentProps) => React__default.JSX.Element;
|
|
1918
1918
|
|
|
1919
|
-
type
|
|
1919
|
+
type InternalLinkProps = {
|
|
1920
|
+
/**
|
|
1921
|
+
* The icon to display before or after the children.
|
|
1922
|
+
*/
|
|
1920
1923
|
iconName?: OakIconProps["iconName"];
|
|
1924
|
+
/**
|
|
1925
|
+
* Whether the icon should be displayed after the children.
|
|
1926
|
+
*/
|
|
1921
1927
|
isTrailingIcon?: boolean;
|
|
1928
|
+
/**
|
|
1929
|
+
* Displays a loading spinner in place of the icon.
|
|
1930
|
+
*/
|
|
1922
1931
|
isLoading?: boolean;
|
|
1932
|
+
color: OakCombinedColorToken;
|
|
1933
|
+
visitedColor: OakCombinedColorToken;
|
|
1934
|
+
hoverColor: OakCombinedColorToken;
|
|
1935
|
+
activeColor: OakCombinedColorToken;
|
|
1936
|
+
disabledColor: OakCombinedColorToken;
|
|
1923
1937
|
};
|
|
1924
|
-
|
|
1938
|
+
|
|
1939
|
+
type OakLinkProps = Pick<InternalLinkProps, "iconName" | "isTrailingIcon" | "isLoading">;
|
|
1940
|
+
type OakLinkComponent$1 = <C extends React__default.ElementType = "a">(props: PolymorphicPropsWithRef<C> & OakLinkProps) => React__default.ReactNode;
|
|
1925
1941
|
/**
|
|
1926
1942
|
* A blue link with an optional icon and loading state.
|
|
1927
1943
|
*
|
|
1928
1944
|
* Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.
|
|
1929
1945
|
*/
|
|
1930
|
-
declare const OakLink: OakLinkComponent;
|
|
1946
|
+
declare const OakLink: OakLinkComponent$1;
|
|
1947
|
+
|
|
1948
|
+
type OakSecondaryLinkProps = Pick<InternalLinkProps, "iconName" | "isTrailingIcon" | "isLoading">;
|
|
1949
|
+
type OakLinkComponent = <C extends React__default.ElementType = "a">(props: PolymorphicPropsWithRef<C> & OakSecondaryLinkProps) => React__default.ReactNode;
|
|
1950
|
+
/**
|
|
1951
|
+
* A black link with an optional icon and loading state.
|
|
1952
|
+
*
|
|
1953
|
+
* Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.
|
|
1954
|
+
*/
|
|
1955
|
+
declare const OakSecondaryLink: OakLinkComponent;
|
|
1931
1956
|
|
|
1932
1957
|
/**
|
|
1933
1958
|
* Displays instructions for drag and drop functionality
|
|
@@ -2436,4 +2461,47 @@ type OakPrimaryNavProps = {
|
|
|
2436
2461
|
*/
|
|
2437
2462
|
declare const OakPrimaryNav: ({ ariaLabel, navItems }: OakPrimaryNavProps) => React__default.JSX.Element;
|
|
2438
2463
|
|
|
2439
|
-
|
|
2464
|
+
type OakCookieBannerProps = {
|
|
2465
|
+
/**
|
|
2466
|
+
* Triggered when the user clicks the "Hide this message" button.
|
|
2467
|
+
*/
|
|
2468
|
+
onHide(): void;
|
|
2469
|
+
/**
|
|
2470
|
+
* Triggered when the user clicks the "Accept all cookies" button.
|
|
2471
|
+
*/
|
|
2472
|
+
onAccept(): void;
|
|
2473
|
+
/**
|
|
2474
|
+
* Triggered when the user clicks the "Reject non-essential cookies" button.
|
|
2475
|
+
*/
|
|
2476
|
+
onReject(): void;
|
|
2477
|
+
/**
|
|
2478
|
+
* Triggered when the user clicks the "Cookie settings" button.
|
|
2479
|
+
*/
|
|
2480
|
+
onOpenSettings(): void;
|
|
2481
|
+
/**
|
|
2482
|
+
* The banner is intended to span the full width of the viewport.
|
|
2483
|
+
* this prop will set the maximum width of the inner content so that
|
|
2484
|
+
* it can line up with the rest of the content on the page.
|
|
2485
|
+
**/
|
|
2486
|
+
innerMaxWidth?: ResponsiveValues<OakAllSpacingToken>;
|
|
2487
|
+
/**
|
|
2488
|
+
* The current state of the cookie banner.
|
|
2489
|
+
*
|
|
2490
|
+
* - `initial` - The user has not made any choices.
|
|
2491
|
+
* - `accepted` - The user has accepted all cookies.
|
|
2492
|
+
* - `rejected` - The user has rejected non-essential cookies.
|
|
2493
|
+
*/
|
|
2494
|
+
state: "accepted" | "rejected" | "initial";
|
|
2495
|
+
/**
|
|
2496
|
+
* Whether the banner should be fixed to the bottom of the viewport.
|
|
2497
|
+
*
|
|
2498
|
+
* @default false
|
|
2499
|
+
*/
|
|
2500
|
+
isFixed?: boolean;
|
|
2501
|
+
};
|
|
2502
|
+
/**
|
|
2503
|
+
* A banner presenting the user with options to accept or reject cookies.
|
|
2504
|
+
*/
|
|
2505
|
+
declare const OakCookieBanner: ({ state, innerMaxWidth, onOpenSettings, onHide, onAccept, onReject, isFixed, }: OakCookieBannerProps) => React__default.JSX.Element;
|
|
2506
|
+
|
|
2507
|
+
export { HeadingTagComponent, OakAccordion, type OakAccordionProps, 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, OakCookieBanner, type OakCookieBannerProps, 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, OakHeading, type OakHeadingProps, type OakHeadingTag, OakHintButton, type OakHintButtonProps, OakIcon, type OakIconName, type OakIconProps, OakImage, type OakImageProps, type OakInfoCardProps, 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, 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, OakSecondaryButton, type OakSecondaryButtonProps, OakSecondaryLink, type OakSecondaryLinkProps, type OakSpaceBetweenToken, OakSpan, type OakSpanProps, OakStaticMessageCard, OakSubjectIcon, type OakSubjectIconProps, OakTertiaryButton, 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 };
|