@sikka/hawa 0.31.5-next → 0.31.7-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 (36) hide show
  1. package/dist/{Radio-bhKmANMf.d.ts → Radio-3B8RZYJA.d.ts} +1 -1
  2. package/dist/{Radio-9MkZay6D.d.mts → Radio-L369ID7b.d.mts} +1 -1
  3. package/dist/blocks/auth/index.js +54 -21
  4. package/dist/blocks/auth/index.mjs +17 -18
  5. package/dist/blocks/feedback/index.js +39 -5
  6. package/dist/blocks/feedback/index.mjs +1 -1
  7. package/dist/blocks/index.d.mts +1 -1
  8. package/dist/blocks/index.d.ts +1 -1
  9. package/dist/blocks/index.js +54 -21
  10. package/dist/blocks/index.mjs +1 -1
  11. package/dist/blocks/misc/index.js +39 -5
  12. package/dist/blocks/misc/index.mjs +1 -1
  13. package/dist/{chunk-6HRJIMXY.mjs → chunk-JXN2PVGT.mjs} +55 -22
  14. package/dist/{chunk-34LNWMOZ.mjs → chunk-WAVKQ44V.mjs} +39 -5
  15. package/dist/elements/index.d.mts +3 -2
  16. package/dist/elements/index.d.ts +3 -2
  17. package/dist/elements/index.js +54 -21
  18. package/dist/elements/index.mjs +1 -1
  19. package/dist/index.css +6 -0
  20. package/dist/index.d.mts +2 -1
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.js +54 -21
  23. package/dist/index.mjs +55 -22
  24. package/dist/phoneInput/index.d.mts +2 -1
  25. package/dist/phoneInput/index.d.ts +2 -1
  26. package/dist/phoneInput/index.js +54 -21
  27. package/dist/phoneInput/index.js.map +1 -1
  28. package/dist/phoneInput/index.mjs +55 -22
  29. package/dist/phoneInput/index.mjs.map +1 -1
  30. package/dist/select/index.d.mts +1 -1
  31. package/dist/select/index.d.ts +1 -1
  32. package/dist/select/index.js +39 -5
  33. package/dist/select/index.js.map +1 -1
  34. package/dist/select/index.mjs +39 -5
  35. package/dist/select/index.mjs.map +1 -1
  36. package/package.json +1 -1
@@ -89,22 +89,56 @@ var Select = ({
89
89
  props.controlClassNames
90
90
  ),
91
91
  container: () => cn(
92
- "hawa-rounded",
93
- props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
92
+ "hawa-rounded ",
93
+ props.phoneCode && "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
94
94
  "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
95
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
95
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
96
+ props.isMulti && "hawa-ps-0 "
96
97
  ),
97
98
  placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
98
99
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
99
100
  singleValue: () => "hawa-text-foreground",
100
101
  indicatorsContainer: () => cn(
101
- "hawa-cursor-pointer hawa-text-muted-foreground",
102
+ "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ",
102
103
  props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
103
104
  )
104
105
  },
105
106
  unstyled: true,
106
107
  autoFocus: true,
107
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
108
+ components: props.hideIndicator ? {
109
+ Option,
110
+ Menu,
111
+ IndicatorsContainer: () => null
112
+ } : {
113
+ Option,
114
+ Menu,
115
+ // Control: (e) => (
116
+ // <div
117
+ // className={cn(e.className, "hawa-flex hawa-flex-row")}
118
+ // {...e}
119
+ // />
120
+ // ),
121
+ ValueContainer: (e) => /* @__PURE__ */ React.createElement(
122
+ "div",
123
+ {
124
+ className: cn(
125
+ e.className,
126
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
127
+ ),
128
+ ...e
129
+ }
130
+ ),
131
+ MultiValueContainer: (e) => /* @__PURE__ */ React.createElement(
132
+ "div",
133
+ {
134
+ className: cn(
135
+ // e.className,
136
+ "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
137
+ ),
138
+ ...e
139
+ }
140
+ )
141
+ },
108
142
  onChange: (newValue, action) => props.onChange(newValue, action),
109
143
  options: props.options,
110
144
  getOptionLabel: props.getOptionLabel,
@@ -13,8 +13,8 @@ import { DialogProps } from '@radix-ui/react-dialog';
13
13
  import { VariantProps } from 'class-variance-authority';
14
14
  import { RowData, ColumnDef } from '@tanstack/react-table';
15
15
  export { ColumnDef } from '@tanstack/react-table';
16
- import { L as LabelProps } from '../Radio-9MkZay6D.mjs';
17
- export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-9MkZay6D.mjs';
16
+ import { L as LabelProps } from '../Radio-L369ID7b.mjs';
17
+ export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-L369ID7b.mjs';
18
18
  import { Command as Command$1 } from 'cmdk';
19
19
  import * as TabsPrimitive from '@radix-ui/react-tabs';
20
20
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -659,6 +659,7 @@ type PhoneInputTypes = {
659
659
  labelProps?: LabelProps;
660
660
  placeholder?: string;
661
661
  handleChange?: (value: string) => void;
662
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
662
663
  };
663
664
  declare const PhoneInput: FC<PhoneInputTypes>;
664
665
 
@@ -13,8 +13,8 @@ import { DialogProps } from '@radix-ui/react-dialog';
13
13
  import { VariantProps } from 'class-variance-authority';
14
14
  import { RowData, ColumnDef } from '@tanstack/react-table';
15
15
  export { ColumnDef } from '@tanstack/react-table';
16
- import { L as LabelProps } from '../Radio-bhKmANMf.js';
17
- export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-bhKmANMf.js';
16
+ import { L as LabelProps } from '../Radio-3B8RZYJA.js';
17
+ export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-3B8RZYJA.js';
18
18
  import { Command as Command$1 } from 'cmdk';
19
19
  import * as TabsPrimitive from '@radix-ui/react-tabs';
20
20
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -659,6 +659,7 @@ type PhoneInputTypes = {
659
659
  labelProps?: LabelProps;
660
660
  placeholder?: string;
661
661
  handleChange?: (value: string) => void;
662
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
662
663
  };
663
664
  declare const PhoneInput: FC<PhoneInputTypes>;
664
665
 
@@ -4497,22 +4497,56 @@ var Select = ({
4497
4497
  props.controlClassNames
4498
4498
  ),
4499
4499
  container: () => cn(
4500
- "hawa-rounded",
4501
- props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4500
+ "hawa-rounded ",
4501
+ props.phoneCode && "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4502
4502
  "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
4503
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
4503
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
4504
+ props.isMulti && "hawa-ps-0 "
4504
4505
  ),
4505
4506
  placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
4506
4507
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
4507
4508
  singleValue: () => "hawa-text-foreground",
4508
4509
  indicatorsContainer: () => cn(
4509
- "hawa-cursor-pointer hawa-text-muted-foreground",
4510
+ "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ",
4510
4511
  props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
4511
4512
  )
4512
4513
  },
4513
4514
  unstyled: true,
4514
4515
  autoFocus: true,
4515
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
4516
+ components: props.hideIndicator ? {
4517
+ Option,
4518
+ Menu,
4519
+ IndicatorsContainer: () => null
4520
+ } : {
4521
+ Option,
4522
+ Menu,
4523
+ // Control: (e) => (
4524
+ // <div
4525
+ // className={cn(e.className, "hawa-flex hawa-flex-row")}
4526
+ // {...e}
4527
+ // />
4528
+ // ),
4529
+ ValueContainer: (e) => /* @__PURE__ */ import_react29.default.createElement(
4530
+ "div",
4531
+ {
4532
+ className: cn(
4533
+ e.className,
4534
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
4535
+ ),
4536
+ ...e
4537
+ }
4538
+ ),
4539
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react29.default.createElement(
4540
+ "div",
4541
+ {
4542
+ className: cn(
4543
+ // e.className,
4544
+ "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
4545
+ ),
4546
+ ...e
4547
+ }
4548
+ )
4549
+ },
4516
4550
  onChange: (newValue, action) => props.onChange(newValue, action),
4517
4551
  options: props.options,
4518
4552
  getOptionLabel: props.getOptionLabel,
@@ -6652,16 +6686,14 @@ var countries = [
6652
6686
  var countries_default = countries;
6653
6687
 
6654
6688
  // elements/phoneInput/PhoneInput.tsx
6655
- var PhoneInput = ({ labelProps, ...props }) => {
6689
+ var PhoneInput = ({
6690
+ labelProps,
6691
+ inputProps,
6692
+ ...props
6693
+ }) => {
6656
6694
  const [phoneNumber, setPhoneNumber] = (0, import_react33.useState)("");
6657
6695
  const [countryCode, setCountryCode] = (0, import_react33.useState)(props.preferredCountry);
6658
6696
  const inputRef = (0, import_react33.useRef)(null);
6659
- (0, import_react33.useEffect)(() => {
6660
- var _a;
6661
- if (inputRef.current) {
6662
- (_a = inputRef.current) == null ? void 0 : _a.focus();
6663
- }
6664
- }, []);
6665
6697
  const handleInputChange = (e) => {
6666
6698
  const validChars = /^[0-9-()]+$/;
6667
6699
  const input = e.target.value;
@@ -6677,31 +6709,32 @@ var PhoneInput = ({ labelProps, ...props }) => {
6677
6709
  return /* @__PURE__ */ import_react33.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react33.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react33.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react33.default.createElement(
6678
6710
  Select,
6679
6711
  {
6712
+ phoneCode: true,
6680
6713
  width: "fit",
6681
6714
  hideHelperText: true,
6682
- phoneCode: true,
6683
6715
  hideIndicator: true,
6684
- placeholder: "Code",
6685
- options: countries_default,
6686
6716
  isMulti: false,
6687
6717
  isSearchable: true,
6688
6718
  isClearable: false,
6689
- defaultValue: props.preferredCountry,
6719
+ placeholder: "Code",
6720
+ options: countries_default,
6721
+ onChange: setCountryCode,
6690
6722
  value: countryCode == null ? void 0 : countryCode.label,
6691
- onChange: setCountryCode
6723
+ defaultValue: props.preferredCountry
6692
6724
  }
6693
6725
  ), /* @__PURE__ */ import_react33.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react33.default.createElement(
6694
6726
  "input",
6695
6727
  {
6728
+ type: "tel",
6696
6729
  ref: inputRef,
6697
6730
  id: "phone-number",
6731
+ value: phoneNumber,
6732
+ onChange: handleInputChange,
6733
+ placeholder: props.placeholder,
6698
6734
  className: cn(
6699
6735
  "hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
6700
6736
  ),
6701
- onChange: handleInputChange,
6702
- value: phoneNumber,
6703
- type: "tel",
6704
- placeholder: props.placeholder
6737
+ ...inputProps
6705
6738
  }
6706
6739
  ))), /* @__PURE__ */ import_react33.default.createElement(
6707
6740
  "p",
@@ -27,7 +27,7 @@ import {
27
27
  TabsTrigger,
28
28
  Textarea,
29
29
  UncheckMark
30
- } from "../chunk-6HRJIMXY.mjs";
30
+ } from "../chunk-JXN2PVGT.mjs";
31
31
  import {
32
32
  useClipboard
33
33
  } from "../chunk-R2SKHHDK.mjs";
package/dist/index.css CHANGED
@@ -1021,6 +1021,9 @@ input[type="number"]::-webkit-inner-spin-button,
1021
1021
  .hawa-bottom-4 {
1022
1022
  bottom: 1rem;
1023
1023
  }
1024
+ .hawa-bottom-\[50\%\] {
1025
+ bottom: 50%;
1026
+ }
1024
1027
  .hawa-bottom-\[62px\] {
1025
1028
  bottom: 62px;
1026
1029
  }
@@ -2682,6 +2685,9 @@ input[type="number"]::-webkit-inner-spin-button,
2682
2685
  .hawa-pr-2 {
2683
2686
  padding-right: 0.5rem;
2684
2687
  }
2688
+ .hawa-ps-0 {
2689
+ padding-inline-start: 0px;
2690
+ }
2685
2691
  .hawa-ps-9 {
2686
2692
  padding-inline-start: 2.25rem;
2687
2693
  }
package/dist/index.d.mts CHANGED
@@ -773,7 +773,7 @@ type SelectTypes = {
773
773
  isSearchable?: boolean;
774
774
  controlClassNames?: string;
775
775
  containerClassNames?: string;
776
- onChange?: any;
776
+ onChange: any;
777
777
  helperText?: string;
778
778
  onInputChange?: any;
779
779
  native?: any;
@@ -860,6 +860,7 @@ type PhoneInputTypes = {
860
860
  labelProps?: LabelProps;
861
861
  placeholder?: string;
862
862
  handleChange?: (value: string) => void;
863
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
863
864
  };
864
865
  declare const PhoneInput: FC<PhoneInputTypes>;
865
866
 
package/dist/index.d.ts CHANGED
@@ -773,7 +773,7 @@ type SelectTypes = {
773
773
  isSearchable?: boolean;
774
774
  controlClassNames?: string;
775
775
  containerClassNames?: string;
776
- onChange?: any;
776
+ onChange: any;
777
777
  helperText?: string;
778
778
  onInputChange?: any;
779
779
  native?: any;
@@ -860,6 +860,7 @@ type PhoneInputTypes = {
860
860
  labelProps?: LabelProps;
861
861
  placeholder?: string;
862
862
  handleChange?: (value: string) => void;
863
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
863
864
  };
864
865
  declare const PhoneInput: FC<PhoneInputTypes>;
865
866
 
package/dist/index.js CHANGED
@@ -4875,22 +4875,56 @@ var Select = ({
4875
4875
  props.controlClassNames
4876
4876
  ),
4877
4877
  container: () => cn(
4878
- "hawa-rounded",
4879
- props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4878
+ "hawa-rounded ",
4879
+ props.phoneCode && "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4880
4880
  "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
4881
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
4881
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
4882
+ props.isMulti && "hawa-ps-0 "
4882
4883
  ),
4883
4884
  placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
4884
4885
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
4885
4886
  singleValue: () => "hawa-text-foreground",
4886
4887
  indicatorsContainer: () => cn(
4887
- "hawa-cursor-pointer hawa-text-muted-foreground",
4888
+ "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ",
4888
4889
  props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
4889
4890
  )
4890
4891
  },
4891
4892
  unstyled: true,
4892
4893
  autoFocus: true,
4893
- components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : { Option, Menu: Menu2 },
4894
+ components: props.hideIndicator ? {
4895
+ Option,
4896
+ Menu: Menu2,
4897
+ IndicatorsContainer: () => null
4898
+ } : {
4899
+ Option,
4900
+ Menu: Menu2,
4901
+ // Control: (e) => (
4902
+ // <div
4903
+ // className={cn(e.className, "hawa-flex hawa-flex-row")}
4904
+ // {...e}
4905
+ // />
4906
+ // ),
4907
+ ValueContainer: (e) => /* @__PURE__ */ import_react29.default.createElement(
4908
+ "div",
4909
+ {
4910
+ className: cn(
4911
+ e.className,
4912
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
4913
+ ),
4914
+ ...e
4915
+ }
4916
+ ),
4917
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react29.default.createElement(
4918
+ "div",
4919
+ {
4920
+ className: cn(
4921
+ // e.className,
4922
+ "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
4923
+ ),
4924
+ ...e
4925
+ }
4926
+ )
4927
+ },
4894
4928
  onChange: (newValue, action) => props.onChange(newValue, action),
4895
4929
  options: props.options,
4896
4930
  getOptionLabel: props.getOptionLabel,
@@ -7030,16 +7064,14 @@ var countries = [
7030
7064
  var countries_default = countries;
7031
7065
 
7032
7066
  // elements/phoneInput/PhoneInput.tsx
7033
- var PhoneInput = ({ labelProps, ...props }) => {
7067
+ var PhoneInput = ({
7068
+ labelProps,
7069
+ inputProps,
7070
+ ...props
7071
+ }) => {
7034
7072
  const [phoneNumber, setPhoneNumber] = (0, import_react33.useState)("");
7035
7073
  const [countryCode, setCountryCode] = (0, import_react33.useState)(props.preferredCountry);
7036
7074
  const inputRef = (0, import_react33.useRef)(null);
7037
- (0, import_react33.useEffect)(() => {
7038
- var _a;
7039
- if (inputRef.current) {
7040
- (_a = inputRef.current) == null ? void 0 : _a.focus();
7041
- }
7042
- }, []);
7043
7075
  const handleInputChange = (e) => {
7044
7076
  const validChars = /^[0-9-()]+$/;
7045
7077
  const input = e.target.value;
@@ -7055,31 +7087,32 @@ var PhoneInput = ({ labelProps, ...props }) => {
7055
7087
  return /* @__PURE__ */ import_react33.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react33.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react33.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react33.default.createElement(
7056
7088
  Select,
7057
7089
  {
7090
+ phoneCode: true,
7058
7091
  width: "fit",
7059
7092
  hideHelperText: true,
7060
- phoneCode: true,
7061
7093
  hideIndicator: true,
7062
- placeholder: "Code",
7063
- options: countries_default,
7064
7094
  isMulti: false,
7065
7095
  isSearchable: true,
7066
7096
  isClearable: false,
7067
- defaultValue: props.preferredCountry,
7097
+ placeholder: "Code",
7098
+ options: countries_default,
7099
+ onChange: setCountryCode,
7068
7100
  value: countryCode == null ? void 0 : countryCode.label,
7069
- onChange: setCountryCode
7101
+ defaultValue: props.preferredCountry
7070
7102
  }
7071
7103
  ), /* @__PURE__ */ import_react33.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react33.default.createElement(
7072
7104
  "input",
7073
7105
  {
7106
+ type: "tel",
7074
7107
  ref: inputRef,
7075
7108
  id: "phone-number",
7109
+ value: phoneNumber,
7110
+ onChange: handleInputChange,
7111
+ placeholder: props.placeholder,
7076
7112
  className: cn(
7077
7113
  "hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
7078
7114
  ),
7079
- onChange: handleInputChange,
7080
- value: phoneNumber,
7081
- type: "tel",
7082
- placeholder: props.placeholder
7115
+ ...inputProps
7083
7116
  }
7084
7117
  ))), /* @__PURE__ */ import_react33.default.createElement(
7085
7118
  "p",
package/dist/index.mjs CHANGED
@@ -4645,22 +4645,56 @@ var Select = ({
4645
4645
  props.controlClassNames
4646
4646
  ),
4647
4647
  container: () => cn(
4648
- "hawa-rounded",
4649
- props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4648
+ "hawa-rounded ",
4649
+ props.phoneCode && "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
4650
4650
  "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
4651
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
4651
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
4652
+ props.isMulti && "hawa-ps-0 "
4652
4653
  ),
4653
4654
  placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
4654
4655
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
4655
4656
  singleValue: () => "hawa-text-foreground",
4656
4657
  indicatorsContainer: () => cn(
4657
- "hawa-cursor-pointer hawa-text-muted-foreground",
4658
+ "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ",
4658
4659
  props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
4659
4660
  )
4660
4661
  },
4661
4662
  unstyled: true,
4662
4663
  autoFocus: true,
4663
- components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : { Option, Menu: Menu2 },
4664
+ components: props.hideIndicator ? {
4665
+ Option,
4666
+ Menu: Menu2,
4667
+ IndicatorsContainer: () => null
4668
+ } : {
4669
+ Option,
4670
+ Menu: Menu2,
4671
+ // Control: (e) => (
4672
+ // <div
4673
+ // className={cn(e.className, "hawa-flex hawa-flex-row")}
4674
+ // {...e}
4675
+ // />
4676
+ // ),
4677
+ ValueContainer: (e) => /* @__PURE__ */ React41.createElement(
4678
+ "div",
4679
+ {
4680
+ className: cn(
4681
+ e.className,
4682
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
4683
+ ),
4684
+ ...e
4685
+ }
4686
+ ),
4687
+ MultiValueContainer: (e) => /* @__PURE__ */ React41.createElement(
4688
+ "div",
4689
+ {
4690
+ className: cn(
4691
+ // e.className,
4692
+ "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
4693
+ ),
4694
+ ...e
4695
+ }
4696
+ )
4697
+ },
4664
4698
  onChange: (newValue, action) => props.onChange(newValue, action),
4665
4699
  options: props.options,
4666
4700
  getOptionLabel: props.getOptionLabel,
@@ -5104,7 +5138,7 @@ var BadgedComponent = ({
5104
5138
  };
5105
5139
 
5106
5140
  // elements/phoneInput/PhoneInput.tsx
5107
- import React48, { useState as useState26, useRef as useRef16, useEffect as useEffect22 } from "react";
5141
+ import React48, { useState as useState26, useRef as useRef16 } from "react";
5108
5142
 
5109
5143
  // countries.ts
5110
5144
  var countries = [
@@ -6800,16 +6834,14 @@ var countries = [
6800
6834
  var countries_default = countries;
6801
6835
 
6802
6836
  // elements/phoneInput/PhoneInput.tsx
6803
- var PhoneInput = ({ labelProps, ...props }) => {
6837
+ var PhoneInput = ({
6838
+ labelProps,
6839
+ inputProps,
6840
+ ...props
6841
+ }) => {
6804
6842
  const [phoneNumber, setPhoneNumber] = useState26("");
6805
6843
  const [countryCode, setCountryCode] = useState26(props.preferredCountry);
6806
6844
  const inputRef = useRef16(null);
6807
- useEffect22(() => {
6808
- var _a;
6809
- if (inputRef.current) {
6810
- (_a = inputRef.current) == null ? void 0 : _a.focus();
6811
- }
6812
- }, []);
6813
6845
  const handleInputChange = (e) => {
6814
6846
  const validChars = /^[0-9-()]+$/;
6815
6847
  const input = e.target.value;
@@ -6825,31 +6857,32 @@ var PhoneInput = ({ labelProps, ...props }) => {
6825
6857
  return /* @__PURE__ */ React48.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React48.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React48.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React48.createElement(
6826
6858
  Select,
6827
6859
  {
6860
+ phoneCode: true,
6828
6861
  width: "fit",
6829
6862
  hideHelperText: true,
6830
- phoneCode: true,
6831
6863
  hideIndicator: true,
6832
- placeholder: "Code",
6833
- options: countries_default,
6834
6864
  isMulti: false,
6835
6865
  isSearchable: true,
6836
6866
  isClearable: false,
6837
- defaultValue: props.preferredCountry,
6867
+ placeholder: "Code",
6868
+ options: countries_default,
6869
+ onChange: setCountryCode,
6838
6870
  value: countryCode == null ? void 0 : countryCode.label,
6839
- onChange: setCountryCode
6871
+ defaultValue: props.preferredCountry
6840
6872
  }
6841
6873
  ), /* @__PURE__ */ React48.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React48.createElement(
6842
6874
  "input",
6843
6875
  {
6876
+ type: "tel",
6844
6877
  ref: inputRef,
6845
6878
  id: "phone-number",
6879
+ value: phoneNumber,
6880
+ onChange: handleInputChange,
6881
+ placeholder: props.placeholder,
6846
6882
  className: cn(
6847
6883
  "hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
6848
6884
  ),
6849
- onChange: handleInputChange,
6850
- value: phoneNumber,
6851
- type: "tel",
6852
- placeholder: props.placeholder
6885
+ ...inputProps
6853
6886
  }
6854
6887
  ))), /* @__PURE__ */ React48.createElement(
6855
6888
  "p",
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FC } from 'react';
2
+ import React__default, { FC } from 'react';
3
3
 
4
4
  type PositionType = "top" | "bottom" | "right" | "left";
5
5
 
@@ -19,6 +19,7 @@ type PhoneInputTypes = {
19
19
  labelProps?: LabelProps;
20
20
  placeholder?: string;
21
21
  handleChange?: (value: string) => void;
22
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
22
23
  };
23
24
  declare const PhoneInput: FC<PhoneInputTypes>;
24
25
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FC } from 'react';
2
+ import React__default, { FC } from 'react';
3
3
 
4
4
  type PositionType = "top" | "bottom" | "right" | "left";
5
5
 
@@ -19,6 +19,7 @@ type PhoneInputTypes = {
19
19
  labelProps?: LabelProps;
20
20
  placeholder?: string;
21
21
  handleChange?: (value: string) => void;
22
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
22
23
  };
23
24
  declare const PhoneInput: FC<PhoneInputTypes>;
24
25