@oaknational/oak-components 2.32.0 → 2.33.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/types.d.ts CHANGED
@@ -3065,6 +3065,22 @@ declare const OakKbd: ({ children }: OakKbdProps) => React__default.JSX.Element;
3065
3065
  */
3066
3066
  declare const OakScreenReader: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {}, never>;
3067
3067
 
3068
+ type OakLoadingSpinnerProps = Pick<SizeStyleProps, "$width"> & ColorStyleProps & {
3069
+ loaderColor?: OakUiRoleToken;
3070
+ /**
3071
+ * Delay the appearance of the spinner
3072
+ *
3073
+ * Accepts a number in milliseconds
3074
+ */
3075
+ $delay?: number;
3076
+ };
3077
+ /**
3078
+ *
3079
+ * A loading spinner of variable size.
3080
+ *
3081
+ */
3082
+ declare const OakLoadingSpinner: (props: OakLoadingSpinnerProps) => React__default.JSX.Element;
3083
+
3068
3084
  declare const oakHeadingTagsConst: readonly ["div", "h1", "h2", "h3", "h4", "h5", "h6"];
3069
3085
  type OakHeadingTag = (typeof oakHeadingTagsConst)[number];
3070
3086
  declare const oakHeadingTags: ("div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6")[];
@@ -3117,6 +3133,10 @@ type OakInlineBannerProps = OakFlexProps & {
3117
3133
  * The color filter to apply to the icon
3118
3134
  */
3119
3135
  iconColorFilter?: OakUiRoleToken;
3136
+ /**
3137
+ * If true show a loading spinner instead of an icon
3138
+ */
3139
+ isLoading?: boolean;
3120
3140
  /**
3121
3141
  * The optional call to action to display in the banner
3122
3142
  */
@@ -3150,7 +3170,8 @@ type BannerTypes = {
3150
3170
  declare const bannerTypes: BannerTypes;
3151
3171
  type OakInlineBannerVariantProps = {
3152
3172
  [key in OakInlineBannerVariants]: {
3153
- icon: Partial<OakIconProps>;
3173
+ defaultIconDimensions: Partial<SizeStyleProps>;
3174
+ loadingSpinnerDimensions: Partial<OakLoadingSpinnerProps>;
3154
3175
  heading: Partial<OakHeadingProps>;
3155
3176
  closeButtonWrapper?: Partial<OakBoxProps>;
3156
3177
  ctaWrapper?: Partial<OakBoxProps>;
@@ -3171,6 +3192,7 @@ declare const bannerVariants: OakInlineBannerVariantProps;
3171
3192
  * - **type?** \- Optional type of banner to display (info, neutral, success, alert, error, warning) (default: info)
3172
3193
  * - **icon?** \- Optional icon to display in the banner
3173
3194
  * - **iconColorFilter?** \- Optional color filter to apply to the icon
3195
+ * - **isLoading?** \- If true show a loading spinner instead of an icon
3174
3196
  * - **cta?** \- Optional call to action to display in the banner (ReactNode)
3175
3197
  * - **canDismiss?** \- If true the banner can be dismissed (show close icon) (default: false)
3176
3198
  * - **onDismiss?** \- Function called when the banner is dismissed
@@ -3178,23 +3200,7 @@ declare const bannerVariants: OakInlineBannerVariantProps;
3178
3200
  * - **variant?** \- The variant of the inline banner to display (regular, large) (default: regular)
3179
3201
  * - **...rest** \- Other props to be passed to the wrapper OakFlex component (can be used to override styles of the banner)
3180
3202
  */
3181
- declare const OakInlineBanner: ({ isOpen, title, message, type, cta, canDismiss, onDismiss, icon, iconColorFilter, closeButtonOverrideProps, variant, titleTag, ...props }: OakInlineBannerProps) => React__default.JSX.Element;
3182
-
3183
- type OakLoadingSpinnerProps = Pick<SizeStyleProps, "$width"> & ColorStyleProps & {
3184
- loaderColor?: OakUiRoleToken;
3185
- /**
3186
- * Delay the appearance of the spinner
3187
- *
3188
- * Accepts a number in milliseconds
3189
- */
3190
- $delay?: number;
3191
- };
3192
- /**
3193
- *
3194
- * A loading spinner of variable size.
3195
- *
3196
- */
3197
- declare const OakLoadingSpinner: (props: OakLoadingSpinnerProps) => React__default.JSX.Element;
3203
+ declare const OakInlineBanner: ({ isOpen, title, message, type, icon, iconColorFilter, isLoading, cta, canDismiss, onDismiss, closeButtonOverrideProps, variant, titleTag, ...props }: OakInlineBannerProps) => React__default.JSX.Element;
3198
3204
 
3199
3205
  type OakModalCenterProps = {
3200
3206
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-components",
3
- "version": "2.32.0",
3
+ "version": "2.33.0",
4
4
  "licence": "MIT",
5
5
  "description": "Shared components for Oak applications",
6
6
  "main": "dist/cjs/index.js",