carbon-react 111.4.2 → 111.5.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 (57) hide show
  1. package/esm/components/box/box.component.js +1 -0
  2. package/esm/components/card/card-column/card-column.component.d.ts +11 -0
  3. package/esm/components/card/card-column/card-column.component.js +7 -13
  4. package/esm/components/card/card-column/card-column.style.d.ts +7 -0
  5. package/esm/components/card/card-column/card-column.style.js +0 -7
  6. package/esm/components/card/card-column/index.d.ts +2 -1
  7. package/esm/components/card/card-footer/card-footer.component.d.ts +11 -0
  8. package/esm/components/card/card-footer/card-footer.component.js +320 -10
  9. package/esm/components/card/card-footer/card-footer.style.d.ts +10 -0
  10. package/esm/components/card/card-footer/card-footer.style.js +0 -10
  11. package/esm/components/card/card-footer/index.d.ts +2 -1
  12. package/esm/components/card/card-row/card-row.component.d.ts +11 -0
  13. package/esm/components/card/card-row/card-row.component.js +161 -17
  14. package/esm/components/card/card-row/card-row.style.d.ts +11 -0
  15. package/esm/components/card/card-row/card-row.style.js +16 -8
  16. package/esm/components/card/card-row/index.d.ts +2 -1
  17. package/esm/components/card/card.component.d.ts +31 -0
  18. package/esm/components/card/card.component.js +208 -69
  19. package/esm/components/card/card.config.d.ts +4 -0
  20. package/esm/components/card/card.config.js +2 -3
  21. package/esm/components/card/card.style.d.ts +10 -0
  22. package/esm/components/card/card.style.js +0 -11
  23. package/esm/components/card/index.d.ts +5 -1
  24. package/lib/components/box/box.component.js +1 -0
  25. package/lib/components/card/card-column/card-column.component.d.ts +11 -0
  26. package/lib/components/card/card-column/card-column.component.js +7 -13
  27. package/lib/components/card/card-column/card-column.style.d.ts +7 -0
  28. package/lib/components/card/card-column/card-column.style.js +0 -8
  29. package/lib/components/card/card-column/index.d.ts +2 -1
  30. package/lib/components/card/card-footer/card-footer.component.d.ts +11 -0
  31. package/lib/components/card/card-footer/card-footer.component.js +320 -10
  32. package/lib/components/card/card-footer/card-footer.style.d.ts +10 -0
  33. package/lib/components/card/card-footer/card-footer.style.js +0 -13
  34. package/lib/components/card/card-footer/index.d.ts +2 -1
  35. package/lib/components/card/card-row/card-row.component.d.ts +11 -0
  36. package/lib/components/card/card-row/card-row.component.js +162 -20
  37. package/lib/components/card/card-row/card-row.style.d.ts +11 -0
  38. package/lib/components/card/card-row/card-row.style.js +18 -7
  39. package/lib/components/card/card-row/index.d.ts +2 -1
  40. package/lib/components/card/card.component.d.ts +31 -0
  41. package/lib/components/card/card.component.js +213 -71
  42. package/lib/components/card/card.config.d.ts +4 -0
  43. package/lib/components/card/card.config.js +4 -5
  44. package/lib/components/card/card.style.d.ts +10 -0
  45. package/lib/components/card/card.style.js +0 -13
  46. package/lib/components/card/index.d.ts +5 -1
  47. package/package.json +1 -1
  48. package/esm/components/card/card-column/card-column.d.ts +0 -11
  49. package/esm/components/card/card-footer/card-footer.d.ts +0 -16
  50. package/esm/components/card/card-row/card-row.d.ts +0 -16
  51. package/esm/components/card/card-types.d.ts +0 -1
  52. package/esm/components/card/card.d.ts +0 -22
  53. package/lib/components/card/card-column/card-column.d.ts +0 -11
  54. package/lib/components/card/card-footer/card-footer.d.ts +0 -16
  55. package/lib/components/card/card-row/card-row.d.ts +0 -16
  56. package/lib/components/card/card-types.d.ts +0 -1
  57. package/lib/components/card/card.d.ts +0 -22
@@ -0,0 +1,10 @@
1
+ import { MarginProps } from "styled-system";
2
+ import { CardSpacing } from "./card.config";
3
+ export interface StyledCardProps extends MarginProps {
4
+ cardWidth: string;
5
+ interactive: boolean;
6
+ draggable: boolean;
7
+ spacing: CardSpacing;
8
+ }
9
+ declare const StyledCard: import("styled-components").StyledComponent<"div", any, StyledCardProps, never>;
10
+ export default StyledCard;
@@ -7,14 +7,10 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
10
  var _styledSystem = require("styled-system");
13
11
 
14
12
  var _base = _interopRequireDefault(require("../../style/themes/base"));
15
13
 
16
- var _card = require("./card.config");
17
-
18
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
15
 
20
16
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -64,16 +60,7 @@ const StyledCard = _styledComponents.default.div`
64
60
  `}
