carbon-react 158.44.0 → 158.46.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.
Files changed (52) hide show
  1. package/esm/components/heading/heading.style.d.ts +1 -1
  2. package/esm/components/image/image.style.d.ts +1 -1
  3. package/esm/components/loader/__next__/internal/ring-loader.component.js +1 -1
  4. package/esm/components/loader/__next__/internal/standalone-loader.component.js +1 -1
  5. package/esm/components/loader/__next__/loader.style.d.ts +2 -2
  6. package/esm/components/loader/__next__/loader.style.js +1 -1
  7. package/esm/components/loader-spinner/loader-spinner.component.js +1 -1
  8. package/esm/components/loader-spinner/loader-spinner.style.d.ts +4 -2
  9. package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
  10. package/esm/components/loader-star/loader-star.style.d.ts +1 -1
  11. package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -1
  12. package/esm/components/tile/tile.style.d.ts +1 -1
  13. package/esm/components/typography/__internal__/__next__/index.d.ts +2 -0
  14. package/esm/components/typography/__internal__/__next__/index.js +1 -0
  15. package/esm/components/typography/__internal__/__next__/typography.component.d.ts +37 -0
  16. package/esm/components/typography/__internal__/__next__/typography.component.js +1 -0
  17. package/esm/components/typography/__internal__/__next__/typography.style.d.ts +25 -0
  18. package/esm/components/typography/__internal__/__next__/typography.style.js +1 -0
  19. package/esm/components/typography/list.component.d.ts +30 -0
  20. package/esm/components/typography/typography.component.d.ts +47 -13
  21. package/esm/components/typography/typography.component.js +1 -1
  22. package/esm/components/typography/typography.style.d.ts +1 -1
  23. package/esm/components/typography/typography.style.js +1 -1
  24. package/esm/locales/en-gb.js +1 -1
  25. package/esm/locales/locale.d.ts +3 -0
  26. package/lib/components/heading/heading.style.d.ts +1 -1
  27. package/lib/components/image/image.style.d.ts +1 -1
  28. package/lib/components/loader/__next__/internal/ring-loader.component.js +1 -1
  29. package/lib/components/loader/__next__/internal/standalone-loader.component.js +1 -1
  30. package/lib/components/loader/__next__/loader.style.d.ts +2 -2
  31. package/lib/components/loader/__next__/loader.style.js +1 -1
  32. package/lib/components/loader-spinner/loader-spinner.component.js +1 -1
  33. package/lib/components/loader-spinner/loader-spinner.style.d.ts +4 -2
  34. package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
  35. package/lib/components/loader-star/loader-star.style.d.ts +1 -1
  36. package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -1
  37. package/lib/components/tile/tile.style.d.ts +1 -1
  38. package/lib/components/typography/__internal__/__next__/index.d.ts +2 -0
  39. package/lib/components/typography/__internal__/__next__/index.js +1 -0
  40. package/lib/components/typography/__internal__/__next__/package.json +6 -0
  41. package/lib/components/typography/__internal__/__next__/typography.component.d.ts +37 -0
  42. package/lib/components/typography/__internal__/__next__/typography.component.js +1 -0
  43. package/lib/components/typography/__internal__/__next__/typography.style.d.ts +25 -0
  44. package/lib/components/typography/__internal__/__next__/typography.style.js +1 -0
  45. package/lib/components/typography/list.component.d.ts +30 -0
  46. package/lib/components/typography/typography.component.d.ts +47 -13
  47. package/lib/components/typography/typography.component.js +1 -1
  48. package/lib/components/typography/typography.style.d.ts +1 -1
  49. package/lib/components/typography/typography.style.js +1 -1
  50. package/lib/locales/en-gb.js +1 -1
  51. package/lib/locales/locale.d.ts +3 -0
  52. package/package.json +1 -1
@@ -13,7 +13,7 @@ type StyledHeadingTitleProps = {
13
13
  withMargin?: boolean;
14
14
  };
15
15
  declare const StyledHeadingTitle: import("styled-components").StyledComponent<{
16
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
16
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
17
17
  displayName: string;
18
18
  }, any, StyledHeadingTitleProps, never>;
19
19
  declare const StyledHeadingPills: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -38,5 +38,5 @@ declare const StyledImage: import("styled-components").StyledComponent<"div", an
38
38
  backgroundPosition: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundPosition<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
39
39
  backgroundRepeat: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundRepeat, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
40
40
  backgroundSize: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundSize<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
41
- } & StyledImageProps, "theme" | "children" | "hidden" | "src" | "as" | "left" | "right" | "position" | "bottom" | "top" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat">;
41
+ } & StyledImageProps, "theme" | "children" | "hidden" | "src" | "as" | "left" | "right" | "position" | "bottom" | "top" | "backgroundRepeat" | "backgroundSize" | "backgroundPosition">;
42
42
  export { StyledImage };
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import"react";import{StyledRingLoaderWrapper as a,StyledRingCircleSvg as i,StyledLoaderLabel as o}from"../loader.style.js";import l from"../../../../hooks/__internal__/useLocale/useLocale.js";const n=e=>e||.8,s=({inverse:s,size:t,variant:c,hasMotion:d,isTracked:m,animationTime:u,loaderLabel:p,showLabel:v,isSuccess:h,isError:k})=>{const T=l(),f=c&&["stacked","inline"].includes(c)?c:"stacked",g=t&&["extra-small","small","large"].includes(t)?t:"medium";return e(a,{loaderVariant:c,"data-role":"ring-loader-container",children:[e(i,{inverse:s,role:"presentation",size:g,variant:f,hasMotion:d,isTracked:m,animationTime:n(u),viewBox:"0 0 24 24",isSuccess:h,isError:k,children:[r("circle",{"data-role":"outer-arc"}),r("circle",{"data-role":"inner-arc"})]}),v&&r(o,{inverse:s,"data-role":"loader-label",variant:"span",loaderVariant:f,loaderType:"ring",size:g,children:p||(null==T?void 0:T.loader.loading())})]})};export{s as default};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import"react";import{StyledRingLoaderWrapper as a,StyledRingCircleSvg as i,StyledLoaderLabel as o}from"../loader.style.js";import l from"../../../../hooks/__internal__/useLocale/useLocale.js";const n=e=>e||.8,s=({inverse:s,size:t,variant:c,hasMotion:d,isTracked:m,animationTime:u,loaderLabel:p,showLabel:v,isSuccess:h,isError:k})=>{const T=l(),f=c&&["stacked","inline"].includes(c)?c:"stacked",g=t&&["extra-small","small","large"].includes(t)?t:"medium";return e(a,{loaderVariant:c,"data-role":"ring-loader-container",children:[e(i,{inverse:s,role:"presentation",size:g,variant:f,hasMotion:d,isTracked:m,animationTime:n(u),viewBox:"0 0 24 24",isSuccess:h,isError:k,children:[r("circle",{"data-role":"outer-arc"}),r("circle",{"data-role":"inner-arc"})]}),v&&r(o,{inverse:s,"data-role":"loader-label",variant:"span",loaderVariant:f,loaderType:"ring",$size:g,children:p||(null==T?void 0:T.loader.loading())})]})};export{s as default};
@@ -1 +1 @@
1
- import{jsxs as a,Fragment as e,jsx as r}from"react/jsx-runtime";import"react";import{OuterBar as i,InnerBar as o,StyledLoaderLabel as n}from"../loader.style.js";import l from"../../../../hooks/__internal__/useLocale/useLocale.js";const t=({size:t,variant:s,inverse:d,loaderLabel:m,showLabel:c,animationTime:p,hasMotion:v})=>{const u=l(),h="typical"===s||"ai"===s?s:"typical",b="small"===t||"large"===t?t:"medium";return a(e,{children:[r(i,{"data-role":"outer-bar",size:b,variant:h,inverse:!!d,children:r(o,{"data-role":"inner-bar",size:b,variant:h,inverse:!!d,animationTime:(a=>a||2)(p),hasMotion:v})}),c&&r(n,{inverse:d,"data-role":"loader-label",variant:"span",loaderVariant:s,loaderType:"standalone",size:t,children:m||(null==u?void 0:u.loader.loading())})]})};export{t as default};
1
+ import{jsxs as a,Fragment as e,jsx as r}from"react/jsx-runtime";import"react";import{OuterBar as i,InnerBar as o,StyledLoaderLabel as n}from"../loader.style.js";import l from"../../../../hooks/__internal__/useLocale/useLocale.js";const t=({size:t,variant:s,inverse:d,loaderLabel:m,showLabel:c,animationTime:p,hasMotion:v})=>{const u=l(),h="typical"===s||"ai"===s?s:"typical",b="small"===t||"large"===t?t:"medium";return a(e,{children:[r(i,{"data-role":"outer-bar",size:b,variant:h,inverse:!!d,children:r(o,{"data-role":"inner-bar",size:b,variant:h,inverse:!!d,animationTime:(a=>a||2)(p),hasMotion:v})}),c&&r(n,{inverse:d,"data-role":"loader-label",variant:"span",loaderVariant:s,loaderType:"standalone",$size:t,children:m||(null==u?void 0:u.loader.loading())})]})};export{t as default};
@@ -28,14 +28,14 @@ interface RingSvgProps {
28
28
  export declare const StyledRingCircleSvg: import("styled-components").StyledComponent<"svg", any, RingSvgProps, never>;
29
29
  export declare const StyledStars: import("styled-components").StyledComponent<"div", any, {}, never>;
30
30
  type LabelProps = {
31
- size?: string;
31
+ $size?: string;
32
32
  loaderVariant?: string;
33
33
  inverse?: boolean;
34
34
  loaderType: string;
35
35
  };
36
36
  export declare const StyledStarLoaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
37
37
  export declare const StyledLoaderLabel: import("styled-components").StyledComponent<{
38
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: import("../../typography").TypographyProps): import("react").JSX.Element;
38
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../../typography").TypographyProps): import("react").JSX.Element;
39
39
  displayName: string;
40
40
  }, any, LabelProps, never>;
