@saas-ui/react 1.0.0-rc.9 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,274 @@
1
1
  # @saas-ui/react
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [fe754e6]
8
+ - Updated dependencies [fe1e333]
9
+ - @saas-ui/forms@1.0.2
10
+ - @saas-ui/input-right-button@1.0.1
11
+ - @saas-ui/auth@1.0.2
12
+ - @saas-ui/modals@1.0.2
13
+ - @saas-ui/password-input@1.0.1
14
+
15
+ ## 1.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - fe10fc8: BannerContent flexDirection set to column on small screens.
20
+ - 3ce1dee: Support JSONSchema title in field resolvers
21
+ - 150efb2: Select field focus styles now consistent with Input fields.
22
+ - 4a37ca7: Fixed @chakra-ui/system dependency version.
23
+ - Updated dependencies [fe10fc8]
24
+ - Updated dependencies [3ce1dee]
25
+ - Updated dependencies [150efb2]
26
+ - Updated dependencies [3f928c2]
27
+ - @saas-ui/banner@1.0.1
28
+ - @saas-ui/forms@1.0.1
29
+ - @saas-ui/modals@1.0.1
30
+ - @saas-ui/auth@1.0.1
31
+
32
+ ## 1.0.0
33
+
34
+ ### Major Changes
35
+
36
+ - 3ae6be1: breaking: Updated to Chakra UI 2.1
37
+ - 3ae6be1: breaking: React 18 support.
38
+ - 532a7d4: Updated to Chakra UI 2.2.1
39
+
40
+ ### Patch Changes
41
+
42
+ - 68c7b62: Card now has a isHoverable property to support hover styles.
43
+ - c8621b8: NativeSelect now accepts chilren and doesn't throw if no options are passed.
44
+ - fca06e4: Added Json Schema (ajv) support for AutoForm.
45
+ - da3c4e4: Added ErrorBoundary component.
46
+ - de0dce2: Scale reset button icon based on the input size.
47
+ - 6cc9343: Add exports entry for ajv
48
+ - 15c3960: Re-publish.
49
+ - 1744543: Updated dependencies.
50
+ - bd3438d: FormStep now supports an onSubmit handler.
51
+ - 6133901: No longer passing down label to input fields.
52
+ - dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
53
+ - 43dff99: Option labels are now optional.
54
+ - 4bb613c: Added new RouterProvider and useActivePath now uses Router context.
55
+ - d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
56
+ - 9e9c601: Stepper now accepts an onChange handler.
57
+ - ddec417: ArrayField no longer passing down items to the container element.
58
+ - 43dff99: Field is now correctly typed based on the field type.
59
+ - 5a1b92b: Fix vertical orientation for FormStepper.
60
+ - 1fdf52a: Modern bundles now use .mjs extension.
61
+ - 38f7171: #50 - Fixed StepForm render prop types.
62
+ - 2ec8c91: Fixed vertical divider rendering incorrectly.
63
+ - 8f3f948: Removed redundant ThemeProvider / CSSReset and GlobalStyles components.
64
+ - 5f80cea: AutoForm now renders children.
65
+ - 532a7d4: Fixed all theme onconsistencies.
66
+ - 42beaa4: Added missing dependency.
67
+ - 3dee538: Spacing between pin inputs can now be configured.
68
+ - 1c247cb: InputField now has type="text" by default.
69
+ - 07491fd: ContextMenu now passing down all props to the internal Menu.
70
+ - d1fb472: Select now renders a hidden input with the current value.
71
+ - 870db1f: New primary and secondary Button variant.
72
+ - 68f5d3b: Removed isPrimary and isSecondary Button properties, use variant="primary" instead.
73
+ - Updated dependencies [68c7b62]
74
+ - Updated dependencies [3ae6be1]
75
+ - Updated dependencies [c8621b8]
76
+ - Updated dependencies [fca06e4]
77
+ - Updated dependencies [de0dce2]
78
+ - Updated dependencies [6cc9343]
79
+ - Updated dependencies [15c3960]
80
+ - Updated dependencies [532a7d4]
81
+ - Updated dependencies [1744543]
82
+ - Updated dependencies [bd3438d]
83
+ - Updated dependencies [6133901]
84
+ - Updated dependencies [a8fa78a]
85
+ - Updated dependencies [dc6376f]
86
+ - Updated dependencies [43dff99]
87
+ - Updated dependencies [87d3fdc]
88
+ - Updated dependencies [ae47cbd]
89
+ - Updated dependencies [4bb613c]
90
+ - Updated dependencies [d4afda3]
91
+ - Updated dependencies [9e9c601]
92
+ - Updated dependencies [ddec417]
93
+ - Updated dependencies [a134a6f]
94
+ - Updated dependencies [1db5bf9]
95
+ - Updated dependencies [4fc04d7]
96
+ - Updated dependencies [43dff99]
97
+ - Updated dependencies [5a1b92b]
98
+ - Updated dependencies [1fdf52a]
99
+ - Updated dependencies [1744543]
100
+ - Updated dependencies [7a16ef7]
101
+ - Updated dependencies [38f7171]
102
+ - Updated dependencies [a134a6f]
103
+ - Updated dependencies [9043639]
104
+ - Updated dependencies [8f3f948]
105
+ - Updated dependencies [5f80cea]
106
+ - Updated dependencies [532a7d4]
107
+ - Updated dependencies [42beaa4]
108
+ - Updated dependencies [3dee538]
109
+ - Updated dependencies [1c247cb]
110
+ - Updated dependencies [07491fd]
111
+ - Updated dependencies [d1fb472]
112
+ - Updated dependencies [870db1f]
113
+ - Updated dependencies [3ae6be1]
114
+ - Updated dependencies [4fd1fb3]
115
+ - Updated dependencies [68f5d3b]
116
+ - @saas-ui/card@1.0.0
117
+ - @saas-ui/auth@1.0.0
118
+ - @saas-ui/banner@1.0.0
119
+ - @saas-ui/button@1.0.0
120
+ - @saas-ui/collapse@1.0.0
121
+ - @saas-ui/data-table@1.0.0
122
+ - @saas-ui/forms@1.0.0
123
+ - @saas-ui/hooks@1.0.0
124
+ - @saas-ui/hotkeys@1.0.0
125
+ - @saas-ui/input-right-button@1.0.0
126
+ - @saas-ui/layout@1.0.0
127
+ - @saas-ui/list@1.0.0
128
+ - @saas-ui/menu@1.0.0
129
+ - @saas-ui/modals@1.0.0
130
+ - @saas-ui/nprogress@1.0.0
131
+ - @saas-ui/number-input@1.0.0
132
+ - @saas-ui/palette@1.0.0
133
+ - @saas-ui/password-input@1.0.0
134
+ - @saas-ui/persona@1.0.0
135
+ - @saas-ui/pin-input@1.0.0
136
+ - @saas-ui/property@1.0.0
137
+ - @saas-ui/provider@1.0.0
138
+ - @saas-ui/radio@1.0.0
139
+ - @saas-ui/search-input@1.0.0
140
+ - @saas-ui/select@1.0.0
141
+ - @saas-ui/snackbar@1.0.0
142
+ - @saas-ui/stepper@1.0.0
143
+ - @saas-ui/theme@1.0.0
144
+
145
+ ## 1.0.0-rc.15
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated dependencies
150
+ - @saas-ui/theme@1.0.0-rc.5
151
+ - @saas-ui/provider@1.0.0-rc.8
152
+ - @saas-ui/layout@1.0.0-rc.8
153
+ - @saas-ui/menu@1.0.0-rc.8
154
+ - @saas-ui/auth@1.0.0-rc.14
155
+ - @saas-ui/data-table@1.0.0-rc.8
156
+ - @saas-ui/modals@1.0.0-rc.13
157
+
158
+ ## 1.0.0-rc.14
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [a134a6f]
163
+ - Updated dependencies [a134a6f]
164
+ - @saas-ui/hotkeys@1.0.0-rc.5
165
+ - @saas-ui/collapse@1.0.0-rc.5
166
+ - @saas-ui/stepper@1.0.0-rc.6
167
+ - @saas-ui/forms@1.0.0-rc.12
168
+ - @saas-ui/auth@1.0.0-rc.13
169
+ - @saas-ui/modals@1.0.0-rc.12
170
+
171
+ ## 1.0.0-rc.13
172
+
173
+ ### Patch Changes
174
+
175
+ - 1744543: Updated dependencies.
176
+ - Updated dependencies [1744543]
177
+ - Updated dependencies [1744543]
178
+ - @saas-ui/auth@1.0.0-rc.12
179
+ - @saas-ui/banner@1.0.0-rc.5
180
+ - @saas-ui/button@1.0.0-rc.5
181
+ - @saas-ui/card@1.0.0-rc.5
182
+ - @saas-ui/collapse@1.0.0-rc.4
183
+ - @saas-ui/data-table@1.0.0-rc.7
184
+ - @saas-ui/forms@1.0.0-rc.11
185
+ - @saas-ui/hooks@1.0.0-rc.4
186
+ - @saas-ui/hotkeys@1.0.0-rc.4
187
+ - @saas-ui/input-right-button@1.0.0-rc.5
188
+ - @saas-ui/layout@1.0.0-rc.7
189
+ - @saas-ui/list@1.0.0-rc.5
190
+ - @saas-ui/menu@1.0.0-rc.7
191
+ - @saas-ui/modals@1.0.0-rc.11
192
+ - @saas-ui/nprogress@1.0.0-rc.4
193
+ - @saas-ui/number-input@1.0.0-rc.4
194
+ - @saas-ui/palette@1.0.0-rc.4
195
+ - @saas-ui/password-input@1.0.0-rc.5
196
+ - @saas-ui/persona@1.0.0-rc.6
197
+ - @saas-ui/pin-input@1.0.0-rc.5
198
+ - @saas-ui/property@1.0.0-rc.6
199
+ - @saas-ui/provider@1.0.0-rc.7
200
+ - @saas-ui/radio@1.0.0-rc.4
201
+ - @saas-ui/search-input@1.0.0-rc.4
202
+ - @saas-ui/select@1.0.0-rc.4
203
+ - @saas-ui/snackbar@1.0.0-rc.4
204
+ - @saas-ui/stepper@1.0.0-rc.5
205
+ - @saas-ui/theme@1.0.0-rc.4
206
+
207
+ ## 1.0.0-rc.12
208
+
209
+ ### Patch Changes
210
+
211
+ - Added missing dependency.
212
+ - Updated dependencies
213
+ - @saas-ui/persona@1.0.0-rc.5
214
+
215
+ ## 1.0.0-rc.11
216
+
217
+ ### Patch Changes
218
+
219
+ - da3c4e4: Added ErrorBoundary component.
220
+ - bd3438d: FormStep now supports an onSubmit handler.
221
+ - 2ec8c91: Fixed vertical divider rendering incorrectly.
222
+ - Updated dependencies [bd3438d]
223
+ - Updated dependencies [ae47cbd]
224
+ - @saas-ui/forms@1.0.0-rc.10
225
+ - @saas-ui/property@1.0.0-rc.5
226
+ - @saas-ui/provider@1.0.0-rc.6
227
+ - @saas-ui/auth@1.0.0-rc.11
228
+ - @saas-ui/modals@1.0.0-rc.10
229
+ - @saas-ui/layout@1.0.0-rc.6
230
+ - @saas-ui/menu@1.0.0-rc.6
231
+ - @saas-ui/data-table@1.0.0-rc.6
232
+
233
+ ## 1.0.0-rc.10
234
+
235
+ ### Patch Changes
236
+
237
+ - 68c7b62: Card now has a isHoverable property to support hover styles.
238
+ - 43dff99: Option labels are now optional.
239
+ - d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
240
+ - 43dff99: Field is now correctly typed based on the field type.
241
+ - 38f7171: #50 - Fixed StepForm render prop types.
242
+ - 870db1f: New primary and secondary Button variant.
243
+ - Updated dependencies [68c7b62]
244
+ - Updated dependencies [43dff99]
245
+ - Updated dependencies [87d3fdc]
246
+ - Updated dependencies [d4afda3]
247
+ - Updated dependencies [43dff99]
248
+ - Updated dependencies [38f7171]
249
+ - Updated dependencies [870db1f]
250
+ - @saas-ui/card@1.0.0-rc.4
251
+ - @saas-ui/forms@1.0.0-rc.9
252
+ - @saas-ui/provider@1.0.0-rc.5
253
+ - @saas-ui/button@1.0.0-rc.4
254
+ - @saas-ui/auth@1.0.0-rc.10
255
+ - @saas-ui/modals@1.0.0-rc.9
256
+ - @saas-ui/layout@1.0.0-rc.5
257
+ - @saas-ui/menu@1.0.0-rc.5
258
+ - @saas-ui/banner@1.0.0-rc.4
259
+ - @saas-ui/input-right-button@1.0.0-rc.4
260
+ - @saas-ui/list@1.0.0-rc.4
261
+ - @saas-ui/data-table@1.0.0-rc.5
262
+ - @saas-ui/password-input@1.0.0-rc.4
263
+ - @saas-ui/property@1.0.0-rc.4
264
+
3
265
  ## 1.0.0-rc.9
