datocms-react-ui 3.1.0-next.10 → 3.1.0-next.11
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/dist/InsertGap.js +2 -2
- package/dist/styles.css +364 -52
- package/dist/ui-public/icons/index.js +304 -300
- package/dist/ui-public/icons/lucide/arrow-down-wide-narrow.js +28 -0
- package/dist/ui-public/icons/lucide/arrow-up-narrow-wide.js +28 -0
- package/dist/ui-public/locales/en.js +1 -0
- package/dist/ui-public/src/UiTextKey.d.ts +1 -1
- package/dist/ui-public/src/actions/Actions/index.d.ts +1 -1
- package/dist/ui-public/src/actions/Actions/registry.d.ts +23 -1
- package/dist/ui-public/src/actions/Actions/registry.js +38 -6
- package/dist/ui-public/src/form/SelectInput/SelectMenu.js +1 -1
- package/dist/ui-public/src/form/SelectInput/SortableMultiValue.js +1 -1
- package/dist/ui-public/src/form/SwitchInput.d.ts +17 -2
- package/dist/ui-public/src/form/SwitchInput.js +57 -38
- package/dist/ui-public/src/form/SwitchList.d.ts +2 -1
- package/dist/ui-public/src/form/SwitchList.js +2 -1
- package/dist/ui-public/src/layout/SidebarPanel.d.ts +15 -1
- package/dist/ui-public/src/layout/SidebarPanel.js +30 -17
- package/dist/ui-public/src/layout/SplitPane/index.js +1 -0
- package/dist/ui-public/src/layout/Toolbar/FilterToggle.d.ts +2 -2
- package/dist/ui-public/src/layout/Toolbar/FilterToggle.js +6 -6
- package/dist/ui-public/src/layout/Toolbar/Help.d.ts +7 -1
- package/dist/ui-public/src/layout/Toolbar/Help.js +5 -4
- package/dist/ui-public/src/layout/Toolbar/index.d.ts +1 -1
- package/dist/ui-public/src/layout/Toolbar/index.js +1 -1
- package/dist/ui-public/src/lists/InfoList/Value.d.ts +22 -2
- package/dist/ui-public/src/lists/InfoList/Value.js +25 -1
- package/dist/ui-public/src/lists/InfoList/index.d.ts +2 -1
- package/dist/ui-public/src/lists/InsertGap/index.d.ts +31 -1
- package/dist/ui-public/src/lists/InsertGap/index.js +23 -3
- package/dist/ui-public/src/lists/InsertGap/parts.d.ts +2 -1
- package/dist/ui-public/src/lists/InsertGap/parts.js +60 -27
- package/dist/ui-public/src/lists/Table/cells/TimeCell.d.ts +1 -1
- package/dist/ui-public/src/lists/Table/cells/TimeCell.js +8 -5
- package/dist/ui-public/src/lists/Table/layout.js +3 -3
- package/dist/ui-public/src/lists/Table/types.d.ts +6 -0
- package/dist/ui-public/src/lists/UploadCard.js +7 -4
- package/dist/ui-public/src/overlays/Modal/Layer.d.ts +18 -0
- package/dist/ui-public/src/overlays/Modal/Layer.js +3 -2
- package/dist/ui-public/src/overlays/Modal/index.d.ts +10 -1
- package/dist/ui-public/src/overlays/Modal/index.js +2 -1
- package/dist/ui-public/src/overlays/Popover.js +4 -1
- package/dist/ui-public/src/patterns/ListDetail/Split.js +1 -0
- package/dist/ui-public/src/utils/pointerNearGap.d.ts +23 -0
- package/dist/ui-public/src/utils/pointerNearGap.js +211 -11
- package/package.json +1 -1
package/dist/InsertGap.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import InsertGap_default, { insertGapListProps } from "./ui-public/src/lists/InsertGap/index.js";
|
|
2
|
-
export { InsertGap_default as default, insertGapListProps };
|
|
1
|
+
import InsertGap_default, { insertGapListProps, insertGapMarginBoundaryProps, insertGapMarginObstacleProps } from "./ui-public/src/lists/InsertGap/index.js";
|
|
2
|
+
export { InsertGap_default as default, insertGapListProps, insertGapMarginBoundaryProps, insertGapMarginObstacleProps };
|
package/dist/styles.css
CHANGED
|
@@ -1273,6 +1273,9 @@ button {
|
|
|
1273
1273
|
align-items: center;
|
|
1274
1274
|
justify-content: center;
|
|
1275
1275
|
max-width: 100%;
|
|
1276
|
+
/* One line of text and the padding. The button sets it, because the box
|
|
1277
|
+
of the label is lower than a line (see "text-box" below). */
|
|
1278
|
+
min-height: calc(1lh + 2 * var(--button-pad-y));
|
|
1276
1279
|
padding: var(--button-pad-y) var(--button-pad-x);
|
|
1277
1280
|
font-family: inherit;
|
|
1278
1281
|
font-size: 1.1em;
|
|
@@ -1300,12 +1303,25 @@ button {
|
|
|
1300
1303
|
&:is(:not(:where(:disabled, .is-disabled, [aria-disabled='true']))):active {
|
|
1301
1304
|
background-color: var(--color--primary-soft--surface-active);
|
|
1302
1305
|
}
|
|
1306
|
+
/* The box of the label goes from the top of the capital letters to the
|
|
1307
|
+
baseline, thus the capital letters are in the middle of the button, at
|
|
1308
|
+
the height of the icons. The box does not clip on the y axis, because
|
|
1309
|
+
the letters go below it ("g", "y"). */
|
|
1303
1310
|
> span {
|
|
1304
1311
|
position: relative;
|
|
1305
|
-
top: 0.06em;
|
|
1306
1312
|
min-width: 0;
|
|
1307
|
-
overflow:
|
|
1313
|
+
overflow-x: clip;
|
|
1314
|
+
overflow-y: visible;
|
|
1308
1315
|
text-overflow: ellipsis;
|
|
1316
|
+
text-box: trim-both cap alphabetic;
|
|
1317
|
+
}
|
|
1318
|
+
/* Without "text-box", the box of the label is the line, and the letters
|
|
1319
|
+
are a bit too high in it */
|
|
1320
|
+
@supports not (text-box: trim-both cap alphabetic) {
|
|
1321
|
+
> span {
|
|
1322
|
+
top: 0.06em;
|
|
1323
|
+
overflow: hidden;
|
|
1324
|
+
}
|
|
1309
1325
|
}
|
|
1310
1326
|
svg,
|
|
1311
1327
|
i,
|
|
@@ -1863,6 +1879,12 @@ button.EmptySlot {
|
|
|
1863
1879
|
--InsertGap-size: var(--spacing-l);
|
|
1864
1880
|
--InsertGap-gutter: var(--DragHandle-gutter);
|
|
1865
1881
|
}
|
|
1882
|
+
/* The line of a drag below the last row is at the place of the gap: the gap
|
|
1883
|
+
then hides its "+" and its line (see _InsertGap.css) */
|
|
1884
|
+
.TableList:has(.TableList__row:last-child > .DropIndicator--bottom)
|
|
1885
|
+
> .InsertGap {
|
|
1886
|
+
--InsertGap-no-drop: 0;
|
|
1887
|
+
}
|
|
1866
1888
|
.TableList--disabled {
|
|
1867
1889
|
--TableList-action-width: 0px;
|
|
1868
1890
|
}
|
|
@@ -2189,12 +2211,15 @@ button.EmptySlot {
|
|
|
2189
2211
|
}
|
|
2190
2212
|
/* In a list to read, the value of a row can be far from its title: the
|
|
2191
2213
|
hover helps the eye to follow the row. The cursor does not change,
|
|
2192
|
-
because the row does not open.
|
|
2214
|
+
because the row does not open. While the HoverCard of an item is open
|
|
2215
|
+
(data-open), its row keeps the surface. Thus the row of the card shows
|
|
2216
|
+
when the pointer is in the card or the focus opened it. */
|
|
2193
2217
|
.CardList--actions-always > .CardList__items
|
|
2194
2218
|
> .CardList__item
|
|
2195
2219
|
> .CardList__row {
|
|
2196
2220
|
@media (hover: hover) {
|
|
2197
|
-
&:hover
|
|
2221
|
+
&:hover,
|
|
2222
|
+
.CardList__item[data-open] > & {
|
|
2198
2223
|
background: var(--color--surface-hover);
|
|
2199
2224
|
}
|
|
2200
2225
|
}
|
|
@@ -2297,23 +2322,59 @@ button.EmptySlot {
|
|
|
2297
2322
|
values:
|
|
2298
2323
|
--InsertGap-size: the space between two items.
|
|
2299
2324
|
--InsertGap-gutter: the width of the column at the left of the items,
|
|
2300
|
-
where the grip is.
|
|
2325
|
+
where the grip is.
|
|
2326
|
+
|
|
2327
|
+
The caller can set this value on the gap:
|
|
2328
|
+
--InsertGap-rest: 1 when the gap shows its "+" and its thin line also
|
|
2329
|
+
when the pointer is far, 0 when it does not. The default is 1 for the
|
|
2330
|
+
gap at the end of the outermost list, and 0 for the other gaps. A drop
|
|
2331
|
+
line at the place of the gap always hides them.
|
|
2332
|
+
|
|
2333
|
+
When the list has free space on its left, pointerNearGap.ts moves the
|
|
2334
|
+
gaps of the nested lists to the column of the outermost list, and shows
|
|
2335
|
+
the label next to the "+" in the margin at its left. */
|
|
2301
2336
|
|
|
2302
|
-
/* [data-near]: the pointer is near
|
|
2337
|
+
/* The gap shows its button and its line. [data-near]: the pointer is near
|
|
2338
|
+
the gap (see pointerNearGap.ts). A caller can use this selector in a
|
|
2339
|
+
stylesheet that it imports after this file, for example to hide a line
|
|
2340
|
+
of its item below the line of the gap. */
|
|
2341
|
+
|
|
2342
|
+
/* The gap shows its label in the margin: the margin has space for it, and
|
|
2343
|
+
the gap is the nearest to the pointer or the user is on it */
|
|
2303
2344
|
|
|
2304
2345
|
.InsertGap {
|
|
2305
2346
|
/* 1 when the gap shows its button, 0 when it hides it */
|
|
2306
2347
|
--InsertGap-on: 0;
|
|
2307
2348
|
/* 1 when the user is on the gap */
|
|
2308
2349
|
--InsertGap-active: 0;
|
|
2350
|
+
/* 0 when the line of a drag is at the place of the gap (see below) */
|
|
2351
|
+
--InsertGap-no-drop: 1;
|
|
2309
2352
|
/* The time that the pointer must stay before the gap shows its button.
|
|
2310
2353
|
The pointer can go across the list and the buttons do not flash. The
|
|
2311
2354
|
gap hides its button with no delay. */
|
|
2312
2355
|
--InsertGap-delay: 0.1s;
|
|
2313
2356
|
|
|
2357
|
+
/* The size of the "+". The label reads it too, thus it is on the gap. */
|
|
2358
|
+
--InsertGap-plus-size: calc(var(--font-size-xs) + var(--spacing-s));
|
|
2359
|
+
/* The space between the label in the margin, with its "+", and the
|
|
2360
|
+
items */
|
|
2361
|
+
--InsertGap-column-space: calc(var(--spacing-m) + var(--spacing-s));
|
|
2362
|
+
/* 1 when the margin has space for the labels, 0 when not. Then the gap
|
|
2363
|
+
shows only its "+", in the gutter of its own list. */
|
|
2364
|
+
--InsertGap-in-column: 0;
|
|
2365
|
+
|
|
2314
2366
|
position: absolute;
|
|
2315
2367
|
right: 0;
|
|
2316
|
-
|
|
2368
|
+
/* --InsertGap-shift: the distance from the gutter of this list to the
|
|
2369
|
+
column of the outermost list (see pointerNearGap.ts) */
|
|
2370
|
+
left: calc(
|
|
2371
|
+
-1 *
|
|
2372
|
+
(
|
|
2373
|
+
var(--InsertGap-gutter) +
|
|
2374
|
+
var(--InsertGap-in-column) *
|
|
2375
|
+
var(--InsertGap-shift, 0px)
|
|
2376
|
+
)
|
|
2377
|
+
);
|
|
2317
2378
|
z-index: 3;
|
|
2318
2379
|
height: var(--InsertGap-size);
|
|
2319
2380
|
|
|
@@ -2331,6 +2392,39 @@ button.EmptySlot {
|
|
|
2331
2392
|
&:is(:focus-within, :has(.Dropdown.is-open)) {
|
|
2332
2393
|
--InsertGap-delay: 0s;
|
|
2333
2394
|
}
|
|
2395
|
+
/* data-label-fits: the margin has space for the labels (see
|
|
2396
|
+
pointerNearGap.ts) */
|
|
2397
|
+
&[data-label-fits] {
|
|
2398
|
+
--InsertGap-in-column: 1;
|
|
2399
|
+
}
|
|
2400
|
+
/* The label of this gap covers the labels of the gaps near it */
|
|
2401
|
+
&:is([data-label-fits]:is(
|
|
2402
|
+
[data-nearest],
|
|
2403
|
+
:hover,
|
|
2404
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2405
|
+
:has(.Dropdown.is-open)
|
|
2406
|
+
)) {
|
|
2407
|
+
z-index: 4;
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
/* The defaults of --InsertGap-rest. ":where" gives them no specificity,
|
|
2411
|
+
thus a rule of the caller on the gap wins. */
|
|
2412
|
+
:where(.InsertGap) {
|
|
2413
|
+
--InsertGap-rest: 0;
|
|
2414
|
+
}
|
|
2415
|
+
/* data-gap-end: the gap adds at the end of the outermost list (see
|
|
2416
|
+
pointerNearGap.ts). By default it always shows its "+" and its thin
|
|
2417
|
+
line, without its label. Thus the user sees that the list can get more
|
|
2418
|
+
items. */
|
|
2419
|
+
:where(.InsertGap[data-gap-end]) {
|
|
2420
|
+
--InsertGap-rest: 1;
|
|
2421
|
+
}
|
|
2422
|
+
/* The line of a drag is at the place of the gap (see _DropIndicator.css):
|
|
2423
|
+
the gap then hides its "+" and its line at rest, so the user sees only
|
|
2424
|
+
one line. A list whose drop line is not in the item of the gap sets
|
|
2425
|
+
--InsertGap-no-drop itself (see _TableList.css). */
|
|
2426
|
+
:has(> .DropIndicator--bottom) > .InsertGap--after {
|
|
2427
|
+
--InsertGap-no-drop: 0;
|
|
2334
2428
|
}
|
|
2335
2429
|
.InsertGap--before {
|
|
2336
2430
|
top: calc(-1 * var(--InsertGap-size));
|
|
@@ -2367,12 +2461,14 @@ button.EmptySlot {
|
|
|
2367
2461
|
/* The small button is only a picture: the bar is the button. It is higher
|
|
2368
2462
|
than the gap, thus it takes the pointer only while it shows. */
|
|
2369
2463
|
.InsertGap__plus {
|
|
2370
|
-
/* The icon is 1em of the text, and the box adds a small space around it */
|
|
2371
|
-
--InsertGap-plus-size: calc(1em + var(--spacing-s));
|
|
2372
|
-
|
|
2373
2464
|
position: absolute;
|
|
2374
2465
|
top: calc(50% - var(--InsertGap-plus-size) / 2);
|
|
2375
|
-
left: calc(
|
|
2466
|
+
left: calc(
|
|
2467
|
+
(var(--InsertGap-gutter) - var(--InsertGap-plus-size)) /
|
|
2468
|
+
2 -
|
|
2469
|
+
var(--InsertGap-in-column) *
|
|
2470
|
+
var(--InsertGap-column-space)
|
|
2471
|
+
);
|
|
2376
2472
|
display: flex;
|
|
2377
2473
|
align-items: center;
|
|
2378
2474
|
justify-content: center;
|
|
@@ -2381,7 +2477,11 @@ button.EmptySlot {
|
|
|
2381
2477
|
font-size: var(--font-size-xs);
|
|
2382
2478
|
pointer-events: none;
|
|
2383
2479
|
border-radius: var(--radius-s);
|
|
2384
|
-
opacity:
|
|
2480
|
+
opacity: max(
|
|
2481
|
+
var(--InsertGap-on),
|
|
2482
|
+
var(--InsertGap-rest) *
|
|
2483
|
+
var(--InsertGap-no-drop)
|
|
2484
|
+
);
|
|
2385
2485
|
/* The button waits only when it shows (see --InsertGap-delay) */
|
|
2386
2486
|
transition: opacity 0.1s ease-in-out
|
|
2387
2487
|
calc(var(--InsertGap-on) * var(--InsertGap-delay));
|
|
@@ -2400,64 +2500,188 @@ button.EmptySlot {
|
|
|
2400
2500
|
height: 1em;
|
|
2401
2501
|
color: var(--color--ink-subtle);
|
|
2402
2502
|
}
|
|
2503
|
+
.InsertGap:is(:hover,
|
|
2504
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2505
|
+
:has(.Dropdown.is-open)) & svg {
|
|
2506
|
+
color: var(--color--primary-soft--ink);
|
|
2507
|
+
}
|
|
2403
2508
|
.InsertGap:is([data-near],
|
|
2404
2509
|
:hover,
|
|
2405
2510
|
:focus-within,
|
|
2406
2511
|
:has(.Dropdown.is-open)) & {
|
|
2407
2512
|
pointer-events: auto;
|
|
2408
2513
|
}
|
|
2409
|
-
|
|
2514
|
+
/* When the label shows, the "+" is a picture in the label: the label
|
|
2515
|
+
draws the state and the focus ring */
|
|
2516
|
+
.InsertGap:not(:is([data-label-fits]:is(
|
|
2517
|
+
[data-nearest],
|
|
2518
|
+
:hover,
|
|
2519
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2520
|
+
:has(.Dropdown.is-open)
|
|
2521
|
+
))):is(:hover,
|
|
2410
2522
|
:has(.InsertGap__bar:focus-visible),
|
|
2411
2523
|
:has(.Dropdown.is-open)) & {
|
|
2412
2524
|
background-color: var(--color--primary-soft--surface);
|
|
2525
|
+
}
|
|
2526
|
+
.InsertGap:not(:is([data-label-fits]:is(
|
|
2527
|
+
[data-nearest],
|
|
2528
|
+
:hover,
|
|
2529
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2530
|
+
:has(.Dropdown.is-open)
|
|
2531
|
+
))) .InsertGap__bar:focus-visible & {
|
|
2532
|
+
box-shadow: var(--focus-ring);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
/* The label is in the margin, on the left of the "+": the "+" is the right
|
|
2536
|
+
end of the label. It always has a box, so the script can read its
|
|
2537
|
+
width. */
|
|
2538
|
+
.InsertGap__label {
|
|
2539
|
+
--InsertGap-label-height: calc(1lh + var(--spacing-s));
|
|
2413
2540
|
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2541
|
+
position: absolute;
|
|
2542
|
+
top: calc(50% - var(--InsertGap-label-height) / 2);
|
|
2543
|
+
/* The label ends a small space after the "+", so the "+" has space on
|
|
2544
|
+
its two sides. The label is always at the position where it shows,
|
|
2545
|
+
thus the script reads the same position before and after it shows. */
|
|
2546
|
+
right: calc(
|
|
2547
|
+
100% -
|
|
2548
|
+
(var(--InsertGap-gutter) + var(--InsertGap-plus-size)) /
|
|
2549
|
+
2 -
|
|
2550
|
+
var(--spacing-s) +
|
|
2551
|
+
var(--InsertGap-column-space)
|
|
2552
|
+
);
|
|
2553
|
+
/* A long label, for example with the name of a model, ends with "…". Thus
|
|
2554
|
+
one long label does not take the labels from all the gaps of the
|
|
2555
|
+
field. */
|
|
2556
|
+
max-width: 16rem;
|
|
2557
|
+
height: var(--InsertGap-label-height);
|
|
2558
|
+
padding: 0 calc(var(--InsertGap-plus-size) + 2 * var(--spacing-s)) 0
|
|
2559
|
+
var(--spacing-m);
|
|
2560
|
+
overflow: hidden;
|
|
2561
|
+
/* The capital letters are in the middle of the box, at the height of the
|
|
2562
|
+
"+". Without "text-box", the line box has more space above the letters
|
|
2563
|
+
than below, and the text looks too low. A browser without "text-box"
|
|
2564
|
+
puts the line box in the middle. */
|
|
2565
|
+
align-content: center;
|
|
2566
|
+
text-box: trim-both cap alphabetic;
|
|
2567
|
+
text-overflow: ellipsis;
|
|
2568
|
+
color: var(--color--ink-subtle);
|
|
2569
|
+
white-space: nowrap;
|
|
2570
|
+
pointer-events: none;
|
|
2571
|
+
background-color: var(--color--surface-muted);
|
|
2572
|
+
border-radius: var(--radius-s);
|
|
2573
|
+
opacity: 0;
|
|
2574
|
+
transition: opacity 0.1s ease-in-out
|
|
2575
|
+
calc(var(--InsertGap-on) * var(--InsertGap-delay));
|
|
2576
|
+
|
|
2577
|
+
/* Only one label shows, so the labels of two gaps near each other do not
|
|
2578
|
+
cover each other */
|
|
2579
|
+
.InsertGap:is([data-label-fits]:is(
|
|
2580
|
+
[data-nearest],
|
|
2581
|
+
:hover,
|
|
2582
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2583
|
+
:has(.Dropdown.is-open)
|
|
2584
|
+
)) & {
|
|
2585
|
+
pointer-events: auto;
|
|
2586
|
+
opacity: var(--InsertGap-on);
|
|
2587
|
+
}
|
|
2588
|
+
.InsertGap:is(:hover,
|
|
2589
|
+
:has(.InsertGap__bar:focus-visible),
|
|
2590
|
+
:has(.Dropdown.is-open)) & {
|
|
2591
|
+
color: var(--color--primary-soft--ink);
|
|
2592
|
+
background-color: var(--color--primary-soft--surface);
|
|
2417
2593
|
}
|
|
2418
2594
|
.InsertGap__bar:focus-visible & {
|
|
2419
2595
|
box-shadow: var(--focus-ring);
|
|
2420
2596
|
}
|
|
2421
2597
|
}
|
|
2422
|
-
/*
|
|
2423
|
-
|
|
2598
|
+
/* A thin line shows when the pointer is near the gap. When the user is on
|
|
2599
|
+
the gap, the accent line grows on it: that line is the same as the line
|
|
2600
|
+
that shows where a dragged item goes (see _DropIndicator.css).
|
|
2601
|
+
|
|
2602
|
+
The element is the box of the accent line, 2px high, and it draws
|
|
2603
|
+
nothing. The two lines are its pseudo-elements, and they start at the same
|
|
2604
|
+
top edge. We do not put a line at half a pixel and we do not grow the
|
|
2605
|
+
accent line with a transform, because the browser then draws the accent
|
|
2606
|
+
line one pixel higher or lower while it grows. */
|
|
2424
2607
|
.InsertGap__line {
|
|
2425
|
-
--InsertGap-line-color: var(--color--border);
|
|
2426
|
-
--InsertGap-line-thickness: calc(1px + var(--InsertGap-active) * 1px);
|
|
2427
2608
|
/* The line starts to grow after the small button shows */
|
|
2428
2609
|
--InsertGap-line-delay: calc(
|
|
2429
2610
|
var(--InsertGap-on) *
|
|
2430
2611
|
(var(--InsertGap-delay) + 0.1s)
|
|
2431
2612
|
);
|
|
2613
|
+
/* In the column, the thin line starts before the box: it goes from the
|
|
2614
|
+
"+" to the items of the list of the gap */
|
|
2615
|
+
--InsertGap-line-lead: calc(
|
|
2616
|
+
var(--InsertGap-in-column) *
|
|
2617
|
+
(
|
|
2618
|
+
var(--InsertGap-shift, 0px) +
|
|
2619
|
+
var(--InsertGap-column-space) -
|
|
2620
|
+
var(--spacing-s)
|
|
2621
|
+
)
|
|
2622
|
+
);
|
|
2432
2623
|
|
|
2433
2624
|
position: absolute;
|
|
2434
|
-
top: calc(50% -
|
|
2625
|
+
top: calc(50% - 1px);
|
|
2435
2626
|
right: 0;
|
|
2436
|
-
|
|
2437
|
-
|
|
2627
|
+
/* The accent line starts at the items of its own list, also when the gap
|
|
2628
|
+
is in the column of the outermost list. Thus it shows the level where
|
|
2629
|
+
the new item goes. */
|
|
2630
|
+
left: calc(
|
|
2631
|
+
var(--InsertGap-gutter) +
|
|
2632
|
+
var(--InsertGap-in-column) *
|
|
2633
|
+
var(--InsertGap-shift, 0px)
|
|
2634
|
+
);
|
|
2635
|
+
height: 2px;
|
|
2438
2636
|
pointer-events: none;
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2637
|
+
opacity: max(
|
|
2638
|
+
var(--InsertGap-on),
|
|
2639
|
+
var(--InsertGap-rest) *
|
|
2640
|
+
var(--InsertGap-no-drop)
|
|
2641
|
+
);
|
|
2642
|
+
transform: scaleX(
|
|
2643
|
+
max(var(--InsertGap-on), var(--InsertGap-rest) * var(--InsertGap-no-drop))
|
|
2644
|
+
);
|
|
2443
2645
|
transform-origin: left center;
|
|
2444
2646
|
transition:
|
|
2445
2647
|
transform 0.5s var(--ease-out) var(--InsertGap-line-delay),
|
|
2446
|
-
opacity 0.2s ease-out var(--InsertGap-line-delay)
|
|
2447
|
-
background-color 0.15s ease-out;
|
|
2648
|
+
opacity 0.2s ease-out var(--InsertGap-line-delay);
|
|
2448
2649
|
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2650
|
+
&::before,
|
|
2651
|
+
&::after {
|
|
2652
|
+
position: absolute;
|
|
2653
|
+
top: 0;
|
|
2654
|
+
right: 0;
|
|
2655
|
+
content: "";
|
|
2656
|
+
}
|
|
2657
|
+
/* Each line is the top border of an element with no height */
|
|
2658
|
+
/* The thin line. It never gets the accent. */
|
|
2659
|
+
&::before {
|
|
2660
|
+
left: calc(-1 * var(--InsertGap-line-lead));
|
|
2661
|
+
border-top: 1px solid var(--color--border);
|
|
2662
|
+
}
|
|
2663
|
+
/* The accent line covers the thin line and the pixel below it. It grows
|
|
2664
|
+
from the start when the user goes on the gap, and it goes away with no
|
|
2665
|
+
growth in reverse. */
|
|
2666
|
+
&::after {
|
|
2667
|
+
left: 0;
|
|
2668
|
+
border-top: 2px solid var(--color--selected--border);
|
|
2669
|
+
opacity: var(--InsertGap-active);
|
|
2670
|
+
clip-path: inset(0 calc((1 - var(--InsertGap-active)) * 100%) 0 0);
|
|
2671
|
+
transition:
|
|
2672
|
+
clip-path calc(var(--InsertGap-active) * 0.4s) var(--ease-out),
|
|
2673
|
+
opacity 0.15s ease-out;
|
|
2453
2674
|
}
|
|
2454
2675
|
}
|
|
2455
2676
|
@media (prefers-reduced-motion: reduce) {
|
|
2456
2677
|
.InsertGap__line {
|
|
2457
2678
|
transform: none;
|
|
2458
|
-
transition:
|
|
2459
|
-
|
|
2460
|
-
|
|
2679
|
+
transition: opacity 0.2s ease-out var(--InsertGap-line-delay);
|
|
2680
|
+
|
|
2681
|
+
&::after {
|
|
2682
|
+
clip-path: none;
|
|
2683
|
+
transition: opacity 0.15s ease-out;
|
|
2684
|
+
}
|
|
2461
2685
|
}
|
|
2462
2686
|
}
|
|
2463
2687
|
@media (hover: none) {
|
|
@@ -3375,6 +3599,11 @@ textarea:focus {
|
|
|
3375
3599
|
animation: Modal__backdrop__appear 0.2s var(--ease-out);
|
|
3376
3600
|
animation-fill-mode: both;
|
|
3377
3601
|
}
|
|
3602
|
+
/* The user reads the page through the backdrop: the dialog acts on it */
|
|
3603
|
+
.Modal__backdrop--dim {
|
|
3604
|
+
background: var(--color--overlay--surface);
|
|
3605
|
+
backdrop-filter: none;
|
|
3606
|
+
}
|
|
3378
3607
|
.Modal__content {
|
|
3379
3608
|
/* The space between the edges of the panel and its content. The title of
|
|
3380
3609
|
the header, the body and the footer line up on it. Content with
|
|
@@ -3680,6 +3909,9 @@ button.Toolbar__tab {
|
|
|
3680
3909
|
/* The width of the column at the left of an element, where the handle of
|
|
3681
3910
|
a "gutter" drag handle goes */
|
|
3682
3911
|
--DragHandle-gutter: 20px;
|
|
3912
|
+
/* The width of that column for .DragHandle--gutter-wide. A list that puts
|
|
3913
|
+
other buttons in the column of its grips reads it. */
|
|
3914
|
+
--DragHandle-gutter-wide: 32px;
|
|
3683
3915
|
}
|
|
3684
3916
|
/* Puts the handle in the gutter at the left of its element, so the handle
|
|
3685
3917
|
does not push the content of the element to the right. The element must
|
|
@@ -3695,7 +3927,7 @@ button.Toolbar__tab {
|
|
|
3695
3927
|
width: var(--DragHandle-gutter);
|
|
3696
3928
|
}
|
|
3697
3929
|
.DragHandle--gutter-wide {
|
|
3698
|
-
width:
|
|
3930
|
+
width: var(--DragHandle-gutter-wide);
|
|
3699
3931
|
}
|
|
3700
3932
|
/* The element that has the indicator must have a position */
|
|
3701
3933
|
.DropIndicator {
|
|
@@ -4646,10 +4878,29 @@ span.SidebarTree__node__toggle {
|
|
|
4646
4878
|
}
|
|
4647
4879
|
}
|
|
4648
4880
|
}
|
|
4881
|
+
/* The label of a switch that the user cannot change does not look like a
|
|
4882
|
+
control. In a SwitchList, the ::after of the label covers the row, thus
|
|
4883
|
+
the whole row gets the cursor. */
|
|
4884
|
+
.SwitchInput:has(
|
|
4885
|
+
.SwitchInput__checkbox:disabled,
|
|
4886
|
+
.SwitchInput__switch--read-only
|
|
4887
|
+
) {
|
|
4888
|
+
.SwitchInput__label,
|
|
4889
|
+
.SwitchInput__label .form__label {
|
|
4890
|
+
cursor: default;
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4649
4893
|
/* The links stay above the ::after of the label, thus they still open */
|
|
4650
4894
|
.SwitchList :is(.SwitchInput__reason, .form__hint) a {
|
|
4651
4895
|
position: relative;
|
|
4652
4896
|
}
|
|
4897
|
+
/* The info of a label is before the ::after of the label in the tree, thus
|
|
4898
|
+
it needs a z-index to stay above it. A click on it does not change the
|
|
4899
|
+
switch, also when the switch is disabled or read-only. */
|
|
4900
|
+
.SwitchList .form__label > :not(.form__label__text) {
|
|
4901
|
+
position: relative;
|
|
4902
|
+
z-index: 1;
|
|
4903
|
+
}
|
|
4653
4904
|
/* The reason is at the end of the line of the label, because the label
|
|
4654
4905
|
grows. When the two do not fit on one line, the reason wraps under the
|
|
4655
4906
|
label: the width of the row decides, not the width of the window. */
|
|
@@ -5106,6 +5357,16 @@ span.SidebarTree__node__toggle {
|
|
|
5106
5357
|
/* token-audit-disable-next-line mismatch -- the triangle is a graphic mark, and its color paints its fill */
|
|
5107
5358
|
color: var(--color--fill-danger);
|
|
5108
5359
|
}
|
|
5360
|
+
/* The triangle of the published version is a solid mark, thus it is different
|
|
5361
|
+
from the outline triangle of the current version. The fill hides the
|
|
5362
|
+
exclamation point, thus the point takes the ink of a danger surface. */
|
|
5363
|
+
.ValidityTriangle--published {
|
|
5364
|
+
fill: currentColor;
|
|
5365
|
+
|
|
5366
|
+
path:not(:first-child) {
|
|
5367
|
+
stroke: var(--color--danger--ink);
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5109
5370
|
.ValidityTriangle__wrapper {
|
|
5110
5371
|
display: inline-flex;
|
|
5111
5372
|
align-items: center;
|
|
@@ -6017,7 +6278,7 @@ span.SidebarTree__node__toggle {
|
|
|
6017
6278
|
display: flex;
|
|
6018
6279
|
gap: var(--spacing-s);
|
|
6019
6280
|
align-items: center;
|
|
6020
|
-
padding-right:
|
|
6281
|
+
padding-right: var(--spacing-l);
|
|
6021
6282
|
font-weight: var(--font-weight-regular);
|
|
6022
6283
|
color: var(--color--ink-subtle);
|
|
6023
6284
|
/* The title wraps, thus its min-content width is small and the
|
|
@@ -6041,6 +6302,14 @@ span.SidebarTree__node__toggle {
|
|
|
6041
6302
|
cursor: pointer;
|
|
6042
6303
|
}
|
|
6043
6304
|
}
|
|
6305
|
+
/* The icon of InfoList.Value.Button has the look of the chevron of a
|
|
6306
|
+
trigger */
|
|
6307
|
+
.InfoList__value > svg {
|
|
6308
|
+
flex: none;
|
|
6309
|
+
width: 1em;
|
|
6310
|
+
height: 1em;
|
|
6311
|
+
color: var(--color--ink-subtle);
|
|
6312
|
+
}
|
|
6044
6313
|
.InfoList__value__label {
|
|
6045
6314
|
min-width: 0;
|
|
6046
6315
|
overflow: hidden;
|
|
@@ -6598,16 +6867,27 @@ span.SidebarTree__node__toggle {
|
|
|
6598
6867
|
width: 100%;
|
|
6599
6868
|
width: auto;
|
|
6600
6869
|
max-width: 100%;
|
|
6870
|
+
/* One line of text: the box of the value is lower than a line (see
|
|
6871
|
+
"text-box" in _button.css) */
|
|
6872
|
+
min-height: 1lh;
|
|
6601
6873
|
padding: 0;
|
|
6602
6874
|
white-space: nowrap;
|
|
6603
6875
|
|
|
6604
|
-
/* A long value gets an ellipsis, and the chevron always shows
|
|
6876
|
+
/* A long value gets an ellipsis, and the chevron always shows. The box of
|
|
6877
|
+
the value is the same as the box of the label of a button. */
|
|
6605
6878
|
> span {
|
|
6606
6879
|
position: relative;
|
|
6607
|
-
top: 0.06em;
|
|
6608
6880
|
min-width: 0;
|
|
6609
|
-
overflow:
|
|
6881
|
+
overflow-x: clip;
|
|
6882
|
+
overflow-y: visible;
|
|
6610
6883
|
text-overflow: ellipsis;
|
|
6884
|
+
text-box: trim-both cap alphabetic;
|
|
6885
|
+
}
|
|
6886
|
+
@supports not (text-box: trim-both cap alphabetic) {
|
|
6887
|
+
> span {
|
|
6888
|
+
top: 0.06em;
|
|
6889
|
+
overflow: hidden;
|
|
6890
|
+
}
|
|
6611
6891
|
}
|
|
6612
6892
|
svg {
|
|
6613
6893
|
display: inline-block;
|
|
@@ -7420,6 +7700,7 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
|
|
|
7420
7700
|
content. The chevron is after the title. Before the title, it pushes the
|
|
7421
7701
|
title out of line with the content, and the inset has no space for it. */
|
|
7422
7702
|
.SidebarPanel__header {
|
|
7703
|
+
position: relative;
|
|
7423
7704
|
box-sizing: border-box;
|
|
7424
7705
|
display: flex;
|
|
7425
7706
|
gap: var(--spacing-s);
|
|
@@ -7428,21 +7709,50 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
|
|
|
7428
7709
|
padding: var(--spacing-s)
|
|
7429
7710
|
calc(var(--SidebarPanel-inset) - var(--SidebarPanel-header-margin));
|
|
7430
7711
|
margin: var(--SidebarPanel-header-margin);
|
|
7431
|
-
color: var(--color--ink);
|
|
7432
|
-
text-align: left;
|
|
7433
7712
|
user-select: none;
|
|
7434
|
-
background-color: transparent;
|
|
7435
7713
|
border-radius: var(--row-radius);
|
|
7436
7714
|
|
|
7437
|
-
|
|
7438
|
-
&:
|
|
7715
|
+
/* The help has its own hover */
|
|
7716
|
+
&:hover:not(:has(.Toolbar__help:hover)),
|
|
7717
|
+
&:has(.SidebarPanel__header__title:focus-visible) {
|
|
7439
7718
|
background-color: var(--color--surface-hover);
|
|
7440
7719
|
}
|
|
7441
7720
|
}
|
|
7442
|
-
.
|
|
7443
|
-
flex: 1;
|
|
7721
|
+
.SidebarPanel__header__heading {
|
|
7444
7722
|
min-width: 0;
|
|
7723
|
+
}
|
|
7724
|
+
/* The ::after covers the header, thus a click anywhere in the header opens
|
|
7725
|
+
and closes the panel */
|
|
7726
|
+
.SidebarPanel__header__title {
|
|
7727
|
+
padding: 0;
|
|
7445
7728
|
font-weight: var(--font-weight-strong);
|
|
7729
|
+
color: var(--color--ink);
|
|
7730
|
+
text-align: left;
|
|
7731
|
+
background-color: transparent;
|
|
7732
|
+
|
|
7733
|
+
&::after {
|
|
7734
|
+
position: absolute;
|
|
7735
|
+
inset: 0;
|
|
7736
|
+
content: "";
|
|
7737
|
+
border-radius: inherit;
|
|
7738
|
+
}
|
|
7739
|
+
}
|
|
7740
|
+
/* The open chevron has a transform, thus it is above the ::after of the
|
|
7741
|
+
title: without pointer events, a click on it goes to the title */
|
|
7742
|
+
.SidebarPanel__header__chevron {
|
|
7743
|
+
margin-left: auto;
|
|
7744
|
+
pointer-events: none;
|
|
7745
|
+
|
|
7746
|
+
.SidebarPanel__header:hover:not(:has(.Toolbar__help:hover)) & {
|
|
7747
|
+
color: var(--chevron-color, var(--color--ink));
|
|
7748
|
+
}
|
|
7749
|
+
}
|
|
7750
|
+
/* The help (a Dropdown) stays above the ::after of the title. The negative
|
|
7751
|
+
margin keeps the header as tall as a header with no help. */
|
|
7752
|
+
.SidebarPanel__header > .Dropdown {
|
|
7753
|
+
z-index: 1;
|
|
7754
|
+
display: flex;
|
|
7755
|
+
margin-block: calc(-1 * var(--spacing-s));
|
|
7446
7756
|
}
|
|
7447
7757
|
.SidebarPanel__header__count {
|
|
7448
7758
|
margin-left: var(--spacing-s);
|
|
@@ -9191,10 +9501,12 @@ button.Dropdown__menu__option__icon--delete:focus-visible svg {
|
|
|
9191
9501
|
border-width 0.1s var(--material-ease),
|
|
9192
9502
|
border-radius 0.1s var(--material-ease);
|
|
9193
9503
|
}
|
|
9194
|
-
/* Only a script gives the focus to the content (see the mode prop
|
|
9195
|
-
content is a scroll container, not a control, thus it shows
|
|
9196
|
-
.
|
|
9197
|
-
|
|
9504
|
+
/* Only a script gives the focus to the content (see the mode prop and
|
|
9505
|
+
Main). The content is a scroll container, not a control, thus it shows
|
|
9506
|
+
no ring. The ring of _base.css is a box-shadow, and it shows after a key
|
|
9507
|
+
press: the overflow of the pane clips all of it but the top edge. */
|
|
9508
|
+
:where(.Pane__content):focus-visible {
|
|
9509
|
+
box-shadow: none;
|
|
9198
9510
|
}
|
|
9199
9511
|
.Pane--mode .Pane__content {
|
|
9200
9512
|
margin: calc(var(--row-inset) / 2);
|