@chekinapp/ui 0.0.59 → 0.0.61
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 +30 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -496,6 +496,7 @@ __export(index_exports, {
|
|
|
496
496
|
Webcam: () => Webcam,
|
|
497
497
|
WideButton: () => WideButton,
|
|
498
498
|
YouHaveMadeChangesModal: () => YouHaveMadeChangesModal,
|
|
499
|
+
addSupportEmailToMessage: () => addSupportEmailToMessage,
|
|
499
500
|
badgeVariants: () => badgeVariants,
|
|
500
501
|
bookmarkTabsListVariants: () => bookmarkTabsListVariants,
|
|
501
502
|
bookmarkTabsTriggerVariants: () => bookmarkTabsTriggerVariants,
|
|
@@ -519,6 +520,7 @@ __export(index_exports, {
|
|
|
519
520
|
tabsTriggerVariants: () => tabsTriggerVariants,
|
|
520
521
|
toCssSize: () => toCssSize,
|
|
521
522
|
toast: () => import_sonner2.toast,
|
|
523
|
+
toastResponseError: () => toastResponseError,
|
|
522
524
|
toggleVariants: () => toggleVariants,
|
|
523
525
|
uiKitI18nResources: () => uiKitI18nResources,
|
|
524
526
|
uiKitTranslations: () => uiKitTranslations,
|
|
@@ -14511,6 +14513,9 @@ var DEVICE_BREAKPOINTS = {
|
|
|
14511
14513
|
desktop: "2560px"
|
|
14512
14514
|
};
|
|
14513
14515
|
|
|
14516
|
+
// src/lib/toastResponseError.tsx
|
|
14517
|
+
var import_sonner3 = require("sonner");
|
|
14518
|
+
|
|
14514
14519
|
// src/lib/getErrorMessage.ts
|
|
14515
14520
|
function getErrorMessage(error) {
|
|
14516
14521
|
let message = "";
|
|
@@ -14548,6 +14553,29 @@ function getErrorMessage(error) {
|
|
|
14548
14553
|
}
|
|
14549
14554
|
return message;
|
|
14550
14555
|
}
|
|
14556
|
+
|
|
14557
|
+
// src/lib/toastResponseError.tsx
|
|
14558
|
+
var import_i18next = __toESM(require("i18next"), 1);
|
|
14559
|
+
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
14560
|
+
function addSupportEmailToMessage(message, prefixText) {
|
|
14561
|
+
if (typeof message !== "string") {
|
|
14562
|
+
return message;
|
|
14563
|
+
}
|
|
14564
|
+
const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
|
|
14565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { children: [
|
|
14566
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { children: builtMessage }),
|
|
14567
|
+
import_i18next.default.t("reach_us_at_email")
|
|
14568
|
+
] });
|
|
14569
|
+
}
|
|
14570
|
+
function toastResponseError(error, options = {}) {
|
|
14571
|
+
const message = typeof error === "string" ? error : addSupportEmailToMessage(getErrorMessage(error), options?.prefixText);
|
|
14572
|
+
const toastId = error?.message || typeof error === "string" && error || "toastId";
|
|
14573
|
+
import_sonner3.toast.error(message, {
|
|
14574
|
+
id: toastId,
|
|
14575
|
+
duration: options?.autoClose || Infinity,
|
|
14576
|
+
...options
|
|
14577
|
+
});
|
|
14578
|
+
}
|
|
14551
14579
|
// Annotate the CommonJS export names for ESM import in node:
|
|
14552
14580
|
0 && (module.exports = {
|
|
14553
14581
|
Accordion,
|
|
@@ -14826,6 +14854,7 @@ function getErrorMessage(error) {
|
|
|
14826
14854
|
Webcam,
|
|
14827
14855
|
WideButton,
|
|
14828
14856
|
YouHaveMadeChangesModal,
|
|
14857
|
+
addSupportEmailToMessage,
|
|
14829
14858
|
badgeVariants,
|
|
14830
14859
|
bookmarkTabsListVariants,
|
|
14831
14860
|
bookmarkTabsTriggerVariants,
|
|
@@ -14849,6 +14878,7 @@ function getErrorMessage(error) {
|
|
|
14849
14878
|
tabsTriggerVariants,
|
|
14850
14879
|
toCssSize,
|
|
14851
14880
|
toast,
|
|
14881
|
+
toastResponseError,
|
|
14852
14882
|
toggleVariants,
|
|
14853
14883
|
uiKitI18nResources,
|
|
14854
14884
|
uiKitTranslations,
|