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.
- package/esm/components/heading/heading.style.d.ts +1 -1
- package/esm/components/image/image.style.d.ts +1 -1
- package/esm/components/loader/__next__/internal/ring-loader.component.js +1 -1
- package/esm/components/loader/__next__/internal/standalone-loader.component.js +1 -1
- package/esm/components/loader/__next__/loader.style.d.ts +2 -2
- package/esm/components/loader/__next__/loader.style.js +1 -1
- package/esm/components/loader-spinner/loader-spinner.component.js +1 -1
- package/esm/components/loader-spinner/loader-spinner.style.d.ts +4 -2
- package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
- package/esm/components/loader-star/loader-star.style.d.ts +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -1
- package/esm/components/tile/tile.style.d.ts +1 -1
- package/esm/components/typography/__internal__/__next__/index.d.ts +2 -0
- package/esm/components/typography/__internal__/__next__/index.js +1 -0
- package/esm/components/typography/__internal__/__next__/typography.component.d.ts +37 -0
- package/esm/components/typography/__internal__/__next__/typography.component.js +1 -0
- package/esm/components/typography/__internal__/__next__/typography.style.d.ts +25 -0
- package/esm/components/typography/__internal__/__next__/typography.style.js +1 -0
- package/esm/components/typography/list.component.d.ts +30 -0
- package/esm/components/typography/typography.component.d.ts +47 -13
- package/esm/components/typography/typography.component.js +1 -1
- package/esm/components/typography/typography.style.d.ts +1 -1
- package/esm/components/typography/typography.style.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/locale.d.ts +3 -0
- package/lib/components/heading/heading.style.d.ts +1 -1
- package/lib/components/image/image.style.d.ts +1 -1
- package/lib/components/loader/__next__/internal/ring-loader.component.js +1 -1
- package/lib/components/loader/__next__/internal/standalone-loader.component.js +1 -1
- package/lib/components/loader/__next__/loader.style.d.ts +2 -2
- package/lib/components/loader/__next__/loader.style.js +1 -1
- package/lib/components/loader-spinner/loader-spinner.component.js +1 -1
- package/lib/components/loader-spinner/loader-spinner.style.d.ts +4 -2
- package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
- package/lib/components/loader-star/loader-star.style.d.ts +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.component.js +1 -1
- package/lib/components/tile/tile.style.d.ts +1 -1
- package/lib/components/typography/__internal__/__next__/index.d.ts +2 -0
- package/lib/components/typography/__internal__/__next__/index.js +1 -0
- package/lib/components/typography/__internal__/__next__/package.json +6 -0
- package/lib/components/typography/__internal__/__next__/typography.component.d.ts +37 -0
- package/lib/components/typography/__internal__/__next__/typography.component.js +1 -0
- package/lib/components/typography/__internal__/__next__/typography.style.d.ts +25 -0
- package/lib/components/typography/__internal__/__next__/typography.style.js +1 -0
- package/lib/components/typography/list.component.d.ts +30 -0
- package/lib/components/typography/typography.component.d.ts +47 -13
- package/lib/components/typography/typography.component.js +1 -1
- package/lib/components/typography/typography.style.d.ts +1 -1
- package/lib/components/typography/typography.style.js +1 -1
- package/lib/locales/en-gb.js +1 -1
- package/lib/locales/locale.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../loader.style.js"),a=require("../../../../hooks/__internal__/useLocale/useLocale.js");const i=e=>e||.8;exports.default=({inverse:s,size:l,variant:n,hasMotion:o,isTracked:t,animationTime:d,loaderLabel:c,showLabel:u,isSuccess:v,isError:x})=>{const j=a.default(),m=n&&["stacked","inline"].includes(n)?n:"stacked",p=l&&["extra-small","small","large"].includes(l)?l:"medium";return e.jsxs(r.StyledRingLoaderWrapper,{loaderVariant:n,"data-role":"ring-loader-container",children:[e.jsxs(r.StyledRingCircleSvg,{inverse:s,role:"presentation",size:p,variant:m,hasMotion:o,isTracked:t,animationTime:i(d),viewBox:"0 0 24 24",isSuccess:v,isError:x,children:[e.jsx("circle",{"data-role":"outer-arc"}),e.jsx("circle",{"data-role":"inner-arc"})]}),u&&e.jsx(r.StyledLoaderLabel,{inverse:s,"data-role":"loader-label",variant:"span",loaderVariant:m,loaderType:"ring"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../loader.style.js"),a=require("../../../../hooks/__internal__/useLocale/useLocale.js");const i=e=>e||.8;exports.default=({inverse:s,size:l,variant:n,hasMotion:o,isTracked:t,animationTime:d,loaderLabel:c,showLabel:u,isSuccess:v,isError:x})=>{const j=a.default(),m=n&&["stacked","inline"].includes(n)?n:"stacked",p=l&&["extra-small","small","large"].includes(l)?l:"medium";return e.jsxs(r.StyledRingLoaderWrapper,{loaderVariant:n,"data-role":"ring-loader-container",children:[e.jsxs(r.StyledRingCircleSvg,{inverse:s,role:"presentation",size:p,variant:m,hasMotion:o,isTracked:t,animationTime:i(d),viewBox:"0 0 24 24",isSuccess:v,isError:x,children:[e.jsx("circle",{"data-role":"outer-arc"}),e.jsx("circle",{"data-role":"inner-arc"})]}),u&&e.jsx(r.StyledLoaderLabel,{inverse:s,"data-role":"loader-label",variant:"span",loaderVariant:m,loaderType:"ring",$size:p,children:c||(null==j?void 0:j.loader.loading())})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var a=require("../loader.style.js"),r=require("../../../../hooks/__internal__/useLocale/useLocale.js");exports.default=({size:i,variant:l,inverse:n,loaderLabel:t,showLabel:s,animationTime:o,hasMotion:d})=>{const u=r.default(),c="typical"===l||"ai"===l?l:"typical",v="small"===i||"large"===i?i:"medium";return e.jsxs(e.Fragment,{children:[e.jsx(a.OuterBar,{"data-role":"outer-bar",size:v,variant:c,inverse:!!n,children:e.jsx(a.InnerBar,{"data-role":"inner-bar",size:v,variant:c,inverse:!!n,animationTime:(e=>e||2)(o),hasMotion:d})}),s&&e.jsx(a.StyledLoaderLabel,{inverse:n,"data-role":"loader-label",variant:"span",loaderVariant:l,loaderType:"standalone"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var a=require("../loader.style.js"),r=require("../../../../hooks/__internal__/useLocale/useLocale.js");exports.default=({size:i,variant:l,inverse:n,loaderLabel:t,showLabel:s,animationTime:o,hasMotion:d})=>{const u=r.default(),c="typical"===l||"ai"===l?l:"typical",v="small"===i||"large"===i?i:"medium";return e.jsxs(e.Fragment,{children:[e.jsx(a.OuterBar,{"data-role":"outer-bar",size:v,variant:c,inverse:!!n,children:e.jsx(a.InnerBar,{"data-role":"inner-bar",size:v,variant:c,inverse:!!n,animationTime:(e=>e||2)(o),hasMotion:d})}),s&&e.jsx(a.StyledLoaderLabel,{inverse:n,"data-role":"loader-label",variant:"span",loaderVariant:l,loaderType:"standalone",$size:i,children:t||(null==u?void 0:u.loader.loading())})]})};
|
|
@@ -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
|
-
({
|
|
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
|
-
"use strict";var e=require("styled-components"),
|
|
1
|
+
"use strict";var e=require("styled-components"),t=require("styled-system"),r=require("../../../style/themes/apply-base-theme.js"),a=require("../../typography/typography.component.js");require("react/jsx-runtime"),require("react");var i=require("../../button/button.style.js"),o=require("../../button/__next__/button.style.js");function n(e){return e&&e.__esModule?e:{default:e}}var s=n(e);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},c={small:"4px",medium:"8px",large:"16px"},p={"extra-small":"8px",small:"8px",medium:"12px",large:"16px"},m=e.keyframes(["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);}"]),u=e.keyframes(["0%{width:15px;animation-timing-function:cubic-bezier(0.7,0,0.8,1);}50%{width:35%;}100%{width:15px;}"]),g=e.keyframes(["from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}"]),f=e.keyframes(["0%{transform:rotate(-90deg);stroke-dashoffset:95;}50%{transform:rotate(90deg);stroke-dashoffset:80;}100%{transform:rotate(270deg);stroke-dashoffset:95;}"]),y=(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"}},x=e.css(["display:flex;justify-content:center;text-align:center;"]),h=s.default.div.withConfig({displayName:"loader.style__StyledLoaderPlaceholder",componentId:"sc-23905a4e-0"})(["display:inline-block;min-width:var(--sizing800);"]),v=s.default.div.attrs(r.default).withConfig({displayName:"loader.style__StyledLoader",componentId:"sc-23905a4e-1"})([""," text-align:center;white-space:nowrap;"],t.margin),b=s.default.div.withConfig({displayName:"loader.style__OuterBar",componentId:"sc-23905a4e-2"})(["",""],(({size:t,variant:r,inverse:a})=>e.css(["border-radius:var(--borderRadius400);height:",";width:100%;background:",";overflow:hidden;position:relative;"],c[t],y(r,a).outerBarBackground))),w=s.default.div.withConfig({displayName:"loader.style__InnerBar",componentId:"sc-23905a4e-3"})(["",""],(({size:t,variant:r,inverse:a,animationTime:i,hasMotion:o})=>e.css(["position:absolute;background:",";width:15px;height:",";border-radius:var(--borderRadius400);animation-name:",",",";"," animation-iteration-count:",";"],y(r,a).innerBarBackground,c[t],m,u,o&&`animation-duration: ${i}s, ${i}s;`,o?"infinite, infinite":"none, none"))),k=s.default.svg.withConfig({displayName:"loader.style__StyledRingCircleSvg",componentId:"sc-23905a4e-4"})([""," ",' & circle[data-role="inner-arc"],',' & circle[data-role="inner-arc"]{stroke:currentColor;}'],(({inverse:t,size:r,hasMotion:a,isTracked:i,isError:o,isSuccess:n,animationTime:s})=>{const c=`${l[r]}px`,p=d[r];return e.css(["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:",";}"],c,c,p,t?"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:t,isSuccess:n,isError:o}),i?g:f,a&&`animation-duration: ${s}s;`,a?"infinite":"none")}),o.StyledButton,i.default),S="40px",_=s.default.div.withConfig({displayName:"loader.style__StyledStars",componentId:"sc-23905a4e-5"})(["position:relative;width:",";height:",";"],S,S),B={standalone:{small:"4px",medium:"8px",large:"12px"},ring:{"extra-small":"4px",small:"8px",medium:"8px",large:"12px"}},C=s.default.div.withConfig({displayName:"loader.style__StyledStarLoaderWrapper",componentId:"sc-23905a4e-6"})(["position:relative;display:flex;align-items:center;justify-content:center;"]),L=s.default(a.Typography).withConfig({displayName:"loader.style__StyledLoaderLabel",componentId:"sc-23905a4e-7"})([""," line-height:150%;color:",";"," &,"," &{color:currentColor;}",""],x,(({inverse:e})=>e?"rgba(255, 255, 255, 0.55)":"rgba(0, 0, 0, 0.65)"),o.StyledButton,i.default,(({$size:t="medium",loaderType:r,loaderVariant:a})=>{const i=t;return"star"===r?e.css(["font-size:16px;font-weight:400;margin-left:12px;width:min-content;"]):"standalone"===r?e.css(["font-size:",";font-weight:500;width:100%;margin-top:",";"],"large"===i?"16px":"14px",B[r][i]):e.css(["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: ${B[r][i]}`)})),F=s.default.div.withConfig({displayName:"loader.style__StyledRingLoaderWrapper",componentId:"sc-23905a4e-8"})(["",""],(({loaderVariant:t})=>e.css(["display:flex;flex-direction:",";align-items:center;justify-content:center;width:",";"],"inline"===t?"row":"column","inline"===t?"auto":"100%"))),I=s.default.span.withConfig({displayName:"loader.style__StyledLabel",componentId:"sc-23905a4e-9"})(["",";"],(({inverse:t})=>e.css(["color:",";"," &,"," &{color:currentColor;}"],t?"rgba(255, 255, 255, 0.90)":"rgba(0, 0, 0, 0.90)",o.StyledButton,i.default)));exports.InnerBar=w,exports.OuterBar=b,exports.StyledLabel=I,exports.StyledLoader=v,exports.StyledLoaderLabel=L,exports.StyledLoaderPlaceholder=h,exports.StyledRingCircleSvg=k,exports.StyledRingLoaderWrapper=F,exports.StyledStarLoaderWrapper=C,exports.StyledStars=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../../__internal__/utils/helpers/tags/tags.js"),t=require("./loader-spinner.style.js");require("../../style/utils/filter-styled-system-padding-props.js");var n=require("../../style/utils/filter-styled-system-margin-props.js"),i=require("../../hooks/__internal__/useLocale/useLocale.js"),a=require("../../hooks/useMediaQuery/useMediaQuery.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../../__internal__/utils/helpers/tags/tags.js"),t=require("./loader-spinner.style.js");require("../../style/utils/filter-styled-system-padding-props.js");var n=require("../../style/utils/filter-styled-system-margin-props.js"),i=require("../../hooks/__internal__/useLocale/useLocale.js"),a=require("../../hooks/useMediaQuery/useMediaQuery.js"),s=require("../typography/typography.component.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=l=>{var{spinnerLabel:c,size:u="medium",showSpinnerLabel:p=!0,variant:d="action",isTracked:y=!1,hasMotion:f=!0,animationTime:b}=l,g=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(l,["spinnerLabel","size","showSpinnerLabel","variant","isTracked","hasMotion","animationTime"]);const j=i.default(),O=a.default("screen and (prefers-reduced-motion: no-preference)");if(void 0===O)return null;const v="inverse"!==d&&"gradient-white"!==d,h=e.jsx(t.StyledLabel,{"data-role":"visible-label",variant:"span",fontWeight:"400",$size:u,inverse:!v,fontSize:"extra-large"===u?"var(--sizing200)":"var(--sizing175)",lineHeight:"extra-large"===u?"var(--sizing300)":"var(--sizing250)",children:c||j.loaderSpinner.loading()}),m="gradient-white"===d||"gradient-grey"===d;return e.jsx(t.StyledSpinnerWrapper,(S=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){o(e,r,t[r])}))}return e}({size:u,role:"status"},r.default("loader-spinner",g),n.default(g)),w=null!=(w={children:O?e.jsxs(e.Fragment,{children:[e.jsxs(t.StyledSpinnerCircleSvg,{role:"presentation",size:u,variant:d,hasMotion:f,isTracked:y,isGradientVariant:m,animationTime:b||(m?2:1),viewBox:"0 0 24 24",children:[e.jsx("circle",{"data-role":"outer-arc"}),e.jsx("circle",{"data-role":"inner-arc"})]}),p?h:e.jsx(s.Typography,{"data-role":"hidden-label",variant:"span",screenReaderOnly:!0,children:c||j.loaderSpinner.loading()})]}):h})?w:{},Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(w)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(w)).forEach((function(e){Object.defineProperty(S,e,Object.getOwnPropertyDescriptor(w,e))})),S));var S,w};exports.LoaderSpinner=l,exports.default=l;
|
|
@@ -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
|
-
({
|
|
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<
|
|
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
|
-
"use strict";var e=require("styled-components"),r=require("styled-system"),t=require("./loader-spinner.config.js"),a=require("../typography/typography.component.js");function n(e){return e&&e.__esModule?e:{default:e}}require("react/jsx-runtime"),require("react");var i=n(e);const o=(e,r)=>{switch(r){case"neutral":return e?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return e?"#00D639":"#0000001A";case"gradient-white":return e?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return e?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},s=i.default.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"sc-
|
|
1
|
+
"use strict";var e=require("styled-components"),r=require("styled-system"),t=require("./loader-spinner.config.js"),a=require("../typography/typography.component.js");function n(e){return e&&e.__esModule?e:{default:e}}require("react/jsx-runtime"),require("react");var i=n(e);const o=(e,r)=>{switch(r){case"neutral":return e?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return e?"#00D639":"#0000001A";case"gradient-white":return e?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return e?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},s=i.default.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"sc-fe9a4dc0-0"})([""," display:flex;flex-direction:",";"],r.margin,(({size:e})=>"extra-small"===e?"row":"column")),c=i.default(a.Typography).withConfig({displayName:"loader-spinner.style__StyledLabel",componentId:"sc-fe9a4dc0-1"})(["",""],(({$size:r})=>e.css(["display:flex;justify-content:center;text-align:center;",";"],"extra-small"===r?"margin-left: var(--spacing100)":`margin-top: ${t.LOADER_SPINNER_SIZE_PARAMS[r].labelMarginTop}px`))),d=i.default.svg.withConfig({displayName:"loader-spinner.style__StyledSpinnerCircleSvg",componentId:"sc-fe9a4dc0-2"})(["",";"],(({size:r,isTracked:a,hasMotion:n,isGradientVariant:i,animationTime:s,variant:c})=>{const d=`${t.LOADER_SPINNER_SIZE_PARAMS[r].wrapperDimensions}px`;return r&&e.css(["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,t.LOADER_SPINNER_SIZE_PARAMS[r].strokeWidth,o(!1,c),"inverse"===c&&"stroke-opacity: 0.3;",t.LOADER_SPINNER_SIZE_PARAMS[r].strokeWidth,o(!0,c),a&&!i?"trackedAnimation":"untrackedAnimation","gradient-grey"===c||"gradient-white"===c?"gradientAnimation":"none",n&&`animation-duration: ${s}s`,n?"infinite":"none")}));exports.StyledLabel=c,exports.StyledSpinnerCircleSvg=d,exports.StyledSpinnerWrapper=s;
|
|
@@ -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
|
-
({
|
|
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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@lexical/react/LexicalComposerContext"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@lexical/react/LexicalComposerContext"),r=require("@lexical/utils"),n=require("lexical"),o=require("react"),i=require("./toolbar.style.js"),l=require("../../../../button/button.component.js"),a=require("../../../../../hooks/__internal__/useLocale/useLocale.js"),s=require("./buttons/bold.component.js"),u=require("./buttons/hyperlink.component.js"),d=require("./buttons/italic.component.js"),c=require("./buttons/list.component.js"),p=require("./buttons/save.component.js"),x=require("./buttons/typography.component.js"),b=require("./buttons/underline.component.js"),f=require("./button-group/button-group.component.js"),m=require("../../__utils__/constants.js"),h=require("../../../../textbox/textbox.component.js"),g=require("@lexical/link"),y=require("../../../../dialog/dialog.component.js"),j=require("../../../../form/form.component.js");require("../../../../form/required-fields-indicator/required-fields-indicator.component.js");var v=require("../../../../box/box.component.js"),E=require("../../../../typography/typography.component.js");function k(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){k(e,t,r[t])}))}return e}function S(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}exports.default=({contentEditorRef:k,namespace:q,hasHeader:T,onCancel:w,onSave:$,size:D="medium",toolbarControls:B=["typography","bold","italic","underline","unordered-list","ordered-list","link"]})=>{var C,F,P,_,I,R;const[z]=t.useLexicalComposerContext(),L=z.isEditable(),A=o.useRef(null),[N,W]=o.useState(!1),[M,H]=o.useState(!1),[U,X]=o.useState(!1),[Y,K]=o.useState(!1),[G,J]=o.useState(!1),[Q,V]=o.useState(-1),[Z,ee]=o.useState(""),[te,re]=o.useState(""),[ne,oe]=o.useState(!1),[ie,le]=o.useState(!1),ae=o.useRef(null),se=o.useRef(null),ue=a.default(),de=B.includes("typography"),ce=B.includes("bold")||B.includes("italic")||B.includes("underline"),pe=B.includes("unordered-list")||B.includes("ordered-list"),xe=B.includes("link"),be=o.useCallback((()=>{const e=n.$getSelection();n.$isRangeSelection(e)&&(W(e.hasFormat(m.TEXT_EDITOR_ACTION_TYPES.Bold)),H(e.hasFormat(m.TEXT_EDITOR_ACTION_TYPES.Italic)),X(e.hasFormat(m.TEXT_EDITOR_ACTION_TYPES.Underline)))}),[]);o.useEffect((()=>r.mergeRegister(z.registerUpdateListener((({editorState:e})=>{e.read((()=>{z.isEditable()&&be()}))})))),[be,z]),o.useEffect((()=>{Y&&z.read((()=>{const e=n.$getSelection();if(n.$isRangeSelection(e)){const t=e.getTextContent();ee(t)}}))}),[Y,z]);const fe=()=>{ee(""),re(""),oe(!1),le(!1),K(!1)};return L?e.jsxs(i.StyledToolbarWrapper,{"data-role":`${q}-toolbar-wrapper`,hasHeader:T,id:`${q}-toolbar-wrapper`,size:D,children:[e.jsxs(i.StyledToolbar,{role:"toolbar","aria-label":ue.textEditor.toolbarAriaLabel(),"data-role":`${q}-toolbar`,id:`${q}-toolbar`,ref:A,onKeyDown:e=>{var t,r;if(0===B.length||!A.current)return;const n=Array.from(null===(t=A.current)||void 0===t?void 0:t.querySelectorAll("button.toolbar-button"));if(!n.length)return;const o=n.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(),G||(i=o<n.length-1?o+1:0);break;case"ArrowLeft":e.preventDefault(),G||(i=o>0?o-1:n.length-1);break;case"Home":e.preventDefault(),i=0;break;case"End":e.preventDefault(),i=n.length-1;break;default:return}n.forEach(((e,t)=>{e.tabIndex=t===i?0:-1})),i>-1&&(null===(r=n[i])||void 0===r||r.focus())},tabIndex:-1,children:[e.jsxs(e.Fragment,{children:[de&&e.jsx(f.default,{name:"typography-formatting-buttons",namespace:q,showDivider:ce||pe||xe,children:e.jsx(x.default,{contentEditorRef:k,namespace:q,isFirstButton:!0,isOpen:G,setIsOpen:J,focusedIndex:Q,setFocusedIndex:V,size:D})}),ce&&e.jsxs(f.default,{name:"text-formatting-buttons",namespace:q,showDivider:pe||xe,children:[B.includes("bold")&&e.jsx(s.default,{isActive:N,namespace:q,isFirstButton:!de,size:D}),B.includes("italic")&&e.jsx(d.default,{isActive:M,namespace:q,isFirstButton:!de&&!B.includes("bold"),size:D}),B.includes("underline")&&e.jsx(b.default,{isActive:U,namespace:q,isFirstButton:!de&&!B.includes("bold")&&!B.includes("italic"),size:D})]}),pe&&e.jsx(f.default,{name:"list-formatting-buttons",namespace:q,showDivider:xe,children:e.jsx(c.default,{namespace:q,olIsFirstButton:!de&&!ce&&!B.includes("unordered-list"),showOL:B.includes("ordered-list"),showUL:B.includes("unordered-list"),ulIsFirstButton:!de&&!ce,size:D})}),xe&&e.jsx(f.default,{name:"hyperlink-formatting-buttons",namespace:q,showDivider:!1,children:e.jsx(u.default,{namespace:q,isFirstButton:!de&&!ce&&!pe,setDialogOpen:K,size:D})})]}),e.jsx(y.Dialog,{open:Y,onCancel:()=>{fe()},title:ue.textEditor.hyperlink.dialogTitle(),"data-role":`${q}-hyperlink-dialog`,"aria-label":ue.textEditor.hyperlink.dialogTitle(),size:"medium-small",children:e.jsx(j.Form,{leftSideButtons:e.jsx(l.default,{"data-role":`${q}-hyperlink-cancel-button`,onClick:()=>{fe()},children:ue.textEditor.cancelButton()}),saveButton:e.jsx(l.default,{buttonType:"primary",type:"submit","data-role":`${q}-hyperlink-save-button`,children:ue.textEditor.saveButton()}),onSubmit:e=>{e.preventDefault();const t=!Z.trim(),r=!te.trim();var o,i;(oe(t),le(r),t||r)?t?null===(o=ae.current)||void 0===o||o.focus():null===(i=se.current)||void 0===i||i.focus():z.isEditable()&&(z.update((()=>{const e=n.$getRoot(),t=e.getChildrenSize(),r=n.$getSelection(),o=g.$createLinkNode(te);if(o.append(n.$createTextNode(Z)),0===t){const t=n.$createParagraphNode();t.append(o),e.append(t),t.selectEnd()}else if(n.$isRangeSelection(r))r.insertNodes([o]);else{const t=e.getLastChild();n.$isParagraphNode(t)&&t.append(o)}})),fe())},children:e.jsxs(v.Box,{display:"flex",flexDirection:"column",gap:"16px",children:[e.jsxs(E.Typography,{fontSize:"14px",fontWeight:"500",lineHeight:"21px",children:[e.jsx(E.Typography,{as:"span",color:"#FF0000",children:"*"})," ",null===(C=(F=ue.textEditor.hyperlink).formKey)||void 0===C?void 0:C.call(F)]}),e.jsxs(v.Box,{display:"flex",gap:"24px",flexWrap:"wrap",children:[e.jsx(v.Box,{flex:"1 1 200px",minWidth:"200px",maxWidth:"560px",children:e.jsx(h.Textbox,S(O({label:ue.textEditor.hyperlink.textFieldLabel(),name:"text",required:!0,validationMessagePositionTop:!1},ne&&{error:null===(P=(_=ue.textEditor.hyperlink).textFieldErrorMessage)||void 0===P?void 0:P.call(_)}),{"data-role":`${q}-hyperlink-text-field`,value:Z,ref:ae,onChange:e=>{ee(e.target.value),oe(!1)}}))}),e.jsx(v.Box,{flex:"1 1 200px",minWidth:"200px",maxWidth:"560px",children:e.jsx(h.Textbox,S(O({label:ue.textEditor.hyperlink.linkFieldLabel(),name:"link",required:!0,validationMessagePositionTop:!1},ie&&{error:null===(I=(R=ue.textEditor.hyperlink).linkFieldErrorMessage)||void 0===I?void 0:I.call(R)}),{"data-role":`${q}-hyperlink-link-field`,value:te,ref:se,onChange:e=>{re(e.target.value),le(!1)}}))})]})]})})})]}),e.jsxs(i.CommandButtons,{"data-role":`${q}-command-buttons`,children:[w&&e.jsx(l.default,{buttonType:"tertiary","data-role":`${q}-cancel-button`,"aria-label":ue.textEditor.cancelButtonAria(),onClick:()=>null==w?void 0:w(z),size:D,className:"command-button",children:ue.textEditor.cancelButton()}),$&&e.jsx(p.default,{namespace:q,onSave:$,size:D})]})]}):null};
|
|
@@ -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" | "
|
|
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 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./typography.component.js");exports.default=e.Typography;
|
|
@@ -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
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../../../../__internal__/utils/helpers/tags/tags.js"),t=require("../../../../style/utils/filter-styled-system-padding-props.js"),i=require("../../../../style/utils/filter-styled-system-margin-props.js"),n=require("../../../../__internal__/filter-object-properties/filter-object-properties.js"),s=require("./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}const o=["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 u,p,{variant:f="p",as:d,children:y,id:O,fluid:b=!1,inverse:g=!1,screenReaderOnly:h=!1,size:j="M",tint:v="default",weight:m="regular",role:w,"aria-hidden":P,"aria-live":_,className:x}=c,S=function(e,r){if(null==e)return{};var t,i,n=function(e,r){if(null==e)return{};var t,i,n={},s=Object.keys(e);for(i=0;i<s.length;i++)t=s[i],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)t=s[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.jsx(s.default,(u=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){a(e,r,t[r])}))}return e}({id:O,as:d||("section-heading"===f?"h2":"section-subheading"===f?"h3":o.includes(f)?f:"p"),$variant:f,$fluid:b,$inverse:g,$screenReaderOnly:h,$size:j,$tint:v,$weight:m,role:w,"aria-hidden":P,"aria-live":_,className:x},r.default("typography",S),i.default(S),t.default(S),Object.fromEntries(Object.entries(n.default(S,l)).map((([e,r])=>[`$${e}`,r])))),p=null!=(p={children:y})?p:{},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(p)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(p)).forEach((function(e){Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(p,e))})),u))};exports.ALLOWED_CSS_TEXT_OVERRIDE_KEYS=l,exports.Typography=c,exports.VARIANT_TYPES=o,exports.default=c;
|
|
@@ -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
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),o=require("../../../../style/themes/apply-base-theme.js"),s=require("../../../../style/utils/visually-hidden.js");function r(e){return e&&e.__esModule?e:{default:e}}const a={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"},i=r(e).default.span.attrs(o.default).withConfig({displayName:"typography.style__StyledTypography",componentId:"sc-6c185d6b-0"})(["",""],(({$display:o,$variant:r,$fluid:i,$inverse:n,$size:d,$tint:l,$weight:c,$whiteSpace:$,$wordBreak:u,$wordWrap:v,$textAlign:f,$textDecoration:h,$textOverflow:p,$textTransform:g,$overflow:y,$screenReaderOnly:m})=>{const b=i?"fluid":"static",w="M"===d?"m":"l",x=`var(--container-standard${n?"-inverse":""}-txt-default)`,_=`var(--container-standard${n?"-inverse":""}-txt-${l})`,q=r&&r in a,j="strong"===r||"b"===r,z="sup"===r||"sub"===r,M=`--global-font-${b}-${q?a[r]:""}`,O=`--global-font-${b}-body-medium-${w}`,k=`--global-font-${b}-body-${c}-${w}`;return e.css([""," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],!m&&"margin: unset;",t.space,m&&s.default,void 0!==o&&`display: ${o};`,void 0!==$&&`white-space: ${$};`,void 0!==u&&`word-break: ${u};`,void 0!==v&&`word-wrap: ${v};`,void 0!==f&&`text-align: ${f};`,void 0!==h&&`text-decoration: ${h};`,void 0!==p&&`text-overflow: ${p};`,void 0!==g&&`text-transform: ${g};`,void 0!==y&&`overflow: ${y};`,q&&e.css(["font:var(",");color:",";"],M,x),j&&e.css(["font:var(",");color:",";"],O,_),"sup"===r&&e.css(["font:var(",");font-size:0.75em;color:",";vertical-align:super;"],k,_),"sub"===r&&e.css(["font:var(",");font-size:0.75em;color:",";vertical-align:sub;"],k,_),!q&&!j&&!z&&e.css(["font:var(",");color:",";"],k,_))}));exports.default=i;
|
|
@@ -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
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `textOverflow` and `whiteSpace` props instead. This prop will eventually be removed.
|
|
64
|
+
* Apply truncation */
|
|
40
65
|
truncate?: boolean;
|
|
41
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
({
|
|
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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../../__internal__/filter-object-properties/filter-object-properties.js"),t=require("./__internal__/__next__/typography.component.js"),n=require("./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 s(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 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 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"},o=e=>{var r;return null!==(r=e&&l[e])&&void 0!==r?r:"p"},u=a=>{var{variant:l="p",as:u,id:c,fluid:h=!1,inverse:p=!1,size:d="M",tint:b="default",weight:g="regular",truncate:f=!1,color:y,children:O,screenReaderOnly:m=!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={},s=Object.keys(e);for(n=0;n<s.length;n++)t=s[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[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 _=(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}})(l),P=r.default(w,t.ALLOWED_CSS_TEXT_OVERRIDE_KEYS);f&&(P.overflow="hidden",P.whiteSpace="nowrap",P.textOverflow="ellipsis");const S=new Set(["white","#fff","#ffffff","rgb(255,255,255)","rgb(255, 255, 255)"]),x=p||y&&S.has(y);return e.jsx(n.default,i(s(i(s({variant:_,forwardedAs:u||o(l),id:c},P),{fluid:h,inverse:x,screenReaderOnly:m,"aria-live":j,"aria-hidden":v,size:d,tint:b,weight:g}),w),{children:O}))};u.displayName="Typography",exports.Typography=u,exports.VARIANT_TYPES=["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"],exports.default=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypographyProps } from "./typography.component";
|
|
2
|
-
declare const StyledTypography: import("styled-components").StyledComponent<"
|
|
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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),s=require("../../style/themes/apply-base-theme.js"),r=require("./__internal__/__next__/typography.component.js"),a=require("../../style/utils/visually-hidden.js");function n(e){return e&&e.__esModule?e:{default:e}}const l=n(e).default(r.Typography).attrs(s.default).withConfig({displayName:"typography.style__StyledTypography",componentId:"sc-bec9c5e6-0"})([""," ",""],(({fontSize:t,fontWeight:s,lineHeight:r,variant:n,screenReaderOnly:l})=>{const i="p"===n?"0 0 var(--global-space-comp-l)":"0";return e.css([""," "," "," margin:",";",""],t&&`font-size: ${t};`,s&&`font-weight: ${s};`,r&&`line-height: ${r};`,i,l&&a.default)}),t.space);l.displayName="Typography",exports.default=l;
|
package/lib/locales/en-gb.js
CHANGED
|
@@ -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,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:()=>"
|
|
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,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"}}};exports.default=r;
|
package/lib/locales/locale.d.ts
CHANGED
|
@@ -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;
|