carbon-react 158.30.0 → 158.31.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/box/box.component.d.ts +2 -0
- package/esm/components/box/box.component.js +1 -1
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +1 -1
- package/esm/components/flat-table/sort/sort.component.d.ts +7 -2
- package/esm/components/flat-table/sort/sort.component.js +1 -1
- package/esm/components/heading/heading.style.d.ts +1 -1
- package/esm/components/loader/__next__/loader.style.d.ts +1 -1
- package/esm/components/loader-spinner/loader-spinner.style.d.ts +1 -1
- package/esm/components/loader-star/loader-star.style.d.ts +1 -1
- package/esm/components/typography/typography.component.d.ts +5 -1
- package/esm/components/typography/typography.component.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/locale.d.ts +6 -1
- package/lib/components/box/box.component.d.ts +2 -0
- package/lib/components/box/box.component.js +1 -1
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +1 -1
- package/lib/components/flat-table/sort/sort.component.d.ts +7 -2
- package/lib/components/flat-table/sort/sort.component.js +1 -1
- package/lib/components/heading/heading.style.d.ts +1 -1
- package/lib/components/loader/__next__/loader.style.d.ts +1 -1
- package/lib/components/loader-spinner/loader-spinner.style.d.ts +1 -1
- package/lib/components/loader-star/loader-star.style.d.ts +1 -1
- package/lib/components/typography/typography.component.d.ts +5 -1
- package/lib/components/typography/typography.component.js +1 -1
- package/lib/locales/en-gb.js +1 -1
- package/lib/locales/locale.d.ts +6 -1
- package/package.json +1 -1
|
@@ -52,6 +52,8 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
|
|
|
52
52
|
opacity?: string | number;
|
|
53
53
|
/** Set the container to be hidden from screen readers */
|
|
54
54
|
"aria-hidden"?: "true" | "false";
|
|
55
|
+
/** Make the container an aria-live region */
|
|
56
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
55
57
|
/** @private @internal @ignore */
|
|
56
58
|
"data-component"?: string;
|
|
57
59
|
/** @private @internal @ignore */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import e from"react";import t from"../../style/utils/filter-styled-system-padding-props.js";import o from"../../style/utils/filter-styled-system-margin-props.js";import
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import t from"../../style/utils/filter-styled-system-padding-props.js";import o from"../../style/utils/filter-styled-system-margin-props.js";import i from"../../style/utils/filter-styled-system-layout-props.js";import n from"../../style/utils/filter-styled-system-flexbox-props.js";import a from"../../style/utils/filter-styled-system-grid-props.js";import l from"./box.style.js";import s from"../../__internal__/utils/helpers/tags/tags.js";function p(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}const c=e.forwardRef(((e,c)=>{var{"data-component":d,tabIndex:f,as:b,id:y,role:u,overflowWrap:m,scrollVariant:g,boxSizing:O,gap:h,columnGap:j,rowGap:w,className:x,children:v,bg:P,backgroundColor:S,boxShadow:k,borderRadius:G,color:$,opacity:D,height:I,width:N,hidden:R,"aria-hidden":_,"aria-live":z}=e,C=function(r,e){if(null==r)return{};var t,o,i=function(r,e){if(null==r)return{};var t,o,i={},n=Object.keys(r);for(o=0;o<n.length;o++)t=n[o],e.indexOf(t)>=0||(i[t]=r[t]);return i}(r,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);for(o=0;o<n.length;o++)t=n[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}(e,["data-component","tabIndex","as","id","role","overflowWrap","scrollVariant","boxSizing","gap","columnGap","rowGap","className","children","bg","backgroundColor","boxShadow","borderRadius","color","opacity","height","width","hidden","aria-hidden","aria-live"]);let E="";"number"==typeof N?E=N<=1?`${(100*N).toFixed(0)}%`:`${N}px`:"string"==typeof N&&(E=N);let V="";"number"==typeof I?V=I<=1?`${(100*I).toFixed(0)}%`:`${I}px`:"string"==typeof I&&(V=I);const W={color:$,opacity:D,width:E,height:V};return r(l,(F=function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})))),o.forEach((function(e){p(r,e,t[e])}))}return r}({as:b,id:y,role:u,overflowWrap:m,scrollVariant:g,boxSizing:O,gap:h,columnGap:j,rowGap:w,className:x,ref:c,bg:P,backgroundColor:S,boxShadow:k,$borderRadius:G,"aria-hidden":_,hidden:R,"aria-live":z},s(d,C),o(C),t(C),n(C),a(C),i(C)),B=null!=(B={cssProps:W,tabIndex:f,children:v})?B:{},Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(B)):function(r){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e.push.apply(e,t)}return e}(Object(B)).forEach((function(r){Object.defineProperty(F,r,Object.getOwnPropertyDescriptor(B,r))})),F));var F,B}));c.displayName="Box";export{c as Box,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import r from"./flat-table-header.style.js";import{useStrictFlatTableContext as n}from"../__internal__/strict-flat-table.context.js";import o from"../../../__internal__/utils/helpers/guid/index.js";import l from"../__internal__/use-table-cell.js";function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(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){a(e,t,r[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const p=a=>{var{align:p="left",children:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import r from"./flat-table-header.style.js";import{useStrictFlatTableContext as n}from"../__internal__/strict-flat-table.context.js";import o from"../../../__internal__/utils/helpers/guid/index.js";import l from"../__internal__/use-table-cell.js";function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(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){a(e,t,r[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const p=a=>{var{align:p="left",children:s,colspan:u,rowspan:f,width:d,py:b,px:m,id:y,"data-element":O,"data-role":j}=a,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(a,["align","children","colspan","rowspan","width","py","px","id","data-element","data-role"]);const g=t(null),P=t(y||o()),{colorTheme:v}=n(),{leftPosition:w,rightPosition:S,makeCellSticky:_}=l(P.current);return e(r,c(i(c(i({ref:g,leftPosition:w,rightPosition:S,makeCellSticky:_,className:_?"isSticky":void 0,align:p,colorTheme:v},void 0!==u&&{colSpan:Number(u)},void 0!==f&&{rowSpan:Number(f)}),{colWidth:d,py:b,px:m}),h),{"data-component":"flat-table-header","data-element":O||"flat-table-header","data-role":j,id:P.current,"aria-sort":(()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.querySelector("[data-component='sort']");if(t)return t.getAttribute("data-sort-type")})(),children:e("div",{"data-role":"flat-table-header-content",children:s})}))};p.displayName="FlatTableHeader";export{p as FlatTableHeader,p as default};
|
|
@@ -7,8 +7,13 @@ export interface SortProps extends TagProps {
|
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
/** Sets the text content of the component */
|
|
9
9
|
children?: string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Sets the accessible name of the component
|
|
12
|
+
* @deprecated this prop has been deprecated in favour of using `aria-live` regions
|
|
13
|
+
* */
|
|
11
14
|
accessibleName?: string;
|
|
15
|
+
/** Sets the aria-roledescription of the component */
|
|
16
|
+
"aria-roledescription"?: string;
|
|
12
17
|
}
|
|
13
|
-
export declare const Sort: ({ children, onClick, sortType, accessibleName, "data-element": dataElement, "data-role": dataRole, }: SortProps) => React.JSX.Element;
|
|
18
|
+
export declare const Sort: ({ children, onClick, sortType, accessibleName, "data-element": dataElement, "data-role": dataRole, "aria-roledescription": ariaRoleDescription, }: SortProps) => React.JSX.Element;
|
|
14
19
|
export default Sort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{useStrictFlatTableContext as t}from"../__internal__/strict-flat-table.context.js";import n from"../../../__internal__/utils/helpers/events/events.js";import a from"../../../__internal__/utils/helpers/guid/index.js";import i from"../../../hooks/__internal__/useLocale/useLocale.js";import s from"../../icon/icon.component.js";import l from"./sort.style.js";import c from"../../../__internal__/utils/logger/index.js";let d=!1;const p=({children:p,onClick:m,sortType:_,accessibleName:u,"data-element":f,"data-role":h,"aria-roledescription":v})=>{var g,j;u&&!d&&(c.deprecate("The `accessibleName` prop has been deprecated in favour of using `aria-live` regions. Please use an `aria-live` region to announce changes in sort order to assistive technologies."),d=!0);const y=r(a()),b=i(),{colorTheme:x}=t();return e(l,{"aria-describedby":y.current,colorTheme:x,"data-component":"sort","data-element":f,"data-role":h,onClick:m,onKeyDown:e=>n.isEnterOrSpaceKey(e)?(e.preventDefault(),null==m?void 0:m()):null,"data-sort-type":_||"none","aria-roledescription":v||(null===(j=b.sort)||void 0===j||null===(g=j.ariaRoleDescription)||void 0===g?void 0:g.call(j)),children:[o("span",{children:p}),_?o(s,{"aria-hidden":!0,"data-element":"sort-icon",type:"ascending"===_?"sort_up":"sort_down"}):o("span",{"data-role":"sort-placeholder"})]})};export{p as Sort,p as default};
|
|
@@ -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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
17
17
|
displayName: string;
|
|
18
18
|
}, any, StyledHeadingTitleProps, never>;
|
|
19
19
|
declare const StyledHeadingPills: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -35,7 +35,7 @@ type LabelProps = {
|
|
|
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-hidden": ariaHidden, className, ...rest }: import("../../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
39
39
|
displayName: string;
|
|
40
40
|
}, any, LabelProps, never>;
|
|
41
41
|
type RingLoaderWrapperProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
5
5
|
displayName: string;
|
|
6
6
|
}, any, Required<Pick<LoaderSpinnerProps, "size">>, never>;
|
|
7
7
|
interface StyledSpinnerCircleSvgProps extends Omit<LoaderSpinnerProps, "showSpinnerLabel"> {
|
|
@@ -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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
5
5
|
displayName: string;
|
|
6
6
|
}, any, {}, never>;
|
|
7
7
|
export declare const StyledStars: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -55,6 +55,10 @@ export interface TypographyProps extends SpaceProps, TagProps {
|
|
|
55
55
|
* Override the default color of the rendered element to match disabled styling
|
|
56
56
|
* */
|
|
57
57
|
isDisabled?: boolean;
|
|
58
|
+
/** Make the element an aria-live region */
|
|
59
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
60
|
+
/** Set the role of the element when it is a live region */
|
|
61
|
+
role?: "status" | "alert";
|
|
58
62
|
/** @private @ignore Set whether the component should be recognised by assistive technologies */
|
|
59
63
|
"aria-hidden"?: "true" | "false";
|
|
60
64
|
/**
|
|
@@ -67,7 +71,7 @@ export interface TypographyProps extends SpaceProps, TagProps {
|
|
|
67
71
|
"data-component"?: string;
|
|
68
72
|
}
|
|
69
73
|
export declare const Typography: {
|
|
70
|
-
({ "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-hidden": ariaHidden, className, ...rest }: TypographyProps): React.JSX.Element;
|
|
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;
|
|
71
75
|
displayName: string;
|
|
72
76
|
};
|
|
73
77
|
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
|
|
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};
|
package/esm/locales/en-gb.js
CHANGED
|
@@ -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."}
|
|
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};
|
package/esm/locales/locale.d.ts
CHANGED
|
@@ -187,7 +187,12 @@ interface Locale {
|
|
|
187
187
|
};
|
|
188
188
|
};
|
|
189
189
|
sort: {
|
|
190
|
-
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated The `sort.accessibleName` locale string is deprecated in favour of using `aria-live` regions.
|
|
192
|
+
* Use an `aria-live` region to announce changes in sort order to assistive technologies.
|
|
193
|
+
*/
|
|
194
|
+
accessibleName?: (sortContent?: string, sortType?: "ascending" | "descending") => string;
|
|
195
|
+
ariaRoleDescription?: () => string;
|
|
191
196
|
};
|
|
192
197
|
splitButton: {
|
|
193
198
|
ariaLabel: () => string;
|
|
@@ -52,6 +52,8 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
|
|
|
52
52
|
opacity?: string | number;
|
|
53
53
|
/** Set the container to be hidden from screen readers */
|
|
54
54
|
"aria-hidden"?: "true" | "false";
|
|
55
|
+
/** Make the container an aria-live region */
|
|
56
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
55
57
|
/** @private @internal @ignore */
|
|
56
58
|
"data-component"?: string;
|
|
57
59
|
/** @private @internal @ignore */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../style/utils/filter-styled-system-padding-props.js"),o=require("../../style/utils/filter-styled-system-margin-props.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../style/utils/filter-styled-system-padding-props.js"),o=require("../../style/utils/filter-styled-system-margin-props.js"),i=require("../../style/utils/filter-styled-system-layout-props.js"),a=require("../../style/utils/filter-styled-system-flexbox-props.js"),l=require("../../style/utils/filter-styled-system-grid-props.js"),n=require("./box.style.js"),s=require("../../__internal__/utils/helpers/tags/tags.js");function u(e){return e&&e.__esModule?e:{default:e}}function c(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=u(r).default.forwardRef(((r,u)=>{var{"data-component":d,tabIndex:p,as:f,id:b,role:y,overflowWrap:g,scrollVariant:O,boxSizing:h,gap:j,columnGap:m,rowGap:x,className:w,children:v,bg:P,backgroundColor:S,boxShadow:q,borderRadius:_,color:k,opacity:G,height:$,width:D,hidden:I,"aria-hidden":N,"aria-live":R}=r,z=function(e,r){if(null==e)return{};var t,o,i=function(e,r){if(null==e)return{};var t,o,i={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(r,["data-component","tabIndex","as","id","role","overflowWrap","scrollVariant","boxSizing","gap","columnGap","rowGap","className","children","bg","backgroundColor","boxShadow","borderRadius","color","opacity","height","width","hidden","aria-hidden","aria-live"]);let C="";"number"==typeof D?C=D<=1?`${(100*D).toFixed(0)}%`:`${D}px`:"string"==typeof D&&(C=D);let E="";"number"==typeof $?E=$<=1?`${(100*$).toFixed(0)}%`:`${$}px`:"string"==typeof $&&(E=$);const V={color:k,opacity:G,width:C,height:E};return e.jsx(n.default,(W=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){c(e,r,t[r])}))}return e}({as:f,id:b,role:y,overflowWrap:g,scrollVariant:O,boxSizing:h,gap:j,columnGap:m,rowGap:x,className:w,ref:u,bg:P,backgroundColor:S,boxShadow:q,$borderRadius:_,"aria-hidden":N,hidden:I,"aria-live":R},s.default(d,z),o.default(z),t.default(z),a.default(z),l.default(z),i.default(z)),B=null!=(B={cssProps:V,tabIndex:p,children:v})?B:{},Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(B)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(B)).forEach((function(e){Object.defineProperty(W,e,Object.getOwnPropertyDescriptor(B,e))})),W));var W,B}));d.displayName="Box",exports.Box=d,exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./flat-table-header.style.js"),n=require("../__internal__/strict-flat-table.context.js"),l=require("../../../__internal__/utils/helpers/guid/index.js"),a=require("../__internal__/use-table-cell.js");function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const u=o=>{var{align:u="left",children:s,colspan:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./flat-table-header.style.js"),n=require("../__internal__/strict-flat-table.context.js"),l=require("../../../__internal__/utils/helpers/guid/index.js"),a=require("../__internal__/use-table-cell.js");function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const u=o=>{var{align:u="left",children:s,colspan:d,rowspan:p,width:f,py:b,px:y,id:O,"data-element":j,"data-role":m}=o,h=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(o,["align","children","colspan","rowspan","width","py","px","id","data-element","data-role"]);const g=t.useRef(null),v=t.useRef(O||l.default()),{colorTheme:P}=n.useStrictFlatTableContext(),{leftPosition:w,rightPosition:x,makeCellSticky:_}=a.default(v.current);return e.jsx(r.default,c(i(c(i({ref:g,leftPosition:w,rightPosition:x,makeCellSticky:_,className:_?"isSticky":void 0,align:u,colorTheme:P},void 0!==d&&{colSpan:Number(d)},void 0!==p&&{rowSpan:Number(p)}),{colWidth:f,py:b,px:y}),h),{"data-component":"flat-table-header","data-element":j||"flat-table-header","data-role":m,id:v.current,"aria-sort":(()=>{var e;const t=null===(e=g.current)||void 0===e?void 0:e.querySelector("[data-component='sort']");if(t)return t.getAttribute("data-sort-type")})(),children:e.jsx("div",{"data-role":"flat-table-header-content",children:s})}))};u.displayName="FlatTableHeader",exports.FlatTableHeader=u,exports.default=u;
|
|
@@ -7,8 +7,13 @@ export interface SortProps extends TagProps {
|
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
/** Sets the text content of the component */
|
|
9
9
|
children?: string;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Sets the accessible name of the component
|
|
12
|
+
* @deprecated this prop has been deprecated in favour of using `aria-live` regions
|
|
13
|
+
* */
|
|
11
14
|
accessibleName?: string;
|
|
15
|
+
/** Sets the aria-roledescription of the component */
|
|
16
|
+
"aria-roledescription"?: string;
|
|
12
17
|
}
|
|
13
|
-
export declare const Sort: ({ children, onClick, sortType, accessibleName, "data-element": dataElement, "data-role": dataRole, }: SortProps) => React.JSX.Element;
|
|
18
|
+
export declare const Sort: ({ children, onClick, sortType, accessibleName, "data-element": dataElement, "data-role": dataRole, "aria-roledescription": ariaRoleDescription, }: SortProps) => React.JSX.Element;
|
|
14
19
|
export default Sort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../__internal__/strict-flat-table.context.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../__internal__/strict-flat-table.context.js"),a=require("../../../__internal__/utils/helpers/events/events.js"),n=require("../../../__internal__/utils/helpers/guid/index.js"),o=require("../../../hooks/__internal__/useLocale/useLocale.js"),s=require("../../icon/icon.component.js"),i=require("./sort.style.js"),l=require("../../../__internal__/utils/logger/index.js");let c=!1;const d=({children:d,onClick:u,sortType:p,accessibleName:_,"data-element":h,"data-role":v,"aria-roledescription":f})=>{var j,x;_&&!c&&(l.default.deprecate("The `accessibleName` prop has been deprecated in favour of using `aria-live` regions. Please use an `aria-live` region to announce changes in sort order to assistive technologies."),c=!0);const m=r.useRef(n.default()),g=o.default(),{colorTheme:q}=t.useStrictFlatTableContext();return e.jsxs(i.default,{"aria-describedby":m.current,colorTheme:q,"data-component":"sort","data-element":h,"data-role":v,onClick:u,onKeyDown:e=>a.default.isEnterOrSpaceKey(e)?(e.preventDefault(),null==u?void 0:u()):null,"data-sort-type":p||"none","aria-roledescription":f||(null===(x=g.sort)||void 0===x||null===(j=x.ariaRoleDescription)||void 0===j?void 0:j.call(x)),children:[e.jsx("span",{children:d}),p?e.jsx(s.default,{"aria-hidden":!0,"data-element":"sort-icon",type:"ascending"===p?"sort_up":"sort_down"}):e.jsx("span",{"data-role":"sort-placeholder"})]})};exports.Sort=d,exports.default=d;
|
|
@@ -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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
17
17
|
displayName: string;
|
|
18
18
|
}, any, StyledHeadingTitleProps, never>;
|
|
19
19
|
declare const StyledHeadingPills: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -35,7 +35,7 @@ type LabelProps = {
|
|
|
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-hidden": ariaHidden, className, ...rest }: import("../../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
39
39
|
displayName: string;
|
|
40
40
|
}, any, LabelProps, never>;
|
|
41
41
|
type RingLoaderWrapperProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
5
5
|
displayName: string;
|
|
6
6
|
}, any, Required<Pick<LoaderSpinnerProps, "size">>, never>;
|
|
7
7
|
interface StyledSpinnerCircleSvgProps extends Omit<LoaderSpinnerProps, "showSpinnerLabel"> {
|
|
@@ -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-hidden": ariaHidden, className, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
|
|
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;
|
|
5
5
|
displayName: string;
|
|
6
6
|
}, any, {}, never>;
|
|
7
7
|
export declare const StyledStars: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -55,6 +55,10 @@ export interface TypographyProps extends SpaceProps, TagProps {
|
|
|
55
55
|
* Override the default color of the rendered element to match disabled styling
|
|
56
56
|
* */
|
|
57
57
|
isDisabled?: boolean;
|
|
58
|
+
/** Make the element an aria-live region */
|
|
59
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
60
|
+
/** Set the role of the element when it is a live region */
|
|
61
|
+
role?: "status" | "alert";
|
|
58
62
|
/** @private @ignore Set whether the component should be recognised by assistive technologies */
|
|
59
63
|
"aria-hidden"?: "true" | "false";
|
|
60
64
|
/**
|
|
@@ -67,7 +71,7 @@ export interface TypographyProps extends SpaceProps, TagProps {
|
|
|
67
71
|
"data-component"?: string;
|
|
68
72
|
}
|
|
69
73
|
export declare const Typography: {
|
|
70
|
-
({ "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-hidden": ariaHidden, className, ...rest }: TypographyProps): React.JSX.Element;
|
|
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;
|
|
71
75
|
displayName: string;
|
|
72
76
|
};
|
|
73
77
|
export default Typography;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("../../__internal__/utils/helpers/tags/tags.js"),r=require("../../style/utils/filter-styled-system-padding-props.js"),a=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("./typography.style.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("../../__internal__/utils/helpers/tags/tags.js"),r=require("../../style/utils/filter-styled-system-padding-props.js"),a=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("./typography.style.js");function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=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}},l=l=>{var s,c,{"data-component":p,variant:u="p",as:d,id:y,fontSize:g,fontWeight:b,textTransform:f,lineHeight:h,textDecoration:O,display:m,listStyleType:j,whiteSpace:w,wordBreak:v,wordWrap:x,textAlign:S,textOverflow:P,truncate:k,color:D="blackOpacity90",backgroundColor:T,bg:_,opacity:q,children:W,screenReaderOnly:A,isDisabled:N,"aria-live":E,role:R,"aria-hidden":z,className:B}=l,C=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(l,["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.jsx(n.default,(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){i(e,t,r[t])}))}return e}({variant:u,as:d||o(u),id:y,fontSize:g,fontWeight:b,textTransform:f,lineHeight:h,textDecoration:O,display:m,listStyleType:j,whiteSpace:w,wordWrap:x,wordBreak:v,textAlign:S,textOverflow:P,truncate:k,color:D,backgroundColor:T,bg:_,opacity:q,screenReaderOnly:A,isDisabled:N,"aria-hidden":z,className:B,role:R,"aria-live":E},t.default(p,C),a.default(C),r.default(C)),c=null!=(c={children:W})?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))};l.displayName="Typography",exports.Typography=l,exports.VARIANT_TYPES=["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"],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:()=>"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."}
|
|
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:()=>"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"}}};exports.default=r;
|
package/lib/locales/locale.d.ts
CHANGED
|
@@ -187,7 +187,12 @@ interface Locale {
|
|
|
187
187
|
};
|
|
188
188
|
};
|
|
189
189
|
sort: {
|
|
190
|
-
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated The `sort.accessibleName` locale string is deprecated in favour of using `aria-live` regions.
|
|
192
|
+
* Use an `aria-live` region to announce changes in sort order to assistive technologies.
|
|
193
|
+
*/
|
|
194
|
+
accessibleName?: (sortContent?: string, sortType?: "ascending" | "descending") => string;
|
|
195
|
+
ariaRoleDescription?: () => string;
|
|
191
196
|
};
|
|
192
197
|
splitButton: {
|
|
193
198
|
ariaLabel: () => string;
|