@anker-in/ui 0.3.11-beta.0 → 0.3.12
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.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13034,6 +13034,17 @@ var BookingFormO2O = ({
|
|
|
13034
13034
|
}),
|
|
13035
13035
|
[pageData?.dateTimePicker, pageData?.questionnaireForm]
|
|
13036
13036
|
);
|
|
13037
|
+
const purposeListRef = useRef(null);
|
|
13038
|
+
const [purposeListOverflow, setPurposeListOverflow] = useState(false);
|
|
13039
|
+
useEffect(() => {
|
|
13040
|
+
const el = purposeListRef.current;
|
|
13041
|
+
if (!el) return;
|
|
13042
|
+
const check = () => setPurposeListOverflow(el.scrollHeight > el.clientHeight + 1);
|
|
13043
|
+
check();
|
|
13044
|
+
const observer = new ResizeObserver(check);
|
|
13045
|
+
observer.observe(el);
|
|
13046
|
+
return () => observer.disconnect();
|
|
13047
|
+
}, [purposeOptions]);
|
|
13037
13048
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
13038
13049
|
!token && /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsx(
|
|
13039
13050
|
DemoRoomDetail2,
|
|
@@ -13065,10 +13076,9 @@ var BookingFormO2O = ({
|
|
|
13065
13076
|
"section",
|
|
13066
13077
|
{
|
|
13067
13078
|
className: cn(
|
|
13068
|
-
|
|
13069
|
-
//
|
|
13070
|
-
|
|
13071
|
-
isPodSelected && !!selectedPodContent && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
|
|
13079
|
+
// 左卡高度不随右侧 POD 卡出现/消失而变化:self-start 脱离 grid 拉伸,
|
|
13080
|
+
// 选项列表用固定 max-height 内部滚动,保证切换 purpose 时高度稳定
|
|
13081
|
+
"flex flex-col self-start rounded-[16px] bg-white px-[32px] pt-[24px] pb-0 l:pb-[16px] l:rounded-[12px] l:px-[16px] l:pt-[20px]"
|
|
13072
13082
|
),
|
|
13073
13083
|
children: [
|
|
13074
13084
|
/* @__PURE__ */ jsx(
|
|
@@ -13082,12 +13092,12 @@ var BookingFormO2O = ({
|
|
|
13082
13092
|
/* @__PURE__ */ jsx(
|
|
13083
13093
|
"div",
|
|
13084
13094
|
{
|
|
13095
|
+
ref: purposeListRef,
|
|
13085
13096
|
role: "radiogroup",
|
|
13086
13097
|
"aria-labelledby": "booking-purpose-label",
|
|
13087
13098
|
className: cn(
|
|
13088
|
-
"mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto
|
|
13089
|
-
|
|
13090
|
-
isPodSelected && !!selectedPodContent && "min-l:flex-1"
|
|
13099
|
+
"mt-[14px] mr-[4px] flex min-h-0 flex-col gap-[16px] overflow-y-auto min-l:max-h-[354px]",
|
|
13100
|
+
purposeListOverflow && "border-b border-[#DADCE0]"
|
|
13091
13101
|
),
|
|
13092
13102
|
children: purposeOptions.map((item, index) => {
|
|
13093
13103
|
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|