@liquidcommerce/elements-sdk 2.6.0-beta.115 → 2.6.0-beta.116
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.checkout.esm.js +7906 -7893
- package/dist/index.esm.js +12220 -12184
- package/dist/types/constants/prop65.constant.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-prop65-warning.component.d.ts +1 -0
- package/dist/types/modules/product/product.component.d.ts +3 -0
- package/docs/v1/guides/checkout-component.md +6 -4
- package/docs/v1/guides/product-component.md +10 -6
- package/package.json +1 -1
|
@@ -5,3 +5,4 @@ export declare const PROP65: {
|
|
|
5
5
|
readonly BODY_LEAD: "WARNING:";
|
|
6
6
|
readonly BODY: "Drinking distilled spirits, beer, coolers, wine and other alcoholic beverages may increase cancer risk, and, during pregnancy, can cause birth defects. For more information go to";
|
|
7
7
|
};
|
|
8
|
+
export declare function isProp65State(state: string | null | undefined): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
import type { ICheckoutComponent } from '@/interfaces/configs';
|
|
3
3
|
export declare class CheckoutProp65WarningComponent extends BaseComponent<null, ICheckoutComponent> {
|
|
4
|
+
constructor();
|
|
4
5
|
get hostClasses(): string[];
|
|
5
6
|
private colorMode;
|
|
6
7
|
protected template(): HTMLElement;
|
|
@@ -5,9 +5,12 @@ export interface IProductComponentParams {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class ProductComponent extends BaseComponent<IProductComponentParams, IProductComponent> {
|
|
7
7
|
private titleElement;
|
|
8
|
+
private contentElement;
|
|
9
|
+
private prop65Warning;
|
|
8
10
|
constructor();
|
|
9
11
|
private getProductId;
|
|
10
12
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
13
|
+
private syncProp65Warning;
|
|
11
14
|
protected template(): HTMLElement;
|
|
12
15
|
disconnected(): Promise<void>;
|
|
13
16
|
}
|
|
@@ -455,13 +455,15 @@ window.addEventListener('lce:actions.checkout_product_add_failed', (event) => {
|
|
|
455
455
|
## California Proposition 65 Warning
|
|
456
456
|
|
|
457
457
|
The order summary shows a panel directly above the place-order button reading **Adult signature
|
|
458
|
-
(21+) required at delivery.**
|
|
459
|
-
|
|
458
|
+
(21+) required at delivery.** When the shipping address is in California, the panel adds
|
|
459
|
+
**CA WARNING · California Proposition 65 information for these products**, so the warning is
|
|
460
|
+
presented before the purchase completes. The text links to the OEHHA alcohol page,
|
|
460
461
|
[www.P65Warnings.ca.gov/alcohol](https://www.p65warnings.ca.gov/alcohol), in a new tab. The full
|
|
461
462
|
27 CCR § 25607.4 text is on the product element.
|
|
462
463
|
|
|
463
|
-
|
|
464
|
-
|
|
464
|
+
The panel appears in the drawer checkout, the hosted checkout and the checkout-only build. The
|
|
465
|
+
adult-signature notice is always shown; the Prop 65 line follows the shipping address's state and
|
|
466
|
+
updates when the address changes. Neither can be turned off or reworded by configuration. Its colours follow `global.layout.poweredByMode` — the same
|
|
465
467
|
light/dark switch the Stripe payment form uses — as a fixed pair so the copy is always legible:
|
|
466
468
|
`light` is `#18181B` on `#F5F3EE`, `dark` is `#F5F3EE` on `#2A2824`. The font and corner radius come
|
|
467
469
|
from your theme. If your checkout is dark, set `poweredByMode: 'dark'`.
|
|
@@ -229,12 +229,16 @@ Adjust product quantity before adding to cart:
|
|
|
229
229
|
|
|
230
230
|
### California Proposition 65 Warning
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
Expanding it shows the alcoholic-beverage warning
|
|
234
|
-
link to
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
232
|
+
When the shopper's address is in California, the product element ends with a collapsed
|
|
233
|
+
**CA WARNING — California Proposition 65** row. Expanding it shows the alcoholic-beverage warning
|
|
234
|
+
required by 27 CCR § 25607.4, verbatim, with a link to
|
|
235
|
+
[www.P65Warnings.ca.gov/alcohol](https://www.p65warnings.ca.gov/alcohol). The row appears and
|
|
236
|
+
disappears in place as the address changes; with no address set, or an address in another state, it
|
|
237
|
+
is not rendered.
|
|
238
|
+
|
|
239
|
+
This is a compliance requirement for alcohol sold online to California, so for a California address
|
|
240
|
+
it cannot be turned off: there is no layout option, theme token or attribute that removes the row or
|
|
241
|
+
changes its wording. It takes its
|
|
238
242
|
colours, fonts and dividers from your theme (`defaultTextColor`, `accentColor`, the heading and
|
|
239
243
|
paragraph fonts) so it fits your design — check that `defaultTextColor` reaches 4.5:1 against your
|
|
240
244
|
product background, since the SDK renders it as given.
|
package/package.json
CHANGED