UNPKG

@activecollab/components

Version:

ActiveCollab Components

48 lines (41 loc) 1.59 kB
/** * StackedCard — shared constants and the class/token contract. * * Kept in their own module so `Styles.ts` can consume them without importing a * component file (and creating a cycle). */ /** Reference width of a stacked card, from the concept. */ export const STACKED_CARD_WIDTH = 260; /** Reference corner radius of a stacked card. */ export const STACKED_CARD_RADIUS = 8; /** * Default cover `aspect-ratio`. Covers reserve their height with a ratio (not a * pixel height) so a late image never reflows the card, and so the skeleton * that stands in for it occupies exactly the same box. */ export const STACKED_CARD_COVER_RATIO = "260 / 132"; /** * Controls (a cover button, an entity "…" menu, the resize handle) are hidden * until the card is hovered OR holds focus. Put this class on anything that * should follow that reveal rule. */ export const STACKED_CARD_CONTROL_CLASS = "sc-control"; /** * Marks a child of a `row`-direction `StackedCardRow` as fixed width: it keeps * its own width while the remaining children share what is left. */ export const STACKED_CARD_FIXED_ATTR = "data-fixed"; /** * Named row roles. The row is the layout increment: `title`/`footer` carry the * system padding, `meta` is a tighter properties line, `cover` bleeds to the * edge, and `custom` starts from the system padding for the caller to adjust. */ /** Role → default padding. */ export const STACKED_CARD_ROLE_PADDING = { cover: "0", title: "8px 12px", meta: "2px 12px 4px", footer: "8px 12px", custom: "8px 12px" }; //# sourceMappingURL=constants.js.map