@saas-ui/react 1.0.0-rc.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +234 -1
- package/README.md +1 -1
- package/dist/error-boundary.d.ts +22 -0
- package/dist/error-boundary.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +30 -30
- package/src/error-boundary.tsx +40 -0
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,245 @@
|
|
1
1
|
# @saas-ui/react
|
2
2
|
|
3
|
+
## 1.0.0
|
4
|
+
|
5
|
+
### Major Changes
|
6
|
+
|
7
|
+
- 3ae6be1: breaking: Updated to Chakra UI 2.1
|
8
|
+
- 3ae6be1: breaking: React 18 support.
|
9
|
+
- 532a7d4: Updated to Chakra UI 2.2.1
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 68c7b62: Card now has a isHoverable property to support hover styles.
|
14
|
+
- c8621b8: NativeSelect now accepts chilren and doesn't throw if no options are passed.
|
15
|
+
- fca06e4: Added Json Schema (ajv) support for AutoForm.
|
16
|
+
- da3c4e4: Added ErrorBoundary component.
|
17
|
+
- de0dce2: Scale reset button icon based on the input size.
|
18
|
+
- 6cc9343: Add exports entry for ajv
|
19
|
+
- 15c3960: Re-publish.
|
20
|
+
- 1744543: Updated dependencies.
|
21
|
+
- bd3438d: FormStep now supports an onSubmit handler.
|
22
|
+
- 6133901: No longer passing down label to input fields.
|
23
|
+
- dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
|
24
|
+
- 43dff99: Option labels are now optional.
|
25
|
+
- 4bb613c: Added new RouterProvider and useActivePath now uses Router context.
|
26
|
+
- d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
|
27
|
+
- 9e9c601: Stepper now accepts an onChange handler.
|
28
|
+
- ddec417: ArrayField no longer passing down items to the container element.
|
29
|
+
- 43dff99: Field is now correctly typed based on the field type.
|
30
|
+
- 5a1b92b: Fix vertical orientation for FormStepper.
|
31
|
+
- 1fdf52a: Modern bundles now use .mjs extension.
|
32
|
+
- 38f7171: #50 - Fixed StepForm render prop types.
|
33
|
+
- 2ec8c91: Fixed vertical divider rendering incorrectly.
|
34
|
+
- 8f3f948: Removed redundant ThemeProvider / CSSReset and GlobalStyles components.
|
35
|
+
- 5f80cea: AutoForm now renders children.
|
36
|
+
- 532a7d4: Fixed all theme onconsistencies.
|
37
|
+
- 42beaa4: Added missing dependency.
|
38
|
+
- 3dee538: Spacing between pin inputs can now be configured.
|
39
|
+
- 1c247cb: InputField now has type="text" by default.
|
40
|
+
- 07491fd: ContextMenu now passing down all props to the internal Menu.
|
41
|
+
- d1fb472: Select now renders a hidden input with the current value.
|
42
|
+
- 870db1f: New primary and secondary Button variant.
|
43
|
+
- 68f5d3b: Removed isPrimary and isSecondary Button properties, use variant="primary" instead.
|
44
|
+
- Updated dependencies [68c7b62]
|
45
|
+
- Updated dependencies [3ae6be1]
|
46
|
+
- Updated dependencies [c8621b8]
|
47
|
+
- Updated dependencies [fca06e4]
|
48
|
+
- Updated dependencies [de0dce2]
|
49
|
+
- Updated dependencies [6cc9343]
|
50
|
+
- Updated dependencies [15c3960]
|
51
|
+
- Updated dependencies [532a7d4]
|
52
|
+
- Updated dependencies [1744543]
|
53
|
+
- Updated dependencies [bd3438d]
|
54
|
+
- Updated dependencies [6133901]
|
55
|
+
- Updated dependencies [a8fa78a]
|
56
|
+
- Updated dependencies [dc6376f]
|
57
|
+
- Updated dependencies [43dff99]
|
58
|
+
- Updated dependencies [87d3fdc]
|
59
|
+
- Updated dependencies [ae47cbd]
|
60
|
+
- Updated dependencies [4bb613c]
|
61
|
+
- Updated dependencies [d4afda3]
|
62
|
+
- Updated dependencies [9e9c601]
|
63
|
+
- Updated dependencies [ddec417]
|
64
|
+
- Updated dependencies [a134a6f]
|
65
|
+
- Updated dependencies [1db5bf9]
|
66
|
+
- Updated dependencies [4fc04d7]
|
67
|
+
- Updated dependencies [43dff99]
|
68
|
+
- Updated dependencies [5a1b92b]
|
69
|
+
- Updated dependencies [1fdf52a]
|
70
|
+
- Updated dependencies [1744543]
|
71
|
+
- Updated dependencies [7a16ef7]
|
72
|
+
- Updated dependencies [38f7171]
|
73
|
+
- Updated dependencies [a134a6f]
|
74
|
+
- Updated dependencies [9043639]
|
75
|
+
- Updated dependencies [8f3f948]
|
76
|
+
- Updated dependencies [5f80cea]
|
77
|
+
- Updated dependencies [532a7d4]
|
78
|
+
- Updated dependencies [42beaa4]
|
79
|
+
- Updated dependencies [3dee538]
|
80
|
+
- Updated dependencies [1c247cb]
|
81
|
+
- Updated dependencies [07491fd]
|
82
|
+
- Updated dependencies [d1fb472]
|
83
|
+
- Updated dependencies [870db1f]
|
84
|
+
- Updated dependencies [3ae6be1]
|
85
|
+
- Updated dependencies [4fd1fb3]
|
86
|
+
- Updated dependencies [68f5d3b]
|
87
|
+
- @saas-ui/card@1.0.0
|
88
|
+
- @saas-ui/auth@1.0.0
|
89
|
+
- @saas-ui/banner@1.0.0
|
90
|
+
- @saas-ui/button@1.0.0
|
91
|
+
- @saas-ui/collapse@1.0.0
|
92
|
+
- @saas-ui/data-table@1.0.0
|
93
|
+
- @saas-ui/forms@1.0.0
|
94
|
+
- @saas-ui/hooks@1.0.0
|
95
|
+
- @saas-ui/hotkeys@1.0.0
|
96
|
+
- @saas-ui/input-right-button@1.0.0
|
97
|
+
- @saas-ui/layout@1.0.0
|
98
|
+
- @saas-ui/list@1.0.0
|
99
|
+
- @saas-ui/menu@1.0.0
|
100
|
+
- @saas-ui/modals@1.0.0
|
101
|
+
- @saas-ui/nprogress@1.0.0
|
102
|
+
- @saas-ui/number-input@1.0.0
|
103
|
+
- @saas-ui/palette@1.0.0
|
104
|
+
- @saas-ui/password-input@1.0.0
|
105
|
+
- @saas-ui/persona@1.0.0
|
106
|
+
- @saas-ui/pin-input@1.0.0
|
107
|
+
- @saas-ui/property@1.0.0
|
108
|
+
- @saas-ui/provider@1.0.0
|
109
|
+
- @saas-ui/radio@1.0.0
|
110
|
+
- @saas-ui/search-input@1.0.0
|
111
|
+
- @saas-ui/select@1.0.0
|
112
|
+
- @saas-ui/snackbar@1.0.0
|
113
|
+
- @saas-ui/stepper@1.0.0
|
114
|
+
- @saas-ui/theme@1.0.0
|
115
|
+
|
116
|
+
## 1.0.0-rc.15
|
117
|
+
|
118
|
+
### Patch Changes
|
119
|
+
|
120
|
+
- Updated dependencies
|
121
|
+
- @saas-ui/theme@1.0.0-rc.5
|
122
|
+
- @saas-ui/provider@1.0.0-rc.8
|
123
|
+
- @saas-ui/layout@1.0.0-rc.8
|
124
|
+
- @saas-ui/menu@1.0.0-rc.8
|
125
|
+
- @saas-ui/auth@1.0.0-rc.14
|
126
|
+
- @saas-ui/data-table@1.0.0-rc.8
|
127
|
+
- @saas-ui/modals@1.0.0-rc.13
|
128
|
+
|
129
|
+
## 1.0.0-rc.14
|
130
|
+
|
131
|
+
### Patch Changes
|
132
|
+
|
133
|
+
- Updated dependencies [a134a6f]
|
134
|
+
- Updated dependencies [a134a6f]
|
135
|
+
- @saas-ui/hotkeys@1.0.0-rc.5
|
136
|
+
- @saas-ui/collapse@1.0.0-rc.5
|
137
|
+
- @saas-ui/stepper@1.0.0-rc.6
|
138
|
+
- @saas-ui/forms@1.0.0-rc.12
|
139
|
+
- @saas-ui/auth@1.0.0-rc.13
|
140
|
+
- @saas-ui/modals@1.0.0-rc.12
|
141
|
+
|
142
|
+
## 1.0.0-rc.13
|
143
|
+
|
144
|
+
### Patch Changes
|
145
|
+
|
146
|
+
- 1744543: Updated dependencies.
|
147
|
+
- Updated dependencies [1744543]
|
148
|
+
- Updated dependencies [1744543]
|
149
|
+
- @saas-ui/auth@1.0.0-rc.12
|
150
|
+
- @saas-ui/banner@1.0.0-rc.5
|
151
|
+
- @saas-ui/button@1.0.0-rc.5
|
152
|
+
- @saas-ui/card@1.0.0-rc.5
|
153
|
+
- @saas-ui/collapse@1.0.0-rc.4
|
154
|
+
- @saas-ui/data-table@1.0.0-rc.7
|
155
|
+
- @saas-ui/forms@1.0.0-rc.11
|
156
|
+
- @saas-ui/hooks@1.0.0-rc.4
|
157
|
+
- @saas-ui/hotkeys@1.0.0-rc.4
|
158
|
+
- @saas-ui/input-right-button@1.0.0-rc.5
|
159
|
+
- @saas-ui/layout@1.0.0-rc.7
|
160
|
+
- @saas-ui/list@1.0.0-rc.5
|
161
|
+
- @saas-ui/menu@1.0.0-rc.7
|
162
|
+
- @saas-ui/modals@1.0.0-rc.11
|
163
|
+
- @saas-ui/nprogress@1.0.0-rc.4
|
164
|
+
- @saas-ui/number-input@1.0.0-rc.4
|
165
|
+
- @saas-ui/palette@1.0.0-rc.4
|
166
|
+
- @saas-ui/password-input@1.0.0-rc.5
|
167
|
+
- @saas-ui/persona@1.0.0-rc.6
|
168
|
+
- @saas-ui/pin-input@1.0.0-rc.5
|
169
|
+
- @saas-ui/property@1.0.0-rc.6
|
170
|
+
- @saas-ui/provider@1.0.0-rc.7
|
171
|
+
- @saas-ui/radio@1.0.0-rc.4
|
172
|
+
- @saas-ui/search-input@1.0.0-rc.4
|
173
|
+
- @saas-ui/select@1.0.0-rc.4
|
174
|
+
- @saas-ui/snackbar@1.0.0-rc.4
|
175
|
+
- @saas-ui/stepper@1.0.0-rc.5
|
176
|
+
- @saas-ui/theme@1.0.0-rc.4
|
177
|
+
|
178
|
+
## 1.0.0-rc.12
|
179
|
+
|
180
|
+
### Patch Changes
|
181
|
+
|
182
|
+
- Added missing dependency.
|
183
|
+
- Updated dependencies
|
184
|
+
- @saas-ui/persona@1.0.0-rc.5
|
185
|
+
|
186
|
+
## 1.0.0-rc.11
|
187
|
+
|
188
|
+
### Patch Changes
|
189
|
+
|
190
|
+
- da3c4e4: Added ErrorBoundary component.
|
191
|
+
- bd3438d: FormStep now supports an onSubmit handler.
|
192
|
+
- 2ec8c91: Fixed vertical divider rendering incorrectly.
|
193
|
+
- Updated dependencies [bd3438d]
|
194
|
+
- Updated dependencies [ae47cbd]
|
195
|
+
- @saas-ui/forms@1.0.0-rc.10
|
196
|
+
- @saas-ui/property@1.0.0-rc.5
|
197
|
+
- @saas-ui/provider@1.0.0-rc.6
|
198
|
+
- @saas-ui/auth@1.0.0-rc.11
|
199
|
+
- @saas-ui/modals@1.0.0-rc.10
|
200
|
+
- @saas-ui/layout@1.0.0-rc.6
|
201
|
+
- @saas-ui/menu@1.0.0-rc.6
|
202
|
+
- @saas-ui/data-table@1.0.0-rc.6
|
203
|
+
|
204
|
+
## 1.0.0-rc.10
|
205
|
+
|
206
|
+
### Patch Changes
|
207
|
+
|
208
|
+
- 68c7b62: Card now has a isHoverable property to support hover styles.
|
209
|
+
- 43dff99: Option labels are now optional.
|
210
|
+
- d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
|
211
|
+
- 43dff99: Field is now correctly typed based on the field type.
|
212
|
+
- 38f7171: #50 - Fixed StepForm render prop types.
|
213
|
+
- 870db1f: New primary and secondary Button variant.
|
214
|
+
- Updated dependencies [68c7b62]
|
215
|
+
- Updated dependencies [43dff99]
|
216
|
+
- Updated dependencies [87d3fdc]
|
217
|
+
- Updated dependencies [d4afda3]
|
218
|
+
- Updated dependencies [43dff99]
|
219
|
+
- Updated dependencies [38f7171]
|
220
|
+
- Updated dependencies [870db1f]
|
221
|
+
- @saas-ui/card@1.0.0-rc.4
|
222
|
+
- @saas-ui/forms@1.0.0-rc.9
|
223
|
+
- @saas-ui/provider@1.0.0-rc.5
|
224
|
+
- @saas-ui/button@1.0.0-rc.4
|
225
|
+
- @saas-ui/auth@1.0.0-rc.10
|
226
|
+
- @saas-ui/modals@1.0.0-rc.9
|
227
|
+
- @saas-ui/layout@1.0.0-rc.5
|
228
|
+
- @saas-ui/menu@1.0.0-rc.5
|
229
|
+
- @saas-ui/banner@1.0.0-rc.4
|
230
|
+
- @saas-ui/input-right-button@1.0.0-rc.4
|
231
|
+
- @saas-ui/list@1.0.0-rc.4
|
232
|
+
- @saas-ui/data-table@1.0.0-rc.5
|
233
|
+
- @saas-ui/password-input@1.0.0-rc.4
|
234
|
+
- @saas-ui/property@1.0.0-rc.4
|
235
|
+
|
3
236
|
## 1.0.0-rc.9
|
4
237
|
|
5
238
|
### Patch Changes
|
6
239
|
|
7
240
|
- de0dce2: Scale reset button icon based on the input size.
|
8
241
|
- dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
|
9
|
-
- 68f5d3b: Removed isPrimary and isSecondary Button properties, use
|
242
|
+
- 68f5d3b: Removed isPrimary and isSecondary Button properties, use variant="primary" instead.
|
10
243
|
- Updated dependencies [de0dce2]
|
11
244
|
- Updated dependencies [dc6376f]
|
12
245
|
- Updated dependencies [68f5d3b]
|
package/README.md
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { SaasContext } from '@saas-ui/provider';
|
3
|
+
export interface ErrorBoundaryProps {
|
4
|
+
errorComponent?: React.ReactNode;
|
5
|
+
children: React.ReactNode;
|
6
|
+
}
|
7
|
+
interface ErrorBoundaryState {
|
8
|
+
error?: Error | null;
|
9
|
+
errorInfo?: any;
|
10
|
+
}
|
11
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps> {
|
12
|
+
state: ErrorBoundaryState;
|
13
|
+
context: React.ContextType<typeof SaasContext>;
|
14
|
+
constructor(props: ErrorBoundaryProps);
|
15
|
+
static getDerivedStateFromError(error: Error): {
|
16
|
+
error: Error;
|
17
|
+
};
|
18
|
+
componentDidCatch(error: Error, errorInfo: any): void;
|
19
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
20
|
+
}
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=error-boundary.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../src/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,GAAG,CAAA;CAChB;AAED,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC;IACpE,KAAK,EAAE,kBAAkB,CAAA;IAEjB,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAA;gBAE1C,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;IAI5C,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG;IAI9C,MAAM;CAOP"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
var e=require("react"),r=require("@chakra-ui/system"),t=require("@saas-ui/auth"),n=require("@saas-ui/banner"),
|
1
|
+
var e=require("react"),r=require("@chakra-ui/system"),t=require("@saas-ui/auth"),n=require("@saas-ui/banner"),o=require("@saas-ui/button"),u=require("@saas-ui/card"),a=require("@saas-ui/collapse"),s=require("@saas-ui/data-table"),c=require("@saas-ui/list"),i=require("@saas-ui/layout"),f=require("@saas-ui/forms"),p=require("@saas-ui/hooks"),b=require("@saas-ui/hotkeys"),y=require("@saas-ui/input-right-button"),O=require("@saas-ui/menu"),l=require("@saas-ui/modals"),h=require("@saas-ui/nprogress"),d=require("@saas-ui/number-input"),j=require("@saas-ui/palette"),P=require("@saas-ui/password-input"),x=require("@saas-ui/persona"),m=require("@saas-ui/pin-input"),g=require("@saas-ui/property"),E=require("@saas-ui/provider"),k=require("@saas-ui/radio"),w=require("@saas-ui/search-input"),q=require("@saas-ui/select"),v=require("@saas-ui/snackbar"),_=require("@saas-ui/stepper"),C=require("@saas-ui/theme");function D(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,r}var B=/*#__PURE__*/D(e);function S(e,r){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},S(e,r)}var F=/*#__PURE__*/function(e){var r,t;function n(r){var t;return(t=e.call(this,r)||this).state=void 0,t.state={error:null},t}t=e,(r=n).prototype=Object.create(t.prototype),r.prototype.constructor=r,S(r,t),n.getDerivedStateFromError=function(e){return{error:e}};var o=n.prototype;return o.componentDidCatch=function(e,r){var t,n;null==(t=(n=this.context).onError)||t.call(n,e,r)},o.render=function(){return this.state.error?this.props.errorComponent||/*#__PURE__*/B.createElement("h1",null,"Something went wrong."):this.props.children},n}(B.Component);exports.Br=function(e){/*#__PURE__*/return B.createElement(r.chakra.span,e,/*#__PURE__*/B.createElement("br",null))},exports.ErrorBoundary=F,Object.keys(t).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})}),Object.keys(n).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})}),Object.keys(o).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return o[e]}})}),Object.keys(u).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return u[e]}})}),Object.keys(a).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return a[e]}})}),Object.keys(s).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})}),Object.keys(c).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return c[e]}})}),Object.keys(i).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return i[e]}})}),Object.keys(f).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return f[e]}})}),Object.keys(p).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return p[e]}})}),Object.keys(b).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return b[e]}})}),Object.keys(y).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return y[e]}})}),Object.keys(O).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return O[e]}})}),Object.keys(l).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return l[e]}})}),Object.keys(h).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return h[e]}})}),Object.keys(d).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[e]}})}),Object.keys(j).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return j[e]}})}),Object.keys(P).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return P[e]}})}),Object.keys(x).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return x[e]}})}),Object.keys(m).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return m[e]}})}),Object.keys(g).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return g[e]}})}),Object.keys(E).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return E[e]}})}),Object.keys(k).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return k[e]}})}),Object.keys(w).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return w[e]}})}),Object.keys(q).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[e]}})}),Object.keys(v).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return v[e]}})}),Object.keys(_).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _[e]}})}),Object.keys(C).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return C[e]}})});
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/typography.tsx"],"sourcesContent":["import * as React from 'react'\nimport { chakra, HTMLChakraProps } from '@chakra-ui/system'\n\nexport const Br: React.FC<HTMLChakraProps<'span'>> = (props) => {\n return (\n <chakra.span {...props}>\n <br />\n </chakra.span>\n )\n}\n"],"names":["props","React","createElement","chakra","span"],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/error-boundary.tsx","../src/typography.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { SaasContext } from '@saas-ui/provider'\n\nexport interface ErrorBoundaryProps {\n errorComponent?: React.ReactNode\n children: React.ReactNode\n}\n\ninterface ErrorBoundaryState {\n error?: Error | null\n errorInfo?: any\n}\n\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps> {\n state: ErrorBoundaryState\n\n declare context: React.ContextType<typeof SaasContext>\n\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: null }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n componentDidCatch(error: Error, errorInfo: any) {\n this.context.onError?.(error, errorInfo)\n }\n\n render() {\n if (this.state.error) {\n return this.props.errorComponent || <h1>Something went wrong.</h1>\n }\n\n return this.props.children\n }\n}\n","import * as React from 'react'\nimport { chakra, HTMLChakraProps } from '@chakra-ui/system'\n\nexport const Br: React.FC<HTMLChakraProps<'span'>> = (props) => {\n return (\n <chakra.span {...props}>\n <br />\n </chakra.span>\n )\n}\n"],"names":["ErrorBoundary","_React$Component","props","_this","this","state","error","getDerivedStateFromError","componentDidCatch","React","errorInfo","context","onError","_this$context$onError","call","_this$context","_proto","render","errorComponent","createElement","children","Component","chakra","span"],"mappings":"2yCAcaA,mBAKX,SAAAC,WAAA,SAAAD,EAAYE,GAAyB,IAAAC,EAAA,OACnCA,cAAMD,IAANE,MALFC,WAIqC,EAEnCF,EAAKE,MAAQ,CAAEC,MAAO,UAFxBL,KAAAD,yEALFA,EAUSO,yBAAP,SAAgCD,GAC9B,MAAO,CAAEA,MAAAA,IAGXE,IAAAA,EAAAA,EAAAA,UAdiCC,OAcjCD,EAAAA,kBAAA,SAAkBF,EAAcI,WAC9B,OAAKC,GAAAA,EAAAA,KAAAA,SAAQC,UAAbC,EAAAC,KAAAC,EAAuBT,EAAOI,IAflCM,EAkBEC,OAAA,WACE,OAAIb,KAAKC,MAAMC,WACDJ,MAAMgB,6BAAkBT,EAAAU,cAAA,KAAA,KAAA,yBAG/Bf,KAAKF,MAAMkB,UAvBaX,EAKjC,CALiCA,EAAMY,sBCXY,SAACnB,gBACpD,OACEO,EAACU,cAAAG,EAADA,OAAQC,KAASrB,eACfO,EAAAU,cAAA,KAAA"}
|
package/dist/index.modern.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as r from"react";import{chakra as
|
1
|
+
import*as r from"react";import{chakra as o}from"@chakra-ui/system";export*from"@saas-ui/auth";export*from"@saas-ui/banner";export*from"@saas-ui/button";export*from"@saas-ui/card";export*from"@saas-ui/collapse";export*from"@saas-ui/data-table";export*from"@saas-ui/list";export*from"@saas-ui/layout";export*from"@saas-ui/forms";export*from"@saas-ui/hooks";export*from"@saas-ui/hotkeys";export*from"@saas-ui/input-right-button";export*from"@saas-ui/menu";export*from"@saas-ui/modals";export*from"@saas-ui/nprogress";export*from"@saas-ui/number-input";export*from"@saas-ui/palette";export*from"@saas-ui/password-input";export*from"@saas-ui/persona";export*from"@saas-ui/pin-input";export*from"@saas-ui/property";export*from"@saas-ui/provider";export*from"@saas-ui/radio";export*from"@saas-ui/search-input";export*from"@saas-ui/select";export*from"@saas-ui/snackbar";export*from"@saas-ui/stepper";export*from"@saas-ui/theme";const s=s=>/*#__PURE__*/r.createElement(o.span,s,/*#__PURE__*/r.createElement("br",null));class t extends r.Component{constructor(r){super(r),this.state=void 0,this.state={error:null}}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,o){var s,t;null==(s=(t=this.context).onError)||s.call(t,r,o)}render(){return this.state.error?this.props.errorComponent||/*#__PURE__*/r.createElement("h1",null,"Something went wrong."):this.props.children}}export{s as Br,t as ErrorBoundary};
|
2
2
|
//# sourceMappingURL=index.modern.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.modern.mjs","sources":["../src/typography.tsx"],"sourcesContent":["import * as React from 'react'\nimport { chakra, HTMLChakraProps } from '@chakra-ui/system'\n\nexport const Br: React.FC<HTMLChakraProps<'span'>> = (props) => {\n return (\n <chakra.span {...props}>\n <br />\n </chakra.span>\n )\n}\n"],"names":["Br","props","React","createElement","chakra","span"],"mappings":"y5BAGaA,MAAAA,EAAyCC,gBAElDC,EAAAC,cAACC,EAAOC,KAASJ,eACfC,EADFC,cAAA,KAAA"}
|
1
|
+
{"version":3,"file":"index.modern.mjs","sources":["../src/typography.tsx","../src/error-boundary.tsx"],"sourcesContent":["import * as React from 'react'\nimport { chakra, HTMLChakraProps } from '@chakra-ui/system'\n\nexport const Br: React.FC<HTMLChakraProps<'span'>> = (props) => {\n return (\n <chakra.span {...props}>\n <br />\n </chakra.span>\n )\n}\n","import * as React from 'react'\n\nimport { SaasContext } from '@saas-ui/provider'\n\nexport interface ErrorBoundaryProps {\n errorComponent?: React.ReactNode\n children: React.ReactNode\n}\n\ninterface ErrorBoundaryState {\n error?: Error | null\n errorInfo?: any\n}\n\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps> {\n state: ErrorBoundaryState\n\n declare context: React.ContextType<typeof SaasContext>\n\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: null }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n componentDidCatch(error: Error, errorInfo: any) {\n this.context.onError?.(error, errorInfo)\n }\n\n render() {\n if (this.state.error) {\n return this.props.errorComponent || <h1>Something went wrong.</h1>\n }\n\n return this.props.children\n }\n}\n"],"names":["Br","props","React","createElement","chakra","span","ErrorBoundary","Component","constructor","super","this","state","error","static","componentDidCatch","errorInfo","context","onError","render","errorComponent","children"],"mappings":"y5BAGaA,MAAAA,EAAyCC,gBAElDC,EAAAC,cAACC,EAAOC,KAASJ,eACfC,EADFC,cAAA,KAAA,aCSSG,UAA2BJ,EAACK,UAKvCC,YAAYP,GACVQ,MAAMR,GAD6BS,KAJrCC,WAME,EAAAD,KAAKC,MAAQ,CAAEC,MAAO,MAGOC,gCAACD,GAC9B,MAAO,CAAEA,MAAAA,GAGXE,kBAAkBF,EAAcG,kBACzBC,GAAAA,EAAAA,KAAAA,SAAQC,mBAAUL,EAAOG,GAGhCG,SACE,OAAIR,KAAKC,MAAMC,WACDX,MAAMkB,6BAAkBjB,wDAG1BD,MAAMmB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@saas-ui/react",
|
3
|
-
"version": "1.0.0
|
3
|
+
"version": "1.0.0",
|
4
4
|
"description": "Saas UI - The frontend stack for SaaS companies.",
|
5
5
|
"source": "src/index.ts",
|
6
6
|
"exports": {
|
@@ -55,35 +55,35 @@
|
|
55
55
|
"url": "https://storybook.saas-ui.dev"
|
56
56
|
},
|
57
57
|
"dependencies": {
|
58
|
-
"@chakra-ui/system": "^2.
|
59
|
-
"@saas-ui/auth": "1.0.0
|
60
|
-
"@saas-ui/banner": "1.0.0
|
61
|
-
"@saas-ui/button": "1.0.0
|
62
|
-
"@saas-ui/card": "1.0.0
|
63
|
-
"@saas-ui/collapse": "1.0.0
|
64
|
-
"@saas-ui/data-table": "1.0.0
|
65
|
-
"@saas-ui/forms": "1.0.0
|
66
|
-
"@saas-ui/hooks": "1.0.0
|
67
|
-
"@saas-ui/hotkeys": "1.0.0
|
68
|
-
"@saas-ui/input-right-button": "1.0.0
|
69
|
-
"@saas-ui/layout": "1.0.0
|
70
|
-
"@saas-ui/list": "1.0.0
|
71
|
-
"@saas-ui/menu": "1.0.0
|
72
|
-
"@saas-ui/modals": "1.0.0
|
73
|
-
"@saas-ui/nprogress": "1.0.0
|
74
|
-
"@saas-ui/number-input": "1.0.0
|
75
|
-
"@saas-ui/palette": "1.0.0
|
76
|
-
"@saas-ui/password-input": "1.0.0
|
77
|
-
"@saas-ui/persona": "1.0.0
|
78
|
-
"@saas-ui/pin-input": "1.0.0
|
79
|
-
"@saas-ui/property": "1.0.0
|
80
|
-
"@saas-ui/provider": "1.0.0
|
81
|
-
"@saas-ui/radio": "1.0.0
|
82
|
-
"@saas-ui/search-input": "1.0.0
|
83
|
-
"@saas-ui/select": "1.0.0
|
84
|
-
"@saas-ui/snackbar": "1.0.0
|
85
|
-
"@saas-ui/stepper": "1.0.0
|
86
|
-
"@saas-ui/theme": "1.0.0
|
58
|
+
"@chakra-ui/system": "^2.2.0",
|
59
|
+
"@saas-ui/auth": "1.0.0",
|
60
|
+
"@saas-ui/banner": "1.0.0",
|
61
|
+
"@saas-ui/button": "1.0.0",
|
62
|
+
"@saas-ui/card": "1.0.0",
|
63
|
+
"@saas-ui/collapse": "1.0.0",
|
64
|
+
"@saas-ui/data-table": "1.0.0",
|
65
|
+
"@saas-ui/forms": "1.0.0",
|
66
|
+
"@saas-ui/hooks": "1.0.0",
|
67
|
+
"@saas-ui/hotkeys": "1.0.0",
|
68
|
+
"@saas-ui/input-right-button": "1.0.0",
|
69
|
+
"@saas-ui/layout": "1.0.0",
|
70
|
+
"@saas-ui/list": "1.0.0",
|
71
|
+
"@saas-ui/menu": "1.0.0",
|
72
|
+
"@saas-ui/modals": "1.0.0",
|
73
|
+
"@saas-ui/nprogress": "1.0.0",
|
74
|
+
"@saas-ui/number-input": "1.0.0",
|
75
|
+
"@saas-ui/palette": "1.0.0",
|
76
|
+
"@saas-ui/password-input": "1.0.0",
|
77
|
+
"@saas-ui/persona": "1.0.0",
|
78
|
+
"@saas-ui/pin-input": "1.0.0",
|
79
|
+
"@saas-ui/property": "1.0.0",
|
80
|
+
"@saas-ui/provider": "1.0.0",
|
81
|
+
"@saas-ui/radio": "1.0.0",
|
82
|
+
"@saas-ui/search-input": "1.0.0",
|
83
|
+
"@saas-ui/select": "1.0.0",
|
84
|
+
"@saas-ui/snackbar": "1.0.0",
|
85
|
+
"@saas-ui/stepper": "1.0.0",
|
86
|
+
"@saas-ui/theme": "1.0.0"
|
87
87
|
},
|
88
88
|
"peerDependencies": {
|
89
89
|
"@chakra-ui/react": ">=2.1.0",
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as React from 'react'
|
2
|
+
|
3
|
+
import { SaasContext } from '@saas-ui/provider'
|
4
|
+
|
5
|
+
export interface ErrorBoundaryProps {
|
6
|
+
errorComponent?: React.ReactNode
|
7
|
+
children: React.ReactNode
|
8
|
+
}
|
9
|
+
|
10
|
+
interface ErrorBoundaryState {
|
11
|
+
error?: Error | null
|
12
|
+
errorInfo?: any
|
13
|
+
}
|
14
|
+
|
15
|
+
export class ErrorBoundary extends React.Component<ErrorBoundaryProps> {
|
16
|
+
state: ErrorBoundaryState
|
17
|
+
|
18
|
+
declare context: React.ContextType<typeof SaasContext>
|
19
|
+
|
20
|
+
constructor(props: ErrorBoundaryProps) {
|
21
|
+
super(props)
|
22
|
+
this.state = { error: null }
|
23
|
+
}
|
24
|
+
|
25
|
+
static getDerivedStateFromError(error: Error) {
|
26
|
+
return { error }
|
27
|
+
}
|
28
|
+
|
29
|
+
componentDidCatch(error: Error, errorInfo: any) {
|
30
|
+
this.context.onError?.(error, errorInfo)
|
31
|
+
}
|
32
|
+
|
33
|
+
render() {
|
34
|
+
if (this.state.error) {
|
35
|
+
return this.props.errorComponent || <h1>Something went wrong.</h1>
|
36
|
+
}
|
37
|
+
|
38
|
+
return this.props.children
|
39
|
+
}
|
40
|
+
}
|
package/src/index.ts
CHANGED