carbon-react 114.0.0 → 114.1.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 (61) hide show
  1. package/esm/__internal__/utils/helpers/events/events.d.ts +5 -0
  2. package/esm/__internal__/utils/helpers/events/events.js +7 -0
  3. package/esm/__spec_helper__/mock-match-media.d.ts +4 -7
  4. package/esm/__spec_helper__/mock-match-media.js +4 -4
  5. package/esm/components/i18n-provider/i18n-provider.component.js +3 -0
  6. package/esm/components/pod/index.d.ts +2 -2
  7. package/esm/components/pod/pod.component.d.ts +47 -0
  8. package/esm/components/pod/pod.component.js +289 -258
  9. package/esm/components/pod/pod.config.d.ts +6 -0
  10. package/esm/components/pod/pod.config.js +2 -2
  11. package/esm/components/pod/pod.style.d.ts +44 -0
  12. package/esm/components/pod/pod.style.js +151 -103
  13. package/esm/components/show-edit-pod/show-edit-pod.style.js +1 -1
  14. package/esm/components/tile/index.d.ts +2 -1
  15. package/esm/components/tile/tile-footer/index.d.ts +2 -1
  16. package/esm/components/tile/tile-footer/tile-footer.component.d.ts +9 -0
  17. package/esm/components/tile/tile-footer/tile-footer.component.js +160 -8
  18. package/esm/components/tile/tile-footer/tile-footer.style.d.ts +5 -0
  19. package/esm/components/tile/tile.component.d.ts +29 -0
  20. package/esm/components/tile/tile.component.js +330 -44
  21. package/esm/components/tile/tile.config.d.ts +2 -0
  22. package/esm/components/tile/tile.style.d.ts +12 -0
  23. package/esm/components/tile/tile.style.js +13 -21
  24. package/esm/hooks/useMediaQuery/useMediaQuery.js +2 -2
  25. package/esm/locales/en-gb.js +3 -0
  26. package/esm/locales/locale.d.ts +3 -0
  27. package/esm/locales/pl-pl.js +3 -0
  28. package/lib/__internal__/utils/helpers/events/events.d.ts +5 -0
  29. package/lib/__internal__/utils/helpers/events/events.js +7 -0
  30. package/lib/__spec_helper__/mock-match-media.d.ts +4 -7
  31. package/lib/__spec_helper__/mock-match-media.js +4 -4
  32. package/lib/components/i18n-provider/i18n-provider.component.js +3 -0
  33. package/lib/components/pod/index.d.ts +2 -2
  34. package/lib/components/pod/pod.component.d.ts +47 -0
  35. package/lib/components/pod/pod.component.js +292 -259
  36. package/lib/components/pod/pod.config.d.ts +6 -0
  37. package/lib/components/pod/pod.config.js +4 -4
  38. package/lib/components/pod/pod.style.d.ts +44 -0
  39. package/lib/components/pod/pod.style.js +153 -106
  40. package/lib/components/show-edit-pod/show-edit-pod.style.js +4 -4
  41. package/lib/components/tile/index.d.ts +2 -1
  42. package/lib/components/tile/tile-footer/index.d.ts +2 -1
  43. package/lib/components/tile/tile-footer/tile-footer.component.d.ts +9 -0
  44. package/lib/components/tile/tile-footer/tile-footer.component.js +157 -11
  45. package/lib/components/tile/tile-footer/tile-footer.style.d.ts +5 -0
  46. package/lib/components/tile/tile.component.d.ts +29 -0
  47. package/lib/components/tile/tile.component.js +329 -46
  48. package/lib/components/tile/tile.config.d.ts +2 -0
  49. package/lib/components/tile/tile.style.d.ts +12 -0
  50. package/lib/components/tile/tile.style.js +13 -22
  51. package/lib/hooks/useMediaQuery/useMediaQuery.js +2 -2
  52. package/lib/locales/en-gb.js +3 -0
  53. package/lib/locales/locale.d.ts +3 -0
  54. package/lib/locales/pl-pl.js +3 -0
  55. package/package.json +6 -16
  56. package/esm/components/pod/pod.d.ts +0 -55
  57. package/esm/components/tile/tile-footer/tile-footer.d.ts +0 -13
  58. package/esm/components/tile/tile.d.ts +0 -46
  59. package/lib/components/pod/pod.d.ts +0 -55
  60. package/lib/components/tile/tile-footer/tile-footer.d.ts +0 -13
  61. package/lib/components/tile/tile.d.ts +0 -46
