@landtrustinc/design-system 1.2.57 → 1.2.59

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.d.ts CHANGED
@@ -2654,8 +2654,12 @@ type PackageCardProps = {
2654
2654
  * - 'md': Default size
2655
2655
  */
2656
2656
  size?: 'xs' | 'md';
2657
+ /**
2658
+ * Loading state - shows skeleton placeholders when true
2659
+ */
2660
+ isLoading?: boolean;
2657
2661
  };
2658
- declare const PackageCard: ({ images, title, subtitle, startingPrice, isFavorited, onFavoriteClick, onClick, className, badges, availabilityBadges, id, hasContentBackground, orientation, actions, size, ...rest }: PackageCardProps) => _emotion_react_jsx_runtime.JSX.Element;
2662
+ declare const PackageCard: ({ images, title, subtitle, startingPrice, isFavorited, onFavoriteClick, onClick, className, badges, availabilityBadges, id, hasContentBackground, orientation, actions, size, isLoading, ...rest }: PackageCardProps) => _emotion_react_jsx_runtime.JSX.Element;
2659
2663
 
2660
2664
  type PackageHeaderProps = {
2661
2665
  /**
package/dist/index.js CHANGED
@@ -9876,6 +9876,9 @@ var Navigation = ({
9876
9876
  };
9877
9877
  var Navigation_default = Navigation;
9878
9878
 
9879
+ // src/PackageCard/PackageCard.tsx
9880
+ var import_react_loading_skeleton2 = __toESM(require("react-loading-skeleton"));
9881
+
9879
9882
  // src/ScrollingCarousel/components/ScrollingCarouselStep.tsx
9880
9883
  var import_react68 = require("react");
9881
9884
  var import_react_intersection_observer = require("react-intersection-observer");
@@ -10568,57 +10571,31 @@ var cardContainerStyles3 = (orientation, hasContentBackground, hasClickHandler)
10568
10571
  }
10569
10572
  `}
10570
10573
  `;
10571
- var imageContainerStyles = (orientation, size = "md") => import_react73.css`
10574
+ var imageContainerStyles = (orientation) => import_react73.css`
10572
10575
  width: 100%;
10573
10576
  height: 260px;
10574
10577
 
10575
- ${size === "xs" && import_react73.css`
10576
- aspect-ratio: 1;
10577
- height: auto;
10578
- `}
10579
-
10580
10578
  ${orientation === "horizontal" && import_react73.css`
10581
10579
  ${media.md} {
10582
10580
  width: 40%;
10583
10581
  height: 200px;
10584
-
10585
- ${size === "xs" && import_react73.css`
10586
- aspect-ratio: 1;
10587
- height: auto;
10588
- `}
10589
- }
10590
10582
  `}
10591
10583
  `;
10592
- var imageBoxStyles = (orientation, size = "md") => import_react73.css`
10584
+ var imageBoxStyles = (orientation) => import_react73.css`
10593
10585
  height: 260px;
10594
-
10595
- ${size === "xs" && import_react73.css`
10596
- aspect-ratio: 1;
10597
- height: auto;
10598
- `}
10599
-
10600
10586
  ${orientation === "horizontal" && import_react73.css`
10601
10587
  ${media.md} {
10602
10588
  height: 200px;
10603
-
10604
- ${size === "xs" && import_react73.css`
10605
- aspect-ratio: 1;
10606
- height: auto;
10607
- `}
10608
10589
  }
10609
10590
  `}
10610
10591
  `;
10611
- var contentContainerStyles = (orientation, hasContentBackground, size = "md") => import_react73.css`
10592
+ var contentContainerStyles = (orientation, hasContentBackground) => import_react73.css`
10612
10593
  ${hasContentBackground ? contentWithBackgroundStyles : contentWithoutBackgroundStyles}
10613
10594
  width: 100%;
10614
10595
  display: flex;
10615
10596
  flex-direction: column;
10616
10597
  justify-content: flex-start;
10617
10598
 
10618
- ${size === "xs" && import_react73.css`
10619
- padding: var(--spacing-2) var(--spacing-2) 0 var(--spacing-2);
10620
- `}
10621
-
10622
10599
  ${orientation === "horizontal" && import_react73.css`
10623
10600
  ${media.md} {
10624
10601
  width: 60%;
@@ -10711,8 +10688,43 @@ var PackageCard = ({
10711
10688
  orientation = "vertical",
10712
10689
  actions,
10713
10690
  size = "md",
10691
+ isLoading = false,
10714
10692
  ...rest
10715
10693
  }) => {
10694
+ if (isLoading) {
10695
+ return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
10696
+ Box_default,
10697
+ {
10698
+ css: cardContainerStyles3(orientation, hasContentBackground, false),
10699
+ className,
10700
+ children: [
10701
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10702
+ Box_default,
10703
+ {
10704
+ overflow: "hidden",
10705
+ borderRadius: "var(--spacing-4)",
10706
+ css: imageContainerStyles(orientation),
10707
+ children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_loading_skeleton2.default, { width: "100%", height: "100%", borderRadius: 16 })
10708
+ }
10709
+ ),
10710
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { css: contentContainerStyles(orientation, hasContentBackground), children: /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
10711
+ Box_default,
10712
+ {
10713
+ display: "flex",
10714
+ flexDirection: "column",
10715
+ gap: "var(--spacing-1)",
10716
+ mb: "var(--spacing-1)",
10717
+ children: [
10718
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_loading_skeleton2.default, { width: "80%", height: 16, borderRadius: 4 }),
10719
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_loading_skeleton2.default, { width: "60%", height: 14, borderRadius: 4 }),
10720
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_loading_skeleton2.default, { width: "40%", height: 14, borderRadius: 4 })
10721
+ ]
10722
+ }
10723
+ ) })
10724
+ ]
10725
+ }
10726
+ );
10727
+ }
10716
10728
  const carouselId = id || `package-card-${title.replace(/\s+/g, "-")}`;
10717
10729
  const shouldShowOverlay = availabilityBadges == null ? void 0 : availabilityBadges.some(
10718
10730
  (badge2) => badge2.showOverlay
@@ -10732,7 +10744,7 @@ var PackageCard = ({
10732
10744
  position: "relative",
10733
10745
  overflow: "hidden",
10734
10746
  borderRadius: "var(--spacing-4)",
10735
- css: imageContainerStyles(orientation, size),
10747
+ css: imageContainerStyles(orientation),
10736
10748
  children: [
10737
10749
  availabilityBadges == null ? void 0 : availabilityBadges.map((badge2, index) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10738
10750
  AvailabilityBadge_default,
@@ -10760,7 +10772,7 @@ var PackageCard = ({
10760
10772
  width: "100%",
10761
10773
  css: [
10762
10774
  imageStyles3,
10763
- imageBoxStyles(orientation, size),
10775
+ imageBoxStyles(orientation),
10764
10776
  {
10765
10777
  backgroundImage: `linear-gradient(181deg, rgba(0, 0, 0, 0.00) 75.32%, rgba(0, 0, 0, 0.40) 99.41%), url(${image})`
10766
10778
  }
@@ -10803,50 +10815,44 @@ var PackageCard = ({
10803
10815
  }
10804
10816
  ),
10805
10817
  actions && actions.length > 0 && orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { css: actionMenuStyles, children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(ActionMenu_default, { actions }) }),
10806
- /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
10807
- Box_default,
10808
- {
10809
- css: contentContainerStyles(orientation, hasContentBackground, size),
10810
- children: [
10811
- /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
10812
- Box_default,
10813
- {
10814
- display: "flex",
10815
- flexDirection: "column",
10816
- gap: "var(--spacing-1)",
10817
- mb: "var(--spacing-1)",
10818
- children: [
10819
- /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Text_default, { size: size === "xs" ? "sm" : "md", fontWeight: "bold", children: title }) }),
10820
- /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Text_default, { size: size === "xs" ? "xs" : "sm", fontWeight: "bold", children: subtitle }) }),
10821
- startingPrice && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(Text_default, { size: size === "xs" ? "xs" : "sm", fontWeight: "normal", children: [
10822
- "Starting Price ",
10823
- startingPrice,
10824
- " / Guest"
10825
- ] }) })
10826
- ]
10827
- }
10828
- ),
10829
- badges && badges.length > 0 && size !== "xs" && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10830
- Box_default,
10818
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(Box_default, { css: contentContainerStyles(orientation, hasContentBackground), children: [
10819
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
10820
+ Box_default,
10821
+ {
10822
+ display: "flex",
10823
+ flexDirection: "column",
10824
+ gap: "var(--spacing-1)",
10825
+ mb: "var(--spacing-1)",
10826
+ children: [
10827
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Text_default, { size: size === "xs" ? "sm" : "md", fontWeight: "bold", children: title }) }),
10828
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Text_default, { size: size === "xs" ? "xs" : "sm", fontWeight: "bold", children: subtitle }) }),
10829
+ startingPrice && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(Text_default, { size: size === "xs" ? "xs" : "sm", fontWeight: "normal", children: [
10830
+ "Starting Price ",
10831
+ startingPrice,
10832
+ " / Guest"
10833
+ ] }) })
10834
+ ]
10835
+ }
10836
+ ),
10837
+ badges && badges.length > 0 && size !== "xs" && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10838
+ Box_default,
10839
+ {
10840
+ display: "flex",
10841
+ gap: "var(--spacing-2) var(--spacing-4)",
10842
+ alignItems: "center",
10843
+ flexWrap: "wrap",
10844
+ children: badges.map((badge2, index) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10845
+ IconLabel_default,
10831
10846
  {
10832
- display: "flex",
10833
- gap: "var(--spacing-2) var(--spacing-4)",
10834
- alignItems: "center",
10835
- flexWrap: "wrap",
10836
- children: badges.map((badge2, index) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
10837
- IconLabel_default,
10838
- {
10839
- iconSize: badge2.iconSize || "medium",
10840
- label: badge2.label,
10841
- variant: badge2.variant
10842
- },
10843
- `badge-${badge2.variant}-${index}`
10844
- ))
10845
- }
10846
- )
10847
- ]
10848
- }
10849
- )
10847
+ iconSize: badge2.iconSize || "medium",
10848
+ label: badge2.label,
10849
+ variant: badge2.variant
10850
+ },
10851
+ `badge-${badge2.variant}-${index}`
10852
+ ))
10853
+ }
10854
+ )
10855
+ ] })
10850
10856
  ]
10851
10857
  }
10852
10858
  );