@instructure/ui-table 8.8.1-snapshot.8 → 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 (113) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/Table/Body/index.js +16 -28
  3. package/{src/Table/Cell/types.ts → es/Table/Body/props.js} +14 -8
  4. package/es/Table/Cell/index.js +16 -28
  5. package/{src/Table/types.ts → es/Table/Cell/props.js} +12 -11
  6. package/es/Table/ColHeader/index.js +22 -63
  7. package/es/Table/ColHeader/props.js +66 -0
  8. package/es/Table/Head/index.js +18 -29
  9. package/{src/Table/Body/types.ts → es/Table/Head/props.js} +13 -8
  10. package/es/Table/Row/index.js +16 -28
  11. package/{src/Table/ColHeader/types.ts → es/Table/Row/props.js} +16 -12
  12. package/es/Table/RowHeader/index.js +15 -26
  13. package/{src/Table/Head/types.ts → es/Table/RowHeader/props.js} +11 -6
  14. package/es/Table/index.js +21 -60
  15. package/es/Table/props.js +66 -0
  16. package/lib/Table/Body/index.js +16 -29
  17. package/lib/Table/Body/props.js +50 -0
  18. package/lib/Table/Cell/index.js +16 -28
  19. package/lib/Table/Cell/props.js +47 -0
  20. package/lib/Table/ColHeader/index.js +22 -63
  21. package/lib/Table/ColHeader/props.js +77 -0
  22. package/lib/Table/Head/index.js +18 -30
  23. package/lib/Table/Head/props.js +49 -0
  24. package/lib/Table/Row/index.js +16 -29
  25. package/lib/Table/Row/props.js +54 -0
  26. package/lib/Table/RowHeader/index.js +15 -26
  27. package/lib/Table/RowHeader/props.js +46 -0
  28. package/lib/Table/index.js +20 -60
  29. package/lib/Table/props.js +81 -0
  30. package/package.json +17 -18
  31. package/src/Table/Body/index.tsx +7 -25
  32. package/src/Table/{Row/types.ts → Body/props.ts} +39 -3
  33. package/src/Table/Cell/index.tsx +8 -24
  34. package/src/Table/Cell/props.ts +62 -0
  35. package/src/Table/Cell/styles.ts +1 -1
  36. package/src/Table/ColHeader/index.tsx +9 -51
  37. package/src/Table/ColHeader/props.ts +94 -0
  38. package/src/Table/ColHeader/styles.ts +1 -1
  39. package/src/Table/Head/index.tsx +8 -24
  40. package/src/Table/Head/props.ts +62 -0
  41. package/src/Table/Row/index.tsx +8 -27
  42. package/src/Table/Row/props.ts +70 -0
  43. package/src/Table/Row/styles.ts +1 -1
  44. package/src/Table/RowHeader/index.tsx +8 -23
  45. package/src/Table/RowHeader/{types.ts → props.ts} +28 -3
  46. package/src/Table/RowHeader/styles.ts +1 -1
  47. package/src/Table/index.tsx +10 -49
  48. package/src/Table/props.ts +93 -0
  49. package/src/Table/styles.ts +1 -1
  50. package/src/index.ts +7 -7
  51. package/types/Table/Body/index.d.ts +13 -16
  52. package/types/Table/Body/index.d.ts.map +1 -1
  53. package/types/Table/Body/props.d.ts +17 -0
  54. package/types/Table/Body/props.d.ts.map +1 -0
  55. package/types/Table/Cell/index.d.ts +14 -14
  56. package/types/Table/Cell/index.d.ts.map +1 -1
  57. package/types/Table/Cell/props.d.ts +17 -0
  58. package/types/Table/Cell/props.d.ts.map +1 -0
  59. package/types/Table/Cell/styles.d.ts +1 -1
  60. package/types/Table/ColHeader/index.d.ts +22 -40
  61. package/types/Table/ColHeader/index.d.ts.map +1 -1
  62. package/types/Table/ColHeader/props.d.ts +21 -0
  63. package/types/Table/ColHeader/props.d.ts.map +1 -0
  64. package/types/Table/ColHeader/styles.d.ts +1 -1
  65. package/types/Table/Head/index.d.ts +11 -15
  66. package/types/Table/Head/index.d.ts.map +1 -1
  67. package/types/Table/Head/props.d.ts +16 -0
  68. package/types/Table/Head/props.d.ts.map +1 -0
  69. package/types/Table/Row/index.d.ts +14 -17
  70. package/types/Table/Row/index.d.ts.map +1 -1
  71. package/types/Table/Row/props.d.ts +17 -0
  72. package/types/Table/Row/props.d.ts.map +1 -0
  73. package/types/Table/Row/styles.d.ts +1 -1
  74. package/types/Table/RowHeader/index.d.ts +12 -13
  75. package/types/Table/RowHeader/index.d.ts.map +1 -1
  76. package/types/Table/RowHeader/props.d.ts +16 -0
  77. package/types/Table/RowHeader/props.d.ts.map +1 -0
  78. package/types/Table/RowHeader/styles.d.ts +1 -1
  79. package/types/Table/index.d.ts +18 -41
  80. package/types/Table/index.d.ts.map +1 -1
  81. package/types/Table/props.d.ts +19 -0
  82. package/types/Table/props.d.ts.map +1 -0
  83. package/types/Table/styles.d.ts +1 -1
  84. package/types/index.d.ts +7 -7
  85. package/LICENSE.md +0 -27
  86. package/es/Table/Body/types.js +0 -1
  87. package/es/Table/Cell/types.js +0 -1
  88. package/es/Table/ColHeader/types.js +0 -1
  89. package/es/Table/Head/types.js +0 -1
  90. package/es/Table/Row/types.js +0 -1
  91. package/es/Table/RowHeader/types.js +0 -1
  92. package/es/Table/types.js +0 -1
  93. package/lib/Table/Body/types.js +0 -1
  94. package/lib/Table/Cell/types.js +0 -1
  95. package/lib/Table/ColHeader/types.js +0 -1
  96. package/lib/Table/Head/types.js +0 -1
  97. package/lib/Table/Row/types.js +0 -1
  98. package/lib/Table/RowHeader/types.js +0 -1
  99. package/lib/Table/types.js +0 -1
  100. package/types/Table/Body/types.d.ts +0 -9
  101. package/types/Table/Body/types.d.ts.map +0 -1
  102. package/types/Table/Cell/types.d.ts +0 -9
  103. package/types/Table/Cell/types.d.ts.map +0 -1
  104. package/types/Table/ColHeader/types.d.ts +0 -12
  105. package/types/Table/ColHeader/types.d.ts.map +0 -1
  106. package/types/Table/Head/types.d.ts +0 -8
  107. package/types/Table/Head/types.d.ts.map +0 -1
  108. package/types/Table/Row/types.d.ts +0 -9
  109. package/types/Table/Row/types.d.ts.map +0 -1
  110. package/types/Table/RowHeader/types.d.ts +0 -7
  111. package/types/Table/RowHeader/types.d.ts.map +0 -1
  112. package/types/Table/types.d.ts +0 -12
  113. package/types/Table/types.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Table/Head/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,iBAAiB,GAAG;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IAC7D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AACD,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,eAInB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -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 { TableRowProps } from './types';