@@ -1,55 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface PodProps {
4
- /** Enables/disables the border around the pod. */
5
- border?: boolean;
6
- /** Children elements */
7
- children?: React.ReactNode;
8
- /** Custom className */
9
- className?: string;
10
- /** Determines the padding around the pod */
11
- size?: "none" | "extra-small" | "small" | "medium" | "large" | "extra-large";
12
- /** Prop to apply a theme to the Pod */
13
- variant?: "primary" | "secondary" | "tertiary" | "tile" | "transparent";
14
- /** Title for the pod h4 element always shown */
15
- title?: string | React.ReactNode;
16
- /** Optional subtitle for the pod */
17
- subtitle?: string;
18
- /** Aligns the title to left, right or center */
19
- alignTitle?: "left" | "center" | "right";
20
- /** A component to render as a Pod footer */
21
- footer?: string | React.ReactNode;
22
- /** Supplies an edit action to the pod */
23
- onEdit?:
24
- | string
25
- | Record<string, unknown>
26
- | ((
27
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
28
- ) => void);
29
- /** Supplies a delete action to the pod */
30
- onDelete?: (
31
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
32
- ) => void;
33
- /** Supplies an undo action to the pod in soft delete state. */
34
- onUndo?: (
35
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
36
- ) => void;
37
- /** Sets soft delete state */
38
- softDelete?: boolean;
39
- /** Determines if the editable pod content should be full width */
40
- editContentFullWidth?: boolean;
41
- /** Determines if the edit button should be hidden until the user hovers over the content */
42
- displayEditButtonOnHover?: boolean;
43
- /** Determines if clicking the pod content calls the onEdit action */
44
- triggerEditOnContent?: boolean;
45
- /** Resets edit button styles to an older version */
46
- internalEditButton?: boolean;
47
- /** Sets Pod height, number is changed to pixels and string is passed as raw css value */
48
- height?: string | number;
49
- }
50
-
51
- declare function Pod(
52
- props: PodProps & React.RefAttributes<HTMLElement>
53
- ): JSX.Element;
54
-
55
- export default Pod;
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { PaddingProps } from "styled-system";
3
-
4
- export interface TileFooterProps extends PaddingProps {
5
- /** set which background color variant should be used */
6
- variant?: "default" | "black" | "transparent";
7
- }
8
-
9
- declare function TileFooter(
10
- props: React.PropsWithChildren<TileFooterProps>
11
- ): JSX.Element;
12
-
13
- export default TileFooter;
@@ -1,46 +0,0 @@
1
- import * as React from "react";
2
- import { SpaceProps } from "styled-system";
3
-
4
- export interface TileProps extends SpaceProps {
5
- /** Sets the theme of the tile - either 'tile', 'transparent' or 'active' */
6
- variant?: "tile" | "transparent" | "active";
7
- /**
8
- * The content to render within the tile. Each child will be wrapped with
9
- * a TileContent wrapper, which allows any individual child component to take a
10
- * percentage-based width prop, dictating the percentage of the tile width it will take up.
11
- *
12
- * Width will have no effect on a child component if the tile orientation is set to 'vertical'.
13
- */
14
- children?: React.ReactNode;
15
- /** The orientation of the tile - set to either horizontal or vertical */
16
- orientation?: "horizontal" | "vertical";
17
- /**
18
- * Set a pixel with for the Tile component. If both are set to non-zero values, this
19
- * takes precedence over the percentage-based "width" prop.
20
- */
21
- pixelWidth?: number;
22
- /**
23
- * Set a percentage-based width for the whole Tile component, relative to its parent.
24
- * If unset or zero, this will default to 100%.
25
- */
26
- width?: string | number;
27
- /** Sets the border width by using these design tokens */
28
- borderWidth?:
29
- | "borderWidth000"
30
- | "borderWidth100"
31
- | "borderWidth200"
32
- | "borderWidth300"
33
- | "borderWidth400";
34
- /** Sets the border variant that should be used */
35
- borderVariant?:
36
- | "default"
37
- | "selected"
38
- | "positive"
39
- | "negative"
40
- | "caution"
41
- | "info";
42
- }
43
-
44
- declare function Tile(props: TileProps): JSX.Element;
45
-
46
- export default Tile;
@@ -1,55 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface PodProps {
4
- /** Enables/disables the border around the pod. */
5
- border?: boolean;
6
- /** Children elements */
7
- children?: React.ReactNode;
8
- /** Custom className */
9
- className?: string;
10
- /** Determines the padding around the pod */
11
- size?: "none" | "extra-small" | "small" | "medium" | "large" | "extra-large";
12
- /** Prop to apply a theme to the Pod */
13
- variant?: "primary" | "secondary" | "tertiary" | "tile" | "transparent";
14
- /** Title for the pod h4 element always shown */
15
- title?: string | React.ReactNode;
16
- /** Optional subtitle for the pod */
17
- subtitle?: string;
18
- /** Aligns the title to left, right or center */
19
- alignTitle?: "left" | "center" | "right";
20
- /** A component to render as a Pod footer */
21
- footer?: string | React.ReactNode;
22
- /** Supplies an edit action to the pod */
23
- onEdit?:
24
- | string
25
- | Record<string, unknown>
26
- | ((
27
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
28
- ) => void);
29
- /** Supplies a delete action to the pod */
30
- onDelete?: (
31
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
32
- ) => void;
33
- /** Supplies an undo action to the pod in soft delete state. */
34
- onUndo?: (
35
- ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>
36
- ) => void;
37
- /** Sets soft delete state */
38
- softDelete?: boolean;
39
- /** Determines if the editable pod content should be full width */
40
- editContentFullWidth?: boolean;
41
- /** Determines if the edit button should be hidden until the user hovers over the content */
42
- displayEditButtonOnHover?: boolean;
43
- /** Determines if clicking the pod content calls the onEdit action */
44
- triggerEditOnContent?: boolean;
45
- /** Resets edit button styles to an older version */
46
- internalEditButton?: boolean;
47
- /** Sets Pod height, number is changed to pixels and string is passed as raw css value */
48
- height?: string | number;
49
- }
50
-
51
- declare function Pod(
52
- props: PodProps & React.RefAttributes<HTMLElement>
53
- ): JSX.Element;
54
-
55
- export default Pod;
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { PaddingProps } from "styled-system";
3
-
4
- export interface TileFooterProps extends PaddingProps {
5
- /** set which background color variant should be used */
6
- variant?: "default" | "black" | "transparent";
7
- }
8
-
9
- declare function TileFooter(
10
- props: React.PropsWithChildren<TileFooterProps>
11
- ): JSX.Element;
12
-
13
- export default TileFooter;
@@ -1,46 +0,0 @@
1
- import * as React from "react";
2
- import { SpaceProps } from "styled-system";
3
-
4
- export interface TileProps extends SpaceProps {
5
- /** Sets the theme of the tile - either 'tile', 'transparent' or 'active' */
6
- variant?: "tile" | "transparent" | "active";
7
- /**
8
- * The content to render within the tile. Each child will be wrapped with
9
- * a TileContent wrapper, which allows any individual child component to take a
10
- * percentage-based width prop, dictating the percentage of the tile width it will take up.
11
- *
12
- * Width will have no effect on a child component if the tile orientation is set to 'vertical'.
13
- */
14
- children?: React.ReactNode;
15
- /** The orientation of the tile - set to either horizontal or vertical */
16
- orientation?: "horizontal" | "vertical";
17
- /**
18
- * Set a pixel with for the Tile component. If both are set to non-zero values, this
19
- * takes precedence over the percentage-based "width" prop.
20
- */
21
- pixelWidth?: number;
22
- /**
23
- * Set a percentage-based width for the whole Tile component, relative to its parent.
24
- * If unset or zero, this will default to 100%.
25
- */
26
- width?: string | number;
27
- /** Sets the border width by using these design tokens */
28
- borderWidth?:
29
- | "borderWidth000"
30
- | "borderWidth100"
31
- | "borderWidth200"
32
- | "borderWidth300"
33
- | "borderWidth400";
34
- /** Sets the border variant that should be used */
35
- borderVariant?:
36
- | "default"
37
- | "selected"
38
- | "positive"
39
- | "negative"
40
- | "caution"
41
- | "info";
42
- }
43
-
44
- declare function Tile(props: TileProps): JSX.Element;
45
-
46
- export default Tile;