@saas-ui/react 1.0.0-rc.0 → 1.0.0-rc.11

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,254 @@
1
1
  # @saas-ui/react
2
2
 
3
+ ## 1.0.0-rc.11
4
+
5
+ ### Patch Changes
6
+
7
+ - da3c4e4: Added ErrorBoundary component.
8
+ - bd3438d: FormStep now supports an onSubmit handler.
9
+ - 2ec8c91: Fixed vertical divider rendering incorrectly.
10
+ - Updated dependencies [bd3438d]
11
+ - Updated dependencies [ae47cbd]
12
+ - @saas-ui/forms@1.0.0-rc.10
13
+ - @saas-ui/property@1.0.0-rc.5
14
+ - @saas-ui/provider@1.0.0-rc.6
15
+ - @saas-ui/auth@1.0.0-rc.11
16
+ - @saas-ui/modals@1.0.0-rc.10
17
+ - @saas-ui/layout@1.0.0-rc.6
18
+ - @saas-ui/menu@1.0.0-rc.6
19
+ - @saas-ui/data-table@1.0.0-rc.6
20
+
21
+ ## 1.0.0-rc.10
22
+
23
+ ### Patch Changes
24
+
25
+ - 68c7b62: Card now has a isHoverable property to support hover styles.
26
+ - 43dff99: Option labels are now optional.
27
+ - d4afda3: ArrayFieldRowFields now accepts all FormLayout props (#48).
28
+ - 43dff99: Field is now correctly typed based on the field type.
29
+ - 38f7171: #50 - Fixed StepForm render prop types.
30
+ - 870db1f: New primary and secondary Button variant.
31
+ - Updated dependencies [68c7b62]
32
+ - Updated dependencies [43dff99]
33
+ - Updated dependencies [87d3fdc]
34
+ - Updated dependencies [d4afda3]
35
+ - Updated dependencies [43dff99]
36
+ - Updated dependencies [38f7171]
37
+ - Updated dependencies [870db1f]
38
+ - @saas-ui/card@1.0.0-rc.4
39
+ - @saas-ui/forms@1.0.0-rc.9
40
+ - @saas-ui/provider@1.0.0-rc.5
41
+ - @saas-ui/button@1.0.0-rc.4
42
+ - @saas-ui/auth@1.0.0-rc.10
43
+ - @saas-ui/modals@1.0.0-rc.9
44
+ - @saas-ui/layout@1.0.0-rc.5
45
+ - @saas-ui/menu@1.0.0-rc.5
46
+ - @saas-ui/banner@1.0.0-rc.4
47
+ - @saas-ui/input-right-button@1.0.0-rc.4
48
+ - @saas-ui/list@1.0.0-rc.4
49
+ - @saas-ui/data-table@1.0.0-rc.5
50
+ - @saas-ui/password-input@1.0.0-rc.4
51
+ - @saas-ui/property@1.0.0-rc.4
52
+
53
+ ## 1.0.0-rc.9
54
+
55
+ ### Patch Changes
56
+
57
+ - de0dce2: Scale reset button icon based on the input size.
58
+ - dc6376f: Updated all readme files, added better descriptions and links to docs and source code.
59
+ - 68f5d3b: Removed isPrimary and isSecondary Button properties, use colorScheme="primary" instead.
60
+ - Updated dependencies [de0dce2]
61
+ - Updated dependencies [dc6376f]
62
+ - Updated dependencies [68f5d3b]
63
+ - @saas-ui/search-input@1.0.0-rc.3
64
+ - @saas-ui/auth@1.0.0-rc.9
65
+ - @saas-ui/banner@1.0.0-rc.3
66
+ - @saas-ui/button@1.0.0-rc.3
67
+ - @saas-ui/card@1.0.0-rc.3
68
+ - @saas-ui/collapse@1.0.0-rc.3
69
+ - @saas-ui/data-table@1.0.0-rc.4
70
+ - @saas-ui/forms@1.0.0-rc.8
71
+ - @saas-ui/hooks@1.0.0-rc.3
72
+ - @saas-ui/hotkeys@1.0.0-rc.3
73
+ - @saas-ui/input-right-button@1.0.0-rc.3
74
+ - @saas-ui/layout@1.0.0-rc.4
75
+ - @saas-ui/list@1.0.0-rc.3
76
+ - @saas-ui/menu@1.0.0-rc.4
77
+ - @saas-ui/modals@1.0.0-rc.8
78
+ - @saas-ui/nprogress@1.0.0-rc.3
79
+ - @saas-ui/number-input@1.0.0-rc.3
80
+ - @saas-ui/palette@1.0.0-rc.3
81
+ - @saas-ui/password-input@1.0.0-rc.3
82
+ - @saas-ui/persona@1.0.0-rc.4
83
+ - @saas-ui/pin-input@1.0.0-rc.4
84
+ - @saas-ui/property@1.0.0-rc.3
85
+ - @saas-ui/provider@1.0.0-rc.4
86
+ - @saas-ui/radio@1.0.0-rc.3
87
+ - @saas-ui/select@1.0.0-rc.3
88
+ - @saas-ui/snackbar@1.0.0-rc.3
89
+ - @saas-ui/stepper@1.0.0-rc.4
90
+ - @saas-ui/theme@1.0.0-rc.3
91
+
92
+ ## 1.0.0-rc.8
93
+
94
+ ### Patch Changes
95
+
96
+ - Fix vertical orientation for FormStepper.
97
+ - Updated dependencies
98
+ - @saas-ui/forms@1.0.0-rc.7
99
+ - @saas-ui/auth@1.0.0-rc.8
100
+ - @saas-ui/modals@1.0.0-rc.7
101
+
102
+ ## 1.0.0-rc.7
103
+
104
+ ### Patch Changes
105
+
106
+ - Add exports entry for ajv
107
+ - Updated dependencies
108
+ - @saas-ui/forms@1.0.0-rc.6
109
+ - @saas-ui/auth@1.0.0-rc.7
110
+ - @saas-ui/modals@1.0.0-rc.6
111
+
112
+ ## 1.0.0-rc.6
113
+
114
+ ### Patch Changes
115
+
116
+ - fca06e4: Added Json Schema (ajv) support for AutoForm.
117
+ - Updated dependencies [fca06e4]
118
+ - @saas-ui/forms@1.0.0-rc.5
119
+ - @saas-ui/auth@1.0.0-rc.6
120
+ - @saas-ui/modals@1.0.0-rc.5
121
+
122
+ ## 1.0.0-rc.5
123
+
124
+ ### Patch Changes
125
+
126
+ - 9e9c601: Stepper now accepts an onChange handler.
127
+ - Updated dependencies [9e9c601]
128
+ - @saas-ui/stepper@1.0.0-rc.3
129
+ - @saas-ui/forms@1.0.0-rc.4
130
+ - @saas-ui/auth@1.0.0-rc.5
131
+ - @saas-ui/modals@1.0.0-rc.4
132
+
133
+ ## 1.0.0-rc.4
134
+
135
+ ### Minor Changes
136
+
137
+ - 532a7d4: Updated to Chakra UI 2.2.1
138
+ - 7a16ef7: Updated to Chakra UI 2.2.1
139
+
140
+ ### Patch Changes
141
+
142
+ - c8621b8: NativeSelect now accepts chilren and doesn't throw if no options are passed.
143
+ - 6133901: No longer passing down label to input fields.
144
+ - ddec417: ArrayField no longer passing down items to the container element.
145
+ - 5f80cea: AutoForm now renders children.
146
+ - 532a7d4: Fixed all theme onconsistencies.
147
+ - 1c247cb: InputField now has type="text" by default.
148
+ - d1fb472: Select now renders a hidden input with the current value.
149
+ - Updated dependencies [c8621b8]
150
+ - Updated dependencies [532a7d4]
151
+ - Updated dependencies [6133901]
152
+ - Updated dependencies [ddec417]
153
+ - Updated dependencies [7a16ef7]
154
+ - Updated dependencies [5f80cea]
155
+ - Updated dependencies [532a7d4]
156
+ - Updated dependencies [1c247cb]
157
+ - Updated dependencies [d1fb472]
158
+ - @saas-ui/select@1.0.0-rc.2
159
+ - @saas-ui/auth@1.0.0-rc.4
160
+ - @saas-ui/banner@1.0.0-rc.2
161
+ - @saas-ui/button@1.0.0-rc.2
162
+ - @saas-ui/card@1.0.0-rc.2
163
+ - @saas-ui/collapse@1.0.0-rc.2
164
+ - @saas-ui/data-table@1.0.0-rc.3
165
+ - @saas-ui/forms@1.0.0-rc.3
166
+ - @saas-ui/hooks@1.0.0-rc.2
167
+ - @saas-ui/hotkeys@1.0.0-rc.2
168
+ - @saas-ui/input-right-button@1.0.0-rc.2
169
+ - @saas-ui/layout@1.0.0-rc.3
170
+ - @saas-ui/list@1.0.0-rc.2
171
+ - @saas-ui/menu@1.0.0-rc.3
172
+ - @saas-ui/modals@1.0.0-rc.3
173
+ - @saas-ui/nprogress@1.0.0-rc.2
174
+ - @saas-ui/number-input@1.0.0-rc.2
175
+ - @saas-ui/palette@1.0.0-rc.2
176
+ - @saas-ui/password-input@1.0.0-rc.2
177
+ - @saas-ui/persona@1.0.0-rc.3
178
+ - @saas-ui/pin-input@1.0.0-rc.3
179
+ - @saas-ui/property@1.0.0-rc.2
180
+ - @saas-ui/provider@1.0.0-rc.3
181
+ - @saas-ui/radio@1.0.0-rc.2
182
+ - @saas-ui/search-input@1.0.0-rc.2
183
+ - @saas-ui/snackbar@1.0.0-rc.2
184
+ - @saas-ui/stepper@1.0.0-rc.2
185
+ - @saas-ui/theme@1.0.0-rc.2
186
+
187
+ ## 1.0.0-rc.3
188
+
189
+ ### Patch Changes
190
+
191
+ - Re-publish.
192
+ - Updated dependencies
193
+ - @saas-ui/auth@1.0.0-rc.3
194
+ - @saas-ui/banner@1.0.0-rc.1
195
+ - @saas-ui/button@1.0.0-rc.1
196
+ - @saas-ui/card@1.0.0-rc.1
197
+ - @saas-ui/collapse@1.0.0-rc.1
198
+ - @saas-ui/data-table@1.0.0-rc.2
199
+ - @saas-ui/forms@1.0.0-rc.2
200
+ - @saas-ui/hooks@1.0.0-rc.1
201
+ - @saas-ui/hotkeys@1.0.0-rc.1
202
+ - @saas-ui/input-right-button@1.0.0-rc.1
203
+ - @saas-ui/layout@1.0.0-rc.2
204
+ - @saas-ui/list@1.0.0-rc.1
205
+ - @saas-ui/menu@1.0.0-rc.2
206
+ - @saas-ui/modals@1.0.0-rc.2
207
+ - @saas-ui/nprogress@1.0.0-rc.1
208
+ - @saas-ui/number-input@1.0.0-rc.1
209
+ - @saas-ui/palette@1.0.0-rc.1
210
+ - @saas-ui/password-input@1.0.0-rc.1
211
+ - @saas-ui/persona@1.0.0-rc.2
212
+ - @saas-ui/pin-input@1.0.0-rc.2
213
+ - @saas-ui/property@1.0.0-rc.1
214
+ - @saas-ui/provider@1.0.0-rc.2
215
+ - @saas-ui/radio@1.0.0-rc.1
216
+ - @saas-ui/search-input@1.0.0-rc.1
217
+ - @saas-ui/select@1.0.0-rc.1
218
+ - @saas-ui/snackbar@1.0.0-rc.1
219
+ - @saas-ui/stepper@1.0.0-rc.1
220
+ - @saas-ui/theme@1.0.0-rc.1
221
+
222
+ ## 1.0.0-rc.2
223
+
224
+ ### Patch Changes
225
+
226
+ - 4bb613c: Added new RouterProvider and useActivePath now uses Router context.
227
+ - 8f3f948: Removed redundant ThemeProvider / CSSReset and GlobalStyles components.
228
+ - 3dee538: Spacing between pin inputs can now be configured.
229
+ - 07491fd: ContextMenu now passing down all props to the internal Menu.
230
+ - Updated dependencies [4bb613c]
231
+ - Updated dependencies [4fc04d7]
232
+ - Updated dependencies [8f3f948]
233
+ - Updated dependencies [3dee538]
234
+ - Updated dependencies [07491fd]
235
+ - @saas-ui/provider@1.0.0-rc.1
236
+ - @saas-ui/persona@1.0.0-rc.1
237
+ - @saas-ui/pin-input@1.0.0-rc.1
238
+ - @saas-ui/menu@1.0.0-rc.1
239
+ - @saas-ui/layout@1.0.0-rc.1
240
+ - @saas-ui/forms@1.0.0-rc.1
241
+ - @saas-ui/modals@1.0.0-rc.1
242
+ - @saas-ui/auth@1.0.0-rc.2
243
+ - @saas-ui/data-table@1.0.0-rc.1
244
+
245
+ ## 1.0.0-rc.1
246
+
247
+ ### Patch Changes
248
+
249
+ - Updated dependencies [9043639]
250
+ - @saas-ui/auth@1.0.0-rc.1
251
+
3
252
  ## 1.0.0-rc.0
4
253
 
5
254
  ### Major Changes
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","chakra","span"],"mappings":"6rCAGqD,SAACA,gBACpD,OACEC,gBAACC,SAAOC,KAASH,eACfC"}
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","chakra","span"],"mappings":"y5BAGaA,MAAAA,EAAyCC,gBAElDC,gBAACC,EAAOC,KAASH,eACfC"}
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.0",
3
+ "version": "1.0.0-rc.11",
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.0.0",
59
- "@saas-ui/auth": "1.0.0-rc.0",
60
- "@saas-ui/banner": "1.0.0-rc.0",
61
- "@saas-ui/button": "1.0.0-rc.0",
62
- "@saas-ui/card": "1.0.0-rc.0",
63
- "@saas-ui/collapse": "1.0.0-rc.0",
64
- "@saas-ui/data-table": "1.0.0-rc.0",
65
- "@saas-ui/forms": "1.0.0-rc.0",
66
- "@saas-ui/hooks": "1.0.0-rc.0",
67
- "@saas-ui/hotkeys": "1.0.0-rc.0",
68
- "@saas-ui/input-right-button": "1.0.0-rc.0",
69
- "@saas-ui/layout": "1.0.0-rc.0",
70
- "@saas-ui/list": "1.0.0-rc.0",
71
- "@saas-ui/menu": "1.0.0-rc.0",
72
- "@saas-ui/modals": "1.0.0-rc.0",
73
- "@saas-ui/nprogress": "1.0.0-rc.0",
74
- "@saas-ui/number-input": "1.0.0-rc.0",
75
- "@saas-ui/palette": "1.0.0-rc.0",
76
- "@saas-ui/password-input": "1.0.0-rc.0",
77
- "@saas-ui/persona": "1.0.0-rc.0",
78
- "@saas-ui/pin-input": "1.0.0-rc.0",
79
- "@saas-ui/property": "1.0.0-rc.0",
80
- "@saas-ui/provider": "1.0.0-rc.0",
81
- "@saas-ui/radio": "1.0.0-rc.0",
82
- "@saas-ui/search-input": "1.0.0-rc.0",
83
- "@saas-ui/select": "1.0.0-rc.0",
84
- "@saas-ui/snackbar": "1.0.0-rc.0",
85
- "@saas-ui/stepper": "1.0.0-rc.0",
86
- "@saas-ui/theme": "1.0.0-rc.0"
58
+ "@chakra-ui/system": "^2.1.3",
59
+ "@saas-ui/auth": "1.0.0-rc.11",
60
+ "@saas-ui/banner": "1.0.0-rc.4",
61
+ "@saas-ui/button": "1.0.0-rc.4",
62
+ "@saas-ui/card": "1.0.0-rc.4",
63
+ "@saas-ui/collapse": "1.0.0-rc.3",
64
+ "@saas-ui/data-table": "1.0.0-rc.6",
65
+ "@saas-ui/forms": "1.0.0-rc.10",
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.4",
69
+ "@saas-ui/layout": "1.0.0-rc.6",
70
+ "@saas-ui/list": "1.0.0-rc.4",
71
+ "@saas-ui/menu": "1.0.0-rc.6",
72
+ "@saas-ui/modals": "1.0.0-rc.10",
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.4",
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.5",
80
+ "@saas-ui/provider": "1.0.0-rc.6",
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"
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'