4
+ import type { TableRowProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Table
@@ -11,25 +10,23 @@ id: Table.Row
11
10
  **/
12
11
  declare class Row extends Component<TableRowProps> {
13
12
  static readonly componentId = "Table.Row";
14
- static propTypes: {
15
- /**
16
- * `Table.ColHeader`, `Table.RowHeader` or `Table.Cell`
17
- */
18
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
19
- styles: PropTypes.Requireable<object>;
20
- children: {
21
- (props: Record<string, any>, propName: string, componentName: string): Error | null;
22
- isRequired: (props: Record<string, any>, propName: string, componentName: string, location?: string | undefined, propFullName?: string | undefined) => Error | null;
23
- };
24
- hover: PropTypes.Requireable<boolean>;
25
- isStacked: PropTypes.Requireable<boolean>;
26
- headers: PropTypes.Requireable<(string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray | null | undefined)[]>;
27
- };
13
+ static allowedProps: readonly (keyof {
14
+ hover?: boolean | undefined;
15
+ isStacked?: boolean | undefined;
16
+ headers?: (import("react").ReactNode | ((...args: any[]) => any))[] | undefined;
17
+ children?: import("react").ReactNode;
18
+ })[];
19
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
20
+ hover?: boolean | undefined;
21
+ isStacked?: boolean | undefined;
22
+ headers?: (import("react").ReactNode | ((...args: any[]) => any))[] | undefined;
23
+ children?: import("react").ReactNode;
24
+ }>;
28
25
  static defaultProps: {
29
26
  children: null;
30
27
  };
31
28
  componentDidMount(): void;
32
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
29
+ componentDidUpdate(): void;
33
30
  render(): jsx.JSX.Element;
34
31
  }
