@sikka/hawa 0.30.2-next → 0.30.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 (52) hide show
  1. package/dist/Label-9FHRF7Ex.d.mts +14 -0
  2. package/dist/Label-9FHRF7Ex.d.ts +14 -0
  3. package/dist/accordion/index.d.mts +1 -1
  4. package/dist/accordion/index.d.ts +1 -1
  5. package/dist/accordion/index.js.map +1 -1
  6. package/dist/accordion/index.mjs.map +1 -1
  7. package/dist/blocks/auth/index.js +34 -3
  8. package/dist/blocks/auth/index.mjs +7 -2
  9. package/dist/blocks/index.js +36 -5
  10. package/dist/blocks/index.mjs +7 -2
  11. package/dist/blocks/misc/index.js +28 -2
  12. package/dist/blocks/misc/index.mjs +1 -1
  13. package/dist/{chunk-KZCOE6V3.mjs → chunk-E6VRANQ3.mjs} +28 -2
  14. package/dist/{chunk-Q754X27Z.mjs → chunk-N4O2A727.mjs} +30 -4
  15. package/dist/dataTable/index.js +28 -2
  16. package/dist/dataTable/index.js.map +1 -1
  17. package/dist/dataTable/index.mjs +28 -2
  18. package/dist/dataTable/index.mjs.map +1 -1
  19. package/dist/elements/index.d.mts +8 -3
  20. package/dist/elements/index.d.ts +8 -3
  21. package/dist/elements/index.js +35 -24
  22. package/dist/elements/index.mjs +6 -21
  23. package/dist/index.css +0 -10
  24. package/dist/index.d.mts +8 -3
  25. package/dist/index.d.ts +8 -3
  26. package/dist/index.js +41 -25
  27. package/dist/index.mjs +41 -25
  28. package/dist/input/index.d.mts +2 -0
  29. package/dist/input/index.d.ts +2 -0
  30. package/dist/input/index.js +28 -2
  31. package/dist/input/index.js.map +1 -1
  32. package/dist/input/index.mjs +28 -2
  33. package/dist/input/index.mjs.map +1 -1
  34. package/dist/passwordInput/index.js +28 -2
  35. package/dist/passwordInput/index.js.map +1 -1
  36. package/dist/passwordInput/index.mjs +28 -2
  37. package/dist/passwordInput/index.mjs.map +1 -1
  38. package/dist/progress/index.d.mts +5 -1
  39. package/dist/progress/index.d.ts +5 -1
  40. package/dist/progress/index.js +120 -4
  41. package/dist/progress/index.js.map +1 -1
  42. package/dist/progress/index.mjs +120 -4
  43. package/dist/progress/index.mjs.map +1 -1
  44. package/dist/progressCircle/index.d.mts +1 -1
  45. package/dist/progressCircle/index.d.ts +1 -1
  46. package/dist/progressCircle/index.js +5 -20
  47. package/dist/progressCircle/index.js.map +1 -1
  48. package/dist/progressCircle/index.mjs +5 -20
  49. package/dist/progressCircle/index.mjs.map +1 -1
  50. package/dist/radio/index.d.mts +1 -12
  51. package/dist/radio/index.d.ts +1 -12
  52. package/package.json +1 -1
@@ -2527,6 +2527,23 @@ var Input = (0, import_react9.forwardRef)(
2527
2527
  };
