@streamoid/ui 0.6.16 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -18
- package/dist/docs/AGENTS.md +321 -0
- package/dist/docs/CreditWarningBanner.md +305 -0
- package/dist/docs/InvoiceHistoryMobile.md +222 -0
- package/dist/docs/ScAccess.md +259 -0
- package/dist/docs/ScAppCard.md +244 -0
- package/dist/docs/ScAppCardForCopilot.md +230 -0
- package/dist/docs/ScAppCardV3.md +273 -0
- package/dist/docs/ScAppField.md +308 -0
- package/dist/docs/ScAppListingCard.md +271 -0
- package/dist/docs/ScAppSwitchPanel.md +286 -0
- package/dist/docs/ScAppcardLogos.md +226 -0
- package/dist/docs/ScArtifaxInvite.md +262 -0
- package/dist/docs/ScArtifaxSidebar.md +330 -0
- package/dist/docs/ScAskAgentButton.md +307 -0
- package/dist/docs/ScBadges.md +261 -0
- package/dist/docs/ScBeacon.md +244 -0
- package/dist/docs/ScBillingHistoryHeader.md +210 -0
- package/dist/docs/ScBillingHistoryTableList.md +243 -0
- package/dist/docs/ScBillingLogsTableHeader.md +212 -0
- package/dist/docs/ScBillingLogsTableList.md +251 -0
- package/dist/docs/ScBriefCard.md +255 -0
- package/dist/docs/ScButton.md +251 -0
- package/dist/docs/ScCalendar.md +268 -0
- package/dist/docs/ScCalendarDateComps.md +264 -0
- package/dist/docs/ScCatalogixInvite.md +345 -0
- package/dist/docs/ScCatalogixSidebar.md +337 -0
- package/dist/docs/ScCatalogixStoreHeader.md +246 -0
- package/dist/docs/ScCatalogixStoreTableList.md +316 -0
- package/dist/docs/ScCheckField.md +233 -0
- package/dist/docs/ScCheckbox.md +272 -0
- package/dist/docs/ScCounter.md +235 -0
- package/dist/docs/ScCreditsUsageCard.md +247 -0
- package/dist/docs/ScCreditsUsageCardMobile.md +224 -0
- package/dist/docs/ScDefaultCard.md +269 -0
- package/dist/docs/ScDp.md +245 -0
- package/dist/docs/ScDrawer.md +318 -0
- package/dist/docs/ScFieldButton.md +255 -0
- package/dist/docs/ScFileField.md +268 -0
- package/dist/docs/ScGoogleSignIn.md +250 -0
- package/dist/docs/ScGuide.md +278 -0
- package/dist/docs/ScHDivider.md +213 -0
- package/dist/docs/ScHeader.md +222 -0
- package/dist/docs/ScImageField.md +253 -0
- package/dist/docs/ScInChatList.md +277 -0
- package/dist/docs/ScInChatMessage.md +205 -0
- package/dist/docs/ScInfoPopup.md +248 -0
- package/dist/docs/ScIntialProfileCover.md +233 -0
- package/dist/docs/ScInvoiceHistoryMobile.md +187 -0
- package/dist/docs/ScLogoUnit.md +232 -0
- package/dist/docs/ScMappingCard.md +241 -0
- package/dist/docs/ScMediaApproval.md +301 -0
- package/dist/docs/ScMediaSelect.md +310 -0
- package/dist/docs/ScMenuOptions.md +308 -0
- package/dist/docs/ScMobileBottomAction.md +252 -0
- package/dist/docs/ScMobileTopNav.md +279 -0
- package/dist/docs/ScModal.md +291 -0
- package/dist/docs/ScOnlyField.md +302 -0
- package/dist/docs/ScOnlyIcon.md +213 -0
- package/dist/docs/ScPagination.md +284 -0
- package/dist/docs/ScPairtext.md +287 -0
- package/dist/docs/ScPendingAction.md +238 -0
- package/dist/docs/ScPhtogenixInvite.md +275 -0
- package/dist/docs/ScPlanCard.md +302 -0
- package/dist/docs/ScPlanComparison.md +264 -0
- package/dist/docs/ScPlanDetailsCard.md +246 -0
- package/dist/docs/ScPlanDetailsCardMobile.md +240 -0
- package/dist/docs/ScPopUpMenu.md +224 -0
- package/dist/docs/ScProfile.md +234 -0
- package/dist/docs/ScProfileImageUpdate.md +261 -0
- package/dist/docs/ScProfileOptions.md +245 -0
- package/dist/docs/ScProfilePopup.md +396 -0
- package/dist/docs/ScProfileSettingsComp.md +250 -0
- package/dist/docs/ScProfileV2Mobile.md +216 -0
- package/dist/docs/ScProgressBar.md +267 -0
- package/dist/docs/ScQuickPrompt.md +277 -0
- package/dist/docs/ScRadio.md +228 -0
- package/dist/docs/ScReferralCardMobile.md +226 -0
- package/dist/docs/ScReferralTableHeader.md +260 -0
- package/dist/docs/ScReferralTableList.md +293 -0
- package/dist/docs/ScRole.md +226 -0
- package/dist/docs/ScRoleMobile.md +199 -0
- package/dist/docs/ScSelect.md +270 -0
- package/dist/docs/ScSelection.md +256 -0
- package/dist/docs/ScSelectionList.md +272 -0
- package/dist/docs/ScSelectionPill.md +240 -0
- package/dist/docs/ScSelectionPillGroup.md +302 -0
- package/dist/docs/ScSettingsNav.md +212 -0
- package/dist/docs/ScSettingsTabComp.md +260 -0
- package/dist/docs/ScSideBarLogoUnit.md +340 -0
- package/dist/docs/ScSidebar.md +243 -0
- package/dist/docs/ScSidebarIcons.md +232 -0
- package/dist/docs/ScSidebarMenu.md +283 -0
- package/dist/docs/ScSidebarProfile.md +231 -0
- package/dist/docs/ScSidebarSwitchMenu.md +258 -0
- package/dist/docs/ScSlider.md +194 -0
- package/dist/docs/ScStoreCard.md +252 -0
- package/dist/docs/ScStrLogo.md +253 -0
- package/dist/docs/ScStreamoidWordmark.md +302 -0
- package/dist/docs/ScSubAgent.md +226 -0
- package/dist/docs/ScTabComp.md +308 -0
- package/dist/docs/ScTabField.md +258 -0
- package/dist/docs/ScTabSwitcher.md +307 -0
- package/dist/docs/ScTableHeader.md +261 -0
- package/dist/docs/ScTableList.md +301 -0
- package/dist/docs/ScTableListMobile.md +282 -0
- package/dist/docs/ScTabs.md +268 -0
- package/dist/docs/ScTaxonomyPill.md +263 -0
- package/dist/docs/ScTextArea.md +259 -0
- package/dist/docs/ScTextField.md +324 -0
- package/dist/docs/ScThinkingStepIcon.md +249 -0
- package/dist/docs/ScTodoList.md +288 -0
- package/dist/docs/ScToggleSwitch.md +229 -0
- package/dist/docs/ScUsageHistoryMobile.md +194 -0
- package/dist/docs/ScVDivider.md +215 -0
- package/dist/docs/ScValueMappingL1.md +256 -0
- package/dist/docs/ScVersion.md +251 -0
- package/dist/docs/ScWorkspace.md +233 -0
- package/dist/docs/ScWorkspaceCard.md +234 -0
- package/dist/docs/ScWorkspaceSettingsMobile.md +265 -0
- package/dist/docs/ScWorkspaceSwitchCard.md +314 -0
- package/dist/docs/ScWorkspaceSwitchMobile.md +241 -0
- package/dist/docs/ScWorkspaceSwitchMobileV2.md +278 -0
- package/dist/docs/StreamoidSidebar.md +403 -0
- package/dist/docs/StreamoidWorkspaceSwitcher.md +307 -0
- package/dist/docs/UsageHistoryMobile.md +235 -0
- package/dist/docs/components.json +4849 -0
- package/dist/index.css +43 -37
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/package.json +3 -2
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: ScCatalogixStoreHeader
|
|
3
|
+
package: "@streamoid/ui"
|
|
4
|
+
category: tables
|
|
5
|
+
status: stable
|
|
6
|
+
renders: div
|
|
7
|
+
tags: [table, header, column-headers, stores, store-listing, catalogix, list-view]
|
|
8
|
+
related: [ScCatalogixStoreTableList, ScStoreCard, ScTableHeader, ScHeader, ScBeacon]
|
|
9
|
+
do_not_confuse_with: [ScTableHeader, ScHeader, ScBillingHistoryHeader, ScBillingLogsTableHeader, ScReferralTableHeader, ScMobileTopNav]
|
|
10
|
+
used_by: [catalogix]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ScCatalogixStoreHeader
|
|
14
|
+
|
|
15
|
+
**The column-header strip of the Catalogix stores table.** A shaded flex row of up to
|
|
16
|
+
six uppercase muted labels — Store name, Status, Products, Assets, Created on,
|
|
17
|
+
Created by — laid out on the exact widths its row sibling
|
|
18
|
+
`ScCatalogixStoreTableList` uses. It is the *ruler*; the rows are the data.
|
|
19
|
+
|
|
20
|
+
## TL;DR for agents
|
|
21
|
+
|
|
22
|
+
- **Reach for it when:** you are rendering the Catalogix stores list view and need the
|
|
23
|
+
header above `ScCatalogixStoreTableList` rows.
|
|
24
|
+
- **Don't reach for it when:** you need the members/users table header
|
|
25
|
+
(→ `ScTableHeader`), a single sortable column label (→ `ScHeader`), the grid/card
|
|
26
|
+
view of the same data (→ `ScStoreCard`), or any generic table (this component's
|
|
27
|
+
columns are the store schema, hard-wired).
|
|
28
|
+
- **Three things that will bite you:**
|
|
29
|
+
1. `showAssets` / `showCreatedBy` default to **`true`** and must be set
|
|
30
|
+
**identically on the header and every row** or the columns shear apart.
|
|
31
|
+
2. The labels are `text-transform: uppercase`, so whatever string you pass renders
|
|
32
|
+
shouty. Pass sentence case; the CSS does the rest.
|
|
33
|
+
3. It is **not a `<table>`** — no `role="table"`, no `columnheader`, no `scope`.
|
|
34
|
+
Screen readers get six unrelated spans.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 1. How to use it
|
|
39
|
+
|
|
40
|
+
### Import
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { ScCatalogixStoreHeader, ScCatalogixStoreTableList } from "@streamoid/ui";
|
|
44
|
+
import "@streamoid/ui/dist/index.css"; // once, at your app root
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Minimal usage
|
|
48
|
+
|
|
49
|
+
Every prop has a default that is already the intended English copy, so the bare call
|
|
50
|
+
is the idiomatic one:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<ScCatalogixStoreHeader />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Props
|
|
57
|
+
|
|
58
|
+
| Prop | Type | Default | Notes |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| `storeNameLabel` | `string` | `"Store name"` | First column. Flexes to fill (`flex: 1; min-width: 0`). |
|
|
61
|
+
| `statusLabel` | `string` | `"Status"` | Fixed `7.5rem`. |
|
|
62
|
+
| `productsLabel` | `string` | `"Products"` | Fixed `6rem`. |
|
|
63
|
+
| `assetsLabel` | `string` | `"Assets"` | Fixed `6rem`. Only rendered when `showAssets`. |
|
|
64
|
+
| `createdOnLabel` | `string` | `"Created on"` | Fixed `7.5rem`. |
|
|
65
|
+
| `createdByLabel` | `string` | `"Created by"` | Fixed `10rem`. Only rendered when `showCreatedBy`. |
|
|
66
|
+
| `showAssets` | `boolean` | `true` | ⚠️ Defaults on. Must match the rows' `showAssets`. |
|
|
67
|
+
| `showCreatedBy` | `boolean` | `true` | ⚠️ Defaults on. Must match the rows' `showCreatedBy`. |
|
|
68
|
+
| `className` | `string` | – | Appended after the internal class. |
|
|
69
|
+
| `...props` | `HTMLAttributes<HTMLDivElement>` | – | Spread onto the root div (`style`, `aria-*`, `data-*`, `onClick`). |
|
|
70
|
+
|
|
71
|
+
### The column contract (shared with `ScCatalogixStoreTableList`)
|
|
72
|
+
|
|
73
|
+
| Column | Header prop | Row prop | Width | Gated by |
|
|
74
|
+
|---|---|---|---|---|
|
|
75
|
+
| Store name | `storeNameLabel` | `storeName` | `flex: 1`, `min-width: 0` | always |
|
|
76
|
+
| Status | `statusLabel` | `status` + `statusTone` | `7.5rem` | always |
|
|
77
|
+
| Products | `productsLabel` | `products` | `6rem` | always |
|
|
78
|
+
| Assets | `assetsLabel` | `assets` | `6rem` | `showAssets` |
|
|
79
|
+
| Created on | `createdOnLabel` | `createdOn` | `7.5rem` | always |
|
|
80
|
+
| Created by | `createdByLabel` | `createdBy` | `10rem` | `showCreatedBy` |
|
|
81
|
+
|
|
82
|
+
Both components use `gap: 1.5rem` and `padding-inline: 1rem`, which is what makes the
|
|
83
|
+
two line up. Change neither via `className` unless you change both.
|
|
84
|
+
|
|
85
|
+
### Recipes
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
// The whole list view
|
|
89
|
+
<div>
|
|
90
|
+
<ScCatalogixStoreHeader />
|
|
91
|
+
{stores.map((s) => (
|
|
92
|
+
<ScCatalogixStoreTableList key={s._id} storeName={s.name} /* … */ />
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
// Four-column variant — the flag must be repeated on every row
|
|
97
|
+
<ScCatalogixStoreHeader showAssets={false} showCreatedBy={false} />
|
|
98
|
+
{stores.map((s) => (
|
|
99
|
+
<ScCatalogixStoreTableList key={s._id} showAssets={false} showCreatedBy={false} storeName={s.name} />
|
|
100
|
+
))}
|
|
101
|
+
|
|
102
|
+
// Relabelling a column (rendered uppercase regardless of the case you pass)
|
|
103
|
+
<ScCatalogixStoreHeader productsLabel="SKUs" createdOnLabel="Added" />
|
|
104
|
+
|
|
105
|
+
// Make it sticky — the DS does not do this
|
|
106
|
+
<ScCatalogixStoreHeader className={styles.stickyHeader} />
|
|
107
|
+
/* .stickyHeader { position: sticky; top: 0; z-index: 1; } */
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 2. Where to use it
|
|
113
|
+
|
|
114
|
+
- **Catalogix → Stores listing, list view.** The screen has a grid view
|
|
115
|
+
(`ScStoreCard` tiles) and a list view; this header opens the list view and every
|
|
116
|
+
store below it is a `ScCatalogixStoreTableList`.
|
|
117
|
+
- Nothing else should use it: the column set *is* the store schema. For any other
|
|
118
|
+
table, compose `ScHeader` cells yourself or use the domain-specific header
|
|
119
|
+
(`ScBillingHistoryHeader`, `ScBillingLogsTableHeader`, `ScReferralTableHeader`,
|
|
120
|
+
`ScTableHeader`).
|
|
121
|
+
|
|
122
|
+
It composes nothing — six spans and a background.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 3. When to use it
|
|
127
|
+
|
|
128
|
+
### Use it when
|
|
129
|
+
|
|
130
|
+
- You are rendering **stores** in a table, and want the header to stay pinned to the
|
|
131
|
+
same widths as the DS row component.
|
|
132
|
+
- You want the "shaded header strip / transparent rows" treatment that the rest of
|
|
133
|
+
Catalogix's list views use.
|
|
134
|
+
|
|
135
|
+
### Don't use it — reach for this instead
|
|
136
|
+
|
|
137
|
+
| Situation | Use instead |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Users / members / invites table header ("User, Role, Access, Invited by") | `ScTableHeader` |
|
|
140
|
+
| One sortable column label with an asc/desc chevron | `ScHeader` |
|
|
141
|
+
| Billing history table header | `ScBillingHistoryHeader` |
|
|
142
|
+
| Credit/usage logs table header | `ScBillingLogsTableHeader` |
|
|
143
|
+
| Referral program table header | `ScReferralTableHeader` |
|
|
144
|
+
| The same store data as cards in a grid | `ScStoreCard` |
|
|
145
|
+
| A page title bar with actions | `ScHeader` is *not* that either — use your page layout + `ScButton` |
|
|
146
|
+
| A genuinely generic N-column table | Nothing here fits; the widths are hard-coded. Build it, or extend this component in the DS. |
|
|
147
|
+
|
|
148
|
+
### Don't confuse with
|
|
149
|
+
|
|
150
|
+
| You may actually want | Not this |
|
|
151
|
+
|---|---|
|
|
152
|
+
| `ScTableHeader` — the **members** table header; hardcodes "User / Role / Access / Invited by" and internally renders four `ScHeader`s, with a `type="pending"` variant that adds an action column | `ScCatalogixStoreHeader` is the **stores** header and takes label props instead |
|
|
153
|
+
| `ScHeader` — a *single* column-label cell with sort state (`state="up" \| "down" \| "none"`) | This is the whole strip, and it has **no sort affordance at all** |
|
|
154
|
+
| `ScMobileTopNav` — the mobile app bar | Unrelated; "header" here means column headers |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 4. Why to use it
|
|
159
|
+
|
|
160
|
+
- **It is the alignment contract.** The six widths (`flex:1`, `7.5`, `6`, `6`, `7.5`,
|
|
161
|
+
`10` rem), the `1.5rem` gap and the `1rem` inline padding exist in exactly two
|
|
162
|
+
files — this one and `ScCatalogixStoreTableList`. Hand-rolling the header is how
|
|
163
|
+
store tables drift out of alignment when a column is added.
|
|
164
|
+
- **Two-tone that survives light mode.** The header paints
|
|
165
|
+
`--alias-fill-neutral-neutral` while rows stay transparent, so the strip reads as a
|
|
166
|
+
header in both themes instead of relying on a grey that collapses to white.
|
|
167
|
+
- **Label typography is already the DS's** `text-xs` muted + uppercase, matching every
|
|
168
|
+
other table header in the products.
|
|
169
|
+
- **Column gating in one prop.** `showAssets` / `showCreatedBy` let one component
|
|
170
|
+
serve both the full schema and the reduced one the API can actually populate today.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Gotchas
|
|
175
|
+
|
|
176
|
+
**1. `showAssets` / `showCreatedBy` default to `true` and must match the rows.** Set
|
|
177
|
+
them on the header only and every row's data slides one column left.
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
// WRONG — header has 4 columns, rows still have 6
|
|
181
|
+
<ScCatalogixStoreHeader showAssets={false} showCreatedBy={false} />
|
|
182
|
+
{stores.map((s) => <ScCatalogixStoreTableList key={s._id} storeName={s.name} />)}
|
|
183
|
+
|
|
184
|
+
// RIGHT — same flags on both
|
|
185
|
+
<ScCatalogixStoreHeader showAssets={false} showCreatedBy={false} />
|
|
186
|
+
{stores.map((s) => (
|
|
187
|
+
<ScCatalogixStoreTableList key={s._id} showAssets={false} showCreatedBy={false} storeName={s.name} />
|
|
188
|
+
))}
|
|
189
|
+
|
|
190
|
+
// ALSO RIGHT — keep the columns, blank the data (what Catalogix actually does)
|
|
191
|
+
<ScCatalogixStoreHeader />
|
|
192
|
+
{stores.map((s) => (
|
|
193
|
+
<ScCatalogixStoreTableList key={s._id} storeName={s.name} assets="" createdBy="" />
|
|
194
|
+
))}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**2. Labels are force-uppercased.** `text-transform: uppercase` on every label. Pass
|
|
198
|
+
`"Store name"`, not `"STORE NAME"` — and don't expect a lowercase label to be
|
|
199
|
+
possible without a `className` override.
|
|
200
|
+
|
|
201
|
+
**3. Every label defaults to real English copy.** There is no required prop and no
|
|
202
|
+
placeholder junk, which is convenient — but it also means a typo'd prop name
|
|
203
|
+
(`assetLabel`) silently renders the default. Check spelling against the table.
|
|
204
|
+
|
|
205
|
+
**4. It is not a table.** No `role="table"`/`row`/`columnheader`, no `<th>`, no
|
|
206
|
+
`scope`, no `aria-sort`. Cells in the rows are not associated with these labels for
|
|
207
|
+
assistive tech. If accessibility matters on this screen, add the roles yourself via
|
|
208
|
+
`...props` on both components, or wrap in a real `<table>`.
|
|
209
|
+
|
|
210
|
+
**5. No sorting.** Unlike `ScHeader`, there is no chevron, no `state`, and no click
|
|
211
|
+
target per column. Sortable store columns need a different component.
|
|
212
|
+
|
|
213
|
+
**6. Not sticky, and it doesn't own the scroll.** Long lists scroll the header away.
|
|
214
|
+
Add `position: sticky; top: 0` via `className` and give it a `z-index` (the rows are
|
|
215
|
+
`position: relative`, so without one they can paint over it).
|
|
216
|
+
|
|
217
|
+
**7. Long labels are clipped without a tooltip.** Each label is `nowrap` +
|
|
218
|
+
`overflow: hidden` + `text-overflow: ellipsis` at a fixed width, and there is **no
|
|
219
|
+
`title` attribute**. `createdByLabel="Created by (workspace admin)"` just disappears
|
|
220
|
+
past `10rem`.
|
|
221
|
+
|
|
222
|
+
**8. No bottom border.** The header separates from the first row only by its
|
|
223
|
+
background and padding; the 1px rules in the list come from the rows themselves.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## In the wild
|
|
228
|
+
|
|
229
|
+
```jsx
|
|
230
|
+
// catalogix/dashboard app/containers/StoresListing/index.jsx:375
|
|
231
|
+
<ScCatalogixStoreHeader />
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Rendered bare — all six columns — directly above the row loop at
|
|
235
|
+
`app/containers/StoresListing/index.jsx:379`, where each row passes `assets=""` and
|
|
236
|
+
`createdBy=""` to keep the column slots aligned while those two values are unavailable
|
|
237
|
+
(Gotcha 1, third form).
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Related
|
|
242
|
+
|
|
243
|
+
- `ScCatalogixStoreTableList` — the row sibling; the two share one width contract and must be configured together.
|
|
244
|
+
- `ScStoreCard` — the grid-view card for the same store data (and the one that actually renders an `ScBeacon` status dot).
|
|
245
|
+
- `ScTableHeader` / `ScHeader` — the members-table header and the single sortable column cell.
|
|
246
|
+
- `ScBillingHistoryHeader` / `ScBillingLogsTableHeader` / `ScReferralTableHeader` — the other domain-specific header/row pairs, same pattern.
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: ScCatalogixStoreTableList
|
|
3
|
+
package: "@streamoid/ui"
|
|
4
|
+
category: tables
|
|
5
|
+
status: stable
|
|
6
|
+
renders: div
|
|
7
|
+
tags: [table, row, table-row, stores, store-listing, catalogix, list-view, status, tone]
|
|
8
|
+
related: [ScCatalogixStoreHeader, ScStoreCard, ScBeacon, ScTableList, ScBillingHistoryTableList]
|
|
9
|
+
do_not_confuse_with: [ScTableList, ScTableListMobile, ScStoreCard, ScBillingHistoryTableList, ScBillingLogsTableList, ScReferralTableList]
|
|
10
|
+
used_by: [catalogix]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ScCatalogixStoreTableList
|
|
14
|
+
|
|
15
|
+
**One store row in the Catalogix stores table.** A transparent flex row with a 1px
|
|
16
|
+
bottom rule: the store name flexing to fill, a tone-coloured status word, then
|
|
17
|
+
Products / Assets / Created on / Created by on fixed widths that match
|
|
18
|
+
`ScCatalogixStoreHeader` exactly.
|
|
19
|
+
|
|
20
|
+
## TL;DR for agents
|
|
21
|
+
|
|
22
|
+
- **Reach for it when:** you're rendering the Catalogix stores list view, one row per
|
|
23
|
+
store, under a `ScCatalogixStoreHeader`.
|
|
24
|
+
- **Don't reach for it when:** you want the same data as cards (→ `ScStoreCard`), a
|
|
25
|
+
users/members row (→ `ScTableList`), or any table whose columns aren't the store
|
|
26
|
+
schema (the widths are hard-coded).
|
|
27
|
+
- **Four things that will bite you:**
|
|
28
|
+
1. **Every prop defaults to Figma demo data** — including a store called
|
|
29
|
+
`"Farfetch - Spring Season 2026 - Topwear"` and a person named
|
|
30
|
+
`"Chris Hemsworth"`. `<ScCatalogixStoreTableList />` renders a fake store that
|
|
31
|
+
looks completely real.
|
|
32
|
+
2. `showAssets` / `showCreatedBy` default to `true` and must match the header's.
|
|
33
|
+
3. `statusTone` only **tints the status text**. No dot is rendered — this row does
|
|
34
|
+
*not* contain an `ScBeacon` (`ScStoreCard` does).
|
|
35
|
+
4. No hover, no cursor, no click semantics. The whole row-is-clickable behaviour is
|
|
36
|
+
yours to add.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 1. How to use it
|
|
41
|
+
|
|
42
|
+
### Import
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { ScCatalogixStoreHeader, ScCatalogixStoreTableList } from "@streamoid/ui";
|
|
46
|
+
import "@streamoid/ui/dist/index.css"; // once, at your app root
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Minimal usage
|
|
50
|
+
|
|
51
|
+
There is no required prop, so "minimal" is also the most dangerous call. Always pass
|
|
52
|
+
the real data:
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<ScCatalogixStoreTableList
|
|
56
|
+
storeName={store.name}
|
|
57
|
+
status="All Active"
|
|
58
|
+
statusTone="success"
|
|
59
|
+
products="1240"
|
|
60
|
+
createdOn="9th Nov 2025"
|
|
61
|
+
assets=""
|
|
62
|
+
createdBy=""
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Props
|
|
67
|
+
|
|
68
|
+
| Prop | Type | Default | Notes |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| `storeName` | `string` | `"Farfetch - Spring Season 2026 - Topwear"` | ⚠️ Demo default. `flex: 1; min-width: 0`; truncates with ellipsis **and** gets a `title` tooltip. |
|
|
71
|
+
| `status` | `string` | `"Need Attention"` | ⚠️ Demo default. Free text — the component never derives it. Fixed `7.5rem`. Rendered at `text-md` (bigger than every other cell). |
|
|
72
|
+
| `statusTone` | `ScBeaconTone` = `"success"` \| `"warning"` \| `"error"` \| `"neutral"` | `"error"` | ⚠️ Demo default. Sets the status **text colour** only. An unknown value falls back to the `neutral` colour. |
|
|
73
|
+
| `products` | `string` | `"1240"` | ⚠️ Demo default. **String, not number** — format/`String()` it yourself. Fixed `6rem`. |
|
|
74
|
+
| `assets` | `string` | `"27830"` | ⚠️ Demo default. Only rendered when `showAssets`. Fixed `6rem`. |
|
|
75
|
+
| `createdOn` | `string` | `"Nov 9th, 2025"` | ⚠️ Demo default. Pre-formatted string; no date parsing or locale handling. Fixed `7.5rem`. |
|
|
76
|
+
| `createdBy` | `string` | `"Chris Hemsworth"` | ⚠️ Demo default — **a plausible human name**. Only rendered when `showCreatedBy`. Fixed `10rem`. |
|
|
77
|
+
| `showAssets` | `boolean` | `true` | ⚠️ Defaults on. Must match the header's `showAssets`. |
|
|
78
|
+
| `showCreatedBy` | `boolean` | `true` | ⚠️ Defaults on. Must match the header's `showCreatedBy`. |
|
|
79
|
+
| `className` | `string` | – | Appended after the internal class. |
|
|
80
|
+
| `...props` | `HTMLAttributes<HTMLDivElement>` | – | `onClick`, `role`, `tabIndex`, `onKeyDown`, `style`, `data-*` land on the root div. |
|
|
81
|
+
|
|
82
|
+
### Status tone → colour
|
|
83
|
+
|
|
84
|
+
| `statusTone` | Token | The copy Catalogix pairs with it |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| `success` | `--alias-text-and-icons-success` | "All Active" |
|
|
87
|
+
| `warning` | `--alias-text-and-icons-warning` | "No Products" |
|
|
88
|
+
| `error` | `--alias-text-and-icons-error` | "Need Attention" |
|
|
89
|
+
| `neutral` | `--alias-text-and-icons-tertiary` | "Status unavailable" |
|
|
90
|
+
|
|
91
|
+
(The copy lives in the host — `STATUS_COPY` in
|
|
92
|
+
`app/containers/StoresListing/storeMeta.js`. The DS only supplies the colour.)
|
|
93
|
+
|
|
94
|
+
### The column contract (shared with `ScCatalogixStoreHeader`)
|
|
95
|
+
|
|
96
|
+
| Column | Row prop | Header prop | Width | Gated by |
|
|
97
|
+
|---|---|---|---|---|
|
|
98
|
+
| Store name | `storeName` | `storeNameLabel` | `flex: 1`, `min-width: 0` | always |
|
|
99
|
+
| Status | `status` + `statusTone` | `statusLabel` | `7.5rem` | always |
|
|
100
|
+
| Products | `products` | `productsLabel` | `6rem` | always |
|
|
101
|
+
| Assets | `assets` | `assetsLabel` | `6rem` | `showAssets` |
|
|
102
|
+
| Created on | `createdOn` | `createdOnLabel` | `7.5rem` | always |
|
|
103
|
+
| Created by | `createdBy` | `createdByLabel` | `10rem` | `showCreatedBy` |
|
|
104
|
+
|
|
105
|
+
Both use `gap: 1.5rem` and `padding-inline: 1rem`; that's the whole alignment
|
|
106
|
+
mechanism. Rows add `padding-block: 1.25rem`, the header `0.75rem`.
|
|
107
|
+
|
|
108
|
+
### Recipes
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
// The full list view, driven by one derived-metadata helper
|
|
112
|
+
<div>
|
|
113
|
+
<ScCatalogixStoreHeader />
|
|
114
|
+
{stores.map((store) => {
|
|
115
|
+
const meta = getStoreMeta(store); // { statusLabel, tone, productCount, dateLabel }
|
|
116
|
+
return (
|
|
117
|
+
<ScCatalogixStoreTableList
|
|
118
|
+
key={store._id}
|
|
119
|
+
storeName={store.name}
|
|
120
|
+
status={meta.statusLabel}
|
|
121
|
+
statusTone={meta.tone}
|
|
122
|
+
products={String(meta.productCount)} // must be a string
|
|
123
|
+
createdOn={meta.dateLabel}
|
|
124
|
+
assets="" // keep the slot, hide the value
|
|
125
|
+
createdBy=""
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
})}
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
// Make the row navigable (the DS gives you no click affordance)
|
|
132
|
+
<ScCatalogixStoreTableList
|
|
133
|
+
storeName={store.name}
|
|
134
|
+
role="button"
|
|
135
|
+
tabIndex={0}
|
|
136
|
+
onClick={() => openStore(store)}
|
|
137
|
+
onKeyDown={(e) => {
|
|
138
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
openStore(store);
|
|
141
|
+
}
|
|
142
|
+
}}
|
|
143
|
+
className={styles.listRow} /* your cursor:pointer + hover background */
|
|
144
|
+
/>
|
|
145
|
+
|
|
146
|
+
// Four-column variant — repeat the flags on the header too
|
|
147
|
+
<ScCatalogixStoreTableList showAssets={false} showCreatedBy={false} storeName={store.name} />
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 2. Where to use it
|
|
153
|
+
|
|
154
|
+
- **Catalogix → Stores listing, list view.** One row per store under
|
|
155
|
+
`ScCatalogixStoreHeader`; clicking a row routes to
|
|
156
|
+
`/dashboard/:workspaceId/stores/:storeId`. The grid view of the same screen renders
|
|
157
|
+
`ScStoreCard` instead, and both are fed from the same `deriveStoreMeta` helper so the
|
|
158
|
+
two views stay in lock-step.
|
|
159
|
+
- Nowhere else. The columns are the store schema.
|
|
160
|
+
|
|
161
|
+
It composes nothing — six spans. It imports `ScBeaconTone` as a **type only**; there
|
|
162
|
+
is no `ScBeacon` in the render tree.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 3. When to use it
|
|
167
|
+
|
|
168
|
+
### Use it when
|
|
169
|
+
|
|
170
|
+
- You are listing **stores** in a table and want rows that line up with
|
|
171
|
+
`ScCatalogixStoreHeader` for free.
|
|
172
|
+
- The status is a **short word or phrase** you've already derived, with one of four
|
|
173
|
+
tones.
|
|
174
|
+
|
|
175
|
+
### Don't use it — reach for this instead
|
|
176
|
+
|
|
177
|
+
| Situation | Use instead |
|
|
178
|
+
|---|---|
|
|
179
|
+
| The same store data as cards in a grid | `ScStoreCard` (name + beacon + product count + date) |
|
|
180
|
+
| A status **dot** rather than coloured text | `ScBeacon` — compose it into your own row, or use `ScStoreCard` |
|
|
181
|
+
| Users / members / invites row | `ScTableList` (+ `ScTableHeader`) |
|
|
182
|
+
| Mobile-width store list | `ScStoreCard` in a single column — the six columns need ~46.5rem (~745px) before the name column is squeezed to nothing, and there is no mobile twin of this row |
|
|
183
|
+
| Billing history row | `ScBillingHistoryTableList` |
|
|
184
|
+
| Credit/usage logs row | `ScBillingLogsTableList` |
|
|
185
|
+
| Referral program row | `ScReferralTableList` |
|
|
186
|
+
| A generic N-column data row | Nothing here fits; widths are hard-coded. Compose your own or extend the DS. |
|
|
187
|
+
| A selectable value row in a list | `ScValueMappingL1` |
|
|
188
|
+
|
|
189
|
+
### Don't confuse with
|
|
190
|
+
|
|
191
|
+
| You may actually want | Not this |
|
|
192
|
+
|---|---|
|
|
193
|
+
| `ScStoreCard` — the **card** for one store: `storeName`, `noOfProducts`, `dateCreated`, `tone`, and a real `ScBeacon` dot with an `ScHDivider` | `ScCatalogixStoreTableList` is the **row**, has no beacon and no divider, and takes `products`/`createdOn` (not `noOfProducts`/`dateCreated`) |
|
|
194
|
+
| `ScTableList` — the generic/members table row | Different columns entirely; not width-compatible with `ScCatalogixStoreHeader` |
|
|
195
|
+
| `ScTableListMobile` — the mobile twin of `ScTableList` | There is **no** mobile twin of this component |
|
|
196
|
+
| `ScBillingHistoryTableList` / `ScBillingLogsTableList` / `ScReferralTableList` | Same header+row pattern, different domains; don't mix a row from one pair with a header from another |
|
|
197
|
+
|
|
198
|
+
`ScStoreCard` vs `ScCatalogixStoreTableList` is the grid-view/list-view pair of one
|
|
199
|
+
screen. Both take a `ScBeaconTone`, but the card calls it `tone` and the row calls it
|
|
200
|
+
`statusTone` — copying props between them will fail silently (unknown props are
|
|
201
|
+
spread onto the div as attributes).
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 4. Why to use it
|
|
206
|
+
|
|
207
|
+
- **Alignment with the header is guaranteed.** The widths, gap and inline padding live
|
|
208
|
+
in exactly two CSS modules; using both components means a new column ships to both
|
|
209
|
+
at once instead of desynchronising.
|
|
210
|
+
- **Status colour is tokenised**, so "Need attention" is the same red as every other
|
|
211
|
+
error in the product and stays AA-legible in light mode.
|
|
212
|
+
- **The store name truncates properly** — `flex: 1; min-width: 0`, ellipsis, and a
|
|
213
|
+
`title` tooltip carrying the full name, which is what long merchandising store names
|
|
214
|
+
need.
|
|
215
|
+
- **Column gating in one prop** lets one row component serve the full schema and the
|
|
216
|
+
reduced set the API can populate today.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Gotchas
|
|
221
|
+
|
|
222
|
+
**1. Every prop is optional and every default is demo data.** Rendering the component
|
|
223
|
+
bare produces a completely believable fake store — a real brand name, a real-sounding
|
|
224
|
+
person, and `statusTone="error"`. A typo'd prop name (`storename`) doesn't error; it
|
|
225
|
+
silently shows the Figma placeholder.
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
// WRONG — ships "Farfetch - Spring Season 2026 - Topwear" / "Chris Hemsworth"
|
|
229
|
+
<ScCatalogixStoreTableList storename={store.name} />
|
|
230
|
+
|
|
231
|
+
// RIGHT
|
|
232
|
+
<ScCatalogixStoreTableList storeName={store.name} createdBy={store.owner ?? ""} />
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**2. `statusTone` renders no dot.** It only colours the status text. The type is
|
|
236
|
+
imported from `ScBeacon` purely for the union, which reads as if a beacon is included.
|
|
237
|
+
If you need the dot, compose `ScBeacon` yourself or use `ScStoreCard`.
|
|
238
|
+
|
|
239
|
+
**3. `showAssets` / `showCreatedBy` must match the header.** They default to `true` on
|
|
240
|
+
both; set them on one side only and every subsequent column shifts. The Catalogix
|
|
241
|
+
pattern is to keep all six columns and pass `assets=""` / `createdBy=""`.
|
|
242
|
+
|
|
243
|
+
**4. Numbers are strings.** `products` and `assets` are `string`. Passing a number is a
|
|
244
|
+
type error in TS and unformatted in JS — no thousands separators, no locale.
|
|
245
|
+
`String(count)` or `count.toLocaleString()` at the call site.
|
|
246
|
+
|
|
247
|
+
**5. Dates are pre-formatted strings.** `createdOn` is printed verbatim. Note the
|
|
248
|
+
default (`"Nov 9th, 2025"`) is *not* the format the Catalogix design uses
|
|
249
|
+
(`"9th Nov 2025"`, from the host's own `formatStoreDate`) — do not copy the default as
|
|
250
|
+
a format spec.
|
|
251
|
+
|
|
252
|
+
**6. No click affordance at all.** No `cursor: pointer`, no `:hover` background, no
|
|
253
|
+
`role`, no `tabIndex`. If rows are navigable you must add all of it (see Recipes); the
|
|
254
|
+
host also supplies its own hover style through `className`.
|
|
255
|
+
|
|
256
|
+
**7. The bottom border is unconditional.** `border-width: 0 0 0.0625rem 0` with no
|
|
257
|
+
`:last-child` rule, so the last row draws a trailing rule under the table. Strip it on
|
|
258
|
+
the final row via `className` if the design doesn't want it.
|
|
259
|
+
|
|
260
|
+
**8. `status` is rendered at `text-md`, every other cell at `text-sm`.** The status
|
|
261
|
+
word is visibly larger than the numbers beside it. That is intentional Figma parity,
|
|
262
|
+
not a bug — don't "fix" it per-screen with a `className`.
|
|
263
|
+
|
|
264
|
+
**9. Only `storeName` gets a tooltip.** The other cells are `nowrap` +
|
|
265
|
+
`overflow: hidden` + ellipsis with **no `title`**, so a long `createdBy` is clipped at
|
|
266
|
+
`10rem` with no way to read it.
|
|
267
|
+
|
|
268
|
+
**10. No responsive behaviour.** The five fixed cells (`7.5 + 6 + 6 + 7.5 + 10`rem)
|
|
269
|
+
are all `flex-shrink: 0`, plus five `1.5rem` gaps and `1rem` inline padding — so
|
|
270
|
+
below ~`46.5rem` (~745px) the only flexible column, `storeName`, is squeezed to
|
|
271
|
+
nothing. Catalogix wraps the table in `.list { overflow-x: auto }` so it scrolls
|
|
272
|
+
sideways instead. There is no `*Mobile` twin — switch to `ScStoreCard` for narrow
|
|
273
|
+
viewports.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## In the wild
|
|
278
|
+
|
|
279
|
+
```jsx
|
|
280
|
+
// catalogix/dashboard app/containers/StoresListing/index.jsx:379
|
|
281
|
+
<ScCatalogixStoreTableList
|
|
282
|
+
key={store._id}
|
|
283
|
+
className={styles["list-row"]}
|
|
284
|
+
storeName={store.name}
|
|
285
|
+
status={meta.statusLabel}
|
|
286
|
+
statusTone={meta.tone}
|
|
287
|
+
products={String(meta.productCount)}
|
|
288
|
+
createdOn={meta.dateLabel}
|
|
289
|
+
assets=""
|
|
290
|
+
createdBy=""
|
|
291
|
+
role="button"
|
|
292
|
+
tabIndex={0}
|
|
293
|
+
onClick={() => openStore(store)}
|
|
294
|
+
onKeyDown={(e) => {
|
|
295
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
296
|
+
e.preventDefault();
|
|
297
|
+
openStore(store);
|
|
298
|
+
}
|
|
299
|
+
}}
|
|
300
|
+
/>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
`meta` comes from `deriveStoreMeta` (`app/containers/StoresListing/storeMeta.js`),
|
|
304
|
+
which also feeds the grid view's `ScStoreCard` — the host keeps status/tone derivation
|
|
305
|
+
in one place precisely because the two DS components take it under different prop
|
|
306
|
+
names.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Related
|
|
311
|
+
|
|
312
|
+
- `ScCatalogixStoreHeader` — the header sibling; the two share one width contract and must be configured together.
|
|
313
|
+
- `ScStoreCard` — the grid-view card for the same data; it *does* render an `ScBeacon`.
|
|
314
|
+
- `ScBeacon` — the status dot, if you want it in a row.
|
|
315
|
+
- `ScTableList` / `ScTableHeader` / `ScTableListMobile` — the generic/members table family.
|
|
316
|
+
- `ScBillingHistoryTableList` / `ScBillingLogsTableList` / `ScReferralTableList` — the other domain header+row pairs.
|