41
41
  type RingLoaderWrapperProps = {
@@ -1 +1 @@
1
- import e,{keyframes as a,css as t}from"styled-components";import{margin as r}from"styled-system";import i from"../../../style/themes/apply-base-theme.js";import{Typography as o}from"../../typography/typography.component.js";import"react/jsx-runtime";import"react";import n from"../../button/button.style.js";import{StyledButton as s}from"../../button/__next__/button.style.js";const l={"extra-small":20,small:32,medium:64,large:80},d={"extra-small":2.7,small:2.7,medium:2.7,large:2.7},m={small:"4px",medium:"8px",large:"16px"},p={"extra-small":"8px",small:"8px",medium:"12px",large:"16px"},c=a(["0%{left:0%;animation-timing-function:linear;}30%{left:10px;animation-timing-function:cubic-bezier(0.5,0.6,0.4,1);}100%{left:calc(100% - 15px);}"]),g=a(["0%{width:15px;animation-timing-function:cubic-bezier(0.7,0,0.8,1);}50%{width:35%;}100%{width:15px;}"]),f=a(["from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}"]),x=a(["0%{transform:rotate(-90deg);stroke-dashoffset:95;}50%{transform:rotate(90deg);stroke-dashoffset:80;}100%{transform:rotate(270deg);stroke-dashoffset:95;}"]),h=(e,a)=>{const t=a?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)";return"ai"===e?{outerBarBackground:t,innerBarBackground:a?"linear-gradient(90deg, var(--mode-color-ai-alt-stop-1, #00D639) 0%, var(--mode-color-ai-alt-stop-2, #00D6DE) 40%, var(--mode-color-ai-alt-stop-3, #9D60FF) 90%)":"linear-gradient(90deg, var(--mode-color-ai-stop-1, #13A038) 0%, var(--mode-color-ai-stop-2, #149197) 40%, var(--mode-color-ai-stop-3, #A87CFB) 90%)"}:{outerBarBackground:t,innerBarBackground:a?"#FFFFFF":"#000000"}},u=t(["display:flex;justify-content:center;text-align:center;"]),y=e.div.withConfig({displayName:"loader.style__StyledLoaderPlaceholder",componentId:"sc-478aa3aa-0"})(["display:inline-block;min-width:var(--sizing800);"]),v=e.div.attrs(i).withConfig({displayName:"loader.style__StyledLoader",componentId:"sc-478aa3aa-1"})([""," text-align:center;white-space:nowrap;"],r),w=e.div.withConfig({displayName:"loader.style__OuterBar",componentId:"sc-478aa3aa-2"})(["",""],(({size:e,variant:a,inverse:r})=>t(["border-radius:var(--borderRadius400);height:",";width:100%;background:",";overflow:hidden;position:relative;"],m[e],h(a,r).outerBarBackground))),b=e.div.withConfig({displayName:"loader.style__InnerBar",componentId:"sc-478aa3aa-3"})(["",""],(({size:e,variant:a,inverse:r,animationTime:i,hasMotion:o})=>t(["position:absolute;background:",";width:15px;height:",";border-radius:var(--borderRadius400);animation-name:",",",";"," animation-iteration-count:",";"],h(a,r).innerBarBackground,m[e],c,g,o&&`animation-duration: ${i}s, ${i}s;`,o?"infinite, infinite":"none, none"))),k=e.svg.withConfig({displayName:"loader.style__StyledRingCircleSvg",componentId:"sc-478aa3aa-4"})([""," ",' & circle[data-role="inner-arc"],',' & circle[data-role="inner-arc"]{stroke:currentColor;}'],(({inverse:e,size:a,hasMotion:r,isTracked:i,isError:o,isSuccess:n,animationTime:s})=>{const m=`${l[a]}px`,p=d[a];return t(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",';cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:95px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(-90deg);animation-name:",";"," animation-timing-function:cubic-bezier(0,0,1,1);animation-iteration-count:",";}"],m,m,p,e?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",p,(({inverse:e,isSuccess:a,isError:t})=>t?"#DB004E;":a?"#00811F;":e?"#FFF;":"#000000")({inverse:e,isSuccess:n,isError:o}),i?f:x,r&&`animation-duration: ${s}s;`,r?"infinite":"none")}),s,n),_="40px",B=e.div.withConfig({displayName:"loader.style__StyledStars",componentId:"sc-478aa3aa-5"})(["position:relative;width:",";height:",";"],_,_),C={standalone:{small:"4px",medium:"8px",large:"12px"},ring:{"extra-small":"4px",small:"8px",medium:"8px",large:"12px"}},S=e.div.withConfig({displayName:"loader.style__StyledStarLoaderWrapper",componentId:"sc-478aa3aa-6"})(["position:relative;display:flex;align-items:center;justify-content:center;"]),F=e(o).withConfig({displayName:"loader.style__StyledLoaderLabel",componentId:"sc-478aa3aa-7"})([""," line-height:150%;color:",";"," &,"," &{color:currentColor;}",""],u,(({inverse:e})=>e?"rgba(255, 255, 255, 0.55)":"rgba(0, 0, 0, 0.65)"),s,n,(({size:e="medium",loaderType:a,loaderVariant:r})=>"star"===a?t(["font-size:16px;font-weight:400;margin-left:12px;width:min-content;"]):"standalone"===a?t(["font-size:",";font-weight:500;width:100%;margin-top:",";"],"large"===e?"16px":"14px",C[a][e]):t(["font-size:",";font-weight:500;width:",";",";"],"large"===e?"16px":"extra-small"===e?"13px":"14px","inline"===r?"auto":"100%","inline"===r?`margin-left: ${p[e]}`:`margin-top: ${C[a][e]}`))),z=e.div.withConfig({displayName:"loader.style__StyledRingLoaderWrapper",componentId:"sc-478aa3aa-8"})(["",""],(({loaderVariant:e})=>t(["display:flex;flex-direction:",";align-items:center;justify-content:center;width:",";"],"inline"===e?"row":"column","inline"===e?"auto":"100%"))),I=e.span.withConfig({displayName:"loader.style__StyledLabel",componentId:"sc-478aa3aa-9"})(["",";"],(({inverse:e})=>t(["color:",";"," &,"," &{color:currentColor;}"],e?"rgba(255, 255, 255, 0.90)":"rgba(0, 0, 0, 0.90)",s,n)));export{b as InnerBar,w as OuterBar,I as StyledLabel,v as StyledLoader,F as StyledLoaderLabel,y as StyledLoaderPlaceholder,k as StyledRingCircleSvg,z as StyledRingLoaderWrapper,S as StyledStarLoaderWrapper,B as StyledStars};
1
+ import e,{keyframes as t,css as r}from"styled-components";import{margin as a}from"styled-system";import i from"../../../style/themes/apply-base-theme.js";import{Typography as o}from"../../typography/typography.component.js";import"react/jsx-runtime";import"react";import n from"../../button/button.style.js";import{StyledButton as s}from"../../button/__next__/button.style.js";const l={"extra-small":20,small:32,medium:64,large:80},d={"extra-small":2.7,small:2.7,medium:2.7,large:2.7},m={small:"4px",medium:"8px",large:"16px"},p={"extra-small":"8px",small:"8px",medium:"12px",large:"16px"},c=t(["0%{left:0%;animation-timing-function:linear;}30%{left:10px;animation-timing-function:cubic-bezier(0.5,0.6,0.4,1);}100%{left:calc(100% - 15px);}"]),g=t(["0%{width:15px;animation-timing-function:cubic-bezier(0.7,0,0.8,1);}50%{width:35%;}100%{width:15px;}"]),f=t(["from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}"]),u=t(["0%{transform:rotate(-90deg);stroke-dashoffset:95;}50%{transform:rotate(90deg);stroke-dashoffset:80;}100%{transform:rotate(270deg);stroke-dashoffset:95;}"]),x=(e,t)=>{const r=t?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)";return"ai"===e?{outerBarBackground:r,innerBarBackground:t?"linear-gradient(90deg, var(--mode-color-ai-alt-stop-1, #00D639) 0%, var(--mode-color-ai-alt-stop-2, #00D6DE) 40%, var(--mode-color-ai-alt-stop-3, #9D60FF) 90%)":"linear-gradient(90deg, var(--mode-color-ai-stop-1, #13A038) 0%, var(--mode-color-ai-stop-2, #149197) 40%, var(--mode-color-ai-stop-3, #A87CFB) 90%)"}:{outerBarBackground:r,innerBarBackground:t?"#FFFFFF":"#000000"}},h=r(["display:flex;justify-content:center;text-align:center;"]),y=e.div.withConfig({displayName:"loader.style__StyledLoaderPlaceholder",componentId:"sc-23905a4e-0"})(["display:inline-block;min-width:var(--sizing800);"]),v=e.div.attrs(i).withConfig({displayName:"loader.style__StyledLoader",componentId:"sc-23905a4e-1"})([""," text-align:center;white-space:nowrap;"],a),w=e.div.withConfig({displayName:"loader.style__OuterBar",componentId:"sc-23905a4e-2"})(["",""],(({size:e,variant:t,inverse:a})=>r(["border-radius:var(--borderRadius400);height:",";width:100%;background:",";overflow:hidden;position:relative;"],m[e],x(t,a).outerBarBackground))),b=e.div.withConfig({displayName:"loader.style__InnerBar",componentId:"sc-23905a4e-3"})(["",""],(({size:e,variant:t,inverse:a,animationTime:i,hasMotion:o})=>r(["position:absolute;background:",";width:15px;height:",";border-radius:var(--borderRadius400);animation-name:",",",";"," animation-iteration-count:",";"],x(t,a).innerBarBackground,m[e],c,g,o&&`animation-duration: ${i}s, ${i}s;`,o?"infinite, infinite":"none, none"))),k=e.svg.withConfig({displayName:"loader.style__StyledRingCircleSvg",componentId:"sc-23905a4e-4"})([""," ",' & circle[data-role="inner-arc"],',' & circle[data-role="inner-arc"]{stroke:currentColor;}'],(({inverse:e,size:t,hasMotion:a,isTracked:i,isError:o,isSuccess:n,animationTime:s})=>{const m=`${l[t]}px`,p=d[t];return r(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",';cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:95px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(-90deg);animation-name:",";"," animation-timing-function:cubic-bezier(0,0,1,1);animation-iteration-count:",";}"],m,m,p,e?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",p,(({inverse:e,isSuccess:t,isError:r})=>r?"#DB004E;":t?"#00811F;":e?"#FFF;":"#000000")({inverse:e,isSuccess:n,isError:o}),i?f:u,a&&`animation-duration: ${s}s;`,a?"infinite":"none")}),s,n),_="40px",B=e.div.withConfig({displayName:"loader.style__StyledStars",componentId:"sc-23905a4e-5"})(["position:relative;width:",";height:",";"],_,_),C={standalone:{small:"4px",medium:"8px",large:"12px"},ring:{"extra-small":"4px",small:"8px",medium:"8px",large:"12px"}},S=e.div.withConfig({displayName:"loader.style__StyledStarLoaderWrapper",componentId:"sc-23905a4e-6"})(["position:relative;display:flex;align-items:center;justify-content:center;"]),F=e(o).withConfig({displayName:"loader.style__StyledLoaderLabel",componentId:"sc-23905a4e-7"})([""," line-height:150%;color:",";"," &,"," &{color:currentColor;}",""],h,(({inverse:e})=>e?"rgba(255, 255, 255, 0.55)":"rgba(0, 0, 0, 0.65)"),s,n,(({$size:e="medium",loaderType:t,loaderVariant:a})=>{const i=e;return"star"===t?r(["font-size:16px;font-weight:400;margin-left:12px;width:min-content;"]):"standalone"===t?r(["font-size:",";font-weight:500;width:100%;margin-top:",";"],"large"===i?"16px":"14px",C[t][i]):r(["font-size:",";font-weight:500;width:",";",";"],"large"===i?"16px":"extra-small"===i?"13px":"14px","inline"===a?"auto":"100%","inline"===a?`margin-left: ${p[i]}`:`margin-top: ${C[t][i]}`)})),z=e.div.withConfig({displayName:"loader.style__StyledRingLoaderWrapper",componentId:"sc-23905a4e-8"})(["",""],(({loaderVariant:e})=>r(["display:flex;flex-direction:",";align-items:center;justify-content:center;width:",";"],"inline"===e?"row":"column","inline"===e?"auto":"100%"))),I=e.span.withConfig({displayName:"loader.style__StyledLabel",componentId:"sc-23905a4e-9"})(["",";"],(({inverse:e})=>r(["color:",";"," &,"," &{color:currentColor;}"],e?"rgba(255, 255, 255, 0.90)":"rgba(0, 0, 0, 0.90)",s,n)));export{b as InnerBar,w as OuterBar,I as StyledLabel,v as StyledLoader,F as StyledLoaderLabel,y as StyledLoaderPlaceholder,k as StyledRingCircleSvg,z as StyledRingLoaderWrapper,S as StyledStarLoaderWrapper,B as StyledStars};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import"react";import n from"../../__internal__/utils/helpers/tags/tags.js";import{StyledLabel as i,StyledSpinnerWrapper as o,StyledSpinnerCircleSvg as a}from"./loader-spinner.style.js";import"../../style/utils/filter-styled-system-padding-props.js";import s from"../../style/utils/filter-styled-system-margin-props.js";import l from"../../hooks/__internal__/useLocale/useLocale.js";import c from"../../hooks/useMediaQuery/useMediaQuery.js";import{Typography as p}from"../typography/typography.component.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const d=d=>{var{spinnerLabel:f,size:y="medium",showSpinnerLabel:m=!0,variant:b="action",isTracked:g=!1,hasMotion:O=!0,animationTime:j}=d,h=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(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)&&(i[t]=e[t])}return i}(d,["spinnerLabel","size","showSpinnerLabel","variant","isTracked","hasMotion","animationTime"]);const v=l(),w=c("screen and (prefers-reduced-motion: no-preference)");if(void 0===w)return null;const P=e(i,{"data-role":"visible-label",variant:"span",fontWeight:"400",size:y,color:"inverse"!==b&&"gradient-white"!==b?"var(--colorsUtilityYin090);":"var(--colorsActionMajorYang100);",fontSize:"extra-large"===y?"var(--sizing200)":"var(--sizing175)",lineHeight:"extra-large"===y?"var(--sizing300)":"var(--sizing250)",children:f||v.loaderSpinner.loading()}),S="gradient-white"===b||"gradient-grey"===b;return e(o,(z=function(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){u(e,r,t[r])}))}return e}({size:y,role:"status"},n("loader-spinner",h),s(h)),k=null!=(k={children:w?r(t,{children:[r(a,{role:"presentation",size:y,variant:b,hasMotion:O,isTracked:g,isGradientVariant:S,animationTime:j||(S?2:1),viewBox:"0 0 24 24",children:[e("circle",{"data-role":"outer-arc"}),e("circle",{"data-role":"inner-arc"})]}),m?P:e(p,{"data-role":"hidden-label",variant:"span",screenReaderOnly:!0,children:f||v.loaderSpinner.loading()})]}):P})?k:{},Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(k)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(k)).forEach((function(e){Object.defineProperty(z,e,Object.getOwnPropertyDescriptor(k,e))})),z));var z,k};export{d as LoaderSpinner,d as default};
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import"react";import n from"../../__internal__/utils/helpers/tags/tags.js";import{StyledLabel as i,StyledSpinnerWrapper as o,StyledSpinnerCircleSvg as a}from"./loader-spinner.style.js";import"../../style/utils/filter-styled-system-padding-props.js";import s from"../../style/utils/filter-styled-system-margin-props.js";import l from"../../hooks/__internal__/useLocale/useLocale.js";import c from"../../hooks/useMediaQuery/useMediaQuery.js";import{Typography as p}from"../typography/typography.component.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const d=d=>{var{spinnerLabel:f,size:y="medium",showSpinnerLabel:m=!0,variant:b="action",isTracked:g=!1,hasMotion:O=!0,animationTime:h}=d,j=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(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)&&(i[t]=e[t])}return i}(d,["spinnerLabel","size","showSpinnerLabel","variant","isTracked","hasMotion","animationTime"]);const v=l(),w=c("screen and (prefers-reduced-motion: no-preference)");if(void 0===w)return null;const P=e(i,{"data-role":"visible-label",variant:"span",fontWeight:"400",$size:y,inverse:!("inverse"!==b&&"gradient-white"!==b),fontSize:"extra-large"===y?"var(--sizing200)":"var(--sizing175)",lineHeight:"extra-large"===y?"var(--sizing300)":"var(--sizing250)",children:f||v.loaderSpinner.loading()}),S="gradient-white"===b||"gradient-grey"===b;return e(o,(z=function(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){u(e,r,t[r])}))}return e}({size:y,role:"status"},n("loader-spinner",j),s(j)),k=null!=(k={children:w?r(t,{children:[r(a,{role:"presentation",size:y,variant:b,hasMotion:O,isTracked:g,isGradientVariant:S,animationTime:h||(S?2:1),viewBox:"0 0 24 24",children:[e("circle",{"data-role":"outer-arc"}),e("circle",{"data-role":"inner-arc"})]}),m?P:e(p,{"data-role":"hidden-label",variant:"span",screenReaderOnly:!0,children:f||v.loaderSpinner.loading()})]}):P})?k:{},Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(k)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(k)).forEach((function(e){Object.defineProperty(z,e,Object.getOwnPropertyDescriptor(k,e))})),z));var z,k};export{d as LoaderSpinner,d as default};
@@ -1,9 +1,11 @@
1
1
  import { LoaderSpinnerProps } from "./loader-spinner.component";
2
2
  export declare const StyledSpinnerWrapper: import("styled-components").StyledComponent<"div", any, Pick<LoaderSpinnerProps, "size">, never>;
3
3
  export declare const StyledLabel: import("styled-components").StyledComponent<{
4
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
4
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
5
5
  displayName: string;
6
- }, any, Required<Pick<LoaderSpinnerProps, "size">>, never>;
6
+ }, any, Required<{
7
+ $size: NonNullable<LoaderSpinnerProps["size"]>;
8
+ }>, never>;
7
9
  interface StyledSpinnerCircleSvgProps extends Omit<LoaderSpinnerProps, "showSpinnerLabel"> {
8
10
  isGradientVariant?: boolean;
9
11
  size: Required<LoaderSpinnerProps>["size"];
@@ -1 +1 @@
1
- import r,{css as e}from"styled-components";import{margin as t}from"styled-system";import{LOADER_SPINNER_SIZE_PARAMS as a}from"./loader-spinner.config.js";import{Typography as n}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=(r,e)=>{switch(e){case"neutral":return r?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return r?"#00D639":"#0000001A";case"gradient-white":return r?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return r?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},i=r.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"sc-3cab43b4-0"})([""," display:flex;flex-direction:",";"],t,(({size:r})=>"extra-small"===r?"row":"column")),s=r(n).withConfig({displayName:"loader-spinner.style__StyledLabel",componentId:"sc-3cab43b4-1"})(["",""],(({size:r})=>e(["display:flex;justify-content:center;text-align:center;",";"],"extra-small"===r?"margin-left: var(--spacing100)":`margin-top: ${a[r].labelMarginTop}px`))),c=r.svg.withConfig({displayName:"loader-spinner.style__StyledSpinnerCircleSvg",componentId:"sc-3cab43b4-2"})(["",";"],(({size:r,isTracked:t,hasMotion:n,isGradientVariant:i,animationTime:s,variant:c})=>{const d=`${a[r].wrapperDimensions}px`;return r&&e(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",";",' cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:80px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(270deg);@keyframes gradientAnimation{0%{stroke:#00d639;}33%{stroke:#11afff;}66%{stroke:#8f49fe;}}@keyframes trackedAnimation{from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}}@keyframes untrackedAnimation{0%{transform:rotate(0deg);stroke-dasharray:100;}40%{stroke-dasharray:80;}80%{stroke-dasharray:100;}100%{transform:rotate(360deg);}}animation-name:",",",";",";animation-timing-function:cubic-bezier(0.2,0.1,0.8,1);animation-iteration-count:",";"],d,d,a[r].strokeWidth,o(!1,c),"inverse"===c&&"stroke-opacity: 0.3;",a[r].strokeWidth,o(!0,c),t&&!i?"trackedAnimation":"untrackedAnimation","gradient-grey"===c||"gradient-white"===c?"gradientAnimation":"none",n&&`animation-duration: ${s}s`,n?"infinite":"none")}));export{s as StyledLabel,c as StyledSpinnerCircleSvg,i as StyledSpinnerWrapper};
1
+ import r,{css as e}from"styled-components";import{margin as t}from"styled-system";import{LOADER_SPINNER_SIZE_PARAMS as a}from"./loader-spinner.config.js";import{Typography as n}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=(r,e)=>{switch(e){case"neutral":return r?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return r?"#00D639":"#0000001A";case"gradient-white":return r?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return r?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},i=r.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"sc-fe9a4dc0-0"})([""," display:flex;flex-direction:",";"],t,(({size:r})=>"extra-small"===r?"row":"column")),s=r(n).withConfig({displayName:"loader-spinner.style__StyledLabel",componentId:"sc-fe9a4dc0-1"})(["",""],(({$size:r})=>e(["display:flex;justify-content:center;text-align:center;",";"],"extra-small"===r?"margin-left: var(--spacing100)":`margin-top: ${a[r].labelMarginTop}px`))),c=r.svg.withConfig({displayName:"loader-spinner.style__StyledSpinnerCircleSvg",componentId:"sc-fe9a4dc0-2"})(["",";"],(({size:r,isTracked:t,hasMotion:n,isGradientVariant:i,animationTime:s,variant:c})=>{const d=`${a[r].wrapperDimensions}px`;return r&&e(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",";",' cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:80px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(270deg);@keyframes gradientAnimation{0%{stroke:#00d639;}33%{stroke:#11afff;}66%{stroke:#8f49fe;}}@keyframes trackedAnimation{from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}}@keyframes untrackedAnimation{0%{transform:rotate(0deg);stroke-dasharray:100;}40%{stroke-dasharray:80;}80%{stroke-dasharray:100;}100%{transform:rotate(360deg);}}animation-name:",",",";",";animation-timing-function:cubic-bezier(0.2,0.1,0.8,1);animation-iteration-count:",";"],d,d,a[r].strokeWidth,o(!1,c),"inverse"===c&&"stroke-opacity: 0.3;",a[r].strokeWidth,o(!0,c),t&&!i?"trackedAnimation":"untrackedAnimation","gradient-grey"===c||"gradient-white"===c?"gradientAnimation":"none",n&&`animation-duration: ${s}s`,n?"infinite":"none")}));export{s as StyledLabel,c as StyledSpinnerCircleSvg,i as StyledSpinnerWrapper};
@@ -1,7 +1,7 @@
1
1
  import { LoaderStarProps } from "./loader-star.component";
2
2
  export declare const StyledLoaderStarWrapper: import("styled-components").StyledComponent<"div", any, LoaderStarProps, never>;
3
3
  export declare const StyledLabel: import("styled-components").StyledComponent<{
4
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
4
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
5
5
  displayName: string;
6
6
  }, any, {}, never>;
7
7
  export declare const StyledStars: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useLexicalComposerContext as n}from"@lexical/react/LexicalComposerContext";import{mergeRegister as i}from"@lexical/utils";import{$getSelection as r,$isRangeSelection as l,$getRoot as a,$createTextNode as s,$createParagraphNode as d,$isParagraphNode as c}from"lexical";import{useRef as u,useState as m,useCallback as p,useEffect as b}from"react";import{StyledToolbarWrapper as f,StyledToolbar as h,CommandButtons as g}from"./toolbar.style.js";import v from"../../../../button/button.component.js";import x from"../../../../../hooks/__internal__/useLocale/useLocale.js";import y from"./buttons/bold.component.js";import k from"./buttons/hyperlink.component.js";import E from"./buttons/italic.component.js";import j from"./buttons/list.component.js";import B from"./buttons/save.component.js";import F from"./buttons/typography.component.js";import w from"./buttons/underline.component.js";import z from"./button-group/button-group.component.js";import{TEXT_EDITOR_ACTION_TYPES as C}from"../../__utils__/constants.js";import{Textbox as D}from"../../../../textbox/textbox.component.js";import{$createLinkNode as L}from"@lexical/link";import{Dialog as $}from"../../../../dialog/dialog.component.js";import{Form as A}from"../../../../form/form.component.js";import"../../../../form/required-fields-indicator/required-fields-indicator.component.js";const I=({contentEditorRef:I,namespace:_,hasHeader:S,onCancel:q,onSave:O,size:T="medium",toolbarControls:H=["typography","bold","italic","underline","unordered-list","ordered-list","link"]})=>{const[R]=n(),U=R.isEditable(),N=u(null),[K,G]=m(!1),[J,M]=m(!1),[P,Q]=m(!1),[V,W]=m(!1),[X,Y]=m(!1),[Z,ee]=m(-1),[te,oe]=m(""),[ne,ie]=m(""),re=x(),le=H.includes("typography"),ae=H.includes("bold")||H.includes("italic")||H.includes("underline"),se=H.includes("unordered-list")||H.includes("ordered-list"),de=H.includes("link"),ce=p((()=>{const e=r();l(e)&&(G(e.hasFormat(C.Bold)),M(e.hasFormat(C.Italic)),Q(e.hasFormat(C.Underline)))}),[]);b((()=>i(R.registerUpdateListener((({editorState:e})=>{e.read((()=>{R.isEditable()&&ce()}))})))),[ce,R]);const ue=()=>{oe(""),ie(""),W(!1)};if(!U)return null;const me=te.length&&ne.length;return e(f,{"data-role":`${_}-toolbar-wrapper`,hasHeader:S,id:`${_}-toolbar-wrapper`,size:T,children:[e(h,{role:"toolbar","aria-label":re.textEditor.toolbarAriaLabel(),"data-role":`${_}-toolbar`,id:`${_}-toolbar`,ref:N,onKeyDown:e=>{var t,o;if(0===H.length||!N.current)return;const n=Array.from(null===(t=N.current)||void 0===t?void 0:t.querySelectorAll("button.toolbar-button"));if(!n.length)return;const i=n.findIndex((e=>{var t;return e.id===(null===(t=document.activeElement)||void 0===t?void 0:t.id)}));let r=-1;switch(e.key){case"ArrowRight":e.preventDefault(),X||(r=i<n.length-1?i+1:0);break;case"ArrowLeft":e.preventDefault(),X||(r=i>0?i-1:n.length-1);break;case"Home":e.preventDefault(),r=0;break;case"End":e.preventDefault(),r=n.length-1;break;default:return}n.forEach(((e,t)=>{e.tabIndex=t===r?0:-1})),r>-1&&(null===(o=n[r])||void 0===o||o.focus())},tabIndex:-1,children:[e(t,{children:[le&&o(z,{name:"typography-formatting-buttons",namespace:_,showDivider:ae||se||de,children:o(F,{contentEditorRef:I,namespace:_,isFirstButton:!0,isOpen:X,setIsOpen:Y,focusedIndex:Z,setFocusedIndex:ee,size:T})}),ae&&e(z,{name:"text-formatting-buttons",namespace:_,showDivider:se||de,children:[H.includes("bold")&&o(y,{isActive:K,namespace:_,isFirstButton:!le,size:T}),H.includes("italic")&&o(E,{isActive:J,namespace:_,isFirstButton:!le&&!H.includes("bold"),size:T}),H.includes("underline")&&o(w,{isActive:P,namespace:_,isFirstButton:!le&&!H.includes("bold")&&!H.includes("italic"),size:T})]}),se&&o(z,{name:"list-formatting-buttons",namespace:_,showDivider:de,children:o(j,{namespace:_,olIsFirstButton:!le&&!ae&&!H.includes("unordered-list"),showOL:H.includes("ordered-list"),showUL:H.includes("unordered-list"),ulIsFirstButton:!le&&!ae,size:T})}),de&&o(z,{name:"hyperlink-formatting-buttons",namespace:_,showDivider:!1,children:o(k,{namespace:_,isFirstButton:!le&&!ae&&!se,setDialogOpen:W,size:T})})]}),o($,{open:V,onCancel:()=>{ue()},title:re.textEditor.hyperlink.dialogTitle(),"data-role":`${_}-hyperlink-dialog`,"aria-label":re.textEditor.hyperlink.dialogTitle(),size:"small",children:e(A,{leftSideButtons:o(v,{"data-role":`${_}-hyperlink-cancel-button`,onClick:()=>{ue()},children:re.textEditor.cancelButton()}),saveButton:o(v,{buttonType:"primary",type:"submit",disabled:!me,"data-role":`${_}-hyperlink-save-button`,children:re.textEditor.saveButton()}),onSubmit:e=>{e.preventDefault(),R.isEditable()&&(R.update((()=>{const e=a(),t=e.getChildrenSize(),o=r(),n=L(ne);if(n.append(s(te)),0===t){const t=d();t.append(n),e.append(t),t.selectEnd()}else if(l(o))o.insertNodes([n]);else{const t=e.getLastChild();c(t)&&t.append(n)}})),ue())},children:[o(D,{label:re.textEditor.hyperlink.textFieldLabel(),name:"text",required:!0,"data-role":`${_}-hyperlink-text-field`,value:te,onChange:e=>oe(e.target.value)}),o(D,{label:re.textEditor.hyperlink.linkFieldLabel(),name:"link",required:!0,"data-role":`${_}-hyperlink-link-field`,value:ne,onChange:e=>ie(e.target.value)})]})})]}),e(g,{"data-role":`${_}-command-buttons`,children:[q&&o(v,{buttonType:"tertiary","data-role":`${_}-cancel-button`,"aria-label":re.textEditor.cancelButtonAria(),onClick:()=>null==q?void 0:q(R),size:T,className:"command-button",children:re.textEditor.cancelButton()}),O&&o(B,{namespace:_,onSave:O,size:T})]})]})};export{I as default};
