@sb1/ffe-buttons-react 17.0.2 → 18.0.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 +15 -2
- package/package.json +4 -4
- package/types/index.d.ts +35 -25
package/README.md
CHANGED
|
@@ -8,10 +8,23 @@ npm install --save @sb1/ffe-buttons-react
|
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
or see the markdown files next to the component code in `src/`.
|
|
11
|
+
Full documentation on button usage is available at https://design.sparebank1.no/komponenter/knapper/.
|
|
13
12
|
|
|
14
13
|
## TypeScript definition files
|
|
15
14
|
|
|
16
15
|
This component supports TypeScript - please update `index.d.ts` if you change any
|
|
17
16
|
of the external methods or properties in this component.
|
|
17
|
+
|
|
18
|
+
## Development
|
|
19
|
+
|
|
20
|
+
To start a local development server, run the following from the designsystem root folder:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install
|
|
24
|
+
npm run build
|
|
25
|
+
npm start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A local instance of `component-overview` with live reloading will run at http://localhost:1234/.
|
|
29
|
+
|
|
30
|
+
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-buttons-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "React implementation of ffe-buttons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"test:watch": "ffe-buildtool jest --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sb1/ffe-buttons": "^17.0.
|
|
32
|
-
"@sb1/ffe-icons-react": "^7.3.
|
|
31
|
+
"@sb1/ffe-buttons": "^17.0.3",
|
|
32
|
+
"@sb1/ffe-icons-react": "^7.3.5",
|
|
33
33
|
"classnames": "^2.3.1",
|
|
34
34
|
"prop-types": "^15.7.2"
|
|
35
35
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "1ab898e744977e4cb4db1bee9b65369a0deeef9a"
|
|
50
50
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
| string
|
|
5
|
-
| {
|
|
6
|
-
pathname: string;
|
|
7
|
-
search?: string;
|
|
8
|
-
hash?: string;
|
|
9
|
-
state?: { [key: string]: any };
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export interface MinimalBaseButtonProps extends React.HTMLProps<HTMLElement> {
|
|
3
|
+
export interface MinimalBaseButtonProps extends React.ComponentPropsWithoutRef<'html'> {
|
|
13
4
|
className?: string;
|
|
14
5
|
element?: HTMLElement | string | React.ElementType;
|
|
15
6
|
innerRef?: React.Ref<HTMLElement>;
|
|
16
|
-
to?: To; //used in order to make buttons work with react-router functionality in typescript-files.
|
|
17
7
|
}
|
|
18
8
|
|
|
19
9
|
export interface BaseButtonProps extends MinimalBaseButtonProps {
|
|
@@ -76,25 +66,45 @@ export interface TertiaryButtonProps extends MinimalBaseButtonProps {
|
|
|
76
66
|
rightIcon?: React.ReactNode;
|
|
77
67
|
}
|
|
78
68
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
declare class
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
70
|
+
|
|
71
|
+
declare class ActionButton<T = {}> extends React.Component<
|
|
72
|
+
NoInfer<T> & ActionButtonProps,
|
|
73
|
+
any
|
|
74
|
+
> {}
|
|
75
|
+
declare class BackButton<T = {}> extends React.Component<
|
|
76
|
+
NoInfer<T> & BackButtonProps,
|
|
77
|
+
any
|
|
78
|
+
> {}
|
|
79
|
+
declare class ButtonGroup<T = {}> extends React.Component<
|
|
80
|
+
NoInfer<T> & ButtonGroupProps,
|
|
81
|
+
any
|
|
82
|
+
> {}
|
|
83
|
+
declare class ExpandButton<T = {}> extends React.Component<
|
|
84
|
+
NoInfer<T> & ExpandButtonProps,
|
|
85
|
+
any
|
|
86
|
+
> {}
|
|
87
|
+
declare class InlineExpandButton<T = {}> extends React.Component<
|
|
88
|
+
NoInfer<T> & InlineExpandButtonProps,
|
|
89
|
+
any
|
|
90
|
+
> {}
|
|
91
|
+
declare class PrimaryButton<T = {}> extends React.Component<
|
|
92
|
+
NoInfer<T> & PrimaryButtonProps,
|
|
93
|
+
any
|
|
94
|
+
> {}
|
|
95
|
+
declare class SecondaryButton<T = {}> extends React.Component<
|
|
96
|
+
NoInfer<T> & SecondaryButtonProps,
|
|
85
97
|
any
|
|
86
98
|
> {}
|
|
87
|
-
declare class
|
|
88
|
-
|
|
89
|
-
SecondaryButtonProps,
|
|
99
|
+
declare class ShortcutButton<T = {}> extends React.Component<
|
|
100
|
+
NoInfer<T> & ShortcutButtonProps,
|
|
90
101
|
any
|
|
91
102
|
> {}
|
|
92
|
-
declare class
|
|
93
|
-
|
|
103
|
+
declare class TaskButton<T = {}> extends React.Component<
|
|
104
|
+
NoInfer<T> & TaskButtonProps,
|
|
94
105
|
any
|
|
95
106
|
> {}
|
|
96
|
-
declare class
|
|
97
|
-
|
|
98
|
-
TertiaryButtonProps,
|
|
107
|
+
declare class TertiaryButton<T = {}> extends React.Component<
|
|
108
|
+
NoInfer<T> & TertiaryButtonProps,
|
|
99
109
|
any
|
|
100
110
|
> {}
|