@zendeskgarden/react-tables 9.0.0-next.9 → 9.1.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 (44) hide show
  1. package/dist/esm/elements/Body.js +1 -1
  2. package/dist/esm/elements/Caption.js +1 -1
  3. package/dist/esm/elements/Cell.js +8 -2
  4. package/dist/esm/elements/GroupRow.js +2 -2
  5. package/dist/esm/elements/Head.js +11 -4
  6. package/dist/esm/elements/HeaderCell.js +8 -2
  7. package/dist/esm/elements/HeaderRow.js +2 -2
  8. package/dist/esm/elements/OverflowButton.js +10 -28
  9. package/dist/esm/elements/Row.js +14 -6
  10. package/dist/esm/elements/SortableCell.js +14 -6
  11. package/dist/esm/elements/Table.js +9 -4
  12. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/sort-fill.svg.js +1 -1
  13. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/sort-stroke.svg.js +1 -1
  14. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-vertical-stroke.svg.js +25 -0
  15. package/dist/esm/styled/StyledBaseRow.js +43 -0
  16. package/dist/esm/styled/StyledBody.js +2 -5
  17. package/dist/esm/styled/StyledCaption.js +2 -5
  18. package/dist/esm/styled/StyledCell.js +5 -8
  19. package/dist/esm/styled/StyledGroupRow.js +20 -7
  20. package/dist/esm/styled/StyledHead.js +19 -9
  21. package/dist/esm/styled/StyledHeaderCell.js +5 -8
  22. package/dist/esm/styled/StyledHeaderRow.js +20 -10
  23. package/dist/esm/styled/StyledHiddenCell.js +2 -5
  24. package/dist/esm/styled/StyledOverflowButton.js +7 -35
  25. package/dist/esm/styled/StyledRow.js +71 -30
  26. package/dist/esm/styled/StyledSortableButton.js +62 -51
  27. package/dist/esm/styled/StyledTable.js +6 -6
  28. package/dist/esm/styled/style-utils.js +2 -2
  29. package/dist/index.cjs.js +390 -303
  30. package/dist/typings/elements/OverflowButton.d.ts +2 -10
  31. package/dist/typings/elements/Table.d.ts +2 -2
  32. package/dist/typings/styled/StyledBaseRow.d.ts +11 -0
  33. package/dist/typings/styled/StyledCell.d.ts +5 -2
  34. package/dist/typings/styled/StyledGroupRow.d.ts +7 -3
  35. package/dist/typings/styled/StyledHead.d.ts +1 -1
  36. package/dist/typings/styled/StyledHeaderRow.d.ts +7 -3
  37. package/dist/typings/styled/StyledOverflowButton.d.ts +6 -9
  38. package/dist/typings/styled/StyledRow.d.ts +10 -8
  39. package/dist/typings/styled/StyledSortableButton.d.ts +5 -4
  40. package/dist/typings/styled/StyledTable.d.ts +4 -6
  41. package/dist/typings/styled/index.d.ts +1 -1
  42. package/dist/typings/styled/style-utils.d.ts +1 -1
  43. package/package.json +8 -7
  44. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-stroke.svg.js +0 -36
@@ -4,18 +4,10 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React, { ButtonHTMLAttributes } from 'react';
8
- export interface IOverflowButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
- /** @ignore Applies hover styling */
10
- isHovered?: boolean;
11
- /** @ignore Applies active styling */
12
- isActive?: boolean;
13
- /** @ignore Applies focus styling */
14
- isFocused?: boolean;
15
- }
7
+ import React from 'react';
16
8
  /**
17
9
  * @deprecated use `Table.OverflowButton` instead
18
10
  *
19
11
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
20
12
  */
21
- export declare const OverflowButton: React.ForwardRefExoticComponent<IOverflowButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+ export declare const OverflowButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -16,11 +16,11 @@ import { HeaderRow } from './HeaderRow';
16
16
  import { OverflowButton } from './OverflowButton';
17
17
  import { Row } from './Row';
18
18
  import { SortableCell } from './SortableCell';
19
- export declare const TableComponent: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<HTMLTableElement>>;
20
19
  /**
21
20
  * @extends TableHTMLAttributes<HTMLTableElement>
22
21
  */
