@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.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,7 +13090,7 @@ 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]",
|
|
13093
|
+
"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]",
|
|
13083
13094
|
// 右侧 POD 卡存在时左卡高度由其撑开(与下拉版一致),选项列表内部滚动,
|
|
13084
13095
|
// 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
|
|
13085
13096
|
isPodSelected && !!selectedPodContent && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
|
|
@@ -13096,12 +13107,14 @@ var BookingFormO2O = ({
|
|
|
13096
13107
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13097
13108
|
"div",
|
|
13098
13109
|
{
|
|
13110
|
+
ref: purposeListRef,
|
|
13099
13111
|
role: "radiogroup",
|
|
13100
13112
|
"aria-labelledby": "booking-purpose-label",
|
|
13101
13113
|
className: cn(
|
|
13102
|
-
"mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto
|
|
13114
|
+
"mt-[14px] mr-[4px] flex min-h-0 flex-col gap-[16px] overflow-y-auto",
|
|
13103
13115
|
// 仅右侧 POD 卡存在时列表受其高度约束内部滚动;其余情况不限高
|
|
13104
|
-
isPodSelected && !!selectedPodContent && "min-l:flex-1"
|
|
13116
|
+
isPodSelected && !!selectedPodContent && "min-l:flex-1",
|
|
13117
|
+
purposeListOverflow && "border-b border-[#DADCE0]"
|
|
13105
13118
|
),
|
|
13106
13119
|
children: purposeOptions.map((item, index) => {
|
|
13107
13120
|
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|