35
32
  export default Row;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Table/Row/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AACzD,OAAO,SAAS,MAAM,YAAY,CAAA;AAUlC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAQrD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;GAKG;AACH,cACM,GAAI,SAAQ,SAAS,CAAC,aAAa,CAAC;IACxC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAGzC,MAAM,CAAC,SAAS;QACd;;WAEG;;;;;;;;;;MAWJ;IAGD,MAAM,CAAC,YAAY;;MAElB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CAoCP;AAED,eAAe,GAAG,CAAA;AAClB,OAAO,EAAE,GAAG,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Table/Row/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AASzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAQrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C;;;;;GAKG;AACH,cACM,GAAI,SAAQ,SAAS,CAAC,aAAa,CAAC;IACxC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;MAElB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAoCP;AAED,eAAe,GAAG,CAAA;AAClB,OAAO,EAAE,GAAG,EAAE,CAAA"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ import type { WithStyleProps } from '@instructure/emotion';
4
+ declare type TableRowOwnProps = {
5
+ hover?: boolean;
6
+ isStacked?: boolean;
7
+ headers?: (React.ReactNode | ((...args: any[]) => any))[];
8
+ children?: React.ReactNode;
9
+ };
10
+ declare type PropKeys = keyof TableRowOwnProps;
11
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
12
+ declare type TableRowProps = TableRowOwnProps & WithStyleProps;
13
+ declare const propTypes: PropValidators<PropKeys>;
14
+ declare const allowedProps: AllowedPropKeys;
15
+ export type { TableRowProps };
16
+ export { propTypes, allowedProps };
17
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Table/Row/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAA;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,gBAAgB,CAAA;AAEtC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,aAAa,GAAG,gBAAgB,GAAG,cAAc,CAAA;AAEtD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAUvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAKnB,CAAA;AAED,YAAY,EAAE,aAAa,EAAE,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { TableRowTheme } from '@instructure/shared-types';
2
- import { TableRowProps } from './types';
2
+ import { TableRowProps } 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 { TableRowHeaderProps } from './types';
4
+ import type { TableRowHeaderProps } from './props';
6
5
  /**
7
6
  ---
8
7
  parent: Table
@@ -11,22 +10,22 @@ id: Table.RowHeader
11
10
  **/
12
11
  declare class RowHeader extends Component<TableRowHeaderProps> {
13
12
  static readonly componentId = "Table.RowHeader";
14
- static propTypes: {
15
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
16
- styles: PropTypes.Requireable<object>;
17
- children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
18
- isStacked: PropTypes.Requireable<boolean>;
19
- /**
20
- * Control the text alignment in row header
21
- */
22
- textAlign: PropTypes.Requireable<string>;
23
- };
13
+ static allowedProps: readonly (keyof {
14
+ isStacked?: boolean | undefined;
15
+ textAlign?: "start" | "center" | "end" | undefined;
16
+ children?: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
17
+ })[];
18
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
19
+ isStacked?: boolean | undefined;
20
+ textAlign?: "start" | "center" | "end" | undefined;
21
+ children?: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
22
+ }>;
24
23
  static defaultProps: {
25
24
  textAlign: string;
26
25
  children: null;
27
26
  };
28
27
  componentDidMount(): void;
29
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
28
+ componentDidUpdate(): void;
30
29
  render(): jsx.JSX.Element;
31
30
  }
32
31
  export default RowHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Table/RowHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAKlC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,cACM,SAAU,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpD,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAG/C,MAAM,CAAC,SAAS;;;;;QAOd;;WAEG;;MAEJ;IAGD,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,MAAM;CAkBP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Table/RowHeader/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD;;;;;GAKG;AACH,cACM,SAAU,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpD,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;MAGlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAkBP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ import type { WithStyleProps } from '@instructure/emotion';
