carbon-react 158.28.0 → 158.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/esm/__internal__/form-field/form-field.component.js +1 -1
  2. package/esm/components/icon/fonts/carbon-icons-webfont.woff +0 -0
  3. package/esm/components/icon/fonts/carbon-icons-webfont.woff2 +0 -0
  4. package/esm/components/icon/icon-config.js +1 -1
  5. package/esm/components/icon/icon-type.d.ts +1 -1
  6. package/esm/components/icon/icon-unicodes.d.ts +3 -0
  7. package/esm/components/icon/icon-unicodes.js +1 -1
  8. package/esm/components/tabs/__next__/tabs.component.d.ts +1 -1
  9. package/esm/components/tabs/__next__/tabs.component.js +1 -1
  10. package/esm/components/tabs/__next__/tabs.context.js +1 -1
  11. package/esm/components/tabs/__next__/tabs.style.d.ts +11 -8
  12. package/esm/components/tabs/__next__/tabs.style.js +1 -1
  13. package/esm/components/tabs/__next__/tabs.types.d.ts +12 -0
  14. package/esm/components/tabs/index.d.ts +2 -1
  15. package/esm/components/tabs/tab/tab.component.d.ts +62 -17
  16. package/esm/components/tabs/tab/tab.component.js +1 -1
  17. package/esm/components/tabs/tabs.component.d.ts +16 -11
  18. package/esm/components/tabs/tabs.component.js +1 -1
  19. package/esm/index.js +1 -1
  20. package/esm/locales/en-gb.js +1 -1
  21. package/esm/locales/locale.d.ts +2 -0
  22. package/esm/style/assets/carbon-icons-webfont.woff +0 -0
  23. package/esm/style/assets/carbon-icons-webfont.woff2 +0 -0
  24. package/lib/__internal__/form-field/form-field.component.js +1 -1
  25. package/lib/components/icon/fonts/carbon-icons-webfont.woff +0 -0
  26. package/lib/components/icon/fonts/carbon-icons-webfont.woff2 +0 -0
  27. package/lib/components/icon/icon-config.js +1 -1
  28. package/lib/components/icon/icon-type.d.ts +1 -1
  29. package/lib/components/icon/icon-unicodes.d.ts +3 -0
  30. package/lib/components/icon/icon-unicodes.js +1 -1
  31. package/lib/components/tabs/__next__/tabs.component.d.ts +1 -1
  32. package/lib/components/tabs/__next__/tabs.component.js +1 -1
  33. package/lib/components/tabs/__next__/tabs.context.js +1 -1
  34. package/lib/components/tabs/__next__/tabs.style.d.ts +11 -8
  35. package/lib/components/tabs/__next__/tabs.style.js +1 -1
  36. package/lib/components/tabs/__next__/tabs.types.d.ts +12 -0
  37. package/lib/components/tabs/index.d.ts +2 -1
  38. package/lib/components/tabs/tab/tab.component.d.ts +62 -17
  39. package/lib/components/tabs/tab/tab.component.js +1 -1
  40. package/lib/components/tabs/tabs.component.d.ts +16 -11
  41. package/lib/components/tabs/tabs.component.js +1 -1
  42. package/lib/index.js +1 -1
  43. package/lib/locales/en-gb.js +1 -1
  44. package/lib/locales/locale.d.ts +2 -0
  45. package/lib/style/assets/carbon-icons-webfont.woff +0 -0
  46. package/lib/style/assets/carbon-icons-webfont.woff2 +0 -0
  47. package/package.json +1 -1
  48. package/esm/components/tabs/__internal__/tab-title/index.d.ts +0 -2
  49. package/esm/components/tabs/__internal__/tab-title/index.js +0 -1
  50. package/esm/components/tabs/__internal__/tab-title/tab-title.component.d.ts +0 -34
  51. package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +0 -1
  52. package/esm/components/tabs/__internal__/tab-title/tab-title.context.d.ts +0 -6
  53. package/esm/components/tabs/__internal__/tab-title/tab-title.context.js +0 -1
  54. package/esm/components/tabs/__internal__/tab-title/tab-title.style.d.ts +0 -27
  55. package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +0 -1
  56. package/esm/components/tabs/__internal__/tabs-header/index.d.ts +0 -2
  57. package/esm/components/tabs/__internal__/tabs-header/index.js +0 -1
  58. package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +0 -13
  59. package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.js +0 -1
  60. package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +0 -30
  61. package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +0 -1
  62. package/esm/components/tabs/tab/__internal__/tab.context.d.ts +0 -8
  63. package/esm/components/tabs/tab/__internal__/tab.context.js +0 -1
  64. package/esm/components/tabs/tab/tab.style.d.ts +0 -11
  65. package/esm/components/tabs/tab/tab.style.js +0 -1
  66. package/esm/components/tabs/tabs.style.d.ts +0 -8
  67. package/esm/components/tabs/tabs.style.js +0 -1
  68. package/lib/components/tabs/__internal__/tab-title/index.d.ts +0 -2
  69. package/lib/components/tabs/__internal__/tab-title/index.js +0 -1
  70. package/lib/components/tabs/__internal__/tab-title/package.json +0 -6
  71. package/lib/components/tabs/__internal__/tab-title/tab-title.component.d.ts +0 -34
  72. package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +0 -1
  73. package/lib/components/tabs/__internal__/tab-title/tab-title.context.d.ts +0 -6
  74. package/lib/components/tabs/__internal__/tab-title/tab-title.context.js +0 -1
  75. package/lib/components/tabs/__internal__/tab-title/tab-title.style.d.ts +0 -27
  76. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +0 -1
  77. package/lib/components/tabs/__internal__/tabs-header/index.d.ts +0 -2
  78. package/lib/components/tabs/__internal__/tabs-header/index.js +0 -1
  79. package/lib/components/tabs/__internal__/tabs-header/package.json +0 -6
  80. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +0 -13
  81. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +0 -1
  82. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +0 -30
  83. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +0 -1
  84. package/lib/components/tabs/tab/__internal__/tab.context.d.ts +0 -8
  85. package/lib/components/tabs/tab/__internal__/tab.context.js +0 -1
  86. package/lib/components/tabs/tab/tab.style.d.ts +0 -11
  87. package/lib/components/tabs/tab/tab.style.js +0 -1
  88. package/lib/components/tabs/tabs.style.d.ts +0 -8
  89. package/lib/components/tabs/tabs.style.js +0 -1
@@ -1,32 +1,72 @@
1
1
  import React from "react";
2
2
  import { PaddingProps } from "styled-system";
3
3
  import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
