@chekinapp/ui 0.0.64 → 0.0.65
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 +51 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -5739,6 +5739,21 @@ var uiKitI18nResources = {
|
|
|
5739
5739
|
pt: { translation: translation_default6 }
|
|
5740
5740
|
};
|
|
5741
5741
|
|
|
5742
|
+
// src/i18n/config.ts
|
|
5743
|
+
var import_i18next = __toESM(require("i18next"), 1);
|
|
5744
|
+
var import_react_i18next9 = require("react-i18next");
|
|
5745
|
+
var i18n = import_i18next.default.createInstance();
|
|
5746
|
+
i18n.use(import_react_i18next9.initReactI18next).init({
|
|
5747
|
+
resources: uiKitI18nResources,
|
|
5748
|
+
fallbackLng: "en",
|
|
5749
|
+
interpolation: {
|
|
5750
|
+
escapeValue: false
|
|
5751
|
+
},
|
|
5752
|
+
returnNull: false,
|
|
5753
|
+
fallbackNS: "translation",
|
|
5754
|
+
load: "languageOnly"
|
|
5755
|
+
});
|
|
5756
|
+
|
|
5742
5757
|
// src/large-modal/LargeModal.tsx
|
|
5743
5758
|
var import_lucide_react15 = require("lucide-react");
|
|
5744
5759
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
@@ -5817,10 +5832,10 @@ function LargeModal({
|
|
|
5817
5832
|
|
|
5818
5833
|
// src/learn-more-button/LearnMoreButton.tsx
|
|
5819
5834
|
var import_lucide_react16 = require("lucide-react");
|
|
5820
|
-
var
|
|
5835
|
+
var import_react_i18next10 = require("react-i18next");
|
|
5821
5836
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5822
5837
|
function LearnMoreButton({ label, ...props }) {
|
|
5823
|
-
const { t } = (0,
|
|
5838
|
+
const { t } = (0, import_react_i18next10.useTranslation)();
|
|
5824
5839
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Button, { variant: "link", ...props, children: [
|
|
5825
5840
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react16.BookOpenIcon, { className: "size-5 text-[var(--button-link-text)]" }),
|
|
5826
5841
|
label || t("learn_more")
|
|
@@ -5854,10 +5869,10 @@ var Link = (0, import_react51.memo)(LinkInternal);
|
|
|
5854
5869
|
// src/image-full-screen-view/ImageFullScreenView.tsx
|
|
5855
5870
|
var import_react52 = require("react");
|
|
5856
5871
|
var import_lucide_react17 = require("lucide-react");
|
|
5857
|
-
var
|
|
5872
|
+
var import_react_i18next11 = require("react-i18next");
|
|
5858
5873
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5859
5874
|
function ImageFullScreenView({ src, alt, onClose }) {
|
|
5860
|
-
const { t } = (0,
|
|
5875
|
+
const { t } = (0, import_react_i18next11.useTranslation)();
|
|
5861
5876
|
const [scale, setScale] = (0, import_react52.useState)(1);
|
|
5862
5877
|
const [rotation, setRotation] = (0, import_react52.useState)(0);
|
|
5863
5878
|
useClickEscape({ onClick: onClose });
|
|
@@ -6213,7 +6228,7 @@ var NumberedList = ({ children, className, itemClassName }) => {
|
|
|
6213
6228
|
};
|
|
6214
6229
|
|
|
6215
6230
|
// src/overlay-loader/OverlayLoader.tsx
|
|
6216
|
-
var
|
|
6231
|
+
var import_react_i18next12 = require("react-i18next");
|
|
6217
6232
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6218
6233
|
function OverlayLoader({
|
|
6219
6234
|
isLoading,
|
|
@@ -6224,7 +6239,7 @@ function OverlayLoader({
|
|
|
6224
6239
|
className = "",
|
|
6225
6240
|
overlayClassName = ""
|
|
6226
6241
|
}) {
|
|
6227
|
-
const { t } = (0,
|
|
6242
|
+
const { t } = (0, import_react_i18next12.useTranslation)();
|
|
6228
6243
|
const resolvedLabel = label || t("loading");
|
|
6229
6244
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: cn("relative", className), children: [
|
|
6230
6245
|
children,
|
|
@@ -6249,7 +6264,7 @@ function OverlayLoader({
|
|
|
6249
6264
|
}
|
|
6250
6265
|
|
|
6251
6266
|
// src/pagination/Pagination.tsx
|
|
6252
|
-
var
|
|
6267
|
+
var import_react_i18next13 = require("react-i18next");
|
|
6253
6268
|
var import_lucide_react21 = require("lucide-react");
|
|
6254
6269
|
|
|
6255
6270
|
// src/select/Select.tsx
|
|
@@ -6672,7 +6687,7 @@ function Pagination({
|
|
|
6672
6687
|
totalItems = 0,
|
|
6673
6688
|
className
|
|
6674
6689
|
}) {
|
|
6675
|
-
const { t } = (0,
|
|
6690
|
+
const { t } = (0, import_react_i18next13.useTranslation)();
|
|
6676
6691
|
const isSimpleVariant = variant === "simple";
|
|
6677
6692
|
const startItem = totalItems === 0 ? 0 : (page - 1) * pageSize + 1;
|
|
6678
6693
|
const endItem = Math.min(page * pageSize, totalItems);
|
|
@@ -7225,7 +7240,7 @@ function RatingRadioGroup({
|
|
|
7225
7240
|
// src/rating-stars/RatingStars.tsx
|
|
7226
7241
|
var React25 = __toESM(require("react"), 1);
|
|
7227
7242
|
var import_lucide_react24 = require("lucide-react");
|
|
7228
|
-
var
|
|
7243
|
+
var import_react_i18next14 = require("react-i18next");
|
|
7229
7244
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
7230
7245
|
function RatingStars({
|
|
7231
7246
|
rating,
|
|
@@ -7240,7 +7255,7 @@ function RatingStars({
|
|
|
7240
7255
|
filledColor = "#ffb700",
|
|
7241
7256
|
emptyColor = "var(--chekin-color-gray-3)"
|
|
7242
7257
|
}) {
|
|
7243
|
-
const { t } = (0,
|
|
7258
|
+
const { t } = (0, import_react_i18next14.useTranslation)();
|
|
7244
7259
|
const normalizedRating = Math.max(0, Math.min(maxRating, rating));
|
|
7245
7260
|
const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
|
|
7246
7261
|
const componentId = React25.useId();
|
|
@@ -7330,7 +7345,7 @@ function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
|
7330
7345
|
|
|
7331
7346
|
// src/search-input/SearchInput.tsx
|
|
7332
7347
|
var import_lucide_react27 = require("lucide-react");
|
|
7333
|
-
var
|
|
7348
|
+
var import_react_i18next15 = require("react-i18next");
|
|
7334
7349
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
7335
7350
|
function SearchInput({
|
|
7336
7351
|
disabled,
|
|
@@ -7345,7 +7360,7 @@ function SearchInput({
|
|
|
7345
7360
|
className,
|
|
7346
7361
|
...props
|
|
7347
7362
|
}) {
|
|
7348
|
-
const { t } = (0,
|
|
7363
|
+
const { t } = (0, import_react_i18next15.useTranslation)();
|
|
7349
7364
|
const placeholderText = placeholder || `${t("search_property")}...`;
|
|
7350
7365
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
7351
7366
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
@@ -7462,7 +7477,7 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
|
|
|
7462
7477
|
// src/section/Section.tsx
|
|
7463
7478
|
var import_react64 = require("react");
|
|
7464
7479
|
var import_lucide_react28 = require("lucide-react");
|
|
7465
|
-
var
|
|
7480
|
+
var import_react_i18next16 = require("react-i18next");
|
|
7466
7481
|
|
|
7467
7482
|
// src/section/constants.ts
|
|
7468
7483
|
var SubSectionSize = /* @__PURE__ */ ((SubSectionSize2) => {
|
|
@@ -7501,7 +7516,7 @@ var Section = (0, import_react64.forwardRef)(
|
|
|
7501
7516
|
hidden,
|
|
7502
7517
|
size
|
|
7503
7518
|
}, ref) => {
|
|
7504
|
-
const { t } = (0,
|
|
7519
|
+
const { t } = (0, import_react_i18next16.useTranslation)();
|
|
7505
7520
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
7506
7521
|
"div",
|
|
7507
7522
|
{
|
|
@@ -8419,7 +8434,7 @@ var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => r
|
|
|
8419
8434
|
|
|
8420
8435
|
// src/signature-canvas/SignatureCanvas.tsx
|
|
8421
8436
|
var import_react69 = require("react");
|
|
8422
|
-
var
|
|
8437
|
+
var import_react_i18next17 = require("react-i18next");
|
|
8423
8438
|
var import_react_signature_pad_wrapper = __toESM(require("react-signature-pad-wrapper"), 1);
|
|
8424
8439
|
|
|
8425
8440
|
// src/assets/icons/sign-finger.svg
|
|
@@ -8454,7 +8469,7 @@ function breakIntoLines(text = "") {
|
|
|
8454
8469
|
}
|
|
8455
8470
|
var SignatureCanvas = (0, import_react69.forwardRef)(
|
|
8456
8471
|
({ onClear, hasSignature, onEnd, onEnable, className, enabled }, ref) => {
|
|
8457
|
-
const { t } = (0,
|
|
8472
|
+
const { t } = (0, import_react_i18next17.useTranslation)();
|
|
8458
8473
|
const internalRef = (0, import_react69.useRef)(null);
|
|
8459
8474
|
const combinedRef = useCombinedRef(ref, internalRef);
|
|
8460
8475
|
(0, import_react69.useEffect)(() => {
|
|
@@ -8770,7 +8785,7 @@ function Slider({ children, slideCount, ...props }) {
|
|
|
8770
8785
|
// src/small-grid-single-item/SmallGridSingleItem.tsx
|
|
8771
8786
|
var import_react70 = require("react");
|
|
8772
8787
|
var import_lucide_react32 = require("lucide-react");
|
|
8773
|
-
var
|
|
8788
|
+
var import_react_i18next18 = require("react-i18next");
|
|
8774
8789
|
|
|
8775
8790
|
// src/switch/Switch.tsx
|
|
8776
8791
|
var React35 = __toESM(require("react"), 1);
|
|
@@ -8865,7 +8880,7 @@ var SmallGridSingleItem = (0, import_react70.memo)(
|
|
|
8865
8880
|
error,
|
|
8866
8881
|
className
|
|
8867
8882
|
}) => {
|
|
8868
|
-
const { t } = (0,
|
|
8883
|
+
const { t } = (0, import_react_i18next18.useTranslation)();
|
|
8869
8884
|
const handleClick = (event) => {
|
|
8870
8885
|
if (!disabled && onClick) onClick(event);
|
|
8871
8886
|
};
|
|
@@ -8934,7 +8949,7 @@ var SmallGridSingleItem = (0, import_react70.memo)(
|
|
|
8934
8949
|
SmallGridSingleItem.displayName = "SmallGridSingleItem";
|
|
8935
8950
|
|
|
8936
8951
|
// src/sorting-action/SortingAction.tsx
|
|
8937
|
-
var
|
|
8952
|
+
var import_react_i18next19 = require("react-i18next");
|
|
8938
8953
|
var import_lucide_react33 = require("lucide-react");
|
|
8939
8954
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
8940
8955
|
function SortingAction({
|
|
@@ -8945,7 +8960,7 @@ function SortingAction({
|
|
|
8945
8960
|
variant = "by_other",
|
|
8946
8961
|
onOpenChange
|
|
8947
8962
|
}) {
|
|
8948
|
-
const { t } = (0,
|
|
8963
|
+
const { t } = (0, import_react_i18next19.useTranslation)();
|
|
8949
8964
|
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(DropdownMenu, { open, onOpenChange, children: [
|
|
8950
8965
|
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
8951
8966
|
"button",
|
|
@@ -8994,7 +9009,7 @@ function SortingAction({
|
|
|
8994
9009
|
|
|
8995
9010
|
// src/status-button/StatusButton.tsx
|
|
8996
9011
|
var import_react71 = require("react");
|
|
8997
|
-
var
|
|
9012
|
+
var import_react_i18next20 = require("react-i18next");
|
|
8998
9013
|
var import_lucide_react34 = require("lucide-react");
|
|
8999
9014
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
9000
9015
|
function StatusButton({
|
|
@@ -9010,7 +9025,7 @@ function StatusButton({
|
|
|
9010
9025
|
variant = "default",
|
|
9011
9026
|
...props
|
|
9012
9027
|
}) {
|
|
9013
|
-
const { t } = (0,
|
|
9028
|
+
const { t } = (0, import_react_i18next20.useTranslation)();
|
|
9014
9029
|
const configMap = (0, import_react71.useMemo)(() => {
|
|
9015
9030
|
const defaultLoadingConfig = {
|
|
9016
9031
|
text: loadingText ?? `${t("saving")}...`,
|
|
@@ -9400,11 +9415,11 @@ function DateTableFilter({ className, ...props }) {
|
|
|
9400
9415
|
|
|
9401
9416
|
// src/table-loader/TableLoader.tsx
|
|
9402
9417
|
var import_react74 = require("react");
|
|
9403
|
-
var
|
|
9418
|
+
var import_react_i18next21 = require("react-i18next");
|
|
9404
9419
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
9405
9420
|
var LoaderComponent = (0, import_react74.forwardRef)(
|
|
9406
9421
|
({ label, className, hideBorder, variant = "primary" }, ref) => {
|
|
9407
|
-
const { t } = (0,
|
|
9422
|
+
const { t } = (0, import_react_i18next21.useTranslation)();
|
|
9408
9423
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9409
9424
|
"div",
|
|
9410
9425
|
{
|
|
@@ -9858,7 +9873,7 @@ var Toggles = (0, import_react76.forwardRef)(TogglesInternal);
|
|
|
9858
9873
|
var React39 = __toESM(require("react"), 1);
|
|
9859
9874
|
var LabelPrimitive2 = __toESM(require("@radix-ui/react-label"), 1);
|
|
9860
9875
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
9861
|
-
var
|
|
9876
|
+
var import_react_i18next22 = require("react-i18next");
|
|
9862
9877
|
|
|
9863
9878
|
// src/text-field/EndIcon.tsx
|
|
9864
9879
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
@@ -9972,7 +9987,7 @@ var TextField = React39.forwardRef(
|
|
|
9972
9987
|
readOnly,
|
|
9973
9988
|
...props
|
|
9974
9989
|
}, ref) => {
|
|
9975
|
-
const { t } = (0,
|
|
9990
|
+
const { t } = (0, import_react_i18next22.useTranslation)();
|
|
9976
9991
|
const hasError = Boolean(error);
|
|
9977
9992
|
const autoId = React39.useId();
|
|
9978
9993
|
const inputId = props.id || autoId;
|
|
@@ -10388,7 +10403,7 @@ function VideoModal({
|
|
|
10388
10403
|
|
|
10389
10404
|
// src/video-player/VideoPlayer.tsx
|
|
10390
10405
|
var import_react79 = require("react");
|
|
10391
|
-
var
|
|
10406
|
+
var import_react_i18next23 = require("react-i18next");
|
|
10392
10407
|
var import_lucide_react39 = require("lucide-react");
|
|
10393
10408
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
10394
10409
|
function VideoPlayer({
|
|
@@ -10399,7 +10414,7 @@ function VideoPlayer({
|
|
|
10399
10414
|
isFullScreen = false,
|
|
10400
10415
|
autoPlay = false
|
|
10401
10416
|
}) {
|
|
10402
|
-
const { t } = (0,
|
|
10417
|
+
const { t } = (0, import_react_i18next23.useTranslation)();
|
|
10403
10418
|
const videoRef = (0, import_react79.useRef)(null);
|
|
10404
10419
|
const iframeRef = (0, import_react79.useRef)(null);
|
|
10405
10420
|
const containerRef = (0, import_react79.useRef)(null);
|
|
@@ -10693,7 +10708,7 @@ function VideoPlayer({
|
|
|
10693
10708
|
|
|
10694
10709
|
// src/webcam/Webcam.tsx
|
|
10695
10710
|
var import_react80 = require("react");
|
|
10696
|
-
var
|
|
10711
|
+
var import_react_i18next24 = require("react-i18next");
|
|
10697
10712
|
var import_react_device_detect = require("react-device-detect");
|
|
10698
10713
|
var import_react_webcam = __toESM(require("react-webcam"), 1);
|
|
10699
10714
|
|
|
@@ -10739,7 +10754,7 @@ var Webcam = (0, import_react80.forwardRef)(
|
|
|
10739
10754
|
className,
|
|
10740
10755
|
mirrored
|
|
10741
10756
|
}, ref) => {
|
|
10742
|
-
const { t } = (0,
|
|
10757
|
+
const { t } = (0, import_react_i18next24.useTranslation)();
|
|
10743
10758
|
const isMounted = useIsMounted();
|
|
10744
10759
|
const [minScreenshotHeight, setMinScreenshotHeight] = (0, import_react80.useState)(
|
|
10745
10760
|
void 0
|
|
@@ -11685,7 +11700,7 @@ var DEVICE = {
|
|
|
11685
11700
|
// src/field-trigger/FieldTrigger.tsx
|
|
11686
11701
|
var React43 = __toESM(require("react"), 1);
|
|
11687
11702
|
var import_lucide_react41 = require("lucide-react");
|
|
11688
|
-
var
|
|
11703
|
+
var import_react_i18next25 = require("react-i18next");
|
|
11689
11704
|
|
|
11690
11705
|
// src/field-error-message/FieldErrorMessage.tsx
|
|
11691
11706
|
var import_lucide_react40 = require("lucide-react");
|
|
@@ -11758,7 +11773,7 @@ var FieldTrigger = React43.forwardRef(
|
|
|
11758
11773
|
onKeyDown,
|
|
11759
11774
|
...props
|
|
11760
11775
|
}, ref) => {
|
|
11761
|
-
const { t } = (0,
|
|
11776
|
+
const { t } = (0, import_react_i18next25.useTranslation)();
|
|
11762
11777
|
const hasValue = Boolean(valueText);
|
|
11763
11778
|
const isRaised = hasValue || forceFloatingLabel;
|
|
11764
11779
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
@@ -13591,11 +13606,11 @@ PhoneField.displayName = "PhoneField";
|
|
|
13591
13606
|
|
|
13592
13607
|
// src/airbnb/search-input/SearchInput.tsx
|
|
13593
13608
|
var React52 = __toESM(require("react"), 1);
|
|
13594
|
-
var
|
|
13609
|
+
var import_react_i18next26 = require("react-i18next");
|
|
13595
13610
|
var import_lucide_react45 = require("lucide-react");
|
|
13596
13611
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
13597
13612
|
var AirbnbSearchInput = React52.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
13598
|
-
const { t } = (0,
|
|
13613
|
+
const { t } = (0, import_react_i18next26.useTranslation)();
|
|
13599
13614
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
13600
13615
|
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
13601
13616
|
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_lucide_react45.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
@@ -14133,7 +14148,7 @@ function getErrorMessage(error) {
|
|
|
14133
14148
|
}
|
|
14134
14149
|
|
|
14135
14150
|
// src/lib/toastResponseError.tsx
|
|
14136
|
-
var
|
|
14151
|
+
var import_i18next2 = __toESM(require("i18next"), 1);
|
|
14137
14152
|
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
14138
14153
|
function addSupportEmailToMessage(message, prefixText) {
|
|
14139
14154
|
if (typeof message !== "string") {
|
|
@@ -14142,7 +14157,7 @@ function addSupportEmailToMessage(message, prefixText) {
|
|
|
14142
14157
|
const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
|
|
14143
14158
|
return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { children: [
|
|
14144
14159
|
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { children: builtMessage }),
|
|
14145
|
-
|
|
14160
|
+
import_i18next2.default.t("reach_us_at_email")
|
|
14146
14161
|
] });
|
|
14147
14162
|
}
|
|
14148
14163
|
function toastResponseError(error, options = {}) {
|