@sikka/hawa 0.30.2-next → 0.30.3-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 (48) hide show
  1. package/dist/Label-9FHRF7Ex.d.mts +14 -0
  2. package/dist/Label-9FHRF7Ex.d.ts +14 -0
  3. package/dist/blocks/auth/index.js +34 -3
  4. package/dist/blocks/auth/index.mjs +7 -2
  5. package/dist/blocks/index.js +36 -5
  6. package/dist/blocks/index.mjs +7 -2
  7. package/dist/blocks/misc/index.js +28 -2
  8. package/dist/blocks/misc/index.mjs +1 -1
  9. package/dist/{chunk-KZCOE6V3.mjs → chunk-E6VRANQ3.mjs} +28 -2
  10. package/dist/{chunk-Q754X27Z.mjs → chunk-N4O2A727.mjs} +30 -4
  11. package/dist/dataTable/index.js +28 -2
  12. package/dist/dataTable/index.js.map +1 -1
  13. package/dist/dataTable/index.mjs +28 -2
  14. package/dist/dataTable/index.mjs.map +1 -1
  15. package/dist/elements/index.d.mts +7 -2
  16. package/dist/elements/index.d.ts +7 -2
  17. package/dist/elements/index.js +35 -24
  18. package/dist/elements/index.mjs +6 -21
  19. package/dist/index.css +0 -10
  20. package/dist/index.d.mts +7 -2
  21. package/dist/index.d.ts +7 -2
  22. package/dist/index.js +41 -25
  23. package/dist/index.mjs +41 -25
  24. package/dist/input/index.d.mts +2 -0
  25. package/dist/input/index.d.ts +2 -0
  26. package/dist/input/index.js +28 -2
  27. package/dist/input/index.js.map +1 -1
  28. package/dist/input/index.mjs +28 -2
  29. package/dist/input/index.mjs.map +1 -1
  30. package/dist/passwordInput/index.js +28 -2
  31. package/dist/passwordInput/index.js.map +1 -1
  32. package/dist/passwordInput/index.mjs +28 -2
  33. package/dist/passwordInput/index.mjs.map +1 -1
  34. package/dist/progress/index.d.mts +5 -1
  35. package/dist/progress/index.d.ts +5 -1
  36. package/dist/progress/index.js +120 -4
  37. package/dist/progress/index.js.map +1 -1
  38. package/dist/progress/index.mjs +120 -4
  39. package/dist/progress/index.mjs.map +1 -1
  40. package/dist/progressCircle/index.d.mts +1 -1
  41. package/dist/progressCircle/index.d.ts +1 -1
  42. package/dist/progressCircle/index.js +5 -20
  43. package/dist/progressCircle/index.js.map +1 -1
  44. package/dist/progressCircle/index.mjs +5 -20
  45. package/dist/progressCircle/index.mjs.map +1 -1
  46. package/dist/radio/index.d.mts +1 -12
  47. package/dist/radio/index.d.ts +1 -12
  48. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ type DirectionType = "rtl" | "ltr";
4
+ type PositionType = "top" | "bottom" | "right" | "left";
5
+ type OrientationType = "vertical" | "horizontal";
6
+
7
+ type LabelProps = {
8
+ hint?: React.ReactNode;
9
+ hintSide?: PositionType;
10
+ htmlFor?: string;
11
+ required?: boolean;
12
+ };
13
+
14
+ export type { DirectionType as D, LabelProps as L, OrientationType as O };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ type DirectionType = "rtl" | "ltr";
4
+ type PositionType = "top" | "bottom" | "right" | "left";
5
+ type OrientationType = "vertical" | "horizontal";
6
+
7
+ type LabelProps = {
8
+ hint?: React.ReactNode;
9
+ hintSide?: PositionType;
10
+ htmlFor?: string;
11
+ required?: boolean;
12
+ };
13
+
14
+ export type { DirectionType as D, LabelProps as L, OrientationType as O };
@@ -1209,6 +1209,23 @@ var Input = (0, import_react7.forwardRef)(
1209
1209
  };
