Repository navigation
Papercut 0.7.0
Pre-release
Pre-release
Added
- A Gallery page in the docs: a render of every built-in component, with its layout variants and a link to its docs.
php site/gallery/render.phprebuilds the images. - Three decorators.
Stat/<x-doc::stat>: a label, a large value and an optional note on a tinted panel.Totals/<x-doc::totals>: label and amount rows with the amounts right-aligned andtotal()/<x-doc::kv total>rows emphasised, 45% wide at the right by default, and it doesn't shrink beside a growing paragraph.Signature/<x-doc::signature>: a line to sign on, holding an image, a typed name or nothing, with an optional name, role and date under it. Styled by the newstat.*,totals.*andsignature.*named styles. - Built-in variants:
fieldline(a form line),badgeoutline(a border in the tone's colour),cardflat(a tinted panel with no border) andsectionlarge(a bigger heading). Eachbadge.<tone>style gains a-300border colour, which shows only when a border is drawn. KeyValuePairtakes a third argument,total;KeyValueListrejects total rows, and in Blade<x-doc::kv total>is only allowed inside<x-doc::totals>.- The invoice example uses
Totalsand the report example's stat cards useStat(outputs regenerated). - Laravel:
<x-doc::markup>takes plain HTML in its slot, converted like:html:<x-doc::markup><h3>Results</h3><table>…</table></x-doc::markup>. Blade loops, echoes and components that render HTML work inside; Papercut tags inside throwInvalidStructure.
Fixed
- A box or table with a percentage width that isn't stretched across its column (
align-selfor the column'salignset tostart,centerorend) was sized as a share of its own content, not of the column. It is now a share of the column, as in CSS. - In a row, an item with a
widthorbasiscould shrink to nothing next to a growing item, wrapping every word and sometimes throwingLayoutOverflow. Like CSS'smin-width: auto, an item now shrinks no further than the narrowest its content can be (or its own width, if that is smaller). - Row sizing follows CSS more closely: growing or shrinking is decided from the sizes after
min-widthandmax-width, the space to share is measured from the base sizes, and an item already held by its minimum or maximum keeps it. Layouts without such limits are unchanged. - Word export: a table aligned to the centre or end of its column keeps that alignment.
- Word export: a badge with a border (such as the
outlinevariant) stays in its line as bordered text, as a filled badge does with shading, instead of turning the whole row into a table. - Word export: a box with a background whose children are stacked boxes (a card with a tinted panel, a
stripcode block) shades every row that has no fill of its own; the body or code area used to come out white. - Word export: a box packed to its end or centre (
justify) places its content at the bottom or middle of its cell, so a signature rests on its line.
Changed
- Laravel:
<x-doc::markup>with both:html(or:text) and slot content now throwsInvalidStructure; the slot used to be dropped. The error for a markup tag with no source now reads "requires one of html, text or HTML in its slot", and for one with two "takes only one of html, text or HTML in its slot".