/** Which side's action panel is currently revealed on a list item. */
export type ListItemRevealSide = 'left' | 'right';
/** Events emitted by the list-item component */
export type OreListItemEvents = {
/** Emitted when the revealed action panel closes (gesture, tap, or programmatic). */
conceal: {
item: HTMLElement;
};
/**
* Emitted when a swipe crosses the full-swipe-through distance — the "swiped all the way"
* confirm gesture. Fired just before the slotted action's own click (if any).
*/
confirm: {
item: HTMLElement;
side: ListItemRevealSide;
};
/** Emitted when the item becomes deselected. */
deselect: {
item: HTMLElement;
value: null | string;
};
/** Emitted when a swipe/focus reveals an action panel. */
reveal: {
item: HTMLElement;
side: ListItemRevealSide;
};
/** Emitted when the item becomes selected (only meaningful inside a `selectable` `ore-list`). */
select: {
item: HTMLElement;
value: null | string;
};
};
/** List-item component properties */
export type OreListItemProps = {
/** Disable this item — blocks pointer interaction, swipe actions, and selection */
disabled?: boolean;
/** Which action panel is revealed: 'left' | 'right' (absent = closed). Settable programmatically. */
revealed?: ListItemRevealSide;
/**
* Opaque value compared against the parent `selectable` `ore-list`'s own `value` to derive
* `selected` — required for selection to work. There's no separate `selected` prop: the parent
* list's `value` is the single source of truth, so this item's selected state can't drift from
* it. Also reported in `select`/`deselect`/the parent's `change` event.
*/
value?: string;
};
/**
* A single row inside `ore-list`. Renders `leading`/default (title)/`description`/`trailing`
* content plus two off-canvas action panels (`actions-left`, `actions-right`) that a horizontal
* pointer/touch swipe reveals — useful for mobile-style row actions (archive, delete, …). An
* action panel only opens if it actually has slotted content; swiping the other direction is a
* no-op. Revealed actions stay reachable from the keyboard (Tab focus on a slotted action button
* reveals its panel via `:focus-within`, independent of any gesture).
*
* Swiping past the reveal distance snaps the panel fully open on release; swiping further still —
* past the full-swipe-through distance — auto-confirms that side's action immediately (fires
* `confirm` and clicks the slot's first element), the same "swipe all the way" shortcut as iOS
* Mail's delete gesture.
*
* Closing a revealed panel is deliberately one-directional: tap/click the row itself, tap outside
* the item, or open a different item's panel. Reverse-swiping an already-open item is not
* supported — see `ore-list`'s docs for the reasoning.
*
* @element ore-list-item
*
* @attr {boolean} disabled - Disable this item
* @attr {boolean} selected - Read-only reflected attribute: `true` when this item's `value` matches the parent `ore-list`'s `value`. Not independently settable.
* @attr {string} value - Opaque value compared against the parent list's `value` to derive `selected`; also reported in select/change events
* @attr {string} revealed - Which action panel is revealed: 'left' | 'right'
*
* @fires select - Item becomes selected. detail: { item: HTMLElement, value: string | null }
* @fires deselect - Item becomes deselected. detail: { item: HTMLElement, value: string | null }
* @fires reveal - An action panel opens. detail: { item: HTMLElement, side: 'left' | 'right' }
* @fires conceal - The revealed action panel closes. detail: { item: HTMLElement }
* @fires confirm - Swiped all the way through — fires before the slotted action's own click. detail: { item: HTMLElement, side: 'left' | 'right' }
*
* @slot leading - Content before the title (e.g. icon, avatar)
* @slot - Item title
* @slot description - Secondary line below the title
* @slot trailing - Content after the title (e.g. meta text, chevron)
* @slot actions-left - Buttons revealed by swiping right (or focusing into this slot)
* @slot actions-right - Buttons revealed by swiping left (or focusing into this slot)
*
* @cssprop --list-item-actions-width - Width of each action panel (default 6rem)
* @cssprop --list-item-bg - Row background color
* @cssprop --list-item-hover-bg - Row background on hover
* @cssprop --list-item-selected-bg - Row background when selected
* @part row - The row wrapper (focusable, swipeable)
* @part leading - The leading slot container
* @part content - The title + description container
* @part title - The title slot container
* @part description - The description slot container
* @part trailing - The trailing slot container
* @part actions-start - The left action panel container
* @part actions-end - The right action panel container
* @example
* ```html
*
*
* Inbox
* 12
*
*
* Newsletter
* From Acme Inc.
* Delete
*
* ```
*/
export declare const LIST_ITEM_TAG: "ore-list-item";
//# sourceMappingURL=list-item.d.ts.map