1210
1210
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
1211
1211
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
1212
+ const handleChange = (e) => {
1213
+ let newValue = e.target.value;
1214
+ if (props.prefixText) {
1215
+ if (newValue.length < props.prefixText.length) {
1216
+ newValue = props.prefixText;
1217
+ } else {
1218
+ const isSubstring = props.prefixText.startsWith(newValue);
1219
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
1220
+ newValue = `${props.prefixText}${newValue}`;
1221
+ }
1222
+ }
1223
+ }
1224
+ if (props.onChange) {
1225
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
1226
+ props.onChange(newEvent);
1227
+ }
1228
+ };
1212
1229
  return /* @__PURE__ */ import_react7.default.createElement(
1213
1230
  "div",
1214
1231
  {
@@ -1221,7 +1238,16 @@ var Input = (0, import_react7.forwardRef)(
1221
1238
  )
1222
1239
  },
1223
1240
  props.label && /* @__PURE__ */ import_react7.default.createElement(Label, { ...labelProps }, props.label),
1224
- /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react7.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react7.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react7.default.createElement(
1241
+ /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react7.default.createElement(
1242
+ "span",
1243
+ {
1244
+ className: cn(
1245
+ "hawa-me-2 hawa-opacity-90",
1246
+ !forceHideHelperText && "hawa-mb-2"
1247
+ )
1248
+ },
1249
+ props.outsidePrefix
1250
+ ), props.isLoading ? /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react7.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react7.default.createElement(
1225
1251
  "div",
1226
1252
  {
1227
1253
  className: cn(
@@ -1245,7 +1271,7 @@ var Input = (0, import_react7.forwardRef)(
1245
1271
  dir: props.dir,
1246
1272
  type: props.type,
1247
1273
  value: props.value,
1248
- onChange: props.onChange,
1274
+ onChange: handleChange,
1249
1275
  autoComplete: props.autoComplete,
1250
1276
  defaultValue: props.defaultValue,
1251
1277
  placeholder,
@@ -3795,7 +3821,12 @@ var RegisterForm = ({
3795
3821
  direction: props.direction,
3796
3822
  title: props.errorTitle,
3797
3823
  text: props.errorText,
3798
- severity: "error"
3824
+ severity: "error",
3825
+ onAlertClosed: () => {
3826
+ if (props.onErrorDismissed) {
3827
+ props.onErrorDismissed();
3828
+ }
3829
+ }
3799
3830
  }
3800
3831
  ), /* @__PURE__ */ import_react15.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react15.default.createElement(
3801
3832
  "form",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-KZCOE6V3.mjs";
4
+ } from "../../chunk-E6VRANQ3.mjs";
5
5
  import {
6
6
  StopPropagationWrapper
7
7
  } from "../../chunk-47APBDKK.mjs";
@@ -2919,7 +2919,12 @@ var RegisterForm = ({
2919
2919
  direction: props.direction,
2920
2920
  title: props.errorTitle,
2921
2921
  text: props.errorText,
2922
- severity: "error"
2922
+ severity: "error",
2923
+ onAlertClosed: () => {
2924
+ if (props.onErrorDismissed) {
2925
+ props.onErrorDismissed();
2926
+ }
2927
+ }
2923
2928
  }
2924
2929
  ), /* @__PURE__ */ React7.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React7.createElement(
2925
2930
  "form",
@@ -1230,6 +1230,23 @@ var Input = (0, import_react7.forwardRef)(
1230
1230
  };
1231
1231
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
1232
1232
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
1233
+ const handleChange = (e) => {
1234
+ let newValue = e.target.value;
1235
+ if (props.prefixText) {
1236
+ if (newValue.length < props.prefixText.length) {
1237
+ newValue = props.prefixText;
1238
+ } else {
1239
+ const isSubstring = props.prefixText.startsWith(newValue);
1240
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
1241
+ newValue = `${props.prefixText}${newValue}`;
1242
+ }
1243
+ }
1244
+ }
1245
+ if (props.onChange) {
1246
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
1247
+ props.onChange(newEvent);
1248
+ }
1249
+ };
1233
1250
  return /* @__PURE__ */ import_react7.default.createElement(
1234
1251
  "div",
1235
1252
  {
@@ -1242,7 +1259,16 @@ var Input = (0, import_react7.forwardRef)(
1242
1259
  )
1243
1260
  },
1244
1261
  props.label && /* @__PURE__ */ import_react7.default.createElement(Label, { ...labelProps }, props.label),
1245
- /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react7.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react7.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react7.default.createElement(
1262
+ /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react7.default.createElement(
1263
+ "span",
1264
+ {
1265
+ className: cn(
1266
+ "hawa-me-2 hawa-opacity-90",
1267
+ !forceHideHelperText && "hawa-mb-2"
1268
+ )
1269
+ },
1270
+ props.outsidePrefix
1271
+ ), props.isLoading ? /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react7.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react7.default.createElement(
1246
1272
  "div",
1247
1273
  {
1248
1274
  className: cn(
@@ -1266,7 +1292,7 @@ var Input = (0, import_react7.forwardRef)(
1266
1292
  dir: props.dir,
1267
1293
  type: props.type,
1268
1294
  value: props.value,
1269
- onChange: props.onChange,
1295
+ onChange: handleChange,
1270
1296
  autoComplete: props.autoComplete,
1271
1297
  defaultValue: props.defaultValue,
1272
1298
  placeholder,
@@ -3952,7 +3978,12 @@ var RegisterForm = ({
3952
3978
  direction: props.direction,
3953
3979
  title: props.errorTitle,
3954
3980
  text: props.errorText,
3955
- severity: "error"
3981
+ severity: "error",
3982
+ onAlertClosed: () => {
3983
+ if (props.onErrorDismissed) {
3984
+ props.onErrorDismissed();
3985
+ }
3986
+ }
3956
3987
  }
3957
3988
  ), /* @__PURE__ */ import_react15.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react15.default.createElement(
3958
3989
  "form",
@@ -7119,7 +7150,7 @@ var import_react44 = __toESM(require("react"));
7119
7150
  // elements/progress/Progress.tsx
7120
7151
  var React54 = __toESM(require("react"));
7121
7152
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
7122
- var Progress = React54.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React54.createElement(
7153
+ var Progress = React54.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React54.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React54.createElement(Label, { ...props.labelProps }, props.label), /* @__PURE__ */ React54.createElement(
7123
7154
  ProgressPrimitive.Root,
7124
7155
  {
7125
7156
  ref,
@@ -7136,7 +7167,7 @@ var Progress = React54.forwardRef(({ className, value, ...props }, ref) => /* @_
7136
7167
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
7137
7168
  }
7138
7169
  )
7139
- ));
7170
+ )));
7140
7171
  Progress.displayName = ProgressPrimitive.Root.displayName;
7141
7172
 
7142
7173
  // blocks/Usage.tsx
@@ -26,7 +26,7 @@ import {
26
26
  UncheckMark,
27
27
  VeryBadEmoji,
28
28
  VeryGoodEmoji
29
- } from "../chunk-Q754X27Z.mjs";
29
+ } from "../chunk-N4O2A727.mjs";
30
30
  import {
31
31
  Button,
32
32
  Card,
@@ -540,7 +540,12 @@ var RegisterForm = ({
540
540
  direction: props.direction,
541
541
  title: props.errorTitle,
542
542
  text: props.errorText,
543
- severity: "error"
543
+ severity: "error",
544
+ onAlertClosed: () => {
545
+ if (props.onErrorDismissed) {
546
+ props.onErrorDismissed();
547
+ }
548
+ }
544
549
  }
545
550
  ), /* @__PURE__ */ React3.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React3.createElement(
546
551
  "form",
@@ -931,6 +931,23 @@ var Input = (0, import_react8.forwardRef)(
931
931
  };
932
932
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
933
933
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
934
+ const handleChange = (e) => {
935
+ let newValue = e.target.value;
936
+ if (props.prefixText) {
937
+ if (newValue.length < props.prefixText.length) {
938
+ newValue = props.prefixText;
939
+ } else {
940
+ const isSubstring = props.prefixText.startsWith(newValue);
941
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
942
+ newValue = `${props.prefixText}${newValue}`;
943
+ }
944
+ }
945
+ }
946
+ if (props.onChange) {
947
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
948
+ props.onChange(newEvent);
949
+ }
950
+ };
934
951
  return /* @__PURE__ */ import_react8.default.createElement(
935
952
  "div",
936
953
  {
@@ -943,7 +960,16 @@ var Input = (0, import_react8.forwardRef)(
943
960
  )
944
961
  },
945
962
  props.label && /* @__PURE__ */ import_react8.default.createElement(Label, { ...labelProps }, props.label),
946
- /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react8.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react8.default.createElement(
963
+ /* @__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(
964
+ "span",
965
+ {
966
+ className: cn(
967
+ "hawa-me-2 hawa-opacity-90",
968
+ !forceHideHelperText && "hawa-mb-2"
969
+ )
970
+ },
971
+ props.outsidePrefix
972
+ ), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react8.default.createElement(
947
973
  "div",
948
974
  {
949
975
  className: cn(
@@ -967,7 +993,7 @@ var Input = (0, import_react8.forwardRef)(
967
993
  dir: props.dir,
968
994
  type: props.type,
969
995
  value: props.value,
970
- onChange: props.onChange,
996
+ onChange: handleChange,
971
997
  autoComplete: props.autoComplete,
972
998
  defaultValue: props.defaultValue,
973
999
  placeholder,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-KZCOE6V3.mjs";
4
+ } from "../../chunk-E6VRANQ3.mjs";
5
5
  import {
6
6
  Chip,
7
7
  ScrollArea
@@ -34,6 +34,23 @@ var Input = forwardRef(
34
34
  };
35
35
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
36
36
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
37
+ const handleChange = (e) => {
38
+ let newValue = e.target.value;
39
+ if (props.prefixText) {
40
+ if (newValue.length < props.prefixText.length) {
41
+ newValue = props.prefixText;
42
+ } else {
43
+ const isSubstring = props.prefixText.startsWith(newValue);
44
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
45
+ newValue = `${props.prefixText}${newValue}`;
46
+ }
47
+ }
48
+ }
49
+ if (props.onChange) {
50
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
51
+ props.onChange(newEvent);
52
+ }
53
+ };
37
54
  return /* @__PURE__ */ React.createElement(
38
55
  "div",
39
56
  {
@@ -46,7 +63,16 @@ var Input = forwardRef(
46
63
  )
47
64
  },
48
65
  props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
49
- /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ React.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React.createElement(
66
+ /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ React.createElement(
67
+ "span",
68
+ {
69
+ className: cn(
70
+ "hawa-me-2 hawa-opacity-90",
71
+ !forceHideHelperText && "hawa-mb-2"
72
+ )
73
+ },
74
+ props.outsidePrefix
75
+ ), props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React.createElement(
50
76
  "div",
51
77
  {
52
78
  className: cn(
@@ -70,7 +96,7 @@ var Input = forwardRef(
70
96
  dir: props.dir,
71
97
  type: props.type,
72
98
  value: props.value,
73
- onChange: props.onChange,
99
+ onChange: handleChange,
74
100
  autoComplete: props.autoComplete,
75
101
  defaultValue: props.defaultValue,
76
102
  placeholder,
@@ -223,6 +223,23 @@ var Input = forwardRef2(
223
223
  };
224
224
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
225
225
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
226
+ const handleChange = (e) => {
227
+ let newValue = e.target.value;
228
+ if (props.prefixText) {
229
+ if (newValue.length < props.prefixText.length) {
230
+ newValue = props.prefixText;
231
+ } else {
232
+ const isSubstring = props.prefixText.startsWith(newValue);
233
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
234
+ newValue = `${props.prefixText}${newValue}`;
235
+ }
236
+ }
237
+ }
238
+ if (props.onChange) {
239
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
240
+ props.onChange(newEvent);
241
+ }
242
+ };
226
243
  return /* @__PURE__ */ React3.createElement(
227
244
  "div",
228
245
  {
@@ -235,7 +252,16 @@ var Input = forwardRef2(
235
252
  )
236
253
  },
237
254
  props.label && /* @__PURE__ */ React3.createElement(Label, { ...labelProps }, props.label),
238
- /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ React3.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ React3.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React3.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React3.createElement(React3.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React3.createElement(
255
+ /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ React3.createElement(
256
+ "span",
257
+ {
258
+ className: cn(
259
+ "hawa-me-2 hawa-opacity-90",
260
+ !forceHideHelperText && "hawa-mb-2"
261
+ )
262
+ },
263
+ props.outsidePrefix
264
+ ), props.isLoading ? /* @__PURE__ */ React3.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React3.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React3.createElement(React3.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React3.createElement(
239
265
  "div",
240
266
  {
241
267
  className: cn(
@@ -259,7 +285,7 @@ var Input = forwardRef2(
259
285
  dir: props.dir,
260
286
  type: props.type,
261
287
  value: props.value,
262
- onChange: props.onChange,
288
+ onChange: handleChange,
263
289
  autoComplete: props.autoComplete,
264
290
  defaultValue: props.defaultValue,
265
291
  placeholder,
@@ -2977,7 +3003,7 @@ var Separator = ({
2977
3003
  // elements/progress/Progress.tsx
2978
3004
  import * as React15 from "react";
2979
3005
  import * as ProgressPrimitive from "@radix-ui/react-progress";
2980
- var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React15.createElement(
3006
+ var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React15.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React15.createElement(Label, { ...props.labelProps }, props.label), /* @__PURE__ */ React15.createElement(
2981
3007
  ProgressPrimitive.Root,
2982
3008
  {
2983
3009
  ref,
@@ -2994,7 +3020,7 @@ var Progress = React15.forwardRef(({ className, value, ...props }, ref) => /* @_
2994
3020
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
2995
3021
  }
2996
3022
  )
2997
- ));
3023
+ )));
2998
3024
  Progress.displayName = ProgressPrimitive.Root.displayName;
2999
3025
 
3000
3026
  // icons/Emojis.tsx
@@ -860,6 +860,23 @@ var Input = (0, import_react4.forwardRef)(
860
860
  };
861
861
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
862
862
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
863
+ const handleChange = (e) => {
864
+ let newValue = e.target.value;
865
+ if (props.prefixText) {
866
+ if (newValue.length < props.prefixText.length) {
867
+ newValue = props.prefixText;
868
+ } else {
869
+ const isSubstring = props.prefixText.startsWith(newValue);
870
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
871
+ newValue = `${props.prefixText}${newValue}`;
872
+ }
873
+ }
874
+ }
875
+ if (props.onChange) {
876
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
877
+ props.onChange(newEvent);
878
+ }
879
+ };
863
880
  return /* @__PURE__ */ import_react4.default.createElement(
864
881
  "div",
865
882
  {
@@ -872,7 +889,16 @@ var Input = (0, import_react4.forwardRef)(
872
889
  )
873
890
  },
874
891
  props.label && /* @__PURE__ */ import_react4.default.createElement(Label2, { ...labelProps }, props.label),
875
- /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react4.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react4.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react4.default.createElement(
892
+ /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react4.default.createElement(
893
+ "span",
894
+ {
895
+ className: cn(
896
+ "hawa-me-2 hawa-opacity-90",
897
+ !forceHideHelperText && "hawa-mb-2"
898
+ )
899
+ },
900
+ props.outsidePrefix
901
+ ), props.isLoading ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react4.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react4.default.createElement(
876
902
  "div",
877
903
  {
878
904
  className: cn(
@@ -896,7 +922,7 @@ var Input = (0, import_react4.forwardRef)(
896
922
  dir: props.dir,
897
923
  type: props.type,
898
924
  value: props.value,
899
- onChange: props.onChange,
925
+ onChange: handleChange,
900
926
  autoComplete: props.autoComplete,
901
927
  defaultValue: props.defaultValue,
902
928
  placeholder,