@doodl/slate 1.22.2 → 1.22.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.22.3](https://bitbucket.org/doodlltd/slate/compare/v1.22.2...v1.22.3) (2022-02-13)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Flag default breakpoints as SCSS defaults ([f380ddc](https://bitbucket.org/doodlltd/slate/commit/f380ddce65ef6287b040e2a2a796ebf0eecbc29d))
11
+
5
12
  ### [1.22.2](https://bitbucket.org/doodlltd/slate/compare/v1.22.1...v1.22.2) (2021-12-22)
6
13
 
7
14
 
@@ -10,11 +10,11 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
10
10
 
11
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
12
 
13
- import React from 'react';
13
+ import React, { forwardRef } from 'react';
14
14
  import classNames from "classnames";
15
15
  import styles from '../../../../scss/css-modules/grid.module.scss';
16
16
 
17
- var GridItem = function GridItem(props) {
17
+ var GridItem = function GridItem(props, ref) {
18
18
  var children = props.children,
19
19
  className = props.className,
20
20
  _props$component = props.component,
@@ -28,8 +28,9 @@ var GridItem = function GridItem(props) {
28
28
  });
29
29
  var gridItemClasses = classNames.apply(void 0, _toConsumableArray(gridSizes).concat([className]));
30
30
  return /*#__PURE__*/React.createElement(Component, {
31
+ ref: ref,
31
32
  className: gridItemClasses
32
33
  }, children);
33
34
  };
34
35
 
35
- export default GridItem;
36
+ export default /*#__PURE__*/forwardRef(GridItem);
@@ -12,14 +12,15 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
12
12
 
13
13
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
14
 
15
- import React from 'react';
15
+ import React, { forwardRef } from 'react';
16
16
  import classNames from 'classnames';
17
17
  import styles from '../../../../scss/css-modules/grid.module.scss';
18
18
 
19
- var Grid = function Grid(props) {
19
+ var Grid = function Grid(props, ref) {
20
20
  var _ref;
21
21
 
22
22
  var children = props.children,
23
+ className = props.className,
23
24
  _props$component = props.component,
24
25
  Component = _props$component === void 0 ? 'div' : _props$component,
25
26
  _props$center = props.center,
@@ -34,10 +35,11 @@ var Grid = function Grid(props) {
34
35
  var gridSizes = sizes.split(" ").map(function (size) {
35
36
  return styles["".concat(slateGridClassName, "-width-").concat(size)];
36
37
  });
37
- var gridClasses = classNames.apply(void 0, [styles[slateGridClassName]].concat(_toConsumableArray(gridSizes), [(_ref = {}, _defineProperty(_ref, styles['center'], center), _defineProperty(_ref, styles['verticalCenter'], verticalCenter), _ref), gridClassName]));
38
+ var gridClasses = classNames.apply(void 0, [styles[slateGridClassName]].concat(_toConsumableArray(gridSizes), [(_ref = {}, _defineProperty(_ref, styles.center, center), _defineProperty(_ref, styles.verticalCenter, verticalCenter), _ref), className, gridClassName]));
38
39
  return /*#__PURE__*/React.createElement(Component, {
40
+ ref: ref,
39
41
  className: gridClasses
40
42
  }, children);
41
43
  };
42
44
 
43
- export default Grid;
45
+ export default /*#__PURE__*/forwardRef(Grid);
@@ -1,27 +1,27 @@
1
- var _excluded = ["children", "component", "className", "gridClassName"];
1
+ var _excluded = ["children", "component", "className"];
2
2
 
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
 
5
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
6
 
7
- import React from 'react';
7
+ import React, { forwardRef } from 'react';
8
8
  import classNames from "classnames";
9
9
  import Grid from ".";
10
10
  import styles from '../../../../scss/css-modules/grid.module.scss';
11
11
 
12
- var PaddedGrid = function PaddedGrid(props) {
12
+ var PaddedGrid = function PaddedGrid(props, ref) {
13
13
  var children = props.children,
14
14
  _props$component = props.component,
15
15
  Component = _props$component === void 0 ? 'div' : _props$component,
16
16
  className = props.className,
17
- gridClassName = props.gridClassName,
18
17
  gridProps = _objectWithoutProperties(props, _excluded);
19
18
 
20
19
  var slatePaddedGridClassName = styles.slatePaddedGridClassName;
21
20
  var paddedGridClasses = classNames(styles[slatePaddedGridClassName], className);
22
21
  return /*#__PURE__*/React.createElement(Component, {
22
+ ref: ref,
23
23
  className: paddedGridClasses
24
24
  }, /*#__PURE__*/React.createElement(Grid, gridProps, children));
25
25
  };
26
26
 
27
- export default PaddedGrid;
27
+ export default /*#__PURE__*/forwardRef(PaddedGrid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doodl/slate",
3
- "version": "1.22.2",
3
+ "version": "1.22.3",
4
4
  "description": "",
5
5
  "main": "./js/dist/index.js",
6
6
  "module": "./js/dist/index.js",
@@ -10,14 +10,14 @@ $slate-breakpoints: (
10
10
  medium: $slate-breakpoints-medium,
11
11
  large: $slate-breakpoints-large,
12
12
  x-large: $slate-breakpoints-x-large
13
- );
13
+ ) !default;
14
14
 
15
15
  $slate-media-queries: (
16
16
  small: screen and (min-width: $slate-breakpoints-small),
17
17
  medium: screen and (min-width: $slate-breakpoints-medium),
18
18
  large: screen and (min-width: $slate-breakpoints-large),
19
19
  x-large: screen and (min-width: $slate-breakpoints-x-large)
20
- );
20
+ ) !default;
21
21
 
22
22
  :export {
23
23
  small: $slate-breakpoints-small;