@deque/cauldron-react 5.8.1-canary.338509e3 → 5.8.1-canary.35635051
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.
- package/README.md +20 -10
- package/lib/components/Alert/index.d.ts +4 -2
- package/lib/components/Dialog/index.d.ts +9 -2
- package/lib/components/Modal/index.d.ts +4 -2
- package/lib/index.js +16 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Cauldron React
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Friends don’t let friends ship inaccessible code! Cauldron is designed with accessibility in mind, including styles covering everything from typography to colors, and React components that are designed to be inclusive of all users. Additionally, Cauldron's React components are designed to include full screen reader and keyboard navigation support.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
To start using Cauldron React, install the packages with your package manager of choice:
|
|
8
|
+
|
|
9
|
+
### npm
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
npm install @deque/cauldron-react @deque/cauldron-styles
|
|
7
13
|
```
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
### yarn
|
|
10
16
|
|
|
11
|
-
```
|
|
12
|
-
|
|
17
|
+
```js
|
|
18
|
+
yarn add @deque/cauldron-react @deque/cauldron-styles
|
|
13
19
|
```
|
|
14
20
|
|
|
15
|
-
##
|
|
21
|
+
## Getting Started
|
|
22
|
+
|
|
23
|
+
To get started, follow our [usage guide](https://cauldron.dequelabs.com/#usage) that includes setup instructions and necessary dependencies. Further documentation is also available at [cauldron.dequelabs.com](https://cauldron.dequelabs.com) that includes documentation for every available Cauldron component.
|
|
24
|
+
|
|
25
|
+
## Contribute
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
If you're interested in contributing to Cauldron, you can check out our [contribution guide](https://github.com/dequelabs/cauldron/blob/develop/CONTRIBUTING.md) as well as our [code of conduct](https://github.com/dequelabs/cauldron/blob/develop/CODE_OF_CONDUCT.md).
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
Did you find a bug or have a feature request? [Open an issue!](https://github.com/dequelabs/cauldron/issues/new/choose)
|
|
@@ -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 }:
|
|
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 }:
|
|
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 }:
|
|
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 }:
|
|
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 }:
|
|
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 }:
|
|
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
|
|
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
|
|
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) {
|
package/package.json
CHANGED