@snacky/ui 0.13.2 → 0.13.3

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.cts CHANGED
@@ -215,9 +215,9 @@ declare function SquareBanner({ imageUrl, alt, onClick, className }: ImageBanner
215
215
  /** Snacky Full-width Banner - prominent promotional banner on detail pages. */
216
216
  declare function FullWidthBanner({ imageUrl, alt, onClick, className }: ImageBannerProps): react.JSX.Element;
217
217
  interface PointBalanceBannerProps {
218
- pointsIcon: ReactNode;
218
+ pointsIcon?: ReactNode;
219
219
  points: string;
220
- balanceIcon: ReactNode;
220
+ balanceIcon?: ReactNode;
221
221
  balance: string;
222
222
  className?: string;
223
223
  }
package/dist/index.d.ts CHANGED
@@ -215,9 +215,9 @@ declare function SquareBanner({ imageUrl, alt, onClick, className }: ImageBanner
215
215
  /** Snacky Full-width Banner - prominent promotional banner on detail pages. */
216
216
  declare function FullWidthBanner({ imageUrl, alt, onClick, className }: ImageBannerProps): react.JSX.Element;
217
217
  interface PointBalanceBannerProps {
218
- pointsIcon: ReactNode;
218
+ pointsIcon?: ReactNode;
219
219
  points: string;
220
- balanceIcon: ReactNode;
220
+ balanceIcon?: ReactNode;
221
221
  balance: string;
222
222
  className?: string;
223
223
  }
package/dist/index.js CHANGED
@@ -393,7 +393,16 @@ var SearchField = forwardRef5(function SearchField2({ value, onChange, searchIco
393
393
  ...rest
394
394
  }
395
395
  ),
396
- value && onClear && /* @__PURE__ */ jsx6("button", { type: "button", className: "snacky-search__clear", onClick: onClear, "aria-label": "Clear search", children: clearIcon ?? /* @__PURE__ */ jsx6(closeInput, { width: 16, height: 16 }) })
396
+ value && /* @__PURE__ */ jsx6(
397
+ "button",
398
+ {
399
+ type: "button",
400
+ className: "snacky-search__clear",
401
+ onClick: onClear ?? (() => onChange("")),
402
+ "aria-label": "Clear search",
403
+ children: clearIcon ?? /* @__PURE__ */ jsx6(closeInput, { width: 16, height: 16 })
404
+ }
405
+ )
397
406
  ] });
398
407
  });
399
408
 
@@ -486,7 +495,7 @@ function ChatInput({ value, onChange, onSend, sendIcon, className, placeholder =
486
495
  import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
487
496
  function AddressResult({ icon: icon3, title, subtitle, onClick, className }) {
488
497
  return /* @__PURE__ */ jsxs6("button", { type: "button", className: cx("snacky-address-result", className), onClick, children: [
489
- icon3 && /* @__PURE__ */ jsx10("span", { className: "snacky-address-result__icon", children: icon3 }),
498
+ /* @__PURE__ */ jsx10("span", { className: "snacky-address-result__icon", children: icon3 ?? /* @__PURE__ */ jsx10(address, { width: 20, height: 20 }) }),
490
499
  /* @__PURE__ */ jsxs6("span", { children: [
491
500
  /* @__PURE__ */ jsx10("p", { className: "snacky-address-result__title", children: title }),
492
501
  /* @__PURE__ */ jsx10("p", { className: "snacky-address-result__subtitle", children: subtitle })
@@ -757,7 +766,7 @@ function FullWidthBanner({ imageUrl, alt, onClick, className }) {
757
766
  function PointBalanceBanner({ pointsIcon, points: points2, balanceIcon, balance: balance3, className }) {
758
767
  return /* @__PURE__ */ jsxs13("div", { className: cx("snacky-banner-point-balance", className), children: [
759
768
  /* @__PURE__ */ jsxs13("div", { className: "snacky-banner-point-balance__item", children: [
760
- /* @__PURE__ */ jsx20("span", { className: "snacky-banner-point-balance__icon", children: pointsIcon }),
769
+ /* @__PURE__ */ jsx20("span", { className: "snacky-banner-point-balance__icon", children: pointsIcon ?? /* @__PURE__ */ jsx20(points, { width: 16, height: 16 }) }),
761
770
  /* @__PURE__ */ jsxs13("div", { children: [
762
771
  /* @__PURE__ */ jsx20("p", { className: "snacky-banner-point-balance__label", children: "Points" }),
763
772
  /* @__PURE__ */ jsx20("p", { className: "snacky-banner-point-balance__value", children: points2 })
@@ -765,7 +774,7 @@ function PointBalanceBanner({ pointsIcon, points: points2, balanceIcon, balance:
765
774
  ] }),
766
775
  /* @__PURE__ */ jsx20("div", { className: "snacky-banner-point-balance__divider" }),
767
776
  /* @__PURE__ */ jsxs13("div", { className: "snacky-banner-point-balance__item", children: [
768
- /* @__PURE__ */ jsx20("span", { className: "snacky-banner-point-balance__icon", children: balanceIcon }),
777
+ /* @__PURE__ */ jsx20("span", { className: "snacky-banner-point-balance__icon", children: balanceIcon ?? /* @__PURE__ */ jsx20(balance2, { width: 16, height: 16 }) }),
769
778
  /* @__PURE__ */ jsxs13("div", { children: [
770
779
  /* @__PURE__ */ jsx20("p", { className: "snacky-banner-point-balance__label", children: "Balance" }),
771
780
  /* @__PURE__ */ jsx20("p", { className: "snacky-banner-point-balance__value", children: balance3 })