@sikka/hawa 0.46.1-next → 0.46.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.
- package/dist/blocks/auth/index.js +25 -13
- package/dist/blocks/auth/index.mjs +1 -1
- package/dist/blocks/index.js +25 -13
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/misc/index.js +25 -13
- package/dist/blocks/misc/index.mjs +1 -1
- package/dist/{chunk-FTETN5UE.mjs → chunk-7L5VUKZ7.mjs} +26 -14
- package/dist/{chunk-QUC5EXTF.mjs → chunk-QLUJEUIB.mjs} +32 -20
- package/dist/dataTable/index.js +25 -13
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +26 -14
- 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 +25 -13
- package/dist/elements/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -13
- package/dist/index.mjs +132 -120
- package/dist/input/index.d.mts +2 -2
- package/dist/input/index.d.ts +2 -2
- package/dist/input/index.js +25 -13
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +26 -14
- package/dist/input/index.mjs.map +1 -1
- package/dist/passwordInput/index.js +25 -13
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +36 -24
- package/dist/passwordInput/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2807,7 +2807,7 @@ var CheckboxElement = React21.forwardRef(({ radius = "inherit", size = "default"
|
|
2807
2807
|
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
2808
2808
|
|
2809
2809
|
// elements/input/Input.tsx
|
2810
|
-
import React22, { forwardRef as forwardRef13 } from "react";
|
2810
|
+
import React22, { forwardRef as forwardRef13, useState as useState4 } from "react";
|
2811
2811
|
var Input = forwardRef13(
|
2812
2812
|
({
|
2813
2813
|
margin = "none",
|
@@ -2822,6 +2822,7 @@ var Input = forwardRef13(
|
|
2822
2822
|
...props
|
2823
2823
|
}, ref) => {
|
2824
2824
|
var _a;
|
2825
|
+
const [value, setValue] = useState4(props.value || "");
|
2825
2826
|
let marginStyles = {
|
2826
2827
|
none: "hawa-mb-0",
|
2827
2828
|
normal: "hawa-mb-3",
|
@@ -2837,6 +2838,7 @@ var Input = forwardRef13(
|
|
2837
2838
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm placeholder:hawa-text-muted-foreground";
|
2838
2839
|
const handleChange = (e) => {
|
2839
2840
|
let newValue = e.target.value;
|
2841
|
+
setValue(newValue);
|
2840
2842
|
if (props.prefixText) {
|
2841
2843
|
if (newValue.length < props.prefixText.length) {
|
2842
2844
|
newValue = props.prefixText;
|
@@ -2848,9 +2850,26 @@ var Input = forwardRef13(
|
|
2848
2850
|
}
|
2849
2851
|
}
|
2850
2852
|
if (props.onChange) {
|
2851
|
-
|
2852
|
-
|
2853
|
+
if (props.type === "number" && props.maxLength) {
|
2854
|
+
console.log("type is ", props.type);
|
2855
|
+
console.log("max length is ", props.maxLength);
|
2856
|
+
let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
|
2857
|
+
const newEvent = { ...e, target: { ...e.target, value: v } };
|
2858
|
+
setValue(v);
|
2859
|
+
props.onChange(newEvent);
|
2860
|
+
} else {
|
2861
|
+
console.log("NETIHERRRER");
|
2862
|
+
const newEvent = { ...e, target: { ...e.target, value: newValue } };
|
2863
|
+
setValue(newValue);
|
2864
|
+
props.onChange(newEvent);
|
2865
|
+
}
|
2866
|
+
}
|
2867
|
+
};
|
2868
|
+
const handleKeyDown = (e) => {
|
2869
|
+
if (props.type === "number" && ["e", "E", "+", "-", "."].includes(e.key)) {
|
2870
|
+
e.preventDefault();
|
2853
2871
|
}
|
2872
|
+
props.onKeyDown && props.onKeyDown(e);
|
2854
2873
|
};
|
2855
2874
|
return /* @__PURE__ */ React22.createElement(
|
2856
2875
|
"div",
|
@@ -2864,16 +2883,7 @@ var Input = forwardRef13(
|
|
2864
2883
|
)
|
2865
2884
|
},
|
2866
2885
|
props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label),
|
2867
|
-
/* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ React22.createElement(
|
2868
|
-
"span",
|
2869
|
-
{
|
2870
|
-
className: cn(
|
2871
|
-
"hawa-me-2 hawa-opacity-90",
|
2872
|
-
!forceHideHelperText && "hawa-mb-2"
|
2873
|
-
)
|
2874
|
-
},
|
2875
|
-
props.outsidePrefix
|
2876
|
-
), props.isLoading ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(
|
2886
|
+
/* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ React22.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ React22.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ React22.createElement(
|
2877
2887
|
Skeleton,
|
2878
2888
|
{
|
2879
2889
|
animation: "none",
|
@@ -2920,13 +2930,15 @@ var Input = forwardRef13(
|
|
2920
2930
|
required: true,
|
2921
2931
|
dir: props.dir,
|
2922
2932
|
type: props.type,
|
2923
|
-
value: props.value,
|
2933
|
+
value: props.value || value,
|
2924
2934
|
onChange: handleChange,
|
2935
|
+
onKeyDown: handleKeyDown,
|
2925
2936
|
autoComplete: props.autoComplete,
|
2926
2937
|
defaultValue: props.defaultValue,
|
2927
2938
|
placeholder,
|
2928
2939
|
disabled: props.disabled || preview,
|
2929
2940
|
style: { height: 40 },
|
2941
|
+
maxLength: props.maxLength,
|
2930
2942
|
...inputProps,
|
2931
2943
|
className: cn(
|
2932
2944
|
defaultInputStyle,
|
@@ -3581,10 +3593,10 @@ var DataTable = ({
|
|
3581
3593
|
};
|
3582
3594
|
|
3583
3595
|
// elements/backToTop/BackToTop.tsx
|
3584
|
-
import React25, { useState as
|
3596
|
+
import React25, { useState as useState6, useEffect as useEffect4, useRef as useRef3 } from "react";
|
3585
3597
|
var BackToTop = ({ ...props }) => {
|
3586
|
-
const [visible, setVisible] =
|
3587
|
-
const [rect, _setRect] =
|
3598
|
+
const [visible, setVisible] = useState6(false);
|
3599
|
+
const [rect, _setRect] = useState6(null);
|
3588
3600
|
const self = useRef3(null);
|
3589
3601
|
const _rect = useRef3(rect);
|
3590
3602
|
const setRect = (data) => {
|
@@ -3674,7 +3686,7 @@ var BackToTop = ({ ...props }) => {
|
|
3674
3686
|
};
|
3675
3687
|
|
3676
3688
|
// elements/radio/Radio.tsx
|
3677
|
-
import React27, { useState as
|
3689
|
+
import React27, { useState as useState7, useRef as useRef4, useEffect as useEffect5, forwardRef as forwardRef16 } from "react";
|
3678
3690
|
import { TabsList, TabsTrigger, Tabs } from "@radix-ui/react-tabs";
|
3679
3691
|
|
3680
3692
|
// elements/popover/Popover.tsx
|
@@ -3780,10 +3792,10 @@ var Radio = forwardRef16(
|
|
3780
3792
|
const [parentDirection, setParentDirection] = React27.useState(
|
3781
3793
|
null
|
3782
3794
|
);
|
3783
|
-
const [selectedOption, setSelectedOption] =
|
3795
|
+
const [selectedOption, setSelectedOption] = useState7(
|
3784
3796
|
props.defaultValue || props.value
|
3785
3797
|
);
|
3786
|
-
const [openTooltip, setOpenTooltip] =
|
3798
|
+
const [openTooltip, setOpenTooltip] = useState7(null);
|
3787
3799
|
const parentRef = useRef4(null);
|
3788
3800
|
useEffect5(() => {
|
3789
3801
|
var _a2;
|
@@ -4414,7 +4426,7 @@ var Textarea = React30.forwardRef(
|
|
4414
4426
|
Textarea.displayName = "Textarea";
|
4415
4427
|
|
4416
4428
|
// elements/fileDropzone/FileDropzone.tsx
|
4417
|
-
import React31, { useEffect as useEffect6, useState as
|
4429
|
+
import React31, { useEffect as useEffect6, useState as useState9 } from "react";
|
4418
4430
|
import { useDropzone } from "react-dropzone";
|
4419
4431
|
import clsx2 from "clsx";
|
4420
4432
|
var FileDropzone = ({
|
@@ -4436,8 +4448,8 @@ var FileDropzone = ({
|
|
4436
4448
|
privacyLink
|
4437
4449
|
}) => {
|
4438
4450
|
var _a, _b, _c, _d, _e, _f;
|
4439
|
-
const [cmp, setCmp] =
|
4440
|
-
const [max, setMax] =
|
4451
|
+
const [cmp, setCmp] = useState9(0);
|
4452
|
+
const [max, setMax] = useState9(0);
|
4441
4453
|
const {
|
4442
4454
|
getRootProps,
|
4443
4455
|
getInputProps,
|
@@ -4677,10 +4689,10 @@ import { useEffect as useEffect7, useLayoutEffect } from "react";
|
|
4677
4689
|
var useIsomorphicEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect7;
|
4678
4690
|
|
4679
4691
|
// hooks/useDiscloser.ts
|
4680
|
-
import { useState as
|
4692
|
+
import { useState as useState10 } from "react";
|
4681
4693
|
|
4682
4694
|
// hooks/useHover.ts
|
4683
|
-
import { useEffect as useEffect8, useRef as useRef6, useState as
|
4695
|
+
import { useEffect as useEffect8, useRef as useRef6, useState as useState11 } from "react";
|
4684
4696
|
|
4685
4697
|
// hooks/useToast.ts
|
4686
4698
|
import * as React35 from "react";
|
@@ -4786,10 +4798,10 @@ function useToast() {
|
|
4786
4798
|
}
|
4787
4799
|
|
4788
4800
|
// hooks/useCarousel.ts
|
4789
|
-
import { useState as
|
4801
|
+
import { useState as useState13, useRef as useRef7 } from "react";
|
4790
4802
|
|
4791
4803
|
// hooks/useDialogCarousel.ts
|
4792
|
-
import { useEffect as useEffect10, useState as
|
4804
|
+
import { useEffect as useEffect10, useState as useState14 } from "react";
|
4793
4805
|
import AutoHeight from "embla-carousel-auto-height";
|
4794
4806
|
import useEmblaCarousel from "embla-carousel-react";
|
4795
4807
|
var useDialogCarousel = (options) => {
|
@@ -4797,7 +4809,7 @@ var useDialogCarousel = (options) => {
|
|
4797
4809
|
{ loop: false, watchDrag: false, startIndex: 0, ...options },
|
4798
4810
|
[AutoHeight({ active: true })]
|
4799
4811
|
);
|
4800
|
-
const [canScrollPrev, setCanScrollPrev] =
|
4812
|
+
const [canScrollPrev, setCanScrollPrev] = useState14(false);
|
4801
4813
|
const checkCanScrollPrev = () => {
|
4802
4814
|
if (emblaApi) {
|
4803
4815
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
@@ -4832,10 +4844,10 @@ var useDialogCarousel = (options) => {
|
|
4832
4844
|
};
|
4833
4845
|
|
4834
4846
|
// hooks/useDialogSteps.ts
|
4835
|
-
import { useState as
|
4847
|
+
import { useState as useState15, useEffect as useEffect11, useRef as useRef8 } from "react";
|
4836
4848
|
var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
|
4837
|
-
const [currentStep, setCurrentStep] =
|
4838
|
-
const [dialogHeight, setDialogHeight] =
|
4849
|
+
const [currentStep, setCurrentStep] = useState15(initialStep);
|
4850
|
+
const [dialogHeight, setDialogHeight] = useState15(null);
|
4839
4851
|
const visibleStepRef = useRef8(null);
|
4840
4852
|
useEffect11(() => {
|
4841
4853
|
if (visibleStepRef.current) {
|
@@ -4868,11 +4880,11 @@ var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
|
|
4868
4880
|
};
|
4869
4881
|
|
4870
4882
|
// hooks/useClipboard.ts
|
4871
|
-
import { useState as
|
4883
|
+
import { useState as useState16 } from "react";
|
4872
4884
|
function useClipboard({ timeout = 2e3 } = {}) {
|
4873
|
-
const [error, setError] =
|
4874
|
-
const [copied, setCopied] =
|
4875
|
-
const [copyTimeout, setCopyTimeout] =
|
4885
|
+
const [error, setError] = useState16(null);
|
4886
|
+
const [copied, setCopied] = useState16(false);
|
4887
|
+
const [copyTimeout, setCopyTimeout] = useState16(null);
|
4876
4888
|
const handleCopyResult = (value) => {
|
4877
4889
|
clearTimeout(copyTimeout);
|
4878
4890
|
setCopyTimeout(setTimeout(() => setCopied(false), timeout));
|
@@ -4894,9 +4906,9 @@ function useClipboard({ timeout = 2e3 } = {}) {
|
|
4894
4906
|
}
|
4895
4907
|
|
4896
4908
|
// hooks/useBreakpoint.ts
|
4897
|
-
import { useState as
|
4909
|
+
import { useState as useState17, useEffect as useEffect12 } from "react";
|
4898
4910
|
var useBreakpoint = () => {
|
4899
|
-
const [breakpoint, setBreakpoint] =
|
4911
|
+
const [breakpoint, setBreakpoint] = useState17(null);
|
4900
4912
|
useEffect12(() => {
|
4901
4913
|
if (typeof window !== "undefined") {
|
4902
4914
|
const resize = () => {
|
@@ -4913,9 +4925,9 @@ var useBreakpoint = () => {
|
|
4913
4925
|
};
|
4914
4926
|
|
4915
4927
|
// hooks/useWindowSize.ts
|
4916
|
-
import { useEffect as useEffect13, useState as
|
4928
|
+
import { useEffect as useEffect13, useState as useState18 } from "react";
|
4917
4929
|
var useWindowSize = () => {
|
4918
|
-
const [windowSize, setWindowSize] =
|
4930
|
+
const [windowSize, setWindowSize] = useState18({
|
4919
4931
|
width: void 0,
|
4920
4932
|
height: void 0
|
4921
4933
|
});
|
@@ -4934,7 +4946,7 @@ var useWindowSize = () => {
|
|
4934
4946
|
};
|
4935
4947
|
|
4936
4948
|
// hooks/useFocusWithin.ts
|
4937
|
-
import { useRef as useRef9, useState as
|
4949
|
+
import { useRef as useRef9, useState as useState19, useEffect as useEffect14 } from "react";
|
4938
4950
|
function containsRelatedTarget(event) {
|
4939
4951
|
if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
|
4940
4952
|
return event.currentTarget.contains(event.relatedTarget);
|
@@ -4946,7 +4958,7 @@ function useFocusWithin({
|
|
4946
4958
|
onFocus
|
4947
4959
|
} = {}) {
|
4948
4960
|
const ref = useRef9(null);
|
4949
|
-
const [focused, _setFocused] =
|
4961
|
+
const [focused, _setFocused] = useState19(false);
|
4950
4962
|
const focusedRef = useRef9(false);
|
4951
4963
|
const setFocused = (value) => {
|
4952
4964
|
_setFocused(value);
|
@@ -4980,7 +4992,7 @@ function useFocusWithin({
|
|
4980
4992
|
}
|
4981
4993
|
|
4982
4994
|
// hooks/useMediaQuery.ts
|
4983
|
-
import { useState as
|
4995
|
+
import { useState as useState20, useEffect as useEffect15, useRef as useRef10 } from "react";
|
4984
4996
|
function attachMediaListener(query, callback) {
|
4985
4997
|
try {
|
4986
4998
|
query.addEventListener("change", callback);
|
@@ -5002,7 +5014,7 @@ function getInitialValue(query, initialValue) {
|
|
5002
5014
|
function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
5003
5015
|
getInitialValueInEffect: true
|
5004
5016
|
}) {
|
5005
|
-
const [matches, setMatches] =
|
5017
|
+
const [matches, setMatches] = useState20(
|
5006
5018
|
getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
|
5007
5019
|
);
|
5008
5020
|
const queryRef = useRef10();
|
@@ -5021,15 +5033,15 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
5021
5033
|
}
|
5022
5034
|
|
5023
5035
|
// hooks/useScrollPosition.ts
|
5024
|
-
import { useState as
|
5036
|
+
import { useState as useState21, useEffect as useEffect16 } from "react";
|
5025
5037
|
|
5026
5038
|
// hooks/useTable.ts
|
5027
|
-
import { useState as
|
5039
|
+
import { useState as useState22, useEffect as useEffect17 } from "react";
|
5028
5040
|
|
5029
5041
|
// hooks/useTabs.ts
|
5030
|
-
import { useEffect as useEffect18, useState as
|
5042
|
+
import { useEffect as useEffect18, useState as useState23 } from "react";
|
5031
5043
|
function useTabs(initialTab = "") {
|
5032
|
-
const [activeTab, setActiveTab] =
|
5044
|
+
const [activeTab, setActiveTab] = useState23(initialTab);
|
5033
5045
|
useEffect18(() => {
|
5034
5046
|
const handleHashChange = () => {
|
5035
5047
|
const hash = window.location.hash.substring(1);
|
@@ -5052,10 +5064,10 @@ function useTabs(initialTab = "") {
|
|
5052
5064
|
}
|
5053
5065
|
|
5054
5066
|
// hooks/useMeasureDirty.ts
|
5055
|
-
import { useEffect as useEffect19, useRef as useRef12, useState as
|
5067
|
+
import { useEffect as useEffect19, useRef as useRef12, useState as useState24 } from "react";
|
5056
5068
|
var useMeasureDirty = (ref) => {
|
5057
5069
|
const frame = useRef12(0);
|
5058
|
-
const [rect, set] =
|
5070
|
+
const [rect, set] = useState24({
|
5059
5071
|
width: 0,
|
5060
5072
|
height: 0,
|
5061
5073
|
top: 0,
|
@@ -5063,7 +5075,7 @@ var useMeasureDirty = (ref) => {
|
|
5063
5075
|
bottom: 0,
|
5064
5076
|
right: 0
|
5065
5077
|
});
|
5066
|
-
const [observer] =
|
5078
|
+
const [observer] = useState24(
|
5067
5079
|
() => new ResizeObserver((entries) => {
|
5068
5080
|
const entry = entries[0];
|
5069
5081
|
if (entry) {
|
@@ -5213,12 +5225,12 @@ function useWindowEvent(type, listener, options) {
|
|
5213
5225
|
}
|
5214
5226
|
|
5215
5227
|
// hooks/useViewportSize.ts
|
5216
|
-
import { useCallback, useEffect as useEffect23, useState as
|
5228
|
+
import { useCallback, useEffect as useEffect23, useState as useState25 } from "react";
|
5217
5229
|
var eventListerOptions = {
|
5218
5230
|
passive: true
|
5219
5231
|
};
|
5220
5232
|
function useViewportSize() {
|
5221
|
-
const [windowSize, setWindowSize] =
|
5233
|
+
const [windowSize, setWindowSize] = useState25({
|
5222
5234
|
width: 0,
|
5223
5235
|
height: 0
|
5224
5236
|
});
|
@@ -5888,7 +5900,7 @@ var AppStores = (props) => {
|
|
5888
5900
|
};
|
5889
5901
|
|
5890
5902
|
// elements/badge/Badge.tsx
|
5891
|
-
import React48, { useEffect as useEffect26, useState as
|
5903
|
+
import React48, { useEffect as useEffect26, useState as useState28, useRef as useRef16 } from "react";
|
5892
5904
|
var Badge = ({
|
5893
5905
|
anchor,
|
5894
5906
|
position = "right",
|
@@ -5896,7 +5908,7 @@ var Badge = ({
|
|
5896
5908
|
text,
|
5897
5909
|
className
|
5898
5910
|
}) => {
|
5899
|
-
const [badgePosition, setBadgePosition] =
|
5911
|
+
const [badgePosition, setBadgePosition] = useState28(null);
|
5900
5912
|
const indicatorRef = useRef16(null);
|
5901
5913
|
const sizeStyles2 = {
|
5902
5914
|
small: { top: 4, left: 6, right: 7, classes: "hawa-w-3 hawa-h-3" },
|
@@ -5965,7 +5977,7 @@ var BadgedComponent = ({
|
|
5965
5977
|
};
|
5966
5978
|
|
5967
5979
|
// elements/phoneInput/PhoneInput.tsx
|
5968
|
-
import React49, { useState as
|
5980
|
+
import React49, { useState as useState29, useRef as useRef17 } from "react";
|
5969
5981
|
|
5970
5982
|
// countries.ts
|
5971
5983
|
var countries = [
|
@@ -7667,8 +7679,8 @@ var PhoneInput = ({
|
|
7667
7679
|
countryCodes,
|
7668
7680
|
...props
|
7669
7681
|
}) => {
|
7670
|
-
const [phoneNumber, setPhoneNumber] =
|
7671
|
-
const [countryCode, setCountryCode] =
|
7682
|
+
const [phoneNumber, setPhoneNumber] = useState29("");
|
7683
|
+
const [countryCode, setCountryCode] = useState29(props.preferredCountry);
|
7672
7684
|
const inputRef = useRef17(null);
|
7673
7685
|
const handleInputChange = (e) => {
|
7674
7686
|
console.log("test e ", e.target.value);
|
@@ -7876,7 +7888,7 @@ var StopPropagationWrapper = (props) => {
|
|
7876
7888
|
|
7877
7889
|
// elements/colorPicker/ColorPicker.tsx
|
7878
7890
|
import React52, {
|
7879
|
-
useState as
|
7891
|
+
useState as useState30,
|
7880
7892
|
useEffect as useEffect28
|
7881
7893
|
} from "react";
|
7882
7894
|
var ColorPicker = ({
|
@@ -7889,7 +7901,7 @@ var ColorPicker = ({
|
|
7889
7901
|
preview = false,
|
7890
7902
|
...props
|
7891
7903
|
}) => {
|
7892
|
-
const [selectedColor, setSelectedColor] =
|
7904
|
+
const [selectedColor, setSelectedColor] = useState30(props.color);
|
7893
7905
|
useEffect28(() => {
|
7894
7906
|
if (selectedColor && selectedColor[0] !== "#") {
|
7895
7907
|
setSelectedColor(`#${selectedColor}`);
|
@@ -8163,7 +8175,7 @@ var Pagination = ({
|
|
8163
8175
|
};
|
8164
8176
|
|
8165
8177
|
// elements/passwordInput/PasswordInput.tsx
|
8166
|
-
import React58, { useEffect as useEffect29, useState as
|
8178
|
+
import React58, { useEffect as useEffect29, useState as useState31 } from "react";
|
8167
8179
|
|
8168
8180
|
// icons/Emojis.tsx
|
8169
8181
|
import React55 from "react";
|
@@ -8400,15 +8412,15 @@ var PasswordInput = ({
|
|
8400
8412
|
hidePopover,
|
8401
8413
|
...props
|
8402
8414
|
}) => {
|
8403
|
-
const [inputValue, setInputValue] =
|
8404
|
-
const [isInputFocused, setIsInputFocused] =
|
8405
|
-
const [currentStr, setCurrentStr] =
|
8406
|
-
const [passwordVisible, setPasswordVisible] =
|
8407
|
-
const [lengthCriteriaMet, setLengthCriteriaMet] =
|
8408
|
-
const [numberCriteriaMet, setNumberCriteriaMet] =
|
8409
|
-
const [specialCharCriteriaMet, setSpecialCharCriteriaMet] =
|
8410
|
-
const [lowercaseCriteriaMet, setLowercaseCriteriaMet] =
|
8411
|
-
const [uppercaseCriteriaMet, setUppercaseCriteriaMet] =
|
8415
|
+
const [inputValue, setInputValue] = useState31("");
|
8416
|
+
const [isInputFocused, setIsInputFocused] = useState31(false);
|
8417
|
+
const [currentStr, setCurrentStr] = useState31(0);
|
8418
|
+
const [passwordVisible, setPasswordVisible] = useState31(false);
|
8419
|
+
const [lengthCriteriaMet, setLengthCriteriaMet] = useState31(false);
|
8420
|
+
const [numberCriteriaMet, setNumberCriteriaMet] = useState31(false);
|
8421
|
+
const [specialCharCriteriaMet, setSpecialCharCriteriaMet] = useState31(false);
|
8422
|
+
const [lowercaseCriteriaMet, setLowercaseCriteriaMet] = useState31(false);
|
8423
|
+
const [uppercaseCriteriaMet, setUppercaseCriteriaMet] = useState31(false);
|
8412
8424
|
useEffect29(() => {
|
8413
8425
|
const calculateStrength = () => {
|
8414
8426
|
let strengthScore = 0;
|
@@ -8605,12 +8617,12 @@ var Separator2 = ({
|
|
8605
8617
|
);
|
8606
8618
|
|
8607
8619
|
// elements/scrollIndicator/ScrollIndicator.tsx
|
8608
|
-
import React62, { useState as
|
8620
|
+
import React62, { useState as useState32, useEffect as useEffect30 } from "react";
|
8609
8621
|
var ScrollIndicator = ({
|
8610
8622
|
anchor,
|
8611
8623
|
inContainer = false
|
8612
8624
|
}) => {
|
8613
|
-
const [scrollPercentage, setScrollPercentage] =
|
8625
|
+
const [scrollPercentage, setScrollPercentage] = useState32(0);
|
8614
8626
|
const onScroll = () => {
|
8615
8627
|
const scrollElement = anchor.current;
|
8616
8628
|
if (scrollElement) {
|
@@ -8645,7 +8657,7 @@ var ScrollIndicator = ({
|
|
8645
8657
|
};
|
8646
8658
|
|
8647
8659
|
// elements/codeBlock/CodeBlock.tsx
|
8648
|
-
import React63, { useState as
|
8660
|
+
import React63, { useState as useState33 } from "react";
|
8649
8661
|
import { Highlight, themes, Prism } from "prism-react-renderer";
|
8650
8662
|
(typeof global !== "undefined" ? global : window).Prism = Prism;
|
8651
8663
|
__require("prismjs/components/prism-bash");
|
@@ -8677,7 +8689,7 @@ var CodeBlock = ({
|
|
8677
8689
|
...props
|
8678
8690
|
}) => {
|
8679
8691
|
const clipboard = useClipboard();
|
8680
|
-
const [selectedTab, setSelectedTab] =
|
8692
|
+
const [selectedTab, setSelectedTab] = useState33(0);
|
8681
8693
|
const theme = themes.oceanicNext;
|
8682
8694
|
let widthStyles = {
|
8683
8695
|
full: "hawa-w-full",
|
@@ -8805,7 +8817,7 @@ var CodeBlock = ({
|
|
8805
8817
|
};
|
8806
8818
|
|
8807
8819
|
// elements/carousel/Carousel.tsx
|
8808
|
-
import React64, { useEffect as useEffect31, useState as
|
8820
|
+
import React64, { useEffect as useEffect31, useState as useState34 } from "react";
|
8809
8821
|
import useEmblaCarousel2 from "embla-carousel-react";
|
8810
8822
|
var Carousel = ({
|
8811
8823
|
items,
|
@@ -8821,7 +8833,7 @@ var Carousel = ({
|
|
8821
8833
|
direction,
|
8822
8834
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
8823
8835
|
});
|
8824
|
-
const [selectedIndex, setSelectedIndex] =
|
8836
|
+
const [selectedIndex, setSelectedIndex] = useState34(0);
|
8825
8837
|
useEffect31(() => {
|
8826
8838
|
function selectHandler() {
|
8827
8839
|
const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
|
@@ -9135,14 +9147,14 @@ function Toaster(props) {
|
|
9135
9147
|
}
|
9136
9148
|
|
9137
9149
|
// elements/destroyableCard/DestroyableCard.tsx
|
9138
|
-
import React68, { useRef as useRef18, useState as
|
9150
|
+
import React68, { useRef as useRef18, useState as useState35 } from "react";
|
9139
9151
|
var DestroyableCard = ({
|
9140
9152
|
position = "bottom-right",
|
9141
9153
|
fixed,
|
9142
9154
|
direction,
|
9143
9155
|
...props
|
9144
9156
|
}) => {
|
9145
|
-
const [closed, setClosed] =
|
9157
|
+
const [closed, setClosed] = useState35(false);
|
9146
9158
|
const popUpRef = useRef18(null);
|
9147
9159
|
const boxPosition = {
|
9148
9160
|
"bottom-right": "hawa-right-4 hawa-bottom-4",
|
@@ -9209,7 +9221,7 @@ var DestroyableCard = ({
|
|
9209
9221
|
};
|
9210
9222
|
|
9211
9223
|
// elements/interfaceSettings/InterfaceSettings.tsx
|
9212
|
-
import React69, { useState as
|
9224
|
+
import React69, { useState as useState36 } from "react";
|
9213
9225
|
var InterfaceSettings = ({
|
9214
9226
|
orientation = "horizontal",
|
9215
9227
|
width = "default",
|
@@ -9217,8 +9229,8 @@ var InterfaceSettings = ({
|
|
9217
9229
|
handleLanguage,
|
9218
9230
|
...props
|
9219
9231
|
}) => {
|
9220
|
-
const [color, setColor] =
|
9221
|
-
const [language, setLanguage] =
|
9232
|
+
const [color, setColor] = useState36(props.currentColorMode);
|
9233
|
+
const [language, setLanguage] = useState36(props.currentLanguage);
|
9222
9234
|
let orientationStyle = {
|
9223
9235
|
horizontal: "hawa-flex hawa-flex-row hawa-justify-between",
|
9224
9236
|
vertical: "hawa-flex hawa-flex-col hawa-items-center hawa-gap-2"
|
@@ -9582,7 +9594,7 @@ var Copyrights = (props) => {
|
|
9582
9594
|
};
|
9583
9595
|
|
9584
9596
|
// layout/navbar/Navbar.tsx
|
9585
|
-
import React74, { useState as
|
9597
|
+
import React74, { useState as useState37 } from "react";
|
9586
9598
|
|
9587
9599
|
// elements/collapsible/Collapsible.tsx
|
9588
9600
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
@@ -9598,7 +9610,7 @@ var Navbar = ({
|
|
9598
9610
|
...props
|
9599
9611
|
}) => {
|
9600
9612
|
var _a, _b;
|
9601
|
-
const [isOpen, setIsOpen] =
|
9613
|
+
const [isOpen, setIsOpen] = useState37(false);
|
9602
9614
|
return /* @__PURE__ */ React74.createElement("nav", { className: "hawa-sticky hawa-top-2 hawa-transition-all" }, /* @__PURE__ */ React74.createElement(
|
9603
9615
|
Collapsible,
|
9604
9616
|
{
|
@@ -9702,7 +9714,7 @@ var Navbar = ({
|
|
9702
9714
|
};
|
9703
9715
|
|
9704
9716
|
// layout/appLayout/AppLayout.tsx
|
9705
|
-
import React75, { useEffect as useEffect32, useState as
|
9717
|
+
import React75, { useEffect as useEffect32, useState as useState38 } from "react";
|
9706
9718
|
import * as Dialog3 from "@radix-ui/react-dialog";
|
9707
9719
|
var LOCAL_STORAGE_KEY2 = "@sikka/hawa/keep-drawer-open";
|
9708
9720
|
var AppLayout = ({
|
@@ -9739,16 +9751,16 @@ var AppLayout = ({
|
|
9739
9751
|
}
|
9740
9752
|
};
|
9741
9753
|
const isRTL = direction === "rtl";
|
9742
|
-
const [openedSidebarItem, setOpenedSidebarItem] =
|
9743
|
-
const [size, setSize] =
|
9754
|
+
const [openedSidebarItem, setOpenedSidebarItem] = useState38("");
|
9755
|
+
const [size, setSize] = useState38(
|
9744
9756
|
typeof window !== "undefined" && window.innerWidth || 1200
|
9745
9757
|
);
|
9746
|
-
const [openSideMenu, setOpenSideMenu] =
|
9758
|
+
const [openSideMenu, setOpenSideMenu] = useState38(() => {
|
9747
9759
|
const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9748
9760
|
return savedState ? JSON.parse(savedState) : false;
|
9749
9761
|
});
|
9750
9762
|
const [container, setContainer] = React75.useState(null);
|
9751
|
-
const [keepDrawerOpen, setKeepDrawerOpen] =
|
9763
|
+
const [keepDrawerOpen, setKeepDrawerOpen] = useState38(() => {
|
9752
9764
|
const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9753
9765
|
return savedState ? JSON.parse(savedState) : false;
|
9754
9766
|
});
|
@@ -10363,9 +10375,9 @@ var MenubarShortcut = ({
|
|
10363
10375
|
MenubarShortcut.displayname = "MenubarShortcut";
|
10364
10376
|
|
10365
10377
|
// layout/appTabs/AppTabs.tsx
|
10366
|
-
import React78, { useState as
|
10378
|
+
import React78, { useState as useState39 } from "react";
|
10367
10379
|
var AppTabs = ({ tabs, className }) => {
|
10368
|
-
const [selectedIndex, setSelectedIndex] =
|
10380
|
+
const [selectedIndex, setSelectedIndex] = useState39(0);
|
10369
10381
|
return /* @__PURE__ */ React78.createElement(
|
10370
10382
|
"div",
|
10371
10383
|
{
|
@@ -10407,7 +10419,7 @@ var AppTabs = ({ tabs, className }) => {
|
|
10407
10419
|
};
|
10408
10420
|
|
10409
10421
|
// layout/docsLayout/DocsLayout.tsx
|
10410
|
-
import React80, { useEffect as useEffect33, useRef as useRef20, useState as
|
10422
|
+
import React80, { useEffect as useEffect33, useRef as useRef20, useState as useState40 } from "react";
|
10411
10423
|
|
10412
10424
|
// layout/docsSidebar/DocsSidebar.tsx
|
10413
10425
|
import React79 from "react";
|
@@ -10503,8 +10515,8 @@ var DocsLayout = ({
|
|
10503
10515
|
if (typeof window == "undefined") {
|
10504
10516
|
size = 1200;
|
10505
10517
|
}
|
10506
|
-
const [currentPage, setCurrentPage] =
|
10507
|
-
const [openSideMenu, setOpenSideMenu] =
|
10518
|
+
const [currentPage, setCurrentPage] = useState40("Introduction");
|
10519
|
+
const [openSideMenu, setOpenSideMenu] = useState40(true);
|
10508
10520
|
useEffect33(() => {
|
10509
10521
|
const handleClickOutside = (event) => {
|
10510
10522
|
if (ref.current && !ref.current.contains(event.target) && !openSideMenu) {
|
@@ -10775,7 +10787,7 @@ var AuthButtons = (props) => {
|
|
10775
10787
|
|
10776
10788
|
// blocks/auth/LoginForm.tsx
|
10777
10789
|
import React82 from "react";
|
10778
|
-
import { useState as
|
10790
|
+
import { useState as useState41 } from "react";
|
10779
10791
|
import { Controller, useForm } from "react-hook-form";
|
10780
10792
|
import { zodResolver } from "@hookform/resolvers/zod";
|
10781
10793
|
import {
|
@@ -10792,7 +10804,7 @@ var LoginForm = ({
|
|
10792
10804
|
...props
|
10793
10805
|
}) => {
|
10794
10806
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
10795
|
-
const [passwordVisible, setPasswordVisible] =
|
10807
|
+
const [passwordVisible, setPasswordVisible] = useState41(false);
|
10796
10808
|
const thirdPartyAuthTexts = {
|
10797
10809
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
10798
10810
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -11116,7 +11128,7 @@ var LoginForm = ({
|
|
11116
11128
|
};
|
11117
11129
|
|
11118
11130
|
// blocks/auth/RegisterForm.tsx
|
11119
|
-
import React83, { useState as
|
11131
|
+
import React83, { useState as useState42 } from "react";
|
11120
11132
|
import { Controller as Controller2, FormProvider, useForm as useForm2 } from "react-hook-form";
|
11121
11133
|
import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
11122
11134
|
import * as z2 from "zod";
|
@@ -11129,7 +11141,7 @@ var RegisterForm = ({
|
|
11129
11141
|
...props
|
11130
11142
|
}) => {
|
11131
11143
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
11132
|
-
const [passwordVisible, setPasswordVisible] =
|
11144
|
+
const [passwordVisible, setPasswordVisible] = useState42(false);
|
11133
11145
|
const thirdPartyAuthTexts = {
|
11134
11146
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
11135
11147
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -11752,7 +11764,7 @@ var ResetPasswordForm = ({
|
|
11752
11764
|
};
|
11753
11765
|
|
11754
11766
|
// blocks/auth/CodeConfirmation.tsx
|
11755
|
-
import React88, { useEffect as useEffect34, useState as
|
11767
|
+
import React88, { useEffect as useEffect34, useState as useState43 } from "react";
|
11756
11768
|
import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
|
11757
11769
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
11758
11770
|
import * as z5 from "zod";
|
@@ -11767,9 +11779,9 @@ var CodeConfirmation = ({
|
|
11767
11779
|
const { handleSubmit, control, formState, setValue } = useForm5({
|
11768
11780
|
resolver: zodResolver5(formSchema)
|
11769
11781
|
});
|
11770
|
-
const [resendTimer, setResendTimer] =
|
11771
|
-
const [remainingTime, setRemainingTime] =
|
11772
|
-
const [showResendTimer, setShowResendTimer] =
|
11782
|
+
const [resendTimer, setResendTimer] = useState43(null);
|
11783
|
+
const [remainingTime, setRemainingTime] = useState43(0);
|
11784
|
+
const [showResendTimer, setShowResendTimer] = useState43(false);
|
11773
11785
|
const startResendTimer = () => {
|
11774
11786
|
if (resendTimer !== null) {
|
11775
11787
|
clearInterval(resendTimer);
|
@@ -11867,7 +11879,7 @@ var CodeConfirmation = ({
|
|
11867
11879
|
};
|
11868
11880
|
|
11869
11881
|
// blocks/feedback/UserReferralSource.tsx
|
11870
|
-
import React89, { useRef as useRef21, useState as
|
11882
|
+
import React89, { useRef as useRef21, useState as useState44 } from "react";
|
11871
11883
|
import { Controller as Controller6, useForm as useForm6 } from "react-hook-form";
|
11872
11884
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
11873
11885
|
import * as z6 from "zod";
|
@@ -11877,7 +11889,7 @@ var UserReferralSource = ({
|
|
11877
11889
|
...props
|
11878
11890
|
}) => {
|
11879
11891
|
var _a, _b;
|
11880
|
-
const [closed, setClosed] =
|
11892
|
+
const [closed, setClosed] = useState44(false);
|
11881
11893
|
const popUpRef = useRef21(null);
|
11882
11894
|
const formSchema = z6.object({
|
11883
11895
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
@@ -12025,15 +12037,15 @@ var UserReferralSource = ({
|
|
12025
12037
|
};
|
12026
12038
|
|
12027
12039
|
// blocks/feedback/FeedbackRating.tsx
|
12028
|
-
import React90, { useEffect as useEffect35, useRef as useRef22, useState as
|
12040
|
+
import React90, { useEffect as useEffect35, useRef as useRef22, useState as useState45 } from "react";
|
12029
12041
|
var FeedbackRating = ({
|
12030
12042
|
position = "bottom-right",
|
12031
12043
|
...props
|
12032
12044
|
}) => {
|
12033
|
-
const [closed, setClosed] =
|
12034
|
-
const [answered, setAnswered] =
|
12035
|
-
const [clickedOption, setClickedOption] =
|
12036
|
-
const [closingTimer, setClosingTimer] =
|
12045
|
+
const [closed, setClosed] = useState45(false);
|
12046
|
+
const [answered, setAnswered] = useState45(false);
|
12047
|
+
const [clickedOption, setClickedOption] = useState45(null);
|
12048
|
+
const [closingTimer, setClosingTimer] = useState45(5);
|
12037
12049
|
const popUpRef = useRef22(null);
|
12038
12050
|
const boxPosition = {
|
12039
12051
|
"bottom-right": "hawa-right-4",
|
@@ -12139,12 +12151,12 @@ var FeedbackRating = ({
|
|
12139
12151
|
};
|
12140
12152
|
|
12141
12153
|
// blocks/feedback/FeedbackEmoji.tsx
|
12142
|
-
import React91, { useState as
|
12154
|
+
import React91, { useState as useState46 } from "react";
|
12143
12155
|
var FeedbackEmoji = (props) => {
|
12144
|
-
const [selectedEmoji, setSelectedEmoji] =
|
12145
|
-
const [loadingSubmit, setLoadingSubmit] =
|
12146
|
-
const [feedbackText, setFeedbackText] =
|
12147
|
-
const [helperText, setHelperText] =
|
12156
|
+
const [selectedEmoji, setSelectedEmoji] = useState46(null);
|
12157
|
+
const [loadingSubmit, setLoadingSubmit] = useState46(false);
|
12158
|
+
const [feedbackText, setFeedbackText] = useState46("");
|
12159
|
+
const [helperText, setHelperText] = useState46(false);
|
12148
12160
|
let emojis = [
|
12149
12161
|
{ icon: /* @__PURE__ */ React91.createElement(VeryGoodEmoji, null), value: "very-good" },
|
12150
12162
|
{ icon: /* @__PURE__ */ React91.createElement(GoodEmoji, null), value: "good" },
|
@@ -12729,9 +12741,9 @@ var ContactForm = ({
|
|
12729
12741
|
import React106 from "react";
|
12730
12742
|
|
12731
12743
|
// blocks/cards/ActionCard.tsx
|
12732
|
-
import React101, { useState as
|
12744
|
+
import React101, { useState as useState47 } from "react";
|
12733
12745
|
var ActionCard = (props) => {
|
12734
|
-
const [hovered, setHovered] =
|
12746
|
+
const [hovered, setHovered] = useState47(false);
|
12735
12747
|
return /* @__PURE__ */ React101.createElement("div", { className: "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-1" }, /* @__PURE__ */ React101.createElement(
|
12736
12748
|
"div",
|
12737
12749
|
{
|
@@ -12768,13 +12780,13 @@ var ActionCard = (props) => {
|
|
12768
12780
|
};
|
12769
12781
|
|
12770
12782
|
// blocks/cards/AdCard.tsx
|
12771
|
-
import React102, { useState as
|
12783
|
+
import React102, { useState as useState48, useEffect as useEffect36, useRef as useRef23 } from "react";
|
12772
12784
|
var AdCard = ({
|
12773
12785
|
orientation = "vertical",
|
12774
12786
|
...props
|
12775
12787
|
}) => {
|
12776
12788
|
const adRef = useRef23(null);
|
12777
|
-
const [closed, setClosed] =
|
12789
|
+
const [closed, setClosed] = useState48(false);
|
12778
12790
|
let duration = 0;
|
12779
12791
|
useEffect36(() => {
|
12780
12792
|
if (duration) {
|
@@ -12964,7 +12976,7 @@ var PricingCard = ({
|
|
12964
12976
|
};
|
12965
12977
|
|
12966
12978
|
// blocks/cards/ItemCard.tsx
|
12967
|
-
import React104, { useEffect as useEffect37, useState as
|
12979
|
+
import React104, { useEffect as useEffect37, useState as useState49 } from "react";
|
12968
12980
|
var ItemCard = ({
|
12969
12981
|
actions,
|
12970
12982
|
counts,
|
@@ -12993,7 +13005,7 @@ var ItemCard = ({
|
|
12993
13005
|
)
|
12994
13006
|
};
|
12995
13007
|
let headerActionsButtonStyle = "hawa-inline-block hawa-rounded hawa-p-1 hawa-text-sm hawa-text-gray-500 hover:hawa-bg-gray-100 focus:hawa-outline-none focus:hawa-ring-4 focus:hawa-ring-gray-200 dark:hawa-text-gray-400 dark:hover:hawa-bg-gray-700 dark:focus:hawa-ring-gray-700";
|
12996
|
-
const [openActionHeader, setOpenActionHeader] =
|
13008
|
+
const [openActionHeader, setOpenActionHeader] = useState49(false);
|
12997
13009
|
function handleOpenActionHeader(e) {
|
12998
13010
|
e.stopPropagation();
|
12999
13011
|
setOpenActionHeader(!openActionHeader);
|
@@ -13325,9 +13337,9 @@ var ComparingPlans = (props) => {
|
|
13325
13337
|
};
|
13326
13338
|
|
13327
13339
|
// blocks/pricing/HorizontalPricing.tsx
|
13328
|
-
import React108, { useState as
|
13340
|
+
import React108, { useState as useState50 } from "react";
|
13329
13341
|
var HorizontalPricing = (props) => {
|
13330
|
-
const [selectedCard, setSelectedCard] =
|
13342
|
+
const [selectedCard, setSelectedCard] = useState50("");
|
13331
13343
|
let data = [
|
13332
13344
|
{ title: "basic", price: "$49", cycle: "/mo" },
|
13333
13345
|
{ title: "business", price: "$99", cycle: "/mo" },
|