carbon-react 157.0.0 → 157.1.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.
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
2
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
3
  export declare const AiIcon: ({ ...rest }: TagProps) => React.JSX.Element;
4
+ export declare const AiIconInverse: ({ ...rest }: TagProps) => React.JSX.Element;
4
5
  export default AiIcon;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import r from"../utils/helpers/tags/tags.js";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const c=c=>{var i,l,a=o({},function(e){if(null==e)throw new TypeError("Cannot destructure "+e);return e}(c));return e("svg",(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},r("ai-icon",a)),l=null!=(l={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e("g",{clipPath:"url(#a)",children:[t("path",{"data-role":"white-star",fill:"#fff",d:"m16.378 9.799-3.776-1.49a1.615 1.615 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),t("path",{"data-role":"green-circle",fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),t("defs",{children:t("clipPath",{id:"a",children:t("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]})?l:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(l)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(l,e))})),i))};export{c as AiIcon,c as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import r from"../utils/helpers/tags/tags.js";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function c(e){if(null==e)throw new TypeError("Cannot destructure "+e);return e}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){n(e,t,r[t])}))}return e}function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const a=n=>{var a=l({},c(n));return e("svg",o(i({},r("ai-icon",a)),{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e("g",{clipPath:"url(#a)",children:[t("path",{"data-role":"white-star",fill:"#fff",d:"m16.378 9.799-3.776-1.49a1.615 1.615 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),t("path",{"data-role":"green-circle",fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),t("defs",{children:t("clipPath",{id:"a",children:t("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}))},f=n=>{var a=l({},c(n));return e("svg",o(i({},r("ai-icon-inverse",a)),{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e("g",{clipPath:"url(#a)",children:[t("path",{fill:"#000",d:"m16.378 9.799-3.776-1.49a1.616 1.616 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),t("path",{fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),t("defs",{children:t("clipPath",{id:"a",children:t("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}))};export{a as AiIcon,f as AiIconInverse,a as default};
@@ -1 +1,2 @@
1
1
  export { default } from "./ai-icon.component";
2
+ export { AiIconInverse } from "./ai-icon.component";
@@ -1 +1 @@
1
- export{AiIcon as default}from"./ai-icon.component.js";
1
+ export{AiIconInverse,AiIcon as default}from"./ai-icon.component.js";
@@ -1 +1 @@
1
- import r,{css as o}from"styled-components";import{space as t}from"styled-system";import a from"../card-column/card-column.style.js";const d={small:"0 -24px",medium:"0 -32px",large:"0 -48px"},e={small:"16px 24px",medium:"18px 32px",large:"20px 48px"},i=r.div.withConfig({displayName:"card-footer.style__StyledCardFooter",componentId:"sc-609a1e44-0"})([""," ",""],t,(({spacing:r,variant:t,roundness:i})=>o(["background-color:",";border-top:var(--colorsUtilityMajor100);border-top-width:1px;border-top-style:solid;font-size:14px;font-weight:500;margin:",";display:flex;"," "," ","{margin:0;padding:",";}"],"transparent"===t?"transparent":"var(--colorsUtilityMajor025)",d[r],"default"===i&&o(["border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);"]),"large"===i&&o(["border-bottom-left-radius:var(--borderRadius200);border-bottom-right-radius:var(--borderRadius200);"]),a,e[r])));export{i as default};
1
+ import r,{css as o}from"styled-components";import{space as t}from"styled-system";import a from"../card-column/card-column.style.js";const d={small:"0 -24px",medium:"0 -32px",large:"0 -48px"},e={small:"16px 24px",medium:"18px 32px",large:"20px 48px"},s=r.div.withConfig({displayName:"card-footer.style__StyledCardFooter",componentId:"sc-bacf2806-0"})([""," ",""],t,(({spacing:r,variant:t,roundness:s})=>o(["background-color:",";border-top:var(--colorsUtilityMajor100);border-top-width:1px;border-top-style:solid;margin:",";display:flex;"," "," ","{margin:0;padding:",";}"],"transparent"===t?"transparent":"var(--colorsUtilityMajor025)",d[r],"default"===s&&o(["border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);"]),"large"===s&&o(["border-bottom-left-radius:var(--borderRadius200);border-bottom-right-radius:var(--borderRadius200);"]),a,e[r])));export{s as default};
@@ -1,11 +1,8 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
4
- export interface TypeIconProps {
5
- transparent?: boolean;
6
- variant: MessageVariant;
7
- }
8
- export type MessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai";
4
+ export type MessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai" | "error-subtle" | "info-subtle" | "success-subtle" | "warning-subtle" | "ai-subtle" | "callout-subtle";
5
+ export type InternalMessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai" | "callout";
9
6
  export interface MessageProps extends MarginProps, TagProps {
10
7
  /** Set the component's content */
11
8
  children?: React.ReactNode;
@@ -17,16 +14,18 @@ export interface MessageProps extends MarginProps, TagProps {
17
14
  onDismiss?: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement>) => void;
18
15
  /** Flag to determine if the message is rendered */
19
16
  open?: boolean;
20
- /** Flag to determine if the close button is rendered */
17
+ /** @deprecated Flag to determine if the close button is rendered*/
21
18
  showCloseIcon?: boolean;
22
19
  /** Set message title */
23
20
  title?: React.ReactNode;
24
- /** Set transparent styling */
21
+ /** @deprecated Set transparent styling */
25
22
  transparent?: boolean;
26
23
  /** Set the component's variant */
27
24
  variant?: MessageVariant;
28
25
  /** Set the component's width, accepts any valid css string */
29
26
  width?: string;
27
+ /** Set the component's size */
28
+ size?: "medium" | "large";
30
29
  }
31
30
  export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
32
31
  export default Message;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import n,{useRef as o}from"react";import{Typography as i}from"../typography/typography.component.js";import{Content as s}from"../content/content.component.js";import a,{TypeIconStyle as c,MessageContent as l}from"./message.style.js";import p from"../../__internal__/utils/helpers/tags/tags.js";import m from"../icon/icon.component.js";import f from"../icon-button/icon-button.component.js";import{AiIcon as u}from"../../__internal__/ai-icon/ai-icon.component.js";import"../../style/utils/filter-styled-system-padding-props.js";import y from"../../style/utils/filter-styled-system-margin-props.js";import b from"../../hooks/__internal__/useLocale/useLocale.js";function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const j=n.forwardRef(((n,d)=>{var{open:j=!0,transparent:h=!1,title:w,variant:v="info",children:P,onDismiss:_,id:k,closeButtonAriaLabel:D,showCloseIcon:S=!0,width:x}=n,L=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,["open","transparent","title","variant","children","onDismiss","id","closeButtonAriaLabel","showCloseIcon","width"]);const I=o(null),A=d||I,B=b(),C=y(L);return j?e(a,g(O(g(O({},p("Message",L)),{transparent:h,variant:v,id:k,width:x,ref:A}),C),{tabIndex:-1,children:[t(c,{variant:v,transparent:h,children:"ai"===v?t(u,{"data-role":"ai-icon"}):t(m,{"data-role":"category-icon",type:{neutral:"info",success:"tick_circle",error:"error",warning:"warning",info:"info"}[v]})}),t(i,{screenReaderOnly:!0,children:B.message[v]()}),t(l,{"data-element":"message-content","data-role":"message-content",children:S&&_?e(r,{children:[t(s,{title:w,children:P}),t(f,{"data-element":"close","aria-label":D||B.message.closeButtonAriaLabel(),onClick:_,children:t(m,{type:"close"})})]}):t(s,{title:w,children:P})})]})):null}));j.displayName="Message";export{j as Message,j as default};
1
+ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import n,{useRef as o}from"react";import{Typography as i}from"../typography/typography.component.js";import{MessageStyle as s,MessageWrapper as a,MessageContent as l,MessageContentWrapper as c,TypeIconStyle as p}from"./message.style.js";import u from"../../__internal__/utils/helpers/tags/tags.js";import d from"../icon/icon.component.js";import m from"../icon-button/icon-button.component.js";import{AiIcon as f,AiIconInverse as b}from"../../__internal__/ai-icon/ai-icon.component.js";import"../../style/utils/filter-styled-system-padding-props.js";import y from"../../style/utils/filter-styled-system-margin-props.js";import g from"../../hooks/__internal__/useLocale/useLocale.js";import h from"../../__internal__/utils/logger/index.js";function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}function w(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}let v=!1,_=!1,P=!1;const S=n.forwardRef(((n,O)=>{var{open:S=!0,transparent:x=!1,title:D,variant:k="info",children:z,onDismiss:I,id:L,closeButtonAriaLabel:M,showCloseIcon:C=!0,width:T,size:A="medium"}=n,B=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,["open","transparent","title","variant","children","onDismiss","id","closeButtonAriaLabel","showCloseIcon","width","size"]);x&&!v&&(h.deprecate("The 'transparent' prop in `Message` is deprecated and will soon be removed."),v=!0),"neutral"!==k||_||(h.deprecate("The 'neutral' variant in `Message` is deprecated and will soon be removed."),_=!0),!1!==C||P||(h.deprecate("The 'showCloseIcon' prop in `Message` is deprecated and will soon be removed. To prevent the close button from being rendered, don't pass the `onDismiss` prop."),P=!0);const E=o(null),R=O||E,W=g(),N=y(B),q={neutral:"info",success:"tick_circle",error:"error",warning:"warning",info:"info",callout:"tag"},F=k.endsWith("-subtle"),G=k.replace("-subtle",""),H=()=>{var n,o;return e(r,{children:[t(p,{"aria-hidden":"true",variant:G,isSubtle:F,transparent:x,children:"ai"===k?t(f,{"data-role":"ai-icon"}):"ai-subtle"===k?t(b,{"data-role":"ai-icon-subtle"}):t(d,{type:q[G]})}),t(i,{screenReaderOnly:!0,children:null===(n=(o=W.message)[G])||void 0===n?void 0:n.call(o)})]})};return S?e(s,w(j(w(j({},u("Message",B)),{transparent:x,variant:G,isSubtle:F,id:L,width:T,ref:R}),N),{tabIndex:-1,children:[!F&&H(),e(a,{children:[e(l,{"data-role":"message-content",size:A,isSubtle:F,children:[F&&H(),e(c,{size:A,children:[D?"string"==typeof D?t(i,{m:0,fontWeight:"500",fontSize:"large"===A?"16px":"14px",children:D}):D:null,z]})]}),C&&I&&t(m,{my:"large"===A?2:1,mr:"large"===A?2:1,p:"4px","data-element":"close","aria-label":M||W.message.closeButtonAriaLabel(),onClick:I,children:t(d,{type:"cross"})})]})]})):null}));S.displayName="Message";export{S as Message,S as default};
@@ -1,14 +1,17 @@
1
1
  import { MarginProps } from "styled-system";
2
- import { MessageVariant, TypeIconProps } from "./message.component";
2
+ import { InternalMessageVariant } from "./message.component";
3
3
  type MessageStyleProps = {
4
- variant?: MessageVariant;
4
+ variant: InternalMessageVariant;
5
+ isSubtle?: boolean;
5
6
  transparent?: boolean;
6
7
  width?: string;
8
+ size?: "medium" | "large";
7
9
  };
8
- declare const MessageStyle: import("styled-components").StyledComponent<"div", any, {
10
+ export declare const MessageStyle: import("styled-components").StyledComponent<"div", any, {
9
11
  theme: object;
10
12
  } & MessageStyleProps & MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, "theme">;
11
- declare const MessageContent: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- declare const TypeIconStyle: import("styled-components").StyledComponent<"div", any, TypeIconProps, never>;
13
- export default MessageStyle;
14
- export { MessageContent, TypeIconStyle };
13
+ export declare const MessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
+ export declare const MessageContent: import("styled-components").StyledComponent<"div", any, Pick<MessageStyleProps, "size" | "isSubtle">, never>;
15
+ export declare const MessageContentWrapper: import("styled-components").StyledComponent<"div", any, Pick<MessageStyleProps, "size">, never>;
16
+ export declare const TypeIconStyle: import("styled-components").StyledComponent<"div", any, MessageStyleProps, never>;
17
+ export {};
@@ -1 +1 @@
1
- import e,{css as t}from"styled-components";import{margin as a}from"styled-system";import o from"../../style/themes/apply-base-theme.js";const r={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)",ai:"var(--colorsUtilityYin100)"},n=e.div.attrs(o).withConfig({displayName:"message.style__MessageStyle",componentId:"sc-2c58500-0"})(["position:relative;display:flex;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}"," "," ",""],(({variant:e})=>e&&r[e]),(({transparent:e})=>e&&t(["border:none;background:transparent;"])),(({width:e})=>e&&`width: ${e};`),a),i=e.div.withConfig({displayName:"message.style__MessageContent",componentId:"sc-2c58500-1"})(["width:100%;display:flex;justify-content:space-between;align-items:center;padding:var(--spacing200);gap:var(--spacing300);"]),s=e.div.withConfig({displayName:"message.style__TypeIconStyle",componentId:"sc-2c58500-2"})(["display:flex;justify-content:center;align-items:center;background-color:",";min-width:30px;span{&:before{color:var(--colorsUtilityYang100);}}",""],(({variant:e})=>r[e]),(({transparent:e,variant:a})=>e&&t(["background-color:transparent;span{&:before{color:",";}}"],r[a])));export{i as MessageContent,s as TypeIconStyle,n as default};
1
+ import e,{css as t}from"styled-components";import{margin as o}from"styled-system";import a from"../../style/themes/apply-base-theme.js";const s={error:"#CD384B",info:"#0060A7",success:"#00811F ",warning:"#D64309",neutral:"var(--colorsSemanticNeutral500)",ai:"var(--colorsUtilityYin100)",callout:"var(--colorsUtilityYin100)"},i={error:"#FDECEB",info:"#EAEEF6",success:"#E9F2E8 ",warning:"#FFEDE5",ai:"#EFEFEF",callout:"#E6FAE2"},n=e.div.attrs(a).withConfig({displayName:"message.style__MessageStyle",componentId:"sc-2430d97-0"})(["position:relative;display:flex;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);max-width:720px;:focus{outline:none;}"," "," "," ",""],(({variant:e})=>s[e]),(({isSubtle:e,variant:o})=>e&&t(["border:none;background-color:",";"],i[o])),(({transparent:e})=>e&&t(["border:none;background:transparent;"])),(({width:e})=>e&&`width: ${e};`),o),r=e.div.withConfig({displayName:"message.style__MessageWrapper",componentId:"sc-2430d97-1"})(["display:flex;justify-content:space-between;align-items:flex-start;width:100%;"]),l=e.div.withConfig({displayName:"message.style__MessageContent",componentId:"sc-2430d97-2"})(["display:flex;box-sizing:border-box;width:100%;height:100%;padding:12px;",""],(({size:e,isSubtle:o})=>t([""," ",""],"large"===e&&t(["padding:20px;"]),o&&t(["gap:",";"],"large"===e?"16px":"8px")))),d=e.div.withConfig({displayName:"message.style__MessageContentWrapper",componentId:"sc-2430d97-3"})(["display:flex;flex-direction:column;justify-content:center;width:100%;gap:2px;font-size:14px;",""],(({size:e})=>"large"===e&&t(["gap:4px;font-size:16px;"]))),p=e.div.withConfig({displayName:"message.style__TypeIconStyle",componentId:"sc-2430d97-4"})(["",""],(({transparent:e,isSubtle:o,variant:a})=>t(["display:flex;background-color:",";"," span{width:20px;height:20px;&:before{color:var(--colorsUtilityYang100);}}"," ",""],s[a],!o&&t(["justify-content:center;align-items:center;width:32px;"]),o&&t(["padding-top:2px;background-color:transparent;span{&:before{color:",";}}"],s[a]),e&&t(["background-color:transparent;span{&:before{color:",";}}"],s[a]))));export{l as MessageContent,d as MessageContentWrapper,n as MessageStyle,r as MessageWrapper,p as TypeIconStyle};
@@ -1,4 +1,3 @@
1
- import { MessageVariant } from "../message/message.component";
2
1
  declare const StyledPortal: import("styled-components").StyledComponent<({ children, className, id, onReposition, inertOptOut, }: import("../portal/portal").PortalProps) => import("react").JSX.Element, any, {
3
2
  theme: object;
4
3
  } & {
@@ -6,14 +5,13 @@ declare const StyledPortal: import("styled-components").StyledComponent<({ child
6
5
  alignY?: "top" | "center" | "bottom";
7
6
  isNotice?: boolean;
8
7
  }, "theme">;
9
- type ToastVariants = Exclude<MessageVariant, "ai">;
10
8
  type ToastStyleProps = {
11
9
  align?: "left" | "center" | "right";
12
10
  alignY?: "top" | "center" | "bottom";
13
11
  maxWidth?: string;
14
12
  isNotice?: boolean;
15
13
  isNotification?: boolean;
16
- variant: ToastVariants;
14
+ variant: "error" | "info" | "success" | "warning" | "neutral";
17
15
  };
18
16
  declare const StyledToast: import("styled-components").StyledComponent<"div", any, ToastStyleProps, never>;
19
17
  declare const StyledToastContent: import("styled-components").StyledComponent<"div", any, {
@@ -1 +1 @@
1
- import t,{css as o}from"styled-components";import e from"../icon-button/icon-button.style.js";import{Portal as a}from"../portal/portal.js";import i from"../../style/themes/apply-base-theme.js";import r from"../icon/icon.style.js";const n=t(a).attrs(i).withConfig({displayName:"toast.style__StyledPortal",componentId:"sc-542b7ed1-0"})(["",""],(({theme:t,isNotice:e,align:a,alignY:i})=>o(["position:fixed;top:0;z-index:",";"," "," "," "," "," "," ",""],t.zIndex.notification,"left"===a&&o(["left:0;transform:translateX(50%);"]),"center"===a&&o(["margin-left:50%;transform:translateX(-50%);"]),"right"===a&&o(["right:0;transform:translateX(-50%);"]),e&&o(["bottom:0;top:auto;width:100%;"]),"top"===i&&o(["top:0;bottom:auto;"]),"center"===i&&o(["top:50%;transform:translate(",",-50%);"],"left"===a?"50%":"-50%"),"bottom"===i&&o(["bottom:0;top:auto;display:flex;flex-direction:column-reverse;"])))),s=".toast",p=".toast-alternative",l={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)"},c=o(["position:absolute;right:15px;top:50%;transform:translateY(-50%);"]),m=t.div.withConfig({displayName:"toast.style__StyledToast",componentId:"sc-542b7ed1-1"})([""," :focus{outline:none;}&","-appear,&","-enter{opacity:0;transform:scale(0.5);}&","-appear","-appear-active,&","-enter","-enter-active{opacity:1;transform:",";transition:all 300ms cubic-bezier(0.25,0.25,0,1.5);}&","-exit","-exit-active{opacity:0;",";transition:all 150ms ease-out;}","{","}",""],(({maxWidth:t,align:a,isNotification:i,alignY:r,isNotice:n,variant:s})=>o(["position:relative;display:flex;justify-content:flex-start;align-content:center;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}","{","}box-shadow:",";line-height:22px;margin-top:",";margin-bottom:",";max-width:",";position:relative;margin-right:",";margin-left:",";",""],l[s],e,c,"0 10px 30px 0 rgba(0, 20, 29, 0.1), 0 30px 60px 0 rgba(0, 20, 29, 0.1)",n||"center"===r||"bottom"===r?"0":"30px","bottom"!==r||n?"0":"30px",t||"300px","center"===a||"right"===a?"auto":"30px","center"===a||"left"===a?"auto":"30px",i&&o(["border:1px solid var(--colorsSemanticInfo500);"]))),s,s,s,s,s,s,(({align:t})=>"center"===t?" scale(1) translateY(0)":"scale(1)"),s,s,(({alignY:t})=>"bottom"===t?"margin-bottom: -40px":"margin-top: -40px"),e,c,(({isNotice:t,alignY:a})=>t&&o(["background-color:var(--colorsUtilityMajor400);border:none;color:var(--colorsSemanticNeutralYang100);margin-right:0;max-width:100%;","{right:55px;}"," ","{color:var(--colorsSemanticNeutralYang100);}&","-appear,&","-enter{",";opacity:0;}&","-exit{",";opacity:1;}&","-appear","-appear-active,&","-enter","-enter-active{",";opacity:1;transition:all 400ms ease;}&","-exit","-exit-active{",";opacity:0;transition:all 200ms ease;}"],e,e,r,p,p,"top"===a?"top: -40px":"bottom: -40px",p,"top"===a?"top: 0":"bottom: 0",p,p,p,p,"top"===a?"top: 0":"bottom: 0",p,p,"top"===a?"top: -40px":"bottom: -40px"))),d=t.div.withConfig({displayName:"toast.style__StyledToastContent",componentId:"sc-542b7ed1-2"})(["padding:8px 16px 8px 16px;white-space:pre-wrap;flex:1;"," ",""],(({isNotice:t})=>t&&o(["display:flex;align-items:center;padding:11px 40px;"])),(({isDismiss:t,isNotice:e})=>t&&o(["padding-right:",";"],e?"88px":"48px"))),x=t.div.withConfig({displayName:"toast.style__ToastWrapper",componentId:"sc-542b7ed1-3"})([""," ",""],(({align:t})=>t&&o(["position:relative;width:auto;height:auto;justify-content:",";display:flex;"],t)),(({isNotice:t})=>t&&o(["display:block;"])));export{n as StyledPortal,m as StyledToast,d as StyledToastContent,x as ToastWrapper};
1
+ import t,{css as o}from"styled-components";import a from"../icon-button/icon-button.style.js";import{Portal as e}from"../portal/portal.js";import i from"../../style/themes/apply-base-theme.js";import r from"../icon/icon.style.js";const n=t(e).attrs(i).withConfig({displayName:"toast.style__StyledPortal",componentId:"sc-6f15a9b3-0"})(["",""],(({theme:t,isNotice:a,align:e,alignY:i})=>o(["position:fixed;top:0;z-index:",";"," "," "," "," "," "," ",""],t.zIndex.notification,"left"===e&&o(["left:0;transform:translateX(50%);"]),"center"===e&&o(["margin-left:50%;transform:translateX(-50%);"]),"right"===e&&o(["right:0;transform:translateX(-50%);"]),a&&o(["bottom:0;top:auto;width:100%;"]),"top"===i&&o(["top:0;bottom:auto;"]),"center"===i&&o(["top:50%;transform:translate(",",-50%);"],"left"===e?"50%":"-50%"),"bottom"===i&&o(["bottom:0;top:auto;display:flex;flex-direction:column-reverse;"])))),s=".toast",p=".toast-alternative",l={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)"},c=o(["position:absolute;right:15px;top:50%;transform:translateY(-50%);"]),m=t.div.withConfig({displayName:"toast.style__StyledToast",componentId:"sc-6f15a9b3-1"})([""," :focus{outline:none;}&","-appear,&","-enter{opacity:0;transform:scale(0.5);}&","-appear","-appear-active,&","-enter","-enter-active{opacity:1;transform:",";transition:all 300ms cubic-bezier(0.25,0.25,0,1.5);}&","-exit","-exit-active{opacity:0;",";transition:all 150ms ease-out;}","{","}",""],(({maxWidth:t,align:e,isNotification:i,alignY:r,isNotice:n,variant:s})=>o(["position:relative;display:flex;justify-content:flex-start;align-content:center;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}","{","}box-shadow:",";line-height:22px;margin-top:",";margin-bottom:",";max-width:",";position:relative;margin-right:",";margin-left:",";",""],l[s],a,c,"0 10px 30px 0 rgba(0, 20, 29, 0.1), 0 30px 60px 0 rgba(0, 20, 29, 0.1)",n||"center"===r||"bottom"===r?"0":"30px","bottom"!==r||n?"0":"30px",t||"300px","center"===e||"right"===e?"auto":"30px","center"===e||"left"===e?"auto":"30px",i&&o(["border:1px solid var(--colorsSemanticInfo500);"]))),s,s,s,s,s,s,(({align:t})=>"center"===t?" scale(1) translateY(0)":"scale(1)"),s,s,(({alignY:t})=>"bottom"===t?"margin-bottom: -40px":"margin-top: -40px"),a,c,(({isNotice:t,alignY:e})=>t&&o(["background-color:var(--colorsUtilityMajor400);border:none;color:var(--colorsSemanticNeutralYang100);margin-right:0;max-width:100%;","{right:55px;}"," ","{color:var(--colorsSemanticNeutralYang100);}&","-appear,&","-enter{",";opacity:0;}&","-exit{",";opacity:1;}&","-appear","-appear-active,&","-enter","-enter-active{",";opacity:1;transition:all 400ms ease;}&","-exit","-exit-active{",";opacity:0;transition:all 200ms ease;}"],a,a,r,p,p,"top"===e?"top: -40px":"bottom: -40px",p,"top"===e?"top: 0":"bottom: 0",p,p,p,p,"top"===e?"top: 0":"bottom: 0",p,p,"top"===e?"top: -40px":"bottom: -40px"))),d=t.div.withConfig({displayName:"toast.style__StyledToastContent",componentId:"sc-6f15a9b3-2"})(["padding:8px 16px 8px 16px;white-space:pre-wrap;flex:1;"," ",""],(({isNotice:t})=>t&&o(["display:flex;align-items:center;padding:11px 40px;"])),(({isDismiss:t,isNotice:a})=>t&&o(["padding-right:",";"],a?"88px":"48px"))),x=t.div.withConfig({displayName:"toast.style__ToastWrapper",componentId:"sc-6f15a9b3-3"})([""," ",""],(({align:t})=>t&&o(["position:relative;width:auto;height:auto;justify-content:",";display:flex;"],t)),(({isNotice:t})=>t&&o(["display:block;"])));export{n as StyledPortal,m as StyledToast,d as StyledToastContent,x as ToastWrapper};
@@ -1 +1 @@
1
- import{enGB as e}from"date-fns/locale/en-GB";const a=e=>1===("string"==typeof e?parseInt(e):e),r={locale:()=>"en-GB",actions:{edit:()=>"Edit",delete:()=>"Delete"},actionPopover:{ariaLabel:()=>"actions"},advancedColorPicker:{ariaLabel:()=>"Change colour",currentColorDescriptionTerm:()=>"Current colour assigned: ",currentColorAssigned:e=>e},batchSelection:{selected:e=>`${e} selected`},breadcrumbs:{ariaLabel:()=>"breadcrumbs"},confirm:{no:()=>"No",yes:()=>"Yes"},characterCount:{tooManyCharacters:(e,a)=>1===e?`${a} character too many`:`${a} characters too many`,charactersLeft:(e,a)=>1===e?`${a} character left`:`${a} characters left`,visuallyHiddenHint:e=>`You can enter up to ${e} characters`},date:{dateFnsLocale:()=>e,ariaLabels:{previousMonthButton:()=>"Previous month",nextMonthButton:()=>"Next month"},dateFormatOverride:void 0},dialog:{ariaLabels:{close:()=>"Close"}},dismissibleBox:{ariaLabels:{close:()=>"Close"}},errors:{messages:{formSummary:(e,r,o)=>{const t=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===o?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${t}`]:r?[`There ${s}`,`${r} ${n}`]:null}}},fileInput:{dragAndDrop:()=>"or drag and drop your file",selectFile:()=>"Select file",fileUploadStatus:()=>"File upload status",actions:{cancel:()=>"Cancel upload",clear:()=>"Clear",delete:()=>"Delete file"}},heading:{backLinkAriaLabel:()=>"Back"},link:{skipLinkLabel:()=>"Skip to main content"},loader:{loading:()=>"Loading"},loaderSpinner:{loading:()=>"Loading..."},loaderStar:{loading:()=>"Loading..."},menuFullscreen:{ariaLabels:{closeButton:()=>"Close"}},message:{closeButtonAriaLabel:()=>"Close",error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",ai:()=>"AI Information"},numeralDate:{validation:{day:(e,a)=>e&&a?`Day in ${e} should be a number within 1-${a}.`:"Day should be a number within a 1-31 range.",month:()=>"Month should be a number within a 1-12 range.",year:()=>"Year should be a number within a 1800-2200 range."},labels:{day:()=>"Day",month:()=>"Month",year:()=>"Year"}},pager:{show:()=>"Show",records:(e,r=!0)=>{const o=a(e)?"item":"items";return r?`${e} ${o}`:o},first:()=>"First",last:()=>"Last",next:()=>"Next",previous:()=>"Previous",pageX:()=>"Page",ofY:e=>`of ${e}`},password:{buttonLabelHide:()=>"Hide",buttonLabelShow:()=>"Show",ariaLabelHide:()=>"Hide password",ariaLabelShow:()=>"Show password",ariaLiveShownMessage:()=>"Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",ariaLiveHiddenMessage:()=>"Your password is currently hidden."},pill:{remove:e=>`Remove ${e} pill`},progressTracker:{of:()=>"of"},pod:{undo:()=>"Undo"},textEditor:{boldAria:()=>"Bold",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",characterCounter:e=>`${"number"==typeof e?e.toString():e} characters remaining`,characterLimit:e=>`You are ${e} character(s) over the character limit`,contentEditorAria:()=>"Rich text content editor",italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",unorderedListAria:()=>"Unordered list"},search:{searchButtonText:()=>"Search"},select:{actionButtonText:()=>"Add New Item",placeholder:()=>"Please Select...",noResultsForTerm:e=>`No results for "${e}"`},sidebar:{ariaLabels:{close:()=>"Close"}},sort:{accessibleName:(e,a)=>`Sort all ${e||"contents"}${a?` in an ${a} order.`:" in an ascending or descending order."}`},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,o)=>`${o?`${o}.`:""} ${e}. Step ${a} of ${r}.`,closeIconAriaLabel:()=>"Close"},switch:{on:()=>"ON",off:()=>"OFF"},tileSelect:{deselect:()=>"Deselect"},time:{amText:()=>"AM",pmText:()=>"PM",hoursLabelText:()=>"Hrs.",minutesLabelText:()=>"Mins.",hoursAriaLabelText:()=>"Hours",minutesAriaLabelText:()=>"Minutes"},toast:{ariaLabels:{close:()=>"Close"},error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",notification:()=>"Notification"},verticalMenu:{ariaLabels:{responsiveMenuLauncher:()=>"Product menu launcher",responsiveMenuCloseButton:()=>"Close product menu",responsiveMenuAria:()=>"Product menu"}},verticalMenuFullScreen:{ariaLabels:{close:()=>"Close"}}};export{r as default};
1
+ import{enGB as e}from"date-fns/locale/en-GB";const a=e=>1===("string"==typeof e?parseInt(e):e),r={locale:()=>"en-GB",actions:{edit:()=>"Edit",delete:()=>"Delete"},actionPopover:{ariaLabel:()=>"actions"},advancedColorPicker:{ariaLabel:()=>"Change colour",currentColorDescriptionTerm:()=>"Current colour assigned: ",currentColorAssigned:e=>e},batchSelection:{selected:e=>`${e} selected`},breadcrumbs:{ariaLabel:()=>"breadcrumbs"},confirm:{no:()=>"No",yes:()=>"Yes"},characterCount:{tooManyCharacters:(e,a)=>1===e?`${a} character too many`:`${a} characters too many`,charactersLeft:(e,a)=>1===e?`${a} character left`:`${a} characters left`,visuallyHiddenHint:e=>`You can enter up to ${e} characters`},date:{dateFnsLocale:()=>e,ariaLabels:{previousMonthButton:()=>"Previous month",nextMonthButton:()=>"Next month"},dateFormatOverride:void 0},dialog:{ariaLabels:{close:()=>"Close"}},dismissibleBox:{ariaLabels:{close:()=>"Close"}},errors:{messages:{formSummary:(e,r,o)=>{const t=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===o?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${t}`]:r?[`There ${s}`,`${r} ${n}`]:null}}},fileInput:{dragAndDrop:()=>"or drag and drop your file",selectFile:()=>"Select file",fileUploadStatus:()=>"File upload status",actions:{cancel:()=>"Cancel upload",clear:()=>"Clear",delete:()=>"Delete file"}},heading:{backLinkAriaLabel:()=>"Back"},link:{skipLinkLabel:()=>"Skip to main content"},loader:{loading:()=>"Loading"},loaderSpinner:{loading:()=>"Loading..."},loaderStar:{loading:()=>"Loading..."},menuFullscreen:{ariaLabels:{closeButton:()=>"Close"}},message:{closeButtonAriaLabel:()=>"Close",error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",ai:()=>"AI Information",callout:()=>"Callout"},numeralDate:{validation:{day:(e,a)=>e&&a?`Day in ${e} should be a number within 1-${a}.`:"Day should be a number within a 1-31 range.",month:()=>"Month should be a number within a 1-12 range.",year:()=>"Year should be a number within a 1800-2200 range."},labels:{day:()=>"Day",month:()=>"Month",year:()=>"Year"}},pager:{show:()=>"Show",records:(e,r=!0)=>{const o=a(e)?"item":"items";return r?`${e} ${o}`:o},first:()=>"First",last:()=>"Last",next:()=>"Next",previous:()=>"Previous",pageX:()=>"Page",ofY:e=>`of ${e}`},password:{buttonLabelHide:()=>"Hide",buttonLabelShow:()=>"Show",ariaLabelHide:()=>"Hide password",ariaLabelShow:()=>"Show password",ariaLiveShownMessage:()=>"Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",ariaLiveHiddenMessage:()=>"Your password is currently hidden."},pill:{remove:e=>`Remove ${e} pill`},progressTracker:{of:()=>"of"},pod:{undo:()=>"Undo"},textEditor:{boldAria:()=>"Bold",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",characterCounter:e=>`${"number"==typeof e?e.toString():e} characters remaining`,characterLimit:e=>`You are ${e} character(s) over the character limit`,contentEditorAria:()=>"Rich text content editor",italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",unorderedListAria:()=>"Unordered list"},search:{searchButtonText:()=>"Search"},select:{actionButtonText:()=>"Add New Item",placeholder:()=>"Please Select...",noResultsForTerm:e=>`No results for "${e}"`},sidebar:{ariaLabels:{close:()=>"Close"}},sort:{accessibleName:(e,a)=>`Sort all ${e||"contents"}${a?` in an ${a} order.`:" in an ascending or descending order."}`},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,o)=>`${o?`${o}.`:""} ${e}. Step ${a} of ${r}.`,closeIconAriaLabel:()=>"Close"},switch:{on:()=>"ON",off:()=>"OFF"},tileSelect:{deselect:()=>"Deselect"},time:{amText:()=>"AM",pmText:()=>"PM",hoursLabelText:()=>"Hrs.",minutesLabelText:()=>"Mins.",hoursAriaLabelText:()=>"Hours",minutesAriaLabelText:()=>"Minutes"},toast:{ariaLabels:{close:()=>"Close"},error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",notification:()=>"Notification"},verticalMenu:{ariaLabels:{responsiveMenuLauncher:()=>"Product menu launcher",responsiveMenuCloseButton:()=>"Close product menu",responsiveMenuAria:()=>"Product menu"}},verticalMenuFullScreen:{ariaLabels:{close:()=>"Close"}}};export{r as default};
@@ -89,6 +89,7 @@ interface Locale {
89
89
  warning: () => string;
90
90
  neutral: () => string;
91
91
  ai: () => string;
92
+ callout?: () => string;
92
93
  };
93
94
  numeralDate: {
94
95
  validation: {
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
2
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
3
  export declare const AiIcon: ({ ...rest }: TagProps) => React.JSX.Element;
4
+ export declare const AiIconInverse: ({ ...rest }: TagProps) => React.JSX.Element;
4
5
  export default AiIcon;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../utils/helpers/tags/tags.js");function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(){return n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}const c=c=>{var o,i,l=n({},function(e){if(null==e)throw new TypeError("Cannot destructure "+e);return e}(c));return e.jsxs("svg",(o=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},c=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),c.forEach((function(r){t(e,r,n[r])}))}return e}({},r.default("ai-icon",l)),i=null!=(i={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{"data-role":"white-star",fill:"#fff",d:"m16.378 9.799-3.776-1.49a1.615 1.615 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),e.jsx("path",{"data-role":"green-circle",fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]})?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})),o))};exports.AiIcon=c,exports.default=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../utils/helpers/tags/tags.js");function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(){return n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}function l(e){if(null==e)throw new TypeError("Cannot destructure "+e);return e}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},l=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),l.forEach((function(r){t(e,r,n[r])}))}return e}function i(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}const o=t=>{var o=n({},l(t));return e.jsxs("svg",i(c({},r.default("ai-icon",o)),{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{"data-role":"white-star",fill:"#fff",d:"m16.378 9.799-3.776-1.49a1.615 1.615 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),e.jsx("path",{"data-role":"green-circle",fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}))};exports.AiIcon=o,exports.AiIconInverse=t=>{var o=n({},l(t));return e.jsxs("svg",i(c({},r.default("ai-icon-inverse",o)),{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#000",d:"m16.378 9.799-3.776-1.49a1.616 1.616 0 0 1-.91-.91l-1.49-3.775c-.537-1.364-2.466-1.364-3.004 0L5.708 7.4a1.615 1.615 0 0 1-.91.91L1.022 9.799c-1.363.537-1.363 2.466 0 3.004l3.776 1.49c.417.163.746.493.91.91l1.49 3.775c.538 1.363 2.467 1.363 3.005 0l1.489-3.776c.164-.416.494-.745.91-.91l3.776-1.489c1.364-.538 1.364-2.467 0-3.004Z"}),e.jsx("path",{fill:"#00D639",d:"M17.172 5.655a2.827 2.827 0 1 0 0-5.655 2.827 2.827 0 0 0 0 5.655Z"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}))},exports.default=o;
@@ -1 +1,2 @@
1
1
  export { default } from "./ai-icon.component";
2
+ export { AiIconInverse } from "./ai-icon.component";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ai-icon.component.js");exports.default=e.AiIcon;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ai-icon.component.js");exports.AiIconInverse=e.AiIconInverse,exports.default=e.AiIcon;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("styled-components"),e=require("styled-system"),t=require("../card-column/card-column.style.js");function o(r){return r&&r.__esModule?r:{default:r}}const a={small:"0 -24px",medium:"0 -32px",large:"0 -48px"},d={small:"16px 24px",medium:"18px 32px",large:"20px 48px"},s=o(r).default.div.withConfig({displayName:"card-footer.style__StyledCardFooter",componentId:"sc-609a1e44-0"})([""," ",""],e.space,(({spacing:e,variant:o,roundness:s})=>r.css(["background-color:",";border-top:var(--colorsUtilityMajor100);border-top-width:1px;border-top-style:solid;font-size:14px;font-weight:500;margin:",";display:flex;"," "," ","{margin:0;padding:",";}"],"transparent"===o?"transparent":"var(--colorsUtilityMajor025)",a[e],"default"===s&&r.css(["border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);"]),"large"===s&&r.css(["border-bottom-left-radius:var(--borderRadius200);border-bottom-right-radius:var(--borderRadius200);"]),t.default,d[e])));exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("styled-components"),e=require("styled-system"),o=require("../card-column/card-column.style.js");function t(r){return r&&r.__esModule?r:{default:r}}const a={small:"0 -24px",medium:"0 -32px",large:"0 -48px"},d={small:"16px 24px",medium:"18px 32px",large:"20px 48px"},s=t(r).default.div.withConfig({displayName:"card-footer.style__StyledCardFooter",componentId:"sc-bacf2806-0"})([""," ",""],e.space,(({spacing:e,variant:t,roundness:s})=>r.css(["background-color:",";border-top:var(--colorsUtilityMajor100);border-top-width:1px;border-top-style:solid;margin:",";display:flex;"," "," ","{margin:0;padding:",";}"],"transparent"===t?"transparent":"var(--colorsUtilityMajor025)",a[e],"default"===s&&r.css(["border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);"]),"large"===s&&r.css(["border-bottom-left-radius:var(--borderRadius200);border-bottom-right-radius:var(--borderRadius200);"]),o.default,d[e])));exports.default=s;
@@ -1,11 +1,8 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
4
- export interface TypeIconProps {
5
- transparent?: boolean;
6
- variant: MessageVariant;
7
- }
8
- export type MessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai";
4
+ export type MessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai" | "error-subtle" | "info-subtle" | "success-subtle" | "warning-subtle" | "ai-subtle" | "callout-subtle";
5
+ export type InternalMessageVariant = "error" | "info" | "success" | "warning" | "neutral" | "ai" | "callout";
9
6
  export interface MessageProps extends MarginProps, TagProps {
10
7
  /** Set the component's content */
11
8
  children?: React.ReactNode;
@@ -17,16 +14,18 @@ export interface MessageProps extends MarginProps, TagProps {
17
14
  onDismiss?: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement>) => void;
18
15
  /** Flag to determine if the message is rendered */
19
16
  open?: boolean;
20
- /** Flag to determine if the close button is rendered */
17
+ /** @deprecated Flag to determine if the close button is rendered*/
21
18
  showCloseIcon?: boolean;
22
19
  /** Set message title */
23
20
  title?: React.ReactNode;
24
- /** Set transparent styling */
21
+ /** @deprecated Set transparent styling */
25
22
  transparent?: boolean;
26
23
  /** Set the component's variant */
27
24
  variant?: MessageVariant;
28
25
  /** Set the component's width, accepts any valid css string */
29
26
  width?: string;
27
+ /** Set the component's size */
28
+ size?: "medium" | "large";
30
29
  }
31
30
  export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
32
31
  export default Message;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../typography/typography.component.js"),n=require("../content/content.component.js"),o=require("./message.style.js"),s=require("../../__internal__/utils/helpers/tags/tags.js"),i=require("../icon/icon.component.js"),a=require("../icon-button/icon-button.component.js"),l=require("../../__internal__/ai-icon/ai-icon.component.js");require("../../style/utils/filter-styled-system-padding-props.js");var c=require("../../style/utils/filter-styled-system-margin-props.js"),u=require("../../hooks/__internal__/useLocale/useLocale.js");function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){f(e,t,r[t])}))}return e}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const j=p(t).default.forwardRef(((p,f)=>{var{open:j=!0,transparent:b=!1,title:g,variant:O="info",children:m,onDismiss:h,id:w,closeButtonAriaLabel:x,showCloseIcon:_=!0,width:v}=p,P=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(p,["open","transparent","title","variant","children","onDismiss","id","closeButtonAriaLabel","showCloseIcon","width"]);const q=t.useRef(null),S=f||q,k=u.default(),C=c.default(P);return j?e.jsxs(o.default,y(d(y(d({},s.default("Message",P)),{transparent:b,variant:O,id:w,width:v,ref:S}),C),{tabIndex:-1,children:[e.jsx(o.TypeIconStyle,{variant:O,transparent:b,children:"ai"===O?e.jsx(l.AiIcon,{"data-role":"ai-icon"}):e.jsx(i.default,{"data-role":"category-icon",type:{neutral:"info",success:"tick_circle",error:"error",warning:"warning",info:"info"}[O]})}),e.jsx(r.Typography,{screenReaderOnly:!0,children:k.message[O]()}),e.jsx(o.MessageContent,{"data-element":"message-content","data-role":"message-content",children:_&&h?e.jsxs(e.Fragment,{children:[e.jsx(n.Content,{title:g,children:m}),e.jsx(a.default,{"data-element":"close","aria-label":x||k.message.closeButtonAriaLabel(),onClick:h,children:e.jsx(i.default,{type:"close"})})]}):e.jsx(n.Content,{title:g,children:m})})]})):null}));j.displayName="Message",exports.Message=j,exports.default=j;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../typography/typography.component.js"),n=require("./message.style.js"),s=require("../../__internal__/utils/helpers/tags/tags.js"),o=require("../icon/icon.component.js"),i=require("../icon-button/icon-button.component.js"),a=require("../../__internal__/ai-icon/ai-icon.component.js");require("../../style/utils/filter-styled-system-padding-props.js");var l=require("../../style/utils/filter-styled-system-margin-props.js"),c=require("../../hooks/__internal__/useLocale/useLocale.js"),u=require("../../__internal__/utils/logger/index.js");function p(e){return e&&e.__esModule?e:{default:e}}function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){d(e,r,t[r])}))}return e}function y(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}let b=!1,g=!1,j=!1;const h=p(r).default.forwardRef(((p,d)=>{var{open:h=!0,transparent:m=!1,title:O,variant:v="info",children:x,onDismiss:w,id:_,closeButtonAriaLabel:P,showCloseIcon:q=!0,width:M,size:S="medium"}=p,I=function(e,r){if(null==e)return{};var t,n,s=function(e,r){if(null==e)return{};var t,n,s={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}(p,["open","transparent","title","variant","children","onDismiss","id","closeButtonAriaLabel","showCloseIcon","width","size"]);m&&!b&&(u.default.deprecate("The 'transparent' prop in `Message` is deprecated and will soon be removed."),b=!0),"neutral"!==v||g||(u.default.deprecate("The 'neutral' variant in `Message` is deprecated and will soon be removed."),g=!0),!1!==q||j||(u.default.deprecate("The 'showCloseIcon' prop in `Message` is deprecated and will soon be removed. To prevent the close button from being rendered, don't pass the `onDismiss` prop."),j=!0);const D=r.useRef(null),T=d||D,k=c.default(),C=l.default(I),z={neutral:"info",success:"tick_circle",error:"error",warning:"warning",info:"info",callout:"tag"},A=v.endsWith("-subtle"),L=v.replace("-subtle",""),W=()=>{var r,s;return e.jsxs(e.Fragment,{children:[e.jsx(n.TypeIconStyle,{"aria-hidden":"true",variant:L,isSubtle:A,transparent:m,children:"ai"===v?e.jsx(a.AiIcon,{"data-role":"ai-icon"}):"ai-subtle"===v?e.jsx(a.AiIconInverse,{"data-role":"ai-icon-subtle"}):e.jsx(o.default,{type:z[L]})}),e.jsx(t.Typography,{screenReaderOnly:!0,children:null===(r=(s=k.message)[L])||void 0===r?void 0:r.call(s)})]})};return h?e.jsxs(n.MessageStyle,y(f(y(f({},s.default("Message",I)),{transparent:m,variant:L,isSubtle:A,id:_,width:M,ref:T}),C),{tabIndex:-1,children:[!A&&W(),e.jsxs(n.MessageWrapper,{children:[e.jsxs(n.MessageContent,{"data-role":"message-content",size:S,isSubtle:A,children:[A&&W(),e.jsxs(n.MessageContentWrapper,{size:S,children:[O?"string"==typeof O?e.jsx(t.Typography,{m:0,fontWeight:"500",fontSize:"large"===S?"16px":"14px",children:O}):O:null,x]})]}),q&&w&&e.jsx(i.default,{my:"large"===S?2:1,mr:"large"===S?2:1,p:"4px","data-element":"close","aria-label":P||k.message.closeButtonAriaLabel(),onClick:w,children:e.jsx(o.default,{type:"cross"})})]})]})):null}));h.displayName="Message",exports.Message=h,exports.default=h;
@@ -1,14 +1,17 @@
1
1
  import { MarginProps } from "styled-system";
2
- import { MessageVariant, TypeIconProps } from "./message.component";
2
+ import { InternalMessageVariant } from "./message.component";
3
3
  type MessageStyleProps = {
4
- variant?: MessageVariant;
4
+ variant: InternalMessageVariant;
5
+ isSubtle?: boolean;
5
6
  transparent?: boolean;
6
7
  width?: string;
8
+ size?: "medium" | "large";
7
9
  };
8
- declare const MessageStyle: import("styled-components").StyledComponent<"div", any, {
10
+ export declare const MessageStyle: import("styled-components").StyledComponent<"div", any, {
9
11
  theme: object;
10
12
  } & MessageStyleProps & MarginProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, "theme">;
11
- declare const MessageContent: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- declare const TypeIconStyle: import("styled-components").StyledComponent<"div", any, TypeIconProps, never>;
13
- export default MessageStyle;
14
- export { MessageContent, TypeIconStyle };
13
+ export declare const MessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
+ export declare const MessageContent: import("styled-components").StyledComponent<"div", any, Pick<MessageStyleProps, "size" | "isSubtle">, never>;
15
+ export declare const MessageContentWrapper: import("styled-components").StyledComponent<"div", any, Pick<MessageStyleProps, "size">, never>;
16
+ export declare const TypeIconStyle: import("styled-components").StyledComponent<"div", any, MessageStyleProps, never>;
17
+ export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),a=require("../../style/themes/apply-base-theme.js");function r(e){return e&&e.__esModule?e:{default:e}}var s=r(e);const n={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)",ai:"var(--colorsUtilityYin100)"},o=s.default.div.attrs(a.default).withConfig({displayName:"message.style__MessageStyle",componentId:"sc-2c58500-0"})(["position:relative;display:flex;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}"," "," ",""],(({variant:e})=>e&&n[e]),(({transparent:t})=>t&&e.css(["border:none;background:transparent;"])),(({width:e})=>e&&`width: ${e};`),t.margin),i=s.default.div.withConfig({displayName:"message.style__MessageContent",componentId:"sc-2c58500-1"})(["width:100%;display:flex;justify-content:space-between;align-items:center;padding:var(--spacing200);gap:var(--spacing300);"]),l=s.default.div.withConfig({displayName:"message.style__TypeIconStyle",componentId:"sc-2c58500-2"})(["display:flex;justify-content:center;align-items:center;background-color:",";min-width:30px;span{&:before{color:var(--colorsUtilityYang100);}}",""],(({variant:e})=>n[e]),(({transparent:t,variant:a})=>t&&e.css(["background-color:transparent;span{&:before{color:",";}}"],n[a])));exports.MessageContent=i,exports.TypeIconStyle=l,exports.default=o;
1
+ "use strict";var e=require("styled-components"),s=require("styled-system"),t=require("../../style/themes/apply-base-theme.js");function a(e){return e&&e.__esModule?e:{default:e}}var r=a(e);const o={error:"#CD384B",info:"#0060A7",success:"#00811F ",warning:"#D64309",neutral:"var(--colorsSemanticNeutral500)",ai:"var(--colorsUtilityYin100)",callout:"var(--colorsUtilityYin100)"},n={error:"#FDECEB",info:"#EAEEF6",success:"#E9F2E8 ",warning:"#FFEDE5",ai:"#EFEFEF",callout:"#E6FAE2"},i=r.default.div.attrs(t.default).withConfig({displayName:"message.style__MessageStyle",componentId:"sc-2430d97-0"})(["position:relative;display:flex;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);max-width:720px;:focus{outline:none;}"," "," "," ",""],(({variant:e})=>o[e]),(({isSubtle:s,variant:t})=>s&&e.css(["border:none;background-color:",";"],n[t])),(({transparent:s})=>s&&e.css(["border:none;background:transparent;"])),(({width:e})=>e&&`width: ${e};`),s.margin),l=r.default.div.withConfig({displayName:"message.style__MessageWrapper",componentId:"sc-2430d97-1"})(["display:flex;justify-content:space-between;align-items:flex-start;width:100%;"]),d=r.default.div.withConfig({displayName:"message.style__MessageContent",componentId:"sc-2430d97-2"})(["display:flex;box-sizing:border-box;width:100%;height:100%;padding:12px;",""],(({size:s,isSubtle:t})=>e.css([""," ",""],"large"===s&&e.css(["padding:20px;"]),t&&e.css(["gap:",";"],"large"===s?"16px":"8px")))),p=r.default.div.withConfig({displayName:"message.style__MessageContentWrapper",componentId:"sc-2430d97-3"})(["display:flex;flex-direction:column;justify-content:center;width:100%;gap:2px;font-size:14px;",""],(({size:s})=>"large"===s&&e.css(["gap:4px;font-size:16px;"]))),c=r.default.div.withConfig({displayName:"message.style__TypeIconStyle",componentId:"sc-2430d97-4"})(["",""],(({transparent:s,isSubtle:t,variant:a})=>e.css(["display:flex;background-color:",";"," span{width:20px;height:20px;&:before{color:var(--colorsUtilityYang100);}}"," ",""],o[a],!t&&e.css(["justify-content:center;align-items:center;width:32px;"]),t&&e.css(["padding-top:2px;background-color:transparent;span{&:before{color:",";}}"],o[a]),s&&e.css(["background-color:transparent;span{&:before{color:",";}}"],o[a]))));exports.MessageContent=d,exports.MessageContentWrapper=p,exports.MessageStyle=i,exports.MessageWrapper=l,exports.TypeIconStyle=c;
@@ -1,4 +1,3 @@
1
- import { MessageVariant } from "../message/message.component";
2
1
  declare const StyledPortal: import("styled-components").StyledComponent<({ children, className, id, onReposition, inertOptOut, }: import("../portal/portal").PortalProps) => import("react").JSX.Element, any, {
3
2
  theme: object;
4
3
  } & {
@@ -6,14 +5,13 @@ declare const StyledPortal: import("styled-components").StyledComponent<({ child
6
5
  alignY?: "top" | "center" | "bottom";
7
6
  isNotice?: boolean;
8
7
  }, "theme">;
9
- type ToastVariants = Exclude<MessageVariant, "ai">;
10
8
  type ToastStyleProps = {
11
9
  align?: "left" | "center" | "right";
12
10
  alignY?: "top" | "center" | "bottom";
13
11
  maxWidth?: string;
14
12
  isNotice?: boolean;
15
13
  isNotification?: boolean;
16
- variant: ToastVariants;
14
+ variant: "error" | "info" | "success" | "warning" | "neutral";
17
15
  };
18
16
  declare const StyledToast: import("styled-components").StyledComponent<"div", any, ToastStyleProps, never>;
19
17
  declare const StyledToastContent: import("styled-components").StyledComponent<"div", any, {
@@ -1 +1 @@
1
- "use strict";var t=require("styled-components"),e=require("../icon-button/icon-button.style.js"),o=require("../portal/portal.js"),a=require("../../style/themes/apply-base-theme.js"),i=require("../icon/icon.style.js");function s(t){return t&&t.__esModule?t:{default:t}}var r=s(t);const n=r.default(o.Portal).attrs(a.default).withConfig({displayName:"toast.style__StyledPortal",componentId:"sc-542b7ed1-0"})(["",""],(({theme:e,isNotice:o,align:a,alignY:i})=>t.css(["position:fixed;top:0;z-index:",";"," "," "," "," "," "," ",""],e.zIndex.notification,"left"===a&&t.css(["left:0;transform:translateX(50%);"]),"center"===a&&t.css(["margin-left:50%;transform:translateX(-50%);"]),"right"===a&&t.css(["right:0;transform:translateX(-50%);"]),o&&t.css(["bottom:0;top:auto;width:100%;"]),"top"===i&&t.css(["top:0;bottom:auto;"]),"center"===i&&t.css(["top:50%;transform:translate(",",-50%);"],"left"===a?"50%":"-50%"),"bottom"===i&&t.css(["bottom:0;top:auto;display:flex;flex-direction:column-reverse;"])))),l=".toast",p=".toast-alternative",c={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)"},d=t.css(["position:absolute;right:15px;top:50%;transform:translateY(-50%);"]),m=r.default.div.withConfig({displayName:"toast.style__StyledToast",componentId:"sc-542b7ed1-1"})([""," :focus{outline:none;}&","-appear,&","-enter{opacity:0;transform:scale(0.5);}&","-appear","-appear-active,&","-enter","-enter-active{opacity:1;transform:",";transition:all 300ms cubic-bezier(0.25,0.25,0,1.5);}&","-exit","-exit-active{opacity:0;",";transition:all 150ms ease-out;}","{","}",""],(({maxWidth:o,align:a,isNotification:i,alignY:s,isNotice:r,variant:n})=>t.css(["position:relative;display:flex;justify-content:flex-start;align-content:center;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}","{","}box-shadow:",";line-height:22px;margin-top:",";margin-bottom:",";max-width:",";position:relative;margin-right:",";margin-left:",";",""],c[n],e.default,d,"0 10px 30px 0 rgba(0, 20, 29, 0.1), 0 30px 60px 0 rgba(0, 20, 29, 0.1)",r||"center"===s||"bottom"===s?"0":"30px","bottom"!==s||r?"0":"30px",o||"300px","center"===a||"right"===a?"auto":"30px","center"===a||"left"===a?"auto":"30px",i&&t.css(["border:1px solid var(--colorsSemanticInfo500);"]))),l,l,l,l,l,l,(({align:t})=>"center"===t?" scale(1) translateY(0)":"scale(1)"),l,l,(({alignY:t})=>"bottom"===t?"margin-bottom: -40px":"margin-top: -40px"),e.default,d,(({isNotice:o,alignY:a})=>o&&t.css(["background-color:var(--colorsUtilityMajor400);border:none;color:var(--colorsSemanticNeutralYang100);margin-right:0;max-width:100%;","{right:55px;}"," ","{color:var(--colorsSemanticNeutralYang100);}&","-appear,&","-enter{",";opacity:0;}&","-exit{",";opacity:1;}&","-appear","-appear-active,&","-enter","-enter-active{",";opacity:1;transition:all 400ms ease;}&","-exit","-exit-active{",";opacity:0;transition:all 200ms ease;}"],e.default,e.default,i.default,p,p,"top"===a?"top: -40px":"bottom: -40px",p,"top"===a?"top: 0":"bottom: 0",p,p,p,p,"top"===a?"top: 0":"bottom: 0",p,p,"top"===a?"top: -40px":"bottom: -40px"))),x=r.default.div.withConfig({displayName:"toast.style__StyledToastContent",componentId:"sc-542b7ed1-2"})(["padding:8px 16px 8px 16px;white-space:pre-wrap;flex:1;"," ",""],(({isNotice:e})=>e&&t.css(["display:flex;align-items:center;padding:11px 40px;"])),(({isDismiss:e,isNotice:o})=>e&&t.css(["padding-right:",";"],o?"88px":"48px"))),u=r.default.div.withConfig({displayName:"toast.style__ToastWrapper",componentId:"sc-542b7ed1-3"})([""," ",""],(({align:e})=>e&&t.css(["position:relative;width:auto;height:auto;justify-content:",";display:flex;"],e)),(({isNotice:e})=>e&&t.css(["display:block;"])));exports.StyledPortal=n,exports.StyledToast=m,exports.StyledToastContent=x,exports.ToastWrapper=u;
1
+ "use strict";var t=require("styled-components"),e=require("../icon-button/icon-button.style.js"),o=require("../portal/portal.js"),a=require("../../style/themes/apply-base-theme.js"),i=require("../icon/icon.style.js");function s(t){return t&&t.__esModule?t:{default:t}}var r=s(t);const n=r.default(o.Portal).attrs(a.default).withConfig({displayName:"toast.style__StyledPortal",componentId:"sc-6f15a9b3-0"})(["",""],(({theme:e,isNotice:o,align:a,alignY:i})=>t.css(["position:fixed;top:0;z-index:",";"," "," "," "," "," "," ",""],e.zIndex.notification,"left"===a&&t.css(["left:0;transform:translateX(50%);"]),"center"===a&&t.css(["margin-left:50%;transform:translateX(-50%);"]),"right"===a&&t.css(["right:0;transform:translateX(-50%);"]),o&&t.css(["bottom:0;top:auto;width:100%;"]),"top"===i&&t.css(["top:0;bottom:auto;"]),"center"===i&&t.css(["top:50%;transform:translate(",",-50%);"],"left"===a?"50%":"-50%"),"bottom"===i&&t.css(["bottom:0;top:auto;display:flex;flex-direction:column-reverse;"])))),l=".toast",p=".toast-alternative",c={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",success:"var(--colorsSemanticPositive500)",warning:"var(--colorsSemanticCaution500)",neutral:"var(--colorsSemanticNeutral500)"},d=t.css(["position:absolute;right:15px;top:50%;transform:translateY(-50%);"]),m=r.default.div.withConfig({displayName:"toast.style__StyledToast",componentId:"sc-6f15a9b3-1"})([""," :focus{outline:none;}&","-appear,&","-enter{opacity:0;transform:scale(0.5);}&","-appear","-appear-active,&","-enter","-enter-active{opacity:1;transform:",";transition:all 300ms cubic-bezier(0.25,0.25,0,1.5);}&","-exit","-exit-active{opacity:0;",";transition:all 150ms ease-out;}","{","}",""],(({maxWidth:o,align:a,isNotification:i,alignY:s,isNotice:r,variant:n})=>t.css(["position:relative;display:flex;justify-content:flex-start;align-content:center;border-radius:var(--borderRadius100);overflow:hidden;border:1px solid ",";background-color:var(--colorsUtilityYang100);min-height:38px;:focus{outline:none;}","{","}box-shadow:",";line-height:22px;margin-top:",";margin-bottom:",";max-width:",";position:relative;margin-right:",";margin-left:",";",""],c[n],e.default,d,"0 10px 30px 0 rgba(0, 20, 29, 0.1), 0 30px 60px 0 rgba(0, 20, 29, 0.1)",r||"center"===s||"bottom"===s?"0":"30px","bottom"!==s||r?"0":"30px",o||"300px","center"===a||"right"===a?"auto":"30px","center"===a||"left"===a?"auto":"30px",i&&t.css(["border:1px solid var(--colorsSemanticInfo500);"]))),l,l,l,l,l,l,(({align:t})=>"center"===t?" scale(1) translateY(0)":"scale(1)"),l,l,(({alignY:t})=>"bottom"===t?"margin-bottom: -40px":"margin-top: -40px"),e.default,d,(({isNotice:o,alignY:a})=>o&&t.css(["background-color:var(--colorsUtilityMajor400);border:none;color:var(--colorsSemanticNeutralYang100);margin-right:0;max-width:100%;","{right:55px;}"," ","{color:var(--colorsSemanticNeutralYang100);}&","-appear,&","-enter{",";opacity:0;}&","-exit{",";opacity:1;}&","-appear","-appear-active,&","-enter","-enter-active{",";opacity:1;transition:all 400ms ease;}&","-exit","-exit-active{",";opacity:0;transition:all 200ms ease;}"],e.default,e.default,i.default,p,p,"top"===a?"top: -40px":"bottom: -40px",p,"top"===a?"top: 0":"bottom: 0",p,p,p,p,"top"===a?"top: 0":"bottom: 0",p,p,"top"===a?"top: -40px":"bottom: -40px"))),x=r.default.div.withConfig({displayName:"toast.style__StyledToastContent",componentId:"sc-6f15a9b3-2"})(["padding:8px 16px 8px 16px;white-space:pre-wrap;flex:1;"," ",""],(({isNotice:e})=>e&&t.css(["display:flex;align-items:center;padding:11px 40px;"])),(({isDismiss:e,isNotice:o})=>e&&t.css(["padding-right:",";"],o?"88px":"48px"))),f=r.default.div.withConfig({displayName:"toast.style__ToastWrapper",componentId:"sc-6f15a9b3-3"})([""," ",""],(({align:e})=>e&&t.css(["position:relative;width:auto;height:auto;justify-content:",";display:flex;"],e)),(({isNotice:e})=>e&&t.css(["display:block;"])));exports.StyledPortal=n,exports.StyledToast=m,exports.StyledToastContent=x,exports.ToastWrapper=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("date-fns/locale/en-GB");const a=e=>1===("string"==typeof e?parseInt(e):e),r={locale:()=>"en-GB",actions:{edit:()=>"Edit",delete:()=>"Delete"},actionPopover:{ariaLabel:()=>"actions"},advancedColorPicker:{ariaLabel:()=>"Change colour",currentColorDescriptionTerm:()=>"Current colour assigned: ",currentColorAssigned:e=>e},batchSelection:{selected:e=>`${e} selected`},breadcrumbs:{ariaLabel:()=>"breadcrumbs"},confirm:{no:()=>"No",yes:()=>"Yes"},characterCount:{tooManyCharacters:(e,a)=>1===e?`${a} character too many`:`${a} characters too many`,charactersLeft:(e,a)=>1===e?`${a} character left`:`${a} characters left`,visuallyHiddenHint:e=>`You can enter up to ${e} characters`},date:{dateFnsLocale:()=>e.enGB,ariaLabels:{previousMonthButton:()=>"Previous month",nextMonthButton:()=>"Next month"},dateFormatOverride:void 0},dialog:{ariaLabels:{close:()=>"Close"}},dismissibleBox:{ariaLabels:{close:()=>"Close"}},errors:{messages:{formSummary:(e,r,o)=>{const t=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===o?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${t}`]:r?[`There ${s}`,`${r} ${n}`]:null}}},fileInput:{dragAndDrop:()=>"or drag and drop your file",selectFile:()=>"Select file",fileUploadStatus:()=>"File upload status",actions:{cancel:()=>"Cancel upload",clear:()=>"Clear",delete:()=>"Delete file"}},heading:{backLinkAriaLabel:()=>"Back"},link:{skipLinkLabel:()=>"Skip to main content"},loader:{loading:()=>"Loading"},loaderSpinner:{loading:()=>"Loading..."},loaderStar:{loading:()=>"Loading..."},menuFullscreen:{ariaLabels:{closeButton:()=>"Close"}},message:{closeButtonAriaLabel:()=>"Close",error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",ai:()=>"AI Information"},numeralDate:{validation:{day:(e,a)=>e&&a?`Day in ${e} should be a number within 1-${a}.`:"Day should be a number within a 1-31 range.",month:()=>"Month should be a number within a 1-12 range.",year:()=>"Year should be a number within a 1800-2200 range."},labels:{day:()=>"Day",month:()=>"Month",year:()=>"Year"}},pager:{show:()=>"Show",records:(e,r=!0)=>{const o=a(e)?"item":"items";return r?`${e} ${o}`:o},first:()=>"First",last:()=>"Last",next:()=>"Next",previous:()=>"Previous",pageX:()=>"Page",ofY:e=>`of ${e}`},password:{buttonLabelHide:()=>"Hide",buttonLabelShow:()=>"Show",ariaLabelHide:()=>"Hide password",ariaLabelShow:()=>"Show password",ariaLiveShownMessage:()=>"Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",ariaLiveHiddenMessage:()=>"Your password is currently hidden."},pill:{remove:e=>`Remove ${e} pill`},progressTracker:{of:()=>"of"},pod:{undo:()=>"Undo"},textEditor:{boldAria:()=>"Bold",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",characterCounter:e=>`${"number"==typeof e?e.toString():e} characters remaining`,characterLimit:e=>`You are ${e} character(s) over the character limit`,contentEditorAria:()=>"Rich text content editor",italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",unorderedListAria:()=>"Unordered list"},search:{searchButtonText:()=>"Search"},select:{actionButtonText:()=>"Add New Item",placeholder:()=>"Please Select...",noResultsForTerm:e=>`No results for "${e}"`},sidebar:{ariaLabels:{close:()=>"Close"}},sort:{accessibleName:(e,a)=>`Sort all ${e||"contents"}${a?` in an ${a} order.`:" in an ascending or descending order."}`},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,o)=>`${o?`${o}.`:""} ${e}. Step ${a} of ${r}.`,closeIconAriaLabel:()=>"Close"},switch:{on:()=>"ON",off:()=>"OFF"},tileSelect:{deselect:()=>"Deselect"},time:{amText:()=>"AM",pmText:()=>"PM",hoursLabelText:()=>"Hrs.",minutesLabelText:()=>"Mins.",hoursAriaLabelText:()=>"Hours",minutesAriaLabelText:()=>"Minutes"},toast:{ariaLabels:{close:()=>"Close"},error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",notification:()=>"Notification"},verticalMenu:{ariaLabels:{responsiveMenuLauncher:()=>"Product menu launcher",responsiveMenuCloseButton:()=>"Close product menu",responsiveMenuAria:()=>"Product menu"}},verticalMenuFullScreen:{ariaLabels:{close:()=>"Close"}}};exports.default=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("date-fns/locale/en-GB");const a=e=>1===("string"==typeof e?parseInt(e):e),r={locale:()=>"en-GB",actions:{edit:()=>"Edit",delete:()=>"Delete"},actionPopover:{ariaLabel:()=>"actions"},advancedColorPicker:{ariaLabel:()=>"Change colour",currentColorDescriptionTerm:()=>"Current colour assigned: ",currentColorAssigned:e=>e},batchSelection:{selected:e=>`${e} selected`},breadcrumbs:{ariaLabel:()=>"breadcrumbs"},confirm:{no:()=>"No",yes:()=>"Yes"},characterCount:{tooManyCharacters:(e,a)=>1===e?`${a} character too many`:`${a} characters too many`,charactersLeft:(e,a)=>1===e?`${a} character left`:`${a} characters left`,visuallyHiddenHint:e=>`You can enter up to ${e} characters`},date:{dateFnsLocale:()=>e.enGB,ariaLabels:{previousMonthButton:()=>"Previous month",nextMonthButton:()=>"Next month"},dateFormatOverride:void 0},dialog:{ariaLabels:{close:()=>"Close"}},dismissibleBox:{ariaLabels:{close:()=>"Close"}},errors:{messages:{formSummary:(e,r,o)=>{const t=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===o?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${t}`]:r?[`There ${s}`,`${r} ${n}`]:null}}},fileInput:{dragAndDrop:()=>"or drag and drop your file",selectFile:()=>"Select file",fileUploadStatus:()=>"File upload status",actions:{cancel:()=>"Cancel upload",clear:()=>"Clear",delete:()=>"Delete file"}},heading:{backLinkAriaLabel:()=>"Back"},link:{skipLinkLabel:()=>"Skip to main content"},loader:{loading:()=>"Loading"},loaderSpinner:{loading:()=>"Loading..."},loaderStar:{loading:()=>"Loading..."},menuFullscreen:{ariaLabels:{closeButton:()=>"Close"}},message:{closeButtonAriaLabel:()=>"Close",error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",ai:()=>"AI Information",callout:()=>"Callout"},numeralDate:{validation:{day:(e,a)=>e&&a?`Day in ${e} should be a number within 1-${a}.`:"Day should be a number within a 1-31 range.",month:()=>"Month should be a number within a 1-12 range.",year:()=>"Year should be a number within a 1800-2200 range."},labels:{day:()=>"Day",month:()=>"Month",year:()=>"Year"}},pager:{show:()=>"Show",records:(e,r=!0)=>{const o=a(e)?"item":"items";return r?`${e} ${o}`:o},first:()=>"First",last:()=>"Last",next:()=>"Next",previous:()=>"Previous",pageX:()=>"Page",ofY:e=>`of ${e}`},password:{buttonLabelHide:()=>"Hide",buttonLabelShow:()=>"Show",ariaLabelHide:()=>"Hide password",ariaLabelShow:()=>"Show password",ariaLiveShownMessage:()=>"Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",ariaLiveHiddenMessage:()=>"Your password is currently hidden."},pill:{remove:e=>`Remove ${e} pill`},progressTracker:{of:()=>"of"},pod:{undo:()=>"Undo"},textEditor:{boldAria:()=>"Bold",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",characterCounter:e=>`${"number"==typeof e?e.toString():e} characters remaining`,characterLimit:e=>`You are ${e} character(s) over the character limit`,contentEditorAria:()=>"Rich text content editor",italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",unorderedListAria:()=>"Unordered list"},search:{searchButtonText:()=>"Search"},select:{actionButtonText:()=>"Add New Item",placeholder:()=>"Please Select...",noResultsForTerm:e=>`No results for "${e}"`},sidebar:{ariaLabels:{close:()=>"Close"}},sort:{accessibleName:(e,a)=>`Sort all ${e||"contents"}${a?` in an ${a} order.`:" in an ascending or descending order."}`},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,o)=>`${o?`${o}.`:""} ${e}. Step ${a} of ${r}.`,closeIconAriaLabel:()=>"Close"},switch:{on:()=>"ON",off:()=>"OFF"},tileSelect:{deselect:()=>"Deselect"},time:{amText:()=>"AM",pmText:()=>"PM",hoursLabelText:()=>"Hrs.",minutesLabelText:()=>"Mins.",hoursAriaLabelText:()=>"Hours",minutesAriaLabelText:()=>"Minutes"},toast:{ariaLabels:{close:()=>"Close"},error:()=>"Error",info:()=>"Information",success:()=>"Success",warning:()=>"Warning",neutral:()=>"Information",notification:()=>"Notification"},verticalMenu:{ariaLabels:{responsiveMenuLauncher:()=>"Product menu launcher",responsiveMenuCloseButton:()=>"Close product menu",responsiveMenuAria:()=>"Product menu"}},verticalMenuFullScreen:{ariaLabels:{close:()=>"Close"}}};exports.default=r;
@@ -89,6 +89,7 @@ interface Locale {
89
89
  warning: () => string;
90
90
  neutral: () => string;
91
91
  ai: () => string;
92
+ callout?: () => string;
92
93
  };
93
94
  numeralDate: {
94
95
  validation: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "157.0.0",
3
+ "version": "157.1.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -185,7 +185,7 @@
185
185
  "url-loader": "^4.1.1",
186
186
  "uuid": "^8.3.2",
187
187
  "vite": "^6.3.4",
188
- "vite-plugin-static-copy": "^2.2.0"
188
+ "vite-plugin-static-copy": "^3.1.2"
189
189
  },
190
190
  "dependencies": {
191
191
  "@floating-ui/dom": "~1.2.9",