@anker-in/ui 0.3.10-beta.0 → 0.3.11-beta.0
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/demo-room.js.map +1 -1
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +168 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -173
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -259,6 +259,9 @@ interface DemoRoomContract {
|
|
|
259
259
|
interface DemoRoomPodConfig {
|
|
260
260
|
questionnaire_id?: number;
|
|
261
261
|
}
|
|
262
|
+
interface DemoRoomEventConfig {
|
|
263
|
+
questionnaire_id?: number;
|
|
264
|
+
}
|
|
262
265
|
interface DemoRoom {
|
|
263
266
|
code: string;
|
|
264
267
|
name: string;
|
|
@@ -274,6 +277,7 @@ interface DemoRoom {
|
|
|
274
277
|
contact?: DemoRoomContract;
|
|
275
278
|
business_types?: string[];
|
|
276
279
|
pod_config?: DemoRoomPodConfig;
|
|
280
|
+
event_config?: DemoRoomEventConfig;
|
|
277
281
|
capacity: number;
|
|
278
282
|
status: DemoRoomStatus;
|
|
279
283
|
timezone: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,9 @@ interface DemoRoomContract {
|
|
|
259
259
|
interface DemoRoomPodConfig {
|
|
260
260
|
questionnaire_id?: number;
|
|
261
261
|
}
|
|
262
|
+
interface DemoRoomEventConfig {
|
|
263
|
+
questionnaire_id?: number;
|
|
264
|
+
}
|
|
262
265
|
interface DemoRoom {
|
|
263
266
|
code: string;
|
|
264
267
|
name: string;
|
|
@@ -274,6 +277,7 @@ interface DemoRoom {
|
|
|
274
277
|
contact?: DemoRoomContract;
|
|
275
278
|
business_types?: string[];
|
|
276
279
|
pod_config?: DemoRoomPodConfig;
|
|
280
|
+
event_config?: DemoRoomEventConfig;
|
|
277
281
|
capacity: number;
|
|
278
282
|
status: DemoRoomStatus;
|
|
279
283
|
timezone: string;
|
package/dist/index.js
CHANGED
|
@@ -11241,7 +11241,7 @@ var QuestionnaireForm2 = ({
|
|
|
11241
11241
|
placeholder: question.placeholder,
|
|
11242
11242
|
className: cn(
|
|
11243
11243
|
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11244
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11244
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11245
11245
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11246
11246
|
)
|
|
11247
11247
|
}
|
|
@@ -11262,7 +11262,7 @@ var QuestionnaireForm2 = ({
|
|
|
11262
11262
|
placeholder: question.placeholder,
|
|
11263
11263
|
className: cn(
|
|
11264
11264
|
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11265
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11265
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11266
11266
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11267
11267
|
)
|
|
11268
11268
|
}
|
|
@@ -11278,7 +11278,7 @@ var QuestionnaireForm2 = ({
|
|
|
11278
11278
|
onChange: (e) => handleCountryCodeChange(questionId, e.target.value),
|
|
11279
11279
|
className: cn(
|
|
11280
11280
|
"appearance-none pl-3 pr-8 py-3 rounded-lg border text-base",
|
|
11281
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11281
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11282
11282
|
"bg-white cursor-pointer w-[80px]",
|
|
11283
11283
|
"dark:bg-white dark:text-[#080A0F]",
|
|
11284
11284
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
@@ -11323,7 +11323,7 @@ var QuestionnaireForm2 = ({
|
|
|
11323
11323
|
placeholder: question.placeholder,
|
|
11324
11324
|
className: cn(
|
|
11325
11325
|
"flex-1 px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11326
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11326
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11327
11327
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11328
11328
|
)
|
|
11329
11329
|
}
|
|
@@ -11340,7 +11340,7 @@ var QuestionnaireForm2 = ({
|
|
|
11340
11340
|
rows: 4,
|
|
11341
11341
|
className: cn(
|
|
11342
11342
|
"w-full px-4 py-3 rounded-lg border text-base resize-none bg-white",
|
|
11343
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11343
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11344
11344
|
"dark:bg-white dark:text-[#080A0F]",
|
|
11345
11345
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11346
11346
|
)
|
|
@@ -11442,7 +11442,7 @@ var QuestionnaireForm2 = ({
|
|
|
11442
11442
|
placeholder: question.placeholder || "Please specify...",
|
|
11443
11443
|
className: cn(
|
|
11444
11444
|
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11445
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11445
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11446
11446
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11447
11447
|
)
|
|
11448
11448
|
}
|
|
@@ -11520,7 +11520,7 @@ var QuestionnaireForm2 = ({
|
|
|
11520
11520
|
},
|
|
11521
11521
|
className: cn(
|
|
11522
11522
|
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11523
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11523
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:border-transparent",
|
|
11524
11524
|
"cursor-pointer",
|
|
11525
11525
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11526
11526
|
),
|
|
@@ -11634,8 +11634,8 @@ var QuestionnaireForm2 = ({
|
|
|
11634
11634
|
className: cn(
|
|
11635
11635
|
"w-fit mt-6 px-6 py-4 rounded-full",
|
|
11636
11636
|
"bg-[#080A0F] text-white font-bold text-base",
|
|
11637
|
-
"hover:bg-[#
|
|
11638
|
-
"focus:outline-none focus:ring-2 focus:ring-[#
|
|
11637
|
+
"hover:bg-[#00CBEB] hover:text-[#080A0F] transition-colors",
|
|
11638
|
+
"focus:outline-none focus:ring-2 focus:ring-[#00CBEB] focus:ring-offset-2",
|
|
11639
11639
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
11640
11640
|
),
|
|
11641
11641
|
children: loading ? pageData?.submitting || "Submitting..." : pageData?.submit || "Submit Booking"
|
|
@@ -11717,8 +11717,8 @@ var DateTimePicker2 = ({
|
|
|
11717
11717
|
});
|
|
11718
11718
|
const demoRoom = demoRoomProp ?? fetchedDemoRoom;
|
|
11719
11719
|
const effectiveDemoRoomLoading = !demoRoom && !!(isManagedByParent ? demoRoomLoading : fetchedDemoRoomLoading);
|
|
11720
|
-
const
|
|
11721
|
-
const effectiveQuestionnaireId =
|
|
11720
|
+
const purposeQuestionnaireId = selectedPurposeType === "pod" ? demoRoom?.pod_config?.questionnaire_id : selectedPurposeType === "event" ? demoRoom?.event_config?.questionnaire_id : void 0;
|
|
11721
|
+
const effectiveQuestionnaireId = purposeQuestionnaireId || demoRoom?.questionnaire_id;
|
|
11722
11722
|
const { data: questionnaire, loading: questionnaireLoading } = useQuestionnaire(
|
|
11723
11723
|
apiClient,
|
|
11724
11724
|
demoRoomCode || "",
|
|
@@ -11926,13 +11926,13 @@ var DateTimePicker2 = ({
|
|
|
11926
11926
|
{
|
|
11927
11927
|
theme: {
|
|
11928
11928
|
token: {
|
|
11929
|
-
colorPrimary: "#
|
|
11929
|
+
colorPrimary: "#93E0EC"
|
|
11930
11930
|
},
|
|
11931
11931
|
components: {
|
|
11932
11932
|
Calendar: {
|
|
11933
11933
|
fullBg: "#fff",
|
|
11934
11934
|
fullPanelBg: "#fff",
|
|
11935
|
-
itemActiveBg: "#
|
|
11935
|
+
itemActiveBg: "#93E0EC"
|
|
11936
11936
|
}
|
|
11937
11937
|
}
|
|
11938
11938
|
},
|
|
@@ -12015,16 +12015,16 @@ var DateTimePicker2 = ({
|
|
|
12015
12015
|
}
|
|
12016
12016
|
.calendar-custom-cell .ant-picker-cell-selected .ant-picker-cell-inner,
|
|
12017
12017
|
.calendar-custom-cell .ant-picker-cell-selected:not(.ant-picker-cell-disabled) .ant-picker-cell-inner {
|
|
12018
|
-
background-color: #
|
|
12018
|
+
background-color: #93E0EC !important;
|
|
12019
12019
|
color: #080A0F !important;
|
|
12020
|
-
border-color: #
|
|
12020
|
+
border-color: #93E0EC !important;
|
|
12021
12021
|
}
|
|
12022
12022
|
.calendar-custom-cell .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {
|
|
12023
|
-
background-color: #
|
|
12023
|
+
background-color: #93E0EC !important;
|
|
12024
12024
|
color: #080A0F !important;
|
|
12025
12025
|
}
|
|
12026
12026
|
.calendar-custom-cell .ant-picker-cell-today .ant-picker-cell-inner {
|
|
12027
|
-
border-color: #
|
|
12027
|
+
border-color: #93E0EC !important;
|
|
12028
12028
|
border-radius: 8px !important;
|
|
12029
12029
|
}
|
|
12030
12030
|
@media (min-width: 1024px) and (max-width: 1919px) {
|
|
@@ -12060,6 +12060,10 @@ var DateTimePicker2 = ({
|
|
|
12060
12060
|
border: none !important;
|
|
12061
12061
|
box-shadow: none !important;
|
|
12062
12062
|
}
|
|
12063
|
+
.calendar-custom-cell .ant-picker-cell-in-view:not(.ant-picker-cell-disabled):not(.ant-picker-cell-selected):hover .ant-picker-cell-inner {
|
|
12064
|
+
background-color: #93E0EC !important;
|
|
12065
|
+
color: #080A0F !important;
|
|
12066
|
+
}
|
|
12063
12067
|
.calendar-custom-cell .ant-picker-cell-disabled::before {
|
|
12064
12068
|
display: none !important;
|
|
12065
12069
|
}
|
|
@@ -12101,9 +12105,9 @@ var DateTimePicker2 = ({
|
|
|
12101
12105
|
{
|
|
12102
12106
|
className: `ant-picker-cell-inner ${isSelected ? "ant-picker-cell-inner-selected" : ""} ${isToday ? "ant-picker-cell-inner-today" : ""}`,
|
|
12103
12107
|
style: {
|
|
12104
|
-
backgroundColor: isSelected ? "#
|
|
12108
|
+
backgroundColor: isSelected ? "#93E0EC" : void 0,
|
|
12105
12109
|
color: isSelected ? "#080A0F" : isDisabled ? "#767880" : void 0,
|
|
12106
|
-
borderColor: isSelected ? "#
|
|
12110
|
+
borderColor: isSelected ? "#93E0EC" : isToday ? "#93E0EC" : void 0
|
|
12107
12111
|
},
|
|
12108
12112
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ant-picker-calendar-date-value", children: date.date() })
|
|
12109
12113
|
}
|
|
@@ -12338,7 +12342,7 @@ var DateTimePicker2 = ({
|
|
|
12338
12342
|
className: `
|
|
12339
12343
|
rounded-[8px] w-full text-[18px] l:gap-2 l:text-[16px] flex items-center justify-center gap-4 h-[76px]
|
|
12340
12344
|
border text-center transition-colors
|
|
12341
|
-
${isSelected ? "border-[#
|
|
12345
|
+
${isSelected ? "border-[#93E0EC] bg-[#93E0EC] cursor-pointer" : isAvailable ? "border-[#E4E5E6] hover:border-[#93E0EC] hover:bg-[#93E0EC] cursor-pointer" : "border-[#E4E5E6] bg-[#F5F5F5] text-[#767880] cursor-not-allowed"}
|
|
12342
12346
|
`,
|
|
12343
12347
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTimeslot(slot) }) })
|
|
12344
12348
|
},
|
|
@@ -13070,171 +13074,162 @@ var BookingFormO2O = ({
|
|
|
13070
13074
|
children: dateTimePickerPageData?.scheduleYourVisit
|
|
13071
13075
|
}
|
|
13072
13076
|
),
|
|
13073
|
-
!!purposeOptions.length && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pb-[40px] l:pb-[24px]", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
"section",
|
|
13083
|
-
{
|
|
13084
|
-
className: cn(
|
|
13085
|
-
"flex flex-col rounded-[16px] bg-white px-[32px] py-[24px] l:px-[16px] l:py-[20px]",
|
|
13086
|
-
// 双栏时左卡高度由右侧 POD 卡撑开(与下拉版一致),选项列表内部滚动,
|
|
13087
|
-
// 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
|
|
13088
|
-
isPodSelected && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
|
|
13089
|
-
),
|
|
13090
|
-
children: [
|
|
13091
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13092
|
-
"p",
|
|
13093
|
-
{
|
|
13094
|
-
id: "booking-purpose-label",
|
|
13095
|
-
className: "block text-[16px] font-bold text-[#080A0F] l:text-[14px]",
|
|
13096
|
-
children: getPurposeLabel(pageData)
|
|
13097
|
-
}
|
|
13098
|
-
),
|
|
13099
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13100
|
-
"div",
|
|
13101
|
-
{
|
|
13102
|
-
role: "radiogroup",
|
|
13103
|
-
"aria-labelledby": "booking-purpose-label",
|
|
13104
|
-
className: cn(
|
|
13105
|
-
"mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto pr-[4px]",
|
|
13106
|
-
// 仅桌面双栏时列表受右卡高度约束内部滚动;独占一行(未选 POD / 移动端)不限高
|
|
13107
|
-
isPodSelected && "min-l:flex-1"
|
|
13108
|
-
),
|
|
13109
|
-
children: purposeOptions.map((item, index) => {
|
|
13110
|
-
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|
|
13111
|
-
const selectItem = () => {
|
|
13112
|
-
if (token) return;
|
|
13113
|
-
setSelectedPurposeType(item.type || "");
|
|
13114
|
-
setIsPurposeConfirmed(true);
|
|
13115
|
-
};
|
|
13116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13117
|
-
"div",
|
|
13118
|
-
{
|
|
13119
|
-
role: "radio",
|
|
13120
|
-
"aria-checked": isSelected,
|
|
13121
|
-
tabIndex: token ? -1 : 0,
|
|
13122
|
-
onClick: selectItem,
|
|
13123
|
-
onKeyDown: (event2) => {
|
|
13124
|
-
if (event2.key === "Enter" || event2.key === " ") {
|
|
13125
|
-
event2.preventDefault();
|
|
13126
|
-
selectItem();
|
|
13127
|
-
}
|
|
13128
|
-
},
|
|
13129
|
-
className: cn(
|
|
13130
|
-
"shrink-0 cursor-pointer overflow-hidden rounded-[8px] bg-[#F5F6F7] outline-none",
|
|
13131
|
-
token && "pointer-events-none cursor-not-allowed"
|
|
13132
|
-
),
|
|
13133
|
-
children: [
|
|
13134
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13135
|
-
"div",
|
|
13136
|
-
{
|
|
13137
|
-
className: cn(
|
|
13138
|
-
"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]",
|
|
13139
|
-
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]"
|
|
13140
|
-
),
|
|
13141
|
-
children: [
|
|
13142
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13143
|
-
"span",
|
|
13144
|
-
{
|
|
13145
|
-
className: cn(
|
|
13146
|
-
!isSelected && "text-[#D9DCE1] group-hover:text-[#00CBEB]"
|
|
13147
|
-
),
|
|
13148
|
-
children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx(PurposeCheckedIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(PurposeRadioIcon, {})
|
|
13149
|
-
}
|
|
13150
|
-
),
|
|
13151
|
-
item.label || item.type
|
|
13152
|
-
]
|
|
13153
|
-
}
|
|
13154
|
-
),
|
|
13155
|
-
!!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 })
|
|
13156
|
-
]
|
|
13157
|
-
},
|
|
13158
|
-
`${item.type || item.label || "purpose"}-${index}`
|
|
13159
|
-
);
|
|
13160
|
-
})
|
|
13161
|
-
}
|
|
13162
|
-
)
|
|
13163
|
-
]
|
|
13164
|
-
}
|
|
13077
|
+
!!purposeOptions.length && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pb-[40px] l:pb-[24px]", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-[16px] l:grid-cols-1", children: [
|
|
13078
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13079
|
+
"section",
|
|
13080
|
+
{
|
|
13081
|
+
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"
|
|
13165
13086
|
),
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
!!selectedPodImage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full rounded-[8px] flex mt-4 bg-[#F5F6F7] flex-col items-center justify-center", children: [
|
|
13170
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13171
|
-
"img",
|
|
13172
|
-
{
|
|
13173
|
-
src: selectedPodImage,
|
|
13174
|
-
alt: selectedPodContent.imageAlt || selectedPodContent.title || "",
|
|
13175
|
-
className: "mt-[12px] h-[220px] rounded-[8px] object-cover max-h-[360px]"
|
|
13176
|
-
}
|
|
13177
|
-
),
|
|
13178
|
-
bookingDesign?.material && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 text-[16px] l:text-[14px] text-[#080A0F] font-bold mb-2", children: bookingDesign?.material })
|
|
13179
|
-
] }),
|
|
13180
|
-
!!selectedPodButtonText && (booking?.print_status === "unprinted" && booking?.design_project_id || !token) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13181
|
-
"a",
|
|
13087
|
+
children: [
|
|
13088
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13089
|
+
"p",
|
|
13182
13090
|
{
|
|
13183
|
-
|
|
13184
|
-
"
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
url: selectedPodButtonLink || "",
|
|
13194
|
-
isEditMode: isPodDesignEditMode
|
|
13195
|
-
});
|
|
13196
|
-
},
|
|
13197
|
-
rel: "noopener noreferrer",
|
|
13091
|
+
id: "booking-purpose-label",
|
|
13092
|
+
className: "block text-[16px] font-bold text-[#080A0F] l:text-[14px]",
|
|
13093
|
+
children: getPurposeLabel(pageData)
|
|
13094
|
+
}
|
|
13095
|
+
),
|
|
13096
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13097
|
+
"div",
|
|
13098
|
+
{
|
|
13099
|
+
role: "radiogroup",
|
|
13100
|
+
"aria-labelledby": "booking-purpose-label",
|
|
13198
13101
|
className: cn(
|
|
13199
|
-
"mt-[
|
|
13200
|
-
|
|
13201
|
-
|
|
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"
|
|
13202
13105
|
),
|
|
13203
|
-
children:
|
|
13204
|
-
|
|
13205
|
-
|
|
13106
|
+
children: purposeOptions.map((item, index) => {
|
|
13107
|
+
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|
|
13108
|
+
const selectItem = () => {
|
|
13109
|
+
if (token) return;
|
|
13110
|
+
setSelectedPurposeType(item.type || "");
|
|
13111
|
+
setIsPurposeConfirmed(true);
|
|
13112
|
+
};
|
|
13113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13114
|
+
"div",
|
|
13206
13115
|
{
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13116
|
+
role: "radio",
|
|
13117
|
+
"aria-checked": isSelected,
|
|
13118
|
+
tabIndex: token ? -1 : 0,
|
|
13119
|
+
onClick: selectItem,
|
|
13120
|
+
onKeyDown: (event2) => {
|
|
13121
|
+
if (event2.key === "Enter" || event2.key === " ") {
|
|
13122
|
+
event2.preventDefault();
|
|
13123
|
+
selectItem();
|
|
13124
|
+
}
|
|
13125
|
+
},
|
|
13126
|
+
className: cn(
|
|
13127
|
+
"shrink-0 cursor-pointer overflow-hidden rounded-[8px] bg-[#F5F6F7] outline-none l:rounded-[6px]",
|
|
13128
|
+
token && "pointer-events-none cursor-not-allowed"
|
|
13129
|
+
),
|
|
13212
13130
|
children: [
|
|
13213
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13214
|
-
"
|
|
13131
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13132
|
+
"div",
|
|
13215
13133
|
{
|
|
13216
|
-
|
|
13217
|
-
|
|
13134
|
+
className: cn(
|
|
13135
|
+
"group flex h-[60px] w-full items-center gap-[12px] rounded-[8px] px-[16px] text-left text-[16px] font-bold text-[#000F16] transition-[box-shadow,color] l:rounded-[6px] l:text-[14px]",
|
|
13136
|
+
isSelected ? "bg-[#93E0EC]" : "bg-white text-[#000F16] shadow-[inset_0_0_0_1px_#D9DCE1] hover:text-[#000F16] hover:shadow-[inset_0_0_0_1.6px_#00CBEB]"
|
|
13137
|
+
),
|
|
13138
|
+
children: [
|
|
13139
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13140
|
+
"span",
|
|
13141
|
+
{
|
|
13142
|
+
className: cn(
|
|
13143
|
+
!isSelected && "text-[#D9DCE1] group-hover:text-[#00CBEB]"
|
|
13144
|
+
),
|
|
13145
|
+
children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx(PurposeCheckedIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(PurposeRadioIcon, {})
|
|
13146
|
+
}
|
|
13147
|
+
),
|
|
13148
|
+
item.label || item.type
|
|
13149
|
+
]
|
|
13218
13150
|
}
|
|
13219
13151
|
),
|
|
13220
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13221
|
-
"path",
|
|
13222
|
-
{
|
|
13223
|
-
d: "M13.2064 1.66602C13.4274 1.66604 13.6393 1.75387 13.7956 1.91016L16.8392 4.9554C17.1645 5.28081 17.1645 5.80838 16.8392 6.13379L8.22185 14.7552C8.06556 14.9116 7.85292 14.9993 7.63185 14.9993L4.58334 14.9993C4.12311 14.9993 3.75001 14.6263 3.75001 14.166V11.133C3.75001 10.9122 3.83741 10.7 3.99334 10.5438L12.6164 1.91016L12.6774 1.85482C12.8257 1.7331 13.0128 1.66605 13.2064 1.66602ZM5.41668 11.4772V13.3327H7.28679L15.0716 5.54378L13.2064 3.67773L5.41668 11.4772Z",
|
|
13224
|
-
fill: "currentColor"
|
|
13225
|
-
}
|
|
13226
|
-
)
|
|
13152
|
+
!!item.purposeNote && /* @__PURE__ */ jsxRuntime.jsx("p", { className: " px-[16px] py-[8px] text-[14px] font-[700] leading-[1.35] text-[#4A4C56] l:text-[13px]", children: item.purposeNote })
|
|
13227
13153
|
]
|
|
13228
|
-
}
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13154
|
+
},
|
|
13155
|
+
`${item.type || item.label || "purpose"}-${index}`
|
|
13156
|
+
);
|
|
13157
|
+
})
|
|
13232
13158
|
}
|
|
13233
13159
|
)
|
|
13234
|
-
]
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13160
|
+
]
|
|
13161
|
+
}
|
|
13162
|
+
),
|
|
13163
|
+
isPodSelected && !!selectedPodContent && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-[16px] l:rounded-[12px] bg-white px-[28px] py-[20px] l:px-[16px] l:py-[20px]", children: [
|
|
13164
|
+
!!selectedPodContent.title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[16px] font-bold text-[#080A0F] l:text-[14px]", children: selectedPodContent.title }),
|
|
13165
|
+
!!selectedPodDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-[6px] text-[13px] font-[700] leading-[1.35] text-[#4A4C56] l:text-[12px]", children: selectedPodDescription }),
|
|
13166
|
+
!!selectedPodImage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full rounded-[8px] flex mt-4 bg-[#F5F6F7] flex-col items-center justify-center", children: [
|
|
13167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13168
|
+
"img",
|
|
13169
|
+
{
|
|
13170
|
+
src: selectedPodImage,
|
|
13171
|
+
alt: selectedPodContent.imageAlt || selectedPodContent.title || "",
|
|
13172
|
+
className: "mt-[12px] h-[220px] rounded-[8px] object-cover max-h-[360px]"
|
|
13173
|
+
}
|
|
13174
|
+
),
|
|
13175
|
+
bookingDesign?.material && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 text-[16px] l:text-[14px] text-[#080A0F] font-bold mb-2", children: bookingDesign?.material })
|
|
13176
|
+
] }),
|
|
13177
|
+
!!selectedPodButtonText && (booking?.print_status === "unprinted" && booking?.design_project_id || !token) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13178
|
+
"a",
|
|
13179
|
+
{
|
|
13180
|
+
href: selectedPodButtonLink || "#",
|
|
13181
|
+
"aria-disabled": isPodButtonDisabled,
|
|
13182
|
+
tabIndex: isPodButtonDisabled ? -1 : void 0,
|
|
13183
|
+
onClick: (event2) => {
|
|
13184
|
+
if (isPodButtonDisabled) {
|
|
13185
|
+
event2.preventDefault();
|
|
13186
|
+
return;
|
|
13187
|
+
}
|
|
13188
|
+
trackCallbacks?.onPodDesignClick?.({
|
|
13189
|
+
buttonText: selectedPodButtonText || "",
|
|
13190
|
+
url: selectedPodButtonLink || "",
|
|
13191
|
+
isEditMode: isPodDesignEditMode
|
|
13192
|
+
});
|
|
13193
|
+
},
|
|
13194
|
+
rel: "noopener noreferrer",
|
|
13195
|
+
className: cn(
|
|
13196
|
+
"mt-[16px] h-[42px] inline-flex items-center border-2 justify-center gap-[6px] rounded-full px-[24px] text-[14px] font-bold transition-colors",
|
|
13197
|
+
isPodButtonDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
13198
|
+
isPodDesignEditMode ? "text-[#080A0F] border-[#080A0F]" : "text-white bg-[#080A0F] border-[#080A0F]"
|
|
13199
|
+
),
|
|
13200
|
+
children: [
|
|
13201
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13202
|
+
"svg",
|
|
13203
|
+
{
|
|
13204
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13205
|
+
width: "20",
|
|
13206
|
+
height: "20",
|
|
13207
|
+
viewBox: "0 0 20 20",
|
|
13208
|
+
fill: "none",
|
|
13209
|
+
children: [
|
|
13210
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13211
|
+
"path",
|
|
13212
|
+
{
|
|
13213
|
+
d: "M17.0833 16.666C17.5436 16.666 17.9167 17.0391 17.9167 17.4993C17.9167 17.9596 17.5436 18.3327 17.0833 18.3327L2.91668 18.3327C2.45644 18.3327 2.08334 17.9596 2.08334 17.4993C2.08334 17.0391 2.45644 16.666 2.91668 16.666H17.0833Z",
|
|
13214
|
+
fill: "currentColor"
|
|
13215
|
+
}
|
|
13216
|
+
),
|
|
13217
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13218
|
+
"path",
|
|
13219
|
+
{
|
|
13220
|
+
d: "M13.2064 1.66602C13.4274 1.66604 13.6393 1.75387 13.7956 1.91016L16.8392 4.9554C17.1645 5.28081 17.1645 5.80838 16.8392 6.13379L8.22185 14.7552C8.06556 14.9116 7.85292 14.9993 7.63185 14.9993L4.58334 14.9993C4.12311 14.9993 3.75001 14.6263 3.75001 14.166V11.133C3.75001 10.9122 3.83741 10.7 3.99334 10.5438L12.6164 1.91016L12.6774 1.85482C12.8257 1.7331 13.0128 1.66605 13.2064 1.66602ZM5.41668 11.4772V13.3327H7.28679L15.0716 5.54378L13.2064 3.67773L5.41668 11.4772Z",
|
|
13221
|
+
fill: "currentColor"
|
|
13222
|
+
}
|
|
13223
|
+
)
|
|
13224
|
+
]
|
|
13225
|
+
}
|
|
13226
|
+
),
|
|
13227
|
+
selectedPodButtonText
|
|
13228
|
+
]
|
|
13229
|
+
}
|
|
13230
|
+
)
|
|
13231
|
+
] })
|
|
13232
|
+
] }) }),
|
|
13238
13233
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13239
13234
|
DateTimePicker_default2,
|
|
13240
13235
|
{
|