Skip to Content
BBRICKSv0.7.4
Getting started

Changelog

Released changes and pending changesets.

Released versions come from packages/bricks/CHANGELOG.md. Changes waiting for the next "Version packages" PR are the changesets in .changeset/.

Pending changesets

None: everything is released.

Released

0.7.4

Patch Changes

  • 4b8e5a9: DataTable sort buttons get a 24px target on desktop. Above 1024px a column's sort button was only its header line (about 16–19px) with nothing larger to click. A transparent ::before now makes the target 24px tall (WCAG 2.5.8), the way the inline term already works on desktop, and the header looks exactly the same. It grows up and down only, so a tipped header's arrow-only sort button never covers its term. Touch tiers (1024px and under) keep their 44px rule, and the card layout's visually hidden header is unchanged.

    Apps that added their own desktop hit area for .kit-dt-sort (the Brand Console's surfaces.css did) can drop it.

0.7.3

Patch Changes

  • c5e8f5e: CustomerAffiliatesSwitch, CustomerAffiliatesCard, ProgramStatusCard, AffiliateProgramCard and DetailsDrawer take an optional inertRef, passed to the confirmation dialog or drawer they open (the kit Modal / Drawer / ReasonDialog inertRef). With it, only the referenced app root turns inert while the dialog is open; without it the whole page outside the dialog does, as before.
  • 9cc9503: PillTabs: when value matches none of its tabs, the first tab takes the tab stop, so the tablist is still reachable with Tab (as FilterChips and Segmented already do). No tab is selected in that case.

0.7.2

Patch Changes

  • 5fb0589: Four layout fixes found while rendering every Storybook story:

    • HBars variant="rows" fits narrow cards. The tiles now follow the list's own width (a container query), not the viewport's. Under 480px, as in a 360px card on a desktop, each tile shows the label and value over a full-width bar instead of squeezing the bar to nothing and pushing the value out of the card. From 480px it is one line again: label (up to 200px) · bar · value (at least 110px). Browsers without container queries get the stacked tile.
    • OtpStep sizes its boxes from length. The box grid has one column per digit (--otp-len, set from length), so length={4} draws four boxes across the full width instead of four boxes and two empty columns.
    • Drawer closeButton="float" keeps its head clear. The floating head row now draws only the close button: a lead or aside passed with hideTitle + closeButton="float" is not drawn, and the hint is kept for screen readers only. Before, they were drawn on top of the head composed in the body. The first body node now keeps 48px clear at its inline end (56px on touch tiers), the button plus a 12px gap, where it was 36px / 44px. The side is logical, so it is mirrored in RTL.
    • Drawer and Modal fit a phone screen outside AppShell. Both now include their padding in their width (box-sizing: border-box), as they already did inside AppShell (whose .kit-shell * sets it) and as the mock draws them. Before, outside the shell, the padding was added on top of max-width: on a 390px phone the drawer was 414px wide with 36px off-screen, and the modal ran 12px past each edge. Now the drawer keeps 12px and the modal 16px clear of each edge. Inside AppShell nothing changes. Outside it, on a desktop, the drawer is now 400px wide overall (size="wide" 560px, the modal 660px / 760px), so its content is 48px narrower (the modal's 56px) than before.

0.7.1

Patch Changes

  • 04b347c: Accessibility fixes from the documentation accuracy review.

    • FilterChips keeps a Tab stop when value matches none of the options: the first chip becomes the roving tab stop, as in Segmented. This also fixes the chips in ListToolbar, ChallengeStatusFilter, GiftStatusFilter and MessageHistoryList, which all render FilterChips.
    • Values that were read out only through aria-label on a generic <span> (or <b>), which screen readers often ignore, now pair an aria-hidden visual with visually hidden .kit-sr text: the "—" placeholders in GiftShipmentTimeline ("Not yet"), giftShipmentColumns ("Not counted yet"), creatorColumns ("No tier", "No score yet", "None"), campaignColumns ("None") and BrandStack ("None"); the waiting count in challengeColumns ("3 waiting to join"); and the missing count in GiftShipmentCard ("4 missing"). The visible output does not change.
    • DataTable in cards mode: the loading skeleton's "Loading…" was an aria-label on a plain <div>; it is now visually hidden .kit-sr text inside it (the skeleton cards stay aria-hidden, and aria-busy is unchanged).
    • ScheduleCampaignDialog takes an optional inertRef, passed to its Modal, to scope which part of the page turns inert while it is open (as ReasonDialog, TierChangeDialog and the other PR dialogs do).

0.7.0

Minor Changes

  • e2abe80: Kit layout and text primitives: page grids, text links, muted text, a read-only frame, a section heading, and new options on FormField, Tile, Card and DataTable. Every default keeps 0.6.0's output.

    • New PageGrid: the PR Portal page grid, 16px gaps. Props:
      • split: '8-4', '7-5' or '6-6', two columns on a 12-column grid (children alternate main, side). One column at 1180px and under.
      • cols: 2, 3 or 4 equal columns. 4 becomes 2 columns at 1100px and under, 3 becomes 1 at 1100px, and 2 becomes 1 at 1180px. split wins when both are given.
      • With neither, a single-column stack of cards, 16px apart.
      • align: 'stretch' (default) or 'start', where each cell keeps its own height.
      • collapse={false}: keeps the columns at every width.
      • stickyAside: with split, the side column stays 20px under the top while the page scrolls, above 1180px. The --sticky-aside-top custom property changes the 20px.
      • Any other div attribute goes on the grid. Types: PageGridProps, PageGridSplit.
    • New TextLink: the raspberry text link ("All", "See all", "Change", "Gift stock →").
      • With href it is an <a>, and the URL goes through safeHref. Without href it is a <button type="button">.
      • onClick, arrow (a trailing → that points left in Arabic and is hidden from screen readers), tone ('rasp' by default, or 'ink'), size ('inherit' by default, or 'sm' for 13px), disabled (button only), target / rel (_blank adds noopener noreferrer), aria-label, dir, id, className.
      • It has a visible focus ring, and a 44px hit area at 1024px and under.
    • New Muted: inline muted text, 12px. as is 'span' (default), 'div' or 'p'. size is 'sm' (12px, default), 'md' (13px) or 'inherit'. Other attributes pass through.
    • New Note: a muted paragraph, 8px under what is above it. size, and flush to drop the margin. Types: MutedProps, MutedSize, NoteProps.
    • New ReadOnlyFrame: the View-as panel. It shows a page on the soft grey (padding 20, radius 28) and nothing in it can be used: it is inert and aria-disabled, with no pointer events and no text selection. label adds a readable line above the panel, outside the inert part, and may come and go after mount. Type: ReadOnlyFrameProps.
    • New SectionHeading: a 17px heading over a group of cards, outside any card (the same look as a card title). level is 2 by default, plus id and className. Type: SectionHeadingProps.
    • FormField has two new props, as and adornment:
      • as="group": for a field that is not one input (a ChoiceGroup, or an open DecisionTag in place of a control). The label is a <span>, the field is a role="group" named by it and described by the hint and the error, and the children are not cloned.
      • as="fieldset": the same, as a <fieldset> with a <legend>.
      • adornment: a node after the label and outside it (a DecisionTag, or "(optional)" as Muted).
      • The default as="field" is unchanged. children now also accepts content other than one element, for the group forms. New types: FormFieldProps, FormFieldAs.
    • Tile has a new valueSize prop: 'sm' (18px) or 'md' (19px), both at line-height 1.45. Use it to keep a long goal on one line in a row of stats. Left out, the size's own value is used.
    • Card has two new props:
      • footer: the card's last row over a 1px rule, with 14px above and under the line. Its parts wrap, 8px apart.
      • footerAlign: 'start' (default), 'between' or 'end'.
    • DataTable has a new cardColumns prop: 1, 2 or 3 card columns for mode="cards". With 3, the cards drop to 2 columns at 1240px and to 1 at 720px; with 2, to 1 at 720px. The loading skeletons use the same columns. Left out, the cards use the auto-fill grid as before.
  • e2abe80: PR challenge builder, campaigns and brand requests: step cards and step fields for the challenge builder, a commission form and a commission formatter, the program cards, the brand request side cards, a decision-tag line, and error slots on four blocks. Every default keeps 0.6.0's output.

    • Challenge builder. One form state, ChallengeDraft (start from defaultChallengeDraft(brandId)), feeds every step. Each step component is controlled (value / onChange, which hands back the whole value, so a full draft passes through), takes errors (messages by field, which win) and validate (the built-in checks, said under each field), and reads English and Arabic.
      • New BuilderStepCard: the step's title, "Step n of 4", the fields, and a ruled footer with Back (disabled on step 1) and "Continue →", or "Check the summary, then launch →" on the last step. Props: title, step (from 1), steps (default 4), onBack, onContinue, busy, continueDisabled, lastHint, headingLevel. Put it beside ChallengeSummary layout="flat" in a PageGrid split="8-4" stickyAside.
      • New ChallengeBasicsFields (step 1): who it's for (the brands, with paused ones marked, and "All brands · TRNDR-wide" first unless trndrWide={false}; the hint says who pays), the name, the start and end dates and what creators will read. Props: brands (BuilderBrand[]), trndrWide, decisions.
      • New ChallengeRewardFields: part="goal" (default, step 2) offers Leaderboard / Target / Commission boost as choice cards, then that type's fields: rank by and the number of winners; the goal, what it counts and the most winners; ×1.5 / 2 / 3 and the cap on the extra commission. part="payout" (step 4) offers Cash / Gift, then the amount per winner or a gift from confirmed stock (gifts, brandName, onOpenStock), then when winners are paid (paidWhen, default the open decision's tag). For a boost it says the boost is the reward.
      • New ChallengeAudienceFields (step 3): Public or "{brand} affiliates only", then the note on invites and customer affiliates; trndrWide shows the one sentence instead. Props: brandName, trndrWide, note.
      • New challengeIssues(draft): the builder's checks by field (required, order, whole, amount), only for the fields the draft's type and reward use, for an app's launch check and summary warnings. Types: ChallengeDraft, ChallengeBasicsValue, ChallengeGoalValue, ChallengeAudienceValue, ChallengePayoutValue, ChallengeType, ChallengeField, ChallengeIssue, ChallengeIssues, ChallengeFieldErrors, BuilderBrand, PrChallengeBuilderCopy (labels.prChallengeBuilder), PrBuilderStepCopy (labels.prBuilderStep).
      • The small decision tags beside some fields (an open product question, such as who breaks a tie) appear only under a DecisionTagsProvider that shows tags; decisions gives them their questions.
      • The number fields (winners, the goal, the cap, the cash per winner) take Arabic-Indic digits as typed (٥٠٠٠ is 5000): they are text fields that open the phone's number pad (inputMode) and read left to right. The draft keeps the text as typed; challengeIssues reads it as digits.
    • Commission words. New commissionText(kind, value, language, options?): "10% of sale" / "EGP 50 per item" ("10% من البيع" / "50 ج.م على القطعة") as a string, for props that take text (a campaign row's commission, a next campaign's, creatorRateLabel, a ChangePreview). It says exactly what the blocks' CommissionRate form="long" draws. kind is 'percent' / 'per_item' (or 'pct' / 'egp'); options.currency and options.labels change the words. Types: CommissionTextOptions, CommissionTextCopy.
    • New useCommissionText(language?): commissionText bound to your BricksProvider, for use in a component. It writes a rate with the provider's currency label and the provider's labels.commissionInput words (the ones CommissionRate draws), so a rate in a string prop matches the CommissionRate beside it. commissionText itself is a plain function with no provider to read: its currency defaults to EGP, and options.currency changes it. Type: CommissionTextFormatter.
    • New CommissionChangeForm: "Change the commission": % of sale or a fixed amount per item, the value with its rule said under the field, the Tier bonus (an open decision unless you pass tierBonus), an optional message to the brand, then Cancel / "Save and notify {brand}". Controlled (value: CommissionChange, onChange); Save is enabled once the value is valid and differs from current. Switching the kind starts from the current value, or from startValues (default 10 % / 50 per item). Props also: brandName, onSave, onCancel, maxPercent (default '50'), decisions, busy, error, card (default true). The value field takes Arabic-Indic digits (١٢٫٥ saves as '12.5'), opens the decimal number pad and reads left to right. New commissionChangeError(kind, value, language, { maxPercent }): the same rule (a % above 0 and up to 50, an amount above 0, at most 2 decimals) and its message, for the "What changes" preview. New COMMISSION_MAX_PERCENT. Types: CommissionChange, CommissionChangeFormProps, PrCommissionChangeCopy.
    • New ProgramStatusCard: a campaign's Status card, with the Active / Paused pill, what pausing does, and "Pause program", which asks for the reason in a ReasonDialog (mode="text") before onPause(result). Paused, it offers "Resume program" (onResume). Props: brandName, status, creators, busy, pauseError, note.
    • New AffiliateProgramCard: a brand's Affiliate program card, with since when, the pill, three figures (commission, creators, waiting to join), then a ruled row with "Edit program", Pause (the same reason dialog) or Resume, and "Review N join requests →" at the end while requests wait. Props: commission, creatorsCount, waiting, since, onEdit, onPause, onResume, onReviewJoins, titleAdornment. Types: ProgramStatusCardProps, AffiliateProgramCardProps, PrProgramCardsCopy (labels.prProgramCards).
    • Brand requests.
      • New RequestWalletCard: "{brand} wallet" with its health pill, what is available and the requested budget, then "Enough to hold the full budget." or, in red, "Not enough. Ask the brand to top up first." (worked out in exact cents; enough overrides it). While either amount can't be read as money, and enough isn't given, it shows neither line.
      • New RequestGiftsCard: the gift claims sent for the requested challenge (code, units claimed and confirmed, status pill; onOpen), then the note that the challenge goes live once they are confirmed.
      • New RequestHandled: "Request handled" for a request that is no longer waiting, with "Back to challenges" (onBack).
      • Types: RequestWalletCardProps, RequestGiftsCardProps, RequestGiftClaim, RequestHandledProps, PrRequestCardsCopy (labels.prRequestCards).
    • New RequestChallengeCard: the brand's Challenges card as View as brand shows it: "Brands can ask TRNDR for a challenge." and a full-width "Request a challenge", disabled while there is no onRequest, with why as the button's description (disabledReason). Types: RequestChallengeCardProps, PrRequestChallengeCopy.
    • New DecisionLine: a muted line of decision tags between two blocks, drawn only while the DecisionTagsProvider shows tags. Props: codes (codes or { id, question }), decisions (where bare codes find their questions), variant ('tag' default, or 'open' pills), visible, spacing. With spacing="pull" in a PageGrid or another stack whose blocks are 16px apart, the line sits 4px under the block above and 12px over the next. When the tags are switched off, the line takes no room and the next block moves up to 4px under the one above (it gets a −12px top margin, which replaces its own).
    • error slots. CampaignChangeRequests, CustomerAffiliatesSwitch, BrandRequestCard and ChallengeSummary take error and onRetry: a red alert inside the block (at the top of the change requests, under the switch, above the request's buttons, above the summary's actions) with "Try again". error={true} uses the block's own words. Their copy types gain the optional keys error and retry, so copy objects written for 0.6.0 still type-check.
  • e2abe80: PR gifts, messages and brand dialogs: a count that survives refetches, card-level load states on the gift claim page, a "Needs attention" list for Gift analytics, the composer as a modal, a sent-message drawer, three brand dialogs and a gift icon. The duplicate gift components added in 0.6.0 are deprecated in favour of the 0.4.0 gift family. Every default keeps 0.6.0's output, except the one Default look change listed below.

    Gifts

    • GiftShipmentCard keeps a half-finished count through refetches.
      • New shipmentId prop. What PR has typed is now kept by product (the line's id, else its product name; a repeated name gets "#2", "#3"), not by row. A refetch that reorders the lines, adds one, or moves the shipment from Expected to Arrived keeps each count with its own product. A re-render with new line objects (or busy) keeps it too.
      • With shipmentId, only a different id starts a new count. Without it, the count restarts when the brand, the state (so Expected → Arrived restarts it) or the products and their claimed units change: another shipment of the same products (Glow Lab's 10 serums, then Mira's 40) never inherits a tick or a count. Pass shipmentId to keep a count through Expected → Arrived. Either way it restarts when counting starts again (a recount after the shipment was confirmed).
      • A line whose brand claimed more than 999 units now takes Good and Damaged up to its claim (as GiftClaimCheck did), so "All 1,200 OK" confirms. The units error then names that limit, from the new optional word unitsErrUpTo in PrGiftShipmentCopy.
      • An untouched "Boxes received" follows claimedBoxes; a typed one is kept.
      • New loading, loadError and onRetry: skeleton lines under the title while the shipment loads, or an alert with Try again. error is still a failed save.
    • Card-level load states on the claim page's other cards, all off by default:
      • GiftShipmentTimeline and BrandGiftStockCard: loading, loadError (true for the default words, or your own reason) and onRetry. The shared props type is GiftCardLoadProps. All four claim-page cards use the same names.
      • WarehouseDetailsCard: loading, loadError and onRetry. Save is disabled while either shows; error is still a failed save.
      • New optional words loading, loadError and retry in PrGiftShipmentCopy, PrGiftSideCopy and PrWarehouseCopy. A copy object typed against 0.6.0 still compiles, and a missing word uses the language's default.
    • New GiftAttentionList: Gift analytics' "Needs attention" card body, built on MiniList variant="soft" and MiniRow (so CSS aimed at those rows reaches it). Soft grey rows with the brand's square, a bold line and a muted line, both wrapping rather than cut off; the whole row is a button when onSelect is set.
      • items: { kind: 'out' } ("Mira Beauty" over "Out of gifts · ask for more stock"), { kind: 'check', reference, units, state } ("GS-0017 · Glow Lab" over "40 units to check · Expected", the state word from statusTables.pr), or { kind: 'custom', title, sub }. Each item has id, brand and onSelect.
      • label (default "Needs attention"), empty (default "Nothing waiting."), language, labels (BricksProvider key prGiftAttention). Types: GiftAttentionItem, GiftAttentionListProps, PrGiftAttentionCopy.
    • PrIcon has a gift glyph (a wrapped gift box), for gift rows, nav items and IconSquare.

    Deprecated (still exported and still working; removed in 1.0)

    Deprecated (0.6.0)Use instead (0.4.0)
    GiftClaimCheck, GiftClaimCheckProps, GiftClaimCheckResult, GiftClaimLineGiftShipmentCard with shipmentId, GiftShipmentCardProps, GiftCount, GiftShipmentLine (productId becomes id)
    giftClaimColumns, GiftClaimRow, GiftClaimStatusgiftShipmentColumns, GiftShipmentRow (sentOn becomes sent, status becomes state), GiftShipmentState (giftStatusKey gives the gift_* keys)
    giftAnalyticsColumns, GiftBrandStockRowgiftBrandColumns, GiftBrandRow (used is total − left; the status defaults to giftStockStatus)
    ShipmentSummary, ShipmentSummaryPropsGiftShipmentCounts (counts as a record) inside a Card
    PrGiftsCopyPrGiftShipmentCopy, PrGiftColumnsCopy, PrGiftAnalyticsCopy

    GiftShipmentCard now keeps a count by product and takes lines over 999 units, as GiftClaimCheck did. Three differences to check when you move:

    GiftClaimCheckGiftShipmentCard
    When a half-typed count restartsWith claimId: when the id, the status or expectedBoxes changes (Expected → Arrived restarts it). Without: also when a product or its claim changes.With shipmentId: only when the id changes, or counting starts again after a confirm (Expected → Arrived keeps it). Without: when the brand, the state, or a product or its claim changes.
    "Boxes received" in the resultboxes: null when the shipment is not Expectedboxes left out when the shipment is not Expected (GiftCount.boxes is optional)
    Lines in the result{ good, damaged } in the order given{ id, good, damaged }, id being the line's id or else its index

    So read count.boxes ?? null where your code expects null.

    Messages

    • AnnouncementComposer:
      • channels is optional. Left out or empty, the channel picker is not drawn and value.channel stays what you set. One channel still draws it in the page layout, as before; the modal layout draws it only when there are two or more to choose from.
      • New preview: the live preview. Default true in the page layout (as before) and false in the modal layout.
      • New layout: 'page' (default, as before) or 'modal'. The modal layout is one column, for a 480px "New message" dialog: From, Send to (all / brand / tier / pick, with the pick list), subject (80), message (500) with its counter, "N creators will get this", then Cancel / Send. A Modal that holds it is 480px wide by itself.
    • New MessageDrawer: a sent message opened from the history (props as messageColumns' MessageRow). A 52px lilac icon beside the subject and "Sent 14 Nov 2026 by Mona", the message on soft grey, Creators and Opened tiles, From / To (AudienceLabel) / Not opened, a note, and a ruled "Send another to the same people".
      • Props: open, onClose, message (nothing is drawn while it is null), onSendAnother (the button is hidden without it), notOpened (default from messageNotOpened), note (null drops it), language, labels (BricksProvider key prMessageDrawer), inertRef.
      • New messageNotOpened(creators, openPercent). Types: MessageDrawerProps, PrMessageDrawerCopy.

    Brand dialogs (each on the kit Modal, controlled by open / onClose, fields reset each time it opens, before the first paint, with busy and error, in English and Arabic)

    • New ChangeOwnerDialog: "Change PR owner". brandName, owners (PrOwnerOption list), value (the current owner, where the select starts; null for a brand nobody owns), meId (marks "(you)"), onSave(ownerId), note. With value null, or an owner who is not in owners (someone who left the team), the select starts on "Choose the new owner" and Save asks for a choice. Saving the current owner again says so instead of calling onSave. Types: ChangeOwnerDialogProps, PrChangeOwnerCopy.
    • New AdjustWalletDialog: "Adjust Glow Lab's wallet". An amount in the provider's currency (a minus sign takes money out, not 0, up to two decimals) and a required reason. The amount field opens a phone's text keyboard, since a decimal keypad has no minus key. The amount is parsed in cents, never as a float, and onSave gets { amount, reason } with amount as a signed 2-dp string ("-390.10"). With available it shows what the wallet holds after the adjustment (slot brandDetail.figures, money). New parseWalletAdjustment (one sign at most: "+-5" is not an amount). Types: AdjustWalletDialogProps, WalletAdjustment, PrAdjustWalletCopy.
    • New BrandFeeDialog: "TRNDR fee for Glow Lab". value (the brand's own fee, or null for the default), defaultFee, onSave(fee) with a 2-dp percent string, 0 to 50, and onUseDefault for "Use default (5%)", shown while the brand has its own fee. With onUseDefault, saving an empty field also calls it; without it, the explanation does not offer clearing and an empty field is an error. A new value while the dialog is open replaces the field only if nothing was typed. New parseBrandFee and BRAND_FEE_MAX (50). Types: BrandFeeDialogProps, PrBrandFeeCopy.

    Default look change

    • MiniRow: no 1px gap between the title and the muted line. The title and its muted line now sit flush. The gap came from a class name MiniRow shared with the campaign blocks (CampaignChallenges, CampaignChangeRequests), whose rows look the same as before. To get the gap back: .kit-pr-mini-t { gap: 1px; } in your CSS.

    Renamed CSS classes (the campaign blocks CampaignChallenges and CampaignChangeRequests only; MiniList and MiniRow keep theirs). A theme that targets the old names on these blocks needs the new ones:

    0.6.00.7.0
    .kit-pr-mini (the list).kit-pr-cmini
    .kit-pr-mini-row.kit-pr-cmini-row
    .kit-pr-mini-btn.kit-pr-cmini-btn
    .kit-pr-mini-t.kit-pr-cmini-t

    Changed types

    • AnnouncementComposerProps['channels'] is now optional (ReadonlyArray<ChannelOption> | undefined). Code that reads props.channels.length from that type needs props.channels?.length ?? 0. Passing channels works as before.
  • e2abe80: PR challenges, creators and approvals.

    • New challengeTableColumns(language, options?, money?): the Challenges tab's Table view as a DataTable column preset. Columns: the challenge (its type's icon, the name, "Leaderboard · Public"), the brand over its dates, the goal chip, the reward chip (with "No gifts left" for a gift reward whose brand has none), the time left (a live challenge's days, raspberry at 3 or fewer; otherwise its status pill), how many joined and the budget held. Sort keys name, brand, left, joined, held. options.onOpen makes the name a button; options.copy overrides its words. The budget uses the card's money slot, prChallengeCard.figures. challengeColumns is unchanged.
    • New PrChallengeRow and PrChallengeData types and toPrChallengeCard(row): one row type for both of the Challenges tab's views. PrChallengeData is the data PrChallengeCard draws (its props without onOpen, language, money and labels); PrChallengeRow adds an id. Map the API's challenges once, give the rows to challengeTableColumns, and hand each to the card with <PrChallengeCard {...toPrChallengeCard(row)} />. PrChallengeCardProps now extends PrChallengeData; its props are the same as before.
    • New newCreatorColumns(language, options): Approvals › New creators as a column preset. Columns: the creator (photo, name, and "Customer asking to become a creator" for a customer affiliate), followers, signed up, and Reject / Approve named for the creator. Options: onApprove and onReject (required), onOpen (the name becomes a button), busy(row) (disables that row's buttons) and copy. Rows are PrNewCreatorRow (id, name, seed, avatarUrl, customer, followers, signedUp).
    • New CreatorPickDialog: a challenge page's "Add creators" dialog, on the kit Modal. It lists approved creators as checkbox rows with the photo, the name and the tier chip, and has a search, a selected count, Cancel and "Send invites (N)". It is controlled: creators (PickCreator: id, name, seed, avatarUrl, tier), selected, onChange, onSend(selected), open, onClose. Also busy (default false: disables the list and the buttons, "Sending…"), error (shown as an alert over the buttons), language, labels (or the provider's labels.prCreatorPick) and inertRef. "Send invites" is disabled while nothing is selected.
    • creatorColumns takes a third argument, CreatorColumnsOptions. Each option defaults to 0.6.0's output:
      • onOpen: the name becomes a button.
      • reapply: a rejected creator with a reapplyOn date gets "Can reapply 1 Dec" on the status pill, as its tooltip and read after it.
      • nullableSales: the sales cell follows the figure. Null or "0.00" is a dash, and any other value shows even with no orders. Without it, a creator with no orders shows a dash, as before. With nullableSales: true the columns take the new PrNullableSalesCreatorRow rows, whose sales can be null (no figure yet); onOpen then receives that row type.
      • PrCreatorRow has a new optional reapplyOn. Its sales is still a string, so 0.6.0 code that reads row.sales keeps compiling. PrCreatorRow rows also fit PrNullableSalesCreatorRow.
    • Deprecated: prCreatorColumns and PrCreatorListRow. Use creatorColumns(language, money, { onOpen, reapply: true, nullableSales: true }) with PrNullableSalesCreatorRow rows: the same columns and behaviour. Both keep working until 1.0. To move, change each row's creator object to the flat name, seed and avatarUrl fields, customer: true to track: 'customer', and reapply to reapplyOn.
    • WaitingCell and ApprovalRow have a new ageTag prop: a node after the waiting age's reminder line, such as <DecisionTag id="S1" variant="open" />. Left out, nothing changes.
    • ScoreBreakdown has a new variant prop. 'card' draws the same content as kit pieces: a Card variant="inset" titled "TRNDR score", with the score (or the "Still measuring" / "Customer" pill) as its badge and the parts as DetailsBars variant="stacked" rows. The default 'default' is 0.6.0's card.
    • PrCreatorDrawer has two new props:
      • scoreVariant: 'card' passes variant="card" to its ScoreBreakdown. Default 'default'.
      • headerStyle: the kit Drawer head look. Default 'pr', see below.
      • The four creator states draw as before: scored, still measuring, customer, and pending or opened from a join request.
      • A labels.wants override of the join banner keeps working.
    • Default look change: PrCreatorDrawer's join banner shows the brand's name in bold ("Wants to join Glow Lab · Invite link · waiting 2 days"). It was plain text. It has no switch; a labels.wants override that writes the brand's name gets the bold name too.
    • Default look change: PrCreatorDrawer's head, footer and spacing. The drawer now opens with the kit Drawer's headerStyle="pr" and footerDivider:
      • a 64px photo 14px before a 20px bold name (it was 22px), with the platforms line and the tier and status chips under it;
      • the close button at the top end;
      • a line over Reject / Approve (the privacy note drops its own line when there are buttons);
      • Reject and Approve sharing the full width;
      • 16px between the join banner and the figures (it was 32px).
      • To get 0.6.0's head back, pass headerStyle="default". The footer line and the spacing have no switch.
    • Default look change: creatorColumns' orders and sales cells. They now use the PR portal's number style: the display font, 15px, weight 800, tabular figures. They were the body font, bold. The orders cell keeps its markup and its kit-pr-cnt class, which now has these styles; the sales cell gains the kit-pr-money class. To restyle them, target those classes in your own CSS.
  • e2abe80: Shell and the PR portal frame.

    • Phones keep the sidebar's card and user row. Under 860px, AppShell now shows sidebarCard (under the nav) and sidebarFooter (as the footer) in the MobileNavSheet, so the PR portal's "Open decisions" card, its "Show decision tags" switch and the sign-out button are reachable on phones. MobileNavSheet has a new card prop for this. sheetFooter keeps winning: when it is set, the sheet shows it alone, as in 0.6.0.
      • Default look change: a phone sheet of an AppShell that has sidebarCard or sidebarFooter and no sheetFooter now shows them. To keep 0.6.0's sheet, pass sheetFooter (sheetFooter={null} for no footer at all).
    • New BrandMark (shell): the sidebar's brand mark on its own, for places outside the sidebar such as the sign-in page (LoginLayout brand={<BrandMark name="TRNDR" accent="." />}). Props: name, accent (drawn in the lime accent), sub (a muted line under the name), mark (default: the first letter of a string name), size (the square's side in px, default 38) and className.
    • AppHeader has a new titleLead prop: a brand page's big square avatar in the h1 before the title (titleLead={<BrandAvatar size="lg" />}), 14px from it and hidden from screen readers. Left out, the h1 is unchanged.
    • New PrPortalFrame (PR): the whole PR portal v3 frame as one opt-in component, built from public exports. It renders AppShell in the PR theme with the v3 nav, DecisionsCard tip="focus" in the sidebar card slot, SidebarUser with a 34px avatar and a sign-out button, and AppHeader with the screen's tools first (leading), HeaderSearch, NotificationsMenu, the raspberry "+ New" TopbarMenu and a two-line phone subtitle. It wraps everything in a DecisionTagsProvider driven by the card's switch.
      • Props, each optional with a default: nav (default PR_PORTAL_NAV), activeId (default 'home'), onNavigate, brand, decisions, sidebarCard, showTags / defaultShowTags / onShowTagsChange, user (name, detail, seed, src, avatar), onSignOut or signOutUrl + csrfToken (without user, the sidebar's last row holds only the sign-out button), title (required), titleLead, subtitle, subtitleLines (default 2), breadcrumbs, tools, search (HeaderSearch props or an element), notifications (NotificationsMenu props or an element), newMenu (menu items or an element; an empty list draws no "+ New" menu), actions, onToggleLanguage, tier, shellCopy, labels, className, children.
      • Its words are in English and Arabic; override them with labels or the provider's labels.prPortalFrame.
      • Wrap it in your BricksProvider (money={{ decimals: 'auto' }} shows "EGP 5,000" rather than "EGP 5,000.00") and import themes/pr.css.
    • New PR_PORTAL_NAV: the PR portal v3 navigation as data, in both languages.
    • New recipe: "Use the PR portal frame". It covers the provider money, the theme import, the decision tags, phones, and building the same frame by hand.

0.6.0

Minor Changes

  • 6834950: New components and presets for the PR Portal v3 and Brand Dashboard v3 mocks: gift claims and analytics, PR statuses that carry a number, the Brand requests and Creators list presets, and the open decisions with focusable codes (DecisionsCard tip="focus"). They sit beside 0.4.0's PR Portal v3 blocks (GiftShipmentCard, RecordGiftsDialog, DecisionsCard, the campaigns and customer-affiliates blocks), which stay the primary ones. Their styles ship in pr.css and styles.css; there is no new import path.

    PR Portal: gift claims

    • GiftClaimCheck: count what arrived against the brand's claim: "All N OK", good and damaged units, boxes received, the difference banner for a gift_confirmed_diff claim, and a problem report with Keep the count / Recount. Pass claimId so a re-render keeps a half-finished count. Each line's count is kept by its product (new optional GiftClaimLine.productId, else product), so a refetch that reorders or adds lines keeps each count with its own product. A brand's problem report is quoted with straight quotes, so they mirror in Arabic. Confirm is disabled for a claim with no products. Good starts empty with a "Count" placeholder (copy key goodHint) and Damaged at 0. The count fields are the mock's 72 × 42 (44px tall on touch tiers, 1024px and under), and a line accepts up to 999 units, or its claimed units when the brand claimed more.
    • ShipmentSummary: each claim status with its count, then the open problem reports.
    • giftClaimColumns and giftAnalyticsColumns: DataTable column presets. The stock column uses 0.4.0's gift_ok / gift_low / gift_out statuses; in giftAnalyticsColumns the Delivered count and its "%" stack with no gap (63px rows), and the State header is screen-reader text only. Claim statuses are 0.4.0's gift_* keys in TRNDR_PR_STATUSES; no new gift status is added.

    PR Portal: lists and statuses

    • challengeRequestColumns: Challenges › Brand requests as a DataTable column preset (row type ChallengeRequestRow). Its last argument is a money option; the budget has its own money slot, challengeRequestColumns.budget (default "EGP 10,000", cents only when non-zero).
    • prCreatorColumns: the PR Creators list as a DataTable column preset (row type PrCreatorListRow), beside 0.4.0's creatorColumns. Its last argument is a money option; all-time sales have their own money slot, prCreatorColumns.sales (default "EGP 10,000").
    • PrCountPill: a PR status with a number in it ("Pauses in 3 days", "5 waiting").
    • New statuses in TRNDR_PR_STATUSES: pauses_in (bad, "Pauses soon"), waiting_count (lime, "Waiting") and trndr_wide (sky, "TRNDR-wide"). See the types changeset: PrStatus gains them.
    • New layout class kit-prc-grid: PrChallengeCards 3, 2, then 1 column.

    Kit

    • Quote: the PR request page's soft quote box (the brand's message in quotes on the soft grey, radius 16, padding 16), with marks (default true) and an optional cite line.
    • DetailsBars (new, not deprecated, its own module): the bar list as a component, variant: 'inline' | 'stacked' (stacked is the PR v3 score rows: one 13px line with the label, a muted note and the value, a 6px bar under it, a line between rows) and DetailsBar.note (shown by stacked). DetailsDrawer is unchanged from 0.5.0 (still deprecated); its section bars are drawn by DetailsBars, inline, with the same markup.
  • 6834950: New options, by area. Every one is optional, and left out each keeps 0.5.0's look and behaviour (the changes to default looks are listed in their own changeset).

    Shell

    • Switch: new size ('md' | 'sm'; sm is 41 × 25, the PR mock's sidebar switch) and surface ('light' | 'dark'; dark is the #3A3C45 off track for an ink background). Left out, the surroundings decide (see the default look changes).
    • AppHeader: new leading slot: a screen's own tools, drawn before the search while actions (the bell, "+ New") stay after it, the PR mock's order. Under 600px a kit Button with an icon in leading shows the icon only (its words stay its accessible name). New subtitleLines clamps the subtitle to that many lines under 600px (the full text stays in the page, and a string subtitle is its tooltip).
    • HeaderSearch: new collapsible (default true; see the default look changes). collapsible={false} keeps the pill on phones.
    • SidebarUser: new avatarSize (px), so the PR user row's avatar can be the mock's 34px. SidebarUserProps is exported.
    • Icon: messages draws 0.4.0's speech bubble under the v3 mocks' own name (an alias).
    • New theme hook --shell-search-w-narrow: the search pill's width at 1240px and under. It is unset by default (declared initial), so at 1240px and under the pill reads the theme's own --shell-search-w; the pr theme sets 190px.

    Kit

    • Card: header props title, sub, badge, actions and headingLevel (default 2). With a title the card draws the mock's .card-h itself (17px title, 13px ink-3 sub line 2px under it, the badge then the actions at the end, the content 16px below), the same markup as Card.Header, whose sub it matches; Card.Header also takes a level. children is now optional. New variant ('default' | 'inset'): 'inset' is a card inside a drawer section (padding 16, a line border, no shadow, no gap between its parts, a <p> straight inside 10px under, a 15px title). New types CardProps and CardHeadingLevel.
    • Drawer: new opt-in headerStyle="pr" (the PR v3 creator drawer head: 64px lead avatar, 20px title, 13px hint), closeButton="float" (with hideTitle: the close button hangs over the body's top end) and footerDivider (a line over the footer). They set the classes kit-drawer--pr-head, kit-drawer--float-x and kit-drawer--divider. Defaults keep 0.5.0's drawer.
    • Drawer and Modal: new optional className on the dialog element.
    • DataTable: new density="tight" (the mock's .tbl.tight body cells from 860px up: 9px top and bottom instead of 12, so a two-line creator row is 60px, not 66) and headDensity="compact" (the select-all checkbox's 28px hit area hangs over the head cell's padding, so a selectable table's head row is the mock's 45px instead of 53px on desktop; touch tiers keep the 44px hit area).
    • ListToolbar: new extra, one more control after the actions that wraps inside the toolbar's 10px row gap (pushed to the end when there are no actions), and extraPlacement="newRow" (extra always opens a row of its own under the controls, at the start side). The search box width reads the new theme hook --lt-search-w (default 260px).
    • Segmented: new size ('md' default | 'sm'). 'sm' is the mock's compact .seg: 13px text, 7px 14px segments (33px tall) in a track with a real 1px border in the theme's --seg-line (transparent in the core theme), 41px tall.
    • KpiCard: new size="short": the look KpiGrid size="short" gives (padding 12 16, no min height, the value 22px 4px under the label; 102px tall with a sub line instead of 128), for one card outside such a grid. Its icon now also takes an element (a PrIcon, your own svg) as well as a kit icon name.
    • KpiGrid: columns also takes 2: two cards across at every width down to 600px, then phoneColumns applies.
    • Tile: new size="kpi" (the PR Portal v3 View-as-brand box: 120px, a 700 label, a 26px value at line-height 1.1). size="short" (0.5.0's) reads the new CSS custom property --tile-min-h on an ancestor to raise its 110px minimum (the brand mock's 120px Raise-limit plans).
    • ShareBar: new showValue (default true); showValue={false} draws the bar alone, and the screen-reader read-out stays.
    • RankMedal: new size ('md' default, the 28px round medal, or 'lg', the PR leaderboard's 30px, 10px-radius square with 13px figures on the card colour; medals 1–3 keep their colours).

    Brand blocks

    • CalloutCard: tone adds lilac (the PR portal's Messages "Message creators" card: lilac background and ink, an #E2D6FF border), sky and butter. The CalloutCardProps and CalloutTone types are exported.
    • ProgressRow: new variant ('pips' default | 'bar'). 'bar' draws the PR portal's Home "Live challenges" row: a bold 14px title, the muted 12px display line and an 8px raspberry bar (radius 99), one image to screen readers; tone colours the fill.
    • RowItem.valueTone="muted": the value as the mock's plain grey 12px hint ("Open →").
    • GiftStockItem.seed: picks the row thumbnail's tone (the product's catalogue index); default the row index.
    • FindCreatorCard: new CSS hook --fc-cols for the stat row's columns. Unset, the row keeps 0.5.0's columns; --fc-cols: 1.35fr 1fr 1fr on the card or a parent draws the brand mock's three figures.

    PR blocks

    • Leaderboard: new rankSize ('md' default | 'lg', RankMedal size="lg"), rankStyle ('medals' default | 'highlight': no medals, every rank up to highlightTop lime, the rest on the card colour, the soft fill below the cut), highlightTop (default 10; it follows the rank, so shared ties highlight together), textSize ('md' 13.5px default | 'lg' 14px), cutTone ('deep' default, --rasp-d | 'rasp', the mock's raspberry, 5.2:1 on the card) and noteSize ('md' 13px default | 'sm' 12px). New tieDetail (default false): the tie note says what the tie is on, from rankBy ("Sara Ali and Hana Rami are tied on sales. Sara Ali ranks higher because they reached it first."; Arabic "متعادلين في المبيعات"), from the new copy key tieOn ({ sales, orders }; optional, so a full copy object written for 0.5.0 still type-checks; the language's default is used). tieFirst and tieShared take it as an optional last argument, so overrides written for the shorter signatures keep working.
    • TierLadder: new scoreMax (default 100, where the top tier's range ends under basis="score") and scoreInfoHref ("How the score works" as a link, through safeHref, instead of the onScoreInfo button). New openTagTip ('title' default | 'focus'): 'focus' draws the perks and thresholds open tags as DecisionTag tip="focus"; the tag inside "Add a tier" keeps its title tooltip. New scoreText ('default' | 'compact'): under basis="score", 'compact' sets the v3 Tiers page's range at 14px, the hint at 12px and "How the score works" at 12px semibold.
    • DecisionTag: new tip ('title' default | 'focus'). With variant="open" and a question, tip="focus" makes the "Open · R10" pill a tab stop that shows the question in its own tooltip on hover and on any focus, a tap included (Escape hides it, for DecisionsCard tip="focus" too); the question is its accessible description. On touch tiers (≤1024px) the tag has a 44px hit area.
    • DecisionsCard tip="focus": each code is focusable and shows what it is about in a tooltip on hover and on any focus, a tap included (role="tooltip", the code's accessible description); Escape hides it; the native title attribute is not used. On touch tiers the codes are 44px tall.
    • NumberSetting: new alwaysShowReset (default false): keeps "Reset to {default}" in view while the value equals the default, as the mock's gift rules do.
    • SettingRow: new density ('default' | 'tight'). 'tight' is the mock's gift rules .rule: a 12px description straight under the title and a 12px unit in a NumberSetting.
    • SenderCell: new avatarSize ('sm' default | 'md', the 38px square).
    • AuditLogList / AuditLogEntry: new dot (default true). dot={false} drops the coloured dot; with compact the rows also take the mock's plain 6px padding with the time right under the text.
    • BrandWalletCard: new topUpMethods ('card-or-bank' default | 'card', "Brands top up by card (Paymob)."), from the new prBrandDetail copy key topupsCard (optional, so a full copy object written for 0.5.0 still type-checks; the language's default is used).
    • ApprovalActions: new fullWidth (default false): Reject and Approve share the width evenly, 10px apart (the creator drawer footer).
    • RecordGiftsDialog: new maxUnits (default 999, the fixed limit before) to accept a larger shipment recorded by hand; when set, the units error names the range through the new copy entry unitsRange(min, max) (optional in PrRecordGiftsCopy; the language's default is used when it is missing), and an app that overrides unitsErr still sees its own text. New defaultBrandId: the brand chosen when it opens (default the first; an unknown id falls back to the first).
    • PrChallengeCard: onOpen is optional (without it the name is plain text), goal and reward take any node, new rewardNote (a node inside the reward chip, e.g. a stock pill) and PrChallengeLeader.seed (the avatar's colour seed).
    • TaskRow: lead and onOpen are optional, and a new action puts a control of the row's own where the chevron was (the row is then a plain list item, so no button sits inside a button; with onOpen the title becomes the open button). Its props are exported as TaskRowProps.
    • campaignColumns: a fourth argument, CampaignColumnsOptions. { wrap: true } lets the date range, commission, sales and last-change cells wrap and drops the gap under the campaign name (the v3 mock's Affiliate programs table, rows about 79px). Default: one line per cell.
    • ChallengeSummary: new flatDensity ('default' | 'mock'). With layout="flat", 'mock' sets the v3 builder card's 16px under the heading, 12px warning lines with 12px above and below, and a 46px launch button.
    • SummaryLine: new inlineHint (default false). With a hint, it draws the hint on the value's line in the value's weight ("EGP 1,000 each" as one bold run) instead of a muted line under it.
    • ChoiceGroup: an option's icon now also takes an element as well as a PrIcon name (backwards compatible): icon: <b>%</b> gives "% of sale" the mock's bold "%" glyph. A plain string must be a PrIcon name, so a typo is a type error.
  • 6834950: Default looks corrected to the Brand Dashboard v3 and PR Portal v3 mocks. Each item below changes what a 0.5.0 screen draws with no code change; where an option brings the 0.5.0 look back, it is named. Review the screens that use these components after upgrading.

    Shell

    • Default look change, Switch: inside the shell's Sidebar or MobileNavSheet a Switch is now small (41 × 25) and dark with no prop, as in the PR v3 mock; 0.4.0's DecisionsCard gets it as is. Pass size="md" surface="light" for the 0.5.0 look there. Switches elsewhere are unchanged.
    • Default look change on phones, HeaderSearch: under 600px the pill folds into a 44px search button that opens the box over the tools row. collapsible={false} keeps the pill.
    • Default look change on phones, the phone header (under 860px): the tools row stays on one line and scrolls sideways (its scrollbar hidden) instead of wrapping into two or three rows; menus and the notifications panel hang from the header. No option.
    • Default look change on phones: under 600px the raspberry "+ New" pill shows its icon only (its words stay its accessible name). No option.
    • Default look change, pr theme: the search pill is 190px at 1240px and under (it stays 260px above). For 0.5.0's width, set --shell-search-w-narrow: 260px in your own [data-bricks-theme='pr'] rule, loaded after themes/pr.css. The core theme's pill is unchanged.
    • No visible change: on touch tiers (1024px and under) breadcrumb links are 44px tall tap targets and the search field is 44px tall inside its pill.

    Kit

    • Default look change, pr theme: the pr theme sets --tier-influential-bg / --tier-influential-ink to the PR v3 mock's lilac (#F0E8FF / #5B34A0), so the Influential tier chip (TierChip, TierBadge) is lilac there; the default tokens keep 0.5.0's teal. In the pr theme the Influential chip looks like the other lilac chips there (the mock's own values): the group audience chip in Messages and the lilac status pills (gift_arrived, public_challenge, and the audit log's tiers and messages areas). For 0.5.0's teal in the pr theme, set the two tokens to #E0F4F1 / #0F6A5C in your own [data-bricks-theme='pr'] rule, or pass bg / ink for the tier in the provider's tiers.
    • Default look change, pr theme: the ListToolbar search box is 248px, the PR v3 mock's box (was 260px). For 0.5.0's width, set --lt-search-w: 260px in your own [data-bricks-theme='pr'] rule.
    • Default look change, Modal: a hint no longer keeps the browser's 12px bottom margin, so the body of every Modal with a hint starts 12px higher. No option.
    • Default look change, DataTable: the footer is drawn in a .kit-dt-foot block 14px under the table, so a count such as "7 items" no longer sits 3px under it. It is a plain block: an inline item keeps its own width (a "Load more" button is not stretched); a Pager still spans the table and keeps its own 14px (not doubled). No option.
    • Default look change on touch tiers, DataTable (≤1024px, table layout): a head row with a "?" note or a tipped header's term gets 3px more top padding, so the "?" and the term get full 44px hit areas (the arrow-only sort button's hit area no longer covers the term). Desktop unchanged. No option.
    • Default look change on phones, DataTable: with chevron={false} the phone card's end padding is 14px (was 34px, the room for a › that is not drawn).
    • Default look change, CreatorCell with onOpen: the name button is 700 at the cell's font size (was 13.5px / 600), as every mock draws the name. No option.
    • Default look change, Gauge: 5.3px more under the arc (the mock's inline svg sits on a text baseline), so its legend sits where the mock draws it: the brand Home "Seat usage" card is 260.2px tall (was 254.9). No option.
    • Accessibility, no visible change: a Card with a title, or with a <Card.Header> inside it, is now a region named by its heading (the heading gets an id and the section's aria-labelledby points at it). labelledBy still wins.
    • No visible change: OpenRate, ShareBar and ProgressRow draw their figure as one text node ("62%", "8 / 20"). A test that matched the number and the "%" as separate nodes needs updating.

    Brand blocks

    • Default look change, ChallengeRequestForm, SpecialCommissionForm and GroupForm: the actions row after a field no longer adds 20px to the field's 16px margin, so the buttons sit 20px higher. No option.
    • Default look change, fieldsets in the brand forms: a hint straight under its legend sits 6px under it (was 12); ChallengeRequestForm's gift rows start 6px under the hint (was 8). No option.
    • Default look change, ChallengeRequestForm: the "(optional)" that ends its dates and notes labels ("Dates (optional)", "المواعيد (اختياري)") is drawn as a muted 12px span, like the muted text elsewhere. The words are unchanged. The new copy key optional ("(optional)" / "(اختياري)"; optional in ChallengeRequestCopy, falling back to the language's default) only says which suffix to mute: nothing is added to a label that does not end with it, so a label such as "When" is drawn as given. (SpecialCommissionForm keeps its "Why (optional)" label as one string.)
    • Default look change, MembersPicker: names are 13px (was 14), and the checkbox keeps the mock's 3px / 4px margin, so the avatar and name sit 7px further in. No option.
    • Default look change, GiftStockList: rows keep the progress row's 12px bottom margin, so they are 75px tall, as in the mock (were 68). No option.
    • Default look change, BonusDetail: "Open the challenge" sits 12px under the progress list (was 18), the mock's button margin. No option.
    • Default look change, ChallengeDetail: "Top creators in this challenge" sits 22px under the gifts / days progress rows (was 34), the mock's collapsed margin. No option.
    • Default look change, CreatorProfilePanel: a figure caption's "?" term keeps the caption's 17.4px lines, so a two-line caption is 35px (was 31). The tier and niche tags keep 0.5.0's spacing. No option.
    • Default look change, CalloutCard layout="row": the title no longer has 4px under it, so title and sentence sit 2px apart and a row callout (Home's lime "Grow your program") is 2px shorter (147.5 → 145.5, the mock's). Stacked callouts are unchanged.

    PR blocks

    • Default look change, Leaderboard: the board uses the PR v3 mock's row grid. The header is a 16px line, cells are padded 12px 6px with 16px at the row ends, and the bar is 8px. Rows are 62px tall and 8px apart, so the row pitch drops from 75px to 70px. The visually hidden caption no longer opens an 8px gap above the first row in Chromium. No option for the grid. With showPercent={false} the "% of #1" figure is now left out of the page (it was hidden with CSS); the bar and its screen-reader text stay, and it looks the same.
    • Default look change, SenderCell: a brand sender gets the mock's 28px square (was the 38px brand cell square), the size TRNDR already had; TRNDR's "T" is drawn at 11px. Pass avatarSize="md" for the 38px square.
    • Default look change, WaitingCell: the days figure is weight 700, as the PR v3 mock draws it (the <b> inside the 700 cell rendered at 900). No option.
    • Default look change, LoginCard: the "Welcome back" heading is weight 700 (was 800) with the mock's normal line height and −0.2px tracking; the footnote is 12px (was 13px). No option.
    • Default look change, NumberSetting: the "Reset to {default}" link is centred on the input line (it sat at the top). No option.
    • Default look change, BrandWalletCard: the card header no longer adds 8px under itself on top of the card's 16px gap, so the Available / Held / Balance rows sit 8px higher, as in the mock. No option.
    • Changed text, TierLadder with basis="score": a range whose end falls below its start (starts not rising, or a top tier above scoreMax) now shows just the start, "40+", from the new copy key scoreFromOnly (optional in PrTierLadderCopy, so a full copy object written for 0.5.0 still type-checks; the language's default is used), instead of "40–39".
  • 6834950: Changed types, and what an app on 0.5.0 needs to change: nothing is removed or renamed. Every export of 0.5.0 is still exported under the same name, every prop of 0.5.0 still exists, and every new prop is optional.

    • PrStatus gains pauses_in, waiting_count and trndr_wide: an app's exhaustive switch or Record<PrStatus, …> needs the three new keys. This is the one change that can stop a 0.5.0 app compiling.
    • The copy types gain only optional keys, so a full copy object written for 0.5.0 still type-checks and a missing key falls back to the language's default: PrLeaderboardCopy tieOn (and tieFirst / tieShared take an optional last argument), PrTierLadderCopy scoreFromOnly, PrRecordGiftsCopy unitsRange, ChallengeRequestCopy optional, and the prBrandDetail copy's topupsCard.
    • ChoiceOption.icon is now PrIconName | ReactElement (was PrIconName).
    • Wider, so existing code compiles: KpiCard icon is IconName | ReactElement (0.5.0: IconName); KpiGrid columns adds 2; Tile size adds 'kpi'; CalloutCard tone adds lilac, sky and butter; PrChallengeCard goal and reward take any node and onOpen is optional; TaskRow lead and onOpen are optional; Card children is optional; DetailsBar gains an optional note; GiftStockItem, RowItem and PrChallengeLeader each gain an optional field.
    • DetailsBar is now declared in the DetailsBars module and still exported from the package entry under the same name.
    • New exported types: CardProps, CardHeadingLevel, CalloutCardProps, CalloutTone, SidebarUserProps, TaskRowProps, QuoteProps, DetailsBarsProps, CampaignColumnsOptions, and the types of the new PR pieces (GiftClaimCheckProps, GiftClaimLine, GiftClaimRow, GiftBrandStockRow, GiftClaimStatus, GiftClaimCheckResult, PrGiftsCopy, ShipmentSummaryProps, PrCountPillProps, PrCountPillCopy, ChallengeRequestRow, PrChallengeRequestsCopy, PrCreatorListRow, PrCreatorColumnsCopy).
    • Nothing new is deprecated. DetailsDrawer stays deprecated since 0.5.0.

0.5.0

Minor Changes

  • 1d7f5f9: Brand Console v3, drawers and cards (batch B2): the creator drawer's own facts and buttons, the console's challenge states, receipts to download, payouts before the API sends every field, and the owner's editable settings card. Everything is opt-in; nothing the PR portal draws changes.

    New props

    • ProofButton kind="download": "Download receipt" ("حمّل الإيصال"), a link that saves the file (fileName names it). Default 'view', as before. Copy key proofButton.download. Type ProofButtonProps is exported.

    • MyCreatorPanel: facts (a list replaces "In your program", a function edits the built-in one; a money fact keeps its "?" with figure) and actions (buttons after "Copy coupon": "Remove creator", a ButtonLink "Open full profile"). A creator with no coupon has no Coupon row and no "Copy coupon".

    • ChallengeCard / ChallengeDetail: states scheduled ("Scheduled", "متجدول"), paused ("Paused") and closed (reads "Ended"), drawn as the console's card draws them today: the progress body and figures, no banner, no action. labels.action.scheduled / paused opt in to a button. Status word scheduled (sky) in TRNDR_STATUSES.

    • PayoutBatchDetail: receiptHref ("Download receipt" beside "View proof"); method, reference and paidTo are optional, and what is left out is not drawn (the proof is named by the date when there is no reference).

    • WalletLedger: a group's proof takes href and kind (onOpen is optional); footer under the entries (the flat view's Pager). labels.grouped / sub already rename the grouping ("By type").

    • SettingsSection editable: the owner's card. No "🔒 View only", the card is not a click target (a click on a switch never navigates), action is the head button only. Default false, unchanged.

    • KeyValueItem.control: an editable value (a Switch, a field) drawn in place of the bold value; locked still adds its line.

    • CalloutCard size="lg": the Invitations tab's callouts with a 21px title. Default 'default' (17px).

    Deprecated

    • DetailsDrawer: compose the v3 drawer body instead (Drawer + DrawerHead + KeyValue + RowItems, with StepTimeline or RankList), as the blocks' panels do; its bordered tiles and 800 headings are not the v3 look. It keeps working until 1.0. See MIGRATION.md and the details-drawer recipe.

    Changed types (check exhaustive code)

    • ChallengeStatus gains 'scheduled' | 'paused' | 'closed': an exhaustive switch needs the three cases. ChallengeCopy.action keeps live, waiting, rejected required and adds optional scheduled, paused, so an existing labels.action override still compiles.
    • Now optional: MyCreator.coupon (string | null), PayoutBatchDetailProps.method, reference, paidTo, LedgerGroup.proof.onOpen, KeyValueItem.value. Code that reads them from these types gets undefined in the type.
    • MyCreator.status is string (a key of the provider's statuses) instead of ConsoleStatus.
    • ConsoleStatus (the keys of TRNDR_STATUSES) gains 'scheduled'.
  • 8461cc1: Brand Console v3 (pre.4): the pre.3 review's fixes.

    Fixes

    • CommissionInput kinds: when the given kind is not allowed and is switched to the first allowed one, the number is cleared (and onValueChange('') tells the parent), so a stored "EGP 30 per item" never shows or sends as 30 %.
    • WalletLedger entry proof with only onOpen (a receipt in a modal) reads "View receipt" ("شوف الإيصال"), not "Download receipt"; with a safe href it still downloads. ProofButton kind="receipt" and ProofLink.kind gain the value; copy key proofButton.receipt (a required key of KitCopy.proofButton).
    • fieldErrors (ChallengeRequestForm, SpecialCommissionForm, GroupForm): after a send, errors are applied and focused only when the save ends (saving true → false). A parent that keeps its last 422 inline no longer brings it back, or moves focus, while saving. Without saving, a new map after the send still counts as the answer.
    • Switch must be named, and the type says so: label, aria-labelledby, or rowLabelled (in a KeyValue row, KeyValueItem.control: named by the row's label through context, so it works wrapped in a <div> or a fragment). A switch with none of them does not compile. label stays as before for every existing call.

    Changed types

    • SwitchProps is a union: label: string | 'aria-labelledby': string | rowLabelled: true (plus the shared props). Code that spreads a props object into Switch may need to pass the name explicitly.

    Changed defaults (visible)

    • A money "?" (MoneyNote's button) inside a heading (h1–h6, .kit-blk-h3) no longer makes the heading taller: it takes 12px of the line (negative block margins) and keeps its 24px button and hit area (44px on touch tiers). Measured in Chromium: a heading with a note is the same height as without one (it was 8px taller in that page; 20.3 → 24.2px in the console's group and challenge drawers), at 1280 and 800px. Notes outside headings are unchanged.
  • bd28f4f: Brand Console v3, Find creators (batch B3): the card and the mini profile without cross-store figures (the console shows only engagement, followers, TRNDR score and "On TRNDR since"), and the invite's busy and no-seats states. New props are opt-in; with today's data both blocks draw what they drew, except the Invite button's accessible disabled state (below).

    New exports

    • Types FindStat (one box of the card's stat row) and ProfileTile (one coloured tile of the profile).

    New props

    • FindCreatorCard: stats (a list replaces the stat row, a function edits the built-in one; no stats, no row; a figure keeps the money "?"), inviting (Invite busy and disabled), inviteDisabledReason (the disabled Invite's tooltip and description: "No seats left"). The row's columns follow the number of stats (--fc-stats, 3 as before).
    • CreatorProfilePanel: tiles (the same pattern for the four coloured tiles), inviting, and note (replaces the privacy sentence under Invite).
    • Built-in stats, tiles and facts leave out what the creator does not have: Sold and Orders without sales90 / orders90, Brands worked with without brands, and Sales this month, Challenges won and On TRNDR since without growth, wins, since (a growth of null still reads "—"). With no facts the Highlights heading is not drawn.

    Accessibility (changed behaviour)

    • FindCreatorCard inviteDisabled and CreatorProfilePanel inviteDisabled (and the new inviting) use aria-disabled and the .kit-btn--off look instead of the native disabled: the Invite button keeps focus while the invite is sent, and a keyboard or screen reader user can reach it and hear why it is off ("No seats left"). A press does nothing, as before. Tests that assert toBeDisabled() on it should check aria-disabled="true".

    Changed types (check code that reads them)

    • Now optional: FindCreator.sales90 (string | null), orders90 (number | null); ProfileCreator.brands, growth, wins (… | null), since (string | null).
  • b2fcb67: Brand Console v3, groups (batch B4): a special commission the brand sets itself, as a % of sale or EGP per item, with no TRNDR approval (decision V3), and group data before the API sends sales. Everything is opt-in; nothing the PR portal draws changes.

    New props and states

    • GroupCommission gains { state: 'set'; kind; value; label? } (the brand's own special commission: an ok pill "20% of sale" / "EGP 30 per item", "20% من البيع" / "30 ج.م على القطعة", from CommissionRate form="long"; label replaces the words) and { state: 'mixed' } (members on different rates: a mute "Mixed" / "مختلفة"). GroupCommissionPill draws both and takes language. Copy key groupCard.mixed.
    • GroupCard: sales is optional (no figure and no "?" until the API sends it); memberCount counts the group when members holds only the first faces (the count line, the card's name and the stack's "+N").
    • GroupPanel commissionMode="set": Commission (the long rate, "Standard 15%" or "Mixed"), Special commission ("Set" or "None"), Set on (setOn); "Set special commission" / "Change special commission" (open SpecialCommissionForm mode="set"; onSetCommission, or onAskCommission when it is left out), "Back to standard" while one is set. Default 'ask', unchanged. Also sales optional, GroupMember.sales optional or null (the row has no figure), and moreMembers ("and 8 more", counted in the head). Copy keys groupPanel.set, setPill, setOn, more.
    • AvatarStack total (AvatarStackProps): "+N" counts people beyond the faces sent. Default people.length, so PrChallengeCard and every other stack are unchanged.

    Changed types (check exhaustive code)

    • GroupCommission gains 'set' and 'mixed': an exhaustive switch (commission.state) needs the two cases.
    • GroupPanelCopy gained required keys set, setPill, setOn, more (a whole copy object typed as it must add them; labels overrides are partial).
    • GroupCopy.mixed is new and optional, so a copy you build for GroupCommissionPill still compiles.
    • Now optional: GroupCardProps.sales, GroupPanelProps.sales, GroupMember.sales (string | null).
  • 26d595c: Brand Console v3 (pre.3): the group drawer's head as the mock draws it, and switches in key-value rows named by their row.

    New props

    • AvatarStack more={false}: the faces only, no "+N" and no "and N more" (for a place that says the count nearby). Default true, so every stack, PrChallengeCard's included, is unchanged.

    • ChallengeRequestForm commissionHint (string | (kind) => string) and SpecialCommissionForm hint (now also a function of the kind): the line under the commission can follow the chosen kind, so a per-item caveat shows only for per item. A string (or nothing) works as before.

    • DataTable isRowClickable ((row) => boolean, with onRowClick): a row it turns off takes no focus, has no hover, pointer or ›, and click, Enter and Space do nothing (anonymous join requests with no drawer). In cards mode renderCard(row, { clickable }) gets the flag. Default: every row, so every table, the PR portal's included, is unchanged.

    • ChallengeRequestForm limits ({ titleMax?, notesMax?, percent?, perItem? }): the server's limits.

    • ChallengeRequestForm mode="create" names the new-request mode as GroupForm does; 'new' still works (pre.2 name).

    • ChallengeRequestForm fieldErrors: any per-line key (gift_lines.<n>.gift_id, gift.<id>.…) shows on that gift line, and a key the form cannot place (status, overlap) is said above the buttons with error, never dropped.

    • Type ProofLink ({ context, href?, onOpen?, kind?, fileName? }): the one proof shape of WalletLedger, for a group's proof and an entry's proof (pre.2's entry shape { context, href, fileName? } still fits it; an entry proof can now open a modal with onOpen, and a group proof takes fileName). An entry proof's kind defaults to 'download'.

    • CommissionInput kinds on its own: a kind outside kinds is drawn as the first allowed kind and reported once through onKindChange.

    • BonusProgress.display (formatted money in place of "value / goal": "EGP 1,234 / EGP 5,000") and done (from the server: drives "· Done" in place of value ≥ goal); BonusCard and BonusDetail pass both to ProgressRow, which gains done.

    • Money figure product_avg_price in MONEY_FIGURES: the product drawer's "Avg. price" (the server's avg_price), so its row carries a "?" (KeyValueItem.figure). The app's dictionary needs the entry (sample EN/AR words in the gallery: "The product's sales with creator coupons ÷ units sold.").

    • HBarRow.id: the row's key when two rows share a label (default: the label).

    • Step.skipped (StepTimeline): a passed-over step, a dashed marker and muted words, read "skipped" ("اتخطّى"). Copy key stepTimeline.skipped.

    • WalletHealthCard settingsHref: "Wallet settings" as a link (a ButtonLink, through safeHref) instead of the onOpenSettings button.

    • Switch aria-labelledby: a visible label's id names the switch (see console-v3-final for the naming rule).

    Accessibility

    • KeyValueItem.control is named by its row: a control that does not name itself (no label, aria-label or aria-labelledby) gets aria-labelledby pointing at the row's <dt>, so a settings switch is announced "Creators can pick gifts, switch, on" without repeating the words. Rows without a control keep their markup.

    Changed types

    • KitCopy.stepTimeline gained the required key skipped (a whole copy object typed as it must add it).
    • MoneyFigureKey gains 'product_avg_price'.

    Changed defaults (visible, brand blocks only; the PR portal does not use GroupPanel)

    • GroupPanel's head draws the first three members' faces and no "+N", as the mock's openGroup (ms.slice(0, 3)); "N creators" under the name still gives the count. Measured in Chromium: an 84px stack and the title 116px from the head's edge, the mock's values.
    • CreatorProfilePanel's hero: the tier and niche tags sit 16px under the name, as the mock (.fc-tags margin-top 8 under the name's 8 in a flex column); they were 8px. The hero is 8px taller (measured in Chromium: 255.4 → 263.4). The PR portal does not render CreatorProfilePanel.

    Accessibility (changed behaviour, from the pre.2 review)

    • The Invite button's "Invited" state (FindCreatorCard invited, CreatorProfilePanel invited) is aria-disabled, not natively disabled, and the card keeps one button from Invite to Invited: focus stays on it after a successful invite (it fell to the page). Tests that assert toBeDisabled() on it should check aria-disabled="true".
    • fieldErrors on ChallengeRequestForm, SpecialCommissionForm and GroupForm are applied when they are a new answer: their content changed, or the form was sent since (the same errors again). A parent re-render passing an equal map as a new object no longer brings back errors the user is fixing or moves focus. Each answer moves focus once to the first invalid field, in all three forms.
    • ChallengeRequestForm mode="change": a server error on a locked field (title, start date, commission) is said in the form-level alert, and the locked commission is not validated again, so a resend is never blocked by a field the brand cannot edit.

    Changed defaults (visible, ChallengeRequestForm only; the PR portal does not use it)

    • The limits are the console server's: title 120 characters (was 80), notes 2000 (was 1000), a suggested rate from 0.01 % to 100 % (was 1–100 %; the message now names the range). Pass limits for other bounds.
    • A sent platform the app no longer offers is dropped with a notice under the selects ("This request was for a platform that is no longer offered; it now goes to any platform." / Arabic). Copy key challengeRequestForm.platformDropped.
    • A closed gift with no stock limit reads "Closed · keep any amount or untick" (it said "keep up to 0"). ChallengeRequestCopy.closedLine takes number | null.

    Changed defaults (visible, WalletHealthCard)

    • lowPercent and pauseDays no longer fall back to 20 % and 7 days (invented when the server sends none): left out, the card draws no legend item for them, no day count in the low and below-zero banners, and does not call the wallet low by itself (pass health). Pass both to draw what 0.4.0 drew. WalletHealthCopy.low / negative take pauseDays: number | null.
  • 2d6ac62: Brand Console v3, kit (batch B1 of the console's move to the v3 mock): links that look like buttons, the danger and OK buttons, a platforms list in the provider, the money maths on the public entry, and the bell's server count and load states. New props are opt-in; the few visible default changes are listed under "Changed defaults (visible)". Nothing the PR portal draws changes (54 PR pages compared in Chromium before and after).

    New exports

    • ButtonLink (ButtonLinkProps): a link with Button's look (same classes for every variant and size), for "Contact TRNDR", "Export CSV", "See all", "Find creators". href goes through safeHref; an unsafe URL draws a disabled-looking <span> with no link. external opens a new tab with rel="noopener noreferrer" and reads "(opens in a new tab)" ("(بيفتح في تاب جديدة)"); download (true or a file name). Copy key buttonLink.newTab.
    • Type ButtonVariant (the union Button and ButtonLink share) and NotificationsMenuProps.
    • divideAmount, addAmounts, subtractAmounts, compareAmounts, percentOf: exact maths on 2-dp money strings in BigInt cents (an average price is divideAmount(sales, units)), null for anything that is not an amount.

    New props and options

    • CommissionRate form="long" (and commissionRateText(…, form), type CommissionRateForm): "15% of sale" / "15% من البيع"; per item reads "EGP 30 per item" in both forms. Default 'short' ("15%"). Copy key commissionInput.ratePercentLong.
    • SpecialCommissionForm mode="set": note shows the optional "Why" field and sends it as reason (#1145's note); namesRate keeps 0.4.0's button words ("Set 15% for 4 creators").
    • Tile size="short": the payouts tiles ("To be paid this month", "Paid so far this month"), 110px tall, otherwise the default tile ("See who was paid →" as children).
    • ListToolbar date ({ value, onChange, label, min?, max? }): a labelled day input after the selects (the Activity log's, 160 × 42, --ink-2, the picker icon at .5); it counts in the folded "Filters · n".
    • Banner iconSize="sm": the brand v3 mock's inline glyph at the text's 13px (a kit icon 14px), so a one-line banner is 42.8px, not 47.2 (measured in Chromium). Default 'md' (16px), so the PR portal is unchanged.
    • HeroCard deco={false}: no corner blob, as the brand v3 mock's wallet hero. Default true (drawn, as before).
    • Button variant="danger" (red words on a pale raspberry line: "Remove creator") and variant="ok" (solid green: "Approve"). The CSS was already there (RowActions used it); className="kit-btn--danger" still works.
    • BricksProvider platforms (and BricksPreset.platforms, BricksConfig.platforms): the platforms the app works with. FollowersCell, PlatformFollowers, FollowerLine, FindCreatorCard, CreatorProfilePanel, MyCreatorPanel and ChallengeRequestForm's platform options use only these, so platforms={['instagram', 'tiktok']} takes YouTube out of every component below. Default: all three, in CORE_PRESET and trndrPreset alike. followerTotal takes the list as an optional second argument.
    • NotificationsMenu: unreadCount (the server's count for the badge, the bell's name and "N new", when items holds only the latest rows), status 'loading' | 'error' with onRetry ("Loading notifications…", "Couldn't load notifications." as an alert, "Try again"), onOpen (each time the panel opens). Copy keys notifications.loading, failed, retry.
    • NotificationItem.icon and tone are optional: a row without them shows the bell on sky.

    Changed defaults (visible)

    • Dialog titles (Modal, Drawer) are 700, the weight of both mocks' dialog h2, read from a new theme hook --dlg-title-fw (700 in tokens.css). The pr theme pins it to 800, so the PR portal draws exactly what it drew; drop the pin to follow the PR mock (also 700).
    • LiveChallengeCard: its three figures sit 16px apart (the mock's .grid), not 10. Brand-only block; its height was already the mock's (388px at 1280, measured in Chromium), so nothing else moves.
    • SpecialCommissionForm mode="set": the button reads "Set special commission" ("حدد عمولة خاصة"), the console's word for the direct rate (decision V3), before and after a valid value. 0.4.0 said "Set group rate" and then "Set 15% for 4 creators"; pass namesRate for those words. Only mode="set" changes, and no PR screen uses it.

    Fixes (visible in Arabic only)

    • ActivityLog: each event's title, time and detail are isolated in their own script's direction, as Timeline has done since B15, so a Latin name or date in an Arabic log no longer reorders the sentence. English output is the same words with a <bdi> around each slot.

    Accessibility

    • Touch targets (E27): "Mark all as read" in the bell and the name buttons of CreatorCell / MainCell already get a 44px hit area below 1025px (the kit's B2 rule); checked in Chromium at 800px (hits 21px above and below centre) and unchanged at 1280. A new guard test keeps them in the rule. No visual change.

    Changed types (check exhaustive code)

    • ButtonProps['variant'] gains 'danger' | 'ok': an exhaustive switch over it needs the two cases.
    • NotificationItem.icon and tone are now optional: code that reads them from the type gets undefined in its type.
    • Copy interfaces gained required keys (a whole copy object typed as one of them must add them; overrides through labels are partial and unaffected): KitCopy.notifications (loading, failed, retry), KitCopy.proofButton (download), the new KitCopy.buttonLink, CommissionCopy.ratePercentLong, SpecialCommissionCopy (unchanged keys, new default words).
    • BricksConfig has a new field platforms: code that builds a whole BricksConfig object by hand (not through resolvePreset / BricksProvider) must add it.

    Styles

    • a.kit-btn has no underline, and .kit-btn[aria-disabled='true'] takes the disabled look (ButtonLink's unsafe case). .kit-nl-err lays out the bell's error line.
  • feb670f: Brand Console v3, Motivation and Payments (pre.2): pieces the console still draws itself, so it can drop its local copies. New props are opt-in; the Tile value gap and the review fixes below change defaults. No PR-portal pixel changes (the Tile gap reaches PR's "View as brand" tiles, see below).

    New props

    • ChallengeCard note: drawn in the body above the action (the console's amendment banner, "Your change request is with TRNDR").
    • SpecialCommissionForm kinds (and CommissionInput kinds): the kinds the server allows (['percent'], later both). One kind hides the switch and shows that kind's field; a starting value of a kind not allowed starts empty on the first allowed one (30 EGP never becomes 30%). Default: both, unchanged.
    • fieldErrors on SpecialCommissionForm (commission…, value, kind; reason / note) and GroupForm (name; members, member_ids…, creator_ids…): the server's 422 on each field, aria-invalid and described by it; error still shows above the buttons; cleared on the next send.
    • LedgerEntry.onSelect: the whole entry row is one button (named by the entry's label; Enter and Space) that opens the app's entry drawer, built as the cards' stretched button so nothing nests in it. LedgerEntry.proof ({ context, href, fileName? }): a "Download receipt" link in the row (ProofButton kind="download", through safeHref), its own target.
    • ChallengeRequestForm mode="change": an approved challenge's change. Title, start date and commission are shown but locked, with "Only the end date and gifts can change once a challenge is approved." Default 'new'.
    • ChallengeRequestForm fieldErrors: the server's 422 per field (title, starts_at, ends_at, commission…, eligibility…, notes, gift.<id> or gift_lines.<n>.quantity), each on its field with aria-invalid and aria-describedby, focus on the first; cleared on the next send.
    • RequestGift.left may be null ("no stock limit", any quantity) and RequestGift.closed marks a challenge's own line on a closed gift ("Closed · keep up to 3 or untick"). The group select stays when the sent group is no longer in groups ("A group you deleted"). Copy keys challengeRequestForm.noLimit, closedLine, changeOnly, groupGone, quantityRequired.

    Changed types (check code that reads them)

    • RequestGift.left is number | null. ChallengeRequestCopy gained required keys noLimit, closedLine, changeOnly, groupGone, quantityRequired.

    Changed defaults (visible only where a tile's content is taller than its minimum)

    • Tile: the value has no fixed 12px above it (the mock's .tile .val { margin-top: auto }, which is 0 once the content outgrows the tile); the grid's 1fr row and align-self: end still push it to the bottom. A tile at its minimum height draws the same (measured in Chromium: every tile in the kit, v3 and blocks galleries, the Home / Analytics screens and the PR screens has the same height before and after). A content-sized tile is 12px shorter, as the mock (the Raise-limit modal tiles). size="metric" (14px) and size="stat" (6px, the PR portal's) keep their own gaps. This reaches one PR-portal page: "View as brand" draws the brand home's four default tiles, whose computed gap goes 12px → 0. They sit at their 150px minimum, so nothing moves today (pixels identical); it would show only if their content outgrew the tile, and that page shows the brand console's look on purpose.
    • DrawerHead (brand blocks only; the PR portal does not use it): its row of lead and text sits at the top of the 110px head, as the mock's dhead, instead of in the middle; the title is 20px from the top (it was 27–30px). Lead and text stay centred on each other.
    • A heading right under a drawer head (.kit-blk-panel > .kit-blk-dh + .kit-blk-h3, BonusDetail's "Everyone's progress") is 22px below it, the mock's collapsed margins, instead of 40.
    • Tile size="short" is box-sizing: border-box, so it is 110px in total (the mock's) whether or not the app resets box-sizing; it was new in 0.5.0-pre.1.

    Changed behaviour

    • GroupForm mode="edit" saves a group with no members (rename an emptied group); mode="create" still needs one.
    • SpecialCommissionForm and ChallengeRequestForm send digits as ASCII ("١٥" → "15"): commission value, minimum followers and gift quantities, including starting values that never went through the input. They were validated as ASCII already; now what is sent matches.

    Fixes from the pre.1 review

    • The disabled look is no longer on every .kit-btn[aria-disabled] (it dimmed TopUpAmountPicker's busy submit in pre.1): it is the opt-in class .kit-btn--off, used by ButtonLink's unsafe-href span (now role="link" aria-disabled, keeping the caller's attributes).
    • PayoutBatchDetail without paidTo still shows Export CSV. ProofButton with neither a safe href nor onOpen renders nothing (a card top-up has no receipt), and the payout and ledger blocks guard on safeHref(...).
    • ChallengeRequestForm drops a sent platform the app no longer offers, so it never sends what it does not show.
    • NotificationsMenu: the loading line is announced (no aria-busy on its status), and "Try again" keeps focus in the panel while the app reloads.

0.4.0

Minor Changes

  • 1342e05: Console parity for groups and gift rules (what the Brand Console decided in surgeflo-wharehouse PR #1145), so the console can use the package's blocks instead of its own copies.

    New exports

    • CommissionRate (CommissionRateProps): a rate in words, the same on every screen: "15%" or "EGP 30 per item" ("30 ج.م على القطعة"), trailing zeros dropped, in the provider's currency. commissionRateText gives the string.
    • Types CommissionLimits, CommissionRange, CommissionErrorOptions.

    New props and options

    • commissionError(kind, value, language, labels, { limits, currency }): the server's own bounds (for example 0.01–50 % and EGP 0.01–10,000 per item) in place of 1–100 % and above 0; the message then names the range. Without limits nothing changes.
    • SpecialCommissionForm mode="set": the brand sets the rate itself. No reason field; the button names the rate and who it reaches: "Set 15% for 4 creators", or "Set 15% for creators who join later" for an empty group (members={0}), whose rate still applies to whoever joins. Also members, limits and hint. mode="ask" (the default) is unchanged.
    • CommissionInput disabled (the form sets it while saving).
    • GiftRulesCard bestGiftOnly: the cooldown applies only while "Only the best gift per creator" is on; false locks the cooldown's switch and days and says why. Left out, nothing changes.
    • Copy keys: commissionInput.errPercentRange, errAmountRange, ratePercent, ratePerItem; specialCommissionForm.set, saving, confirm; giftRulesCard.cooldownNeedsBest.

    Changed wording (visible)

    • GiftRulesCard's pick hint is now "Off: no new product credits are sent and TRNDR assigns the gift; credits creators already hold can still be picked." (was "Show the gift list in the creator app"). One gift per challenge: "A creator gets and picks at most one gift in each challenge." The cooldown's tip says it counts from using a gift and applies only while best-gift-only is on. Arabic follows, with the house term صنّاع المحتوى.
  • e8ef94d: PR portal v3, Gift analytics (src/pr/v3-audit/ganalytics.md): the page now builds from library components.

    New exports

    • UsageBar (UsageBarProps, PrUsageBarCopy, usagePercent): the "Stock used" cell, an olive bar and the muted "58/100" (OpenRate's bar read as a count of a total). Assistive tech reads one sentence ("58 of 100 used"); label replaces it. Copy key prUsageBar.
    • giftBrandColumns (GiftBrandRow): the DataTable column preset for Gift analytics' "By brand" table: brand, stock used, sent, delivered with its rate under it, received vs claimed (a dash, read "Nothing counted yet", when no shipment is confirmed) and the stock pill. useGiftAnalyticsCopy gives its words (copy key prGiftAnalytics).
    • giftStockStatus (GiftStockStatus): the mock's rule, out of gifts at nothing left, running low under 20 % left.
    • GiftShipmentCounts (GiftShipmentCountsProps, GiftShipmentStatus, PrGiftAnalyticsCopy): "Shipments from brands": each shipment status pill with its count, and "1 problem report open".
    • Status word gift_low ("Running low", warn) in TRNDR_PR_STATUSES.

    New props

    • BrandCell title: the bold line when it is not the brand's name alone ("GS-0017 · Glow Lab"); the square keeps the brand's initials. Default: the name, as before.

    Fixes (visible)

    • Segmented: the theme's --seg-fs now reaches the buttons (font: inherit used to reset it after it was set), so the PR theme's switch is 13px as the mock. Themes that do not set --seg-fs are unchanged.
    • usagePercent rounds down, so 100 % (a full bar) only means everything is used; the By brand delivery rate rounds as the mock (66 %) but stays under 100 % while any sent gift is still on the way.
  • dce103d: PR portal v3, Gift stock (reference/trndr-pr-portal-gui-v3.html P.gifts, P.gship, recordGS): brands send gifts to the warehouse, PR counts what arrived, and only confirmed units become gift stock.

    New exports

    • GiftShipmentCard (GiftShipmentCardProps, GiftShipmentLine, GiftCount, GiftProblem): one shipment, "What Glow Lab says it sent vs what arrived". While expected or arrived it is the check table (an "All 40 OK" tick fills Good, locks Good and Damaged and tints the row; "Tick all as received in full"; "Boxes received" with "Glow Lab said 2"; "Confirm received quantities" checks every field first). Once counted: Good, Damaged and Missing ("+2 extra"), the matched line or the "Confirmed with difference" banner, and a brand's problem report with "Keep the count" / "Recount".
    • GiftShipmentTimeline and BrandGiftStockCard: the shipment page's side cards (sent / arrived / confirmed; "Confirmed units left 42 / 100", with an optional "Gift stock →" link for the brand request page).
    • GiftStatusPills (GiftStatusPillsProps): a shipment's status pill, plus "Problem reported" while the brand disputes the count. GiftStatusFilter (GiftStatusFilterProps), GIFT_SHIPMENT_FILTERS, giftShipmentMatches, giftStatusKey, isGiftCounting; types GiftShipmentState, GiftShipmentFilter.
    • giftShipmentColumns (GiftShipmentRow) and useGiftColumnsCopy: the Gift stock list as a DataTable column preset, with the toolbar's search placeholder and sort words.
    • RecordGiftsDialog (RecordGiftsDialogProps, GiftBrand, GiftBrandProduct, RecordedGifts): "Record gifts for a brand", a modal with the brand's products as a checklist with units, boxes and where the gifts are now.
    • WarehouseNote (WarehouseNoteProps, WarehouseDetails, warehouseMapsUrl): the "Send to:" banner with a Maps link. WarehouseDetailsCard (WarehouseDetailsCardProps): the editable warehouse details (address and phone required).
    • Copy keys prGiftStatusFilter, prGiftColumns, prGiftShipment, prGiftSide, prRecordGifts, prWarehouse (EN / AR). Types PrGiftStatusFilterCopy, PrGiftColumnsCopy, PrGiftShipmentCopy, PrGiftSideCopy, PrRecordGiftsCopy, PrWarehouseCopy.

    New props and variants

    • Tile size="stat": the PR mock's colour stat card (no minimum height, 18px 20px, a 13px label, a 24px value), and Tile sub: a muted line under the value ("95 units claimed, not arrived"), part of a clickable tile's name. Opt in; the default tile is unchanged.
    • Status word gift_cancelled ("Cancelled", muted) in TRNDR_PR_STATUSES.

    Accessibility

    • The count fields (Good, Damaged, Boxes received; the record dialog's units and boxes) are text fields with a numeric keypad that read Arabic-Indic digits (٤٠) as digits, as the kit's other number fields do; a dialog with no brand to record for disables Save.
    • The count inputs are named per product ("Good units of Face powder"); a failed check marks each bad field (aria-invalid) and says why in an alert; unticking a product puts focus back in its Good field; ticking a product in the record dialog moves focus to its Units field. The Maps link says it opens a new tab. 44px hit areas on touch tiers; on a phone the count table becomes one small labelled card per product.
  • 2af7b97: Kit changes from the PR Portal v3 audit (PR-PORTAL-V3-AUDIT.md, "Still open" 1–4).

    New props

    • DataTable chevron={false}: clickable rows without the trailing › column (header, rows and loading rows). Default true, so every existing table keeps it. The PR mock's Gift analytics "By brand" table has none.

    Changed defaults (visible)

    • Banner tone="bad": the text is the dark raspberry --rasp-ink (#7E1C3A, the PR mock's .banner.bad) instead of the red --bad. The brand mock has no bad banner. Contrast on the --rasp-50 background goes up.
    • Modal hint: a sentence now wraps instead of being cut to one line with an ellipsis. Drawers are unchanged.
    • Dialog titles (Modal, Drawer) read a new theme hook --dlg-title-fs (22px by default, as before). The pr theme sets it to 20px, the PR mock's .modal h2 and drawer title.
  • 25d47dc: PR portal v3, people: the creator drawer with the TRNDR score, the creators table, tier changes, and the challenge builder's v3 summary, gift reward and brand request.

    • New: PrCreatorDrawer (the PR creator drawer: figures, TRNDR score, brands, the tier and where it comes from with "Change", reapply date, Approve / Reject for a pending creator or a join request; customer affiliates show no tier or score), ScoreBreakdown (the score and its nine parts with readings and bars, "Still measuring" / "Customer" when there is none) and ScoreExplainer ("How the TRNDR score works" modal), with the parts and their points as TRNDR_SCORE_PARTS.
    • New: creatorColumns (the PR Creators table preset: status, tier, score, followers, brands, orders, all-time sales; "Customer · Since …" for customer affiliates).
    • New: TierChangeDialog (change a creator's tier with a required reason, or go back to "Follow the score") and TierMoveList (automatic and manual tier moves).
    • New: ChallengeGiftPicker (a challenge's gift reward from the brand's confirmed gift stock: units left, cost per winner, a warning when fewer are left than winners, a sold-out gift that stays selected and is marked invalid, and why a gift challenge can't go live without confirmed stock) and BrandRequestCard (a brand's challenge request under review).
    • TierLadder: basis="score" places creators by TRNDR score (one range per tier from scoreFrom, the lowest holding unscored creators, onScoreInfo for "How the score works"). Default unchanged (sales).
    • ChallengeSummary: layout="flat" (the v3 sticky card), payer="trndr" (a TRNDR-wide challenge: "Paid by TRNDR", nothing held), paused and onAskTopUp. SummarySection's title is optional (no title: the lines alone, a flat .kv list).
    • Changed default: ChallengeSummary now disables the launch button when the wallet can't hold the budget, with the warning "Not enough in the wallet…", even if the app passed no bad warning (before, only bad warnings did). It is also disabled when a gift has no confirmed stock left or fewer units than winners (the gift line is red). canSubmit still overrides.
    • Leaderboard: showPercent={false} hides the "55%" beside each bar (the bar stays).
    • Kit: Tile size="stat" (the PR mock's small .stat figure) and KpiGrid size="short" (the short KPI strip). Defaults unchanged.
    • Money slots: creatorDrawer.figures, creatorColumns.figures, challengeGiftPicker.figures, brandRequestCard.figures.
    • Accessibility: score points are read as "19 of 20 points" (bars are decoration), tier arrows are read as "from … to …", the gift picker's cost and shortage are the select's description, the tier dialog's reason is required and marked invalid when missing, and every decision button is named for the creator ("Approve Nour Hassan").
  • c06c295: PR portal v3, programs: Affiliate programs is now campaigns (one active campaign per brand) with challenges under it, customer affiliates on the platform and per brand.

    New exports

    • CustomerAffiliatesSwitch (CustomerAffiliatesSwitchProps): "Customer affiliates · all brands", an On / Off pill and Turn off / Turn on. Turning off asks first; while off, a red banner says what is refused.
    • campaignColumns + useCampaignColumnsCopy (CampaignRow): the Campaigns table preset (brand, active campaign and its dates, status, "2 waiting" requests pill, commission, creators, sales · 30 days, orders, last change).
    • CampaignChangeRequests (CampaignChangeRequest): a brand's change requests, old value struck through → new, the date and quote, Decline / Approve (each named after its request), then the Approved / Declined pill.
    • NextCampaignCard (NextCampaign) and ScheduleCampaignDialog: the brand's next-campaign request with Decline / Schedule it, and the schedule dialog that sets the customer rate for the new campaign.
    • CampaignChallenges (CampaignChallenge): "Challenges in this campaign", rows with a TRNDR-wide tag, the "type · goal · reward · dates" line and the status; "+ New challenge".
    • CustomerAffiliatesCard (CustomerRateSave): a brand's customer rate (above 0 and below the creator rate, checked on save), "Also move the N customers…", the facts, and the customer link with Copy, Make a new link (asks first) and Turn link off / on.
    • customerRateIssue (CustomerRateIssue): that rule as a function, exact in hundredths, Arabic-Indic digits read.
    • PrChallengeCard (PrChallengeLeader): the PR Challenges tab's card (band, time left, goal and reward chips, top three or hit the goal, joined, budget held). The name is the one button and covers the card.
    • Copy keys prCustomerSwitch, prCampaignColumns, prChangeRequests, prNextCampaign, prCampaignChallenges, prCustomerCard, prChallengeCard; money slots customerAffiliates.figures, prChallengeCard.figures.

    New props and words

    • ChallengeRow.type takes 'boost' ("Commission boost", cash icon in a sky square) in challengeColumns.
    • PR_ICONS.percent (the "% of sale" choice).
    • PR status words: request_waiting (Brand request), request_approved, request_declined, campaign_scheduled, link_on, link_off, customers_off, switch_on, switch_off.

    No default changed.

    Accessibility

    • Every card is a labelled region; confirmations use the kit Modal (focus trap, Escape). Rule errors are tied to their field (aria-invalid + description). A copied link is announced. The challenge card is an article named by its title.
  • 416503f: PR portal v3, the frame and the core pages (Home, Approvals, Brands, Brand detail, View as brand, Messages, Activity log, Login): src/pr/v3-audit/shell.md.

    New exports

    • DecisionsCard (DecisionsCardProps, PrDecisionsCardCopy): the sidebar's "Open decisions" card, the open codes as butter pills (the question is the tooltip and part of the name) and a "Show decision tags" switch.
    • DecisionTag (DecisionTagProps, PrDecisionTagCopy, OpenDecision), DecisionTagsProvider, useDecisionTagsVisible: the inline tag after an undecided label, drawn while the provider shows tags; variant="open" is the always-visible "Open · R10" pill.
    • MiniList, MiniRow (MiniRowProps, PrMiniListCopy): short ruled lists in a card (lead, title over a muted line, trailing pill), one target per row with onOpen or href, a progress bar with progress, end-aligned cells, variant="soft" grey rows.
    • FigureRow (FigureItem): figures side by side, a muted label over a big value.
    • BrandGiftStock (BrandGiftStockProps, PrBrandGiftStockCopy): the brand page's confirmed gift stock (units left of total, delivered, not delivered yet), "Stock requests →", and the out-of-gifts pill and note.

    New props and variants

    • Icon: the PR mock's approvals, brands, tiers, speech (its messages), logout and star glyphs.
    • Tile size="stat": the PR stat card (no minimum height, a 24px value under a 13px label).
    • KpiGrid columns={3}; default 4.
    • Card tone="lilac".
    • QueueHeader: count is optional; seeAllLabel names the link.
    • SidebarCard className.
    • Tokens: --shell-search-w (240px; the pr theme 260px), --shell-crumb-link, --shell-crumb-weight, --shell-crumb-deco (the pr theme: raspberry, 600, underlined on hover). Class .kit-shell-me-out for a sign-out icon button in SidebarUser's action.

    Changed defaults (visible)

    • LoginLayout sets the page's font, size and line height (Inter, or Cairo in Arabic; 14px; 1.45) like the shell. A sign-in page outside an AppShell no longer falls back to the browser's serif.
    • Under the pr theme the header search is 260px wide and breadcrumb links are raspberry 600 without an underline.

    Accessibility

    • DecisionTag is read as "Open decision P6" plus its question; the code alone is hidden from screen readers.
    • DecisionsCard's switch has a visible label that also toggles it; each code is read with its question.
    • MiniRow's progress bar is read as words ("50% done"); a row that opens is one button or link, 44px tall on touch.

0.3.0

Minor Changes

  • b8a88ac: Screenshot audit, phase 2 (SCREEN-AUDIT.md): the library's screens now match the owner's ten screenshots. Where a screenshot and the older HTML mock differ, the screenshot look is the default and the old look stays reachable.

    New exports

    • Term (TermProps): a dotted-underlined word with a tip, for anything that is not a money figure.
    • ProductCell (ProductCellProps, ProductCellCopy): a product table cell (thumbnail, bold name, "412 sold · EP-012").
    • Strong (StrongProps, StrongTone): inline bold emphasis, tone="bad" | "ok" ("low (17% left)" in raspberry).
    • Types: HBarsProps, HBarsVariant, GaugeProps, DeltaProps, KpiGridProps, MoneyNoteProps, MoneyNoteVariant, ProfileFact.

    New props and variants

    • Button variant="lime" (the sidebar's "Contact TRNDR") and variant="on-dark" (the outline on the raspberry hero; replaces className="kit-btn--on-dark", which still works).
    • Tile size="metric": the compact KPI tile (132px, 26px value under the label). Default 'default'.
    • HBars variant: 'rows' (default; soft rounded rows, bold label, bar in the middle, value at the end, stacked under 600px) or 'stacked' (the 0.2 look). HBarRow.display takes a node, e.g. <Money compact />.
    • Gauge value + caption: "321 / 400" with the max small and muted, LTR in Arabic; center is now optional.
    • Delta tone: 'auto' (default) or 'inherit'.
    • DataColumn.tip (a dotted term header that can still sort: the arrow is its own "Sort by …" button), DataColumn.tone="muted", DataColumn.primary and DataColumn.inline (phone cards: the primary cell spans the card, an inline rank shares its row).
    • ListToolbar search.width: 'fixed' (default, 260px) or 'grow' (the 420px box); collapseFiltersBelow (px): the selects fold behind a "Filters · n" button on narrow screens.
    • KpiGrid phoneColumns={2}: two cards across down to 360px.
    • CreatorProfilePanel facts: a list, or a function of the built-in list; ProfileCreator.averageOrder is optional.
    • MoneyNote variant: 'term' (default), 'plain', 'icon'; BricksProvider moneyNoteStyle sets it for a subtree.
    • Drawer / Modal hideTitle: the title stays the dialog's name but is not drawn.
    • LoginLayout landmark: 'main' (default), 'div' or 'section'.
    • Tokens: --tracking-display (-0.2px), --color-nav-count-ink, --color-nav-count-active-bg.

    Changed defaults (visible)

    • No doubled 32px gaps: a banner, toolbar, KPI grid or tabs inside the shell's <main> or a card drops its own bottom margin (tabs keep 20px to the content); Wallet health's warning sits 12px above the meter.
    • Pill tabs hug their content instead of stretching; tab counts at 70% opacity.
    • Deltas are green / red / grey by direction outside tiles (tiles keep their ink); 400 weight in tables.
    • List toolbar: 260px search box, "Sort by" select at 12/700. Header search pill 240px. Toolbar select 42px.
    • A table header's "?" no longer makes the head row taller; a term in a header is uppercase like its column.
    • A clickable KpiCard is a box with a button laid over it, so its label can hold a MoneyNote (no nested buttons).
    • KeyValue tiles 72px (label line 20.3px); RankList rows 12px 16px; the profile drawer's money tile keeps 20px/800.
    • Nav counts take the row's ink (#C9CBD3 idle). Bell badge in the body font. Settings icons radius 12, glyph 18.
    • Display headings track -0.2px (0 in Arabic). Product thumbnails' initials sit on the soft surface.
    • "Topped up in total", Wallet health's "17% of …", Find's "Sold · 90 days" and the profile's figure captions are plain-label money notes (the "?" stays reachable), as the screenshots.
    • .kit-blk-link is 400 weight; ChallengeCard's dates line has no top padding; AreaTrend's x labels sit 5px under the plot in a card.

    Accessibility

    • A Drawer / Modal given no inertRef makes everything outside it inert and aria-hidden while open (only the outermost of nested dialogs), and gives back exactly what it changed before focus returns to the opener.
    • DataTable's and GiftProductsPicker's checkboxes sit in a label that is their hit area (44px on touch tiers).
    • The shell's language button's accessible name contains its visible text ("EN, English").
    • TierLadder's threshold fields show and accept grouped numbers ("250,000.00").
  • 9811de1: Money display is configurable per component and app-wide (owner decision 1). Money stays a 2-dp string; rounding, dropping cents and K / M are done on BigInt cents.

    • One option shape, MoneyDisplay: showCurrency (the currency word or the figure alone), decimals (MoneyDecimals: 2, 0 rounded half away from zero, or 'auto': cents only when they are not ".00"), compact ("EGP 184.3K", "EGP 11.2M"; the same thresholds as before) and sign ('negative', or 'always' for "+ 250,000.00").
    • Where it is set, the most specific winning: a component's money prop (keyed by its slots when it has several, e.g. <WalletLedger money={{ entry: { showCurrency: true } }} />), then BricksProvider moneyFor for one slot app-wide (moneyFor={{ 'walletLedger.entry': {…} }}), then BricksProvider money for everything, then the slot's built-in default. Nested providers merge field by field.
    • Slots are listed, with their defaults, in MONEY_SLOTS; MoneySlot type-checks moneyFor keys and MoneySlotsOf types a multi-slot money prop. useMoneyDisplay(slot, own) (or resolveMoneyDisplay) resolves one.
    • Components with money: Money (also a slot prop; compact stays as shorthand), MoneyFigure, MoneyNote, HeroCard (big, row), WalletLedger (total, entry, balance), WalletHealthCard, ChallengeCard, ChallengeDetail (figures, topCreators), LiveChallengeCard, FindCreatorCard, MyCreatorPanel, GroupCard, GroupPanel, PayoutBatchDetail (total, line), BundleCard, BundlePurchaseSummary (price, total), TopUpAmountPicker (preset, total), and in the PR package BrandWalletCard, ChallengeSummary / SummaryLine, FraudCaseDetail, FraudCaseRow, Leaderboard, TierLadder; the column presets (brandColumns, payoutColumns, topUpColumns, fraudColumns, challengeColumns) take it as their last argument.
    • formatMoney is the one formatter and takes every option (FormatMoneyOptions); moneyParts returns the sign and digits for a component that places the currency word itself. formatAmount is deprecated: it is formatMoney(value, { language, showCurrency: false, decimals: 'auto' }). A custom currency.format (MoneyFormatter) now receives the resolved options with the language.

    Visible change: WalletLedger entries no longer show the currency word and always carry a sign, as in the screenshots: "− 27,645.00", "+ 250,000.00" (was "− EGP 27,645.00", "+ EGP 250,000.00"). Group totals and the balance are unchanged. To keep the old entries: moneyFor={{ 'walletLedger.entry': { showCurrency: true } }}. The ledger's "+" is now written by the formatter inside the figure (sign: 'always') rather than before it. A figure that rounds to zero ("-0.40" shown compact as "EGP 0") no longer carries a minus. Every other default renders as before.

  • d9b85d1: Fixes from the review of 0.2.0 (REVIEW-0.2.0.md: logic, data, security, packaging, accessibility). 0.2.0 was published before these landed, so apps should use 0.3.0. Behaviour changes an app can see are marked changed; review the screens that use them.

    Data and HTTP:

    • changed createHttpClient sends the CSRF token, X-Requested-With and the shared headers (Authorization included) only to trusted origins: the page's own, the origin of an absolute baseUrl, and the new trustedOrigins option. An absolute URL on any other origin (a presigned upload, a third-party API) gets only Accept, Content-Type and that request's own headers. A protocol-relative URL (//host/…) is resolved against the page first. An app that relied on its shared headers reaching another origin lists it in trustedOrigins.
    • changed A 2xx answer whose body is not JSON (the sign-in page a proxy serves after the session ended) throws an HttpError with code: 'not_json' instead of resolving null. An empty body or a 204 still resolves null.
    • changed useAction: a second run with the same input (Object.is) while one is pending still returns the pending promise; with another input nothing is sent and it resolves at once with the new failure kind busy (ActionFailure gains 'busy'; an exhaustive switch on it needs the case). An exception thrown by a function action itself (a bug in the app's code, not the HTTP client) resolves as kind: 'error' and is logged with console.error; it used to look like a network failure.
    • changed useResource reads again when its client changes (a sign-in, another base URL). Pass a stable client (the DataProvider's, or one created once); a client created on every render reloads a bounded number of times, then the hook logs an error and stops following it.
    • useDrawerResource: an empty answer (204, null) ends loading with data: null; it used to show the skeleton forever.
    • changed URL state (useHashState, useQueryState, useListState): a field set to '' when its default is not empty is written as an explicit empty param (#view?ns.status=), so the choice survives a reload, Back and a shared link. New export EMPTY_PARAM (the patch value that writes it) and the UrlPatch type; toNamespacedPatch can return EMPTY_PARAM.

    Money, numbers and dates:

    • New src/lib/money.ts, the one home for exact money maths in BigInt cents (blocks/topup/cents.ts re-exports it). changed ChallengeSummary, TierLadder and Leaderboard no longer use floats on money: "Left after hold", the wallet bar, tier thresholds and leaderboard ties are exact past 2^53. An empty or unparseable amount is unknown, never 0: ChallengeSummary with an unreadable hold shows neither the bar nor "Left after hold", and an empty available is "no wallet". TierLadder compares a tier with the last valid tier above the starting one.
    • changed BundlePurchaseSummary: an available that is not a 2-dp amount disables the wallet choice with a reason (new copy key unknown on BundlePurchaseCopy); it used to leave Buy enabled.
    • changed formatMoney / formatAmount given a number (not a 2-dp string) show "—" and warn in development instead of throwing. Rounding in divideAmount is half away from zero for negative amounts too (−0.015 → −0.02).
    • changed WalletHealthCard compares the unrounded leftPercent with lowPercent (20.4% is not low at 20%).
    • changed commissionError applies the rule literally: a % is 1–100 with at most two decimals, an amount is above 0 with at most two decimals; 0.5, 1e2, 10.555 and 0.001 are refused.
    • changed Arabic-Indic digits (٠–٩, ۰–۹) are read as digits in TopUpAmountPicker, CommissionInput, OtpStep, DefaultableSetting, GiftRulesCard, NumberSetting and TierLadder. CommissionInput is now a text field with inputMode="decimal" (role textbox, was spinbutton), because a number field drops those digits.
    • changed shortDate: a date-only string (2026-11-01) is a calendar date, the same day in every time zone; a new optional third argument { timeZone } shows a date-time in that zone.

    Security:

    • New safeHref(url): http, https, mailto, tel and relative URLs pass; any other scheme (javascript:, data:, …) gives undefined. changed PersonCell / CreatorCell handle links, ProofButton, ProofList, TodoItem, MessagesPanel's contact link, BottomNav and LogoutButton's form action go through it: an unsafe URL renders the element without an href (ProofButton falls back to its button).
    • changed ReceiptUpload takes a file only when its MIME type is allowed and its extension matches that type, and ignores a drop or a pick while one uploads. The check is for the viewer; the server must check every upload again.

    Components and hooks:

    • changed DataTable and RowList select-all adds or removes only the rows on the page; rows picked on other pages stay selected (it used to replace the whole selection).
    • useFocusTrap registers its layer once per open (an inline onEscape no longer moves an outer Drawer above its nested Modal), and a trap whose container holds another open trap's stays below it. Drawer / Modal with inertRef give focus back to the opener after the app root stops being inert.
    • useViewportTier takes an optional first value and no longer reads window while rendering, so renderToString(<AppShell tier="mobile" …>) works. While AppShell's tier is set it pins the layout to that tier.
    • ToastRegion no longer restarts its timer when onDismiss is a new function each render; ListToolbar's Reset filters drops a search keystroke still waiting for its debounce; PrBulkBar calls its hooks before returning; ChallengeRequestForm ids come from useId (two forms on a page no longer clash).
    • Provider labels now reach validation messages: TopUpAmountPicker, SpecialCommissionForm, ChallengeRequestForm, GiftRulesCard and DefaultableSetting pass their merged copy to the rule helpers. The PR column presets take the words as a last argument; usePrColumnsCopy(language) reads the new provider key prColumns (type PrColumnsCopy).
    • Exported now: SenderPicker (announced in 0.2.0 but missing) with PrSenderPickerCopy, and the copy-registry types PackageCopy, PackageCopyKey, BlocksCopy, PrCopy.

    Packaging:

    • The published type files work under moduleResolution: NodeNext / Node16 and with noUncheckedSideEffectImports: relative imports in dist/**/*.d.ts carry .js, and stylesheet imports are no longer in them. dist stays ESM-only (no CommonJS build); see README for Jest / CJS consumers.

0.2.0

Minor Changes

  • 632a5e4: Brand blocks the v3 mock does not draw, under src/blocks (class prefix kit-blk-, styles in blocks.css), designed to sit with the W4 blocks and the live console's behaviour:

    • Messages, read-only for brands: MessageHistoryItem (body in the page language with fallback, channel, status, sent date, "Sent by TRNDR on your behalf" or by the brand, audience summary, sent / delivered counts), MessageHistoryList (loading, empty, error + retry, optional sent-by filter, pager slot), MessagesPanel (TRNDR banner, "Contact TRNDR" when a URL is given, history card, automatic-messages slot); messageBody.
    • Card top-up: TopUpAmountPicker (suggested amounts as chips, whole-number custom amount with min / max, available after the top-up, fee and payment-method slots, pending and error) with topUpAmountError; TopUpResultBanner (ok / pending / failed).
    • UGC bundles: BundleCard, BundleGrid, BundlePurchaseSummary (wallet or card, available after, confirm), BundleResultBanner (ok / already / closed, and pending / failed).
    • RowActions (primary / secondary / danger, overflow menu, busy, disabled with a reason, confirm step, never opens the row) with the joinRequestActions and invitationActions presets.
    • DefaultableSetting (follow the platform default or set your own: switch, number with unit, choice) and DefaultableRow, with defaultableNumberError.

    Every new component's words are BricksProvider labels keys (registered on BlocksCopy). No new runtime dependencies.

  • adae607: PR Portal: the six blocks the first pass left (INVENTORY.md "Not built"), and two shell fixes.

    • Login: LoginCard (brand mark and language toggle slots, work email, password with show / hide, "Keep me signed in", forgot-password slot, pending state, error banner, optional one-time-code step), OtpStep (six digit boxes, paste, resend countdown, Back) and the split-screen LoginLayout.
    • TierLadder: the Tiers screen's rungs, read-only or editing thresholds (Save checks they rise tier by tier). The mock's open decisions are props: open (R10 perks, S2 thresholds, S4 adding tiers), thresholdRule, onAddTier, onRemoveTier.
    • Leaderboard: ranked rows on the kit's RankMedal, CreatorCell and ShareBar, the "Winners above this line" cut (fixed, or movable with onWinnersChange), ties (first_reached as the mock, or shared), loading / empty / error.
    • ChallengeSummary with SummarySection / SummaryLine: the builder's review step (eligibility by group, tier and niche; reward lines with money "?" notes; gifts with stock; budget to hold against the wallet; warnings linked to their step; launch or approve).
    • challengeColumns (a DataTable preset like the other six) and ChallengeStatusFilter (status chips).
    • Fraud review (inferred, no mock): FraudSignalPill, FraudStatusPill, FraudCaseRow, FraudCaseDetail, FraudDecisionBar (clear / hold / revoke through ReasonDialog) and fraudColumns; signal words in FRAUD_SIGNALS, extendable with statusTables.prFraud.
    • Every new block's words are a labels.pr… key a BricksProvider can override.
    • Shell: on the icon rail, an item with no icon (the PR portal's indented children) shows its initials in a small badge instead of a cut-off label; MobileNavSheet slides out before it unmounts (skipped under reduced motion) and hands focus back to the opener when the slide ends.

    No new runtime dependencies.

  • 7a29a62: Core (W1) and the 0.2.0 integration: the v3 mock's look is now the default, the v3 list pieces are the standard, and the TRNDR tables move into a preset behind a new BricksProvider that every package reads. 0.2.0 also adds the shell, the data hooks, the brand blocks and the PR blocks and theme (their own changesets). See MIGRATION.md for every change with before/after code.

    Breaking (pre-1.0, review each screen):

    • Switch draws the 51 × 31 iOS switch by default. The old 38 × 22 track is variant="compact"; variant="ios" still works.
    • Pager always draws the v3 numbered pager (‹ 1 … 4 5 6 … 31 ›, 36px rounded buttons). With perPage it says "Showing 41–50 of 304"; without it, "Page 5 of 31 · 304 in total"; on one page, "304 items". The old console pager is gone: no "Previous" / "Next" words (the arrows are "Previous page" / "Next page"), no console-list-pager classes, and while loading the other page buttons are disabled.
    • FormField controls are the v3 fields: 42px, radius 12, the kit's own select chevron, a soft focus ring, a red outline on error, an ink label.
    • RowList has the v3 table look: a #FAFAFC head, cells 12 × 14 (were 12 × 18), 13.5px text, a pink row hover, 18px checkboxes, a 40px empty state.
    • TierBadge is the v3 tier chip (same as TierChip); the Tile corner shape is the v3 size (150px, fainter).
    • The select chevron rule no longer reaches every <select> on the page, only the kit's (SelectBox, SortSelect, Toolbar filters). Add className="kit-select" to a select of your own that relied on it. ListToolbar selects now show the v3 chevron (the global rule used to cover it).

    New:

    • BricksProvider (with useBricks, useLanguage): language, statuses, tiers, currency, the money "?" dictionary and per-component label overrides for everything below it: kit, shell, blocks, PR blocks, and the data hooks' DataProvider (which takes its language when not given one). trndrPreset holds the TRNDR tables (statuses, tier names, coupon chip wording, "TRNDR score", "Managed by TRNDR", EGP, and the PR portal's status words and audit areas as statusTables.pr / statusTables.prAudit); with no provider every component uses it, so existing code draws exactly what it drew (a test renders every gallery section both ways). Every component's language prop, in every package, is optional and still wins over the provider; a component's own labels / copy prop wins over the provider's labels.
    • labels reaches the packages too: LabelOverrides takes the kit's keys (KitCopy) and the packages' (PackageCopy: shell, one key per brand block such as walletHealthCard, one per PR block such as prApprovals). New statusTables prop for named status tables a package reads apart from statuses.
    • ListToolbar: reset ("Reset filters" while a filter is set), a filters slot, Sort by options with their own starting order ([key, label, dir]), a Sort by label.
    • DataTable isDim and column figure (the money "?" beside the sort button); KeyValueItem figure (the label becomes the "?" term); SaveBar saveDisabled (Save off, Discard still works); Switch id and aria-describedby.
    • WalletHealth ('ok' | 'low' | 'negative' | 'paused') is one shared type for the brand and PR wallet blocks.
    • formatMoney and amountInText take an optional currency word.
    • Theme hooks: tokens a theme can set, declared in tokens.css with today's value, so nothing looks different: --seg-* (Segmented), --btn-ghost-ink / --btn-ghost-hover, --btn-sm-pad, --disabled-opacity / --disabled-cursor, --field-radius / --field-h, --modal-w / --modal-pad, --drawer-w / --drawer-dur / --drawer-ease, --page-title-fs / --page-sub-max, --bulk-*, --chipf-pad, --rasp-ink (the dark raspberry text on the rasp tile and KPI card), and the shell's --shell-*.
    • Stylesheets per package: besides styles.css (everything, in the order kit → shell → blocks → pr) the package ships kit.css, shell.css, blocks.css and pr.css (the PR blocks' styles; the theme is themes/pr.css). An app that uses only the kit can load tokens.css + kit.css.
    • Library guards: no inline language === 'ar' ? '…' : '…' copy, no money without its "?" figure, and no name exported by two packages.

    Deprecated (still working, removed after the Brand Console has moved): RowList sort / onSort and column sortKey / sortFirst (use DataTable), SortSelect (use ListToolbar sort), PersonCell avatarSrc / photo (use CreatorCell), fetchJson (useDrawerResource now reads through the data hooks' HTTP client).

    Changed hooks: useListState reads and writes the URL through the data hooks' URL core (LIST_STATE_EVENT is now an alias of URL_STATE_EVENT, same bc:url value) and its error carries the server's message and code (DataError); useDrawerResource with no fetcher GETs through the DataProvider's client and its error carries the server's message.

    Gallery (dev only): one page with Kit, v3, Shell, Blocks and PR sections and EN/AR and Brand/PR toggles (?section=…&lang=…&theme=…).

    Fixed: Arabic text no longer sits too tight in the follower total, the KPI card value and notification text.

  • 21109b3: Add the shell (W2): AppShell, Sidebar (+ SidebarCard, SidebarUser), NavGroups, AppHeader (+ LanguageToggle), HeaderSearch, TopbarMenu, UserMenu, BottomNav, MobileNavSheet, UsageMeter, LogoutButton, EmptyView and ScreenErrorBoundary, styled by shell.css (kit-shell-*; in styles.css, or alone as @ergasti/bricks/shell.css). Nav items, brand, URLs, the search fetcher and the current route are props; nothing fetches or routes. The shell's words are SHELL_COPY: override them with the provider's labels.shell, the AppShell's copy, or a component's copy (nearest wins). Three tiers (full sidebar >1024, icon rail 860–1024, tab bar + sheet <860); the sidebar is fixed to the viewport by its top and bottom edges and scrolls on its own. Theme hooks --shell-* (the pr theme sets them: 248px sidebar, the PR nav). No new runtime dependencies (lucide-react was already one).

  • 2f4e7ec: Add generic data hooks (W3, src/data). createHttpClient returns a typed HttpError with status, message, the 422 errors bag and the business code, and supports CSRF, abort and onUnauthorized. DataProvider passes the client down (its language is optional: the BricksProvider's otherwise). The hooks are useResource (aborts stale requests and ignores out-of-order replies), usePaged (reads pagination/meta/paginator envelopes, passes summary through and steps back when the last page empties), useAction (EN/AR failure messages, field errors, double-submit guard, onDone), useHashState/useQueryState and useUrlSort (one URL write per change, bc:url, Back/Forward; the URL core in urlState is exported), and useDebouncedCallback. The release also adds resourceUrl, toDataError and listFetcher, an HttpClient-backed fetcher for useListState. No new runtime dependencies.

  • 4523f1e: W4: the Brand Dashboard v3 mock's building blocks the kit lacked, under src/blocks (class prefix kit-blk-, styles in styles.css or alone as @ergasti/bricks/blocks.css): wallet health, where-your-money-went ledger, payout window, payout batch detail, transfer receipt; group card, group panel, group form with members picker, special commission form (% of sale or a currency amount per item, the word from the provider); challenge card, challenge detail, challenge request form, bonus card and detail, gift rules card, gift stock list, gift products picker; Home's live challenge card; Find creator card, highlight badge, creator mini profile (score card, follower bars, facts grid), my-creator panel; settings section; activity log; and shared pieces (ProgressRow, DrawerHead, RowItems with an optional heading and money figure, CalloutCard, CopyLinkField, CheckList, StatGrid). Presentational only. Each block's words have a provider key (its labels prop still wins); every money figure carries its "?" note. No new runtime dependencies. src/blocks/INVENTORY.md maps every mock block to the kit, a composition or a W4 block.

  • 5ace88f: W5 PR Portal: a second theme and the PR admin's building blocks.

    • @ergasti/bricks/themes/pr.css: the pr theme, variables only (names tokens.css defines), scoped to [data-bricks-theme='pr']. Load it after tokens.css and put the attribute on <html> or a wrapper. It sets the PR mock's palette and the kit's and shell's theme hooks (segmented control, ghost and small buttons, fields, 480px modal, 420px drawer, 28px page title, filter chips, 248px sidebar). src/pr/THEME-GAPS.md lists what is closed and what stays open.
    • New presentational blocks (prefix kit-pr-, styles in styles.css or alone as @ergasti/bricks/pr.css): the announcement composer (AnnouncementComposer, SenderPicker, ChannelPicker, AudiencePicker, MessageFields, MessagePreview, AudienceLabel, SenderCell, OpenRate), approvals (ApprovalRow, ApprovalActions, WaitingCell, TaskRow, QueueHeader, QueueTile, PrBulkBar, BulkAction, ReasonDialog, PrEmpty), payouts (ReceiptUpload, PrStatusPill), brands (BrandAvatar, BrandCell, BrandStack, BrandDetailHeader, BrandWalletCard, ViewAsBanner, WalletHealthPill), settings (SettingRow, NumberSetting, PlatformDefaultRow), AuditLogEntry / AuditLogList / AuditAreaPill, PermissionMatrix, ChoiceGroup, ChangePreview, Stepper, and DataTable column presets for join requests, brands, payouts, top-ups, messages and the audit log (plain functions: they take language as an argument).
    • The PR status words and audit areas are preset data (TRNDR_PR_STATUSES, TRNDR_AUDIT_AREAS, read as the provider's statusTables.pr / .prAudit); tier names come from the provider's tiers (tierName). Each block's words have a provider key (prApprovals, prBrandDetail, …).
    • No new runtime dependencies.

0.1.0

Minor Changes

  • Brings in the brand console kit changes from the app (surgeflo-wharehouse PR #1139), so the library now matches the kit the app's screens are written against. Where the app and the kit v3 work changed the same thing, the app's version is the one you get.

    New from the app:

    • DetailsDrawer (with the DetailsHero, DetailsTile, DetailsBar, DetailsRanked, DetailsSection, DetailsDrawerProps and DrawerTone types): the shared row-details sheet.
    • SortSelect (SortOption, SortValue): "Sort by [field] [⇅]" for lists that cannot sort from a header.
    • RowList sorting: sort / onSort on the list and sortKey on a column. The first click sorts a number column high to low and any other column A to Z. New exported types SortDir and SortState.
    • RowList rows that open (onRowClick) show a chevron and open on Space as well as Enter; the list is now one bordered card (radius 18) with rows padded 12 × 18, and turns into cards inside a narrow drawer or modal.
    • Toolbar reset: a "Reset filters" button shown while a filter is set.
    • Pager always shows numbered pages (1 … 4 5 6 … 9) between Previous and Next.
    • SelectBox hideLabel.
    • Avatar src and PersonCell avatarSrc: a photo that replaces the initials, with the initials back if it fails.
    • Icons copy, check, pause, seat, reset, stop and file.
    • pageWindow (the shared page-number window) and the useOpenedRow hook.
    • Style changes from the app: buttons with an icon, a status pill no longer stretches in its column, space between a list and its pager, and one chevron for every single <select> on the page (a global html body select rule).

    Changed or removed from kit v3 (0.1.0 was never published, but its changelog announced these):

    • pageWindow now returns '…' for a gap instead of 'gap', keeps a fixed 7-item window (1 2 3 4 5 … 31, never hiding a single page) and is exported from the library root rather than from the kit's list controls. The perPage pager uses it too.
    • RowList sort headers use the app's markup and classes (kit-sort, kit-cell--sorted, SVG arrows) instead of kit-sorth with ↕ ↑ ↓ text. A column's sortFirst still works but now only overrides the app's default first order (it used to default to high to low for every column).
    • Avatar with src draws the photo instead of the initials (it used to draw the photo over them); the image has the class kit-av-img.
    • Switch is the app's 38 × 22 switch again. The iOS switch is now opt-in: <Switch variant="ios" />.
    • Form fields (FormField) keep the app's look; the v3 field restyle (42px height, radius 12, the --kit-chevron select arrow) is gone. The --kit-chevron token is still there.
    • The file, seat and stop icons are the app's glyphs, not the v3 mock's; eye, chart and gift are unchanged.
    • SortDir is exported once, from RowList; ListToolbar and DataTable use the same type.

    Unchanged and still available: DataTable, ListToolbar, useListState, KpiCard, the table cells (CreatorCell, TierChip, ScoreRing, FollowersCell, AvatarStack, RankMedal, ShareBar, GroupTag, ProofButton, …), ProofList, RankList, NotificationsMenu, useDrawerResource, Pager perPage, Toolbar sort, PersonCell photo and tier, HBars onSelect, Drawer loading and the dialog stack (Escape closes only the top dialog).

  • 79f03ab: First release: the TRNDR brand console kit (primitives, patterns, dialogs, lists, charts, money notes), its design tokens and its hooks, moved here unchanged from surgeflo-wharehouse.

  • 447c249: Kit v3, from the client's 16 Nov review of the brand console. Everything is additive: existing props work as before.

    • Lists: DataTable (sortable column headers, clickable rows, skeleton rows, "Clear filters" empty state, stacked cards on phones, a cards mode), ListToolbar (search, status chips, filter selects, "Sort by" with a flip button, an export slot) and the useListState hook, which keeps search, filters, sort and page in the URL hash. RowList can now sort by its column headers (sort, onSort, column sortKey), and Toolbar has a sort slot.
    • Pages 1-2-3: pass perPage to Pager for "Showing 11–20 of 304" and numbered page buttons.
    • Creator rows with picture, tier and score: CreatorCell, TierChip (new tier colours; Influential gets its own), ScoreRing, FollowersCell, AvatarStack, GroupTag. Avatar takes a picture (src) with the initials as fallback, and PersonCell gains photo and tier.
    • Proof: ProofButton (a clear, labelled "View proof") and ProofList, which lists every receipt instead of only the first.
    • Analytics: RankMedal, ShareBar, RankList, ProductThumb, and clickable HBars rows (onSelect).
    • KpiCard / KpiGrid stat cards that filter or navigate, StepTimeline, NewCard, and the NotificationsMenu bell and dropdown.
    • Drawers load once: Drawer takes loading (one skeleton, the same drawer stays open) and useDrawerResource(url, seed) drives it. A modal opened from a drawer now closes alone on Escape and gives focus back to the drawer.
    • Visual changes to review: Switch is now the iOS-style switch (51 × 31, green when on), and FormField controls are 42px with a rounded 12px corner, a select chevron and a soft focus ring.
    • New tokens: tier chip colours, --tbl-head, --row-hover, --ios-on, --ios-off, medal colours, --card-min and --kit-chevron.

On this page