@anker-in/ui 0.1.9 → 0.1.10

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
@@ -61,7 +61,10 @@ var StudioCard = ({
61
61
  "div",
62
62
  {
63
63
  ...props,
64
- className: cn("p-6 cursor-pointer transition-colors duration-200", className),
64
+ className: cn(
65
+ "p-6 cursor-pointer transition-colors duration-200",
66
+ className
67
+ ),
65
68
  style: {
66
69
  backgroundColor: isHovered ? "#f3f4f6" : "transparent",
67
70
  ...style
@@ -83,7 +86,7 @@ var StudioCard = ({
83
86
  pageData.away
84
87
  ] })
85
88
  ] }),
86
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
89
+ availableTime && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
87
90
  /* @__PURE__ */ jsxs(
88
91
  "svg",
89
92
  {
@@ -137,7 +140,7 @@ var StudioCard = ({
137
140
  }
138
141
  ),
139
142
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600", children: [
140
- pageData.available,
143
+ availableTime === pageData.noAvailableTime ? "" : pageData.available,
141
144
  " ",
142
145
  availableTime
143
146
  ] }) })
@@ -372,7 +375,7 @@ var StudioMap = ({
372
375
  <svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
373
376
  <path d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"/>
374
377
  </svg>
375
- <span style="vertical-align: middle;">${pageData.available} ${location.availableTime}</span>
378
+ <span style="vertical-align: middle;"> ${location.availableTime === pageData?.noAvailableTime ? "" : pageData.available} ${location.availableTime}</span>
376
379
  </div>` : ""}
377
380
  <div style="margin-bottom: 8px; color: #666;">
378
381
  <svg style="display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: middle;" fill="currentColor" viewBox="0 0 20 20">
@@ -1256,13 +1259,13 @@ var RoomsList = ({
1256
1259
  state,
1257
1260
  zipCode: "",
1258
1261
  country,
1259
- lat: Number(room.latitude) || 34.0522,
1260
- lng: Number(room.longitude) || -118.2437,
1262
+ lat: Number(room.latitude) || 0,
1263
+ lng: Number(room.longitude) || 0,
1261
1264
  availableTime: nextAvailableTimeslot ? `${nextAvailableTimeslot.start_time}` : mergedPageData.noAvailableTime,
1262
1265
  euifyMakeModel: room?.description
1263
1266
  };
1264
1267
  });
1265
- }, [demoRooms]);
1268
+ }, [demoRooms, mergedPageData.defaultCountry, mergedPageData.noAvailableTime]);
1266
1269
  const filteredStudioLocations = useMemo(() => {
1267
1270
  if (!selectedLocation) return studioLocations;
1268
1271
  return studioLocations.filter((location) => {
@@ -1384,7 +1387,10 @@ var RoomsList = ({
1384
1387
  onSchedule,
1385
1388
  onMouseEnter: () => setHoveredRoomId(item.id),
1386
1389
  onMouseLeave: () => setHoveredRoomId(null),
1387
- pageData: mergedPageData.studioCard
1390
+ pageData: {
1391
+ ...mergedPageData.studioCard,
1392
+ noAvailableTime: mergedPageData?.noAvailableTime
1393
+ }
1388
1394
  },
1389
1395
  item.id
1390
1396
  );
@@ -1417,7 +1423,10 @@ var RoomsList = ({
1417
1423
  hoveredLocationId: hoveredRoomId,
1418
1424
  onSchedule,
1419
1425
  mapHeight: "794px",
1420
- pageData: mergedPageData.map
1426
+ pageData: {
1427
+ ...mergedPageData.map,
1428
+ noAvailableTime: pageData?.noAvailableTime
1429
+ }
1421
1430
  }
1422
1431
  ) })
1423
1432
  ] })
@@ -1632,6 +1641,21 @@ var QuestionnaireForm = ({
1632
1641
  const [errors, setErrors] = useState({});
1633
1642
  const [agreements, setAgreements] = useState({});
1634
1643
  const [agreementError, setAgreementError] = useState("");
1644
+ const [phoneCountryCodes, setPhoneCountryCodes] = useState({});
1645
+ const defaultCountryCodes = [
1646
+ { code: "+1", country: "US/CA" },
1647
+ { code: "+86", country: "CN" },
1648
+ { code: "+44", country: "UK" },
1649
+ { code: "+81", country: "JP" },
1650
+ { code: "+82", country: "KR" },
1651
+ { code: "+65", country: "SG" },
1652
+ { code: "+852", country: "HK" },
1653
+ { code: "+886", country: "TW" },
1654
+ { code: "+61", country: "AU" },
1655
+ { code: "+49", country: "DE" },
1656
+ { code: "+33", country: "FR" }
1657
+ ];
1658
+ const countryCodes = pageData?.countryCodes || defaultCountryCodes;
1635
1659
  const getQuestionId = (question) => {
1636
1660
  return question.id || question.key || "";
1637
1661
  };
@@ -1648,6 +1672,22 @@ var QuestionnaireForm = ({
1648
1672
  });
1649
1673
  }
1650
1674
  };
1675
+ const handleEmailBlur = (questionId, value) => {
1676
+ if (!value) return;
1677
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1678
+ if (!emailRegex.test(value)) {
1679
+ setErrors((prev) => ({
1680
+ ...prev,
1681
+ [questionId]: "Please enter a valid email address"
1682
+ }));
1683
+ }
1684
+ };
1685
+ const handleCountryCodeChange = (questionId, code) => {
1686
+ setPhoneCountryCodes((prev) => ({
1687
+ ...prev,
1688
+ [questionId]: code
1689
+ }));
1690
+ };
1651
1691
  const handleCheckboxChange = (questionId, optionValue, checked) => {
1652
1692
  const currentValues = responses[questionId] || [];
1653
1693
  const newValues = checked ? [...currentValues, optionValue] : currentValues.filter((v) => v !== optionValue);
@@ -1693,7 +1733,22 @@ var QuestionnaireForm = ({
1693
1733
  const handleSubmit = (e) => {
1694
1734
  e.preventDefault();
1695
1735
  if (validateForm()) {
1696
- onSubmit?.(responses);
1736
+ const finalResponses = { ...responses };
1737
+ questions.forEach((question) => {
1738
+ if (question.type === "tel" || question.type === "phone") {
1739
+ const questionId = getQuestionId(question);
1740
+ const countryCode = phoneCountryCodes[questionId] || "+1";
1741
+ const phoneNumber = responses[questionId];
1742
+ if (phoneNumber) {
1743
+ finalResponses[questionId] = phoneNumber;
1744
+ if (questionId === "phone" || questionId === "customer_phone_number") {
1745
+ finalResponses["phone_code"] = countryCode;
1746
+ finalResponses["customer_phone_code"] = countryCode;
1747
+ }
1748
+ }
1749
+ }
1750
+ });
1751
+ onSubmit?.(finalResponses);
1697
1752
  }
1698
1753
  };
1699
1754
  const renderQuestion = (question) => {
@@ -1701,9 +1756,6 @@ var QuestionnaireForm = ({
1701
1756
  const hasError = !!errors[questionId];
1702
1757
  switch (question.type) {
1703
1758
  case "text":
1704
- case "email":
1705
- case "tel":
1706
- case "phone":
1707
1759
  return /* @__PURE__ */ jsx(
1708
1760
  "input",
1709
1761
  {
@@ -1718,6 +1770,76 @@ var QuestionnaireForm = ({
1718
1770
  )
1719
1771
  }
1720
1772
  );
1773
+ case "email":
1774
+ return /* @__PURE__ */ jsx(
1775
+ "input",
1776
+ {
1777
+ type: "email",
1778
+ value: responses[questionId] || "",
1779
+ onChange: (e) => handleChange(questionId, e.target.value),
1780
+ onBlur: (e) => handleEmailBlur(questionId, e.target.value),
1781
+ placeholder: question.placeholder,
1782
+ className: cn(
1783
+ "w-full px-4 py-3 rounded-lg border text-base",
1784
+ "focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
1785
+ hasError ? "border-red-500" : "border-[#E4E5E6]"
1786
+ )
1787
+ }
1788
+ );
1789
+ case "tel":
1790
+ case "phone":
1791
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1792
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1793
+ /* @__PURE__ */ jsx(
1794
+ "select",
1795
+ {
1796
+ value: phoneCountryCodes[questionId] || "+1",
1797
+ onChange: (e) => handleCountryCodeChange(questionId, e.target.value),
1798
+ className: cn(
1799
+ "appearance-none pl-3 pr-8 py-3 rounded-lg border text-base",
1800
+ "focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
1801
+ "bg-white cursor-pointer w-[80px]",
1802
+ hasError ? "border-red-500" : "border-[#E4E5E6]"
1803
+ ),
1804
+ children: countryCodes.map((item) => /* @__PURE__ */ jsx("option", { value: item.code, children: item.code }, item.code))
1805
+ }
1806
+ ),
1807
+ /* @__PURE__ */ jsx("div", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ jsx(
1808
+ "svg",
1809
+ {
1810
+ width: "12",
1811
+ height: "8",
1812
+ viewBox: "0 0 12 8",
1813
+ fill: "none",
1814
+ xmlns: "http://www.w3.org/2000/svg",
1815
+ children: /* @__PURE__ */ jsx(
1816
+ "path",
1817
+ {
1818
+ d: "M1 1.5L6 6.5L11 1.5",
1819
+ stroke: "#9CA3AF",
1820
+ strokeWidth: "1.5",
1821
+ strokeLinecap: "round",
1822
+ strokeLinejoin: "round"
1823
+ }
1824
+ )
1825
+ }
1826
+ ) })
1827
+ ] }),
1828
+ /* @__PURE__ */ jsx(
1829
+ "input",
1830
+ {
1831
+ type: "tel",
1832
+ value: responses[questionId] || "",
1833
+ onChange: (e) => handleChange(questionId, e.target.value),
1834
+ placeholder: question.placeholder,
1835
+ className: cn(
1836
+ "flex-1 px-4 py-3 rounded-lg border text-base",
1837
+ "focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
1838
+ hasError ? "border-red-500" : "border-[#E4E5E6]"
1839
+ )
1840
+ }
1841
+ )
1842
+ ] });
1721
1843
  case "textarea":
1722
1844
  return /* @__PURE__ */ jsx(
1723
1845
  "textarea",
@@ -1823,7 +1945,8 @@ var QuestionnaireForm = ({
1823
1945
  question.label,
1824
1946
  question.required && /* @__PURE__ */ jsx("span", { className: "text-red-500 ml-1", children: "*" })
1825
1947
  ] }),
1826
- question.description && /* @__PURE__ */ jsx("span", { className: "block text-sm text-gray-600 mt-1", children: question.description })
1948
+ question.description && /* @__PURE__ */ jsx("span", { className: "block text-sm text-gray-600 mt-1", children: question.description }),
1949
+ question.type === "email" && questionId === "email" && pageData?.emailDescription && /* @__PURE__ */ jsx("span", { className: "block text-sm text-gray-600 mt-1", children: pageData.emailDescription })
1827
1950
  ] }),
1828
1951
  renderQuestion(question),
1829
1952
  question.hint && !errors[questionId] && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: question.hint }),
@@ -1897,7 +2020,6 @@ var DateTimePicker = ({
1897
2020
  onBookingSuccess
1898
2021
  }) => {
1899
2022
  const { token } = theme.useToken();
1900
- const [selectMonth, setSelectMonth] = useState("");
1901
2023
  const [selectedDate, setSelectedDate] = useState(null);
1902
2024
  const [calendarValue, setCalendarValue] = useState(dayjs());
1903
2025
  const [selectedTimeslotId, setSelectedTimeslotId] = useState(
@@ -1922,9 +2044,8 @@ var DateTimePicker = ({
1922
2044
  locale,
1923
2045
  { enabled: !!demoRoomCode && !!demoRoom?.questionnaire_id }
1924
2046
  );
1925
- const currentDate = selectedDate || dayjs();
1926
- const startDate = currentDate.startOf("month").format("YYYY-MM-DD");
1927
- const endDate = currentDate.endOf("month").format("YYYY-MM-DD");
2047
+ const startDate = calendarValue.startOf("month").format("YYYY-MM-DD");
2048
+ const endDate = calendarValue.endOf("month").format("YYYY-MM-DD");
1928
2049
  const {
1929
2050
  data: timeslotsData,
1930
2051
  loading: timeslotsLoading,
@@ -1980,6 +2101,28 @@ var DateTimePicker = ({
1980
2101
  setIsInitialized(true);
1981
2102
  }
1982
2103
  }, [timeslotsData, isInitialized, selectedDate]);
2104
+ useEffect(() => {
2105
+ if (!timeslotsData?.timeslots || !isInitialized) return;
2106
+ if (selectedDate && selectedDate.isSame(calendarValue, "month")) {
2107
+ return;
2108
+ }
2109
+ const currentMonthStart = calendarValue.startOf("month");
2110
+ const currentMonthEnd = calendarValue.endOf("month");
2111
+ const now = dayjs();
2112
+ const availableTimeslots = timeslotsData.timeslots.filter((slot) => {
2113
+ const slotDate = dayjs(slot.start_time);
2114
+ return slot.status === "available" && slotDate.isAfter(now) && (slotDate.isAfter(currentMonthStart) || slotDate.isSame(currentMonthStart, "day")) && (slotDate.isBefore(currentMonthEnd) || slotDate.isSame(currentMonthEnd, "day"));
2115
+ });
2116
+ if (availableTimeslots.length > 0) {
2117
+ const sortedSlots = [...availableTimeslots].sort(
2118
+ (a, b) => dayjs(a.start_time).unix() - dayjs(b.start_time).unix()
2119
+ );
2120
+ const firstSlot = sortedSlots[0];
2121
+ const firstDate = dayjs(firstSlot.start_time);
2122
+ setSelectedDate(firstDate);
2123
+ setSelectedTimeslotId(firstSlot.id);
2124
+ }
2125
+ }, [calendarValue, timeslotsData, isInitialized, selectedDate]);
1983
2126
  const formatTimeslot = (slot) => {
1984
2127
  const start = dayjs(slot.start_time).format("h:mm A");
1985
2128
  const end = dayjs(slot.end_time).format("h:mm A");
@@ -2008,8 +2151,13 @@ var DateTimePicker = ({
2008
2151
  }
2009
2152
  }
2010
2153
  },
2011
- children: /* @__PURE__ */ jsxs("div", { style: wrapperStyle, className: "calendar-custom-cell w-[calc(824/1920*100vw)] min-l:max-w-[824px] l:w-full", children: [
2012
- /* @__PURE__ */ jsx("style", { children: `
2154
+ children: /* @__PURE__ */ jsxs(
2155
+ "div",
2156
+ {
2157
+ style: wrapperStyle,
2158
+ className: "calendar-custom-cell w-[calc(824/1920*100vw)] min-l:max-w-[824px] l:w-full",
2159
+ children: [
2160
+ /* @__PURE__ */ jsx("style", { children: `
2013
2161
  .calendar-custom-cell .ant-picker-cell {
2014
2162
  padding: 6px !important;
2015
2163
  text-align: center !important;
@@ -2102,164 +2250,162 @@ var DateTimePicker = ({
2102
2250
  display: none !important;
2103
2251
  }
2104
2252
  ` }),
2105
- /* @__PURE__ */ jsx(
2106
- Calendar,
2107
- {
2108
- fullscreen: false,
2109
- value: calendarValue,
2110
- onSelect: (date) => {
2111
- setSelectedDate(date);
2112
- setCalendarValue(date);
2113
- },
2114
- onPanelChange: (date) => {
2115
- setCalendarValue(date);
2116
- },
2117
- disabledDate: (current) => {
2118
- if (!current) return false;
2119
- if (current.isSame(dayjs(), "day")) return false;
2120
- if (current.isBefore(dayjs(), "day")) return true;
2121
- const dateStr = current.format("YYYY-MM-DD");
2122
- return !availableDates.has(dateStr);
2123
- },
2124
- fullCellRender: (date) => {
2125
- const isSelected = selectedDate && date.isSame(selectedDate, "day");
2126
- const isToday = date.isSame(dayjs(), "day");
2127
- const dateStr = date.format("YYYY-MM-DD");
2128
- const isDisabled = !isToday && (date.isBefore(dayjs(), "day") || !availableDates.has(dateStr));
2129
- return /* @__PURE__ */ jsx(
2130
- "div",
2131
- {
2132
- className: `ant-picker-cell-inner ${isSelected ? "ant-picker-cell-inner-selected" : ""} ${isToday ? "ant-picker-cell-inner-today" : ""}`,
2133
- style: {
2134
- backgroundColor: isSelected ? "#3ADB67" : void 0,
2135
- color: isSelected ? "white" : isDisabled ? "#BDBDBD" : void 0,
2136
- borderColor: isSelected ? "#3ADB67" : isToday ? "#3ADB67" : void 0
2137
- },
2138
- children: /* @__PURE__ */ jsx("div", { className: "ant-picker-calendar-date-value", children: date.date() })
2139
- }
2140
- );
2141
- },
2142
- headerRender: ({ value, onChange }) => {
2143
- const year = value.year();
2144
- const month = value.month();
2145
- const yearOptions = Array.from({ length: 20 }, (_, i) => {
2146
- const label = year - 10 + i;
2147
- return { label, value: label };
2148
- });
2149
- const monthOptions = value.localeData().months().map((label, index) => ({
2150
- label,
2151
- value: index
2152
- }));
2153
- const monthText = monthOptions?.find((item) => {
2154
- return item?.value === month;
2155
- });
2156
- setSelectMonth(monthText?.label || "");
2157
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3", children: [
2158
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2159
- /* @__PURE__ */ jsx(
2160
- Select,
2253
+ /* @__PURE__ */ jsx(
2254
+ Calendar,
2255
+ {
2256
+ fullscreen: false,
2257
+ value: calendarValue,
2258
+ onSelect: (date) => {
2259
+ setSelectedDate(date);
2260
+ setCalendarValue(date);
2261
+ },
2262
+ onPanelChange: (date) => {
2263
+ setCalendarValue(date);
2264
+ },
2265
+ disabledDate: (current) => {
2266
+ if (!current) return false;
2267
+ if (current.isSame(dayjs(), "day")) return false;
2268
+ if (current.isBefore(dayjs(), "day")) return true;
2269
+ const dateStr = current.format("YYYY-MM-DD");
2270
+ return !availableDates.has(dateStr);
2271
+ },
2272
+ fullCellRender: (date) => {
2273
+ const isSelected = selectedDate && date.isSame(selectedDate, "day");
2274
+ const isToday = date.isSame(dayjs(), "day");
2275
+ const dateStr = date.format("YYYY-MM-DD");
2276
+ const isDisabled = !isToday && (date.isBefore(dayjs(), "day") || !availableDates.has(dateStr));
2277
+ return /* @__PURE__ */ jsx(
2278
+ "div",
2161
2279
  {
2162
- value: month,
2163
- options: monthOptions,
2164
- onChange: (newMonth) => {
2165
- const now = value.clone().month(newMonth);
2166
- onChange(now);
2167
- },
2168
- variant: "borderless",
2169
- className: "text-2xl font-medium",
2170
- popupMatchSelectWidth: false,
2280
+ className: `ant-picker-cell-inner ${isSelected ? "ant-picker-cell-inner-selected" : ""} ${isToday ? "ant-picker-cell-inner-today" : ""}`,
2171
2281
  style: {
2172
- fontSize: "24px",
2173
- fontWeight: 500
2174
- }
2175
- }
2176
- ),
2177
- /* @__PURE__ */ jsx(
2178
- Select,
2179
- {
2180
- value: year,
2181
- options: yearOptions,
2182
- onChange: (newYear) => {
2183
- const now = value.clone().year(newYear);
2184
- onChange(now);
2282
+ backgroundColor: isSelected ? "#3ADB67" : void 0,
2283
+ color: isSelected ? "white" : isDisabled ? "#BDBDBD" : void 0,
2284
+ borderColor: isSelected ? "#3ADB67" : isToday ? "#3ADB67" : void 0
2185
2285
  },
2186
- variant: "borderless",
2187
- className: "text-2xl font-medium",
2188
- popupMatchSelectWidth: false,
2189
- style: {
2190
- fontSize: "24px",
2191
- fontWeight: 500
2192
- }
2286
+ children: /* @__PURE__ */ jsx("div", { className: "ant-picker-calendar-date-value", children: date.date() })
2193
2287
  }
2194
- )
2195
- ] }),
2196
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2197
- /* @__PURE__ */ jsx(
2198
- "button",
2199
- {
2200
- onClick: () => {
2201
- const newDate = value.subtract(1, "month");
2202
- onChange(newDate);
2203
- },
2204
- className: "w-10 h-10 flex items-center justify-center hover:bg-gray-100 rounded-lg transition-colors",
2205
- children: /* @__PURE__ */ jsx(
2206
- "svg",
2288
+ );
2289
+ },
2290
+ headerRender: ({ value, onChange }) => {
2291
+ const year = value.year();
2292
+ const month = value.month();
2293
+ const yearOptions = Array.from({ length: 20 }, (_, i) => {
2294
+ const label = year - 10 + i;
2295
+ return { label, value: label };
2296
+ });
2297
+ const monthOptions = value.localeData().months().map((label, index) => ({
2298
+ label,
2299
+ value: index
2300
+ }));
2301
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3", children: [
2302
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2303
+ /* @__PURE__ */ jsx(
2304
+ Select,
2207
2305
  {
2208
- width: "20",
2209
- height: "20",
2210
- viewBox: "0 0 20 20",
2211
- fill: "none",
2212
- xmlns: "http://www.w3.org/2000/svg",
2306
+ value: month,
2307
+ options: monthOptions,
2308
+ onChange: (newMonth) => {
2309
+ const now = value.clone().month(newMonth);
2310
+ onChange(now);
2311
+ },
2312
+ variant: "borderless",
2313
+ className: "text-2xl font-medium",
2314
+ popupMatchSelectWidth: false,
2315
+ style: {
2316
+ fontSize: "24px",
2317
+ fontWeight: 500
2318
+ }
2319
+ }
2320
+ ),
2321
+ /* @__PURE__ */ jsx(
2322
+ Select,
2323
+ {
2324
+ value: year,
2325
+ options: yearOptions,
2326
+ onChange: (newYear) => {
2327
+ const now = value.clone().year(newYear);
2328
+ onChange(now);
2329
+ },
2330
+ variant: "borderless",
2331
+ className: "text-2xl font-medium",
2332
+ popupMatchSelectWidth: false,
2333
+ style: {
2334
+ fontSize: "24px",
2335
+ fontWeight: 500
2336
+ }
2337
+ }
2338
+ )
2339
+ ] }),
2340
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2341
+ /* @__PURE__ */ jsx(
2342
+ "button",
2343
+ {
2344
+ onClick: () => {
2345
+ const newDate = value.subtract(1, "month");
2346
+ onChange(newDate);
2347
+ },
2348
+ className: "w-10 h-10 flex items-center justify-center hover:bg-gray-100 rounded-lg transition-colors",
2213
2349
  children: /* @__PURE__ */ jsx(
2214
- "path",
2350
+ "svg",
2215
2351
  {
2216
- d: "M12 16L6 10L12 4",
2217
- stroke: "currentColor",
2218
- strokeWidth: "2",
2219
- strokeLinecap: "round",
2220
- strokeLinejoin: "round"
2352
+ width: "20",
2353
+ height: "20",
2354
+ viewBox: "0 0 20 20",
2355
+ fill: "none",
2356
+ xmlns: "http://www.w3.org/2000/svg",
2357
+ children: /* @__PURE__ */ jsx(
2358
+ "path",
2359
+ {
2360
+ d: "M12 16L6 10L12 4",
2361
+ stroke: "currentColor",
2362
+ strokeWidth: "2",
2363
+ strokeLinecap: "round",
2364
+ strokeLinejoin: "round"
2365
+ }
2366
+ )
2221
2367
  }
2222
2368
  )
2223
2369
  }
2224
- )
2225
- }
2226
- ),
2227
- /* @__PURE__ */ jsx(
2228
- "button",
2229
- {
2230
- onClick: () => {
2231
- const newDate = value.add(1, "month");
2232
- onChange(newDate);
2233
- },
2234
- className: "w-10 h-10 flex items-center justify-center hover:bg-gray-100 rounded-lg transition-colors",
2235
- children: /* @__PURE__ */ jsx(
2236
- "svg",
2370
+ ),
2371
+ /* @__PURE__ */ jsx(
2372
+ "button",
2237
2373
  {
2238
- width: "20",
2239
- height: "20",
2240
- viewBox: "0 0 20 20",
2241
- fill: "none",
2242
- xmlns: "http://www.w3.org/2000/svg",
2374
+ onClick: () => {
2375
+ const newDate = value.add(1, "month");
2376
+ onChange(newDate);
2377
+ },
2378
+ className: "w-10 h-10 flex items-center justify-center hover:bg-gray-100 rounded-lg transition-colors",
2243
2379
  children: /* @__PURE__ */ jsx(
2244
- "path",
2380
+ "svg",
2245
2381
  {
2246
- d: "M8 4L14 10L8 16",
2247
- stroke: "currentColor",
2248
- strokeWidth: "2",
2249
- strokeLinecap: "round",
2250
- strokeLinejoin: "round"
2382
+ width: "20",
2383
+ height: "20",
2384
+ viewBox: "0 0 20 20",
2385
+ fill: "none",
2386
+ xmlns: "http://www.w3.org/2000/svg",
2387
+ children: /* @__PURE__ */ jsx(
2388
+ "path",
2389
+ {
2390
+ d: "M8 4L14 10L8 16",
2391
+ stroke: "currentColor",
2392
+ strokeWidth: "2",
2393
+ strokeLinecap: "round",
2394
+ strokeLinejoin: "round"
2395
+ }
2396
+ )
2251
2397
  }
2252
2398
  )
2253
2399
  }
2254
2400
  )
2255
- }
2256
- )
2257
- ] })
2258
- ] });
2259
- }
2260
- }
2261
- )
2262
- ] })
2401
+ ] })
2402
+ ] });
2403
+ }
2404
+ }
2405
+ )
2406
+ ]
2407
+ }
2408
+ )
2263
2409
  }
