@apliteni/apliteni-ui 0.180.0 → 0.184.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 +66 -17
- package/guidelines/account-and-settings.md +13 -13
- package/package.json +1 -1
- package/react/README.md +22 -2
- package/react/dist/index.css +117 -0
- package/react/dist/index.d.ts +25 -6
- package/react/dist/index.js +390 -208
- package/src/styles/card.css +10 -1
- package/src/styles/chart.css +33 -21
- package/src/styles/table.css +17 -0
- package/src/tokens/tokens.css +3 -0
package/docs/components.md
CHANGED
|
@@ -58,8 +58,9 @@ Neither attribute changes the type. `--font-display` is for headings and brand m
|
|
|
58
58
|
`--font-sans` is for all text that the user reads, and `--font-mono` is for code. The package
|
|
59
59
|
does not ship the font files, so your page loads them. See [Typefaces](foundations.md#typefaces).
|
|
60
60
|
|
|
61
|
-
Use `ThemeToggle` to let the user choose the theme.
|
|
62
|
-
|
|
61
|
+
Use `ThemeToggle` to let the user choose the theme from a bar. Use [`ThemeChoice`](#theme-choice)
|
|
62
|
+
on a settings page. Put `THEME_INIT_SCRIPT` in a `<script>` in the `<head>`, so the first paint has
|
|
63
|
+
the stored theme. Use `AccentPicker` to let the user choose
|
|
63
64
|
the accent. It calls `onChange`. Your page sets `data-accent` and stores the choice. `ACCENTS`
|
|
64
65
|
from the root entry lists the accent names.
|
|
65
66
|
|
|
@@ -164,7 +165,8 @@ in their own row under the title. `back` puts a [back link](#back-link) above th
|
|
|
164
165
|
**The account menu.** `accountItems` adds rows, such as Account settings and Support, at the top
|
|
165
166
|
of every account menu. A row takes `href` to go to a page, or `onSelect` to open something in
|
|
166
167
|
place. A separator stands before Sign out. In the topbar layout, a Theme row opens a submenu with
|
|
167
|
-
Auto, Light and Dark.
|
|
168
|
+
Auto, Light and Dark. The account button's name is "Signed in as", the name and the address. It
|
|
169
|
+
holds each line of text that the button shows, and the menu takes the same name.
|
|
168
170
|
|
|
169
171
|
**Topbar layout only.**
|
|
170
172
|
|
|
@@ -636,6 +638,29 @@ wider. A long label wraps inside its own option.
|
|
|
636
638
|
keys move and choose, wrap at the ends and skip disabled options. Home and End go to the first and
|
|
637
639
|
last enabled option. In forced colours the chosen option uses the system highlight colours.
|
|
638
640
|
|
|
641
|
+
### Theme choice
|
|
642
|
+
|
|
643
|
+
Use `ThemeChoice` for the theme on a settings page. Use `ThemeToggle` in a bar. Use `Segmented`
|
|
644
|
+
for other preferences.
|
|
645
|
+
|
|
646
|
+
```tsx
|
|
647
|
+
<Card title="Theme"><ThemeChoice /></Card>
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
`label` names the group, `Theme` by default. The choice applies and is stored at once, as with
|
|
651
|
+
`ThemeToggle`, so the page needs no Save.
|
|
652
|
+
|
|
653
|
+
**What the user sees.** Three cards in one row at every width: System, Light and Dark. Each card is
|
|
654
|
+
a small picture of a page in that theme, drawn from the theme's tokens, with its name under it.
|
|
655
|
+
System is half light and half dark. The chosen card has a fill, and its name is in strong, heavier
|
|
656
|
+
ink. Hover gives another card half that fill. The first and last pictures sit on the card's text
|
|
657
|
+
edges. The fill extends 8 px into the card's padding, and the focus ring extends 3 px more. So put
|
|
658
|
+
the group in a padded container, such as `Card`.
|
|
659
|
+
|
|
660
|
+
**Keyboard and screen reader.** One named radio group, with one Tab stop on the chosen card. The
|
|
661
|
+
arrow keys move and choose. The focus ring is the kit's band around the card, and nothing else.
|
|
662
|
+
In forced colours the chosen card's name takes the system highlight colour.
|
|
663
|
+
|
|
639
664
|
### Tabs
|
|
640
665
|
|
|
641
666
|
Use `Tabs` when each choice shows a different block of content on the same page. Use
|
|
@@ -978,8 +1003,10 @@ tooltip or a picker already used closes only that overlay. The next Escape close
|
|
|
978
1003
|
|
|
979
1004
|
### Account window
|
|
980
1005
|
|
|
981
|
-
Use `AccountWindow` for account
|
|
982
|
-
|
|
1006
|
+
Use `AccountWindow` for an account area of several groups. When the account area is only a
|
|
1007
|
+
profile and a few preferences, open a Profile page and a Preferences page in the app shell from
|
|
1008
|
+
the account menu, with no second navigation column:
|
|
1009
|
+
[Account and settings](../guidelines/account-and-settings.md).
|
|
983
1010
|
|
|
984
1011
|
```tsx
|
|
985
1012
|
<AccountWindow open={open} onClose={close} reader={{ name: 'Dana Reyes', email: 'dana@example.com' }}
|
|
@@ -1079,7 +1106,8 @@ least 4.5:1 on a plain or a selected row.
|
|
|
1079
1106
|
**Scrolling.** With `stickyHeader` or `pinnedIdentity`, the table stands in a named scroll region.
|
|
1080
1107
|
`pinnedIdentity` pins the first column, or the column whose key you give. A table wider than its
|
|
1081
1108
|
frame scrolls sideways, and the page does not. The pinned column draws its divider only when the
|
|
1082
|
-
region can scroll.
|
|
1109
|
+
region can scroll. When the region is scrolled, the next column's text stops one cell padding
|
|
1110
|
+
short of the divider. Below 720px a pinned cell keeps one line and is cut at
|
|
1083
1111
|
`--ui-table-identity-max`. Lower that cap for a table with a selection column. Below 560px the
|
|
1084
1112
|
frame has no scrollbar. `scrollLabel` names the region, `Table` by default. Use the subject of the table, such as
|
|
1085
1113
|
`Invoices`, and name the gesture only when the columns overflow at every width.
|
|
@@ -1098,10 +1126,14 @@ selected. A dense table marks a selected row only with its box.
|
|
|
1098
1126
|
focus. A `.ui-table__sub` puts a second value under the first, such as an email under a name.
|
|
1099
1127
|
`.ui-table__pair` groups a reference and a status, and stacks them when the cell is narrow.
|
|
1100
1128
|
|
|
1101
|
-
**Keyboard and screen reader.**
|
|
1102
|
-
edge, so the arrow keys, a trackpad and a finger reach the same columns.
|
|
1129
|
+
**Keyboard and screen reader.** When its content overflows, the scroll region takes the focus and
|
|
1130
|
+
draws the ring inside its edge, so the arrow keys, a trackpad and a finger reach the same columns.
|
|
1131
|
+
When the content fits, also after a resize, the region is not a Tab stop. A control in the region
|
|
1132
|
+
that takes the focus by keyboard or by script scrolls fully into view.
|
|
1103
1133
|
|
|
1104
1134
|
**In a card.** The table reaches the card's edges, and its end cells keep the card's text edge.
|
|
1135
|
+
At 560px and narrower, a row table's end cells pad by 16px, so its first column starts 8px
|
|
1136
|
+
outside the card's text edge. A row table has hover and is neither zebra nor dense.
|
|
1105
1137
|
`.ui-card--fit` makes the card end at the table's content.
|
|
1106
1138
|
|
|
1107
1139
|
### Pagination
|
|
@@ -1177,10 +1209,10 @@ chart has the title. `format` prints exact values in the readout, the live regio
|
|
|
1177
1209
|
|
|
1178
1210
|
| `variant` | Data | `look` values | Default look |
|
|
1179
1211
|
| --- | --- | --- | --- |
|
|
1180
|
-
| `months` | `periods`, `series` | none:
|
|
1212
|
+
| `months` | `periods`, `series` | none: columns per period with a line across them, fitted to the card | |
|
|
1181
1213
|
| `bridge` | `steps` | none: one period from a start total to a result | |
|
|
1182
1214
|
| `spark` | `periods`, `series` | none: one series at text size, for a stat band `trend` | |
|
|
1183
|
-
| `line` | `periods`, `series` | `thin`; `points`, a point on each value; `labels`, the last value at the line's end
|
|
1215
|
+
| `line` | `periods`, `series` | `thin`; `points`, a point on each value; `labels`, the last value at the line's end | `thin` |
|
|
1184
1216
|
| `area` | `periods`, `series` | `flat`, each series from zero; `curves`, each series from zero as a smooth curve with a point on each value; `stacked`; `share`, each column is 100% | `stacked` |
|
|
1185
1217
|
| `stacked` | `periods`, `series` | `columns`; `share`, each column is 100%; `rows`, a bar for each period | `columns` |
|
|
1186
1218
|
| `donut` | `slices` | `thin`, the total in the centre; `table`, a list of the shares beside the ring; `labels`, the name, value and share at each slice | `table` |
|
|
@@ -1200,17 +1232,34 @@ values and hangs them under the line.
|
|
|
1200
1232
|
`good`, `bad` and `neutral`. The product accent does not change them. Each full tone is at least
|
|
1201
1233
|
3:1 on the card and the page in both themes.
|
|
1202
1234
|
|
|
1203
|
-
**What the user sees.**
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1235
|
+
**What the user sees.** In `months`, every period shares the card's width, so the plot never
|
|
1236
|
+
scrolls. A bar is one flat fill of its tone. It takes two thirds of its column, and at most 48px.
|
|
1237
|
+
Where the period labels do not fit, the chart prints every second, third or later label, counted
|
|
1238
|
+
from the first period that is not final, or from the latest period. Set `values` to print each
|
|
1239
|
+
bar's value past its end, in `formatAxis`: over a bar that grows up from zero, and under a bar
|
|
1240
|
+
that grows down. A value takes at most half the space to the next value,
|
|
1241
|
+
at the 12px text size, and stays inside the plot. A value that does not fit there is left out.
|
|
1242
|
+
The readout and the table always show it. A chart that prints no value gives that room to its
|
|
1243
|
+
bars. `legend`
|
|
1244
|
+
shows the legend. A period with `estimated` keeps its solid mark in the series
|
|
1245
|
+
ink. Set `estimated` to `'incomplete'` for the period that is still running, to `'projected'` for a
|
|
1246
|
+
future period, or to `true` for any other estimate. In `months`, one solid line stands before the
|
|
1247
|
+
first period that is not final, and the words "Not final" stand over that group. Put the periods
|
|
1248
|
+
that are not final last. The hover and keyboard readout and each table row say "Incomplete",
|
|
1249
|
+
"Projected" or "Estimated", followed by the `note`. The readout of a period also compares it with
|
|
1250
|
+
the period before it. Set `compare: false` on a period to show its value with no comparison text.
|
|
1251
|
+
A switch at the top right
|
|
1252
|
+
shows the same numbers as a chart or as a table. In a titled `Card`, the switch stands in the
|
|
1253
|
+
card's title row. `table={false}` removes the switch and the table. `selectable` with `selected`
|
|
1254
|
+
and `onSelect` lets the user pick a column, which gets a band behind it. In the other variants, at
|
|
1255
|
+
phone widths the plot scrolls and the value axis stays. A chart of periods that is wider than its
|
|
1256
|
+
card opens at its latest period. A bridge opens at its opening total.
|
|
1209
1257
|
|
|
1210
1258
|
**Keyboard and screen reader.** The switch is the first Tab stop and the chart is the second. Left,
|
|
1211
1259
|
Right, Home and End move between columns and announce each one. Enter picks a column when
|
|
1212
1260
|
`selectable` is set. A plot that scrolls adds one more Tab stop for the scroll box. On a touch
|
|
1213
|
-
screen, the first tap on a mark opens its readout and does not call `onSelect`.
|
|
1261
|
+
screen, the first tap on a mark opens its readout and does not call `onSelect`. After Escape, a
|
|
1262
|
+
new tap on the same mark opens its readout again. Every value is
|
|
1214
1263
|
reachable at full strength by pointer or keyboard.
|
|
1215
1264
|
|
|
1216
1265
|
### Table values
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Account and settings
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Choose pages or the account window by size
|
|
4
4
|
|
|
5
5
|
<!-- rule: modal -->
|
|
6
6
|
|
|
7
|
-
**Rule:** Open
|
|
7
|
+
**Rule:** Open Profile and Preferences as two pages in the app shell, and keep the account window for an account area of several groups.
|
|
8
8
|
|
|
9
|
-
**Why:**
|
|
9
|
+
**Why:** A column of sections beside the app sidebar reads as a second navigation, and a name and a theme fill no column.
|
|
10
10
|
|
|
11
|
-
**Do:**
|
|
11
|
+
**Do:** Open each page from the account menu, with no sidebar entry lit.
|
|
12
12
|
|
|
13
|
-
**Don't:**
|
|
13
|
+
**Don't:** Open a window with its own sections for a photo and a theme.
|
|
14
14
|
|
|
15
|
-
**Except:** On a phone the sections become tabs under the reader
|
|
15
|
+
**Except:** On a phone the window's sections become tabs under the reader.
|
|
16
16
|
|
|
17
|
-
## Give the
|
|
17
|
+
## Give the account window its own navigation
|
|
18
18
|
|
|
19
19
|
<!-- rule: nav -->
|
|
20
20
|
|
|
21
|
-
**Rule:** Give the
|
|
21
|
+
**Rule:** Give the account window one entry per group a reader arrives to change.
|
|
22
22
|
|
|
23
23
|
**Why:** A reader already knows which group they came for, and a list of names is read faster than every group in turn.
|
|
24
24
|
|
|
25
|
-
**Do:** Stand the entries beside the pane — above it on a phone — and mark the one
|
|
25
|
+
**Do:** Stand the entries beside the pane — above it on a phone — and mark the one shown.
|
|
26
26
|
|
|
27
27
|
**Don't:** Run all five groups down one scroll.
|
|
28
28
|
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
<!-- rule: menu -->
|
|
34
34
|
|
|
35
|
-
**Rule:** Keep the account menu to the reader,
|
|
35
|
+
**Rule:** Keep the account menu to the reader, the ways in, Support and Sign out, and Theme only where no page holds it.
|
|
36
36
|
|
|
37
37
|
**Why:** A setting answered inside a menu has no address to link, search or come back to.
|
|
38
38
|
|
|
39
|
-
**Do:** Name the reader, then
|
|
39
|
+
**Do:** Name the reader, then Profile, Preferences and Support.
|
|
40
40
|
|
|
41
41
|
**Don't:** Answer the settings in the menu, a row per setting.
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
**Do:** Flip the weekly digest where it is named.
|
|
52
52
|
|
|
53
|
-
**Don't:** Open the
|
|
53
|
+
**Don't:** Open the account window on a pane to flip one switch.
|
|
54
54
|
|
|
55
55
|
**Except:** A question that must be answered before anything else still stops the page.
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
**Rule:** Name an account pane’s action after the change it makes.
|
|
62
62
|
|
|
63
|
-
**Why:** On a pane of
|
|
63
|
+
**Why:** On a pane of agent tokens, Save does not say what the press changes.
|
|
64
64
|
|
|
65
65
|
**Do:** End the tokens pane with “Create token”.
|
|
66
66
|
|
package/package.json
CHANGED
package/react/README.md
CHANGED
|
@@ -682,6 +682,20 @@ cannot change an earlier paint.
|
|
|
682
682
|
<script nonce={nonce} dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} />
|
|
683
683
|
```
|
|
684
684
|
|
|
685
|
+
## ThemeChoice
|
|
686
|
+
|
|
687
|
+
ThemeChoice shows the theme as three picture cards on a settings page: System, Light
|
|
688
|
+
and Dark. It reads and stores the choice as ThemeToggle does, with the same key, the
|
|
689
|
+
same root attributes and the same event.
|
|
690
|
+
|
|
691
|
+
```tsx
|
|
692
|
+
import { Card, ThemeChoice } from '@apliteni/apliteni-ui/react';
|
|
693
|
+
|
|
694
|
+
<Card title="Theme"><ThemeChoice /></Card>
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
`label` names the radio group, `Theme` by default.
|
|
698
|
+
|
|
685
699
|
## AppShell
|
|
686
700
|
|
|
687
701
|
AppShell includes the kit’s rail and top band. Pass the current router pathname so the longest matching section path becomes active. Spread the props from `renderLink` onto your router link. The rail’s folded state is saved in a shared cookie. On phones, the bar shows up to four sections. If there are more, it shows three sections and a More sheet. Provide no more than one primary page action. The palette defaults to section links; pass `palette` to add custom commands. Import both the kit CSS and React CSS.
|
|
@@ -924,8 +938,14 @@ one series at text size with no axis, for a stat band's `trend` slot.
|
|
|
924
938
|
The numbers are yours and so is the wording. `format` prints exact values in the readout, the
|
|
925
939
|
live region and the table; `formatAxis` prints the ticks, which are whole units, and defaults
|
|
926
940
|
to `format`. A `bars-below` series takes positive magnitudes and is drawn under the zero line.
|
|
927
|
-
A period marked `estimated` keeps its
|
|
928
|
-
|
|
941
|
+
A period marked `estimated` keeps its solid mark in the series ink. `estimated: 'incomplete'` marks
|
|
942
|
+
the period that is still running, `'projected'` a future period, and `true` any other estimate.
|
|
943
|
+
A months chart draws one solid line before the first period that is not final, with "Not final"
|
|
944
|
+
over that group. The readout and the optional table say "Incomplete", "Projected" or
|
|
945
|
+
"Estimated", followed by the `note`. A period with `compare: false` shows its value in the
|
|
946
|
+
readout with no comparison. A months chart fits its card and does not scroll: it prints fewer
|
|
947
|
+
period labels where they do not fit, and `values` prints each bar's value where it fits. Any
|
|
948
|
+
other chart of periods that is wider than its card opens at its latest period.
|
|
929
949
|
|
|
930
950
|
A bar series names a tone. Each tone has its own hue: `accent` is blue and `accent-soft` is
|
|
931
951
|
cyan, so two series read apart by hue. `good` and `bad` say which way
|
package/react/dist/index.css
CHANGED
|
@@ -1457,3 +1457,120 @@
|
|
|
1457
1457
|
.ui-auth__brand > span {
|
|
1458
1458
|
display: flex;
|
|
1459
1459
|
}
|
|
1460
|
+
|
|
1461
|
+
/* src/ThemeChoice.css */
|
|
1462
|
+
.ui-theme-choice {
|
|
1463
|
+
display: grid;
|
|
1464
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1465
|
+
gap: var(--space-3);
|
|
1466
|
+
margin-inline: calc(-1 * var(--space-2));
|
|
1467
|
+
}
|
|
1468
|
+
.ui-theme-choice__option {
|
|
1469
|
+
display: flex;
|
|
1470
|
+
flex-direction: column;
|
|
1471
|
+
align-items: center;
|
|
1472
|
+
gap: var(--space-2);
|
|
1473
|
+
min-width: 0;
|
|
1474
|
+
padding: var(--space-2);
|
|
1475
|
+
border-radius: var(--radius-lg);
|
|
1476
|
+
color: var(--text);
|
|
1477
|
+
cursor: pointer;
|
|
1478
|
+
transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
1479
|
+
}
|
|
1480
|
+
.ui-theme-choice__pic {
|
|
1481
|
+
position: relative;
|
|
1482
|
+
display: block;
|
|
1483
|
+
container-type: inline-size;
|
|
1484
|
+
width: 100%;
|
|
1485
|
+
aspect-ratio: 2 / 1.1;
|
|
1486
|
+
overflow: hidden;
|
|
1487
|
+
border: 1px solid var(--border);
|
|
1488
|
+
border-radius: var(--radius-md);
|
|
1489
|
+
transition: transform var(--dur-fast) var(--ease);
|
|
1490
|
+
}
|
|
1491
|
+
.ui-theme-choice__option:not(:has(:checked)):hover {
|
|
1492
|
+
background: color-mix(in srgb, var(--surface-3) 50%, transparent);
|
|
1493
|
+
color: var(--strong);
|
|
1494
|
+
}
|
|
1495
|
+
.ui-theme-choice__option:has(:checked) {
|
|
1496
|
+
background: var(--surface-3);
|
|
1497
|
+
color: var(--strong);
|
|
1498
|
+
font-weight: var(--weight-semibold);
|
|
1499
|
+
}
|
|
1500
|
+
.ui-theme-choice__option:has(.ui-theme-choice__input:focus-visible) {
|
|
1501
|
+
outline: var(--ring);
|
|
1502
|
+
outline-offset: var(--ring-offset);
|
|
1503
|
+
}
|
|
1504
|
+
.ui-theme-choice__option:active .ui-theme-choice__pic {
|
|
1505
|
+
transform: translateY(1px);
|
|
1506
|
+
}
|
|
1507
|
+
.ui-theme-choice__name {
|
|
1508
|
+
overflow-wrap: anywhere;
|
|
1509
|
+
text-align: center;
|
|
1510
|
+
}
|
|
1511
|
+
.ui-theme-choice__scene {
|
|
1512
|
+
position: absolute;
|
|
1513
|
+
inset: 0;
|
|
1514
|
+
display: grid;
|
|
1515
|
+
grid-template-columns: 24% minmax(0, 1fr);
|
|
1516
|
+
background: var(--bg);
|
|
1517
|
+
}
|
|
1518
|
+
.ui-theme-choice__scene + .ui-theme-choice__scene {
|
|
1519
|
+
clip-path: inset(0 0 0 50%);
|
|
1520
|
+
}
|
|
1521
|
+
.ui-theme-choice__rail {
|
|
1522
|
+
display: flex;
|
|
1523
|
+
flex-direction: column;
|
|
1524
|
+
gap: 4cqi;
|
|
1525
|
+
padding: 8cqi 5cqi;
|
|
1526
|
+
border-inline-end: 1px solid var(--border);
|
|
1527
|
+
background: var(--surface);
|
|
1528
|
+
}
|
|
1529
|
+
.ui-theme-choice__main {
|
|
1530
|
+
display: flex;
|
|
1531
|
+
flex-direction: column;
|
|
1532
|
+
gap: 5cqi;
|
|
1533
|
+
padding: 8cqi 7cqi;
|
|
1534
|
+
}
|
|
1535
|
+
.ui-theme-choice__title {
|
|
1536
|
+
width: 40%;
|
|
1537
|
+
height: 3cqi;
|
|
1538
|
+
border-radius: 2cqi;
|
|
1539
|
+
background: var(--strong);
|
|
1540
|
+
}
|
|
1541
|
+
.ui-theme-choice__card {
|
|
1542
|
+
display: flex;
|
|
1543
|
+
flex: 1;
|
|
1544
|
+
flex-direction: column;
|
|
1545
|
+
justify-content: center;
|
|
1546
|
+
gap: 4cqi;
|
|
1547
|
+
padding-inline: 7cqi;
|
|
1548
|
+
border: 1px solid var(--border);
|
|
1549
|
+
border-radius: 4cqi;
|
|
1550
|
+
background: var(--surface);
|
|
1551
|
+
}
|
|
1552
|
+
.ui-theme-choice__rail > span,
|
|
1553
|
+
.ui-theme-choice__card > span {
|
|
1554
|
+
height: 2cqi;
|
|
1555
|
+
border-radius: 1cqi;
|
|
1556
|
+
background: var(--text);
|
|
1557
|
+
}
|
|
1558
|
+
.ui-theme-choice__rail > span,
|
|
1559
|
+
.ui-theme-choice__card > span + span {
|
|
1560
|
+
background: var(--muted);
|
|
1561
|
+
}
|
|
1562
|
+
.ui-theme-choice__card > span + span {
|
|
1563
|
+
width: 55%;
|
|
1564
|
+
}
|
|
1565
|
+
@media (forced-colors: active) {
|
|
1566
|
+
.ui-theme-choice__pic {
|
|
1567
|
+
forced-color-adjust: none;
|
|
1568
|
+
}
|
|
1569
|
+
.ui-theme-choice__input:checked ~ .ui-theme-choice__name {
|
|
1570
|
+
forced-color-adjust: none;
|
|
1571
|
+
padding-inline: var(--space-2);
|
|
1572
|
+
border-radius: var(--radius-sm);
|
|
1573
|
+
background: Highlight;
|
|
1574
|
+
color: HighlightText;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
package/react/dist/index.d.ts
CHANGED
|
@@ -1102,6 +1102,14 @@ type ThemeToggleProps = {
|
|
|
1102
1102
|
};
|
|
1103
1103
|
declare function ThemeToggle({ labelled }: ThemeToggleProps): react.JSX.Element;
|
|
1104
1104
|
|
|
1105
|
+
type ThemeChoiceProps = {
|
|
1106
|
+
/** The group's name. Give the name of the card or the row that holds it. */
|
|
1107
|
+
label?: string;
|
|
1108
|
+
};
|
|
1109
|
+
/** The theme as three picture cards: System, Light and Dark. One radio group, so Tab
|
|
1110
|
+
* stops once and the arrow keys move. A choice applies and is stored at once. */
|
|
1111
|
+
declare function ThemeChoice({ label }: ThemeChoiceProps): react.JSX.Element;
|
|
1112
|
+
|
|
1105
1113
|
type TooltipProps = {
|
|
1106
1114
|
text?: string;
|
|
1107
1115
|
label?: string;
|
|
@@ -1199,11 +1207,18 @@ type ChartPeriod = {
|
|
|
1199
1207
|
label: string;
|
|
1200
1208
|
/** The period as the axis names it. Defaults to `label`'s first word. */
|
|
1201
1209
|
short?: string;
|
|
1202
|
-
/**
|
|
1203
|
-
|
|
1204
|
-
|
|
1210
|
+
/**
|
|
1211
|
+
* The period is not final. `incomplete` is the period still running,
|
|
1212
|
+
* `projected` a future one, and `true` any other estimate. The readout and
|
|
1213
|
+
* the table name the state; the chart at rest prints none.
|
|
1214
|
+
*/
|
|
1215
|
+
estimated?: ChartEstimate;
|
|
1216
|
+
/** Why it is not final. Printed in the readout and in the table. */
|
|
1205
1217
|
note?: string;
|
|
1218
|
+
/** `false` prints the period's value in the readout with no comparison text. */
|
|
1219
|
+
compare?: boolean;
|
|
1206
1220
|
};
|
|
1221
|
+
type ChartEstimate = boolean | 'incomplete' | 'projected';
|
|
1207
1222
|
type ChartSeries = {
|
|
1208
1223
|
id: string;
|
|
1209
1224
|
name: string;
|
|
@@ -1231,7 +1246,7 @@ type ChartBridgeStep = {
|
|
|
1231
1246
|
kind?: 'total' | 'change';
|
|
1232
1247
|
/** A change's amount. A `total` without one takes the running total. */
|
|
1233
1248
|
value?: number;
|
|
1234
|
-
estimated?:
|
|
1249
|
+
estimated?: ChartEstimate;
|
|
1235
1250
|
note?: string;
|
|
1236
1251
|
};
|
|
1237
1252
|
type ChartBridgeTones = {
|
|
@@ -1270,6 +1285,10 @@ type ChartProps = ChartCommon & ({
|
|
|
1270
1285
|
variant?: 'months';
|
|
1271
1286
|
periods: readonly ChartPeriod[];
|
|
1272
1287
|
series: readonly ChartSeries[];
|
|
1288
|
+
/** Print each bar's value past its end, in `formatAxis`: over a bar that grows
|
|
1289
|
+
* up from zero, under one that grows down. A value that does not
|
|
1290
|
+
* fit its bar's room is left out; the readout and the table keep it. */
|
|
1291
|
+
values?: boolean;
|
|
1273
1292
|
} | {
|
|
1274
1293
|
variant: 'spark';
|
|
1275
1294
|
periods: readonly ChartPeriod[];
|
|
@@ -1475,5 +1494,5 @@ declare const NavTabs: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedH
|
|
|
1475
1494
|
declare const PAGE_SIZES: readonly number[];
|
|
1476
1495
|
declare const DEFAULT_PAGE_SIZE: number;
|
|
1477
1496
|
|
|
1478
|
-
export { AccentPicker, AccountMenu, AccountWindow, AppShell, AuthShell, Avatar, BackLink, Badge, BusyRegion, Button, Callout, Card, Chart, CheckList, Checkbox, CommandPalette, Confirm, DEFAULT_PAGE_SIZE, DataTable, DatePicker, DeltaValue, Denied, Drawer, DrawerSection, Dropdown, EmptyState, Feedback, Field, FileDrop, FileField, FilterBar, Footer, Icon, KeyValueList, Modal, NavTabs, NumericValue, PAGE_SIZES, Pagination, Pill, RowIdentity, SearchField, Segmented, SelectField, SidebarNav, Skeleton, SkeletonTable, Snippet, StatBand, StatusDot, Success, SuccessCheck, SuccessPanel, Switch, THEME_INIT_SCRIPT, Tabs, TextArea, TextField, ThemeToggle, Timeline, Toast, Tooltip, TopBar, VersionSwitcher, ViewSwitch, sortTableRows, useToast };
|
|
1479
|
-
export type { Accent, AccentPickerProps, AccountMenuProps, AccountReader, AccountSection, AccountWindowProps, AddFilter, AppShellGroup, AppShellLink, AppShellProps, AppShellSection, AuthShellProps, AvatarProps, BackLinkOwnProps, BackLinkProps, BusyRegionProps, ButtonLinkProps, ButtonProps, CalloutProps, CalloutVariant, ChartAreaLook, ChartBridgeStep, ChartBridgeTones, ChartDonutLook, ChartLineLook, ChartLookSeries, ChartPeriod, ChartProps, ChartSeries, ChartSlice, ChartStackedLook, ChartTone, CheckListProps, CheckboxProps, Column, CommandGroup, CommandItem, CommandPaletteProps, ConfirmProps, DataTableProps, DatePickerMode, DatePickerPreset, DatePickerProps, DatePickerRange, DeltaValueProps, DeniedProps, DrawerProps, DrawerSectionProps, DropdownAvatar, DropdownBadge, DropdownEntry, DropdownItem, DropdownProps, DropdownRowProps, DropdownSearch, DropdownSection, DropdownSeparator, EmptyStateProps, EmptyStateVariant, FeedbackPayload, FeedbackProps, FeedbackResult, FeedbackSection, FieldControlProps, FieldProps, FileDropFile, FileDropProps, FileDropStatus, FileFieldProps, Filter, FilterBarProps, FooterColumn, FooterLink, FooterProps, FooterSocial, KeyValueListProps, KeyValueRow, ModalProps, NativeButtonProps, NavTabBadge, NavTabItem, NavTabsProps, NumericValueProps, PaginationProps, PillProps, RowIdentityProps, SearchFieldProps, SegmentOption, SegmentedProps, SelectFieldProps, SidebarNavBadge, SidebarNavBlock, SidebarNavGroup, SidebarNavItem, SidebarNavLeaf, SidebarNavProps, SidebarNavRow, SidebarNavSection, SidebarNavSections, SkeletonProps, SkeletonTableProps, SnippetProps, StatBandProps, StatDelta, StatFigure, StatTone, StatVariant, StatusDotProps, SuccessCheckProps, SuccessCountdown, SuccessPanelProps, SuccessProps, SwitchProps, TabItem, TableSort, TabsProps, TextAreaProps, TextFieldProps, ThemeToggleProps, TimelineEvent, TimelineEventKind, TimelineProps, ToastNotice, ToastProps, TooltipProps, TopBarProps, Version, VersionSwitcherProps, ViewSwitchItem, ViewSwitchProps };
|
|
1497
|
+
export { AccentPicker, AccountMenu, AccountWindow, AppShell, AuthShell, Avatar, BackLink, Badge, BusyRegion, Button, Callout, Card, Chart, CheckList, Checkbox, CommandPalette, Confirm, DEFAULT_PAGE_SIZE, DataTable, DatePicker, DeltaValue, Denied, Drawer, DrawerSection, Dropdown, EmptyState, Feedback, Field, FileDrop, FileField, FilterBar, Footer, Icon, KeyValueList, Modal, NavTabs, NumericValue, PAGE_SIZES, Pagination, Pill, RowIdentity, SearchField, Segmented, SelectField, SidebarNav, Skeleton, SkeletonTable, Snippet, StatBand, StatusDot, Success, SuccessCheck, SuccessPanel, Switch, THEME_INIT_SCRIPT, Tabs, TextArea, TextField, ThemeChoice, ThemeToggle, Timeline, Toast, Tooltip, TopBar, VersionSwitcher, ViewSwitch, sortTableRows, useToast };
|
|
1498
|
+
export type { Accent, AccentPickerProps, AccountMenuProps, AccountReader, AccountSection, AccountWindowProps, AddFilter, AppShellGroup, AppShellLink, AppShellProps, AppShellSection, AuthShellProps, AvatarProps, BackLinkOwnProps, BackLinkProps, BusyRegionProps, ButtonLinkProps, ButtonProps, CalloutProps, CalloutVariant, ChartAreaLook, ChartBridgeStep, ChartBridgeTones, ChartDonutLook, ChartEstimate, ChartLineLook, ChartLookSeries, ChartPeriod, ChartProps, ChartSeries, ChartSlice, ChartStackedLook, ChartTone, CheckListProps, CheckboxProps, Column, CommandGroup, CommandItem, CommandPaletteProps, ConfirmProps, DataTableProps, DatePickerMode, DatePickerPreset, DatePickerProps, DatePickerRange, DeltaValueProps, DeniedProps, DrawerProps, DrawerSectionProps, DropdownAvatar, DropdownBadge, DropdownEntry, DropdownItem, DropdownProps, DropdownRowProps, DropdownSearch, DropdownSection, DropdownSeparator, EmptyStateProps, EmptyStateVariant, FeedbackPayload, FeedbackProps, FeedbackResult, FeedbackSection, FieldControlProps, FieldProps, FileDropFile, FileDropProps, FileDropStatus, FileFieldProps, Filter, FilterBarProps, FooterColumn, FooterLink, FooterProps, FooterSocial, KeyValueListProps, KeyValueRow, ModalProps, NativeButtonProps, NavTabBadge, NavTabItem, NavTabsProps, NumericValueProps, PaginationProps, PillProps, RowIdentityProps, SearchFieldProps, SegmentOption, SegmentedProps, SelectFieldProps, SidebarNavBadge, SidebarNavBlock, SidebarNavGroup, SidebarNavItem, SidebarNavLeaf, SidebarNavProps, SidebarNavRow, SidebarNavSection, SidebarNavSections, SkeletonProps, SkeletonTableProps, SnippetProps, StatBandProps, StatDelta, StatFigure, StatTone, StatVariant, StatusDotProps, SuccessCheckProps, SuccessCountdown, SuccessPanelProps, SuccessProps, SwitchProps, TabItem, TableSort, TabsProps, TextAreaProps, TextFieldProps, ThemeChoiceProps, ThemeToggleProps, TimelineEvent, TimelineEventKind, TimelineProps, ToastNotice, ToastProps, TooltipProps, TopBarProps, Version, VersionSwitcherProps, ViewSwitchItem, ViewSwitchProps };
|