@apliteni/apliteni-ui 0.166.0 → 0.168.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 +17 -4
- package/package.json +1 -1
- package/react/dist/index.css +9 -1
- package/react/dist/index.d.ts +2 -1
- package/react/dist/index.js +80 -61
- package/src/logic/dropdown-placement.js +6 -3
- package/src/styles/dropdown.css +33 -0
- package/src/styles/table.css +1 -1
- package/src/styles/tap-zone.css +3 -2
package/docs/components.md
CHANGED
|
@@ -569,7 +569,8 @@ edge of the panel. A row whose value is a field or a dropdown lines its label up
|
|
|
569
569
|
This alignment happens by itself. There is no setting for it.
|
|
570
570
|
Nothing inside a drawer draws a card, a row rule or an `<hr>`. Actions stay
|
|
571
571
|
outside the scrolling body. **It moves on open and on close**, and both movements are instant when
|
|
572
|
-
reduced motion is enabled.
|
|
572
|
+
reduced motion is enabled. **An Escape a tooltip or a picker already handled closes only that
|
|
573
|
+
overlay, and the next Escape closes the drawer.** For when a flow should use a drawer or a page:
|
|
573
574
|
[Drawer](../guidelines/drawer.md).
|
|
574
575
|
|
|
575
576
|
### The modal
|
|
@@ -615,6 +616,7 @@ what the bar says. No value may be reachable only by hovering. See
|
|
|
615
616
|
React `Tooltip` shows a label, a value and an optional detail.
|
|
616
617
|
`text` is still a shorthand for `label`. Empty parts are hidden.
|
|
617
618
|
The focusable trigger provides the readout as its accessible description. Escape keeps focus on the trigger.
|
|
619
|
+
**Escape closes only the readout; the next Escape reaches the dialog around it.**
|
|
618
620
|
The panel does not change the layout or intercept pointer events.
|
|
619
621
|
|
|
620
622
|
**A pointer opens the readout after it rests for 300ms, and the readout closes at once when the
|
|
@@ -976,7 +978,8 @@ A `.ui-table__title` cell gives a text column the remaining width. A column take
|
|
|
976
978
|
`title`, `code`, `long`, `strong` or `act`. `rowHeader` renders the column's body cells as `th scope="row"`.
|
|
977
979
|
`DataTable` takes the vanilla hooks as props: `zebra`, `hover` (on unless `false`), `density`
|
|
978
980
|
(`dense`, `compact` or `comfortable`),
|
|
979
|
-
`stickyHeader` and `pinnedIdentity`. `
|
|
981
|
+
`stickyHeader` and `pinnedIdentity`. **`pinnedIdentity: true` pins column 0; a column key pins that column**,
|
|
982
|
+
so a date can stand before the pinned identity. `rowState` marks a row `target` or `dead`, `footer` takes totals rows
|
|
980
983
|
and `caption` names the table for assistive technology. A `dead` row is muted and shows its state as a word,
|
|
981
984
|
with no strike line. `stack` is deprecated and ignored: a phone table scrolls sideways like any other. A table that does not scroll is the card's own child, so a dense table reaches the card's text edge.
|
|
982
985
|
Its pager follows the measured table width and wraps when necessary.
|
|
@@ -1093,7 +1096,9 @@ field and white button on the dark one.
|
|
|
1093
1096
|
|
|
1094
1097
|
`DatePicker` picks one month, a range of months, one date or a range of dates. At its ordinary
|
|
1095
1098
|
width, it uses the dropdown's shell and adds only the grid inside it. The panel is a `dialog`,
|
|
1096
|
-
because a calendar is a grid and a listbox may own only options. The panel is `inert` while closed
|
|
1099
|
+
because a calendar is a grid and a listbox may own only options. The panel is `inert` while closed,
|
|
1100
|
+
and a shut panel carries `data-dd-shut`, as a shut Dropdown does. **Escape closes only the calendar,
|
|
1101
|
+
wherever focus is in the picker, and the next Escape closes the dialog around it.**
|
|
1097
1102
|
|
|
1098
1103
|
**The grain and the span are two questions, not one:** `month` and `day` pick a single period.
|
|
1099
1104
|
`range` and `day-range` pick a start and an end in the same two presses. Periods are ISO strings in
|
|
@@ -1443,7 +1448,15 @@ asterisk. **A `dropdown()` inside `field()` is wired through its trigger button*
|
|
|
1443
1448
|
dropdown's `id` sits on a wrapper that a label cannot name. The label and then the chosen value name
|
|
1444
1449
|
the trigger, the error or hint describes it, and an error marks it invalid. The list is named by the
|
|
1445
1450
|
label unless you give it an `ariaLabel`. A control outside a `field()` needs its own `ariaLabel`. A
|
|
1446
|
-
placeholder is not a name.
|
|
1451
|
+
placeholder is not a name. **In a field, a dropdown trigger has the shape of a text input.** It
|
|
1452
|
+
takes the input's corner, its top and bottom padding and its type size, so the two have the same
|
|
1453
|
+
height. Its side padding is 16px, 1px more than the input's. On a touch screen its text is a
|
|
1454
|
+
fixed 16px, as the input's is, also when the host changes `--text-base`. A long value stays on
|
|
1455
|
+
one line, starts at the left and ends with an ellipsis, as in a select, so the trigger keeps the
|
|
1456
|
+
input's height at every value length. A person mark stands as far from the left edge as from the
|
|
1457
|
+
top and bottom edges. A date picker in a field does the same. Outside a field, for example in a
|
|
1458
|
+
filter bar, a toolbar or the topbar, the trigger keeps the pill.
|
|
1459
|
+
Put a form on a card, not on the page ground. A field is drawn by its edge, but the page ground
|
|
1447
1460
|
is too close to the field's own fill for you to see that edge. See
|
|
1448
1461
|
[Colour and contrast](foundations.md#colour-and-contrast).
|
|
1449
1462
|
|
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
--tap-clear-y: var(--tap-gap);
|
|
125
125
|
}
|
|
126
126
|
.ui-confirm__acts,
|
|
127
|
-
.ui-toolbar,
|
|
127
|
+
.ui-toolbar:not(.ui-table *),
|
|
128
128
|
.ui-empty__actions,
|
|
129
129
|
.ui-sx__actions,
|
|
130
130
|
.ui-fbc__foot,
|
|
@@ -1365,6 +1365,14 @@
|
|
|
1365
1365
|
.ui-react-app__band-control > :first-child {
|
|
1366
1366
|
min-width: 0;
|
|
1367
1367
|
}
|
|
1368
|
+
.ui-react-app__band-control > * {
|
|
1369
|
+
position: relative;
|
|
1370
|
+
z-index: var(--z-base);
|
|
1371
|
+
}
|
|
1372
|
+
.ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger::after {
|
|
1373
|
+
min-width: calc(100% + 2px);
|
|
1374
|
+
min-height: calc(100% + 2px);
|
|
1375
|
+
}
|
|
1368
1376
|
.ui-react-app__band-control > .ui-btn,
|
|
1369
1377
|
.ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger {
|
|
1370
1378
|
min-height: 40px;
|
package/react/dist/index.d.ts
CHANGED
|
@@ -376,7 +376,8 @@ type DataTableProps<T> = {
|
|
|
376
376
|
dense?: boolean;
|
|
377
377
|
density?: 'default' | 'dense' | 'compact' | 'comfortable';
|
|
378
378
|
stickyHeader?: boolean;
|
|
379
|
-
|
|
379
|
+
/** `true` pins column 0. A column key pins that column, so a date can stand before the pinned identity. */
|
|
380
|
+
pinnedIdentity?: boolean | (keyof T & string);
|
|
380
381
|
scrollLabel?: string;
|
|
381
382
|
empty?: ReactNode;
|
|
382
383
|
pageSize?: number;
|
package/react/dist/index.js
CHANGED
|
@@ -527,7 +527,7 @@ function noteClose() {
|
|
|
527
527
|
import { useEffect as useEffect2, useId as useId3, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
528
528
|
import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
529
529
|
var DOC_EVENTS = ["pointerdown", "pointercancel", "click", "keydown", "touchend"];
|
|
530
|
-
var CAPTURED = /* @__PURE__ */ new Set(["pointerdown", "pointercancel"]);
|
|
530
|
+
var CAPTURED = /* @__PURE__ */ new Set(["pointerdown", "pointercancel", "keydown"]);
|
|
531
531
|
var wirings = /* @__PURE__ */ new WeakMap();
|
|
532
532
|
function wireDocument(doc, handlers) {
|
|
533
533
|
let wiring2 = wirings.get(doc);
|
|
@@ -629,7 +629,10 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
|
|
|
629
629
|
ignoreMouseUntil.current = 0;
|
|
630
630
|
pointerKind.current = "";
|
|
631
631
|
pendingClick.current = null;
|
|
632
|
-
if (event.key === "Escape")
|
|
632
|
+
if (event.key === "Escape") {
|
|
633
|
+
if (active.current) event.preventDefault();
|
|
634
|
+
close();
|
|
635
|
+
}
|
|
633
636
|
};
|
|
634
637
|
shared.current.touchend = (event) => {
|
|
635
638
|
if (!host.current?.contains(event.target)) close(true);
|
|
@@ -854,8 +857,10 @@ function trapTab(panel, e) {
|
|
|
854
857
|
function onKey(e) {
|
|
855
858
|
const top = stack[stack.length - 1];
|
|
856
859
|
if (!top) return;
|
|
857
|
-
if (e.key === "Escape")
|
|
858
|
-
|
|
860
|
+
if (e.key === "Escape") {
|
|
861
|
+
if (e.defaultPrevented) return;
|
|
862
|
+
top.close();
|
|
863
|
+
} else if (e.key === "Tab") trapTab(top.panel, e);
|
|
859
864
|
}
|
|
860
865
|
function sync() {
|
|
861
866
|
for (const [el, was] of marked) if (!was) el.removeAttribute("inert");
|
|
@@ -2147,6 +2152,7 @@ function Pagination({
|
|
|
2147
2152
|
// src/DataTable.tsx
|
|
2148
2153
|
import { Fragment as Fragment12, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2149
2154
|
var CELL_CLASS = { title: "ui-table__title", code: "ui-table__code", long: "ui-table__long", strong: "ui-table__num--strong", act: "ui-table__act" };
|
|
2155
|
+
var pinnedColumn = (pinnedIdentity, key, index) => pinnedIdentity === true ? index === 0 : pinnedIdentity === key;
|
|
2150
2156
|
var NO_SORT = { key: void 0, dir: -1 };
|
|
2151
2157
|
function sortTableRows(rows, sort) {
|
|
2152
2158
|
if (sort.key === void 0) return [...rows];
|
|
@@ -2297,7 +2303,7 @@ function DataTable({
|
|
|
2297
2303
|
"th",
|
|
2298
2304
|
{
|
|
2299
2305
|
scope: "col",
|
|
2300
|
-
className: [pinnedIdentity
|
|
2306
|
+
className: [pinnedColumn(pinnedIdentity, c.key, columnIndex) && "ui-table__identity", c.num && "ui-table__num", c.sortable && "rx-sortable"].filter(Boolean).join(" "),
|
|
2301
2307
|
"aria-sort": sort.key === c.key ? sort.dir === 1 ? "ascending" : "descending" : c.sortable && sortIsKnown ? "none" : void 0,
|
|
2302
2308
|
children: c.sortable ? (
|
|
2303
2309
|
// The label is its own box so it can truncate: in a pinned
|
|
@@ -2335,7 +2341,7 @@ function DataTable({
|
|
|
2335
2341
|
Cell,
|
|
2336
2342
|
{
|
|
2337
2343
|
scope: c.rowHeader ? "row" : void 0,
|
|
2338
|
-
className: [c.num && "ui-table__num", c.cell && CELL_CLASS[c.cell], pinnedIdentity
|
|
2344
|
+
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,
|
|
2339
2345
|
children: c.render ? c.render(r) : String(r[c.key])
|
|
2340
2346
|
},
|
|
2341
2347
|
c.key
|
|
@@ -2466,7 +2472,7 @@ import {
|
|
|
2466
2472
|
useRef as useRef14,
|
|
2467
2473
|
useState as useState11
|
|
2468
2474
|
} from "react";
|
|
2469
|
-
import { dropdownViewportFit } from "@apliteni/apliteni-ui";
|
|
2475
|
+
import { dropdownRest, dropdownViewportFit } from "@apliteni/apliteni-ui";
|
|
2470
2476
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2471
2477
|
var cx5 = (...a) => a.filter(Boolean).join(" ");
|
|
2472
2478
|
var pad = (n) => String(n).padStart(2, "0");
|
|
@@ -2633,7 +2639,8 @@ function DatePicker({
|
|
|
2633
2639
|
if (!got) return;
|
|
2634
2640
|
el.style.setProperty("--ui-dropdown-ceiling", got.max > 0 ? `${got.max}px` : "");
|
|
2635
2641
|
if (got.width > got.max) got = dropdownViewportFit(el) ?? got;
|
|
2636
|
-
el.style.
|
|
2642
|
+
el.style.marginLeft = got.shift ? `${got.shift}px` : "";
|
|
2643
|
+
el.style.marginRight = got.shift ? `${-got.shift}px` : "";
|
|
2637
2644
|
};
|
|
2638
2645
|
fit();
|
|
2639
2646
|
const ro = typeof view.ResizeObserver === "function" ? new view.ResizeObserver(fit) : null;
|
|
@@ -2651,18 +2658,16 @@ function DatePicker({
|
|
|
2651
2658
|
const onClick = (e) => {
|
|
2652
2659
|
if (!root.current?.contains(e.target)) close.current(false);
|
|
2653
2660
|
};
|
|
2654
|
-
const onKey2 = (e) => {
|
|
2655
|
-
if (e.key !== "Escape") return;
|
|
2656
|
-
close.current(false);
|
|
2657
|
-
trigger.current?.focus();
|
|
2658
|
-
};
|
|
2659
2661
|
doc.addEventListener("click", onClick);
|
|
2660
|
-
doc.addEventListener("keydown", onKey2);
|
|
2661
2662
|
return () => {
|
|
2662
2663
|
doc.removeEventListener("click", onClick);
|
|
2663
|
-
doc.removeEventListener("keydown", onKey2);
|
|
2664
2664
|
};
|
|
2665
2665
|
}, [open]);
|
|
2666
|
+
useIsoLayoutEffect(() => {
|
|
2667
|
+
const el = panel.current;
|
|
2668
|
+
if (!el || !root.current) return void 0;
|
|
2669
|
+
return dropdownRest(root.current, el, open);
|
|
2670
|
+
}, [open, asSheet]);
|
|
2666
2671
|
useIsoLayoutEffect(() => {
|
|
2667
2672
|
if (!open || !land.current) return;
|
|
2668
2673
|
land.current = false;
|
|
@@ -2907,49 +2912,62 @@ function DatePicker({
|
|
|
2907
2912
|
// `open` on the root whichever form the panel takes, so the trigger's
|
|
2908
2913
|
// chevron flips for the sheet as it does for the popover. The panel rules
|
|
2909
2914
|
// it also switches on have no panel to find while the sheet is up.
|
|
2910
|
-
/* @__PURE__ */ jsxs21(
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2915
|
+
/* @__PURE__ */ jsxs21(
|
|
2916
|
+
"div",
|
|
2917
|
+
{
|
|
2918
|
+
className: cx5("ui-dropdown", "ui-datepicker", open && "open"),
|
|
2919
|
+
ref: root,
|
|
2920
|
+
onKeyDown: (e) => {
|
|
2921
|
+
if (asSheet || !open || e.key !== "Escape") return;
|
|
2922
|
+
e.preventDefault();
|
|
2923
|
+
close.current(false);
|
|
2924
|
+
trigger.current?.focus();
|
|
2925
|
+
},
|
|
2926
|
+
children: [
|
|
2927
|
+
/* @__PURE__ */ jsxs21(
|
|
2928
|
+
"button",
|
|
2929
|
+
{
|
|
2930
|
+
type: "button",
|
|
2931
|
+
className: "ui-dropdown__trigger ui-datepicker__trigger",
|
|
2932
|
+
id,
|
|
2933
|
+
"aria-haspopup": "dialog",
|
|
2934
|
+
"aria-expanded": open,
|
|
2935
|
+
"aria-label": ariaLabel || void 0,
|
|
2936
|
+
disabled,
|
|
2937
|
+
ref: trigger,
|
|
2938
|
+
onClick: (e) => {
|
|
2939
|
+
e.stopPropagation();
|
|
2940
|
+
setOpen(!open);
|
|
2941
|
+
},
|
|
2942
|
+
children: [
|
|
2943
|
+
/* @__PURE__ */ jsx25("span", { className: "ui-dropdown__value", children: shown ?? empty }),
|
|
2944
|
+
/* @__PURE__ */ jsx25("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
|
|
2945
|
+
]
|
|
2946
|
+
}
|
|
2947
|
+
),
|
|
2948
|
+
asSheet ? (
|
|
2949
|
+
// A sheet is the kit's drawer, not a wide popover: the scrim, the close
|
|
2950
|
+
// control, the focus trap, the inert page behind it and the restored
|
|
2951
|
+
// focus all come from <Drawer>, because changing the FORM of the panel
|
|
2952
|
+
// without taking the sheet's affordances left a phone reader with no
|
|
2953
|
+
// visible way out and a Tab that walked into the live page behind it.
|
|
2954
|
+
// why: guidelines/drawer.md
|
|
2955
|
+
/* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: name, onClose: () => setOpen(false), children: calendar })
|
|
2956
|
+
) : /* @__PURE__ */ jsx25(
|
|
2957
|
+
"div",
|
|
2958
|
+
{
|
|
2959
|
+
className: cx5("ui-dropdown__panel", "ui-datepicker__panel", align === "end" && "is-end"),
|
|
2960
|
+
ref: panel,
|
|
2961
|
+
role: "dialog",
|
|
2962
|
+
"aria-label": name,
|
|
2963
|
+
inert: !open,
|
|
2964
|
+
onClick: (e) => e.stopPropagation(),
|
|
2965
|
+
children: calendar
|
|
2966
|
+
}
|
|
2967
|
+
)
|
|
2968
|
+
]
|
|
2969
|
+
}
|
|
2970
|
+
)
|
|
2953
2971
|
);
|
|
2954
2972
|
}
|
|
2955
2973
|
|
|
@@ -2973,7 +2991,7 @@ import {
|
|
|
2973
2991
|
dropdownHeightFit,
|
|
2974
2992
|
dropdownLift,
|
|
2975
2993
|
dropdownReveal,
|
|
2976
|
-
dropdownRest,
|
|
2994
|
+
dropdownRest as dropdownRest2,
|
|
2977
2995
|
dropdownSnap,
|
|
2978
2996
|
filterPanelRow
|
|
2979
2997
|
} from "@apliteni/apliteni-ui";
|
|
@@ -3217,7 +3235,7 @@ function Dropdown({
|
|
|
3217
3235
|
useIsoLayoutEffect(() => {
|
|
3218
3236
|
const el = panel.current;
|
|
3219
3237
|
if (!el || !root.current) return void 0;
|
|
3220
|
-
return
|
|
3238
|
+
return dropdownRest2(root.current, el, open);
|
|
3221
3239
|
}, [open]);
|
|
3222
3240
|
useIsoLayoutEffect(() => {
|
|
3223
3241
|
const dd = root.current;
|
|
@@ -3298,7 +3316,8 @@ function Dropdown({
|
|
|
3298
3316
|
if (!got) return;
|
|
3299
3317
|
el.style.setProperty("--ui-dropdown-ceiling", got.max > 0 ? `${got.max}px` : "");
|
|
3300
3318
|
if (got.width > got.max) got = dropdownViewportFit2(el) ?? got;
|
|
3301
|
-
el.style.
|
|
3319
|
+
el.style.marginLeft = got.shift ? `${got.shift}px` : "";
|
|
3320
|
+
el.style.marginRight = got.shift ? `${-got.shift}px` : "";
|
|
3302
3321
|
};
|
|
3303
3322
|
fit();
|
|
3304
3323
|
const view = root.current?.ownerDocument?.defaultView;
|
|
@@ -350,7 +350,8 @@ function ddPlaceLifted(dd, panel) {
|
|
|
350
350
|
const other = configured ? below : above;
|
|
351
351
|
const up = mine < Math.min(ddMin(panel), ddContentHeight(panel)) && other > mine ? !configured : configured;
|
|
352
352
|
const s = panel.style;
|
|
353
|
-
s.
|
|
353
|
+
s.marginLeft = '';
|
|
354
|
+
s.marginRight = '';
|
|
354
355
|
if (panel.getAttribute('data-dd-lifted') !== (up ? 'up' : 'down')) {
|
|
355
356
|
const held = s.transition;
|
|
356
357
|
s.transition = 'none';
|
|
@@ -624,8 +625,10 @@ export const DD_EXIT_SLACK_MS = 50;
|
|
|
624
625
|
/** The shift a panel is already carrying, the one ddFitViewport() wrote. Taken
|
|
625
626
|
* off before the next measurement, so asking twice answers the same as asking
|
|
626
627
|
* once — the fit is measured from where the sheet puts the panel, not from where
|
|
627
|
-
* the last fit left it.
|
|
628
|
-
|
|
628
|
+
* the last fit left it. The shift is side margins, not a translate: Chromium 158
|
|
629
|
+
* kept the page as wide as a translated panel's old place after a transition
|
|
630
|
+
* ended (#812). The far margin gives the room back, so the panel keeps its width. */
|
|
631
|
+
const ddShiftOf = (panel) => parseFloat(panel.style?.marginLeft) || 0;
|
|
629
632
|
|
|
630
633
|
/** The widest a panel may be: the view it is laid out in, less the keep-out it owes
|
|
631
634
|
* each edge. It is the bound a PORTALLED panel needs, whose room is the whole view
|
package/src/styles/dropdown.css
CHANGED
|
@@ -546,3 +546,36 @@
|
|
|
546
546
|
.ui-field > .ui-dropdown { display: grid; }
|
|
547
547
|
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__chevron { margin-left: auto; }
|
|
548
548
|
.ui-field > .ui-dropdown > .ui-dropdown__panel { inline-size: 100%; min-width: 0; }
|
|
549
|
+
/* In a form the trigger takes the text input's corner, block padding and type, so the
|
|
550
|
+
two stand at one height. Elsewhere it keeps the pill. #812
|
|
551
|
+
why: docs/components.md#forms */
|
|
552
|
+
@property --ui-dropdown-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
|
|
553
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger {
|
|
554
|
+
border-radius: var(--radius-md);
|
|
555
|
+
padding: var(--space-3) var(--space-4);
|
|
556
|
+
font-size: var(--text-base);
|
|
557
|
+
min-inline-size: 0;
|
|
558
|
+
/* The value line, as a length the mark below can read. */
|
|
559
|
+
--ui-dropdown-line: 1lh;
|
|
560
|
+
}
|
|
561
|
+
/* A long value keeps one line from the left and ends in an ellipsis, as the select
|
|
562
|
+
does, so the trigger keeps the input's height at every length. */
|
|
563
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__value,
|
|
564
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__text {
|
|
565
|
+
min-inline-size: 0;
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
white-space: nowrap;
|
|
568
|
+
text-overflow: ellipsis;
|
|
569
|
+
text-align: start;
|
|
570
|
+
}
|
|
571
|
+
/* The mark stands as far from the left edge as from the top and bottom edges. */
|
|
572
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-avatar {
|
|
573
|
+
--ui-avatar-pull-start: calc(var(--space-4) - var(--space-3) - (var(--ui-dropdown-line) - var(--ui-avatar-size)) / 2);
|
|
574
|
+
}
|
|
575
|
+
/* The input beside it is 16px on a touch screen, so the trigger follows it. A flat
|
|
576
|
+
16px like the zoom net, so a host's --text-base does not move it off the input.
|
|
577
|
+
Not the net's job: the trigger takes no typing.
|
|
578
|
+
why: docs/foundations.md#a-field-is-16px-on-a-touch-screen */
|
|
579
|
+
@media (pointer: coarse) {
|
|
580
|
+
.ui-field > .ui-dropdown > .ui-dropdown__trigger { font-size: 16px; }
|
|
581
|
+
}
|
package/src/styles/table.css
CHANGED
|
@@ -488,7 +488,7 @@ a.ui-identity:hover { text-decoration: underline; }
|
|
|
488
488
|
/* One width reserves the selection track and offsets the adjacent identity. */
|
|
489
489
|
.ui-table--pinned { --ui-table-selection-width: var(--space-12); --ui-table-identity-max: min(var(--panel-sm), 50vw); }
|
|
490
490
|
.ui-table--pinned .ui-table__selection { box-sizing: border-box; width: var(--ui-table-selection-width); min-width: var(--ui-table-selection-width); max-width: var(--ui-table-selection-width); padding-inline: 0; text-align: center; }
|
|
491
|
-
.ui-table--pinned .ui-table__selection
|
|
491
|
+
.ui-table--pinned .ui-table__selection ~ .ui-table__identity { left: var(--ui-table-selection-width); }
|
|
492
492
|
|
|
493
493
|
/* ============================================================================
|
|
494
494
|
* Running text in a cell — .ui-table__long
|
package/src/styles/tap-zone.css
CHANGED
|
@@ -195,9 +195,10 @@
|
|
|
195
195
|
at 390 is often already full, so widening its column gap does not move the
|
|
196
196
|
buttons apart — it makes them narrower, and that is the half #488 rules
|
|
197
197
|
out. Measured on a toolbar of three buttons and a dropdown. These rows
|
|
198
|
-
wrap, which is also where the review measured them colliding.
|
|
198
|
+
wrap, which is also where the review measured them colliding. Not a toolbar in a
|
|
199
|
+
table cell: the row would grow, and a table's rows keep their height. #812 */
|
|
199
200
|
.ui-confirm__acts,
|
|
200
|
-
.ui-toolbar,
|
|
201
|
+
.ui-toolbar:not(.ui-table *),
|
|
201
202
|
.ui-empty__actions,
|
|
202
203
|
.ui-sx__actions,
|
|
203
204
|
.ui-fbc__foot,
|