1
+ import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{mergeRegister as n}from"@lexical/utils";import{$getSelection as i,$isRangeSelection as l,$getRoot as a,$createTextNode as s,$createParagraphNode as c,$isParagraphNode as d}from"lexical";import{useRef as p,useState as u,useCallback as m,useEffect as f}from"react";import{StyledToolbarWrapper as b,StyledToolbar as h,CommandButtons as y}from"./toolbar.style.js";import x from"../../../../button/button.component.js";import g from"../../../../../hooks/__internal__/useLocale/useLocale.js";import v from"./buttons/bold.component.js";import j from"./buttons/hyperlink.component.js";import k from"./buttons/italic.component.js";import O from"./buttons/list.component.js";import E from"./buttons/save.component.js";import w from"./buttons/typography.component.js";import F from"./buttons/underline.component.js";import D from"./button-group/button-group.component.js";import{TEXT_EDITOR_ACTION_TYPES as B}from"../../__utils__/constants.js";import{Textbox as z}from"../../../../textbox/textbox.component.js";import{$createLinkNode as P}from"@lexical/link";import{Dialog as C}from"../../../../dialog/dialog.component.js";import{Form as S}from"../../../../form/form.component.js";import"../../../../form/required-fields-indicator/required-fields-indicator.component.js";import{Box as L}from"../../../../box/box.component.js";import{Typography as $}from"../../../../typography/typography.component.js";function A(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function I(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),r.forEach((function(t){A(e,t,o[t])}))}return e}function _(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 o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t}(Object(t)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))})),e}const T=({contentEditorRef:A,namespace:T,hasHeader:W,onCancel:q,onSave:H,size:M="medium",toolbarControls:R=["typography","bold","italic","underline","unordered-list","ordered-list","link"]})=>{var U,K,N,G,J,Q;const[V]=r(),X=V.isEditable(),Y=p(null),[Z,ee]=u(!1),[te,oe]=u(!1),[re,ne]=u(!1),[ie,le]=u(!1),[ae,se]=u(!1),[ce,de]=u(-1),[pe,ue]=u(""),[me,fe]=u(""),[be,he]=u(!1),[ye,xe]=u(!1),ge=p(null),ve=p(null),je=g(),ke=R.includes("typography"),Oe=R.includes("bold")||R.includes("italic")||R.includes("underline"),Ee=R.includes("unordered-list")||R.includes("ordered-list"),we=R.includes("link"),Fe=m((()=>{const e=i();l(e)&&(ee(e.hasFormat(B.Bold)),oe(e.hasFormat(B.Italic)),ne(e.hasFormat(B.Underline)))}),[]);f((()=>n(V.registerUpdateListener((({editorState:e})=>{e.read((()=>{V.isEditable()&&Fe()}))})))),[Fe,V]),f((()=>{ie&&V.read((()=>{const e=i();if(l(e)){const t=e.getTextContent();ue(t)}}))}),[ie,V]);const De=()=>{ue(""),fe(""),he(!1),xe(!1),le(!1)};return X?e(b,{"data-role":`${T}-toolbar-wrapper`,hasHeader:W,id:`${T}-toolbar-wrapper`,size:M,children:[e(h,{role:"toolbar","aria-label":je.textEditor.toolbarAriaLabel(),"data-role":`${T}-toolbar`,id:`${T}-toolbar`,ref:Y,onKeyDown:e=>{var t,o;if(0===R.length||!Y.current)return;const r=Array.from(null===(t=Y.current)||void 0===t?void 0:t.querySelectorAll("button.toolbar-button"));if(!r.length)return;const n=r.findIndex((e=>{var t;return e.id===(null===(t=document.activeElement)||void 0===t?void 0:t.id)}));let i=-1;switch(e.key){case"ArrowRight":e.preventDefault(),ae||(i=n<r.length-1?n+1:0);break;case"ArrowLeft":e.preventDefault(),ae||(i=n>0?n-1:r.length-1);break;case"Home":e.preventDefault(),i=0;break;case"End":e.preventDefault(),i=r.length-1;break;default:return}r.forEach(((e,t)=>{e.tabIndex=t===i?0:-1})),i>-1&&(null===(o=r[i])||void 0===o||o.focus())},tabIndex:-1,children:[e(t,{children:[ke&&o(D,{name:"typography-formatting-buttons",namespace:T,showDivider:Oe||Ee||we,children:o(w,{contentEditorRef:A,namespace:T,isFirstButton:!0,isOpen:ae,setIsOpen:se,focusedIndex:ce,setFocusedIndex:de,size:M})}),Oe&&e(D,{name:"text-formatting-buttons",namespace:T,showDivider:Ee||we,children:[R.includes("bold")&&o(v,{isActive:Z,namespace:T,isFirstButton:!ke,size:M}),R.includes("italic")&&o(k,{isActive:te,namespace:T,isFirstButton:!ke&&!R.includes("bold"),size:M}),R.includes("underline")&&o(F,{isActive:re,namespace:T,isFirstButton:!ke&&!R.includes("bold")&&!R.includes("italic"),size:M})]}),Ee&&o(D,{name:"list-formatting-buttons",namespace:T,showDivider:we,children:o(O,{namespace:T,olIsFirstButton:!ke&&!Oe&&!R.includes("unordered-list"),showOL:R.includes("ordered-list"),showUL:R.includes("unordered-list"),ulIsFirstButton:!ke&&!Oe,size:M})}),we&&o(D,{name:"hyperlink-formatting-buttons",namespace:T,showDivider:!1,children:o(j,{namespace:T,isFirstButton:!ke&&!Oe&&!Ee,setDialogOpen:le,size:M})})]}),o(C,{open:ie,onCancel:()=>{De()},title:je.textEditor.hyperlink.dialogTitle(),"data-role":`${T}-hyperlink-dialog`,"aria-label":je.textEditor.hyperlink.dialogTitle(),size:"medium-small",children:o(S,{leftSideButtons:o(x,{"data-role":`${T}-hyperlink-cancel-button`,onClick:()=>{De()},children:je.textEditor.cancelButton()}),saveButton:o(x,{buttonType:"primary",type:"submit","data-role":`${T}-hyperlink-save-button`,children:je.textEditor.saveButton()}),onSubmit:e=>{e.preventDefault();const t=!pe.trim(),o=!me.trim();var r,n;(he(t),xe(o),t||o)?t?null===(r=ge.current)||void 0===r||r.focus():null===(n=ve.current)||void 0===n||n.focus():V.isEditable()&&(V.update((()=>{const e=a(),t=e.getChildrenSize(),o=i(),r=P(me);if(r.append(s(pe)),0===t){const t=c();t.append(r),e.append(t),t.selectEnd()}else if(l(o))o.insertNodes([r]);else{const t=e.getLastChild();d(t)&&t.append(r)}})),De())},children:e(L,{display:"flex",flexDirection:"column",gap:"16px",children:[e($,{fontSize:"14px",fontWeight:"500",lineHeight:"21px",children:[o($,{as:"span",color:"#FF0000",children:"*"})," ",null===(U=(K=je.textEditor.hyperlink).formKey)||void 0===U?void 0:U.call(K)]}),e(L,{display:"flex",gap:"24px",flexWrap:"wrap",children:[o(L,{flex:"1 1 200px",minWidth:"200px",maxWidth:"560px",children:o(z,_(I({label:je.textEditor.hyperlink.textFieldLabel(),name:"text",required:!0,validationMessagePositionTop:!1},be&&{error:null===(N=(G=je.textEditor.hyperlink).textFieldErrorMessage)||void 0===N?void 0:N.call(G)}),{"data-role":`${T}-hyperlink-text-field`,value:pe,ref:ge,onChange:e=>{ue(e.target.value),he(!1)}}))}),o(L,{flex:"1 1 200px",minWidth:"200px",maxWidth:"560px",children:o(z,_(I({label:je.textEditor.hyperlink.linkFieldLabel(),name:"link",required:!0,validationMessagePositionTop:!1},ye&&{error:null===(J=(Q=je.textEditor.hyperlink).linkFieldErrorMessage)||void 0===J?void 0:J.call(Q)}),{"data-role":`${T}-hyperlink-link-field`,value:me,ref:ve,onChange:e=>{fe(e.target.value),xe(!1)}}))})]})]})})})]}),e(y,{"data-role":`${T}-command-buttons`,children:[q&&o(x,{buttonType:"tertiary","data-role":`${T}-cancel-button`,"aria-label":je.textEditor.cancelButtonAria(),onClick:()=>null==q?void 0:q(V),size:M,className:"command-button",children:je.textEditor.cancelButton()}),H&&o(E,{namespace:T,onSave:H,size:M})]})]}):null};export{T as default};
@@ -2,7 +2,7 @@ import { SpaceProps } from "styled-system";
2
2
  import { TileProps } from "./tile.component";
