@florid-kit/components 2.6.5 → 2.6.7
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/components/option-tile-group.d.ts +52 -0
- package/components/option-tile.d.ts +7 -0
- package/components/side-panel.d.ts +1 -0
- package/index.js +366 -329
- package/index.mjs +1432 -1318
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
declare const OccitaneOptionTileGroup_base: import('../behaviors/mixin.js').MixinReturn<typeof LitElement>;
|
|
4
|
+
/**
|
|
5
|
+
* `<o-option-tile-group>` — wrapper for a set of `<o-option-tile>` elements.
|
|
6
|
+
*
|
|
7
|
+
* Responsibilities:
|
|
8
|
+
* - Keeps all collapsed tiles at the same height (height of the tallest one).
|
|
9
|
+
* - Recalculates when a tile is selected/deselected (quantity stepper appears/disappears).
|
|
10
|
+
* - Lets each tile expand independently when "Show details" is clicked.
|
|
11
|
+
* - Supports two layouts via the `layout` attribute:
|
|
12
|
+
* - `"row"` (default): horizontal scroll row.
|
|
13
|
+
* - `"grid"`: CSS grid with `columns` per row (default 3).
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* ```html
|
|
17
|
+
* <!-- Row -->
|
|
18
|
+
* <o-option-tile-group>
|
|
19
|
+
* <o-option-tile ...></o-option-tile>
|
|
20
|
+
* </o-option-tile-group>
|
|
21
|
+
*
|
|
22
|
+
* <!-- Grid, 3 per row -->
|
|
23
|
+
* <o-option-tile-group layout="grid" columns="3">
|
|
24
|
+
* <o-option-tile ...></o-option-tile>
|
|
25
|
+
* </o-option-tile-group>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class OccitaneOptionTileGroup extends OccitaneOptionTileGroup_base {
|
|
29
|
+
static readonly styles: import('lit').CSSResult;
|
|
30
|
+
/** Layout of the group: "row" (horizontal scroll) or "grid" (CSS grid). */
|
|
31
|
+
layout: "row" | "grid";
|
|
32
|
+
/** Number of columns when layout="grid". */
|
|
33
|
+
columns: number;
|
|
34
|
+
private _lockedHeight;
|
|
35
|
+
private _mutationObserver;
|
|
36
|
+
private _retryFrame;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
disconnectedCallback(): void;
|
|
39
|
+
private _setupObserver;
|
|
40
|
+
private _clearAndRemeasure;
|
|
41
|
+
private _scheduleRemeasure;
|
|
42
|
+
private _tryMeasureAndLock;
|
|
43
|
+
private _applyLockedHeight;
|
|
44
|
+
private _tiles;
|
|
45
|
+
protected render(): import('lit').TemplateResult<1>;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
"o-option-tile-group": OccitaneOptionTileGroup;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -50,6 +50,12 @@ export declare class OccitaneOptionTile extends OccitaneOptionTile_base {
|
|
|
50
50
|
labelHideDetails: string;
|
|
51
51
|
/** When true, the tile is non-interactive and a translucent overlay is shown */
|
|
52
52
|
disabled: boolean;
|
|
53
|
+
/** Override tile width (e.g. "200px"). Overrides both mobile and desktop default widths. */
|
|
54
|
+
width: string;
|
|
55
|
+
/** Override tile height (e.g. "300px"). */
|
|
56
|
+
height: string;
|
|
57
|
+
/** Override image size (e.g. "140px"). Overrides both mobile and desktop image dimensions. */
|
|
58
|
+
imageSize: string;
|
|
53
59
|
/** Optional callback fired when the user adds the tile (alternative to listening to the `option-add` event) */
|
|
54
60
|
onOptionAdd?: (detail: {
|
|
55
61
|
sku: string;
|
|
@@ -65,6 +71,7 @@ export declare class OccitaneOptionTile extends OccitaneOptionTile_base {
|
|
|
65
71
|
quantity: number;
|
|
66
72
|
}) => void;
|
|
67
73
|
private _descriptionExpanded;
|
|
74
|
+
updated(changedProps: Map<string, unknown>): void;
|
|
68
75
|
private _handleAdd;
|
|
69
76
|
private _handleRemove;
|
|
70
77
|
private _handleIncrement;
|
|
@@ -36,6 +36,7 @@ export declare class OccitaneSidePanel extends OccitaneSidePanel_base {
|
|
|
36
36
|
isHidingDetail: boolean;
|
|
37
37
|
private previousFocusedElement;
|
|
38
38
|
private previousFocusedSelector;
|
|
39
|
+
private _hideTimeout;
|
|
39
40
|
static styles: import('lit').CSSResult;
|
|
40
41
|
static focusablesSelector: string;
|
|
41
42
|
static focusablesCustomElementsSelector: string;
|