@bettercms-ai/ui 0.15.1 → 0.16.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.
@@ -49,7 +49,7 @@ interface ButtonBlockProps extends ButtonProps, BcmsBindingProps {
49
49
  /** The block style's paint (`splitButtonStyle(style).paint`), on the anchor itself. */
50
50
  style?: CSSProperties;
51
51
  }
52
- declare function Button({ text, href, variant, size, fullWidth, arrow, icon: iconProp, newTab, rel, align, className, style, "data-bcms-field": field, "data-bcms-kind": kind, }: ButtonBlockProps): react_jsx_runtime.JSX.Element;
52
+ declare function Button({ text, href, variant, size, fullWidth, arrow, icon: iconProp, newTab, rel, action, align, className, style, "data-bcms-field": field, "data-bcms-kind": kind, }: ButtonBlockProps): react_jsx_runtime.JSX.Element;
53
53
 
54
54
  interface SpacerBlockProps extends SpacerProps {
55
55
  className?: string;
package/dist/blocks.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as Button, C as Columns, H as Heading, I as Image, S as Spacer, T as Text, V as Video } from './Video-D6jrdR2Z.js';
1
+ export { a as Button, C as Columns, H as Heading, I as Image, S as Spacer, T as Text, V as Video } from './Video-vB2IlrdH.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { SectionProps, ContentBlock, NavbarProps, FooterProps, SliderProps, TabsProps, ComponentProps, FormProps } from '@bettercms-ai/types';
4
4
  import React from 'react';
package/dist/blocks.js CHANGED
@@ -589,6 +589,7 @@ function Button({
589
589
  icon: iconProp,
590
590
  newTab = false,
591
591
  rel,
592
+ action,
592
593
  align = "left",
593
594
  className = "",
594
595
  style,
@@ -620,6 +621,13 @@ function Button({
620
621
  const sizeClass = size === "sm" || size === "lg" ? sizeStyles[size] : sizeStyles.md;
621
622
  const fullClass = fullWidth === true ? "flex w-full justify-center" : "";
622
623
  const relTokens = [...newTab === true ? ["noopener", "noreferrer"] : [], ...LINK_RELS.includes(rel) ? [rel] : []];
624
+ if (action === "code") {
625
+ return /* @__PURE__ */ jsxs3("button", { type: "button", "data-bcms-field": field, "data-bcms-kind": kind, style, className: cn(baseStyles, variantStyles[buttonVariantOf(variant)], alignClass, sizeClass, fullClass, className), children: [
626
+ icon && /* @__PURE__ */ jsx5("span", { className: "mr-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg(icon, "bcms-btn-icon") } }),
627
+ text,
628
+ arrow === true && /* @__PURE__ */ jsx5("span", { className: "ml-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg("arrow-right", "bcms-btn-arrow") } })
629
+ ] });
630
+ }
623
631
  return /* @__PURE__ */ jsxs3(
624
632
  "a",
625
633
  {