@slotted/react 0.1.0-beta.2 → 0.1.0-beta.4
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/{accordion-D-YuMJzk.js → accordion-lCqrmQ3w.js} +43 -43
- package/dist/accordion.js +1 -1
- package/dist/{action-bar-C7cGnEyJ.js → action-bar-OACchRZw.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{action-sheet-DgwzC3iY.js → action-sheet-C60BWUW8.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-CXwma4XA.js → app-shell-CmYvnu_7.js} +310 -310
- package/dist/app-shell.js +1 -1
- package/dist/button-Db9f3Bxn.js +99 -0
- package/dist/button.js +2 -2
- package/dist/calendar-BZ6PP7Ke.js +436 -0
- package/dist/calendar.js +1 -1
- package/dist/cascader-D1AhTyBL.js +1097 -0
- package/dist/cascader.js +1 -1
- package/dist/{chart-Gb_P3Kdq.js → chart-O0ZhkzJe.js} +381 -374
- package/dist/chart.js +1 -1
- package/dist/{checkbox-CwUOc-3u.js → checkbox-DfxFHZaU.js} +3 -3
- package/dist/{checkbox-group-BYTjgAcX.js → checkbox-group-9sDgrV5Z.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-CGo49NNW.js → collapsible-F-K36XbF.js} +17 -17
- package/dist/collapsible.js +1 -1
- package/dist/{color-picker-BlPR4g4H.js → color-picker-CwbWzCKg.js} +4 -4
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-B7_a_jDK.js → column-manager-CTtizVhm.js} +6 -6
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-C66dNlMR.js → combobox-BVMI9lg8.js} +266 -266
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-BqRyNR9Y.js → command-palette-DFLbSOiv.js} +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-DMiHdggw.js → context-menu-BuST6W94.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/currency-field-DD9A5U3D.js +455 -0
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-CKdyO4j6.js → dashboard-grid-CBMP_-JV.js} +2 -2
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-rWMDNl-6.js → data-grid-Eb-a4jg3.js} +19 -19
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-2xfDpHVC.js → data-list-oICmxGkA.js} +5 -5
- package/dist/data-list.js +1 -1
- package/dist/date-field-Hr-OCU-H.js +290 -0
- package/dist/date-field.js +1 -1
- package/dist/date-picker-D3-y2Jxw.js +295 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-y3b82Wmf.js +471 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-T1gNdJ7t.js → datetime-field-B8TrmsDK.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/datetime-picker-CIRHVLQp.js +629 -0
- package/dist/datetime-picker.js +1 -1
- package/dist/datetime-range-picker-DM-1m98z.js +994 -0
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-qOJiNuzr.js → detail-panel-CW53lUjp.js} +3 -3
- package/dist/detail-panel.js +1 -1
- package/dist/{dialog-Dmy-m_pe.js → dialog-BHYDDj1S.js} +112 -113
- package/dist/dialog.js +1 -1
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/button-group.json +1 -0
- package/dist/docs/button-group.md +1 -1
- package/dist/docs/button.json +45 -11
- package/dist/docs/button.md +10 -6
- package/dist/docs/calendar.json +7 -0
- package/dist/docs/calendar.md +1 -0
- package/dist/docs/chart.json +7 -0
- package/dist/docs/chart.md +1 -0
- package/dist/docs/collapsible.json +1 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/currency-field.json +32 -1
- package/dist/docs/currency-field.md +4 -1
- package/dist/docs/date-field.json +8 -1
- package/dist/docs/date-field.md +2 -1
- package/dist/docs/date-picker.examples.md +29 -0
- package/dist/docs/date-picker.json +16 -1
- package/dist/docs/date-picker.md +2 -1
- package/dist/docs/dialog.examples.md +26 -0
- package/dist/docs/dialog.json +14 -2
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/guidelines/composition.md +10 -0
- package/dist/docs/guidelines/index.md +2 -0
- package/dist/docs/guidelines/list-pages.md +12 -1
- package/dist/docs/list.json +26 -1
- package/dist/docs/list.md +4 -1
- package/dist/docs/page.json +1 -0
- package/dist/docs/page.md +1 -0
- package/dist/docs/popover.json +1 -1
- package/dist/docs/segmented-control.json +29 -1
- package/dist/docs/segmented-control.md +17 -1
- package/dist/docs/select.json +1 -1
- package/dist/docs/select.md +1 -1
- package/dist/docs/side-navigation.json +2 -2
- package/dist/docs/side-navigation.md +19 -4
- package/dist/docs/skills/compose-screen/SKILL.md +7 -0
- package/dist/docs/skills/theme-app/SKILL.md +5 -0
- package/dist/docs/split-button.json +1 -0
- package/dist/docs/split-button.md +1 -1
- package/dist/docs/stat-card.json +1 -0
- package/dist/docs/stat-card.md +1 -1
- package/dist/docs/table.examples.md +1 -1
- package/dist/docs/table.json +91 -2
- package/dist/docs/table.md +14 -1
- package/dist/docs/tabs.examples.md +1 -1
- package/dist/docs/tabs.json +10 -2
- package/dist/docs/tabs.md +3 -1
- package/dist/docs/text-field.json +1 -1
- package/dist/docs/text-field.md +1 -1
- package/dist/docs/toggle-group.json +14 -3
- package/dist/docs/toggle-group.md +3 -3
- package/dist/docs/toggle.json +12 -3
- package/dist/docs/toggle.md +3 -3
- package/dist/docs/tokens.md +25 -1
- package/dist/docs/top-navigation.examples.md +23 -5
- package/dist/docs/top-navigation.json +2 -2
- package/dist/docs/tour.json +1 -1
- package/dist/drawer-LXM44eso.js +757 -0
- package/dist/drawer.js +1 -1
- package/dist/entity-picker-Dn1T7JCq.js +1110 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-DYjVwTI6.js → event-calendar-CnF3iIZD.js} +5 -5
- package/dist/event-calendar.js +1 -1
- package/dist/{field-BJh5HI7w.js → field-NJaCxl2h.js} +1 -1
- package/dist/{field-group-BDaspQPh.js → field-group-hAzVa2O9.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-Bh7cbqDE.js → filter-bar-CHyy1o--.js} +20 -20
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-CSDbA6zd.js → hover-card-BJE5dtaQ.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/{icon-button-TnvMhK4o.js → icon-button-CCWkCDMs.js} +26 -24
- package/dist/import-export-center-jF37b909.js +813 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +92 -91
- package/dist/{list-C1Y8MWp2.js → list-WsQ6ZzCa.js} +16 -12
- package/dist/{list-item-DN_mcouU.js → list-item-DpCwZIrd.js} +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.js +1 -1
- package/dist/{listbox-4WvqR0JF.js → listbox-Dv856z9I.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-B83XFctM.js → loading-overlay-COfnckse.js} +73 -73
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-CpfDn1LF.js → markdown-CeG8mUbI.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-W58pVNUt.js +786 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-CtGavUTO.js → menubar-b2CruimJ.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-B-tuIwAu.js → multi-select-DQ5ds0fX.js} +390 -390
- package/dist/multi-select.js +1 -1
- package/dist/{notification-center-C4pEHJ3h.js → notification-center-C1iWWl5Y.js} +3 -3
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-J_koud1r.js → number-field-BFIAmv-z.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-Bf8JUiVR.js → otp-input-BNQhuKaT.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{page-kQgLctsA.js → page-IiYXk1sz.js} +32 -32
- package/dist/{page-header-CWEBfMGq.js → page-header-Bn4nIGfF.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/page.js +1 -1
- package/dist/popover-Be7JWbGJ.js +475 -0
- package/dist/popover.js +1 -1
- package/dist/press-selection-DjOllE2B.js +29 -0
- package/dist/press-selection.js +2 -0
- package/dist/{prompt-composer-B7MMcER0.js → prompt-composer-BxpdkTpZ.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-BFpjhDkV.js → radio-group-BaVIP9UH.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-D1EsADFM.js → rating-DYBQBzwB.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-BueW-Lyb.js → saved-views-DlE_--Z9.js} +5 -5
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-Cy_5D3Nj.js → segmented-control-DmuOGiu6.js} +28 -24
- package/dist/segmented-control.js +1 -1
- package/dist/{select-hRFp8nCj.js → select-M7Io4UL9.js} +278 -265
- package/dist/select.js +1 -1
- package/dist/{side-navigation-YUiJRpng.js → side-navigation-CBLtCzuJ.js} +186 -187
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-B432T6nD.js → slider-DTes4HLF.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-DHF3v3PJ.js → split-button-CPgHiy9G.js} +2 -2
- package/dist/split-button.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-4MHwKmkz.js → switch-DQzuIhPX.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-Bd79IwDC.js → table-U9eJYCuB.js} +327 -292
- package/dist/table.js +2 -2
- package/dist/tabs-BtHmjlnM.js +348 -0
- package/dist/tabs.js +1 -1
- package/dist/{tags-input-DLdHLWrH.js → tags-input-CcOkm0AW.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-BktZbmzD.js → text-field-DLfIZ0fk.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-JAK2RJl0.js → textarea-CBJBJBi6.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-DCG_VtGO.js → time-field-DrhiCtUl.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-DuT1tf5-.js → time-picker-CRQsMJbQ.js} +102 -102
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-HwBvrrXN.js → time-range-picker-DlZJsj1e.js} +202 -202
- package/dist/time-range-picker.js +1 -1
- package/dist/{toast-wI8BtPY5.js → toast-Bf3e0AgC.js} +157 -157
- package/dist/toast.js +1 -1
- package/dist/toggle-group-7iBR9Rn1.js +142 -0
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-CDQTydDx.js → toolbar-DDZpEftQ.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{tooltip-BggqPDcW.js → tooltip-DbKTPe_i.js} +108 -109
- package/dist/tooltip.js +1 -1
- package/dist/{top-navigation-COQZsNqW.js → top-navigation-e-tWMGNr.js} +255 -256
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-C11DmYTC.js → tour-BTdt716T.js} +180 -180
- package/dist/tour.js +1 -1
- package/dist/{transfer-JA9TWjAw.js → transfer-CqZOTLMP.js} +6 -6
- package/dist/transfer.js +1 -1
- package/dist/types/accordion/accordion.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +1 -1
- package/dist/types/button/button-link.d.ts +1 -1
- package/dist/types/button/button-link.d.ts.map +1 -1
- package/dist/types/button/button-root.d.ts +5 -3
- package/dist/types/button/button-root.d.ts.map +1 -1
- package/dist/types/button/button.constants.d.ts +2 -1
- package/dist/types/button/button.constants.d.ts.map +1 -1
- package/dist/types/button/button.d.ts +1 -1
- package/dist/types/button/button.d.ts.map +1 -1
- package/dist/types/button/button.types.d.ts +9 -2
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/button/index.d.ts +1 -1
- package/dist/types/button/index.d.ts.map +1 -1
- package/dist/types/button/toggle-button.d.ts +1 -1
- package/dist/types/button/toggle-button.d.ts.map +1 -1
- package/dist/types/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +9 -0
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/calendar/index.d.ts +1 -1
- package/dist/types/calendar/index.d.ts.map +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.d.ts +1 -1
- package/dist/types/currency-field/currency-field.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.types.d.ts +14 -0
- package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
- package/dist/types/currency-field/index.d.ts +1 -1
- package/dist/types/currency-field/index.d.ts.map +1 -1
- package/dist/types/date-field/date-field.d.ts +1 -1
- package/dist/types/date-field/date-field.d.ts.map +1 -1
- package/dist/types/date-field/date-field.types.d.ts +7 -0
- package/dist/types/date-field/date-field.types.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.d.ts +5 -1
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +20 -2
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/index.d.ts.map +1 -1
- package/dist/types/dialog/dialog-demo.d.ts +8 -0
- package/dist/types/dialog/dialog-demo.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/list/index.d.ts +1 -1
- package/dist/types/list/index.d.ts.map +1 -1
- package/dist/types/list/list-parts.d.ts +1 -1
- package/dist/types/list/list-parts.d.ts.map +1 -1
- package/dist/types/list/list.types.d.ts +12 -0
- package/dist/types/list/list.types.d.ts.map +1 -1
- package/dist/types/page/page.d.ts.map +1 -1
- package/dist/types/press-selection/index.d.ts +3 -0
- package/dist/types/press-selection/index.d.ts.map +1 -0
- package/dist/types/press-selection/press-selection.d.ts +23 -0
- package/dist/types/press-selection/press-selection.d.ts.map +1 -0
- package/dist/types/segmented-control/index.d.ts +1 -1
- package/dist/types/segmented-control/index.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control-defaults.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts +1 -1
- package/dist/types/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control.types.d.ts +10 -0
- package/dist/types/segmented-control/segmented-control.types.d.ts.map +1 -1
- package/dist/types/select/select-items.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/table/index.d.ts +2 -2
- package/dist/types/table/index.d.ts.map +1 -1
- package/dist/types/table/table-defaults.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +8 -2
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.d.ts +1 -1
- package/dist/types/table/table.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +43 -1
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
- package/dist/types/tabs/tabs.d.ts +1 -1
- package/dist/types/tabs/tabs.d.ts.map +1 -1
- package/dist/types/tabs/tabs.types.d.ts +18 -0
- package/dist/types/tabs/tabs.types.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +1 -1
- package/dist/types/toggle/toggle.types.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +6 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
- package/dist/{upload-Bq_UiyMr.js → upload-DjnlVR8y.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/{wizard-B4GrlEqh.js → wizard-BxA08vXt.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +12 -7
- package/dist/button-DakQ-7Tm.js +0 -97
- package/dist/calendar-B3mio8iQ.js +0 -387
- package/dist/cascader-CARCYdHh.js +0 -1097
- package/dist/currency-field-B7OZ0hk7.js +0 -436
- package/dist/date-field-D_kLLTfL.js +0 -279
- package/dist/date-picker-DQ5SIhdA.js +0 -264
- package/dist/date-range-picker-lpB08hK_.js +0 -471
- package/dist/datetime-picker-0F0kDW-8.js +0 -629
- package/dist/datetime-range-picker-ClnEleth.js +0 -994
- package/dist/drawer-Dtospdqk.js +0 -758
- package/dist/entity-picker-Dm-y0RNE.js +0 -1111
- package/dist/import-export-center-CkZ_Ar9w.js +0 -813
- package/dist/menu-parts-BQej6eU9.js +0 -787
- package/dist/popover-DE22lSpV.js +0 -476
- package/dist/react-dom-DzrKNxo6.js +0 -273
- package/dist/tabs-DQ36APY-.js +0 -343
- package/dist/toggle-group-DQBlI1TV.js +0 -140
|
@@ -624,6 +624,32 @@ Excerpt — not a complete module
|
|
|
624
624
|
<DialogTrigger render={(props) => <Button {...props}>Edit project</Button>} />;
|
|
625
625
|
```
|
|
626
626
|
|
|
627
|
+
### A layout of its own
|
|
628
|
+
|
|
629
|
+
DialogContent draws no padding: the header, the body and the footer carry the inset. A layout of its own — one field, a preview, a footer — reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, so it stands in the column the parts stand in.
|
|
630
|
+
|
|
631
|
+
Excerpt — not a complete module
|
|
632
|
+
|
|
633
|
+
```tsx
|
|
634
|
+
<DialogContent>
|
|
635
|
+
<div
|
|
636
|
+
style={{
|
|
637
|
+
display: 'grid',
|
|
638
|
+
gap: 'var(--slotted-space-5)',
|
|
639
|
+
paddingBlock: 'var(--slotted-dialog-inset-block)',
|
|
640
|
+
paddingInline: 'var(--slotted-dialog-inset-inline)',
|
|
641
|
+
}}
|
|
642
|
+
>
|
|
643
|
+
<DialogTitle>Rename file</DialogTitle>
|
|
644
|
+
<TextField aria-label="Name" defaultValue="report-q3.pdf" />
|
|
645
|
+
<img alt="First page of report-q3.pdf" src={preview} />
|
|
646
|
+
</div>
|
|
647
|
+
<DialogFooter>
|
|
648
|
+
<Button size="sm">Rename</Button>
|
|
649
|
+
</DialogFooter>
|
|
650
|
+
</DialogContent>;
|
|
651
|
+
```
|
|
652
|
+
|
|
627
653
|
### Deciding once for the application
|
|
628
654
|
|
|
629
655
|
Eight decisions an application takes once instead of eight props on every dialog in a product. Angular Material is the only surveyed library with an equivalent, and a dialog that states one itself still wins.
|
package/dist/docs/dialog.json
CHANGED
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"part": "content",
|
|
207
207
|
"element": "div",
|
|
208
208
|
"required": true,
|
|
209
|
-
"purpose": "The panel. It carries role=\"dialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long."
|
|
209
|
+
"purpose": "The panel. It carries role=\"dialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long. It draws no padding: DialogHeader, DialogBody and DialogFooter carry the panel inset. A layout that skips them reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, which the panel states, and a theme sets the inset with --slotted-dialog-padding-inline and --slotted-dialog-padding-block."
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"part": "header",
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
"part": "content",
|
|
498
498
|
"element": "div",
|
|
499
499
|
"required": true,
|
|
500
|
-
"purpose": "The panel. It carries role=\"alertdialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long."
|
|
500
|
+
"purpose": "The panel. It carries role=\"alertdialog\" and, while modal, aria-modal=\"true\". It is a grid of three rows, header, body and footer, and only the body row shrinks, so the actions stay on screen when the body is long. It draws no padding: DialogHeader, DialogBody and DialogFooter carry the panel inset. A layout that skips them reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, which the panel states, and a theme sets the inset with --slotted-dialog-padding-inline and --slotted-dialog-padding-block."
|
|
501
501
|
},
|
|
502
502
|
{
|
|
503
503
|
"part": "header",
|
|
@@ -766,6 +766,10 @@
|
|
|
766
766
|
"--slotted-dialog-description-color",
|
|
767
767
|
"--slotted-dialog-footer-surface",
|
|
768
768
|
"--slotted-dialog-measure",
|
|
769
|
+
"--slotted-dialog-padding-block",
|
|
770
|
+
"--slotted-dialog-padding-block-sm",
|
|
771
|
+
"--slotted-dialog-padding-inline",
|
|
772
|
+
"--slotted-dialog-padding-inline-sm",
|
|
769
773
|
"--slotted-dialog-radius",
|
|
770
774
|
"--slotted-dialog-rule-color",
|
|
771
775
|
"--slotted-dialog-scrim",
|
|
@@ -918,6 +922,14 @@
|
|
|
918
922
|
"source": "<DialogTrigger render={(props) => <Button {...props}>Edit project</Button>} />;\n",
|
|
919
923
|
"verdict": "excerpt"
|
|
920
924
|
},
|
|
925
|
+
{
|
|
926
|
+
"id": "layout",
|
|
927
|
+
"title": "A layout of its own",
|
|
928
|
+
"note": "DialogContent draws no padding: the header, the body and the footer carry the inset. A layout of its own — one field, a preview, a footer — reads --slotted-dialog-inset-inline and --slotted-dialog-inset-block, so it stands in the column the parts stand in.",
|
|
929
|
+
"language": "tsx",
|
|
930
|
+
"source": "<DialogContent>\n <div\n style={{\n display: 'grid',\n gap: 'var(--slotted-space-5)',\n paddingBlock: 'var(--slotted-dialog-inset-block)',\n paddingInline: 'var(--slotted-dialog-inset-inline)',\n }}\n >\n <DialogTitle>Rename file</DialogTitle>\n <TextField aria-label=\"Name\" defaultValue=\"report-q3.pdf\" />\n <img alt=\"First page of report-q3.pdf\" src={preview} />\n </div>\n <DialogFooter>\n <Button size=\"sm\">Rename</Button>\n </DialogFooter>\n</DialogContent>;\n",
|
|
931
|
+
"verdict": "excerpt"
|
|
932
|
+
},
|
|
921
933
|
{
|
|
922
934
|
"id": "defaults",
|
|
923
935
|
"title": "Deciding once for the application",
|
package/dist/docs/dialog.md
CHANGED
|
@@ -245,7 +245,7 @@ export default function DialogBasic() {
|
|
|
245
245
|
|
|
246
246
|
## Tokens
|
|
247
247
|
|
|
248
|
-
`--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-lg`, `--slotted-control-inner-size-lg`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-dialog-body-color`, `--slotted-dialog-border-color`, `--slotted-dialog-close-active-background`, `--slotted-dialog-close-color`, `--slotted-dialog-close-hover-background`, `--slotted-dialog-color`, `--slotted-dialog-description-color`, `--slotted-dialog-footer-surface`, `--slotted-dialog-measure`, `--slotted-dialog-radius`, `--slotted-dialog-rule-color`, `--slotted-dialog-scrim`, `--slotted-dialog-surface`, `--slotted-dialog-title-color`, `--slotted-dialog-title-font-family`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-overlay`
|
|
248
|
+
`--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-lg`, `--slotted-control-inner-size-lg`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-dialog-body-color`, `--slotted-dialog-border-color`, `--slotted-dialog-close-active-background`, `--slotted-dialog-close-color`, `--slotted-dialog-close-hover-background`, `--slotted-dialog-color`, `--slotted-dialog-description-color`, `--slotted-dialog-footer-surface`, `--slotted-dialog-measure`, `--slotted-dialog-padding-block`, `--slotted-dialog-padding-block-sm`, `--slotted-dialog-padding-inline`, `--slotted-dialog-padding-inline-sm`, `--slotted-dialog-radius`, `--slotted-dialog-rule-color`, `--slotted-dialog-scrim`, `--slotted-dialog-surface`, `--slotted-dialog-title-color`, `--slotted-dialog-title-font-family`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-xl`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-overlay`
|
|
249
249
|
|
|
250
250
|
## Examples
|
|
251
251
|
|
|
@@ -127,3 +127,13 @@ Why: The line beside Reply and Internal note was longer in one mode and wrapped
|
|
|
127
127
|
Do: Give the varying text `flex: 1 1 0`, `min-inline-size: 0` and a one-line cut, write the two texts to similar lengths, and keep a control's label set fixed across modes.
|
|
128
128
|
Don't: Let a mode add or remove a line, a hint or a control that changes the region's height, or let a row wrap differently in one mode than in the other.
|
|
129
129
|
Check: At 1280, 570 and 390 pixels, switch the mode and read the bounding box of each box in the region: every top and height is the same in both modes.
|
|
130
|
+
|
|
131
|
+
### CP-09 · A control that switches a region does not render the region in its own frame
|
|
132
|
+
|
|
133
|
+
Level: MUST
|
|
134
|
+
Applies to: tabs, a segmented control, a route link or a filter whose change mounts a region holding tables, grids, charts or forms
|
|
135
|
+
Rule: The control's own state — the selected tab, the pressed segment — updates in the interaction's frame; the region renders from a deferred value (in React, useDeferredValue or startTransition) and states aria-busy while the shown value lags the selected one.
|
|
136
|
+
Why: Mounting a region of families in the click's task blocks the next paint, and Interaction to Next Paint above 200 ms is "needs improvement" and above 500 ms "poor": a table of a hundred rows of twenty cells measured 160 ms in one task in a development build, and a 4× CPU throttle takes its 93 ms in a production build past the first threshold.
|
|
137
|
+
Do: Keep the selection state urgent and hand the region the deferred value; mount only the selected panel, with mount active.
|
|
138
|
+
Don't: Set the selection and the region from one state update inside the click handler, or mount every panel to make switching look instant.
|
|
139
|
+
Check: Switch the control with the CPU throttled 4× in Chrome: the selection marker moves in the next frame, and the Performance panel shows no long task between the click and that paint.
|
|
@@ -29,6 +29,7 @@ Every active rule, one line each. Load this first; load a topic file when the ta
|
|
|
29
29
|
| CP-06 | SHOULD | A screen states a state once. Where the family has a state for it, the screen sets that state and adds nothing louder beside it. | `composition.md` |
|
|
30
30
|
| CP-07 | SHOULD | A list page is `bleed` with `fill`; a record, a dashboard and an overview keep the default `wide`; a create or edit form is `content`; a page of preferences read as prose is `measure`. | `composition.md` |
|
|
31
31
|
| CP-08 | MUST | Switching the mode changes the words and the values in the region, never the size, the line count or the position of any box in it or around it; text whose length differs between modes stands on one line, cut with an ellipsis and read whole from its title. | `composition.md` |
|
|
32
|
+
| CP-09 | MUST | The control's own state — the selected tab, the pressed segment — updates in the interaction's frame; the region renders from a deferred value (in React, useDeferredValue or startTransition) and states aria-busy while the shown value lags the selected one. | `composition.md` |
|
|
32
33
|
| CV-01 | MUST | From 600 pixels the conversation fills its region and scrolls on its own with the composer under it, and the record's context scrolls on its own beside it or behind a tab of the header; below 600 pixels the page scrolls, the composer is stuck to the bottom of the screen, and the record opens on its last message. | `conversations.md` |
|
|
33
34
|
| CV-02 | SHOULD | A running clock says the business time left and the hour it falls due in the organization's zone, a passed one by how much and when it was due, a paused one that it is stopped and why; a queue's row says the span alone, and no clock is ever said in raw minutes. | `conversations.md` |
|
|
34
35
|
| CV-03 | SHOULD | Each queue is a view of the list's `filter-bar`, a tree of the bar's own fields, labelled with the count of the rows it opens on; choosing it writes its pills, and editing a pill leaves a view the bar marks as changed. | `conversations.md` |
|
|
@@ -72,6 +73,7 @@ Every active rule, one line each. Load this first; load a topic file when the ta
|
|
|
72
73
|
| LP-11 | SHOULD | Where the primary input is a touch screen, the list tools leave out the row density: the theme raises every density's rows to the touch target, and the tools keep the sort, the views and the columns on one line. | `list-pages.md` |
|
|
73
74
|
| LP-12 | MUST | From 600 pixels of the page's width the listing takes the height the bar and the messages leave and scrolls its own rows while the page does not scroll; below 600 the page's `fill` does not apply, the listing is as tall as its rows and the page scrolls. | `list-pages.md` |
|
|
74
75
|
| LP-13 | SHOULD | The mark takes the `sm` `size`; the default `md` belongs to a record's header and to a region with room around it. | `list-pages.md` |
|
|
76
|
+
| LP-14 | MUST | A list that can hold more than a hundred rows, or more than twenty columns, is a `data-grid`, which windows rows and middle columns under its default `virtualize` of `auto`; `table` is for sets the page bounds, such as a statement's lines or a record's related rows. | `list-pages.md` |
|
|
75
77
|
| OV-01 | SHOULD | The figure leads to the list page of the records it counts, and that list opens with the figure's condition applied as the bar's own pills, which the reader removes like any other. | `overviews.md` |
|
|
76
78
|
| OV-02 | SHOULD | Below 600 pixels the figures are one `list` of rows that are destinations — label, comparison, number — followed by the records to act on, the work in flight, the charts, and the history last. | `overviews.md` |
|
|
77
79
|
| OV-03 | SHOULD | Where the reader's scope holds one category, the chart is not drawn and one sentence states the numbers it would have compared. | `overviews.md` |
|
|
@@ -27,7 +27,8 @@ triggers:
|
|
|
27
27
|
badge,
|
|
28
28
|
tag,
|
|
29
29
|
]
|
|
30
|
-
families:
|
|
30
|
+
families:
|
|
31
|
+
[data-grid, table, filter-bar, action-bar, pagination, page, page-header, link, badge, tag]
|
|
31
32
|
---
|
|
32
33
|
|
|
33
34
|
# List pages
|
|
@@ -163,3 +164,13 @@ Why: A row sets its text at the small type step, 13 pixels in a 34-pixel row; an
|
|
|
163
164
|
Do: Give every mark a cell holds — a state, a flag, a warning — the `sm` `size`: 12-pixel words in a 19-pixel box.
|
|
164
165
|
Don't: Leave a cell's mark at the family's default, or size it up to make a state stand out; a tone says that.
|
|
165
166
|
Check: On every list, every `badge` and `tag` inside a cell of a `data-grid` or a `table` carries the `sm` `size`.
|
|
167
|
+
|
|
168
|
+
### LP-14 · A list that can pass a hundred rows is a data-grid
|
|
169
|
+
|
|
170
|
+
Level: MUST
|
|
171
|
+
Applies to: a list of records whose count the reader does not bound — transactions, postings, imports
|
|
172
|
+
Rule: A list that can hold more than a hundred rows, or more than twenty columns, is a `data-grid`, which windows rows and middle columns under its default `virtualize` of `auto`; `table` is for sets the page bounds, such as a statement's lines or a record's related rows.
|
|
173
|
+
Why: `table` mounts every cell: a hundred rows of twenty columns measured 93 ms in one task with a production build of React in Chrome and 160 ms with a development build, and the count of rows the store returns sets that cost.
|
|
174
|
+
Do: Give the store's list a `data-grid` with its query, and keep `table` for the bounded sets inside a record or a document.
|
|
175
|
+
Don't: Render an unbounded store into a `table`, or page a `table` to keep it under a hundred rows where the grid's window would have kept the whole set reachable.
|
|
176
|
+
Check: Every list over an unbounded store is a `data-grid`; every `table` on a page renders a set the page bounds.
|
package/dist/docs/list.json
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"root",
|
|
52
52
|
"section",
|
|
53
53
|
"section-label",
|
|
54
|
+
"section-end",
|
|
54
55
|
"section-list",
|
|
55
56
|
"empty"
|
|
56
57
|
]
|
|
@@ -78,7 +79,13 @@
|
|
|
78
79
|
"part": "section-label",
|
|
79
80
|
"element": "h1 to h6, or a div",
|
|
80
81
|
"required": false,
|
|
81
|
-
"purpose": "The group name. It carries the id the nested list names itself by,
|
|
82
|
+
"purpose": "The group name. It carries the id the nested list names itself by, data-sticky when it has to hold still while its own rows scroll past, and data-variant: caption, the small muted name, or ruled, the name in the text colour over a rule with no ground behind it."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"part": "section-end",
|
|
86
|
+
"element": "span",
|
|
87
|
+
"required": false,
|
|
88
|
+
"purpose": "What stands at the end of the heading, on the line of the name: a day balance, a count. Set in tabular figures. It is rendered from the end prop."
|
|
82
89
|
},
|
|
83
90
|
{
|
|
84
91
|
"part": "section-list",
|
|
@@ -150,6 +157,20 @@
|
|
|
150
157
|
"appliesTo": "ListSection",
|
|
151
158
|
"description": "Keeps a group name in place while its own rows scroll past it"
|
|
152
159
|
},
|
|
160
|
+
{
|
|
161
|
+
"name": "end",
|
|
162
|
+
"type": "ReactNode",
|
|
163
|
+
"defaultValue": "—",
|
|
164
|
+
"appliesTo": "ListSection",
|
|
165
|
+
"description": "What stands at the end of the group heading, on the line of the name, in tabular figures"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "labelVariant",
|
|
169
|
+
"type": "'caption' | 'ruled'",
|
|
170
|
+
"defaultValue": "caption",
|
|
171
|
+
"appliesTo": "ListSection",
|
|
172
|
+
"description": "How the group heading is drawn: the small muted name, or the name over a rule with no ground"
|
|
173
|
+
},
|
|
153
174
|
{
|
|
154
175
|
"name": "label",
|
|
155
176
|
"type": "ReactNode",
|
|
@@ -213,6 +234,7 @@
|
|
|
213
234
|
"--slotted-control-padding-inline-md",
|
|
214
235
|
"--slotted-control-padding-inline-sm",
|
|
215
236
|
"--slotted-font-size-xs",
|
|
237
|
+
"--slotted-font-weight-medium",
|
|
216
238
|
"--slotted-font-weight-semibold",
|
|
217
239
|
"--slotted-line-height-sm",
|
|
218
240
|
"--slotted-list-background",
|
|
@@ -236,6 +258,8 @@
|
|
|
236
258
|
"--slotted-list-section-padding-block",
|
|
237
259
|
"--slotted-list-section-padding-block-lg",
|
|
238
260
|
"--slotted-list-section-padding-block-sm",
|
|
261
|
+
"--slotted-list-section-rule-color",
|
|
262
|
+
"--slotted-list-section-ruled-color",
|
|
239
263
|
"--slotted-radius-md",
|
|
240
264
|
"--slotted-space-2",
|
|
241
265
|
"--slotted-space-3",
|
|
@@ -245,6 +269,7 @@
|
|
|
245
269
|
"--slotted-space-8",
|
|
246
270
|
"--slotted-space-9",
|
|
247
271
|
"--slotted-surface",
|
|
272
|
+
"--slotted-text",
|
|
248
273
|
"--slotted-text-muted",
|
|
249
274
|
"--slotted-z-index-sticky"
|
|
250
275
|
],
|
package/dist/docs/list.md
CHANGED
|
@@ -33,6 +33,7 @@ Excerpt — not a complete module
|
|
|
33
33
|
| `root` | ul or ol, or the element render returns | yes |
|
|
34
34
|
| `section` | li | no |
|
|
35
35
|
| `section-label` | h1 to h6, or a div | no |
|
|
36
|
+
| `section-end` | span | no |
|
|
36
37
|
| `section-list` | ul or ol | no |
|
|
37
38
|
| `empty` | li | no |
|
|
38
39
|
|
|
@@ -48,6 +49,8 @@ Excerpt — not a complete module
|
|
|
48
49
|
| `loading` | `boolean` | false | List | Writes aria-busy on the set. What stands in for the rows is Skeleton, composed by the page |
|
|
49
50
|
| `level` | `'none' \| '1' \| '2' \| '3' \| '4' \| '5' \| '6'` | 3 | ListSection | The heading a group name is set as. none renders a div and announces no heading |
|
|
50
51
|
| `sticky` | `boolean` | false | ListSection | Keeps a group name in place while its own rows scroll past it |
|
|
52
|
+
| `end` | `ReactNode` | — | ListSection | What stands at the end of the group heading, on the line of the name, in tabular figures |
|
|
53
|
+
| `labelVariant` | `'caption' \| 'ruled'` | caption | ListSection | How the group heading is drawn: the small muted name, or the name over a rule with no ground |
|
|
51
54
|
| `label` | `ReactNode` | — | ListSection | The group name, which the nested list is named by |
|
|
52
55
|
| `labelProps / listProps` | `HTMLAttributes` | — | ListSection | Reach the heading and the nested list, for an id or a class the page owns |
|
|
53
56
|
| `render` | `(props) => ReactNode` | — | List, ListSection, ListEmpty | Renders the wiring into another element — a nav, a router own list |
|
|
@@ -75,7 +78,7 @@ Excerpt — not a complete module
|
|
|
75
78
|
|
|
76
79
|
## Tokens
|
|
77
80
|
|
|
78
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-sm`, `--slotted-list-background`, `--slotted-list-border-color`, `--slotted-list-border-width`, `--slotted-list-empty-color`, `--slotted-list-empty-padding`, `--slotted-list-empty-padding-lg`, `--slotted-list-empty-padding-sm`, `--slotted-list-gap`, `--slotted-list-gap-lg`, `--slotted-list-gap-sm`, `--slotted-list-padding-inline`, `--slotted-list-padding-inline-lg`, `--slotted-list-padding-inline-sm`, `--slotted-list-radius`, `--slotted-list-section-color`, `--slotted-list-section-font-size`, `--slotted-list-section-font-weight`, `--slotted-list-section-letter-spacing`, `--slotted-list-section-padding-block`, `--slotted-list-section-padding-block-lg`, `--slotted-list-section-padding-block-sm`, `--slotted-radius-md`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
81
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-sm`, `--slotted-list-background`, `--slotted-list-border-color`, `--slotted-list-border-width`, `--slotted-list-empty-color`, `--slotted-list-empty-padding`, `--slotted-list-empty-padding-lg`, `--slotted-list-empty-padding-sm`, `--slotted-list-gap`, `--slotted-list-gap-lg`, `--slotted-list-gap-sm`, `--slotted-list-padding-inline`, `--slotted-list-padding-inline-lg`, `--slotted-list-padding-inline-sm`, `--slotted-list-radius`, `--slotted-list-section-color`, `--slotted-list-section-font-size`, `--slotted-list-section-font-weight`, `--slotted-list-section-letter-spacing`, `--slotted-list-section-padding-block`, `--slotted-list-section-padding-block-lg`, `--slotted-list-section-padding-block-sm`, `--slotted-list-section-rule-color`, `--slotted-list-section-ruled-color`, `--slotted-radius-md`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-z-index-sticky`
|
|
79
82
|
|
|
80
83
|
## Examples
|
|
81
84
|
|
package/dist/docs/page.json
CHANGED
|
@@ -219,6 +219,7 @@
|
|
|
219
219
|
"accessibility": [
|
|
220
220
|
"The practice is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/): each page should have one main landmark, and the page is it. landmark=\"none\" is for the page that is not the document’s — inside a drawer, a dialog or the detail pane of a master–detail layout — and it renders a div so the document keeps one main.",
|
|
221
221
|
"The footer is a footer element inside main, which is not a contentinfo landmark, so it is named: the catalog’s footer message by default, an aria-label the consumer writes otherwise. A reader walking the page’s controls finds “Page actions” before the buttons in it.",
|
|
222
|
+
"Content outside PageBody receives no inset: the inset lives on the body, so content written straight into Page is drawn against the viewport edges. In development, Page warns once when it holds content and no PageBody.",
|
|
222
223
|
"The outline is typography’s. The body is one HeadingLevel deeper than the header, so a Section written directly in it takes h2 under the header’s h1, and a section inside that takes h3 — without either family reading the other, and without a skip the HTML Standard forbids.",
|
|
223
224
|
"The body carries aria-busy while loading, which is what tells a screen reader the region is not ready. The page draws no placeholder: the header stands skeleton text of the title’s own width, and each family inside stands its own.",
|
|
224
225
|
"Scrolling is the platform’s. The page never writes a scroll position, and under scroll=\"self\" the scroll part is an ordinary scrolling box a keyboard reaches with the arrow keys once something inside it has focus."
|
package/dist/docs/page.md
CHANGED
|
@@ -64,6 +64,7 @@ Excerpt — not a complete module
|
|
|
64
64
|
|
|
65
65
|
- The practice is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/): each page should have one main landmark, and the page is it. landmark="none" is for the page that is not the document’s — inside a drawer, a dialog or the detail pane of a master–detail layout — and it renders a div so the document keeps one main.
|
|
66
66
|
- The footer is a footer element inside main, which is not a contentinfo landmark, so it is named: the catalog’s footer message by default, an aria-label the consumer writes otherwise. A reader walking the page’s controls finds “Page actions” before the buttons in it.
|
|
67
|
+
- Content outside PageBody receives no inset: the inset lives on the body, so content written straight into Page is drawn against the viewport edges. In development, Page warns once when it holds content and no PageBody.
|
|
67
68
|
- The outline is typography’s. The body is one HeadingLevel deeper than the header, so a Section written directly in it takes h2 under the header’s h1, and a section inside that takes h3 — without either family reading the other, and without a skip the HTML Standard forbids.
|
|
68
69
|
- The body carries aria-busy while loading, which is what tells a screen reader the region is not ready. The page draws no placeholder: the header stands skeleton text of the title’s own width, and each family inside stands its own.
|
|
69
70
|
- Scrolling is the platform’s. The page never writes a scroll position, and under scroll="self" the scroll part is an ordinary scrolling box a keyboard reaches with the arrow keys once something inside it has focus.
|
package/dist/docs/popover.json
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"part": "content",
|
|
145
145
|
"element": "div",
|
|
146
146
|
"required": true,
|
|
147
|
-
"purpose": "The panel, with role=\"dialog\" and tabindex=\"-1\". It is named by its title and described by its description when those parts are present. aria-modal is never written, because the popover is not modal."
|
|
147
|
+
"purpose": "The panel, with role=\"dialog\" and tabindex=\"-1\". It is named by its title and described by its description when those parts are present. aria-modal is never written, because the popover is not modal. It draws no padding: PopoverHeader, PopoverBody and PopoverFooter carry the panel inset, set by --slotted-popover-padding-inline and --slotted-popover-padding-block."
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"part": "header",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"condense": [
|
|
20
20
|
"none",
|
|
21
21
|
"icons"
|
|
22
|
+
],
|
|
23
|
+
"variant": [
|
|
24
|
+
"track",
|
|
25
|
+
"underline"
|
|
22
26
|
]
|
|
23
27
|
},
|
|
24
28
|
"members": {
|
|
@@ -29,7 +33,8 @@
|
|
|
29
33
|
"orientation": "horizontal",
|
|
30
34
|
"condense": "none",
|
|
31
35
|
"fullWidth": false,
|
|
32
|
-
"disabled": false
|
|
36
|
+
"disabled": false,
|
|
37
|
+
"variant": "track"
|
|
33
38
|
},
|
|
34
39
|
"capabilities": [
|
|
35
40
|
"selection",
|
|
@@ -143,6 +148,13 @@
|
|
|
143
148
|
"appliesTo": "SegmentedControl",
|
|
144
149
|
"description": "How the segments flow and which way the thumb travels. A horizontal set writes aria-orientation, because radiogroup already implies vertical"
|
|
145
150
|
},
|
|
151
|
+
{
|
|
152
|
+
"name": "variant",
|
|
153
|
+
"type": "'track' | 'underline'",
|
|
154
|
+
"defaultValue": "track",
|
|
155
|
+
"appliesTo": "SegmentedControl",
|
|
156
|
+
"description": "How the choice is drawn: a track with a thumb, or the words alone with the chosen one underlined"
|
|
157
|
+
},
|
|
146
158
|
{
|
|
147
159
|
"name": "condense",
|
|
148
160
|
"type": "'none' | 'icons'",
|
|
@@ -269,6 +281,7 @@
|
|
|
269
281
|
},
|
|
270
282
|
"tokens": [
|
|
271
283
|
"--slotted-border-subtle",
|
|
284
|
+
"--slotted-border-width-thick",
|
|
272
285
|
"--slotted-control-border-color",
|
|
273
286
|
"--slotted-control-border-width",
|
|
274
287
|
"--slotted-control-font-family",
|
|
@@ -304,7 +317,9 @@
|
|
|
304
317
|
"--slotted-easing-standard",
|
|
305
318
|
"--slotted-focus-ring-color",
|
|
306
319
|
"--slotted-focus-ring-color-invalid",
|
|
320
|
+
"--slotted-focus-ring-offset",
|
|
307
321
|
"--slotted-focus-ring-width",
|
|
322
|
+
"--slotted-font-weight-medium",
|
|
308
323
|
"--slotted-radius-xs",
|
|
309
324
|
"--slotted-segmented-control-active-background",
|
|
310
325
|
"--slotted-segmented-control-background",
|
|
@@ -324,9 +339,14 @@
|
|
|
324
339
|
"--slotted-segmented-control-invalid-focus-ring-color",
|
|
325
340
|
"--slotted-segmented-control-radius",
|
|
326
341
|
"--slotted-segmented-control-shadow",
|
|
342
|
+
"--slotted-segmented-control-underline-checked-color",
|
|
343
|
+
"--slotted-segmented-control-underline-color",
|
|
344
|
+
"--slotted-segmented-control-underline-gap",
|
|
327
345
|
"--slotted-space-1",
|
|
346
|
+
"--slotted-space-6",
|
|
328
347
|
"--slotted-target-min",
|
|
329
348
|
"--slotted-text",
|
|
349
|
+
"--slotted-text-muted",
|
|
330
350
|
"--slotted-tone-accent-border",
|
|
331
351
|
"--slotted-tone-accent-subtle-active",
|
|
332
352
|
"--slotted-tone-accent-text",
|
|
@@ -375,6 +395,14 @@
|
|
|
375
395
|
"source": "<SegmentedControl aria-label=\"Alinhamento\" defaultValue=\"center\">\n <Segment aria-label=\"Início\" icon={<AlignStartIcon />} value=\"start\" />\n <Segment aria-label=\"Centro\" icon={<AlignCenterIcon />} value=\"center\" />\n</SegmentedControl>;\n",
|
|
376
396
|
"verdict": "excerpt"
|
|
377
397
|
},
|
|
398
|
+
{
|
|
399
|
+
"id": "variants",
|
|
400
|
+
"title": "A track, or the words alone",
|
|
401
|
+
"note": "underline draws the same radio group as words: each as wide as itself, the chosen one in the text colour and underlined, the others muted. One tab stop, the arrows move the value, and inside a field the label names the set.",
|
|
402
|
+
"language": "tsx",
|
|
403
|
+
"source": "<SegmentedControl aria-label=\"Período\" defaultValue=\"month\" variant=\"underline\">\n <Segment value=\"day\">Dia</Segment>\n <Segment value=\"week\">Semana</Segment>\n <Segment value=\"month\">Mês</Segment>\n</SegmentedControl>;\n",
|
|
404
|
+
"verdict": "excerpt"
|
|
405
|
+
},
|
|
378
406
|
{
|
|
379
407
|
"id": "condense",
|
|
380
408
|
"title": "Narrower than its words",
|
|
@@ -41,6 +41,7 @@ Excerpt — not a complete module
|
|
|
41
41
|
| `name` | `string` | — | SegmentedControl | The submission name the segments share, and the reason the platform treats them as one radio group. Generated when none is written, and the cost is that such a control submits under a generated key |
|
|
42
42
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | SegmentedControl | The control step. The track measures its segments back from it, so the whole control is exactly as tall as the field beside it |
|
|
43
43
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | SegmentedControl | How the segments flow and which way the thumb travels. A horizontal set writes aria-orientation, because radiogroup already implies vertical |
|
|
44
|
+
| `variant` | `'track' \| 'underline'` | track | SegmentedControl | How the choice is drawn: a track with a thumb, or the words alone with the chosen one underlined |
|
|
44
45
|
| `condense` | `'none' \| 'icons'` | none | SegmentedControl | What the control does when it is narrower than its labels need. icons keeps the marks and hides the words, and makes the control take its parent’s width so there is a width to ask a question about |
|
|
45
46
|
| `fullWidth` | `boolean` | false | SegmentedControl | Whether the equal columns spread across the whole line. Left alone every column is the widest label’s |
|
|
46
47
|
| `disabled` | `boolean` | false | SegmentedControl | Unstated rather than false, so the control defers to the field around it. Stated, it reaches every radio as the native attribute, which is also what makes the browser skip it with the arrows |
|
|
@@ -70,6 +71,7 @@ Excerpt — not a complete module
|
|
|
70
71
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
71
72
|
| `orientation` | `horizontal`, `vertical` | `horizontal` |
|
|
72
73
|
| `condense` | `none`, `icons` | `none` |
|
|
74
|
+
| `variant` | `track`, `underline` | `track` |
|
|
73
75
|
|
|
74
76
|
## Rules
|
|
75
77
|
|
|
@@ -83,7 +85,7 @@ Excerpt — not a complete module
|
|
|
83
85
|
|
|
84
86
|
## Tokens
|
|
85
87
|
|
|
86
|
-
`--slotted-border-subtle`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-font-weight`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-letter-spacing`, `--slotted-control-line-height`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-duration-medium`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-width`, `--slotted-radius-xs`, `--slotted-segmented-control-active-background`, `--slotted-segmented-control-background`, `--slotted-segmented-control-border-color`, `--slotted-segmented-control-checked-color`, `--slotted-segmented-control-color`, `--slotted-segmented-control-disabled-border-color`, `--slotted-segmented-control-disabled-color`, `--slotted-segmented-control-disabled-indicator-background`, `--slotted-segmented-control-divider-color`, `--slotted-segmented-control-hover-background`, `--slotted-segmented-control-indicator-background`, `--slotted-segmented-control-indicator-border-color`, `--slotted-segmented-control-inset`, `--slotted-segmented-control-invalid-border-color`, `--slotted-segmented-control-invalid-edge-width`, `--slotted-segmented-control-invalid-focus-ring-color`, `--slotted-segmented-control-radius`, `--slotted-segmented-control-shadow`, `--slotted-space-1`, `--slotted-target-min`, `--slotted-text`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
88
|
+
`--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-font-weight`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-letter-spacing`, `--slotted-control-line-height`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-duration-medium`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-weight-medium`, `--slotted-radius-xs`, `--slotted-segmented-control-active-background`, `--slotted-segmented-control-background`, `--slotted-segmented-control-border-color`, `--slotted-segmented-control-checked-color`, `--slotted-segmented-control-color`, `--slotted-segmented-control-disabled-border-color`, `--slotted-segmented-control-disabled-color`, `--slotted-segmented-control-disabled-indicator-background`, `--slotted-segmented-control-divider-color`, `--slotted-segmented-control-hover-background`, `--slotted-segmented-control-indicator-background`, `--slotted-segmented-control-indicator-border-color`, `--slotted-segmented-control-inset`, `--slotted-segmented-control-invalid-border-color`, `--slotted-segmented-control-invalid-edge-width`, `--slotted-segmented-control-invalid-focus-ring-color`, `--slotted-segmented-control-radius`, `--slotted-segmented-control-shadow`, `--slotted-segmented-control-underline-checked-color`, `--slotted-segmented-control-underline-color`, `--slotted-segmented-control-underline-gap`, `--slotted-space-1`, `--slotted-space-6`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
87
89
|
|
|
88
90
|
## Examples
|
|
89
91
|
|
|
@@ -143,6 +145,20 @@ Excerpt — not a complete module
|
|
|
143
145
|
</SegmentedControl>;
|
|
144
146
|
```
|
|
145
147
|
|
|
148
|
+
### A track, or the words alone
|
|
149
|
+
|
|
150
|
+
underline draws the same radio group as words: each as wide as itself, the chosen one in the text colour and underlined, the others muted. One tab stop, the arrows move the value, and inside a field the label names the set.
|
|
151
|
+
|
|
152
|
+
Excerpt — not a complete module
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
<SegmentedControl aria-label="Período" defaultValue="month" variant="underline">
|
|
156
|
+
<Segment value="day">Dia</Segment>
|
|
157
|
+
<Segment value="week">Semana</Segment>
|
|
158
|
+
<Segment value="month">Mês</Segment>
|
|
159
|
+
</SegmentedControl>;
|
|
160
|
+
```
|
|
161
|
+
|
|
146
162
|
### Narrower than its words
|
|
147
163
|
|
|
148
164
|
Below the width its labels need, a control told to condense keeps its marks and hides its words — hidden, never removed, so every segment is announced the same at every width.
|
package/dist/docs/select.json
CHANGED
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
"type": "SelectItems",
|
|
484
484
|
"defaultValue": "—",
|
|
485
485
|
"appliesTo": "Select",
|
|
486
|
-
"description": "Values with their labels,
|
|
486
|
+
"description": "Values with their labels, read before any option renders. Without it, a held value takes its label from its SelectItem: while the list is closed and a held value has no label, the options render once outside the document and register theirs. Pass items when the options are not rendered until the list opens, such as options fetched on open."
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
"name": "name",
|
package/dist/docs/select.md
CHANGED
|
@@ -100,7 +100,7 @@ export default function SelectBasic() {
|
|
|
100
100
|
| `defaultOpen` | `boolean` | false | Select | Whether an uncontrolled select starts open. |
|
|
101
101
|
| `highlightedValue` | `string \| null` | — | Select | The highlighted option. Passing it makes the highlight controlled. The highlight is where the keyboard is, not what is chosen. |
|
|
102
102
|
| `defaultHighlightedValue` | `string \| null` | — | Select | The option an uncontrolled highlight starts on. |
|
|
103
|
-
| `items` | `SelectItems` | — | Select | Values with their labels,
|
|
103
|
+
| `items` | `SelectItems` | — | Select | Values with their labels, read before any option renders. Without it, a held value takes its label from its SelectItem: while the list is closed and a held value has no label, the options render once outside the document and register theirs. Pass items when the options are not rendered until the list opens, such as options fetched on open. |
|
|
104
104
|
| `name` | `string` | — | Select | The name the value is submitted under. It renders a hidden native select, which FormData reads and a form reset restores. |
|
|
105
105
|
| `form` | `string` | — | Select | The id of the form the control belongs to, when it is not the enclosing form. |
|
|
106
106
|
| `total` | `number` | — | Select | The size of the whole collection when only part of it is rendered. Options with position then carry aria-setsize and aria-posinset. |
|
|
@@ -553,9 +553,9 @@
|
|
|
553
553
|
{
|
|
554
554
|
"id": "current",
|
|
555
555
|
"title": "Where the reader is",
|
|
556
|
-
"note": "value on the root names the destination and a press asks it to move; a link that states current itself wins. The parent of a hidden destination is marked until its group opens, and autoExpand opens it.",
|
|
556
|
+
"note": "value on the root names the destination and a press asks it to move; a link that states current itself wins. The parent of a hidden destination is marked until its group opens, and autoExpand opens it. With a router, usePressSelection paints the press before the route renders: the item is current at once, and the navigation runs after the frame that shows it. A click carrying a modifier key is left to the browser.",
|
|
557
557
|
"language": "tsx",
|
|
558
|
-
"source": "const
|
|
558
|
+
"source": "const { pathname } = useLocation();\nconst navigate = useNavigate();\nconst { selected, select } = usePressSelection(pathname);\n\nconst press = (to: string) => (event: MouseEvent) => {\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return;\n }\n event.preventDefault();\n select(to, () => navigate(to));\n};\n\n<SideNavigation value={selected ?? null}>\n …\n <SideNavigationItem value=\"/orders\">\n <SideNavigationLink href=\"/orders\" onClick={press('/orders')}>\n Orders\n </SideNavigationLink>\n </SideNavigationItem>\n</SideNavigation>;\n",
|
|
559
559
|
"verdict": "excerpt"
|
|
560
560
|
},
|
|
561
561
|
{
|
|
@@ -272,15 +272,30 @@ Excerpt — not a complete module
|
|
|
272
272
|
|
|
273
273
|
### Where the reader is
|
|
274
274
|
|
|
275
|
-
value on the root names the destination and a press asks it to move; a link that states current itself wins. The parent of a hidden destination is marked until its group opens, and autoExpand opens it.
|
|
275
|
+
value on the root names the destination and a press asks it to move; a link that states current itself wins. The parent of a hidden destination is marked until its group opens, and autoExpand opens it. With a router, usePressSelection paints the press before the route renders: the item is current at once, and the navigation runs after the frame that shows it. A click carrying a modifier key is left to the browser.
|
|
276
276
|
|
|
277
277
|
Excerpt — not a complete module
|
|
278
278
|
|
|
279
279
|
```tsx
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
const { pathname } = useLocation();
|
|
281
|
+
const navigate = useNavigate();
|
|
282
|
+
const { selected, select } = usePressSelection(pathname);
|
|
283
|
+
|
|
284
|
+
const press = (to: string) => (event: MouseEvent) => {
|
|
285
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
event.preventDefault();
|
|
289
|
+
select(to, () => navigate(to));
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
<SideNavigation value={selected ?? null}>
|
|
283
293
|
…
|
|
294
|
+
<SideNavigationItem value="/orders">
|
|
295
|
+
<SideNavigationLink href="/orders" onClick={press('/orders')}>
|
|
296
|
+
Orders
|
|
297
|
+
</SideNavigationLink>
|
|
298
|
+
</SideNavigationItem>
|
|
284
299
|
</SideNavigation>;
|
|
285
300
|
```
|
|
286
301
|
|
|
@@ -59,6 +59,10 @@ element stands in that slot.
|
|
|
59
59
|
nothing louder beside it (CP-06).
|
|
60
60
|
- A control that switches what a region holds changes words and values, never
|
|
61
61
|
the size or the position of a box (CP-08).
|
|
62
|
+
- A control that switches a region — tabs, a route, a filter — updates its
|
|
63
|
+
own state at once and renders the region from a deferred value (in React,
|
|
64
|
+
useDeferredValue or startTransition) (CP-09). A list longer than a hundred
|
|
65
|
+
rows is a `data-grid`, which windows its rows (LP-14).
|
|
62
66
|
- Where no anatomy answers the problem, the screen writes an element of its
|
|
63
67
|
own instead of bending a family into a shape it does not have (CP-04). That
|
|
64
68
|
element is built with `node_modules/@slotted/react/dist/docs/skills/build-own-element/SKILL.md`.
|
|
@@ -74,3 +78,6 @@ Every region filled by a request and every control that starts one follow
|
|
|
74
78
|
2. Each `SHOULD` rule not followed is listed with its reason.
|
|
75
79
|
3. No CSS of the screen's own targets a family's parts; a family's appearance
|
|
76
80
|
changes through its axes.
|
|
81
|
+
4. In a browser with the CPU throttled 4×, each control that switches a region
|
|
82
|
+
paints its new state in the next frame, with no long task between the input
|
|
83
|
+
and that paint.
|
|
@@ -55,6 +55,11 @@ new seed keeps the ratios of every scheme. A colour of the `tone`, `surface`,
|
|
|
55
55
|
3. A colour the reader picks at runtime: write the seed property on the element
|
|
56
56
|
that carries `data-slotted-theme`, with `seedStyle` from
|
|
57
57
|
`@slotted/theme/seeds`, which leaves the token contract out of the bundle.
|
|
58
|
+
4. A bar of the application's own that floats over scrolling content — a phone
|
|
59
|
+
tab bar, a sticky banner — is a material: its background reads
|
|
60
|
+
`--slotted-surface-material` and its backdrop filter reads
|
|
61
|
+
`--slotted-material-backdrop`. The theme makes both opaque under reduced
|
|
62
|
+
transparency and forced colours.
|
|
58
63
|
|
|
59
64
|
## 4. Restyle a control
|
|
60
65
|
|
|
@@ -78,7 +78,7 @@ Excerpt — not a complete module
|
|
|
78
78
|
|
|
79
79
|
| Axis | Values | Default |
|
|
80
80
|
| --- | --- | --- |
|
|
81
|
-
| `tone` | `accent`, `secondary`, `success`, `warning`, `danger` | `accent` |
|
|
81
|
+
| `tone` | `accent`, `secondary`, `neutral`, `success`, `warning`, `danger` | `accent` |
|
|
82
82
|
| `variant` | `solid`, `outline`, `ghost` | `solid` |
|
|
83
83
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
84
84
|
|
package/dist/docs/stat-card.json
CHANGED
package/dist/docs/stat-card.md
CHANGED
|
@@ -114,7 +114,7 @@ Excerpt — not a complete module
|
|
|
114
114
|
|
|
115
115
|
## Tokens
|
|
116
116
|
|
|
117
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-font-family-sans`, `--slotted-font-size-2xl`, `--slotted-font-size-3xl`, `--slotted-font-size-4xl`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xl`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-2xl`, `--slotted-line-height-3xl`, `--slotted-line-height-4xl`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xl`, `--slotted-line-height-xs`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-sparkline-block-size`, `--slotted-sparkline-block-size-lg`, `--slotted-sparkline-block-size-sm`, `--slotted-stat-card-background`, `--slotted-stat-card-background-subtle`, `--slotted-stat-card-border-color`, `--slotted-stat-card-border-width`, `--slotted-stat-card-color`, `--slotted-stat-card-color-muted`, `--slotted-stat-card-delta-font-size`, `--slotted-stat-card-delta-font-size-lg`, `--slotted-stat-card-delta-font-size-sm`, `--slotted-stat-card-indicator-size`, `--slotted-stat-card-indicator-size-lg`, `--slotted-stat-card-label-font-size`, `--slotted-stat-card-label-font-size-lg`, `--slotted-stat-card-label-font-size-sm`, `--slotted-stat-card-label-line-height`, `--slotted-stat-card-label-line-height-lg`, `--slotted-stat-card-label-line-height-sm`, `--slotted-stat-card-min-inline-size`, `--slotted-stat-card-padding-block`, `--slotted-stat-card-padding-block-lg`, `--slotted-stat-card-padding-block-sm`, `--slotted-stat-card-padding-inline`, `--slotted-stat-card-padding-inline-lg`, `--slotted-stat-card-padding-inline-sm`, `--slotted-stat-card-prose-font-size`, `--slotted-stat-card-prose-font-size-lg`, `--slotted-stat-card-prose-line-height`, `--slotted-stat-card-prose-line-height-lg`, `--slotted-stat-card-radius`, `--slotted-stat-card-region-gap`, `--slotted-stat-card-region-gap-lg`, `--slotted-stat-card-region-gap-sm`, `--slotted-stat-card-shadow`, `--slotted-stat-card-shadow-elevated`, `--slotted-stat-card-trend-gap`, `--slotted-stat-card-trend-gap-lg`, `--slotted-stat-card-trend-gap-sm`, `--slotted-stat-card-trend-inline-size`, `--slotted-stat-card-trend-inline-size-lg`, `--slotted-stat-card-trend-inline-size-sm`, `--slotted-stat-card-value-font-size`, `--slotted-stat-card-value-font-size-lg`, `--slotted-stat-card-value-font-size-sm`, `--slotted-stat-card-value-line-height`, `--slotted-stat-card-value-line-height-lg`, `--slotted-stat-card-value-line-height-sm`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
|
|
117
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-font-family-sans`, `--slotted-font-size-2xl`, `--slotted-font-size-3xl`, `--slotted-font-size-4xl`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xl`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-letter-spacing-tighter`, `--slotted-line-height-2xl`, `--slotted-line-height-3xl`, `--slotted-line-height-4xl`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xl`, `--slotted-line-height-xs`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-sparkline-block-size`, `--slotted-sparkline-block-size-lg`, `--slotted-sparkline-block-size-sm`, `--slotted-stat-card-background`, `--slotted-stat-card-background-subtle`, `--slotted-stat-card-border-color`, `--slotted-stat-card-border-width`, `--slotted-stat-card-color`, `--slotted-stat-card-color-muted`, `--slotted-stat-card-delta-font-size`, `--slotted-stat-card-delta-font-size-lg`, `--slotted-stat-card-delta-font-size-sm`, `--slotted-stat-card-indicator-size`, `--slotted-stat-card-indicator-size-lg`, `--slotted-stat-card-label-font-size`, `--slotted-stat-card-label-font-size-lg`, `--slotted-stat-card-label-font-size-sm`, `--slotted-stat-card-label-line-height`, `--slotted-stat-card-label-line-height-lg`, `--slotted-stat-card-label-line-height-sm`, `--slotted-stat-card-min-inline-size`, `--slotted-stat-card-padding-block`, `--slotted-stat-card-padding-block-lg`, `--slotted-stat-card-padding-block-sm`, `--slotted-stat-card-padding-inline`, `--slotted-stat-card-padding-inline-lg`, `--slotted-stat-card-padding-inline-sm`, `--slotted-stat-card-prose-font-size`, `--slotted-stat-card-prose-font-size-lg`, `--slotted-stat-card-prose-line-height`, `--slotted-stat-card-prose-line-height-lg`, `--slotted-stat-card-radius`, `--slotted-stat-card-region-gap`, `--slotted-stat-card-region-gap-lg`, `--slotted-stat-card-region-gap-sm`, `--slotted-stat-card-shadow`, `--slotted-stat-card-shadow-elevated`, `--slotted-stat-card-trend-gap`, `--slotted-stat-card-trend-gap-lg`, `--slotted-stat-card-trend-gap-sm`, `--slotted-stat-card-trend-inline-size`, `--slotted-stat-card-trend-inline-size-lg`, `--slotted-stat-card-trend-inline-size-sm`, `--slotted-stat-card-value-font-size`, `--slotted-stat-card-value-font-size-lg`, `--slotted-stat-card-value-font-size-sm`, `--slotted-stat-card-value-line-height`, `--slotted-stat-card-value-line-height-lg`, `--slotted-stat-card-value-line-height-sm`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
|
|
118
118
|
|
|
119
119
|
## Examples
|
|
120
120
|
|
|
@@ -688,7 +688,7 @@ export default function TableExpansion() {
|
|
|
688
688
|
|
|
689
689
|
### A header, a summary and a column that stay
|
|
690
690
|
|
|
691
|
-
stickyHeader holds the head against the top of the scroller and stickyFooter holds the summary against the bottom of it, so the total is on screen at the first row and the last. stickyTo says which box that is: this table own scroller, or whatever scrolls outside it. A pinned column darkens its edge exactly while something is hidden under it, and all of it mirrors in a right-to-left document.
|
|
691
|
+
stickyHeader holds the head against the top of the scroller and stickyFooter holds the summary against the bottom of it, so the total is on screen at the first row and the last. stickyTo says which box that is: this table own scroller, or whatever scrolls outside it. Under stickyTo="page" the head stops at --slotted-table-sticky-offset, which a page binds to its own chrome; a table inside a scrolling box of its own sets that token to 0 on the box. A pinned column darkens its edge exactly while something is hidden under it, and all of it mirrors in a right-to-left document.
|
|
692
692
|
|
|
693
693
|
Example
|
|
694
694
|
|