@apliteni/apliteni-ui 0.188.0 → 0.190.0
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/docs/components.md +57 -12
- package/docs/foundations.md +27 -12
- package/guidelines/INDEX.md +1 -0
- package/guidelines/colour-and-theming.md +1 -1
- package/guidelines/dashboards-and-reports.md +15 -5
- package/guidelines/session-expired.md +61 -0
- package/guidelines/stat-bands.md +2 -2
- package/guidelines/text-length.md +12 -0
- package/guidelines/the-page.md +27 -1
- package/package.json +1 -1
- package/react/dist/index.css +9 -3
- package/react/dist/index.d.ts +44 -8
- package/react/dist/index.js +56 -33
- package/src/logic/filter-bar.js +1 -1
- package/src/styles/avatar.css +4 -1
- package/src/styles/base.css +6 -0
- package/src/styles/button.css +13 -0
- package/src/styles/card.css +96 -6
- package/src/styles/chart.css +2 -0
- package/src/styles/code.css +32 -3
- package/src/styles/drawer.css +6 -2
- package/src/styles/empty.css +14 -0
- package/src/styles/layout.css +101 -2
- package/src/styles/nav.css +3 -3
- package/src/styles/segmented.css +3 -0
- package/src/styles/stat.css +38 -0
- package/src/styles/table.css +31 -20
- package/src/styles/tap-zone.css +6 -1
- package/src/tokens/tokens.css +40 -12
package/docs/components.md
CHANGED
|
@@ -305,9 +305,14 @@ name, and its menu shows each name with its badge and a tick on the chosen one.
|
|
|
305
305
|
### Auth shell
|
|
306
306
|
|
|
307
307
|
Use `AuthShell` for a sign-in or sign-up page. It centres one card and puts the brand above it.
|
|
308
|
+
`split` puts the brand on the branded ground beside the task, which stands on the plain page with
|
|
309
|
+
no card box, and `tagline` is the slogan under the brand. `brandAbove` stands the brand on the
|
|
310
|
+
ground above the card and centres the title with a line under it. The ground is
|
|
311
|
+
`--ui-auth-ground`, a gradient that a product may override with its own colour or gradient.
|
|
308
312
|
|
|
309
313
|
```tsx
|
|
310
314
|
<AuthShell brand={<img src="/logo.svg" alt="Example" />}><SignInForm /></AuthShell>
|
|
315
|
+
<AuthShell split tagline="Access the design system with your work account." brand={logo}><SignInForm /></AuthShell>
|
|
311
316
|
```
|
|
312
317
|
|
|
313
318
|
### Footer
|
|
@@ -336,8 +341,9 @@ action goes to another page. Use [`Dropdown`](#dropdown) for a list of actions,
|
|
|
336
341
|
<Button variant="primary" icon="download" busy={exporting} onClick={exportRows}>Export</Button>
|
|
337
342
|
```
|
|
338
343
|
|
|
339
|
-
`variant` is `primary`, `secondary`, `ghost`, `danger` or `link`. `
|
|
340
|
-
|
|
344
|
+
`variant` is `primary`, `secondary`, `outline`, `ghost`, `danger` or `link`. `outline` draws an
|
|
345
|
+
edge and no fill, so an icon-only control keeps a boundary on a flat ground. `size` is `xs`,
|
|
346
|
+
`sm`, `md` or `lg`. `icon` puts a glyph before the label and `iconRight` after it. `leading` puts your own
|
|
341
347
|
decorative content before the label, and it wins over `icon`. `block` fills the row.
|
|
342
348
|
|
|
343
349
|
**Links.** With `href`, the button is an `<a>` with the button classes. Without `href`, it is a
|
|
@@ -553,7 +559,9 @@ Use `TextField type="search"` with a label there.
|
|
|
553
559
|
|
|
554
560
|
`ariaLabel` is required, because no visible label names the field. `size="sm"` is the field above
|
|
555
561
|
a dense table. With a mouse it is 32px high with `--text-sm`. On a touch screen it is 40px high with
|
|
556
|
-
16px text, because iOS zooms into a field with smaller text.
|
|
562
|
+
16px text, because iOS zooms into a field with smaller text. `width` sizes the whole group, icon
|
|
563
|
+
included, for a field that should fit its expected input instead of growing across the toolbar row;
|
|
564
|
+
give it a CSS width such as `24ch`. The field has no clear button of its
|
|
557
565
|
own, because the browser draws one. See [Toolbar](#toolbar).
|
|
558
566
|
|
|
559
567
|
### Checkbox and switch
|
|
@@ -757,7 +765,25 @@ row is 40px. `.ui-toolbar--split` puts the last control at the end of the row, a
|
|
|
757
765
|
|
|
758
766
|
**Room on the screen.** The row wraps only when the text field would be narrower than 6rem. At
|
|
759
767
|
560px and below, each search field takes the full line and the other controls wrap under it. The
|
|
760
|
-
toolbar stands 8px above the block that it controls, or 20px on a touch phone below 560px.
|
|
768
|
+
toolbar stands 8px above the block that it controls, on the page or inside its card, or 20px on a touch phone below 560px.
|
|
769
|
+
|
|
770
|
+
### Floating bar
|
|
771
|
+
|
|
772
|
+
Use `.ui-float-bar` for a slim control row that docks at the bottom of its scroll region and
|
|
773
|
+
floats over the content above it: a viewer's page steps and zoom, or a sheet's primary actions. It
|
|
774
|
+
stays visible while the content scrolls.
|
|
775
|
+
|
|
776
|
+
```tsx
|
|
777
|
+
<div className="ui-float-bar">
|
|
778
|
+
<Button variant="ghost" iconOnly icon="minus" aria-label="Zoom out" />
|
|
779
|
+
<span>100%</span>
|
|
780
|
+
<Button variant="ghost" iconOnly icon="plus" aria-label="Zoom in" />
|
|
781
|
+
</div>
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
**What the user sees.** The bar is a centred pill on the kit's floating surface, so it reads above
|
|
785
|
+
the content it floats over. Put it last in a column and pin it with `margin-top: auto` so it docks
|
|
786
|
+
at the column's foot. It never wraps, and it sits one spacing step above the edge it docks to.
|
|
761
787
|
|
|
762
788
|
## Content and status
|
|
763
789
|
|
|
@@ -783,9 +809,20 @@ titled card puts its Chart and Table switch there.
|
|
|
783
809
|
its label and hint. Use `ui-card__row--tight-choice` for a three-option row that must stay on one
|
|
784
810
|
line below 360px.
|
|
785
811
|
|
|
812
|
+
**A row glyph.** Use `.ui-card__glyph` for a muted mark at the end of a card row, such as the
|
|
813
|
+
chevron that opens a detail page; it is 18px with a 2-unit stroke, so it clears the glyph floor.
|
|
814
|
+
Use the bare `check` glyph in body ink for a granted check. Use `.ui-link--quiet` for a name in
|
|
815
|
+
the row that links to its detail page: body ink at rest, underlined under the pointer.
|
|
816
|
+
|
|
817
|
+
**A soft line between blocks.** Give the block the class `ui-hairline` to draw a straight line
|
|
818
|
+
across the column width on its top edge, with one inner gap of air under it. Use it above a
|
|
819
|
+
closing block, such as a revoke or delete area, and between tight page blocks, such as a row of
|
|
820
|
+
figures and the filter row under it. The line is `--border` in light and none in dark.
|
|
821
|
+
|
|
786
822
|
**A document in a card.** Wrap a `.ui-toolbar` and a `.ui-table-scroll` in `.ui-card__viewer`, and
|
|
787
823
|
give the document `.ui-card__page`. The toolbar is a slim row between two lines. The page is a
|
|
788
|
-
white sheet with dark text in both themes, with A4 proportions at the least.
|
|
824
|
+
white sheet with dark text in both themes, with A4 proportions at the least. For a document on a
|
|
825
|
+
bare full-bleed backdrop instead of a card, use `.ui-document-ground`.
|
|
789
826
|
|
|
790
827
|
### Badge, pill and status dot
|
|
791
828
|
|
|
@@ -808,8 +845,8 @@ Use `Avatar` to show a person beside their name. Do not use it in place of the n
|
|
|
808
845
|
<Avatar personKey={user.id} name="Dana Reyes" src={user.photo} size={32} />
|
|
809
846
|
```
|
|
810
847
|
|
|
811
|
-
**What the user sees.** A filled circle with the first and last initials, 24px or
|
|
812
|
-
comes from `personKey`, the stable id of the person, so one person keeps one hue on every screen.
|
|
848
|
+
**What the user sees.** A filled circle with the first and last initials, 24px, 32px or 48px. The
|
|
849
|
+
hue comes from `personKey`, the stable id of the person, so one person keeps one hue on every screen.
|
|
813
850
|
The letters are readable on each hue in both themes and under every accent. A name with no letters
|
|
814
851
|
shows the `user` glyph. `empty` shows a dashed ring for "no one". A `src` photo covers the letters,
|
|
815
852
|
and the letters show when the photo does not load. The top bar account button, its menu and the
|
|
@@ -982,6 +1019,9 @@ destructive question.
|
|
|
982
1019
|
body scrolls, and the title, the close control and the footer stay visible. The title is an `h2`.
|
|
983
1020
|
`initialFocusRef` chooses the first focus.
|
|
984
1021
|
|
|
1022
|
+
`size="sm"` gives a 360px panel for a short sign-in form. Without `size`, Modal uses its default
|
|
1023
|
+
wide panel.
|
|
1024
|
+
|
|
985
1025
|
**On a phone.** At 560px and narrower, with a coarse pointer, each footer button has a 44px tap
|
|
986
1026
|
zone. The buttons keep their drawn size.
|
|
987
1027
|
|
|
@@ -1153,9 +1193,10 @@ sortable header label is cut with an ellipsis before its sort mark is.
|
|
|
1153
1193
|
selection boxes are kit checkboxes. The header box shows the dash when some rows of the page are
|
|
1154
1194
|
selected. A dense table marks a selected row only with its box.
|
|
1155
1195
|
|
|
1156
|
-
**Links in cells.** A link in a cell uses the row's ink, gets an underline
|
|
1157
|
-
focus. A `.ui-table__sub` puts a second value under the first, such as an
|
|
1158
|
-
`.ui-table__pair` groups a reference and a status, and stacks them when the
|
|
1196
|
+
**Links in cells.** A link in a cell, including a reference, uses the row's ink, gets an underline
|
|
1197
|
+
on hover and the ring on focus. A `.ui-table__sub` puts a second value under the first, such as an
|
|
1198
|
+
email under a name. `.ui-table__pair` groups a reference and a status, and stacks them when the
|
|
1199
|
+
cell is narrow.
|
|
1159
1200
|
|
|
1160
1201
|
**Keyboard and screen reader.** When its content overflows, the scroll region takes the focus and
|
|
1161
1202
|
draws the ring inside its edge, so the arrow keys, a trackpad and a finger reach the same columns.
|
|
@@ -1199,11 +1240,14 @@ totals of a list in the table's footer rows, not in a stat band.
|
|
|
1199
1240
|
|
|
1200
1241
|
`variant` is `tiles`, the default, with each figure on its own card, `band` on one card, or `open`
|
|
1201
1242
|
with no surface and a larger value. A figure has `label`, `value`, `caption`, `delta` and `trend`.
|
|
1243
|
+
All figures read at one size.
|
|
1202
1244
|
|
|
1203
1245
|
**What the user sees.** A value never wraps and is never cut. The words under it give way first. A
|
|
1204
1246
|
change shows an arrow from the sign that you print, and its colour follows your `tone` only. A
|
|
1205
1247
|
figure with nothing to compare shows no change row, never `+0%`. A figure shows at most one line
|
|
1206
|
-
under its value.
|
|
1248
|
+
under its value. A row of tiles keeps a soft line around each tile, also on the light page where a
|
|
1249
|
+
lone card draws none. An open band draws a vertical soft line between figures in a row on the
|
|
1250
|
+
light page. Use a caption only for a unit, a period or a limit that the figure cannot say.
|
|
1207
1251
|
`trend` is a slot for a small chart, such as a `Chart variant="spark"`.
|
|
1208
1252
|
|
|
1209
1253
|
**Say what a change compares with.** Put it once for the band in `basis`, or with `basisId` point
|
|
@@ -1211,7 +1255,8 @@ at text before the figures. A caption comes before the figures. A hover `title`
|
|
|
1211
1255
|
When a period control already states the window, do not repeat it.
|
|
1212
1256
|
|
|
1213
1257
|
**Room on the screen.** A band folds by its own width, not the window's, so give it a width in a
|
|
1214
|
-
flex row or an `auto` grid track
|
|
1258
|
+
flex row or an `auto` grid track. On a page, a `StatBand` closes a section, so the block after it
|
|
1259
|
+
keeps one group gap of air below the figures, on top of the body's own gap.
|
|
1215
1260
|
|
|
1216
1261
|
| Layout | Four fold two by two at | An odd count stacks at | One column at | Smaller value below |
|
|
1217
1262
|
|---|---|---|---|---|
|
package/docs/foundations.md
CHANGED
|
@@ -135,8 +135,8 @@ sentence case and renders as written. A word that is capitalised in itself stays
|
|
|
135
135
|
| `page-title` | `--text-2xl` | `--weight-bold` | `1.1` | the page's `h1` inside `AppShell` |
|
|
136
136
|
| `card-title` | `--text-lg` | `--weight-semibold` | `--leading-snug` | a card's title |
|
|
137
137
|
| `body` | `--text-base` | `--weight-normal` | `--leading-normal` | running text |
|
|
138
|
-
| `label` | `--text-sm` | `--weight-medium` | inherited | an eyebrow, a table head, a nav or menu caption, a footer column title
|
|
139
|
-
| `caption` | `--text-sm` | `--weight-normal` | inherited | a sentence under a specimen, figure or screenshot |
|
|
138
|
+
| `label` | `--text-sm` | `--weight-medium` | inherited | an eyebrow, a table head, a nav or menu caption, a footer column title |
|
|
139
|
+
| `caption` | `--text-sm` | `--weight-normal` | inherited | a sentence under a specimen, figure or screenshot; a code block's title |
|
|
140
140
|
| `chip` | `--text-xs` | `--weight-semibold` | inherited | a badge, a pill, a menu row's badge, a version badge |
|
|
141
141
|
|
|
142
142
|
On the kit's scale, these are 30, 18, 14.5, 13, 13 and 12px. When two ranks share a size,
|
|
@@ -249,9 +249,10 @@ These fill ratios describe separation, not text contrast.
|
|
|
249
249
|
provides legibility. The paint provides the state.
|
|
250
250
|
- **A field has no fill step, so the ground you put it on decides whether its box is seen.**
|
|
251
251
|
`--field-bg` and `--disabled-surface` are both `--surface` in both themes. A field is
|
|
252
|
-
therefore drawn by its edge. On the page ground, a disabled field measures 1.12:1
|
|
253
|
-
|
|
254
|
-
exception. See
|
|
252
|
+
therefore drawn by its edge. On the page ground, a disabled field measures 1.12:1, because
|
|
253
|
+
the light page is now as white as the field's fill, so only the edge draws the box.
|
|
254
|
+
**Put a form on a named surface: a card, a drawer panel or a modal.** A filter bar above a table is the one exception. See
|
|
255
|
+
[Forms](components.md#fields).
|
|
255
256
|
- **The box reports the state, so a field that is off draws the fainter edge of the two.** The
|
|
256
257
|
same two tokens paint a button, so a button that is off drops a rung with the field.
|
|
257
258
|
- **A disabled select carries the kit's own paint and no fade**, also in Chromium, which fades
|
|
@@ -277,30 +278,43 @@ where columns scroll under its frame or its pinned column, in both themes. A ste
|
|
|
277
278
|
| Level | Light line | Light shadow | Dark line | Dark shadow |
|
|
278
279
|
| --- | --- | --- | --- | --- |
|
|
279
280
|
| page | none | none | none | none |
|
|
280
|
-
| card |
|
|
281
|
+
| card | none | none | `--border` | none |
|
|
281
282
|
| rail | `--level-line`, right side | `--elev-rail` | `--border` | none |
|
|
282
283
|
| menu, popover, drawer, toast | `--level-line`, one line | `--elev-drop` | `--border-strong` outside, `--border` inside | `--elev-drop` |
|
|
283
284
|
| modal | `--level-line`, one line | `--elev-drop` | none, the deep scrim separates it | `--elev-drop` |
|
|
284
285
|
|
|
285
286
|
Each level reads its line from one token in both themes: `--card-edge`, `--rail-edge`,
|
|
286
287
|
`--float-edge`, `--float-edge-inner` and `--modal-edge`. Re-point the token to change the line
|
|
287
|
-
of a level. The modal draws `--modal-edge` as an inset line.
|
|
288
|
+
of a level. The modal draws `--modal-edge` as an inset line. On the light page, a card is a
|
|
289
|
+
grouping of space, so it draws no line and no shadow; dark keeps the card's line. #850
|
|
288
290
|
|
|
289
291
|
The ladder, from bottom to top:
|
|
290
292
|
|
|
291
293
|
| Token | The step | Dark | Light |
|
|
292
294
|
| --- | --- | --- | --- |
|
|
293
|
-
| `--bg` | the page | `#0e0d14` | `#
|
|
295
|
+
| `--bg` | the page | `#0e0d14` | `#ffffff` |
|
|
294
296
|
| `--surface-2` | non-text sunken marks and tracks | `#161520` | `#e9ecf3` |
|
|
295
297
|
| `--surface` | a card | `#211e2d` | `#ffffff` |
|
|
296
298
|
| `--bg-elevated` | floating — a menu, a panel, the drawer, a modal, a toast | `#2a2639` | `#ffffff` |
|
|
297
299
|
| `--surface-3` | non-text quiet fills | `#2d293c` | `#eef0f5` |
|
|
298
300
|
|
|
301
|
+
`--ui-document-ground` names the bare backdrop behind a document sheet, and aliases
|
|
302
|
+
`--surface-2` in both themes. Use the class `.ui-document-ground` to paint it, so a page reads
|
|
303
|
+
its own ground rather than re-declaring the token. #850
|
|
304
|
+
|
|
305
|
+
**The auth ground sits outside the ladder.** `--ui-auth-ground` is the gradient behind a
|
|
306
|
+
sign-in or consent page, and the auth card floats over it. The default split sign-in ground C
|
|
307
|
+
measures 1.60:1 to 1.51:1 in light and 1.08:1 to 1.04:1 in dark against the card, below the
|
|
308
|
+
3:1 floor, and the owner chose C with those figures.
|
|
309
|
+
|
|
299
310
|
**Text sits on the page, card or floating panel surface, never on a grey inset.** In both
|
|
300
311
|
themes, fields, code blocks, navigation labels and segmented controls use those reading
|
|
301
312
|
surfaces. `--surface-2` and `--surface-3` are for non-text fills and tracks. A status chip
|
|
302
313
|
is the named exception. It uses a soft fill, and neutral chip tones use
|
|
303
314
|
`--chip-neutral-fill`, which stays visible on a card and on a floating panel in both themes.
|
|
315
|
+
A code block in the light theme is the other exception: it keeps the quiet `--surface-3`
|
|
316
|
+
fill, because a reader never writes in one. Its ink clears 4.5:1 on that fill, with the
|
|
317
|
+
lowest value 5.22:1.
|
|
304
318
|
|
|
305
319
|
**A selected item is the one exception.** Selection is marked by a background highlight. An
|
|
306
320
|
enabled chosen segmented pill takes the primary button's pair, `--accent-strong` with
|
|
@@ -338,8 +352,9 @@ declares it:
|
|
|
338
352
|
|
|
339
353
|
| The ground | What it hands a chip | Token |
|
|
340
354
|
| --- | --- | --- |
|
|
341
|
-
| the page | the card | `--code-bg: var(--
|
|
342
|
-
| a
|
|
355
|
+
| the page | the card in dark, a quiet fill in light | `--code-bg: var(--code-chip-page)` on `:root` |
|
|
356
|
+
| a painted container | the page in dark, a quiet fill in light | `--code-bg: var(--code-chip-surface)` |
|
|
357
|
+
| a card on the page | the page in dark, a quiet fill in light | `--code-bg: var(--code-chip-surface)` |
|
|
343
358
|
| a table | the card in dark, the page in light | `--table-code-bg`, the pair of `--table-bg` |
|
|
344
359
|
| a tinted card or snippet | the card it is a variant of | `--code-bg: var(--surface)` |
|
|
345
360
|
| a translucent wash over any of them | the page in dark, the card in light | `--wash-code-bg` |
|
|
@@ -350,8 +365,8 @@ If you paint your own reading surface, give `--code-bg` the other surface. A tab
|
|
|
350
365
|
draws, in both themes.
|
|
351
366
|
|
|
352
367
|
**A tinted card stays above the page.** `.ui-card--accent` and `.ui-card--live` mix their
|
|
353
|
-
colour into `--surface` through `--card-tint`. Dark can spend 9%. Light can spend 5%.
|
|
354
|
-
|
|
368
|
+
colour into `--surface` through `--card-tint`. Dark can spend 9%. Light can spend 5%. On
|
|
369
|
+
the light page, where a plain card draws no box, the tint is the one paint the card keeps.
|
|
355
370
|
|
|
356
371
|
**The ladder is capped by ink.** `--muted` carries state and placeholder information. It
|
|
357
372
|
clears AA on every step that the ladder raises. It is re-picked against the top of the
|
package/guidelines/INDEX.md
CHANGED
|
@@ -31,4 +31,5 @@ Each row names one guideline page, the screen parts it covers, and when to read
|
|
|
31
31
|
| [Going back](going-back.md) | The back link, its destination and the parent address. | Read it when a page sits under another page. |
|
|
32
32
|
| [Account and settings](account-and-settings.md) | The account window, the account menu and settings rows. | Read it before you build the account menu or settings. |
|
|
33
33
|
| [Notifications](notifications.md) | The bell, its unread count, read state and a failed load. | Read it before you build a bell or a notifications list. |
|
|
34
|
+
| [Session expired](session-expired.md) | A session-ended dialog, its page state and its lasting sign-in notice. | Read it before you handle an ended session. |
|
|
34
35
|
| [Guidelines](overview.md) | No screen parts. The file holds only the collection heading. | Read it only for the heading. The six-card overview is in Storybook, not in the package. |
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
**Don't:** Put text on grey fields, chips, headers or footers.
|
|
83
83
|
|
|
84
|
-
**Except:** The page shell's SidebarNav rail is the card surface
|
|
84
|
+
**Except:** The page shell's SidebarNav rail is the card surface; its current row and label take a quiet fill one rung off the rail, no accent, no edge, because an outline means focus (Artur r34 #475). Neutral status chips use a muted ink tint whose direction differs per theme, one family with coloured chips. A code block keeps a grey fill in light: a reader never writes in one.
|
|
85
85
|
|
|
86
86
|
## Mark selection in forced colours
|
|
87
87
|
|
|
@@ -22,10 +22,22 @@
|
|
|
22
22
|
|
|
23
23
|
**Why:** Reading a table is what a report is for.
|
|
24
24
|
|
|
25
|
-
**Do:** The figures with their trends, then the
|
|
25
|
+
**Do:** The figures with their trends, then the sales needing a decision.
|
|
26
26
|
|
|
27
27
|
**Don't:** The whole ledger and a paragraph about it.
|
|
28
28
|
|
|
29
|
+
## Separate tight blocks with a soft line
|
|
30
|
+
|
|
31
|
+
<!-- rule: soft-lines-between-blocks -->
|
|
32
|
+
|
|
33
|
+
**Rule:** Draw a soft line between blocks closer than the page's group gap.
|
|
34
|
+
|
|
35
|
+
**Why:** Space alone does not separate tight blocks on the white page.
|
|
36
|
+
|
|
37
|
+
**Do:** A row of figure tiles, each with its soft edge.
|
|
38
|
+
|
|
39
|
+
**Don't:** The same tiles with no line, so three figures read as one band.
|
|
40
|
+
|
|
29
41
|
## Link each reference to its row
|
|
30
42
|
|
|
31
43
|
<!-- rule: link-to-the-report -->
|
|
@@ -34,7 +46,7 @@
|
|
|
34
46
|
|
|
35
47
|
**Why:** A dashboard stops at what happened; a report opening at its own top has not answered the reference.
|
|
36
48
|
|
|
37
|
-
**Do:** Each
|
|
49
|
+
**Do:** Each sale reference opens its row in the report.
|
|
38
50
|
|
|
39
51
|
**Don't:** A block that lists what is wrong and offers no way in.
|
|
40
52
|
|
|
@@ -46,7 +58,7 @@
|
|
|
46
58
|
|
|
47
59
|
**Why:** Analysis needs the rows: a summary cannot say how much.
|
|
48
60
|
|
|
49
|
-
**Do:** The
|
|
61
|
+
**Do:** The sales ledger, with the fees and net on every row.
|
|
50
62
|
|
|
51
63
|
**Don't:** The same ledger reduced to three figures.
|
|
52
64
|
|
|
@@ -58,8 +70,6 @@
|
|
|
58
70
|
|
|
59
71
|
**Why:** Narrowing the question, or taking the rows away, needs no second screen.
|
|
60
72
|
|
|
61
|
-
**Gap #555:** The kit's Stock screener is a report with filters and no export.
|
|
62
|
-
|
|
63
73
|
**Do:** A filter row above the table, the export at its end.
|
|
64
74
|
|
|
65
75
|
**Don't:** A table alone, its period fixed when it was built.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Session expired
|
|
2
|
+
|
|
3
|
+
## Sign in on the same page
|
|
4
|
+
|
|
5
|
+
<!-- rule: sign-in-same-page -->
|
|
6
|
+
|
|
7
|
+
**Rule:** When a session ends, open a sign-in dialog over the current page.
|
|
8
|
+
|
|
9
|
+
**Why:** The reader can see where work will continue.
|
|
10
|
+
|
|
11
|
+
**Do:** Open “Sign in again” over Payouts.
|
|
12
|
+
|
|
13
|
+
**Don't:** Send the reader to a sign-in page.
|
|
14
|
+
|
|
15
|
+
## Keep the work
|
|
16
|
+
|
|
17
|
+
<!-- rule: keep-work -->
|
|
18
|
+
|
|
19
|
+
**Rule:** After sign-in, return the reader to the same place with the same input and filters.
|
|
20
|
+
|
|
21
|
+
**Why:** The reader loses time when they must set the search and filter again.
|
|
22
|
+
|
|
23
|
+
**Do:** Keep the search text and the pending filter.
|
|
24
|
+
|
|
25
|
+
**Don't:** Clear the search text or the filter.
|
|
26
|
+
|
|
27
|
+
## Say that the session ended
|
|
28
|
+
|
|
29
|
+
<!-- rule: say-session-ended -->
|
|
30
|
+
|
|
31
|
+
**Rule:** Say that the session ended and that sign-in continues the work.
|
|
32
|
+
|
|
33
|
+
**Why:** The reader needs to know why the dialog opened.
|
|
34
|
+
|
|
35
|
+
**Do:** Say “Your session ended. Sign in to keep working.”
|
|
36
|
+
|
|
37
|
+
**Don't:** Say only “Sign in required.”
|
|
38
|
+
|
|
39
|
+
## Keep the shell and title
|
|
40
|
+
|
|
41
|
+
<!-- rule: skeleton-behind-dialog -->
|
|
42
|
+
|
|
43
|
+
**Rule:** Keep the page shell and title, and replace page data with skeleton shapes until sign-in.
|
|
44
|
+
|
|
45
|
+
**Why:** The reader keeps their place without seeing protected data.
|
|
46
|
+
|
|
47
|
+
**Do:** Keep Payouts and show a table-shaped skeleton.
|
|
48
|
+
|
|
49
|
+
**Don't:** Blank the whole page behind the dialog.
|
|
50
|
+
|
|
51
|
+
## Keep a way back in
|
|
52
|
+
|
|
53
|
+
<!-- rule: lasting-sign-in -->
|
|
54
|
+
|
|
55
|
+
**Rule:** If the reader closes the dialog, keep a lasting notice with a Sign in button on the page.
|
|
56
|
+
|
|
57
|
+
**Why:** The reader can sign in when ready without losing the page.
|
|
58
|
+
|
|
59
|
+
**Do:** Show “You are signed out” with Sign in.
|
|
60
|
+
|
|
61
|
+
**Don't:** Remove the dialog and show no sign-in action.
|
package/guidelines/stat-bands.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**Why:** A shared layout puts every figure's value, change and basis in the same place.
|
|
10
10
|
|
|
11
|
-
**Do:** One card per figure:
|
|
11
|
+
**Do:** One card per figure: one size, a soft line each, arrow, signed change, caption above the row.
|
|
12
12
|
|
|
13
13
|
**Don't:** Heading-sized figures, a capitalised 10px status chip, no comparison basis.
|
|
14
14
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
**Why:** Percentages need a basis that readers can find.
|
|
36
36
|
|
|
37
|
-
**Except:** A comparison basis may be screen-reader-only when the visible control names the period. Use this exception for the
|
|
37
|
+
**Except:** A comparison basis may be screen-reader-only when the visible control names the period. Use this exception for the dashboard pattern.
|
|
38
38
|
|
|
39
39
|
**Do:** The basis once, in a caption each change references or beside one exception; the caption before and outside every figure.
|
|
40
40
|
|
|
@@ -61,3 +61,15 @@
|
|
|
61
61
|
**Do:** “Exports include only filtered rows.”
|
|
62
62
|
|
|
63
63
|
**Don't:** “Export quickly and easily.”
|
|
64
|
+
|
|
65
|
+
## Size a field to its input
|
|
66
|
+
|
|
67
|
+
<!-- rule: field-length -->
|
|
68
|
+
|
|
69
|
+
**Rule:** Size a field to its expected input, so a short code gets a short field.
|
|
70
|
+
|
|
71
|
+
**Why:** A field wider than its input reads as an empty box, and it takes the width denser controls need.
|
|
72
|
+
|
|
73
|
+
**Do:** A short field that fits a currency code.
|
|
74
|
+
|
|
75
|
+
**Don't:** The same field grown across the card.
|
package/guidelines/the-page.md
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
|
|
123
123
|
**Don't:** Open one automatically when the page loads.
|
|
124
124
|
|
|
125
|
-
**Except:** When a session ends while the reader works, open a sign-in dialog over the page and
|
|
125
|
+
**Except:** When a session ends while the reader works, open a sign-in dialog over the page, keep its shell and title, and replace its data with skeleton shapes until sign-in.
|
|
126
126
|
|
|
127
127
|
## Keep table density consistent
|
|
128
128
|
|
|
@@ -138,6 +138,32 @@
|
|
|
138
138
|
|
|
139
139
|
**Except:** Use the spacing required by the busiest table.
|
|
140
140
|
|
|
141
|
+
## Brand the background behind a dialog page
|
|
142
|
+
|
|
143
|
+
<!-- rule: branded-background -->
|
|
144
|
+
|
|
145
|
+
**Rule:** Give each product its own branded background behind a dialog-only page.
|
|
146
|
+
|
|
147
|
+
**Why:** The kit's one default gradient does not distinguish a product.
|
|
148
|
+
|
|
149
|
+
**Do:** Set a product colour or a slow-moving gradient behind the dialog. The kit default stays otherwise.
|
|
150
|
+
|
|
151
|
+
**Don't:** Put no field, label or button on the branded ground. Keep the task inside the dialog.
|
|
152
|
+
|
|
153
|
+
**Except:** A wordmark and a slogan may stand on the ground. A dialog clears 3:1 against its ground in both themes, except the sign-in and Consent ground C, which the owner chose at 1.60:1 to 1.51:1 light and 1.08:1 to 1.04:1 dark.
|
|
154
|
+
|
|
155
|
+
## The sign-in note names who can sign in
|
|
156
|
+
|
|
157
|
+
<!-- rule: sign-in-note -->
|
|
158
|
+
|
|
159
|
+
**Rule:** The sign-in note states who can sign in without naming the product.
|
|
160
|
+
|
|
161
|
+
**Why:** A product name ties the note to one product, and the note breaks when another app uses the screen.
|
|
162
|
+
|
|
163
|
+
**Do:** Write "Only work accounts can sign in."
|
|
164
|
+
|
|
165
|
+
**Don't:** Name the product or its domain in the note.
|
|
166
|
+
|
|
141
167
|
## Write a useful introduction
|
|
142
168
|
|
|
143
169
|
<!-- rule: lede -->
|
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
column-gap: calc(var(--tap-gap) + var(--space-1) + 1px) !important;
|
|
86
86
|
}
|
|
87
87
|
:is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child) {
|
|
88
|
-
margin-bottom: calc(var(--tap-gap) - var(--space-
|
|
88
|
+
margin-bottom: calc(var(--tap-gap) - var(--space-10)) !important;
|
|
89
89
|
}
|
|
90
90
|
.ui-stack > .ui-toolbar:not(:last-child) {
|
|
91
91
|
margin-bottom: var(--tap-gap) !important;
|
|
@@ -146,6 +146,9 @@
|
|
|
146
146
|
row-gap: var(--tap-gap) !important;
|
|
147
147
|
--tap-clear-y: var(--tap-gap);
|
|
148
148
|
}
|
|
149
|
+
.ui-card-stack {
|
|
150
|
+
--tap-clear-y: var(--tap-gap);
|
|
151
|
+
}
|
|
149
152
|
.ui-datepicker__grid {
|
|
150
153
|
row-gap: var(--tap-gap) !important;
|
|
151
154
|
--tap-clear-x: var(--space-1, 4px);
|
|
@@ -287,6 +290,9 @@
|
|
|
287
290
|
.rx-scrim.is-open .rx-modal {
|
|
288
291
|
transform: none;
|
|
289
292
|
}
|
|
293
|
+
.rx-modal--sm {
|
|
294
|
+
width: min(calc(var(--panel-sm) + var(--space-10)), 96vw);
|
|
295
|
+
}
|
|
290
296
|
.rx-modal__head {
|
|
291
297
|
display: flex;
|
|
292
298
|
align-items: center;
|
|
@@ -730,11 +736,11 @@
|
|
|
730
736
|
stroke-width: 2.25;
|
|
731
737
|
}
|
|
732
738
|
@media (max-width: 560px) {
|
|
733
|
-
.ui-kv {
|
|
739
|
+
.ui-kv--two-columns {
|
|
734
740
|
grid-template-columns: minmax(0, 1fr);
|
|
735
741
|
row-gap: var(--space-3);
|
|
736
742
|
}
|
|
737
|
-
.ui-kv > .ui-drawer__row {
|
|
743
|
+
.ui-kv--two-columns > .ui-drawer__row {
|
|
738
744
|
display: block;
|
|
739
745
|
}
|
|
740
746
|
}
|
package/react/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare const Switch: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<H
|
|
|
33
33
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
34
34
|
|
|
35
35
|
type ButtonOptions = {
|
|
36
|
-
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
|
|
36
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'outline' | 'danger' | 'link';
|
|
37
37
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
38
38
|
icon?: string;
|
|
39
39
|
/** Decorative caller artwork, before the label; takes precedence over icon. */
|
|
@@ -82,7 +82,7 @@ type AvatarProps = {
|
|
|
82
82
|
name?: string | null;
|
|
83
83
|
/** A photo. The letters show if it fails to load. */
|
|
84
84
|
src?: string;
|
|
85
|
-
size?: 24 | 32;
|
|
85
|
+
size?: 24 | 32 | 48;
|
|
86
86
|
/** A dashed ring in place of a person: no value, or a "No one" row. */
|
|
87
87
|
empty?: boolean;
|
|
88
88
|
};
|
|
@@ -212,10 +212,11 @@ type ModalProps = {
|
|
|
212
212
|
onClose: () => void;
|
|
213
213
|
footer?: ReactNode;
|
|
214
214
|
children?: ReactNode;
|
|
215
|
+
size?: 'sm';
|
|
215
216
|
role?: 'dialog' | 'alertdialog';
|
|
216
217
|
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
217
218
|
};
|
|
218
|
-
declare function Modal({ open, title, onClose, footer, children, initialFocusRef, role }: ModalProps): react.ReactPortal | null;
|
|
219
|
+
declare function Modal({ open, title, onClose, footer, children, initialFocusRef, role, size }: ModalProps): react.ReactPortal | null;
|
|
219
220
|
|
|
220
221
|
type AccountSection = {
|
|
221
222
|
id: string;
|
|
@@ -770,6 +771,8 @@ type DrawerSectionProps = Omit<ComponentPropsWithoutRef<'section'>, 'title'> & {
|
|
|
770
771
|
declare function DrawerSection({ title, headingLevel, className, children, ...rest }: DrawerSectionProps): react.JSX.Element;
|
|
771
772
|
|
|
772
773
|
type SnippetProps = {
|
|
774
|
+
/** Optional bar title; a block with no title keeps the copy action in flow
|
|
775
|
+
* beside the code, so the copy icon reserves its own space. */
|
|
773
776
|
label?: string;
|
|
774
777
|
/** Original text to copy; displayed when children are absent. */
|
|
775
778
|
code?: string;
|
|
@@ -777,10 +780,14 @@ type SnippetProps = {
|
|
|
777
780
|
children?: ReactNode;
|
|
778
781
|
copy?: boolean;
|
|
779
782
|
reveal?: boolean;
|
|
783
|
+
/** Wraps the code instead of scrolling it, for a command a reader copies whole. */
|
|
784
|
+
wrap?: boolean;
|
|
785
|
+
/** Called after a successful copy, so a page can show its own result. */
|
|
786
|
+
onCopy?: () => void;
|
|
780
787
|
/** Accessible name and tooltip for the icon-only copy button; name what it copies. */
|
|
781
788
|
copyLabel?: string;
|
|
782
789
|
};
|
|
783
|
-
declare function Snippet({ label, code, children, copy, reveal, copyLabel }: SnippetProps): react.JSX.Element;
|
|
790
|
+
declare function Snippet({ label, code, children, copy, reveal, wrap, onCopy, copyLabel }: SnippetProps): react.JSX.Element;
|
|
784
791
|
|
|
785
792
|
type TabItem = {
|
|
786
793
|
value: string;
|
|
@@ -915,6 +922,9 @@ type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'ar
|
|
|
915
922
|
/** `sm` is the toolbar above a dense table: 32px with 13px text to a mouse, and
|
|
916
923
|
the full field on a touch screen. */
|
|
917
924
|
size?: 'sm';
|
|
925
|
+
/** The whole group's width, for a field that sizes to its expected input instead
|
|
926
|
+
of growing across the toolbar row. */
|
|
927
|
+
width?: string;
|
|
918
928
|
};
|
|
919
929
|
/**
|
|
920
930
|
* The toolbar's search box: one `.ui-input-group` holding the `search` glyph and
|
|
@@ -935,6 +945,9 @@ declare const SearchField: react.ForwardRefExoticComponent<Omit<InputHTMLAttribu
|
|
|
935
945
|
/** `sm` is the toolbar above a dense table: 32px with 13px text to a mouse, and
|
|
936
946
|
the full field on a touch screen. */
|
|
937
947
|
size?: "sm";
|
|
948
|
+
/** The whole group's width, for a field that sizes to its expected input instead
|
|
949
|
+
of growing across the toolbar row. */
|
|
950
|
+
width?: string;
|
|
938
951
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
939
952
|
|
|
940
953
|
type ToastNotice = {
|
|
@@ -999,7 +1012,9 @@ type AppShellProps = AppShellNav & {
|
|
|
999
1012
|
drawerSide?: 'left' | 'right';
|
|
1000
1013
|
/** Current router pathname; the longest matching section or sub-item wins. */
|
|
1001
1014
|
pathname: string;
|
|
1002
|
-
title
|
|
1015
|
+
/** The page title. Omit it when the page owns its own heading, such as a full-bleed
|
|
1016
|
+
* split layout whose title stands in one column (#850). */
|
|
1017
|
+
title?: string;
|
|
1003
1018
|
children?: ReactNode;
|
|
1004
1019
|
word?: string;
|
|
1005
1020
|
brand?: ReactNode;
|
|
@@ -1047,11 +1062,27 @@ declare function AppShell({ sections, groups, pathname, title, children, word, b
|
|
|
1047
1062
|
type AuthShellProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
1048
1063
|
brand: ReactNode;
|
|
1049
1064
|
children: ReactNode;
|
|
1050
|
-
|
|
1051
|
-
|
|
1065
|
+
/** Split layout: the brand stands on the branded ground beside the task, which sits
|
|
1066
|
+
* on the plain page with no card box. On a small screen the brand half becomes a
|
|
1067
|
+
* band at the top. #850 */
|
|
1068
|
+
split?: boolean;
|
|
1069
|
+
/** A slogan under the brand in the split layout's brand half. */
|
|
1070
|
+
tagline?: ReactNode;
|
|
1071
|
+
/** The brand stands on the branded ground above the card, not inside it. #850 */
|
|
1072
|
+
brandAbove?: boolean;
|
|
1073
|
+
};
|
|
1074
|
+
/** Centers one auth task on the kit's auth card, or splits the brand and the task. */
|
|
1052
1075
|
declare const AuthShell: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
1053
1076
|
brand: ReactNode;
|
|
1054
1077
|
children: ReactNode;
|
|
1078
|
+
/** Split layout: the brand stands on the branded ground beside the task, which sits
|
|
1079
|
+
* on the plain page with no card box. On a small screen the brand half becomes a
|
|
1080
|
+
* band at the top. #850 */
|
|
1081
|
+
split?: boolean;
|
|
1082
|
+
/** A slogan under the brand in the split layout's brand half. */
|
|
1083
|
+
tagline?: ReactNode;
|
|
1084
|
+
/** The brand stands on the branded ground above the card, not inside it. #850 */
|
|
1085
|
+
brandAbove?: boolean;
|
|
1055
1086
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
1056
1087
|
|
|
1057
1088
|
type FooterLink = {
|
|
@@ -1098,8 +1129,13 @@ type EmptyStateProps = {
|
|
|
1098
1129
|
icon?: string;
|
|
1099
1130
|
art?: ReactNode;
|
|
1100
1131
|
actions?: ReactNode;
|
|
1132
|
+
className?: string;
|
|
1133
|
+
/** Heading level for the title, as Card's `level`. The default 0 renders a plain div,
|
|
1134
|
+
* so an empty state keeps the face and heading level it always had; give 2 for a
|
|
1135
|
+
* display-face heading, as the #850 no-results and blank states do. */
|
|
1136
|
+
level?: number;
|
|
1101
1137
|
};
|
|
1102
|
-
declare function EmptyState({ variant, title, sub, icon, art, actions }: EmptyStateProps): react.JSX.Element;
|
|
1138
|
+
declare function EmptyState({ variant, title, sub, icon, art, actions, className, level }: EmptyStateProps): react.JSX.Element;
|
|
1103
1139
|
|
|
1104
1140
|
/** Place in a head script before styles load to apply the theme before first paint. */
|
|
1105
1141
|
declare const THEME_INIT_SCRIPT = "(()=>{let t;try{t=localStorage.getItem('apliteni-strategy-theme')}catch{}document.documentElement.setAttribute('data-theme',t==='dark'||t==='light'?t:window.matchMedia?.('(prefers-color-scheme: light)').matches?'light':'dark')})()";
|