@spark-web/design-system 5.1.14 → 5.1.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/design-system",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/spark-web-design-system.cjs.js",
|
|
6
6
|
"module": "dist/spark-web-design-system.esm.js",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@spark-web/button": "5.7.0",
|
|
21
21
|
"@spark-web/checkbox": "5.1.2",
|
|
22
22
|
"@spark-web/columns": "5.1.1",
|
|
23
|
-
"@spark-web/combobox": "6.2.
|
|
23
|
+
"@spark-web/combobox": "6.2.1",
|
|
24
24
|
"@spark-web/container": "5.1.1",
|
|
25
25
|
"@spark-web/control-label": "5.1.0",
|
|
26
26
|
"@spark-web/core": "5.2.0",
|
|
27
27
|
"@spark-web/currency-input": "6.0.1",
|
|
28
28
|
"@spark-web/data-table": "5.2.3",
|
|
29
|
-
"@spark-web/date-picker": "5.3.
|
|
29
|
+
"@spark-web/date-picker": "5.3.2",
|
|
30
30
|
"@spark-web/description-list": "0.1.0",
|
|
31
31
|
"@spark-web/divider": "5.1.1",
|
|
32
32
|
"@spark-web/dropzone": "6.0.1",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"@spark-web/icon": "5.1.1",
|
|
40
40
|
"@spark-web/inline": "5.1.0",
|
|
41
41
|
"@spark-web/link": "5.1.0",
|
|
42
|
-
"@spark-web/meatball-menu": "0.1.
|
|
42
|
+
"@spark-web/meatball-menu": "0.1.1",
|
|
43
43
|
"@spark-web/modal-dialog": "6.0.4",
|
|
44
44
|
"@spark-web/multi-select": "6.0.2",
|
|
45
45
|
"@spark-web/nav-link": "5.1.0",
|
|
46
46
|
"@spark-web/next-utils": "5.1.0",
|
|
47
|
-
"@spark-web/page-header": "2.0.
|
|
47
|
+
"@spark-web/page-header": "2.0.1",
|
|
48
48
|
"@spark-web/password-input": "6.0.0",
|
|
49
|
-
"@spark-web/portal-table": "^2.0.
|
|
49
|
+
"@spark-web/portal-table": "^2.0.1",
|
|
50
50
|
"@spark-web/radio": "5.3.1",
|
|
51
51
|
"@spark-web/row": "5.1.1",
|
|
52
52
|
"@spark-web/section-card": "0.2.0",
|
|
53
|
-
"@spark-web/section-header": "0.2.
|
|
53
|
+
"@spark-web/section-header": "0.2.1",
|
|
54
54
|
"@spark-web/select": "6.0.2",
|
|
55
55
|
"@spark-web/spinner": "5.1.1",
|
|
56
56
|
"@spark-web/ssr": "5.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@spark-web/tabs": "5.2.2",
|
|
61
61
|
"@spark-web/text": "5.3.1",
|
|
62
62
|
"@spark-web/text-area": "6.0.2",
|
|
63
|
-
"@spark-web/text-input": "6.1.
|
|
63
|
+
"@spark-web/text-input": "6.1.1",
|
|
64
64
|
"@spark-web/text-link": "5.4.0",
|
|
65
65
|
"@spark-web/text-list": "5.1.0",
|
|
66
66
|
"@spark-web/theme": "5.13.3",
|
|
@@ -153,13 +153,13 @@ portal-hub supplies its own `TablePagination` component. It is the
|
|
|
153
153
|
`TablePagination` referenced by both the list-page and detail-page patterns.
|
|
154
154
|
Props used by the patterns:
|
|
155
155
|
|
|
156
|
-
| Prop | Notes
|
|
157
|
-
| ------------- |
|
|
158
|
-
| `total` | Total record count — from a dedicated count query
|
|
159
|
-
| `pageSize` | 20 on list pages; 5 on detail-page section tables |
|
|
160
|
-
| `dataShowing` | Number of rows on the current page
|
|
161
|
-
| `onChange` | Page change handler
|
|
162
|
-
| `current` | Current page number
|
|
156
|
+
| Prop | Notes |
|
|
157
|
+
| ------------- | ------------------------------------------------------------------------ |
|
|
158
|
+
| `total` | Total record count — from a dedicated count query |
|
|
159
|
+
| `pageSize` | 20 on list pages and embedded tab lists; 5 on detail-page section tables |
|
|
160
|
+
| `dataShowing` | Number of rows on the current page |
|
|
161
|
+
| `onChange` | Page change handler |
|
|
162
|
+
| `current` | Current page number |
|
|
163
163
|
|
|
164
164
|
This is a confirmed COMPONENT GAP — no `@spark-web` pagination component exists
|
|
165
165
|
yet. Until one ships, every consumer supplies its own pagination component.
|
|
@@ -341,3 +341,76 @@ Usage in Authority Contacts flows (portal-hub):
|
|
|
341
341
|
component with the appropriate `variant`.
|
|
342
342
|
- NEVER put visibility/eligibility logic inside the row list — the consumer
|
|
343
343
|
gates it and owns pruning the field.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Detail summary inside a modal (`DescriptionList`)
|
|
348
|
+
|
|
349
|
+
When a modal shows a fetched record's fields for the operator to confirm before
|
|
350
|
+
saving (e.g. a verified register lookup), render them as a key/value list with
|
|
351
|
+
**`@spark-web/description-list`** `DescriptionList` — the first-party component
|
|
352
|
+
for labelled data rows. Give each item `layout: 'auto'` for muted-label-left /
|
|
353
|
+
value-right rows with a bottom divider; item `value` accepts any node (badges,
|
|
354
|
+
chips). Also use it for detail-page sections.
|
|
355
|
+
|
|
356
|
+
- Add a section heading (`<Text weight="semibold">…</Text>`) above the list if
|
|
357
|
+
the modal needs one — `DescriptionList` renders only the rows.
|
|
358
|
+
- Tag-like values (classes/tags): `@spark-web/status-badge` `StatusBadge` (tone
|
|
359
|
+
`accent`) inside `<Inline gap="xsmall">` as the item `value` — not `Badge`.
|
|
360
|
+
- One overall status → a single `Alert` (`positive`/`caution`) beneath the list,
|
|
361
|
+
not a badge per row.
|
|
362
|
+
|
|
363
|
+
```tsx
|
|
364
|
+
import { DescriptionList } from '@spark-web/description-list';
|
|
365
|
+
import { StatusBadge } from '@spark-web/status-badge';
|
|
366
|
+
import { Alert } from '@spark-web/alert';
|
|
367
|
+
|
|
368
|
+
<Stack gap="medium">
|
|
369
|
+
<Stack gap="small">
|
|
370
|
+
<Text weight="semibold">Licence details</Text>
|
|
371
|
+
<DescriptionList
|
|
372
|
+
items={[
|
|
373
|
+
{ label: 'Licensee', value: data.licenseeName ?? '—', layout: 'auto' },
|
|
374
|
+
{ label: 'ABN', value: data.abn, layout: 'auto' },
|
|
375
|
+
{
|
|
376
|
+
label: 'Classes',
|
|
377
|
+
layout: 'auto',
|
|
378
|
+
value: (
|
|
379
|
+
<Inline gap="xsmall" alignY="center">
|
|
380
|
+
{classes.map(c => (
|
|
381
|
+
<StatusBadge key={c} tone="accent">
|
|
382
|
+
{c}
|
|
383
|
+
</StatusBadge>
|
|
384
|
+
))}
|
|
385
|
+
</Inline>
|
|
386
|
+
),
|
|
387
|
+
},
|
|
388
|
+
]}
|
|
389
|
+
/>
|
|
390
|
+
</Stack>
|
|
391
|
+
<Alert tone={verified ? 'positive' : 'caution'}>…</Alert>
|
|
392
|
+
</Stack>;
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Do NOTs
|
|
396
|
+
|
|
397
|
+
- Don't hand-roll `<Box justifyContent="spaceBetween">` label/value rows — use
|
|
398
|
+
`DescriptionList` (proper `<dl>/<dt>/<dd>` semantics, right defaults).
|
|
399
|
+
- Don't reach for portal-hub's `PortalTable`/`TableRow` for new key/value lists
|
|
400
|
+
— it is a **fork** of `@spark-web/description-list` (same tokens/layout,
|
|
401
|
+
weaker semantics) and is being migrated out. Prefer `DescriptionList`; use
|
|
402
|
+
`SectionCard` only for the surrounding card chrome. (`spaceBetween` on
|
|
403
|
+
`TableRow` == `layout: 'auto'` on a `DescriptionList` item.)
|
|
404
|
+
- Don't use `@spark-web/badge` `Badge` for tag chips — use `StatusBadge` (tone
|
|
405
|
+
`accent`).
|
|
406
|
+
- Don't scatter per-field status badges when one overall verdict suffices — use
|
|
407
|
+
a single `Alert`.
|
|
408
|
+
|
|
409
|
+
### Reference implementation
|
|
410
|
+
|
|
411
|
+
> **Note:** paths below are in the **portal-hub** consumer repo
|
|
412
|
+
> (`brighte-labs/portal-hub`), not this repository.
|
|
413
|
+
|
|
414
|
+
`apps/admin-portal/src/pages/Vendors/Licenses/NswLicensePreview.tsx` — the
|
|
415
|
+
verify-then-save preview block (currently on the legacy `TableRow`; migrating to
|
|
416
|
+
`@spark-web/description-list`).
|