3
3
  declare const StyledTile: import("styled-components").StyledComponent<"div", any, {
4
4
  theme: object;
5
- } & Pick<TileProps, "height" | "width" | "variant" | "highlightVariant" | "roundness" | "borderWidth" | "borderVariant"> & {
5
+ } & Pick<TileProps, "height" | "width" | "variant" | "borderWidth" | "highlightVariant" | "roundness" | "borderVariant"> & {
6
6
  isHorizontal?: boolean;
7
7
  } & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "theme">;
8
8
  export default StyledTile;
@@ -0,0 +1,2 @@
1
+ export { default } from "./typography.component";
2
+ export type { TypographyProps } from "./typography.component";
@@ -0,0 +1 @@
1
+ export{Typography as default}from"./typography.component.js";
@@ -0,0 +1,37 @@
1
+ import React, { HTMLAttributes, AriaAttributes, CSSProperties } from "react";
2
+ import { SpaceProps } from "styled-system";
3
+ import { TagProps } from "../../../../__internal__/utils/helpers/tags";
4
+ export declare const VARIANT_TYPES: readonly ["h1", "h2", "h3", "h4", "h5", "section-heading", "section-subheading", "ul", "ol", "sup", "sub", "strong", "b", "p"];
5
+ type VariantTypes = (typeof VARIANT_TYPES)[number];
6
+ export declare const ALLOWED_CSS_TEXT_OVERRIDE_KEYS: ["textTransform", "textDecoration", "display", "whiteSpace", "wordBreak", "wordWrap", "textAlign", "textOverflow", "overflow"];
7
+ export type AllowedCSSTextOverrides = Pick<CSSProperties, (typeof ALLOWED_CSS_TEXT_OVERRIDE_KEYS)[number]>;
8
+ export interface TypographyProps extends SpaceProps, TagProps, Pick<HTMLAttributes<HTMLElement>, "role">, Pick<AriaAttributes, "aria-hidden" | "aria-live">, AllowedCSSTextOverrides {
9
+ /** Adds element and creates a visual style associated with said element. */
10
+ variant?: VariantTypes;
11
+ /** Override the underlying HTML element rendered by the component. */
12
+ as?: React.ElementType;
13
+ /** Content to be rendered inside the Typography component. */
14
+ children?: React.ReactNode;
15
+ /** Set the ID attribute of the Typography component. */
16
+ id?: string;
17
+ /** When set to `true`, uses fluid typography with CSS clamp() values for responsive sizing. */
18
+ fluid?: boolean;
19
+ /** When set to `true`, inverts the font color for use on darker backgrounds. */
20
+ inverse?: boolean;
21
+ /** When set to `true`, the component will apply visually hidden styling, hiding the component visually but ensuring the component is still in the accessibility tree. */
22
+ screenReaderOnly?: boolean;
23
+ /** The size to apply to text. Only available for non-heading variants. */
24
+ size?: "M" | "L";
25
+ /** The color tint to apply to text. Accepts "default" for standard text color or "alt" for alternative text color. Only available for non-heading variants. */
26
+ tint?: "default" | "alt";
27
+ /** The font weight to apply to text. Only available for non-heading variants. Note: Has no effect on "strong" or "b" variants as they have fixed medium weight. */
28
+ weight?: "regular" | "medium";
29
+ /**
30
+ * @private
31
+ * @internal
32
+ * @ignore
33
+ * Sets className for component. INTERNAL USE ONLY. */
34
+ className?: string;
35
+ }
36
+ export declare const Typography: ({ variant, as, children, id, fluid, inverse, screenReaderOnly, size, tint, weight, role, "aria-hidden": ariaHidden, "aria-live": ariaLive, className, ...rest }: TypographyProps) => React.JSX.Element;
37
+ export default Typography;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import"react";import r from"../../../../__internal__/utils/helpers/tags/tags.js";import t from"../../../../style/utils/filter-styled-system-padding-props.js";import i from"../../../../style/utils/filter-styled-system-margin-props.js";import n from"../../../../__internal__/filter-object-properties/filter-object-properties.js";import o from"./typography.style.js";function s(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const a=["h1","h2","h3","h4","h5","section-heading","section-subheading","ul","ol","sup","sub","strong","b","p"],l=["textTransform","textDecoration","display","whiteSpace","wordBreak","wordWrap","textAlign","textOverflow","overflow"],c=c=>{var p,f,{variant:u="p",as:y,children:b,id:d,fluid:O=!1,inverse:m=!1,screenReaderOnly:g=!1,size:h="M",tint:j="default",weight:v="regular",role:w,"aria-hidden":P,"aria-live":$,className:x}=c,_=function(e,r){if(null==e)return{};var t,i,n=function(e,r){if(null==e)return{};var t,i,n={},o=Object.keys(e);for(i=0;i<o.length;i++)t=o[i],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(c,["variant","as","children","id","fluid","inverse","screenReaderOnly","size","tint","weight","role","aria-hidden","aria-live","className"]);return e(o,(p=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(r){s(e,r,t[r])}))}return e}({id:d,as:y||("section-heading"===u?"h2":"section-subheading"===u?"h3":a.includes(u)?u:"p"),$variant:u,$fluid:O,$inverse:m,$screenReaderOnly:g,$size:h,$tint:j,$weight:v,role:w,"aria-hidden":P,"aria-live":$,className:x},r("typography",_),i(_),t(_),Object.fromEntries(Object.entries(n(_,l)).map((([e,r])=>[`$${e}`,r])))),f=null!=(f={children:b})?f:{},Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(f)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(f)).forEach((function(e){Object.defineProperty(p,e,Object.getOwnPropertyDescriptor(f,e))})),p))};export{l as ALLOWED_CSS_TEXT_OVERRIDE_KEYS,c as Typography,a as VARIANT_TYPES,c as default};
@@ -0,0 +1,25 @@
1
+ import { SpaceProps } from "styled-system";
2
+ import { AllowedCSSTextOverrides } from "./typography.component";
3
+ import { TypographyProps } from "./typography.component";
4
+ export interface StyledTypographyProps extends SpaceProps {
5
+ $variant?: TypographyProps["variant"];
6
+ $fluid?: TypographyProps["fluid"];
7
+ $inverse?: TypographyProps["inverse"];
8
+ $screenReaderOnly?: TypographyProps["screenReaderOnly"];
9
+ $size?: TypographyProps["size"];
10
+ $tint?: TypographyProps["tint"];
11
+ $weight?: TypographyProps["weight"];
12
+ $display?: AllowedCSSTextOverrides["display"];
13
+ $whiteSpace?: AllowedCSSTextOverrides["whiteSpace"];
14
+ $wordBreak?: AllowedCSSTextOverrides["wordBreak"];
15
+ $wordWrap?: AllowedCSSTextOverrides["wordWrap"];
16
+ $textAlign?: AllowedCSSTextOverrides["textAlign"];
17
+ $textDecoration?: AllowedCSSTextOverrides["textDecoration"];
18
+ $textOverflow?: AllowedCSSTextOverrides["textOverflow"];
19
+ $textTransform?: AllowedCSSTextOverrides["textTransform"];
20
+ $overflow?: AllowedCSSTextOverrides["overflow"];
21
+ }
22
+ declare const StyledTypography: import("styled-components").StyledComponent<"span", any, {
23
+ theme: object;
24
+ } & StyledTypographyProps, "theme">;
25
+ export default StyledTypography;
@@ -0,0 +1 @@
1
+ import t,{css as e}from"styled-components";import{space as o}from"styled-system";import i from"../../../../style/themes/apply-base-theme.js";import a from"../../../../style/utils/visually-hidden.js";const r={h1:"heading-l",h2:"heading-m",h3:"heading-s",h4:"subheading-l",h5:"subheading-m","section-heading":"section-heading-m","section-subheading":"section-heading-s"},n=t.span.attrs(i).withConfig({displayName:"typography.style__StyledTypography",componentId:"sc-6c185d6b-0"})(["",""],(({$display:t,$variant:i,$fluid:n,$inverse:s,$size:d,$tint:l,$weight:$,$whiteSpace:v,$wordBreak:c,$wordWrap:f,$textAlign:m,$textDecoration:p,$textOverflow:h,$textTransform:g,$overflow:y,$screenReaderOnly:u})=>{const b=n?"fluid":"static",w="M"===d?"m":"l",x=`var(--container-standard${s?"-inverse":""}-txt-${l})`,z=i&&i in r,j="strong"===i||"b"===i,k="sup"===i||"sub"===i,O=`--global-font-${b}-body-medium-${w}`,S=`--global-font-${b}-body-${$}-${w}`;return e([""," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],!u&&"margin: unset;",o,u&&a,void 0!==t&&`display: ${t};`,void 0!==v&&`white-space: ${v};`,void 0!==c&&`word-break: ${c};`,void 0!==f&&`word-wrap: ${f};`,void 0!==m&&`text-align: ${m};`,void 0!==p&&`text-decoration: ${p};`,void 0!==h&&`text-overflow: ${h};`,void 0!==g&&`text-transform: ${g};`,void 0!==y&&`overflow: ${y};`,z&&e(["font:var(",");color:",";"],`--global-font-${b}-${z?r[i]:""}`,`var(--container-standard${s?"-inverse":""}-txt-default)`),j&&e(["font:var(",");color:",";"],O,x),"sup"===i&&e(["font:var(",");font-size:0.75em;color:",";vertical-align:super;"],S,x),"sub"===i&&e(["font:var(",");font-size:0.75em;color:",";vertical-align:sub;"],S,x),!z&&!j&&!k&&e(["font:var(",");color:",";"],S,x))}));export{n as default};
@@ -6,6 +6,36 @@ export interface ListProps extends TypographyProps {
6
6
  export interface ListItemProps extends Omit<ListProps, "variant"> {
7
7
  children?: React.ReactNode;
8
8
  }
9
+ /**
10
+ * @deprecated The List component is part of the legacy Typography system and will be removed in a future release.
11
+ * Use the Typography component with `variant="ul"` or `variant="ol"` instead, or use proper semantic HTML list elements (ul, ol, li) with Typography components inside.
12
+ *
13
+ * Example migration:
14
+ * ```tsx
15
+ * // Before
16
+ * <List>
17
+ * <ListItem>Item 1</ListItem>
18
+ * <ListItem>Item 2</ListItem>
19
+ * </List>
20
+ *
21
+ * // After (using Typography list variants)
22
+ * <Typography variant="ul">
23
+ * <Typography as="li">Item 1</Typography>
24
+ * <Typography as="li">Item 2</Typography>
25
+ * </Typography>
26
+ *
27
+ * // After (using native HTML with Typography)
28
+ * <ul>
29
+ * <li><Typography>Item 1</Typography></li>
30
+ * <li><Typography>Item 2</Typography></li>
31
+ * </ul>
32
+ * ```
33
+ */
9
34
  declare const List: ({ children, as, variant, ...props }: ListProps) => React.JSX.Element;
35
+ /**
36
+ * @deprecated The ListItem component is part of the legacy Typography system and will be removed in a future release.
37
+ * Use Typography with `as="li"` instead, or use semantic HTML li elements with Typography components inside.
38
+ * You can use the `as` prop on Typography to inherit list styling while using Typography's text styling capabilities.
39
+ */
10
40
  declare const ListItem: ({ children, ...props }: ListItemProps) => React.JSX.Element;
11
41
  export { List, ListItem };
@@ -1,22 +1,43 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
3
  import { TagProps } from "../../__internal__/utils/helpers/tags";
4
- export declare const VARIANT_TYPES: readonly ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "segment-header-small", "segment-subheader", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"];
4
+ import type { TypographyProps as NextTypographyProps } from "./__internal__/__next__/";
5
+ export declare const VARIANT_TYPES: readonly ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "section-heading", "segment-header-small", "segment-subheader", "section-subheading", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"];
5
6
  export type VariantTypes = (typeof VARIANT_TYPES)[number];
6
- export interface TypographyProps extends SpaceProps, TagProps {
7
+ export interface TypographyProps extends SpaceProps, TagProps, Pick<NextTypographyProps, "weight" | "tint" | "size" | "fluid" | "inverse" | "overflow"> {
7
8
  /** Override the variant component */
8
9
  as?: React.ElementType;
9
10
  /** Set the ID attribute of the Typography component */
10
11
  id?: string;
11
12
  /** Content to be rendered inside the Typography component */
12
13
  children?: React.ReactNode;
13
- /** The visual style to apply to the component */
14
+ /**
15
+ * The visual style to apply to the component. Supported variants include:
16
+ * h1, h2, h3, h4, h5, section-heading, section-subheading, p (default),
17
+ * sup, sub, strong, b, ul, ol
18
+ *
19
+ * The following variant values are deprecated with recommended alternatives:
20
+ * - "h1-large" -> use "h1" instead
21
+ * - "segment-header" -> use "section-heading" instead
22
+ * - "segment-header-small" -> use "section-subheading" instead
23
+ * - "segment-subheader" / "segment-subheader-alt" -> use "h5" instead
24
+ * - "span" -> use "p" instead
25
+ * - "small" -> use "p" with the `size` prop set to "M"
26
+ * - "big" -> use "h5" or "h4" depending on context, or "p" with `size` prop set to "L"
27
+ * - "em" -> use "strong" or "b" for semantic emphasis
28
+ */
14
29
  variant?: VariantTypes;
15
- /** Override the variant font-size */
30
+ /**
31
+ * @deprecated Use the new `size` prop for paragraphs or choose the appropriate variant for other variants. This prop will eventually be removed.
32
+ * Override the variant font-size */
16
33
  fontSize?: string;
17
- /** Override the variant font-weight */
34
+ /**
35
+ * @deprecated Use the new `weight` prop for paragraphs or choose the appropriate variant for other variants. This prop will eventually be removed.
36
+ * Override the variant font-weight */
18
37
  fontWeight?: string;
19
- /** Override the variant line-height */
38
+ /**
39
+ * @deprecated Choose the appropriate variant for your use case, as each variant has its own line-height. This prop will eventually be removed.
40
+ * Override the variant line-height */
20
41
  lineHeight?: string;
21
42
  /** Override the variant text-transform */
22
43
  textTransform?: string;
@@ -24,7 +45,9 @@ export interface TypographyProps extends SpaceProps, TagProps {
24
45
  textDecoration?: string;
25
46
  /** Override the variant display */
26
47
  display?: string;
27
- /** Override the list-style-type */
48
+ /**
49
+ * @deprecated This prop no longer has any effect. This prop will eventually be removed.
50
+ * Override the list-style-type */
28
51
  listStyleType?: string;
29
52
  /** Override the white-space */
30
53
  whiteSpace?: string;
@@ -36,20 +59,31 @@ export interface TypographyProps extends SpaceProps, TagProps {
36
59
  textAlign?: string;
37
60
  /** Override the text-overflow */
38
61
  textOverflow?: string;
39
- /** Apply truncation */
62
+ /**
63
+ * @deprecated Use `textOverflow` and `whiteSpace` props instead. This prop will eventually be removed.
64
+ * Apply truncation */
40
65
  truncate?: boolean;
41
- /** Override the color style */
66
+ /**
67
+ * @deprecated This prop no longer has any effect. This prop will eventually be removed.
68
+ * Override the color style. If a white colour is needed, use the `inverse` prop instead. */
42
69
  color?: string;
43
- /** Override the backgroundColor style */
70
+ /**
71
+ * @deprecated This prop no longer has any effect. This prop will eventually be removed.
72
+ * Override the backgroundColor style */
44
73
  backgroundColor?: string;
45
- /** Override the bg value shorthand for backgroundColor */
74
+ /**
75
+ * @deprecated This prop no longer has any effect. This prop will eventually be removed.
76
+ * Override the bg value shorthand for backgroundColor */
46
77
  bg?: string;
47
- /** Override the opacity value */
78
+ /**
79
+ * @deprecated This prop no longer has any effect. This prop will eventually be removed.
80
+ * Override the opacity value */
48
81
  opacity?: string | number;
49
82
  /** Set whether it will be visually hidden
50
83
  * NOTE: This is for screen readers only and will make a lot of the other props redundant */
51
84
  screenReaderOnly?: boolean;
52
85
  /**
86
+ * @deprecated
53
87
  * @private
54
88
  * @ignore
55
89
  * Override the default color of the rendered element to match disabled styling
@@ -71,7 +105,7 @@ export interface TypographyProps extends SpaceProps, TagProps {
71
105
  "data-component"?: string;
72
106
  }
73
107
  export declare const Typography: {
74
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: TypographyProps): React.JSX.Element;
108
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: TypographyProps): React.JSX.Element;
75
109
  displayName: string;
76
110
  };
77
111
  export default Typography;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import"react";import t from"../../__internal__/utils/helpers/tags/tags.js";import r from"../../style/utils/filter-styled-system-padding-props.js";import a from"../../style/utils/filter-styled-system-margin-props.js";import n from"./typography.style.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}const i=["h1-large","h1","h2","h3","h4","h5","segment-header","segment-header-small","segment-subheader","segment-subheader-alt","p","span","small","big","sup","sub","strong","b","em","ul","ol"],l=e=>{switch(e){case"h1-large":return"h1";case"segment-header":case"segment-header-small":case"segment-subheader":case"segment-subheader-alt":return"h5";case"big":return"p";default:return e}},s=i=>{var s,c,{"data-component":p,variant:y="p",as:d,id:u,fontSize:g,fontWeight:b,textTransform:f,lineHeight:m,textDecoration:h,display:O,listStyleType:w,whiteSpace:j,wordBreak:v,wordWrap:x,textAlign:S,textOverflow:P,truncate:k,color:D="blackOpacity90",backgroundColor:T,bg:W,opacity:N,children:_,screenReaderOnly:z,isDisabled:A,"aria-live":B,role:C,"aria-hidden":E,className:H}=i,R=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(i,["data-component","variant","as","id","fontSize","fontWeight","textTransform","lineHeight","textDecoration","display","listStyleType","whiteSpace","wordBreak","wordWrap","textAlign","textOverflow","truncate","color","backgroundColor","bg","opacity","children","screenReaderOnly","isDisabled","aria-live","role","aria-hidden","className"]);return e(n,(s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),a.forEach((function(t){o(e,t,r[t])}))}return e}({variant:y,as:d||l(y),id:u,fontSize:g,fontWeight:b,textTransform:f,lineHeight:m,textDecoration:h,display:O,listStyleType:w,whiteSpace:j,wordWrap:x,wordBreak:v,textAlign:S,textOverflow:P,truncate:k,color:D,backgroundColor:T,bg:W,opacity:N,screenReaderOnly:z,isDisabled:A,"aria-hidden":E,className:H,role:C,"aria-live":B},t(p,R),a(R),r(R)),c=null!=(c={children:_})?c:{},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(c)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(c)).forEach((function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(c,e))})),s))};s.displayName="Typography";export{s as Typography,i as VARIANT_TYPES,s as default};
1
+ import{jsx as e}from"react/jsx-runtime";import"react";import r from"../../__internal__/filter-object-properties/filter-object-properties.js";import{ALLOWED_CSS_TEXT_OVERRIDE_KEYS as t}from"./__internal__/__next__/typography.component.js";import n from"./typography.style.js";function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(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){a(e,r,t[r])}))}return e}function s(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=["h1-large","h1","h2","h3","h4","h5","segment-header","section-heading","segment-header-small","segment-subheader","section-subheading","segment-subheader-alt","p","span","small","big","sup","sub","strong","b","em","ul","ol"],l={"h1-large":"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5","segment-header":"h2","segment-header-small":"h3","segment-subheader":"h5","segment-subheader-alt":"h5","section-heading":"h2","section-subheading":"h3",p:"p",span:"span",small:"small",big:"big",sup:"sup",sub:"sub",strong:"strong",em:"em",b:"b",ul:"ul",ol:"ol"},c=e=>{var r;return null!==(r=e&&l[e])&&void 0!==r?r:"p"},h=a=>{var{variant:o="p",as:l,id:h,fluid:u=!1,inverse:p=!1,size:b="M",tint:f="default",weight:d="regular",truncate:g=!1,color:m,children:y,screenReaderOnly:O=!1,"aria-live":j,"aria-hidden":v}=a,w=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(a,["variant","as","id","fluid","inverse","size","tint","weight","truncate","color","children","screenReaderOnly","aria-live","aria-hidden"]);const P=(e=>{switch(e){case"h1-large":return"h1";case"segment-header":return"section-heading";case"segment-header-small":return"section-subheading";case"segment-subheader":case"segment-subheader-alt":return"h5";default:return e}})(o),_=r(w,t);g&&(_.overflow="hidden",_.whiteSpace="nowrap",_.textOverflow="ellipsis");const S=new Set(["white","#fff","#ffffff","rgb(255,255,255)","rgb(255, 255, 255)"]),x=p||m&&S.has(m);return e(n,s(i(s(i({variant:P,forwardedAs:l||c(o),id:h},_),{fluid:u,inverse:x,screenReaderOnly:O,"aria-live":j,"aria-hidden":v,size:b,tint:f,weight:d}),w),{children:y}))};h.displayName="Typography";export{h as Typography,o as VARIANT_TYPES,h as default};
@@ -1,5 +1,5 @@
1
1
  import { TypographyProps } from "./typography.component";
2
- declare const StyledTypography: import("styled-components").StyledComponent<"span", any, {
2
+ declare const StyledTypography: import("styled-components").StyledComponent<({ variant, as, children, id, fluid, inverse, screenReaderOnly, size, tint, weight, role, "aria-hidden": ariaHidden, "aria-live": ariaLive, className, ...rest }: import("./__internal__/__next__").TypographyProps) => import("react").JSX.Element, any, {
3
3
  theme: object;
4
4
  } & TypographyProps, "theme">;
5
5
  export default StyledTypography;
@@ -1 +1 @@
1
- import e,{css as r}from"styled-components";import{space as t}from"styled-system";import a from"../../style/utils/color.js";import s from"../../style/themes/apply-base-theme.js";import n from"../../style/utils/visually-hidden.js";function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const l=e.span.attrs(s).withConfig({displayName:"typography.style__StyledTypography",componentId:"sc-f80efd85-0"})([""," "," "," ",""],(({fontSize:e,fontWeight:t,display:a,variant:s,lineHeight:o,listStyleType:l,whiteSpace:c,wordBreak:i,wordWrap:u,textAlign:p,textDecoration:h,textOverflow:g,textTransform:m,truncate:d,screenReaderOnly:f})=>{const y=e||(e=>{switch(e){case"h1-large":return"40px";case"h1":return"30px";case"h2":return"24px";case"h3":case"segment-header":return"21px";case"h4":case"segment-header-small":return"18px";case"h5":case"segment-subheader":case"big":return"16px";case"small":case"sub":case"sup":return"13px";default:return"14px"}})(s),b=t||(e=>{switch(e){case"h1-large":case"h1":case"h2":case"segment-header":case"segment-header-small":return"700";case"h3":case"segment-subheader":case"segment-subheader-alt":case"b":case"em":case"strong":return"500";default:return"400"}})(s),x=m||(e=>"segment-subheader-alt"===e?"uppercase":"none")(s),w=h||(e=>"em"===e?"underline":"none")(s),O=o||(e=>{switch(e){case"h1-large":return"50px";case"h1":return"37.5px";case"h2":return"30px";case"h3":case"segment-header":return"26.25px";case"h4":case"segment-header-small":return"22.5px";case"h5":case"small":case"sub":case"sup":return"20px";case"segment-subheader":case"big":return"24px";default:return"21px"}})(s);return r(["font-style:normal;font-size:",";font-weight:",";text-transform:",";text-decoration:",";line-height:",";margin:",";padding:0;white-space:",";word-break:",";word-wrap:",";text-align:",";text-overflow:",";",";"," "," "," "," ",""],y,b,x,w,O,"p"===s?"0 0 16px":"0",d?"nowrap":c,i,u,p,g||d&&"ellipsis",d&&"\n overflow: hidden;\n ",f&&n,"sup"===s&&"vertical-align: super;","sub"===s&&"vertical-align: sub;",a&&`display: ${a};`,l&&`list-style-type: ${l};`)}),t,(e=>{var{color:r,bg:t,backgroundColor:s}=e,n=function(e,r){if(null==e)return{};var t,a,s=function(e,r){if(null==e)return{};var t,a,s={},n=Object.keys(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)t=n[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}(e,["color","bg","backgroundColor"]);return a(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(r){o(e,r,t[r])}))}return e}({color:r,bg:t,backgroundColor:s},n))}),(({isDisabled:e})=>e&&r(["color:var(--colorsUtilityYin030);"])));l.displayName="Typography";export{l as default};
1
+ import e,{css as t}from"styled-components";import{space as o}from"styled-system";import p from"../../style/themes/apply-base-theme.js";import{Typography as s}from"./__internal__/__next__/typography.component.js";import i from"../../style/utils/visually-hidden.js";const a=e(s).attrs(p).withConfig({displayName:"typography.style__StyledTypography",componentId:"sc-bec9c5e6-0"})([""," ",""],(({fontSize:e,fontWeight:o,lineHeight:p,variant:s,screenReaderOnly:a})=>t([""," "," "," margin:",";",""],e&&`font-size: ${e};`,o&&`font-weight: ${o};`,p&&`line-height: ${p};`,"p"===s?"0 0 var(--global-space-comp-l)":"0",a&&i)),o);a.displayName="Typography";export{a as default};
@@ -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,t)=>{const o=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===t?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${o}`]: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 t=a(e)?"item":"items";return r?`${e} ${t}`:t},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"},tabs:{error:e=>`The ${e} tab contains errors`,info:e=>`The ${e} tab contains information`,warning:e=>`The ${e} tab contains warnings`,scrollLeftText:()=>"Scroll Tabs Left",scrollRightText:()=>"Scroll Tabs Right"},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",hyperlink:{buttonAria:()=>"Hyperlink",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",dialogTitle:()=>"Add link",linkFieldLabel:()=>"Link",saveButton:()=>"Save",saveButtonAria:()=>"Save",textFieldLabel:()=>"Text"},typography:{selectAria:()=>"Heading type",paragraph:()=>"Paragraph",title:()=>"Title",subtitle:()=>"Subtitle",sectionHeader:()=>"Section header",sectionSubheader:()=>"Section subheader"},italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",underlineAria:()=>"Underline",unorderedListAria:()=>"Unordered list",mentions:{listAriaLabel:()=>"List of mentionable people"}},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."}`,ariaRoleDescription:()=>"Sortable column header"},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,t)=>`${t?`${t}.`:""} ${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,t)=>{const o=a(e)?"error":"errors",n=a(r)?"warning":"warnings",i=a(e)?"is":"are",s=a(r)?"is":"are";return e&&r&&"warning"===t?["and",`${r} ${n}`]:e?[`There ${i}`,`${e} ${o}`]: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 t=a(e)?"item":"items";return r?`${e} ${t}`:t},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"},tabs:{error:e=>`The ${e} tab contains errors`,info:e=>`The ${e} tab contains information`,warning:e=>`The ${e} tab contains warnings`,scrollLeftText:()=>"Scroll Tabs Left",scrollRightText:()=>"Scroll Tabs Right"},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",hyperlink:{buttonAria:()=>"Hyperlink",cancelButton:()=>"Cancel",cancelButtonAria:()=>"Cancel",dialogTitle:()=>"Insert link",formKey:()=>"Indicates required information",linkFieldLabel:()=>"Link address",linkFieldErrorMessage:()=>"Enter link address",saveButton:()=>"Save",saveButtonAria:()=>"Save",textFieldLabel:()=>"Link text",textFieldErrorMessage:()=>"Enter link text"},typography:{selectAria:()=>"Heading type",paragraph:()=>"Paragraph",title:()=>"Title",subtitle:()=>"Subtitle",sectionHeader:()=>"Section header",sectionSubheader:()=>"Section subheader"},italicAria:()=>"Italic",orderedListAria:()=>"Ordered list",saveButton:()=>"Save",saveButtonAria:()=>"Save",toolbarAriaLabel:()=>"Formatting",underlineAria:()=>"Underline",unorderedListAria:()=>"Unordered list",mentions:{listAriaLabel:()=>"List of mentionable people"}},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."}`,ariaRoleDescription:()=>"Sortable column header"},splitButton:{ariaLabel:()=>"Show more"},stepFlow:{stepLabel:(e,a)=>`Step ${e} of ${a}`,screenReaderOnlyTitle:(e,a,r,t)=>`${t?`${t}.`:""} ${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};
@@ -149,10 +149,13 @@ interface Locale {
149
149
  cancelButton: () => string;
150
150
  cancelButtonAria: () => string;
151
151
  dialogTitle: () => string;
152
+ formKey?: () => string;
152
153
  linkFieldLabel: () => string;
154
+ linkFieldErrorMessage?: () => string;
153
155
  saveButton: () => string;
154
156
  saveButtonAria: () => string;
155
157
  textFieldLabel: () => string;
158
+ textFieldErrorMessage?: () => string;
156
159
  };
157
160
  typography: {
158
161
  selectAria: () => string;
@@ -13,7 +13,7 @@ type StyledHeadingTitleProps = {
13
13
  withMargin?: boolean;
14
14
  };
15
15
  declare const StyledHeadingTitle: import("styled-components").StyledComponent<{
16
- ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-live": ariaLive, role, "aria-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
16
+ ({ variant, as, id, fluid, inverse, size, tint, weight, truncate, color, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
17
17
  displayName: string;
18
18
  }, any, StyledHeadingTitleProps, never>;
19
19
  declare const StyledHeadingPills: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -38,5 +38,5 @@ declare const StyledImage: import("styled-components").StyledComponent<"div", an
38
38
  backgroundPosition: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundPosition<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
39
39
  backgroundRepeat: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundRepeat, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
40
40
  backgroundSize: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundSize<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
41
- } & StyledImageProps, "theme" | "children" | "hidden" | "src" | "as" | "left" | "right" | "position" | "bottom" | "top" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat">;
41
+ } & StyledImageProps, "theme" | "children" | "hidden" | "src" | "as" | "left" | "right" | "position" | "bottom" | "top" | "backgroundRepeat" | "backgroundSize" | "backgroundPosition">;
42
42
  export { StyledImage };