@instructure/ui-modal 8.8.1-snapshot.3 → 8.9.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 (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/Modal/ModalBody/index.js +7 -18
  3. package/{src/Modal/ModalBody/types.ts → es/Modal/ModalBody/props.js} +12 -13
  4. package/es/Modal/ModalFooter/index.js +5 -10
  5. package/{src/Modal/ModalFooter/types.ts → es/Modal/ModalFooter/props.js} +7 -6
  6. package/es/Modal/ModalHeader/index.js +5 -10
  7. package/{src/Modal/ModalHeader/types.ts → es/Modal/ModalHeader/props.js} +7 -10
  8. package/es/Modal/index.js +6 -134
  9. package/es/Modal/props.js +157 -0
  10. package/lib/Modal/ModalBody/index.js +7 -18
  11. package/lib/Modal/ModalBody/props.js +47 -0
  12. package/lib/Modal/ModalFooter/index.js +6 -11
  13. package/lib/Modal/ModalFooter/props.js +41 -0
  14. package/lib/Modal/ModalHeader/index.js +6 -11
  15. package/lib/Modal/ModalHeader/props.js +41 -0
  16. package/lib/Modal/index.js +7 -138
  17. package/lib/Modal/props.js +175 -0
  18. package/package.json +21 -22
  19. package/src/Modal/ModalBody/index.tsx +8 -21
  20. package/src/Modal/{types.ts → ModalBody/props.ts} +38 -31
  21. package/src/Modal/ModalBody/styles.ts +1 -1
  22. package/src/Modal/ModalFooter/index.tsx +6 -13
  23. package/src/Modal/ModalFooter/props.ts +50 -0
  24. package/src/Modal/ModalFooter/styles.ts +1 -1
  25. package/src/Modal/ModalHeader/index.tsx +6 -13
  26. package/src/Modal/ModalHeader/props.ts +54 -0
  27. package/src/Modal/ModalHeader/styles.ts +1 -1
  28. package/src/Modal/index.tsx +7 -145
  29. package/src/Modal/props.ts +238 -0
  30. package/src/Modal/styles.ts +1 -1
  31. package/src/index.ts +4 -4
  32. package/types/Modal/ModalBody/index.d.ts +27 -14
  33. package/types/Modal/ModalBody/index.d.ts.map +1 -1
  34. package/types/Modal/ModalBody/props.d.ts +19 -0
  35. package/types/Modal/ModalBody/props.d.ts.map +1 -0
  36. package/types/Modal/ModalBody/styles.d.ts +1 -1
  37. package/types/Modal/ModalFooter/index.d.ts +9 -8
  38. package/types/Modal/ModalFooter/index.d.ts.map +1 -1
  39. package/types/Modal/ModalFooter/props.d.ts +15 -0
  40. package/types/Modal/ModalFooter/props.d.ts.map +1 -0
  41. package/types/Modal/ModalFooter/styles.d.ts +1 -1
  42. package/types/Modal/ModalHeader/index.d.ts +10 -9
  43. package/types/Modal/ModalHeader/index.d.ts.map +1 -1
  44. package/types/Modal/ModalHeader/props.d.ts +18 -0
  45. package/types/Modal/ModalHeader/props.d.ts.map +1 -0
  46. package/types/Modal/ModalHeader/styles.d.ts +1 -1
  47. package/types/Modal/index.d.ts +55 -110
  48. package/types/Modal/index.d.ts.map +1 -1
  49. package/types/Modal/{types.d.ts → props.d.ts} +13 -6
  50. package/types/Modal/{types.d.ts.map → props.d.ts.map} +1 -1
  51. package/types/Modal/styles.d.ts +1 -1
  52. package/types/index.d.ts +4 -4
  53. package/LICENSE.md +0 -27
  54. package/es/Modal/ModalBody/types.js +0 -1
  55. package/es/Modal/ModalFooter/types.js +0 -1
  56. package/es/Modal/ModalHeader/types.js +0 -1
  57. package/es/Modal/types.js +0 -1
  58. package/lib/Modal/ModalBody/types.js +0 -1
  59. package/lib/Modal/ModalFooter/types.js +0 -1
  60. package/lib/Modal/ModalHeader/types.js +0 -1
  61. package/lib/Modal/types.js +0 -1
  62. package/types/Modal/ModalBody/types.d.ts +0 -12
  63. package/types/Modal/ModalBody/types.d.ts.map +0 -1
  64. package/types/Modal/ModalFooter/types.d.ts +0 -6
  65. package/types/Modal/ModalFooter/types.d.ts.map +0 -1
  66. package/types/Modal/ModalHeader/types.d.ts +0 -9
  67. package/types/Modal/ModalHeader/types.d.ts.map +0 -1
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { ModalTheme } from '@instructure/shared-types'
26
- import { ModalProps } from './types'
26
+ import { ModalProps } from './props'
27
27
 
28
28
  /**
29
29
  * ---
package/src/index.ts CHANGED
@@ -23,7 +23,7 @@
23
23
  */
24
24
  export { Modal } from './Modal'
25
25
 
26
- export type { ModalProps } from './Modal/types'
27
- export type { ModalBodyProps } from './Modal/ModalBody/types'
28
- export type { ModalFooterProps } from './Modal/ModalFooter/types'
29
- export type { ModalHeaderProps } from './Modal/ModalHeader/types'
26
+ export type { ModalProps } from './Modal/props'
27
+ export type { ModalBodyProps } from './Modal/ModalBody/props'
28
+ export type { ModalFooterProps } from './Modal/ModalFooter/props'
29
+ export type { ModalHeaderProps } from './Modal/ModalHeader/props'
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { ModalBodyProps } from './types';
4
+ import type { ModalBodyProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Modal
@@ -11,23 +10,37 @@ id: Modal.Body
11
10
  **/
12
11
  declare class ModalBody extends Component<ModalBodyProps> {
13
12
  static readonly componentId = "Modal.Body";
14
- static propTypes: {
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- padding: (props: any, propName: any, componentName: any, location: any) => any;
17
- elementRef: PropTypes.Requireable<(...args: any[]) => any>;
18
- as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
19
- variant: PropTypes.Requireable<string>;
20
- overflow: PropTypes.Requireable<string>;
21
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
22
- styles: PropTypes.Requireable<object>;
23
- };
13
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
14
+ children?: import("react").ReactNode;
15
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
16
+ elementRef?: ((...args: any[]) => any) | undefined;
17
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
18
+ variant?: "default" | "inverse" | undefined; /**
19
+ ---
20
+ parent: Modal
21
+ id: Modal.Body
22
+ ---
23
+ **/
24
+ overflow?: "scroll" | "fit" | undefined;
25
+ }>;
26
+ static allowedProps: readonly (keyof {
27
+ children?: import("react").ReactNode;
28
+ padding?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
29
+ elementRef?: ((...args: any[]) => any) | undefined;
30
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
31
+ variant?: "default" | "inverse" | undefined; /**
32
+ ---
33
+ parent: Modal
34
+ id: Modal.Body
35
+ ---
36
+ **/
37
+ overflow?: "scroll" | "fit" | undefined;
38
+ })[];
24
39
  static defaultProps: {
25
40
  padding: string;
26
41
  as: string;
27
42
  variant: string;
28
43
  children: null;
29
- elementRef: undefined;
30
- overflow: undefined;
31
44
  };
32
45
  componentDidMount(): void;
33
46
  componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAMlC,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;GAKG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;;;;;MAYf;IAED,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CAiCP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;qDAXlB;;;;;WAKG;;OAM2B;IAC5B,MAAM,CAAC,YAAY;;;;;qDAZrB;;;;;WAKG;;SAOiC;IAClC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CAiCP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
3
+ import type { AsElementType, PropValidators } from '@instructure/shared-types';
4
+ declare type ModalBodyOwnProps = {
5
+ children?: React.ReactNode;
6
+ padding?: Spacing;
7
+ elementRef?: (...args: any[]) => any;
8
+ as?: AsElementType;
9
+ variant?: 'default' | 'inverse';
10
+ overflow?: 'scroll' | 'fit';
11
+ };
12
+ declare type PropKeys = keyof ModalBodyOwnProps;
13
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
14
+ declare type ModalBodyProps = ModalBodyOwnProps & WithStyleProps;
15
+ declare const propTypes: PropValidators<PropKeys>;
16
+ declare const allowedProps: AllowedPropKeys;
17
+ export type { ModalBodyProps };
18
+ export { propTypes, allowedProps };
19
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalBody/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE9E,aAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,iBAAiB,GAAG,cAAc,CAAA;AAExD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAOvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAOnB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ModalBodyTheme } from '@instructure/shared-types';
2
- import { ModalBodyProps } from './types';
2
+ import { ModalBodyProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { ModalFooterProps } from './types';
4
+ import type { ModalFooterProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Modal
@@ -11,12 +10,14 @@ id: Modal.Footer
11
10
  **/
12
11
  declare class ModalFooter extends Component<ModalFooterProps> {
13
12
  static readonly componentId = "Modal.Footer";
14
- static propTypes: {
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- variant: PropTypes.Requireable<string>;
17
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
18
- styles: PropTypes.Requireable<object>;
19
- };
13
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
14
+ children?: import("react").ReactNode;
15
+ variant?: "default" | "inverse" | undefined;
16
+ }>;
17
+ static allowedProps: readonly (keyof {
18
+ children?: import("react").ReactNode;
19
+ variant?: "default" | "inverse" | undefined;
20
+ })[];
20
21
  static defaultProps: {
21
22
  variant: string;
22
23
  children: null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAIlC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;;;MAQf;IAED,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CASP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CASP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ import type { WithStyleProps } from '@instructure/emotion';
4
+ declare type ModalFooterOwnProps = {
5
+ children?: React.ReactNode;
6
+ variant?: 'default' | 'inverse';
7
+ };
8
+ declare type PropKeys = keyof ModalFooterOwnProps;
9
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
10
+ declare type ModalFooterProps = ModalFooterOwnProps & WithStyleProps;
11
+ declare const propTypes: PropValidators<PropKeys>;
12
+ declare const allowedProps: AllowedPropKeys;
13
+ export type { ModalFooterProps };
14
+ export { propTypes, allowedProps };
15
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalFooter/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GAAG,cAAc,CAAA;AAE5D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ModalFooterTheme } from '@instructure/shared-types';
2
- import { ModalFooterProps } from './types';
2
+ import { ModalFooterProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
- import { Component } from 'react';
3
- import PropTypes from 'prop-types';
2
+ import React, { Component } from 'react';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { ModalHeaderProps, ModalHeaderStyleProps } from './types';
4
+ import type { ModalHeaderProps, ModalHeaderStyleProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Modal
@@ -11,12 +10,14 @@ id: Modal.Header
11
10
  **/
12
11
  declare class ModalHeader extends Component<ModalHeaderProps> {
13
12
  static readonly componentId = "Modal.Header";
14
- static propTypes: {
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
16
- variant: PropTypes.Requireable<string>;
17
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
18
- styles: PropTypes.Requireable<object>;
19
- };
13
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
14
+ children?: React.ReactNode;
15
+ variant?: "default" | "inverse" | undefined;
16
+ }>;
17
+ static allowedProps: readonly (keyof {
18
+ children?: React.ReactNode;
19
+ variant?: "default" | "inverse" | undefined;
20
+ })[];
20
21
  static defaultProps: {
21
22
  children: null;
22
23
  variant: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,SAAS,MAAM,YAAY,CAAA;AAQlC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEjE;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;;;MAQf;IAED,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,qBAAqB,CAIzC;IAED,IAAI,eAAe,YAQlB;IAED,MAAM;CASP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEtE;;;;;GAKG;AACH,cAEM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,SAAS;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,cAAc,QAAO,qBAAqB,CAIzC;IAED,IAAI,eAAe,YAQlB;IAED,MAAM;CASP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ import type { WithStyleProps } from '@instructure/emotion';
4
+ declare type ModalHeaderOwnProps = {
5
+ children?: React.ReactNode;
6
+ variant?: 'default' | 'inverse';
7
+ };
8
+ declare type ModalHeaderStyleProps = {
9
+ withCloseButton: boolean;
10
+ };
11
+ declare type PropKeys = keyof ModalHeaderOwnProps;
12
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
13
+ declare type ModalHeaderProps = ModalHeaderOwnProps & WithStyleProps;
14
+ declare const propTypes: PropValidators<PropKeys>;
15
+ declare const allowedProps: AllowedPropKeys;
16
+ export type { ModalHeaderProps, ModalHeaderStyleProps };
17
+ export { propTypes, allowedProps };
18
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Modal/ModalHeader/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,eAAe,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,mBAAmB,CAAA;AAEzC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,gBAAgB,GAAG,mBAAmB,GAAG,cAAc,CAAA;AAE5D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ModalHeaderTheme } from '@instructure/shared-types';
2
- import { ModalHeaderProps, ModalHeaderStyleProps } from './types';
2
+ import { ModalHeaderProps, ModalHeaderStyleProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -1,12 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import { Component, ReactElement } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import type { PortalNode } from '@instructure/ui-portal';
5
4
  import { jsx } from '@instructure/emotion';
6
5
  import { ModalHeader } from './ModalHeader';
7
6
  import { ModalBody } from './ModalBody';
8
7
  import { ModalFooter } from './ModalFooter';
9
- import { ModalProps } from './types';
8
+ import type { ModalProps } from './props';
10
9
  /**
11
10
  ---
12
11
  category: components
@@ -15,114 +14,60 @@ tags: overlay, portal, dialog
15
14
  **/
16
15
  declare class Modal extends Component<ModalProps> {
17
16
  static readonly componentId = "Modal";
18
- static propTypes: {
19
- /**
20
- * An accessible label for the `<Modal />` content
21
- */
22
- label: PropTypes.Validator<string>;
23
- /**
24
- * The children to be rendered within the `<Modal />`
25
- */
26
- children: {
27
- (props: Record<string, any>, propName: string, componentName: string): Error | null;
28
- isRequired: (props: Record<string, any>, propName: string, componentName: string, location?: string | undefined, propFullName?: string | undefined) => Error | null;
29
- };
30
- /**
31
- * The element to render the dialog as, `span` by default
32
- */
33
- as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
34
- /**
35
- * The size of the `<Modal />` content
36
- */
37
- size: PropTypes.Requireable<string>;
38
- /**
39
- * Designates the background style of the `<Modal />`
40
- */
41
- variant: PropTypes.Requireable<string>;
42
- /**
43
- * Whether or not the `<Modal />` is open
44
- */
45
- open: PropTypes.Requireable<boolean>;
46
- /**
47
- * An element or a function returning an element to focus by default
48
- */
49
- defaultFocusElement: PropTypes.Requireable<PropTypes.ReactElementLike | ((...args: any[]) => any)>;
50
- /**
51
- * Whether focus should be returned to the trigger when the `<Modal/>` is closed
52
- */
53
- shouldReturnFocus: PropTypes.Requireable<boolean>;
54
- /**
55
- * Whether the `<Modal/>` should request close when the document is clicked
56
- */
57
- shouldCloseOnDocumentClick: PropTypes.Requireable<boolean>;
58
- /**
59
- * Callback fired when `<Modal />` content has been mounted in the DOM
60
- */
61
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
62
- /**
63
- * Callback fired when `<Modal />` has been unmounted from the DOM
64
- */
65
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
66
- /**
67
- * Callback fired when the `<Modal />` is requesting to be closed
68
- */
69
- onDismiss: PropTypes.Requireable<(...args: any[]) => any>;
70
- /**
71
- *
72
- * A function that returns a reference to the content element
73
- */
74
- contentRef: PropTypes.Requireable<(...args: any[]) => any>;
75
- /**
76
- * An element or a function returning an element to use as the mount node
77
- * for the `<Modal />` (defaults to `document.body`)
78
- */
79
- mountNode: PropTypes.Requireable<PropTypes.ReactElementLike | ((...args: any[]) => any) | Element>;
80
- /**
81
- * Insert the element at the 'top' of the mountNode or at the 'bottom'
82
- */
83
- insertAt: PropTypes.Requireable<string>;
84
- /**
85
- * An element, function returning an element, or array of elements that will not be hidden from
86
- * the screen reader when the `<Modal />` is open
87
- */
88
- liveRegion: PropTypes.Requireable<PropTypes.ReactElementLike | ((...args: any[]) => any) | (PropTypes.ReactElementLike | null | undefined)[]>;
89
- transition: PropTypes.Requireable<string>;
90
- /**
91
- * Callback fired before the <Modal /> transitions in
92
- */
93
- onEnter: PropTypes.Requireable<(...args: any[]) => any>;
94
- /**
95
- * Callback fired as the <Modal /> begins to transition in
96
- */
97
- onEntering: PropTypes.Requireable<(...args: any[]) => any>;
98
- /**
99
- * Callback fired after the <Modal /> finishes transitioning in
100
- */
101
- onEntered: PropTypes.Requireable<(...args: any[]) => any>;
102
- /**
103
- * Callback fired right before the <Modal /> transitions out
104
- */
105
- onExit: PropTypes.Requireable<(...args: any[]) => any>;
106
- /**
107
- * Callback fired as the <Modal /> begins to transition out
108
- */
109
- onExiting: PropTypes.Requireable<(...args: any[]) => any>;
110
- /**
111
- * Callback fired after the <Modal /> finishes transitioning out
112
- */
113
- onExited: PropTypes.Requireable<(...args: any[]) => any>;
114
- /**
115
- * Constrain the Modal to the document window or its closest positioned parent
116
- */
117
- constrain: PropTypes.Requireable<string>;
118
- /**
119
- * Should ModalBody handle overflow with scrollbars, or fit its
120
- * content within its own height?
121
- */
122
- overflow: PropTypes.Requireable<string>;
123
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
124
- styles: PropTypes.Requireable<object>;
125
- };
17
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
18
+ label: string;
19
+ children: import("react").ReactNode;
20
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
21
+ size?: "medium" | "small" | "auto" | "large" | "fullscreen" | undefined;
22
+ variant?: "default" | "inverse" | undefined;
23
+ open?: boolean | undefined;
24
+ defaultFocusElement?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
25
+ shouldReturnFocus?: boolean | undefined;
26
+ shouldCloseOnDocumentClick?: boolean | undefined;
27
+ onOpen?: ((DOMNode: PortalNode) => any) | undefined;
28
+ onClose?: ((...args: any[]) => any) | undefined;
29
+ onDismiss?: ((...args: any[]) => any) | undefined;
30
+ contentRef?: ((...args: any[]) => any) | undefined;
31
+ mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
32
+ insertAt?: "bottom" | "top" | undefined;
33
+ liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
34
+ transition?: import("@instructure/ui-motion/types/Transition/props").TransitionType | undefined;
35
+ onEnter?: ((...args: any[]) => any) | undefined;
36
+ onEntering?: ((...args: any[]) => any) | undefined;
37
+ onEntered?: ((...args: any[]) => any) | undefined;
38
+ onExit?: ((...args: any[]) => any) | undefined;
39
+ onExiting?: ((...args: any[]) => any) | undefined;
40
+ onExited?: ((...args: any[]) => any) | undefined;
41
+ constrain?: "window" | "parent" | undefined;
42
+ overflow?: "scroll" | "fit" | undefined;
43
+ }>;
44
+ static allowedProps: readonly (keyof {
45
+ label: string;
46
+ children: import("react").ReactNode;
47
+ as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
48
+ size?: "medium" | "small" | "auto" | "large" | "fullscreen" | undefined;
49
+ variant?: "default" | "inverse" | undefined;
50
+ open?: boolean | undefined;
51
+ defaultFocusElement?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
52
+ shouldReturnFocus?: boolean | undefined;
53
+ shouldCloseOnDocumentClick?: boolean | undefined;
54
+ onOpen?: ((DOMNode: PortalNode) => any) | undefined;
55
+ onClose?: ((...args: any[]) => any) | undefined;
56
+ onDismiss?: ((...args: any[]) => any) | undefined;
57
+ contentRef?: ((...args: any[]) => any) | undefined;
58
+ mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
59
+ insertAt?: "bottom" | "top" | undefined;
60
+ liveRegion?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
61
+ transition?: import("@instructure/ui-motion/types/Transition/props").TransitionType | undefined;
62
+ onEnter?: ((...args: any[]) => any) | undefined;
63
+ onEntering?: ((...args: any[]) => any) | undefined;
64
+ onEntered?: ((...args: any[]) => any) | undefined;
65
+ onExit?: ((...args: any[]) => any) | undefined;
66
+ onExiting?: ((...args: any[]) => any) | undefined;
67
+ onExited?: ((...args: any[]) => any) | undefined;
68
+ constrain?: "window" | "parent" | undefined;
69
+ overflow?: "scroll" | "fit" | undefined;
70
+ })[];
126
71
  static defaultProps: {
127
72
  open: boolean;
128
73
  size: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,SAAS,MAAM,YAAY,CAAA;AAelC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;QACd;;WAEG;;QAGH;;WAEG;;;;;QAQH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAMH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;;WAGG;;QAGH;;;WAGG;;QAEH;;WAEG;;QAGH;;;WAGG;;;QASH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;;;MAOJ;IAED,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MA6BlB;IAED,MAAM,CAAC,MAAM,qBAAc;IAC3B,MAAM,CAAC,IAAI,mBAAY;IACvB,MAAM,CAAC,MAAM,qBAAc;gBAGf,KAAK,KAAA;IAQjB,QAAQ,EAAE,UAAU,CAAO;IAE3B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAWjD,IAAI,mBAAmB,mHAEtB;IAED,IAAI,OAAO,IAYK,UAAU,CAVzB;IAED,IAAI,aAAa,yBAMhB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,gBAAgB,YAAa,UAAU,UAEtC;IAED,sBAAsB,aAIrB;IAGD,UAAU,oBAMT;IAED,cAAc;IAqBd,YAAY,CAAC,KAAK,KAAA;IAiDlB,MAAM;CA0DP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAWzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MA6BlB;IAED,MAAM,CAAC,MAAM,qBAAc;IAC3B,MAAM,CAAC,IAAI,mBAAY;IACvB,MAAM,CAAC,MAAM,qBAAc;gBAGf,KAAK,KAAA;IAQjB,QAAQ,EAAE,UAAU,CAAO;IAE3B,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAWjD,IAAI,mBAAmB,mHAEtB;IAED,IAAI,OAAO,IAYK,UAAU,CAVzB;IAED,IAAI,aAAa,yBAMhB;IAED,IAAI,OAAO,CAAC,EAAE,EAAE,UAAU,EAEzB;IAED,gBAAgB,YAAa,UAAU,UAEtC;IAED,sBAAsB,aAIrB;IAGD,UAAU,oBAMT;IAED,cAAc;IAqBd,YAAY,CAAC,KAAK,KAAA;IAiDlB,MAAM;CA0DP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,CAAA"}
@@ -1,10 +1,12 @@
1
- /// <reference types="react" />
2
- import { AsElementType } from '@instructure/shared-types';
1
+ import React from 'react';
2
+ import type { AsElementType, PropValidators } from '@instructure/shared-types';
3
3
  import type { PortalNode } from '@instructure/ui-portal';
4
4
  import type { PositionMountNode } from '@instructure/ui-position';
5
5
  import type { TransitionType } from '@instructure/ui-motion';
6
- export declare type ModalProps = {
6
+ import type { WithStyleProps } from '@instructure/emotion';
7
+ declare type ModalOwnProps = {
7
8
  label: string;
9
+ children: React.ReactNode;
8
10
  as?: AsElementType;
9
11
  size?: 'auto' | 'small' | 'medium' | 'large' | 'fullscreen';
10
12
  variant?: 'default' | 'inverse';
@@ -28,7 +30,12 @@ export declare type ModalProps = {
28
30
  onExited?: (...args: any[]) => any;
29
31
  constrain?: 'window' | 'parent';
30
32
  overflow?: 'scroll' | 'fit';
31
- makeStyles?: (...args: any[]) => any;
32
- styles?: any;
33
33
  };
34
- //# sourceMappingURL=types.d.ts.map
34
+ declare type PropKeys = keyof ModalOwnProps;
35
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
36
+ declare type ModalProps = ModalOwnProps & WithStyleProps;
37
+ declare const propTypes: PropValidators<PropKeys>;
38
+ declare const allowedProps: AllowedPropKeys;
39
+ export type { ModalProps };
40
+ export { propTypes, allowedProps };
41
+ //# sourceMappingURL=props.d.ts.map