@anker-in/ui 0.3.11-beta.0 → 0.3.11

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.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,7 +13076,7 @@ var BookingFormO2O = ({
13065
13076
  "section",
13066
13077
  {
13067
13078
  className: cn(
13068
- "flex flex-col rounded-[16px] bg-white px-[32px] pt-[24px] pb-0 l:rounded-[12px] l:px-[16px] l:pt-[20px]",
13079
+ "flex flex-col rounded-[16px] bg-white px-[32px] pt-[24px] pb-0 l:pb-[16px] l:rounded-[12px] l:px-[16px] l:pt-[20px]",
13069
13080
  // 右侧 POD 卡存在时左卡高度由其撑开(与下拉版一致),选项列表内部滚动,
13070
13081
  // 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
13071
13082
  isPodSelected && !!selectedPodContent && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
@@ -13082,12 +13093,14 @@ var BookingFormO2O = ({
13082
13093
  /* @__PURE__ */ jsx(
13083
13094
  "div",
13084
13095
  {
13096
+ ref: purposeListRef,
13085
13097
  role: "radiogroup",
13086
13098
  "aria-labelledby": "booking-purpose-label",
13087
13099
  className: cn(
13088
- "mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto pr-[4px]",
13100
+ "mt-[14px] mr-[4px] flex min-h-0 flex-col gap-[16px] overflow-y-auto",
13089
13101
  // 仅右侧 POD 卡存在时列表受其高度约束内部滚动;其余情况不限高
13090
- isPodSelected && !!selectedPodContent && "min-l:flex-1"
13102
+ isPodSelected && !!selectedPodContent && "min-l:flex-1",
13103
+ purposeListOverflow && "border-b border-[#DADCE0]"
13091
13104
  ),
13092
13105
  children: purposeOptions.map((item, index) => {
13093
13106
  const isSelected = !!item.type && selectedPurpose?.type === item.type;