@sikka/hawa 0.15.13-next → 0.15.15-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.d.mts CHANGED
@@ -279,7 +279,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
279
279
  /** The small red text under the input field to show validation or a hint. */
280
280
  helperText?: any;
281
281
  forceHideHelperText?: boolean;
282
- inputProps?: any;
282
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
283
283
  /** The icon inside the input field */
284
284
  icon?: any;
285
285
  /** Boolean to enable/disable editing the input field and using it as a text field */
package/dist/index.d.ts CHANGED
@@ -279,7 +279,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
279
279
  /** The small red text under the input field to show validation or a hint. */
280
280
  helperText?: any;
281
281
  forceHideHelperText?: boolean;
282
- inputProps?: any;
282
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
283
283
  /** The icon inside the input field */
284
284
  icon?: any;
285
285
  /** Boolean to enable/disable editing the input field and using it as a text field */
package/dist/index.js CHANGED
@@ -7947,46 +7947,67 @@ var AuthButtons = function(props) {
7947
7947
  return /* @__PURE__ */ import_react43.default.createElement("div", {
7948
7948
  className: "hawa-flex hawa-flex-col hawa-gap-4"
7949
7949
  }, props.viaGoogle && /* @__PURE__ */ import_react43.default.createElement(Button, {
7950
+ disabled: props.isGoogleLoading,
7950
7951
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7951
7952
  variant: "outline",
7952
7953
  onClick: props.handleGoogle
7953
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.google, {
7954
+ }, props.isGoogleLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7955
+ size: "button"
7956
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.google, {
7954
7957
  className: "hawa-icon"
7955
7958
  }), (_props_texts_continueWithGoogle = (_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.continueWithGoogle) !== null && _props_texts_continueWithGoogle !== void 0 ? _props_texts_continueWithGoogle : "Continue With Google"), props.viaGithub && /* @__PURE__ */ import_react43.default.createElement(Button, {
7959
+ disabled: props.isGithubLoading,
7956
7960
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7957
7961
  variant: "outline",
7958
7962
  onClick: props.handleGithub
7959
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.github, {
7963
+ }, props.isGithubLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7964
+ size: "button"
7965
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.github, {
7960
7966
  className: "hawa-icon"
7961
7967
  }), (_props_texts_continueWithGithub = (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.continueWithGithub) !== null && _props_texts_continueWithGithub !== void 0 ? _props_texts_continueWithGithub : "Continue With Github"), props.viaTwitter && /* @__PURE__ */ import_react43.default.createElement(Button, {
7968
+ disabled: props.isTwitterLoading,
7962
7969
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7963
7970
  variant: "outline",
7964
7971
  onClick: props.handleTwitter
7965
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.twitter, {
7972
+ }, props.isTwitterLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7973
+ size: "button"
7974
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.twitter, {
7966
7975
  className: "hawa-icon"
7967
7976
  }), (_props_texts_continueWithTwitter = (_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.continueWithTwitter) !== null && _props_texts_continueWithTwitter !== void 0 ? _props_texts_continueWithTwitter : "Continue With Twitter"), props.viaApple && /* @__PURE__ */ import_react43.default.createElement(Button, {
7977
+ disabled: props.isAppleLoading,
7968
7978
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7969
7979
  variant: "outline",
7970
7980
  onClick: props.handleApple
7971
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.apple, {
7981
+ }, props.isAppleLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7982
+ size: "button"
7983
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.apple, {
7972
7984
  className: "hawa-icon"
7973
7985
  }), (_props_texts_continueWithApple = (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.continueWithApple) !== null && _props_texts_continueWithApple !== void 0 ? _props_texts_continueWithApple : "Continue With Apple"), props.viaMicrosoft && /* @__PURE__ */ import_react43.default.createElement(Button, {
7986
+ disabled: props.isMicrosoftLoading,
7974
7987
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7975
7988
  variant: "outline",
7976
7989
  onClick: props.handleMicrosoft
7977
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.microsoft, {
7990
+ }, props.isMicrosoftLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
7991
+ size: "button"
7992
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.microsoft, {
7978
7993
  className: "hawa-icon"
7979
7994
  }), (_props_texts_continueWithMicrosoft = (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.continueWithMicrosoft) !== null && _props_texts_continueWithMicrosoft !== void 0 ? _props_texts_continueWithMicrosoft : "Continue With Microsoft"), props.viaEmail && /* @__PURE__ */ import_react43.default.createElement(Button, {
7995
+ disabled: props.isEmailLoading,
7980
7996
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7981
7997
  variant: "outline",
7982
7998
  onClick: props.handleEmail
7983
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.mail, {
7999
+ }, props.isEmailLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
8000
+ size: "button"
8001
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.mail, {
7984
8002
  className: "hawa-icon"
7985
8003
  }), (_props_texts_continueWithEmail = (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.continueWithEmail) !== null && _props_texts_continueWithEmail !== void 0 ? _props_texts_continueWithEmail : "Continue With Email"), props.viaPhone && /* @__PURE__ */ import_react43.default.createElement(Button, {
8004
+ disabled: props.isPhoneLoading,
7986
8005
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
7987
8006
  variant: "outline",
7988
8007
  onClick: props.handlePhone
7989
- }, /* @__PURE__ */ import_react43.default.createElement(Logos.phone, {
8008
+ }, props.isPhoneLoading ? /* @__PURE__ */ import_react43.default.createElement(Loading, {
8009
+ size: "button"
8010
+ }) : /* @__PURE__ */ import_react43.default.createElement(Logos.phone, {
7990
8011
  className: "hawa-icon"
7991
8012
  }), (_props_texts_continueWithPhone = (_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.continueWithPhone) !== null && _props_texts_continueWithPhone !== void 0 ? _props_texts_continueWithPhone : "Continue With Phone"));
7992
8013
  };
@@ -8233,6 +8254,10 @@ var LoginForm = function(_param) {
8233
8254
  var field = param.field;
8234
8255
  var _texts_email, _formState_errors_email, _texts_email1;
8235
8256
  return /* @__PURE__ */ import_react45.default.createElement(Input, _object_spread({
8257
+ inputProps: {
8258
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8259
+ },
8260
+ dir: "ltr",
8236
8261
  width: "full",
8237
8262
  autoComplete: "email",
8238
8263
  label: texts === null || texts === void 0 ? void 0 : (_texts_email = texts.email) === null || _texts_email === void 0 ? void 0 : _texts_email.label,
@@ -8359,6 +8384,7 @@ var LoginForm = function(_param) {
8359
8384
  }, /* @__PURE__ */ import_react45.default.createElement(CardContent, {
8360
8385
  headless: true
8361
8386
  }, props.showError && /* @__PURE__ */ import_react45.default.createElement(Alert, {
8387
+ direction: props.direction,
8362
8388
  title: props.errorTitle,
8363
8389
  text: props.errorText,
8364
8390
  severity: "error"
@@ -8375,7 +8401,8 @@ var LoginForm = function(_param) {
8375
8401
  }, renderFields(), /* @__PURE__ */ import_react45.default.createElement(Button, {
8376
8402
  className: "hawa-mt-0 hawa-w-full",
8377
8403
  type: "submit",
8378
- isLoading: props.isLoading
8404
+ isLoading: props.isLoading,
8405
+ disabled: props.isLoading
8379
8406
  }, (texts === null || texts === void 0 ? void 0 : texts.loginText) || "Login"), props.additionalButtons, props.allowRegister && /* @__PURE__ */ import_react45.default.createElement("div", {
8380
8407
  className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal hawa-select-none dark:hawa-text-gray-300"
8381
8408
  }, (texts === null || texts === void 0 ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react45.default.createElement("span", {
@@ -8388,6 +8415,9 @@ var LoginForm = function(_param) {
8388
8415
  viaGoogle: props.viaGoogle,
8389
8416
  viaGithub: props.viaGithub,
8390
8417
  viaTwitter: props.viaTwitter,
8418
+ isGoogleLoading: props.isGoogleLoading,
8419
+ isGithubLoading: props.isGithubLoading,
8420
+ isTwitterLoading: props.isTwitterLoading,
8391
8421
  handleGoogle: props.onGoogleLogin,
8392
8422
  handleGithub: props.onGithubLogin,
8393
8423
  handleTwitter: props.onTwitterLogin
@@ -8537,6 +8567,10 @@ var RegisterForm = function(_param) {
8537
8567
  var field = param.field;
8538
8568
  var _texts_email, _formState_errors_email, _texts_email1;
8539
8569
  return /* @__PURE__ */ import_react46.default.createElement(Input, _object_spread({
8570
+ dir: "ltr",
8571
+ inputProps: {
8572
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8573
+ },
8540
8574
  width: "full",
8541
8575
  autoComplete: "email",
8542
8576
  label: texts === null || texts === void 0 ? void 0 : (_texts_email = texts.email) === null || _texts_email === void 0 ? void 0 : _texts_email.label,
@@ -8683,6 +8717,9 @@ var RegisterForm = function(_param) {
8683
8717
  viaGoogle: props.viaGoogle,
8684
8718
  viaGithub: props.viaGithub,
8685
8719
  viaTwitter: props.viaTwitter,
8720
+ isGoogleLoading: props.isGoogleLoading,
8721
+ isGithubLoading: props.isGithubLoading,
8722
+ isTwitterLoading: props.isTwitterLoading,
8686
8723
  handleGoogle: props.onGoogleRegister,
8687
8724
  handleGithub: props.onGithubRegister,
8688
8725
  handleTwitter: props.onTwitterRegister
package/dist/index.mjs CHANGED
@@ -8010,65 +8010,72 @@ var AuthButtons = (props) => {
8010
8010
  return /* @__PURE__ */ React70.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, props.viaGoogle && /* @__PURE__ */ React70.createElement(
8011
8011
  Button,
8012
8012
  {
8013
+ disabled: props.isGoogleLoading,
8013
8014
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8014
8015
  variant: "outline",
8015
8016
  onClick: props.handleGoogle
8016
8017
  },
8017
- /* @__PURE__ */ React70.createElement(Logos.google, { className: "hawa-icon" }),
8018
+ props.isGoogleLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.google, { className: "hawa-icon" }),
8018
8019
  props.texts?.continueWithGoogle ?? "Continue With Google"
8019
8020
  ), props.viaGithub && /* @__PURE__ */ React70.createElement(
8020
8021
  Button,
8021
8022
  {
8023
+ disabled: props.isGithubLoading,
8022
8024
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8023
8025
  variant: "outline",
8024
8026
  onClick: props.handleGithub
8025
8027
  },
8026
- /* @__PURE__ */ React70.createElement(Logos.github, { className: "hawa-icon" }),
8028
+ props.isGithubLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.github, { className: "hawa-icon" }),
8027
8029
  props.texts?.continueWithGithub ?? "Continue With Github"
8028
8030
  ), props.viaTwitter && /* @__PURE__ */ React70.createElement(
8029
8031
  Button,
8030
8032
  {
8033
+ disabled: props.isTwitterLoading,
8031
8034
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8032
8035
  variant: "outline",
8033
8036
  onClick: props.handleTwitter
8034
8037
  },
8035
- /* @__PURE__ */ React70.createElement(Logos.twitter, { className: "hawa-icon" }),
8038
+ props.isTwitterLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.twitter, { className: "hawa-icon" }),
8036
8039
  props.texts?.continueWithTwitter ?? "Continue With Twitter"
8037
8040
  ), props.viaApple && /* @__PURE__ */ React70.createElement(
8038
8041
  Button,
8039
8042
  {
8043
+ disabled: props.isAppleLoading,
8040
8044
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8041
8045
  variant: "outline",
8042
8046
  onClick: props.handleApple
8043
8047
  },
8044
- /* @__PURE__ */ React70.createElement(Logos.apple, { className: "hawa-icon" }),
8048
+ props.isAppleLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.apple, { className: "hawa-icon" }),
8045
8049
  props.texts?.continueWithApple ?? "Continue With Apple"
8046
8050
  ), props.viaMicrosoft && /* @__PURE__ */ React70.createElement(
8047
8051
  Button,
8048
8052
  {
8053
+ disabled: props.isMicrosoftLoading,
8049
8054
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8050
8055
  variant: "outline",
8051
8056
  onClick: props.handleMicrosoft
8052
8057
  },
8053
- /* @__PURE__ */ React70.createElement(Logos.microsoft, { className: "hawa-icon" }),
8058
+ props.isMicrosoftLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.microsoft, { className: "hawa-icon" }),
8054
8059
  props.texts?.continueWithMicrosoft ?? "Continue With Microsoft"
8055
8060
  ), props.viaEmail && /* @__PURE__ */ React70.createElement(
8056
8061
  Button,
8057
8062
  {
8063
+ disabled: props.isEmailLoading,
8058
8064
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8059
8065
  variant: "outline",
8060
8066
  onClick: props.handleEmail
8061
8067
  },
8062
- /* @__PURE__ */ React70.createElement(Logos.mail, { className: "hawa-icon" }),
8068
+ props.isEmailLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.mail, { className: "hawa-icon" }),
8063
8069
  props.texts?.continueWithEmail ?? "Continue With Email"
8064
8070
  ), props.viaPhone && /* @__PURE__ */ React70.createElement(
8065
8071
  Button,
8066
8072
  {
8073
+ disabled: props.isPhoneLoading,
8067
8074
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
8068
8075
  variant: "outline",
8069
8076
  onClick: props.handlePhone
8070
8077
  },
8071
- /* @__PURE__ */ React70.createElement(Logos.phone, { className: "hawa-icon" }),
8078
+ props.isPhoneLoading ? /* @__PURE__ */ React70.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React70.createElement(Logos.phone, { className: "hawa-icon" }),
8072
8079
  props.texts?.continueWithPhone ?? "Continue With Phone"
8073
8080
  ));
8074
8081
  };
@@ -8303,6 +8310,10 @@ var LoginForm = ({
8303
8310
  render: ({ field }) => /* @__PURE__ */ React72.createElement(
8304
8311
  Input,
8305
8312
  {
8313
+ inputProps: {
8314
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8315
+ },
8316
+ dir: "ltr",
8306
8317
  width: "full",
8307
8318
  autoComplete: "email",
8308
8319
  label: texts?.email?.label,
@@ -8443,6 +8454,7 @@ var LoginForm = ({
8443
8454
  return /* @__PURE__ */ React72.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ React72.createElement(Card, { dir: props.direction }, /* @__PURE__ */ React72.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React72.createElement(
8444
8455
  Alert,
8445
8456
  {
8457
+ direction: props.direction,
8446
8458
  title: props.errorTitle,
8447
8459
  text: props.errorText,
8448
8460
  severity: "error"
@@ -8466,7 +8478,8 @@ var LoginForm = ({
8466
8478
  {
8467
8479
  className: "hawa-mt-0 hawa-w-full",
8468
8480
  type: "submit",
8469
- isLoading: props.isLoading
8481
+ isLoading: props.isLoading,
8482
+ disabled: props.isLoading
8470
8483
  },
8471
8484
  texts?.loginText || "Login"
8472
8485
  ),
@@ -8493,6 +8506,9 @@ var LoginForm = ({
8493
8506
  viaGoogle: props.viaGoogle,
8494
8507
  viaGithub: props.viaGithub,
8495
8508
  viaTwitter: props.viaTwitter,
8509
+ isGoogleLoading: props.isGoogleLoading,
8510
+ isGithubLoading: props.isGithubLoading,
8511
+ isTwitterLoading: props.isTwitterLoading,
8496
8512
  handleGoogle: props.onGoogleLogin,
8497
8513
  handleGithub: props.onGithubLogin,
8498
8514
  handleTwitter: props.onTwitterLogin
@@ -8618,6 +8634,10 @@ var RegisterForm = ({ texts, ...props }) => {
8618
8634
  render: ({ field }) => /* @__PURE__ */ React73.createElement(
8619
8635
  Input,
8620
8636
  {
8637
+ dir: "ltr",
8638
+ inputProps: {
8639
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8640
+ },
8621
8641
  width: "full",
8622
8642
  autoComplete: "email",
8623
8643
  label: texts?.email?.label,
@@ -8798,6 +8818,9 @@ var RegisterForm = ({ texts, ...props }) => {
8798
8818
  viaGoogle: props.viaGoogle,
8799
8819
  viaGithub: props.viaGithub,
8800
8820
  viaTwitter: props.viaTwitter,
8821
+ isGoogleLoading: props.isGoogleLoading,
8822
+ isGithubLoading: props.isGithubLoading,
8823
+ isTwitterLoading: props.isTwitterLoading,
8801
8824
  handleGoogle: props.onGoogleRegister,
8802
8825
  handleGithub: props.onGithubRegister,
8803
8826
  handleTwitter: props.onTwitterRegister
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.13-next",
3
+ "version": "0.15.15-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {