@apliteni/apliteni-ui 0.177.0 → 0.178.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 +33 -15
- package/docs/foundations.md +6 -4
- package/guidelines/colour-and-theming.md +2 -2
- package/guidelines/component-choice.md +0 -14
- package/guidelines/dense-tables.md +4 -4
- package/guidelines/iconography.md +1 -1
- package/guidelines/the-page.md +1 -1
- package/package.json +1 -1
- package/react/dist/index.css +10 -0
- package/react/dist/index.d.ts +5 -0
- package/react/dist/index.js +71 -26
- package/src/assets/icons.js +4 -0
- package/src/styles/drawer.css +7 -0
- package/src/styles/filter-bar.css +8 -2
- package/src/styles/input.css +6 -2
- package/src/styles/layout.css +5 -3
- package/src/styles/segmented.css +6 -7
- package/src/styles/table.css +14 -0
- package/src/styles/tap-zone.css +10 -0
package/docs/components.md
CHANGED
|
@@ -571,7 +571,9 @@ must have a search field is a rule rather than a recommendation:
|
|
|
571
571
|
A drawer is a panel against one edge of the screen. It appears over a scrim. It lets the reader
|
|
572
572
|
look at or change one thing without leaving the list that opened it. **It groups by heading, never
|
|
573
573
|
by card:** `DrawerSection` puts a heading over a `<dl>` of label and value pairs. A screen reader
|
|
574
|
-
then hears each label with its value. **
|
|
574
|
+
then hears each label with its value. **An icon button at the end of a value, such as a copy
|
|
575
|
+
button, sits on the value's line**, and its row keeps a text row's height. On a phone it reaches
|
|
576
|
+
the 44px tap target. **Groups stand 32px apart, with no line between them.**
|
|
575
577
|
Each group heading stands on a 1px `--border` line, the same line as a table head. **A record can
|
|
576
578
|
lead with its key figure:** put a `<dl class="ui-drawer__figure">` in a group with no heading, as
|
|
577
579
|
the first group. Its `<dt>` is the label, and its `<dd>` holds a `.ui-drawer__figure-value`, set at
|
|
@@ -937,7 +939,7 @@ has no radius, so **the card paints that ring instead**.
|
|
|
937
939
|
|
|
938
940
|
### A toolbar at one column
|
|
939
941
|
|
|
940
|
-
A toolbar above a list opens with a search box, followed by its filters and then its view switch.
|
|
942
|
+
A toolbar above a list opens with a search box, followed by its filters and then its view switch. A create action stands on its own row above the toolbar, at the left.
|
|
941
943
|
`.ui-toolbar` gives its text field a `6rem` flex basis. The row breaks only when the field would
|
|
942
944
|
be squeezed below that size. At `560px`, that basis would become the field's size rather than its
|
|
943
945
|
floor. So at that width the field uses `flex-basis: 100%`. It takes the full line, and the rest
|
|
@@ -953,14 +955,14 @@ chips, the add control and Clear all stand at 32px, level with the field, a drop
|
|
|
953
955
|
small Segmented and a small button. Give the Segmented and the button `size="sm"` yourself. The
|
|
954
956
|
small search field stops at `--panel-sm`, 320px, and the free width goes before the last
|
|
955
957
|
control. A full-size search field still takes the free width. At `560px` and below, each search
|
|
956
|
-
field takes the full line. On a touch screen the row
|
|
957
|
-
and a chip, Clear all, a dropdown trigger, the Segmented and the button are 40px on
|
|
958
|
-
|
|
958
|
+
field takes the full line. On a touch screen the row is 40px, a chip's height: the field keeps
|
|
959
|
+
16px text, and a chip, Clear all, a dropdown trigger, the Segmented and the button are 40px on
|
|
960
|
+
every line of the row. At both sizes, the text and the glyphs of the row share one vertical centre,
|
|
959
961
|
within about 1.5px.
|
|
960
962
|
|
|
961
963
|
### Segmented strips that outgrow their column
|
|
962
964
|
|
|
963
|
-
The enabled selected pill uses
|
|
965
|
+
The enabled selected pill uses the primary button's accent fill and label ink, with a thin accent edge that marks it wherever that fill is faint on the track. A disabled or underline selection has no edge. A disabled selected pill keeps a quiet fill and disabled ink. Only keyboard focus draws an outline.
|
|
964
966
|
|
|
965
967
|
A pill strip lays out its choices in one row while they fit. When they do not fit, the choices
|
|
966
968
|
wrap onto further rows. **It never widens past its container:** a twelve-month picker in a phone
|
|
@@ -1016,8 +1018,14 @@ vanilla sections above.
|
|
|
1016
1018
|
### React tables
|
|
1017
1019
|
|
|
1018
1020
|
Tables fill their container by default. Inside `.ui-card--fit`, tables size to their content.
|
|
1019
|
-
A `.ui-table__title` cell gives a text column the remaining width. A
|
|
1020
|
-
|
|
1021
|
+
A `.ui-table__title` cell gives a text column the remaining width. **A title cell is never narrower
|
|
1022
|
+
than 20 characters**, or a pinned column's ceiling, so a table wider than its frame scrolls and a
|
|
1023
|
+
two-word name in a pinned column stays on one line. A column takes `cell` for it:
|
|
1024
|
+
`title`, `code`, `long`, `strong` or `act`. **A column's `width`, such as `'12ch'`, holds while
|
|
1025
|
+
the rows reload or are empty**, so the columns do not move when data arrives; longer content still
|
|
1026
|
+
widens it. The columns with no `width` share the free room, so set the narrow columns and leave the
|
|
1027
|
+
title column unset to keep it the widest. When the set widths and a title column's 20 characters add up to more than the table, the
|
|
1028
|
+
columns share the room by their content, so the edges can move on a narrow screen. `rowHeader` renders the column's body cells as `th scope="row"`.
|
|
1021
1029
|
`DataTable` takes the vanilla hooks as props: `zebra`, `hover` (on unless `false`), `density`
|
|
1022
1030
|
(`dense`, `compact` or `comfortable`),
|
|
1023
1031
|
`stickyHeader` and `pinnedIdentity`. **`pinnedIdentity: true` pins column 0; a column key pins that column**,
|
|
@@ -1137,7 +1145,7 @@ field and white button on the dark one.
|
|
|
1137
1145
|
text of the dense rows, and the pill corner. Without `size`, the field keeps its full size. At every
|
|
1138
1146
|
size, the leading glyph sits on the vertical centre of the text and the caret. A `TextField` glyph
|
|
1139
1147
|
does the same. On a touch screen a
|
|
1140
|
-
small field is
|
|
1148
|
+
small field is 40px with 16px text, because iOS zooms into a field with smaller text. Only `SearchField` takes a size: `TextField` and `SelectField` keep
|
|
1141
1149
|
one size, because a form keeps the full size. See
|
|
1142
1150
|
[A toolbar at one column](#a-toolbar-at-one-column).
|
|
1143
1151
|
|
|
@@ -1165,8 +1173,12 @@ and loses only the tint. **Blocked beats every other state in the paint, and its
|
|
|
1165
1173
|
through.** **Hover is the kit's row hover**, not a tint of the accent. **The current period is a
|
|
1166
1174
|
ring**, a hairline in the accent, and it stands aside while the cell holds focus, so a focused
|
|
1167
1175
|
current period draws one band and not two. **Nothing is drawn under the grid:** no legend and no per-period
|
|
1168
|
-
swatch. **Below 560px the panel is a sheet, and a sheet is the kit's drawer
|
|
1169
|
-
|
|
1176
|
+
swatch. **Below 560px the panel is a sheet, and a sheet is the kit's drawer**. **Inside a `Field`,
|
|
1177
|
+
the sheet's title is the field's label**, because the sheet covers the field. An `ariaLabel` wins
|
|
1178
|
+
over the label, and outside a `Field` the placeholder is the title. The trigger's name is
|
|
1179
|
+
that label or `ariaLabel` and then the value it shows, such as "Due date, August 2026". **In a `Modal`, the open panel draws over the dialog's edge**,
|
|
1180
|
+
below the field, or above it where there is more room, and scrolls inside itself when neither
|
|
1181
|
+
side holds it. Below the phone step the gap between weeks opens to reach the 44px tap floor. Its one breakpoint literal is one of
|
|
1170
1182
|
the steps in [Breakpoints](foundations.md#breakpoints).
|
|
1171
1183
|
|
|
1172
1184
|
### React file drop
|
|
@@ -1347,7 +1359,7 @@ The button and tick follow `value` until the caller updates it. `AccountMenu` ma
|
|
|
1347
1359
|
Tab stop whatever the choice is.** Arrow keys wrap past disabled options; Home and End reach
|
|
1348
1360
|
the first and last enabled choice. `block` fills the container with either appearance. An
|
|
1349
1361
|
option's `icon` names a kit glyph drawn before its label. With `iconOnly`, the glyph is the
|
|
1350
|
-
whole button and the label becomes its accessible name.
|
|
1362
|
+
whole button and the label becomes its accessible name and its hover title.
|
|
1351
1363
|
**`size="sm"` compacts the pill appearance only:** under the underline appearance it changes
|
|
1352
1364
|
the type size and leaves the tab at its full height.
|
|
1353
1365
|
- **`Confirm`** builds on `Modal` as an `alertdialog`. It focuses the safe action and draws it
|
|
@@ -1363,8 +1375,9 @@ The button and tick follow `value` until the caller updates it. `AccountMenu` ma
|
|
|
1363
1375
|
account at the rail foot and leaves only Sign out in its menu. It shows no section counts.
|
|
1364
1376
|
Pass `back` to show the way up from a subpage, above the page title.
|
|
1365
1377
|
**`tools` puts small tools for the whole page at the end of the title row** (#736), such as
|
|
1366
|
-
a version badge or a `size="sm"` button. The lede stands under the whole row.
|
|
1367
|
-
not
|
|
1378
|
+
a version badge, a period picker or a `size="sm"` button. The lede stands under the whole row.
|
|
1379
|
+
**Tools that do not fit beside the title go under it**, so a period picker and a view action
|
|
1380
|
+
can stay on a 390px phone. `actions` keeps
|
|
1368
1381
|
the page's buttons in their own row under the title.
|
|
1369
1382
|
**`accountItems` adds a product's rows, such as Account settings and Support, at the top of
|
|
1370
1383
|
every account menu,** above the Theme row and Sign out. A row takes `href` to go somewhere,
|
|
@@ -1437,7 +1450,12 @@ The button and tick follow `value` until the caller updates it. `AccountMenu` ma
|
|
|
1437
1450
|
its description; the label stays the box's name. **`CheckList` groups `Checkbox` children in a
|
|
1438
1451
|
fieldset under a legend** set in the field label's type. A disabled box dims its hint with its label.
|
|
1439
1452
|
- **`Snippet`** displays `code` as plain text, and **copying always writes the original `code`
|
|
1440
|
-
string**, whatever `children` displays.
|
|
1453
|
+
string**, whatever `children` displays. **`Snippet` is a block of code, not the only way to
|
|
1454
|
+
copy.** To copy an identifier where it stands, in a drawer row or a table cell, put an
|
|
1455
|
+
icon-only `Button` with the `copy` glyph beside it, such as
|
|
1456
|
+
`<Button variant="ghost" size="sm" icon="copy" iconOnly>Copy INV-1162</Button>`. Its words
|
|
1457
|
+
become its accessible name and its hover title. Swap the glyph to `check` for a moment after
|
|
1458
|
+
the copy, as `Snippet` does.
|
|
1441
1459
|
- **`EmptyState`** uses the vanilla markup and CSS, and **the page supplies its own `h1`.**
|
|
1442
1460
|
- **`ThemeToggle`** cycles through dark, light, auto, then dark. It stores explicit choices
|
|
1443
1461
|
and follows the OS otherwise. It sets `data-theme-choice` and the resolved `data-theme` on
|
package/docs/foundations.md
CHANGED
|
@@ -304,8 +304,10 @@ is the named exception. It uses a soft fill, and neutral chip tones use
|
|
|
304
304
|
floating panel in dark and vanished on a white card in light.
|
|
305
305
|
|
|
306
306
|
**A selected item is the one exception.** Selection is marked by a background highlight. An
|
|
307
|
-
enabled chosen segmented pill
|
|
308
|
-
|
|
307
|
+
enabled chosen segmented pill takes the primary button's pair, `--accent-strong` with
|
|
308
|
+
`--accent-contrast` ink, and a 1px `--accent` edge. Where the fill is under 3:1 on the track, as
|
|
309
|
+
under the default accent in dark, the edge is the mark. A disabled chosen pill and an underline tab
|
|
310
|
+
take no edge. A disabled chosen pill keeps `--surface-3` and the disabled
|
|
309
311
|
ink.
|
|
310
312
|
|
|
311
313
|
**What floats depends on the surface's job, not on its rung.** A floating surface has the
|
|
@@ -458,8 +460,8 @@ A bare `input { font-size: 20px !important; }` has the same specificity as the n
|
|
|
458
460
|
only while your stylesheet loads after the kit's.
|
|
459
461
|
|
|
460
462
|
**A small field is the full field on a touch screen.** With a mouse, `SearchField size="sm"` is
|
|
461
|
-
32px high with `--text-sm`. On a touch screen it is
|
|
462
|
-
|
|
463
|
+
32px high with `--text-sm`. On a touch screen it is 40px high with 16px text, and its toolbar
|
|
464
|
+
and a create row above it stand the same height. So the small size never takes a field under 16px.
|
|
463
465
|
|
|
464
466
|
## A tap reaches the floor below the phone step
|
|
465
467
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
**Don't:** Use `--accent` as ground.
|
|
40
40
|
|
|
41
|
-
**Except:** Only Nebula gives the two tokens different values.
|
|
41
|
+
**Except:** Only Nebula gives the two tokens different values. A dark selected Segmented pill adds an `--accent` edge to its `--accent-strong` ground (#832).
|
|
42
42
|
|
|
43
43
|
<!-- rule: accent-strong -->
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
**Don't:** Add a second accent mark, such as an accent counter, to a selected tab.
|
|
56
56
|
|
|
57
|
-
**Except:** NavTabs pills keep accent ink on soft fill
|
|
57
|
+
**Except:** NavTabs pills keep accent ink on soft fill, as fill alone is too faint (#429). A Segmented pill's edge belongs to its fill.
|
|
58
58
|
|
|
59
59
|
## Theme checks
|
|
60
60
|
|
|
@@ -68,20 +68,6 @@
|
|
|
68
68
|
|
|
69
69
|
**Don't:** Open that drawer across the page from its button.
|
|
70
70
|
|
|
71
|
-
## Group one category at a time
|
|
72
|
-
|
|
73
|
-
<!-- rule: one-category -->
|
|
74
|
-
|
|
75
|
-
**Rule:** Give views, filters, sorting and actions separate groups and styles.
|
|
76
|
-
|
|
77
|
-
**Why:** Identical controls in one bar hide that one of them re-draws every row while its neighbour only narrows them.
|
|
78
|
-
|
|
79
|
-
**Do:** Keep the filter chips in one bar, the views in a strip of their own, and the action at the right-hand end.
|
|
80
|
-
|
|
81
|
-
**Don't:** Put three saved views and a filter control in one bar as four buttons of the same size and style.
|
|
82
|
-
|
|
83
|
-
**Except:** Saved views that re-draw one table take a segmented strip; views that swap panels take tabs.
|
|
84
|
-
|
|
85
71
|
## Match confirmation scale
|
|
86
72
|
|
|
87
73
|
<!-- rule: scale -->
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
**Rule:** Keep units smaller and in body ink.
|
|
60
60
|
|
|
61
|
-
**Do:**
|
|
61
|
+
**Do:** Explain abbreviations in reachable text.
|
|
62
62
|
|
|
63
63
|
**Don't:** Hide units in muted text or make readers guess what an abbreviation means.
|
|
64
64
|
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
|
|
123
123
|
**Rule:** Keep the table stable while results update.
|
|
124
124
|
|
|
125
|
-
**Do:** Retain rows while refreshing, report busy state, distinguish no data from no matches and errors, and preserve focus when filters change.
|
|
125
|
+
**Do:** Retain rows and column widths while refreshing, report busy state, distinguish no data from no matches and errors, and preserve focus when filters change.
|
|
126
126
|
|
|
127
127
|
**Don't:** Replace the table with a blank state or move focus without telling the reader why.
|
|
128
128
|
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
|
|
149
149
|
**Rule:** Use small controls above a dense table, and full-size controls in a form.
|
|
150
150
|
|
|
151
|
-
**Do:** Put a small search field, chips and button above dense rows.
|
|
151
|
+
**Do:** Put a small search field, segmented control, chips and button above dense rows.
|
|
152
152
|
|
|
153
153
|
**Don't:** Put a full-size field above dense rows.
|
|
154
154
|
|
|
155
|
-
**Except:** Tabs keep one size, and
|
|
155
|
+
**Except:** Tabs keep one size, and touch controls stand a chip's height.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**Why:** Without a legend, readers need labels for unfamiliar glyphs.
|
|
10
10
|
|
|
11
|
-
**Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme and sidebar toggles and collapsed-rail links have separate approval. Owner additions:
|
|
11
|
+
**Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme and sidebar toggles and collapsed-rail links have separate approval. Owner additions: Table beside Chart or Board ([#742](https://github.com/apliteni/apliteni-ui/issues/742), [#832](https://github.com/apliteni/apliteni-ui/issues/832)), a React AppShell search trigger below 560px for one light icon row ([#729](https://github.com/apliteni/apliteni-ui/issues/729)), and a notifications bell with its count ([#798](https://github.com/apliteni/apliteni-ui/issues/798)). The last two are named by their sentence: phones have no hover title.
|
|
12
12
|
|
|
13
13
|
**Do:** A wordless overflow menu and a labelled Settings.
|
|
14
14
|
|
package/guidelines/the-page.md
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
**Don't:** Put filters above the title.
|
|
38
38
|
|
|
39
|
-
**Except:** Small tools for the whole page, such as a version badge, stand at the end of the title row.
|
|
39
|
+
**Except:** Small tools for the whole page, such as a version badge, a period picker or a view action, stand at the end of the title row.
|
|
40
40
|
|
|
41
41
|
## Use one page title
|
|
42
42
|
|
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -118,6 +118,11 @@
|
|
|
118
118
|
--tap-clear-x: var(--tap-gap);
|
|
119
119
|
--tap-clear-y: var(--tap-gap);
|
|
120
120
|
}
|
|
121
|
+
.ui-app__tools {
|
|
122
|
+
gap: var(--tap-gap) !important;
|
|
123
|
+
--tap-clear-x: var(--tap-gap);
|
|
124
|
+
--tap-clear-y: var(--tap-gap);
|
|
125
|
+
}
|
|
121
126
|
.ui-table__selection {
|
|
122
127
|
--tap-clear-x: var(--tap-min);
|
|
123
128
|
--tap-clear-y: var(--tap-min);
|
|
@@ -158,6 +163,10 @@
|
|
|
158
163
|
--tap-clear-x: var(--space-1, 4px);
|
|
159
164
|
--tap-clear-y: var(--tap-gap-bordered);
|
|
160
165
|
}
|
|
166
|
+
.ui-drawer__row > dd {
|
|
167
|
+
--tap-clear-x: var(--tap-gap);
|
|
168
|
+
--tap-clear-y: var(--tap-gap);
|
|
169
|
+
}
|
|
161
170
|
.ui-footer__socials,
|
|
162
171
|
.ui-drawer__header {
|
|
163
172
|
gap: var(--tap-gap) !important;
|
|
@@ -556,6 +565,7 @@
|
|
|
556
565
|
min-width: 34px;
|
|
557
566
|
min-height: 34px;
|
|
558
567
|
padding: var(--space-2);
|
|
568
|
+
font-family: inherit;
|
|
559
569
|
font-size: var(--text-sm);
|
|
560
570
|
font-weight: var(--weight-medium);
|
|
561
571
|
font-variant-numeric: tabular-nums;
|
package/react/dist/index.d.ts
CHANGED
|
@@ -327,6 +327,11 @@ type Column<T> = {
|
|
|
327
327
|
rowHeader?: boolean;
|
|
328
328
|
/** `title` gives the column the remaining width, `code` sets a handle or id in the table's small text, `long` is running text that wraps in a column wide enough to read, `strong` bolds a figure, `act` right-aligns a row action. */
|
|
329
329
|
cell?: 'title' | 'code' | 'long' | 'strong' | 'act';
|
|
330
|
+
/**
|
|
331
|
+
* The column's set width, such as `'12ch'` or `'160px'`. The column keeps it while the rows
|
|
332
|
+
* change, so a reload does not move the columns. Longer content still widens it. #832
|
|
333
|
+
*/
|
|
334
|
+
width?: string;
|
|
330
335
|
};
|
|
331
336
|
type TableSort<T> = {
|
|
332
337
|
key: (keyof T & string) | undefined;
|
package/react/dist/index.js
CHANGED
|
@@ -2209,6 +2209,7 @@ function DataTable({
|
|
|
2209
2209
|
hasMore = false
|
|
2210
2210
|
}) {
|
|
2211
2211
|
const scrollable = stickyHeader || pinnedIdentity;
|
|
2212
|
+
const sized = columns.some((c) => c.width);
|
|
2212
2213
|
const table = useRef13(null);
|
|
2213
2214
|
const [pagerHost, setPagerHost] = useState10(null);
|
|
2214
2215
|
const holdPagerBox = useCallback4(
|
|
@@ -2298,6 +2299,10 @@ function DataTable({
|
|
|
2298
2299
|
"aria-busy": loading || void 0,
|
|
2299
2300
|
children: [
|
|
2300
2301
|
caption ? /* @__PURE__ */ jsx23("caption", { className: "ui-sr", children: caption }) : null,
|
|
2302
|
+
sized ? /* @__PURE__ */ jsxs19("colgroup", { children: [
|
|
2303
|
+
selectable ? /* @__PURE__ */ jsx23("col", {}) : null,
|
|
2304
|
+
columns.map((c) => /* @__PURE__ */ jsx23("col", { style: c.width ? { width: c.width } : void 0 }, c.key))
|
|
2305
|
+
] }) : null,
|
|
2301
2306
|
/* @__PURE__ */ jsx23("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
2302
2307
|
selectable ? /* @__PURE__ */ jsx23("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx23(
|
|
2303
2308
|
"input",
|
|
@@ -2353,14 +2358,20 @@ function DataTable({
|
|
|
2353
2358
|
) }) : null,
|
|
2354
2359
|
columns.map((c, columnIndex) => {
|
|
2355
2360
|
const Cell = c.rowHeader ? "th" : "td";
|
|
2356
|
-
return
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2361
|
+
return (
|
|
2362
|
+
// A set width lives on the col alone. In a table with a set width, a title
|
|
2363
|
+
// cell gives up its claim on the rest of the row, so the edges hold when the
|
|
2364
|
+
// rows arrive: the free room goes to the unsized columns in both states. #832
|
|
2365
|
+
/* @__PURE__ */ jsx23(
|
|
2366
|
+
Cell,
|
|
2367
|
+
{
|
|
2368
|
+
scope: c.rowHeader ? "row" : void 0,
|
|
2369
|
+
style: c.width || sized && c.cell === "title" ? { width: "auto" } : void 0,
|
|
2370
|
+
className: [c.num && "ui-table__num", c.cell && CELL_CLASS[c.cell], pinnedColumn(pinnedIdentity, c.key, columnIndex) && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" ") || void 0,
|
|
2371
|
+
children: c.render ? c.render(r) : String(r[c.key])
|
|
2372
|
+
},
|
|
2373
|
+
c.key
|
|
2374
|
+
)
|
|
2364
2375
|
);
|
|
2365
2376
|
})
|
|
2366
2377
|
]
|
|
@@ -2483,12 +2494,19 @@ function Denied({
|
|
|
2483
2494
|
// src/DatePicker.tsx
|
|
2484
2495
|
import {
|
|
2485
2496
|
useCallback as useCallback5,
|
|
2497
|
+
useContext as useContext2,
|
|
2486
2498
|
useEffect as useEffect12,
|
|
2487
2499
|
useMemo as useMemo4,
|
|
2488
2500
|
useRef as useRef14,
|
|
2489
2501
|
useState as useState11
|
|
2490
2502
|
} from "react";
|
|
2491
2503
|
import { dropdownRest, dropdownViewportFit } from "@apliteni/apliteni-ui";
|
|
2504
|
+
|
|
2505
|
+
// src/fieldContext.ts
|
|
2506
|
+
import { createContext as createContext3 } from "react";
|
|
2507
|
+
var FieldContext = createContext3(null);
|
|
2508
|
+
|
|
2509
|
+
// src/DatePicker.tsx
|
|
2492
2510
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2493
2511
|
var cx5 = (...a) => a.filter(Boolean).join(" ");
|
|
2494
2512
|
var pad = (n) => String(n).padStart(2, "0");
|
|
@@ -2650,7 +2668,27 @@ function DatePicker({
|
|
|
2650
2668
|
const el = panel.current;
|
|
2651
2669
|
const view = el?.ownerDocument?.defaultView;
|
|
2652
2670
|
if (!el || !view || !open) return;
|
|
2671
|
+
const lifted = !asSheet && !!el.closest(".rx-modal");
|
|
2672
|
+
const lift = () => {
|
|
2673
|
+
const root2 = el.parentElement;
|
|
2674
|
+
if (!lifted || !root2) return;
|
|
2675
|
+
const r = root2.getBoundingClientRect();
|
|
2676
|
+
const gap = parseFloat(view.getComputedStyle(el).getPropertyValue("--ui-dropdown-gap")) || 0;
|
|
2677
|
+
if (root2.parentElement?.classList.contains("ui-field")) el.style.width = `${r.width}px`;
|
|
2678
|
+
el.style.position = "fixed";
|
|
2679
|
+
const moving = view.getComputedStyle(el.closest(".rx-modal")).transform !== "none";
|
|
2680
|
+
el.style.visibility = moving ? "hidden" : "";
|
|
2681
|
+
const tall = el.scrollHeight + el.offsetHeight - el.clientHeight;
|
|
2682
|
+
const below = view.innerHeight - r.bottom - gap * 2;
|
|
2683
|
+
const up = tall > below && r.top - gap * 2 > below;
|
|
2684
|
+
el.style.top = up ? `${Math.max(gap, r.top - gap - Math.min(tall, r.top - gap * 2))}px` : `${r.bottom + gap}px`;
|
|
2685
|
+
el.style.maxHeight = `${up ? r.top - gap * 2 : below}px`;
|
|
2686
|
+
el.style.overflowY = "auto";
|
|
2687
|
+
el.style.left = align === "end" ? "auto" : `${r.left}px`;
|
|
2688
|
+
el.style.right = align === "end" ? `${el.ownerDocument.documentElement.clientWidth - r.right}px` : "auto";
|
|
2689
|
+
};
|
|
2653
2690
|
const fit = () => {
|
|
2691
|
+
lift();
|
|
2654
2692
|
let got = dropdownViewportFit(el);
|
|
2655
2693
|
if (!got) return;
|
|
2656
2694
|
el.style.setProperty("--ui-dropdown-ceiling", got.max > 0 ? `${got.max}px` : "");
|
|
@@ -2663,11 +2701,19 @@ function DatePicker({
|
|
|
2663
2701
|
if (trigger.current) ro?.observe(trigger.current);
|
|
2664
2702
|
ro?.observe(el);
|
|
2665
2703
|
view.addEventListener("resize", fit);
|
|
2704
|
+
const dialog = lifted ? el.closest(".rx-modal") : null;
|
|
2705
|
+
dialog?.addEventListener("transitionend", fit);
|
|
2706
|
+
const rest = lifted ? setTimeout(fit, 400) : void 0;
|
|
2707
|
+
if (lifted) view.addEventListener("scroll", fit, true);
|
|
2666
2708
|
return () => {
|
|
2667
2709
|
ro?.disconnect();
|
|
2668
2710
|
view.removeEventListener("resize", fit);
|
|
2711
|
+
view.removeEventListener("scroll", fit, true);
|
|
2712
|
+
dialog?.removeEventListener("transitionend", fit);
|
|
2713
|
+
clearTimeout(rest);
|
|
2714
|
+
if (lifted) for (const k of ["position", "top", "left", "right", "width", "max-height", "overflow-y", "visibility"]) el.style.removeProperty(k);
|
|
2669
2715
|
};
|
|
2670
|
-
}, [open, asSheet]);
|
|
2716
|
+
}, [open, asSheet, align]);
|
|
2671
2717
|
useEffect12(() => {
|
|
2672
2718
|
if (!open || asSheet) return;
|
|
2673
2719
|
const doc = root.current?.ownerDocument ?? document;
|
|
@@ -2810,6 +2856,10 @@ function DatePicker({
|
|
|
2810
2856
|
}, [picksRange, grain, span.start, span.end, picked, names, at]);
|
|
2811
2857
|
const empty = placeholder ?? (picksRange ? grain === "month" ? "Select a period" : "Select dates" : grain === "month" ? "Select a month" : "Select a date");
|
|
2812
2858
|
const name = ariaLabel || empty;
|
|
2859
|
+
const inField = useContext2(FieldContext);
|
|
2860
|
+
const sheetTitle = ariaLabel || (inField && id === inField.id ? inField.label : empty);
|
|
2861
|
+
const fieldLabel = inField && id === inField.id ? inField.label : "";
|
|
2862
|
+
const triggerName = ariaLabel || fieldLabel ? `${ariaLabel || fieldLabel}, ${shown ?? empty}` : void 0;
|
|
2813
2863
|
const pageName = (which) => grain === "month" ? String(which) : names.monthYear.format(at(firstDayOf(which)));
|
|
2814
2864
|
const stepBack = `${grain === "month" ? "Previous year" : "Previous month"}, ${pageName(page - 1)}`;
|
|
2815
2865
|
const stepOn = `${grain === "month" ? "Next year" : "Next month"}, ${pageName(page + 1)}`;
|
|
@@ -2948,7 +2998,7 @@ function DatePicker({
|
|
|
2948
2998
|
id,
|
|
2949
2999
|
"aria-haspopup": "dialog",
|
|
2950
3000
|
"aria-expanded": open,
|
|
2951
|
-
"aria-label":
|
|
3001
|
+
"aria-label": triggerName,
|
|
2952
3002
|
disabled,
|
|
2953
3003
|
ref: trigger,
|
|
2954
3004
|
onClick: (e) => {
|
|
@@ -2968,7 +3018,7 @@ function DatePicker({
|
|
|
2968
3018
|
// without taking the sheet's affordances left a phone reader with no
|
|
2969
3019
|
// visible way out and a Tab that walked into the live page behind it.
|
|
2970
3020
|
// why: guidelines/drawer.md
|
|
2971
|
-
/* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title:
|
|
3021
|
+
/* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: sheetTitle, onClose: () => setOpen(false), children: calendar })
|
|
2972
3022
|
) : /* @__PURE__ */ jsx25(
|
|
2973
3023
|
"div",
|
|
2974
3024
|
{
|
|
@@ -2991,7 +3041,7 @@ function DatePicker({
|
|
|
2991
3041
|
import {
|
|
2992
3042
|
Fragment as Fragment13,
|
|
2993
3043
|
useCallback as useCallback6,
|
|
2994
|
-
useContext as
|
|
3044
|
+
useContext as useContext3,
|
|
2995
3045
|
useEffect as useEffect13,
|
|
2996
3046
|
useId as useId12,
|
|
2997
3047
|
useRef as useRef15,
|
|
@@ -3011,12 +3061,6 @@ import {
|
|
|
3011
3061
|
dropdownSnap,
|
|
3012
3062
|
filterPanelRow
|
|
3013
3063
|
} from "@apliteni/apliteni-ui";
|
|
3014
|
-
|
|
3015
|
-
// src/fieldContext.ts
|
|
3016
|
-
import { createContext as createContext3 } from "react";
|
|
3017
|
-
var FieldContext = createContext3(null);
|
|
3018
|
-
|
|
3019
|
-
// src/Dropdown.tsx
|
|
3020
3064
|
import { Fragment as Fragment14, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3021
3065
|
var EXIT_SLACK_MS2 = 50;
|
|
3022
3066
|
var SETTLE_MS = 450;
|
|
@@ -3098,7 +3142,7 @@ function Dropdown({
|
|
|
3098
3142
|
const at = useRef15("");
|
|
3099
3143
|
const auto = useId12().replace(/:/g, "");
|
|
3100
3144
|
const uid = id ?? auto;
|
|
3101
|
-
const inField =
|
|
3145
|
+
const inField = useContext3(FieldContext);
|
|
3102
3146
|
const fieldName = inField && id === inField.id && !(ariaLabel && triggerContent != null) ? { id: `${uid}-trigger`, labelId: inField.labelId, labelledBy: `${inField.labelId} ${uid}-trigger` } : null;
|
|
3103
3147
|
const setOpen = useCallback6((next) => {
|
|
3104
3148
|
if (openProp === void 0) setSelfOpen(next);
|
|
@@ -3701,6 +3745,7 @@ function Segmented({ options, value, onChange, label, appearance = "pill", size,
|
|
|
3701
3745
|
disabled: disabled || option.disabled,
|
|
3702
3746
|
className: value === option.value ? "is-active" : void 0,
|
|
3703
3747
|
"aria-label": option.ariaLabel ?? (option.icon && option.iconOnly ? option.label : void 0),
|
|
3748
|
+
title: option.icon && option.iconOnly ? option.label : void 0,
|
|
3704
3749
|
"aria-pressed": value === option.value,
|
|
3705
3750
|
tabIndex: option.value === tabValue ? 0 : -1,
|
|
3706
3751
|
onClick: () => onChange(option.value),
|
|
@@ -3926,7 +3971,7 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
|
|
|
3926
3971
|
"aria-label": copyLabel,
|
|
3927
3972
|
title: copyLabel,
|
|
3928
3973
|
onClick: handleCopy,
|
|
3929
|
-
children: /* @__PURE__ */ jsx32(Icon, { name: status
|
|
3974
|
+
children: /* @__PURE__ */ jsx32(Icon, { name: status !== "copied" ? "copy" : "check" })
|
|
3930
3975
|
}
|
|
3931
3976
|
),
|
|
3932
3977
|
/* @__PURE__ */ jsx32("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
|
|
@@ -4019,7 +4064,7 @@ function Field({ id: suppliedId, label, hint, error, required, children }) {
|
|
|
4019
4064
|
const generatedId = useId13();
|
|
4020
4065
|
const id = suppliedId ?? generatedId;
|
|
4021
4066
|
const labelId = `${id}-label`;
|
|
4022
|
-
return /* @__PURE__ */ jsx34(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx34(FieldContext.Provider, { value: { id, labelId }, children: children({ ...wiring(id, hint, error), required }) }) });
|
|
4067
|
+
return /* @__PURE__ */ jsx34(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx34(FieldContext.Provider, { value: { id, labelId, label }, children: children({ ...wiring(id, hint, error), required }) }) });
|
|
4023
4068
|
}
|
|
4024
4069
|
var TextField = forwardRef8(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph2, className = "", ...props }, ref) {
|
|
4025
4070
|
const id = useId13();
|
|
@@ -4369,7 +4414,7 @@ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, className
|
|
|
4369
4414
|
});
|
|
4370
4415
|
|
|
4371
4416
|
// src/Toast.tsx
|
|
4372
|
-
import { createContext as createContext4, useCallback as useCallback7, useContext as
|
|
4417
|
+
import { createContext as createContext4, useCallback as useCallback7, useContext as useContext4, useEffect as useEffect17, useLayoutEffect as useLayoutEffect4, useRef as useRef21, useState as useState17 } from "react";
|
|
4373
4418
|
import { createPortal as createPortal6 } from "react-dom";
|
|
4374
4419
|
|
|
4375
4420
|
// src/lib/toast-stack.ts
|
|
@@ -4484,7 +4529,7 @@ var Context = createContext4(null);
|
|
|
4484
4529
|
var PileHoldContext = createContext4(false);
|
|
4485
4530
|
var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
|
|
4486
4531
|
function useToast() {
|
|
4487
|
-
const push =
|
|
4532
|
+
const push = useContext4(Context);
|
|
4488
4533
|
if (!push) throw new Error("useToast requires a Toast provider");
|
|
4489
4534
|
return push;
|
|
4490
4535
|
}
|
|
@@ -4494,7 +4539,7 @@ function Notice({ notice, remove }) {
|
|
|
4494
4539
|
const dismissed = useRef21(false);
|
|
4495
4540
|
const [hovered, setHovered] = useState17(false);
|
|
4496
4541
|
const [focused, setFocused] = useState17(false);
|
|
4497
|
-
const pileHeld =
|
|
4542
|
+
const pileHeld = useContext4(PileHoldContext);
|
|
4498
4543
|
const paused = hovered || focused || pileHeld;
|
|
4499
4544
|
const tone2 = notice.tone ?? "success";
|
|
4500
4545
|
const timed = !notice.action && notice.timer !== false && notice.timer !== 0;
|
|
@@ -5404,7 +5449,7 @@ var Success = forwardRef11(function Success2({
|
|
|
5404
5449
|
// src/Chart.tsx
|
|
5405
5450
|
import {
|
|
5406
5451
|
useCallback as useCallback8,
|
|
5407
|
-
useContext as
|
|
5452
|
+
useContext as useContext5,
|
|
5408
5453
|
useEffect as useEffect21,
|
|
5409
5454
|
useId as useId16,
|
|
5410
5455
|
useLayoutEffect as useLayoutEffect5,
|
|
@@ -6197,7 +6242,7 @@ function Chart(props) {
|
|
|
6197
6242
|
const asTable = showTable && view === "table";
|
|
6198
6243
|
const uid = useId16().replace(/[^\w-]/g, "");
|
|
6199
6244
|
const frameEl = useRef25(null);
|
|
6200
|
-
const card =
|
|
6245
|
+
const card = useContext5(CardTools);
|
|
6201
6246
|
const claim = card?.claim;
|
|
6202
6247
|
useLayoutEffect5(() => showTable && claim ? claim(uid) : void 0, [showTable, claim, uid]);
|
|
6203
6248
|
const toCard = showTable && card?.owner === uid ? card.slot : null;
|
package/src/assets/icons.js
CHANGED
|
@@ -194,6 +194,9 @@ export const iconOnlyAllowed = {
|
|
|
194
194
|
// are the two views themselves, side by side in one toolbar at the card's corner.
|
|
195
195
|
chart: 'show the values as a chart',
|
|
196
196
|
table: 'show the values as a table',
|
|
197
|
+
// A list's Table and Board switch, decided by Artur on #832 (rev_4f729c7b8624/d16).
|
|
198
|
+
// The kit has no board glyph; the grid of four squares is the nearest one.
|
|
199
|
+
grid: 'show the items as a board',
|
|
197
200
|
};
|
|
198
201
|
|
|
199
202
|
// The word a wordless control's name may open with. The list above says which
|
|
@@ -221,6 +224,7 @@ export const iconOnlyNames = {
|
|
|
221
224
|
plus: ['zoom'],
|
|
222
225
|
chart: ['chart'],
|
|
223
226
|
table: ['table'],
|
|
227
|
+
grid: ['board'],
|
|
224
228
|
};
|
|
225
229
|
|
|
226
230
|
// What a glyph means when a component picks it for the reader rather than a
|
package/src/styles/drawer.css
CHANGED
|
@@ -263,6 +263,13 @@
|
|
|
263
263
|
stays for a screen reader only when one field fills the value cell. With two
|
|
264
264
|
fields, each label remains visible to name its control. */
|
|
265
265
|
.ui-drawer__row:has(> dd :is(.ui-input, .ui-textarea, .ui-select, .ui-dropdown)) > :is(dt, dd) { align-self: baseline; }
|
|
266
|
+
/* An icon button after a value, such as a copy button, centres on the value's line and gives
|
|
267
|
+
back the height it draws past that line, so its row keeps a text row's height. #832 */
|
|
268
|
+
.ui-drawer__row > dd > .ui-btn--icon:last-child {
|
|
269
|
+
vertical-align: middle;
|
|
270
|
+
margin-block: calc((var(--btn-height-sm) - 1lh) / -2);
|
|
271
|
+
margin-inline-start: var(--space-2);
|
|
272
|
+
}
|
|
266
273
|
.ui-drawer__row > dd:has(> .ui-field:only-child) > .ui-field > .ui-field__label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
267
274
|
.ui-drawer__row dt { color: var(--text); }
|
|
268
275
|
.ui-drawer__row dd { color: var(--text); font-variant-numeric: tabular-nums; }
|
|
@@ -137,8 +137,9 @@
|
|
|
137
137
|
/* A toolbar that opens with a small search field is a small row, and its filter bar
|
|
138
138
|
follows it to 32px. The chip gives up its block padding so the 24px remove mark still
|
|
139
139
|
fits. The trigger fills the chip between its two edges, because a min-height on the
|
|
140
|
-
chip alone leaves the text high: the chip is a fieldset.
|
|
141
|
-
|
|
140
|
+
chip alone leaves the text high: the chip is a fieldset. On a touch screen the row is a
|
|
141
|
+
chip's height, 40px, and a small button or segmented control on any of its lines takes
|
|
142
|
+
it too. #822, rev_1bef7d7c3b22/d5
|
|
142
143
|
why: docs/components.md#a-toolbar-at-one-column */
|
|
143
144
|
@media not (pointer: coarse) {
|
|
144
145
|
.ui-toolbar:has(> .ui-input-group > .ui-input--sm),
|
|
@@ -147,6 +148,11 @@
|
|
|
147
148
|
.ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar__chip .ui-dropdown__trigger { min-height: calc(var(--btn-height-sm) - 2px); }
|
|
148
149
|
.ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar__remove { line-height: var(--leading-tight); }
|
|
149
150
|
}
|
|
151
|
+
@media (pointer: coarse) {
|
|
152
|
+
.ui-toolbar:has(> .ui-input-group > .ui-input--sm) > :is(.ui-btn, .ui-seg) { min-height: var(--ui-filter-row-h); }
|
|
153
|
+
/* The create row above that bar stands the same height. #832 */
|
|
154
|
+
.ui-toolbar:has(+ .ui-toolbar > .ui-input-group > .ui-input--sm) > .ui-btn { min-height: var(--ui-filter-row-h); }
|
|
155
|
+
}
|
|
150
156
|
|
|
151
157
|
/* A chip's neighbour takes the chip's corner, that height and edge, but not its painted fill:
|
|
152
158
|
the trigger's own edge can differ from the row's, while its --surface made the
|
package/src/styles/input.css
CHANGED
|
@@ -335,8 +335,9 @@
|
|
|
335
335
|
.ui-switch input:disabled + .ui-switch__track { opacity: 0.5; cursor: not-allowed; }
|
|
336
336
|
|
|
337
337
|
/* The small field: 32px with the dense rows' 13px text, level with a small button, a
|
|
338
|
-
dropdown trigger and a small segmented control. Only a fine pointer gets it.
|
|
339
|
-
screen keeps
|
|
338
|
+
dropdown trigger and a small segmented control. Only a fine pointer gets it. On a touch
|
|
339
|
+
screen it keeps 16px text, because iOS zooms into a field under 16px, and stands 40px,
|
|
340
|
+
a chip's height. rev_1bef7d7c3b22/d5, #832 The group's
|
|
340
341
|
42px left padding outranks the side padding here, so the glyph keeps its place. #822
|
|
341
342
|
why: docs/components.md#react-search-field */
|
|
342
343
|
@media not (pointer: coarse) {
|
|
@@ -348,3 +349,6 @@
|
|
|
348
349
|
border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
|
|
349
350
|
}
|
|
350
351
|
}
|
|
352
|
+
@media (pointer: coarse) {
|
|
353
|
+
.ui-input--sm { height: var(--ui-filter-row-h, 40px); min-height: var(--ui-filter-row-h, 40px); padding-block: 0; }
|
|
354
|
+
}
|
package/src/styles/layout.css
CHANGED
|
@@ -415,11 +415,13 @@
|
|
|
415
415
|
.ui-app__main > h1:not(:has(+ .ui-app__sub)) { margin-bottom: var(--space-8); }
|
|
416
416
|
/* Page tools stand at the end of the title row, and the lede goes under the whole row.
|
|
417
417
|
The row takes the h1's steps: 8px to a lede, 32px when the page opens on its title alone.
|
|
418
|
-
16px keeps the tools off a long title, and the tools stand 12px apart.
|
|
419
|
-
|
|
418
|
+
16px keeps the tools off a long title, and the tools stand 12px apart. Tools that do
|
|
419
|
+
not fit beside the title, such as a period picker on a phone, go under it, 8px down. #832 */
|
|
420
|
+
.ui-app__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: 8px; }
|
|
420
421
|
.ui-app__title-row:not(:has(+ .ui-app__sub)) { margin-bottom: var(--space-8); }
|
|
421
422
|
.ui-app__main .ui-app__title-row > h1 { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
|
|
422
|
-
|
|
423
|
+
/* The tools wrap at the narrowest phone, so a period picker and a view action stay in the column. #832 */
|
|
424
|
+
.ui-app__tools { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: var(--space-3); max-width: 100%; }
|
|
423
425
|
.ui-app__body { display: flex; flex-direction: column; gap: var(--space-5); }
|
|
424
426
|
/* A flex child's min-width is its content by default, so one wide block — a
|
|
425
427
|
ledger, a code sample — pushes the whole page sideways instead of scrolling
|
package/src/styles/segmented.css
CHANGED
|
@@ -42,14 +42,11 @@
|
|
|
42
42
|
.ui-seg button.is-active,
|
|
43
43
|
.ui-seg button[aria-pressed="true"],
|
|
44
44
|
.ui-seg button[aria-selected="true"] {
|
|
45
|
+
/* The primary button's pair, so a selection and the main action share one fill. The
|
|
46
|
+
edge carries the 3:1 mark where that fill is faint on the track, as under the default accent in dark. #832 */
|
|
45
47
|
color: var(--accent-contrast);
|
|
46
|
-
background: var(--accent);
|
|
47
|
-
|
|
48
|
-
/* White ink falls below the text floor on the lighter dark-theme accents. */
|
|
49
|
-
:where(:root[data-theme="dark"]) .ui-seg button.is-active,
|
|
50
|
-
:where(:root[data-theme="dark"]) .ui-seg button[aria-pressed="true"],
|
|
51
|
-
:where(:root[data-theme="dark"]) .ui-seg button[aria-selected="true"] {
|
|
52
|
-
color: var(--signal-contrast);
|
|
48
|
+
background: var(--accent-strong);
|
|
49
|
+
box-shadow: inset 0 0 0 1px var(--accent);
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
/* A disabled selection stays readable without the active accent fill. */
|
|
@@ -57,6 +54,7 @@
|
|
|
57
54
|
.ui-seg button[aria-pressed="true"]:where(:disabled),
|
|
58
55
|
.ui-seg button[aria-selected="true"]:where(:disabled) {
|
|
59
56
|
background: var(--surface-3); /* code-bg: inherit — the selected control's own fill. */
|
|
57
|
+
box-shadow: none; /* No edge: on a control that takes no focus it reads as a ring. #832 */
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
/* Standard pills tighten on phones so six short month names fit one row. */
|
|
@@ -136,6 +134,7 @@
|
|
|
136
134
|
.ui-seg--underline button.is-active,
|
|
137
135
|
.ui-seg--underline button[aria-pressed="true"] {
|
|
138
136
|
background: none;
|
|
137
|
+
box-shadow: none; /* The bar is the one mark; the pill's edge goes with its fill. #832 */
|
|
139
138
|
color: var(--strong);
|
|
140
139
|
font-weight: var(--weight-semibold);
|
|
141
140
|
}
|
package/src/styles/table.css
CHANGED
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
.ui-table tfoot tr:first-child > :is(th, td) { border-top: 2px solid var(--border-strong); }
|
|
51
51
|
.ui-table tfoot th { text-align: right; }
|
|
52
52
|
.ui-table td.ui-table__title { color: var(--strong); font-weight: var(--weight-medium); width: 99%; white-space: normal; }
|
|
53
|
+
/* A floor, not a spacing step: a two-word name stays on one line when the table is
|
|
54
|
+
wider than its frame, so the frame scrolls instead of the title breaking at each word,
|
|
55
|
+
as a pinned subject column did in #832. A pinned column's own ceiling still wins. */
|
|
56
|
+
.ui-table td.ui-table__title { min-width: min(20ch, var(--ui-table-identity-max, 20ch)); }
|
|
53
57
|
.ui-table th:last-child { padding-right: 0; }
|
|
54
58
|
/* The last body cell ends where its header and the table end. A right-aligned amount in the
|
|
55
59
|
last column stood 16px in from both, because only the header and the action cell dropped
|
|
@@ -534,6 +538,16 @@ a.ui-identity:hover { text-decoration: underline; }
|
|
|
534
538
|
/* A pinned selection cell keeps its fixed, centred track. */
|
|
535
539
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) :is(th, td):first-child:not(:where(.ui-table--pinned) .ui-table__selection) { padding-left: var(--cell-edge); }
|
|
536
540
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) :is(th, td):last-child { padding-right: var(--cell-edge); }
|
|
541
|
+
/* A cell of the default density opens with no padding of its own, so the pinned cell gives half its gap to the
|
|
542
|
+
column after the divider, or that column's text touches the divider. The gap keeps its
|
|
543
|
+
size, so the table keeps one width whether the divider shows or not. #832 */
|
|
544
|
+
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) .ui-table__identity { padding-right: var(--space-2); }
|
|
545
|
+
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) .ui-table__identity + :is(th, td) { padding-left: var(--space-2); }
|
|
546
|
+
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) .ui-table__identity { padding-right: calc(var(--cell-gap) / 2); }
|
|
547
|
+
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) .ui-table__identity + :is(th, td) { padding-left: calc(var(--cell-gap) / 2); }
|
|
548
|
+
/* A link that fills a pinned cell carries the cell's padding, so it gives up the same half. */
|
|
549
|
+
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) td.ui-table__identity.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-right: var(--space-2); }
|
|
550
|
+
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) td.ui-table__identity.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-right: calc(var(--cell-gap) / 2); }
|
|
537
551
|
/* 16px, so the box's 44px phone tap layer stops at the cell's edge and leaves the next cell's control whole. */
|
|
538
552
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):not(.ui-table--pinned) .ui-table__selection { padding-right: var(--space-4); }
|
|
539
553
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) thead th { padding-block: var(--space-3); }
|
package/src/styles/tap-zone.css
CHANGED
|
@@ -181,6 +181,9 @@
|
|
|
181
181
|
other. A chart's switch there keeps the clearance .ui-seg declares. */
|
|
182
182
|
.ui-card__head { margin-bottom: var(--space-3, 12px) !important; }
|
|
183
183
|
.ui-card__tools { column-gap: var(--tap-gap) !important; --tap-clear-x: var(--tap-gap); --tap-clear-y: var(--tap-gap); }
|
|
184
|
+
/* The page's title row holds small tools the same way: the room beside them is title
|
|
185
|
+
text, and they stand under the title on a phone, so the layer has room on each side. #832 */
|
|
186
|
+
.ui-app__tools { gap: var(--tap-gap) !important; --tap-clear-x: var(--tap-gap); --tap-clear-y: var(--tap-gap); }
|
|
184
187
|
|
|
185
188
|
/* The selection box is 19px in a 58px row and a 34px header: the layer has room to reach the floor both ways. */
|
|
186
189
|
.ui-table__selection { --tap-clear-x: var(--tap-min); --tap-clear-y: var(--tap-min); }
|
|
@@ -242,6 +245,13 @@
|
|
|
242
245
|
--tap-clear-y: var(--tap-gap-bordered);
|
|
243
246
|
}
|
|
244
247
|
|
|
248
|
+
/* A value's icon button, such as a copy button: the value before it, the label above
|
|
249
|
+
and the next row's label below are text, so the layer may reach the floor. #832 */
|
|
250
|
+
.ui-drawer__row > dd {
|
|
251
|
+
--tap-clear-x: var(--tap-gap);
|
|
252
|
+
--tap-clear-y: var(--tap-gap);
|
|
253
|
+
}
|
|
254
|
+
|
|
245
255
|
/* Both ways: fixed squares cannot overflow the way labels can, and a drawer
|
|
246
256
|
header spends its column gap on the title. Not the accent picker — its
|
|
247
257
|
swatches are on no carrier list, so opening it bought no reach. */
|