4
+ declare type TableRowHeaderOwnProps = {
5
+ isStacked?: boolean;
6
+ textAlign?: 'start' | 'center' | 'end';
7
+ children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
8
+ };
9
+ declare type PropKeys = keyof TableRowHeaderOwnProps;
10
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
11
+ declare type TableRowHeaderProps = TableRowHeaderOwnProps & WithStyleProps;
12
+ declare const propTypes: PropValidators<PropKeys>;
13
+ declare const allowedProps: AllowedPropKeys;
14
+ export type { TableRowHeaderProps };
15
+ export { propTypes, allowedProps };
16
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/Table/RowHeader/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,sBAAsB,GAAG;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;CACnE,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,sBAAsB,CAAA;AAE5C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,mBAAmB,GAAG,sBAAsB,GAAG,cAAc,CAAA;AAElE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAOvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAwD,CAAA;AAE5E,YAAY,EAAE,mBAAmB,EAAE,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { TableRowHeaderTheme } from '@instructure/shared-types';
2
- import { TableRowHeaderProps } from './types';
2
+ import { TableRowHeaderProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -1,6 +1,5 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
4
  import { Head } from './Head';
6
5
  import { Body } from './Body';
@@ -8,7 +7,7 @@ import { Row } from './Row';
8
7
  import { ColHeader } from './ColHeader';
9
8
  import { RowHeader } from './RowHeader';
10
9
  import { Cell } from './Cell';
11
- import { TableProps } from './types';
10
+ import type { TableProps } from './props';
12
11
  /**
13
12
  ---
14
13
  category: components
@@ -16,48 +15,26 @@ category: components
16
15
  **/
17
16
  declare class Table extends Component<TableProps> {
18
17
  static readonly componentId = "Table";
19
- static propTypes: {
20
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
21
- styles: PropTypes.Requireable<object>;
22
- /**
23
- * Provide a screen reader friendly description. Anything passed to this
24
- * prop will be wrapped by `<ScreenReaderContent>` when it is rendered.
25
- */
26
- caption: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
27
- /**
28
- * Build table via `Table.Head` and `Table.Body`
29
- */
30
- children: {
31
- (props: Record<string, any>, propName: string, componentName: string): Error | null;
32
- isRequired: (props: Record<string, any>, propName: string, componentName: string, location?: string | undefined, propFullName?: string | undefined) => Error | null;
33
- };
34
- /**
35
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
36
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
37
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
38
- */
39
- margin: (props: any, propName: any, componentName: any, location: any) => any;
40
- /**
41
- * Provide a reference to the underlying html element
42
- */
43
- elementRef: PropTypes.Requireable<(...args: any[]) => any>;
44
- /**
45
- * Highlight each row on hover
46
- */
47
- hover: PropTypes.Requireable<boolean>;
48
- /**
49
- * `auto` lets the browser determine table column widths based on cell content,
50
- * while `fixed` forces columns of equal width. `stacked` renders table in one
51
- * column to be more readable on narrow screens
52
- */
53
- layout: PropTypes.Requireable<string>;
54
- };
18
+ static allowedProps: readonly (keyof {
19
+ caption: import("react").ReactNode;
20
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
21
+ elementRef?: ((...args: any[]) => any) | undefined;
22
+ hover?: boolean | undefined;
23
+ layout?: "auto" | "fixed" | "stacked" | undefined;
24
+ children?: import("react").ReactNode;
25
+ })[];
26
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
27
+ caption: import("react").ReactNode;
28
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
29
+ elementRef?: ((...args: any[]) => any) | undefined;
30
+ hover?: boolean | undefined;
31
+ layout?: "auto" | "fixed" | "stacked" | undefined;
32
+ children?: import("react").ReactNode;
33
+ }>;
55
34
  static defaultProps: {
56
35
  children: null;
57
36
  hover: boolean;
58
37
  layout: string;
59
- margin: undefined;
60
- elementRef: undefined;
61
38
  };
62
39
  static Head: typeof Head;
63
40
  static Body: typeof Body;
@@ -66,7 +43,7 @@ declare class Table extends Component<TableProps> {
66
43
  static RowHeader: typeof RowHeader;
67
44
  static Cell: typeof Cell;
68
45
  componentDidMount(): void;
69
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
46
+ componentDidUpdate(): void;
70
47
  getHeaders(): any;
71
48
  render(): jsx.JSX.Element;
72
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AACzD,OAAO,SAAS,MAAM,YAAY,CAAA;AAWlC,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAKzE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;GAIG;AACH,cACM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,SAAS;;;QAKd;;;WAGG;;QAEH;;WAEG;;;;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;;WAIG;;MAEJ;IAED,MAAM,CAAC,YAAY;;;;;;MAMlB;IAED,MAAM,CAAC,IAAI,cAAO;IAClB,MAAM,CAAC,IAAI,cAAO;IAClB,MAAM,CAAC,GAAG,aAAM;IAChB,MAAM,CAAC,SAAS,mBAAY;IAC5B,MAAM,CAAC,SAAS,mBAAY;IAC5B,MAAM,CAAC,IAAI,cAAO;IAElB,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,UAAU;IAoBV,MAAM;CAkDP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AAUzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC;;;;GAIG;AACH,cACM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,YAAY;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;MAIlB;IAED,MAAM,CAAC,IAAI,cAAO;IAClB,MAAM,CAAC,IAAI,cAAO;IAClB,MAAM,CAAC,GAAG,aAAM;IAChB,MAAM,CAAC,SAAS,mBAAY;IAC5B,MAAM,CAAC,SAAS,mBAAY;IAC5B,MAAM,CAAC,IAAI,cAAO;IAElB,iBAAiB;IAIjB,kBAAkB;IAIlB,UAAU;IAoBV,MAAM;CAkDP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
3
+ import type { PropValidators } from '@instructure/shared-types';
4
+ declare type TableOwnProps = {
5
+ caption: React.ReactNode;
6
+ margin?: Spacing;
7
+ elementRef?: (...args: any[]) => any;
8
+ hover?: boolean;
9
+ layout?: 'auto' | 'fixed' | 'stacked';
10
+ children?: React.ReactNode;
11
+ };
12
+ declare type PropKeys = keyof TableOwnProps;
13
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
14
+ declare type TableProps = TableOwnProps & WithStyleProps;
15
+ declare const propTypes: PropValidators<PropKeys>;
16
+ declare const allowedProps: AllowedPropKeys;
17
+ export type { TableProps };
18
+ export { propTypes, allowedProps };
19
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Table/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,aAAK,aAAa,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,aAAa,CAAA;AAEnC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,UAAU,GAAG,aAAa,GAAG,cAAc,CAAA;AAEhD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA8BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAOnB,CAAA;AAED,YAAY,EAAE,UAAU,EAAE,CAAA;AAC1B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { TableTheme } from '@instructure/shared-types';
2
- import { TableProps } from './types';
2
+ import { TableProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
package/types/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { Table } from './Table';
2
- export type { TableProps } from './Table/types';
3
- export type { TableBodyProps } from './Table/Body/types';
4
- export type { TableCellProps } from './Table/Cell/types';
5
- export type { TableColHeaderProps } from './Table/ColHeader/types';
6
- export type { TableHeadProps } from './Table/Head/types';
7
- export type { TableRowProps } from './Table/Row/types';
8
- export type { TableRowHeaderProps } from './Table/RowHeader/types';
2
+ export type { TableProps } from './Table/props';
3
+ export type { TableBodyProps } from './Table/Body/props';
4
+ export type { TableCellProps } from './Table/Cell/props';
5
+ export type { TableColHeaderProps } from './Table/ColHeader/props';
6
+ export type { TableHeadProps } from './Table/Head/props';
7
+ export type { TableRowProps } from './Table/Row/props';
8
+ export type { TableRowHeaderProps } from './Table/RowHeader/props';
9
9
  //# sourceMappingURL=index.d.ts.map
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
package/es/Table/types.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type TableBodyProps = {
3
- makeStyles?: (...args: any[]) => any;
4
- styles?: any;
5
- hover?: boolean;
6
- isStacked?: boolean;
7
- headers?: (React.ReactNode | ((...args: any[]) => any))[];
8
- };
9
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Table/Body/types.ts"],"names":[],"mappings":";AAwBA,oBAAY,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAA;CAC1D,CAAA"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type TableCellProps = {
3
- makeStyles?: (...args: any[]) => any;
4
- styles?: any;
5
- isStacked?: boolean;
6
- header?: React.ReactNode | ((...args: any[]) => any);
7
- textAlign?: 'start' | 'center' | 'end';
8
- };
9
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Table/Cell/types.ts"],"names":[],"mappings":";AAwBA,oBAAY,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IACpD,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;CACvC,CAAA"}
@@ -1,12 +0,0 @@
1
- export declare type TableColHeaderProps = {
2
- makeStyles?: (...args: any[]) => any;
3
- styles?: any;
4
- id: string;
5
- stackedSortByLabel: string;
6
- width?: string | number;
7
- textAlign?: 'start' | 'center' | 'end';
8
- sortDirection?: 'none' | 'ascending' | 'descending';
9
- onRequestSort?: (...args: any[]) => any;
10
- scope?: 'row' | 'col' | 'rowgroup' | 'colgroup' | 'auto';
11
- };
12
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Table/ColHeader/types.ts"],"names":[],"mappings":"AAwBA,oBAAY,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,kBAAkB,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,YAAY,CAAA;IACnD,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACvC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAA;CACzD,CAAA"}
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type TableHeadProps = {
3
- makeStyles?: (...args: any[]) => any;
4
- styles?: any;
5
- isStacked?: boolean;
6
- renderSortLabel?: React.ReactNode | ((...args: any[]) => any);
7
- };
8
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Table/Head/types.ts"],"names":[],"mappings":";AAwBA,oBAAY,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;CAC9D,CAAA"}