@zendeskgarden/react-grid 9.0.0-next.2 → 9.0.0-next.20

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 (34) hide show
  1. package/README.md +10 -10
  2. package/dist/esm/elements/Col.js +72 -0
  3. package/dist/esm/elements/Grid.js +54 -0
  4. package/dist/esm/elements/Row.js +58 -0
  5. package/dist/esm/elements/pane/Pane.js +55 -0
  6. package/dist/esm/elements/pane/PaneProvider.js +197 -0
  7. package/dist/esm/elements/pane/components/Content.js +30 -0
  8. package/dist/esm/elements/pane/components/Splitter.js +128 -0
  9. package/dist/esm/elements/pane/components/SplitterButton.js +91 -0
  10. package/dist/esm/index.js +12 -0
  11. package/dist/esm/styled/StyledCol.js +89 -0
  12. package/dist/esm/styled/StyledGrid.js +49 -0
  13. package/dist/esm/styled/StyledRow.js +65 -0
  14. package/dist/esm/styled/pane/StyledPane.js +22 -0
  15. package/dist/esm/styled/pane/StyledPaneContent.js +22 -0
  16. package/dist/esm/styled/pane/StyledPaneSplitter.js +119 -0
  17. package/dist/esm/styled/pane/StyledPaneSplitterButton.js +46 -0
  18. package/dist/esm/styled/pane/StyledPaneSplitterButtonContainer.js +128 -0
  19. package/dist/esm/types/index.js +16 -0
  20. package/dist/esm/utils/useGridContext.js +16 -0
  21. package/dist/esm/utils/usePaneContext.js +16 -0
  22. package/dist/esm/utils/usePaneProviderContext.js +17 -0
  23. package/dist/esm/utils/usePaneSplitterContext.js +22 -0
  24. package/dist/index.cjs.js +290 -155
  25. package/dist/typings/elements/Col.d.ts +2 -0
  26. package/dist/typings/elements/Grid.d.ts +7 -1
  27. package/dist/typings/elements/Row.d.ts +2 -0
  28. package/dist/typings/index.d.ts +1 -1
  29. package/dist/typings/styled/index.d.ts +1 -0
  30. package/dist/typings/styled/pane/StyledPaneSplitter.d.ts +0 -1
  31. package/dist/typings/styled/pane/StyledPaneSplitterButton.d.ts +3 -7
  32. package/dist/typings/styled/pane/StyledPaneSplitterButtonContainer.d.ts +18 -0
  33. package/package.json +10 -10
  34. package/dist/index.esm.js +0 -903
@@ -7,6 +7,8 @@
7
7
  import React from 'react';
8
8
  import { IColProps } from '../types';
9
9
  /**
10
+ * @deprecated use `Grid.Col` instead
11
+ *
10
12
  * @extends HTMLAttributes<HTMLDivElement>
11
13
  */
12
14
  export declare const Col: React.ForwardRefExoticComponent<IColProps & React.RefAttributes<HTMLDivElement>>;
@@ -6,7 +6,13 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import { IGridProps } from '../types';
9
+ import { Row } from './Row';
10
+ import { Col } from './Col';
11
+ export declare const GridComponent: React.ForwardRefExoticComponent<IGridProps & React.RefAttributes<HTMLDivElement>>;
9
12
  /**
10
13
  * @extends HTMLAttributes<HTMLDivElement>
11
14
  */
12
- export declare const Grid: React.ForwardRefExoticComponent<IGridProps & React.RefAttributes<HTMLDivElement>>;
15
+ export declare const Grid: React.ForwardRefExoticComponent<IGridProps & React.RefAttributes<HTMLDivElement>> & {
16
+ Row: typeof Row;
17
+ Col: typeof Col;
18
+ };
@@ -7,6 +7,8 @@
7
7
  import React from 'react';
8
8
  import { IRowProps } from '../types';
9
9
  /**
10
+ * @deprecated use `Grid.Row` instead
11
+ *
10
12
  * @extends HTMLAttributes<HTMLDivElement>
11
13
  */
12
14
  export declare const Row: React.ForwardRefExoticComponent<IRowProps & React.RefAttributes<HTMLDivElement>>;
@@ -9,4 +9,4 @@ export { Grid } from './elements/Grid';
9
9
  export { Row } from './elements/Row';
10
10
  export { PaneProvider } from './elements/pane/PaneProvider';
11
11
  export { Pane } from './elements/pane/Pane';