23
- export declare const Table: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<HTMLTableElement>> & {
22
+ export declare const TableComponent: React.ForwardRefExoticComponent<ITableProps & React.RefAttributes<HTMLTableElement>>;
23
+ export declare const Table: typeof TableComponent & {
24
24
  Body: typeof Body;
25
25
  Caption: typeof Caption;
26
26
  Cell: typeof Cell;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { DefaultTheme } from 'styled-components';
8
+ export interface IStyledBaseRowProps {
9
+ $isStriped?: boolean;
10
+ }
11
+ export declare const StyledBaseRow: import("styled-components").StyledComponent<"tr", DefaultTheme, IStyledBaseRowProps, never>;
@@ -6,7 +6,10 @@
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  import { ICellProps, ITableProps } from '../types';
9
- export interface IStyledCellProps extends Pick<ICellProps, 'isMinimum' | 'isTruncated' | 'hasOverflow' | 'width'> {
10
- size?: ITableProps['size'];
9
+ export interface IStyledCellProps extends Pick<ICellProps, 'width'> {
10
+ $size?: ITableProps['size'];
11
+ $isMinimum?: boolean;
12
+ $isTruncated?: boolean;
13
+ $hasOverflow?: boolean;
11
14
  }
12
15
  export declare const StyledCell: import("styled-components").StyledComponent<"td", DefaultTheme, IStyledCellProps, never>;
@@ -5,8 +5,12 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
- import { IStyledRowProps } from './StyledRow';
9
- export declare const StyledGroupRow: import("styled-components").StyledComponent<"tr", DefaultTheme, IStyledRowProps & {
8
+ import { ITableProps } from '../types';
9
+ interface IStyledGroupRowProps {
10
+ $size?: ITableProps['size'];
11
+ }
12
+ export declare const StyledGroupRow: import("styled-components").StyledComponent<"tr", DefaultTheme, import("./StyledBaseRow").IStyledBaseRowProps & {
10
13
  'data-garden-id': string;
11
14
  'data-garden-version': string;
12
- }, "data-garden-id" | "data-garden-version">;
15
+ } & IStyledGroupRowProps, "data-garden-id" | "data-garden-version">;
16
+ export {};
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  interface IStyledHeadProps {
9
- isSticky?: boolean;
9
+ $isSticky?: boolean;
10
10
  }
11
11
  export declare const StyledHead: import("styled-components").StyledComponent<"thead", DefaultTheme, {
12
12
  'data-garden-id': string;
@@ -5,8 +5,12 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
- import { IStyledRowProps } from './StyledRow';
9
- export declare const StyledHeaderRow: import("styled-components").StyledComponent<"tr", DefaultTheme, IStyledRowProps & {
8
+ import { ITableProps } from '../types';
9
+ interface IStyledHeaderRowProps {
10
+ $size?: ITableProps['size'];
11
+ }
12
+ export declare const StyledHeaderRow: import("styled-components").StyledComponent<"tr", DefaultTheme, import("./StyledBaseRow").IStyledBaseRowProps & {
10
13
  'data-garden-id': string;
11
14
  'data-garden-version': string;
12
- }, "data-garden-id" | "data-garden-version">;
15
+ } & IStyledHeaderRowProps, "data-garden-id" | "data-garden-version">;
16
+ export {};
@@ -4,18 +4,15 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { DefaultTheme } from 'styled-components';
8
7
  import { ITableProps } from '../types';
9
8
  interface IStyledOverflowButtonProps {
10
- isHovered?: boolean;
11
- isActive?: boolean;
12
- isFocused?: boolean;
13
- size?: ITableProps['size'];
9
+ $size?: ITableProps['size'];
14
10
  }
15
11
  /**
16
- * 1. Reset for <button> element
17
- * 2. Reset for <a>nchor element
12
+ * 1. Overrides IconButton sizing
18
13
  */
19
- export declare const StyledOverflowButton: import("styled-components").StyledComponent<"button", DefaultTheme, IStyledOverflowButtonProps, never>;
20
- export declare const StyledOverflowButtonIconWrapper: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
14
+ export declare const StyledOverflowButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
15
+ 'data-garden-id': string;
16
+ 'data-garden-version': string;
17
+ } & IStyledOverflowButtonProps, "data-garden-id" | "data-garden-version">;
21
18
  export {};
@@ -7,12 +7,14 @@
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  import { ITableProps } from '../types';
9
9
  export interface IStyledRowProps {
10
- isStriped?: boolean;
11
- isFocused?: boolean;
12
- isHovered?: boolean;
13
- isSelected?: boolean;
14
- isReadOnly?: ITableProps['isReadOnly'];
15
- size?: ITableProps['size'];
10
+ $isStriped?: boolean;
11
+ $isFocused?: boolean;
12
+ $isHovered?: boolean;
13
+ $isSelected?: boolean;
14
+ $isReadOnly?: ITableProps['isReadOnly'];
15
+ $size?: ITableProps['size'];
16
16
  }
17
- export declare const StyledBaseRow: import("styled-components").StyledComponent<"tr", DefaultTheme, IStyledRowProps, never>;
18
- export declare const StyledRow: import("styled-components").StyledComponent<"tr", DefaultTheme, IStyledRowProps, never>;
17
+ export declare const StyledRow: import("styled-components").StyledComponent<"tr", DefaultTheme, import("./StyledBaseRow").IStyledBaseRowProps & {
18
+ 'data-garden-id': string;
19
+ 'data-garden-version': string;
20
+ } & IStyledRowProps, "data-garden-id" | "data-garden-version">;
@@ -4,16 +4,17 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
+ import { DefaultTheme } from 'styled-components';
7
8
  import { ISortableCellProps } from '../types';
8
- export declare const StyledSortableStrokeIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
- export declare const StyledSortableFillIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const StyledSortableStrokeIconWrapper: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
10
+ export declare const StyledSortableFillIconWrapper: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
10
11
  interface IStyledSortableButtonProps {
11
- sort?: ISortableCellProps['sort'];
12
+ $sort?: ISortableCellProps['sort'];
12
13
  width?: ISortableCellProps['width'];
13
14
  }
14
15
  /**
15
16
  * 1. Reset for <button> element
16
17
  * 2. Reset for <a>nchor element
17
18
  */
18
- export declare const StyledSortableButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, IStyledSortableButtonProps, never>;
19
+ export declare const StyledSortableButton: import("styled-components").StyledComponent<"button", DefaultTheme, IStyledSortableButtonProps, never>;
19
20
  export {};
@@ -5,13 +5,11 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { ThemeProps, DefaultTheme } from 'styled-components';
8
- import { ITableProps } from '../types';
9
- interface IStyledTableProps {
10
- size?: ITableProps['size'];
11
- }
12
8
  export declare const getLineHeight: (props: ThemeProps<DefaultTheme>) => string;
13
9
  /**
14
10
  * 1. <table> reset
15
11
  */
16
- export declare const StyledTable: import("styled-components").StyledComponent<"table", DefaultTheme, IStyledTableProps, never>;
17
- export {};
12
+ export declare const StyledTable: import("styled-components").StyledComponent<"table", DefaultTheme, {
13
+ 'data-garden-id': string;
14
+ 'data-garden-version': string;
15
+ }, "data-garden-id" | "data-garden-version">;
@@ -14,5 +14,5 @@ export { StyledTable } from './StyledTable';
14
14
  export { StyledHeaderCell } from './StyledHeaderCell';
15
15
  export { StyledHiddenCell } from './StyledHiddenCell';
16
16
  export { StyledSortableButton, StyledSortableFillIconWrapper, StyledSortableStrokeIconWrapper } from './StyledSortableButton';
17
- export { StyledOverflowButton, StyledOverflowButtonIconWrapper } from './StyledOverflowButton';
17
+ export { StyledOverflowButton } from './StyledOverflowButton';
18
18
  export { StyledRow } from './StyledRow';
@@ -7,5 +7,5 @@
7
7
  import { ThemeProps, DefaultTheme } from 'styled-components';
8
8
  import { ITableProps } from '../types';
9
9
  export declare const getRowHeight: (props: {
10
- size?: ITableProps['size'];
10
+ $size?: ITableProps["size"];
11
11
  } & ThemeProps<DefaultTheme>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-tables",
3
- "version": "9.0.0-next.9",
3
+ "version": "9.1.0",
4
4
  "description": "Components relating to tables in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -22,21 +22,22 @@
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
24
  "@zendeskgarden/container-utilities": "^2.0.0",
25
+ "@zendeskgarden/react-buttons": "^9.1.0",
25
26
  "dom-helpers": "^5.1.0",
26
- "polished": "^4.0.0",
27
+ "polished": "^4.3.1",
27
28
  "prop-types": "^15.5.7"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "@zendeskgarden/react-theming": ">=9.0.0-next",
31
- "react": ">=16.8.0",
32
- "react-dom": ">=16.8.0",
32
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
33
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
33
34
  "styled-components": "^5.3.1"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/react-beautiful-dnd": "13.1.8",
37
38
  "@types/react-window": "1.8.8",
38
- "@zendeskgarden/react-theming": "^9.0.0-next.9",
39
- "@zendeskgarden/svg-icons": "7.0.0",
39
+ "@zendeskgarden/react-theming": "^9.1.0",
40
+ "@zendeskgarden/svg-icons": "7.3.0",
40
41
  "react-beautiful-dnd": "13.1.1",
41
42
  "react-window": "1.8.10"
42
43
  },
@@ -50,5 +51,5 @@
50
51
  "access": "public"
51
52
  },
52
53
  "zendeskgarden:src": "src/index.ts",
53
- "gitHead": "771281b562d376a6aee04b0cd71dd888b3ae4a1d"
54
+ "gitHead": "a2842d18615ad057d75988fde4df5a0c79d2714e"
54
55
  }
@@ -1,36 +0,0 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import * as React from 'react';
8
-
9
- var _g;
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
- var SvgOverflowStroke = function SvgOverflowStroke(props) {
12
- return /*#__PURE__*/React.createElement("svg", _extends({
13
- xmlns: "http://www.w3.org/2000/svg",
14
- width: 16,
15
- height: 16,
16
- focusable: "false",
17
- viewBox: "0 0 16 16",
18
- "aria-hidden": "true"
19
- }, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
20
- fill: "currentColor"
21
- }, /*#__PURE__*/React.createElement("circle", {
22
- cx: 2.5,
23
- cy: 8,
24
- r: 1.5
25
- }), /*#__PURE__*/React.createElement("circle", {
26
- cx: 8,
27
- cy: 8,
28
- r: 1.5
29
- }), /*#__PURE__*/React.createElement("circle", {
30
- cx: 13.5,
31
- cy: 8,
32
- r: 1.5
33
- }))));
34
- };
35
-
36
- export { SvgOverflowStroke as default };