@sikka/hawa 0.46.3-next → 0.47.0-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-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
- package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
- package/dist/blocks/auth/index.d.mts +8 -8
- package/dist/blocks/auth/index.d.ts +8 -8
- package/dist/blocks/auth/index.js +87 -133
- package/dist/blocks/auth/index.mjs +21 -53
- package/dist/blocks/feedback/index.js +69 -80
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +3 -3
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/index.js +87 -133
- package/dist/blocks/index.mjs +6 -25
- package/dist/blocks/misc/index.js +70 -84
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +1 -1
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/{chunk-QLUJEUIB.mjs → chunk-342KIV4R.mjs} +83 -110
- package/dist/{chunk-EHJXQQDP.mjs → chunk-5S5DR7KF.mjs} +1 -1
- package/dist/{chunk-HJVL6X7I.mjs → chunk-6SJUUJOV.mjs} +1 -1
- package/dist/{chunk-7O555VJR.mjs → chunk-AWJSHOYU.mjs} +69 -80
- package/dist/{chunk-U72MOMEK.mjs → chunk-C2UOOH4X.mjs} +1 -1
- package/dist/{chunk-7L5VUKZ7.mjs → chunk-EOH6A3GR.mjs} +2 -5
- package/dist/{chunk-6UOJKVIA.mjs → chunk-IFWYR5W2.mjs} +1 -1
- package/dist/{chunk-YXUHXKKK.mjs → chunk-JP2N5WKD.mjs} +1 -1
- package/dist/{chunk-R37QEYSB.mjs → chunk-NMW4GM4G.mjs} +1 -1
- package/dist/{chunk-CIMTNOLA.mjs → chunk-WUMDFBEK.mjs} +1 -1
- package/dist/colorPicker/index.js +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.js +2 -5
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +2 -5
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +83 -110
- package/dist/elements/index.mjs +3 -3
- package/dist/index.d.mts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +87 -133
- package/dist/index.mjs +87 -133
- package/dist/input/index.js +2 -5
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +2 -5
- package/dist/input/index.mjs.map +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +2 -5
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +2 -5
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.d.mts +7 -7
- package/dist/phoneInput/index.d.ts +7 -7
- package/dist/phoneInput/index.js +79 -86
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +79 -86
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +3 -20
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +3 -20
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/select/index.d.mts +1 -0
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +69 -80
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +69 -80
- package/dist/select/index.mjs.map +1 -1
- package/dist/simpleTable/index.js +1 -1
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs +1 -1
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/skeleton/index.js +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/stats/index.js +1 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs +1 -1
- package/dist/stats/index.mjs.map +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +1 -1
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -1863,7 +1863,7 @@ function Skeleton({
|
|
1863
1863
|
};
|
1864
1864
|
const styledAs = {
|
1865
1865
|
div: "",
|
1866
|
-
input: "
|
1866
|
+
input: "hawa-h-[40px] hawa-w-full"
|
1867
1867
|
};
|
1868
1868
|
return /* @__PURE__ */ React4.createElement(
|
1869
1869
|
"div",
|
@@ -1885,6 +1885,7 @@ function Skeleton({
|
|
1885
1885
|
var Select = ({
|
1886
1886
|
labelProps,
|
1887
1887
|
labelKey = "label",
|
1888
|
+
valueKey = "value",
|
1888
1889
|
...props
|
1889
1890
|
}) => {
|
1890
1891
|
const NoOption = () => {
|
@@ -1904,13 +1905,7 @@ var Select = ({
|
|
1904
1905
|
children
|
1905
1906
|
);
|
1906
1907
|
};
|
1907
|
-
const Option = ({
|
1908
|
-
children,
|
1909
|
-
innerProps,
|
1910
|
-
innerRef,
|
1911
|
-
isFocused,
|
1912
|
-
isSelected
|
1913
|
-
}) => {
|
1908
|
+
const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
|
1914
1909
|
return /* @__PURE__ */ React5.createElement(
|
1915
1910
|
"div",
|
1916
1911
|
{
|
@@ -1925,14 +1920,7 @@ var Select = ({
|
|
1925
1920
|
children
|
1926
1921
|
);
|
1927
1922
|
};
|
1928
|
-
const Menu = ({
|
1929
|
-
cx,
|
1930
|
-
children,
|
1931
|
-
getStyles,
|
1932
|
-
innerProps,
|
1933
|
-
innerRef,
|
1934
|
-
...menuProps
|
1935
|
-
}) => {
|
1923
|
+
const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
|
1936
1924
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1937
1925
|
return /* @__PURE__ */ React5.createElement(
|
1938
1926
|
"div",
|
@@ -1961,71 +1949,72 @@ var Select = ({
|
|
1961
1949
|
)
|
1962
1950
|
},
|
1963
1951
|
props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label),
|
1964
|
-
props.isLoading ? /* @__PURE__ */ React5.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
{
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
1991
|
-
props.disabled && "hawa-opacity-30"
|
1992
|
-
)
|
1993
|
-
},
|
1994
|
-
unstyled: true,
|
1995
|
-
autoFocus: false,
|
1996
|
-
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
1952
|
+
props.isLoading ? /* @__PURE__ */ React5.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ React5.createElement(
|
1953
|
+
ReactSelect,
|
1954
|
+
{
|
1955
|
+
noOptionsMessage: NoOption,
|
1956
|
+
classNames: {
|
1957
|
+
control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
|
1958
|
+
container: () => cn(
|
1959
|
+
selectContainerStyles,
|
1960
|
+
props.phoneCode && phoneCodeStyles,
|
1961
|
+
props.isMulti && "hawa-ps-0 "
|
1962
|
+
),
|
1963
|
+
placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
|
1964
|
+
valueContainer: () => "hawa-text-foreground hawa-px-1",
|
1965
|
+
singleValue: () => cn(
|
1966
|
+
props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
|
1967
|
+
),
|
1968
|
+
indicatorsContainer: () => cn(
|
1969
|
+
selectIndicatorContainerStyles,
|
1970
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
|
1971
|
+
props.disabled && "hawa-opacity-30"
|
1972
|
+
)
|
1973
|
+
},
|
1974
|
+
unstyled: true,
|
1975
|
+
autoFocus: false,
|
1976
|
+
components: props.hideIndicator ? {
|
1977
|
+
Option: (optionProps) => /* @__PURE__ */ React5.createElement(
|
1997
1978
|
Option,
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
className
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
1979
|
+
{
|
1980
|
+
...optionProps,
|
1981
|
+
isSelected: optionProps.data[valueKey] === props.value[valueKey]
|
1982
|
+
}
|
1983
|
+
),
|
1984
|
+
Menu,
|
1985
|
+
IndicatorsContainer: () => null
|
1986
|
+
} : {
|
1987
|
+
Option,
|
1988
|
+
Menu,
|
1989
|
+
ValueContainer: (e) => /* @__PURE__ */ React5.createElement(
|
1990
|
+
"div",
|
1991
|
+
{
|
1992
|
+
className: cn(
|
1993
|
+
e.className,
|
1994
|
+
"hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
|
1995
|
+
),
|
1996
|
+
...e
|
1997
|
+
}
|
1998
|
+
),
|
1999
|
+
MultiValueContainer: (e) => /* @__PURE__ */ React5.createElement(
|
2000
|
+
"div",
|
2001
|
+
{
|
2002
|
+
className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
|
2003
|
+
...e
|
2004
|
+
}
|
2005
|
+
)
|
2006
|
+
},
|
2007
|
+
onChange: (newValue, action) => props.onChange(newValue, action),
|
2008
|
+
options: props.options,
|
2009
|
+
getOptionLabel: props.getOptionLabel,
|
2010
|
+
defaultValue: props.defaultValue,
|
2011
|
+
value: props.value,
|
2012
|
+
placeholder: props.placeholder,
|
2013
|
+
isDisabled: props.disabled,
|
2014
|
+
isClearable: props.isClearable,
|
2015
|
+
isMulti: props.isMulti,
|
2016
|
+
isSearchable: props.isSearchable
|
2017
|
+
}
|
2029
2018
|
) : /* @__PURE__ */ React5.createElement(
|
2030
2019
|
CreatableSelect,
|
2031
2020
|
{
|
@@ -2067,11 +2056,13 @@ var PhoneInput = ({
|
|
2067
2056
|
countryCodes,
|
2068
2057
|
...props
|
2069
2058
|
}) => {
|
2059
|
+
var _a;
|
2070
2060
|
const [phoneNumber, setPhoneNumber] = useState("");
|
2071
|
-
const [countryCode, setCountryCode] = useState(
|
2061
|
+
const [countryCode, setCountryCode] = useState(
|
2062
|
+
props.preferredCountry || { label: "+966" }
|
2063
|
+
);
|
2072
2064
|
const inputRef = useRef(null);
|
2073
2065
|
const handleInputChange = (e) => {
|
2074
|
-
console.log("test e ", e.target.value);
|
2075
2066
|
const validChars = /^[0-9-()]+$/;
|
2076
2067
|
const input = e.target.value;
|
2077
2068
|
if (input === "" || validChars.test(input)) {
|
@@ -2093,11 +2084,13 @@ var PhoneInput = ({
|
|
2093
2084
|
isMulti: false,
|
2094
2085
|
isSearchable: true,
|
2095
2086
|
isClearable: false,
|
2096
|
-
placeholder:
|
2087
|
+
placeholder: (_a = props.preferredCountry) == null ? void 0 : _a.label,
|
2097
2088
|
options: countryCodes || countries_default,
|
2098
|
-
onChange: setCountryCode,
|
2099
|
-
|
2100
|
-
|
2089
|
+
onChange: (e) => setCountryCode({ label: e.label, value: e.label }),
|
2090
|
+
valueKey: "label",
|
2091
|
+
labelKey: "label",
|
2092
|
+
value: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label },
|
2093
|
+
defaultValue: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label }
|
2101
2094
|
}
|
2102
2095
|
), /* @__PURE__ */ React6.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React6.createElement(
|
2103
2096
|
"input",
|