@sb1/ffe-core-react 7.0.2 → 7.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.
package/README.md CHANGED
@@ -10,10 +10,27 @@ npm install --save @sb1/ffe-core-react
10
10
 
11
11
  ## Usage
12
12
 
13
- Run Styleguidist from the repository root to see live examples and documentation,
14
- or see the markdown files next to the component code in `src/`.
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-core-react",
3
- "version": "7.0.2",
3
+ "version": "7.1.0",
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": "^27.0.0",
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": "af7fc1a32630d5717ffbc8f50f339ba697c73130"
47
+ "gitHead": "b919e0b93e9e793893c3f804eba92591cfad81d7"
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.HTMLAttributes<HTMLHRElement> {
3
+ export interface DividerLineProps extends React.ComponentProps<'hr'> {
4
4
  className?: string;
5
5
  }
6
6
 
7
- export interface EmphasizedTextProps extends React.HTMLAttributes<HTMLElement> {
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.HTMLAttributes<HTMLHeadingElement> {
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.AnchorHTMLAttributes<HTMLElement> {
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.AnchorHTMLAttributes<HTMLElement> {
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;
@@ -82,6 +81,8 @@ export interface WaveProps {
82
81
  children?: React.ReactNode;
83
82
  }
84
83
 
84
+ type NoInfer<T> = [T][T extends any ? 0 : never];
85
+
85
86
  declare class DividerLine extends React.Component<DividerLineProps, any> {}
86
87
  declare class EmphasizedText extends React.Component<
87
88
  EmphasizedTextProps,
@@ -93,23 +94,26 @@ declare class Heading3 extends React.Component<HeadingProps, any> {}
93
94
  declare class Heading4 extends React.Component<HeadingProps, any> {}
94
95
  declare class Heading5 extends React.Component<HeadingProps, any> {}
95
96
  declare class Heading6 extends React.Component<HeadingProps, any> {}
96
- declare class LinkText extends React.Component<LinkTextProps, any> {}
97
+ declare class LinkText<T = {}> extends React.Component<
98
+ NoInfer<T> & LinkTextProps,
99
+ any
100
+ > {}
97
101
  declare class LinkIcon extends React.Component<LinkIconProps, any> {}
98
102
  declare class MicroText extends React.Component<
99
- SimpleElementProps & React.HTMLAttributes<HTMLSpanElement>,
103
+ SimpleElementProps & React.ComponentProps<'span'>,
100
104
  any
101
105
  > {}
102
106
  declare class Paragraph extends React.Component<ParagraphProps, any> {}
103
107
  declare class PreformattedText extends React.Component<
104
- SimpleElementProps & React.HTMLAttributes<HTMLPreElement>,
108
+ SimpleElementProps & React.ComponentProps<'pre'>,
105
109
  any
106
110
  > {}
107
111
  declare class SmallText extends React.Component<
108
- SmallTextProps & React.HTMLAttributes<HTMLSpanElement>,
112
+ SmallTextProps & React.ComponentProps<'span'>,
109
113
  any
110
114
  > {}
111
115
  declare class StrongText extends React.Component<
112
- SimpleElementProps & React.HTMLAttributes<HTMLElement>,
116
+ SimpleElementProps & React.ComponentProps<'strong'>,
113
117
  any
114
118
  > {}
115
119
  declare class Wave extends React.Component<WaveProps, any> {}