@sb1/ffe-core-react 7.0.1 → 7.0.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/README.md +19 -2
- package/es/typography/Paragraph.js +2 -2
- package/lib/typography/Paragraph.js +2 -2
- package/package.json +3 -3
- package/types/index.d.ts +10 -11
package/README.md
CHANGED
|
@@ -10,10 +10,27 @@ npm install --save @sb1/ffe-core-react
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Full documentation on usage is available at:
|
|
14
|
+
|
|
15
|
+
https://design.sparebank1.no/komponenter/typografi/
|
|
16
|
+
https://design.sparebank1.no/profil/farger/
|
|
17
|
+
https://design.sparebank1.no/profil/spacing/
|
|
15
18
|
|
|
16
19
|
## TypeScript definition files
|
|
17
20
|
|
|
18
21
|
This component supports TypeScript - please update `index.d.ts` if you change any
|
|
19
22
|
of the external methods or properties in this component.
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
To start a local development server, run the following from the designsystem root folder:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
npm run build
|
|
31
|
+
npm start
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
A local instance of `component-overview` with live reloading will run at http://localhost:1234/.
|
|
35
|
+
|
|
36
|
+
Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
|
|
@@ -3,8 +3,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
7
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
|
6
|
+
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; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
9
|
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
10
|
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; }
|
|
@@ -13,8 +13,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
13
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
15
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
|
16
|
+
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; }
|
|
17
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
18
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-core-react",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "React components for ffe-core components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:watch": "ffe-buildtool jest --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sb1/ffe-core": "^
|
|
31
|
+
"@sb1/ffe-core": "^27.0.1",
|
|
32
32
|
"classnames": "^2.3.1",
|
|
33
33
|
"prop-types": "^15.7.2"
|
|
34
34
|
},
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "1ab898e744977e4cb4db1bee9b65369a0deeef9a"
|
|
48
48
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
export interface DividerLineProps extends React.
|
|
3
|
+
export interface DividerLineProps extends React.ComponentProps<'hr'> {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export interface EmphasizedTextProps extends React.
|
|
7
|
+
export interface EmphasizedTextProps extends React.ComponentProps<'html'> {
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export interface HeadingProps extends React.
|
|
12
|
+
export interface HeadingProps extends React.ComponentProps<'header'> {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
className?: string;
|
|
15
15
|
error?: boolean;
|
|
@@ -20,14 +20,14 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
|
20
20
|
textCenter?: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface LinkTextProps extends React.
|
|
23
|
+
export interface LinkTextProps extends React.ComponentProps<'a'> {
|
|
24
24
|
children: React.ReactNode;
|
|
25
25
|
className?: string;
|
|
26
26
|
element?: HTMLElement | string | React.ElementType;
|
|
27
27
|
underline?: boolean;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export interface LinkIconProps extends React.
|
|
30
|
+
export interface LinkIconProps extends React.ComponentProps<'html'> {
|
|
31
31
|
children: React.ReactNode;
|
|
32
32
|
className?: string;
|
|
33
33
|
element?: HTMLElement | string | React.ElementType;
|
|
@@ -43,8 +43,7 @@ export interface SmallTextProps {
|
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export interface ParagraphProps
|
|
47
|
-
extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
46
|
+
export interface ParagraphProps extends React.ComponentProps<'p'> {
|
|
48
47
|
children: React.ReactNode;
|
|
49
48
|
className?: string;
|
|
50
49
|
lead?: boolean;
|
|
@@ -96,20 +95,20 @@ declare class Heading6 extends React.Component<HeadingProps, any> {}
|
|
|
96
95
|
declare class LinkText extends React.Component<LinkTextProps, any> {}
|
|
97
96
|
declare class LinkIcon extends React.Component<LinkIconProps, any> {}
|
|
98
97
|
declare class MicroText extends React.Component<
|
|
99
|
-
SimpleElementProps & React.
|
|
98
|
+
SimpleElementProps & React.ComponentProps<'span'>,
|
|
100
99
|
any
|
|
101
100
|
> {}
|
|
102
101
|
declare class Paragraph extends React.Component<ParagraphProps, any> {}
|
|
103
102
|
declare class PreformattedText extends React.Component<
|
|
104
|
-
SimpleElementProps & React.
|
|
103
|
+
SimpleElementProps & React.ComponentProps<'pre'>,
|
|
105
104
|
any
|
|
106
105
|
> {}
|
|
107
106
|
declare class SmallText extends React.Component<
|
|
108
|
-
SmallTextProps & React.
|
|
107
|
+
SmallTextProps & React.ComponentProps<'span'>,
|
|
109
108
|
any
|
|
110
109
|
> {}
|
|
111
110
|
declare class StrongText extends React.Component<
|
|
112
|
-
SimpleElementProps & React.
|
|
111
|
+
SimpleElementProps & React.ComponentProps<'strong'>,
|
|
113
112
|
any
|
|
114
113
|
> {}
|
|
115
114
|
declare class Wave extends React.Component<WaveProps, any> {}
|