@sb1/ffe-grid-react 10.1.5 → 11.1.2
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/es/Grid.js +3 -1
- package/es/GridCol.js +8 -6
- package/es/GridRow.js +4 -2
- package/es/InlineGrid.js +3 -1
- package/es/background-colors.js +2 -2
- package/lib/Grid.js +3 -1
- package/lib/GridCol.js +10 -8
- package/lib/GridRow.js +7 -5
- package/lib/InlineGrid.js +3 -1
- package/lib/background-colors.js +2 -2
- package/lib/index.js +4 -4
- package/package.json +6 -8
- package/types/index.d.ts +7 -9
- package/CHANGELOG.md +0 -534
- package/es/Grid.spec.js +0 -62
- package/es/GridCol.spec.js +0 -209
- package/es/GridRow.spec.js +0 -97
- package/es/InlineGrid.spec.js +0 -45
- package/lib/Grid.spec.js +0 -69
- package/lib/GridCol.spec.js +0 -217
- package/lib/GridRow.spec.js +0 -106
- package/lib/InlineGrid.spec.js +0 -52
package/es/Grid.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "condensed", "element", "topPadding"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
4
|
|
|
3
5
|
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; }
|
|
@@ -13,7 +15,7 @@ export default function Grid(_ref) {
|
|
|
13
15
|
condensed = _ref.condensed,
|
|
14
16
|
element = _ref.element,
|
|
15
17
|
topPadding = _ref.topPadding,
|
|
16
|
-
rest = _objectWithoutProperties(_ref,
|
|
18
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
19
|
|
|
18
20
|
var Element = element || 'div';
|
|
19
21
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
package/es/GridCol.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["bottomPadding", "children", "className", "element", "lg", "md", "sm"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
4
|
|
|
3
5
|
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; }
|
|
@@ -8,15 +10,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
10
|
|
|
9
11
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
12
|
|
|
11
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
14
|
|
|
13
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
15
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
16
|
|
|
15
17
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
18
|
|
|
17
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
20
|
|
|
19
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
21
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
22
|
|
|
21
23
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
24
|
|
|
@@ -26,7 +28,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
26
28
|
|
|
27
29
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
28
30
|
|
|
29
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
31
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
30
32
|
|
|
31
33
|
import React, { Component, createRef } from 'react';
|
|
32
34
|
import { bool, node, number, oneOf, oneOfType, shape, string } from 'prop-types';
|
|
@@ -104,7 +106,7 @@ var GridCol = /*#__PURE__*/function (_Component) {
|
|
|
104
106
|
lg = _this$props.lg,
|
|
105
107
|
md = _this$props.md,
|
|
106
108
|
sm = _this$props.sm,
|
|
107
|
-
rest = _objectWithoutProperties(_this$props,
|
|
109
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
108
110
|
|
|
109
111
|
Object.keys(rest).forEach(function (key) {
|
|
110
112
|
if (MODIFIER_LIST.includes(key)) {
|
|
@@ -131,7 +133,7 @@ GridCol.defaultProps = {
|
|
|
131
133
|
};
|
|
132
134
|
GridCol.propTypes = {
|
|
133
135
|
/** Supported background colors */
|
|
134
|
-
background: oneOf(['
|
|
136
|
+
background: oneOf(['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit']),
|
|
135
137
|
|
|
136
138
|
/** Any extra classes are attached to the root node, in addition to ffe-grid__col classes */
|
|
137
139
|
className: string,
|
package/es/GridRow.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["background", "className", "children", "element", "reverse", "topPadding"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
4
|
|
|
3
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -17,7 +19,7 @@ export default function GridRow(_ref) {
|
|
|
17
19
|
element = _ref.element,
|
|
18
20
|
reverse = _ref.reverse,
|
|
19
21
|
topPadding = _ref.topPadding,
|
|
20
|
-
rest = _objectWithoutProperties(_ref,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
23
|
|
|
22
24
|
var content = children;
|
|
23
25
|
var hasBackgroundColor = backgroundColors.includes(background);
|
|
@@ -47,7 +49,7 @@ GridRow.defaultProps = {
|
|
|
47
49
|
};
|
|
48
50
|
GridRow.propTypes = {
|
|
49
51
|
/** Supported background colors */
|
|
50
|
-
background: oneOf(['
|
|
52
|
+
background: oneOf(['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit']),
|
|
51
53
|
|
|
52
54
|
/** Any extra classes are attached to the root node, in addition to ffe-grid__row classes */
|
|
53
55
|
className: string,
|
package/es/InlineGrid.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["className", "element"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
4
|
|
|
3
5
|
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; }
|
|
@@ -10,7 +12,7 @@ import { node, string } from 'prop-types';
|
|
|
10
12
|
export default function InlineGrid(_ref) {
|
|
11
13
|
var className = _ref.className,
|
|
12
14
|
Element = _ref.element,
|
|
13
|
-
rest = _objectWithoutProperties(_ref,
|
|
15
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
16
|
|
|
15
17
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
16
18
|
className: classNames(className, 'ffe-grid', 'ffe-grid--inline')
|
package/es/background-colors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default ['
|
|
2
|
-
export var removedColors = ['blue-cobalt', 'blue-royal', 'purple-magenta'];
|
|
1
|
+
export default ['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit'];
|
|
2
|
+
export var removedColors = ['blue-cobalt', 'blue-royal', 'purple-magenta', 'blue-ice', 'blue-pale', 'green-mint', 'grey-cloud', 'grey-warm', 'orange-salmon', 'red', 'blue-sky', 'white'];
|
package/lib/Grid.js
CHANGED
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = require("prop-types");
|
|
13
13
|
|
|
14
|
+
var _excluded = ["children", "className", "condensed", "element", "topPadding"];
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
18
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -25,7 +27,7 @@ function Grid(_ref) {
|
|
|
25
27
|
condensed = _ref.condensed,
|
|
26
28
|
element = _ref.element,
|
|
27
29
|
topPadding = _ref.topPadding,
|
|
28
|
-
rest = _objectWithoutProperties(_ref,
|
|
30
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
31
|
|
|
30
32
|
var Element = element || 'div';
|
|
31
33
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
package/lib/GridCol.js
CHANGED
|
@@ -13,11 +13,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _backgroundColors = _interopRequireWildcard(require("./background-colors"));
|
|
15
15
|
|
|
16
|
+
var _excluded = ["bottomPadding", "children", "className", "element", "lg", "md", "sm"];
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
21
|
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
22
24
|
function _extends() { _extends = Object.assign || 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); }
|
|
23
25
|
|
|
@@ -29,15 +31,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
29
31
|
|
|
30
32
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
31
33
|
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
34
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
35
|
|
|
34
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
36
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
37
|
|
|
36
38
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
39
|
|
|
38
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
41
|
|
|
40
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
42
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
41
43
|
|
|
42
44
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
45
|
|
|
@@ -47,7 +49,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
47
49
|
|
|
48
50
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
49
51
|
|
|
50
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
52
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
51
53
|
|
|
52
54
|
function camelCaseToDashCase(str) {
|
|
53
55
|
return str.split('').reduce(function (previous, current) {
|
|
@@ -120,7 +122,7 @@ var GridCol = /*#__PURE__*/function (_Component) {
|
|
|
120
122
|
lg = _this$props.lg,
|
|
121
123
|
md = _this$props.md,
|
|
122
124
|
sm = _this$props.sm,
|
|
123
|
-
rest = _objectWithoutProperties(_this$props,
|
|
125
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
124
126
|
|
|
125
127
|
Object.keys(rest).forEach(function (key) {
|
|
126
128
|
if (MODIFIER_LIST.includes(key)) {
|
|
@@ -147,7 +149,7 @@ GridCol.defaultProps = {
|
|
|
147
149
|
};
|
|
148
150
|
GridCol.propTypes = {
|
|
149
151
|
/** Supported background colors */
|
|
150
|
-
background: (0, _propTypes.oneOf)(['
|
|
152
|
+
background: (0, _propTypes.oneOf)(['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit']),
|
|
151
153
|
|
|
152
154
|
/** Any extra classes are attached to the root node, in addition to ffe-grid__col classes */
|
|
153
155
|
className: _propTypes.string,
|
package/lib/GridRow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -15,9 +15,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
15
15
|
|
|
16
16
|
var _backgroundColors = _interopRequireWildcard(require("./background-colors"));
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
var _excluded = ["background", "className", "children", "element", "reverse", "topPadding"];
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -36,7 +38,7 @@ function GridRow(_ref) {
|
|
|
36
38
|
element = _ref.element,
|
|
37
39
|
reverse = _ref.reverse,
|
|
38
40
|
topPadding = _ref.topPadding,
|
|
39
|
-
rest = _objectWithoutProperties(_ref,
|
|
41
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
42
|
|
|
41
43
|
var content = children;
|
|
42
44
|
|
|
@@ -69,7 +71,7 @@ GridRow.defaultProps = {
|
|
|
69
71
|
};
|
|
70
72
|
GridRow.propTypes = {
|
|
71
73
|
/** Supported background colors */
|
|
72
|
-
background: (0, _propTypes.oneOf)(['
|
|
74
|
+
background: (0, _propTypes.oneOf)(['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit']),
|
|
73
75
|
|
|
74
76
|
/** Any extra classes are attached to the root node, in addition to ffe-grid__row classes */
|
|
75
77
|
className: _propTypes.string,
|
package/lib/InlineGrid.js
CHANGED
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = require("prop-types");
|
|
13
13
|
|
|
14
|
+
var _excluded = ["className", "element"];
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
18
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -22,7 +24,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
22
24
|
function InlineGrid(_ref) {
|
|
23
25
|
var className = _ref.className,
|
|
24
26
|
Element = _ref.element,
|
|
25
|
-
rest = _objectWithoutProperties(_ref,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
28
|
|
|
27
29
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
28
30
|
className: (0, _classnames.default)(className, 'ffe-grid', 'ffe-grid--inline')
|
package/lib/background-colors.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.removedColors = exports.default = void 0;
|
|
7
|
-
var _default = ['
|
|
7
|
+
var _default = ['frost-30', 'sand', 'sand-70', 'sand-30', 'syrin-70', 'syrin-30', 'vann', 'vann-30', 'fjell', 'hvit'];
|
|
8
8
|
exports.default = _default;
|
|
9
|
-
var removedColors = ['blue-cobalt', 'blue-royal', 'purple-magenta'];
|
|
9
|
+
var removedColors = ['blue-cobalt', 'blue-royal', 'purple-magenta', 'blue-ice', 'blue-pale', 'green-mint', 'grey-cloud', 'grey-warm', 'orange-salmon', 'red', 'blue-sky', 'white'];
|
|
10
10
|
exports.removedColors = removedColors;
|
package/lib/index.js
CHANGED
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "Grid", {
|
|
|
9
9
|
return _Grid.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "GridCol", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _GridCol.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "GridRow", {
|
|
@@ -21,10 +21,10 @@ Object.defineProperty(exports, "GridRow", {
|
|
|
21
21
|
return _GridRow.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "InlineGrid", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function get() {
|
|
27
|
-
return
|
|
27
|
+
return _InlineGrid.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-grid-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "SpareBank1",
|
|
6
6
|
"files": [
|
|
@@ -17,11 +17,8 @@
|
|
|
17
17
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
22
|
-
"build:es": "babel -d es/. --root-mode=upward --env-name=es --ignore=*.spec.js src/.",
|
|
23
|
-
"build:types": "copyfiles -f src/index.d.ts types/",
|
|
24
|
-
"lint": "eslint src/.",
|
|
20
|
+
"build": "ffe-buildtool babel",
|
|
21
|
+
"lint": "eslint src",
|
|
25
22
|
"test": "jest",
|
|
26
23
|
"test:watch": "jest --watch"
|
|
27
24
|
},
|
|
@@ -29,9 +26,10 @@
|
|
|
29
26
|
"setupTestFrameworkScriptFile": "../../test-setup.js"
|
|
30
27
|
},
|
|
31
28
|
"dependencies": {
|
|
32
|
-
"classnames": "^2.
|
|
29
|
+
"classnames": "^2.3.1"
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
32
|
+
"@sb1/ffe-buildtool": "^0.2.0",
|
|
35
33
|
"enzyme": "^3.7.0",
|
|
36
34
|
"enzyme-adapter-react-16": "^1.7.0",
|
|
37
35
|
"jest": "^26.0.0",
|
|
@@ -45,5 +43,5 @@
|
|
|
45
43
|
"publishConfig": {
|
|
46
44
|
"access": "public"
|
|
47
45
|
},
|
|
48
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "10669ef6d5ebf454feb4eddb9aa4ca7bc8f439dc"
|
|
49
47
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -15,16 +15,14 @@ export interface InlineGridProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
type BackgroundColors =
|
|
18
|
-
| '
|
|
19
|
-
| 'blue-pale'
|
|
20
|
-
| 'green-mint'
|
|
21
|
-
| 'grey-cloud'
|
|
18
|
+
| 'frost-30'
|
|
22
19
|
| 'sand'
|
|
23
|
-
| '
|
|
24
|
-
| '
|
|
25
|
-
| '
|
|
26
|
-
| '
|
|
27
|
-
| '
|
|
20
|
+
| 'sand-70'
|
|
21
|
+
| 'sand-30'
|
|
22
|
+
| 'vann'
|
|
23
|
+
| 'vann-30'
|
|
24
|
+
| 'fjell'
|
|
25
|
+
| 'hvit';
|
|
28
26
|
|
|
29
27
|
export interface GridRowProps extends React.HTMLAttributes<HTMLElement> {
|
|
30
28
|
background?: BackgroundColors;
|