@apliteni/apliteni-ui 0.178.0 → 0.179.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 +18 -8
- package/docs/foundations.md +13 -9
- package/guidelines/button-labels.md +4 -4
- package/guidelines/iconography.md +3 -3
- package/package.json +1 -1
- package/react/dist/index.css +8 -2
- package/react/dist/index.d.ts +8 -2
- package/react/dist/index.js +41 -2
- package/src/styles/back.css +6 -4
- package/src/styles/dropdown.css +16 -3
- package/src/styles/filter-bar.css +1 -0
- package/src/styles/input.css +8 -3
- package/src/styles/layout.css +10 -0
- package/src/styles/pagination.css +1 -1
- package/src/styles/segmented.css +2 -2
- package/src/styles/tap-zone.css +7 -0
package/docs/components.md
CHANGED
|
@@ -1079,7 +1079,7 @@ before the hint rather than in its place**. This keeps a hint with consent, safe
|
|
|
1079
1079
|
on screen while the reader decides whether to retry. The error also uses `role="alert"`, so a new
|
|
1080
1080
|
error is announced without moving focus. Required markers are decorative. Native controls carry
|
|
1081
1081
|
`required`. `Field` exposes the frame for a control that you render yourself. Its child function
|
|
1082
|
-
receives a stable ID, `required`, `aria-invalid` and `aria-describedby`. Spread them on a `Dropdown` and the label and then the value name its trigger. `FileField` accepts one
|
|
1082
|
+
receives a stable ID, `required`, `aria-invalid` and `aria-describedby`. Spread them on a `Dropdown` or a `DatePicker`, and the label and then the value name its trigger. An error marks the trigger invalid and gives it the kit's invalid edge. `FileField` accepts one
|
|
1083
1083
|
file from the picker or by drop. `accept` only filters the system picker, so you validate before
|
|
1084
1084
|
upload.
|
|
1085
1085
|
|
|
@@ -1142,7 +1142,7 @@ toolbar's row rule and the field's focus ring therefore reach it from the kit's
|
|
|
1142
1142
|
**There is no clear button**, because the browser paints its own near-black button on the light
|
|
1143
1143
|
field and white button on the dark one.
|
|
1144
1144
|
**`size="sm"` is the field above a dense table.** With a mouse it is 32px high with `--text-sm`, the
|
|
1145
|
-
text of the dense rows, and the
|
|
1145
|
+
text of the dense rows, and the field corner. Without `size`, the field keeps its full size. At every
|
|
1146
1146
|
size, the leading glyph sits on the vertical centre of the text and the caret. A `TextField` glyph
|
|
1147
1147
|
does the same. On a touch screen a
|
|
1148
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
|
|
@@ -1173,7 +1173,12 @@ and loses only the tint. **Blocked beats every other state in the paint, and its
|
|
|
1173
1173
|
through.** **Hover is the kit's row hover**, not a tint of the accent. **The current period is a
|
|
1174
1174
|
ring**, a hairline in the accent, and it stands aside while the cell holds focus, so a focused
|
|
1175
1175
|
current period draws one band and not two. **Nothing is drawn under the grid:** no legend and no per-period
|
|
1176
|
-
swatch. **Below 560px the panel is a sheet, and a sheet is the kit's drawer**. **
|
|
1176
|
+
swatch. **Below 560px the panel is a sheet, and a sheet is the kit's drawer**. **The sheet opens
|
|
1177
|
+
with the chosen period in view.** Its body scrolls the least distance that shows the chosen cell
|
|
1178
|
+
with 20px below it, and focus starts on that cell. With no chosen period, the sheet opens at the
|
|
1179
|
+
top. Nothing moves, because the body scrolls before the sheet slides in. When the web font
|
|
1180
|
+
arrives after the first open, the sheet measures again after the font loads and one frame, so the
|
|
1181
|
+
20px holds. It does not move the body after the reader scrolls, touches or types in the sheet. **Inside a `Field`,
|
|
1177
1182
|
the sheet's title is the field's label**, because the sheet covers the field. An `ariaLabel` wins
|
|
1178
1183
|
over the label, and outside a `Field` the placeholder is the title. The trigger's name is
|
|
1179
1184
|
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**,
|
|
@@ -1526,14 +1531,19 @@ asterisk. **A `dropdown()` inside `field()` is wired through its trigger button*
|
|
|
1526
1531
|
dropdown's `id` sits on a wrapper that a label cannot name. The label and then the chosen value name
|
|
1527
1532
|
the trigger, the error or hint describes it, and an error marks it invalid. The list is named by the
|
|
1528
1533
|
label unless you give it an `ariaLabel`. A control outside a `field()` needs its own `ariaLabel`. A
|
|
1529
|
-
placeholder is not a name.
|
|
1530
|
-
|
|
1531
|
-
|
|
1534
|
+
placeholder is not a name. An invalid trigger has the kit's invalid edge, also under the pointer.
|
|
1535
|
+
With keyboard focus, a trigger shows the focus ring only, as a text input does. Its edge is
|
|
1536
|
+
transparent under the ring, also when the trigger is invalid.
|
|
1537
|
+
**In a field, a dropdown trigger has the height of a text input.** It has the input's top and
|
|
1538
|
+
bottom padding and its type size, so the two have the same height. It keeps the pill corner, and
|
|
1539
|
+
the text input has the field corner. Its side padding is 16px, 1px more than the input's. On a touch screen its text is a
|
|
1532
1540
|
fixed 16px, as the input's is, also when the host changes `--text-base`. A long value stays on
|
|
1533
1541
|
one line, starts at the left and ends with an ellipsis, as in a select, so the trigger keeps the
|
|
1534
1542
|
input's height at every value length. A person mark stands as far from the left edge as from the
|
|
1535
|
-
top and bottom edges.
|
|
1536
|
-
|
|
1543
|
+
top and bottom edges. The chosen value has the input's regular weight and normal letter spacing.
|
|
1544
|
+
It keeps its own ink: the value is `--strong`, a disabled value keeps the off ink, and a person
|
|
1545
|
+
picker's placeholder keeps the muted ink. A date picker in a field does the same. Outside a field, for example in a
|
|
1546
|
+
filter bar, a toolbar or the topbar, the trigger is also a pill, and the value keeps its own weight. See
|
|
1537
1547
|
[Control corners](foundations.md#control-corners).
|
|
1538
1548
|
Put a form on a card, not on the page ground. A field is drawn by its edge, but the page ground
|
|
1539
1549
|
is too close to the field's own fill for you to see that edge. See
|
package/docs/foundations.md
CHANGED
|
@@ -70,17 +70,21 @@ first label on the page title's edge.
|
|
|
70
70
|
|
|
71
71
|
## Control corners
|
|
72
72
|
|
|
73
|
-
**Every control that a reader presses
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
bar, a wordless button takes the row's height and stays a circle.
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
**Every control that a reader presses is a pill.** This covers each button size, each dropdown
|
|
74
|
+
trigger, also in a form, a filter chip and the filter bar's add control, a select and the back
|
|
75
|
+
link. The corner is `--radius-pill`. A wordless button is square, so the pill makes it a circle.
|
|
76
|
+
The account button in the band is a 40px circle. In a toolbar beside a full field or a filter
|
|
77
|
+
bar, a wordless button takes the row's height and stays a circle. The kit's padding keeps text,
|
|
78
|
+
glyphs, units and the focus ring inside the rounded edge. Give a control of your own the same
|
|
79
|
+
corner.
|
|
80
|
+
|
|
81
|
+
**Every field that a reader types into has the field corner, `--radius-md`.** This covers a text
|
|
82
|
+
field, a search field of each size, the search field in a dropdown panel, the page field of a
|
|
83
|
+
pager and a text area. In a form, a dropdown trigger has the height of the text field beside it,
|
|
84
|
+
but it keeps the pill. Give a field of your own the same corner.
|
|
80
85
|
|
|
81
86
|
These parts keep another corner:
|
|
82
87
|
|
|
83
|
-
- A text area keeps `--radius-md`, because a pill does not fit several lines.
|
|
84
88
|
- A segmented strip keeps its own rounded track.
|
|
85
89
|
- A menu row, a palette row and a date picker's day cell keep their small corner. They are rows
|
|
86
90
|
and cells in a panel, not controls on the page.
|
|
@@ -483,7 +487,7 @@ unless it cannot overflow. Only a row whose marks are each a fixed square, a dra
|
|
|
483
487
|
or a dense table's action cell opens across. Some families get no layer. The Accessibility
|
|
484
488
|
minimums page names all of them. Rows that share an edge have no space outside a row for a
|
|
485
489
|
layer. `input`, `select` and `textarea` generate no pseudo-element and use their own height.
|
|
486
|
-
A back link draws
|
|
490
|
+
A back link draws 32 high, and its layer reaches 6 above and 6 below it to make 44.
|
|
487
491
|
|
|
488
492
|
The whole system is behind `@media (max-width: 560px) and (pointer: coarse)`. A transparent
|
|
489
493
|
layer is also a hover surface, and a coarse pointer has no hover. The sheet is imported
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
|
|
51
51
|
<!-- rule: one-shape -->
|
|
52
52
|
|
|
53
|
-
**Rule:** Draw buttons, dropdowns, filter chips and
|
|
53
|
+
**Rule:** Draw buttons, dropdowns, filter chips and selects as pills, and a wordless button as a circle.
|
|
54
54
|
|
|
55
55
|
**Why:** One shape marks what a reader can use.
|
|
56
56
|
|
|
57
|
-
**Except:** A text
|
|
57
|
+
**Except:** A text field has the field corner, because it is a box for text.
|
|
58
58
|
|
|
59
|
-
**Do:**
|
|
59
|
+
**Do:** A search field with the field corner beside pill buttons.
|
|
60
60
|
|
|
61
|
-
**Don't:**
|
|
61
|
+
**Don't:** Square buttons and a pill search field.
|
|
@@ -8,11 +8,11 @@
|
|
|
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: Table beside Chart or Board ([#742](https://github.com/apliteni/apliteni-ui/issues/742), [#832](https://github.com/apliteni/apliteni-ui/issues/832)),
|
|
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)), the account avatar ([#834](https://github.com/apliteni/apliteni-ui/issues/834)), an 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 show no title.
|
|
12
12
|
|
|
13
|
-
**Do:** A wordless overflow
|
|
13
|
+
**Do:** A wordless overflow and a labelled Settings.
|
|
14
14
|
|
|
15
|
-
**Don't:** A wordless cog, even with
|
|
15
|
+
**Don't:** A wordless cog, even with an `aria-label`.
|
|
16
16
|
|
|
17
17
|
## State and action
|
|
18
18
|
|
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
--tap-clear-y: 0px;
|
|
37
37
|
}
|
|
38
38
|
@media (max-width: 560px) and (pointer: coarse) {
|
|
39
|
-
:where(.ui-seg button, .ui-tabs__tab, .ui-dropdown__trigger, .ui-toast__action, .ui-drawer__close, .ui-snippet__copy, .ui-footer__social, .ui-app__search, .toggle, .ui-datepicker__opt) {
|
|
39
|
+
:where(.ui-seg button, .ui-tabs__tab, .ui-dropdown__trigger, .ui-toast__action, .ui-drawer__close, .ui-snippet__copy, .ui-footer__social, .ui-app__search, .ui-back, .toggle, .ui-datepicker__opt) {
|
|
40
40
|
position: relative;
|
|
41
41
|
}
|
|
42
|
-
:where(.ui-btn, .ui-seg button, .ui-tabs__tab, .ui-dropdown__trigger, .ui-toast__action, .ui-drawer__close, .ui-snippet__copy, .ui-footer__social, .ui-switch, .ui-datepicker__opt, .ui-app__search, .toggle)::after {
|
|
42
|
+
:where(.ui-btn, .ui-seg button, .ui-tabs__tab, .ui-dropdown__trigger, .ui-toast__action, .ui-drawer__close, .ui-snippet__copy, .ui-footer__social, .ui-switch, .ui-datepicker__opt, .ui-app__search, .ui-back, .toggle)::after {
|
|
43
43
|
content: "";
|
|
44
44
|
position: absolute;
|
|
45
45
|
left: 50%;
|
|
@@ -173,6 +173,9 @@
|
|
|
173
173
|
--tap-clear-x: var(--tap-gap);
|
|
174
174
|
--tap-clear-y: var(--tap-gap);
|
|
175
175
|
}
|
|
176
|
+
.ui-back {
|
|
177
|
+
--tap-clear-y: var(--space-3, 12px);
|
|
178
|
+
}
|
|
176
179
|
.ui-app__bar,
|
|
177
180
|
.topbar__in {
|
|
178
181
|
--tap-clear-x: var(--space-3, 12px);
|
|
@@ -676,6 +679,9 @@
|
|
|
676
679
|
outline: var(--ring-scroll);
|
|
677
680
|
outline-offset: var(--ring-scroll-offset);
|
|
678
681
|
}
|
|
682
|
+
.ui-datepicker__body.is-sheet .ui-datepicker__opt {
|
|
683
|
+
scroll-margin-bottom: var(--space-5);
|
|
684
|
+
}
|
|
679
685
|
@media (max-width: 560px) {
|
|
680
686
|
.ui-dropdown__panel.ui-datepicker__panel {
|
|
681
687
|
--ui-dropdown-edge: 8px;
|
package/react/dist/index.d.ts
CHANGED
|
@@ -506,6 +506,10 @@ type DatePickerProps = {
|
|
|
506
506
|
* With a value, the trigger's own text is already its name.
|
|
507
507
|
*/
|
|
508
508
|
ariaLabel?: string;
|
|
509
|
+
/** Names the elements that describe the trigger, e.g. a field's error and hint. */
|
|
510
|
+
'aria-describedby'?: string;
|
|
511
|
+
/** Marks the trigger invalid. `Field` supplies it while its error shows. */
|
|
512
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
509
513
|
id?: string;
|
|
510
514
|
disabled?: boolean;
|
|
511
515
|
/** The edge the panel hugs. */
|
|
@@ -527,7 +531,7 @@ type DatePickerProps = {
|
|
|
527
531
|
defaultOpen?: boolean;
|
|
528
532
|
onOpenChange?: (open: boolean) => void;
|
|
529
533
|
};
|
|
530
|
-
declare function DatePicker({ mode, value, defaultValue, onChange, range, defaultRange, onRangeChange, min, max, disabledPeriods, presets, placeholder, ariaLabel, id, disabled, align, locale, weekStartsOn, today, sheet, open: openProp, defaultOpen, onOpenChange, }: DatePickerProps): react.JSX.Element;
|
|
534
|
+
declare function DatePicker({ mode, value, defaultValue, onChange, range, defaultRange, onRangeChange, min, max, disabledPeriods, presets, placeholder, ariaLabel, id, disabled, 'aria-describedby': describedBy, 'aria-invalid': invalid, align, locale, weekStartsOn, today, sheet, open: openProp, defaultOpen, onOpenChange, }: DatePickerProps): react.JSX.Element;
|
|
531
535
|
|
|
532
536
|
type DropdownBadge = string | {
|
|
533
537
|
text: string;
|
|
@@ -634,6 +638,8 @@ type DropdownProps = {
|
|
|
634
638
|
/** A field above the rows that filters them as the reader types. */
|
|
635
639
|
search?: boolean | DropdownSearch;
|
|
636
640
|
ariaLabel?: string;
|
|
641
|
+
/** The trigger's hover title. A wordless trigger takes its name here too. */
|
|
642
|
+
title?: string;
|
|
637
643
|
/** Names the elements that describe the trigger, e.g. a field's error and hint. */
|
|
638
644
|
'aria-describedby'?: string;
|
|
639
645
|
/** Marks the trigger invalid. `Field` supplies it while its error shows. */
|
|
@@ -649,7 +655,7 @@ type DropdownProps = {
|
|
|
649
655
|
/** Draw the row yourself. `props` is everything the row needs; spread it. */
|
|
650
656
|
row?: (item: DropdownItem, props: DropdownRowProps) => ReactNode;
|
|
651
657
|
};
|
|
652
|
-
declare function Dropdown({ label, value, selectedValue, placeholder, variant, items, sections, header, footer, triggerContent, triggerClass, disabled, chevron, align, direction, scroll, search, ariaLabel, id, panelClass, 'aria-describedby': describedBy, 'aria-invalid': invalid, open: openProp, defaultOpen, onOpenChange, onSelect, row, }: DropdownProps): react.JSX.Element;
|
|
658
|
+
declare function Dropdown({ label, value, selectedValue, placeholder, variant, items, sections, header, footer, triggerContent, triggerClass, disabled, chevron, align, direction, scroll, search, ariaLabel, title, id, panelClass, 'aria-describedby': describedBy, 'aria-invalid': invalid, open: openProp, defaultOpen, onOpenChange, onSelect, row, }: DropdownProps): react.JSX.Element;
|
|
653
659
|
|
|
654
660
|
type BackLinkOwnProps = {
|
|
655
661
|
/** The address. No address, or a `javascript:` one, and nothing is rendered. */
|
package/react/dist/index.js
CHANGED
|
@@ -2599,6 +2599,8 @@ function DatePicker({
|
|
|
2599
2599
|
ariaLabel,
|
|
2600
2600
|
id,
|
|
2601
2601
|
disabled = false,
|
|
2602
|
+
"aria-describedby": describedBy,
|
|
2603
|
+
"aria-invalid": invalid,
|
|
2602
2604
|
align = "start",
|
|
2603
2605
|
locale = "en-GB",
|
|
2604
2606
|
weekStartsOn = 1,
|
|
@@ -2661,7 +2663,7 @@ function DatePicker({
|
|
|
2661
2663
|
useIsoLayoutEffect(() => {
|
|
2662
2664
|
close.current = setOpen;
|
|
2663
2665
|
});
|
|
2664
|
-
|
|
2666
|
+
useIsoLayoutEffect(() => {
|
|
2665
2667
|
if (open) setCursor(clamp(anchor, lo, hi));
|
|
2666
2668
|
}, [open]);
|
|
2667
2669
|
useIsoLayoutEffect(() => {
|
|
@@ -2735,6 +2737,38 @@ function DatePicker({
|
|
|
2735
2737
|
land.current = false;
|
|
2736
2738
|
grid.current?.querySelector('[data-dp-cell][tabindex="0"]')?.focus();
|
|
2737
2739
|
});
|
|
2740
|
+
const reveal = useRef14(false);
|
|
2741
|
+
const chosen = useRef14(null);
|
|
2742
|
+
useIsoLayoutEffect(() => {
|
|
2743
|
+
reveal.current = open && asSheet;
|
|
2744
|
+
}, [open, asSheet]);
|
|
2745
|
+
useIsoLayoutEffect(() => {
|
|
2746
|
+
if (!reveal.current || cursor !== clamp(anchor, lo, hi)) return;
|
|
2747
|
+
reveal.current = false;
|
|
2748
|
+
chosen.current = grid.current?.querySelector('[data-dp-cell][tabindex="0"].is-selected') ?? null;
|
|
2749
|
+
const body = grid.current?.closest(".ui-drawer__body");
|
|
2750
|
+
const cell = chosen.current;
|
|
2751
|
+
if (!cell || !body) return;
|
|
2752
|
+
const scrollIn = () => {
|
|
2753
|
+
const below = parseFloat(getComputedStyle(cell).scrollMarginBottom) || 0;
|
|
2754
|
+
const view = body.getBoundingClientRect().top + body.clientTop + body.clientHeight;
|
|
2755
|
+
const over = cell.getBoundingClientRect().bottom + below - view;
|
|
2756
|
+
if (over > 0) body.scrollTop += over;
|
|
2757
|
+
};
|
|
2758
|
+
scrollIn();
|
|
2759
|
+
const { fonts, defaultView: win } = body.ownerDocument;
|
|
2760
|
+
if (!fonts || !win) return;
|
|
2761
|
+
let touched = false;
|
|
2762
|
+
const touch = () => {
|
|
2763
|
+
touched = true;
|
|
2764
|
+
};
|
|
2765
|
+
const inputs = ["wheel", "touchstart", "pointerdown", "keydown"];
|
|
2766
|
+
for (const type of inputs) body.addEventListener(type, touch, { passive: true });
|
|
2767
|
+
void fonts.ready.then(() => win.requestAnimationFrame(() => {
|
|
2768
|
+
for (const type of inputs) body.removeEventListener(type, touch);
|
|
2769
|
+
if (cell.isConnected && !touched) scrollIn();
|
|
2770
|
+
}));
|
|
2771
|
+
});
|
|
2738
2772
|
const columns = grain === "month" ? 3 : 7;
|
|
2739
2773
|
const page = grain === "month" ? Math.floor(cursor / 12) : monthOf(cursor);
|
|
2740
2774
|
const caption = grain === "month" ? String(page) : names.monthYear.format(at(firstDayOf(page)));
|
|
@@ -2999,6 +3033,8 @@ function DatePicker({
|
|
|
2999
3033
|
"aria-haspopup": "dialog",
|
|
3000
3034
|
"aria-expanded": open,
|
|
3001
3035
|
"aria-label": triggerName,
|
|
3036
|
+
"aria-describedby": describedBy,
|
|
3037
|
+
"aria-invalid": invalid,
|
|
3002
3038
|
disabled,
|
|
3003
3039
|
ref: trigger,
|
|
3004
3040
|
onClick: (e) => {
|
|
@@ -3018,7 +3054,7 @@ function DatePicker({
|
|
|
3018
3054
|
// without taking the sheet's affordances left a phone reader with no
|
|
3019
3055
|
// visible way out and a Tab that walked into the live page behind it.
|
|
3020
3056
|
// why: guidelines/drawer.md
|
|
3021
|
-
/* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: sheetTitle, onClose: () => setOpen(false), children: calendar })
|
|
3057
|
+
/* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: sheetTitle, onClose: () => setOpen(false), initialFocusRef: chosen, children: calendar })
|
|
3022
3058
|
) : /* @__PURE__ */ jsx25(
|
|
3023
3059
|
"div",
|
|
3024
3060
|
{
|
|
@@ -3118,6 +3154,7 @@ function Dropdown({
|
|
|
3118
3154
|
scroll = false,
|
|
3119
3155
|
search = false,
|
|
3120
3156
|
ariaLabel,
|
|
3157
|
+
title,
|
|
3121
3158
|
id,
|
|
3122
3159
|
panelClass = "",
|
|
3123
3160
|
"aria-describedby": describedBy,
|
|
@@ -3575,6 +3612,7 @@ function Dropdown({
|
|
|
3575
3612
|
"aria-expanded": open,
|
|
3576
3613
|
id: fieldName?.id,
|
|
3577
3614
|
"aria-label": ariaLabel && triggerContent != null ? ariaLabel : void 0,
|
|
3615
|
+
title,
|
|
3578
3616
|
"aria-labelledby": fieldName?.labelledBy,
|
|
3579
3617
|
"aria-describedby": describedBy,
|
|
3580
3618
|
"aria-invalid": invalid,
|
|
@@ -5207,6 +5245,7 @@ function AppShell({
|
|
|
5207
5245
|
align: "end",
|
|
5208
5246
|
chevron: false,
|
|
5209
5247
|
ariaLabel: `Signed in as ${account.name}, ${account.email}`,
|
|
5248
|
+
title: `Signed in as ${account.name}, ${account.email}`,
|
|
5210
5249
|
triggerClass: "ui-app__user-trigger",
|
|
5211
5250
|
panelClass: "ui-app__user-panel",
|
|
5212
5251
|
triggerContent: /* @__PURE__ */ jsx41("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx41(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
|
package/src/styles/back.css
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
max-width: 100%;
|
|
16
16
|
align-items: center;
|
|
17
17
|
gap: var(--space-1);
|
|
18
|
-
/*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/* 32px, a small button's height: the line of text alone is 17px tall. On a phone
|
|
19
|
+
with touch, tap-zone.css lifts the target to 44px. A pill, as every control. #834
|
|
20
|
+
why: docs/foundations.md#control-corners */
|
|
21
|
+
min-height: var(--space-8);
|
|
22
|
+
padding: 0 var(--space-3) 0 var(--space-2);
|
|
23
|
+
border-radius: var(--radius-pill);
|
|
22
24
|
font-family: var(--font-sans);
|
|
23
25
|
font-size: var(--text-sm);
|
|
24
26
|
font-weight: var(--weight-medium);
|
package/src/styles/dropdown.css
CHANGED
|
@@ -50,7 +50,16 @@
|
|
|
50
50
|
pointer resting on a focused control would put it back. One indicator, which is
|
|
51
51
|
what the kit's rows already chose. why: docs/foundations.md#the-focus-ring */
|
|
52
52
|
.ui-dropdown__trigger:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
|
|
53
|
-
|
|
53
|
+
/* The kit's invalid edge, on a Dropdown or a DatePicker that a Field marks invalid, also
|
|
54
|
+
under the pointer. The hover selector ties live hover at (0,4,0) and comes later, and the
|
|
55
|
+
off rules below tie it and come later still, so an off trigger keeps the off edge. #835
|
|
56
|
+
why: docs/components.md#forms */
|
|
57
|
+
.ui-dropdown__trigger[aria-invalid="true"],
|
|
58
|
+
.ui-dropdown__trigger[aria-invalid="true"]:hover:not(:focus-visible) { border-color: var(--pink); }
|
|
59
|
+
/* As a select: under the ring the edge keeps its width and goes transparent, so focus has
|
|
60
|
+
one line, also on an invalid trigger. Later than the invalid edge, earlier than the off
|
|
61
|
+
rules. why: docs/foundations.md#the-focus-ring */
|
|
62
|
+
.ui-dropdown__trigger:focus-visible { border-color: transparent; outline: var(--ring); outline-offset: var(--ring-offset); }
|
|
54
63
|
/* Off. The off hover-not-focus selectors are (0,4,0), tied with live hover and later.
|
|
55
64
|
A pointer over a dead control changes nothing while an aria-disabled one keeps its stop and the ring.
|
|
56
65
|
No fill: --disabled-surface IS this control's --surface, in both themes. The
|
|
@@ -488,7 +497,7 @@
|
|
|
488
497
|
/* The ground and line .ui-input takes. why: docs/foundations.md#elevation */
|
|
489
498
|
background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
|
|
490
499
|
border: 1px solid var(--field-edge);
|
|
491
|
-
border-radius: var(--radius-
|
|
500
|
+
border-radius: var(--radius-md); /* The field corner, as .ui-input. #836 */
|
|
492
501
|
padding: 8px 12px 8px 34px;
|
|
493
502
|
/* The height Chromium paints (38.25px), stated so the target-size gate, which
|
|
494
503
|
cannot see an <input>'s line of text, reads the box a reader hits. */
|
|
@@ -553,7 +562,7 @@
|
|
|
553
562
|
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__chevron { margin-left: auto; }
|
|
554
563
|
.ui-field > .ui-dropdown > .ui-dropdown__panel { inline-size: 100%; min-width: 0; }
|
|
555
564
|
/* In a form the trigger takes the text input's block padding and type, so the two
|
|
556
|
-
stand at one height.
|
|
565
|
+
stand at one height. It keeps the pill, and the input has the field corner. #812, #836
|
|
557
566
|
why: docs/components.md#forms */
|
|
558
567
|
@property --ui-dropdown-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
|
|
559
568
|
.ui-field > .ui-dropdown > .ui-dropdown__trigger {
|
|
@@ -573,6 +582,10 @@
|
|
|
573
582
|
text-overflow: ellipsis;
|
|
574
583
|
text-align: start;
|
|
575
584
|
}
|
|
585
|
+
/* The chosen value takes the text input's regular weight and normal spacing. No colour:
|
|
586
|
+
the value keeps --strong, a disabled value its off ink and a placeholder its muted ink.
|
|
587
|
+
rev_67189e20ee1f/d5 why: docs/components.md#forms */
|
|
588
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__value { font-weight: var(--weight-normal); letter-spacing: normal; }
|
|
576
589
|
/* The mark stands as far from the left edge as from the top and bottom edges. */
|
|
577
590
|
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-avatar {
|
|
578
591
|
--ui-avatar-pull-start: calc(var(--space-4) - var(--space-3) - (var(--ui-dropdown-line) - var(--ui-avatar-size)) / 2);
|
|
@@ -174,6 +174,7 @@
|
|
|
174
174
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger { min-height: var(--ui-filter-row-h); border-color: var(--control-edge); background: transparent; }
|
|
175
175
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger svg { width: 16px; height: 16px; flex: none; stroke-width: 2.4; }
|
|
176
176
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
|
|
177
|
+
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger:focus-visible { border-color: transparent; }
|
|
177
178
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger:disabled { border-color: var(--disabled-border); }
|
|
178
179
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger[aria-disabled="true"],
|
|
179
180
|
.ui-filter-bar [data-filter-add] .ui-dropdown__trigger[aria-disabled="true"]:hover:not(:focus-visible) { border-color: var(--disabled-border); }
|
package/src/styles/input.css
CHANGED
|
@@ -27,12 +27,16 @@
|
|
|
27
27
|
why: docs/foundations.md#elevation */
|
|
28
28
|
background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
|
|
29
29
|
border: 1px solid var(--field-edge);
|
|
30
|
-
border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
|
|
31
30
|
padding: 12px 15px;
|
|
32
31
|
width: 100%;
|
|
33
32
|
transition: border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
|
|
34
33
|
}
|
|
35
|
-
|
|
34
|
+
/* The field corner: a field that takes text is a box, not a pill. The select is a
|
|
35
|
+
control the reader presses, so it keeps the pill below. #836
|
|
36
|
+
why: docs/foundations.md#control-corners */
|
|
37
|
+
.ui-input,
|
|
38
|
+
.ui-textarea { border-radius: var(--radius-md); }
|
|
39
|
+
.ui-textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
|
|
36
40
|
|
|
37
41
|
.ui-input:hover,
|
|
38
42
|
.ui-textarea:hover,
|
|
@@ -111,6 +115,7 @@
|
|
|
111
115
|
chevron. It is a plain stroke with butt ends and a mitred point, 11.3px wide.
|
|
112
116
|
why: docs/foundations.md#colour-and-contrast */
|
|
113
117
|
.ui-select {
|
|
118
|
+
border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
|
|
114
119
|
appearance: none;
|
|
115
120
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-6 -6 12 12' fill='none' stroke='%23a29db6' stroke-width='1.6'%3E%3Cpath d='M-5.09 -2.83L0 2.26l5.09-5.09'/%3E%3C/svg%3E");
|
|
116
121
|
background-repeat: no-repeat;
|
|
@@ -346,7 +351,7 @@
|
|
|
346
351
|
line-height: var(--leading-tight);
|
|
347
352
|
min-height: var(--btn-height-sm);
|
|
348
353
|
padding: var(--space-1) var(--space-3);
|
|
349
|
-
border-radius: var(--radius-
|
|
354
|
+
border-radius: var(--radius-md); /* why: docs/foundations.md#control-corners */
|
|
350
355
|
}
|
|
351
356
|
}
|
|
352
357
|
@media (pointer: coarse) {
|
package/src/styles/layout.css
CHANGED
|
@@ -401,6 +401,16 @@
|
|
|
401
401
|
why: docs/components.md#the-page-shell */
|
|
402
402
|
.ui-app__bar .toggle, .topbar__in .toggle { flex: none; }
|
|
403
403
|
.ui-app__user--bar .ui-app__av { margin-inline-start: 0; }
|
|
404
|
+
/* In the band the trigger holds the 30px mark and no words, so it is a wordless button: a
|
|
405
|
+
40px circle. The ring stands outside it, 5px clear of the mark. #834
|
|
406
|
+
why: docs/foundations.md#control-corners */
|
|
407
|
+
.ui-app__bar .ui-app__user-trigger {
|
|
408
|
+
width: var(--space-10);
|
|
409
|
+
height: var(--space-10);
|
|
410
|
+
padding: 0;
|
|
411
|
+
justify-content: center;
|
|
412
|
+
border-radius: var(--radius-pill);
|
|
413
|
+
}
|
|
404
414
|
.ui-app__main h1 {
|
|
405
415
|
color: var(--strong);
|
|
406
416
|
/* rank: page-title */
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
min-height: var(--space-8);
|
|
111
111
|
padding: var(--space-1) var(--space-2);
|
|
112
112
|
font-size: var(--text-sm);
|
|
113
|
-
border-radius: var(--radius-
|
|
113
|
+
border-radius: var(--radius-md); /* The field corner, as .ui-input. #836 */
|
|
114
114
|
text-align: center;
|
|
115
115
|
}
|
|
116
116
|
|
package/src/styles/segmented.css
CHANGED
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
draws 44 whatever line box its font hands it: the off-scale `--space-3 + 1px`
|
|
122
122
|
this replaces drew 44 with the webfont loaded and 41 without, which is under
|
|
123
123
|
the floor it claimed. The radius is left for the focus ring; the tab paints no
|
|
124
|
-
box. #
|
|
124
|
+
box. A two-letter tab, such as EN, is as wide as the floor too. #834
|
|
125
125
|
why: guidelines/layout-and-density.md, the spacing scale */
|
|
126
|
-
.ui-seg--underline button { position: relative; border-radius: var(--radius-sm); padding: var(--space-3); min-height: var(--tap-min, 44px); white-space: normal; overflow-wrap: anywhere; font-weight: var(--weight-medium); }
|
|
126
|
+
.ui-seg--underline button { position: relative; border-radius: var(--radius-sm); padding: var(--space-3); min-height: var(--tap-min, 44px); min-width: var(--tap-min, 44px); white-space: normal; overflow-wrap: anywhere; font-weight: var(--weight-medium); }
|
|
127
127
|
.ui-seg--underline.ui-seg--sm button { padding: var(--space-3); min-height: var(--tap-min, 44px); }
|
|
128
128
|
/* The chosen tab is its label and one bar under it: no plate, no hairline, no
|
|
129
129
|
upright rail — those read as a list-row grip. #527 r31. The `outline: 0` that
|
package/src/styles/tap-zone.css
CHANGED
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
.ui-snippet__copy,
|
|
58
58
|
.ui-footer__social,
|
|
59
59
|
.ui-app__search,
|
|
60
|
+
.ui-back,
|
|
60
61
|
.toggle,
|
|
61
62
|
/* Already relative in react/src/DatePicker.css — restated because this
|
|
62
63
|
gate reads the kit's own sheets and cannot see that one, and a carrier
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
.ui-switch,
|
|
80
81
|
.ui-datepicker__opt,
|
|
81
82
|
.ui-app__search,
|
|
83
|
+
.ui-back,
|
|
82
84
|
.toggle
|
|
83
85
|
)::after {
|
|
84
86
|
content: "";
|
|
@@ -279,6 +281,11 @@
|
|
|
279
281
|
20 claims 10px a side and the trigger has 7.4. The clamp would still stop
|
|
280
282
|
at 44 today and be a number that is not true, which is what the browser
|
|
281
283
|
half fails a container for. */
|
|
284
|
+
/* A back link draws 32px and owns 6px above and below it: the layer stops 6px into
|
|
285
|
+
the room the shell leaves above the link and the room the page leaves below it.
|
|
286
|
+
Across, it keeps the width it draws. #834 */
|
|
287
|
+
.ui-back { --tap-clear-y: var(--space-3, 12px); }
|
|
288
|
+
|
|
282
289
|
.ui-app__bar,
|
|
283
290
|
.topbar__in { --tap-clear-x: var(--space-3, 12px); --tap-clear-y: var(--space-3, 12px); }
|
|
284
291
|
}
|