@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
package/dist/docs/table.json
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"ruled",
|
|
13
13
|
"framed"
|
|
14
14
|
],
|
|
15
|
+
"edges": [
|
|
16
|
+
"inset",
|
|
17
|
+
"flush"
|
|
18
|
+
],
|
|
15
19
|
"striped": [
|
|
16
20
|
true,
|
|
17
21
|
false
|
|
@@ -71,6 +75,7 @@
|
|
|
71
75
|
"nativeElement": "div",
|
|
72
76
|
"defaults": {
|
|
73
77
|
"variant": "ruled",
|
|
78
|
+
"edges": "inset",
|
|
74
79
|
"striped": false,
|
|
75
80
|
"stickyHeader": false,
|
|
76
81
|
"stickyTo": "scroll",
|
|
@@ -107,6 +112,7 @@
|
|
|
107
112
|
"active",
|
|
108
113
|
"focus-visible",
|
|
109
114
|
"selected",
|
|
115
|
+
"current",
|
|
110
116
|
"expanded",
|
|
111
117
|
"disabled",
|
|
112
118
|
"loading"
|
|
@@ -139,6 +145,11 @@
|
|
|
139
145
|
"selection",
|
|
140
146
|
"expander",
|
|
141
147
|
"detail",
|
|
148
|
+
"group-row",
|
|
149
|
+
"group-header",
|
|
150
|
+
"group-content",
|
|
151
|
+
"group-start",
|
|
152
|
+
"group-end",
|
|
142
153
|
"empty",
|
|
143
154
|
"loader",
|
|
144
155
|
"footer"
|
|
@@ -148,7 +159,7 @@
|
|
|
148
159
|
"docs": {
|
|
149
160
|
"table": {
|
|
150
161
|
"imports": {
|
|
151
|
-
"source": "import {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableColumnActions,\n TableColumnHeader,\n TableContent,\n TableDefaultsProvider,\n TableDetail,\n TableEmpty,\n TableExpander,\n TableFooter,\n TableHead,\n TableLoader,\n TableRow,\n TableRowHeader,\n TableSelect,\n TableSelectAll,\n TableSort,\n TableSummary,\n} from '@slotted/react';"
|
|
162
|
+
"source": "import {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableColumnActions,\n TableColumnHeader,\n TableContent,\n TableDefaultsProvider,\n TableDetail,\n TableEmpty,\n TableExpander,\n TableFooter,\n TableGroupRow,\n TableHead,\n TableLoader,\n TableRow,\n TableRowHeader,\n TableSelect,\n TableSelectAll,\n TableSort,\n TableSummary,\n} from '@slotted/react';"
|
|
152
163
|
},
|
|
153
164
|
"anatomy": [
|
|
154
165
|
{
|
|
@@ -319,6 +330,36 @@
|
|
|
319
330
|
"required": false,
|
|
320
331
|
"purpose": "The open row detail, one cell spanning every column. It is not rendered while it is closed."
|
|
321
332
|
},
|
|
333
|
+
{
|
|
334
|
+
"part": "group-row",
|
|
335
|
+
"element": "tr",
|
|
336
|
+
"required": false,
|
|
337
|
+
"purpose": "The band that opens a group of rows: a day of a ledger with its net at the end. One header cell spans every column, and sticky holds the band under the header while its rows scroll past."
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"part": "group-header",
|
|
341
|
+
"element": "th",
|
|
342
|
+
"required": false,
|
|
343
|
+
"purpose": "The one cell of the band, scope=\"rowgroup\", spanning the columns of the table. It names the rows of its own tbody, so a grouped listing writes one body per group."
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"part": "group-content",
|
|
347
|
+
"element": "div",
|
|
348
|
+
"required": false,
|
|
349
|
+
"purpose": "The line inside the band that sets the name at the start and the end content at the end."
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"part": "group-start",
|
|
353
|
+
"element": "span",
|
|
354
|
+
"required": false,
|
|
355
|
+
"purpose": "The name of the group."
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"part": "group-end",
|
|
359
|
+
"element": "span",
|
|
360
|
+
"required": false,
|
|
361
|
+
"purpose": "The end of the band, from the end prop: the total or net of the group, in tabular figures."
|
|
362
|
+
},
|
|
322
363
|
{
|
|
323
364
|
"part": "empty",
|
|
324
365
|
"element": "td",
|
|
@@ -382,6 +423,13 @@
|
|
|
382
423
|
"appliesTo": "Table",
|
|
383
424
|
"description": "How much of a frame the set is given"
|
|
384
425
|
},
|
|
426
|
+
{
|
|
427
|
+
"name": "edges",
|
|
428
|
+
"type": "'inset' | 'flush'",
|
|
429
|
+
"defaultValue": "inset",
|
|
430
|
+
"appliesTo": "Table",
|
|
431
|
+
"description": "Whether the first and the last column keep the cell inset on their outer side. flush lines a plain or ruled table up with the heading around it, leaving the theme’s --slotted-table-edge-inset (0 unless set); a framed table ignores it. Sticky and selection columns keep their own offsets"
|
|
432
|
+
},
|
|
385
433
|
{
|
|
386
434
|
"name": "striped",
|
|
387
435
|
"type": "boolean",
|
|
@@ -557,6 +605,34 @@
|
|
|
557
605
|
"appliesTo": "TableRow",
|
|
558
606
|
"description": "The record position in the whole set, written as aria-rowindex"
|
|
559
607
|
},
|
|
608
|
+
{
|
|
609
|
+
"name": "current",
|
|
610
|
+
"type": "boolean",
|
|
611
|
+
"defaultValue": "false",
|
|
612
|
+
"appliesTo": "TableRow",
|
|
613
|
+
"description": "The record open elsewhere on the page, a detail pane beside the table, written as aria-current"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "interactive",
|
|
617
|
+
"type": "boolean",
|
|
618
|
+
"defaultValue": "true with onAction",
|
|
619
|
+
"appliesTo": "TableRow",
|
|
620
|
+
"description": "Paints the row as a thing the pointer presses"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "onAction",
|
|
624
|
+
"type": "(event) => void",
|
|
625
|
+
"defaultValue": "—",
|
|
626
|
+
"appliesTo": "TableRow",
|
|
627
|
+
"description": "A click anywhere in the row that lands on no control of its own; the first link or button in the row is the keyboard way in"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "end",
|
|
631
|
+
"type": "ReactNode",
|
|
632
|
+
"defaultValue": "—",
|
|
633
|
+
"appliesTo": "TableGroupRow",
|
|
634
|
+
"description": "What stands at the end of the band: the total or net of the group"
|
|
635
|
+
},
|
|
560
636
|
{
|
|
561
637
|
"name": "column",
|
|
562
638
|
"type": "string",
|
|
@@ -599,6 +675,13 @@
|
|
|
599
675
|
"appliesTo": "the three cell parts and both selection cells",
|
|
600
676
|
"description": "Which edge the column is pinned to while the table scrolls past it"
|
|
601
677
|
},
|
|
678
|
+
{
|
|
679
|
+
"name": "sticky",
|
|
680
|
+
"type": "boolean",
|
|
681
|
+
"defaultValue": "false",
|
|
682
|
+
"appliesTo": "TableGroupRow",
|
|
683
|
+
"description": "Holds the band under the header while its rows scroll past"
|
|
684
|
+
},
|
|
602
685
|
{
|
|
603
686
|
"name": "stickyOffset",
|
|
604
687
|
"type": "string",
|
|
@@ -728,15 +811,20 @@
|
|
|
728
811
|
"--slotted-table-color-muted",
|
|
729
812
|
"--slotted-table-column-actions-size",
|
|
730
813
|
"--slotted-table-control-radius",
|
|
814
|
+
"--slotted-table-edge-inset",
|
|
731
815
|
"--slotted-table-font-family",
|
|
732
816
|
"--slotted-table-font-size",
|
|
733
817
|
"--slotted-table-gap",
|
|
818
|
+
"--slotted-table-group-color",
|
|
819
|
+
"--slotted-table-group-sticky-offset",
|
|
820
|
+
"--slotted-table-group-surface",
|
|
734
821
|
"--slotted-table-header-surface",
|
|
735
822
|
"--slotted-table-header-surface-hover",
|
|
736
823
|
"--slotted-table-icon-size",
|
|
737
824
|
"--slotted-table-radius",
|
|
738
825
|
"--slotted-table-row-color-selected",
|
|
739
826
|
"--slotted-table-row-min-block-size",
|
|
827
|
+
"--slotted-table-row-surface-current",
|
|
740
828
|
"--slotted-table-row-surface-hover",
|
|
741
829
|
"--slotted-table-row-surface-selected",
|
|
742
830
|
"--slotted-table-row-surface-selected-hover",
|
|
@@ -754,6 +842,7 @@
|
|
|
754
842
|
"--slotted-tone-accent-subtle-hover",
|
|
755
843
|
"--slotted-tone-accent-surface",
|
|
756
844
|
"--slotted-tone-accent-text",
|
|
845
|
+
"--slotted-tone-secondary-subtle-active",
|
|
757
846
|
"--slotted-tone-secondary-subtle-hover",
|
|
758
847
|
"--slotted-z-index-sticky"
|
|
759
848
|
],
|
|
@@ -881,7 +970,7 @@
|
|
|
881
970
|
{
|
|
882
971
|
"id": "sticky",
|
|
883
972
|
"title": "A header, a summary and a column that stay",
|
|
884
|
-
"note": "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.",
|
|
973
|
+
"note": "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.",
|
|
885
974
|
"language": "tsx",
|
|
886
975
|
"source": "import {\n Table,\n TableBody,\n TableCell,\n TableColumnHeader,\n TableContent,\n TableHead,\n TableRow,\n TableRowHeader,\n TableSummary,\n} from '@slotted/react/table';\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\n\nconst CUSTOMERS = [\n 'Alfreds Futterkiste',\n \"Bon app'\",\n 'Ernst Handel',\n 'Folk och fä HB',\n 'Hanari Carnes',\n 'Island Trading',\n 'QUICK-Stop',\n 'Wartian Herkku',\n];\nconst WAREHOUSES = ['Reno', 'Columbus', 'Savannah'];\n\nconst ORDERS = Array.from({ length: 30 }, (_, index) => ({\n id: `SO-${10400 + index}`,\n customer: CUSTOMERS[index % CUSTOMERS.length],\n warehouse: WAREHOUSES[index % WAREHOUSES.length],\n total: 180 + ((index * 397) % 2400),\n}));\n\nconst TOTAL = ORDERS.reduce((sum, order) => sum + order.total, 0);\n\nexport default function TableSticky() {\n return (\n <Table columns={4} stickyFooter stickyHeader>\n <TableContent\n aria-label=\"September orders\"\n scrollProps={{ style: { maxBlockSize: '20rem' } }}\n >\n <TableHead>\n <TableRow>\n <TableColumnHeader>Order</TableColumnHeader>\n <TableColumnHeader>Customer</TableColumnHeader>\n <TableColumnHeader>Warehouse</TableColumnHeader>\n <TableColumnHeader numeric>Total</TableColumnHeader>\n </TableRow>\n </TableHead>\n <TableBody>\n {ORDERS.map((order) => (\n <TableRow key={order.id} value={order.id}>\n <TableRowHeader text=\"nowrap\">{order.id}</TableRowHeader>\n <TableCell>{order.customer}</TableCell>\n <TableCell>{order.warehouse}</TableCell>\n <TableCell numeric>{USD.format(order.total)}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableSummary>\n <TableRow>\n <TableCell colSpan={3}>{ORDERS.length} orders</TableCell>\n <TableCell numeric>{USD.format(TOTAL)}</TableCell>\n </TableRow>\n </TableSummary>\n </TableContent>\n </Table>\n );\n}\n",
|
|
887
976
|
"verdict": "example"
|
package/dist/docs/table.md
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
TableEmpty,
|
|
20
20
|
TableExpander,
|
|
21
21
|
TableFooter,
|
|
22
|
+
TableGroupRow,
|
|
22
23
|
TableHead,
|
|
23
24
|
TableLoader,
|
|
24
25
|
TableRow,
|
|
@@ -160,6 +161,11 @@ export default function TableBasic() {
|
|
|
160
161
|
| `selection` | th or td | no |
|
|
161
162
|
| `expander` | button | no |
|
|
162
163
|
| `detail` | tr | no |
|
|
164
|
+
| `group-row` | tr | no |
|
|
165
|
+
| `group-header` | th | no |
|
|
166
|
+
| `group-content` | div | no |
|
|
167
|
+
| `group-start` | span | no |
|
|
168
|
+
| `group-end` | span | no |
|
|
163
169
|
| `empty` | td | no |
|
|
164
170
|
| `loader` | tbody | no |
|
|
165
171
|
|
|
@@ -174,6 +180,7 @@ export default function TableBasic() {
|
|
|
174
180
|
| `expanded` | `readonly string[]` | — | Table | The rows whose detail is open. Present means you own it. |
|
|
175
181
|
| `defaultExpanded` | `readonly string[]` | [] | Table | The details an uncontrolled table starts with |
|
|
176
182
|
| `variant` | `'plain' \| 'ruled' \| 'framed'` | ruled | Table | How much of a frame the set is given |
|
|
183
|
+
| `edges` | `'inset' \| 'flush'` | inset | Table | Whether the first and the last column keep the cell inset on their outer side. flush lines a plain or ruled table up with the heading around it, leaving the theme’s --slotted-table-edge-inset (0 unless set); a framed table ignores it. Sticky and selection columns keep their own offsets |
|
|
177
184
|
| `striped` | `boolean` | false | Table | A tinted ground on every second record |
|
|
178
185
|
| `stickyHeader` | `boolean` | false | Table | Whether the header stays while the body scrolls |
|
|
179
186
|
| `stickyFooter` | `boolean` | false | Table | Whether the summary rows stay while the body scrolls. It pins the tfoot and not the footer bar, which never scrolls. |
|
|
@@ -199,12 +206,17 @@ export default function TableBasic() {
|
|
|
199
206
|
| `value` | `string` | — | TableRow | The record key the selection and the expansion are held by |
|
|
200
207
|
| `disabled` | `boolean` | false | TableRow | A record the reader may not choose; it leaves the set the header covers |
|
|
201
208
|
| `rowIndex` | `number` | — | TableRow | The record position in the whole set, written as aria-rowindex |
|
|
209
|
+
| `current` | `boolean` | false | TableRow | The record open elsewhere on the page, a detail pane beside the table, written as aria-current |
|
|
210
|
+
| `interactive` | `boolean` | true with onAction | TableRow | Paints the row as a thing the pointer presses |
|
|
211
|
+
| `onAction` | `(event) => void` | — | TableRow | A click anywhere in the row that lands on no control of its own; the first link or button in the row is the keyboard way in |
|
|
212
|
+
| `end` | `ReactNode` | — | TableGroupRow | What stands at the end of the band: the total or net of the group |
|
|
202
213
|
| `column` | `string` | — | TableColumnHeader, TableSort | The column key the sort descriptor names |
|
|
203
214
|
| `align` | `'start' \| 'center' \| 'end'` | start | the three cell parts | Which edge the value stands on, resolved logically |
|
|
204
215
|
| `numeric` | `boolean` | false | the three cell parts | Tabular figures, and the end edge unless align says otherwise |
|
|
205
216
|
| `blockAlign` | `'start' \| 'center' \| 'end'` | center | the three cell parts and both selection cells | Where this cell content sits in its row, overriding the table own cellAlign |
|
|
206
217
|
| `text` | `'wrap' \| 'truncate' \| 'nowrap'` | wrap | the three cell parts | What a value longer than its column does |
|
|
207
218
|
| `sticky` | `'start' \| 'end'` | start | the three cell parts and both selection cells | Which edge the column is pinned to while the table scrolls past it |
|
|
219
|
+
| `sticky` | `boolean` | false | TableGroupRow | Holds the band under the header while its rows scroll past |
|
|
208
220
|
| `stickyOffset` | `string` | 0 | the three cell parts and both selection cells | Where the pinned column stops, as a CSS length. Two columns pinned to the same edge need the second to state how wide the first is — beside a selection column that is --slotted-table-selection-size, which is 3rem. |
|
|
209
221
|
| `colSpan` | `number` | — | TableDetail, TableEmpty | How many columns the part spans, defaulting to the table own count |
|
|
210
222
|
| `render` | `(props) => ReactNode` | — | Table, TableRow, TableSort | Substitutes the rendered element, keeping every data attribute |
|
|
@@ -227,6 +239,7 @@ export default function TableBasic() {
|
|
|
227
239
|
| Axis | Values | Default |
|
|
228
240
|
| --- | --- | --- |
|
|
229
241
|
| `variant` | `plain`, `ruled`, `framed` | `ruled` |
|
|
242
|
+
| `edges` | `inset`, `flush` | `inset` |
|
|
230
243
|
| `striped` | `true`, `false` | `false` |
|
|
231
244
|
| `stickyHeader` | `true`, `false` | `false` |
|
|
232
245
|
| `stickyFooter` | `true`, `false` | `false` |
|
|
@@ -254,7 +267,7 @@ export default function TableBasic() {
|
|
|
254
267
|
|
|
255
268
|
## Tokens
|
|
256
269
|
|
|
257
|
-
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-padding-inline-md`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-ground`, `--slotted-line-height-md`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-shadow-xs`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-space-9`, `--slotted-surface`, `--slotted-table-border-color`, `--slotted-table-border-color-strong`, `--slotted-table-border-width`, `--slotted-table-cell-padding-block`, `--slotted-table-cell-padding-inline`, `--slotted-table-color`, `--slotted-table-color-muted`, `--slotted-table-column-actions-size`, `--slotted-table-control-radius`, `--slotted-table-font-family`, `--slotted-table-font-size`, `--slotted-table-gap`, `--slotted-table-header-surface`, `--slotted-table-header-surface-hover`, `--slotted-table-icon-size`, `--slotted-table-radius`, `--slotted-table-row-color-selected`, `--slotted-table-row-min-block-size`, `--slotted-table-row-surface-hover`, `--slotted-table-row-surface-selected`, `--slotted-table-row-surface-selected-hover`, `--slotted-table-row-surface-stripe`, `--slotted-table-selection-size`, `--slotted-table-shadow`, `--slotted-table-sticky-inset`, `--slotted-table-sticky-offset`, `--slotted-table-sticky-offset-end`, `--slotted-table-surface`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-sticky`
|
|
270
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-padding-inline-md`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-regular`, `--slotted-font-weight-semibold`, `--slotted-ground`, `--slotted-line-height-md`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-shadow-xs`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-space-9`, `--slotted-surface`, `--slotted-table-border-color`, `--slotted-table-border-color-strong`, `--slotted-table-border-width`, `--slotted-table-cell-padding-block`, `--slotted-table-cell-padding-inline`, `--slotted-table-color`, `--slotted-table-color-muted`, `--slotted-table-column-actions-size`, `--slotted-table-control-radius`, `--slotted-table-edge-inset`, `--slotted-table-font-family`, `--slotted-table-font-size`, `--slotted-table-gap`, `--slotted-table-group-color`, `--slotted-table-group-sticky-offset`, `--slotted-table-group-surface`, `--slotted-table-header-surface`, `--slotted-table-header-surface-hover`, `--slotted-table-icon-size`, `--slotted-table-radius`, `--slotted-table-row-color-selected`, `--slotted-table-row-min-block-size`, `--slotted-table-row-surface-current`, `--slotted-table-row-surface-hover`, `--slotted-table-row-surface-selected`, `--slotted-table-row-surface-selected-hover`, `--slotted-table-row-surface-stripe`, `--slotted-table-selection-size`, `--slotted-table-shadow`, `--slotted-table-sticky-inset`, `--slotted-table-sticky-offset`, `--slotted-table-sticky-offset-end`, `--slotted-table-surface`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-sticky`
|
|
258
271
|
|
|
259
272
|
## Examples
|
|
260
273
|
|
|
@@ -377,7 +377,7 @@ export default function TabsOverflow() {
|
|
|
377
377
|
|
|
378
378
|
### A view a router can deep-link to
|
|
379
379
|
|
|
380
|
-
href makes the control an anchor, so the destination is real: a plain click selects, and a click carrying a modifier key is left to the browser, which opens the view in a new browser tab.
|
|
380
|
+
href makes the control an anchor, so the destination is real: a plain click selects, and a click carrying a modifier key is left to the browser, which opens the view in a new browser tab. usePressSelection paints the press before the route renders: the tab is selected at once, and the navigation runs after the frame that shows it.
|
|
381
381
|
|
|
382
382
|
Example
|
|
383
383
|
|
package/dist/docs/tabs.json
CHANGED
|
@@ -221,6 +221,13 @@
|
|
|
221
221
|
"appliesTo": "Tabs, TabsDefaultsProvider",
|
|
222
222
|
"description": "When a panel’s content exists: only while its tab is selected (active), from its first selection on (lazy), or from the start (eager). A panel that is not selected carries the hidden attribute."
|
|
223
223
|
},
|
|
224
|
+
{
|
|
225
|
+
"name": "deferPanels",
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"defaultValue": "true under mount=\"active\", false otherwise",
|
|
228
|
+
"appliesTo": "Tabs",
|
|
229
|
+
"description": "Whether the panels render from useDeferredValue(value). The selected tab paints in the click’s frame and its panel renders after it; until it is ready the panel on screen stays, with aria-busy and data-pending. A panel that suspends keeps the shown one when its Suspense boundary is outside Tabs; a boundary inside the new panel shows its own fallback."
|
|
230
|
+
},
|
|
224
231
|
{
|
|
225
232
|
"name": "loop",
|
|
226
233
|
"type": "boolean",
|
|
@@ -319,7 +326,7 @@
|
|
|
319
326
|
"type": "() => TabsContextValue",
|
|
320
327
|
"defaultValue": "—",
|
|
321
328
|
"appliesTo": "inside Tabs",
|
|
322
|
-
"description": "What a tab and a panel read: the value, the mount strategy, the ids, and select(value, reason, source) for a view the page changes on its own. It throws outside Tabs instead of rendering a control that looks right and does nothing."
|
|
329
|
+
"description": "What a tab and a panel read: the value, shownValue (the value the panels render, deferred under deferPanels), the mount strategy, the ids, and select(value, reason, source) for a view the page changes on its own. A region rendered outside the panels — a page header’s tab with controls= — renders from shownValue. It throws outside Tabs instead of rendering a control that looks right and does nothing."
|
|
323
330
|
},
|
|
324
331
|
{
|
|
325
332
|
"name": "TabsDefaultsProvider",
|
|
@@ -354,6 +361,7 @@
|
|
|
354
361
|
}
|
|
355
362
|
],
|
|
356
363
|
"accessibility": [
|
|
364
|
+
"Selecting a tab never waits for its panel: keep value urgent and render the region from useDeferredValue(value), which deferPanels does for the panels and useTabs().shownValue hands a region outside them. Wrapping the setter in startTransition delays the marker too.",
|
|
357
365
|
"Tabs implements the WAI-ARIA APG Tabs pattern (w3.org/WAI/ARIA/apg/patterns/tabs/) and its whole keyboard table: Tab enters the list on the selected tab and leaves to the panel, the arrow keys of the list’s direction move focus and wrap at both ends, Home and End reach the first and last enabled tab, Enter and Space select under manual activation, and Delete closes a dismissible tab. A horizontal list does not listen for Up and Down, so those keys keep scrolling the page while focus is in the list.",
|
|
358
366
|
"After a dismissal, focus follows the pattern: the next tab, the previous one when the closed tab was last, or the list itself when no tab is left, which is why the list carries tabindex=\"-1\". The selection follows the same rule, with the reason remove.",
|
|
359
367
|
"The close button is outside the arrow-key sequence and inside the accessibility tree. A screen reader reaches and presses it; from the keyboard, Delete closes the focused tab, and the tab announces the key with aria-keyshortcuts. In the arrow-key sequence, close buttons would double the presses it takes to cross the list.",
|
|
@@ -528,7 +536,7 @@
|
|
|
528
536
|
{
|
|
529
537
|
"id": "links",
|
|
530
538
|
"title": "A view a router can deep-link to",
|
|
531
|
-
"note": "href makes the control an anchor, so the destination is real: a plain click selects, and a click carrying a modifier key is left to the browser, which opens the view in a new browser tab.",
|
|
539
|
+
"note": "href makes the control an anchor, so the destination is real: a plain click selects, and a click carrying a modifier key is left to the browser, which opens the view in a new browser tab. usePressSelection paints the press before the route renders: the tab is selected at once, and the navigation runs after the frame that shows it.",
|
|
532
540
|
"language": "tsx",
|
|
533
541
|
"source": "import { Tab, TabList, TabPanel, Tabs } from '@slotted/react/tabs';\nimport { Text } from '@slotted/react/typography';\n\nconst VIEWS = [\n { value: 'summary', label: 'Summary', panel: 'Harbor & Pine, $1,240.00, Net 30.' },\n { value: 'items', label: 'Items', panel: '3 lines: shelves, brackets and an assembly kit.' },\n { value: 'shipments', label: 'Shipments', panel: 'Atlas Freight, expected September 12.' },\n];\n\nexport default function TabsLinks() {\n return (\n <Tabs defaultValue=\"summary\">\n <TabList aria-label=\"Order SO-1187\">\n {VIEWS.map((view) => (\n <Tab key={view.value} href={`#order-${view.value}`} value={view.value}>\n {view.label}\n </Tab>\n ))}\n </TabList>\n {VIEWS.map((view) => (\n <TabPanel key={view.value} value={view.value}>\n <Text size=\"sm\">{view.panel}</Text>\n </TabPanel>\n ))}\n </Tabs>\n );\n}\n",
|
|
534
542
|
"verdict": "example"
|
package/dist/docs/tabs.md
CHANGED
|
@@ -127,6 +127,7 @@ export default function TabsBasic() {
|
|
|
127
127
|
| `track` | `'line' \| 'none'` | line | Tabs, TabsDefaultsProvider | Whether the list draws the line its tabs stand on. none is for a list placed on a line the page already draws, such as a card header’s edge or a table’s rule, where two hairlines a pixel apart read as one smudge. The marker then sits on the item’s own edge, on the line that is there. |
|
|
128
128
|
| `fit` | `'auto' \| 'equal'` | auto | Tabs, TabsDefaultsProvider | Whether each tab is as wide as its label or takes an equal share of the line. equal cuts a label longer than its share with an ellipsis; auto never cuts a label and scrolls the list instead. |
|
|
129
129
|
| `mount` | `'active' \| 'lazy' \| 'eager'` | active | Tabs, TabsDefaultsProvider | When a panel’s content exists: only while its tab is selected (active), from its first selection on (lazy), or from the start (eager). A panel that is not selected carries the hidden attribute. |
|
|
130
|
+
| `deferPanels` | `boolean` | true under mount="active", false otherwise | Tabs | Whether the panels render from useDeferredValue(value). The selected tab paints in the click’s frame and its panel renders after it; until it is ready the panel on screen stays, with aria-busy and data-pending. A panel that suspends keeps the shown one when its Suspense boundary is outside Tabs; a boundary inside the new panel shows its own fallback. |
|
|
130
131
|
| `loop` | `boolean` | true | Tabs, TabsDefaultsProvider | Whether the arrow keys wrap past the ends of the list. |
|
|
131
132
|
| `disabled` | `boolean` | false | Tabs | Disables every tab with the native attribute, which also makes the arrow keys skip them, and dims the track. |
|
|
132
133
|
| `value, on Tab` | `string` | — | Tab | What this tab selects, and what the value of Tabs holds. It reaches the DOM as data-value, which the keyboard reads. |
|
|
@@ -140,7 +141,7 @@ export default function TabsBasic() {
|
|
|
140
141
|
| `value, on TabPanel` | `string` | — | TabPanel | The tab this panel belongs to. Tabs wires the pair with ids generated from the value. |
|
|
141
142
|
| `render` | `(props) => ReactNode` | — | Tabs, TabList, Tab, TabPanel, TabActions | Replaces the root element of any of the five and passes it every attribute, so a list can be a nav and Tabs a section. The tab control itself cannot be replaced: it holds the role, the value and the keyboard, and href covers the substitution that matters. |
|
|
142
143
|
| `ref` | `Ref<HTMLElement>` | — | Tab, TabPanel, Tabs | On Tab, reaches the tab’s own control, so focus() and click() are the element’s own methods and no imperative handle stands in for them. |
|
|
143
|
-
| `useTabs()` | `() => TabsContextValue` | — | inside Tabs | What a tab and a panel read: the value, the mount strategy, the ids, and select(value, reason, source) for a view the page changes on its own. It throws outside Tabs instead of rendering a control that looks right and does nothing. |
|
|
144
|
+
| `useTabs()` | `() => TabsContextValue` | — | inside Tabs | What a tab and a panel read: the value, shownValue (the value the panels render, deferred under deferPanels), the mount strategy, the ids, and select(value, reason, source) for a view the page changes on its own. A region rendered outside the panels — a page header’s tab with controls= — renders from shownValue. It throws outside Tabs instead of rendering a control that looks right and does nothing. |
|
|
144
145
|
| `TabsDefaultsProvider` | `{ activation, orientation, size, variant, track, fit, mount, loop }` | — | a subtree | The eight settings an application decides once. A value set on one Tabs still wins. |
|
|
145
146
|
| `aria-label, on TabList` | `string` | — | TabList | The name of the set of views. Tabs writes no name of its own; aria-labelledby works the same way. |
|
|
146
147
|
|
|
@@ -166,6 +167,7 @@ export default function TabsBasic() {
|
|
|
166
167
|
|
|
167
168
|
## Rules
|
|
168
169
|
|
|
170
|
+
- Selecting a tab never waits for its panel: keep value urgent and render the region from useDeferredValue(value), which deferPanels does for the panels and useTabs().shownValue hands a region outside them. Wrapping the setter in startTransition delays the marker too.
|
|
169
171
|
- Tabs implements the WAI-ARIA APG Tabs pattern (w3.org/WAI/ARIA/apg/patterns/tabs/) and its whole keyboard table: Tab enters the list on the selected tab and leaves to the panel, the arrow keys of the list’s direction move focus and wrap at both ends, Home and End reach the first and last enabled tab, Enter and Space select under manual activation, and Delete closes a dismissible tab. A horizontal list does not listen for Up and Down, so those keys keep scrolling the page while focus is in the list.
|
|
170
172
|
- After a dismissal, focus follows the pattern: the next tab, the previous one when the closed tab was last, or the list itself when no tab is left, which is why the list carries tabindex="-1". The selection follows the same rule, with the reason remove.
|
|
171
173
|
- The close button is outside the arrow-key sequence and inside the accessibility tree. A screen reader reaches and presses it; from the keyboard, Delete closes the focused tab, and the tab announces the key with aria-keyshortcuts. In the arrow-key sequence, close buttons would double the presses it takes to cross the list.
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
"type": "'text' | 'search' | 'email' | 'url' | 'tel' | 'password'",
|
|
269
269
|
"defaultValue": "text",
|
|
270
270
|
"appliesTo": "TextField",
|
|
271
|
-
"description": "The input’s own type.
|
|
271
|
+
"description": "The input’s own type, one of the six listed. A date, a time, a month or a number is not a TextField: use date-picker (forms.md FM-16), time-picker or number-field. Other strings still reach the element for compatibility and are not supported."
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
"name": "messages",
|
package/dist/docs/text-field.md
CHANGED
|
@@ -65,7 +65,7 @@ export default function TextFieldBasic() {
|
|
|
65
65
|
| `readOnly` | `boolean` | from the field, or false | TextField | Unset by default, so the text field takes the state of the field around it. It is the native readonly: the input stays focusable and selectable, and its value is submitted. |
|
|
66
66
|
| `invalid` | `boolean` | from the field, or false | TextField | Unset by default, so the text field takes the state of the field around it. It sets aria-invalid on the input and data-invalid on the frame. |
|
|
67
67
|
| `required` | `boolean` | — | TextField | The input’s own attribute, passed through unchanged; TextField never writes it. A field marks a required value with aria-required instead, because the native attribute turns on browser constraint validation. |
|
|
68
|
-
| `type` | `'text' \| 'search' \| 'email' \| 'url' \| 'tel' \| 'password'` | text | TextField | The input’s own type.
|
|
68
|
+
| `type` | `'text' \| 'search' \| 'email' \| 'url' \| 'tel' \| 'password'` | text | TextField | The input’s own type, one of the six listed. A date, a time, a month or a number is not a TextField: use date-picker (forms.md FM-16), time-picker or number-field. Other strings still reach the element for compatibility and are not supported. |
|
|
69
69
|
| `messages` | `Partial<TextFieldMessages>` | — | TextField | Replaces words of the active language, key by key. clear, reveal and copy name the buttons; reveal does not change with the state, because aria-pressed carries it. copied and copyFailed announce the outcome of a copy. capsLock is announced once when Caps Lock turns on in a focused password field. |
|
|
70
70
|
| `render` | `(props: TextFieldRootProps) => ReactNode` | — | TextField | Renders the frame into another element and passes it every attribute. The props are typed against HTMLAttributes<HTMLElement>, so they can be spread onto a label or a fieldset. The input cannot be replaced, because it holds the value, the identifier and the wiring. |
|
|
71
71
|
| `TextFieldAction` | `ComponentPropsWithRef<"button"> & { render? }` | type="button" | start, end | A button you place inside the frame. Every native prop reaches the button, and render replaces it. MenuTrigger, PopoverTrigger and TooltipTrigger pass their wiring to it through their own render. |
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
],
|
|
15
15
|
"variant": [
|
|
16
16
|
"outline",
|
|
17
|
-
"ghost"
|
|
17
|
+
"ghost",
|
|
18
|
+
"chips"
|
|
18
19
|
],
|
|
19
20
|
"orientation": [
|
|
20
21
|
"horizontal",
|
|
@@ -131,10 +132,10 @@
|
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
"name": "variant",
|
|
134
|
-
"type": "'outline' | 'ghost'",
|
|
135
|
+
"type": "'outline' | 'ghost' | 'chips'",
|
|
135
136
|
"defaultValue": "outline",
|
|
136
137
|
"appliesTo": "ToggleGroup",
|
|
137
|
-
"description": "Whether the bar draws its own edge. There is no tone axis: “on” is one colour across the system, and a bar that wants the whole palette is button-group around ToggleButtons"
|
|
138
|
+
"description": "Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one colour across the system, and a bar that wants the whole palette is button-group around ToggleButtons"
|
|
138
139
|
},
|
|
139
140
|
{
|
|
140
141
|
"name": "orientation",
|
|
@@ -292,9 +293,16 @@
|
|
|
292
293
|
"--slotted-focus-ring-color",
|
|
293
294
|
"--slotted-focus-ring-offset",
|
|
294
295
|
"--slotted-focus-ring-width",
|
|
296
|
+
"--slotted-font-weight-medium",
|
|
297
|
+
"--slotted-radius-full",
|
|
298
|
+
"--slotted-space-3",
|
|
295
299
|
"--slotted-text",
|
|
296
300
|
"--slotted-toggle-group-active-background",
|
|
297
301
|
"--slotted-toggle-group-border-color",
|
|
302
|
+
"--slotted-toggle-group-chips-gap",
|
|
303
|
+
"--slotted-toggle-group-chips-pressed-background",
|
|
304
|
+
"--slotted-toggle-group-chips-pressed-color",
|
|
305
|
+
"--slotted-toggle-group-chips-radius",
|
|
298
306
|
"--slotted-toggle-group-color",
|
|
299
307
|
"--slotted-toggle-group-disabled-border-color",
|
|
300
308
|
"--slotted-toggle-group-disabled-color",
|
|
@@ -310,6 +318,9 @@
|
|
|
310
318
|
"--slotted-tone-accent-subtle-active",
|
|
311
319
|
"--slotted-tone-accent-subtle-hover",
|
|
312
320
|
"--slotted-tone-accent-text",
|
|
321
|
+
"--slotted-tone-neutral-on-solid",
|
|
322
|
+
"--slotted-tone-neutral-solid",
|
|
323
|
+
"--slotted-tone-neutral-solid-hover",
|
|
313
324
|
"--slotted-tone-secondary-subtle-active",
|
|
314
325
|
"--slotted-tone-secondary-subtle-hover"
|
|
315
326
|
],
|
|
@@ -39,7 +39,7 @@ Excerpt — not a complete module
|
|
|
39
39
|
| `multiple` | `boolean` | false | ToggleGroup | Whether more than one item may be on at a time. The value stays an array either way, so both bindings hold one shape and a single-select consumer writes an array of one |
|
|
40
40
|
| `deselectable` | `boolean` | true | ToggleGroup | Whether the last item on may be turned off. Ignored while multiple is true, where a set may always empty |
|
|
41
41
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | ToggleGroup | The control step the bar and every item sit at. It reads the control scale, so the bar is as tall as the field beside it |
|
|
42
|
-
| `variant` | `'outline' \| 'ghost'` | outline | ToggleGroup | Whether the bar draws its own edge. There is no tone axis: “on” is one colour across the system, and a bar that wants the whole palette is button-group around ToggleButtons |
|
|
42
|
+
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | ToggleGroup | Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one colour across the system, and a bar that wants the whole palette is button-group around ToggleButtons |
|
|
43
43
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | ToggleGroup | How the items flow, and which pair of arrows moves focus. A vertical group writes aria-orientation |
|
|
44
44
|
| `attached` | `boolean` | true | ToggleGroup | Whether the items are joined into one bar or spaced apart. A joined bar overlaps its items by one border so a shared column holds one line |
|
|
45
45
|
| `fullWidth` | `boolean` | false | ToggleGroup | Whether the items share the whole line. Left alone the bar is as wide as its labels |
|
|
@@ -67,7 +67,7 @@ Excerpt — not a complete module
|
|
|
67
67
|
| Axis | Values | Default |
|
|
68
68
|
| --- | --- | --- |
|
|
69
69
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
70
|
-
| `variant` | `outline`, `ghost` | `outline` |
|
|
70
|
+
| `variant` | `outline`, `ghost`, `chips` | `outline` |
|
|
71
71
|
| `orientation` | `horizontal`, `vertical` | `horizontal` |
|
|
72
72
|
|
|
73
73
|
## Rules
|
|
@@ -81,7 +81,7 @@ Excerpt — not a complete module
|
|
|
81
81
|
|
|
82
82
|
## Tokens
|
|
83
83
|
|
|
84
|
-
`--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-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-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-text`, `--slotted-toggle-group-active-background`, `--slotted-toggle-group-border-color`, `--slotted-toggle-group-color`, `--slotted-toggle-group-disabled-border-color`, `--slotted-toggle-group-disabled-color`, `--slotted-toggle-group-disabled-pressed-background`, `--slotted-toggle-group-hover-background`, `--slotted-toggle-group-pressed-background`, `--slotted-toggle-group-pressed-border-color`, `--slotted-toggle-group-pressed-color`, `--slotted-toggle-group-pressed-hover-background`, `--slotted-toggle-group-radius`, `--slotted-toggle-group-shadow`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
84
|
+
`--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-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-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-weight-medium`, `--slotted-radius-full`, `--slotted-space-3`, `--slotted-text`, `--slotted-toggle-group-active-background`, `--slotted-toggle-group-border-color`, `--slotted-toggle-group-chips-gap`, `--slotted-toggle-group-chips-pressed-background`, `--slotted-toggle-group-chips-pressed-color`, `--slotted-toggle-group-chips-radius`, `--slotted-toggle-group-color`, `--slotted-toggle-group-disabled-border-color`, `--slotted-toggle-group-disabled-color`, `--slotted-toggle-group-disabled-pressed-background`, `--slotted-toggle-group-hover-background`, `--slotted-toggle-group-pressed-background`, `--slotted-toggle-group-pressed-border-color`, `--slotted-toggle-group-pressed-color`, `--slotted-toggle-group-pressed-hover-background`, `--slotted-toggle-group-radius`, `--slotted-toggle-group-shadow`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-neutral-on-solid`, `--slotted-tone-neutral-solid`, `--slotted-tone-neutral-solid-hover`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
85
85
|
|
|
86
86
|
## Examples
|
|
87
87
|
|
package/dist/docs/toggle.json
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
],
|
|
15
15
|
"variant": [
|
|
16
16
|
"outline",
|
|
17
|
-
"ghost"
|
|
17
|
+
"ghost",
|
|
18
|
+
"chips"
|
|
18
19
|
]
|
|
19
20
|
},
|
|
20
21
|
"members": {
|
|
@@ -99,10 +100,10 @@
|
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
102
|
"name": "variant",
|
|
102
|
-
"type": "'outline' | 'ghost'",
|
|
103
|
+
"type": "'outline' | 'ghost' | 'chips'",
|
|
103
104
|
"defaultValue": "outline",
|
|
104
105
|
"appliesTo": "Toggle",
|
|
105
|
-
"description": "Whether the control draws its own edge before it is on. There is no tone axis: a mode is one colour when it is on, and an action that persists in one of five tones is button’s ToggleButton"
|
|
106
|
+
"description": "Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one colour when it is on, and an action that persists in one of five tones is button’s ToggleButton"
|
|
106
107
|
},
|
|
107
108
|
{
|
|
108
109
|
"name": "icon",
|
|
@@ -217,9 +218,14 @@
|
|
|
217
218
|
"--slotted-focus-ring-color",
|
|
218
219
|
"--slotted-focus-ring-offset",
|
|
219
220
|
"--slotted-focus-ring-width",
|
|
221
|
+
"--slotted-font-weight-medium",
|
|
222
|
+
"--slotted-radius-full",
|
|
220
223
|
"--slotted-text",
|
|
221
224
|
"--slotted-toggle-active-background",
|
|
222
225
|
"--slotted-toggle-border-color",
|
|
226
|
+
"--slotted-toggle-chips-pressed-background",
|
|
227
|
+
"--slotted-toggle-chips-pressed-color",
|
|
228
|
+
"--slotted-toggle-chips-radius",
|
|
223
229
|
"--slotted-toggle-color",
|
|
224
230
|
"--slotted-toggle-disabled-border-color",
|
|
225
231
|
"--slotted-toggle-disabled-color",
|
|
@@ -235,6 +241,9 @@
|
|
|
235
241
|
"--slotted-tone-accent-subtle-active",
|
|
236
242
|
"--slotted-tone-accent-subtle-hover",
|
|
237
243
|
"--slotted-tone-accent-text",
|
|
244
|
+
"--slotted-tone-neutral-on-solid",
|
|
245
|
+
"--slotted-tone-neutral-solid",
|
|
246
|
+
"--slotted-tone-neutral-solid-hover",
|
|
238
247
|
"--slotted-tone-secondary-subtle-active",
|
|
239
248
|
"--slotted-tone-secondary-subtle-hover"
|
|
240
249
|
],
|
package/dist/docs/toggle.md
CHANGED
|
@@ -34,7 +34,7 @@ Excerpt — not a complete module
|
|
|
34
34
|
| `pressed` | `boolean` | — | Toggle | Present means the consumer owns the state, for the life of the component. Absent, the toggle owns it and starts from defaultPressed |
|
|
35
35
|
| `defaultPressed` | `boolean` | false | Toggle | What an uncontrolled toggle starts from, read once. A later change to it does not silently become new state |
|
|
36
36
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | Toggle | The control step. It reads the control scale, so the toggle is as tall as the field beside it |
|
|
37
|
-
| `variant` | `'outline' \| 'ghost'` | outline | Toggle | Whether the control draws its own edge before it is on. There is no tone axis: a mode is one colour when it is on, and an action that persists in one of five tones is button’s ToggleButton |
|
|
37
|
+
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | Toggle | Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one colour when it is on, and an action that persists in one of five tones is button’s ToggleButton |
|
|
38
38
|
| `icon` | `ReactNode` | — | Toggle | The mark drawn before the words, sized from the control glyph scale and hidden from the reading order. Alone, it makes the toggle square |
|
|
39
39
|
| `children` | `ReactNode` | — | Toggle | The words, which never change with the state. Absent, the toggle needs an aria-label |
|
|
40
40
|
| `disabled` | `boolean` | false | Toggle | The native attribute, which is also what makes the browser refuse focus. A toggle that is on and unavailable keeps saying both |
|
|
@@ -56,7 +56,7 @@ Excerpt — not a complete module
|
|
|
56
56
|
| Axis | Values | Default |
|
|
57
57
|
| --- | --- | --- |
|
|
58
58
|
| `size` | `sm`, `md`, `lg` | `md` |
|
|
59
|
-
| `variant` | `outline`, `ghost` | `outline` |
|
|
59
|
+
| `variant` | `outline`, `ghost`, `chips` | `outline` |
|
|
60
60
|
|
|
61
61
|
## Rules
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ Excerpt — not a complete module
|
|
|
68
68
|
|
|
69
69
|
## Tokens
|
|
70
70
|
|
|
71
|
-
`--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-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-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-text`, `--slotted-toggle-active-background`, `--slotted-toggle-border-color`, `--slotted-toggle-color`, `--slotted-toggle-disabled-border-color`, `--slotted-toggle-disabled-color`, `--slotted-toggle-disabled-pressed-background`, `--slotted-toggle-hover-background`, `--slotted-toggle-pressed-background`, `--slotted-toggle-pressed-border-color`, `--slotted-toggle-pressed-color`, `--slotted-toggle-pressed-hover-background`, `--slotted-toggle-radius`, `--slotted-toggle-shadow`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
71
|
+
`--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-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-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-instant`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-weight-medium`, `--slotted-radius-full`, `--slotted-text`, `--slotted-toggle-active-background`, `--slotted-toggle-border-color`, `--slotted-toggle-chips-pressed-background`, `--slotted-toggle-chips-pressed-color`, `--slotted-toggle-chips-radius`, `--slotted-toggle-color`, `--slotted-toggle-disabled-border-color`, `--slotted-toggle-disabled-color`, `--slotted-toggle-disabled-pressed-background`, `--slotted-toggle-hover-background`, `--slotted-toggle-pressed-background`, `--slotted-toggle-pressed-border-color`, `--slotted-toggle-pressed-color`, `--slotted-toggle-pressed-hover-background`, `--slotted-toggle-radius`, `--slotted-toggle-shadow`, `--slotted-tone-accent-border`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-neutral-on-solid`, `--slotted-tone-neutral-solid`, `--slotted-tone-neutral-solid-hover`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
72
72
|
|
|
73
73
|
## Examples
|
|
74
74
|
|
package/dist/docs/tokens.md
CHANGED
|
@@ -92,6 +92,15 @@ Names: --slotted-line-height-{step}
|
|
|
92
92
|
| `--slotted-line-height-3xl` | — | 1.3 |
|
|
93
93
|
| `--slotted-line-height-4xl` | — | 1.2 |
|
|
94
94
|
|
|
95
|
+
## letter-spacing
|
|
96
|
+
|
|
97
|
+
The tracking large type takes: the tight step at the md and lg display steps, the tighter step at 3xl and 4xl. Text at the body steps reads the face as drawn.
|
|
98
|
+
|
|
99
|
+
| Token | Meaning | Default value |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| `--slotted-letter-spacing-tight` | The tracking of a display figure or a wordmark at the md and lg font-size steps. | -0.02em |
|
|
102
|
+
| `--slotted-letter-spacing-tighter` | The tracking of a display figure at the 3xl and 4xl font-size steps. | -0.03em |
|
|
103
|
+
|
|
95
104
|
## font-weight
|
|
96
105
|
|
|
97
106
|
How much typographic emphasis text carries.
|
|
@@ -217,6 +226,10 @@ The grounds content stands on.
|
|
|
217
226
|
| `--slotted-surface-raised` | The ground of a surface above another: a popover, a menu, a dialog; paired with a step of `shadow`. | by scheme |
|
|
218
227
|
| `--slotted-surface-sunken` | The canvas under the content: the ground a card and a field stand out from. | by scheme |
|
|
219
228
|
| `--slotted-surface-inverse` | A ground in the opposite lightness, with `--slotted-text-inverse` on it. | by scheme |
|
|
229
|
+
| `--slotted-surface-inverse-hover` | The inverse ground under the pointer: `--slotted-surface-inverse` moved a share toward the opposite lightness. | by scheme |
|
|
230
|
+
| `--slotted-surface-inverse-active` | The inverse ground while pressed, a step beyond the hover. | by scheme |
|
|
231
|
+
| `--slotted-surface-material` | The ground of a bar that floats over scrolling content, drawn as a material: `--slotted-surface` at a partial share over transparency, behind `--slotted-material-backdrop`. Under `prefers-reduced-transparency: reduce` it is `--slotted-surface`, and under forced colours the Canvas system colour. | by scheme |
|
|
232
|
+
| `--slotted-material-backdrop` | The backdrop filter a material is drawn with: the content scrolling under it, saturated and blurred. Under `prefers-reduced-transparency: reduce` it is `none`. | saturate(1.6) blur(20px) |
|
|
220
233
|
|
|
221
234
|
## text
|
|
222
235
|
|
|
@@ -271,7 +284,7 @@ How small an interactive target may be.
|
|
|
271
284
|
|
|
272
285
|
## tone
|
|
273
286
|
|
|
274
|
-
What an element carrying an intent is painted with:
|
|
287
|
+
What an element carrying an intent is painted with: six tones, each with the same nine roles.
|
|
275
288
|
|
|
276
289
|
Names: --slotted-tone-{tone}-{role}
|
|
277
290
|
|
|
@@ -279,6 +292,7 @@ Names: --slotted-tone-{tone}-{role}
|
|
|
279
292
|
| --- | --- |
|
|
280
293
|
| accent | The product's intent: the primary action, the chosen option, the current place. |
|
|
281
294
|
| secondary | A second intent beside accent, for an action or a mark that must not compete with it. |
|
|
295
|
+
| neutral | Ink: the inverse surface as a fill and the text colour as a label, for a primary action in a product that keeps the accent for data. |
|
|
282
296
|
| success | A result that completed or a state that is healthy. |
|
|
283
297
|
| warning | A state that needs attention before it becomes a failure. |
|
|
284
298
|
| danger | A failure, an error or an action that destroys data. |
|
|
@@ -405,6 +419,16 @@ How the place the reader is on is marked.
|
|
|
405
419
|
| --- | --- | --- |
|
|
406
420
|
| `--slotted-current-edge` | The edge of the row the reader is on, drawn over its tone ground. | by scheme |
|
|
407
421
|
|
|
422
|
+
## state
|
|
423
|
+
|
|
424
|
+
Translucent layers laid over whatever surface an element stands on, so a hovered, pressed or selected row reads the same on the page and on a raised surface. Each is the scheme's text colour at a small share over transparency. Under forced colours every layer is the Canvas system colour: the state is carried by the system colours the family draws, Highlight for selection and an outline for focus.
|
|
425
|
+
|
|
426
|
+
| Token | Meaning | Default value |
|
|
427
|
+
| --- | --- | --- |
|
|
428
|
+
| `--slotted-state-hover` | The layer under the pointer. | by scheme |
|
|
429
|
+
| `--slotted-state-pressed` | The layer while the element is pressed; the strongest of the three. | by scheme |
|
|
430
|
+
| `--slotted-state-selected` | The layer of a selected or open element, between hover and pressed. | by scheme |
|
|
431
|
+
|
|
408
432
|
## scrim
|
|
409
433
|
|
|
410
434
|
The veil under a modal surface.
|