4
266
 
5
267
  ### Patch Changes
6
268
 
7
269
  - de0dce2: Scale reset button icon based on the input size.
8
270
  - dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
9
- - 68f5d3b: Removed isPrimary and isSecondary Button properties, use colorScheme="primary" instead.
271
+ - 68f5d3b: Removed isPrimary and isSecondary Button properties, use variant="primary" instead.
10
272
  - Updated dependencies [de0dce2]
11
273
  - Updated dependencies [dc6376f]
12
274
  - Updated dependencies [68f5d3b]
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Saas UI - The frontend stack for SaaS companies
1
+ # Saas UI - The React component library for startups
2
2
 
3
3
  Saas UI is an advanced component library that helps you build essential SaaS functionality in hours instead of weeks.
4
4
 
@@ -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
@@ -1,4 +1,5 @@
1
1
  export * from './typography';
2
+ export * from './error-boundary';
2
3
  export * from '@saas-ui/auth';
3
4
  export * from '@saas-ui/banner';
4
5
  export * from '@saas-ui/button';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAE5B,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"}
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"),u=require("@saas-ui/button"),o=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"),d=require("@saas-ui/nprogress"),h=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"),k=require("@saas-ui/property"),g=require("@saas-ui/provider"),E=require("@saas-ui/radio"),q=require("@saas-ui/search-input"),w=require("@saas-ui/select"),v=require("@saas-ui/snackbar"),_=require("@saas-ui/stepper"),B=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 M=/*#__PURE__*/D(e);exports.Br=function(e){/*#__PURE__*/return M.createElement(r.chakra.span,e,/*#__PURE__*/M.createElement("br",null))},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(u).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return u[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(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(d).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[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(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(k).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return k[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(q).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return q[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(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(B).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return B[e]}})});
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":"6rCAGqD,SAACA,gBACpD,OACEC,EAACC,cAAAC,EAADA,OAAQC,KAASJ,eACfC,EAAAC,cAAA,KAAA"}
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"}
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{chakra as a}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 o=o=>/*#__PURE__*/r.createElement(a.span,o,/*#__PURE__*/r.createElement("br",null));export{o as Br};
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-rc.9",
3
+ "version": "1.0.2",
4
4
  "description": "Saas UI - The frontend stack for SaaS companies.",
