@moda/om 17.9.1 → 17.10.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.
@@ -4,5 +4,6 @@ import './Modal.scss';
4
4
  export declare type ModalProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  onClose(): void;
6
6
  shards?: ComponentProps<typeof FocusOn>['shards'];
7
+ autoFocus?: boolean;
7
8
  };
8
9
  export declare const Modal: React.FC<ModalProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "17.9.1",
3
+ "version": "17.10.0",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -7,11 +7,19 @@ import './Modal.scss';
7
7
  export type ModalProps = React.HTMLAttributes<HTMLDivElement> & {
8
8
  onClose(): void;
9
9
  shards?: ComponentProps<typeof FocusOn>['shards'];
10
+ autoFocus?: boolean;
10
11
  };
11
12
 
12
- export const Modal: React.FC<ModalProps> = ({ className, children, onClose, shards, ...rest }) => (
13
+ export const Modal: React.FC<ModalProps> = ({
14
+ className,
15
+ children,
16
+ onClose,
17
+ shards,
18
+ autoFocus,
19
+ ...rest
20
+ }) => (
13
21
  <div className={classNames('Modal', className)} {...rest}>
14
- <FocusOn shards={shards} onClickOutside={onClose} onEscapeKey={onClose}>
22
+ <FocusOn autoFocus={autoFocus} shards={shards} onClickOutside={onClose} onEscapeKey={onClose}>
15
23
  {children}
16
24
  </FocusOn>
17
25
  </div>