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
::beforenow 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'ssurfaces.cssdid) can drop it.
0.7.3
Patch Changes
- c5e8f5e:
CustomerAffiliatesSwitch,CustomerAffiliatesCard,ProgramStatusCard,AffiliateProgramCardandDetailsDrawertake an optionalinertRef, passed to the confirmation dialog or drawer they open (the kitModal/Drawer/ReasonDialoginertRef). 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: whenvaluematches none of its tabs, the first tab takes the tab stop, so the tablist is still reachable with Tab (asFilterChipsandSegmentedalready 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 fromlength), solength={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: aleadorasidepassed withhideTitle+closeButton="float"is not drawn, and thehintis 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 ofmax-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.
- HBars
0.7.1
Patch Changes
-
04b347c: Accessibility fixes from the documentation accuracy review.
FilterChipskeeps a Tab stop whenvaluematches none of the options: the first chip becomes the roving tab stop, as inSegmented. This also fixes the chips inListToolbar,ChallengeStatusFilter,GiftStatusFilterandMessageHistoryList, which all renderFilterChips.- Values that were read out only through
aria-labelon a generic<span>(or<b>), which screen readers often ignore, now pair anaria-hiddenvisual with visually hidden.kit-srtext: the "—" placeholders inGiftShipmentTimeline("Not yet"),giftShipmentColumns("Not counted yet"),creatorColumns("No tier", "No score yet", "None"),campaignColumns("None") andBrandStack("None"); the waiting count inchallengeColumns("3 waiting to join"); and the missing count inGiftShipmentCard("4 missing"). The visible output does not change. DataTablein cards mode: the loading skeleton's "Loading…" was anaria-labelon a plain<div>; it is now visually hidden.kit-srtext inside it (the skeleton cards stayaria-hidden, andaria-busyis unchanged).ScheduleCampaignDialogtakes an optionalinertRef, passed to itsModal, to scope which part of the page turns inert while it is open (asReasonDialog,TierChangeDialogand 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,CardandDataTable. 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,3or4equal columns.4becomes 2 columns at 1100px and under,3becomes 1 at 1100px, and2becomes 1 at 1180px.splitwins 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: withsplit, the side column stays 20px under the top while the page scrolls, above 1180px. The--sticky-aside-topcustom 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
hrefit is an<a>, and the URL goes throughsafeHref. Withouthrefit 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(_blankaddsnoopener noreferrer),aria-label,dir,id,className.- It has a visible focus ring, and a 44px hit area at 1024px and under.
- With
- New
Muted: inline muted text, 12px.asis'span'(default),'div'or'p'.sizeis'sm'(12px, default),'md'(13px) or'inherit'. Other attributes pass through. - New
Note: a muted paragraph, 8px under what is above it.size, andflushto 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 isinertandaria-disabled, with no pointer events and no text selection.labeladds 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).levelis 2 by default, plusidandclassName. Type:SectionHeadingProps. FormFieldhas two new props,asandadornment:as="group": for a field that is not one input (aChoiceGroup, or an openDecisionTagin place of a control). The label is a<span>, the field is arole="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 (aDecisionTag, or "(optional)" asMuted).- The default
as="field"is unchanged.childrennow also accepts content other than one element, for the group forms. New types:FormFieldProps,FormFieldAs.
Tilehas a newvalueSizeprop:'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.Cardhas 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'.
DataTablehas a newcardColumnsprop:1,2or3card columns formode="cards". With3, the cards drop to 2 columns at 1240px and to 1 at 720px; with2, to 1 at 720px. The loading skeletons use the same columns. Left out, the cards use the auto-fill grid as before.
- New
-
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
errorslots on four blocks. Every default keeps 0.6.0's output.- Challenge builder. One form state,
ChallengeDraft(start fromdefaultChallengeDraft(brandId)), feeds every step. Each step component is controlled (value/onChange, which hands back the whole value, so a full draft passes through), takeserrors(messages by field, which win) andvalidate(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 besideChallengeSummary layout="flat"in aPageGrid split="8-4" stickyAside. - New
ChallengeBasicsFields(step 1): who it's for (the brands, with paused ones marked, and "All brands · TRNDR-wide" first unlesstrndrWide={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;trndrWideshows 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
DecisionTagsProviderthat shows tags;decisionsgives 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;challengeIssuesreads it as digits.
- New
- 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, aChangePreview). It says exactly what the blocks'CommissionRate form="long"draws.kindis'percent'/'per_item'(or'pct'/'egp');options.currencyandoptions.labelschange the words. Types:CommissionTextOptions,CommissionTextCopy. - New
useCommissionText(language?):commissionTextbound to yourBricksProvider, for use in a component. It writes a rate with the provider's currency label and the provider'slabels.commissionInputwords (the onesCommissionRatedraws), so a rate in a string prop matches theCommissionRatebeside it.commissionTextitself is a plain function with no provider to read: its currency defaults to EGP, andoptions.currencychanges 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 passtierBonus), 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 fromcurrent. Switching the kind starts from the current value, or fromstartValues(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. NewcommissionChangeError(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. NewCOMMISSION_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 aReasonDialog(mode="text") beforeonPause(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;enoughoverrides it). While either amount can't be read as money, andenoughisn'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
- 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 noonRequest, 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 theDecisionTagsProvidershows tags. Props:codes(codes or{ id, question }),decisions(where bare codes find their questions),variant('tag'default, or'open'pills),visible,spacing. Withspacing="pull"in aPageGridor 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). errorslots.CampaignChangeRequests,CustomerAffiliatesSwitch,BrandRequestCardandChallengeSummarytakeerrorandonRetry: 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 keyserrorandretry, so copy objects written for 0.6.0 still type-check.
- Challenge builder. One form state,
-
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
GiftShipmentCardkeeps a half-finished count through refetches.- New
shipmentIdprop. What PR has typed is now kept by product (the line'sid, 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 (orbusy) 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. PassshipmentIdto 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
GiftClaimCheckdid), so "All 1,200 OK" confirms. The units error then names that limit, from the new optional wordunitsErrUpToinPrGiftShipmentCopy. - An untouched "Boxes received" follows
claimedBoxes; a typed one is kept. - New
loading,loadErrorandonRetry: skeleton lines under the title while the shipment loads, or an alert with Try again.erroris still a failed save.
- New
- Card-level load states on the claim page's other cards, all off by default:
GiftShipmentTimelineandBrandGiftStockCard:loading,loadError(truefor the default words, or your own reason) andonRetry. The shared props type isGiftCardLoadProps. All four claim-page cards use the same names.WarehouseDetailsCard:loading,loadErrorandonRetry. Save is disabled while either shows;erroris still a failed save.- New optional words
loading,loadErrorandretryinPrGiftShipmentCopy,PrGiftSideCopyandPrWarehouseCopy. 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 onMiniListvariant="soft"andMiniRow(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 whenonSelectis 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 fromstatusTables.pr), or{ kind: 'custom', title, sub }. Each item hasid,brandandonSelect.label(default "Needs attention"),empty(default "Nothing waiting."),language,labels(BricksProvider keyprGiftAttention). Types:GiftAttentionItem,GiftAttentionListProps,PrGiftAttentionCopy.
PrIconhas agiftglyph (a wrapped gift box), for gift rows, nav items andIconSquare.
Deprecated (still exported and still working; removed in 1.0)
Deprecated (0.6.0) Use instead (0.4.0) GiftClaimCheck,GiftClaimCheckProps,GiftClaimCheckResult,GiftClaimLineGiftShipmentCardwithshipmentId,GiftShipmentCardProps,GiftCount,GiftShipmentLine(productIdbecomesid)giftClaimColumns,GiftClaimRow,GiftClaimStatusgiftShipmentColumns,GiftShipmentRow(sentOnbecomessent,statusbecomesstate),GiftShipmentState(giftStatusKeygives thegift_*keys)giftAnalyticsColumns,GiftBrandStockRowgiftBrandColumns,GiftBrandRow(usedistotal−left; the status defaults togiftStockStatus)ShipmentSummary,ShipmentSummaryPropsGiftShipmentCounts(counts as a record) inside aCardPrGiftsCopyPrGiftShipmentCopy,PrGiftColumnsCopy,PrGiftAnalyticsCopyGiftShipmentCardnow keeps a count by product and takes lines over 999 units, asGiftClaimCheckdid. Three differences to check when you move:GiftClaimCheckGiftShipmentCardWhen a half-typed count restarts With claimId: when the id, the status orexpectedBoxeschanges (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 result boxes: nullwhen the shipment is not Expectedboxesleft out when the shipment is not Expected (GiftCount.boxesis optional)Lines in the result { good, damaged }in the order given{ id, good, damaged },idbeing the line'sidor else its indexSo read
count.boxes ?? nullwhere your code expects null.Messages
AnnouncementComposer:channelsis optional. Left out or empty, the channel picker is not drawn andvalue.channelstays 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. Defaulttruein the page layout (as before) andfalsein 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. AModalthat holds it is 480px wide by itself.
- New
MessageDrawer: a sent message opened from the history (props asmessageColumns'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 frommessageNotOpened),note(nulldrops it),language,labels(BricksProvider keyprMessageDrawer),inertRef. - New
messageNotOpened(creators, openPercent). Types:MessageDrawerProps,PrMessageDrawerCopy.
- Props:
Brand dialogs (each on the kit
Modal, controlled byopen/onClose, fields reset each time it opens, before the first paint, withbusyanderror, in English and Arabic)- New
ChangeOwnerDialog: "Change PR owner".brandName,owners(PrOwnerOptionlist),value(the current owner, where the select starts;nullfor a brand nobody owns),meId(marks "(you)"),onSave(ownerId),note. Withvaluenull, or an owner who is not inowners(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 callingonSave. 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, andonSavegets{ amount, reason }withamountas a signed 2-dp string ("-390.10"). Withavailableit shows what the wallet holds after the adjustment (slotbrandDetail.figures,money). NewparseWalletAdjustment(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, andonUseDefaultfor "Use default (5%)", shown while the brand has its own fee. WithonUseDefault, saving an empty field also calls it; without it, the explanation does not offer clearing and an empty field is an error. A newvaluewhile the dialog is open replaces the field only if nothing was typed. NewparseBrandFeeandBRAND_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 nameMiniRowshared 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
CampaignChallengesandCampaignChangeRequestsonly;MiniListandMiniRowkeep theirs). A theme that targets the old names on these blocks needs the new ones:0.6.0 0.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-tChanged types
AnnouncementComposerProps['channels']is now optional (ReadonlyArray<ChannelOption> | undefined). Code that readsprops.channels.lengthfrom that type needsprops.channels?.length ?? 0. Passingchannelsworks as before.
-
e2abe80: PR challenges, creators and approvals.
- New
challengeTableColumns(language, options?, money?): the Challenges tab's Table view as aDataTablecolumn 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 keysname,brand,left,joined,held.options.onOpenmakes the name a button;options.copyoverrides its words. The budget uses the card's money slot,prChallengeCard.figures.challengeColumnsis unchanged. - New
PrChallengeRowandPrChallengeDatatypes andtoPrChallengeCard(row): one row type for both of the Challenges tab's views.PrChallengeDatais the dataPrChallengeCarddraws (its props withoutonOpen,language,moneyandlabels);PrChallengeRowadds anid. Map the API's challenges once, give the rows tochallengeTableColumns, and hand each to the card with<PrChallengeCard {...toPrChallengeCard(row)} />.PrChallengeCardPropsnow extendsPrChallengeData; 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:onApproveandonReject(required),onOpen(the name becomes a button),busy(row)(disables that row's buttons) andcopy. Rows arePrNewCreatorRow(id,name,seed,avatarUrl,customer,followers,signedUp). - New
CreatorPickDialog: a challenge page's "Add creators" dialog, on the kitModal. 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. Alsobusy(defaultfalse: disables the list and the buttons, "Sending…"),error(shown as an alert over the buttons),language,labels(or the provider'slabels.prCreatorPick) andinertRef. "Send invites" is disabled while nothing is selected. creatorColumnstakes a third argument,CreatorColumnsOptions. Each option defaults to 0.6.0's output:onOpen: the name becomes a button.reapply: a rejected creator with areapplyOndate 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. WithnullableSales: truethe columns take the newPrNullableSalesCreatorRowrows, whosesalescan benull(no figure yet);onOpenthen receives that row type.PrCreatorRowhas a new optionalreapplyOn. Itssalesis still astring, so 0.6.0 code that readsrow.saleskeeps compiling.PrCreatorRowrows also fitPrNullableSalesCreatorRow.
- Deprecated:
prCreatorColumnsandPrCreatorListRow. UsecreatorColumns(language, money, { onOpen, reapply: true, nullableSales: true })withPrNullableSalesCreatorRowrows: the same columns and behaviour. Both keep working until 1.0. To move, change each row'screatorobject to the flatname,seedandavatarUrlfields,customer: truetotrack: 'customer', andreapplytoreapplyOn. WaitingCellandApprovalRowhave a newageTagprop: a node after the waiting age's reminder line, such as<DecisionTag id="S1" variant="open" />. Left out, nothing changes.ScoreBreakdownhas a newvariantprop.'card'draws the same content as kit pieces: aCard variant="inset"titled "TRNDR score", with the score (or the "Still measuring" / "Customer" pill) as its badge and the parts asDetailsBars variant="stacked"rows. The default'default'is 0.6.0's card.PrCreatorDrawerhas two new props:scoreVariant:'card'passesvariant="card"to itsScoreBreakdown. Default'default'.headerStyle: the kitDrawerhead 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.wantsoverride 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; alabels.wantsoverride 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 kitDrawer'sheaderStyle="pr"andfooterDivider:- 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 itskit-pr-cntclass, which now has these styles; the sales cell gains thekit-pr-moneyclass. To restyle them, target those classes in your own CSS.
- New
-
e2abe80: Shell and the PR portal frame.
- Phones keep the sidebar's card and user row. Under 860px,
AppShellnow showssidebarCard(under the nav) andsidebarFooter(as the footer) in theMobileNavSheet, so the PR portal's "Open decisions" card, its "Show decision tags" switch and the sign-out button are reachable on phones.MobileNavSheethas a newcardprop for this.sheetFooterkeeps winning: when it is set, the sheet shows it alone, as in 0.6.0.- Default look change: a phone sheet of an
AppShellthat hassidebarCardorsidebarFooterand nosheetFooternow shows them. To keep 0.6.0's sheet, passsheetFooter(sheetFooter={null}for no footer at all).
- Default look change: a phone sheet of an
- 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 stringname),size(the square's side in px, default 38) andclassName. AppHeaderhas a newtitleLeadprop: 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 rendersAppShellin the PR theme with the v3 nav,DecisionsCard tip="focus"in the sidebar card slot,SidebarUserwith a 34px avatar and a sign-out button, andAppHeaderwith the screen's tools first (leading),HeaderSearch,NotificationsMenu, the raspberry "+ New"TopbarMenuand a two-line phone subtitle. It wraps everything in aDecisionTagsProviderdriven by the card's switch.- Props, each optional with a default:
nav(defaultPR_PORTAL_NAV),activeId(default'home'),onNavigate,brand,decisions,sidebarCard,showTags/defaultShowTags/onShowTagsChange,user(name,detail,seed,src,avatar),onSignOutorsignOutUrl+csrfToken(withoutuser, 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
labelsor the provider'slabels.prPortalFrame. - Wrap it in your
BricksProvider(money={{ decimals: 'auto' }}shows "EGP 5,000" rather than "EGP 5,000.00") and importthemes/pr.css.
- Props, each optional with a default:
- 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.
- Phones keep the sidebar's card and user row. Under 860px,
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 inpr.cssandstyles.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 agift_confirmed_diffclaim, and a problem report with Keep the count / Recount. PassclaimIdso a re-render keeps a half-finished count. Each line's count is kept by its product (new optionalGiftClaimLine.productId, elseproduct), 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 keygoodHint) 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.giftClaimColumnsandgiftAnalyticsColumns:DataTablecolumn presets. The stock column uses 0.4.0'sgift_ok/gift_low/gift_outstatuses; ingiftAnalyticsColumnsthe 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'sgift_*keys inTRNDR_PR_STATUSES; no new gift status is added.
PR Portal: lists and statuses
challengeRequestColumns: Challenges › Brand requests as aDataTablecolumn preset (row typeChallengeRequestRow). Its last argument is amoneyoption; the budget has its own money slot,challengeRequestColumns.budget(default "EGP 10,000", cents only when non-zero).prCreatorColumns: the PR Creators list as aDataTablecolumn preset (row typePrCreatorListRow), beside 0.4.0'screatorColumns. Its last argument is amoneyoption; 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") andtrndr_wide(sky, "TRNDR-wide"). See the types changeset:PrStatusgains 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), withmarks(default true) and an optionalciteline.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) andDetailsBar.note(shown by stacked).DetailsDraweris unchanged from 0.5.0 (still deprecated); its section bars are drawn byDetailsBars, 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: newsize('md'|'sm'; sm is 41 × 25, the PR mock's sidebar switch) andsurface('light'|'dark'; dark is the #3A3C45 off track for an ink background). Left out, the surroundings decide (see the default look changes).AppHeader: newleadingslot: a screen's own tools, drawn before the search whileactions(the bell, "+ New") stay after it, the PR mock's order. Under 600px a kitButtonwith an icon inleadingshows the icon only (its words stay its accessible name). NewsubtitleLinesclamps the subtitle to that many lines under 600px (the full text stays in the page, and a string subtitle is its tooltip).HeaderSearch: newcollapsible(defaulttrue; see the default look changes).collapsible={false}keeps the pill on phones.SidebarUser: newavatarSize(px), so the PR user row's avatar can be the mock's 34px.SidebarUserPropsis exported.Icon:messagesdraws 0.4.0'sspeechbubble 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 (declaredinitial), so at 1240px and under the pill reads the theme's own--shell-search-w; theprtheme sets 190px.
Kit
Card: header propstitle,sub,badge,actionsandheadingLevel(default 2). With atitlethe card draws the mock's.card-hitself (17px title, 13px ink-3subline 2px under it, the badge then the actions at the end, the content 16px below), the same markup asCard.Header, whosesubit matches;Card.Headeralso takes alevel.childrenis now optional. Newvariant('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 typesCardPropsandCardHeadingLevel.Drawer: new opt-inheaderStyle="pr"(the PR v3 creator drawer head: 64px lead avatar, 20px title, 13px hint),closeButton="float"(withhideTitle: the close button hangs over the body's top end) andfooterDivider(a line over the footer). They set the classeskit-drawer--pr-head,kit-drawer--float-xandkit-drawer--divider. Defaults keep 0.5.0's drawer.DrawerandModal: new optionalclassNameon the dialog element.DataTable: newdensity="tight"(the mock's.tbl.tightbody cells from 860px up: 9px top and bottom instead of 12, so a two-line creator row is 60px, not 66) andheadDensity="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: newextra, one more control after the actions that wraps inside the toolbar's 10px row gap (pushed to the end when there are no actions), andextraPlacement="newRow"(extraalways 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: newsize('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: newsize="short": the lookKpiGrid 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. Itsiconnow also takes an element (aPrIcon, your own svg) as well as a kit icon name.KpiGrid:columnsalso takes2: two cards across at every width down to 600px, thenphoneColumnsapplies.Tile: newsize="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-hon an ancestor to raise its 110px minimum (the brand mock's 120px Raise-limit plans).ShareBar: newshowValue(defaulttrue);showValue={false}draws the bar alone, and the screen-reader read-out stays.RankMedal: newsize('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:toneaddslilac(the PR portal's Messages "Message creators" card: lilac background and ink, an#E2D6FFborder),skyandbutter. TheCalloutCardPropsandCalloutTonetypes are exported.ProgressRow: newvariant('pips'default |'bar').'bar'draws the PR portal's Home "Live challenges" row: a bold 14px title, the muted 12pxdisplayline and an 8px raspberry bar (radius 99), one image to screen readers;tonecolours 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-colsfor the stat row's columns. Unset, the row keeps 0.5.0's columns;--fc-cols: 1.35fr 1fr 1fron the card or a parent draws the brand mock's three figures.
PR blocks
Leaderboard: newrankSize('md'default |'lg',RankMedal size="lg"),rankStyle('medals'default |'highlight': no medals, every rank up tohighlightToplime, 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) andnoteSize('md'13px default |'sm'12px). NewtieDetail(defaultfalse): the tie note says what the tie is on, fromrankBy("Sara Ali and Hana Rami are tied on sales. Sara Ali ranks higher because they reached it first."; Arabic "متعادلين في المبيعات"), from the new copy keytieOn({ sales, orders }; optional, so a full copy object written for 0.5.0 still type-checks; the language's default is used).tieFirstandtieSharedtake it as an optional last argument, so overrides written for the shorter signatures keep working.TierLadder: newscoreMax(default 100, where the top tier's range ends underbasis="score") andscoreInfoHref("How the score works" as a link, through safeHref, instead of theonScoreInfobutton). NewopenTagTip('title'default |'focus'):'focus'draws the perks and thresholds open tags asDecisionTag tip="focus"; the tag inside "Add a tier" keeps its title tooltip. NewscoreText('default'|'compact'): underbasis="score",'compact'sets the v3 Tiers page's range at 14px, the hint at 12px and "How the score works" at 12px semibold.DecisionTag: newtip('title'default |'focus'). Withvariant="open"and aquestion,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, forDecisionsCard 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 nativetitleattribute is not used. On touch tiers the codes are 44px tall.NumberSetting: newalwaysShowReset(defaultfalse): keeps "Reset to {default}" in view while the value equals the default, as the mock's gift rules do.SettingRow: newdensity('default'|'tight').'tight'is the mock's gift rules.rule: a 12px description straight under the title and a 12px unit in aNumberSetting.SenderCell: newavatarSize('sm'default |'md', the 38px square).AuditLogList/AuditLogEntry: newdot(defaulttrue).dot={false}drops the coloured dot; withcompactthe rows also take the mock's plain 6px padding with the time right under the text.BrandWalletCard: newtopUpMethods('card-or-bank'default |'card', "Brands top up by card (Paymob)."), from the newprBrandDetailcopy keytopupsCard(optional, so a full copy object written for 0.5.0 still type-checks; the language's default is used).ApprovalActions: newfullWidth(defaultfalse): Reject and Approve share the width evenly, 10px apart (the creator drawer footer).RecordGiftsDialog: newmaxUnits(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 entryunitsRange(min, max)(optional inPrRecordGiftsCopy; the language's default is used when it is missing), and an app that overridesunitsErrstill sees its own text. NewdefaultBrandId: the brand chosen when it opens (default the first; an unknown id falls back to the first).PrChallengeCard:onOpenis optional (without it the name is plain text),goalandrewardtake any node, newrewardNote(a node inside the reward chip, e.g. a stock pill) andPrChallengeLeader.seed(the avatar's colour seed).TaskRow:leadandonOpenare optional, and a newactionputs 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; withonOpenthe title becomes the open button). Its props are exported asTaskRowProps.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: newflatDensity('default'|'mock'). Withlayout="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: newinlineHint(default false). With ahint, 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'siconnow 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'sSidebarorMobileNavSheeta Switch is now small (41 × 25) and dark with no prop, as in the PR v3 mock; 0.4.0'sDecisionsCardgets it as is. Passsize="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,
prtheme: the search pill is 190px at 1240px and under (it stays 260px above). For 0.5.0's width, set--shell-search-w-narrow: 260pxin your own[data-bricks-theme='pr']rule, loaded afterthemes/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,
prtheme: theprtheme sets--tier-influential-bg/--tier-influential-inkto 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 theprtheme 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 theprtheme, set the two tokens to#E0F4F1/#0F6A5Cin your own[data-bricks-theme='pr']rule, or passbg/inkfor the tier in the provider'stiers. - Default look change,
prtheme: theListToolbarsearch box is 248px, the PR v3 mock's box (was 260px). For 0.5.0's width, set--lt-search-w: 260pxin your own[data-bricks-theme='pr']rule. - Default look change,
Modal: ahintno longer keeps the browser's 12px bottom margin, so the body of every Modal with ahintstarts 12px higher. No option. - Default look change,
DataTable: thefooteris drawn in a.kit-dt-footblock 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); aPagerstill 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: withchevron={false}the phone card's end padding is 14px (was 34px, the room for a › that is not drawn). - Default look change,
CreatorCellwithonOpen: 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
Cardwith atitle, or with a<Card.Header>inside it, is now a region named by its heading (the heading gets an id and the section'saria-labelledbypoints at it).labelledBystill wins. - No visible change:
OpenRate,ShareBarandProgressRowdraw 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,SpecialCommissionFormandGroupForm: 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 itsdatesandnoteslabels ("Dates (optional)", "المواعيد (اختياري)") is drawn as a muted 12px span, like the muted text elsewhere. The words are unchanged. The new copy keyoptional("(optional)" / "(اختياري)"; optional inChallengeRequestCopy, 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. (SpecialCommissionFormkeeps 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. WithshowPercent={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. PassavatarSize="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,
TierLadderwithbasis="score": a range whose end falls below its start (starts not rising, or a top tier abovescoreMax) now shows just the start, "40+", from the new copy keyscoreFromOnly(optional inPrTierLadderCopy, so a full copy object written for 0.5.0 still type-checks; the language's default is used), instead of "40–39".
- Default look change,
-
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.
PrStatusgainspauses_in,waiting_countandtrndr_wide: an app's exhaustiveswitchorRecord<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:
PrLeaderboardCopytieOn(andtieFirst/tieSharedtake an optional last argument),PrTierLadderCopyscoreFromOnly,PrRecordGiftsCopyunitsRange,ChallengeRequestCopyoptional, and theprBrandDetailcopy'stopupsCard. ChoiceOption.iconis nowPrIconName | ReactElement(wasPrIconName).- Wider, so existing code compiles:
KpiCardiconisIconName | ReactElement(0.5.0:IconName);KpiGridcolumnsadds2;Tilesizeadds'kpi';CalloutCardtoneaddslilac,skyandbutter;PrChallengeCardgoalandrewardtake any node andonOpenis optional;TaskRowleadandonOpenare optional;Cardchildrenis optional;DetailsBargains an optionalnote;GiftStockItem,RowItemandPrChallengeLeadereach gain an optional field. DetailsBaris now declared in theDetailsBarsmodule 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.
DetailsDrawerstays 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 (fileNamenames it). Default'view', as before. Copy keyproofButton.download. TypeProofButtonPropsis exported. -
MyCreatorPanel:facts(a list replaces "In your program", a function edits the built-in one; a money fact keeps its "?" withfigure) andactions(buttons after "Copy coupon": "Remove creator", aButtonLink"Open full profile"). A creator with nocouponhas no Coupon row and no "Copy coupon". -
ChallengeCard/ChallengeDetail: statesscheduled("Scheduled", "متجدول"),paused("Paused") andclosed(reads "Ended"), drawn as the console's card draws them today: the progress body and figures, no banner, no action.labels.action.scheduled/pausedopt in to a button. Status wordscheduled(sky) inTRNDR_STATUSES. -
PayoutBatchDetail:receiptHref("Download receipt" beside "View proof");method,referenceandpaidToare optional, and what is left out is not drawn (the proof is named by the date when there is no reference). -
WalletLedger: a group'sprooftakeshrefandkind(onOpenis optional);footerunder the entries (the flat view'sPager).labels.grouped/subalready 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),actionis the head button only. Defaultfalse, unchanged. -
KeyValueItem.control: an editable value (aSwitch, a field) drawn in place of the bold value;lockedstill 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, withStepTimelineorRankList), 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)
ChallengeStatusgains'scheduled' | 'paused' | 'closed': an exhaustiveswitchneeds the three cases.ChallengeCopy.actionkeepslive,waiting,rejectedrequired and adds optionalscheduled,paused, so an existinglabels.actionoverride still compiles.- Now optional:
MyCreator.coupon(string | null),PayoutBatchDetailProps.method,reference,paidTo,LedgerGroup.proof.onOpen,KeyValueItem.value. Code that reads them from these types getsundefinedin the type. MyCreator.statusisstring(a key of the provider's statuses) instead ofConsoleStatus.ConsoleStatus(the keys ofTRNDR_STATUSES) gains'scheduled'.
-
-
8461cc1: Brand Console v3 (pre.4): the pre.3 review's fixes.
Fixes
CommissionInput kinds: when the givenkindis not allowed and is switched to the first allowed one, the number is cleared (andonValueChange('')tells the parent), so a stored "EGP 30 per item" never shows or sends as 30 %.WalletLedgerentry proof with onlyonOpen(a receipt in a modal) reads "View receipt" ("شوف الإيصال"), not "Download receipt"; with a safehrefit still downloads.ProofButton kind="receipt"andProofLink.kindgain the value; copy keyproofButton.receipt(a required key ofKitCopy.proofButton).fieldErrors(ChallengeRequestForm,SpecialCommissionForm,GroupForm): after a send, errors are applied and focused only when the save ends (savingtrue → false). A parent that keeps its last 422 inline no longer brings it back, or moves focus, while saving. Withoutsaving, a new map after the send still counts as the answer.Switchmust be named, and the type says so:label,aria-labelledby, orrowLabelled(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.labelstays as before for every existing call.
Changed types
SwitchPropsis a union:label: string|'aria-labelledby': string|rowLabelled: true(plus the shared props). Code that spreads a props object intoSwitchmay 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) andProfileTile(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; afigurekeeps 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, andnote(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 withoutbrands, and Sales this month, Challenges won and On TRNDR since withoutgrowth,wins,since(agrowthof null still reads "—"). With no facts the Highlights heading is not drawn.
Accessibility (changed behaviour)
FindCreatorCard inviteDisabledandCreatorProfilePanel inviteDisabled(and the newinviting) usearia-disabledand the.kit-btn--offlook instead of the nativedisabled: 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 asserttoBeDisabled()on it should checkaria-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).
- Types
-
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
GroupCommissiongains{ state: 'set'; kind; value; label? }(the brand's own special commission: an ok pill "20% of sale" / "EGP 30 per item", "20% من البيع" / "30 ج.م على القطعة", fromCommissionRate form="long";labelreplaces the words) and{ state: 'mixed' }(members on different rates: a mute "Mixed" / "مختلفة").GroupCommissionPilldraws both and takeslanguage. Copy keygroupCard.mixed.GroupCard:salesis optional (no figure and no "?" until the API sends it);memberCountcounts the group whenmembersholds 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" (openSpecialCommissionForm mode="set";onSetCommission, oronAskCommissionwhen it is left out), "Back to standard" while one is set. Default'ask', unchanged. Alsosalesoptional,GroupMember.salesoptional or null (the row has no figure), andmoreMembers("and 8 more", counted in the head). Copy keysgroupPanel.set,setPill,setOn,more.AvatarStack total(AvatarStackProps): "+N" counts people beyond the faces sent. Defaultpeople.length, soPrChallengeCardand every other stack are unchanged.
Changed types (check exhaustive code)
GroupCommissiongains'set'and'mixed': an exhaustiveswitch (commission.state)needs the two cases.GroupPanelCopygained required keysset,setPill,setOn,more(a whole copy object typed as it must add them;labelsoverrides are partial).GroupCopy.mixedis new and optional, so acopyyou build forGroupCommissionPillstill 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). Defaulttrue, so every stack,PrChallengeCard's included, is unchanged. -
ChallengeRequestForm commissionHint(string | (kind) => string) andSpecialCommissionForm 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, withonRowClick): 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 moderenderCard(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 asGroupFormdoes;'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 witherror, never dropped. -
Type
ProofLink({ context, href?, onOpen?, kind?, fileName? }): the one proof shape ofWalletLedger, for a group'sproofand an entry'sproof(pre.2's entry shape{ context, href, fileName? }still fits it; an entry proof can now open a modal withonOpen, and a group proof takesfileName). An entry proof's kind defaults to'download'. -
CommissionInput kindson its own: akindoutsidekindsis drawn as the first allowed kind and reported once throughonKindChange. -
BonusProgress.display(formatted money in place of "value / goal": "EGP 1,234 / EGP 5,000") anddone(from the server: drives "· Done" in place of value ≥ goal);BonusCardandBonusDetailpass both toProgressRow, which gainsdone. -
Money figure
product_avg_priceinMONEY_FIGURES: the product drawer's "Avg. price" (the server'savg_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 keystepTimeline.skipped. -
WalletHealthCard settingsHref: "Wallet settings" as a link (aButtonLink, throughsafeHref) instead of theonOpenSettingsbutton. -
Switch aria-labelledby: a visible label's id names the switch (see console-v3-final for the naming rule).
Accessibility
KeyValueItem.controlis named by its row: a control that does not name itself (nolabel,aria-labeloraria-labelledby) getsaria-labelledbypointing 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.stepTimelinegained the required keyskipped(a whole copy object typed as it must add it).MoneyFigureKeygains'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'sopenGroup(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-tagsmargin-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 renderCreatorProfilePanel.
Accessibility (changed behaviour, from the pre.2 review)
- The Invite button's "Invited" state (
FindCreatorCard invited,CreatorProfilePanel invited) isaria-disabled, not nativelydisabled, 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 asserttoBeDisabled()on it should checkaria-disabled="true". fieldErrorsonChallengeRequestForm,SpecialCommissionFormandGroupFormare 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,
ChallengeRequestFormonly; 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
limitsfor 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.closedLinetakesnumber | null.
Changed defaults (visible,
WalletHealthCard)lowPercentandpauseDaysno 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 (passhealth). Pass both to draw what 0.4.0 drew.WalletHealthCopy.low/negativetakepauseDays: 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 withButton's look (same classes for everyvariantandsize), for "Contact TRNDR", "Export CSV", "See all", "Find creators".hrefgoes throughsafeHref; an unsafe URL draws a disabled-looking<span>with no link.externalopens a new tab withrel="noopener noreferrer"and reads "(opens in a new tab)" ("(بيفتح في تاب جديدة)");download(trueor a file name). Copy keybuttonLink.newTab.- Type
ButtonVariant(the unionButtonandButtonLinkshare) andNotificationsMenuProps. divideAmount,addAmounts,subtractAmounts,compareAmounts,percentOf: exact maths on 2-dp money strings in BigInt cents (an average price isdivideAmount(sales, units)), null for anything that is not an amount.
New props and options
CommissionRate form="long"(andcommissionRateText(…, form), typeCommissionRateForm): "15% of sale" / "15% من البيع"; per item reads "EGP 30 per item" in both forms. Default'short'("15%"). Copy keycommissionInput.ratePercentLong.SpecialCommissionForm mode="set":noteshows the optional "Why" field and sends it asreason(#1145's note);namesRatekeeps 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 →" aschildren).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. Defaulttrue(drawn, as before).Button variant="danger"(red words on a pale raspberry line: "Remove creator") andvariant="ok"(solid green: "Approve"). The CSS was already there (RowActionsused it);className="kit-btn--danger"still works.BricksProvider platforms(andBricksPreset.platforms,BricksConfig.platforms): the platforms the app works with.FollowersCell,PlatformFollowers,FollowerLine,FindCreatorCard,CreatorProfilePanel,MyCreatorPanelandChallengeRequestForm's platform options use only these, soplatforms={['instagram', 'tiktok']}takes YouTube out of every component below. Default: all three, inCORE_PRESETandtrndrPresetalike.followerTotaltakes the list as an optional second argument.NotificationsMenu:unreadCount(the server's count for the badge, the bell's name and "N new", whenitemsholds only the latest rows),status'loading' | 'error'withonRetry("Loading notifications…", "Couldn't load notifications." as an alert, "Try again"),onOpen(each time the panel opens). Copy keysnotifications.loading,failed,retry.NotificationItem.iconandtoneare 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 intokens.css). Theprtheme 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"; passnamesRatefor those words. Onlymode="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, asTimelinehas 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/MainCellalready 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 exhaustiveswitchover it needs the two cases.NotificationItem.iconandtoneare now optional: code that reads them from the type getsundefinedin its type.- Copy interfaces gained required keys (a whole copy object typed as one of them must add them; overrides through
labelsare partial and unaffected):KitCopy.notifications(loading,failed,retry),KitCopy.proofButton(download), the newKitCopy.buttonLink,CommissionCopy.ratePercentLong,SpecialCommissionCopy(unchanged keys, new default words). BricksConfighas a new fieldplatforms: code that builds a wholeBricksConfigobject by hand (not throughresolvePreset/BricksProvider) must add it.
Styles
a.kit-btnhas no underline, and.kit-btn[aria-disabled='true']takes the disabled look (ButtonLink's unsafe case)..kit-nl-errlays 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(andCommissionInput 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.fieldErrorsonSpecialCommissionForm(commission…,value,kind;reason/note) andGroupForm(name;members,member_ids…,creator_ids…): the server's 422 on each field,aria-invalidand described by it;errorstill 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 (ProofButtonkind="download", throughsafeHref), 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>orgift_lines.<n>.quantity), each on its field witharia-invalidandaria-describedby, focus on the first; cleared on the next send.RequestGift.leftmay benull("no stock limit", any quantity) andRequestGift.closedmarks 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 ingroups("A group you deleted"). Copy keyschallengeRequestForm.noLimit,closedLine,changeOnly,groupGone,quantityRequired.
Changed types (check code that reads them)
RequestGift.leftisnumber | null.ChallengeRequestCopygained required keysnoLimit,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's1frrow andalign-self: endstill 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) andsize="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'sdhead, 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"isbox-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.SpecialCommissionFormandChallengeRequestFormsend 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 dimmedTopUpAmountPicker's busy submit in pre.1): it is the opt-in class.kit-btn--off, used byButtonLink's unsafe-href span (nowrole="link" aria-disabled, keeping the caller's attributes). PayoutBatchDetailwithoutpaidTostill shows Export CSV.ProofButtonwith neither a safehrefnoronOpenrenders nothing (a card top-up has no receipt), and the payout and ledger blocks guard onsafeHref(...).ChallengeRequestFormdrops a sent platform the app no longer offers, so it never sends what it does not show.NotificationsMenu: the loading line is announced (noaria-busyon 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.commissionRateTextgives 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. Withoutlimitsnothing 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. Alsomembers,limitsandhint.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;falselocks 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");labelreplaces it. Copy keyprUsageBar.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.useGiftAnalyticsCopygives its words (copy keyprGiftAnalytics).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) inTRNDR_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-fsnow reaches the buttons (font: inheritused to reset it after it was set), so the PR theme's switch is 13px as the mock. Themes that do not set--seg-fsare unchanged.usagePercentrounds 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".GiftShipmentTimelineandBrandGiftStockCard: 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; typesGiftShipmentState,GiftShipmentFilter.giftShipmentColumns(GiftShipmentRow) anduseGiftColumnsCopy: 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). TypesPrGiftStatusFilterCopy,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), andTile 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) inTRNDR_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). Defaulttrue, 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-50background goes up.Modalhint: 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). Theprtheme sets it to 20px, the PR mock's.modal h2and 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) andScoreExplainer("How the TRNDR score works" modal), with the parts and their points asTRNDR_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") andTierMoveList(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) andBrandRequestCard(a brand's challenge request under review). TierLadder:basis="score"places creators by TRNDR score (one range per tier fromscoreFrom, the lowest holding unscored creators,onScoreInfofor "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),pausedandonAskTopUp.SummarySection'stitleis optional (no title: the lines alone, a flat.kvlist).- Changed default:
ChallengeSummarynow 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 nobadwarning (before, onlybadwarnings did). It is also disabled when a gift has no confirmed stock left or fewer units than winners (the gift line is red).canSubmitstill overrides. Leaderboard:showPercent={false}hides the "55%" beside each bar (the bar stays).- Kit:
Tile size="stat"(the PR mock's small.statfigure) andKpiGrid 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").
- New:
-
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) andScheduleCampaignDialog: 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 slotscustomerAffiliates.figures,prChallengeCard.figures.
New props and words
ChallengeRow.typetakes'boost'("Commission boost", cash icon in a sky square) inchallengeColumns.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 withonOpenorhref, a progress bar withprogress, end-alignedcells,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'sapprovals,brands,tiers,speech(itsmessages),logoutandstarglyphs.Tile size="stat": the PR stat card (no minimum height, a 24px value under a 13px label).KpiGrid columns={3}; default4.Card tone="lilac".QueueHeader:countis optional;seeAllLabelnames 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-outfor a sign-out icon button inSidebarUser'saction.
Changed defaults (visible)
LoginLayoutsets 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
DecisionTagis 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") andvariant="on-dark"(the outline on the raspberry hero; replacesclassName="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.displaytakes a node, e.g.<Money compact />.Gauge value+caption: "321 / 400" with the max small and muted, LTR in Arabic;centeris 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.primaryandDataColumn.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.averageOrderis optional.MoneyNote variant:'term'(default),'plain','icon';BricksProvider moneyNoteStylesets 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
KpiCardis a box with a button laid over it, so its label can hold aMoneyNote(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-linkis 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/Modalgiven noinertRefmakes 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,0rounded 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) andsign('negative', or'always'for "+ 250,000.00"). - Where it is set, the most specific winning: a component's
moneyprop (keyed by its slots when it has several, e.g.<WalletLedger money={{ entry: { showCurrency: true } }} />), thenBricksProvider moneyForfor one slot app-wide (moneyFor={{ 'walletLedger.entry': {…} }}), thenBricksProvider moneyfor everything, then the slot's built-in default. Nested providers merge field by field. - Slots are listed, with their defaults, in
MONEY_SLOTS;MoneySlottype-checksmoneyForkeys andMoneySlotsOftypes a multi-slotmoneyprop.useMoneyDisplay(slot, own)(orresolveMoneyDisplay) resolves one. - Components with
money:Money(also aslotprop;compactstays 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 packageBrandWalletCard,ChallengeSummary/SummaryLine,FraudCaseDetail,FraudCaseRow,Leaderboard,TierLadder; the column presets (brandColumns,payoutColumns,topUpColumns,fraudColumns,challengeColumns) take it as their last argument. formatMoneyis the one formatter and takes every option (FormatMoneyOptions);moneyPartsreturns the sign and digits for a component that places the currency word itself.formatAmountis deprecated: it isformatMoney(value, { language, showCurrency: false, decimals: 'auto' }). A customcurrency.format(MoneyFormatter) now receives the resolved options with the language.
Visible change:
WalletLedgerentries 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. - One option shape,
-
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
createHttpClientsends the CSRF token,X-Requested-Withand the sharedheaders(Authorization included) only to trusted origins: the page's own, the origin of an absolutebaseUrl, and the newtrustedOriginsoption. An absolute URL on any other origin (a presigned upload, a third-party API) gets onlyAccept,Content-Typeand that request's ownheaders. A protocol-relative URL (//host/…) is resolved against the page first. An app that relied on its shared headers reaching another origin lists it intrustedOrigins. - changed A 2xx answer whose body is not JSON (the sign-in page a proxy serves after the session ended) throws an
HttpErrorwithcode: 'not_json'instead of resolvingnull. An empty body or a 204 still resolvesnull. - changed
useAction: a secondrunwith 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 kindbusy(ActionFailuregains'busy'; an exhaustiveswitchon it needs the case). An exception thrown by a function action itself (a bug in the app's code, not the HTTP client) resolves askind: 'error'and is logged withconsole.error; it used to look like a network failure. - changed
useResourcereads again when its client changes (a sign-in, another base URL). Pass a stable client (theDataProvider'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) endsloadingwithdata: 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 exportEMPTY_PARAM(the patch value that writes it) and theUrlPatchtype;toNamespacedPatchcan returnEMPTY_PARAM.
Money, numbers and dates:
- New
src/lib/money.ts, the one home for exact money maths in BigInt cents (blocks/topup/cents.tsre-exports it). changedChallengeSummary,TierLadderandLeaderboardno 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:ChallengeSummarywith an unreadableholdshows neither the bar nor "Left after hold", and an emptyavailableis "no wallet".TierLaddercompares a tier with the last valid tier above the starting one. - changed
BundlePurchaseSummary: anavailablethat is not a 2-dp amount disables the wallet choice with a reason (new copy keyunknownonBundlePurchaseCopy); it used to leave Buy enabled. - changed
formatMoney/formatAmountgiven a number (not a 2-dp string) show "—" and warn in development instead of throwing. Rounding individeAmountis half away from zero for negative amounts too (−0.015 → −0.02). - changed
WalletHealthCardcompares the unroundedleftPercentwithlowPercent(20.4% is not low at 20%). - changed
commissionErrorapplies 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.555and0.001are refused. - changed Arabic-Indic digits (٠–٩, ۰–۹) are read as digits in
TopUpAmountPicker,CommissionInput,OtpStep,DefaultableSetting,GiftRulesCard,NumberSettingandTierLadder.CommissionInputis now a text field withinputMode="decimal"(roletextbox, wasspinbutton), 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:, …) givesundefined. changedPersonCell/CreatorCellhandle links,ProofButton,ProofList,TodoItem,MessagesPanel's contact link,BottomNavandLogoutButton's form action go through it: an unsafe URL renders the element without anhref(ProofButtonfalls back to its button). - changed
ReceiptUploadtakes 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
DataTableandRowListselect-all adds or removes only the rows on the page; rows picked on other pages stay selected (it used to replace the whole selection). useFocusTrapregisters its layer once per open (an inlineonEscapeno longer moves an outerDrawerabove its nestedModal), and a trap whose container holds another open trap's stays below it.Drawer/ModalwithinertRefgive focus back to the opener after the app root stops being inert.useViewportTiertakes an optional first value and no longer readswindowwhile rendering, sorenderToString(<AppShell tier="mobile" …>)works. WhileAppShell'stieris set it pins the layout to that tier.ToastRegionno longer restarts its timer whenonDismissis a new function each render;ListToolbar's Reset filters drops a search keystroke still waiting for its debounce;PrBulkBarcalls its hooks before returning;ChallengeRequestFormids come fromuseId(two forms on a page no longer clash).- Provider
labelsnow reach validation messages:TopUpAmountPicker,SpecialCommissionForm,ChallengeRequestForm,GiftRulesCardandDefaultableSettingpass their merged copy to the rule helpers. The PR column presets take the words as a last argument;usePrColumnsCopy(language)reads the new provider keyprColumns(typePrColumnsCopy). - Exported now:
SenderPicker(announced in 0.2.0 but missing) withPrSenderPickerCopy, and the copy-registry typesPackageCopy,PackageCopyKey,BlocksCopy,PrCopy.
Packaging:
- The published type files work under
moduleResolution: NodeNext/Node16and withnoUncheckedSideEffectImports: relative imports indist/**/*.d.tscarry.js, and stylesheet imports are no longer in them.diststays ESM-only (no CommonJS build); see README for Jest / CJS consumers.
- changed
0.2.0
Minor Changes
-
632a5e4: Brand blocks the v3 mock does not draw, under
src/blocks(class prefixkit-blk-, styles inblocks.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) withtopUpAmountError;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 thejoinRequestActionsandinvitationActionspresets.DefaultableSetting(follow the platform default or set your own: switch, number with unit, choice) andDefaultableRow, withdefaultableNumberError.
Every new component's words are BricksProvider
labelskeys (registered onBlocksCopy). No new runtime dependencies. - Messages, read-only for brands:
-
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-screenLoginLayout. 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'sRankMedal,CreatorCellandShareBar, the "Winners above this line" cut (fixed, or movable withonWinnersChange), ties (first_reachedas the mock, orshared), loading / empty / error.ChallengeSummarywithSummarySection/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(aDataTablepreset like the other six) andChallengeStatusFilter(status chips).- Fraud review (inferred, no mock):
FraudSignalPill,FraudStatusPill,FraudCaseRow,FraudCaseDetail,FraudDecisionBar(clear / hold / revoke throughReasonDialog) andfraudColumns; signal words inFRAUD_SIGNALS, extendable withstatusTables.prFraud. - Every new block's words are a
labels.pr…key aBricksProvidercan 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;
MobileNavSheetslides out before it unmounts (skipped under reduced motion) and hands focus back to the opener when the slide ends.
No new runtime dependencies.
- Login:
-
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
BricksProviderthat 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):
Switchdraws the 51 × 31 iOS switch by default. The old 38 × 22 track isvariant="compact";variant="ios"still works.Pageralways draws the v3 numbered pager (‹ 1 … 4 5 6 … 31 ›, 36px rounded buttons). WithperPageit 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"), noconsole-list-pagerclasses, and while loading the other page buttons are disabled.FormFieldcontrols 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.RowListhas 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.TierBadgeis the v3 tier chip (same asTierChip); theTilecorner 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,Toolbarfilters). AddclassName="kit-select"to a select of your own that relied on it.ListToolbarselects now show the v3 chevron (the global rule used to cover it).
New:
BricksProvider(withuseBricks,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).trndrPresetholds 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 asstatusTables.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'slanguageprop, in every package, is optional and still wins over the provider; a component's ownlabels/copyprop wins over the provider'slabels.labelsreaches the packages too:LabelOverridestakes the kit's keys (KitCopy) and the packages' (PackageCopy:shell, one key per brand block such aswalletHealthCard, one per PR block such asprApprovals). NewstatusTablesprop for named status tables a package reads apart fromstatuses.ListToolbar:reset("Reset filters" while a filter is set), afiltersslot, Sort by options with their own starting order ([key, label, dir]), a Sort bylabel.DataTableisDimand columnfigure(the money "?" beside the sort button);KeyValueItemfigure(the label becomes the "?" term);SaveBarsaveDisabled(Save off, Discard still works);Switchidandaria-describedby.WalletHealth('ok' | 'low' | 'negative' | 'paused') is one shared type for the brand and PR wallet blocks.formatMoneyandamountInTexttake an optional currency word.- Theme hooks: tokens a theme can set, declared in
tokens.csswith 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 shipskit.css,shell.css,blocks.cssandpr.css(the PR blocks' styles; the theme isthemes/pr.css). An app that uses only the kit can loadtokens.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):
RowListsort/onSortand columnsortKey/sortFirst(useDataTable),SortSelect(useListToolbarsort),PersonCellavatarSrc/photo(useCreatorCell),fetchJson(useDrawerResourcenow reads through the data hooks' HTTP client).Changed hooks:
useListStatereads and writes the URL through the data hooks' URL core (LIST_STATE_EVENTis now an alias ofURL_STATE_EVENT, samebc:urlvalue) and itserrorcarries the server's message andcode(DataError);useDrawerResourcewith nofetcherGETs through theDataProvider'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,EmptyViewandScreenErrorBoundary, styled byshell.css(kit-shell-*; instyles.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 areSHELL_COPY: override them with the provider'slabels.shell, the AppShell'scopy, or a component'scopy(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-*(theprtheme sets them: 248px sidebar, the PR nav). No new runtime dependencies (lucide-react was already one). -
2f4e7ec: Add generic data hooks (W3,
src/data).createHttpClientreturns a typedHttpErrorwith status, message, the 422errorsbag and the businesscode, and supports CSRF, abort andonUnauthorized.DataProviderpasses the client down (itslanguageis optional: the BricksProvider's otherwise). The hooks areuseResource(aborts stale requests and ignores out-of-order replies),usePaged(readspagination/meta/paginator envelopes, passessummarythrough and steps back when the last page empties),useAction(EN/AR failure messages, field errors, double-submit guard,onDone),useHashState/useQueryStateanduseUrlSort(one URL write per change,bc:url, Back/Forward; the URL core inurlStateis exported), anduseDebouncedCallback. The release also addsresourceUrl,toDataErrorandlistFetcher, an HttpClient-backed fetcher foruseListState. No new runtime dependencies. -
4523f1e: W4: the Brand Dashboard v3 mock's building blocks the kit lacked, under
src/blocks(class prefixkit-blk-, styles instyles.cssor 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 (itslabelsprop still wins); every money figure carries its "?" note. No new runtime dependencies.src/blocks/INVENTORY.mdmaps 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: theprtheme, variables only (namestokens.cssdefines), scoped to[data-bricks-theme='pr']. Load it aftertokens.cssand 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.mdlists what is closed and what stays open.- New presentational blocks (prefix
kit-pr-, styles instyles.cssor 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, andDataTablecolumn presets for join requests, brands, payouts, top-ups, messages and the audit log (plain functions: they takelanguageas an argument). - The PR status words and audit areas are preset data (
TRNDR_PR_STATUSES,TRNDR_AUDIT_AREAS, read as the provider'sstatusTables.pr/.prAudit); tier names come from the provider'stiers(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 theDetailsHero,DetailsTile,DetailsBar,DetailsRanked,DetailsSection,DetailsDrawerPropsandDrawerTonetypes): the shared row-details sheet.SortSelect(SortOption,SortValue): "Sort by [field] [⇅]" for lists that cannot sort from a header.RowListsorting:sort/onSorton the list andsortKeyon a column. The first click sorts a number column high to low and any other column A to Z. New exported typesSortDirandSortState.RowListrows 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.Toolbarreset: a "Reset filters" button shown while a filter is set.Pageralways shows numbered pages (1 … 4 5 6 … 9) between Previous and Next.SelectBoxhideLabel.AvatarsrcandPersonCellavatarSrc: a photo that replaces the initials, with the initials back if it fails.- Icons
copy,check,pause,seat,reset,stopandfile. pageWindow(the shared page-number window) and theuseOpenedRowhook.- 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 globalhtml body selectrule).
Changed or removed from kit v3 (0.1.0 was never published, but its changelog announced these):
pageWindownow 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. TheperPagepager uses it too.RowListsort headers use the app's markup and classes (kit-sort,kit-cell--sorted, SVG arrows) instead ofkit-sorthwith ↕ ↑ ↓ text. A column'ssortFirststill works but now only overrides the app's default first order (it used to default to high to low for every column).Avatarwithsrcdraws the photo instead of the initials (it used to draw the photo over them); the image has the classkit-av-img.Switchis 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-chevronselect arrow) is gone. The--kit-chevrontoken is still there. - The
file,seatandstopicons are the app's glyphs, not the v3 mock's;eye,chartandgiftare unchanged. SortDiris exported once, fromRowList;ListToolbarandDataTableuse 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,PagerperPage,Toolbarsort,PersonCellphotoandtier,HBarsonSelect,Drawerloadingand 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 theuseListStatehook, which keeps search, filters, sort and page in the URL hash.RowListcan now sort by its column headers (sort,onSort, columnsortKey), andToolbarhas asortslot. - Pages 1-2-3: pass
perPagetoPagerfor "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.Avatartakes a picture (src) with the initials as fallback, andPersonCellgainsphotoandtier. - Proof:
ProofButton(a clear, labelled "View proof") andProofList, which lists every receipt instead of only the first. - Analytics:
RankMedal,ShareBar,RankList,ProductThumb, and clickableHBarsrows (onSelect). KpiCard/KpiGridstat cards that filter or navigate,StepTimeline,NewCard, and theNotificationsMenubell and dropdown.- Drawers load once:
Drawertakesloading(one skeleton, the same drawer stays open) anduseDrawerResource(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:
Switchis now the iOS-style switch (51 × 31, green when on), andFormFieldcontrols 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-minand--kit-chevron.
- Lists: