@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.
- package/dist/{Radio-bhKmANMf.d.ts → Radio-3B8RZYJA.d.ts} +1 -1
- package/dist/{Radio-9MkZay6D.d.mts → Radio-L369ID7b.d.mts} +1 -1
- package/dist/blocks/auth/index.js +54 -21
- package/dist/blocks/auth/index.mjs +17 -18
- package/dist/blocks/feedback/index.js +39 -5
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +54 -21
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/misc/index.js +39 -5
- package/dist/blocks/misc/index.mjs +1 -1
- package/dist/{chunk-6HRJIMXY.mjs → chunk-JXN2PVGT.mjs} +55 -22
- package/dist/{chunk-34LNWMOZ.mjs → chunk-WAVKQ44V.mjs} +39 -5
- package/dist/elements/index.d.mts +3 -2
- package/dist/elements/index.d.ts +3 -2
- package/dist/elements/index.js +54 -21
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +6 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +54 -21
- package/dist/index.mjs +55 -22
- package/dist/phoneInput/index.d.mts +2 -1
- package/dist/phoneInput/index.d.ts +2 -1
- package/dist/phoneInput/index.js +54 -21
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +55 -22
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/select/index.js +39 -5
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +39 -5
- package/dist/select/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/phoneInput/index.js
CHANGED
@@ -1975,22 +1975,56 @@ var Select = ({
|
|
1975
1975
|
props.controlClassNames
|
1976
1976
|
),
|
1977
1977
|
container: () => cn(
|
1978
|
-
"hawa-rounded",
|
1979
|
-
props.phoneCode && "hawa-
|
1978
|
+
"hawa-rounded ",
|
1979
|
+
props.phoneCode && "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
|
1980
1980
|
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
1981
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
1981
|
+
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
1982
|
+
props.isMulti && "hawa-ps-0 "
|
1982
1983
|
),
|
1983
1984
|
placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
|
1984
1985
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
1985
1986
|
singleValue: () => "hawa-text-foreground",
|
1986
1987
|
indicatorsContainer: () => cn(
|
1987
|
-
"hawa-cursor-pointer hawa-text-muted-foreground",
|
1988
|
+
"hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ",
|
1988
1989
|
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
1989
1990
|
)
|
1990
1991
|
},
|
1991
1992
|
unstyled: true,
|
1992
1993
|
autoFocus: true,
|
1993
|
-
components: props.hideIndicator ? {
|
1994
|
+
components: props.hideIndicator ? {
|
1995
|
+
Option,
|
1996
|
+
Menu,
|
1997
|
+
IndicatorsContainer: () => null
|
1998
|
+
} : {
|
1999
|
+
Option,
|
2000
|
+
Menu,
|
2001
|
+
// Control: (e) => (
|
2002
|
+
// <div
|
2003
|
+
// className={cn(e.className, "hawa-flex hawa-flex-row")}
|
2004
|
+
// {...e}
|
2005
|
+
// />
|
2006
|
+
// ),
|
2007
|
+
ValueContainer: (e) => /* @__PURE__ */ import_react3.default.createElement(
|
2008
|
+
"div",
|
2009
|
+
{
|
2010
|
+
className: cn(
|
2011
|
+
e.className,
|
2012
|
+
"hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
|
2013
|
+
),
|
2014
|
+
...e
|
2015
|
+
}
|
2016
|
+
),
|
2017
|
+
MultiValueContainer: (e) => /* @__PURE__ */ import_react3.default.createElement(
|
2018
|
+
"div",
|
2019
|
+
{
|
2020
|
+
className: cn(
|
2021
|
+
// e.className,
|
2022
|
+
"hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
|
2023
|
+
),
|
2024
|
+
...e
|
2025
|
+
}
|
2026
|
+
)
|
2027
|
+
},
|
1994
2028
|
onChange: (newValue, action) => props.onChange(newValue, action),
|
1995
2029
|
options: props.options,
|
1996
2030
|
getOptionLabel: props.getOptionLabel,
|
@@ -2046,16 +2080,14 @@ var Select = ({
|
|
2046
2080
|
};
|
2047
2081
|
|
2048
2082
|
// elements/phoneInput/PhoneInput.tsx
|
2049
|
-
var PhoneInput = ({
|
2083
|
+
var PhoneInput = ({
|
2084
|
+
labelProps,
|
2085
|
+
inputProps,
|
2086
|
+
...props
|
2087
|
+
}) => {
|
2050
2088
|
const [phoneNumber, setPhoneNumber] = (0, import_react4.useState)("");
|
2051
2089
|
const [countryCode, setCountryCode] = (0, import_react4.useState)(props.preferredCountry);
|
2052
2090
|
const inputRef = (0, import_react4.useRef)(null);
|
2053
|
-
(0, import_react4.useEffect)(() => {
|
2054
|
-
var _a;
|
2055
|
-
if (inputRef.current) {
|
2056
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
2057
|
-
}
|
2058
|
-
}, []);
|
2059
2091
|
const handleInputChange = (e) => {
|
2060
2092
|
const validChars = /^[0-9-()]+$/;
|
2061
2093
|
const input = e.target.value;
|
@@ -2071,31 +2103,32 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
2071
2103
|
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react4.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react4.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react4.default.createElement(
|
2072
2104
|
Select,
|
2073
2105
|
{
|
2106
|
+
phoneCode: true,
|
2074
2107
|
width: "fit",
|
2075
2108
|
hideHelperText: true,
|
2076
|
-
phoneCode: true,
|
2077
2109
|
hideIndicator: true,
|
2078
|
-
placeholder: "Code",
|
2079
|
-
options: countries_default,
|
2080
2110
|
isMulti: false,
|
2081
2111
|
isSearchable: true,
|
2082
2112
|
isClearable: false,
|
2083
|
-
|
2113
|
+
placeholder: "Code",
|
2114
|
+
options: countries_default,
|
2115
|
+
onChange: setCountryCode,
|
2084
2116
|
value: countryCode == null ? void 0 : countryCode.label,
|
2085
|
-
|
2117
|
+
defaultValue: props.preferredCountry
|
2086
2118
|
}
|
2087
2119
|
), /* @__PURE__ */ import_react4.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_react4.default.createElement(
|
2088
2120
|
"input",
|
2089
2121
|
{
|
2122
|
+
type: "tel",
|
2090
2123
|
ref: inputRef,
|
2091
2124
|
id: "phone-number",
|
2125
|
+
value: phoneNumber,
|
2126
|
+
onChange: handleInputChange,
|
2127
|
+
placeholder: props.placeholder,
|
2092
2128
|
className: cn(
|
2093
2129
|
"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"
|
2094
2130
|
),
|
2095
|
-
|
2096
|
-
value: phoneNumber,
|
2097
|
-
type: "tel",
|
2098
|
-
placeholder: props.placeholder
|
2131
|
+
...inputProps
|
2099
2132
|
}
|
2100
2133
|
))), /* @__PURE__ */ import_react4.default.createElement(
|
2101
2134
|
"p",
|