@sikka/hawa 0.15.18-next → 0.15.19-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.css CHANGED
@@ -741,8 +741,8 @@ input[type="number"]::-webkit-inner-spin-button,
741
741
  .hawa-end-0 {
742
742
  inset-inline-end: 0px;
743
743
  }
744
- .hawa-end-2 {
745
- inset-inline-end: 0.5rem;
744
+ .hawa-end-3 {
745
+ inset-inline-end: 0.75rem;
746
746
  }
747
747
  .hawa-left-0 {
748
748
  left: 0px;
@@ -753,9 +753,6 @@ input[type="number"]::-webkit-inner-spin-button,
753
753
  .hawa-left-2\.5 {
754
754
  left: 0.625rem;
755
755
  }
756
- .hawa-left-3 {
757
- left: 0.75rem;
758
- }
759
756
  .hawa-left-4 {
760
757
  left: 1rem;
761
758
  }
@@ -777,6 +774,9 @@ input[type="number"]::-webkit-inner-spin-button,
777
774
  .hawa-start-0 {
778
775
  inset-inline-start: 0px;
779
776
  }
777
+ .hawa-start-3 {
778
+ inset-inline-start: 0.75rem;
779
+ }
780
780
  .hawa-top-0 {
781
781
  top: 0px;
782
782
  }
@@ -801,9 +801,6 @@ input[type="number"]::-webkit-inner-spin-button,
801
801
  .hawa-top-\[22px\] {
802
802
  top: 22px;
803
803
  }
804
- .hawa-top-\[41px\] {
805
- top: 41px;
806
- }
807
804
  .hawa-top-\[50\%\] {
808
805
  top: 50%;
809
806
  }
@@ -2322,12 +2319,12 @@ input[type="number"]::-webkit-inner-spin-button,
2322
2319
  .hawa-pb-4 {
2323
2320
  padding-bottom: 1rem;
2324
2321
  }
2322
+ .hawa-pe-9 {
2323
+ padding-inline-end: 2.25rem;
2324
+ }
2325
2325
  .hawa-pl-0 {
2326
2326
  padding-left: 0px;
2327
2327
  }
2328
- .hawa-pl-10 {
2329
- padding-left: 2.5rem;
2330
- }
2331
2328
  .hawa-pl-2 {
2332
2329
  padding-left: 0.5rem;
2333
2330
  }
@@ -2349,6 +2346,9 @@ input[type="number"]::-webkit-inner-spin-button,
2349
2346
  .hawa-pr-8 {
2350
2347
  padding-right: 2rem;
2351
2348
  }
2349
+ .hawa-ps-9 {
2350
+ padding-inline-start: 2.25rem;
2351
+ }
2352
2352
  .hawa-pt-0 {
2353
2353
  padding-top: 0px;
2354
2354
  }
package/dist/index.d.mts CHANGED
@@ -289,6 +289,8 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
289
289
  /** Boolean to enable/disable editing the input field and using it as a text field */
290
290
  preview?: boolean;
291
291
  iconInside?: React__default.ReactNode;
292
+ endIcon?: React__default.ReactNode;
293
+ startIcon?: React__default.ReactNode;
292
294
  };
293
295
  declare const Input: FC<TextFieldTypes>;
294
296
 
package/dist/index.d.ts CHANGED
@@ -289,6 +289,8 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
289
289
  /** Boolean to enable/disable editing the input field and using it as a text field */
290
290
  preview?: boolean;
291
291
  iconInside?: React__default.ReactNode;
292
+ endIcon?: React__default.ReactNode;
293
+ startIcon?: React__default.ReactNode;
292
294
  };
293
295
  declare const Input: FC<TextFieldTypes>;
294
296
 
