carbon-react 116.1.1 → 116.1.3

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 (77) hide show
  1. package/esm/__internal__/utils/helpers/events/events.d.ts +1 -1
  2. package/esm/components/button-toggle/button-toggle.style.js +2 -0
  3. package/esm/components/date/date.component.js +9 -1
  4. package/esm/components/date/date.style.js +5 -2
  5. package/esm/components/detail/detail.component.d.ts +19 -0
  6. package/esm/components/detail/detail.component.js +176 -42
  7. package/esm/components/detail/detail.style.d.ts +10 -0
  8. package/esm/components/detail/index.d.ts +2 -1
  9. package/esm/components/drawer/drawer.component.d.ts +1 -1
  10. package/esm/components/icon/icon.component.js +1 -1
  11. package/esm/components/menu/index.d.ts +1 -0
  12. package/esm/components/tabs/__internal__/tab-title/index.d.ts +2 -1
  13. package/esm/components/tabs/__internal__/tab-title/index.js +1 -1
  14. package/esm/components/tabs/__internal__/tab-title/tab-title.component.d.ts +37 -3
  15. package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +99 -97
  16. package/esm/components/tabs/__internal__/tab-title/tab-title.style.d.ts +18 -4
  17. package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +14 -50
  18. package/esm/components/tabs/__internal__/tabs-header/index.d.ts +2 -1
  19. package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +13 -0
  20. package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.js +8 -8
  21. package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -6
  22. package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +8 -27
  23. package/esm/components/tabs/index.d.ts +3 -2
  24. package/esm/components/tabs/tab/index.d.ts +2 -2
  25. package/esm/components/tabs/tab/tab.component.d.ts +53 -0
  26. package/esm/components/tabs/tab/tab.component.js +180 -61
  27. package/esm/components/tabs/tab/tab.style.d.ts +8 -1
  28. package/esm/components/tabs/tab/tab.style.js +1 -6
  29. package/esm/components/tabs/tabs.component.d.ts +49 -0
  30. package/esm/components/tabs/tabs.component.js +188 -70
  31. package/esm/components/tabs/tabs.style.d.ts +5 -1
  32. package/esm/components/tabs/tabs.style.js +2 -8
  33. package/esm/components/textbox/textbox.component.d.ts +1 -1
  34. package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
  35. package/lib/components/button-toggle/button-toggle.style.js +2 -0
  36. package/lib/components/date/date.component.js +9 -1
  37. package/lib/components/date/date.style.js +5 -2
  38. package/lib/components/detail/detail.component.d.ts +19 -0
  39. package/lib/components/detail/detail.component.js +178 -47
  40. package/lib/components/detail/detail.style.d.ts +10 -0
  41. package/lib/components/detail/index.d.ts +2 -1
  42. package/lib/components/drawer/drawer.component.d.ts +1 -1
  43. package/lib/components/icon/icon.component.js +1 -1
  44. package/lib/components/menu/index.d.ts +1 -0
  45. package/lib/components/tabs/__internal__/tab-title/index.d.ts +2 -1
  46. package/lib/components/tabs/__internal__/tab-title/index.js +10 -2
  47. package/lib/components/tabs/__internal__/tab-title/tab-title.component.d.ts +37 -3
  48. package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +99 -97
  49. package/lib/components/tabs/__internal__/tab-title/tab-title.style.d.ts +18 -4
  50. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +17 -53
  51. package/lib/components/tabs/__internal__/tabs-header/index.d.ts +2 -1
  52. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +13 -0
  53. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +8 -8
  54. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -6
  55. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +9 -31
  56. package/lib/components/tabs/index.d.ts +3 -2
  57. package/lib/components/tabs/tab/index.d.ts +2 -2
  58. package/lib/components/tabs/tab/tab.component.d.ts +53 -0
  59. package/lib/components/tabs/tab/tab.component.js +181 -64
  60. package/lib/components/tabs/tab/tab.style.d.ts +8 -1
  61. package/lib/components/tabs/tab/tab.style.js +1 -7
  62. package/lib/components/tabs/tabs.component.d.ts +49 -0
  63. package/lib/components/tabs/tabs.component.js +188 -73
  64. package/lib/components/tabs/tabs.style.d.ts +5 -1
  65. package/lib/components/tabs/tabs.style.js +2 -9
  66. package/lib/components/textbox/textbox.component.d.ts +1 -1
  67. package/package.json +1 -1
  68. package/esm/components/detail/detail.d.ts +0 -16
  69. package/esm/components/tabs/__internal__/tab-title/tab-title.d.ts +0 -47
  70. package/esm/components/tabs/__internal__/tabs-header/tab-header.d.ts +0 -16
  71. package/esm/components/tabs/tab/tab.d.ts +0 -54
  72. package/esm/components/tabs/tabs.d.ts +0 -51
  73. package/lib/components/detail/detail.d.ts +0 -16
  74. package/lib/components/tabs/__internal__/tab-title/tab-title.d.ts +0 -47
  75. package/lib/components/tabs/__internal__/tabs-header/tab-header.d.ts +0 -16
  76. package/lib/components/tabs/tab/tab.d.ts +0 -54
  77. package/lib/components/tabs/tabs.d.ts +0 -51
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface DetailProps {
4
- /** Custom className */
5
- className?: string;
6
- /** The type of icon to use. */
7
- icon?: string;
8
- /** A small detail to display under the main content. */
9
- footnote?: string;
10
- /** The rendered children of the component. */
11
- children?: React.ReactNode;
12
- }
13
-
14
- declare class Detail extends React.Component<DetailProps> {}
15
-
16
- export default Detail;
@@ -1,47 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface TabTitleContextProps {
4
- isInTab?: boolean;
5
- }
6
-
7
- export interface TabTitleProps {
8
- /** Identifier used for testing purposes */
9
- "data-role"?: string;
10
- title: string;
11
- id?: string;
12
- dataTabId?: string;
13
- className?: string;
14
- children?: React.ReactNode;
15
- isTabSelected?: boolean;
16
- position?: "top" | "left";
17
- errorMessage?: string;
18
- warningMessage?: string;
19
- infoMessage?: string;
20
- errors?: boolean;
21
- warning?: boolean;
22
- info?: boolean;
23
- borders?: boolean;
24
- noLeftBorder?: boolean;
25
- noRightBorder?: boolean;
26
- alternateStyling?: boolean;
27
- isInSidebar?: boolean;
28
- siblings?: React.ReactNode[];
29
- titlePosition?: "before" | "after";
30
- href?: string;
31
- tabIndex?: string;
32
- size?: "default" | "large";
33
- align?: "left" | "right";
34
- customLayout?: React.ReactNode;
35
- onClick?: (
36
- ev: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>
37
- ) => void;
38
- onKeyDown?: (
39
- ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>
40
- ) => void;
41
- }
42
-
43
- declare const TabTitleContext: React.Context<TabTitleContextProps>;
44
- declare function TabTitle(props: TabTitleProps): JSX.Element;
45
-
46
- export { TabTitleContext };
47
- export default TabTitle;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface TabHeaderProps {
4
- role?: string;
5
- position?: "top" | "left";
6
- extendedLine?: boolean;
7
- noRightBorder?: boolean;
8
- alternateStyling?: boolean;
9
- isInSidebar?: boolean;
10
- children: React.ReactNode;
11
- align?: "left" | "right";
12
- }
13
-
14
- declare function TabHeader(props: TabHeaderProps): JSX.Element;
15
-
16
- export default TabHeader;
@@ -1,54 +0,0 @@
1
- import * as React from "react";
2
- import { PaddingProps } from "styled-system";
3
-
4
- export interface TabContextProps {
5
- setError?: (childId: string, error?: boolean | string) => void;
6
- setWarning?: (childId: string, warning?: boolean | string) => void;
7
- setInfo?: (childId: string, info?: boolean | string) => void;
8
- }
9
-
10
- export interface TabProps extends PaddingProps {
11
- title?: string;
12
- /** A unique ID to identify this specific tab. */
13
- tabId: string;
14
- className?: string;
15
- /** The child elements of Tab component. */
16
- children?: React.ReactNode;
17
- /** @ignore @private Boolean indicating selected state of Tab. */
18
- isTabSelected?: boolean;
19
- /** The position of the Tab. */
20
- position?: "top" | "left";
21
- /** Message displayed when Tab has error */
22
- errorMessage?: string;
23
- /** Message displayed when Tab has warning */
24
- warningMessage?: string;
25
- /** Message displayed when Tab has warning */
26
- infoMessage?: string;
27
- /** Additional content to display with title */
28
- siblings?: React.ReactNode[];
29
- /** Position title before or after siblings */
30
- titlePosition?: "before" | "after";
31
- /** Allows Tab to be a link */
32
- href?: string;
33
- /** Overrides default layout with a one defined in this prop */
34
- customLayout?: React.ReactNode;
35
- /** Additional props to be passed to the Tab's corresponding title. */
36
- titleProps?: {
37
- /** Identifier used for testing purposes */
38
- "data-role"?: string;
39
- };
40
- }
41
-
42
- export interface TabAllProps {
43
- role?: string;
44
- ariaLabelledby?: string;
45
- updateErrors?: (id: string, hasError: boolean) => void;
46
- updateWarnings?: (id: string, hasWarning: boolean) => void;
47
- updateInfos?: (id: string, hasInfo: boolean) => void;
48
- }
49
-
50
- declare const TabContext: React.Context<TabContextProps>;
51
- declare function Tab(props: TabProps): JSX.Element;
52
-
53
- export { TabContext };
54
- export default Tab;
@@ -1,51 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import Tab from "./tab";
4
-
5
- export interface TabsProps extends MarginProps {
6
- className?: string;
7
- /** Prevent rendering of hidden tabs, by default this is set to true and therefore all tabs will be rendered */
8
- renderHiddenTabs?: boolean;
9
- /** Allows manual control over the currently selected tab. */
10
- selectedTabId?: string;
11
- /** The child elements of Tabs need to be Tab components. */
12
- children: React.ReactNode[] | React.ReactNode;
13
- /** Sets the alignment of the tab titles. Possible values include. */
14
- align?: "left" | "right";
15
- /** A callback for when a tab is changed. You can use this to manually control
16
- * tab changing or to fire other events when a tab is changed.
17
- */
18
- onTabChange?: (tabId: string) => void;
19
- /** The position of the tab title. */
20
- position?: "top" | "left";
21
- /** Sets size of the tab titles. */
22
- size?: "default" | "large";
23
- /** Sets the divider of the tab titles header to extend the full width of the parent. */
24
- extendedLine?: boolean;
25
- /** Adds a combination of borders to the tab titles. */
26
- borders?: "off" | "on" | "no left side" | "no right side" | "no sides";
27
- /** Adds an alternate styling variant to the tab titles. */
28
- variant?: "default" | "alternate";
29
- /** sets width to the tab headers. Can be any valid CSS string.
30
- * The headerWidth prop works only for `position="left"`
31
- */
32
- headerWidth?: string;
33
- /** An object to support overriding validation statuses, when the Tabs have custom targets for example.
34
- * The `id` property should match the `tabId`s for the rendered Tabs.
35
- */
36
- validationStatusOverride?: {
37
- [id: string]: {
38
- error?: boolean;
39
- warning?: boolean;
40
- info?: boolean;
41
- };
42
- };
43
- /** When this prop is set any string validation failures in the children of each Tab
44
- * will be summaraised in the Tooltip next to the Tab title
45
- */
46
- showValidationsSummary?: boolean;
47
- }
48
-
49
- declare function Tabs(props: TabsProps): JSX.Element;
50
-
51
- export { Tabs, Tab };