2528
2528
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
2529
2529
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
2530
+ const handleChange = (e) => {
2531
+ let newValue = e.target.value;
2532
+ if (props.prefixText) {
2533
+ if (newValue.length < props.prefixText.length) {
2534
+ newValue = props.prefixText;
2535
+ } else {
2536
+ const isSubstring = props.prefixText.startsWith(newValue);
2537
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
2538
+ newValue = `${props.prefixText}${newValue}`;
2539
+ }
2540
+ }
2541
+ }
2542
+ if (props.onChange) {
2543
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
2544
+ props.onChange(newEvent);
2545
+ }
2546
+ };
2530
2547
  return /* @__PURE__ */ import_react9.default.createElement(
2531
2548
  "div",
2532
2549
  {
@@ -2539,7 +2556,16 @@ var Input = (0, import_react9.forwardRef)(
2539
2556
  )
2540
2557
  },
2541
2558
  props.label && /* @__PURE__ */ import_react9.default.createElement(Label2, { ...labelProps }, props.label),
2542
- /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react9.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react9.default.createElement(
2559
+ /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react9.default.createElement(
2560
+ "span",
2561
+ {
2562
+ className: cn(
2563
+ "hawa-me-2 hawa-opacity-90",
2564
+ !forceHideHelperText && "hawa-mb-2"
2565
+ )
2566
+ },
2567
+ props.outsidePrefix
2568
+ ), props.isLoading ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react9.default.createElement(
2543
2569
  "div",
2544
2570
  {
2545
2571
  className: cn(
@@ -2563,7 +2589,7 @@ var Input = (0, import_react9.forwardRef)(
2563
2589
  dir: props.dir,
2564
2590
  type: props.type,
2565
2591
  value: props.value,
2566
- onChange: props.onChange,
2592
+ onChange: handleChange,
2567
2593
  autoComplete: props.autoComplete,
2568
2594
  defaultValue: props.defaultValue,
2569
2595
  placeholder,
@@ -4508,7 +4534,7 @@ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
4508
4534
  // elements/progress/Progress.tsx
4509
4535
  var React35 = __toESM(require("react"));
4510
4536
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
4511
- var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement(
4537
+ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React35.createElement(Label2, { ...props.labelProps }, props.label), /* @__PURE__ */ React35.createElement(
4512
4538
  ProgressPrimitive.Root,
4513
4539
  {
4514
4540
  ref,
@@ -4525,7 +4551,7 @@ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @_
4525
4551
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
4526
4552
  }
4527
4553
  )
4528
- ));
4554
+ )));
4529
4555
  Progress.displayName = ProgressPrimitive.Root.displayName;
4530
4556
 
4531
4557
  // elements/breadcrumb/Breadcrumb.tsx
@@ -6646,26 +6672,11 @@ var ColorPicker = ({
6646
6672
  // elements/progressCircle/ProgressCircle.tsx
6647
6673
  var import_react22 = __toESM(require("react"));
6648
6674
  var size2config = {
6649
- xs: {
6650
- radius: 15,
6651
- strokeWidth: 3
6652
- },
6653
- sm: {
6654
- radius: 19,
6655
- strokeWidth: 4
6656
- },
6657
- md: {
6658
- radius: 32,
6659
- strokeWidth: 6
6660
- },
6661
- lg: {
6662
- radius: 52,
6663
- strokeWidth: 8
6664
- },
6665
- xl: {
6666
- radius: 80,
6667
- strokeWidth: 10
6668
- }
6675
+ xs: { radius: 15, strokeWidth: 3 },
6676
+ sm: { radius: 19, strokeWidth: 4 },
6677
+ md: { radius: 32, strokeWidth: 6 },
6678
+ lg: { radius: 52, strokeWidth: 8 },
6679
+ xl: { radius: 80, strokeWidth: 10 }
6669
6680
  };
6670
6681
  function getLimitedValue(input) {
6671
6682
  if (input === void 0) {
@@ -28,7 +28,7 @@ import {
28
28
  TabsTrigger,
29
29
  Textarea,
30
30
  UncheckMark
31
- } from "../chunk-Q754X27Z.mjs";
31
+ } from "../chunk-N4O2A727.mjs";
32
32
  import {
33
33
  Sheet,
34
34
  SheetClose,
@@ -2159,26 +2159,11 @@ var ColorPicker = ({
2159
2159
  // elements/progressCircle/ProgressCircle.tsx
2160
2160
  import React21 from "react";
2161
2161
  var size2config = {
2162
- xs: {
2163
- radius: 15,
2164
- strokeWidth: 3
2165
- },
2166
- sm: {
2167
- radius: 19,
2168
- strokeWidth: 4
2169
- },
2170
- md: {
2171
- radius: 32,
2172
- strokeWidth: 6
2173
- },
2174
- lg: {
2175
- radius: 52,
2176
- strokeWidth: 8
2177
- },
2178
- xl: {
2179
- radius: 80,
2180
- strokeWidth: 10
2181
- }
2162
+ xs: { radius: 15, strokeWidth: 3 },
2163
+ sm: { radius: 19, strokeWidth: 4 },
2164
+ md: { radius: 32, strokeWidth: 6 },
2165
+ lg: { radius: 52, strokeWidth: 8 },
2166
+ xl: { radius: 80, strokeWidth: 10 }
2182
2167
  };
2183
2168
  function getLimitedValue(input) {
2184
2169
  if (input === void 0) {
package/dist/index.css CHANGED
@@ -1362,9 +1362,6 @@ input[type="number"]::-webkit-inner-spin-button,
1362
1362
  .hawa-h-3\.5 {
1363
1363
  height: 0.875rem;
1364
1364
  }
1365
- .hawa-h-36 {
1366
- height: 9rem;
1367
- }
1368
1365
  .hawa-h-4 {
1369
1366
  height: 1rem;
1370
1367
  }
@@ -1557,9 +1554,6 @@ input[type="number"]::-webkit-inner-spin-button,
1557
1554
  .hawa-w-3\/4 {
1558
1555
  width: 75%;
1559
1556
  }
1560
- .hawa-w-36 {
1561
- width: 9rem;
1562
- }
1563
1557
  .hawa-w-4 {
1564
1558
  width: 1rem;
1565
1559
  }
@@ -1951,10 +1945,6 @@ input[type="number"]::-webkit-inner-spin-button,
1951
1945
  -moz-column-gap: 0.5rem;
1952
1946
  column-gap: 0.5rem;
1953
1947
  }
1954
- .hawa-gap-x-3 {
1955
- -moz-column-gap: 0.75rem;
1956
- column-gap: 0.75rem;
1957
- }
1958
1948
  .hawa-space-x-1 > :not([hidden]) ~ :not([hidden]) {
1959
1949
  --tw-space-x-reverse: 0;
1960
1950
  margin-right: calc(0.25rem * var(--tw-space-x-reverse));
package/dist/index.d.mts CHANGED
@@ -221,7 +221,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
221
221
  } & React__default.RefAttributes<HTMLSpanElement>>;
222
222
 
223
223
  type AccordionItemProps = {
224
- trigger: string;
224
+ trigger: React$1.ReactNode;
225
225
  content: React$1.ReactNode;
226
226
  disabled?: boolean;
227
227
  chip?: ChipTypes;
@@ -662,6 +662,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
662
662
  countPosition?: "top" | "bottom" | "center";
663
663
  popup?: boolean;
664
664
  popupContent?: React__default.ReactNode;
665
+ outsidePrefix?: any;
665
666
  prefixText?: any;
666
667
  };
667
668
  declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
@@ -693,6 +694,7 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
693
694
  countPosition?: "top" | "bottom" | "center" | undefined;
694
695
  popup?: boolean | undefined;
695
696
  popupContent?: React__default.ReactNode;
697
+ outsidePrefix?: any;
696
698
  prefixText?: any;
697
699
  } & React__default.RefAttributes<HTMLInputElement>>;
698
700
 
@@ -806,7 +808,10 @@ declare const CheckboxElement: React$1.ForwardRefExoticComponent<Omit<CheckboxPr
806
808
  radius?: RadiusType | undefined;
807
809
  } & React$1.RefAttributes<HTMLButtonElement>>;
808
810
 
809
- declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
811
+ declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
812
+ label?: string | undefined;
813
+ labelProps?: LabelProps | undefined;
814
+ } & React$1.RefAttributes<HTMLDivElement>>;
810
815
 
811
816
  interface BCTypes {
812
817
  /** The array of crumbs, each one with a label and a href link */
@@ -893,7 +898,7 @@ declare const ColorPicker: FC<ColorPickerTypes>;
893
898
 
894
899
  type Size = "xs" | "sm" | "md" | "lg" | "xl";
895
900
  interface ProgressCircleProps extends React__default.HTMLAttributes<HTMLDivElement> {
896
- value?: number;
901
+ value: number;
897
902
  size?: Size;
898
903
  color?: any;
899
904
  showAnimation?: boolean;
package/dist/index.d.ts CHANGED
@@ -221,7 +221,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
221
221
  } & React__default.RefAttributes<HTMLSpanElement>>;
222
222
 
223
223
  type AccordionItemProps = {
224
- trigger: string;
224
+ trigger: React$1.ReactNode;
225
225
  content: React$1.ReactNode;
226
226
  disabled?: boolean;
227
227
  chip?: ChipTypes;
@@ -662,6 +662,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
662
662
  countPosition?: "top" | "bottom" | "center";
663
663
  popup?: boolean;
664
664
  popupContent?: React__default.ReactNode;
665
+ outsidePrefix?: any;
665
666
  prefixText?: any;
666
667
  };
667
668
  declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
@@ -693,6 +694,7 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
693
694
  countPosition?: "top" | "bottom" | "center" | undefined;
694
695
  popup?: boolean | undefined;
695
696
  popupContent?: React__default.ReactNode;
697
+ outsidePrefix?: any;
696
698
  prefixText?: any;
697
699
  } & React__default.RefAttributes<HTMLInputElement>>;
698
700
 
@@ -806,7 +808,10 @@ declare const CheckboxElement: React$1.ForwardRefExoticComponent<Omit<CheckboxPr
806
808
  radius?: RadiusType | undefined;
807
809
  } & React$1.RefAttributes<HTMLButtonElement>>;
808
810
 
809
- declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
811
+ declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
812
+ label?: string | undefined;
813
+ labelProps?: LabelProps | undefined;
814
+ } & React$1.RefAttributes<HTMLDivElement>>;
810
815
 
811
816
  interface BCTypes {
812
817
  /** The array of crumbs, each one with a label and a href link */
@@ -893,7 +898,7 @@ declare const ColorPicker: FC<ColorPickerTypes>;
893
898
 
894
899
  type Size = "xs" | "sm" | "md" | "lg" | "xl";
895
900
  interface ProgressCircleProps extends React__default.HTMLAttributes<HTMLDivElement> {
896
- value?: number;
901
+ value: number;
897
902
  size?: Size;
898
903
  color?: any;
899
904
  showAnimation?: boolean;
package/dist/index.js CHANGED
@@ -2594,6 +2594,23 @@ var Input = (0, import_react9.forwardRef)(
2594
2594
  };
2595
2595
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
2596
2596
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
2597
+ const handleChange = (e) => {
2598
+ let newValue = e.target.value;
2599
+ if (props.prefixText) {
2600
+ if (newValue.length < props.prefixText.length) {
2601
+ newValue = props.prefixText;
2602
+ } else {
2603
+ const isSubstring = props.prefixText.startsWith(newValue);
2604
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
2605
+ newValue = `${props.prefixText}${newValue}`;
2606
+ }
2607
+ }
2608
+ }
2609
+ if (props.onChange) {
2610
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
2611
+ props.onChange(newEvent);
2612
+ }
2613
+ };
2597
2614
  return /* @__PURE__ */ import_react9.default.createElement(
2598
2615
  "div",
2599
2616
  {
@@ -2606,7 +2623,16 @@ var Input = (0, import_react9.forwardRef)(
2606
2623
  )
2607
2624
  },
2608
2625
  props.label && /* @__PURE__ */ import_react9.default.createElement(Label2, { ...labelProps }, props.label),
2609
- /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react9.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react9.default.createElement(
2626
+ /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react9.default.createElement(
2627
+ "span",
2628
+ {
2629
+ className: cn(
2630
+ "hawa-me-2 hawa-opacity-90",
2631
+ !forceHideHelperText && "hawa-mb-2"
2632
+ )
2633
+ },
2634
+ props.outsidePrefix
2635
+ ), props.isLoading ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react9.default.createElement(
2610
2636
  "div",
2611
2637
  {
2612
2638
  className: cn(
@@ -2630,7 +2656,7 @@ var Input = (0, import_react9.forwardRef)(
2630
2656
  dir: props.dir,
2631
2657
  type: props.type,
2632
2658
  value: props.value,
2633
- onChange: props.onChange,
2659
+ onChange: handleChange,
2634
2660
  autoComplete: props.autoComplete,
2635
2661
  defaultValue: props.defaultValue,
2636
2662
  placeholder,
@@ -4575,7 +4601,7 @@ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
4575
4601
  // elements/progress/Progress.tsx
4576
4602
  var React35 = __toESM(require("react"));
4577
4603
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
4578
- var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement(
4604
+ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React35.createElement(Label2, { ...props.labelProps }, props.label), /* @__PURE__ */ React35.createElement(
4579
4605
  ProgressPrimitive.Root,
4580
4606
  {
4581
4607
  ref,
@@ -4592,7 +4618,7 @@ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @_
4592
4618
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
4593
4619
  }
4594
4620
  )
4595
- ));
4621
+ )));
4596
4622
  Progress.displayName = ProgressPrimitive.Root.displayName;
4597
4623
 
4598
4624
  // elements/breadcrumb/Breadcrumb.tsx
@@ -6713,26 +6739,11 @@ var ColorPicker = ({
6713
6739
  // elements/progressCircle/ProgressCircle.tsx
6714
6740
  var import_react22 = __toESM(require("react"));
6715
6741
  var size2config = {
6716
- xs: {
6717
- radius: 15,
6718
- strokeWidth: 3
6719
- },
6720
- sm: {
6721
- radius: 19,
6722
- strokeWidth: 4
6723
- },
6724
- md: {
6725
- radius: 32,
6726
- strokeWidth: 6
6727
- },
6728
- lg: {
6729
- radius: 52,
6730
- strokeWidth: 8
6731
- },
6732
- xl: {
6733
- radius: 80,
6734
- strokeWidth: 10
6735
- }
6742
+ xs: { radius: 15, strokeWidth: 3 },
6743
+ sm: { radius: 19, strokeWidth: 4 },
6744
+ md: { radius: 32, strokeWidth: 6 },
6745
+ lg: { radius: 52, strokeWidth: 8 },
6746
+ xl: { radius: 80, strokeWidth: 10 }
6736
6747
  };
6737
6748
  function getLimitedValue(input) {
6738
6749
  if (input === void 0) {
@@ -9943,7 +9954,12 @@ var RegisterForm = ({
9943
9954
  direction: props.direction,
9944
9955
  title: props.errorTitle,
9945
9956
  text: props.errorText,
9946
- severity: "error"
9957
+ severity: "error",
9958
+ onAlertClosed: () => {
9959
+ if (props.onErrorDismissed) {
9960
+ props.onErrorDismissed();
9961
+ }
9962
+ }
9947
9963
  }
9948
9964
  ), /* @__PURE__ */ import_react48.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react48.default.createElement(
9949
9965
  "form",
package/dist/index.mjs CHANGED
@@ -2367,6 +2367,23 @@ var Input = forwardRef12(
2367
2367
  };
2368
2368
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
2369
2369
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
2370
+ const handleChange = (e) => {
2371
+ let newValue = e.target.value;
2372
+ if (props.prefixText) {
2373
+ if (newValue.length < props.prefixText.length) {
2374
+ newValue = props.prefixText;
2375
+ } else {
2376
+ const isSubstring = props.prefixText.startsWith(newValue);
2377
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
2378
+ newValue = `${props.prefixText}${newValue}`;
2379
+ }
2380
+ }
2381
+ }
2382
+ if (props.onChange) {
2383
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
2384
+ props.onChange(newEvent);
2385
+ }
2386
+ };
2370
2387
  return /* @__PURE__ */ React20.createElement(
2371
2388
  "div",
2372
2389
  {
@@ -2379,7 +2396,16 @@ var Input = forwardRef12(
2379
2396
  )
2380
2397
  },
2381
2398
  props.label && /* @__PURE__ */ React20.createElement(Label2, { ...labelProps }, props.label),
2382
- /* @__PURE__ */ React20.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ React20.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React20.createElement(
2399
+ /* @__PURE__ */ React20.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ React20.createElement(
2400
+ "span",
2401
+ {
2402
+ className: cn(
2403
+ "hawa-me-2 hawa-opacity-90",
2404
+ !forceHideHelperText && "hawa-mb-2"
2405
+ )
2406
+ },
2407
+ props.outsidePrefix
2408
+ ), props.isLoading ? /* @__PURE__ */ React20.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React20.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React20.createElement(
2383
2409
  "div",
2384
2410
  {
2385
2411
  className: cn(
@@ -2403,7 +2429,7 @@ var Input = forwardRef12(
2403
2429
  dir: props.dir,
2404
2430
  type: props.type,
2405
2431
  value: props.value,
2406
- onChange: props.onChange,
2432
+ onChange: handleChange,
2407
2433
  autoComplete: props.autoComplete,
2408
2434
  defaultValue: props.defaultValue,
2409
2435
  placeholder,
@@ -4348,7 +4374,7 @@ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
4348
4374
  // elements/progress/Progress.tsx
4349
4375
  import * as React35 from "react";
4350
4376
  import * as ProgressPrimitive from "@radix-ui/react-progress";
4351
- var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement(
4377
+ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React35.createElement(Label2, { ...props.labelProps }, props.label), /* @__PURE__ */ React35.createElement(
4352
4378
  ProgressPrimitive.Root,
4353
4379
  {
4354
4380
  ref,
@@ -4365,7 +4391,7 @@ var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @_
4365
4391
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
4366
4392
  }
4367
4393
  )
4368
- ));
4394
+ )));
4369
4395
  Progress.displayName = ProgressPrimitive.Root.displayName;
4370
4396
 
4371
4397
  // elements/breadcrumb/Breadcrumb.tsx
@@ -6489,26 +6515,11 @@ var ColorPicker = ({
6489
6515
  // elements/progressCircle/ProgressCircle.tsx
6490
6516
  import React44 from "react";
6491
6517
  var size2config = {
6492
- xs: {
6493
- radius: 15,
6494
- strokeWidth: 3
6495
- },
6496
- sm: {
6497
- radius: 19,
6498
- strokeWidth: 4
6499
- },
6500
- md: {
6501
- radius: 32,
6502
- strokeWidth: 6
6503
- },
6504
- lg: {
6505
- radius: 52,
6506
- strokeWidth: 8
6507
- },
6508
- xl: {
6509
- radius: 80,
6510
- strokeWidth: 10
6511
- }
6518
+ xs: { radius: 15, strokeWidth: 3 },
6519
+ sm: { radius: 19, strokeWidth: 4 },
6520
+ md: { radius: 32, strokeWidth: 6 },
6521
+ lg: { radius: 52, strokeWidth: 8 },
6522
+ xl: { radius: 80, strokeWidth: 10 }
6512
6523
  };
6513
6524
  function getLimitedValue(input) {
6514
6525
  if (input === void 0) {
@@ -9723,7 +9734,12 @@ var RegisterForm = ({
9723
9734
  direction: props.direction,
9724
9735
  title: props.errorTitle,
9725
9736
  text: props.errorText,
9726
- severity: "error"
9737
+ severity: "error",
9738
+ onAlertClosed: () => {
9739
+ if (props.onErrorDismissed) {
9740
+ props.onErrorDismissed();
9741
+ }
9742
+ }
9727
9743
  }
9728
9744
  ), /* @__PURE__ */ React75.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React75.createElement(
9729
9745
  "form",
@@ -38,6 +38,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
38
38
  countPosition?: "top" | "bottom" | "center";
39
39
  popup?: boolean;
40
40
  popupContent?: React__default.ReactNode;
41
+ outsidePrefix?: any;
41
42
  prefixText?: any;
42
43
  };
43
44
  declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
@@ -69,6 +70,7 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
69
70
  countPosition?: "top" | "bottom" | "center" | undefined;
70
71
  popup?: boolean | undefined;
71
72
  popupContent?: React__default.ReactNode;
73
+ outsidePrefix?: any;
72
74
  prefixText?: any;
73
75
  } & React__default.RefAttributes<HTMLInputElement>>;
74
76
 
@@ -38,6 +38,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
38
38
  countPosition?: "top" | "bottom" | "center";
39
39
  popup?: boolean;
40
40
  popupContent?: React__default.ReactNode;
41
+ outsidePrefix?: any;
41
42
  prefixText?: any;
42
43
  };
43
44
  declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
@@ -69,6 +70,7 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
69
70
  countPosition?: "top" | "bottom" | "center" | undefined;
70
71
  popup?: boolean | undefined;
71
72
  popupContent?: React__default.ReactNode;
73
+ outsidePrefix?: any;
72
74
  prefixText?: any;
73
75
  } & React__default.RefAttributes<HTMLInputElement>>;
74
76
 
@@ -224,6 +224,23 @@ var Input = (0, import_react3.forwardRef)(
224
224
  };
225
225
  let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
226
226
  let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
227
+ const handleChange = (e) => {
228
+ let newValue = e.target.value;
229
+ if (props.prefixText) {
230
+ if (newValue.length < props.prefixText.length) {
231
+ newValue = props.prefixText;
232
+ } else {
233
+ const isSubstring = props.prefixText.startsWith(newValue);
234
+ if (!isSubstring && !newValue.startsWith(props.prefixText)) {
235
+ newValue = `${props.prefixText}${newValue}`;
236
+ }
237
+ }
238
+ }
239
+ if (props.onChange) {
240
+ const newEvent = { ...e, target: { ...e.target, value: newValue } };
241
+ props.onChange(newEvent);
242
+ }
243
+ };
227
244
  return /* @__PURE__ */ import_react3.default.createElement(
228
245
  "div",
229
246
  {
@@ -236,7 +253,16 @@ var Input = (0, import_react3.forwardRef)(
236
253
  )
237
254
  },
238
255
  props.label && /* @__PURE__ */ import_react3.default.createElement(Label, { ...labelProps }, props.label),
239
- /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.prefixText && /* @__PURE__ */ import_react3.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.prefixText), props.isLoading ? /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react3.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react3.default.createElement(
256
+ /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react3.default.createElement(
257
+ "span",
258
+ {
259
+ className: cn(
260
+ "hawa-me-2 hawa-opacity-90",
261
+ !forceHideHelperText && "hawa-mb-2"
262
+ )
263
+ },
264
+ props.outsidePrefix
265
+ ), props.isLoading ? /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react3.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react3.default.createElement(
240
266
  "div",
241
267
  {
242
268
  className: cn(
@@ -260,7 +286,7 @@ var Input = (0, import_react3.forwardRef)(
260
286
  dir: props.dir,
261
287
  type: props.type,
262
288
  value: props.value,
263
- onChange: props.onChange,
289
+ onChange: handleChange,
264
290
  autoComplete: props.autoComplete,
265
291
  defaultValue: props.defaultValue,
266
292
  placeholder,