4
- export interface TabProps extends PaddingProps, TagProps {
4
+ import type { TabProps as NextTabProps } from "../__next__";
5
+ export type TabsHandle = {
6
+ /** Programmatically focus on a specific tab.
7
+ * @param tabId - The ID of the tab to focus. Must match the `tabId` prop of the target `Tab` component.
8
+ */
9
+ focusTab: (tabId: string) => void;
10
+ } | null;
11
+ export interface TabProps extends PaddingProps, TagProps, Partial<NextTabProps> {
12
+ /**
13
+ * The title of the Tab.
14
+ * @deprecated Support will be removed in a future release, it is recommended to use `label` prop instead.
15
+ */
5
16
  title?: string;
6
- /** A unique ID to identify this specific tab. */
7
- tabId: string;
17
+ /**
18
+ * A unique ID to identify this specific tab.
19
+ * @deprecated Support will be removed in a future release, it is recommended to use `id` instead.
20
+ * */
21
+ tabId?: string;
8
22
  /** The child elements of Tab component. */
9
23
  children?: React.ReactNode;
10
24
  /** @ignore @private Boolean indicating selected state of Tab. */
11
25
  isTabSelected?: boolean;
12
- /** The position of the Tab. */
26
+ /**
27
+ * The position of the Tab.
28
+ * @deprecated Support will be removed in a future release.
29
+ * */
13
30
  position?: "top" | "left";
14
- /** Message displayed when Tab has error */
31
+ /**
32
+ * @deprecated
33
+ * Message displayed when Tab has error
34
+ * The legacy validation pattern is being removed in a future release.
35
+ * */
15
36
  errorMessage?: string;
16
- /** Message displayed when Tab has warning */
37
+ /**
38
+ * @deprecated
39
+ * Message displayed when Tab has warning
40
+ * The legacy validation pattern is being removed in a future release.
41
+ * */
17
42
  warningMessage?: string;
18
- /** Message displayed when Tab has warning */
43
+ /**
44
+ * @deprecated
45
+ * Message displayed when Tab has info
46
+ * The legacy validation pattern is being removed in a future release.
47
+ * */
19
48
  infoMessage?: string;
20
- /** Additional content to display with title */
49
+ /**
50
+ * Additional content to display with title
51
+ * @deprecated Support for siblings will be removed in a future release.
52
+ * It is recommended to use `label` prop to compose what you want.
53
+ * */
21
54
  siblings?: React.ReactNode;
22
- /** Position title before or after siblings */
55
+ /**
56
+ * Position title before or after siblings
57
+ * @deprecated Support for titlePosition will be removed in a future release.
58
+ * It is recommended to use `label` prop to compose what you want.
59
+ * */
23
60
  titlePosition?: "before" | "after";
24
61
  /**
25
62
  * Allows Tab to be a link
26
63
  * @deprecated Using tabs as links is inaccessible; this prop will be deprecated in a future release.
27
64
  * */
28
65
  href?: string;
29
- /** Overrides default layout with a one defined in this prop */
66
+ /**
67
+ * Overrides default layout with a one defined in this prop
68
+ * @deprecated Support for customLayout will be removed in a future release, it is recommended to use the `label` prop instead.
69
+ * */
30
70
  customLayout?: React.ReactNode;
31
71
  /** Additional props to be passed to the Tab's corresponding title. */
32
72
  titleProps?: {
@@ -37,12 +77,17 @@ export interface TabProps extends PaddingProps, TagProps {
37
77
  role?: string;
38
78
  /** @private @ignore */
39
79
  ariaLabelledby?: string;
40
- /** @private @ignore */
41
- updateErrors?: (id: string, errors: Record<string, undefined | string | boolean>) => void;
42
- /** @private @ignore */
43
- updateWarnings?: (id: string, warnings: Record<string, undefined | string | boolean>) => void;
44
- /** @private @ignore */
45
- updateInfos?: (id: string, infos: Record<string, undefined | string | boolean>) => void;
80
+ /** @private @ignore @internal */
81
+ validationStatusOverride?: {
82
+ error?: boolean;
83
+ warning?: boolean;
84
+ info?: boolean;
85
+ };
86
+ /** @private @ignore @internal */
87
+ headerWidth?: string;
46
88
  }
47
- export declare const Tab: ({ ariaLabelledby, children, isTabSelected, position, role, tabId, updateErrors, updateWarnings, updateInfos, href, title, titleProps, ...rest }: TabProps) => React.JSX.Element;
89
+ export declare const Tab: {
90
+ ({ tabId, title, customLayout, siblings, titlePosition, validationStatusOverride, errorMessage, warningMessage, infoMessage, titleProps, controls, id, label, error, warning, info, ...rest }: TabProps): React.JSX.Element | null;
91
+ displayName: string;
92
+ };
48
93
  export default Tab;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./tab.style.js"),n=require("../../../__internal__/utils/helpers/tags/tags.js"),a=require("./__internal__/tab.context.js"),o=require("../../../__internal__/utils/logger/index.js");function l(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){l(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}let u=!1;const c=l=>{var{ariaLabelledby:c,children:b,isTabSelected:p,position:f="top",role:d="tabpanel",tabId:O,updateErrors:y,updateWarnings:j,updateInfos:g,href:P,title:h,titleProps:v}=l,_=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(l,["ariaLabelledby","children","isTabSelected","position","role","tabId","updateErrors","updateWarnings","updateInfos","href","title","titleProps"]);void 0===P||u||(o.default.deprecate("The `href` prop is deprecated in the `Tab` component and will be removed in a future release."),u=!0);const[m,w]=t.useState({}),[S,x]=t.useState({}),[E,T]=t.useState({}),k=t.useCallback(((e,t)=>{w((r=>r[e]!==t?s(i({},r),{[e]:t}):r))}),[]),q=t.useCallback(((e,t)=>{x((r=>r[e]!==t?s(i({},r),{[e]:t}):r))}),[]),I=t.useCallback(((e,t)=>{T((r=>r[e]!==t?s(i({},r),{[e]:t}):r))}),[]);return t.useEffect((()=>{y&&y(O,m)}),[O,m,y]),t.useEffect((()=>{j&&j(O,S)}),[O,S,j]),t.useEffect((()=>{g&&g(O,E)}),[O,E,g]),e.jsx(a.TabContext.Provider,{value:{setError:k,setWarning:q,setInfo:I},children:e.jsx(r.default,s(i({role:d,isTabSelected:p,"aria-labelledby":c,position:f},_,n.default("tab",_)),{children:!P&&b}))})};exports.Tab=c,exports.default=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("../__next__/tabs.component.js"),t=require("../../../__internal__/utils/logger/index.js");function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}let o=!1;const i=i=>{var{tabId:a,title:l,customLayout:s,siblings:u,titlePosition:c,validationStatusOverride:f,errorMessage:b,warningMessage:g,infoMessage:d,titleProps:p,controls:y,id:O,label:m,error:v,warning:j,info:w}=i,x=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(i,["tabId","title","customLayout","siblings","titlePosition","validationStatusOverride","errorMessage","warningMessage","infoMessage","titleProps","controls","id","label","error","warning","info"]);o||(t.default.warn("Warning: This version of the `Tab` component is intended to help migration to the `next` version and will be removed in a future release."),o=!0);let h="";if(m)h=m;else if(s)h=s;else if(h=l,u){const r=e.jsx("span",{children:m||l});h="after"===c?e.jsxs(e.Fragment,{children:[u,r]}):e.jsxs(e.Fragment,{children:[r,u]})}const{error:P,warning:_,info:M}=f||{},S=O||a;return S?e.jsx(r.Tab,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){n(e,r,t[r])}))}return e}({id:S,controls:y||`${S}-panel`,label:h,error:v||P,warning:j||_,info:w||M,hasCustomLayout:!!s,"data-role":null==p?void 0:p["data-role"]},x)):null};i.displayName="Tab",exports.Tab=i,exports.default=i;
@@ -1,16 +1,17 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
- import Tab from "./tab";
4
3
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
5
4
  export type TabsHandle = {
6
- /**
7
- * Programmatically focus on a specific tab.
5
+ /** Programmatically focus on a specific tab.
8
6
  * @param tabId - The ID of the tab to focus. Must match the `tabId` prop of the target `Tab` component.
9
7
  */
10
8
  focusTab: (tabId: string) => void;
11
9
  } | null;
12
10
  export interface TabsProps extends MarginProps, TagProps {
13
- /** Prevent rendering of hidden tabs, by default this is set to true and therefore all tabs will be rendered */
11
+ /**
12
+ * Prevent rendering of hidden tabs, by default this is set to true and therefore all tabs will be rendered
13
+ * @deprecated Support for this prop will be removed in a future release. All tabs will be rendered by default.
14
+ * */
14
15
  renderHiddenTabs?: boolean;
15
16
  /** Allows manual control over the currently selected tab. */
16
17
  selectedTabId?: string;
@@ -18,7 +19,7 @@ export interface TabsProps extends MarginProps, TagProps {
18
19
  children: React.ReactNode;
19
20
  /**
20
21
  * Sets the alignment of the tab titles. Possible values include.
21
- * @deprecated In a future release, support for right-aligned tab content will be removed.
22
+ * @deprecated Support for right-aligned tab content has been removed.
22
23
  */
23
24
  align?: "left" | "right";
24
25
  /** A callback for when a tab is changed. You can use this to manually control
@@ -33,18 +34,22 @@ export interface TabsProps extends MarginProps, TagProps {
33
34
  size?: "default" | "large";
34
35
  /**
35
36
  * Sets the divider of the tab titles header to extend the full width of the parent.
36
- * @deprecated This prop will be deprecated in a future release
37
+ * @deprecated Support for extended lines in tab headers has been removed.
37
38
  * */
38
39
  extendedLine?: boolean;
39
40
  /**
40
41
  * Adds a combination of borders to the tab titles.
41
- * @deprecated This prop will be deprecated in a future release
42
+ * @deprecated Support for configurable borders on tab titles has been removed.
42
43
  * */
43
44
  borders?: "off" | "on" | "no left side" | "no right side" | "no sides";
44
- /** Adds an alternate styling variant to the tab titles. */
45
+ /**
46
+ * Adds an alternate styling variant to the tab titles.
47
+ * @deprecated Support for alternate styling variants on tab titles has been removed.
48
+ */
45
49
  variant?: "default" | "alternate";
46
50
  /** sets width to the tab headers. Can be any valid CSS string.
47
51
  * The headerWidth prop works only for `position="left"`
52
+ * @deprecated Support will be removed in a future release.
48
53
  */
49
54
  headerWidth?: string;
50
55
  /** An object to support overriding validation statuses, when the Tabs have custom targets for example.
@@ -60,9 +65,9 @@ export interface TabsProps extends MarginProps, TagProps {
60
65
  /**
61
66
  * When this prop is set any string validation failures in the children of each Tab
62
67
  * will be summarised in the Tooltip next to the Tab title
63
- * @deprecated This prop will be deprecated in a future release
68
+ * @deprecated Support for validation summaries has been removed.
64
69
  */
65
70
  showValidationsSummary?: boolean;
66
71
  }
67
- declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<TabsHandle>>;
68
- export { Tabs, Tab };
72
+ export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<TabsHandle>>;
73
+ export default Tabs;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./tab/tab.component.js"),n=require("../../__internal__/utils/helpers/events/events.js"),a=require("../../__internal__/utils/helpers/tags/tags.js"),i=require("../../__internal__/utils/logger/index.js"),o=require("./tabs.style.js"),s=require("./__internal__/tabs-header/tabs-header.component.js"),l=require("./__internal__/tab-title/tab-title.component.js"),d=require("../drawer/__internal__/drawer-sidebar.context.js");function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(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){u(e,t,r[t])}))}return e}function p(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}let b=!1,f=!1,h=!1,g=!1,m=!1;const y=t.forwardRef(((r,u)=>{var{align:y="left",children:v,onTabChange:O,selectedTabId:j,renderHiddenTabs:w=!0,position:I="top",extendedLine:T=!0,size:S,borders:_="off",variant:x="default",validationStatusOverride:P,headerWidth:k,showValidationsSummary:C}=r,E=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(r,["align","children","onTabChange","selectedTabId","renderHiddenTabs","position","extendedLine","size","borders","variant","validationStatusOverride","headerWidth","showValidationsSummary"]);m||(i.default.deprecate("The current implementation of the `Tabs` component is deprecated and will be changing in a future release."),m=!0),C&&!g&&(i.default.deprecate("The `showValidationsSummary` prop in the `Tabs` component is deprecated and will be removed in a future release."),g=!0),"right"!==y||b||(i.default.deprecate("Support for the `right` value of `align` in the `Tabs` component is deprecated and will be removed in a future release."),b=!0),T||f||(i.default.deprecate("The `extendedLine` prop in the `Tabs` component is deprecated and will be removed in a future release."),f=!0),"off"===_||h||(i.default.deprecate("The `borders` prop in the `Tabs` component is deprecated and will be removed in a future release."),h=!0),"left"!==I&&void 0!==k&&i.default.error("Invalid usage of prop headerWidth in Tabs. The headerWidth can be used only if position is set to left");const q=t.useMemo((()=>t.Children.toArray(v).filter((e=>e))),[v]),L=t.useMemo((()=>q.map((e=>e.props.tabId))),[q]),M=t.useMemo((()=>Array.from({length:q.length}).map((()=>t.createRef()))),[q.length]),W=t.useRef(j),[D,R]=t.useState(j||q[0].props.tabId),{isInSidebar:$}=t.useContext(d.default),[H,K]=t.useState({}),[z,B]=t.useState({}),[V,A]=t.useState({}),U=t.useCallback(((e,t)=>{K((r=>p(c({},r),{[e]:t})))}),[]),F=t.useCallback(((e,t)=>{B((r=>p(c({},r),{[e]:t})))}),[]),G=t.useCallback(((e,t)=>{A((r=>p(c({},r),{[e]:t})))}),[]),J=t.useCallback((e=>e===D),[D]),N=t.useCallback((e=>{J(e)||R(e),O&&O(e)}),[O,J]),Q=t.useCallback((()=>{const{current:e}=W,t=e?L.indexOf(e):-1;var r;-1!==t&&(null===(r=M[t].current)||void 0===r||r.blur())}),[L,M]);t.useEffect((()=>{W.current!==j&&(j!==D&&(R(j),Q()),W.current=j)}),[Q,W,j,D]);const X=e=>t=>{n.default.isEventType(t,"keydown")||N(e)},Y=e=>{var t,r;null===(t=e.current)||void 0===t||t.focus();const n=null===(r=e.current)||void 0===r?void 0:r.getBoundingClientRect();var a;n&&(n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)||null===(a=e.current)||void 0===a||a.scrollIntoView({behavior:"auto",inline:"center"}))},Z=(e,t)=>{e.preventDefault();let r=t;t<0?r=L.length-1:t===L.length&&(r=0);const n=M[r];Y(n)},ee=e=>t=>{const r=$||"left"===I,a=r&&n.default.isUpKey(t),i=r&&n.default.isDownKey(t),o=!r&&n.default.isLeftKey(t),s=!r&&n.default.isRightKey(t);a||o?Z(t,e-1):(i||s)&&Z(t,e+1)};return t.useImperativeHandle(u,(()=>({focusTab(e){const t=M[q.findIndex((t=>t.props.tabId===e))];t&&Y(t)}})),[q,M]),e.jsxs(o.default,p(c({position:$?"left":I,"data-role":"tabs",isInSidebar:$,headerWidth:k},E,a.default("tabs",E)),{children:[(()=>{const r=q.map(((e,r)=>{const{tabId:n,title:a,siblings:i,titlePosition:o,errorMessage:s,warningMessage:d,infoMessage:u,href:b,customLayout:f,titleProps:h}=e.props,g=`${n}-tab`,m=H[n],v=z[n],O=V[n],j=m&&Object.entries(m).filter((e=>e[1])).length,w=v&&Object.entries(v).filter((e=>e[1])).length,T=O&&Object.entries(O).filter((e=>e[1])).length,k=P&&P[n],E=k&&P[n].error,q=k&&P[n].warning,L=k&&P[n].info,W=void 0!==E?E:!!j,D=void 0!==q?q:!!w&&!W,R=void 0!==L?L:!!T&&!W&&!D,K=(e,t={})=>{const r=Object.values(t).filter((e=>e&&"string"==typeof e));return C&&r.length?1===r.length?r[0]:r.map((e=>`• ${e}`)).join("\n"):e};return t.createElement(l.default,p(c({},h),{position:$?"left":I,dataTabId:n,id:g,key:n,onClick:X(n),onKeyDown:ee(r),ref:M[r],tabIndex:J(n)?0:-1,title:a,href:b,isTabSelected:J(n),error:W,warning:D,info:R,size:S||"default",borders:"off"!==_,siblings:i,titlePosition:o,errorMessage:K(s,m),warningMessage:K(d,v),infoMessage:K(u,O),alternateStyling:"alternate"===x,noLeftBorder:["no left side","no sides"].includes(_),noRightBorder:["no right side","no sides"].includes(_),customLayout:f,isInSidebar:$,align:y}))}));return e.jsx(s.default,{align:y,position:$?"left":I,role:"tablist",extendedLine:T,noRightBorder:["no right side","no sides"].includes(_),isInSidebar:$,size:S||"default",children:r})})(),(()=>{if($)return null;if(!w){const e=q.find((e=>J(e.props.tabId)));return e&&t.cloneElement(e,p(c({},e.props),{role:"tabpanel",position:I,isTabSelected:J(e.props.tabId),key:`${e.props.tabId}-tab`,ariaLabelledby:`${e.props.tabId}-tab`,updateErrors:U,updateWarnings:F,updateInfos:G}))}return q.map((e=>t.cloneElement(e,p(c({},e.props),{role:"tabpanel",position:I,isTabSelected:J(e.props.tabId),key:`${e.props.tabId}-tab`,ariaLabelledby:`${e.props.tabId}-tab`,updateErrors:U,updateWarnings:F,updateInfos:G}))))})()]}))}));exports.Tab=r.Tab,exports.Tabs=y;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./__next__/tabs.component.js"),n=require("./tab/tab.component.js"),a=require("../../__internal__/utils/logger/index.js"),i=require("../drawer/__internal__/drawer-sidebar.context.js"),o=require("../../hooks/__internal__/usePrevious/index.js");function l(e){return e&&e.__esModule?e:{default:e}}var s=l(t);function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function 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}let p=!1;const b=t.forwardRef(((l,d)=>{var b,f,{children:h,selectedTabId:O,onTabChange:y,position:j="top",size:v="default",validationStatusOverride:g,align:m,headerWidth:T,renderHiddenTabs:_=!0}=l,w=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(l,["children","selectedTabId","onTabChange","position","size","validationStatusOverride","align","headerWidth","renderHiddenTabs"]);p||(a.default.warn("Warning: This version of the `Tabs` component is intended to help migration to the `next` version and will be removed in a future release."),p=!0);const P=t.useMemo((()=>{const e=[];return s.default.Children.forEach(h,(t=>{s.default.isValidElement(t)&&e.push({props:t.props})})),e}),[h]),[x,I]=t.useState(O||(null===(b=P[0])||void 0===b?void 0:b.props.id)||(null===(f=P[0])||void 0===f?void 0:f.props.tabId)),S="default"===v?"medium":"large",{isInSidebar:q}=s.default.useContext(i.default),E=q||"left"===j?"vertical":"horizontal",W=_?P:P.filter((({props:e})=>e.isTabSelected||e.tabId===x)),k=o.default(O);return t.useEffect((()=>{O!==k&&O!==x&&I(O)}),[O,k,x]),e.jsxs(r.Tabs,c(u({orientation:E,selectedTabId:x,size:S},w),{children:[e.jsx(r.TabList,{ref:d,ariaLabel:"Tabs",onTabChange:e=>{I(e),null==y||y(e)},headerWidth:q?"100%":void 0,children:P.map((({props:e})=>{const r=e.id||e.tabId;return r?t.createElement(n.Tab,c(u({headerWidth:q?"100%":T},e),{key:r})):(a.default.warn("Warning: Tab component is missing a unique identifier. Please provide an `id` prop to ensure proper functionality."),null)}))}),!q&&W.map((({props:t})=>{const n=t.id||t.tabId;return n?e.jsx(r.TabPanel,{id:`${n}-panel`,tabId:n,children:t.children},`${n}-panel`):(a.default.warn("Warning: Each `Tab` component must have an `id` or `tabId` prop to associate it with a TabPanel."),null)}))]}))}));b.displayName="Tabs",exports.Tabs=b,exports.default=b;
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("./components/accordion/accordion.component.js"),o=require("./components/accordion/accordion-group/accordion-group.component.js"),t=require("./components/action-popover/action-popover.component.js"),r=require("./components/action-popover/action-popover-menu/action-popover-menu.component.js"),n=require("./components/action-popover/action-popover-item/action-popover-item.component.js"),i=require("./components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js");require("./components/action-popover/action-popover-divider/action-popover-divider.component.js");var s=require("./components/adaptive-sidebar/adaptive-sidebar.component.js"),p=require("./components/advanced-color-picker/advanced-color-picker.component.js"),c=require("./components/alert/alert.component.js"),l=require("./components/anchor-navigation/anchor-navigation.component.js"),a=require("./components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js"),m=require("./components/anchor-navigation/anchor-section-divider.component.js"),u=require("./components/badge/badge.component.js"),d=require("./components/batch-selection/batch-selection.component.js"),x=require("./components/box/box.component.js"),q=require("./components/breadcrumbs/breadcrumbs.component.js"),b=require("./components/breadcrumbs/crumb/crumb.component.js"),j=require("./components/button-bar/button-bar.component.js"),g=require("./components/button-minor/button-minor.component.js"),v=require("./components/button-toggle/button-toggle.component.js"),f=require("./components/button-toggle/button-toggle-group/button-toggle-group.component.js"),h=require("./components/button/button.component.js"),k=require("./components/carbon-provider/carbon-provider.component.js"),T=require("./components/card/card.component.js"),S=require("./components/card/card-column/card-column.component.js"),_=require("./components/card/card-footer/card-footer.component.js"),P=require("./components/card/card-row/card-row.component.js"),w=require("./components/checkbox/checkbox-group/checkbox-group.component.js"),C=require("./components/checkbox/checkbox.component.js"),F=require("./components/confirm/confirm.component.js"),B=require("./components/content/content.component.js"),M=require("./components/date-range/date-range.component.js"),y=require("./components/date/date.component.js"),D=require("./components/decimal/decimal.component.js"),I=require("./components/definition-list/dl.component.js"),A=require("./components/definition-list/dt/dt.component.js"),L=require("./components/definition-list/dd/dd.component.js"),G=require("./components/detail/detail.component.js"),H=require("./components/dialog/dialog.component.js"),R=require("./components/dismissible-box/dismissible-box.component.js"),N=require("./components/draggable/draggable-container.component.js"),V=require("./components/draggable/draggable-item/draggable-item.component.js"),E=require("./components/drawer/drawer.component.js"),O=require("./components/duelling-picklist/duelling-picklist.component.js"),Q=require("./components/duelling-picklist/picklist-divider/picklist-divider.component.js"),z=require("./components/duelling-picklist/picklist-item/picklist-item.component.js"),J=require("./components/duelling-picklist/picklist/picklist.component.js"),K=require("./components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js"),U=require("./components/duelling-picklist/picklist-group/picklist-group.component.js"),W=require("./components/fieldset/fieldset.component.js"),X=require("./components/file-input/file-input.component.js"),Y=require("./components/flat-table/flat-table.component.js"),Z=require("./components/flat-table/flat-table-head/flat-table-head.component.js"),$=require("./components/flat-table/flat-table-header/flat-table-header.component.js"),ee=require("./components/flat-table/flat-table-body/flat-table-body.component.js"),oe=require("./components/flat-table/flat-table-row/flat-table-row.component.js"),te=require("./components/flat-table/flat-table-row-header/flat-table-row-header.component.js"),re=require("./components/flat-table/flat-table-cell/flat-table-cell.component.js"),ne=require("./components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js"),ie=require("./components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js"),se=require("./components/flat-table/sort/sort.component.js"),pe=require("./components/form/form.component.js"),ce=require("./components/form/required-fields-indicator/required-fields-indicator.component.js"),le=require("./components/global-header/global-header.component.js"),ae=require("./components/grid/grid-container/grid-container.component.js"),me=require("./components/grid/grid-item/grid-item.component.js"),ue=require("./components/grouped-character/grouped-character.component.js"),de=require("./components/heading/heading.component.js"),xe=require("./components/help/help.component.js"),qe=require("./components/hr/hr.component.js"),be=require("./components/i18n-provider/i18n-provider.component.js"),je=require("./components/icon-button/icon-button.component.js"),ge=require("./components/icon/icon.component.js"),ve=require("./components/image/image.component.js"),fe=require("./components/inline-inputs/inline-inputs.component.js"),he=require("./components/link-preview/link-preview.component.js"),ke=require("./components/link/link.component.js"),Te=require("./components/loader/loader.component.js"),Se=require("./components/loader-bar/loader-bar.component.js"),_e=require("./components/loader-spinner/loader-spinner.component.js"),Pe=require("./components/loader-star/loader-star.component.js"),we=require("./components/loader/__next__/loader.component.js"),Ce=require("./components/menu/menu.component.js"),Fe=require("./components/menu/menu-item/menu-item.component.js"),Be=require("./components/menu/menu-divider/menu-divider.component.js"),Me=require("./components/menu/menu-segment-title/menu-segment-title.component.js"),ye=require("./components/menu/menu-full-screen/menu-full-screen.component.js"),De=require("./components/menu/scrollable-block/scrollable-block.component.js"),Ie=require("./components/message/message.component.js"),Ae=require("./components/modal/index.js"),Le=require("./components/multi-action-button/multi-action-button.component.js"),Ge=require("./components/navigation-bar/navigation-bar.component.js"),He=require("./components/note/note.component.js"),Re=require("./components/number/number.component.js"),Ne=require("./components/numeral-date/numeral-date.component.js"),Ve=require("./components/pager/pager.component.js"),Ee=require("./components/pages/pages.component.js"),Oe=require("./components/pages/page/page.component.js"),Qe=require("./components/password/password.component.js"),ze=require("./components/pill/pill.component.js"),Je=require("./components/pod/pod.component.js"),Ke=require("./components/popover-container/popover-container.component.js"),Ue=require("./components/portal/portal.js"),We=require("./components/portrait/portrait.component.js"),Xe=require("./components/preview/preview.component.js"),Ye=require("./components/profile/profile.component.js"),Ze=require("./components/progress-tracker/progress-tracker.component.js"),$e=require("./components/radio-button/radio-button.component.js"),eo=require("./components/radio-button/radio-button-group/radio-button-group.component.js"),oo=require("./components/search/search.component.js"),to=require("./components/select/option/option.component.js"),ro=require("./components/select/option-row/option-row.component.js"),no=require("./components/select/option-group-header/option-group-header.component.js"),io=require("./components/select/simple-select/simple-select.component.js"),so=require("./components/select/filterable-select/filterable-select.component.js"),po=require("./components/select/multi-select/multi-select.component.js"),co=require("./components/select/setup-select-mocks.js"),lo=require("./components/settings-row/settings-row.component.js"),ao=require("./components/sidebar/sidebar.component.js"),mo=require("./components/simple-color-picker/simple-color-picker.component.js"),uo=require("./components/simple-color-picker/simple-color/simple-color.component.js"),xo=require("./components/split-button/split-button.component.js"),qo=require("./components/step-flow/step-flow-title/step-flow-title.component.js"),bo=require("./components/step-flow/step-flow.component.js"),jo=require("./components/step-sequence/step-sequence.component.js"),go=require("./components/step-sequence/step-sequence-item/step-sequence-item.component.js"),vo=require("./components/switch/switch.component.js"),fo=require("./components/tabs/tabs.component.js"),ho=require("./components/text-editor/text-editor.component.js"),ko=require("./components/text-editor/__internal__/__utils__/helpers.js");require("react/jsx-runtime"),require("@lexical/react/LexicalComposerContext"),require("@lexical/react/LexicalTypeaheadMenuPlugin"),require("lexical"),require("react"),require("react-dom"),require("./components/text-editor/__internal__/__ui__/Mentions/constants.js"),require("./components/text-editor/__internal__/__ui__/Mentions/mentions.style.js"),require("./__internal__/i18n-context/index.js");var To=require("./components/textarea/textarea.component.js"),So=require("./components/textbox/textbox.component.js"),_o=require("./components/tile-select/tile-select.component.js"),Po=require("./components/tile-select/tile-select-group/tile-select-group.component.js"),wo=require("./components/tile/tile.component.js"),Co=require("./components/tile/tile-content/tile-content.component.js"),Fo=require("./components/tile/tile-footer/tile-footer.component.js"),Bo=require("./components/tile/tile-header/tile-header.component.js"),Mo=require("./components/tile/flex-tile-container/flex-tile-container.component.js"),yo=require("./components/tile/flex-tile-cell/flex-tile-cell.component.js"),Do=require("./components/tile/flex-tile-divider/flex-tile-divider.component.js"),Io=require("./components/time/time.component.js"),Ao=require("./components/toast/toast.component.js"),Lo=require("./components/tooltip/tooltip.component.js"),Go=require("./components/typography/typography.component.js"),Ho=require("./components/typography/list.component.js"),Ro=require("./components/vertical-divider/vertical-divider.component.js"),No=require("./components/vertical-menu/vertical-menu.component.js"),Vo=require("./components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js"),Eo=require("./components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js"),Oo=require("./components/vertical-menu/vertical-menu-trigger/vertical-menu-trigger.component.js");require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js"),require("react-transition-group"),require("./hooks/__internal__/useScrollBlock/useScrollBlock.js"),require("./__internal__/modal/modal-manager.js"),require("./__internal__/modal/modal.style.js"),require("./__internal__/modal/modal.context.js");var Qo=require("./hooks/useMediaQuery/useMediaQuery.js");require("./components/carbon-provider/__internal__/top-modal.context.js"),require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js"),require("./style/utils/filter-styled-system-padding-props.js"),require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js");var zo=require("./hooks/useCharacterCount/useCharacterCount.js"),Jo=require("./style/global-style.js"),Ko=require("./components/action-popover/action-popover.style.js"),Uo=require("./components/tabs/tab/tab.component.js");exports.Accordion=e.Accordion,exports.AccordionGroup=o.AccordionGroup,exports.ActionPopover=t.ActionPopover,exports.ActionPopoverMenu=r.default,exports.ActionPopoverItem=n.ActionPopoverItem,exports.ActionPopoverMenuButton=i.ActionPopoverMenuButton,exports.AdaptiveSidebar=s.AdaptiveSidebar,exports.AdvancedColorPicker=p.AdvancedColorPicker,exports.Alert=c.Alert,exports.AnchorNavigation=l.default,exports.AnchorNavigationItem=a.default,exports.AnchorSectionDivider=m.default,exports.Badge=u.Badge,exports.BatchSelection=d.BatchSelection,exports.Box=x.Box,exports.Breadcrumbs=q.Breadcrumbs,exports.Crumb=b.default,exports.ButtonBar=j.ButtonBar,exports.ButtonMinor=g.ButtonMinor,exports.ButtonToggle=v.ButtonToggle,exports.ButtonToggleGroup=f.default,exports.Button=h.default,exports.CarbonProvider=k.CarbonProvider,exports.Card=T.default,exports.CardColumn=S.default,exports.CardFooter=_.default,exports.CardRow=P.default,exports.CheckboxGroup=w.CheckboxGroup,exports.Checkbox=C.Checkbox,exports.Confirm=F.Confirm,exports.Content=B.Content,exports.DateRange=M.DateRange,exports.DateInput=y.DateInput,exports.Decimal=D.Decimal,exports.Dl=I.default,exports.Dt=A.default,exports.Dd=L.default,exports.Detail=G.Detail,exports.Dialog=H.Dialog,exports.DismissibleBox=R.DismissibleBox,exports.DraggableContainer=N.default,exports.DraggableItem=V.default,exports.Drawer=E.Drawer,exports.DuellingPicklist=O.DuellingPicklist,exports.PicklistDivider=Q.default,exports.PicklistItem=z.PicklistItem,exports.Picklist=J.Picklist,exports.PicklistPlaceholder=K.PicklistPlaceholder,exports.PicklistGroup=U.PicklistGroup,exports.Fieldset=W.Fieldset,exports.FileInput=X.FileInput,exports.FlatTable=Y.FlatTable,exports.FlatTableHead=Z.FlatTableHead,exports.FlatTableHeader=$.FlatTableHeader,exports.FlatTableBody=ee.FlatTableBody,exports.FlatTableRow=oe.FlatTableRow,exports.FlatTableRowHeader=te.FlatTableRowHeader,exports.FlatTableCell=re.FlatTableCell,exports.FlatTableCheckbox=ne.FlatTableCheckbox,exports.FlatTableBodyDraggable=ie.FlatTableBodyDraggable,exports.Sort=se.Sort,exports.Form=pe.Form,exports.RequiredFieldsIndicator=ce.default,exports.GlobalHeader=le.default,exports.GridContainer=ae.GridContainer,exports.GridItem=me.GridItem,exports.GroupedCharacter=ue.GroupedCharacter,exports.Heading=de.Heading,exports.Help=xe.Help,exports.Hr=qe.Hr,exports.I18nProvider=be.I18nProvider,exports.IconButton=je.default,exports.Icon=ge.default,exports.Image=ve.Image,exports.InlineInputs=fe.default,exports.LinkPreview=he.LinkPreview,exports.Link=ke.Link,exports.Loader=Te.Loader,exports.LoaderBar=Se.LoaderBar,exports.LoaderSpinner=_e.LoaderSpinner,exports.LoaderStar=Pe.default,exports.NextLoader=we.Loader,exports.Menu=Ce.Menu,exports.MenuItem=Fe.MenuItem,exports.MenuDivider=Be.default,exports.MenuSegmentTitle=Me.default,exports.MenuFullscreen=ye.MenuFullscreen,exports.ScrollableBlock=De.ScrollableBlock,exports.Message=Ie.Message,exports.Modal=Ae.default,exports.MultiActionButton=Le.MultiActionButton,exports.NavigationBar=Ge.NavigationBar,exports.Note=He.Note,exports.Number=Re.Number,exports.NumeralDate=Ne.NumeralDate,exports.Pager=Ve.Pager,exports.Pages=Ee.default,exports.Page=Oe.default,exports.Password=Qe.Password,exports.Pill=ze.Pill,exports.Pod=Je.default,exports.PopoverContainer=Ke.PopoverContainer,exports.Portal=Ue.default,exports.Portrait=We.Portrait,exports.Preview=Xe.Preview,exports.Profile=Ye.Profile,exports.ProgressTracker=Ze.default,exports.RadioButton=$e.default,exports.RadioButtonGroup=eo.RadioButtonGroup,exports.Search=oo.Search,exports.Option=to.default,exports.OptionRow=ro.default,exports.OptionGroupHeader=no.default,exports.Select=io.SimpleSelect,exports.FilterableSelect=so.FilterableSelect,exports.MultiSelect=po.MultiSelect,exports.setupSelectMocks=co.default,exports.SettingsRow=lo.SettingsRow,exports.Sidebar=ao.Sidebar,exports.SimpleColorPicker=mo.SimpleColorPicker,exports.SimpleColor=uo.SimpleColor,exports.SplitButton=xo.SplitButton,exports.StepFlowTitle=qo.StepFlowTitle,exports.StepFlow=bo.StepFlow,exports.StepSequence=jo.StepSequence,exports.StepSequenceItem=go.StepSequenceItem,exports.Switch=vo.Switch,exports.Tabs=fo.Tabs,exports.TextEditor=ho.TextEditor,exports.createEmpty=ko.createEmpty,exports.createFromHTML=ko.createFromHTML,exports.Textarea=To.Textarea,exports.Textbox=So.Textbox,exports.TileSelect=_o.default,exports.TileSelectGroup=Po.TileSelectGroup,exports.Tile=wo.Tile,exports.TileContent=Co.default,exports.TileFooter=Fo.TileFooter,exports.TileHeader=Bo.TileHeader,exports.FlexTileContainer=Mo.FlexTileContainer,exports.FlexTileCell=yo.FlexTileCell,exports.FlexTileDivider=Do.FlexTileDivider,exports.Time=Io.default,exports.Toast=Ao.Toast,exports.Tooltip=Lo.Tooltip,exports.Typography=Go.Typography,exports.List=Ho.List,exports.ListItem=Ho.ListItem,exports.VerticalDivider=Ro.VerticalDivider,exports.VerticalMenu=No.VerticalMenu,exports.VerticalMenuItem=Vo.VerticalMenuItem,exports.VerticalMenuFullScreen=Eo.VerticalMenuFullScreen,exports.VerticalMenuTrigger=Oo.VerticalMenuTrigger,exports.useMediaQuery=Qo.default,exports.useCharacterCount=zo.default,exports.GlobalStyle=Jo.default,exports.ActionPopoverDivider=Ko.MenuItemDivider,exports.Tab=Uo.Tab;
1
+ "use strict";var e=require("./components/accordion/accordion.component.js"),o=require("./components/accordion/accordion-group/accordion-group.component.js"),t=require("./components/action-popover/action-popover.component.js"),r=require("./components/action-popover/action-popover-menu/action-popover-menu.component.js"),n=require("./components/action-popover/action-popover-item/action-popover-item.component.js"),i=require("./components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js");require("./components/action-popover/action-popover-divider/action-popover-divider.component.js");var s=require("./components/adaptive-sidebar/adaptive-sidebar.component.js"),p=require("./components/advanced-color-picker/advanced-color-picker.component.js"),c=require("./components/alert/alert.component.js"),l=require("./components/anchor-navigation/anchor-navigation.component.js"),a=require("./components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js"),m=require("./components/anchor-navigation/anchor-section-divider.component.js"),u=require("./components/badge/badge.component.js"),d=require("./components/batch-selection/batch-selection.component.js"),x=require("./components/box/box.component.js"),q=require("./components/breadcrumbs/breadcrumbs.component.js"),b=require("./components/breadcrumbs/crumb/crumb.component.js"),j=require("./components/button-bar/button-bar.component.js"),g=require("./components/button-minor/button-minor.component.js"),v=require("./components/button-toggle/button-toggle.component.js"),f=require("./components/button-toggle/button-toggle-group/button-toggle-group.component.js"),h=require("./components/button/button.component.js"),k=require("./components/carbon-provider/carbon-provider.component.js"),T=require("./components/card/card.component.js"),S=require("./components/card/card-column/card-column.component.js"),_=require("./components/card/card-footer/card-footer.component.js"),P=require("./components/card/card-row/card-row.component.js"),w=require("./components/checkbox/checkbox-group/checkbox-group.component.js"),C=require("./components/checkbox/checkbox.component.js"),F=require("./components/confirm/confirm.component.js"),B=require("./components/content/content.component.js"),M=require("./components/date-range/date-range.component.js"),y=require("./components/date/date.component.js"),D=require("./components/decimal/decimal.component.js"),I=require("./components/definition-list/dl.component.js"),A=require("./components/definition-list/dt/dt.component.js"),L=require("./components/definition-list/dd/dd.component.js"),G=require("./components/detail/detail.component.js"),H=require("./components/dialog/dialog.component.js"),R=require("./components/dismissible-box/dismissible-box.component.js"),N=require("./components/draggable/draggable-container.component.js"),V=require("./components/draggable/draggable-item/draggable-item.component.js"),E=require("./components/drawer/drawer.component.js"),O=require("./components/duelling-picklist/duelling-picklist.component.js"),Q=require("./components/duelling-picklist/picklist-divider/picklist-divider.component.js"),z=require("./components/duelling-picklist/picklist-item/picklist-item.component.js"),J=require("./components/duelling-picklist/picklist/picklist.component.js"),K=require("./components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js"),U=require("./components/duelling-picklist/picklist-group/picklist-group.component.js"),W=require("./components/fieldset/fieldset.component.js"),X=require("./components/file-input/file-input.component.js"),Y=require("./components/flat-table/flat-table.component.js"),Z=require("./components/flat-table/flat-table-head/flat-table-head.component.js"),$=require("./components/flat-table/flat-table-header/flat-table-header.component.js"),ee=require("./components/flat-table/flat-table-body/flat-table-body.component.js"),oe=require("./components/flat-table/flat-table-row/flat-table-row.component.js"),te=require("./components/flat-table/flat-table-row-header/flat-table-row-header.component.js"),re=require("./components/flat-table/flat-table-cell/flat-table-cell.component.js"),ne=require("./components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js"),ie=require("./components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js"),se=require("./components/flat-table/sort/sort.component.js"),pe=require("./components/form/form.component.js"),ce=require("./components/form/required-fields-indicator/required-fields-indicator.component.js"),le=require("./components/global-header/global-header.component.js"),ae=require("./components/grid/grid-container/grid-container.component.js"),me=require("./components/grid/grid-item/grid-item.component.js"),ue=require("./components/grouped-character/grouped-character.component.js"),de=require("./components/heading/heading.component.js"),xe=require("./components/help/help.component.js"),qe=require("./components/hr/hr.component.js"),be=require("./components/i18n-provider/i18n-provider.component.js"),je=require("./components/icon-button/icon-button.component.js"),ge=require("./components/icon/icon.component.js"),ve=require("./components/image/image.component.js"),fe=require("./components/inline-inputs/inline-inputs.component.js"),he=require("./components/link-preview/link-preview.component.js"),ke=require("./components/link/link.component.js"),Te=require("./components/loader/loader.component.js"),Se=require("./components/loader-bar/loader-bar.component.js"),_e=require("./components/loader-spinner/loader-spinner.component.js"),Pe=require("./components/loader-star/loader-star.component.js"),we=require("./components/loader/__next__/loader.component.js"),Ce=require("./components/menu/menu.component.js"),Fe=require("./components/menu/menu-item/menu-item.component.js"),Be=require("./components/menu/menu-divider/menu-divider.component.js"),Me=require("./components/menu/menu-segment-title/menu-segment-title.component.js"),ye=require("./components/menu/menu-full-screen/menu-full-screen.component.js"),De=require("./components/menu/scrollable-block/scrollable-block.component.js"),Ie=require("./components/message/message.component.js"),Ae=require("./components/modal/index.js"),Le=require("./components/multi-action-button/multi-action-button.component.js"),Ge=require("./components/navigation-bar/navigation-bar.component.js"),He=require("./components/note/note.component.js"),Re=require("./components/number/number.component.js"),Ne=require("./components/numeral-date/numeral-date.component.js"),Ve=require("./components/pager/pager.component.js"),Ee=require("./components/pages/pages.component.js"),Oe=require("./components/pages/page/page.component.js"),Qe=require("./components/password/password.component.js"),ze=require("./components/pill/pill.component.js"),Je=require("./components/pod/pod.component.js"),Ke=require("./components/popover-container/popover-container.component.js"),Ue=require("./components/portal/portal.js"),We=require("./components/portrait/portrait.component.js"),Xe=require("./components/preview/preview.component.js"),Ye=require("./components/profile/profile.component.js"),Ze=require("./components/progress-tracker/progress-tracker.component.js"),$e=require("./components/radio-button/radio-button.component.js"),eo=require("./components/radio-button/radio-button-group/radio-button-group.component.js"),oo=require("./components/search/search.component.js"),to=require("./components/select/option/option.component.js"),ro=require("./components/select/option-row/option-row.component.js"),no=require("./components/select/option-group-header/option-group-header.component.js"),io=require("./components/select/simple-select/simple-select.component.js"),so=require("./components/select/filterable-select/filterable-select.component.js"),po=require("./components/select/multi-select/multi-select.component.js"),co=require("./components/select/setup-select-mocks.js"),lo=require("./components/settings-row/settings-row.component.js"),ao=require("./components/sidebar/sidebar.component.js"),mo=require("./components/simple-color-picker/simple-color-picker.component.js"),uo=require("./components/simple-color-picker/simple-color/simple-color.component.js"),xo=require("./components/split-button/split-button.component.js"),qo=require("./components/step-flow/step-flow-title/step-flow-title.component.js"),bo=require("./components/step-flow/step-flow.component.js"),jo=require("./components/step-sequence/step-sequence.component.js"),go=require("./components/step-sequence/step-sequence-item/step-sequence-item.component.js"),vo=require("./components/switch/switch.component.js"),fo=require("./components/tabs/tabs.component.js"),ho=require("./components/tabs/tab/tab.component.js"),ko=require("./components/text-editor/text-editor.component.js"),To=require("./components/text-editor/__internal__/__utils__/helpers.js");require("react/jsx-runtime"),require("@lexical/react/LexicalComposerContext"),require("@lexical/react/LexicalTypeaheadMenuPlugin"),require("lexical"),require("react"),require("react-dom"),require("./components/text-editor/__internal__/__ui__/Mentions/constants.js"),require("./components/text-editor/__internal__/__ui__/Mentions/mentions.style.js"),require("./__internal__/i18n-context/index.js");var So=require("./components/textarea/textarea.component.js"),_o=require("./components/textbox/textbox.component.js"),Po=require("./components/tile-select/tile-select.component.js"),wo=require("./components/tile-select/tile-select-group/tile-select-group.component.js"),Co=require("./components/tile/tile.component.js"),Fo=require("./components/tile/tile-content/tile-content.component.js"),Bo=require("./components/tile/tile-footer/tile-footer.component.js"),Mo=require("./components/tile/tile-header/tile-header.component.js"),yo=require("./components/tile/flex-tile-container/flex-tile-container.component.js"),Do=require("./components/tile/flex-tile-cell/flex-tile-cell.component.js"),Io=require("./components/tile/flex-tile-divider/flex-tile-divider.component.js"),Ao=require("./components/time/time.component.js"),Lo=require("./components/toast/toast.component.js"),Go=require("./components/tooltip/tooltip.component.js"),Ho=require("./components/typography/typography.component.js"),Ro=require("./components/typography/list.component.js"),No=require("./components/vertical-divider/vertical-divider.component.js"),Vo=require("./components/vertical-menu/vertical-menu.component.js"),Eo=require("./components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js"),Oo=require("./components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js"),Qo=require("./components/vertical-menu/vertical-menu-trigger/vertical-menu-trigger.component.js");require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js"),require("react-transition-group"),require("./hooks/__internal__/useScrollBlock/useScrollBlock.js"),require("./__internal__/modal/modal-manager.js"),require("./__internal__/modal/modal.style.js"),require("./__internal__/modal/modal.context.js");var zo=require("./hooks/useMediaQuery/useMediaQuery.js");require("./components/carbon-provider/__internal__/top-modal.context.js"),require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js"),require("./style/utils/filter-styled-system-padding-props.js"),require("./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js");var Jo=require("./hooks/useCharacterCount/useCharacterCount.js"),Ko=require("./style/global-style.js"),Uo=require("./components/action-popover/action-popover.style.js");exports.Accordion=e.Accordion,exports.AccordionGroup=o.AccordionGroup,exports.ActionPopover=t.ActionPopover,exports.ActionPopoverMenu=r.default,exports.ActionPopoverItem=n.ActionPopoverItem,exports.ActionPopoverMenuButton=i.ActionPopoverMenuButton,exports.AdaptiveSidebar=s.AdaptiveSidebar,exports.AdvancedColorPicker=p.AdvancedColorPicker,exports.Alert=c.Alert,exports.AnchorNavigation=l.default,exports.AnchorNavigationItem=a.default,exports.AnchorSectionDivider=m.default,exports.Badge=u.Badge,exports.BatchSelection=d.BatchSelection,exports.Box=x.Box,exports.Breadcrumbs=q.Breadcrumbs,exports.Crumb=b.default,exports.ButtonBar=j.ButtonBar,exports.ButtonMinor=g.ButtonMinor,exports.ButtonToggle=v.ButtonToggle,exports.ButtonToggleGroup=f.default,exports.Button=h.default,exports.CarbonProvider=k.CarbonProvider,exports.Card=T.default,exports.CardColumn=S.default,exports.CardFooter=_.default,exports.CardRow=P.default,exports.CheckboxGroup=w.CheckboxGroup,exports.Checkbox=C.Checkbox,exports.Confirm=F.Confirm,exports.Content=B.Content,exports.DateRange=M.DateRange,exports.DateInput=y.DateInput,exports.Decimal=D.Decimal,exports.Dl=I.default,exports.Dt=A.default,exports.Dd=L.default,exports.Detail=G.Detail,exports.Dialog=H.Dialog,exports.DismissibleBox=R.DismissibleBox,exports.DraggableContainer=N.default,exports.DraggableItem=V.default,exports.Drawer=E.Drawer,exports.DuellingPicklist=O.DuellingPicklist,exports.PicklistDivider=Q.default,exports.PicklistItem=z.PicklistItem,exports.Picklist=J.Picklist,exports.PicklistPlaceholder=K.PicklistPlaceholder,exports.PicklistGroup=U.PicklistGroup,exports.Fieldset=W.Fieldset,exports.FileInput=X.FileInput,exports.FlatTable=Y.FlatTable,exports.FlatTableHead=Z.FlatTableHead,exports.FlatTableHeader=$.FlatTableHeader,exports.FlatTableBody=ee.FlatTableBody,exports.FlatTableRow=oe.FlatTableRow,exports.FlatTableRowHeader=te.FlatTableRowHeader,exports.FlatTableCell=re.FlatTableCell,exports.FlatTableCheckbox=ne.FlatTableCheckbox,exports.FlatTableBodyDraggable=ie.FlatTableBodyDraggable,exports.Sort=se.Sort,exports.Form=pe.Form,exports.RequiredFieldsIndicator=ce.default,exports.GlobalHeader=le.default,exports.GridContainer=ae.GridContainer,exports.GridItem=me.GridItem,exports.GroupedCharacter=ue.GroupedCharacter,exports.Heading=de.Heading,exports.Help=xe.Help,exports.Hr=qe.Hr,exports.I18nProvider=be.I18nProvider,exports.IconButton=je.default,exports.Icon=ge.default,exports.Image=ve.Image,exports.InlineInputs=fe.default,exports.LinkPreview=he.LinkPreview,exports.Link=ke.Link,exports.Loader=Te.Loader,exports.LoaderBar=Se.LoaderBar,exports.LoaderSpinner=_e.LoaderSpinner,exports.LoaderStar=Pe.default,exports.NextLoader=we.Loader,exports.Menu=Ce.Menu,exports.MenuItem=Fe.MenuItem,exports.MenuDivider=Be.default,exports.MenuSegmentTitle=Me.default,exports.MenuFullscreen=ye.MenuFullscreen,exports.ScrollableBlock=De.ScrollableBlock,exports.Message=Ie.Message,exports.Modal=Ae.default,exports.MultiActionButton=Le.MultiActionButton,exports.NavigationBar=Ge.NavigationBar,exports.Note=He.Note,exports.Number=Re.Number,exports.NumeralDate=Ne.NumeralDate,exports.Pager=Ve.Pager,exports.Pages=Ee.default,exports.Page=Oe.default,exports.Password=Qe.Password,exports.Pill=ze.Pill,exports.Pod=Je.default,exports.PopoverContainer=Ke.PopoverContainer,exports.Portal=Ue.default,exports.Portrait=We.Portrait,exports.Preview=Xe.Preview,exports.Profile=Ye.Profile,exports.ProgressTracker=Ze.default,exports.RadioButton=$e.default,exports.RadioButtonGroup=eo.RadioButtonGroup,exports.Search=oo.Search,exports.Option=to.default,exports.OptionRow=ro.default,exports.OptionGroupHeader=no.default,exports.Select=io.SimpleSelect,exports.FilterableSelect=so.FilterableSelect,exports.MultiSelect=po.MultiSelect,exports.setupSelectMocks=co.default,exports.SettingsRow=lo.SettingsRow,exports.Sidebar=ao.Sidebar,exports.SimpleColorPicker=mo.SimpleColorPicker,exports.SimpleColor=uo.SimpleColor,exports.SplitButton=xo.SplitButton,exports.StepFlowTitle=qo.StepFlowTitle,exports.StepFlow=bo.StepFlow,exports.StepSequence=jo.StepSequence,exports.StepSequenceItem=go.StepSequenceItem,exports.Switch=vo.Switch,exports.Tabs=fo.Tabs,exports.Tab=ho.Tab,exports.TextEditor=ko.TextEditor,exports.createEmpty=To.createEmpty,exports.createFromHTML=To.createFromHTML,exports.Textarea=So.Textarea,exports.Textbox=_o.Textbox,exports.TileSelect=Po.default,exports.TileSelectGroup=wo.TileSelectGroup,exports.Tile=Co.Tile,exports.TileContent=Fo.default,exports.TileFooter=Bo.TileFooter,exports.TileHeader=Mo.TileHeader,exports.FlexTileContainer=yo.FlexTileContainer,exports.FlexTileCell=Do.FlexTileCell,exports.FlexTileDivider=Io.FlexTileDivider,exports.Time=Ao.default,exports.Toast=Lo.Toast,exports.Tooltip=Go.Tooltip,exports.Typography=Ho.Typography,exports.List=Ro.List,exports.ListItem=Ro.ListItem,exports.VerticalDivider=No.VerticalDivider,exports.VerticalMenu=Vo.VerticalMenu,exports.VerticalMenuItem=Eo.VerticalMenuItem,exports.VerticalMenuFullScreen=Oo.VerticalMenuFullScreen,exports.VerticalMenuTrigger=Qo.VerticalMenuTrigger,exports.useMediaQuery=zo.default,exports.useCharacterCount=Jo.default,exports.GlobalStyle=Ko.default,exports.ActionPopoverDivider=Uo.MenuItemDivider;
@@ -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`},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."}`},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;
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."}`},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;
@@ -134,6 +134,8 @@ interface Locale {
134
134
  error: (tabTitle?: string) => string;
135
135
  warning: (tabTitle?: string) => string;
136
136
  info: (tabTitle?: string) => string;
137
+ scrollLeftText?: () => string;
138
+ scrollRightText?: () => string;
137
139
  };
