@florid-kit/components 2.4.6 → 2.5.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.
@@ -0,0 +1,83 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ export declare class OccitaneOptionTile extends LitElement {
4
+ static styles: import('lit').CSSResult;
5
+ /** SKU identifier passed to events for cart integration */
6
+ sku: string;
7
+ /** Product image URL */
8
+ imageUrl: string;
9
+ /** Alt text for the product image */
10
+ altImage: string;
11
+ /** Product title */
12
+ title: string;
13
+ /** Optional subtitle (e.g. volume, variant) */
14
+ subtitle: string;
15
+ /** Optional expandable description */
16
+ description: string;
17
+ /**
18
+ * Formatted price string from the backend (e.g. "$2.00").
19
+ * Ignored when priceValue === 0 — the FREE label is shown instead.
20
+ */
21
+ price: string;
22
+ /**
23
+ * Numeric price value derived from the SKU.
24
+ * 0 → FREE label; >0 → display the `price` string.
25
+ */
26
+ priceValue: number;
27
+ /**
28
+ * Optional link label to render in the price area instead of a price.
29
+ * Requires `linkHref` to be set. Takes precedence over price/FREE display.
30
+ */
31
+ linkLabel: string;
32
+ /** href for the optional price-area link */
33
+ linkHref: string;
34
+ /** Target for the optional price-area link */
35
+ linkTarget: string;
36
+ /** Whether this tile is currently selected/added */
37
+ selected: boolean;
38
+ /** When true, a quantity stepper is shown while the tile is selected */
39
+ withQuantity: boolean;
40
+ /** Current quantity (only meaningful when withQuantity is true) */
41
+ quantity: number;
42
+ /** Label for the add action */
43
+ labelAdd: string;
44
+ /** Label for the remove action */
45
+ labelRemove: string;
46
+ /** Label displayed when priceValue === 0 */
47
+ labelFree: string;
48
+ /** Label to expand the description */
49
+ labelShowDetails: string;
50
+ /** Label to collapse the description */
51
+ labelHideDetails: string;
52
+ /** When true, the tile is non-interactive and a translucent overlay is shown */
53
+ disabled: boolean;
54
+ /** Optional callback fired when the user adds the tile (alternative to listening to the `option-add` event) */
55
+ onOptionAdd?: (detail: {
56
+ sku: string;
57
+ quantity: number;
58
+ }) => void;
59
+ /** Optional callback fired when the user removes the tile (alternative to listening to the `option-remove` event) */
60
+ onOptionRemove?: (detail: {
61
+ sku: string;
62
+ }) => void;
63
+ /** Optional callback fired when the quantity changes (alternative to listening to the `option-quantity-change` event) */
64
+ onOptionQuantityChange?: (detail: {
65
+ sku: string;
66
+ quantity: number;
67
+ }) => void;
68
+ private _descriptionExpanded;
69
+ private _handleAdd;
70
+ private _handleRemove;
71
+ private _handleIncrement;
72
+ private _handleDecrement;
73
+ private _toggleDescription;
74
+ private get _isFree();
75
+ private _renderPriceArea;
76
+ private _renderQuantitySelector;
77
+ protected render(): import('lit').TemplateResult<1>;
78
+ }
79
+ declare global {
80
+ interface HTMLElementTagNameMap {
81
+ "o-option-tile": OccitaneOptionTile;
82
+ }
83
+ }