@sikka/hawa 0.46.1-next → 0.46.4-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.
Files changed (77) hide show
  1. package/dist/blocks/auth/index.js +23 -14
  2. package/dist/blocks/auth/index.mjs +4 -4
  3. package/dist/blocks/feedback/index.js +1 -1
  4. package/dist/blocks/feedback/index.mjs +5 -5
  5. package/dist/blocks/index.js +23 -14
  6. package/dist/blocks/index.mjs +2 -2
  7. package/dist/blocks/misc/index.js +23 -14
  8. package/dist/blocks/misc/index.mjs +5 -5
  9. package/dist/blocks/pricing/index.js +1 -1
  10. package/dist/blocks/pricing/index.mjs +4 -4
  11. package/dist/{chunk-QUC5EXTF.mjs → chunk-5CTMGPEF.mjs} +30 -21
  12. package/dist/{chunk-EHJXQQDP.mjs → chunk-5S5DR7KF.mjs} +1 -1
  13. package/dist/{chunk-HJVL6X7I.mjs → chunk-6SJUUJOV.mjs} +1 -1
  14. package/dist/{chunk-7O555VJR.mjs → chunk-6TG2PHZK.mjs} +1 -1
  15. package/dist/{chunk-U72MOMEK.mjs → chunk-C2UOOH4X.mjs} +1 -1
  16. package/dist/{chunk-FTETN5UE.mjs → chunk-EOH6A3GR.mjs} +24 -15
  17. package/dist/{chunk-6UOJKVIA.mjs → chunk-IFWYR5W2.mjs} +1 -1
  18. package/dist/{chunk-YXUHXKKK.mjs → chunk-JP2N5WKD.mjs} +1 -1
  19. package/dist/{chunk-R37QEYSB.mjs → chunk-NMW4GM4G.mjs} +1 -1
  20. package/dist/{chunk-CIMTNOLA.mjs → chunk-WUMDFBEK.mjs} +1 -1
  21. package/dist/colorPicker/index.js +1 -1
  22. package/dist/colorPicker/index.js.map +1 -1
  23. package/dist/colorPicker/index.mjs +1 -1
  24. package/dist/colorPicker/index.mjs.map +1 -1
  25. package/dist/combobox/index.js +1 -1
  26. package/dist/combobox/index.js.map +1 -1
  27. package/dist/combobox/index.mjs +1 -1
  28. package/dist/combobox/index.mjs.map +1 -1
  29. package/dist/dataTable/index.js +23 -14
  30. package/dist/dataTable/index.js.map +1 -1
  31. package/dist/dataTable/index.mjs +24 -15
  32. package/dist/dataTable/index.mjs.map +1 -1
  33. package/dist/elements/index.d.mts +2 -2
  34. package/dist/elements/index.d.ts +2 -2
  35. package/dist/elements/index.js +23 -14
  36. package/dist/elements/index.mjs +3 -3
  37. package/dist/index.d.mts +2 -2
  38. package/dist/index.d.ts +2 -2
  39. package/dist/index.js +23 -14
  40. package/dist/index.mjs +130 -121
  41. package/dist/input/index.d.mts +2 -2
  42. package/dist/input/index.d.ts +2 -2
  43. package/dist/input/index.js +23 -14
  44. package/dist/input/index.js.map +1 -1
  45. package/dist/input/index.mjs +24 -15
  46. package/dist/input/index.mjs.map +1 -1
  47. package/dist/layout/index.js +1 -1
  48. package/dist/layout/index.mjs +2 -2
  49. package/dist/passwordInput/index.js +23 -14
  50. package/dist/passwordInput/index.js.map +1 -1
  51. package/dist/passwordInput/index.mjs +34 -25
  52. package/dist/passwordInput/index.mjs.map +1 -1
  53. package/dist/phoneInput/index.js +1 -1
  54. package/dist/phoneInput/index.js.map +1 -1
  55. package/dist/phoneInput/index.mjs +1 -1
  56. package/dist/phoneInput/index.mjs.map +1 -1
  57. package/dist/select/index.js +1 -1
  58. package/dist/select/index.js.map +1 -1
  59. package/dist/select/index.mjs +1 -1
  60. package/dist/select/index.mjs.map +1 -1
  61. package/dist/simpleTable/index.js +1 -1
  62. package/dist/simpleTable/index.js.map +1 -1
  63. package/dist/simpleTable/index.mjs +1 -1
  64. package/dist/simpleTable/index.mjs.map +1 -1
  65. package/dist/skeleton/index.js +1 -1
  66. package/dist/skeleton/index.js.map +1 -1
  67. package/dist/skeleton/index.mjs +1 -1
  68. package/dist/skeleton/index.mjs.map +1 -1
  69. package/dist/stats/index.js +1 -1
  70. package/dist/stats/index.js.map +1 -1
  71. package/dist/stats/index.mjs +1 -1
  72. package/dist/stats/index.mjs.map +1 -1
  73. package/dist/textarea/index.js +1 -1
  74. package/dist/textarea/index.js.map +1 -1
  75. package/dist/textarea/index.mjs +1 -1
  76. package/dist/textarea/index.mjs.map +1 -1
  77. package/package.json +1 -1
