@chekinapp/ui 0.0.98 → 0.0.100
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/index.cjs +97 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +128 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1827,7 +1827,7 @@ interface PopoverWithTooltipProps {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
declare function PopoverWithTooltip({ children, popoverContent, tooltipContent, open, onOpenChange, popoverContentClassName, tooltipVariant, }: PopoverWithTooltipProps): react_jsx_runtime.JSX.Element;
|
|
1829
1829
|
|
|
1830
|
-
type RadioSize = 'default' | 'm';
|
|
1830
|
+
type RadioSize = 'default' | 'm' | 'l';
|
|
1831
1831
|
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1832
1832
|
interface RadioGroupItemProps extends React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
|
|
1833
1833
|
size?: RadioSize;
|
package/dist/index.d.ts
CHANGED
|
@@ -1827,7 +1827,7 @@ interface PopoverWithTooltipProps {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
declare function PopoverWithTooltip({ children, popoverContent, tooltipContent, open, onOpenChange, popoverContentClassName, tooltipVariant, }: PopoverWithTooltipProps): react_jsx_runtime.JSX.Element;
|
|
1829
1829
|
|
|
1830
|
-
type RadioSize = 'default' | 'm';
|
|
1830
|
+
type RadioSize = 'default' | 'm' | 'l';
|
|
1831
1831
|
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1832
1832
|
interface RadioGroupItemProps extends React$1.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
|
|
1833
1833
|
size?: RadioSize;
|
package/dist/index.js
CHANGED
|
@@ -7135,11 +7135,13 @@ var RadioGroup2 = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7135
7135
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
7136
7136
|
var radioSizeClasses = {
|
|
7137
7137
|
default: "h-4 w-4",
|
|
7138
|
-
m: "h-5 w-5"
|
|
7138
|
+
m: "h-5 w-5",
|
|
7139
|
+
l: "h-6 w-6"
|
|
7139
7140
|
};
|
|
7140
7141
|
var indicatorSizeClasses = {
|
|
7141
7142
|
default: "h-2 w-2",
|
|
7142
|
-
m: "h-2.5 w-2.5"
|
|
7143
|
+
m: "h-2.5 w-2.5",
|
|
7144
|
+
l: "h-3 w-3"
|
|
7143
7145
|
};
|
|
7144
7146
|
var RadioGroupItem = React25.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ jsx83(
|
|
7145
7147
|
RadioGroupPrimitive.Item,
|
|
@@ -8832,7 +8834,7 @@ var VALUE_PART = 1;
|
|
|
8832
8834
|
var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
|
|
8833
8835
|
|
|
8834
8836
|
// src/signature-canvas/SignatureCanvas.tsx
|
|
8835
|
-
import { forwardRef as forwardRef41, useEffect as useEffect29, useRef as useRef21 } from "react";
|
|
8837
|
+
import { forwardRef as forwardRef41, useEffect as useEffect29, useRef as useRef21, useState as useState32, useCallback as useCallback24 } from "react";
|
|
8836
8838
|
import { Trans, useTranslation as useTranslation17 } from "react-i18next";
|
|
8837
8839
|
import ReactSignatureCanvas from "react-signature-pad-wrapper";
|
|
8838
8840
|
|
|
@@ -8850,21 +8852,37 @@ var sign_finger_default = SvgSignFinger;
|
|
|
8850
8852
|
|
|
8851
8853
|
// src/signature-canvas/SignatureCanvas.tsx
|
|
8852
8854
|
import { jsx as jsx107, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
8853
|
-
var CANVAS_PROPS = {
|
|
8854
|
-
width: "250px",
|
|
8855
|
-
height: "174px"
|
|
8856
|
-
};
|
|
8857
8855
|
var SIGNATURE_PROPS = {
|
|
8858
8856
|
penColor: "#161643",
|
|
8859
8857
|
minWidth: 1.5,
|
|
8860
8858
|
maxWidth: 1.5,
|
|
8861
8859
|
dotSize: 1
|
|
8862
8860
|
};
|
|
8861
|
+
var ASPECT_RATIO = 330 / 190;
|
|
8863
8862
|
var SignatureCanvas = forwardRef41(
|
|
8864
8863
|
({ onClear, hasSignature, onEnd, onEnable, className, enabled }, ref) => {
|
|
8865
8864
|
const { t } = useTranslation17();
|
|
8866
8865
|
const internalRef = useRef21(null);
|
|
8866
|
+
const containerRef = useRef21(null);
|
|
8867
8867
|
const combinedRef = useCombinedRef(ref, internalRef);
|
|
8868
|
+
const [size, setSize] = useState32({ width: 330, height: 190 });
|
|
8869
|
+
const calculateSize = useCallback24((containerWidth) => {
|
|
8870
|
+
const width = Math.min(containerWidth, 646);
|
|
8871
|
+
const height = Math.round(width / ASPECT_RATIO);
|
|
8872
|
+
setSize({ width, height });
|
|
8873
|
+
}, []);
|
|
8874
|
+
useEffect29(() => {
|
|
8875
|
+
const container = containerRef.current;
|
|
8876
|
+
if (!container) return;
|
|
8877
|
+
const observer = new ResizeObserver((entries) => {
|
|
8878
|
+
const entry = entries[0];
|
|
8879
|
+
if (entry) {
|
|
8880
|
+
calculateSize(entry.contentRect.width);
|
|
8881
|
+
}
|
|
8882
|
+
});
|
|
8883
|
+
observer.observe(container);
|
|
8884
|
+
return () => observer.disconnect();
|
|
8885
|
+
}, [calculateSize]);
|
|
8868
8886
|
useEffect29(() => {
|
|
8869
8887
|
if (!onEnd) return;
|
|
8870
8888
|
const signPad = internalRef.current?.instance;
|
|
@@ -8873,73 +8891,85 @@ var SignatureCanvas = forwardRef41(
|
|
|
8873
8891
|
signPad?.removeEventListener("endStroke", onEnd);
|
|
8874
8892
|
};
|
|
8875
8893
|
}, [onEnd]);
|
|
8876
|
-
return /* @__PURE__ */ jsxs66(
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
"
|
|
8884
|
-
"cursor-pointer select-none"
|
|
8885
|
-
),
|
|
8886
|
-
onClick: onEnable,
|
|
8887
|
-
"data-testid": "signature-placeholder",
|
|
8888
|
-
children: [
|
|
8889
|
-
/* @__PURE__ */ jsx107(SvgIcon, { as: sign_finger_default, size: 41, className: "w-[37px] opacity-[0.55]" }),
|
|
8890
|
-
/* @__PURE__ */ jsx107(
|
|
8891
|
-
"span",
|
|
8892
|
-
{
|
|
8893
|
-
className: cn(
|
|
8894
|
-
"mx-auto mt-2 max-w-[154px] break-words text-center text-sm font-medium uppercase",
|
|
8895
|
-
"text-[var(--signature-canvas-placeholder-text)] opacity-[0.55]"
|
|
8896
|
-
),
|
|
8897
|
-
children: /* @__PURE__ */ jsx107(Trans, { i18nKey: "signature_placeholder_text" })
|
|
8898
|
-
}
|
|
8899
|
-
)
|
|
8900
|
-
]
|
|
8901
|
-
}
|
|
8902
|
-
),
|
|
8903
|
-
/* @__PURE__ */ jsx107(
|
|
8904
|
-
"div",
|
|
8905
|
-
{
|
|
8906
|
-
className: cn(
|
|
8907
|
-
"inline-flex h-[174px] w-[250px] cursor-pointer justify-center rounded border",
|
|
8908
|
-
"border-[var(--signature-canvas-border)] shadow-[var(--signature-canvas-shadow)]",
|
|
8909
|
-
"box-border max-[320px]:overflow-hidden"
|
|
8910
|
-
),
|
|
8911
|
-
children: /* @__PURE__ */ jsx107(
|
|
8912
|
-
ReactSignatureCanvas,
|
|
8894
|
+
return /* @__PURE__ */ jsxs66(
|
|
8895
|
+
"div",
|
|
8896
|
+
{
|
|
8897
|
+
ref: containerRef,
|
|
8898
|
+
className: cn("relative flex w-full flex-col items-center", className),
|
|
8899
|
+
children: [
|
|
8900
|
+
!enabled && /* @__PURE__ */ jsxs66(
|
|
8901
|
+
"button",
|
|
8913
8902
|
{
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8903
|
+
type: "button",
|
|
8904
|
+
className: cn(
|
|
8905
|
+
"absolute left-1/2 top-0 z-10 flex -translate-x-1/2 flex-col items-center",
|
|
8906
|
+
"justify-center rounded-xl border-2 border-[var(--signature-canvas-border)] bg-transparent",
|
|
8907
|
+
"cursor-pointer select-none"
|
|
8908
|
+
),
|
|
8909
|
+
style: { width: size.width, height: size.height },
|
|
8910
|
+
onClick: onEnable,
|
|
8911
|
+
"data-testid": "signature-placeholder",
|
|
8912
|
+
children: [
|
|
8913
|
+
/* @__PURE__ */ jsx107(SvgIcon, { as: sign_finger_default, size: 41, className: "w-[37px] opacity-55" }),
|
|
8914
|
+
/* @__PURE__ */ jsx107(
|
|
8915
|
+
"span",
|
|
8916
|
+
{
|
|
8917
|
+
className: cn(
|
|
8918
|
+
"mx-auto mt-4 max-w-[200px] break-words text-center text-base font-medium",
|
|
8919
|
+
"text-[var(--signature-canvas-placeholder-text)] opacity-55"
|
|
8920
|
+
),
|
|
8921
|
+
children: /* @__PURE__ */ jsx107(Trans, { i18nKey: "tap_here_to_sign" })
|
|
8922
|
+
}
|
|
8923
|
+
)
|
|
8924
|
+
]
|
|
8918
8925
|
}
|
|
8919
|
-
)
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
/* @__PURE__ */ jsx107(
|
|
8923
|
-
"div",
|
|
8924
|
-
{
|
|
8925
|
-
className: cn("text-right", {
|
|
8926
|
-
invisible: !enabled || !hasSignature
|
|
8927
|
-
}),
|
|
8928
|
-
children: /* @__PURE__ */ jsx107(
|
|
8929
|
-
Button,
|
|
8926
|
+
),
|
|
8927
|
+
/* @__PURE__ */ jsx107(
|
|
8928
|
+
"div",
|
|
8930
8929
|
{
|
|
8931
|
-
variant: "link",
|
|
8932
8930
|
className: cn(
|
|
8933
|
-
"
|
|
8934
|
-
"
|
|
8931
|
+
"inline-flex cursor-pointer justify-center rounded-xl border-2",
|
|
8932
|
+
"border-[var(--signature-canvas-border)] bg-[var(--signature-canvas-bg)]",
|
|
8933
|
+
{ hidden: !enabled }
|
|
8935
8934
|
),
|
|
8936
|
-
|
|
8937
|
-
children:
|
|
8935
|
+
style: { width: size.width, height: size.height },
|
|
8936
|
+
children: /* @__PURE__ */ jsx107(
|
|
8937
|
+
ReactSignatureCanvas,
|
|
8938
|
+
{
|
|
8939
|
+
ref: combinedRef,
|
|
8940
|
+
"data-testid": "canvas",
|
|
8941
|
+
options: SIGNATURE_PROPS,
|
|
8942
|
+
canvasProps: {
|
|
8943
|
+
style: { width: `${size.width}px`, height: `${size.height}px` }
|
|
8944
|
+
}
|
|
8945
|
+
}
|
|
8946
|
+
)
|
|
8947
|
+
}
|
|
8948
|
+
),
|
|
8949
|
+
/* @__PURE__ */ jsx107(
|
|
8950
|
+
"div",
|
|
8951
|
+
{
|
|
8952
|
+
className: cn("w-full text-right", {
|
|
8953
|
+
invisible: !enabled || !hasSignature
|
|
8954
|
+
}),
|
|
8955
|
+
style: { maxWidth: size.width },
|
|
8956
|
+
children: /* @__PURE__ */ jsx107(
|
|
8957
|
+
Button,
|
|
8958
|
+
{
|
|
8959
|
+
variant: "link",
|
|
8960
|
+
className: cn(
|
|
8961
|
+
"ml-auto mt-2 h-[30px] min-w-[70px] select-none rounded-sm px-2 py-0.5 text-right",
|
|
8962
|
+
"text-xs uppercase hover:opacity-[0.88] active:opacity-100"
|
|
8963
|
+
),
|
|
8964
|
+
onClick: onClear,
|
|
8965
|
+
children: t("clear")
|
|
8966
|
+
}
|
|
8967
|
+
)
|
|
8938
8968
|
}
|
|
8939
8969
|
)
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8970
|
+
]
|
|
8971
|
+
}
|
|
8972
|
+
);
|
|
8943
8973
|
}
|
|
8944
8974
|
);
|
|
8945
8975
|
SignatureCanvas.displayName = "SignatureCanvas";
|
|
@@ -9963,11 +9993,11 @@ function TimelineDescription({ className, asChild, ...props }) {
|
|
|
9963
9993
|
import { Toaster, toast as toast2 } from "sonner";
|
|
9964
9994
|
|
|
9965
9995
|
// src/toaster/useUpdateToast.ts
|
|
9966
|
-
import { useCallback as
|
|
9996
|
+
import { useCallback as useCallback26, useRef as useRef22 } from "react";
|
|
9967
9997
|
import { toast } from "sonner";
|
|
9968
9998
|
function useUpdateToast({ id }) {
|
|
9969
9999
|
const toastIdRef = useRef22("");
|
|
9970
|
-
const getToastOptions =
|
|
10000
|
+
const getToastOptions = useCallback26(
|
|
9971
10001
|
(options) => ({
|
|
9972
10002
|
id: toastIdRef.current,
|
|
9973
10003
|
dismissible: false,
|
|
@@ -10312,7 +10342,7 @@ function UploadedFilesList({
|
|
|
10312
10342
|
}
|
|
10313
10343
|
|
|
10314
10344
|
// src/vertical-tabs/VerticalTabs.tsx
|
|
10315
|
-
import { useState as
|
|
10345
|
+
import { useState as useState34 } from "react";
|
|
10316
10346
|
import { jsx as jsx133, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
10317
10347
|
function getKey(index, key) {
|
|
10318
10348
|
return `${key || "step"}_${index}`;
|
|
@@ -10324,7 +10354,7 @@ function VerticalTabs({
|
|
|
10324
10354
|
className
|
|
10325
10355
|
}) {
|
|
10326
10356
|
const defaultValue = getKey(0, stepKey);
|
|
10327
|
-
const [value, setValue] =
|
|
10357
|
+
const [value, setValue] = useState34(defaultValue);
|
|
10328
10358
|
const hasImages = steps.every((step) => step.images?.length);
|
|
10329
10359
|
return /* @__PURE__ */ jsxs81(
|
|
10330
10360
|
"div",
|
|
@@ -10483,7 +10513,7 @@ function VideoModal({
|
|
|
10483
10513
|
}
|
|
10484
10514
|
|
|
10485
10515
|
// src/video-player/VideoPlayer.tsx
|
|
10486
|
-
import { useEffect as useEffect33, useRef as useRef24, useState as
|
|
10516
|
+
import { useEffect as useEffect33, useRef as useRef24, useState as useState35 } from "react";
|
|
10487
10517
|
import { useTranslation as useTranslation22 } from "react-i18next";
|
|
10488
10518
|
import {
|
|
10489
10519
|
Loader2 as Loader23,
|
|
@@ -10510,15 +10540,15 @@ function VideoPlayer({
|
|
|
10510
10540
|
const videoRef = useRef24(null);
|
|
10511
10541
|
const iframeRef = useRef24(null);
|
|
10512
10542
|
const containerRef = useRef24(null);
|
|
10513
|
-
const [isPlaying, setIsPlaying] =
|
|
10514
|
-
const [isMuted, setIsMuted] =
|
|
10515
|
-
const [currentTime, setCurrentTime] =
|
|
10516
|
-
const [duration, setDuration] =
|
|
10517
|
-
const [isFullScreenMode, setIsFullScreenMode] =
|
|
10518
|
-
const [isLoading, setIsLoading] =
|
|
10519
|
-
const [videoSource, setVideoSource] =
|
|
10520
|
-
const [youtubeEmbedUrl, setYoutubeEmbedUrl] =
|
|
10521
|
-
const [vimeoEmbedUrl, setVimeoEmbedUrl] =
|
|
10543
|
+
const [isPlaying, setIsPlaying] = useState35(false);
|
|
10544
|
+
const [isMuted, setIsMuted] = useState35(false);
|
|
10545
|
+
const [currentTime, setCurrentTime] = useState35(0);
|
|
10546
|
+
const [duration, setDuration] = useState35(0);
|
|
10547
|
+
const [isFullScreenMode, setIsFullScreenMode] = useState35(isFullScreen);
|
|
10548
|
+
const [isLoading, setIsLoading] = useState35(true);
|
|
10549
|
+
const [videoSource, setVideoSource] = useState35("file");
|
|
10550
|
+
const [youtubeEmbedUrl, setYoutubeEmbedUrl] = useState35("");
|
|
10551
|
+
const [vimeoEmbedUrl, setVimeoEmbedUrl] = useState35("");
|
|
10522
10552
|
useClickEscape({ enabled: isFullScreenMode, onClick: onClose });
|
|
10523
10553
|
useEffect33(() => {
|
|
10524
10554
|
const youtubeRegex = /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/;
|
|
@@ -10802,11 +10832,11 @@ function VideoPlayer({
|
|
|
10802
10832
|
import {
|
|
10803
10833
|
forwardRef as forwardRef54,
|
|
10804
10834
|
memo as memo7,
|
|
10805
|
-
useCallback as
|
|
10835
|
+
useCallback as useCallback28,
|
|
10806
10836
|
useImperativeHandle,
|
|
10807
10837
|
useMemo as useMemo7,
|
|
10808
10838
|
useRef as useRef25,
|
|
10809
|
-
useState as
|
|
10839
|
+
useState as useState36
|
|
10810
10840
|
} from "react";
|
|
10811
10841
|
import { isFirefox, isMobile as isMobile2 } from "react-device-detect";
|
|
10812
10842
|
import ReactWebcam from "react-webcam";
|
|
@@ -10861,7 +10891,7 @@ async function compressImage(image) {
|
|
|
10861
10891
|
}
|
|
10862
10892
|
|
|
10863
10893
|
// src/webcam/useErrorHandler.ts
|
|
10864
|
-
import { useCallback as
|
|
10894
|
+
import { useCallback as useCallback27 } from "react";
|
|
10865
10895
|
import { useTranslation as useTranslation23 } from "react-i18next";
|
|
10866
10896
|
import { isSafari as isSafari2 } from "react-device-detect";
|
|
10867
10897
|
|
|
@@ -11027,7 +11057,7 @@ var GET_USER_MEDIA_ERROR = "getUserMedia is not implemented in this browser";
|
|
|
11027
11057
|
function useErrorHandler({ onError }) {
|
|
11028
11058
|
const { t } = useTranslation23();
|
|
11029
11059
|
const handleError = useEvent(onError);
|
|
11030
|
-
const handleUserMediaError =
|
|
11060
|
+
const handleUserMediaError = useCallback27(
|
|
11031
11061
|
(error) => {
|
|
11032
11062
|
console.error(error);
|
|
11033
11063
|
let errorText = "";
|
|
@@ -11122,10 +11152,10 @@ var Webcam = memo7(
|
|
|
11122
11152
|
onError,
|
|
11123
11153
|
...props
|
|
11124
11154
|
}, ref) => {
|
|
11125
|
-
const [minScreenshotHeight, setMinScreenshotHeight] =
|
|
11126
|
-
const [minScreenshotWidth, setMinScreenshotWidth] =
|
|
11127
|
-
const [useReducedConstraints, setUseReducedConstraints] =
|
|
11128
|
-
const [numberOfCameras, setNumberOfCameras] =
|
|
11155
|
+
const [minScreenshotHeight, setMinScreenshotHeight] = useState36();
|
|
11156
|
+
const [minScreenshotWidth, setMinScreenshotWidth] = useState36();
|
|
11157
|
+
const [useReducedConstraints, setUseReducedConstraints] = useState36(false);
|
|
11158
|
+
const [numberOfCameras, setNumberOfCameras] = useState36(0);
|
|
11129
11159
|
const constraints = useMemo7(() => {
|
|
11130
11160
|
if (videoConstraints) {
|
|
11131
11161
|
return videoConstraints;
|
|
@@ -11157,7 +11187,7 @@ var Webcam = memo7(
|
|
|
11157
11187
|
onError(errorDetails);
|
|
11158
11188
|
}
|
|
11159
11189
|
});
|
|
11160
|
-
const handleUserMediaErrorWithFallback =
|
|
11190
|
+
const handleUserMediaErrorWithFallback = useCallback28(
|
|
11161
11191
|
(error) => {
|
|
11162
11192
|
if (error instanceof DOMException && error.name === "OverconstrainedError" && !useReducedConstraints && !videoConstraints) {
|
|
11163
11193
|
console.warn("Camera constraints failed, trying reduced constraints:", error);
|
|
@@ -11207,7 +11237,7 @@ var Webcam = memo7(
|
|
|
11207
11237
|
...webcamRef.current
|
|
11208
11238
|
})
|
|
11209
11239
|
);
|
|
11210
|
-
const handleUserMediaSuccess =
|
|
11240
|
+
const handleUserMediaSuccess = useCallback28(
|
|
11211
11241
|
(stream) => {
|
|
11212
11242
|
if (!isMobile2) {
|
|
11213
11243
|
const track = stream.getVideoTracks()[0];
|
|
@@ -11298,17 +11328,17 @@ Webcam.displayName = "Webcam";
|
|
|
11298
11328
|
|
|
11299
11329
|
// src/mobile-webcam/MobileWebcam.tsx
|
|
11300
11330
|
import { Camera, ChevronLeft as ChevronLeft4 } from "lucide-react";
|
|
11301
|
-
import { forwardRef as forwardRef55, useCallback as
|
|
11331
|
+
import { forwardRef as forwardRef55, useCallback as useCallback30 } from "react";
|
|
11302
11332
|
import { createPortal } from "react-dom";
|
|
11303
11333
|
import { useTranslation as useTranslation25 } from "react-i18next";
|
|
11304
11334
|
|
|
11305
11335
|
// src/mobile-webcam/DeviceCamera/DeviceCamera.tsx
|
|
11306
|
-
import { useCallback as
|
|
11336
|
+
import { useCallback as useCallback29 } from "react";
|
|
11307
11337
|
import { useTranslation as useTranslation24 } from "react-i18next";
|
|
11308
11338
|
import { jsx as jsx137, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
11309
11339
|
function DeviceCamera({ onChange, facingMode, className }) {
|
|
11310
11340
|
const { t } = useTranslation24();
|
|
11311
|
-
const handleNativeScreenshot =
|
|
11341
|
+
const handleNativeScreenshot = useCallback29(
|
|
11312
11342
|
(event) => {
|
|
11313
11343
|
const file = event.target.files?.[0];
|
|
11314
11344
|
onChange(file ? compressImage(file) : void 0);
|
|
@@ -11324,7 +11354,7 @@ function DeviceCamera({ onChange, facingMode, className }) {
|
|
|
11324
11354
|
),
|
|
11325
11355
|
children: [
|
|
11326
11356
|
/* @__PURE__ */ jsx137("div", { children: t("camera_errors.experiencing_camera_issues") }),
|
|
11327
|
-
/* @__PURE__ */ jsxs85("label", { className: "text-[16px] font-semibold uppercase leading-6
|
|
11357
|
+
/* @__PURE__ */ jsxs85("label", { className: "text-[16px] font-semibold uppercase leading-6", children: [
|
|
11328
11358
|
t("open_devices_camera"),
|
|
11329
11359
|
/* @__PURE__ */ jsx137(
|
|
11330
11360
|
"input",
|
|
@@ -11356,7 +11386,7 @@ var MobileWebcam = forwardRef55(
|
|
|
11356
11386
|
({ onScreenshot, onBack, title, text, disabled, className, ...props }, ref) => {
|
|
11357
11387
|
const rootElement = getDocument()?.body;
|
|
11358
11388
|
const { t } = useTranslation25();
|
|
11359
|
-
const handleNativeScreenshot =
|
|
11389
|
+
const handleNativeScreenshot = useCallback30(
|
|
11360
11390
|
(photo) => onScreenshot({ isNative: true, photo }),
|
|
11361
11391
|
[onScreenshot]
|
|
11362
11392
|
);
|
|
@@ -18054,7 +18084,7 @@ AirbnbPhoneField.displayName = "AirbnbPhoneField";
|
|
|
18054
18084
|
import * as React72 from "react";
|
|
18055
18085
|
import { ChevronDown as ChevronDown6, Search as Search3 } from "lucide-react";
|
|
18056
18086
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
18057
|
-
import { useCallback as
|
|
18087
|
+
import { useCallback as useCallback50 } from "react";
|
|
18058
18088
|
import { jsx as jsx179, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
18059
18089
|
var ROW_HEIGHT = 48;
|
|
18060
18090
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
@@ -18133,7 +18163,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
18133
18163
|
isDisabled: !open || isMobile3
|
|
18134
18164
|
});
|
|
18135
18165
|
const handleOnOpenChange = useEvent(onOpenChange);
|
|
18136
|
-
const setSelectOpen =
|
|
18166
|
+
const setSelectOpen = useCallback50(
|
|
18137
18167
|
(nextOpen, options2) => {
|
|
18138
18168
|
setOpen(nextOpen);
|
|
18139
18169
|
handleOnOpenChange?.(nextOpen);
|