5
5
  "source": "src/index.ts",
6
6
  "exports": {
@@ -56,34 +56,34 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@chakra-ui/system": "^2.1.3",
59
- "@saas-ui/auth": "1.0.0-rc.9",
60
- "@saas-ui/banner": "1.0.0-rc.3",
61
- "@saas-ui/button": "1.0.0-rc.3",
62
- "@saas-ui/card": "1.0.0-rc.3",
63
- "@saas-ui/collapse": "1.0.0-rc.3",
64
- "@saas-ui/data-table": "1.0.0-rc.4",
65
- "@saas-ui/forms": "1.0.0-rc.8",
66
- "@saas-ui/hooks": "1.0.0-rc.3",
67
- "@saas-ui/hotkeys": "1.0.0-rc.3",
68
- "@saas-ui/input-right-button": "1.0.0-rc.3",
69
- "@saas-ui/layout": "1.0.0-rc.4",
70
- "@saas-ui/list": "1.0.0-rc.3",
71
- "@saas-ui/menu": "1.0.0-rc.4",
72
- "@saas-ui/modals": "1.0.0-rc.8",
73
- "@saas-ui/nprogress": "1.0.0-rc.3",
74
- "@saas-ui/number-input": "1.0.0-rc.3",
75
- "@saas-ui/palette": "1.0.0-rc.3",
76
- "@saas-ui/password-input": "1.0.0-rc.3",
77
- "@saas-ui/persona": "1.0.0-rc.4",
78
- "@saas-ui/pin-input": "1.0.0-rc.4",
79
- "@saas-ui/property": "1.0.0-rc.3",
80
- "@saas-ui/provider": "1.0.0-rc.4",
81
- "@saas-ui/radio": "1.0.0-rc.3",
82
- "@saas-ui/search-input": "1.0.0-rc.3",
83
- "@saas-ui/select": "1.0.0-rc.3",
84
- "@saas-ui/snackbar": "1.0.0-rc.3",
85
- "@saas-ui/stepper": "1.0.0-rc.4",
86
- "@saas-ui/theme": "1.0.0-rc.3"
59
+ "@saas-ui/auth": "1.0.2",
60
+ "@saas-ui/banner": "1.0.1",
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.2",
66
+ "@saas-ui/hooks": "1.0.0",
67
+ "@saas-ui/hotkeys": "1.0.0",
68
+ "@saas-ui/input-right-button": "1.0.1",
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.2",
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.1",
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
@@ -1,5 +1,5 @@
1
1
  export * from './typography'
2
-
2
+ export * from './error-boundary'
3
3
  export * from '@saas-ui/auth'
4
4
  export * from '@saas-ui/banner'
5
5
  export * from '@saas-ui/button'