@propeller-commerce/propeller-v2-react-ui 0.7.1 → 0.8.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/CHANGELOG.md +32 -0
- package/dist/index.cjs +84 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -2
- package/dist/index.d.ts +87 -2
- package/dist/index.js +85 -34
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +1 -1
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +5 -0
- package/dist/pure.d.ts +5 -0
- package/dist/pure.js +1 -1
- package/dist/pure.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/pure.d.cts
CHANGED
|
@@ -496,6 +496,11 @@ interface ProductPriceProps {
|
|
|
496
496
|
* Available keys: inclTax, exclTax, loginToSeePrices
|
|
497
497
|
*/
|
|
498
498
|
labels?: Record<string, string>;
|
|
499
|
+
/**
|
|
500
|
+
* Show the "log in to see prices" prompt when the price is hidden.
|
|
501
|
+
* Defaults to true; pass false to render nothing in its place.
|
|
502
|
+
*/
|
|
503
|
+
showLoginPrompt?: boolean;
|
|
499
504
|
/** Tailwind text-size class for the leading price. Defaults to 'text-3xl'. */
|
|
500
505
|
priceSize?: string;
|
|
501
506
|
/** Extra CSS class applied to the root element. */
|
package/dist/pure.d.ts
CHANGED
|
@@ -496,6 +496,11 @@ interface ProductPriceProps {
|
|
|
496
496
|
* Available keys: inclTax, exclTax, loginToSeePrices
|
|
497
497
|
*/
|
|
498
498
|
labels?: Record<string, string>;
|
|
499
|
+
/**
|
|
500
|
+
* Show the "log in to see prices" prompt when the price is hidden.
|
|
501
|
+
* Defaults to true; pass false to render nothing in its place.
|
|
502
|
+
*/
|
|
503
|
+
showLoginPrompt?: boolean;
|
|
499
504
|
/** Tailwind text-size class for the leading price. Defaults to 'text-3xl'. */
|
|
500
505
|
priceSize?: string;
|
|
501
506
|
/** Extra CSS class applied to the root element. */
|
package/dist/pure.js
CHANGED
|
@@ -820,7 +820,7 @@ function ProductPriceDisplay(props) {
|
|
|
820
820
|
return props.includeTax ? getLabel(props.labels, "exclTax", "excl. VAT") : getLabel(props.labels, "inclTax", "incl. VAT");
|
|
821
821
|
}
|
|
822
822
|
return /* @__PURE__ */ jsxs("div", { className: `propeller-product-price ${props.className || ""}`, "data-hidden": isHidden() ? "true" : "false", children: [
|
|
823
|
-
isHidden() ? /* @__PURE__ */ jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
|
|
823
|
+
isHidden() && props.showLoginPrompt !== false ? /* @__PURE__ */ jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
|
|
824
824
|
!isHidden() && !!getLeadingPrice() ? /* @__PURE__ */ jsxs("div", { className: "propeller-product-price__content flex flex-col gap-0.5", children: [
|
|
825
825
|
/* @__PURE__ */ jsxs("div", { className: "propeller-product-price__primary flex items-baseline gap-2", children: [
|
|
826
826
|
/* @__PURE__ */ jsx(
|