2264
2410
  ),
2265
2411
  /* @__PURE__ */ jsxs("div", { className: "bg-white p-[24px] rounded-[12px] flex-1", children: [
@@ -2299,7 +2445,7 @@ var DateTimePicker = ({
2299
2445
  )
2300
2446
  }
2301
2447
  ),
2302
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: selectMonth }),
2448
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: selectedDate ? selectedDate.format("MMMM D, YYYY") : "" }),
2303
2449
  /* @__PURE__ */ jsx(
2304
2450
  "button",
2305
2451
  {
@@ -2368,7 +2514,11 @@ var DateTimePicker = ({
2368
2514
  },
2369
2515
  slot.id
2370
2516
  );
2371
- }) })
2517
+ }) }),
2518
+ !timeslotsLoading && dayTimeslots?.length > 0 && /* @__PURE__ */ jsx("div", { className: "py-4 text-right", children: pageData?.timezone?.replace(
2519
+ "{{timezone}}",
2520
+ demoRoom?.timezone || timezone || ""
2521
+ ) })
2372
2522
  ] })
2373
2523
  ] }),
2374
2524
  /* @__PURE__ */ jsxs("div", { className: "mt-12", children: [
@@ -2520,7 +2670,7 @@ var DemoRoomDetail = ({
2520
2670
  /* @__PURE__ */ jsx("p", { className: "text-sm mt-2", children: error.message })
2521
2671
  ] }) });
2522
2672
  }
2523
- return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8 l:flex l:flex-col items-start", children: [
2673
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8 l:flex l:flex-col items-start py-[24px]", children: [
2524
2674
  /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-[24px]", children: [
2525
2675
  /* @__PURE__ */ jsx("h1", { className: "text-[40px] font-bold text-gray-900 leading-tight", children: title }),
2526
2676
  /* @__PURE__ */ jsx("div", { className: "space-y-4", children: descriptions.map((desc, index) => /* @__PURE__ */ jsx(