@seamapi/react 1.7.0 → 1.9.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 +53 -11
- package/dist/elements.js +1259 -1231
- package/dist/elements.js.map +1 -1
- package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.d.ts +2 -1
- package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.js +4 -3
- package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.js.map +1 -1
- package/lib/seam/components/AccessCodeTable/AccessCodeTable.d.ts +2 -1
- package/lib/seam/components/AccessCodeTable/AccessCodeTable.js +5 -5
- package/lib/seam/components/AccessCodeTable/AccessCodeTable.js.map +1 -1
- package/lib/seam/components/DeviceDetails/DeviceDetails.d.ts +2 -1
- package/lib/seam/components/DeviceDetails/DeviceDetails.js +6 -6
- package/lib/seam/components/DeviceDetails/DeviceDetails.js.map +1 -1
- package/lib/seam/components/DeviceTable/DeviceTable.d.ts +2 -1
- package/lib/seam/components/DeviceTable/DeviceTable.js +7 -6
- package/lib/seam/components/DeviceTable/DeviceTable.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.d.ts +2 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js +3 -2
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/components/AccessCodeDetails/AccessCodeDetails.element.ts +1 -0
- package/src/lib/seam/components/AccessCodeDetails/AccessCodeDetails.tsx +5 -1
- package/src/lib/seam/components/AccessCodeTable/AccessCodeTable.element.ts +1 -0
- package/src/lib/seam/components/AccessCodeTable/AccessCodeTable.tsx +10 -6
- package/src/lib/seam/components/DeviceDetails/DeviceDetails.element.ts +1 -0
- package/src/lib/seam/components/DeviceDetails/DeviceDetails.tsx +14 -6
- package/src/lib/seam/components/DeviceTable/DeviceTable.element.ts +1 -0
- package/src/lib/seam/components/DeviceTable/DeviceTable.tsx +8 -5
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.element.ts +1 -0
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.tsx +9 -1
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
# Seam
|
|
1
|
+
# Seam Components
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@seamapi/react)
|
|
4
4
|
[](https://github.com/seamapi/react/actions/workflows/check.yml)
|
|
5
5
|
|
|
6
|
-
Seam React
|
|
6
|
+
> Seam Components are implemented in React, but may be used in **any** web application as native **[⚡Web Components ⚡](#with-native-web-components)**
|
|
7
7
|
|
|
8
8
|
## Description
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
with everything you need to get started with [Seam].
|
|
10
|
+
> [See our official announcement!](https://www.seam.co/blog/Introducing-Seam-Components_ce7e8985-2fe6-4780-8c60-055b34daee55) 🎉
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Seam Components are a set of white-labeled UI elements that can be added to your applications in seconds.
|
|
13
|
+
With these components, you can offer advanced device management features to your users without needing to develop complex logic for managing device state,
|
|
14
|
+
refreshing data, and performing actions.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
### Resources to Get Started
|
|
17
|
+
|
|
18
|
+
- [Get started with Seam](https://www.seam.co/).
|
|
19
|
+
- [Get started with React and Client Session Tokens](https://docs.seam.co/latest/seam-components/get-started-with-react-components-and-client-session-tokens).
|
|
20
|
+
- [Make a Supported Devices Page with React](https://docs.seam.co/latest/seam-components/make-a-supported-devices-page-with-react).
|
|
21
|
+
- Reference the [Component API](https://docs.seam.co/latest/seam-components/react-components).
|
|
22
|
+
- Find developer specific technical documentation in the [README](https://github.com/seamapi/react/).
|
|
23
|
+
- Play with the components live in the interactive [Storybook](https://react.seam.co/)!
|
|
24
|
+
- See how the components work with a real Seam sandbox workspace in this [live example app](https://react.seam.co/examples/basic/).
|
|
17
25
|
|
|
18
26
|
## Installation
|
|
19
27
|
|
|
@@ -27,11 +35,13 @@ $ npm install @seamapi/react
|
|
|
27
35
|
|
|
28
36
|
## Usage
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
### With React
|
|
39
|
+
|
|
40
|
+
> Check out the [basic example app](./examples/basic)!
|
|
31
41
|
|
|
32
42
|
1. Obtain a publishable key from the [Seam Console].
|
|
33
|
-
2. Wrap your app with the `SeamProvider`.
|
|
34
|
-
3. Drop in Seam
|
|
43
|
+
2. Wrap your React app with the `SeamProvider`.
|
|
44
|
+
3. Drop in Seam Components.
|
|
35
45
|
|
|
36
46
|
```ts
|
|
37
47
|
import { SeamProvider, DeviceTable } from '@seamapi/react'
|
|
@@ -50,6 +60,27 @@ export const App = () => {
|
|
|
50
60
|
|
|
51
61
|
[Seam Console]: https://console.seam.co/
|
|
52
62
|
|
|
63
|
+
### With Native Web Components
|
|
64
|
+
|
|
65
|
+
> Check out the [web component example app](./examples/web-components)!
|
|
66
|
+
|
|
67
|
+
1. Obtain a publishable key from the [Seam Console].
|
|
68
|
+
2. Add the `<script>` tag to your page and drop in Seam Components.
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<body>
|
|
72
|
+
<seam-device-table publishable-key="your_publishable_key"></seam-device-table>
|
|
73
|
+
<script
|
|
74
|
+
type="module"
|
|
75
|
+
src="https://react.seam.co/v/1.7.0/dist/elements.js"
|
|
76
|
+
></script>
|
|
77
|
+
</body>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> Update the version in the script tag above with the exact version of this package you would like to use.
|
|
81
|
+
|
|
82
|
+
[Seam Console]: https://console.seam.co/
|
|
83
|
+
|
|
53
84
|
### Styles
|
|
54
85
|
|
|
55
86
|
> CSS is automatically included unless using `<SeamProvider disableCssInjection />`.
|
|
@@ -71,9 +102,20 @@ or place the following in the `<head>` tag:
|
|
|
71
102
|
> You must match the version string below with the exact version of this package used by your application.
|
|
72
103
|
|
|
73
104
|
```html
|
|
74
|
-
<link rel="stylesheet" href="https://react.seam.co/v/1.
|
|
105
|
+
<link rel="stylesheet" href="https://react.seam.co/v/1.7.0/index.min.css" />
|
|
75
106
|
```
|
|
76
107
|
|
|
108
|
+
#### Customizing Styles
|
|
109
|
+
|
|
110
|
+
> The `seam-` prefixed CSS class names are not part of the stable API and may change unexpectedly.
|
|
111
|
+
|
|
112
|
+
Each component accepts a `className` prop.
|
|
113
|
+
The class name will be set on the top level container, or if a sub-component is rendered, passed though.
|
|
114
|
+
This makes them compatible with native CSS and most CSS-in-JS systems, e.g., [Emotion] and [styled-components].
|
|
115
|
+
|
|
116
|
+
[Emotion]: https://emotion.sh/
|
|
117
|
+
[styled-components]: https://styled-components.com/
|
|
118
|
+
|
|
77
119
|
### Fonts
|
|
78
120
|
|
|
79
121
|
> Fonts are automatically included unless using `<SeamProvider disableFontInjection />`.
|