@chekinapp/ui 0.0.45 → 0.0.47
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 +626 -647
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -17
- package/dist/index.d.ts +6 -17
- package/dist/index.js +540 -560
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5767,42 +5767,9 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
5767
5767
|
] });
|
|
5768
5768
|
}
|
|
5769
5769
|
|
|
5770
|
-
// src/loader/Loader.tsx
|
|
5771
|
-
import { Loader2 as Loader22 } from "lucide-react";
|
|
5772
|
-
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
5773
|
-
import { jsx as jsx72, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5774
|
-
function Loader({
|
|
5775
|
-
size = "md",
|
|
5776
|
-
text,
|
|
5777
|
-
className = "",
|
|
5778
|
-
showText = true,
|
|
5779
|
-
variant = "primary"
|
|
5780
|
-
}) {
|
|
5781
|
-
const { t } = useTranslation15();
|
|
5782
|
-
const sizeClasses3 = {
|
|
5783
|
-
sm: "h-4 w-4",
|
|
5784
|
-
md: "h-8 w-8",
|
|
5785
|
-
lg: "h-12 w-12"
|
|
5786
|
-
};
|
|
5787
|
-
const textSizeClasses = {
|
|
5788
|
-
sm: "text-xs",
|
|
5789
|
-
md: "text-sm",
|
|
5790
|
-
lg: "text-base"
|
|
5791
|
-
};
|
|
5792
|
-
const variantClasses = {
|
|
5793
|
-
primary: "text-[#4f46e5]",
|
|
5794
|
-
secondary: "text-[#475569]",
|
|
5795
|
-
ghost: "text-[#94a3b8]"
|
|
5796
|
-
};
|
|
5797
|
-
return /* @__PURE__ */ jsxs45("div", { className: cn("flex flex-col items-center justify-center gap-2", className), children: [
|
|
5798
|
-
/* @__PURE__ */ jsx72("div", { className: cn("animate-spin", sizeClasses3[size], variantClasses[variant]), children: /* @__PURE__ */ jsx72(Loader22, { className: "h-full w-full" }) }),
|
|
5799
|
-
showText && /* @__PURE__ */ jsx72("p", { className: cn(textSizeClasses[size], "font-medium text-[#475569]"), children: text || t("loading") })
|
|
5800
|
-
] });
|
|
5801
|
-
}
|
|
5802
|
-
|
|
5803
5770
|
// src/metric-card/MetricCard.tsx
|
|
5804
5771
|
import { CircleQuestionMark as CircleQuestionMark2, TrendingDown, TrendingUp } from "lucide-react";
|
|
5805
|
-
import { jsx as
|
|
5772
|
+
import { jsx as jsx72, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5806
5773
|
var metricCardVariantClasses = {
|
|
5807
5774
|
blue: "bg-[linear-gradient(122deg,#e6f0ff_36.37%,#f6f9ff_86.4%)] text-[#385cf8] [&_[data-slot=metric-card-icon]]:bg-[#dbeafe]",
|
|
5808
5775
|
green: "bg-[linear-gradient(122deg,#ddfbf4_36.37%,#f5fefc_86.4%)] text-[#2bc29f] [&_[data-slot=metric-card-icon]]:bg-[#cff9ef]",
|
|
@@ -5820,7 +5787,7 @@ function MetricCard({
|
|
|
5820
5787
|
loading = false,
|
|
5821
5788
|
className
|
|
5822
5789
|
}) {
|
|
5823
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsxs45(
|
|
5824
5791
|
"div",
|
|
5825
5792
|
{
|
|
5826
5793
|
className: cn(
|
|
@@ -5830,7 +5797,7 @@ function MetricCard({
|
|
|
5830
5797
|
className
|
|
5831
5798
|
),
|
|
5832
5799
|
children: [
|
|
5833
|
-
/* @__PURE__ */
|
|
5800
|
+
/* @__PURE__ */ jsx72(
|
|
5834
5801
|
"div",
|
|
5835
5802
|
{
|
|
5836
5803
|
"data-slot": "metric-card-icon",
|
|
@@ -5838,22 +5805,22 @@ function MetricCard({
|
|
|
5838
5805
|
children: icon
|
|
5839
5806
|
}
|
|
5840
5807
|
),
|
|
5841
|
-
/* @__PURE__ */
|
|
5842
|
-
/* @__PURE__ */
|
|
5843
|
-
/* @__PURE__ */
|
|
5844
|
-
tooltip && /* @__PURE__ */
|
|
5808
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex flex-1 flex-col gap-4", children: [
|
|
5809
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-1", children: [
|
|
5810
|
+
/* @__PURE__ */ jsx72("h4", { className: "whitespace-nowrap text-base font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: title }),
|
|
5811
|
+
tooltip && /* @__PURE__ */ jsx72(Tooltip, { side: "right", content: tooltip, contentClassName: "max-w-64", children: /* @__PURE__ */ jsx72(
|
|
5845
5812
|
"button",
|
|
5846
5813
|
{
|
|
5847
5814
|
type: "button",
|
|
5848
5815
|
className: "inline-flex text-[var(--chekin-color-gray-1)]",
|
|
5849
5816
|
"aria-label": tooltip,
|
|
5850
|
-
children: /* @__PURE__ */
|
|
5817
|
+
children: /* @__PURE__ */ jsx72(CircleQuestionMark2, { className: "h-4 w-4" })
|
|
5851
5818
|
}
|
|
5852
5819
|
) })
|
|
5853
5820
|
] }),
|
|
5854
|
-
/* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5856
|
-
!!percentage && /* @__PURE__ */
|
|
5821
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between gap-2", children: [
|
|
5822
|
+
/* @__PURE__ */ jsx72("div", { className: "text-2xl font-bold leading-6", children: value }),
|
|
5823
|
+
!!percentage && /* @__PURE__ */ jsxs45(
|
|
5857
5824
|
"div",
|
|
5858
5825
|
{
|
|
5859
5826
|
className: cn(
|
|
@@ -5861,7 +5828,7 @@ function MetricCard({
|
|
|
5861
5828
|
percentage < 0 && "text-[var(--chekin-color-brand-red)]"
|
|
5862
5829
|
),
|
|
5863
5830
|
children: [
|
|
5864
|
-
percentage < 0 ? /* @__PURE__ */
|
|
5831
|
+
percentage < 0 ? /* @__PURE__ */ jsx72(TrendingDown, {}) : /* @__PURE__ */ jsx72(TrendingUp, {}),
|
|
5865
5832
|
percentage,
|
|
5866
5833
|
"%"
|
|
5867
5834
|
]
|
|
@@ -5886,7 +5853,7 @@ var METRIC_CARD_VARIANTS = {
|
|
|
5886
5853
|
// src/modal/Modal.tsx
|
|
5887
5854
|
import { forwardRef as forwardRef31, useRef as useRef14 } from "react";
|
|
5888
5855
|
import { X as X5 } from "lucide-react";
|
|
5889
|
-
import { jsx as
|
|
5856
|
+
import { jsx as jsx73, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5890
5857
|
var preventDefault = (event) => {
|
|
5891
5858
|
event.preventDefault();
|
|
5892
5859
|
};
|
|
@@ -5918,7 +5885,7 @@ function Modal({
|
|
|
5918
5885
|
onOpenChange?.(false);
|
|
5919
5886
|
onClose?.();
|
|
5920
5887
|
};
|
|
5921
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsx73(Dialog, { open, onOpenChange, modal, children: /* @__PURE__ */ jsxs46(
|
|
5922
5889
|
DialogContent,
|
|
5923
5890
|
{
|
|
5924
5891
|
ref: contentRef,
|
|
@@ -5937,7 +5904,7 @@ function Modal({
|
|
|
5937
5904
|
lockScroll,
|
|
5938
5905
|
...!text && { "aria-describedby": void 0 },
|
|
5939
5906
|
children: [
|
|
5940
|
-
withCloseButton && /* @__PURE__ */
|
|
5907
|
+
withCloseButton && /* @__PURE__ */ jsx73(
|
|
5941
5908
|
"button",
|
|
5942
5909
|
{
|
|
5943
5910
|
type: "button",
|
|
@@ -5947,14 +5914,14 @@ function Modal({
|
|
|
5947
5914
|
"absolute right-4 top-4 z-10 rounded-full p-1 text-[var(--chekin-color-brand-blue)] hover:bg-[#f4f6f8]"
|
|
5948
5915
|
),
|
|
5949
5916
|
"aria-label": "Close",
|
|
5950
|
-
children: /* @__PURE__ */
|
|
5917
|
+
children: /* @__PURE__ */ jsx73(X5, { className: "h-5 w-5" })
|
|
5951
5918
|
}
|
|
5952
5919
|
),
|
|
5953
|
-
(iconSrc || iconProps?.src) && /* @__PURE__ */
|
|
5954
|
-
title ? /* @__PURE__ */
|
|
5955
|
-
text && /* @__PURE__ */
|
|
5920
|
+
(iconSrc || iconProps?.src) && /* @__PURE__ */ jsx73("div", { className: "modal__icon mx-auto mt-4 select-none", children: /* @__PURE__ */ jsx73("img", { src: iconSrc, alt: iconAlt ?? "", ...iconProps }) }),
|
|
5921
|
+
title ? /* @__PURE__ */ jsx73(DialogTitle, { className: cn("modal__title", "px-6 text-lg font-bold"), children: title }) : /* @__PURE__ */ jsx73(DialogVisuallyHidden, { children: /* @__PURE__ */ jsx73(DialogTitle, { children: "Dialog" }) }),
|
|
5922
|
+
text && /* @__PURE__ */ jsx73(DialogDescription, { className: cn("modal__text", "text-base"), children: text }),
|
|
5956
5923
|
children,
|
|
5957
|
-
buttons && /* @__PURE__ */
|
|
5924
|
+
buttons && /* @__PURE__ */ jsx73(
|
|
5958
5925
|
"div",
|
|
5959
5926
|
{
|
|
5960
5927
|
className: cn(
|
|
@@ -5969,7 +5936,7 @@ function Modal({
|
|
|
5969
5936
|
) });
|
|
5970
5937
|
}
|
|
5971
5938
|
var ModalButton = forwardRef31(
|
|
5972
|
-
({ children, size, className, ...props }, ref) => /* @__PURE__ */
|
|
5939
|
+
({ children, size, className, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
5973
5940
|
Button,
|
|
5974
5941
|
{
|
|
5975
5942
|
ref,
|
|
@@ -5985,6 +5952,105 @@ Modal.displayName = "Modal";
|
|
|
5985
5952
|
|
|
5986
5953
|
// src/modal-loader/ModalLoader.tsx
|
|
5987
5954
|
import { memo as memo4 } from "react";
|
|
5955
|
+
|
|
5956
|
+
// src/circular-loader/CircularLoader.tsx
|
|
5957
|
+
import React21 from "react";
|
|
5958
|
+
import { jsx as jsx74, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5959
|
+
var CircularLoader = React21.memo(
|
|
5960
|
+
({ visible = true, height, width, position, label, className }) => {
|
|
5961
|
+
if (!visible) return null;
|
|
5962
|
+
return /* @__PURE__ */ jsxs47(
|
|
5963
|
+
"div",
|
|
5964
|
+
{
|
|
5965
|
+
className: cn(
|
|
5966
|
+
"main-loader flex flex-col items-center justify-center gap-2",
|
|
5967
|
+
position === "center" && "h-full",
|
|
5968
|
+
className
|
|
5969
|
+
),
|
|
5970
|
+
role: "progressbar",
|
|
5971
|
+
children: [
|
|
5972
|
+
/* @__PURE__ */ jsxs47(
|
|
5973
|
+
"svg",
|
|
5974
|
+
{
|
|
5975
|
+
viewBox: "25 25 50 50",
|
|
5976
|
+
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
5977
|
+
style: {
|
|
5978
|
+
width: toCssSize(width),
|
|
5979
|
+
height: toCssSize(height)
|
|
5980
|
+
},
|
|
5981
|
+
children: [
|
|
5982
|
+
/* @__PURE__ */ jsx74(
|
|
5983
|
+
"circle",
|
|
5984
|
+
{
|
|
5985
|
+
r: "20",
|
|
5986
|
+
cy: "50",
|
|
5987
|
+
cx: "50",
|
|
5988
|
+
className: "cover fill-none stroke-current opacity-5",
|
|
5989
|
+
strokeWidth: "7"
|
|
5990
|
+
}
|
|
5991
|
+
),
|
|
5992
|
+
/* @__PURE__ */ jsxs47(
|
|
5993
|
+
"circle",
|
|
5994
|
+
{
|
|
5995
|
+
r: "20",
|
|
5996
|
+
cy: "50",
|
|
5997
|
+
cx: "50",
|
|
5998
|
+
className: "circle fill-none stroke-current",
|
|
5999
|
+
strokeDasharray: "1 200",
|
|
6000
|
+
strokeDashoffset: "0",
|
|
6001
|
+
strokeLinecap: "round",
|
|
6002
|
+
strokeWidth: "7",
|
|
6003
|
+
children: [
|
|
6004
|
+
/* @__PURE__ */ jsx74(
|
|
6005
|
+
"animateTransform",
|
|
6006
|
+
{
|
|
6007
|
+
attributeName: "transform",
|
|
6008
|
+
dur: "2.25s",
|
|
6009
|
+
from: "0 50 50",
|
|
6010
|
+
repeatCount: "indefinite",
|
|
6011
|
+
to: "360 50 50",
|
|
6012
|
+
type: "rotate"
|
|
6013
|
+
}
|
|
6014
|
+
),
|
|
6015
|
+
/* @__PURE__ */ jsx74(
|
|
6016
|
+
"animate",
|
|
6017
|
+
{
|
|
6018
|
+
attributeName: "stroke-dasharray",
|
|
6019
|
+
calcMode: "spline",
|
|
6020
|
+
dur: "1.8s",
|
|
6021
|
+
keyTimes: "0;0.5;1",
|
|
6022
|
+
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
6023
|
+
repeatCount: "indefinite",
|
|
6024
|
+
values: "1 200;90 200;90 200"
|
|
6025
|
+
}
|
|
6026
|
+
),
|
|
6027
|
+
/* @__PURE__ */ jsx74(
|
|
6028
|
+
"animate",
|
|
6029
|
+
{
|
|
6030
|
+
attributeName: "stroke-dashoffset",
|
|
6031
|
+
calcMode: "spline",
|
|
6032
|
+
dur: "1.8s",
|
|
6033
|
+
keyTimes: "0;0.5;1",
|
|
6034
|
+
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
6035
|
+
repeatCount: "indefinite",
|
|
6036
|
+
values: "0;-35;-125"
|
|
6037
|
+
}
|
|
6038
|
+
)
|
|
6039
|
+
]
|
|
6040
|
+
}
|
|
6041
|
+
)
|
|
6042
|
+
]
|
|
6043
|
+
}
|
|
6044
|
+
),
|
|
6045
|
+
label && /* @__PURE__ */ jsx74("div", { className: "text-sm font-medium text-chekin-gray-1", children: label })
|
|
6046
|
+
]
|
|
6047
|
+
}
|
|
6048
|
+
);
|
|
6049
|
+
}
|
|
6050
|
+
);
|
|
6051
|
+
CircularLoader.displayName = "CircularLoader";
|
|
6052
|
+
|
|
6053
|
+
// src/modal-loader/ModalLoader.tsx
|
|
5988
6054
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
5989
6055
|
var ModalLoader = memo4(({ visible, className }) => /* @__PURE__ */ jsx75(
|
|
5990
6056
|
"div",
|
|
@@ -5994,23 +6060,29 @@ var ModalLoader = memo4(({ visible, className }) => /* @__PURE__ */ jsx75(
|
|
|
5994
6060
|
visible ? "flex" : "hidden",
|
|
5995
6061
|
className
|
|
5996
6062
|
),
|
|
5997
|
-
children: /* @__PURE__ */ jsx75("div", { className: "mb-[60px]", children: /* @__PURE__ */ jsx75(
|
|
6063
|
+
children: /* @__PURE__ */ jsx75("div", { className: "mb-[60px]", children: /* @__PURE__ */ jsx75(
|
|
6064
|
+
CircularLoader,
|
|
6065
|
+
{
|
|
6066
|
+
width: 48,
|
|
6067
|
+
height: 48,
|
|
6068
|
+
className: "[--circular-loader-color:#475569]"
|
|
6069
|
+
}
|
|
6070
|
+
) })
|
|
5998
6071
|
}
|
|
5999
6072
|
));
|
|
6000
6073
|
ModalLoader.displayName = "ModalLoader";
|
|
6001
6074
|
|
|
6002
6075
|
// src/overlay-loader/OverlayLoader.tsx
|
|
6076
|
+
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
6003
6077
|
import { jsx as jsx76, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6004
6078
|
function OverlayLoader({
|
|
6005
6079
|
isLoading,
|
|
6006
6080
|
children,
|
|
6007
|
-
|
|
6008
|
-
loaderText,
|
|
6009
|
-
showText = true,
|
|
6010
|
-
loaderVariant = "primary",
|
|
6081
|
+
label,
|
|
6011
6082
|
className = "",
|
|
6012
6083
|
overlayClassName = ""
|
|
6013
6084
|
}) {
|
|
6085
|
+
const { t } = useTranslation15();
|
|
6014
6086
|
return /* @__PURE__ */ jsxs48("div", { className: cn("relative", className), children: [
|
|
6015
6087
|
children,
|
|
6016
6088
|
isLoading && /* @__PURE__ */ jsx76(
|
|
@@ -6020,15 +6092,7 @@ function OverlayLoader({
|
|
|
6020
6092
|
"absolute inset-0 flex items-center justify-center bg-[rgb(255_255_255_/_0.6)]",
|
|
6021
6093
|
overlayClassName
|
|
6022
6094
|
),
|
|
6023
|
-
children: /* @__PURE__ */ jsx76(
|
|
6024
|
-
Loader,
|
|
6025
|
-
{
|
|
6026
|
-
size: loaderSize,
|
|
6027
|
-
text: loaderText,
|
|
6028
|
-
showText,
|
|
6029
|
-
variant: loaderVariant
|
|
6030
|
-
}
|
|
6031
|
-
)
|
|
6095
|
+
children: /* @__PURE__ */ jsx76(CircularLoader, { width: 48, height: 48, label: label || t("loading") })
|
|
6032
6096
|
}
|
|
6033
6097
|
)
|
|
6034
6098
|
] });
|
|
@@ -6037,14 +6101,14 @@ function OverlayLoader({
|
|
|
6037
6101
|
// src/page-loader/PageLoader.tsx
|
|
6038
6102
|
import { useTranslation as useTranslation16 } from "react-i18next";
|
|
6039
6103
|
import { jsx as jsx77, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6040
|
-
function PageLoader({ className, description,
|
|
6104
|
+
function PageLoader({ className, description, label }) {
|
|
6041
6105
|
const { t } = useTranslation16();
|
|
6042
6106
|
return /* @__PURE__ */ jsx77(
|
|
6043
6107
|
"div",
|
|
6044
6108
|
{
|
|
6045
6109
|
className: cn("flex min-h-[300px] flex-col items-center justify-center", className),
|
|
6046
6110
|
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col items-center rounded-lg border border-[var(--chekin-color-gray-3)] bg-[rgb(255_255_255_/_0.8)] p-8 shadow-sm backdrop-blur-sm", children: [
|
|
6047
|
-
/* @__PURE__ */ jsx77(
|
|
6111
|
+
/* @__PURE__ */ jsx77(CircularLoader, { width: 48, height: 48, label: label || t("loading") }),
|
|
6048
6112
|
/* @__PURE__ */ jsx77("p", { className: "mt-4 max-w-xs text-center text-sm text-[var(--chekin-color-gray-1)]", children: description || t("loading_data_description") })
|
|
6049
6113
|
] })
|
|
6050
6114
|
}
|
|
@@ -6059,7 +6123,7 @@ import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight4, ChevronsLef
|
|
|
6059
6123
|
import { forwardRef as forwardRef33, useId as useId5, useState as useState19 } from "react";
|
|
6060
6124
|
|
|
6061
6125
|
// src/select/components.tsx
|
|
6062
|
-
import * as
|
|
6126
|
+
import * as React22 from "react";
|
|
6063
6127
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6064
6128
|
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6065
6129
|
import { jsx as jsx78, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -6071,7 +6135,7 @@ var selectSizeClassNames = {
|
|
|
6071
6135
|
sm: "text-sm",
|
|
6072
6136
|
md: "text-base"
|
|
6073
6137
|
};
|
|
6074
|
-
var SelectTrigger =
|
|
6138
|
+
var SelectTrigger = React22.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ jsxs50(
|
|
6075
6139
|
SelectPrimitive.Trigger,
|
|
6076
6140
|
{
|
|
6077
6141
|
ref,
|
|
@@ -6098,7 +6162,7 @@ var SelectTrigger = React21.forwardRef(({ className, children, size = "sm", ...p
|
|
|
6098
6162
|
}
|
|
6099
6163
|
));
|
|
6100
6164
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6101
|
-
var SelectScrollUpButton =
|
|
6165
|
+
var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
6102
6166
|
SelectPrimitive.ScrollUpButton,
|
|
6103
6167
|
{
|
|
6104
6168
|
ref,
|
|
@@ -6108,7 +6172,7 @@ var SelectScrollUpButton = React21.forwardRef(({ className, ...props }, ref) =>
|
|
|
6108
6172
|
}
|
|
6109
6173
|
));
|
|
6110
6174
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
6111
|
-
var SelectScrollDownButton =
|
|
6175
|
+
var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
6112
6176
|
SelectPrimitive.ScrollDownButton,
|
|
6113
6177
|
{
|
|
6114
6178
|
ref,
|
|
@@ -6118,7 +6182,7 @@ var SelectScrollDownButton = React21.forwardRef(({ className, ...props }, ref) =
|
|
|
6118
6182
|
}
|
|
6119
6183
|
));
|
|
6120
6184
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
6121
|
-
var SelectContent =
|
|
6185
|
+
var SelectContent = React22.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx78(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs50(
|
|
6122
6186
|
SelectPrimitive.Content,
|
|
6123
6187
|
{
|
|
6124
6188
|
ref,
|
|
@@ -6152,7 +6216,7 @@ var SelectContent = React21.forwardRef(({ className, children, position = "poppe
|
|
|
6152
6216
|
}
|
|
6153
6217
|
) }));
|
|
6154
6218
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
6155
|
-
var SelectLabel =
|
|
6219
|
+
var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
6156
6220
|
SelectPrimitive.Label,
|
|
6157
6221
|
{
|
|
6158
6222
|
ref,
|
|
@@ -6164,7 +6228,7 @@ var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6164
6228
|
}
|
|
6165
6229
|
));
|
|
6166
6230
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
6167
|
-
var SelectItem =
|
|
6231
|
+
var SelectItem = React22.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ jsxs50(
|
|
6168
6232
|
SelectPrimitive.Item,
|
|
6169
6233
|
{
|
|
6170
6234
|
ref,
|
|
@@ -6184,7 +6248,7 @@ var SelectItem = React21.forwardRef(({ className, children, size = "sm", ...prop
|
|
|
6184
6248
|
}
|
|
6185
6249
|
));
|
|
6186
6250
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
6187
|
-
var SelectSeparator =
|
|
6251
|
+
var SelectSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
6188
6252
|
SelectPrimitive.Separator,
|
|
6189
6253
|
{
|
|
6190
6254
|
ref,
|
|
@@ -6594,7 +6658,7 @@ function Pagination({
|
|
|
6594
6658
|
}
|
|
6595
6659
|
|
|
6596
6660
|
// src/popover/Popover.tsx
|
|
6597
|
-
import * as
|
|
6661
|
+
import * as React23 from "react";
|
|
6598
6662
|
import * as RadixPopover from "@radix-ui/react-popover";
|
|
6599
6663
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
6600
6664
|
var Popover = RadixPopover.Root;
|
|
@@ -6602,7 +6666,7 @@ var PopoverTrigger = RadixPopover.Trigger;
|
|
|
6602
6666
|
var PopoverAnchor = RadixPopover.Anchor;
|
|
6603
6667
|
var PopoverPortal = RadixPopover.Portal;
|
|
6604
6668
|
var PopoverClose = RadixPopover.Close;
|
|
6605
|
-
var PopoverContent =
|
|
6669
|
+
var PopoverContent = React23.forwardRef(({ className, sideOffset = 4, align = "center", ...props }, ref) => /* @__PURE__ */ jsx83(RadixPopover.Portal, { children: /* @__PURE__ */ jsx83(
|
|
6606
6670
|
RadixPopover.Content,
|
|
6607
6671
|
{
|
|
6608
6672
|
ref,
|
|
@@ -6692,11 +6756,11 @@ function PopoverWithTooltip({
|
|
|
6692
6756
|
import { forwardRef as forwardRef37 } from "react";
|
|
6693
6757
|
|
|
6694
6758
|
// src/radio-group/RadioGroup.tsx
|
|
6695
|
-
import * as
|
|
6759
|
+
import * as React24 from "react";
|
|
6696
6760
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
6697
6761
|
import { Circle as Circle2 } from "lucide-react";
|
|
6698
6762
|
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
6699
|
-
var RadioGroup2 =
|
|
6763
|
+
var RadioGroup2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx85(
|
|
6700
6764
|
RadioGroupPrimitive.Root,
|
|
6701
6765
|
{
|
|
6702
6766
|
ref,
|
|
@@ -6705,7 +6769,7 @@ var RadioGroup2 = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6705
6769
|
}
|
|
6706
6770
|
));
|
|
6707
6771
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
6708
|
-
var RadioGroupItem =
|
|
6772
|
+
var RadioGroupItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx85(
|
|
6709
6773
|
RadioGroupPrimitive.Item,
|
|
6710
6774
|
{
|
|
6711
6775
|
ref,
|
|
@@ -6926,7 +6990,7 @@ function RatingRadioGroup({
|
|
|
6926
6990
|
}
|
|
6927
6991
|
|
|
6928
6992
|
// src/rating-stars/RatingStars.tsx
|
|
6929
|
-
import * as
|
|
6993
|
+
import * as React25 from "react";
|
|
6930
6994
|
import { Star as Star2 } from "lucide-react";
|
|
6931
6995
|
import { useTranslation as useTranslation18 } from "react-i18next";
|
|
6932
6996
|
import { jsx as jsx90, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
@@ -6946,7 +7010,7 @@ function RatingStars({
|
|
|
6946
7010
|
const { t } = useTranslation18();
|
|
6947
7011
|
const normalizedRating = Math.max(0, Math.min(maxRating, rating));
|
|
6948
7012
|
const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
|
|
6949
|
-
const componentId =
|
|
7013
|
+
const componentId = React25.useId();
|
|
6950
7014
|
const decimal = normalizedRating - Math.floor(normalizedRating);
|
|
6951
7015
|
const partialStarIndex = decimal > 0 ? Math.ceil(normalizedRating) : -1;
|
|
6952
7016
|
const gradientId = `star-gradient-${componentId.replace(/:/g, "")}`;
|
|
@@ -7027,7 +7091,7 @@ function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
|
7027
7091
|
}
|
|
7028
7092
|
|
|
7029
7093
|
// src/search-input/SearchInput.tsx
|
|
7030
|
-
import { Loader2 as
|
|
7094
|
+
import { Loader2 as Loader22, Search as Search2, X as X6 } from "lucide-react";
|
|
7031
7095
|
import { useTranslation as useTranslation19 } from "react-i18next";
|
|
7032
7096
|
import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
7033
7097
|
function SearchInput({
|
|
@@ -7076,7 +7140,7 @@ function SearchInput({
|
|
|
7076
7140
|
),
|
|
7077
7141
|
(loading || onReset) && /* @__PURE__ */ jsxs61("div", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1", children: [
|
|
7078
7142
|
loading && /* @__PURE__ */ jsx93(
|
|
7079
|
-
|
|
7143
|
+
Loader22,
|
|
7080
7144
|
{
|
|
7081
7145
|
"aria-hidden": "true",
|
|
7082
7146
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-2)]"
|
|
@@ -7131,6 +7195,7 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
|
|
|
7131
7195
|
// src/section/Section.tsx
|
|
7132
7196
|
import { forwardRef as forwardRef38 } from "react";
|
|
7133
7197
|
import { CircleHelp } from "lucide-react";
|
|
7198
|
+
import { useTranslation as useTranslation20 } from "react-i18next";
|
|
7134
7199
|
|
|
7135
7200
|
// src/section/constants.ts
|
|
7136
7201
|
var SubSectionSize = /* @__PURE__ */ ((SubSectionSize2) => {
|
|
@@ -7167,42 +7232,53 @@ var Section = forwardRef38(
|
|
|
7167
7232
|
linkContent,
|
|
7168
7233
|
hidden,
|
|
7169
7234
|
size
|
|
7170
|
-
}, ref) =>
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7235
|
+
}, ref) => {
|
|
7236
|
+
const { t } = useTranslation20();
|
|
7237
|
+
return /* @__PURE__ */ jsxs62(
|
|
7238
|
+
"div",
|
|
7239
|
+
{
|
|
7240
|
+
ref,
|
|
7241
|
+
className: cn(
|
|
7242
|
+
"mb-6 box-border flex w-full cursor-default flex-col gap-6 rounded-lg border border-solid border-[var(--chekin-color-gray-3)] bg-white px-6 py-10",
|
|
7243
|
+
loading && "cursor-progress",
|
|
7244
|
+
disabled && "pointer-events-none opacity-50",
|
|
7245
|
+
{ "!hidden": hidden },
|
|
7246
|
+
className
|
|
7247
|
+
),
|
|
7248
|
+
children: [
|
|
7249
|
+
(title || subtitle) && /* @__PURE__ */ jsxs62("div", { className: "flex flex-col gap-2", children: [
|
|
7250
|
+
title && /* @__PURE__ */ jsxs62(
|
|
7251
|
+
"div",
|
|
7252
|
+
{
|
|
7253
|
+
className: cn(
|
|
7254
|
+
"flex max-w-[85%] items-center text-lg font-bold text-[var(--chekin-color-brand-navy)] md:max-w-full",
|
|
7255
|
+
size !== 0 /* L */ && "subsection-title"
|
|
7256
|
+
),
|
|
7257
|
+
children: [
|
|
7258
|
+
title,
|
|
7259
|
+
titleTooltip && /* @__PURE__ */ jsx95("div", { className: "ml-2.5", children: /* @__PURE__ */ jsx95(TooltipInfo, { content: titleTooltip }) }),
|
|
7260
|
+
linkContent && /* @__PURE__ */ jsx95("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
|
|
7261
|
+
]
|
|
7262
|
+
}
|
|
7263
|
+
),
|
|
7264
|
+
subtitle && /* @__PURE__ */ jsxs62("div", { className: "w-full max-w-[720px] md:max-w-full", children: [
|
|
7265
|
+
/* @__PURE__ */ jsx95("div", { className: "inline text-base font-normal text-[var(--chekin-color-gray-1)]", children: subtitle }),
|
|
7266
|
+
subtitleTooltip && /* @__PURE__ */ jsx95("div", { className: "ml-1.5 inline-block align-text-top", children: /* @__PURE__ */ jsx95(TooltipInfo, { content: subtitleTooltip }) })
|
|
7267
|
+
] })
|
|
7268
|
+
] }),
|
|
7269
|
+
loading && showLoader ? /* @__PURE__ */ jsx95(
|
|
7270
|
+
CircularLoader,
|
|
7185
7271
|
{
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
children: [
|
|
7191
|
-
title,
|
|
7192
|
-
titleTooltip && /* @__PURE__ */ jsx95("div", { className: "ml-2.5", children: /* @__PURE__ */ jsx95(TooltipInfo, { content: titleTooltip }) }),
|
|
7193
|
-
linkContent && /* @__PURE__ */ jsx95("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
|
|
7194
|
-
]
|
|
7272
|
+
width: 32,
|
|
7273
|
+
height: 32,
|
|
7274
|
+
label: t("loading"),
|
|
7275
|
+
className: "mx-auto mb-3 mt-2.5"
|
|
7195
7276
|
}
|
|
7196
|
-
)
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
] }),
|
|
7202
|
-
loading && showLoader ? /* @__PURE__ */ jsx95(Loader, { className: "mx-auto mb-3 mt-2.5" }) : children
|
|
7203
|
-
]
|
|
7204
|
-
}
|
|
7205
|
-
)
|
|
7277
|
+
) : children
|
|
7278
|
+
]
|
|
7279
|
+
}
|
|
7280
|
+
);
|
|
7281
|
+
}
|
|
7206
7282
|
);
|
|
7207
7283
|
Section.displayName = "Section";
|
|
7208
7284
|
var SubSection = forwardRef38(
|
|
@@ -7535,7 +7611,7 @@ function SheetDescription({
|
|
|
7535
7611
|
}
|
|
7536
7612
|
|
|
7537
7613
|
// src/sidebar/Sidebar.tsx
|
|
7538
|
-
import * as
|
|
7614
|
+
import * as React26 from "react";
|
|
7539
7615
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
7540
7616
|
import { cva as cva11 } from "class-variance-authority";
|
|
7541
7617
|
import { ArrowLeftFromLineIcon, ArrowRightFromLineIcon } from "lucide-react";
|
|
@@ -7628,7 +7704,7 @@ var SIDEBAR_COOKIE_NAME_DEFAULT = "sidebar_state";
|
|
|
7628
7704
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
7629
7705
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
7630
7706
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
7631
|
-
var SidebarProvider =
|
|
7707
|
+
var SidebarProvider = React26.forwardRef(
|
|
7632
7708
|
({
|
|
7633
7709
|
defaultOpen = true,
|
|
7634
7710
|
open: openProp,
|
|
@@ -7640,10 +7716,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7640
7716
|
...props
|
|
7641
7717
|
}, ref) => {
|
|
7642
7718
|
const isMobile = useIsMobile({ breakpoint: 641 });
|
|
7643
|
-
const [openMobile, setOpenMobile] =
|
|
7644
|
-
const [_open, _setOpen] =
|
|
7719
|
+
const [openMobile, setOpenMobile] = React26.useState(false);
|
|
7720
|
+
const [_open, _setOpen] = React26.useState(defaultOpen);
|
|
7645
7721
|
const open = openProp ?? _open;
|
|
7646
|
-
const setOpen =
|
|
7722
|
+
const setOpen = React26.useCallback(
|
|
7647
7723
|
(value) => {
|
|
7648
7724
|
const openState = typeof value === "function" ? value(open) : value;
|
|
7649
7725
|
if (setOpenProp) {
|
|
@@ -7655,10 +7731,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7655
7731
|
},
|
|
7656
7732
|
[setOpenProp, open, stateName]
|
|
7657
7733
|
);
|
|
7658
|
-
const toggleSidebar =
|
|
7734
|
+
const toggleSidebar = React26.useCallback(() => {
|
|
7659
7735
|
return isMobile ? setOpenMobile((value) => !value) : setOpen((value) => !value);
|
|
7660
7736
|
}, [isMobile, setOpen]);
|
|
7661
|
-
|
|
7737
|
+
React26.useEffect(() => {
|
|
7662
7738
|
const handleKeyDown = (event) => {
|
|
7663
7739
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
7664
7740
|
event.preventDefault();
|
|
@@ -7669,7 +7745,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7669
7745
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7670
7746
|
}, [toggleSidebar]);
|
|
7671
7747
|
const state = open ? "expanded" : "collapsed";
|
|
7672
|
-
const contextValue =
|
|
7748
|
+
const contextValue = React26.useMemo(
|
|
7673
7749
|
() => ({
|
|
7674
7750
|
state,
|
|
7675
7751
|
open,
|
|
@@ -7694,7 +7770,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7694
7770
|
}
|
|
7695
7771
|
);
|
|
7696
7772
|
SidebarProvider.displayName = "SidebarProvider";
|
|
7697
|
-
var Sidebar =
|
|
7773
|
+
var Sidebar = React26.forwardRef(
|
|
7698
7774
|
({
|
|
7699
7775
|
side = "left",
|
|
7700
7776
|
variant = "sidebar",
|
|
@@ -7788,7 +7864,7 @@ var Sidebar = React25.forwardRef(
|
|
|
7788
7864
|
}
|
|
7789
7865
|
);
|
|
7790
7866
|
Sidebar.displayName = "Sidebar";
|
|
7791
|
-
var SidebarTrigger =
|
|
7867
|
+
var SidebarTrigger = React26.forwardRef(({ className, onClick, icon, ...props }, ref) => {
|
|
7792
7868
|
const { toggleSidebar, open, isMobile, openMobile } = useSidebar();
|
|
7793
7869
|
return /* @__PURE__ */ jsxs66(
|
|
7794
7870
|
Button,
|
|
@@ -7815,7 +7891,7 @@ var SidebarTrigger = React25.forwardRef(({ className, onClick, icon, ...props },
|
|
|
7815
7891
|
);
|
|
7816
7892
|
});
|
|
7817
7893
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
7818
|
-
var SidebarRail =
|
|
7894
|
+
var SidebarRail = React26.forwardRef(
|
|
7819
7895
|
({ className, ...props }, ref) => {
|
|
7820
7896
|
const { toggleSidebar } = useSidebar();
|
|
7821
7897
|
return /* @__PURE__ */ jsx102(
|
|
@@ -7841,7 +7917,7 @@ var SidebarRail = React25.forwardRef(
|
|
|
7841
7917
|
}
|
|
7842
7918
|
);
|
|
7843
7919
|
SidebarRail.displayName = "SidebarRail";
|
|
7844
|
-
var SidebarInset =
|
|
7920
|
+
var SidebarInset = React26.forwardRef(
|
|
7845
7921
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7846
7922
|
"main",
|
|
7847
7923
|
{
|
|
@@ -7856,7 +7932,7 @@ var SidebarInset = React25.forwardRef(
|
|
|
7856
7932
|
)
|
|
7857
7933
|
);
|
|
7858
7934
|
SidebarInset.displayName = "SidebarInset";
|
|
7859
|
-
var SidebarInput =
|
|
7935
|
+
var SidebarInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7860
7936
|
Input,
|
|
7861
7937
|
{
|
|
7862
7938
|
ref,
|
|
@@ -7866,7 +7942,7 @@ var SidebarInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
7866
7942
|
}
|
|
7867
7943
|
));
|
|
7868
7944
|
SidebarInput.displayName = "SidebarInput";
|
|
7869
|
-
var SidebarHeader =
|
|
7945
|
+
var SidebarHeader = React26.forwardRef(
|
|
7870
7946
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7871
7947
|
"div",
|
|
7872
7948
|
{
|
|
@@ -7878,7 +7954,7 @@ var SidebarHeader = React25.forwardRef(
|
|
|
7878
7954
|
)
|
|
7879
7955
|
);
|
|
7880
7956
|
SidebarHeader.displayName = "SidebarHeader";
|
|
7881
|
-
var SidebarFooter =
|
|
7957
|
+
var SidebarFooter = React26.forwardRef(
|
|
7882
7958
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7883
7959
|
"div",
|
|
7884
7960
|
{
|
|
@@ -7890,7 +7966,7 @@ var SidebarFooter = React25.forwardRef(
|
|
|
7890
7966
|
)
|
|
7891
7967
|
);
|
|
7892
7968
|
SidebarFooter.displayName = "SidebarFooter";
|
|
7893
|
-
var SidebarSeparator =
|
|
7969
|
+
var SidebarSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7894
7970
|
Separator3,
|
|
7895
7971
|
{
|
|
7896
7972
|
ref,
|
|
@@ -7900,7 +7976,7 @@ var SidebarSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
7900
7976
|
}
|
|
7901
7977
|
));
|
|
7902
7978
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
7903
|
-
var SidebarContent =
|
|
7979
|
+
var SidebarContent = React26.forwardRef(
|
|
7904
7980
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7905
7981
|
"div",
|
|
7906
7982
|
{
|
|
@@ -7915,7 +7991,7 @@ var SidebarContent = React25.forwardRef(
|
|
|
7915
7991
|
)
|
|
7916
7992
|
);
|
|
7917
7993
|
SidebarContent.displayName = "SidebarContent";
|
|
7918
|
-
var SidebarGroup =
|
|
7994
|
+
var SidebarGroup = React26.forwardRef(
|
|
7919
7995
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7920
7996
|
"div",
|
|
7921
7997
|
{
|
|
@@ -7927,7 +8003,7 @@ var SidebarGroup = React25.forwardRef(
|
|
|
7927
8003
|
)
|
|
7928
8004
|
);
|
|
7929
8005
|
SidebarGroup.displayName = "SidebarGroup";
|
|
7930
|
-
var SidebarGroupLabel =
|
|
8006
|
+
var SidebarGroupLabel = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
7931
8007
|
const Comp = asChild ? Slot4 : "div";
|
|
7932
8008
|
return /* @__PURE__ */ jsx102(
|
|
7933
8009
|
Comp,
|
|
@@ -7944,7 +8020,7 @@ var SidebarGroupLabel = React25.forwardRef(({ className, asChild = false, ...pro
|
|
|
7944
8020
|
);
|
|
7945
8021
|
});
|
|
7946
8022
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
7947
|
-
var SidebarGroupAction =
|
|
8023
|
+
var SidebarGroupAction = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
7948
8024
|
const Comp = asChild ? Slot4 : "button";
|
|
7949
8025
|
return /* @__PURE__ */ jsx102(
|
|
7950
8026
|
Comp,
|
|
@@ -7960,7 +8036,7 @@ var SidebarGroupAction = React25.forwardRef(({ className, asChild = false, ...pr
|
|
|
7960
8036
|
);
|
|
7961
8037
|
});
|
|
7962
8038
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
7963
|
-
var SidebarGroupContent =
|
|
8039
|
+
var SidebarGroupContent = React26.forwardRef(
|
|
7964
8040
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7965
8041
|
"div",
|
|
7966
8042
|
{
|
|
@@ -7972,7 +8048,7 @@ var SidebarGroupContent = React25.forwardRef(
|
|
|
7972
8048
|
)
|
|
7973
8049
|
);
|
|
7974
8050
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
7975
|
-
var SidebarMenu =
|
|
8051
|
+
var SidebarMenu = React26.forwardRef(
|
|
7976
8052
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7977
8053
|
"ul",
|
|
7978
8054
|
{
|
|
@@ -7984,7 +8060,7 @@ var SidebarMenu = React25.forwardRef(
|
|
|
7984
8060
|
)
|
|
7985
8061
|
);
|
|
7986
8062
|
SidebarMenu.displayName = "SidebarMenu";
|
|
7987
|
-
var SidebarMenuItem =
|
|
8063
|
+
var SidebarMenuItem = React26.forwardRef(
|
|
7988
8064
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
7989
8065
|
"li",
|
|
7990
8066
|
{
|
|
@@ -8016,7 +8092,7 @@ var sidebarMenuButtonVariants = cva11(
|
|
|
8016
8092
|
}
|
|
8017
8093
|
}
|
|
8018
8094
|
);
|
|
8019
|
-
var SidebarMenuButton =
|
|
8095
|
+
var SidebarMenuButton = React26.forwardRef(
|
|
8020
8096
|
({
|
|
8021
8097
|
asChild = false,
|
|
8022
8098
|
isActive = false,
|
|
@@ -8062,7 +8138,7 @@ var SidebarMenuButton = React25.forwardRef(
|
|
|
8062
8138
|
}
|
|
8063
8139
|
);
|
|
8064
8140
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
8065
|
-
var SidebarMenuAction =
|
|
8141
|
+
var SidebarMenuAction = React26.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
8066
8142
|
const Comp = asChild ? Slot4 : "button";
|
|
8067
8143
|
return /* @__PURE__ */ jsx102(
|
|
8068
8144
|
Comp,
|
|
@@ -8079,7 +8155,7 @@ var SidebarMenuAction = React25.forwardRef(({ className, asChild = false, showOn
|
|
|
8079
8155
|
);
|
|
8080
8156
|
});
|
|
8081
8157
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
8082
|
-
var SidebarMenuBadge =
|
|
8158
|
+
var SidebarMenuBadge = React26.forwardRef(
|
|
8083
8159
|
({ className, ...props }, ref) => {
|
|
8084
8160
|
const { open, isMobile, openMobile } = useSidebar();
|
|
8085
8161
|
const isOpen = isMobile ? openMobile : open;
|
|
@@ -8099,8 +8175,8 @@ var SidebarMenuBadge = React25.forwardRef(
|
|
|
8099
8175
|
}
|
|
8100
8176
|
);
|
|
8101
8177
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
8102
|
-
var SidebarMenuSkeleton =
|
|
8103
|
-
const width =
|
|
8178
|
+
var SidebarMenuSkeleton = React26.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
8179
|
+
const width = React26.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
8104
8180
|
return /* @__PURE__ */ jsxs66(
|
|
8105
8181
|
"div",
|
|
8106
8182
|
{
|
|
@@ -8123,7 +8199,7 @@ var SidebarMenuSkeleton = React25.forwardRef(({ className, showIcon = false, ...
|
|
|
8123
8199
|
);
|
|
8124
8200
|
});
|
|
8125
8201
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
8126
|
-
var SidebarMenuSub =
|
|
8202
|
+
var SidebarMenuSub = React26.forwardRef(
|
|
8127
8203
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx102(
|
|
8128
8204
|
"ul",
|
|
8129
8205
|
{
|
|
@@ -8138,7 +8214,7 @@ var SidebarMenuSub = React25.forwardRef(
|
|
|
8138
8214
|
)
|
|
8139
8215
|
);
|
|
8140
8216
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
8141
|
-
var SidebarMenuSubItem =
|
|
8217
|
+
var SidebarMenuSubItem = React26.forwardRef(
|
|
8142
8218
|
({ ...props }, ref) => /* @__PURE__ */ jsx102("li", { ref, ...props })
|
|
8143
8219
|
);
|
|
8144
8220
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
@@ -8162,7 +8238,7 @@ var sidebarMenuSubButtonVariants = cva11(
|
|
|
8162
8238
|
}
|
|
8163
8239
|
}
|
|
8164
8240
|
);
|
|
8165
|
-
var SidebarMenuSubButton =
|
|
8241
|
+
var SidebarMenuSubButton = React26.forwardRef(
|
|
8166
8242
|
({
|
|
8167
8243
|
asChild = false,
|
|
8168
8244
|
isActive,
|
|
@@ -8191,106 +8267,10 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
8191
8267
|
var VALUE_PART = 1;
|
|
8192
8268
|
var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
|
|
8193
8269
|
|
|
8194
|
-
// src/circular-loader/CircularLoader.tsx
|
|
8195
|
-
import React26 from "react";
|
|
8196
|
-
import { jsx as jsx103, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
8197
|
-
var CircularLoader = React26.memo(
|
|
8198
|
-
({ visible = true, height, width, position, label, className }) => {
|
|
8199
|
-
if (!visible) return null;
|
|
8200
|
-
return /* @__PURE__ */ jsxs67(
|
|
8201
|
-
"div",
|
|
8202
|
-
{
|
|
8203
|
-
className: cn(
|
|
8204
|
-
"main-loader flex flex-col items-center justify-center gap-2",
|
|
8205
|
-
position === "center" && "h-full",
|
|
8206
|
-
className
|
|
8207
|
-
),
|
|
8208
|
-
children: [
|
|
8209
|
-
/* @__PURE__ */ jsxs67(
|
|
8210
|
-
"svg",
|
|
8211
|
-
{
|
|
8212
|
-
viewBox: "25 25 50 50",
|
|
8213
|
-
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
8214
|
-
style: {
|
|
8215
|
-
width: toCssSize(width),
|
|
8216
|
-
height: toCssSize(height)
|
|
8217
|
-
},
|
|
8218
|
-
children: [
|
|
8219
|
-
/* @__PURE__ */ jsx103(
|
|
8220
|
-
"circle",
|
|
8221
|
-
{
|
|
8222
|
-
r: "20",
|
|
8223
|
-
cy: "50",
|
|
8224
|
-
cx: "50",
|
|
8225
|
-
className: "cover fill-none stroke-current opacity-5",
|
|
8226
|
-
strokeWidth: "7"
|
|
8227
|
-
}
|
|
8228
|
-
),
|
|
8229
|
-
/* @__PURE__ */ jsxs67(
|
|
8230
|
-
"circle",
|
|
8231
|
-
{
|
|
8232
|
-
r: "20",
|
|
8233
|
-
cy: "50",
|
|
8234
|
-
cx: "50",
|
|
8235
|
-
className: "circle fill-none stroke-current",
|
|
8236
|
-
strokeDasharray: "1 200",
|
|
8237
|
-
strokeDashoffset: "0",
|
|
8238
|
-
strokeLinecap: "round",
|
|
8239
|
-
strokeWidth: "7",
|
|
8240
|
-
children: [
|
|
8241
|
-
/* @__PURE__ */ jsx103(
|
|
8242
|
-
"animateTransform",
|
|
8243
|
-
{
|
|
8244
|
-
attributeName: "transform",
|
|
8245
|
-
dur: "2.25s",
|
|
8246
|
-
from: "0 50 50",
|
|
8247
|
-
repeatCount: "indefinite",
|
|
8248
|
-
to: "360 50 50",
|
|
8249
|
-
type: "rotate"
|
|
8250
|
-
}
|
|
8251
|
-
),
|
|
8252
|
-
/* @__PURE__ */ jsx103(
|
|
8253
|
-
"animate",
|
|
8254
|
-
{
|
|
8255
|
-
attributeName: "stroke-dasharray",
|
|
8256
|
-
calcMode: "spline",
|
|
8257
|
-
dur: "1.8s",
|
|
8258
|
-
keyTimes: "0;0.5;1",
|
|
8259
|
-
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
8260
|
-
repeatCount: "indefinite",
|
|
8261
|
-
values: "1 200;90 200;90 200"
|
|
8262
|
-
}
|
|
8263
|
-
),
|
|
8264
|
-
/* @__PURE__ */ jsx103(
|
|
8265
|
-
"animate",
|
|
8266
|
-
{
|
|
8267
|
-
attributeName: "stroke-dashoffset",
|
|
8268
|
-
calcMode: "spline",
|
|
8269
|
-
dur: "1.8s",
|
|
8270
|
-
keyTimes: "0;0.5;1",
|
|
8271
|
-
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
8272
|
-
repeatCount: "indefinite",
|
|
8273
|
-
values: "0;-35;-125"
|
|
8274
|
-
}
|
|
8275
|
-
)
|
|
8276
|
-
]
|
|
8277
|
-
}
|
|
8278
|
-
)
|
|
8279
|
-
]
|
|
8280
|
-
}
|
|
8281
|
-
),
|
|
8282
|
-
label && /* @__PURE__ */ jsx103("div", { className: "text-sm font-medium text-chekin-gray-1", children: label })
|
|
8283
|
-
]
|
|
8284
|
-
}
|
|
8285
|
-
);
|
|
8286
|
-
}
|
|
8287
|
-
);
|
|
8288
|
-
CircularLoader.displayName = "CircularLoader";
|
|
8289
|
-
|
|
8290
8270
|
// src/small-grid-single-item/SmallGridSingleItem.tsx
|
|
8291
8271
|
import { memo as memo5 } from "react";
|
|
8292
8272
|
import { Pencil, Trash2 } from "lucide-react";
|
|
8293
|
-
import { jsx as
|
|
8273
|
+
import { jsx as jsx103, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
8294
8274
|
var SmallGridSingleItem = memo5(
|
|
8295
8275
|
({
|
|
8296
8276
|
title,
|
|
@@ -8306,7 +8286,7 @@ var SmallGridSingleItem = memo5(
|
|
|
8306
8286
|
const handleClick = (event) => {
|
|
8307
8287
|
if (!disabled && onClick) onClick(event);
|
|
8308
8288
|
};
|
|
8309
|
-
return /* @__PURE__ */
|
|
8289
|
+
return /* @__PURE__ */ jsxs67(
|
|
8310
8290
|
"div",
|
|
8311
8291
|
{
|
|
8312
8292
|
onClick: handleClick,
|
|
@@ -8320,24 +8300,24 @@ var SmallGridSingleItem = memo5(
|
|
|
8320
8300
|
className
|
|
8321
8301
|
),
|
|
8322
8302
|
children: [
|
|
8323
|
-
/* @__PURE__ */
|
|
8324
|
-
/* @__PURE__ */
|
|
8325
|
-
subtitle && /* @__PURE__ */
|
|
8303
|
+
/* @__PURE__ */ jsxs67("div", { children: [
|
|
8304
|
+
/* @__PURE__ */ jsx103("div", { className: "line-clamp-2 overflow-hidden text-ellipsis break-all", children: title }),
|
|
8305
|
+
subtitle && /* @__PURE__ */ jsx103("div", { className: "line-clamp-2 overflow-hidden text-ellipsis text-[15px] font-medium leading-6 text-[var(--chekin-color-gray-2)]", children: subtitle })
|
|
8326
8306
|
] }),
|
|
8327
|
-
!readOnly && /* @__PURE__ */
|
|
8328
|
-
onDelete && /* @__PURE__ */
|
|
8307
|
+
!readOnly && /* @__PURE__ */ jsxs67("div", { className: "flex h-full items-center justify-end gap-2", children: [
|
|
8308
|
+
onDelete && /* @__PURE__ */ jsx103(
|
|
8329
8309
|
Button,
|
|
8330
8310
|
{
|
|
8331
8311
|
disabled,
|
|
8332
8312
|
onClick: onDelete,
|
|
8333
8313
|
size: "icon",
|
|
8334
8314
|
variant: "outline",
|
|
8335
|
-
children: /* @__PURE__ */
|
|
8315
|
+
children: /* @__PURE__ */ jsx103(Trash2, { className: "h-5 w-5 text-[var(--chekin-color-brand-red)]" })
|
|
8336
8316
|
}
|
|
8337
8317
|
),
|
|
8338
|
-
onEdit && /* @__PURE__ */
|
|
8318
|
+
onEdit && /* @__PURE__ */ jsx103(Button, { disabled, onClick: onEdit, size: "icon", variant: "outline", children: /* @__PURE__ */ jsx103(Pencil, { className: "h-5 w-5 text-[var(--chekin-color-brand-blue)]" }) })
|
|
8339
8319
|
] }),
|
|
8340
|
-
error && /* @__PURE__ */
|
|
8320
|
+
error && /* @__PURE__ */ jsx103("div", { className: "absolute bottom-1 right-2 text-xs text-[var(--chekin-color-brand-red)]", children: error })
|
|
8341
8321
|
]
|
|
8342
8322
|
}
|
|
8343
8323
|
);
|
|
@@ -8346,9 +8326,9 @@ var SmallGridSingleItem = memo5(
|
|
|
8346
8326
|
SmallGridSingleItem.displayName = "SmallGridSingleItem";
|
|
8347
8327
|
|
|
8348
8328
|
// src/sorting-action/SortingAction.tsx
|
|
8349
|
-
import { useTranslation as
|
|
8329
|
+
import { useTranslation as useTranslation21 } from "react-i18next";
|
|
8350
8330
|
import { ArrowDown, ArrowDownUpIcon, ArrowUp, Minus as Minus2 } from "lucide-react";
|
|
8351
|
-
import { jsx as
|
|
8331
|
+
import { jsx as jsx104, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
8352
8332
|
function SortingAction({
|
|
8353
8333
|
value,
|
|
8354
8334
|
onSortChange,
|
|
@@ -8357,9 +8337,9 @@ function SortingAction({
|
|
|
8357
8337
|
variant = "by_other",
|
|
8358
8338
|
onOpenChange
|
|
8359
8339
|
}) {
|
|
8360
|
-
const { t } =
|
|
8361
|
-
return /* @__PURE__ */
|
|
8362
|
-
/* @__PURE__ */
|
|
8340
|
+
const { t } = useTranslation21();
|
|
8341
|
+
return /* @__PURE__ */ jsxs68(DropdownMenu, { open, onOpenChange, children: [
|
|
8342
|
+
/* @__PURE__ */ jsx104(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx104(
|
|
8363
8343
|
"button",
|
|
8364
8344
|
{
|
|
8365
8345
|
type: "button",
|
|
@@ -8368,36 +8348,36 @@ function SortingAction({
|
|
|
8368
8348
|
className
|
|
8369
8349
|
),
|
|
8370
8350
|
"aria-label": "Open sorting menu",
|
|
8371
|
-
children: /* @__PURE__ */
|
|
8351
|
+
children: /* @__PURE__ */ jsx104(ArrowDownUpIcon, { className: "h-4 w-4 text-[var(--chekin-color-gray-1)] group-hover/trigger:text-[var(--chekin-color-brand-navy)]" })
|
|
8372
8352
|
}
|
|
8373
8353
|
) }),
|
|
8374
|
-
/* @__PURE__ */
|
|
8375
|
-
/* @__PURE__ */
|
|
8354
|
+
/* @__PURE__ */ jsxs68(DropdownMenuContent, { className: "w-full max-w-[256px]", align: "start", children: [
|
|
8355
|
+
/* @__PURE__ */ jsxs68(
|
|
8376
8356
|
DropdownMenuItem,
|
|
8377
8357
|
{
|
|
8378
8358
|
active: value === "asc",
|
|
8379
8359
|
className: cn(value === "asc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
8380
8360
|
onClick: () => onSortChange?.("asc"),
|
|
8381
8361
|
children: [
|
|
8382
|
-
/* @__PURE__ */
|
|
8362
|
+
/* @__PURE__ */ jsx104(ArrowUp, { className: "h-4 w-4" }),
|
|
8383
8363
|
variant === "by_text" ? t("sort_a_z") : t("sort_in_asc")
|
|
8384
8364
|
]
|
|
8385
8365
|
}
|
|
8386
8366
|
),
|
|
8387
|
-
/* @__PURE__ */
|
|
8367
|
+
/* @__PURE__ */ jsxs68(
|
|
8388
8368
|
DropdownMenuItem,
|
|
8389
8369
|
{
|
|
8390
8370
|
active: value === "desc",
|
|
8391
8371
|
className: cn(value === "desc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
8392
8372
|
onClick: () => onSortChange?.("desc"),
|
|
8393
8373
|
children: [
|
|
8394
|
-
/* @__PURE__ */
|
|
8374
|
+
/* @__PURE__ */ jsx104(ArrowDown, { className: "h-4 w-4" }),
|
|
8395
8375
|
variant === "by_text" ? t("sort_z_a") : t("sort_in_desc")
|
|
8396
8376
|
]
|
|
8397
8377
|
}
|
|
8398
8378
|
),
|
|
8399
|
-
value && /* @__PURE__ */
|
|
8400
|
-
/* @__PURE__ */
|
|
8379
|
+
value && /* @__PURE__ */ jsxs68(DropdownMenuItem, { onClick: () => onSortChange?.(null), children: [
|
|
8380
|
+
/* @__PURE__ */ jsx104(Minus2, { className: "h-4 w-4" }),
|
|
8401
8381
|
t("clear_sorting")
|
|
8402
8382
|
] })
|
|
8403
8383
|
] })
|
|
@@ -8406,9 +8386,9 @@ function SortingAction({
|
|
|
8406
8386
|
|
|
8407
8387
|
// src/status-button/StatusButton.tsx
|
|
8408
8388
|
import { useMemo as useMemo5 } from "react";
|
|
8409
|
-
import { useTranslation as
|
|
8410
|
-
import { AlertCircle as AlertCircle2, CheckCircle, Loader2 as
|
|
8411
|
-
import { jsx as
|
|
8389
|
+
import { useTranslation as useTranslation22 } from "react-i18next";
|
|
8390
|
+
import { AlertCircle as AlertCircle2, CheckCircle, Loader2 as Loader23 } from "lucide-react";
|
|
8391
|
+
import { jsx as jsx105, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
8412
8392
|
function StatusButton({
|
|
8413
8393
|
hidden,
|
|
8414
8394
|
status,
|
|
@@ -8422,11 +8402,11 @@ function StatusButton({
|
|
|
8422
8402
|
variant = "default",
|
|
8423
8403
|
...props
|
|
8424
8404
|
}) {
|
|
8425
|
-
const { t } =
|
|
8405
|
+
const { t } = useTranslation22();
|
|
8426
8406
|
const configMap = useMemo5(() => {
|
|
8427
8407
|
const defaultLoadingConfig = {
|
|
8428
8408
|
text: loadingText ?? `${t("saving")}...`,
|
|
8429
|
-
icon: /* @__PURE__ */
|
|
8409
|
+
icon: /* @__PURE__ */ jsx105(Loader23, { className: "h-4 w-4 animate-spin" }),
|
|
8430
8410
|
variant,
|
|
8431
8411
|
isLoading: true
|
|
8432
8412
|
};
|
|
@@ -8436,13 +8416,13 @@ function StatusButton({
|
|
|
8436
8416
|
validating: { ...defaultLoadingConfig, text: t("validating") },
|
|
8437
8417
|
error: {
|
|
8438
8418
|
text: t("error"),
|
|
8439
|
-
icon: /* @__PURE__ */
|
|
8419
|
+
icon: /* @__PURE__ */ jsx105(AlertCircle2, { className: "h-4 w-4" }),
|
|
8440
8420
|
variant: "destructive",
|
|
8441
8421
|
isLoading: false
|
|
8442
8422
|
},
|
|
8443
8423
|
success: {
|
|
8444
8424
|
text: successText ?? t("saved_exclamation"),
|
|
8445
|
-
icon: /* @__PURE__ */
|
|
8425
|
+
icon: /* @__PURE__ */ jsx105(CheckCircle, { className: "h-4 w-4" }),
|
|
8446
8426
|
variant,
|
|
8447
8427
|
isLoading: false
|
|
8448
8428
|
},
|
|
@@ -8458,7 +8438,7 @@ function StatusButton({
|
|
|
8458
8438
|
if (hidden) {
|
|
8459
8439
|
return null;
|
|
8460
8440
|
}
|
|
8461
|
-
return /* @__PURE__ */
|
|
8441
|
+
return /* @__PURE__ */ jsxs69(
|
|
8462
8442
|
Button,
|
|
8463
8443
|
{
|
|
8464
8444
|
className: cn(
|
|
@@ -8474,7 +8454,7 @@ function StatusButton({
|
|
|
8474
8454
|
...props,
|
|
8475
8455
|
children: [
|
|
8476
8456
|
config.icon,
|
|
8477
|
-
/* @__PURE__ */
|
|
8457
|
+
/* @__PURE__ */ jsx105("span", { children: config.text })
|
|
8478
8458
|
]
|
|
8479
8459
|
}
|
|
8480
8460
|
);
|
|
@@ -8482,37 +8462,37 @@ function StatusButton({
|
|
|
8482
8462
|
|
|
8483
8463
|
// src/status-box/StatusBox.tsx
|
|
8484
8464
|
import { AlertTriangleIcon, CheckIcon as CheckIcon4, XIcon as XIcon3 } from "lucide-react";
|
|
8485
|
-
import { jsx as
|
|
8465
|
+
import { jsx as jsx106, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
8486
8466
|
function StatusBox({ status, title, text }) {
|
|
8487
8467
|
if (status === "success") {
|
|
8488
|
-
return /* @__PURE__ */
|
|
8489
|
-
/* @__PURE__ */
|
|
8490
|
-
/* @__PURE__ */
|
|
8491
|
-
/* @__PURE__ */
|
|
8492
|
-
/* @__PURE__ */
|
|
8468
|
+
return /* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-3 rounded-lg border border-green-100 bg-green-50 p-4", children: [
|
|
8469
|
+
/* @__PURE__ */ jsx106("div", { className: "rounded-full bg-green-100 p-1", children: /* @__PURE__ */ jsx106(CheckIcon4, { className: "h-5 w-5 text-green-600" }) }),
|
|
8470
|
+
/* @__PURE__ */ jsxs70("div", { children: [
|
|
8471
|
+
/* @__PURE__ */ jsx106("p", { className: "font-semibold text-green-800", children: title }),
|
|
8472
|
+
/* @__PURE__ */ jsx106("p", { className: "text-sm text-green-700", children: text })
|
|
8493
8473
|
] })
|
|
8494
8474
|
] });
|
|
8495
8475
|
}
|
|
8496
8476
|
if (status === "failed") {
|
|
8497
|
-
return /* @__PURE__ */
|
|
8498
|
-
/* @__PURE__ */
|
|
8499
|
-
/* @__PURE__ */
|
|
8500
|
-
/* @__PURE__ */
|
|
8501
|
-
/* @__PURE__ */
|
|
8477
|
+
return /* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-3 rounded-lg border border-red-100 bg-red-50 p-4", children: [
|
|
8478
|
+
/* @__PURE__ */ jsx106("div", { className: "rounded-full bg-red-100 p-1", children: /* @__PURE__ */ jsx106(XIcon3, { className: "h-5 w-5 text-red-600" }) }),
|
|
8479
|
+
/* @__PURE__ */ jsxs70("div", { children: [
|
|
8480
|
+
/* @__PURE__ */ jsx106("p", { className: "font-semibold text-red-800", children: title }),
|
|
8481
|
+
/* @__PURE__ */ jsx106("p", { className: "text-sm text-red-700", children: text })
|
|
8502
8482
|
] })
|
|
8503
8483
|
] });
|
|
8504
8484
|
}
|
|
8505
|
-
return /* @__PURE__ */
|
|
8506
|
-
/* @__PURE__ */
|
|
8507
|
-
/* @__PURE__ */
|
|
8508
|
-
/* @__PURE__ */
|
|
8509
|
-
/* @__PURE__ */
|
|
8485
|
+
return /* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-3 rounded-lg border border-amber-100 bg-amber-50 p-4", children: [
|
|
8486
|
+
/* @__PURE__ */ jsx106("div", { className: "rounded-full bg-amber-100 p-1", children: /* @__PURE__ */ jsx106(AlertTriangleIcon, { className: "h-5 w-5 text-amber-600" }) }),
|
|
8487
|
+
/* @__PURE__ */ jsxs70("div", { children: [
|
|
8488
|
+
/* @__PURE__ */ jsx106("p", { className: "font-semibold text-amber-800", children: title }),
|
|
8489
|
+
/* @__PURE__ */ jsx106("p", { className: "text-sm text-amber-700", children: text })
|
|
8510
8490
|
] })
|
|
8511
8491
|
] });
|
|
8512
8492
|
}
|
|
8513
8493
|
|
|
8514
8494
|
// src/stepper/Stepper.tsx
|
|
8515
|
-
import { jsx as
|
|
8495
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
8516
8496
|
function Stepper({
|
|
8517
8497
|
totalSteps,
|
|
8518
8498
|
activeStep,
|
|
@@ -8521,7 +8501,7 @@ function Stepper({
|
|
|
8521
8501
|
}) {
|
|
8522
8502
|
if (totalSteps <= 0) return null;
|
|
8523
8503
|
const clampedActiveStep = Math.max(1, Math.min(totalSteps, activeStep));
|
|
8524
|
-
return /* @__PURE__ */
|
|
8504
|
+
return /* @__PURE__ */ jsx107(
|
|
8525
8505
|
"div",
|
|
8526
8506
|
{
|
|
8527
8507
|
className: cn("flex w-full items-center gap-2", className),
|
|
@@ -8532,7 +8512,7 @@ function Stepper({
|
|
|
8532
8512
|
children: new Array(totalSteps).fill(null).map((_, stepIndex) => {
|
|
8533
8513
|
const stepNumber = stepIndex + 1;
|
|
8534
8514
|
const isActive = cumulative ? stepNumber <= clampedActiveStep : stepNumber === clampedActiveStep;
|
|
8535
|
-
return /* @__PURE__ */
|
|
8515
|
+
return /* @__PURE__ */ jsx107(
|
|
8536
8516
|
"span",
|
|
8537
8517
|
{
|
|
8538
8518
|
className: cn(
|
|
@@ -8549,14 +8529,14 @@ function Stepper({
|
|
|
8549
8529
|
|
|
8550
8530
|
// src/switch-blocks/SwitchBlocks.tsx
|
|
8551
8531
|
import { forwardRef as forwardRef41, memo as memo6 } from "react";
|
|
8552
|
-
import { jsx as
|
|
8532
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
8553
8533
|
var SwitchBlocksInternal = forwardRef41(
|
|
8554
|
-
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */
|
|
8534
|
+
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ jsx108(
|
|
8555
8535
|
"div",
|
|
8556
8536
|
{
|
|
8557
8537
|
ref,
|
|
8558
8538
|
className: cn("flex flex-wrap items-center justify-start gap-4", className),
|
|
8559
|
-
children: options.map((option) => /* @__PURE__ */
|
|
8539
|
+
children: options.map((option) => /* @__PURE__ */ jsx108(
|
|
8560
8540
|
BoxOptionSelector,
|
|
8561
8541
|
{
|
|
8562
8542
|
id: option.id,
|
|
@@ -8578,7 +8558,7 @@ var SwitchBlocks = memo6(SwitchBlocksInternal);
|
|
|
8578
8558
|
|
|
8579
8559
|
// src/switch-group/SwitchGroup.tsx
|
|
8580
8560
|
import * as React27 from "react";
|
|
8581
|
-
import { jsx as
|
|
8561
|
+
import { jsx as jsx109, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
8582
8562
|
var SwitchGroup = React27.forwardRef(
|
|
8583
8563
|
({ options, value = [], onChange, disabled = false, className, error, ...props }, ref) => {
|
|
8584
8564
|
const handleOptionChange = (optionValue, checked) => {
|
|
@@ -8589,9 +8569,9 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8589
8569
|
}
|
|
8590
8570
|
onChange(value.filter((selectedValue) => selectedValue !== optionValue));
|
|
8591
8571
|
};
|
|
8592
|
-
return /* @__PURE__ */
|
|
8593
|
-
options.map((option) => /* @__PURE__ */
|
|
8594
|
-
/* @__PURE__ */
|
|
8572
|
+
return /* @__PURE__ */ jsxs71("div", { ref, className: cn("w-full space-y-4", className), ...props, children: [
|
|
8573
|
+
options.map((option) => /* @__PURE__ */ jsxs71("div", { className: "flex items-center justify-between gap-4", children: [
|
|
8574
|
+
/* @__PURE__ */ jsx109("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs71(
|
|
8595
8575
|
Label,
|
|
8596
8576
|
{
|
|
8597
8577
|
className: cn(
|
|
@@ -8600,7 +8580,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8600
8580
|
),
|
|
8601
8581
|
children: [
|
|
8602
8582
|
option.label,
|
|
8603
|
-
option.description && /* @__PURE__ */
|
|
8583
|
+
option.description && /* @__PURE__ */ jsxs71(
|
|
8604
8584
|
"span",
|
|
8605
8585
|
{
|
|
8606
8586
|
className: cn(
|
|
@@ -8617,7 +8597,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8617
8597
|
]
|
|
8618
8598
|
}
|
|
8619
8599
|
) }),
|
|
8620
|
-
/* @__PURE__ */
|
|
8600
|
+
/* @__PURE__ */ jsx109(
|
|
8621
8601
|
Switch,
|
|
8622
8602
|
{
|
|
8623
8603
|
value: value.includes(option.value),
|
|
@@ -8627,7 +8607,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8627
8607
|
}
|
|
8628
8608
|
)
|
|
8629
8609
|
] }, option.value)),
|
|
8630
|
-
error && /* @__PURE__ */
|
|
8610
|
+
error && /* @__PURE__ */ jsx109(ErrorMessage, { disabled, children: error })
|
|
8631
8611
|
] });
|
|
8632
8612
|
}
|
|
8633
8613
|
);
|
|
@@ -8637,7 +8617,7 @@ SwitchGroup.displayName = "SwitchGroup";
|
|
|
8637
8617
|
import { forwardRef as forwardRef43 } from "react";
|
|
8638
8618
|
import * as TabsPrimitive2 from "@radix-ui/react-tabs";
|
|
8639
8619
|
import { cva as cva12 } from "class-variance-authority";
|
|
8640
|
-
import { jsx as
|
|
8620
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
8641
8621
|
var Tabs = TabsPrimitive2.Root;
|
|
8642
8622
|
var tabsListVariants = cva12("inline-flex items-center", {
|
|
8643
8623
|
variants: {
|
|
@@ -8651,7 +8631,7 @@ var tabsListVariants = cva12("inline-flex items-center", {
|
|
|
8651
8631
|
}
|
|
8652
8632
|
});
|
|
8653
8633
|
var TabsList = forwardRef43(
|
|
8654
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
8634
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx110(
|
|
8655
8635
|
TabsPrimitive2.List,
|
|
8656
8636
|
{
|
|
8657
8637
|
ref,
|
|
@@ -8675,7 +8655,7 @@ var tabsTriggerVariants = cva12(
|
|
|
8675
8655
|
}
|
|
8676
8656
|
}
|
|
8677
8657
|
);
|
|
8678
|
-
var TabsTrigger = forwardRef43(({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
8658
|
+
var TabsTrigger = forwardRef43(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx110(
|
|
8679
8659
|
TabsPrimitive2.Trigger,
|
|
8680
8660
|
{
|
|
8681
8661
|
ref,
|
|
@@ -8684,11 +8664,11 @@ var TabsTrigger = forwardRef43(({ className, variant, ...props }, ref) => /* @__
|
|
|
8684
8664
|
}
|
|
8685
8665
|
));
|
|
8686
8666
|
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
8687
|
-
var TabsContent = forwardRef43(({ className, ...props }, ref) => /* @__PURE__ */
|
|
8667
|
+
var TabsContent = forwardRef43(({ className, ...props }, ref) => /* @__PURE__ */ jsx110(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
|
|
8688
8668
|
TabsContent.displayName = TabsPrimitive2.Content.displayName;
|
|
8689
8669
|
|
|
8690
8670
|
// src/tabbed-section/TabbedSection.tsx
|
|
8691
|
-
import { jsx as
|
|
8671
|
+
import { jsx as jsx111, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8692
8672
|
function TabbedSection({
|
|
8693
8673
|
triggers,
|
|
8694
8674
|
value,
|
|
@@ -8710,8 +8690,8 @@ function TabbedSection({
|
|
|
8710
8690
|
"[&>div:first-child]:gap-3",
|
|
8711
8691
|
className
|
|
8712
8692
|
);
|
|
8713
|
-
return /* @__PURE__ */
|
|
8714
|
-
/* @__PURE__ */
|
|
8693
|
+
return /* @__PURE__ */ jsxs72(Tabs, { value: activeTab, onValueChange: onTabChange, className: "w-full", children: [
|
|
8694
|
+
/* @__PURE__ */ jsx111(
|
|
8715
8695
|
BookmarkTabsList,
|
|
8716
8696
|
{
|
|
8717
8697
|
variant,
|
|
@@ -8719,12 +8699,12 @@ function TabbedSection({
|
|
|
8719
8699
|
children: triggers
|
|
8720
8700
|
}
|
|
8721
8701
|
),
|
|
8722
|
-
/* @__PURE__ */
|
|
8702
|
+
/* @__PURE__ */ jsx111("div", { className: contentContainerClassName, children })
|
|
8723
8703
|
] });
|
|
8724
8704
|
}
|
|
8725
8705
|
|
|
8726
8706
|
// src/table-placeholder/TablePlaceholder.tsx
|
|
8727
|
-
import { jsx as
|
|
8707
|
+
import { jsx as jsx112, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
8728
8708
|
function TablePlaceholder({
|
|
8729
8709
|
children,
|
|
8730
8710
|
text,
|
|
@@ -8737,21 +8717,21 @@ function TablePlaceholder({
|
|
|
8737
8717
|
if (!visible) {
|
|
8738
8718
|
return null;
|
|
8739
8719
|
}
|
|
8740
|
-
const content = /* @__PURE__ */
|
|
8741
|
-
iconSlot && /* @__PURE__ */
|
|
8742
|
-
title && /* @__PURE__ */
|
|
8743
|
-
text && /* @__PURE__ */
|
|
8744
|
-
children && /* @__PURE__ */
|
|
8720
|
+
const content = /* @__PURE__ */ jsxs73("div", { className: "flex flex-col items-center justify-center px-4 py-14 text-center", children: [
|
|
8721
|
+
iconSlot && /* @__PURE__ */ jsx112("div", { className: "mb-6", children: iconSlot }),
|
|
8722
|
+
title && /* @__PURE__ */ jsx112("h3", { className: "mb-2 text-lg font-semibold", children: title }),
|
|
8723
|
+
text && /* @__PURE__ */ jsx112("p", { className: "text-md max-w-sm font-medium", children: text }),
|
|
8724
|
+
children && /* @__PURE__ */ jsx112("div", { className: "mt-6", children })
|
|
8745
8725
|
] });
|
|
8746
8726
|
if (insideTable) {
|
|
8747
|
-
return /* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsx112("tr", { children: /* @__PURE__ */ jsx112("td", { colSpan: 100, className, children: content }) });
|
|
8748
8728
|
}
|
|
8749
|
-
return /* @__PURE__ */
|
|
8729
|
+
return /* @__PURE__ */ jsx112("div", { className, children: content });
|
|
8750
8730
|
}
|
|
8751
8731
|
|
|
8752
8732
|
// src/task-card/TaskCard.tsx
|
|
8753
8733
|
import { ArrowRight } from "lucide-react";
|
|
8754
|
-
import { jsx as
|
|
8734
|
+
import { jsx as jsx113, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
8755
8735
|
function TaskCard({
|
|
8756
8736
|
title,
|
|
8757
8737
|
description,
|
|
@@ -8762,7 +8742,7 @@ function TaskCard({
|
|
|
8762
8742
|
}) {
|
|
8763
8743
|
const shouldShowCount = count !== void 0 && count > 1;
|
|
8764
8744
|
const shouldShowActions = shouldShowCount || onClick;
|
|
8765
|
-
return /* @__PURE__ */
|
|
8745
|
+
return /* @__PURE__ */ jsxs74(
|
|
8766
8746
|
"div",
|
|
8767
8747
|
{
|
|
8768
8748
|
className: cn(
|
|
@@ -8778,7 +8758,7 @@ function TaskCard({
|
|
|
8778
8758
|
role: onClick ? "button" : void 0,
|
|
8779
8759
|
tabIndex: onClick ? 0 : void 0,
|
|
8780
8760
|
children: [
|
|
8781
|
-
/* @__PURE__ */
|
|
8761
|
+
/* @__PURE__ */ jsx113(
|
|
8782
8762
|
"div",
|
|
8783
8763
|
{
|
|
8784
8764
|
className: cn(
|
|
@@ -8788,12 +8768,12 @@ function TaskCard({
|
|
|
8788
8768
|
)
|
|
8789
8769
|
}
|
|
8790
8770
|
),
|
|
8791
|
-
/* @__PURE__ */
|
|
8792
|
-
/* @__PURE__ */
|
|
8793
|
-
/* @__PURE__ */
|
|
8771
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
|
|
8772
|
+
/* @__PURE__ */ jsx113("h4", { className: "m-0 w-full break-words text-base font-semibold leading-6 text-[var(--chekin-color-brand-navy)]", children: title }),
|
|
8773
|
+
/* @__PURE__ */ jsx113("p", { className: "m-0 w-full text-sm font-medium leading-6 text-[var(--chekin-color-gray-1)]", children: description })
|
|
8794
8774
|
] }),
|
|
8795
|
-
shouldShowActions && /* @__PURE__ */
|
|
8796
|
-
shouldShowCount && /* @__PURE__ */
|
|
8775
|
+
shouldShowActions && /* @__PURE__ */ jsxs74("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
8776
|
+
shouldShowCount && /* @__PURE__ */ jsx113(
|
|
8797
8777
|
"div",
|
|
8798
8778
|
{
|
|
8799
8779
|
className: cn(
|
|
@@ -8804,7 +8784,7 @@ function TaskCard({
|
|
|
8804
8784
|
children: count
|
|
8805
8785
|
}
|
|
8806
8786
|
),
|
|
8807
|
-
onClick && /* @__PURE__ */
|
|
8787
|
+
onClick && /* @__PURE__ */ jsx113(
|
|
8808
8788
|
"button",
|
|
8809
8789
|
{
|
|
8810
8790
|
className: "flex h-8 w-0 min-w-0 cursor-pointer items-center justify-center overflow-hidden rounded-md border-0 bg-transparent p-0 text-[var(--chekin-color-gray-1)] opacity-0 transition-[width,opacity,min-width] duration-300 ease-in-out hover:bg-black/5 focus-visible:w-8 focus-visible:min-w-8 focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--chekin-color-brand-blue)] group-hover:w-8 group-hover:min-w-8 group-hover:opacity-100",
|
|
@@ -8814,7 +8794,7 @@ function TaskCard({
|
|
|
8814
8794
|
},
|
|
8815
8795
|
"aria-label": "View details",
|
|
8816
8796
|
type: "button",
|
|
8817
|
-
children: /* @__PURE__ */
|
|
8797
|
+
children: /* @__PURE__ */ jsx113(ArrowRight, { className: "h-5 w-5" })
|
|
8818
8798
|
}
|
|
8819
8799
|
)
|
|
8820
8800
|
] })
|
|
@@ -8902,7 +8882,7 @@ var toggleVariants = cva13(
|
|
|
8902
8882
|
);
|
|
8903
8883
|
|
|
8904
8884
|
// src/toggle-group/ToggleGroup.tsx
|
|
8905
|
-
import { jsx as
|
|
8885
|
+
import { jsx as jsx114, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
8906
8886
|
var ToggleGroupContext = React28.createContext({
|
|
8907
8887
|
size: "default",
|
|
8908
8888
|
variant: "default",
|
|
@@ -8910,7 +8890,7 @@ var ToggleGroupContext = React28.createContext({
|
|
|
8910
8890
|
});
|
|
8911
8891
|
var ToggleGroup = React28.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
|
|
8912
8892
|
const isTabVariant = variant === "tab";
|
|
8913
|
-
return /* @__PURE__ */
|
|
8893
|
+
return /* @__PURE__ */ jsx114(
|
|
8914
8894
|
ToggleGroupPrimitive.Root,
|
|
8915
8895
|
{
|
|
8916
8896
|
ref,
|
|
@@ -8920,7 +8900,7 @@ var ToggleGroup = React28.forwardRef(({ className, variant, size, theme, childre
|
|
|
8920
8900
|
className
|
|
8921
8901
|
),
|
|
8922
8902
|
...props,
|
|
8923
|
-
children: /* @__PURE__ */
|
|
8903
|
+
children: /* @__PURE__ */ jsx114(ToggleGroupContext.Provider, { value: { variant, size, theme }, children })
|
|
8924
8904
|
}
|
|
8925
8905
|
);
|
|
8926
8906
|
});
|
|
@@ -8929,7 +8909,7 @@ var ToggleGroupItem = React28.forwardRef(({ className, children, variant, size,
|
|
|
8929
8909
|
const context = React28.useContext(ToggleGroupContext);
|
|
8930
8910
|
const resolvedVariant = context.variant || variant;
|
|
8931
8911
|
const isTabVariant = resolvedVariant === "tab";
|
|
8932
|
-
return /* @__PURE__ */
|
|
8912
|
+
return /* @__PURE__ */ jsx114(
|
|
8933
8913
|
ToggleGroupPrimitive.Item,
|
|
8934
8914
|
{
|
|
8935
8915
|
ref,
|
|
@@ -8942,9 +8922,9 @@ var ToggleGroupItem = React28.forwardRef(({ className, children, variant, size,
|
|
|
8942
8922
|
className
|
|
8943
8923
|
),
|
|
8944
8924
|
...props,
|
|
8945
|
-
children: isTabVariant ? /* @__PURE__ */
|
|
8946
|
-
/* @__PURE__ */
|
|
8947
|
-
/* @__PURE__ */
|
|
8925
|
+
children: isTabVariant ? /* @__PURE__ */ jsxs75("span", { className: "inline-grid", children: [
|
|
8926
|
+
/* @__PURE__ */ jsx114("span", { className: "invisible col-start-1 row-start-1 font-semibold", children }),
|
|
8927
|
+
/* @__PURE__ */ jsx114("span", { className: "col-start-1 row-start-1", children })
|
|
8948
8928
|
] }) : children
|
|
8949
8929
|
}
|
|
8950
8930
|
);
|
|
@@ -8958,7 +8938,7 @@ import {
|
|
|
8958
8938
|
isValidElement as isValidElement3,
|
|
8959
8939
|
useEffect as useEffect23
|
|
8960
8940
|
} from "react";
|
|
8961
|
-
import { jsx as
|
|
8941
|
+
import { jsx as jsx115, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
8962
8942
|
var getValueArray2 = (value) => {
|
|
8963
8943
|
if (value) {
|
|
8964
8944
|
return Array.isArray(value) ? value : [value];
|
|
@@ -9054,16 +9034,16 @@ function TogglesInternal({
|
|
|
9054
9034
|
onValueChange: handleValueChange,
|
|
9055
9035
|
...multiple ? { type: "multiple", value: currentValue } : { type: "single", value: currentValue[0] ?? "" }
|
|
9056
9036
|
};
|
|
9057
|
-
return /* @__PURE__ */
|
|
9058
|
-
label && /* @__PURE__ */
|
|
9059
|
-
/* @__PURE__ */
|
|
9037
|
+
return /* @__PURE__ */ jsxs76("div", { ref, className, children: [
|
|
9038
|
+
label && /* @__PURE__ */ jsx115("div", { className: "mb-2", children: /* @__PURE__ */ jsx115("div", { className: "select-none text-base font-normal text-[var(--chekin-color-brand-navy)]", children: label }) }),
|
|
9039
|
+
/* @__PURE__ */ jsx115(ToggleGroup, { className: groupClassName, ...toggleGroupProps, children: options.map((option, index) => {
|
|
9060
9040
|
const isSelected = Boolean(
|
|
9061
9041
|
getValueArray2(value).find((selectedValue) => selectedValue === option.value)
|
|
9062
9042
|
);
|
|
9063
9043
|
const isDisabled = disabled || disabledItems?.includes(option.value) || option.disabled;
|
|
9064
9044
|
const isMinSelected = getValueArray2(value).length <= minSelected;
|
|
9065
9045
|
const isItemReadOnly = readOnly || isMinSelected && isSelected || readonlyItems?.includes(option.value);
|
|
9066
|
-
return /* @__PURE__ */
|
|
9046
|
+
return /* @__PURE__ */ jsx115(
|
|
9067
9047
|
ToggleGroupItem,
|
|
9068
9048
|
{
|
|
9069
9049
|
value: String(option.value),
|
|
@@ -9082,15 +9062,15 @@ var Toggles = forwardRef45(TogglesInternal);
|
|
|
9082
9062
|
import * as React29 from "react";
|
|
9083
9063
|
import * as LabelPrimitive2 from "@radix-ui/react-label";
|
|
9084
9064
|
import { cva as cva14 } from "class-variance-authority";
|
|
9085
|
-
import { useTranslation as
|
|
9065
|
+
import { useTranslation as useTranslation23 } from "react-i18next";
|
|
9086
9066
|
|
|
9087
9067
|
// src/text-field/EndIcon.tsx
|
|
9088
|
-
import { jsx as
|
|
9089
|
-
var EndIcon = ({ children }) => /* @__PURE__ */
|
|
9068
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
9069
|
+
var EndIcon = ({ children }) => /* @__PURE__ */ jsx116("div", { className: "pointer-events-none absolute right-3.5 top-1/2 -translate-y-1/2 [&>*]:pointer-events-auto", children });
|
|
9090
9070
|
|
|
9091
9071
|
// src/text-field/FieldError.tsx
|
|
9092
|
-
import { jsx as
|
|
9093
|
-
var FieldError = ({ id, children }) => /* @__PURE__ */
|
|
9072
|
+
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
9073
|
+
var FieldError = ({ id, children }) => /* @__PURE__ */ jsx117(
|
|
9094
9074
|
"p",
|
|
9095
9075
|
{
|
|
9096
9076
|
id,
|
|
@@ -9101,11 +9081,11 @@ var FieldError = ({ id, children }) => /* @__PURE__ */ jsx118(
|
|
|
9101
9081
|
);
|
|
9102
9082
|
|
|
9103
9083
|
// src/text-field/SupportingText.tsx
|
|
9104
|
-
import { jsx as
|
|
9105
|
-
var SupportingText = ({ id, children }) => /* @__PURE__ */
|
|
9084
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
9085
|
+
var SupportingText = ({ id, children }) => /* @__PURE__ */ jsx118("p", { id, className: "mt-1 text-xs italic text-[var(--chekin-color-gray-2)]", children });
|
|
9106
9086
|
|
|
9107
9087
|
// src/text-field/TextField.tsx
|
|
9108
|
-
import { jsx as
|
|
9088
|
+
import { jsx as jsx119, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
9109
9089
|
var textFieldRootClasses = [
|
|
9110
9090
|
"[--text-field-height:2.75rem]",
|
|
9111
9091
|
"[--text-field-radius:8px]",
|
|
@@ -9212,7 +9192,7 @@ var TextField = React29.forwardRef(
|
|
|
9212
9192
|
readOnly,
|
|
9213
9193
|
...props
|
|
9214
9194
|
}, ref) => {
|
|
9215
|
-
const { t } =
|
|
9195
|
+
const { t } = useTranslation23();
|
|
9216
9196
|
const hasError = Boolean(error);
|
|
9217
9197
|
const autoId = React29.useId();
|
|
9218
9198
|
const inputId = props.id || autoId;
|
|
@@ -9226,7 +9206,7 @@ var TextField = React29.forwardRef(
|
|
|
9226
9206
|
const errorId = error ? `${inputId}-error` : void 0;
|
|
9227
9207
|
const ariaDescribedBy = errorId || descriptionId || void 0;
|
|
9228
9208
|
if (variant === "floating") {
|
|
9229
|
-
return /* @__PURE__ */
|
|
9209
|
+
return /* @__PURE__ */ jsxs77(
|
|
9230
9210
|
"div",
|
|
9231
9211
|
{
|
|
9232
9212
|
className: cn(
|
|
@@ -9235,8 +9215,8 @@ var TextField = React29.forwardRef(
|
|
|
9235
9215
|
wrapperClassName
|
|
9236
9216
|
),
|
|
9237
9217
|
children: [
|
|
9238
|
-
/* @__PURE__ */
|
|
9239
|
-
/* @__PURE__ */
|
|
9218
|
+
/* @__PURE__ */ jsxs77("div", { className: "relative", children: [
|
|
9219
|
+
/* @__PURE__ */ jsx119(
|
|
9240
9220
|
"input",
|
|
9241
9221
|
{
|
|
9242
9222
|
id: inputId,
|
|
@@ -9250,7 +9230,7 @@ var TextField = React29.forwardRef(
|
|
|
9250
9230
|
...props
|
|
9251
9231
|
}
|
|
9252
9232
|
),
|
|
9253
|
-
label && /* @__PURE__ */
|
|
9233
|
+
label && /* @__PURE__ */ jsx119(
|
|
9254
9234
|
LabelPrimitive2.Root,
|
|
9255
9235
|
{
|
|
9256
9236
|
htmlFor: inputId,
|
|
@@ -9264,17 +9244,17 @@ var TextField = React29.forwardRef(
|
|
|
9264
9244
|
children: label
|
|
9265
9245
|
}
|
|
9266
9246
|
),
|
|
9267
|
-
endIcon && /* @__PURE__ */
|
|
9247
|
+
endIcon && /* @__PURE__ */ jsx119(EndIcon, { children: endIcon })
|
|
9268
9248
|
] }),
|
|
9269
|
-
supportingText && !hasError && /* @__PURE__ */
|
|
9270
|
-
hasError && /* @__PURE__ */
|
|
9249
|
+
supportingText && !hasError && /* @__PURE__ */ jsx119(SupportingText, { id: descriptionId, children: supportingText }),
|
|
9250
|
+
hasError && /* @__PURE__ */ jsx119(FieldError, { id: errorId, children: error })
|
|
9271
9251
|
]
|
|
9272
9252
|
}
|
|
9273
9253
|
);
|
|
9274
9254
|
}
|
|
9275
|
-
return /* @__PURE__ */
|
|
9276
|
-
label && /* @__PURE__ */
|
|
9277
|
-
/* @__PURE__ */
|
|
9255
|
+
return /* @__PURE__ */ jsxs77("div", { className: cn("flex w-full flex-col", textFieldRootClasses, wrapperClassName), children: [
|
|
9256
|
+
label && /* @__PURE__ */ jsxs77("div", { className: "mb-1 flex items-center gap-1", children: [
|
|
9257
|
+
/* @__PURE__ */ jsx119(
|
|
9278
9258
|
LabelPrimitive2.Root,
|
|
9279
9259
|
{
|
|
9280
9260
|
htmlFor: inputId,
|
|
@@ -9282,14 +9262,14 @@ var TextField = React29.forwardRef(
|
|
|
9282
9262
|
children: label
|
|
9283
9263
|
}
|
|
9284
9264
|
),
|
|
9285
|
-
optional && /* @__PURE__ */
|
|
9286
|
-
/* @__PURE__ */
|
|
9287
|
-
/* @__PURE__ */
|
|
9265
|
+
optional && /* @__PURE__ */ jsxs77("span", { className: "text-base leading-4", children: [
|
|
9266
|
+
/* @__PURE__ */ jsx119("span", { className: "text-[var(--chekin-color-brand-navy)]", children: "- " }),
|
|
9267
|
+
/* @__PURE__ */ jsx119("span", { className: "italic text-[var(--chekin-color-gray-2)]", children: optionalLabel || t("optional") })
|
|
9288
9268
|
] }),
|
|
9289
9269
|
tooltip
|
|
9290
9270
|
] }),
|
|
9291
|
-
/* @__PURE__ */
|
|
9292
|
-
/* @__PURE__ */
|
|
9271
|
+
/* @__PURE__ */ jsxs77("div", { className: "relative", children: [
|
|
9272
|
+
/* @__PURE__ */ jsx119(
|
|
9293
9273
|
"input",
|
|
9294
9274
|
{
|
|
9295
9275
|
id: inputId,
|
|
@@ -9303,10 +9283,10 @@ var TextField = React29.forwardRef(
|
|
|
9303
9283
|
...props
|
|
9304
9284
|
}
|
|
9305
9285
|
),
|
|
9306
|
-
endIcon && /* @__PURE__ */
|
|
9286
|
+
endIcon && /* @__PURE__ */ jsx119(EndIcon, { children: endIcon })
|
|
9307
9287
|
] }),
|
|
9308
|
-
supportingText && !hasError && /* @__PURE__ */
|
|
9309
|
-
hasError && /* @__PURE__ */
|
|
9288
|
+
supportingText && !hasError && /* @__PURE__ */ jsx119(SupportingText, { id: descriptionId, children: supportingText }),
|
|
9289
|
+
hasError && /* @__PURE__ */ jsx119(FieldError, { id: errorId, children: error })
|
|
9310
9290
|
] });
|
|
9311
9291
|
}
|
|
9312
9292
|
);
|
|
@@ -9314,12 +9294,12 @@ TextField.displayName = "TextField";
|
|
|
9314
9294
|
|
|
9315
9295
|
// src/textarea/Textarea.tsx
|
|
9316
9296
|
import { forwardRef as forwardRef47, useId as useId10 } from "react";
|
|
9317
|
-
import { jsx as
|
|
9297
|
+
import { jsx as jsx120, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
9318
9298
|
var Textarea = forwardRef47(
|
|
9319
9299
|
({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
|
|
9320
9300
|
const inputId = useId10();
|
|
9321
|
-
return /* @__PURE__ */
|
|
9322
|
-
/* @__PURE__ */
|
|
9301
|
+
return /* @__PURE__ */ jsxs78("div", { className: cn("relative", className), children: [
|
|
9302
|
+
/* @__PURE__ */ jsx120(
|
|
9323
9303
|
"textarea",
|
|
9324
9304
|
{
|
|
9325
9305
|
ref,
|
|
@@ -9335,7 +9315,7 @@ var Textarea = forwardRef47(
|
|
|
9335
9315
|
...textareaProps
|
|
9336
9316
|
}
|
|
9337
9317
|
),
|
|
9338
|
-
label && /* @__PURE__ */
|
|
9318
|
+
label && /* @__PURE__ */ jsx120(
|
|
9339
9319
|
"label",
|
|
9340
9320
|
{
|
|
9341
9321
|
htmlFor: inputId,
|
|
@@ -9353,34 +9333,34 @@ var Textarea = forwardRef47(
|
|
|
9353
9333
|
Textarea.displayName = "Textarea";
|
|
9354
9334
|
|
|
9355
9335
|
// src/three-dots-loader/ThreeDotsLoader.tsx
|
|
9356
|
-
import { Fragment as Fragment11, jsx as
|
|
9336
|
+
import { Fragment as Fragment11, jsx as jsx121, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
9357
9337
|
function Dots({
|
|
9358
9338
|
height,
|
|
9359
9339
|
width,
|
|
9360
9340
|
color
|
|
9361
9341
|
}) {
|
|
9362
|
-
return /* @__PURE__ */
|
|
9342
|
+
return /* @__PURE__ */ jsxs79(
|
|
9363
9343
|
"span",
|
|
9364
9344
|
{
|
|
9365
9345
|
className: "inline-flex items-center justify-center gap-[15%]",
|
|
9366
9346
|
style: { height, width },
|
|
9367
9347
|
"aria-hidden": "true",
|
|
9368
9348
|
children: [
|
|
9369
|
-
/* @__PURE__ */
|
|
9349
|
+
/* @__PURE__ */ jsx121(
|
|
9370
9350
|
"span",
|
|
9371
9351
|
{
|
|
9372
9352
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.32s]",
|
|
9373
9353
|
style: { backgroundColor: color }
|
|
9374
9354
|
}
|
|
9375
9355
|
),
|
|
9376
|
-
/* @__PURE__ */
|
|
9356
|
+
/* @__PURE__ */ jsx121(
|
|
9377
9357
|
"span",
|
|
9378
9358
|
{
|
|
9379
9359
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.16s]",
|
|
9380
9360
|
style: { backgroundColor: color }
|
|
9381
9361
|
}
|
|
9382
9362
|
),
|
|
9383
|
-
/* @__PURE__ */
|
|
9363
|
+
/* @__PURE__ */ jsx121(
|
|
9384
9364
|
"span",
|
|
9385
9365
|
{
|
|
9386
9366
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full",
|
|
@@ -9399,31 +9379,32 @@ function ThreeDotsLoader({
|
|
|
9399
9379
|
className,
|
|
9400
9380
|
labelPlacement = "right"
|
|
9401
9381
|
}) {
|
|
9402
|
-
const dots = /* @__PURE__ */
|
|
9382
|
+
const dots = /* @__PURE__ */ jsx121(Dots, { color, height, width });
|
|
9403
9383
|
if (label) {
|
|
9404
|
-
return /* @__PURE__ */
|
|
9384
|
+
return /* @__PURE__ */ jsx121(
|
|
9405
9385
|
"div",
|
|
9406
9386
|
{
|
|
9407
9387
|
className: cn(
|
|
9408
9388
|
"flex items-center justify-center gap-x-[13px] [&>div]:text-sm [&>div]:font-bold [&>div]:uppercase [&>div]:text-[#9696b9] [&>div]:opacity-50",
|
|
9409
9389
|
className
|
|
9410
9390
|
),
|
|
9411
|
-
|
|
9391
|
+
role: "progressbar",
|
|
9392
|
+
children: labelPlacement === "right" ? /* @__PURE__ */ jsxs79(Fragment11, { children: [
|
|
9412
9393
|
dots,
|
|
9413
|
-
/* @__PURE__ */
|
|
9414
|
-
] }) : /* @__PURE__ */
|
|
9415
|
-
/* @__PURE__ */
|
|
9394
|
+
/* @__PURE__ */ jsx121("div", { children: label })
|
|
9395
|
+
] }) : /* @__PURE__ */ jsxs79(Fragment11, { children: [
|
|
9396
|
+
/* @__PURE__ */ jsx121("div", { children: label }),
|
|
9416
9397
|
dots
|
|
9417
9398
|
] })
|
|
9418
9399
|
}
|
|
9419
9400
|
);
|
|
9420
9401
|
}
|
|
9421
|
-
return /* @__PURE__ */
|
|
9402
|
+
return /* @__PURE__ */ jsx121("div", { role: "progressbar", className, children: dots });
|
|
9422
9403
|
}
|
|
9423
9404
|
|
|
9424
9405
|
// src/uploaded-files-list/UploadedFilesList.tsx
|
|
9425
9406
|
import { X as X7 } from "lucide-react";
|
|
9426
|
-
import { jsx as
|
|
9407
|
+
import { jsx as jsx122, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
9427
9408
|
function UploadedFilesList({
|
|
9428
9409
|
files,
|
|
9429
9410
|
onRemoveFile,
|
|
@@ -9432,20 +9413,20 @@ function UploadedFilesList({
|
|
|
9432
9413
|
if (!files.length) {
|
|
9433
9414
|
return null;
|
|
9434
9415
|
}
|
|
9435
|
-
return /* @__PURE__ */
|
|
9416
|
+
return /* @__PURE__ */ jsx122("div", { className: cn("flex flex-wrap gap-2.5", className), children: files.map((file, index) => /* @__PURE__ */ jsxs80(
|
|
9436
9417
|
"div",
|
|
9437
9418
|
{
|
|
9438
9419
|
className: "flex cursor-default items-center gap-2 rounded border border-[var(--chekin-color-gray-2)] bg-[var(--chekin-color-surface-pressed)] py-1.5 pl-3 pr-1.5",
|
|
9439
9420
|
children: [
|
|
9440
|
-
/* @__PURE__ */
|
|
9441
|
-
/* @__PURE__ */
|
|
9421
|
+
/* @__PURE__ */ jsx122("span", { className: "text-nowrap text-sm font-medium leading-5 text-[var(--chekin-color-brand-navy)]", children: file.name }),
|
|
9422
|
+
/* @__PURE__ */ jsx122(
|
|
9442
9423
|
"button",
|
|
9443
9424
|
{
|
|
9444
9425
|
type: "button",
|
|
9445
9426
|
onClick: () => onRemoveFile(file.name),
|
|
9446
9427
|
className: "flex h-[18px] w-[18px] shrink-0 cursor-pointer items-center justify-center rounded bg-[var(--chekin-color-gray-1)] transition-all hover:shadow-md active:opacity-95",
|
|
9447
9428
|
"aria-label": `Remove ${file.name}`,
|
|
9448
|
-
children: /* @__PURE__ */
|
|
9429
|
+
children: /* @__PURE__ */ jsx122(X7, { className: "h-3.5 w-3.5 text-white", strokeWidth: 3 })
|
|
9449
9430
|
}
|
|
9450
9431
|
)
|
|
9451
9432
|
]
|
|
@@ -9455,9 +9436,9 @@ function UploadedFilesList({
|
|
|
9455
9436
|
}
|
|
9456
9437
|
|
|
9457
9438
|
// src/wide-button/WideButton.tsx
|
|
9458
|
-
import { jsx as
|
|
9439
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
9459
9440
|
function WideButton({ className, disabled, ...props }) {
|
|
9460
|
-
return /* @__PURE__ */
|
|
9441
|
+
return /* @__PURE__ */ jsx123(
|
|
9461
9442
|
Button,
|
|
9462
9443
|
{
|
|
9463
9444
|
variant: "ghost",
|
|
@@ -9481,22 +9462,22 @@ import { Calendar as Calendar2 } from "lucide-react";
|
|
|
9481
9462
|
import * as React30 from "react";
|
|
9482
9463
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
9483
9464
|
import Draggable from "react-draggable";
|
|
9484
|
-
import { jsx as
|
|
9465
|
+
import { jsx as jsx124, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
9485
9466
|
var DRAWER_CLOSE_THRESHOLD = 72;
|
|
9486
9467
|
var DRAWER_MIN_OVERLAY_OPACITY = 0.1;
|
|
9487
9468
|
function Drawer({ ...props }) {
|
|
9488
|
-
return /* @__PURE__ */
|
|
9469
|
+
return /* @__PURE__ */ jsx124(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
|
|
9489
9470
|
}
|
|
9490
9471
|
function DrawerTrigger({ ...props }) {
|
|
9491
|
-
return /* @__PURE__ */
|
|
9472
|
+
return /* @__PURE__ */ jsx124(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
9492
9473
|
}
|
|
9493
9474
|
function DrawerPortal({ ...props }) {
|
|
9494
|
-
return /* @__PURE__ */
|
|
9475
|
+
return /* @__PURE__ */ jsx124(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
|
|
9495
9476
|
}
|
|
9496
9477
|
function DrawerClose({ ...props }) {
|
|
9497
|
-
return /* @__PURE__ */
|
|
9478
|
+
return /* @__PURE__ */ jsx124(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
|
|
9498
9479
|
}
|
|
9499
|
-
var DrawerOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9480
|
+
var DrawerOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx124(
|
|
9500
9481
|
DialogPrimitive2.Overlay,
|
|
9501
9482
|
{
|
|
9502
9483
|
ref,
|
|
@@ -9545,14 +9526,14 @@ var DrawerContent = React30.forwardRef(
|
|
|
9545
9526
|
},
|
|
9546
9527
|
[onClose]
|
|
9547
9528
|
);
|
|
9548
|
-
return /* @__PURE__ */
|
|
9549
|
-
lockScroll ? /* @__PURE__ */
|
|
9529
|
+
return /* @__PURE__ */ jsxs81(DrawerPortal, { container: finalContainer, children: [
|
|
9530
|
+
lockScroll ? /* @__PURE__ */ jsx124(
|
|
9550
9531
|
DrawerOverlay,
|
|
9551
9532
|
{
|
|
9552
9533
|
style: { opacity: overlayOpacity },
|
|
9553
9534
|
onClick: closeOnOverlayClick ? onClose : void 0
|
|
9554
9535
|
}
|
|
9555
|
-
) : /* @__PURE__ */
|
|
9536
|
+
) : /* @__PURE__ */ jsx124(
|
|
9556
9537
|
"div",
|
|
9557
9538
|
{
|
|
9558
9539
|
className: cn(DrawerOverlayClasses),
|
|
@@ -9560,7 +9541,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9560
9541
|
onClick: closeOnOverlayClick ? onClose : void 0
|
|
9561
9542
|
}
|
|
9562
9543
|
),
|
|
9563
|
-
/* @__PURE__ */
|
|
9544
|
+
/* @__PURE__ */ jsx124(
|
|
9564
9545
|
DialogPrimitive2.Content,
|
|
9565
9546
|
{
|
|
9566
9547
|
asChild: true,
|
|
@@ -9576,7 +9557,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9576
9557
|
}
|
|
9577
9558
|
},
|
|
9578
9559
|
...props,
|
|
9579
|
-
children: /* @__PURE__ */
|
|
9560
|
+
children: /* @__PURE__ */ jsx124("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ jsx124(
|
|
9580
9561
|
Draggable,
|
|
9581
9562
|
{
|
|
9582
9563
|
axis: "y",
|
|
@@ -9586,7 +9567,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9586
9567
|
onDrag: handleDrag,
|
|
9587
9568
|
onStop: handleStop,
|
|
9588
9569
|
position: { x: 0, y: dragOffsetY },
|
|
9589
|
-
children: /* @__PURE__ */
|
|
9570
|
+
children: /* @__PURE__ */ jsxs81(
|
|
9590
9571
|
"div",
|
|
9591
9572
|
{
|
|
9592
9573
|
ref: nodeRef,
|
|
@@ -9595,15 +9576,15 @@ var DrawerContent = React30.forwardRef(
|
|
|
9595
9576
|
className
|
|
9596
9577
|
),
|
|
9597
9578
|
children: [
|
|
9598
|
-
showHandle && /* @__PURE__ */
|
|
9579
|
+
showHandle && /* @__PURE__ */ jsx124(
|
|
9599
9580
|
"div",
|
|
9600
9581
|
{
|
|
9601
9582
|
"data-drawer-handle": true,
|
|
9602
9583
|
className: "mx-auto flex h-8 w-24 cursor-grab touch-none items-center justify-center active:cursor-grabbing",
|
|
9603
|
-
children: /* @__PURE__ */
|
|
9584
|
+
children: /* @__PURE__ */ jsx124("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
|
|
9604
9585
|
}
|
|
9605
9586
|
),
|
|
9606
|
-
/* @__PURE__ */
|
|
9587
|
+
/* @__PURE__ */ jsx124("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
|
|
9607
9588
|
]
|
|
9608
9589
|
}
|
|
9609
9590
|
)
|
|
@@ -9615,7 +9596,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9615
9596
|
}
|
|
9616
9597
|
);
|
|
9617
9598
|
DrawerContent.displayName = DialogPrimitive2.Content.displayName;
|
|
9618
|
-
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
9599
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx124(
|
|
9619
9600
|
"div",
|
|
9620
9601
|
{
|
|
9621
9602
|
className: cn("flex flex-col gap-2 px-5 pt-2 text-center", className),
|
|
@@ -9623,9 +9604,9 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx125(
|
|
|
9623
9604
|
}
|
|
9624
9605
|
);
|
|
9625
9606
|
DrawerHeader.displayName = "DrawerHeader";
|
|
9626
|
-
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
9607
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx124("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
|
|
9627
9608
|
DrawerFooter.displayName = "DrawerFooter";
|
|
9628
|
-
var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9609
|
+
var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx124(
|
|
9629
9610
|
DialogPrimitive2.Title,
|
|
9630
9611
|
{
|
|
9631
9612
|
ref,
|
|
@@ -9635,7 +9616,7 @@ var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
9635
9616
|
}
|
|
9636
9617
|
));
|
|
9637
9618
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
9638
|
-
var DrawerDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9619
|
+
var DrawerDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx124(
|
|
9639
9620
|
DialogPrimitive2.Description,
|
|
9640
9621
|
{
|
|
9641
9622
|
ref,
|
|
@@ -10068,7 +10049,7 @@ function useDatePickerWheel({
|
|
|
10068
10049
|
}
|
|
10069
10050
|
|
|
10070
10051
|
// src/datepicker/DatePickerWheelColumn.tsx
|
|
10071
|
-
import { jsx as
|
|
10052
|
+
import { jsx as jsx125, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
10072
10053
|
var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
|
|
10073
10054
|
function DatePickerWheelColumn({
|
|
10074
10055
|
id,
|
|
@@ -10082,7 +10063,7 @@ function DatePickerWheelColumn({
|
|
|
10082
10063
|
onOptionSelect,
|
|
10083
10064
|
column
|
|
10084
10065
|
}) {
|
|
10085
|
-
return /* @__PURE__ */
|
|
10066
|
+
return /* @__PURE__ */ jsx125("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ jsxs82(
|
|
10086
10067
|
"div",
|
|
10087
10068
|
{
|
|
10088
10069
|
id,
|
|
@@ -10099,14 +10080,14 @@ function DatePickerWheelColumn({
|
|
|
10099
10080
|
WebkitOverflowScrolling: "touch"
|
|
10100
10081
|
},
|
|
10101
10082
|
children: [
|
|
10102
|
-
/* @__PURE__ */
|
|
10083
|
+
/* @__PURE__ */ jsx125("div", { style: { height: `${spacerHeight}px` } }),
|
|
10103
10084
|
items.map((item, index) => {
|
|
10104
10085
|
const { style } = getWheelOptionStyles(
|
|
10105
10086
|
index,
|
|
10106
10087
|
scrollTop,
|
|
10107
10088
|
DATE_PICKER_OPTION_HEIGHT
|
|
10108
10089
|
);
|
|
10109
|
-
return /* @__PURE__ */
|
|
10090
|
+
return /* @__PURE__ */ jsx125(
|
|
10110
10091
|
"button",
|
|
10111
10092
|
{
|
|
10112
10093
|
id: `${id}-option-${index}`,
|
|
@@ -10122,14 +10103,14 @@ function DatePickerWheelColumn({
|
|
|
10122
10103
|
`${column}-${item}-${index}`
|
|
10123
10104
|
);
|
|
10124
10105
|
}),
|
|
10125
|
-
/* @__PURE__ */
|
|
10106
|
+
/* @__PURE__ */ jsx125("div", { style: { height: `${spacerHeight}px` } })
|
|
10126
10107
|
]
|
|
10127
10108
|
}
|
|
10128
10109
|
) });
|
|
10129
10110
|
}
|
|
10130
10111
|
|
|
10131
10112
|
// src/datepicker/DatePickerContent.tsx
|
|
10132
|
-
import { jsx as
|
|
10113
|
+
import { jsx as jsx126, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
10133
10114
|
function DatePickerBody({
|
|
10134
10115
|
baseId,
|
|
10135
10116
|
label,
|
|
@@ -10151,19 +10132,19 @@ function DatePickerBody({
|
|
|
10151
10132
|
onOptionSelect,
|
|
10152
10133
|
onDone
|
|
10153
10134
|
}) {
|
|
10154
|
-
return /* @__PURE__ */
|
|
10155
|
-
/* @__PURE__ */
|
|
10156
|
-
/* @__PURE__ */
|
|
10157
|
-
/* @__PURE__ */
|
|
10158
|
-
/* @__PURE__ */
|
|
10135
|
+
return /* @__PURE__ */ jsxs83("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
|
|
10136
|
+
/* @__PURE__ */ jsxs83("div", { className: "relative overflow-hidden rounded-[24px]", children: [
|
|
10137
|
+
/* @__PURE__ */ jsx126("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
|
|
10138
|
+
/* @__PURE__ */ jsx126("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 z-20 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
|
|
10139
|
+
/* @__PURE__ */ jsx126(
|
|
10159
10140
|
"div",
|
|
10160
10141
|
{
|
|
10161
10142
|
"aria-hidden": true,
|
|
10162
10143
|
className: "pointer-events-none absolute inset-x-0 top-1/2 z-0 h-8 -translate-y-1/2 rounded-[12px] bg-black/[0.04]"
|
|
10163
10144
|
}
|
|
10164
10145
|
),
|
|
10165
|
-
/* @__PURE__ */
|
|
10166
|
-
/* @__PURE__ */
|
|
10146
|
+
/* @__PURE__ */ jsxs83("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
|
|
10147
|
+
/* @__PURE__ */ jsx126(
|
|
10167
10148
|
DatePickerWheelColumn,
|
|
10168
10149
|
{
|
|
10169
10150
|
id: `${baseId}-month`,
|
|
@@ -10178,7 +10159,7 @@ function DatePickerBody({
|
|
|
10178
10159
|
onOptionSelect
|
|
10179
10160
|
}
|
|
10180
10161
|
),
|
|
10181
|
-
/* @__PURE__ */
|
|
10162
|
+
/* @__PURE__ */ jsx126(
|
|
10182
10163
|
DatePickerWheelColumn,
|
|
10183
10164
|
{
|
|
10184
10165
|
id: `${baseId}-day`,
|
|
@@ -10193,7 +10174,7 @@ function DatePickerBody({
|
|
|
10193
10174
|
onOptionSelect
|
|
10194
10175
|
}
|
|
10195
10176
|
),
|
|
10196
|
-
/* @__PURE__ */
|
|
10177
|
+
/* @__PURE__ */ jsx126(
|
|
10197
10178
|
DatePickerWheelColumn,
|
|
10198
10179
|
{
|
|
10199
10180
|
id: `${baseId}-year`,
|
|
@@ -10210,7 +10191,7 @@ function DatePickerBody({
|
|
|
10210
10191
|
)
|
|
10211
10192
|
] })
|
|
10212
10193
|
] }),
|
|
10213
|
-
/* @__PURE__ */
|
|
10194
|
+
/* @__PURE__ */ jsx126(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
|
|
10214
10195
|
] });
|
|
10215
10196
|
}
|
|
10216
10197
|
function DatePickerContent({
|
|
@@ -10238,7 +10219,7 @@ function DatePickerContent({
|
|
|
10238
10219
|
onColumnKeyDown,
|
|
10239
10220
|
onOptionSelect
|
|
10240
10221
|
}) {
|
|
10241
|
-
const body = /* @__PURE__ */
|
|
10222
|
+
const body = /* @__PURE__ */ jsx126(
|
|
10242
10223
|
DatePickerBody,
|
|
10243
10224
|
{
|
|
10244
10225
|
baseId,
|
|
@@ -10263,27 +10244,27 @@ function DatePickerContent({
|
|
|
10263
10244
|
}
|
|
10264
10245
|
);
|
|
10265
10246
|
if (isMobile) {
|
|
10266
|
-
return /* @__PURE__ */
|
|
10247
|
+
return /* @__PURE__ */ jsx126(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs83(
|
|
10267
10248
|
DrawerContent,
|
|
10268
10249
|
{
|
|
10269
10250
|
onClose: () => onOpenChange(false),
|
|
10270
10251
|
className: "rounded-none rounded-t-[32px] border-0 p-0",
|
|
10271
10252
|
children: [
|
|
10272
|
-
/* @__PURE__ */
|
|
10273
|
-
/* @__PURE__ */
|
|
10253
|
+
/* @__PURE__ */ jsx126(DrawerTitle, { className: "sr-only", children: title }),
|
|
10254
|
+
/* @__PURE__ */ jsx126(DrawerDescription, { className: "sr-only", children: label }),
|
|
10274
10255
|
body
|
|
10275
10256
|
]
|
|
10276
10257
|
}
|
|
10277
10258
|
) });
|
|
10278
10259
|
}
|
|
10279
|
-
return /* @__PURE__ */
|
|
10260
|
+
return /* @__PURE__ */ jsx126(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs83(
|
|
10280
10261
|
DialogContent,
|
|
10281
10262
|
{
|
|
10282
10263
|
className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
10283
10264
|
showCloseButton: false,
|
|
10284
10265
|
children: [
|
|
10285
|
-
/* @__PURE__ */
|
|
10286
|
-
/* @__PURE__ */
|
|
10266
|
+
/* @__PURE__ */ jsx126(DialogTitle, { className: "sr-only", children: title }),
|
|
10267
|
+
/* @__PURE__ */ jsx126(DialogDescription, { className: "sr-only", children: label }),
|
|
10287
10268
|
body
|
|
10288
10269
|
]
|
|
10289
10270
|
}
|
|
@@ -10307,12 +10288,12 @@ var DEVICE = {
|
|
|
10307
10288
|
|
|
10308
10289
|
// src/field-trigger/FieldTrigger.tsx
|
|
10309
10290
|
import * as React32 from "react";
|
|
10310
|
-
import { Loader2 as
|
|
10311
|
-
import { useTranslation as
|
|
10291
|
+
import { Loader2 as Loader24 } from "lucide-react";
|
|
10292
|
+
import { useTranslation as useTranslation24 } from "react-i18next";
|
|
10312
10293
|
|
|
10313
10294
|
// src/field-error-message/FieldErrorMessage.tsx
|
|
10314
10295
|
import { AlertCircle as AlertCircle3 } from "lucide-react";
|
|
10315
|
-
import { jsx as
|
|
10296
|
+
import { jsx as jsx127, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
10316
10297
|
function FieldErrorMessage({
|
|
10317
10298
|
id,
|
|
10318
10299
|
message,
|
|
@@ -10323,7 +10304,7 @@ function FieldErrorMessage({
|
|
|
10323
10304
|
}) {
|
|
10324
10305
|
const content = message ?? children;
|
|
10325
10306
|
if (!content) return null;
|
|
10326
|
-
return /* @__PURE__ */
|
|
10307
|
+
return /* @__PURE__ */ jsxs84(
|
|
10327
10308
|
"p",
|
|
10328
10309
|
{
|
|
10329
10310
|
id,
|
|
@@ -10335,21 +10316,21 @@ function FieldErrorMessage({
|
|
|
10335
10316
|
),
|
|
10336
10317
|
...props,
|
|
10337
10318
|
children: [
|
|
10338
|
-
/* @__PURE__ */
|
|
10319
|
+
/* @__PURE__ */ jsx127(
|
|
10339
10320
|
AlertCircle3,
|
|
10340
10321
|
{
|
|
10341
10322
|
className: "h-[18px] w-[18px] shrink-0 text-white",
|
|
10342
10323
|
fill: "var(--error-message-color)"
|
|
10343
10324
|
}
|
|
10344
10325
|
),
|
|
10345
|
-
/* @__PURE__ */
|
|
10326
|
+
/* @__PURE__ */ jsx127("span", { children: content })
|
|
10346
10327
|
]
|
|
10347
10328
|
}
|
|
10348
10329
|
);
|
|
10349
10330
|
}
|
|
10350
10331
|
|
|
10351
10332
|
// src/field-trigger/FieldTrigger.tsx
|
|
10352
|
-
import { Fragment as Fragment12, jsx as
|
|
10333
|
+
import { Fragment as Fragment12, jsx as jsx128, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
10353
10334
|
var FieldTrigger = React32.forwardRef(
|
|
10354
10335
|
({
|
|
10355
10336
|
as = "button",
|
|
@@ -10381,20 +10362,20 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10381
10362
|
onKeyDown,
|
|
10382
10363
|
...props
|
|
10383
10364
|
}, ref) => {
|
|
10384
|
-
const { t } =
|
|
10365
|
+
const { t } = useTranslation24();
|
|
10385
10366
|
const hasValue = Boolean(valueText);
|
|
10386
10367
|
const isRaised = hasValue || forceFloatingLabel;
|
|
10387
10368
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
10388
10369
|
const visibleLabelText = labelText ?? label;
|
|
10389
10370
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
10390
|
-
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */
|
|
10391
|
-
/* @__PURE__ */
|
|
10392
|
-
optionalLabel && /* @__PURE__ */
|
|
10371
|
+
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ jsxs85("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
|
|
10372
|
+
/* @__PURE__ */ jsx128("span", { className: "min-w-0 truncate", children: visibleLabelText }),
|
|
10373
|
+
optionalLabel && /* @__PURE__ */ jsxs85("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
|
|
10393
10374
|
"(",
|
|
10394
10375
|
optionalLabel,
|
|
10395
10376
|
")"
|
|
10396
10377
|
] }),
|
|
10397
|
-
tooltip && /* @__PURE__ */
|
|
10378
|
+
tooltip && /* @__PURE__ */ jsx128(
|
|
10398
10379
|
HelpTooltip,
|
|
10399
10380
|
{
|
|
10400
10381
|
content: tooltip,
|
|
@@ -10410,10 +10391,10 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10410
10391
|
const hasInvalidState = Boolean(error);
|
|
10411
10392
|
const errorMessage = typeof error === "string" ? error : void 0;
|
|
10412
10393
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
10413
|
-
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */
|
|
10394
|
+
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ jsxs85("span", { className: "flex items-center gap-2", children: [
|
|
10414
10395
|
trailingAdornment,
|
|
10415
|
-
loading && /* @__PURE__ */
|
|
10416
|
-
|
|
10396
|
+
loading && /* @__PURE__ */ jsx128(
|
|
10397
|
+
Loader24,
|
|
10417
10398
|
{
|
|
10418
10399
|
"aria-hidden": "true",
|
|
10419
10400
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-1)]"
|
|
@@ -10428,8 +10409,8 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10428
10409
|
disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : isAirbnbVariant ? "cursor-pointer" : "cursor-text",
|
|
10429
10410
|
className
|
|
10430
10411
|
);
|
|
10431
|
-
const sharedContent = /* @__PURE__ */
|
|
10432
|
-
/* @__PURE__ */
|
|
10412
|
+
const sharedContent = /* @__PURE__ */ jsxs85(Fragment12, { children: [
|
|
10413
|
+
/* @__PURE__ */ jsxs85(
|
|
10433
10414
|
"span",
|
|
10434
10415
|
{
|
|
10435
10416
|
className: cn(
|
|
@@ -10438,7 +10419,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10438
10419
|
contentClassName
|
|
10439
10420
|
),
|
|
10440
10421
|
children: [
|
|
10441
|
-
/* @__PURE__ */
|
|
10422
|
+
/* @__PURE__ */ jsx128(
|
|
10442
10423
|
"span",
|
|
10443
10424
|
{
|
|
10444
10425
|
id: labelId,
|
|
@@ -10451,7 +10432,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10451
10432
|
children: animatedLabel
|
|
10452
10433
|
}
|
|
10453
10434
|
),
|
|
10454
|
-
children ? children : hasValue ? /* @__PURE__ */
|
|
10435
|
+
children ? children : hasValue ? /* @__PURE__ */ jsx128(
|
|
10455
10436
|
"span",
|
|
10456
10437
|
{
|
|
10457
10438
|
id: valueId,
|
|
@@ -10462,11 +10443,11 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10462
10443
|
),
|
|
10463
10444
|
children: valueText
|
|
10464
10445
|
}
|
|
10465
|
-
) : /* @__PURE__ */
|
|
10446
|
+
) : /* @__PURE__ */ jsx128("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
|
|
10466
10447
|
]
|
|
10467
10448
|
}
|
|
10468
10449
|
),
|
|
10469
|
-
resolvedTrailingAdornment && /* @__PURE__ */
|
|
10450
|
+
resolvedTrailingAdornment && /* @__PURE__ */ jsx128(
|
|
10470
10451
|
"span",
|
|
10471
10452
|
{
|
|
10472
10453
|
"aria-hidden": "true",
|
|
@@ -10478,9 +10459,9 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10478
10459
|
}
|
|
10479
10460
|
)
|
|
10480
10461
|
] });
|
|
10481
|
-
return /* @__PURE__ */
|
|
10482
|
-
topLabel && /* @__PURE__ */
|
|
10483
|
-
as === "button" ? /* @__PURE__ */
|
|
10462
|
+
return /* @__PURE__ */ jsxs85("div", { className: "w-full", children: [
|
|
10463
|
+
topLabel && /* @__PURE__ */ jsx128("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
|
|
10464
|
+
as === "button" ? /* @__PURE__ */ jsx128(
|
|
10484
10465
|
"button",
|
|
10485
10466
|
{
|
|
10486
10467
|
id,
|
|
@@ -10497,7 +10478,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10497
10478
|
...props,
|
|
10498
10479
|
children: sharedContent
|
|
10499
10480
|
}
|
|
10500
|
-
) : /* @__PURE__ */
|
|
10481
|
+
) : /* @__PURE__ */ jsx128(
|
|
10501
10482
|
"div",
|
|
10502
10483
|
{
|
|
10503
10484
|
id,
|
|
@@ -10514,14 +10495,14 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10514
10495
|
children: sharedContent
|
|
10515
10496
|
}
|
|
10516
10497
|
),
|
|
10517
|
-
errorMessage && !hideErrorMessage && /* @__PURE__ */
|
|
10498
|
+
errorMessage && !hideErrorMessage && /* @__PURE__ */ jsx128(FieldErrorMessage, { id: errorId, message: errorMessage })
|
|
10518
10499
|
] });
|
|
10519
10500
|
}
|
|
10520
10501
|
);
|
|
10521
10502
|
FieldTrigger.displayName = "FieldTrigger";
|
|
10522
10503
|
|
|
10523
10504
|
// src/datepicker/DatePicker.tsx
|
|
10524
|
-
import { jsx as
|
|
10505
|
+
import { jsx as jsx129, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
10525
10506
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
10526
10507
|
var DatePicker = React33.forwardRef(
|
|
10527
10508
|
({
|
|
@@ -10638,8 +10619,8 @@ var DatePicker = React33.forwardRef(
|
|
|
10638
10619
|
setIsOpen(false);
|
|
10639
10620
|
}
|
|
10640
10621
|
}, [isBlocked]);
|
|
10641
|
-
return /* @__PURE__ */
|
|
10642
|
-
name && /* @__PURE__ */
|
|
10622
|
+
return /* @__PURE__ */ jsxs86("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
|
|
10623
|
+
name && /* @__PURE__ */ jsx129(
|
|
10643
10624
|
"input",
|
|
10644
10625
|
{
|
|
10645
10626
|
type: "hidden",
|
|
@@ -10647,7 +10628,7 @@ var DatePicker = React33.forwardRef(
|
|
|
10647
10628
|
value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
|
|
10648
10629
|
}
|
|
10649
10630
|
),
|
|
10650
|
-
/* @__PURE__ */
|
|
10631
|
+
/* @__PURE__ */ jsx129(
|
|
10651
10632
|
FieldTrigger,
|
|
10652
10633
|
{
|
|
10653
10634
|
id: triggerId,
|
|
@@ -10674,10 +10655,10 @@ var DatePicker = React33.forwardRef(
|
|
|
10674
10655
|
onClick: handleTriggerClick,
|
|
10675
10656
|
onKeyDown: handleTriggerKeyDown,
|
|
10676
10657
|
onBlur,
|
|
10677
|
-
trailingAdornment: /* @__PURE__ */
|
|
10658
|
+
trailingAdornment: /* @__PURE__ */ jsx129(Calendar2, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
10678
10659
|
}
|
|
10679
10660
|
),
|
|
10680
|
-
/* @__PURE__ */
|
|
10661
|
+
/* @__PURE__ */ jsx129(
|
|
10681
10662
|
DatePickerContent,
|
|
10682
10663
|
{
|
|
10683
10664
|
baseId: pickerId,
|
|
@@ -10711,7 +10692,7 @@ var DatePicker = React33.forwardRef(
|
|
|
10711
10692
|
DatePicker.displayName = "DatePicker";
|
|
10712
10693
|
|
|
10713
10694
|
// src/responsive-sheet/ResponsiveSheet.tsx
|
|
10714
|
-
import { jsx as
|
|
10695
|
+
import { jsx as jsx130, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
10715
10696
|
function ResponsiveSheet({
|
|
10716
10697
|
open,
|
|
10717
10698
|
onClose,
|
|
@@ -10746,7 +10727,7 @@ function ResponsiveSheet({
|
|
|
10746
10727
|
event.preventDefault();
|
|
10747
10728
|
}
|
|
10748
10729
|
};
|
|
10749
|
-
const content = /* @__PURE__ */
|
|
10730
|
+
const content = /* @__PURE__ */ jsxs87(
|
|
10750
10731
|
"div",
|
|
10751
10732
|
{
|
|
10752
10733
|
className: cn(
|
|
@@ -10754,7 +10735,7 @@ function ResponsiveSheet({
|
|
|
10754
10735
|
contentClassName
|
|
10755
10736
|
),
|
|
10756
10737
|
children: [
|
|
10757
|
-
title ? /* @__PURE__ */
|
|
10738
|
+
title ? /* @__PURE__ */ jsx130(
|
|
10758
10739
|
"div",
|
|
10759
10740
|
{
|
|
10760
10741
|
className: cn(
|
|
@@ -10764,7 +10745,7 @@ function ResponsiveSheet({
|
|
|
10764
10745
|
children: title
|
|
10765
10746
|
}
|
|
10766
10747
|
) : null,
|
|
10767
|
-
description ? /* @__PURE__ */
|
|
10748
|
+
description ? /* @__PURE__ */ jsx130(
|
|
10768
10749
|
"p",
|
|
10769
10750
|
{
|
|
10770
10751
|
className: cn(
|
|
@@ -10779,7 +10760,7 @@ function ResponsiveSheet({
|
|
|
10779
10760
|
}
|
|
10780
10761
|
);
|
|
10781
10762
|
if (isMobileMode) {
|
|
10782
|
-
return /* @__PURE__ */
|
|
10763
|
+
return /* @__PURE__ */ jsx130(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs87(
|
|
10783
10764
|
DrawerContent,
|
|
10784
10765
|
{
|
|
10785
10766
|
onClose,
|
|
@@ -10789,14 +10770,14 @@ function ResponsiveSheet({
|
|
|
10789
10770
|
onEscapeKeyDown: handleEscapeKeyDown,
|
|
10790
10771
|
className: cn(className, drawerClassName),
|
|
10791
10772
|
children: [
|
|
10792
|
-
title ? /* @__PURE__ */
|
|
10793
|
-
description ? /* @__PURE__ */
|
|
10773
|
+
title ? /* @__PURE__ */ jsx130(DrawerTitle, { className: "sr-only", children: title }) : null,
|
|
10774
|
+
description ? /* @__PURE__ */ jsx130(DrawerDescription, { className: "sr-only", children: description }) : null,
|
|
10794
10775
|
content
|
|
10795
10776
|
]
|
|
10796
10777
|
}
|
|
10797
10778
|
) });
|
|
10798
10779
|
}
|
|
10799
|
-
return /* @__PURE__ */
|
|
10780
|
+
return /* @__PURE__ */ jsx130(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs87(
|
|
10800
10781
|
DialogContent,
|
|
10801
10782
|
{
|
|
10802
10783
|
showCloseButton,
|
|
@@ -10806,8 +10787,8 @@ function ResponsiveSheet({
|
|
|
10806
10787
|
className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
|
|
10807
10788
|
lockScroll: false,
|
|
10808
10789
|
children: [
|
|
10809
|
-
title ? /* @__PURE__ */
|
|
10810
|
-
description ? /* @__PURE__ */
|
|
10790
|
+
title ? /* @__PURE__ */ jsx130(DialogTitle, { className: "sr-only", children: title }) : null,
|
|
10791
|
+
description ? /* @__PURE__ */ jsx130(DialogDescription, { className: "sr-only", children: description }) : null,
|
|
10811
10792
|
content
|
|
10812
10793
|
]
|
|
10813
10794
|
}
|
|
@@ -10816,7 +10797,7 @@ function ResponsiveSheet({
|
|
|
10816
10797
|
|
|
10817
10798
|
// src/airbnb/input/Input.tsx
|
|
10818
10799
|
import * as React34 from "react";
|
|
10819
|
-
import { jsx as
|
|
10800
|
+
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
10820
10801
|
var getInputValue = (value) => value != null ? String(value) : "";
|
|
10821
10802
|
var AirbnbInput = React34.forwardRef(
|
|
10822
10803
|
({
|
|
@@ -10899,7 +10880,7 @@ var AirbnbInput = React34.forwardRef(
|
|
|
10899
10880
|
setIsFocused(false);
|
|
10900
10881
|
onBlur?.(event);
|
|
10901
10882
|
};
|
|
10902
|
-
return /* @__PURE__ */
|
|
10883
|
+
return /* @__PURE__ */ jsx131("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ jsx131(
|
|
10903
10884
|
FieldTrigger,
|
|
10904
10885
|
{
|
|
10905
10886
|
as: "div",
|
|
@@ -10931,7 +10912,7 @@ var AirbnbInput = React34.forwardRef(
|
|
|
10931
10912
|
forceFloatingLabel: shouldShowLabel,
|
|
10932
10913
|
forceLabelText: hasLabelMeta,
|
|
10933
10914
|
hideErrorMessage: !renderErrorMessage,
|
|
10934
|
-
children: /* @__PURE__ */
|
|
10915
|
+
children: /* @__PURE__ */ jsx131(
|
|
10935
10916
|
"input",
|
|
10936
10917
|
{
|
|
10937
10918
|
...props,
|
|
@@ -10974,7 +10955,7 @@ import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
|
10974
10955
|
import * as React39 from "react";
|
|
10975
10956
|
|
|
10976
10957
|
// src/airbnb/select/SelectDesktopMenu.tsx
|
|
10977
|
-
import { jsx as
|
|
10958
|
+
import { jsx as jsx132, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
10978
10959
|
function SelectDesktopMenu({
|
|
10979
10960
|
id,
|
|
10980
10961
|
options,
|
|
@@ -10993,7 +10974,7 @@ function SelectDesktopMenu({
|
|
|
10993
10974
|
noOptionsMessage
|
|
10994
10975
|
}) {
|
|
10995
10976
|
const emptyMessage = noOptionsMessage?.();
|
|
10996
|
-
return /* @__PURE__ */
|
|
10977
|
+
return /* @__PURE__ */ jsxs88(
|
|
10997
10978
|
"div",
|
|
10998
10979
|
{
|
|
10999
10980
|
id,
|
|
@@ -11006,12 +10987,12 @@ function SelectDesktopMenu({
|
|
|
11006
10987
|
onKeyDown,
|
|
11007
10988
|
className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
|
|
11008
10989
|
children: [
|
|
11009
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */
|
|
10990
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ jsx132("div", { className: "px-4 py-3 text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
11010
10991
|
options.map((option, index) => {
|
|
11011
10992
|
const isSelected = selectedValue?.value === option.value;
|
|
11012
10993
|
const isHighlighted = index === highlightedIndex;
|
|
11013
10994
|
const optionKey = `${String(option.value)}-${index}`;
|
|
11014
|
-
return /* @__PURE__ */
|
|
10995
|
+
return /* @__PURE__ */ jsx132(
|
|
11015
10996
|
"button",
|
|
11016
10997
|
{
|
|
11017
10998
|
id: getOptionId2(index),
|
|
@@ -11043,7 +11024,7 @@ function SelectDesktopMenu({
|
|
|
11043
11024
|
}
|
|
11044
11025
|
|
|
11045
11026
|
// src/airbnb/select/SelectDesktopContent.tsx
|
|
11046
|
-
import { jsx as
|
|
11027
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
11047
11028
|
function SelectDesktopContent({
|
|
11048
11029
|
isOpen,
|
|
11049
11030
|
listboxId,
|
|
@@ -11064,14 +11045,14 @@ function SelectDesktopContent({
|
|
|
11064
11045
|
noOptionsMessage
|
|
11065
11046
|
}) {
|
|
11066
11047
|
if (!isOpen) return null;
|
|
11067
|
-
return /* @__PURE__ */
|
|
11048
|
+
return /* @__PURE__ */ jsx133(
|
|
11068
11049
|
"div",
|
|
11069
11050
|
{
|
|
11070
11051
|
className: cn(
|
|
11071
11052
|
"absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[#DEDAD2] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
|
|
11072
11053
|
dropdownClassName
|
|
11073
11054
|
),
|
|
11074
|
-
children: /* @__PURE__ */
|
|
11055
|
+
children: /* @__PURE__ */ jsx133(
|
|
11075
11056
|
SelectDesktopMenu,
|
|
11076
11057
|
{
|
|
11077
11058
|
id: listboxId,
|
|
@@ -11169,7 +11150,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
11169
11150
|
}
|
|
11170
11151
|
|
|
11171
11152
|
// src/airbnb/select/SelectMobileWheel.tsx
|
|
11172
|
-
import { jsx as
|
|
11153
|
+
import { jsx as jsx134, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
11173
11154
|
function SelectMobileWheel({
|
|
11174
11155
|
id,
|
|
11175
11156
|
options,
|
|
@@ -11188,7 +11169,7 @@ function SelectMobileWheel({
|
|
|
11188
11169
|
}) {
|
|
11189
11170
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
11190
11171
|
const emptyMessage = noOptionsMessage?.();
|
|
11191
|
-
return /* @__PURE__ */
|
|
11172
|
+
return /* @__PURE__ */ jsxs89(
|
|
11192
11173
|
"div",
|
|
11193
11174
|
{
|
|
11194
11175
|
id,
|
|
@@ -11200,10 +11181,10 @@ function SelectMobileWheel({
|
|
|
11200
11181
|
onKeyDown,
|
|
11201
11182
|
className: cn("relative overflow-hidden outline-none", menuClassName),
|
|
11202
11183
|
children: [
|
|
11203
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */
|
|
11204
|
-
/* @__PURE__ */
|
|
11205
|
-
/* @__PURE__ */
|
|
11206
|
-
/* @__PURE__ */
|
|
11184
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ jsx134("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
11185
|
+
/* @__PURE__ */ jsx134("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
|
|
11186
|
+
/* @__PURE__ */ jsx134("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
|
|
11187
|
+
/* @__PURE__ */ jsx134(
|
|
11207
11188
|
"div",
|
|
11208
11189
|
{
|
|
11209
11190
|
"aria-hidden": true,
|
|
@@ -11213,7 +11194,7 @@ function SelectMobileWheel({
|
|
|
11213
11194
|
)
|
|
11214
11195
|
}
|
|
11215
11196
|
),
|
|
11216
|
-
/* @__PURE__ */
|
|
11197
|
+
/* @__PURE__ */ jsxs89(
|
|
11217
11198
|
"div",
|
|
11218
11199
|
{
|
|
11219
11200
|
ref: listRef,
|
|
@@ -11228,11 +11209,11 @@ function SelectMobileWheel({
|
|
|
11228
11209
|
WebkitOverflowScrolling: "touch"
|
|
11229
11210
|
},
|
|
11230
11211
|
children: [
|
|
11231
|
-
/* @__PURE__ */
|
|
11212
|
+
/* @__PURE__ */ jsx134("div", { style: { height: `${spacerHeight2}px` } }),
|
|
11232
11213
|
options.map((option, index) => {
|
|
11233
11214
|
const { distance, style } = getMobileOptionStyles(index, scrollTop);
|
|
11234
11215
|
const optionKey = `${String(option.value)}-${index}`;
|
|
11235
|
-
return /* @__PURE__ */
|
|
11216
|
+
return /* @__PURE__ */ jsx134(
|
|
11236
11217
|
"button",
|
|
11237
11218
|
{
|
|
11238
11219
|
id: getOptionId2(index),
|
|
@@ -11253,7 +11234,7 @@ function SelectMobileWheel({
|
|
|
11253
11234
|
optionKey
|
|
11254
11235
|
);
|
|
11255
11236
|
}),
|
|
11256
|
-
/* @__PURE__ */
|
|
11237
|
+
/* @__PURE__ */ jsx134("div", { style: { height: `${spacerHeight2}px` } })
|
|
11257
11238
|
]
|
|
11258
11239
|
}
|
|
11259
11240
|
)
|
|
@@ -11263,7 +11244,7 @@ function SelectMobileWheel({
|
|
|
11263
11244
|
}
|
|
11264
11245
|
|
|
11265
11246
|
// src/airbnb/select/SelectMobileContent.tsx
|
|
11266
|
-
import { jsx as
|
|
11247
|
+
import { jsx as jsx135, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
11267
11248
|
function SelectMobileContent({
|
|
11268
11249
|
open,
|
|
11269
11250
|
onOpenChange,
|
|
@@ -11287,11 +11268,11 @@ function SelectMobileContent({
|
|
|
11287
11268
|
getOptionId: getOptionId2,
|
|
11288
11269
|
noOptionsMessage
|
|
11289
11270
|
}) {
|
|
11290
|
-
return /* @__PURE__ */
|
|
11291
|
-
/* @__PURE__ */
|
|
11292
|
-
/* @__PURE__ */
|
|
11293
|
-
/* @__PURE__ */
|
|
11294
|
-
/* @__PURE__ */
|
|
11271
|
+
return /* @__PURE__ */ jsx135(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs90(DrawerContent, { onClose, lockScroll: false, children: [
|
|
11272
|
+
/* @__PURE__ */ jsx135(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
11273
|
+
/* @__PURE__ */ jsx135(DrawerDescription, { className: "sr-only", children: label }),
|
|
11274
|
+
/* @__PURE__ */ jsxs90("div", { className: "px-6 pb-4 pt-1", children: [
|
|
11275
|
+
/* @__PURE__ */ jsx135(
|
|
11295
11276
|
SelectMobileWheel,
|
|
11296
11277
|
{
|
|
11297
11278
|
id: listboxId,
|
|
@@ -11310,7 +11291,7 @@ function SelectMobileContent({
|
|
|
11310
11291
|
noOptionsMessage
|
|
11311
11292
|
}
|
|
11312
11293
|
),
|
|
11313
|
-
/* @__PURE__ */
|
|
11294
|
+
/* @__PURE__ */ jsx135(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
|
|
11314
11295
|
] })
|
|
11315
11296
|
] }) });
|
|
11316
11297
|
}
|
|
@@ -11318,7 +11299,7 @@ function SelectMobileContent({
|
|
|
11318
11299
|
// src/airbnb/select/SelectTrigger.tsx
|
|
11319
11300
|
import * as React35 from "react";
|
|
11320
11301
|
import { ChevronDown } from "lucide-react";
|
|
11321
|
-
import { jsx as
|
|
11302
|
+
import { jsx as jsx136 } from "react/jsx-runtime";
|
|
11322
11303
|
var SelectTrigger2 = React35.forwardRef(
|
|
11323
11304
|
({
|
|
11324
11305
|
id,
|
|
@@ -11344,7 +11325,7 @@ var SelectTrigger2 = React35.forwardRef(
|
|
|
11344
11325
|
onKeyDown,
|
|
11345
11326
|
onBlur
|
|
11346
11327
|
}, ref) => {
|
|
11347
|
-
return /* @__PURE__ */
|
|
11328
|
+
return /* @__PURE__ */ jsx136(
|
|
11348
11329
|
FieldTrigger,
|
|
11349
11330
|
{
|
|
11350
11331
|
id,
|
|
@@ -11373,7 +11354,7 @@ var SelectTrigger2 = React35.forwardRef(
|
|
|
11373
11354
|
onClick,
|
|
11374
11355
|
onKeyDown,
|
|
11375
11356
|
onBlur,
|
|
11376
|
-
trailingAdornment: /* @__PURE__ */
|
|
11357
|
+
trailingAdornment: /* @__PURE__ */ jsx136(
|
|
11377
11358
|
ChevronDown,
|
|
11378
11359
|
{
|
|
11379
11360
|
className: open ? "h-6 w-6 rotate-180 text-[#1F1F1B] transition-transform" : "h-6 w-6 text-[#1F1F1B] transition-transform"
|
|
@@ -11735,7 +11716,7 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
|
|
|
11735
11716
|
}
|
|
11736
11717
|
|
|
11737
11718
|
// src/airbnb/select/Select.tsx
|
|
11738
|
-
import { jsx as
|
|
11719
|
+
import { jsx as jsx137, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
11739
11720
|
var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
11740
11721
|
options = [],
|
|
11741
11722
|
value,
|
|
@@ -11912,13 +11893,13 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
11912
11893
|
handleMobileOpenChange(false);
|
|
11913
11894
|
}
|
|
11914
11895
|
};
|
|
11915
|
-
return /* @__PURE__ */
|
|
11896
|
+
return /* @__PURE__ */ jsxs91(
|
|
11916
11897
|
"div",
|
|
11917
11898
|
{
|
|
11918
11899
|
ref: containerRef,
|
|
11919
11900
|
className: cn("relative w-full max-w-[var(--max-field-width)]", className),
|
|
11920
11901
|
children: [
|
|
11921
|
-
name && /* @__PURE__ */
|
|
11902
|
+
name && /* @__PURE__ */ jsx137("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
11922
11903
|
renderTrigger ? renderTrigger({
|
|
11923
11904
|
id: triggerId,
|
|
11924
11905
|
open: isOpen,
|
|
@@ -11940,7 +11921,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
11940
11921
|
onClick: handleTriggerClick,
|
|
11941
11922
|
onKeyDown: handleRootTriggerKeyDown,
|
|
11942
11923
|
onBlur
|
|
11943
|
-
}) : /* @__PURE__ */
|
|
11924
|
+
}) : /* @__PURE__ */ jsx137(
|
|
11944
11925
|
SelectTrigger2,
|
|
11945
11926
|
{
|
|
11946
11927
|
id: triggerId,
|
|
@@ -11968,7 +11949,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
11968
11949
|
onBlur
|
|
11969
11950
|
}
|
|
11970
11951
|
),
|
|
11971
|
-
isMobile ? /* @__PURE__ */
|
|
11952
|
+
isMobile ? /* @__PURE__ */ jsx137(
|
|
11972
11953
|
SelectMobileContent,
|
|
11973
11954
|
{
|
|
11974
11955
|
open: isOpen,
|
|
@@ -11993,7 +11974,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
11993
11974
|
getOptionId: getOptionId2,
|
|
11994
11975
|
noOptionsMessage
|
|
11995
11976
|
}
|
|
11996
|
-
) : /* @__PURE__ */
|
|
11977
|
+
) : /* @__PURE__ */ jsx137(
|
|
11997
11978
|
SelectDesktopContent,
|
|
11998
11979
|
{
|
|
11999
11980
|
isOpen,
|
|
@@ -12027,7 +12008,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12027
12008
|
});
|
|
12028
12009
|
|
|
12029
12010
|
// src/airbnb/phone-field/PhoneField.tsx
|
|
12030
|
-
import { jsx as
|
|
12011
|
+
import { jsx as jsx138, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
12031
12012
|
function formatPhoneCodeOptionLabel(option) {
|
|
12032
12013
|
const label = String(option.label);
|
|
12033
12014
|
const value = String(option.value);
|
|
@@ -12074,9 +12055,9 @@ var PhoneField = React40.forwardRef(
|
|
|
12074
12055
|
const hasInvalidState = Boolean(error) || Boolean(invalid);
|
|
12075
12056
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
12076
12057
|
const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
|
|
12077
|
-
return /* @__PURE__ */
|
|
12078
|
-
name && /* @__PURE__ */
|
|
12079
|
-
codeName && /* @__PURE__ */
|
|
12058
|
+
return /* @__PURE__ */ jsxs92("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
|
|
12059
|
+
name && /* @__PURE__ */ jsx138("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
12060
|
+
codeName && /* @__PURE__ */ jsx138(
|
|
12080
12061
|
"input",
|
|
12081
12062
|
{
|
|
12082
12063
|
type: "hidden",
|
|
@@ -12085,7 +12066,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12085
12066
|
disabled
|
|
12086
12067
|
}
|
|
12087
12068
|
),
|
|
12088
|
-
numberName && /* @__PURE__ */
|
|
12069
|
+
numberName && /* @__PURE__ */ jsx138(
|
|
12089
12070
|
"input",
|
|
12090
12071
|
{
|
|
12091
12072
|
type: "hidden",
|
|
@@ -12094,7 +12075,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12094
12075
|
disabled
|
|
12095
12076
|
}
|
|
12096
12077
|
),
|
|
12097
|
-
topLabel && /* @__PURE__ */
|
|
12078
|
+
topLabel && /* @__PURE__ */ jsx138(
|
|
12098
12079
|
"label",
|
|
12099
12080
|
{
|
|
12100
12081
|
htmlFor: inputId,
|
|
@@ -12102,8 +12083,8 @@ var PhoneField = React40.forwardRef(
|
|
|
12102
12083
|
children: topLabel
|
|
12103
12084
|
}
|
|
12104
12085
|
),
|
|
12105
|
-
/* @__PURE__ */
|
|
12106
|
-
/* @__PURE__ */
|
|
12086
|
+
/* @__PURE__ */ jsxs92("div", { className: "flex items-stretch", children: [
|
|
12087
|
+
/* @__PURE__ */ jsx138(
|
|
12107
12088
|
AirbnbSelect,
|
|
12108
12089
|
{
|
|
12109
12090
|
ref,
|
|
@@ -12134,7 +12115,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12134
12115
|
onClick,
|
|
12135
12116
|
onKeyDown,
|
|
12136
12117
|
valueLabel
|
|
12137
|
-
}) => /* @__PURE__ */
|
|
12118
|
+
}) => /* @__PURE__ */ jsxs92(
|
|
12138
12119
|
"button",
|
|
12139
12120
|
{
|
|
12140
12121
|
id,
|
|
@@ -12156,8 +12137,8 @@ var PhoneField = React40.forwardRef(
|
|
|
12156
12137
|
triggerDisabled ? "cursor-not-allowed opacity-50" : triggerLoading ? "cursor-progress" : "cursor-pointer"
|
|
12157
12138
|
),
|
|
12158
12139
|
children: [
|
|
12159
|
-
/* @__PURE__ */
|
|
12160
|
-
/* @__PURE__ */
|
|
12140
|
+
/* @__PURE__ */ jsx138("span", { children: valueLabel ?? codePlaceholder }),
|
|
12141
|
+
/* @__PURE__ */ jsx138(
|
|
12161
12142
|
ChevronDown2,
|
|
12162
12143
|
{
|
|
12163
12144
|
className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
|
|
@@ -12169,7 +12150,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12169
12150
|
)
|
|
12170
12151
|
}
|
|
12171
12152
|
),
|
|
12172
|
-
/* @__PURE__ */
|
|
12153
|
+
/* @__PURE__ */ jsx138(
|
|
12173
12154
|
AirbnbInput,
|
|
12174
12155
|
{
|
|
12175
12156
|
id: inputId,
|
|
@@ -12201,7 +12182,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12201
12182
|
}
|
|
12202
12183
|
)
|
|
12203
12184
|
] }),
|
|
12204
|
-
error && /* @__PURE__ */
|
|
12185
|
+
error && /* @__PURE__ */ jsx138(FieldErrorMessage, { message: error })
|
|
12205
12186
|
] });
|
|
12206
12187
|
}
|
|
12207
12188
|
);
|
|
@@ -12209,15 +12190,15 @@ PhoneField.displayName = "PhoneField";
|
|
|
12209
12190
|
|
|
12210
12191
|
// src/airbnb/search-input/SearchInput.tsx
|
|
12211
12192
|
import * as React41 from "react";
|
|
12212
|
-
import { useTranslation as
|
|
12193
|
+
import { useTranslation as useTranslation25 } from "react-i18next";
|
|
12213
12194
|
import { Search as Search3, X as X8 } from "lucide-react";
|
|
12214
|
-
import { jsx as
|
|
12195
|
+
import { jsx as jsx139, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
12215
12196
|
var AirbnbSearchInput = React41.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
12216
|
-
const { t } =
|
|
12197
|
+
const { t } = useTranslation25();
|
|
12217
12198
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
12218
|
-
return /* @__PURE__ */
|
|
12219
|
-
/* @__PURE__ */
|
|
12220
|
-
/* @__PURE__ */
|
|
12199
|
+
return /* @__PURE__ */ jsxs93("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
12200
|
+
/* @__PURE__ */ jsx139(Search3, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
12201
|
+
/* @__PURE__ */ jsx139(
|
|
12221
12202
|
"input",
|
|
12222
12203
|
{
|
|
12223
12204
|
...props,
|
|
@@ -12236,13 +12217,13 @@ var AirbnbSearchInput = React41.forwardRef(({ onReset, placeholder, wrapperClass
|
|
|
12236
12217
|
)
|
|
12237
12218
|
}
|
|
12238
12219
|
),
|
|
12239
|
-
onReset && /* @__PURE__ */
|
|
12220
|
+
onReset && /* @__PURE__ */ jsx139(
|
|
12240
12221
|
Button,
|
|
12241
12222
|
{
|
|
12242
12223
|
variant: "ghost",
|
|
12243
12224
|
onClick: onReset,
|
|
12244
12225
|
className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]",
|
|
12245
|
-
children: /* @__PURE__ */
|
|
12226
|
+
children: /* @__PURE__ */ jsx139(X8, { className: "h-5 w-5" })
|
|
12246
12227
|
}
|
|
12247
12228
|
)
|
|
12248
12229
|
] });
|
|
@@ -12254,7 +12235,7 @@ import * as React42 from "react";
|
|
|
12254
12235
|
import { ChevronDown as ChevronDown3, Search as Search4 } from "lucide-react";
|
|
12255
12236
|
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
12256
12237
|
import { useCallback as useCallback25 } from "react";
|
|
12257
|
-
import { jsx as
|
|
12238
|
+
import { jsx as jsx140, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
12258
12239
|
var ROW_HEIGHT = 48;
|
|
12259
12240
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
12260
12241
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -12423,7 +12404,7 @@ var SearchableSelectInternal = ({
|
|
|
12423
12404
|
}
|
|
12424
12405
|
}
|
|
12425
12406
|
}
|
|
12426
|
-
const content = /* @__PURE__ */
|
|
12407
|
+
const content = /* @__PURE__ */ jsx140(
|
|
12427
12408
|
SearchableSelectContent,
|
|
12428
12409
|
{
|
|
12429
12410
|
inputId: searchInputId,
|
|
@@ -12451,9 +12432,9 @@ var SearchableSelectInternal = ({
|
|
|
12451
12432
|
}
|
|
12452
12433
|
);
|
|
12453
12434
|
React42.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
12454
|
-
return /* @__PURE__ */
|
|
12455
|
-
name && /* @__PURE__ */
|
|
12456
|
-
/* @__PURE__ */
|
|
12435
|
+
return /* @__PURE__ */ jsxs94("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
12436
|
+
name && /* @__PURE__ */ jsx140("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
12437
|
+
/* @__PURE__ */ jsx140(
|
|
12457
12438
|
FieldTrigger,
|
|
12458
12439
|
{
|
|
12459
12440
|
id: `${reactId}-trigger`,
|
|
@@ -12488,7 +12469,7 @@ var SearchableSelectInternal = ({
|
|
|
12488
12469
|
},
|
|
12489
12470
|
onKeyDown: handleTriggerKeyDown,
|
|
12490
12471
|
onBlur,
|
|
12491
|
-
trailingAdornment: /* @__PURE__ */
|
|
12472
|
+
trailingAdornment: /* @__PURE__ */ jsx140(
|
|
12492
12473
|
ChevronDown3,
|
|
12493
12474
|
{
|
|
12494
12475
|
className: cn(
|
|
@@ -12499,7 +12480,7 @@ var SearchableSelectInternal = ({
|
|
|
12499
12480
|
)
|
|
12500
12481
|
}
|
|
12501
12482
|
),
|
|
12502
|
-
isMobile ? /* @__PURE__ */
|
|
12483
|
+
isMobile ? /* @__PURE__ */ jsx140(
|
|
12503
12484
|
Drawer,
|
|
12504
12485
|
{
|
|
12505
12486
|
open,
|
|
@@ -12511,13 +12492,13 @@ var SearchableSelectInternal = ({
|
|
|
12511
12492
|
}
|
|
12512
12493
|
closeSelect();
|
|
12513
12494
|
},
|
|
12514
|
-
children: /* @__PURE__ */
|
|
12515
|
-
/* @__PURE__ */
|
|
12516
|
-
/* @__PURE__ */
|
|
12517
|
-
/* @__PURE__ */
|
|
12495
|
+
children: /* @__PURE__ */ jsxs94(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
12496
|
+
/* @__PURE__ */ jsx140(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
12497
|
+
/* @__PURE__ */ jsx140(DrawerDescription, { className: "sr-only", children: label }),
|
|
12498
|
+
/* @__PURE__ */ jsx140("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
12518
12499
|
] })
|
|
12519
12500
|
}
|
|
12520
|
-
) : open ? /* @__PURE__ */
|
|
12501
|
+
) : open ? /* @__PURE__ */ jsx140(
|
|
12521
12502
|
"div",
|
|
12522
12503
|
{
|
|
12523
12504
|
className: cn(
|
|
@@ -12584,16 +12565,16 @@ function SearchableSelectContent({
|
|
|
12584
12565
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
12585
12566
|
}
|
|
12586
12567
|
}, [highlightedIndex, virtualizer]);
|
|
12587
|
-
return /* @__PURE__ */
|
|
12588
|
-
/* @__PURE__ */
|
|
12589
|
-
/* @__PURE__ */
|
|
12568
|
+
return /* @__PURE__ */ jsxs94("div", { className: "p-2", children: [
|
|
12569
|
+
/* @__PURE__ */ jsxs94("div", { className: "relative mb-2", children: [
|
|
12570
|
+
/* @__PURE__ */ jsx140(
|
|
12590
12571
|
Search4,
|
|
12591
12572
|
{
|
|
12592
12573
|
"aria-hidden": "true",
|
|
12593
12574
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
12594
12575
|
}
|
|
12595
12576
|
),
|
|
12596
|
-
/* @__PURE__ */
|
|
12577
|
+
/* @__PURE__ */ jsx140(
|
|
12597
12578
|
"input",
|
|
12598
12579
|
{
|
|
12599
12580
|
id: inputId,
|
|
@@ -12612,7 +12593,7 @@ function SearchableSelectContent({
|
|
|
12612
12593
|
}
|
|
12613
12594
|
)
|
|
12614
12595
|
] }),
|
|
12615
|
-
loading && options.length === 0 ? /* @__PURE__ */
|
|
12596
|
+
loading && options.length === 0 ? /* @__PURE__ */ jsx140("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ jsx140("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : /* @__PURE__ */ jsx140(
|
|
12616
12597
|
"div",
|
|
12617
12598
|
{
|
|
12618
12599
|
id: listboxId,
|
|
@@ -12621,7 +12602,7 @@ function SearchableSelectContent({
|
|
|
12621
12602
|
"aria-labelledby": labelId,
|
|
12622
12603
|
className: cn("overflow-y-auto outline-none", menuClassName),
|
|
12623
12604
|
style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
|
|
12624
|
-
children: /* @__PURE__ */
|
|
12605
|
+
children: /* @__PURE__ */ jsx140(
|
|
12625
12606
|
"div",
|
|
12626
12607
|
{
|
|
12627
12608
|
className: "relative w-full",
|
|
@@ -12629,7 +12610,7 @@ function SearchableSelectContent({
|
|
|
12629
12610
|
children: virtualItems.map((virtualItem) => {
|
|
12630
12611
|
const option = options[virtualItem.index];
|
|
12631
12612
|
if (!option) {
|
|
12632
|
-
return /* @__PURE__ */
|
|
12613
|
+
return /* @__PURE__ */ jsx140(
|
|
12633
12614
|
"div",
|
|
12634
12615
|
{
|
|
12635
12616
|
className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[#6C6C6C]",
|
|
@@ -12644,7 +12625,7 @@ function SearchableSelectContent({
|
|
|
12644
12625
|
}
|
|
12645
12626
|
const isSelected = value?.value === option.value;
|
|
12646
12627
|
const isHighlighted = virtualItem.index === highlightedIndex;
|
|
12647
|
-
return /* @__PURE__ */
|
|
12628
|
+
return /* @__PURE__ */ jsx140(
|
|
12648
12629
|
"button",
|
|
12649
12630
|
{
|
|
12650
12631
|
id: getOptionId(idPrefix, virtualItem.index),
|
|
@@ -12666,7 +12647,7 @@ function SearchableSelectContent({
|
|
|
12666
12647
|
height: `${virtualItem.size}px`,
|
|
12667
12648
|
transform: `translateY(${virtualItem.start}px)`
|
|
12668
12649
|
},
|
|
12669
|
-
children: /* @__PURE__ */
|
|
12650
|
+
children: /* @__PURE__ */ jsx140("span", { className: "truncate text-center", children: String(option.label) })
|
|
12670
12651
|
},
|
|
12671
12652
|
`${String(option.value)}-${virtualItem.index}`
|
|
12672
12653
|
);
|
|
@@ -12824,7 +12805,6 @@ export {
|
|
|
12824
12805
|
LargeModal,
|
|
12825
12806
|
LearnMoreButton,
|
|
12826
12807
|
Link,
|
|
12827
|
-
Loader,
|
|
12828
12808
|
LoadingBar,
|
|
12829
12809
|
METRIC_CARD_VARIANTS,
|
|
12830
12810
|
MetricCard,
|