12
- export { ALIGN_ITEMS as ARRAY_ALIGN_ITEMS, ALIGN_SELF as ARRAY_ALIGN_SELF, DIRECTION as ARRAY_DIRECTION, JUSTIFY_CONTENT as ARRAY_JUSTIFY_CONTENT, TEXT_ALIGN as ARRAY_TEXT_ALIGN, SPACE as ARRAY_SPACE, WRAP as ARRAY_WRAP, type IPaneProviderProps, type ISplitterProps, type ISplitterButtonProps, type IColProps, type IGridProps, type IRowProps, type AlignItems as ALIGN_ITEMS, type AlignSelf as ALIGN_SELF, type Direction as DIRECTION, type JustifyContent as JUSTIFY_CONTENT, type TextAlign as TEXT_ALIGN, type GridNumber as GRID_NUMBER, type Breakpoint as BREAKPOINT, type Space as SPACE, type Wrap as WRAP } from './types';
12
+ export { ALIGN_ITEMS, ALIGN_SELF, DIRECTION, JUSTIFY_CONTENT, TEXT_ALIGN, SPACE, WRAP, type IPaneProviderProps, type ISplitterProps, type ISplitterButtonProps, type IColProps, type IGridProps, type IRowProps } from './types';
@@ -11,3 +11,4 @@ export * from './pane/StyledPane';
11
11
  export * from './pane/StyledPaneContent';
12
12
  export * from './pane/StyledPaneSplitter';
13
13
  export * from './pane/StyledPaneSplitterButton';
14
+ export * from './pane/StyledPaneSplitterButtonContainer';
@@ -7,7 +7,6 @@
7
7
  import { DefaultTheme } from 'styled-components';
8
8
  import { Orientation } from '../../types';
9
9
  interface IStyledPaneSplitterProps {
10
- isHovered: boolean;
11
10
  orientation?: Orientation;
12
11
  isFixed?: boolean;
13
12
  }
@@ -6,15 +6,11 @@
6
6
  */
7
7
  /// <reference types="react" />
8
8
  import { DefaultTheme } from 'styled-components';
9
- import { ISplitterButtonProps, Orientation, PLACEMENT } from '../../types';
10
- interface IStyledSplitterButtonProps extends ISplitterButtonProps {
9
+ import { Orientation } from '../../types';
10
+ interface IStyledSplitterButtonProps {
11
11
  orientation: Orientation;
12
- placement: (typeof PLACEMENT)[number];
13
12
  isRotated: boolean;
14
- splitterSize: number;
15
13
  }
16
- /**
17
- * 1. Opaque "dish" behind transparent button
18
- */
14
+ export declare const getSize: (theme: DefaultTheme) => number;
19
15
  export declare const StyledPaneSplitterButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, DefaultTheme, IStyledSplitterButtonProps, never>;
20
16
  export {};
@@ -0,0 +1,18 @@
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
+ import { Orientation, PLACEMENT } from '../../types';
9
+ interface IStyledSplitterButtonContainerProps {
10
+ orientation: Orientation;
11
+ placement: (typeof PLACEMENT)[number];
12
+ splitterSize: number;
13
+ }
14
+ /**
15
+ * 1. Match focused `Splitter` z-index
16
+ */
17
+ export declare const StyledPaneSplitterButtonContainer: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledSplitterButtonContainerProps, never>;
18
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-grid",
3
- "version": "9.0.0-next.2",
3
+ "version": "9.0.0-next.20",
4
4
  "description": "Components relating to layout grids in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/zendeskgarden/react-components/issues"
11
11
  },
12
12
  "main": "dist/index.cjs.js",
13
- "module": "dist/index.esm.js",
13
+ "module": "dist/esm/index.js",
14
14
  "files": [
15
15
  "dist"
16
16
  ],
@@ -21,23 +21,23 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@zendeskgarden/container-splitter": "^2.0.3",
24
+ "@zendeskgarden/container-splitter": "^2.0.17",
25
25
  "@zendeskgarden/container-utilities": "^2.0.0",
26
- "@zendeskgarden/react-buttons": "^9.0.0-next.2",
27
- "@zendeskgarden/react-tooltips": "^9.0.0-next.2",
28
- "polished": "^4.0.0",
26
+ "@zendeskgarden/react-buttons": "^9.0.0-next.20",
27
+ "@zendeskgarden/react-tooltips": "^9.0.0-next.20",
28
+ "polished": "^4.3.1",
29
29
  "prop-types": "^15.5.7",
30
30
  "react-merge-refs": "^2.0.0",
31
31
  "use-resize-observer": "^9.1.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@zendeskgarden/react-theming": "^8.67.0",
34
+ "@zendeskgarden/react-theming": ">=9.0.0-next",
35
35
  "react": ">=16.8.0",
36
36
  "react-dom": ">=16.8.0",
37
- "styled-components": "^5.1.0"
37
+ "styled-components": "^5.3.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@zendeskgarden/react-theming": "^9.0.0-next.2"
40
+ "@zendeskgarden/react-theming": "^9.0.0-next.20"
41
41
  },
42
42
  "keywords": [
43
43
  "components",
@@ -49,5 +49,5 @@
49
49
  "access": "public"
50
50
  },
51
51
  "zendeskgarden:src": "src/index.ts",
52
- "gitHead": "e47dd011fedf130106acdb485a023340564171af"
52
+ "gitHead": "eab087ac0d6e74b3a4489d37d067baf7a225e7a8"
53
53
  }