package/dist/index.js CHANGED
@@ -4071,11 +4071,12 @@ var Input = function(_param) {
4071
4071
  className: cn("hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800", preview ? "hawa-opacity-100" : "hawa-opacity-0")
4072
4072
  }), /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement("div", {
4073
4073
  className: cn("hawa-relative")
4074
- }, props.icon && /* @__PURE__ */ import_react15.default.createElement("div", {
4075
- className: "hawa-absolute hawa-left-3 hawa-top-1/2 hawa--translate-y-1/2"
4076
- }, props.icon), /* @__PURE__ */ import_react15.default.createElement("input", {
4074
+ }, props.startIcon && /* @__PURE__ */ import_react15.default.createElement("div", {
4075
+ className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2"
4076
+ }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react15.default.createElement("div", {
4077
+ className: "hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2"
4078
+ }, props.endIcon), /* @__PURE__ */ import_react15.default.createElement("input", {
4077
4079
  required: true,
4078
- className: cn(defaultInputStyle, " dark:hawa-text-white", props.icon && "hawa-pl-10", "focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0", preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0", (_props_inputProps = props.inputProps) === null || _props_inputProps === void 0 ? void 0 : _props_inputProps.className),
4079
4080
  dir: props.dir,
4080
4081
  type: props.type,
4081
4082
  value: props.value,
@@ -4086,10 +4087,9 @@ var Input = function(_param) {
4086
4087
  disabled: preview,
4087
4088
  style: {
4088
4089
  height: 40
4089
- }
4090
- })), props.iconInside && /* @__PURE__ */ import_react15.default.createElement("div", {
4091
- className: "hawa-absolute hawa-end-2 hawa-top-[41px] hawa-mx-1 hawa--translate-y-1/2"
4092
- }, props.iconInside), !forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement("p", {
4090
+ },
4091
+ className: cn(defaultInputStyle, " dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0", props.endIcon && "hawa-pe-9", props.startIcon && "hawa-ps-9", preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0", (_props_inputProps = props.inputProps) === null || _props_inputProps === void 0 ? void 0 : _props_inputProps.className)
4092
+ })), !forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement("p", {
4093
4093
  className: cn("hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start", props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
4094
4094
  }, props.helperText))));
4095
4095
  };
