@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 CHANGED
@@ -13048,6 +13048,17 @@ var BookingFormO2O = ({
13048
13048
  }),
13049
13049
  [pageData?.dateTimePicker, pageData?.questionnaireForm]
13050
13050
  );
13051
+ const purposeListRef = React15.useRef(null);
13052
+ const [purposeListOverflow, setPurposeListOverflow] = React15.useState(false);
13053
+ React15.useEffect(() => {
13054
+ const el = purposeListRef.current;
13055
+ if (!el) return;
13056
+ const check = () => setPurposeListOverflow(el.scrollHeight > el.clientHeight + 1);
13057
+ check();
13058
+ const observer = new ResizeObserver(check);
13059
+ observer.observe(el);
13060
+ return () => observer.disconnect();
13061
+ }, [purposeOptions]);
13051
13062
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
13052
13063
  !token && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
13053
13064
  DemoRoomDetail2,
@@ -13079,10 +13090,9 @@ var BookingFormO2O = ({
13079
13090
  "section",
13080
13091
  {
13081
13092
  className: cn(
13082
- "flex flex-col rounded-[16px] bg-white px-[32px] pt-[24px] pb-0 l:rounded-[12px] l:px-[16px] l:pt-[20px]",
13083
- // 右侧 POD 卡存在时左卡高度由其撑开(与下拉版一致),选项列表内部滚动,
13084
- // 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
13085
- isPodSelected && !!selectedPodContent && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
13093
+ // 左卡高度不随右侧 POD 卡出现/消失而变化:self-start 脱离 grid 拉伸,
13094
+ // 选项列表用固定 max-height 内部滚动,保证切换 purpose 时高度稳定
13095
+ "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]"
13086
13096
  ),
13087
13097
  children: [
13088
13098
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13096,12 +13106,12 @@ var BookingFormO2O = ({
13096
13106
  /* @__PURE__ */ jsxRuntime.jsx(
13097
13107
  "div",
13098
13108
  {
13109
+ ref: purposeListRef,
13099
13110
  role: "radiogroup",
13100
13111
  "aria-labelledby": "booking-purpose-label",
13101
13112
  className: cn(
13102
- "mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto pr-[4px]",
13103
- // 仅右侧 POD 卡存在时列表受其高度约束内部滚动;其余情况不限高
13104
- isPodSelected && !!selectedPodContent && "min-l:flex-1"
13113
+ "mt-[14px] mr-[4px] flex min-h-0 flex-col gap-[16px] overflow-y-auto min-l:max-h-[354px]",
13114
+ purposeListOverflow && "border-b border-[#DADCE0]"
13105
13115
  ),
13106
13116
  children: purposeOptions.map((item, index) => {
13107
13117
  const isSelected = !!item.type && selectedPurpose?.type === item.type;