@syscore/ui-library 2.0.0-beta-publish-workflow-beta.7 → 2.0.0-beta-publish-workflow-beta.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.es.js CHANGED
@@ -5131,6 +5131,7 @@ const Stack = React.forwardRef(
5131
5131
  vAlign,
5132
5132
  wrap = false,
5133
5133
  padding,
5134
+ marginY,
5134
5135
  width,
5135
5136
  height,
5136
5137
  maxWidth,
@@ -5159,6 +5160,8 @@ const Stack = React.forwardRef(
5159
5160
  style: {
5160
5161
  gap: gapCss(gap),
5161
5162
  padding: gapCss(padding),
5163
+ marginTop: gapCss(marginY),
5164
+ marginBottom: gapCss(marginY),
5162
5165
  width: toCssSize(width),
5163
5166
  height: toCssSize(height),
5164
5167
  maxWidth: toCssSize(maxWidth),
@@ -17740,7 +17743,42 @@ function ResourceThumbnail({
17740
17743
  );
17741
17744
  }
17742
17745
  const HeroSplitImage = React.forwardRef(
17743
- ({ src, alt = "" }, ref) => /* @__PURE__ */ jsx("span", { className: "hero-split-image-frame", children: /* @__PURE__ */ jsx("img", { ref, src, alt, className: "hero-split-image" }) })
17746
+ ({ src, alt = "" }, ref) => {
17747
+ const [current, setCurrent] = React.useState(src);
17748
+ const [previous, setPrevious] = React.useState(null);
17749
+ const [isCurrentLoaded, setIsCurrentLoaded] = React.useState(false);
17750
+ React.useEffect(() => {
17751
+ if (src === current) return;
17752
+ setPrevious(current);
17753
+ setCurrent(src);
17754
+ setIsCurrentLoaded(false);
17755
+ }, [src, current]);
17756
+ return /* @__PURE__ */ jsxs("span", { className: "hero-split-image-frame", children: [
17757
+ previous ? /* @__PURE__ */ jsx(
17758
+ "img",
17759
+ {
17760
+ src: previous,
17761
+ alt: "",
17762
+ "aria-hidden": "true",
17763
+ className: cn("hero-split-image", !isCurrentLoaded && "hero-split-image--loaded"),
17764
+ onTransitionEnd: (event) => {
17765
+ if (event.propertyName === "opacity" && isCurrentLoaded) setPrevious(null);
17766
+ }
17767
+ }
17768
+ ) : null,
17769
+ /* @__PURE__ */ jsx(
17770
+ "img",
17771
+ {
17772
+ ref,
17773
+ src: current,
17774
+ alt,
17775
+ className: cn("hero-split-image", isCurrentLoaded && "hero-split-image--loaded"),
17776
+ onLoad: () => setIsCurrentLoaded(true)
17777
+ },
17778
+ current
17779
+ )
17780
+ ] });
17781
+ }
17744
17782
  );
17745
17783
  HeroSplitImage.displayName = "HeroSplitImage";
17746
17784
  const PriceTag = React.forwardRef(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syscore/ui-library",
3
- "version": "2.0.0-beta-publish-workflow-beta.7",
3
+ "version": "2.0.0-beta-publish-workflow-beta.9",
4
4
  "description": "A comprehensive React component library built with Radix UI, Tailwind CSS, and TypeScript",
5
5
  "private": false,
6
6
  "type": "module",