@@ -8163,11 +8163,9 @@ var VeryBadEmoji = function() {
8163
8163
  var import_react46 = __toESM(require("react"));
8164
8164
  var EyeIcon = function(props) {
8165
8165
  return /* @__PURE__ */ import_react46.default.createElement("div", {
8166
- className: props.classNames
8166
+ className: cn("hawa-h-5 hawa-w-5", props.className)
8167
8167
  }, /* @__PURE__ */ import_react46.default.createElement("svg", {
8168
8168
  xmlns: "http://www.w3.org/2000/svg",
8169
- width: "24",
8170
- height: "24",
8171
8169
  viewBox: "0 0 24 24",
8172
8170
  fill: "none",
8173
8171
  stroke: "currentColor",
@@ -8184,11 +8182,9 @@ var EyeIcon = function(props) {
8184
8182
  };
8185
8183
  var HiddenEyeIcon = function(props) {
8186
8184
  return /* @__PURE__ */ import_react46.default.createElement("div", {
8187
- className: props.classNames
8185
+ className: cn("hawa-h-5 hawa-w-5", props.className)
8188
8186
  }, /* @__PURE__ */ import_react46.default.createElement("svg", {
8189
8187
  xmlns: "http://www.w3.org/2000/svg",
8190
- width: "24",
8191
- height: "24",
8192
8188
  viewBox: "0 0 24 24",
8193
8189
  fill: "none",
8194
8190
  stroke: "currentColor",
@@ -8351,15 +8347,15 @@ var LoginForm = function(_param) {
8351
8347
  autoComplete: "current-password",
8352
8348
  type: passwordVisible ? "text" : "password",
8353
8349
  label: (texts === null || texts === void 0 ? void 0 : (_texts_password = texts.password) === null || _texts_password === void 0 ? void 0 : _texts_password.label) || "Password",
8354
- iconInside: /* @__PURE__ */ import_react47.default.createElement("div", {
8350
+ endIcon: /* @__PURE__ */ import_react47.default.createElement("div", {
8355
8351
  className: "hawa-cursor-pointer",
8356
8352
  onClick: function() {
8357
8353
  return setPasswordVisible(!passwordVisible);
8358
8354
  }
8359
8355
  }, passwordVisible ? /* @__PURE__ */ import_react47.default.createElement(EyeIcon, {
8360
- classNames: "hawa-text-gray-500"
8356
+ className: "hawa-text-gray-500"
8361
8357
  }) : /* @__PURE__ */ import_react47.default.createElement(HiddenEyeIcon, {
8362
- classNames: "hawa-text-gray-500"
8358
+ className: "hawa-text-gray-500"
8363
8359
  })),
8364
8360
  placeholder: (texts === null || texts === void 0 ? void 0 : (_texts_password1 = texts.password) === null || _texts_password1 === void 0 ? void 0 : _texts_password1.placeholder) || "Enter your password",
8365
8361
  helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
@@ -8395,15 +8391,15 @@ var LoginForm = function(_param) {
8395
8391
  autoComplete: "current-password",
8396
8392
  type: passwordVisible ? "text" : "password",
8397
8393
  label: texts === null || texts === void 0 ? void 0 : (_texts_password = texts.password) === null || _texts_password === void 0 ? void 0 : _texts_password.label,
8398
- iconInside: /* @__PURE__ */ import_react47.default.createElement("div", {
8394
+ endIcon: /* @__PURE__ */ import_react47.default.createElement("div", {
8399
8395
  className: "hawa-cursor-pointer",
8400
8396
  onClick: function() {
8401
8397
  return setPasswordVisible(!passwordVisible);
8402
8398
  }
8403
8399
  }, passwordVisible ? /* @__PURE__ */ import_react47.default.createElement(EyeIcon, {
8404
- classNames: "hawa-text-gray-500"
8400
+ className: "hawa-text-gray-500"
8405
8401
  }) : /* @__PURE__ */ import_react47.default.createElement(HiddenEyeIcon, {
8406
- classNames: "hawa-text-gray-500"
8402
+ className: "hawa-text-gray-500"
8407
8403
  })),
8408
8404
  placeholder: (texts === null || texts === void 0 ? void 0 : (_texts_password1 = texts.password) === null || _texts_password1 === void 0 ? void 0 : _texts_password1.placeholder) || "Enter your password",
8409
8405
  helperText: (_formState_errors_password = formState.errors.password) === null || _formState_errors_password === void 0 ? void 0 : _formState_errors_password.message
@@ -8682,15 +8678,15 @@ var RegisterForm = function(_param) {
8682
8678
  return /* @__PURE__ */ import_react48.default.createElement(Input, _object_spread({
8683
8679
  width: "full",
8684
8680
  type: passwordVisible ? "text" : "password",
8685
- iconInside: /* @__PURE__ */ import_react48.default.createElement("div", {
8681
+ endIcon: /* @__PURE__ */ import_react48.default.createElement("div", {
8686
8682
  className: "hawa-cursor-pointer",
8687
8683
  onClick: function() {
8688
8684
  return setPasswordVisible(!passwordVisible);
8689
8685
  }
8690
8686
  }, passwordVisible ? /* @__PURE__ */ import_react48.default.createElement(EyeIcon, {
8691
- classNames: "hawa-text-gray-500"
8687
+ className: "hawa-text-gray-500"
8692
8688
  }) : /* @__PURE__ */ import_react48.default.createElement(HiddenEyeIcon, {
8693
- classNames: "hawa-text-gray-500"
8689
+ className: "hawa-text-gray-500"
8694
8690
  }), " "),
8695
8691
  autoComplete: "new-password",
8696
8692
  label: texts === null || texts === void 0 ? void 0 : (_texts_password = texts.password) === null || _texts_password === void 0 ? void 0 : _texts_password.label,
package/dist/index.mjs CHANGED
@@ -3483,18 +3483,10 @@ var Input = ({
3483
3483
  preview ? "hawa-opacity-100" : "hawa-opacity-0"
3484
3484
  )
3485
3485
  }
3486
- ), /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", { className: cn("hawa-relative") }, props.icon && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-left-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.icon), /* @__PURE__ */ React24.createElement(
3486
+ ), /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.endIcon), /* @__PURE__ */ React24.createElement(
3487
3487
  "input",
3488
3488
  {
3489
3489
  required: true,
3490
- className: cn(
3491
- defaultInputStyle,
3492
- " dark:hawa-text-white",
3493
- props.icon && "hawa-pl-10",
3494
- "focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
3495
- preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
3496
- props.inputProps?.className
3497
- ),
3498
3490
  dir: props.dir,
3499
3491
  type: props.type,
3500
3492
  value: props.value,
@@ -3503,9 +3495,17 @@ var Input = ({
3503
3495
  defaultValue: props.defaultValue,
3504
3496
  placeholder: props.placeholder,
3505
3497
  disabled: preview,
3506
- style: { height: 40 }
3498
+ style: { height: 40 },
3499
+ className: cn(
3500
+ defaultInputStyle,
3501
+ " dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
3502
+ props.endIcon && "hawa-pe-9",
3503
+ props.startIcon && "hawa-ps-9",
3504
+ preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
3505
+ props.inputProps?.className
3506
+ )
3507
3507
  }
3508
- )), props.iconInside && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-end-2 hawa-top-[41px] hawa-mx-1 hawa--translate-y-1/2" }, props.iconInside), !forceHideHelperText && /* @__PURE__ */ React24.createElement(
3508
+ )), !forceHideHelperText && /* @__PURE__ */ React24.createElement(
3509
3509
  "p",
3510
3510
  {
3511
3511
  className: cn(
@@ -8275,12 +8275,10 @@ var VeryBadEmoji = () => /* @__PURE__ */ React.createElement(
8275
8275
 
8276
8276
  // components/icons/InputIcons.tsx
8277
8277
  import React73 from "react";
8278
- var EyeIcon = (props) => /* @__PURE__ */ React73.createElement("div", { className: props.classNames }, /* @__PURE__ */ React73.createElement(
8278
+ var EyeIcon = (props) => /* @__PURE__ */ React73.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ React73.createElement(
8279
8279
  "svg",
8280
8280
  {
8281
8281
  xmlns: "http://www.w3.org/2000/svg",
8282
- width: "24",
8283
- height: "24",
8284
8282
  viewBox: "0 0 24 24",
8285
8283
  fill: "none",
8286
8284
  stroke: "currentColor",
@@ -8291,12 +8289,10 @@ var EyeIcon = (props) => /* @__PURE__ */ React73.createElement("div", { classNam
8291
8289
  /* @__PURE__ */ React73.createElement("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
8292
8290
  /* @__PURE__ */ React73.createElement("circle", { cx: "12", cy: "12", r: "3" })
8293
8291
  ));
8294
- var HiddenEyeIcon = (props) => /* @__PURE__ */ React73.createElement("div", { className: props.classNames }, /* @__PURE__ */ React73.createElement(
8292
+ var HiddenEyeIcon = (props) => /* @__PURE__ */ React73.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ React73.createElement(
8295
8293
  "svg",
8296
8294
  {
8297
8295
  xmlns: "http://www.w3.org/2000/svg",
8298
- width: "24",
8299
- height: "24",
8300
8296
  viewBox: "0 0 24 24",
8301
8297
  fill: "none",
8302
8298
  stroke: "currentColor",
@@ -8436,13 +8432,13 @@ var LoginForm = ({
8436
8432
  autoComplete: "current-password",
8437
8433
  type: passwordVisible ? "text" : "password",
8438
8434
  label: texts?.password?.label || "Password",
8439
- iconInside: /* @__PURE__ */ React74.createElement(
8435
+ endIcon: /* @__PURE__ */ React74.createElement(
8440
8436
  "div",
8441
8437
  {
8442
8438
  className: "hawa-cursor-pointer",
8443
8439
  onClick: () => setPasswordVisible(!passwordVisible)
8444
8440
  },
8445
- passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { classNames: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { classNames: "hawa-text-gray-500" })
8441
+ passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8446
8442
  ),
8447
8443
  placeholder: texts?.password?.placeholder || "Enter your password",
8448
8444
  helperText: formState.errors.password?.message,
@@ -8490,13 +8486,13 @@ var LoginForm = ({
8490
8486
  autoComplete: "current-password",
8491
8487
  type: passwordVisible ? "text" : "password",
8492
8488
  label: texts?.password?.label,
8493
- iconInside: /* @__PURE__ */ React74.createElement(
8489
+ endIcon: /* @__PURE__ */ React74.createElement(
8494
8490
  "div",
8495
8491
  {
8496
8492
  className: "hawa-cursor-pointer",
8497
8493
  onClick: () => setPasswordVisible(!passwordVisible)
8498
8494
  },
8499
- passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { classNames: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { classNames: "hawa-text-gray-500" })
8495
+ passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8500
8496
  ),
8501
8497
  placeholder: texts?.password?.placeholder || "Enter your password",
8502
8498
  helperText: formState.errors.password?.message,
@@ -8782,13 +8778,13 @@ var RegisterForm = ({ texts, ...props }) => {
8782
8778
  {
8783
8779
  width: "full",
8784
8780
  type: passwordVisible ? "text" : "password",
8785
- iconInside: /* @__PURE__ */ React75.createElement(
8781
+ endIcon: /* @__PURE__ */ React75.createElement(
8786
8782
  "div",
8787
8783
  {
8788
8784
  className: "hawa-cursor-pointer",
8789
8785
  onClick: () => setPasswordVisible(!passwordVisible)
8790
8786
  },
8791
- passwordVisible ? /* @__PURE__ */ React75.createElement(EyeIcon, { classNames: "hawa-text-gray-500" }) : /* @__PURE__ */ React75.createElement(HiddenEyeIcon, { classNames: "hawa-text-gray-500" }),
8787
+ passwordVisible ? /* @__PURE__ */ React75.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React75.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
8792
8788
  " "
8793
8789
  ),
8794
8790
  autoComplete: "new-password",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.18-next",
3
+ "version": "0.15.19-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -44,23 +44,23 @@
44
44
  "@radix-ui/react-toast": "^1.1.5",
45
45
  "@radix-ui/react-tooltip": "^1.0.7",
46
46
  "@tanstack/react-table": "^8.10.7",
47
- "@types/node": "^20.8.9",
48
- "@types/react": "^18.2.33",
47
+ "@types/node": "^20.8.10",
48
+ "@types/react": "^18.2.34",
49
49
  "@types/react-dom": "^18.2.14",
50
50
  "class-variance-authority": "^0.7.0",
51
51
  "clsx": "^2.0.0",
52
52
  "cmdk": "^0.2.0",
53
53
  "embla-carousel-react": "^8.0.0-rc14",
54
- "eslint": "^8.52.0",
55
- "eslint-config-next": "^14.0.0",
54
+ "eslint": "^8.53.0",
55
+ "eslint-config-next": "^14.0.1",
56
56
  "libphonenumber-js": "^1.10.49",
57
- "next": "^14.0.0",
57
+ "next": "^14.0.1",
58
58
  "next-themes": "^0.2.1",
59
59
  "prism-react-renderer": "^2.1.0",
60
60
  "react": "18.2.0",
61
61
  "react-dom": "18.2.0",
62
62
  "react-dropzone": "^14.2.3",
63
- "react-hook-form": "^7.47.0",
63
+ "react-hook-form": "^7.48.1",
64
64
  "react-select": "^5.7.7",
65
65
  "tailwind-merge": "^2.0.0",
66
66
  "typescript": "5.2.2",
@@ -86,7 +86,7 @@
86
86
  "eslint-plugin-storybook": "^0.6.15",
87
87
  "jest": "^29.7.0",
88
88
  "jest-environment-jsdom": "^29.7.0",
89
- "lucide-react": "^0.290.0",
89
+ "lucide-react": "^0.292.0",
90
90
  "postcss": "^8.4.31",
91
91
  "postcss-cli": "^10.1.0",
92
92
  "postcss-import": "^15.1.0",