@deque/cauldron-react 5.8.1-canary.715fc3ac → 5.8.1-canary.8f4cfabf

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.
@@ -5,19 +5,21 @@ interface AlertProps extends Omit<DialogProps, 'forceAction' | 'closeButtonText'
5
5
  }
6
6
  declare const Alert: ({ children, className, variant, heading, ...other }: AlertProps) => React.JSX.Element;
7
7
  declare const AlertContent: {
8
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
8
+ ({ children, className, align, ...other }: import("../Dialog").DialogContentProps): React.JSX.Element;
9
9
  displayName: string;
10
10
  propTypes: {
11
11
  className: import("prop-types").Requireable<string>;
12
12
  children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
13
+ align: import("prop-types").Requireable<string>;
13
14
  };
14
15
  };
15
16
  declare const AlertActions: {
16
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
17
+ ({ children, className, align, ...other }: import("../Dialog").DialogFooterProps): React.JSX.Element;
17
18
  displayName: string;
18
19
  propTypes: {
19
20
  className: import("prop-types").Requireable<string>;
20
21
  children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
22
+ align: import("prop-types").Requireable<string>;
21
23
  };
22
24
  };
23
25
  export default Alert;
@@ -48,20 +48,27 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
48
48
  handleClickOutside(): void;
49
49
  focusHeading(): void;
50
50
  }
51
+ interface DialogAlignmentProps {
52
+ align?: 'left' | 'center' | 'right';
53
+ }
54
+ export type DialogContentProps = React.HTMLAttributes<HTMLDivElement> & DialogAlignmentProps;
51
55
  declare const DialogContent: {
52
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
56
+ ({ children, className, align, ...other }: DialogContentProps): React.JSX.Element;
53
57
  displayName: string;
54
58
  propTypes: {
55
59
  className: PropTypes.Requireable<string>;
56
60
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
61
+ align: PropTypes.Requireable<string>;
57
62
  };
58
63
  };
64
+ export type DialogFooterProps = React.HTMLAttributes<HTMLDivElement> & DialogAlignmentProps;
59
65
  declare const DialogFooter: {
60
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
66
+ ({ children, className, align, ...other }: DialogFooterProps): React.JSX.Element;
61
67
  displayName: string;
62
68
  propTypes: {
63
69
  className: PropTypes.Requireable<string>;
64
70
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
71
+ align: PropTypes.Requireable<string>;
65
72
  };
66
73
  };
67
74
  export { Dialog, DialogContent, DialogFooter };
@@ -5,19 +5,21 @@ interface ModalProps extends Omit<DialogProps, 'forceAction'> {
5
5
  }
6
6
  declare const Modal: ({ children, className, variant, ...other }: ModalProps) => React.JSX.Element;
7
7
  declare const ModalContent: {
8
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
8
+ ({ children, className, align, ...other }: import("../Dialog").DialogContentProps): React.JSX.Element;
9
9
  displayName: string;
10
10
  propTypes: {
11
11
  className: import("prop-types").Requireable<string>;
12
12
  children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
13
+ align: import("prop-types").Requireable<string>;
13
14
  };
14
15
  };
15
16
  declare const ModalFooter: {
16
- ({ children, className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
17
+ ({ children, className, align, ...other }: import("../Dialog").DialogFooterProps): React.JSX.Element;
17
18
  displayName: string;
18
19
  propTypes: {
19
20
  className: import("prop-types").Requireable<string>;
20
21
  children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
22
+ align: import("prop-types").Requireable<string>;
21
23
  };
22
24
  };
23
25
  export default Modal;
package/lib/index.js CHANGED
@@ -1664,22 +1664,32 @@ var Dialog = /** @class */ (function (_super) {
1664
1664
  return Dialog;
1665
1665
  }(React__default["default"].Component));
1666
1666
  var DialogContent = function (_a) {
1667
- var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
1668
- return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Dialog__content', className) }, other), children));
1667
+ var children = _a.children, className = _a.className, align = _a.align, other = tslib.__rest(_a, ["children", "className", "align"]);
1668
+ return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Dialog__content', className, {
1669
+ 'text--align-left': align === 'left',
1670
+ 'text--align-center': align === 'center',
1671
+ 'text--align-right': align === 'right'
1672
+ }) }, other), children));
1669
1673
  };
1670
1674
  DialogContent.displayName = 'DialogContent';
1671
1675
  DialogContent.propTypes = {
1672
1676
  className: PropTypes__default["default"].string,
1673
- children: PropTypes__default["default"].node
1677
+ children: PropTypes__default["default"].node,
1678
+ align: PropTypes__default["default"].string
1674
1679
  };
1675
1680
  var DialogFooter = function (_a) {
1676
- var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
1677
- return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Dialog__footer', className) }, other), children));
1681
+ var children = _a.children, className = _a.className, align = _a.align, other = tslib.__rest(_a, ["children", "className", "align"]);
1682
+ return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Dialog__footer', className, {
1683
+ 'text--align-left': align === 'left',
1684
+ 'text--align-center': align === 'center',
1685
+ 'text--align-right': align === 'right'
1686
+ }) }, other), children));
1678
1687
  };
1679
1688
  DialogFooter.displayName = 'DialogFooter';
1680
1689
  DialogFooter.propTypes = {
1681
1690
  className: PropTypes__default["default"].string,
1682
- children: PropTypes__default["default"].node
1691
+ children: PropTypes__default["default"].node,
1692
+ align: PropTypes__default["default"].string
1683
1693
  };
1684
1694
 
1685
1695
  var Alert = function (_a) {
@@ -1813,7 +1823,10 @@ function Tooltip(_a) {
1813
1823
  placement: initialPlacement,
1814
1824
  modifiers: [
1815
1825
  { name: 'preventOverflow', options: { padding: 8 } },
1816
- { name: 'flip' },
1826
+ {
1827
+ name: 'flip',
1828
+ options: { fallbackPlacements: ['left', 'right', 'top', 'bottom'] }
1829
+ },
1817
1830
  { name: 'offset', options: { offset: [0, 8] } },
1818
1831
  { name: 'arrow', options: { padding: 5, element: arrowElement } }
1819
1832
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "5.8.1-canary.715fc3ac",
3
+ "version": "5.8.1-canary.8f4cfabf",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Fully accessible react components library for Deque Cauldron",
6
6
  "homepage": "https://cauldron.dequelabs.com/",