65
61
  `;
66
62
  StyledCard.defaultProps = {
67
- cardWidth: "500px",
68
- spacing: "medium",
69
63
  theme: _base.default
70
64
  };
71
- StyledCard.propTypes = {
72
- cardWidth: _propTypes.default.string,
73
- interactive: _propTypes.default.bool,
74
- draggable: _propTypes.default.bool,
75
- spacing: _propTypes.default.oneOf(_card.CARD_SIZES),
76
- theme: _propTypes.default.object
77
- };
78
65
  var _default = StyledCard;
79
66
  exports.default = _default;
@@ -1,4 +1,8 @@
1
- export { default, default as Card } from "./card";
1
+ export { default, default as Card } from "./card.component";
2
+ export type { CardProps } from "./card.component";
2
3
  export { default as CardColumn } from "./card-column";
4
+ export type { CardColumnProps } from "./card-column";
3
5
  export { default as CardFooter } from "./card-footer";
6
+ export type { CardFooterProps } from "./card-footer";
4
7
  export { default as CardRow } from "./card-row";
8
+ export type { CardRowProps } from "./card-row";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "111.4.2",
3
+ "version": "111.5.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface CardColumnProps {
4
- children: React.ReactNode;
5
- /** text alignment of the card section text */
6
- align?: "left" | "center" | "right";
7
- }
8
-
9
- declare function CardColumn(props: CardColumnProps): JSX.Element;
10
-
11
- export default CardColumn;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import { SpaceProps } from "styled-system";
3
- import { CardSizes } from "../card-types";
4
-
5
- export interface CardFooterProps extends SpaceProps {
6
- children: React.ReactNode;
7
- /**
8
- * Predefined size of CardFooter for applying padding (small | medium | large).
9
- * For more granular control these can be over-ridden by Spacing props from styled-system.
10
- */
11
- spacing?: CardSizes;
12
- }
13
-
14
- declare function CardFooter(props: CardFooterProps): JSX.Element;
15
-
16
- export default CardFooter;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import { PaddingProps } from "styled-system";
3
- import { CardSizes } from "../card-types";
4
-
5
- export interface CardRowProps extends PaddingProps {
6
- children: React.ReactNode;
7
- /**
8
- * Spacing prop is set in Card and defines the padding for the CardRow (the first CardRow has no padding by default).
9
- * For more granular control of CardRow padding these can be over-ridden by Padding props from styled-system.
10
- */
11
- spacing?: CardSizes;
12
- }
13
-
14
- declare function CardRow(props: CardRowProps): JSX.Element;
15
-
16
- export default CardRow;
@@ -1 +0,0 @@
1
- export type CardSizes = "small" | "medium" | "large";
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { CardSizes } from "./card-types";
4
-
5
- export interface CardProps extends MarginProps {
6
- /** action to be executed when card is clicked or enter pressed */
7
- action?: (ev: React.MouseEvent<HTMLDivElement>) => void;
8
- children: React.ReactNode;
9
- /** style value for width of card */
10
- cardWidth?: string;
11
- /** flag to indicate if card is interactive */
12
- interactive?: boolean;
13
- /** flag to indicate if card is draggable */
14
- draggable?: boolean;
15
- /** size of card for applying padding (small | medium | large) */
16
- spacing?: CardSizes;
17
- dataRole?: string;
18
- }
19
-
20
- declare function Card(props: CardProps): JSX.Element;
21
-
22
- export default Card;
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface CardColumnProps {
4
- children: React.ReactNode;
5
- /** text alignment of the card section text */
6
- align?: "left" | "center" | "right";
7
- }
8
-
9
- declare function CardColumn(props: CardColumnProps): JSX.Element;
10
-
11
- export default CardColumn;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import { SpaceProps } from "styled-system";
3
- import { CardSizes } from "../card-types";
4
-
5
- export interface CardFooterProps extends SpaceProps {
6
- children: React.ReactNode;
7
- /**
8
- * Predefined size of CardFooter for applying padding (small | medium | large).
9
- * For more granular control these can be over-ridden by Spacing props from styled-system.
10
- */
11
- spacing?: CardSizes;
12
- }
13
-
14
- declare function CardFooter(props: CardFooterProps): JSX.Element;
15
-
16
- export default CardFooter;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import { PaddingProps } from "styled-system";
3
- import { CardSizes } from "../card-types";
4
-
5
- export interface CardRowProps extends PaddingProps {
6
- children: React.ReactNode;
7
- /**
8
- * Spacing prop is set in Card and defines the padding for the CardRow (the first CardRow has no padding by default).
9
- * For more granular control of CardRow padding these can be over-ridden by Padding props from styled-system.
10
- */
11
- spacing?: CardSizes;
12
- }
13
-
14
- declare function CardRow(props: CardRowProps): JSX.Element;
15
-
16
- export default CardRow;
@@ -1 +0,0 @@
1
- export type CardSizes = "small" | "medium" | "large";
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { CardSizes } from "./card-types";
4
-
5
- export interface CardProps extends MarginProps {
6
- /** action to be executed when card is clicked or enter pressed */
7
- action?: (ev: React.MouseEvent<HTMLDivElement>) => void;
8
- children: React.ReactNode;
9
- /** style value for width of card */
10
- cardWidth?: string;
11
- /** flag to indicate if card is interactive */
12
- interactive?: boolean;
13
- /** flag to indicate if card is draggable */
14
- draggable?: boolean;
15
- /** size of card for applying padding (small | medium | large) */
16
- spacing?: CardSizes;
17
- dataRole?: string;
18
- }
19
-
20
- declare function Card(props: CardProps): JSX.Element;
21
-
22
- export default Card;