@anker-in/ui 0.3.8 → 0.3.9
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 +134 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +134 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/.next-refresh +0 -1
package/dist/index.js
CHANGED
|
@@ -12561,20 +12561,63 @@ function buildMirWelcomeUrl({
|
|
|
12561
12561
|
url.searchParams.set("redirect_url", encodeURIComponent(redirectSource));
|
|
12562
12562
|
return url.toString();
|
|
12563
12563
|
}
|
|
12564
|
-
var
|
|
12564
|
+
var PurposeCheckedIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12565
12565
|
"svg",
|
|
12566
12566
|
{
|
|
12567
12567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12568
|
-
width: "
|
|
12569
|
-
height: "
|
|
12570
|
-
viewBox: "0 0
|
|
12568
|
+
width: "20",
|
|
12569
|
+
height: "20",
|
|
12570
|
+
viewBox: "0 0 20 20",
|
|
12571
12571
|
fill: "none",
|
|
12572
12572
|
"aria-hidden": "true",
|
|
12573
|
+
className: "shrink-0",
|
|
12574
|
+
children: [
|
|
12575
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0.8", y: "0.8", width: "18.4", height: "18.4", rx: "9.2", fill: "#000F16" }),
|
|
12576
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12577
|
+
"rect",
|
|
12578
|
+
{
|
|
12579
|
+
x: "0.8",
|
|
12580
|
+
y: "0.8",
|
|
12581
|
+
width: "18.4",
|
|
12582
|
+
height: "18.4",
|
|
12583
|
+
rx: "9.2",
|
|
12584
|
+
stroke: "#000F16",
|
|
12585
|
+
strokeWidth: "1.6"
|
|
12586
|
+
}
|
|
12587
|
+
),
|
|
12588
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12589
|
+
"path",
|
|
12590
|
+
{
|
|
12591
|
+
d: "M6 9.58333L8.94737 12.5L14 7.5",
|
|
12592
|
+
strokeWidth: "1.6",
|
|
12593
|
+
strokeLinecap: "round",
|
|
12594
|
+
strokeLinejoin: "round",
|
|
12595
|
+
stroke: "white"
|
|
12596
|
+
}
|
|
12597
|
+
)
|
|
12598
|
+
]
|
|
12599
|
+
}
|
|
12600
|
+
);
|
|
12601
|
+
var PurposeRadioIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12602
|
+
"svg",
|
|
12603
|
+
{
|
|
12604
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12605
|
+
width: "20",
|
|
12606
|
+
height: "20",
|
|
12607
|
+
viewBox: "0 0 20 20",
|
|
12608
|
+
fill: "none",
|
|
12609
|
+
"aria-hidden": "true",
|
|
12610
|
+
className: "shrink-0",
|
|
12573
12611
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12574
|
-
"
|
|
12612
|
+
"rect",
|
|
12575
12613
|
{
|
|
12576
|
-
|
|
12577
|
-
|
|
12614
|
+
x: "0.8",
|
|
12615
|
+
y: "0.8",
|
|
12616
|
+
width: "18.4",
|
|
12617
|
+
height: "18.4",
|
|
12618
|
+
rx: "9.2",
|
|
12619
|
+
stroke: "currentColor",
|
|
12620
|
+
strokeWidth: "1.6"
|
|
12578
12621
|
}
|
|
12579
12622
|
)
|
|
12580
12623
|
}
|
|
@@ -12808,44 +12851,91 @@ var BookingFormO2O = ({
|
|
|
12808
12851
|
isPodSelected && "grid-cols-2"
|
|
12809
12852
|
),
|
|
12810
12853
|
children: [
|
|
12811
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
),
|
|
12820
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mt-[14px]", children: [
|
|
12821
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12822
|
-
"select",
|
|
12823
|
-
{
|
|
12824
|
-
id: "booking-purpose-select",
|
|
12825
|
-
value: selectedPurpose?.type || "",
|
|
12826
|
-
onChange: (event2) => {
|
|
12827
|
-
setSelectedPurposeType(event2.target.value);
|
|
12828
|
-
setIsPurposeConfirmed(true);
|
|
12829
|
-
},
|
|
12830
|
-
disabled: !!token,
|
|
12831
|
-
className: cn(
|
|
12832
|
-
"h-[48px] w-full appearance-none rounded-[8px] border border-[#D9DCE1] bg-white px-[16px] pr-[48px] text-[16px] font-medium text-[#2A2C32] outline-none transition-colors focus:border-[#080A0F] focus:ring-2 focus:ring-[#3ADB67]/30 l:text-[14px]",
|
|
12833
|
-
token && "pointer-events-none cursor-not-allowed opacity-50"
|
|
12834
|
-
),
|
|
12835
|
-
children: purposeOptions.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12836
|
-
"option",
|
|
12837
|
-
{
|
|
12838
|
-
value: item.type || "",
|
|
12839
|
-
children: item.label || item.type
|
|
12840
|
-
},
|
|
12841
|
-
`${item.type || item.label || "purpose"}-${index}`
|
|
12842
|
-
))
|
|
12843
|
-
}
|
|
12854
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12855
|
+
"section",
|
|
12856
|
+
{
|
|
12857
|
+
className: cn(
|
|
12858
|
+
"flex flex-col rounded-[16px] bg-white px-[32px] py-[24px] l:px-[16px] l:py-[20px]",
|
|
12859
|
+
// 双栏时左卡高度由右侧 POD 卡撑开(与下拉版一致),选项列表内部滚动,
|
|
12860
|
+
// 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
|
|
12861
|
+
isPodSelected && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
|
|
12844
12862
|
),
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12863
|
+
children: [
|
|
12864
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12865
|
+
"p",
|
|
12866
|
+
{
|
|
12867
|
+
id: "booking-purpose-label",
|
|
12868
|
+
className: "block text-[16px] font-bold text-[#080A0F] l:text-[14px]",
|
|
12869
|
+
children: getPurposeLabel(pageData)
|
|
12870
|
+
}
|
|
12871
|
+
),
|
|
12872
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12873
|
+
"div",
|
|
12874
|
+
{
|
|
12875
|
+
role: "radiogroup",
|
|
12876
|
+
"aria-labelledby": "booking-purpose-label",
|
|
12877
|
+
className: cn(
|
|
12878
|
+
"mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto pr-[4px]",
|
|
12879
|
+
// 仅桌面双栏时列表受右卡高度约束内部滚动;独占一行(未选 POD / 移动端)不限高
|
|
12880
|
+
isPodSelected && "min-l:flex-1"
|
|
12881
|
+
),
|
|
12882
|
+
children: purposeOptions.map((item, index) => {
|
|
12883
|
+
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|
|
12884
|
+
const selectItem = () => {
|
|
12885
|
+
if (token) return;
|
|
12886
|
+
setSelectedPurposeType(item.type || "");
|
|
12887
|
+
setIsPurposeConfirmed(true);
|
|
12888
|
+
};
|
|
12889
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12890
|
+
"div",
|
|
12891
|
+
{
|
|
12892
|
+
role: "radio",
|
|
12893
|
+
"aria-checked": isSelected,
|
|
12894
|
+
tabIndex: token ? -1 : 0,
|
|
12895
|
+
onClick: selectItem,
|
|
12896
|
+
onKeyDown: (event2) => {
|
|
12897
|
+
if (event2.key === "Enter" || event2.key === " ") {
|
|
12898
|
+
event2.preventDefault();
|
|
12899
|
+
selectItem();
|
|
12900
|
+
}
|
|
12901
|
+
},
|
|
12902
|
+
className: cn(
|
|
12903
|
+
"shrink-0 cursor-pointer overflow-hidden rounded-[8px] bg-[#F5F6F7] outline-none",
|
|
12904
|
+
token && "pointer-events-none cursor-not-allowed"
|
|
12905
|
+
),
|
|
12906
|
+
children: [
|
|
12907
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12908
|
+
"div",
|
|
12909
|
+
{
|
|
12910
|
+
className: cn(
|
|
12911
|
+
"group flex h-[60px] w-full items-center gap-[12px] px-[16px] text-left text-[16px] font-bold text-[#000F16] transition-[box-shadow,color] l:text-[14px]",
|
|
12912
|
+
isSelected ? "bg-[#93E0EC]" : "rounded-[8px] bg-white text-[#5A5E66] shadow-[inset_0_0_0_1px_#D9DCE1] hover:text-[#000F16] hover:shadow-[inset_0_0_0_1.6px_#00CBEB]"
|
|
12913
|
+
),
|
|
12914
|
+
children: [
|
|
12915
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12916
|
+
"span",
|
|
12917
|
+
{
|
|
12918
|
+
className: cn(
|
|
12919
|
+
!isSelected && "text-[#D9DCE1] group-hover:text-[#00CBEB]"
|
|
12920
|
+
),
|
|
12921
|
+
children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx(PurposeCheckedIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(PurposeRadioIcon, {})
|
|
12922
|
+
}
|
|
12923
|
+
),
|
|
12924
|
+
item.label || item.type
|
|
12925
|
+
]
|
|
12926
|
+
}
|
|
12927
|
+
),
|
|
12928
|
+
!!item.purposeNote && /* @__PURE__ */ jsxRuntime.jsx("p", { className: " px-[16px] py-[8px] text-[14px] font-medium leading-[1.35] text-[#080A0F] l:text-[13px]", children: item.purposeNote })
|
|
12929
|
+
]
|
|
12930
|
+
},
|
|
12931
|
+
`${item.type || item.label || "purpose"}-${index}`
|
|
12932
|
+
);
|
|
12933
|
+
})
|
|
12934
|
+
}
|
|
12935
|
+
)
|
|
12936
|
+
]
|
|
12937
|
+
}
|
|
12938
|
+
),
|
|
12849
12939
|
isPodSelected && !!selectedPodContent && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-[16px] bg-white px-[28px] py-[20px] l:px-[16px] l:py-[20px]", children: [
|
|
12850
12940
|
!!selectedPodContent.title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[16px] font-bold text-[#080A0F] l:text-[14px]", children: selectedPodContent.title }),
|
|
12851
12941
|
!!selectedPodDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-[6px] text-[13px] font-medium leading-[1.35] text-[#080A0F] l:text-[12px]", children: selectedPodDescription }),
|