@@ -1402,7 +1402,7 @@ function Skeleton({
1402
1402
  };
1403
1403
  const styledAs = {
1404
1404
  div: "",
1405
- input: "!h-[38px] !w-full"
1405
+ input: "hawa-h-[40px] hawa-w-full"
1406
1406
  };
1407
1407
  return /* @__PURE__ */ import_react7.default.createElement(
1408
1408
  "div",
@@ -1435,6 +1435,7 @@ var Input = (0, import_react8.forwardRef)(
1435
1435
  ...props
1436
1436
  }, ref) => {
1437
1437
  var _a;
1438
+ const [value, setValue] = (0, import_react8.useState)(props.value || "");
1438
1439
  let marginStyles = {
1439
1440
  none: "hawa-mb-0",
1440
1441
  normal: "hawa-mb-3",
@@ -1450,6 +1451,7 @@ var Input = (0, import_react8.forwardRef)(
1450
1451
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
1451
1452
  const handleChange = (e) => {
1452
1453
  let newValue = e.target.value;
1454
+ setValue(newValue);
1453
1455
  if (props.prefixText) {
1454
1456
  if (newValue.length < props.prefixText.length) {
1455
1457
  newValue = props.prefixText;
@@ -1461,10 +1463,24 @@ var Input = (0, import_react8.forwardRef)(
1461
1463
  }
1462
1464
  }
1463
1465
  if (props.onChange) {
1464
- const newEvent = { ...e, target: { ...e.target, value: newValue } };
1465
- props.onChange(newEvent);
1466
+ if (props.type === "number" && props.maxLength) {
1467
+ let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
1468
+ const newEvent = { ...e, target: { ...e.target, value: v } };
1469
+ setValue(v);
1470
+ props.onChange(newEvent);
1471
+ } else {
1472
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
1473
+ setValue(newValue);
1474
+ props.onChange(newEvent);
1475
+ }
1466
1476
  }
1467
1477
  };
1478
+ const handleKeyDown = (e) => {
1479
+ if (props.type === "number" && ["e", "E", "+", "-", "."].includes(e.key)) {
1480
+ e.preventDefault();
1481
+ }
1482
+ props.onKeyDown && props.onKeyDown(e);
1483
+ };
1468
1484
  return /* @__PURE__ */ import_react8.default.createElement(
1469
1485
  "div",
1470
1486
  {
@@ -1477,16 +1493,7 @@ var Input = (0, import_react8.forwardRef)(
1477
1493
  )
1478
1494
  },
1479
1495
  props.label && /* @__PURE__ */ import_react8.default.createElement(Label, { ...labelProps }, props.label),
1480
- /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement(
1481
- "span",
1482
- {
1483
- className: cn(
1484
- "hawa-me-2 hawa-opacity-90",
1485
- !forceHideHelperText && "hawa-mb-2"
1486
- )
1487
- },
1488
- props.outsidePrefix
1489
- ), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1496
+ /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1490
1497
  Skeleton,
1491
1498
  {
1492
1499
  animation: "none",
@@ -1533,13 +1540,15 @@ var Input = (0, import_react8.forwardRef)(
1533
1540
  required: true,
1534
1541
  dir: props.dir,
1535
1542
  type: props.type,
1536
- value: props.value,
1543
+ value: props.value || value,
1537
1544
  onChange: handleChange,
1545
+ onKeyDown: handleKeyDown,
1538
1546
  autoComplete: props.autoComplete,
1539
1547
  defaultValue: props.defaultValue,
1540
1548
  placeholder,
1541
1549
  disabled: props.disabled || preview,
1542
1550
  style: { height: 40 },
1551
+ maxLength: props.maxLength,
1543
1552
  ...inputProps,
1544
1553
  className: cn(
1545
1554
  defaultInputStyle,
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-FTETN5UE.mjs";
4
+ } from "../../chunk-EOH6A3GR.mjs";
5
5
  import {
6
6
  StopPropagationWrapper
7
7
  } from "../../chunk-47APBDKK.mjs";
8
8
  import {
9
9
  Select
10
- } from "../../chunk-7O555VJR.mjs";
10
+ } from "../../chunk-6TG2PHZK.mjs";
11
11
  import {
12
12
  EyeIcon,
13
13
  HiddenEyeIcon
14
- } from "../../chunk-YXUHXKKK.mjs";
14
+ } from "../../chunk-JP2N5WKD.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -24,7 +24,7 @@ import {
24
24
  Label,
25
25
  Loading,
26
26
  cn
27
- } from "../../chunk-6UOJKVIA.mjs";
27
+ } from "../../chunk-IFWYR5W2.mjs";
28
28
 
29
29
  // blocks/auth/AuthButtons.tsx
30
30
  import React2 from "react";
@@ -964,7 +964,7 @@ function Skeleton({
964
964
  };
965
965
  const styledAs = {
966
966
  div: "",
967
- input: "!h-[38px] !w-full"
967
+ input: "hawa-h-[40px] hawa-w-full"
968
968
  };
969
969
  return /* @__PURE__ */ import_react5.default.createElement(
970
970
  "div",
@@ -1,26 +1,26 @@
1
1
  "use client";
2
2
  import {
3
3
  Textarea
4
- } from "../../chunk-EHJXQQDP.mjs";
4
+ } from "../../chunk-5S5DR7KF.mjs";
5
5
  import {
6
6
  Select
7
- } from "../../chunk-7O555VJR.mjs";
7
+ } from "../../chunk-6TG2PHZK.mjs";
8
8
  import {
9
9
  Popover,
10
10
  Radio
11
- } from "../../chunk-R37QEYSB.mjs";
11
+ } from "../../chunk-NMW4GM4G.mjs";
12
12
  import {
13
13
  BadEmoji,
14
14
  GoodEmoji,
15
15
  VeryBadEmoji,
16
16
  VeryGoodEmoji
17
- } from "../../chunk-YXUHXKKK.mjs";
17
+ } from "../../chunk-JP2N5WKD.mjs";
18
18
  import {
19
19
  Button,
20
20
  Card,
21
21
  CardContent,
22
22
  cn
23
- } from "../../chunk-6UOJKVIA.mjs";
23
+ } from "../../chunk-IFWYR5W2.mjs";
24
24
 
25
25
  // blocks/feedback/UserReferralSource.tsx
26
26
  import React, { useRef, useState } from "react";
@@ -1423,7 +1423,7 @@ function Skeleton({
1423
1423
  };
1424
1424
  const styledAs = {
1425
1425
  div: "",
1426
- input: "!h-[38px] !w-full"
1426
+ input: "hawa-h-[40px] hawa-w-full"
1427
1427
  };
1428
1428
  return /* @__PURE__ */ import_react7.default.createElement(
1429
1429
  "div",
@@ -1456,6 +1456,7 @@ var Input = (0, import_react8.forwardRef)(
1456
1456
  ...props
1457
1457
  }, ref) => {
1458
1458
  var _a;
1459
+ const [value, setValue] = (0, import_react8.useState)(props.value || "");
1459
1460
  let marginStyles = {
1460
1461
  none: "hawa-mb-0",
1461
1462
  normal: "hawa-mb-3",
@@ -1471,6 +1472,7 @@ var Input = (0, import_react8.forwardRef)(
1471
1472
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
1472
1473
  const handleChange = (e) => {
1473
1474
  let newValue = e.target.value;
1475
+ setValue(newValue);
1474
1476
  if (props.prefixText) {
1475
1477
  if (newValue.length < props.prefixText.length) {
1476
1478
  newValue = props.prefixText;
@@ -1482,10 +1484,24 @@ var Input = (0, import_react8.forwardRef)(
1482
1484
  }
1483
1485
  }
1484
1486
  if (props.onChange) {
1485
- const newEvent = { ...e, target: { ...e.target, value: newValue } };
1486
- props.onChange(newEvent);
1487
+ if (props.type === "number" && props.maxLength) {
1488
+ let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
1489
+ const newEvent = { ...e, target: { ...e.target, value: v } };
1490
+ setValue(v);
1491
+ props.onChange(newEvent);
1492
+ } else {
1493
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
1494
+ setValue(newValue);
1495
+ props.onChange(newEvent);
1496
+ }
1487
1497
  }
1488
1498
  };
1499
+ const handleKeyDown = (e) => {
1500
+ if (props.type === "number" && ["e", "E", "+", "-", "."].includes(e.key)) {
1501
+ e.preventDefault();
1502
+ }
1503
+ props.onKeyDown && props.onKeyDown(e);
1504
+ };
1489
1505
  return /* @__PURE__ */ import_react8.default.createElement(
1490
1506
  "div",
1491
1507
  {
@@ -1498,16 +1514,7 @@ var Input = (0, import_react8.forwardRef)(
1498
1514
  )
1499
1515
  },
1500
1516
  props.label && /* @__PURE__ */ import_react8.default.createElement(Label, { ...labelProps }, props.label),
1501
- /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement(
1502
- "span",
1503
- {
1504
- className: cn(
1505
- "hawa-me-2 hawa-opacity-90",
1506
- !forceHideHelperText && "hawa-mb-2"
1507
- )
1508
- },
1509
- props.outsidePrefix
1510
- ), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1517
+ /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1511
1518
  Skeleton,
1512
1519
  {
1513
1520
  animation: "none",
@@ -1554,13 +1561,15 @@ var Input = (0, import_react8.forwardRef)(
1554
1561
  required: true,
1555
1562
  dir: props.dir,
1556
1563
  type: props.type,
1557
- value: props.value,
1564
+ value: props.value || value,
1558
1565
  onChange: handleChange,
1566
+ onKeyDown: handleKeyDown,
1559
1567
  autoComplete: props.autoComplete,
1560
1568
  defaultValue: props.defaultValue,
1561
1569
  placeholder,
1562
1570
  disabled: props.disabled || preview,
1563
1571
  style: { height: 40 },
1572
+ maxLength: props.maxLength,
1564
1573
  ...inputProps,
1565
1574
  className: cn(
1566
1575
  defaultInputStyle,
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-QUC5EXTF.mjs";
20
+ } from "../chunk-5CTMGPEF.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
23
  } from "../chunk-WL7C2A5D.mjs";
@@ -44,7 +44,7 @@ import {
44
44
  VeryBadEmoji,
45
45
  VeryGoodEmoji,
46
46
  cn
47
- } from "../chunk-HJVL6X7I.mjs";
47
+ } from "../chunk-6SJUUJOV.mjs";
48
48
  import "../chunk-2LUXOXAL.mjs";
49
49
 
50
50
  // blocks/auth/AuthButtons.tsx
@@ -1211,7 +1211,7 @@ function Skeleton({
1211
1211
  };
1212
1212
  const styledAs = {
1213
1213
  div: "",
1214
- input: "!h-[38px] !w-full"
1214
+ input: "hawa-h-[40px] hawa-w-full"
1215
1215
  };
1216
1216
  return /* @__PURE__ */ import_react27.default.createElement(
1217
1217
  "div",
@@ -1244,6 +1244,7 @@ var Input = (0, import_react28.forwardRef)(
1244
1244
  ...props
1245
1245
  }, ref) => {
1246
1246
  var _a;
1247
+ const [value, setValue] = (0, import_react28.useState)(props.value || "");
1247
1248
  let marginStyles = {
1248
1249
  none: "hawa-mb-0",
1249
1250
  normal: "hawa-mb-3",
@@ -1259,6 +1260,7 @@ var Input = (0, import_react28.forwardRef)(
1259
1260
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
1260
1261
  const handleChange = (e) => {
1261
1262
  let newValue = e.target.value;
1263
+ setValue(newValue);
1262
1264
  if (props.prefixText) {
1263
1265
  if (newValue.length < props.prefixText.length) {
1264
1266
  newValue = props.prefixText;
@@ -1270,10 +1272,24 @@ var Input = (0, import_react28.forwardRef)(
1270
1272
  }
1271
1273
  }
1272
1274
  if (props.onChange) {
1273
- const newEvent = { ...e, target: { ...e.target, value: newValue } };
1274
- props.onChange(newEvent);
1275
+ if (props.type === "number" && props.maxLength) {
1276
+ let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
1277
+ const newEvent = { ...e, target: { ...e.target, value: v } };
1278
+ setValue(v);
1279
+ props.onChange(newEvent);
1280
+ } else {
1281
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
1282
+ setValue(newValue);
1283
+ props.onChange(newEvent);
1284
+ }
1275
1285
  }
1276
1286
  };
1287
+ const handleKeyDown = (e) => {
1288
+ if (props.type === "number" && ["e", "E", "+", "-", "."].includes(e.key)) {
1289
+ e.preventDefault();
1290
+ }
1291
+ props.onKeyDown && props.onKeyDown(e);
1292
+ };
1277
1293
  return /* @__PURE__ */ import_react28.default.createElement(
1278
1294
  "div",
1279
1295
  {
@@ -1286,16 +1302,7 @@ var Input = (0, import_react28.forwardRef)(
1286
1302
  )
1287
1303
  },
1288
1304
  props.label && /* @__PURE__ */ import_react28.default.createElement(Label, { ...labelProps }, props.label),
1289
- /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react28.default.createElement(
1290
- "span",
1291
- {
1292
- className: cn(
1293
- "hawa-me-2 hawa-opacity-90",
1294
- !forceHideHelperText && "hawa-mb-2"
1295
- )
1296
- },
1297
- props.outsidePrefix
1298
- ), props.isLoading ? /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react28.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react28.default.createElement(
1305
+ /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react28.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react28.default.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react28.default.createElement(
1299
1306
  Skeleton,
1300
1307
  {
1301
1308
  animation: "none",
@@ -1342,13 +1349,15 @@ var Input = (0, import_react28.forwardRef)(
1342
1349
  required: true,
1343
1350
  dir: props.dir,
1344
1351
  type: props.type,
1345
- value: props.value,
1352
+ value: props.value || value,
1346
1353
  onChange: handleChange,
1354
+ onKeyDown: handleKeyDown,
1347
1355
  autoComplete: props.autoComplete,
1348
1356
  defaultValue: props.defaultValue,
1349
1357
  placeholder,
1350
1358
  disabled: props.disabled || preview,
1351
1359
  style: { height: 40 },
1360
+ maxLength: props.maxLength,
1352
1361
  ...inputProps,
1353
1362
  className: cn(
1354
1363
  defaultInputStyle,
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-FTETN5UE.mjs";
4
+ } from "../../chunk-EOH6A3GR.mjs";
5
5
  import {
6
6
  Chip,
7
7
  ScrollArea
8
- } from "../../chunk-U72MOMEK.mjs";
8
+ } from "../../chunk-C2UOOH4X.mjs";
9
9
  import {
10
10
  Textarea
11
- } from "../../chunk-EHJXQQDP.mjs";
11
+ } from "../../chunk-5S5DR7KF.mjs";
12
12
  import {
13
13
  Select
14
- } from "../../chunk-7O555VJR.mjs";
14
+ } from "../../chunk-6TG2PHZK.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -21,7 +21,7 @@ import {
21
21
  CardHeader,
22
22
  CardTitle,
23
23
  cn
24
- } from "../../chunk-6UOJKVIA.mjs";
24
+ } from "../../chunk-IFWYR5W2.mjs";
25
25
 
26
26
  // blocks/misc/LegalTexts.tsx
27
27
  import React10 from "react";
@@ -638,7 +638,7 @@ function Skeleton({
638
638
  };
639
639
  const styledAs = {
640
640
  div: "",
641
- input: "!h-[38px] !w-full"
641
+ input: "hawa-h-[40px] hawa-w-full"
642
642
  };
643
643
  return /* @__PURE__ */ import_react6.default.createElement(
644
644
  "div",
@@ -2,22 +2,22 @@
2
2
  import {
3
3
  Chip,
4
4
  ScrollArea
5
- } from "../../chunk-U72MOMEK.mjs";
5
+ } from "../../chunk-C2UOOH4X.mjs";
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
9
- } from "../../chunk-R37QEYSB.mjs";
9
+ } from "../../chunk-NMW4GM4G.mjs";
10
10
  import {
11
11
  CheckMark,
12
12
  UncheckMark
13
- } from "../../chunk-YXUHXKKK.mjs";
13
+ } from "../../chunk-JP2N5WKD.mjs";
14
14
  import {
15
15
  Button,
16
16
  Card,
17
17
  Skeleton,
18
18
  Tooltip,
19
19
  cn
20
- } from "../../chunk-6UOJKVIA.mjs";
20
+ } from "../../chunk-IFWYR5W2.mjs";
21
21
 
22
22
  // blocks/pricing/PricingPlans.tsx
23
23
  import React8 from "react";
@@ -9,7 +9,7 @@ import {
9
9
  Label,
10
10
  Skeleton,
11
11
  cn
12
- } from "./chunk-HJVL6X7I.mjs";
12
+ } from "./chunk-6SJUUJOV.mjs";
13
13
 
14
14
  // elements/alert/Alert.tsx
15
15
  import React, { useRef, useState, useEffect } from "react";
@@ -171,7 +171,7 @@ var Alert = ({
171
171
  };
172
172
 
173
173
  // elements/input/Input.tsx
174
- import React2, { forwardRef } from "react";
174
+ import React2, { forwardRef, useState as useState2 } from "react";
175
175
  var Input = forwardRef(
176
176
  ({
177
177
  margin = "none",
@@ -186,6 +186,7 @@ var Input = forwardRef(
186
186
  ...props
187
187
  }, ref) => {
188
188
  var _a;
189
+ const [value, setValue] = useState2(props.value || "");
189
190
  let marginStyles = {
190
191
  none: "hawa-mb-0",
191
192
  normal: "hawa-mb-3",
@@ -201,6 +202,7 @@ var Input = forwardRef(
201
202
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
202
203
  const handleChange = (e) => {
203
204
  let newValue = e.target.value;
205
+ setValue(newValue);
204
206
  if (props.prefixText) {
205
207
  if (newValue.length < props.prefixText.length) {
206
208
  newValue = props.prefixText;
@@ -212,10 +214,24 @@ var Input = forwardRef(
212
214
  }
213
215
  }
214
216
  if (props.onChange) {
215
- const newEvent = { ...e, target: { ...e.target, value: newValue } };
216
- props.onChange(newEvent);
217
+ if (props.type === "number" && props.maxLength) {
218
+ let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
219
+ const newEvent = { ...e, target: { ...e.target, value: v } };
220
+ setValue(v);
221
+ props.onChange(newEvent);
222
+ } else {
223
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
224
+ setValue(newValue);
225
+ props.onChange(newEvent);
226
+ }
217
227
  }
218
228
  };
229
+ const handleKeyDown = (e) => {
230
+ if (props.type === "number" && ["e", "E", "+", "-", "."].includes(e.key)) {
231
+ e.preventDefault();
232
+ }
233
+ props.onKeyDown && props.onKeyDown(e);
234
+ };
219
235
  return /* @__PURE__ */ React2.createElement(
220
236
  "div",
221
237
  {
@@ -228,16 +244,7 @@ var Input = forwardRef(
228
244
  )
229
245
  },
230
246
  props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label),
231
- /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ React2.createElement(
232
- "span",
233
- {
234
- className: cn(
235
- "hawa-me-2 hawa-opacity-90",
236
- !forceHideHelperText && "hawa-mb-2"
237
- )
238
- },
239
- props.outsidePrefix
240
- ), props.isLoading ? /* @__PURE__ */ React2.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React2.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ React2.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React2.createElement(
247
+ /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ React2.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ React2.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React2.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ React2.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React2.createElement(
241
248
  Skeleton,
242
249
  {
243
250
  animation: "none",
@@ -284,13 +291,15 @@ var Input = forwardRef(
284
291
  required: true,
285
292
  dir: props.dir,
286
293
  type: props.type,
287
- value: props.value,
294
+ value: props.value || value,
288
295
  onChange: handleChange,
296
+ onKeyDown: handleKeyDown,
289
297
  autoComplete: props.autoComplete,
290
298
  defaultValue: props.defaultValue,
291
299
  placeholder,
292
300
  disabled: props.disabled || preview,
293
301
  style: { height: 40 },
302
+ maxLength: props.maxLength,
294
303
  ...inputProps,
295
304
  className: cn(
296
305
  defaultInputStyle,
@@ -517,7 +526,7 @@ var Select = ({
517
526
  };
518
527
 
519
528
  // elements/phoneInput/PhoneInput.tsx
520
- import React4, { useState as useState2, useRef as useRef2 } from "react";
529
+ import React4, { useState as useState3, useRef as useRef2 } from "react";
521
530
 
522
531
  // countries.ts
523
532
  var countries = [
@@ -2219,8 +2228,8 @@ var PhoneInput = ({
2219
2228
  countryCodes,
2220
2229
  ...props
2221
2230
  }) => {
2222
- const [phoneNumber, setPhoneNumber] = useState2("");
2223
- const [countryCode, setCountryCode] = useState2(props.preferredCountry);
2231
+ const [phoneNumber, setPhoneNumber] = useState3("");
2232
+ const [countryCode, setCountryCode] = useState3(props.preferredCountry);
2224
2233
  const inputRef = useRef2(null);
2225
2234
  const handleInputChange = (e) => {
2226
2235
  console.log("test e ", e.target.value);
@@ -2629,7 +2638,7 @@ var PopoverPortal = PopoverPrimitive.Portal;
2629
2638
  var PopoverRoot = PopoverPrimitive.Root;
2630
2639
 
2631
2640
  // elements/radio/Radio.tsx
2632
- import React9, { useState as useState3, useRef as useRef3, useEffect as useEffect3, forwardRef as forwardRef7 } from "react";
2641
+ import React9, { useState as useState4, useRef as useRef3, useEffect as useEffect3, forwardRef as forwardRef7 } from "react";
2633
2642
  import { TabsList, TabsTrigger, Tabs } from "@radix-ui/react-tabs";
2634
2643
  var Radio = forwardRef7(
2635
2644
  ({
@@ -2667,10 +2676,10 @@ var Radio = forwardRef7(
2667
2676
  const [parentDirection, setParentDirection] = React9.useState(
2668
2677
  null
2669
2678
  );
2670
- const [selectedOption, setSelectedOption] = useState3(
2679
+ const [selectedOption, setSelectedOption] = useState4(
2671
2680
  props.defaultValue || props.value
2672
2681
  );
2673
- const [openTooltip, setOpenTooltip] = useState3(null);
2682
+ const [openTooltip, setOpenTooltip] = useState4(null);
2674
2683
  const parentRef = useRef3(null);
2675
2684
  useEffect3(() => {
2676
2685
  var _a2;
@@ -4,7 +4,7 @@ import {
4
4
  Label,
5
5
  Skeleton,
6
6
  cn
7
- } from "./chunk-6UOJKVIA.mjs";
7
+ } from "./chunk-IFWYR5W2.mjs";
8
8
 
9
9
  // elements/textarea/Textarea.tsx
10
10
  import * as React from "react";
@@ -1108,7 +1108,7 @@ function Skeleton({
1108
1108
  };
1109
1109
  const styledAs = {
1110
1110
  div: "",
1111
- input: "!h-[38px] !w-full"
1111
+ input: "hawa-h-[40px] hawa-w-full"
1112
1112
  };
1113
1113
  return /* @__PURE__ */ React8.createElement(
1114
1114
  "div",
@@ -4,7 +4,7 @@ import {
4
4
  Label,
5
5
  Skeleton,
6
6
  cn
7
- } from "./chunk-6UOJKVIA.mjs";
7
+ } from "./chunk-IFWYR5W2.mjs";
8
8
 
9
9
  // elements/select/Select.tsx
10
10
  import React from "react";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  cn
4
- } from "./chunk-6UOJKVIA.mjs";
4
+ } from "./chunk-IFWYR5W2.mjs";
5
5
 
6
6
  // elements/scrollArea/ScrollArea.tsx
7
7
  import * as React from "react";