@chekinapp/ui 0.0.11 → 0.0.14
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 +17 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +17 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -971,10 +971,9 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
|
971
971
|
],
|
|
972
972
|
link: [
|
|
973
973
|
"button_link",
|
|
974
|
-
"h-auto rounded-none bg-[var(--button-link-bg)] px-0 py-0 text-[color:var(--button-link-text)]",
|
|
975
|
-
"
|
|
976
|
-
"hover:
|
|
977
|
-
"disabled:hover:no-underline"
|
|
974
|
+
"h-auto [font-weight:var(--button-link-font-weight)] min-w-auto rounded-none bg-[var(--button-link-bg)] px-0 py-0 text-[color:var(--button-link-text)]",
|
|
975
|
+
"hover:opacity-80 active:opacity-80 before:hidden",
|
|
976
|
+
"disabled:hover:no-opacity-80"
|
|
978
977
|
],
|
|
979
978
|
tertiary: [
|
|
980
979
|
"button_tertiary",
|
|
@@ -1044,8 +1043,6 @@ var Button = React4.forwardRef(
|
|
|
1044
1043
|
shape,
|
|
1045
1044
|
asChild = false,
|
|
1046
1045
|
readOnly = false,
|
|
1047
|
-
leftIcon,
|
|
1048
|
-
rightIcon,
|
|
1049
1046
|
loading = false,
|
|
1050
1047
|
loadingText,
|
|
1051
1048
|
disabled,
|
|
@@ -1080,11 +1077,7 @@ var Button = React4.forwardRef(
|
|
|
1080
1077
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
1081
1078
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Spinner, {}),
|
|
1082
1079
|
showLoadingLabel ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: loadingText || t("please_wait") }) : null
|
|
1083
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1084
|
-
leftIcon,
|
|
1085
|
-
children,
|
|
1086
|
-
rightIcon
|
|
1087
|
-
] })
|
|
1080
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "inline-flex items-center gap-2", children })
|
|
1088
1081
|
}
|
|
1089
1082
|
);
|
|
1090
1083
|
}
|
|
@@ -9515,11 +9508,7 @@ function ResponsiveSheet({
|
|
|
9515
9508
|
onPointerDownOutside: handleInteractOutside,
|
|
9516
9509
|
onInteractOutside: handleInteractOutside,
|
|
9517
9510
|
onEscapeKeyDown: handleEscapeKeyDown,
|
|
9518
|
-
className: cn(
|
|
9519
|
-
"max-w-[560px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
9520
|
-
className,
|
|
9521
|
-
dialogClassName
|
|
9522
|
-
),
|
|
9511
|
+
className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
|
|
9523
9512
|
lockScroll: false,
|
|
9524
9513
|
children: [
|
|
9525
9514
|
title ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
|
|
@@ -11012,6 +11001,7 @@ AirbnbSearchInput.displayName = "SearchInput";
|
|
|
11012
11001
|
var React39 = __toESM(require("react"), 1);
|
|
11013
11002
|
var import_lucide_react46 = require("lucide-react");
|
|
11014
11003
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
11004
|
+
var import_react46 = require("react");
|
|
11015
11005
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
11016
11006
|
var ROW_HEIGHT = 48;
|
|
11017
11007
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
@@ -11085,6 +11075,16 @@ var SearchableSelectInternal = ({
|
|
|
11085
11075
|
const describedBy = error && !hideErrorMessage ? errorId : void 0;
|
|
11086
11076
|
const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
|
|
11087
11077
|
useOutsideClick(containerRef, open && !isMobile ? () => closeSelect() : null);
|
|
11078
|
+
const setSelectOpen = (0, import_react46.useCallback)(
|
|
11079
|
+
(nextOpen, options2) => {
|
|
11080
|
+
setOpen(nextOpen);
|
|
11081
|
+
onOpenChange?.(nextOpen);
|
|
11082
|
+
if (!nextOpen && options2?.restoreFocus) {
|
|
11083
|
+
triggerRef.current?.focus();
|
|
11084
|
+
}
|
|
11085
|
+
},
|
|
11086
|
+
[]
|
|
11087
|
+
);
|
|
11088
11088
|
React39.useEffect(() => {
|
|
11089
11089
|
if (isBlocked) {
|
|
11090
11090
|
setSelectOpen(false);
|
|
@@ -11097,7 +11097,7 @@ var SearchableSelectInternal = ({
|
|
|
11097
11097
|
return () => {
|
|
11098
11098
|
window.cancelAnimationFrame(frameId);
|
|
11099
11099
|
};
|
|
11100
|
-
}, [isBlocked, open]);
|
|
11100
|
+
}, [isBlocked, open, setSelectOpen]);
|
|
11101
11101
|
React39.useEffect(() => {
|
|
11102
11102
|
if (!open) {
|
|
11103
11103
|
setHighlightedIndex(-1);
|
|
@@ -11110,13 +11110,6 @@ var SearchableSelectInternal = ({
|
|
|
11110
11110
|
return selectedIndex >= 0 ? selectedIndex : getFirstEnabledIndex(visibleOptions);
|
|
11111
11111
|
});
|
|
11112
11112
|
}, [open, selectedIndex, visibleOptions]);
|
|
11113
|
-
function setSelectOpen(nextOpen, options2) {
|
|
11114
|
-
setOpen(nextOpen);
|
|
11115
|
-
onOpenChange?.(nextOpen);
|
|
11116
|
-
if (!nextOpen && options2?.restoreFocus) {
|
|
11117
|
-
triggerRef.current?.focus();
|
|
11118
|
-
}
|
|
11119
|
-
}
|
|
11120
11113
|
function openSelect() {
|
|
11121
11114
|
if (isBlocked) return;
|
|
11122
11115
|
setSelectOpen(true);
|