138
140
  textEditor: {
139
141
  boldAria: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "158.28.0",
3
+ "version": "158.30.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -1,2 +0,0 @@
1
- export { default } from "./tab-title.component";
2
- export type { TabTitleProps } from "./tab-title.component";
@@ -1 +0,0 @@
1
- export{default}from"./tab-title.component.js";
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- export interface TabTitleProps {
3
- /** Identifier used for testing purposes */
4
- "data-role"?: string;
5
- title?: string;
6
- id?: string;
7
- dataTabId?: string;
8
- className?: string;
9
- children?: React.ReactNode;
10
- isTabSelected?: boolean;
11
- position?: "top" | "left";
12
- errorMessage?: string;
13
- warningMessage?: string;
14
- infoMessage?: string;
15
- error?: boolean;
16
- warning?: boolean;
17
- info?: boolean;
18
- borders?: boolean;
19
- noLeftBorder?: boolean;
20
- noRightBorder?: boolean;
21
- alternateStyling?: boolean;
22
- isInSidebar?: boolean;
23
- siblings?: React.ReactNode;
24
- titlePosition?: "before" | "after";
25
- href?: string;
26
- tabIndex?: number;
27
- size?: "default" | "large";
28
- align?: "left" | "right";
29
- customLayout?: React.ReactNode;
30
- onClick: (ev: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
31
- onKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
32
- }
33
- declare const TabTitle: React.ForwardRefExoticComponent<TabTitleProps & React.RefAttributes<HTMLElement>>;
34
- export default TabTitle;
@@ -1 +0,0 @@
1
- import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import n,{useState as o,useRef as i,useContext as a}from"react";import{StyledTitleContent as l,StyledLayoutWrapper as s,StyledVerticalIndicator as c,StyledSelectedIndicator as d,StyledTabTitleLink as p,StyledTabTitleButton as b}from"./tab-title.style.js";import f from"../../../../__internal__/utils/helpers/tags/tags.js";import{ValidationIcon as u}from"../../../../__internal__/validations/validation-icon.component.js";import g from"../../../icon/icon.component.js";import m from"../../../../__internal__/utils/helpers/events/events.js";import{TooltipProvider as y}from"../../../../__internal__/tooltip-provider/index.js";import O from"./tab-title.context.js";import{Typography as h}from"../../../typography/typography.component.js";import v from"../../../carbon-provider/__internal__/new-validation.context.js";function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(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){j(e,t,r[t])}))}return e}function _(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var 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 S=n.forwardRef(((j,S)=>{var{isTabSelected:P,dataTabId:I,"data-role":k,title:x,position:R,error:B,warning:L,info:T,size:D="default",onClick:M,titlePosition:C="before",siblings:E,errorMessage:z="",warningMessage:K="",infoMessage:$="",borders:F,alternateStyling:H=!1,noLeftBorder:N=!1,noRightBorder:V=!1,customLayout:q,isInSidebar:A,href:G,onKeyDown:J,align:Q,tabIndex:U,id:W}=j,X=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(j,["isTabSelected","dataTabId","data-role","title","position","error","warning","info","size","onClick","titlePosition","siblings","errorMessage","warningMessage","infoMessage","borders","alternateStyling","noLeftBorder","noRightBorder","customLayout","isInSidebar","href","onKeyDown","align","tabIndex","id"]);const Y=!!G,Z=H||A,ee=B||L||T,[te,re]=o(!1),ne=i(!1),{validationRedesignOptIn:oe}=a(v);let ie="";B?ie=z:L&&(ie=K);const ae=()=>{re(!0)},le=()=>{"object"!=typeof S||(null==S?void 0:S.current)===document.activeElement||ne.current||re(!1)},se=e(t,{children:[e(l,{"data-role":"tab-title-content",error:B,warning:L,info:T,position:R,size:D,noLeftBorder:N,noRightBorder:V,borders:F,hasSiblings:!!E,isTabSelected:P,hasCustomLayout:!!q,alternateStyling:Z,align:Q,hasHref:!!G,validationRedesignOptIn:oe,children:[(()=>{if(q)return r(s,{hasCustomLayout:!0,children:q});if(!E)return x;const e=r(n.Fragment,{children:x},"title"),t=r(s,{titlePosition:C,children:E},"title-siblings");return"before"===C?[e,t]:[t,e]})(),Y&&r(g,{type:"link"}),ee&&e(s,{position:R,hasCustomSibling:!!q,validationRedesignOptIn:oe,children:[B&&r(u,{tooltipPosition:"top",error:z}),!B&&L&&r(u,{tooltipPosition:"top",warning:K}),!L&&!B&&T&&r(u,{tooltipPosition:"top",info:$})]})]}),oe&&"left"===R&&r(c,{}),(!(ee||Z)||oe)&&P&&r(d,{warning:L,error:B,"data-element":"tab-selected-indicator","data-role":"tab-selected-indicator",position:R})]}),ce=_(w(_(w({"aria-selected":P,"data-element":"select-tab","data-tabid":I,"data-role":k,role:"tab",position:R,isTabSelected:P,error:B,warning:L,info:T,noRightBorder:V,noLeftBorder:N,alternateStyling:H||A,borders:F,isInSidebar:A,tabIndex:U,id:W},X,f("tab-header",w({id:W},X))),{onKeyDown:e=>G&&m.isEnterOrSpaceKey(e)?window.open(G,"_blank"):J(e),onClick:e=>{return e.preventDefault(),G?(M(e),window.open(G,"_blank")):("object"==typeof S&&(null==S||null===(t=S.current)||void 0===t||t.focus({preventScroll:!0})),M(e));var t},size:D,onMouseOver:()=>{ne.current=!0,ae()},onMouseLeave:()=>{ne.current=!1,le()},onFocus:ae,onBlur:le}),oe&&ee&&{"aria-invalid":!0,"aria-errormessage":`${W}-message`,"aria-describedby":`${W}-message`}),{validationRedesignOptIn:oe}),de=Y?r(p,_(w({},ce),{ref:S,href:G,target:"_blank",children:se})):r(b,_(w({},ce),{type:"button",ref:S,children:se}));return e(y,{tooltipVisible:!oe&&te,children:[r(O.Provider,{value:{isInTab:!0},children:de}),oe&&ee&&r(h,{screenReaderOnly:!0,id:`${W}-message`,children:ie})]})}));S.displayName="TabTitle";export{S as default};
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- interface TabTitleContextProps {
3
- isInTab?: boolean;
4
- }
5
- declare const _default: React.Context<TabTitleContextProps>;
6
- export default _default;
@@ -1 +0,0 @@
1
- import t from"react";var e=t.createContext({});export{e as default};
@@ -1,27 +0,0 @@
1
- import { TabTitleProps } from ".";
2
- interface StyledTitleContentProps extends Pick<TabTitleProps, "align" | "borders" | "error" | "info" | "isTabSelected" | "noLeftBorder" | "noRightBorder" | "position" | "size" | "warning"> {
3
- alternateStyling?: boolean;
4
- hasCustomLayout?: boolean;
5
- hasHref?: boolean;
6
- hasSiblings?: boolean;
7
- validationRedesignOptIn?: boolean;
8
- }
9
- declare const StyledTitleContent: import("styled-components").StyledComponent<"span", any, StyledTitleContentProps, never>;
10
- declare const StyledTabTitleButton: import("styled-components").StyledComponent<"button", any, TabTitleProps & {
11
- validationRedesignOptIn?: boolean;
12
- }, never>;
13
- declare const StyledTabTitleLink: import("styled-components").StyledComponent<"a", any, TabTitleProps & {
14
- validationRedesignOptIn?: boolean;
15
- }, never>;
16
- interface StyledLayoutWrapperProps extends Pick<TabTitleProps, "titlePosition" | "position"> {
17
- hasCustomLayout?: boolean;
18
- hasCustomSibling?: boolean;
19
- validationRedesignOptIn?: boolean;
20
- }
21
- declare const StyledLayoutWrapper: import("styled-components").StyledComponent<"div", any, StyledLayoutWrapperProps, never>;
22
- declare const StyledVerticalIndicator: import("styled-components").StyledComponent<"div", any, {}, never>;
23
- type StyledSelectedIndicatorProps = Pick<TabTitleProps, "position" | "error" | "warning"> & {
24
- validationRedesignOptIn?: boolean;
25
- };
26
- declare const StyledSelectedIndicator: import("styled-components").StyledComponent<"div", any, StyledSelectedIndicatorProps, never>;
27
- export { StyledTabTitleButton, StyledTabTitleLink, StyledTitleContent, StyledLayoutWrapper, StyledSelectedIndicator, StyledVerticalIndicator, };
@@ -1 +0,0 @@
1
- import o,{css as r}from"styled-components";import t from"../../../icon/icon.style.js";import i from"../../../../__internal__/validations/validation-icon.style.js";const e=o.span.withConfig({displayName:"tab-title.style__StyledTitleContent",componentId:"sc-a4fb41f5-0"})(["outline:none;display:flex;align-items:flex-start;line-height:20px;margin:0;position:relative;",""],(({hasCustomLayout:o,error:t,warning:i,info:e,size:n,isTabSelected:a,hasSiblings:l,borders:d=!1,position:p="top",noLeftBorder:s,noRightBorder:c,hasHref:g,alternateStyling:b,align:x,validationRedesignOptIn:f})=>r(["text-align:",";"," "," "," "," "," "," "," "," "," "," "," "," ",""],x,"left"===p&&r(["display:flex;width:100%;justify-content:",";border-top-left-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius000);border-top-right-radius:var(--borderRadius000);"],"right"===x?"flex-end":"flex-start"),"left"===p&&f&&r(["justify-content:space-between;"]),"top"===p&&r(["border-top-left-radius:var(--borderRadius100);border-top-right-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius000);border-bottom-left-radius:var(--borderRadius000);"]),g&&r(['color:var(--colorsActionMinorYin090);display:block;text-decoration:none;[type="link"]{width:16px;margin-left:8px;height:16px;color:inherit;margin-top:-2px;}']),!g&&r(['[data-component="icon"]:not([color]){color:var(--colorsActionMinorYin065);}']),d&&r(["border-top:1px solid var(--colorsActionMinor100);border-left:1px solid var(--colorsActionMinor100);border-right:1px solid var(--colorsActionMinor100);"," "," ",""],"left"===p&&r(["border-bottom:1px solid var(--colorsActionMinor100);",""],!b&&"margin-right: -1px;"),s&&r(["border-left:none;",""],!c&&r(["border-right:1px solid var(--colorsActionMinor100);"])),c&&r(["border-right:none;"])),"large"===n&&"top"===p&&r(["padding:14px 24px;"," font-size:16px;"],d&&"padding-bottom: 9px;"),"large"===n&&"left"===p&&r(["font-size:16px;padding:14px 24px;"]),"default"===n&&r(["padding:10px 16px;",""],d&&"padding-bottom: 9px;"),(i||e)&&r(["outline:1px solid;outline-offset:-1px;z-index:",";"," "," "," "," &:hover{outline:1px solid;outline-offset:-1px;"," "," "," ","}"],f?1:2,e&&!i&&r(["outline-color:var(--colorsSemanticInfo500);"]),i&&r(["outline-color:var(--colorsSemanticCaution500);"]),"top"===p&&r(["border-bottom-color:transparent;"]),"left"===p&&r(["border-right-color:transparent;padding-right:",";"],"large"===n?"26px":"18px"),e&&!i&&r(["outline-color:var(--colorsSemanticInfo500);"]),i&&r(["outline-color:var(--colorsSemanticCaution500);"]),"top"===p&&r(["border-bottom-color:transparent;",""],o&&r(["padding-bottom:2px;"])),"left"===p&&r(["border-right-color:transparent;padding-right:",";"],"large"===n?"26px":"18px")),t&&r(["outline:2px solid var(--colorsSemanticNegative500);outline-offset:-2px;z-index:",";"," "," &:hover{outline:2px solid var(--colorsSemanticNegative500);outline-offset:-2px;"," ","}"],f?1:2,"top"===p&&r(["border-bottom-color:transparent;"]),"left"===p&&r(["border-right-color:transparent;padding-right:",";"],"large"===n?"26px":"18px"),"top"===p&&r(["border-bottom-color:transparent;",""],o&&r(["padding-bottom:2px;"])),"left"===p&&r(["border-right-color:transparent;padding-right:",";"],"large"===n?"26px":"18px")),l&&!o&&"top"===p&&r(["height:20px;"]),o&&r(["display:flex;"," ",""],"left"===p&&r(["padding:",";"," ",""],"large"===n?"2px":"0px",a&&r(["padding-right:0px;"]),(t||i||e)&&r(["padding-right:",";"],"large"===n?"26px":"18px")),"top"===p&&r(["padding:",";"," ",""],"large"===n?"2px":"0px",a&&r(["padding-bottom:0px;"]),(t||i||e)&&r(["padding-bottom:",";padding-right:",";&:hover{padding-bottom:",";}"],"large"===n?"4px":"2px","large"===n?"18px":"14px","large"===n?"4px":"2px")))))),n=r(["background-color:transparent;display:inline-block;border-top-left-radius:var(--borderRadius100);border-top-right-radius:var(--borderRadius100);font-weight:500;position:relative;border:none;cursor:pointer;font-size:14px;padding:0px;text-decoration:none;outline-offset:0px;margin:0;",";"," a:visited{color:inherit;}",""],(({position:o})=>"top"===o&&"white-space: nowrap"),(({position:o})=>r(["",""],"left"===o&&r(["border-top-right-radius:var(--borderRadius000);"]))),(({size:o,position:i="top",borders:n=!1,noRightBorder:a,noLeftBorder:l,isTabSelected:d,alternateStyling:p,error:s,warning:c,info:g,isInSidebar:b,validationRedesignOptIn:x})=>r(["height:",";"," "," "," ",' &:focus{outline:4px solid black;top:-2px;z-index:6;> span[data-role="tab-title-content"]{outline:none;',"}",' ::before{content:"";position:absolute;top:0;left 0;bottom:0;right:',";outline:3px solid var(--colorsSemanticFocus500);",' outline-offset:-2px;z-index:5;}> [data-element="tab-selected-indicator"]{z-index:4;',"}}}"," "," & ","{{","}"],"large"===o?"var(--sizing600)":"var(--sizing500)","top"===i&&r(["",""],n&&!(a||l)&&r(["&:nth-of-type(n + 1):not(:first-of-type){margin-left:-1px;}&:first-child{margin-left:0;}"])),"left"===i&&r(["",""],n&&r(["&:nth-of-type(n + 1):not(:first-of-type){margin-top:-1px;}&:first-child{margin-top:0;}"])),!d&&r(["color:var(--colorsActionMinorYin090);"," &:hover{background:var(--colorsActionMinor100);"," color:var(--colorsActionMinorYin090);outline:none;}&:focus{color:var(--colorsActionMinorYin090);outline:none;}"],x&&r(["background:transparent;"]),x&&r(["background:var(--colorsUtilityMajor100);"])),d&&r(["color:var(--colorsActionMajorYin090);background-color:var(--colorsActionMajorYang100);"," &:hover{background-color:var(--colorsActionMajorYang100);border-bottom-color:",";color:var(--colorsActionMajorYin090);cursor:default;}"],(s||c||g)&&r(["padding-bottom:0px;"]),p?"var(--colorsActionMinor100)":"var(--colorsActionMajor500)"),"top"===i&&"top: 2px;",r("top"===i?["border-top-left-radius:var(--borderRadius100);border-top-right-radius:var(--borderRadius100);"]:["border-top-left-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);"]),"top"===i?"0":"-1px",r("top"===i?["border-top-left-radius:var(--borderRadius100);border-top-right-radius:var(--borderRadius100);"]:["border-top-left-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);"]),r("top"===i?["bottom:2px;left:2px;right:1px;"]:["bottom:2px;right:1px;"]),"left"===i&&r(["background-color:transparent;border-bottom:0px;"," "," display:flex;height:auto;margin-left:0px;&:first-child{margin-top:0;}&:hover{","}"," "," ",""],!b&&!s&&r(["--border-right-value:",";border-right:"," solid var(--colorsActionMinor100);"],x?"0px":"2px",p?"1px":"var(--border-right-value)"),!n&&r(["","{border-bottom:none;}"],e),p&&"border-right-color: var(--colorsActionMinor100)",(c||g)&&r(["border-right:none;"]),!d&&r(["border-right-color:var(--colorsActionMinor100);"]),d&&r([""," "," background-color:var(--colorsActionMajorYang100);&:hover{"," background-color:var(--colorsActionMajorYang100);","}&:focus{","}"],p&&r(["border-right-color:var(--colorsActionMinor100);"]),!p&&r(["border-right:none;padding-bottom:0px;","{"," border-right:none;}"],e,!(s||c||g)&&!x&&"margin-right: 2px;"),p&&"border-right-color: var(--colorsActionMinor100);",(s||c||g)&&"border-right-color: var(--colorsSemanticNegative500);",(s||c||g)&&"border-right-color: var(--colorsSemanticNegative500);")),p&&r(["&:focus{background-color:var(--colorsActionMinor200);}&:hover{background-color:",";}",""],d?"var(--colorsActionMinor200)":"var(--colorsActionMinor250)",d&&r(["background-color:var(--colorsActionMinor200);"])),t,x?"margin-top: 10px;":"margin-top: 2px;"))),a=o.button.withConfig({displayName:"tab-title.style__StyledTabTitleButton",componentId:"sc-a4fb41f5-1"})(["",""],n),l=o.a.withConfig({displayName:"tab-title.style__StyledTabTitleLink",componentId:"sc-a4fb41f5-2"})(["",""],n),d=o.div.withConfig({displayName:"tab-title.style__StyledLayoutWrapper",componentId:"sc-a4fb41f5-3"})(["",""],(({hasCustomLayout:o,titlePosition:e="before",hasCustomSibling:n,validationRedesignOptIn:a})=>r([""," ",""],o&&r(["flex-grow:2;"]),!o&&r(["display:inline-flex;position:relative;top:-1px;"," "," ","{height:20px;}","{z-index:10;","{height:",";left:-2px;}}"],n&&r(["left:4px;"]),!n&&r(["",""],"before"===e?"left: 8px;":"right: 8px;"),t,i,t,a?"0px":"16px")))),p=o.div.withConfig({displayName:"tab-title.style__StyledVerticalIndicator",componentId:"sc-a4fb41f5-4"})(["position:absolute;top:0px;bottom:0px;right:0px;box-shadow:inset calc(-1 * var(--sizing050)) 0px 0px 0px var(--colorsActionMinor100);width:2px;z-index:1;"]),s=o.div.withConfig({displayName:"tab-title.style__StyledSelectedIndicator",componentId:"sc-a4fb41f5-5"})(["position:absolute;z-index:1;"," "," &:focus{bottom:3px;left:3px;right:3px;}"],(o=>r(["",""],o&&r(["z-index:2;"]))),(({position:o="top",warning:t,error:i})=>r(["--selected-indicator-color:var(--colorsActionMajor500);"," "," "," ",""],t&&r(["--selected-indicator-color:var(--colorsSemanticCaution500);"]),i&&r(["--selected-indicator-color:var(--colorsSemanticNegative500);"]),"top"===o&&r(["bottom:-1px;left:0px;right:0px;box-shadow:inset 0px calc(-1 * var(--sizing050)) 0px var(--selected-indicator-color);height:var(--sizing050);"]),"left"===o&&r(["top:0px;bottom:0px;right:0px;box-shadow:inset calc(-1 * var(--sizing050)) 0px 0px 0px var(--selected-indicator-color);width:var(--sizing050);"]))));export{d as StyledLayoutWrapper,s as StyledSelectedIndicator,a as StyledTabTitleButton,l as StyledTabTitleLink,e as StyledTitleContent,p as StyledVerticalIndicator};
@@ -1,2 +0,0 @@
1
- export { default } from "./tabs-header.component";
2
- export type { TabHeaderProps } from "./tabs-header.component";
@@ -1 +0,0 @@
1
- export{default}from"./tabs-header.component.js";
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- export interface TabHeaderProps {
3
- role?: string;
4
- position?: "top" | "left";
5
- extendedLine?: boolean;
6
- noRightBorder?: boolean;
7
- isInSidebar?: boolean;
8
- children: React.ReactNode;
9
- align?: "left" | "right";
10
- size?: "default" | "large";
11
- }
12
- declare const TabsHeader: ({ align, children, position, role, extendedLine, noRightBorder, isInSidebar, size, }: TabHeaderProps) => React.JSX.Element;
13
- export default TabsHeader;
@@ -1 +0,0 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useRef as i,useState as r,useCallback as n,useEffect as o}from"react";import a from"../../../../hooks/__internal__/useResizeObserver/useResizeObserver.js";import l from"../../../icon/icon.style.js";import{StyledTabsHeaderWrapper as d,StyledTabsHeaderList as s,StyledVerticalTabsWrapper as b,StyledWrapper as c,StyledNavigationButtonWrapper as p,StyledNavigationButton as h,StyledContainer as f,StyledBottomBorder as g}from"./tabs-header.style.js";const u=({align:u="left",children:v,position:m="top",role:w,extendedLine:L,noRightBorder:y=!1,isInSidebar:x=!1,size:R="default"})=>{const z=i(null),{current:I}=z,[S,_]=r(!1),[j,k]=r(!1),B=n((()=>{if(I){const t=I.scrollWidth-I.clientWidth-20;_(I.scrollLeft>=20),k(I.scrollLeft<=t)}}),[I]);return a(z,(()=>{B()})),o((()=>{I&&B()}),[I,B]),"left"===m?t(d,{isInSidebar:x,position:"left",children:t(s,{align:u,position:"left",role:w,extendedLine:L,noRightBorder:y,isInSidebar:x,ref:z,children:t(b,{isInSidebar:x,children:v})})}):e(c,{id:"tab-header-wrapper","data-role":"tab-header-wrapper",align:u,position:"top",extendedLine:L,noRightBorder:y,onKeyDown:function(t){if(!I)return;const{key:e}=t;("ArrowLeft"===e||"ArrowRight"===e)&&B()},children:[t(p,{position:"left",visible:S,id:"tab-navigation-button-wrapper-left","data-role":"tab-navigation-button-wrapper-left",size:R,children:t(h,{tabIndex:-1,title:"Scroll Tabs Left",id:"tab-navigation-button-left","data-role":"tab-navigation-button-left",type:"button",onClick:()=>{I&&(I.scrollLeft-=200,B())},children:t(l,{type:"chevron_left"})})}),e(f,{ref:z,id:"tab-container",role:w,"data-role":"tab-container",size:R,children:[t(g,{}),v]}),t(p,{position:"right",visible:j,id:"tab-navigation-button-wrapper-right","data-role":"tab-navigation-button-wrapper-right",size:R,children:t(h,{tabIndex:-1,title:"Scroll Tabs Right",id:"tab-navigation-button-right","data-role":"tab-navigation-button-right",type:"button",onClick:()=>{I&&(I.scrollLeft+=200,B())},children:t(l,{type:"chevron_right"})})})]})};export{u as default};
@@ -1,30 +0,0 @@
1
- import { TabHeaderProps } from "./tabs-header.component";
2
- type StyledTabsHeaderWrapperProps = Pick<TabHeaderProps, "position" | "isInSidebar">;
3
- declare const StyledTabsHeaderWrapper: import("styled-components").StyledComponent<"div", any, StyledTabsHeaderWrapperProps, never>;
4
- export type StyledTabsHeaderListProps = Pick<TabHeaderProps, "align" | "extendedLine" | "noRightBorder" | "isInSidebar" | "position">;
5
- declare const StyledTabsHeaderList: import("styled-components").StyledComponent<"div", any, {
6
- theme: object;
7
- } & StyledTabsHeaderListProps, "theme">;
8
- type StyledVerticalTabsWrapperProps = Pick<TabHeaderProps, "isInSidebar">;
9
- declare const StyledVerticalTabsWrapper: import("styled-components").StyledComponent<"div", any, StyledVerticalTabsWrapperProps, never>;
10
- type StyledWrapperProps = {
11
- align: string;
12
- position: string;
13
- role?: string;
14
- extendedLine?: boolean;
15
- noRightBorder?: boolean;
16
- isInSidebar?: boolean;
17
- };
18
- type StyledNavigationButtonWrapperProps = {
19
- position: string;
20
- visible: boolean;
21
- size: string;
22
- };
23
- declare const StyledWrapper: import("styled-components").StyledComponent<"section", any, StyledWrapperProps, never>;
24
- declare const StyledNavigationButtonWrapper: import("styled-components").StyledComponent<"div", any, StyledNavigationButtonWrapperProps, never>;
25
- declare const StyledNavigationButton: import("styled-components").StyledComponent<"button", any, {}, never>;
26
- declare const StyledContainer: import("styled-components").StyledComponent<"div", any, {
27
- size: string;
28
- }, never>;
29
- declare const StyledBottomBorder: import("styled-components").StyledComponent<"div", any, {}, never>;
30
- export { StyledTabsHeaderWrapper, StyledTabsHeaderList, StyledVerticalTabsWrapper, StyledWrapper, StyledNavigationButtonWrapper, StyledNavigationButton, StyledContainer, StyledBottomBorder, };
@@ -1 +0,0 @@
1
- import e,{css as t}from"styled-components";import o from"../../../../style/themes/apply-base-theme.js";const i=e.div.withConfig({displayName:"tabs-header.style__StyledTabsHeaderWrapper",componentId:"sc-79b7b87d-0"})(["",""],(({position:e,isInSidebar:o})=>"left"===e&&t(['box-sizing:border-box;padding:3px;button[data-element="select-tab"]{border-top-left-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);}'," ",""],!o&&t(["min-width:20%;overflow-y:auto;"]),o&&t(["min-width:100%;margin:auto;padding:0px;"])))),n=e.div.attrs(o).withConfig({displayName:"tabs-header.style__StyledTabsHeaderList",componentId:"sc-79b7b87d-1"})(["display:flex;"," cursor:default;list-style:none;padding:",";overflow-x:hidden;position:relative;"," ",""],(({extendedLine:e=!0})=>!e&&t(["width:fit-content;"])),"3px",(({align:e})=>"right"===e&&t(["justify-content:flex-end;text-align:right;"])),(({position:e,noRightBorder:o,align:i})=>"left"===e&&t(["flex-direction:column;box-shadow:none;"," ",""],o&&t(["box-shadow:none;"]),"right"===i&&t(["justify-content:flex-start;"])))),d=e.div.withConfig({displayName:"tabs-header.style__StyledVerticalTabsWrapper",componentId:"sc-79b7b87d-2"})(["margin:3px;"," display:flex;flex-direction:column;"],(({isInSidebar:e})=>e&&t(["margin-left:6px;margin-top:6px;"]))),a=e.section.withConfig({displayName:"tabs-header.style__StyledWrapper",componentId:"sc-79b7b87d-3"})(["overflow:hidden;position:relative;display:flex;"," ",";",""],(({extendedLine:e=!0})=>!e&&t(["width:fit-content;"])),(({position:e})=>"top"===e&&"white-space: nowrap"),(({align:e})=>"right"===e&&t(["justify-content:flex-end;text-align:right;"]))),r=e.div.withConfig({displayName:"tabs-header.style__StyledNavigationButtonWrapper",componentId:"sc-79b7b87d-4"})(["width:48px;",""],(({position:e,visible:o,size:i})=>t(["height:",";z-index:8;display:",";",""],"default"===i?"48px":"56px",o?"block":"none","right"===e&&"\n right: 0;\n position: absolute;\n "))),s=e.button.withConfig({displayName:"tabs-header.style__StyledNavigationButton",componentId:"sc-79b7b87d-5"})(["position:absolute;height:100%;width:48px;top:0;align-items:center;border:none;border-radius:0px;background-color:var(--colorsDisabled400);color:var(--colorsActionMinor500);z-index:6;:hover{cursor:pointer;background-color:var(--colorsActionDisabled500);color:var(--colorsComponentsMenuYang100);}"]),l=e.div.withConfig({displayName:"tabs-header.style__StyledContainer",componentId:"sc-79b7b87d-6"})(["display:flex;padding:6px 4px 0px;margin:0;overflow-x:hidden;"," align-items:flex-start;"],(({size:e})=>t(["height:",";"],"large"===e?"50px":"42px"))),p=e.div.withConfig({displayName:"tabs-header.style__StyledBottomBorder",componentId:"sc-79b7b87d-7"})(["height:auto;border-bottom:2px solid var(--colorsActionMinor100);bottom:0;left:4px;right:4px;position:absolute;"]);export{p as StyledBottomBorder,l as StyledContainer,s as StyledNavigationButton,r as StyledNavigationButtonWrapper,n as StyledTabsHeaderList,i as StyledTabsHeaderWrapper,d as StyledVerticalTabsWrapper,a as StyledWrapper};