@helixds/react 0.1.0 → 0.2.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/AGENTS.md +4 -1
- package/dist/archetypes/actions-navigation.md +62 -0
- package/dist/archetypes/data-display.md +68 -0
- package/dist/archetypes/feedback-status.md +54 -0
- package/dist/archetypes/form-selection.md +61 -0
- package/dist/archetypes/foundation.md +56 -0
- package/dist/archetypes/layout.md +53 -0
- package/dist/archetypes/overlays.md +54 -0
- package/dist/archetypes/text-input.md +58 -0
- package/dist/components/Badge/Badge.types.d.ts +1 -1
- package/dist/components/Combobox/Combobox.d.ts +17 -0
- package/dist/components/Combobox/Combobox.doc.d.ts +4 -0
- package/dist/components/Combobox/Combobox.doc.js +41 -0
- package/dist/components/Combobox/Combobox.js +141 -0
- package/dist/components/Combobox/Combobox.types.d.ts +31 -0
- package/dist/components/Combobox/Combobox.types.js +2 -0
- package/dist/components/Combobox/index.d.ts +9 -0
- package/dist/components/Combobox/index.js +2 -0
- package/dist/components/Icon/Icon.doc.js +2 -2
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/Icon.types.d.ts +1 -1
- package/dist/components/Icon/iconStroke.d.ts +1 -1
- package/dist/components/Icon/iconStroke.js +1 -1
- package/dist/components/Menu/Menu.doc.js +4 -4
- package/dist/components/Menu/Menu.js +3 -3
- package/dist/components/Menu/Menu.types.d.ts +1 -1
- package/dist/components/Modal/Modal.doc.js +1 -1
- package/dist/components/Modal/Modal.types.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/components/MultiSelect/MultiSelect.doc.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +4 -4
- package/dist/components/Popover/Popover.d.ts +14 -0
- package/dist/components/Popover/Popover.doc.d.ts +4 -0
- package/dist/components/Popover/Popover.doc.js +47 -0
- package/dist/components/Popover/Popover.js +157 -0
- package/dist/components/Popover/Popover.types.d.ts +27 -0
- package/dist/components/Popover/Popover.types.js +2 -0
- package/dist/components/Popover/index.d.ts +9 -0
- package/dist/components/Popover/index.js +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.doc.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.doc.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/SidePanel/SidePanel.doc.js +1 -1
- package/dist/components/SidePanel/SidePanel.types.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +13 -0
- package/dist/components/Tabs/Tabs.doc.d.ts +4 -0
- package/dist/components/Tabs/Tabs.doc.js +47 -0
- package/dist/components/Tabs/Tabs.js +61 -0
- package/dist/components/Tabs/Tabs.types.d.ts +33 -0
- package/dist/components/Tabs/Tabs.types.js +2 -0
- package/dist/components/Tabs/index.d.ts +9 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Toast/Toast.doc.js +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/toastStore.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.doc.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -5
- package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/contracts/Accordion.json +5 -4
- package/dist/contracts/AppShell.json +111 -28
- package/dist/contracts/Avatar.json +3 -2
- package/dist/contracts/AvatarGroup.json +1 -0
- package/dist/contracts/Badge.json +2 -1
- package/dist/contracts/Button.json +2 -1
- package/dist/contracts/Card.json +3 -2
- package/dist/contracts/Chart.json +2 -1
- package/dist/contracts/Checkbox.json +1 -0
- package/dist/contracts/CheckboxGroup.json +1 -0
- package/dist/contracts/Chip.json +3 -2
- package/dist/contracts/ChipGroup.json +1 -0
- package/dist/contracts/Combobox.json +431 -0
- package/dist/contracts/FAB.json +3 -2
- package/dist/contracts/Icon.json +10 -9
- package/dist/contracts/IconButton.json +2 -1
- package/dist/contracts/Input.json +2 -1
- package/dist/contracts/Menu.json +7 -6
- package/dist/contracts/Modal.json +5 -4
- package/dist/contracts/MultiSelect.json +6 -5
- package/dist/contracts/NavItem.json +2 -1
- package/dist/contracts/PageHeader.json +1 -0
- package/dist/contracts/Popover.json +322 -0
- package/dist/contracts/RadioButton.json +1 -0
- package/dist/contracts/RadioGroup.json +1 -0
- package/dist/contracts/SegmentedControl.json +4 -3
- package/dist/contracts/Select.json +9 -9
- package/dist/contracts/SideNav.json +2 -1
- package/dist/contracts/SidePanel.json +5 -4
- package/dist/contracts/Switch.json +1 -0
- package/dist/contracts/Table.json +1 -0
- package/dist/contracts/Tabs.json +353 -0
- package/dist/contracts/Textarea.json +2 -1
- package/dist/contracts/Toast.json +6 -5
- package/dist/contracts/Tooltip.json +4 -3
- package/dist/contracts/TopBar.json +2 -0
- package/dist/contracts/manifest.json +1539 -44
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/layout/AppShell/AppShell.d.ts +1 -1
- package/dist/layout/AppShell/AppShell.doc.js +5 -0
- package/dist/layout/AppShell/AppShell.js +109 -2
- package/dist/layout/AppShell/AppShell.types.d.ts +6 -0
- package/dist/layout/AppShell/AppShellContext.d.ts +17 -0
- package/dist/layout/AppShell/AppShellContext.js +4 -0
- package/dist/layout/SideNav/SideNav.doc.js +1 -0
- package/dist/layout/TopBar/TopBar.js +7 -1
- package/dist/lib/useDialogTransition.d.ts +1 -1
- package/dist/lib/useDialogTransition.js +1 -1
- package/dist/lib/useDisclosureTransition.d.ts +1 -1
- package/dist/lib/useDisclosureTransition.js +1 -1
- package/dist/patterns/expand-collapse-chevron.md +1 -1
- package/dist/patterns/motion-effects.md +2 -4
- package/package.json +26 -4
- package/src/globals.css +338 -22
package/src/globals.css
CHANGED
|
@@ -1259,7 +1259,7 @@
|
|
|
1259
1259
|
border-color: var(--helix-select-border-hover);
|
|
1260
1260
|
}
|
|
1261
1261
|
/* Same focus treatment on open as on focus — a hand-rolled trigger's "open" state IS its focus
|
|
1262
|
-
state (real DOM focus never leaves the button; see Select.tsx/
|
|
1262
|
+
state (real DOM focus never leaves the button; see Select.tsx/Menu's contract), so both share one rule
|
|
1263
1263
|
rather than the open state getting a weaker one-off. */
|
|
1264
1264
|
[data-helix-part="select-trigger"]:focus-visible,
|
|
1265
1265
|
[data-helix-part="select-trigger"][aria-expanded="true"] {
|
|
@@ -1318,10 +1318,146 @@
|
|
|
1318
1318
|
}
|
|
1319
1319
|
|
|
1320
1320
|
|
|
1321
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
1322
|
+
COMBOBOX
|
|
1323
|
+
Contract: contracts/components/Combobox.json
|
|
1324
|
+
Tokens: --helix-select-* (Select's field, shared on purpose — Combobox's contract, like MultiSelect)
|
|
1325
|
+
The field is a native <input> styled as Select's trigger, with a search icon at the start and
|
|
1326
|
+
Select's chevron at the end; the list is Menu.
|
|
1327
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
1328
|
+
|
|
1329
|
+
[data-helix-part="combobox-root"] {
|
|
1330
|
+
display: flex;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
gap: var(--helix-select-gap);
|
|
1333
|
+
/* Every form field shares one width (owner's rule 2026-10-21, form-field pattern); fullWidth fills the container.
|
|
1334
|
+
A per-component width, not a token (CLAUDE.md token policy). */
|
|
1335
|
+
width: 320px;
|
|
1336
|
+
max-width: 100%;
|
|
1337
|
+
}
|
|
1338
|
+
[data-helix-part="combobox-root"][data-full-width] { width: 100%; }
|
|
1339
|
+
|
|
1340
|
+
[data-helix-part="combobox-label"] {
|
|
1341
|
+
font-family: var(--helix-textStyle-body-m-medium-fontFamily);
|
|
1342
|
+
font-size: var(--helix-select-text-labelFontSize);
|
|
1343
|
+
font-weight: var(--helix-select-text-labelFontWeight);
|
|
1344
|
+
color: var(--helix-select-text-label);
|
|
1345
|
+
line-height: var(--helix-textStyle-body-m-medium-lineHeight);
|
|
1346
|
+
}
|
|
1347
|
+
/* Same as the other fields' required mark — its own rule, so adding Combobox doesn't change theirs (figma-drift). */
|
|
1348
|
+
[data-helix-part="combobox-required"] {
|
|
1349
|
+
color: var(--helix-color-text-danger);
|
|
1350
|
+
margin-left: var(--helix-spacing-3xs);
|
|
1351
|
+
}
|
|
1352
|
+
/* Disabled dims every text part — .ai/maps/patterns/disabled-state.md */
|
|
1353
|
+
[data-helix-part="combobox-root"][data-disabled] :is([data-helix-part="combobox-label"], [data-helix-part="combobox-required"], [data-helix-part="combobox-description"]) {
|
|
1354
|
+
color: var(--helix-select-text-disabled);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
[data-helix-part="combobox-wrapper"] {
|
|
1358
|
+
position: relative;
|
|
1359
|
+
display: flex;
|
|
1360
|
+
}
|
|
1361
|
+
[data-helix-part="combobox-native"] {
|
|
1362
|
+
position: absolute;
|
|
1363
|
+
left: 0;
|
|
1364
|
+
bottom: 0;
|
|
1365
|
+
width: 100%;
|
|
1366
|
+
height: 1px;
|
|
1367
|
+
padding: 0;
|
|
1368
|
+
margin: 0;
|
|
1369
|
+
border-width: 0;
|
|
1370
|
+
opacity: 0;
|
|
1371
|
+
pointer-events: none;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
[data-helix-part="combobox-input"] {
|
|
1375
|
+
appearance: none;
|
|
1376
|
+
-webkit-appearance: none;
|
|
1377
|
+
width: 100%;
|
|
1378
|
+
min-width: 0;
|
|
1379
|
+
background-color: var(--helix-select-fill-default);
|
|
1380
|
+
border: var(--helix-borderWidth-thin) solid var(--helix-select-border-default);
|
|
1381
|
+
border-radius: var(--helix-select-radius);
|
|
1382
|
+
color: var(--helix-select-text-value);
|
|
1383
|
+
font-family: inherit;
|
|
1384
|
+
font-size: var(--helix-select-text-valueFontSize);
|
|
1385
|
+
height: var(--helix-select-height);
|
|
1386
|
+
/* start: edge → icon (12) + icon (16) + icon → text (8); end: room for the chevron, as in Select */
|
|
1387
|
+
padding: 0 var(--helix-primitive-spacing-250) 0 calc(var(--helix-primitive-spacing-75) + var(--helix-spacing-m) + var(--helix-spacing-xs));
|
|
1388
|
+
text-overflow: ellipsis;
|
|
1389
|
+
outline: none;
|
|
1390
|
+
transition:
|
|
1391
|
+
border-color var(--helix-primitive-duration-base) var(--helix-primitive-easing-base),
|
|
1392
|
+
box-shadow var(--helix-primitive-duration-base) var(--helix-primitive-easing-base);
|
|
1393
|
+
}
|
|
1394
|
+
[data-helix-part="combobox-input"]::placeholder { color: var(--helix-select-text-placeholder); opacity: 1; }
|
|
1395
|
+
[data-helix-part="combobox-wrapper"]:not([data-invalid]) [data-helix-part="combobox-input"]:hover:not(:disabled):not([aria-expanded="true"]):not(:focus) {
|
|
1396
|
+
border-color: var(--helix-select-border-hover);
|
|
1397
|
+
}
|
|
1398
|
+
/* A text field shows focus on any focus (it takes typing), not only :focus-visible; open shares it, as in Select. */
|
|
1399
|
+
[data-helix-part="combobox-input"]:focus,
|
|
1400
|
+
[data-helix-part="combobox-input"][aria-expanded="true"] {
|
|
1401
|
+
border-color: var(--helix-select-border-focus);
|
|
1402
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--helix-select-border-focus) 20%, transparent);
|
|
1403
|
+
}
|
|
1404
|
+
[data-helix-part="combobox-wrapper"][data-invalid] [data-helix-part="combobox-input"] {
|
|
1405
|
+
border-color: var(--helix-select-border-invalid);
|
|
1406
|
+
}
|
|
1407
|
+
[data-helix-part="combobox-input"]:disabled {
|
|
1408
|
+
background-color: var(--helix-select-fill-disabled);
|
|
1409
|
+
border-color: var(--helix-select-border-disabled);
|
|
1410
|
+
color: var(--helix-select-text-disabled);
|
|
1411
|
+
cursor: not-allowed;
|
|
1412
|
+
}
|
|
1413
|
+
[data-helix-part="combobox-input"]:disabled::placeholder { color: var(--helix-select-text-disabled); }
|
|
1414
|
+
|
|
1415
|
+
[data-helix-part="combobox-icon"],
|
|
1416
|
+
[data-helix-part="combobox-chevron"] {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
top: 50%;
|
|
1419
|
+
display: flex;
|
|
1420
|
+
align-items: center;
|
|
1421
|
+
color: var(--helix-select-icon-default);
|
|
1422
|
+
pointer-events: none;
|
|
1423
|
+
}
|
|
1424
|
+
[data-helix-part="combobox-icon"] {
|
|
1425
|
+
left: var(--helix-primitive-spacing-75);
|
|
1426
|
+
transform: translateY(-50%);
|
|
1427
|
+
}
|
|
1428
|
+
[data-helix-part="combobox-chevron"] {
|
|
1429
|
+
right: var(--helix-primitive-spacing-75);
|
|
1430
|
+
transform: translateY(-50%) scaleY(1);
|
|
1431
|
+
transform-origin: center;
|
|
1432
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing-collapse);
|
|
1433
|
+
}
|
|
1434
|
+
[data-helix-part="combobox-input"][aria-expanded="true"] ~ [data-helix-part="combobox-chevron"] {
|
|
1435
|
+
transform: translateY(-50%) scaleY(-1);
|
|
1436
|
+
transition: transform var(--helix-select-duration-chevron) var(--helix-select-easing);
|
|
1437
|
+
}
|
|
1438
|
+
[data-helix-part="combobox-wrapper"][data-disabled] :is([data-helix-part="combobox-icon"], [data-helix-part="combobox-chevron"]) {
|
|
1439
|
+
color: var(--helix-select-icon-disabled);
|
|
1440
|
+
}
|
|
1441
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1442
|
+
[data-helix-part="combobox-chevron"] { transition: none !important; }
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
[data-helix-part="combobox-description"] {
|
|
1446
|
+
font-size: var(--helix-select-text-descriptionFontSize);
|
|
1447
|
+
color: var(--helix-select-text-description);
|
|
1448
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1449
|
+
}
|
|
1450
|
+
[data-helix-part="combobox-error"] {
|
|
1451
|
+
font-size: var(--helix-select-text-errorFontSize);
|
|
1452
|
+
color: var(--helix-select-text-error);
|
|
1453
|
+
line-height: var(--helix-textStyle-body-s-regular-lineHeight);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
|
|
1321
1457
|
/* ════════════════════════════════════════════════════════════════════════
|
|
1322
1458
|
MULTI SELECT
|
|
1323
|
-
Contract: contracts/components/MultiSelect.json
|
|
1324
|
-
Tokens: --helix-select-* (same field as Select, shared on purpose —
|
|
1459
|
+
Contract: contracts/components/MultiSelect.json
|
|
1460
|
+
Tokens: --helix-select-* (same field as Select, shared on purpose — MultiSelect's contract) + Chip's own
|
|
1325
1461
|
The field is a container (chips + a combobox button), not a button: the chips' × can't nest
|
|
1326
1462
|
inside a <button>. Chip s (24px) centered in the 32px field = 4px from the outer edge.
|
|
1327
1463
|
════════════════════════════════════════════════════════════════════════ */
|
|
@@ -1477,7 +1613,7 @@
|
|
|
1477
1613
|
Contract: contracts/components/Menu.json
|
|
1478
1614
|
Tokens: --helix-menu-*
|
|
1479
1615
|
Portaled to document.body (Menu.tsx) — positioned via inline style computed
|
|
1480
|
-
by usePosition(), not CSS. See
|
|
1616
|
+
by usePosition(), not CSS. See Menu's contract.
|
|
1481
1617
|
════════════════════════════════════════════════════════════════════════ */
|
|
1482
1618
|
|
|
1483
1619
|
[data-helix-part="menu"] {
|
|
@@ -1492,7 +1628,7 @@
|
|
|
1492
1628
|
max-height: 320px;
|
|
1493
1629
|
overflow-y: auto;
|
|
1494
1630
|
/* Grows from its trigger (transitions.dev "menu dropdown"): it always opens below the anchor at the
|
|
1495
|
-
anchor's width (
|
|
1631
|
+
anchor's width (Menu's contract), so the origin is the top edge's centre. Opens from scale-enter over
|
|
1496
1632
|
duration-open; closes to the near-resting scale-exit over the shorter duration-close, while
|
|
1497
1633
|
Menu.tsx keeps it mounted (data-state="closing"). The global reduced-motion rule neutralises both. */
|
|
1498
1634
|
transform-origin: 50% 0;
|
|
@@ -2272,7 +2408,7 @@
|
|
|
2272
2408
|
/* ════════════════════════════════════════════════════════════════════════
|
|
2273
2409
|
TOOLTIP
|
|
2274
2410
|
Contract: contracts/components/Tooltip.json
|
|
2275
|
-
|
|
2411
|
+
Rationale: contracts/components/Tooltip.json — hand-rolled, CSS-only show/hide, no library.
|
|
2276
2412
|
Tokens: --helix-tooltip-*, --helix-primitive-zIndex-tooltip
|
|
2277
2413
|
════════════════════════════════════════════════════════════════════════ */
|
|
2278
2414
|
|
|
@@ -2302,14 +2438,14 @@
|
|
|
2302
2438
|
opacity: 0;
|
|
2303
2439
|
visibility: hidden;
|
|
2304
2440
|
/* Cross-axis centering + edge-clamp shift come from --tooltip-shift, set inline by Tooltip.tsx's
|
|
2305
|
-
auto-placement (
|
|
2441
|
+
auto-placement (Tooltip's contract) — CSS still owns `transform` itself so :hover/[data-expanded] below can
|
|
2306
2442
|
animate the enter/leave `scale()`. Base (leave) state: quick 50ms ease-in, no delay. */
|
|
2307
2443
|
transition: opacity var(--helix-tooltip-duration-out) var(--helix-easing-in),
|
|
2308
2444
|
transform var(--helix-tooltip-duration-out) var(--helix-easing-in),
|
|
2309
2445
|
visibility 0s linear var(--helix-tooltip-duration-out);
|
|
2310
2446
|
}
|
|
2311
2447
|
|
|
2312
|
-
/* Show on hover/focus — delayed (
|
|
2448
|
+
/* Show on hover/focus — delayed (Tooltip's contract: "don't show instantly"). Hide is immediate: leaving
|
|
2313
2449
|
:hover/:focus-within drops back to the base rule above, whose transition-delay is 0s. */
|
|
2314
2450
|
[data-helix-part="tooltip-root"]:hover [data-helix-part="tooltip-content"],
|
|
2315
2451
|
[data-helix-part="tooltip-root"]:focus-within [data-helix-part="tooltip-content"] {
|
|
@@ -2472,7 +2608,7 @@
|
|
|
2472
2608
|
/* ════════════════════════════════════════════════════════════════════════
|
|
2473
2609
|
MODAL
|
|
2474
2610
|
Contract: contracts/components/Modal.json
|
|
2475
|
-
|
|
2611
|
+
Rationale: contracts/components/Modal.json — native <dialog> + showModal(), JS-timed
|
|
2476
2612
|
close via useDialogTransition (packages/core/src/lib/useDialogTransition.ts).
|
|
2477
2613
|
Tokens: --helix-modal-*
|
|
2478
2614
|
`data-state` (closed/open/closing) is written by useDialogTransition, not CSS-driven :open-style
|
|
@@ -2563,7 +2699,7 @@
|
|
|
2563
2699
|
/* ════════════════════════════════════════════════════════════════════════
|
|
2564
2700
|
SIDE PANEL
|
|
2565
2701
|
Contract: contracts/components/SidePanel.json
|
|
2566
|
-
|
|
2702
|
+
Rationale: contracts/components/Modal.json — same native <dialog> primitive as
|
|
2567
2703
|
Modal, positioned against the right edge instead of centered.
|
|
2568
2704
|
Tokens: --helix-sidePanel-*
|
|
2569
2705
|
════════════════════════════════════════════════════════════════════════ */
|
|
@@ -2849,7 +2985,7 @@
|
|
|
2849
2985
|
Tokens: --helix-segmentedControl-*
|
|
2850
2986
|
The sliding pill reuses NavItem's exact layering: the pill is a motion.span
|
|
2851
2987
|
with a shared layoutId (SegmentedControl.tsx), absolutely positioned to fill
|
|
2852
|
-
its parent button, with the label given z-index above it — see
|
|
2988
|
+
its parent button, with the label given z-index above it — see SegmentedControl's contract.
|
|
2853
2989
|
════════════════════════════════════════════════════════════════════════ */
|
|
2854
2990
|
|
|
2855
2991
|
[data-helix-part="segmented-control-root"] {
|
|
@@ -2952,6 +3088,143 @@
|
|
|
2952
3088
|
}
|
|
2953
3089
|
|
|
2954
3090
|
|
|
3091
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3092
|
+
POPOVER
|
|
3093
|
+
Contract: contracts/components/Popover.json
|
|
3094
|
+
Rationale: contracts/components/Popover.json — native popover="manual" (top layer, no z-index).
|
|
3095
|
+
Tokens: --helix-popover-*
|
|
3096
|
+
The UA's [popover] styles (inset: 0; margin: auto) are reset: Popover.tsx sets top/left from the
|
|
3097
|
+
trigger's rect (flip + clamp, Tooltip's contract). Shadow allowed: it floats above the page (ADR-005).
|
|
3098
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3099
|
+
|
|
3100
|
+
[data-helix-part="popover-root"] {
|
|
3101
|
+
display: inline-flex;
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
[data-helix-part="popover-content"] {
|
|
3105
|
+
position: fixed;
|
|
3106
|
+
inset: auto;
|
|
3107
|
+
margin: 0;
|
|
3108
|
+
box-sizing: border-box;
|
|
3109
|
+
width: max-content;
|
|
3110
|
+
max-width: min(320px, calc(100vw - 2 * var(--helix-spacing-xs)));
|
|
3111
|
+
display: none;
|
|
3112
|
+
flex-direction: column;
|
|
3113
|
+
gap: var(--helix-popover-gap);
|
|
3114
|
+
padding: var(--helix-popover-padding);
|
|
3115
|
+
background-color: var(--helix-popover-fill);
|
|
3116
|
+
color: var(--helix-popover-text);
|
|
3117
|
+
border: var(--helix-popover-borderWidth) solid var(--helix-popover-border);
|
|
3118
|
+
border-radius: var(--helix-popover-radius);
|
|
3119
|
+
box-shadow: var(--helix-popover-shadow);
|
|
3120
|
+
opacity: 0;
|
|
3121
|
+
transition: opacity var(--helix-popover-duration) var(--helix-popover-easing),
|
|
3122
|
+
display var(--helix-popover-duration) allow-discrete,
|
|
3123
|
+
overlay var(--helix-popover-duration) allow-discrete;
|
|
3124
|
+
}
|
|
3125
|
+
[data-helix-part="popover-content"]:popover-open {
|
|
3126
|
+
display: flex;
|
|
3127
|
+
opacity: 1;
|
|
3128
|
+
}
|
|
3129
|
+
@starting-style {
|
|
3130
|
+
[data-helix-part="popover-content"]:popover-open {
|
|
3131
|
+
opacity: 0;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
[data-helix-part="popover-content"]:focus-visible {
|
|
3135
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3136
|
+
outline-offset: 2px;
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
[data-helix-part="popover-title"] {
|
|
3140
|
+
margin: 0;
|
|
3141
|
+
font-size: var(--helix-popover-titleFontSize);
|
|
3142
|
+
font-weight: var(--helix-popover-titleFontWeight);
|
|
3143
|
+
}
|
|
3144
|
+
[data-helix-part="popover-body"] {
|
|
3145
|
+
display: flex;
|
|
3146
|
+
flex-direction: column;
|
|
3147
|
+
gap: var(--helix-popover-gap);
|
|
3148
|
+
font-size: var(--helix-popover-fontSize);
|
|
3149
|
+
font-weight: var(--helix-popover-fontWeight);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
3153
|
+
TABS
|
|
3154
|
+
Contract: contracts/components/Tabs.json
|
|
3155
|
+
Rationale: contracts/components/Tabs.json — APG tablist, roving tabindex, automatic activation.
|
|
3156
|
+
Tokens: --helix-tabs-*
|
|
3157
|
+
The indicator is a motion.span with a shared layoutId (Tabs.tsx), absolutely positioned on the
|
|
3158
|
+
tab's bottom edge over the list's border — same layering as NavItem/SegmentedControl.
|
|
3159
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
3160
|
+
|
|
3161
|
+
[data-helix-part="tabs-root"] {
|
|
3162
|
+
display: flex;
|
|
3163
|
+
flex-direction: column;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
[data-helix-part="tabs-list"] {
|
|
3167
|
+
display: flex;
|
|
3168
|
+
align-items: flex-end;
|
|
3169
|
+
gap: var(--helix-tabs-gap);
|
|
3170
|
+
border-bottom: var(--helix-tabs-borderWidth) solid var(--helix-tabs-border);
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
[data-helix-part="tabs-tab"] {
|
|
3174
|
+
position: relative;
|
|
3175
|
+
appearance: none;
|
|
3176
|
+
-webkit-appearance: none;
|
|
3177
|
+
display: inline-flex;
|
|
3178
|
+
align-items: center;
|
|
3179
|
+
gap: var(--helix-tabs-gap);
|
|
3180
|
+
height: var(--helix-tabs-height);
|
|
3181
|
+
padding: 0 var(--helix-tabs-paddingX);
|
|
3182
|
+
margin-bottom: calc(-1 * var(--helix-tabs-borderWidth));
|
|
3183
|
+
border: 0;
|
|
3184
|
+
background-color: transparent;
|
|
3185
|
+
font-family: inherit;
|
|
3186
|
+
font-size: var(--helix-tabs-fontSize);
|
|
3187
|
+
font-weight: var(--helix-tabs-fontWeight);
|
|
3188
|
+
color: var(--helix-tabs-text-default);
|
|
3189
|
+
white-space: nowrap;
|
|
3190
|
+
cursor: pointer;
|
|
3191
|
+
transition: color var(--helix-primitive-duration-fast) var(--helix-primitive-easing-base);
|
|
3192
|
+
}
|
|
3193
|
+
[data-helix-part="tabs-tab"][aria-selected="true"],
|
|
3194
|
+
[data-helix-part="tabs-tab"]:not([aria-selected="true"]):not(:disabled):hover {
|
|
3195
|
+
color: var(--helix-tabs-text-selected);
|
|
3196
|
+
}
|
|
3197
|
+
/* Real disabled colors, not opacity — .ai/maps/patterns/disabled-state.md */
|
|
3198
|
+
[data-helix-part="tabs-tab"]:disabled {
|
|
3199
|
+
color: var(--helix-tabs-text-disabled);
|
|
3200
|
+
cursor: not-allowed;
|
|
3201
|
+
}
|
|
3202
|
+
[data-helix-part="tabs-tab"]:focus-visible {
|
|
3203
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3204
|
+
outline-offset: -2px;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
[data-helix-part="tabs-tab-icon"] {
|
|
3208
|
+
display: inline-flex;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
[data-helix-part="tabs-indicator"] {
|
|
3212
|
+
position: absolute;
|
|
3213
|
+
left: 0;
|
|
3214
|
+
right: 0;
|
|
3215
|
+
bottom: 0;
|
|
3216
|
+
height: var(--helix-tabs-indicatorWidth);
|
|
3217
|
+
background-color: var(--helix-tabs-indicator);
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
[data-helix-part="tabs-panel"] {
|
|
3221
|
+
padding-top: var(--helix-tabs-panelGap);
|
|
3222
|
+
}
|
|
3223
|
+
[data-helix-part="tabs-panel"]:focus-visible {
|
|
3224
|
+
outline: 2px solid var(--helix-color-border-focus);
|
|
3225
|
+
outline-offset: 2px;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
2955
3228
|
/* ════════════════════════════════════════════════════════════════════════
|
|
2956
3229
|
TOP BAR
|
|
2957
3230
|
Contract: contracts/components/TopBar.json
|
|
@@ -2969,6 +3242,12 @@
|
|
|
2969
3242
|
border-bottom: 1px solid var(--helix-topBar-border);
|
|
2970
3243
|
}
|
|
2971
3244
|
|
|
3245
|
+
/* Menu button of the collapsed SideNav — only inside an AppShell, only below its 768px (see APP SHELL). */
|
|
3246
|
+
[data-helix-part="topbar-menu"] {
|
|
3247
|
+
display: none;
|
|
3248
|
+
flex-shrink: 0;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
2972
3251
|
[data-helix-part="topbar-start"] {
|
|
2973
3252
|
flex: 1;
|
|
2974
3253
|
min-width: 0; /* WCAG 1.4.10 Reflow: the search gives way on a narrow screen instead of pushing the end slot off it */
|
|
@@ -3004,7 +3283,8 @@
|
|
|
3004
3283
|
width: var(--helix-sideNav-width);
|
|
3005
3284
|
flex-shrink: 0;
|
|
3006
3285
|
background-color: var(--helix-sideNav-fill);
|
|
3007
|
-
/*
|
|
3286
|
+
/* Divider against the content — same tone as the TopBar's bottom border, so the two lines meet. */
|
|
3287
|
+
border-right: 1px solid var(--helix-sideNav-border);
|
|
3008
3288
|
padding: var(--helix-primitive-spacing-75) 0;
|
|
3009
3289
|
}
|
|
3010
3290
|
|
|
@@ -3037,13 +3317,22 @@
|
|
|
3037
3317
|
|
|
3038
3318
|
/* Exactly one viewport tall (the contract's "full-viewport-height" root), not min-height: with
|
|
3039
3319
|
min-height the whole page grew with its content and main's overflow-y never kicked in. Now the
|
|
3040
|
-
SideNav and TopBar stay put and only main scrolls.
|
|
3320
|
+
SideNav and TopBar stay put and only main scrolls.
|
|
3321
|
+
It's also the size container the SideNav collapse answers to — the shell's own width, not the
|
|
3322
|
+
viewport's, so a shell in a narrow frame (a story, an embed) collapses too. */
|
|
3041
3323
|
[data-helix-part="app-shell-root"] {
|
|
3324
|
+
container: app-shell / inline-size;
|
|
3325
|
+
position: relative;
|
|
3042
3326
|
display: flex;
|
|
3043
3327
|
height: 100vh;
|
|
3044
3328
|
background-color: var(--helix-color-fill-page);
|
|
3045
3329
|
}
|
|
3046
3330
|
|
|
3331
|
+
[data-helix-part="app-shell-nav"] {
|
|
3332
|
+
display: flex;
|
|
3333
|
+
flex-shrink: 0;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3047
3336
|
[data-helix-part="app-shell-content"] {
|
|
3048
3337
|
flex: 1;
|
|
3049
3338
|
display: flex;
|
|
@@ -3059,19 +3348,46 @@
|
|
|
3059
3348
|
padding: var(--helix-spacing-l);
|
|
3060
3349
|
}
|
|
3061
3350
|
|
|
3062
|
-
/* WCAG 1.4.10 Reflow: below primitive.breakpoint.tablet (768px —
|
|
3063
|
-
224px side nav would leave ~96px for the page at 320px.
|
|
3064
|
-
|
|
3351
|
+
/* WCAG 1.4.10 Reflow: below primitive.breakpoint.tablet (768px — container queries can't read a var())
|
|
3352
|
+
the 224px side nav would leave ~96px for the page at 320px. With a TopBar, the nav collapses out of
|
|
3353
|
+
the flow and the TopBar's menu button slides it in over the content, under the TopBar. Hidden
|
|
3354
|
+
(visibility) while collapsed so its links leave the Tab order; visibility flips at the end of the
|
|
3355
|
+
slide-out and at the start of the slide-in. */
|
|
3356
|
+
@container app-shell (max-width: 767px) {
|
|
3357
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] [data-helix-part="topbar-menu"] {
|
|
3358
|
+
display: flex;
|
|
3359
|
+
}
|
|
3360
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] > [data-helix-part="app-shell-nav"] {
|
|
3361
|
+
position: absolute;
|
|
3362
|
+
top: var(--helix-topBar-height);
|
|
3363
|
+
bottom: 0;
|
|
3364
|
+
left: 0;
|
|
3365
|
+
z-index: var(--helix-primitive-zIndex-overlay);
|
|
3366
|
+
transform: translateX(-100%);
|
|
3367
|
+
visibility: hidden;
|
|
3368
|
+
transition: transform var(--helix-duration-slow) var(--helix-easing-base),
|
|
3369
|
+
visibility 0s linear var(--helix-duration-slow);
|
|
3370
|
+
}
|
|
3371
|
+
[data-helix-part="app-shell-root"][data-collapsible="true"] > [data-helix-part="app-shell-nav"][data-expanded="true"] {
|
|
3372
|
+
transform: none;
|
|
3373
|
+
visibility: visible;
|
|
3374
|
+
transition: transform var(--helix-duration-slow) var(--helix-easing-base), visibility 0s;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/* No TopBar, so no menu button to bring a collapsed nav back: below 768px the shell stacks instead —
|
|
3379
|
+
nav on top, full width, then the content, and the page scrolls as one column. */
|
|
3065
3380
|
@media (max-width: 767px) {
|
|
3066
|
-
[data-helix-part="app-shell-root"] {
|
|
3381
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) {
|
|
3067
3382
|
flex-direction: column;
|
|
3068
3383
|
height: auto;
|
|
3069
3384
|
min-height: 100vh;
|
|
3070
3385
|
}
|
|
3071
|
-
[data-helix-part="app-shell-root"] > [data-helix-part="
|
|
3386
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) > [data-helix-part="app-shell-nav"],
|
|
3387
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) [data-helix-part="side-nav-root"] {
|
|
3072
3388
|
width: 100%;
|
|
3073
3389
|
}
|
|
3074
|
-
[data-helix-part="app-shell-main"] {
|
|
3390
|
+
[data-helix-part="app-shell-root"]:not([data-collapsible="true"]) [data-helix-part="app-shell-main"] {
|
|
3075
3391
|
overflow-y: visible;
|
|
3076
3392
|
}
|
|
3077
3393
|
}
|
|
@@ -3080,7 +3396,7 @@
|
|
|
3080
3396
|
/* ════════════════════════════════════════════════════════════════════════
|
|
3081
3397
|
TOAST
|
|
3082
3398
|
Contract: contracts/components/Toast.json
|
|
3083
|
-
|
|
3399
|
+
Rationale: contracts/components/Toast.json — imperative API, portal to document.body,
|
|
3084
3400
|
JS-measured stacking (not grid/percentage tricks — see that ADR for why).
|
|
3085
3401
|
Tokens: --helix-toast-*, --helix-badge-icon-* (icon color only — the one place variant
|
|
3086
3402
|
color shows; background/text never tint per variant, unlike Badge itself).
|
|
@@ -3139,7 +3455,7 @@
|
|
|
3139
3455
|
|
|
3140
3456
|
/* Depth grows DOWNWARD (positive translateY), not upward — the viewport is pinned to the top of the
|
|
3141
3457
|
screen, so stacking upward would push older toasts off-screen. Same "must stay inside the visible
|
|
3142
|
-
page" principle
|
|
3458
|
+
page" principle Tooltip's auto-placement established.
|
|
3143
3459
|
--peek-y is a measured pixel offset (React computes it in Toast.tsx from real offsetHeight), not
|
|
3144
3460
|
`peek * depth` — a flat multiple only gives an equal-looking sliver between each pair of toasts
|
|
3145
3461
|
when every toast happens to be the same height; two different heights (a 2-line description vs.
|
|
@@ -3165,7 +3481,7 @@
|
|
|
3165
3481
|
/* --spread-y is a real measured pixel offset (React sets it inline via offsetHeight — see
|
|
3166
3482
|
Toast.tsx), not `100% * depth` — percentage math broke as soon as two toasts had different
|
|
3167
3483
|
heights, since each only knows its OWN height, not the taller one actually sitting above it.
|
|
3168
|
-
See
|
|
3484
|
+
See Toast's contract for the full story (caught in the pre-implementation preview, not after shipping). */
|
|
3169
3485
|
[data-helix-part="toast-viewport"][data-spread="true"] [data-helix-part="toast"][data-depth="1"],
|
|
3170
3486
|
[data-helix-part="toast-viewport"][data-spread="true"] [data-helix-part="toast"][data-depth="2"] {
|
|
3171
3487
|
opacity: 1;
|