@bettercms-ai/ui 0.12.0 → 0.14.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/registry.js CHANGED
@@ -555,7 +555,8 @@ function Image({
555
555
  "data-bcms-field": field,
556
556
  "data-bcms-kind": kind
557
557
  }) {
558
- return /* @__PURE__ */ jsxs2("figure", { className: cn("w-full", className), children: [
558
+ const sized = typeof width === "number" && width > 0;
559
+ return /* @__PURE__ */ jsxs2("figure", { className: cn(sized ? "max-w-full" : "w-full", className), children: [
559
560
  /* @__PURE__ */ jsx4(
560
561
  "img",
561
562
  {
@@ -566,7 +567,8 @@ function Image({
566
567
  sizes,
567
568
  "data-bcms-field": field,
568
569
  "data-bcms-kind": kind,
569
- className: "w-full h-auto rounded-md object-cover",
570
+ style: sized ? { width: `${width}px`, maxWidth: "100%", height: "auto" } : void 0,
571
+ className: cn(!sized && "w-full", "h-auto rounded-md object-cover"),
570
572
  loading: "lazy"
571
573
  }
572
574
  ),
@@ -588,6 +590,7 @@ function Button({
588
590
  newTab = false,
589
591
  align = "left",
590
592
  className = "",
593
+ style,
591
594
  "data-bcms-field": field,
592
595
  "data-bcms-kind": kind
593
596
  }) {
@@ -622,6 +625,7 @@ function Button({
622
625
  ...newTab === true ? { target: "_blank", rel: "noopener noreferrer" } : {},
623
626
  "data-bcms-field": field,
624
627
  "data-bcms-kind": kind,
628
+ style,
625
629
  className: cn(baseStyles, variantStyles[buttonVariantOf(variant)], alignClass, sizeClass, fullClass, className),
626
630
  children: [
627
631
  icon && /* @__PURE__ */ jsx5("span", { className: "mr-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg(icon, "bcms-btn-icon") } }),