@sikka/hawa 0.30.0-next → 0.30.1-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2364,12 +2364,16 @@ var Alert = ({
2364
2364
  if (props.onAlertClosed) {
2365
2365
  props.onAlertClosed();
2366
2366
  }
2367
- setClosed(true);
2368
- setTimeout(() => {
2369
- if (alertRef == null ? void 0 : alertRef.current) {
2370
- alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
2371
- }
2372
- }, 200);
2367
+ if (!props.noDestroy) {
2368
+ setClosed(true);
2369
+ setTimeout(() => {
2370
+ if (alertRef == null ? void 0 : alertRef.current) {
2371
+ alertRef == null ? void 0 : alertRef.current.removeChild(
2372
+ alertRef == null ? void 0 : alertRef.current.children[0]
2373
+ );
2374
+ }
2375
+ }, 200);
2376
+ }
2373
2377
  }
2374
2378
  },
2375
2379
  /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-sr-only" }, "Close"),
@@ -9938,7 +9942,13 @@ var RegisterForm = ({
9938
9942
  {
9939
9943
  title: props.errorTitle,
9940
9944
  text: props.errorText,
9941
- severity: "error"
9945
+ severity: "error",
9946
+ noDestroy: true,
9947
+ onAlertClosed: () => {
9948
+ if (props.onErrorDismissed) {
9949
+ props.onErrorDismissed();
9950
+ }
9951
+ }
9942
9952
  }
9943
9953
  ), /* @__PURE__ */ import_react48.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react48.default.createElement(
9944
9954
  "form",
package/dist/index.mjs CHANGED
@@ -2129,12 +2129,16 @@ var Alert = ({
2129
2129
  if (props.onAlertClosed) {
2130
2130
  props.onAlertClosed();
2131
2131
  }
2132
- setClosed(true);
2133
- setTimeout(() => {
2134
- if (alertRef == null ? void 0 : alertRef.current) {
2135
- alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
2136
- }
2137
- }, 200);
2132
+ if (!props.noDestroy) {
2133
+ setClosed(true);
2134
+ setTimeout(() => {
2135
+ if (alertRef == null ? void 0 : alertRef.current) {
2136
+ alertRef == null ? void 0 : alertRef.current.removeChild(
2137
+ alertRef == null ? void 0 : alertRef.current.children[0]
2138
+ );
2139
+ }
2140
+ }, 200);
2141
+ }
2138
2142
  }
2139
2143
  },
2140
2144
  /* @__PURE__ */ React16.createElement("span", { className: "hawa-sr-only" }, "Close"),
@@ -9718,7 +9722,13 @@ var RegisterForm = ({
9718
9722
  {
9719
9723
  title: props.errorTitle,
9720
9724
  text: props.errorText,
9721
- severity: "error"
9725
+ severity: "error",
9726
+ noDestroy: true,
9727
+ onAlertClosed: () => {
9728
+ if (props.onErrorDismissed) {
9729
+ props.onErrorDismissed();
9730
+ }
9731
+ }
9722
9732
  }
9723
9733
  ), /* @__PURE__ */ React75.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React75.createElement(
9724
9734
  "form",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.30.0-next",
3
+ "version": "0.30.1-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",