kaafil-react-uikit 0.10.1 → 0.10.2
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/traveller/index.js
CHANGED
|
@@ -1272,6 +1272,11 @@ function HouseholdBanner({ label, names }) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
);
|
|
1274
1274
|
}
|
|
1275
|
+
|
|
1276
|
+
// src/traveller/KaafilShareView/internal/sections/planRow.ts
|
|
1277
|
+
function usesTimeColumn(items) {
|
|
1278
|
+
return items.some((item) => item.startTime !== null || item.timeState === "now");
|
|
1279
|
+
}
|
|
1275
1280
|
function ItineraryDayStrip({
|
|
1276
1281
|
itinerary,
|
|
1277
1282
|
timezone,
|
|
@@ -1281,6 +1286,7 @@ function ItineraryDayStrip({
|
|
|
1281
1286
|
const { t } = useKaafilChrome();
|
|
1282
1287
|
const todayIndex = itinerary.days.findIndex((day) => day.isToday);
|
|
1283
1288
|
const selectedDay = itinerary.days[selectedIndex] ?? itinerary.days[0];
|
|
1289
|
+
const showTime = usesTimeColumn(selectedDay?.items ?? []);
|
|
1284
1290
|
if (itinerary.days.length === 0 || selectedDay === void 0) {
|
|
1285
1291
|
return null;
|
|
1286
1292
|
}
|
|
@@ -1330,7 +1336,7 @@ function ItineraryDayStrip({
|
|
|
1330
1336
|
{
|
|
1331
1337
|
className: `kf-share-view__row kf-share-view__plan-row kf-share-view__plan-row--${item.timeState}`,
|
|
1332
1338
|
children: [
|
|
1333
|
-
/* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-time kf-num", children: item.timeState === "now" ? t("chrome.shareView.plan.now") : item.startTime !== null ? formatTimeOfDay(item.startTime, timezone) : "" }),
|
|
1339
|
+
showTime ? /* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-time kf-num", children: item.timeState === "now" ? t("chrome.shareView.plan.now") : item.startTime !== null ? formatTimeOfDay(item.startTime, timezone) : "" }) : null,
|
|
1334
1340
|
/* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-title", children: item.title })
|
|
1335
1341
|
]
|
|
1336
1342
|
},
|
|
@@ -1645,6 +1651,7 @@ function TodayPlanSection({ itinerary, timezone }) {
|
|
|
1645
1651
|
if (today === void 0 || today.items.length === 0) {
|
|
1646
1652
|
return null;
|
|
1647
1653
|
}
|
|
1654
|
+
const showTime = usesTimeColumn(today.items);
|
|
1648
1655
|
return /* @__PURE__ */ jsxs("section", { "aria-label": t("chrome.shareView.today.eyebrow"), children: [
|
|
1649
1656
|
/* @__PURE__ */ jsxs("div", { className: "kf-share-view__eyebrow-row", children: [
|
|
1650
1657
|
/* @__PURE__ */ jsx("span", { className: "kf-eyebrow", children: t("chrome.shareView.today.eyebrow") }),
|
|
@@ -1655,7 +1662,7 @@ function TodayPlanSection({ itinerary, timezone }) {
|
|
|
1655
1662
|
{
|
|
1656
1663
|
className: `kf-share-view__row kf-share-view__plan-row kf-share-view__plan-row--${item.timeState}`,
|
|
1657
1664
|
children: [
|
|
1658
|
-
/* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-time kf-num", children: item.timeState === "now" ? t("chrome.shareView.plan.now") : item.startTime !== null ? formatTimeOfDay(item.startTime, timezone) : "" }),
|
|
1665
|
+
showTime ? /* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-time kf-num", children: item.timeState === "now" ? t("chrome.shareView.plan.now") : item.startTime !== null ? formatTimeOfDay(item.startTime, timezone) : "" }) : null,
|
|
1659
1666
|
/* @__PURE__ */ jsx("span", { className: "kf-share-view__plan-title", children: item.title })
|
|
1660
1667
|
]
|
|
1661
1668
|
},
|