@slotted/react 0.1.0-beta.14 → 0.1.0-beta.16
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/{action-sheet-BAoaxbmI.js → action-sheet-dNnB26br.js} +20 -20
- package/dist/action-sheet.js +1 -1
- package/dist/{attachment-DKKiNUKe.js → attachment-C1wBuup6.js} +2 -0
- package/dist/attachment.js +1 -1
- package/dist/calendar-wqDIW4Z8.js +469 -0
- package/dist/calendar.js +1 -1
- package/dist/{column-manager-DMaWNyXs.js → column-manager-C8fN_mDy.js} +6 -6
- package/dist/column-manager.js +1 -1
- package/dist/dashboard-grid-ByThIV_n.js +1066 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-B5feiNsE.js → data-grid-aHlR2FHu.js} +4 -4
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-CUvUS2AX.js → data-list-Cu6LtnDX.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/{date-picker-Dys-z9mZ.js → date-picker-B5V8NZCT.js} +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-Cu95hHyO.js → date-range-picker-B89Q973N.js} +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-picker-B7eWKoN3.js → datetime-picker-Cx6Z52Ka.js} +1 -1
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-Cm42pY3M.js → datetime-range-picker-DYshAlgq.js} +1 -1
- package/dist/datetime-range-picker.js +1 -1
- package/dist/docs/calendar.json +19 -1
- package/dist/docs/calendar.md +3 -1
- package/dist/docs/dashboard-grid.json +26 -4
- package/dist/docs/dashboard-grid.md +5 -2
- package/dist/docs/drawer.examples.md +1 -1
- package/dist/docs/drawer.json +18 -7
- package/dist/docs/drawer.md +7 -6
- package/dist/docs/link.json +16 -0
- package/dist/docs/link.md +3 -1
- package/dist/docs/list-item.json +10 -2
- package/dist/docs/list-item.md +20 -13
- package/dist/docs/markdown.json +7 -0
- package/dist/docs/markdown.md +1 -0
- package/dist/docs/message-scroller.json +1 -1
- package/dist/docs/prompt-composer.json +9 -2
- package/dist/docs/prompt-composer.md +3 -1
- package/dist/drawer-Du1aC1px.js +830 -0
- package/dist/drawer.js +2 -2
- package/dist/{event-calendar-kX0aS8Pm.js → event-calendar-CEIyV-fW.js} +520 -520
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-B-Jk5sPq.js → filter-bar-BHzy0o7n.js} +8 -8
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-BIB7sRCl.js → import-export-center-BX1Bhj8c.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +124 -124
- package/dist/{link-rGL3Lr2t.js → link-YvD_Wov8.js} +23 -22
- package/dist/link.js +1 -1
- package/dist/list-item-2z75VYyp.js +160 -0
- package/dist/list-item.js +1 -1
- package/dist/markdown-gfrgwq6-.js +311 -0
- package/dist/markdown.js +1 -1
- package/dist/{prompt-composer-BDOi4rVK.js → prompt-composer-C57BzYrn.js} +109 -77
- package/dist/prompt-composer.js +2 -2
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/calendar.css +3 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/column-manager.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/dashboard-grid.css +3 -1
- package/dist/styles/data-grid.css +1 -1
- package/dist/styles/date-picker.css +3 -1
- package/dist/styles/date-range-picker.css +3 -1
- package/dist/styles/datetime-picker.css +3 -1
- package/dist/styles/datetime-range-picker.css +3 -1
- package/dist/styles/detail-panel.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +4 -2
- package/dist/styles/import-export-center.css +2 -2
- package/dist/styles/index.css +11 -11
- package/dist/styles/link.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/message.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/section.css +1 -1
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/table.css +2 -2
- package/dist/styles/upload.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-_xX87qua.js → table-BHuKvsgJ.js} +4 -4
- package/dist/table.js +1 -1
- package/dist/types/calendar/calendar.d.ts +2 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +11 -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/dashboard-grid/dashboard-grid.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +23 -3
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/dashboard-grid/index.d.ts +1 -1
- package/dist/types/dashboard-grid/index.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts +3 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer.types.d.ts +2 -0
- package/dist/types/drawer/drawer.types.d.ts.map +1 -1
- package/dist/types/drawer/index.d.ts +2 -2
- package/dist/types/drawer/index.d.ts.map +1 -1
- package/dist/types/link/index.d.ts +1 -1
- package/dist/types/link/index.d.ts.map +1 -1
- package/dist/types/link/link.d.ts +1 -1
- package/dist/types/link/link.d.ts.map +1 -1
- package/dist/types/link/link.types.d.ts +7 -0
- package/dist/types/link/link.types.d.ts.map +1 -1
- package/dist/types/list-item/list-item-content.d.ts +3 -3
- package/dist/types/list-item/list-item-content.d.ts.map +1 -1
- package/dist/types/list-item/list-item-nesting.d.ts +15 -0
- package/dist/types/list-item/list-item-nesting.d.ts.map +1 -0
- package/dist/types/list-item/list-item-parts.d.ts +3 -3
- package/dist/types/list-item/list-item-parts.d.ts.map +1 -1
- package/dist/types/markdown/markdown.d.ts +1 -1
- package/dist/types/markdown/markdown.d.ts.map +1 -1
- package/dist/types/markdown/markdown.types.d.ts +6 -1
- package/dist/types/markdown/markdown.types.d.ts.map +1 -1
- package/dist/types/prompt-composer/index.d.ts +2 -2
- package/dist/types/prompt-composer/index.d.ts.map +1 -1
- package/dist/types/prompt-composer/prompt-composer.d.ts +8 -1
- package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
- package/dist/types/prompt-composer/prompt-composer.types.d.ts +7 -1
- package/dist/types/prompt-composer/prompt-composer.types.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/calendar-DZx00W81.js +0 -457
- package/dist/dashboard-grid-B9-_lwn6.js +0 -1048
- package/dist/drawer-Pk4tqPUV.js +0 -819
- package/dist/list-item-CHaJYl5r.js +0 -125
- package/dist/markdown-B_lMpWz0.js +0 -306
package/dist/dashboard-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-ByThIV_n.js";
|
|
2
2
|
export { t as DASHBOARD_GRID_FALLBACK, i as DashboardGrid, e as DashboardGridDefaultsProvider, n as DashboardWidget, r as useDashboardGridDefaults, a as usePersistedDashboardLayout };
|
|
@@ -9,12 +9,12 @@ import { t as g } from "./text-field-CHYoral_.js";
|
|
|
9
9
|
import { a as _, d as ee, f as te, l as ne, r as re, t as ie } from "./popover-BfEn2wdZ.js";
|
|
10
10
|
import { t as v } from "./visually-hidden-BUSrFZ1_.js";
|
|
11
11
|
import { i as ae, n as oe, o as se, r as ce, t as le } from "./result-state-BMYhelu1.js";
|
|
12
|
-
import { t as ue } from "./date-picker-
|
|
12
|
+
import { t as ue } from "./date-picker-B5V8NZCT.js";
|
|
13
13
|
import { t as de } from "./date-field-EBPrQL6A.js";
|
|
14
|
-
import { t as fe } from "./date-range-picker-
|
|
15
|
-
import { t as pe } from "./datetime-picker-
|
|
14
|
+
import { t as fe } from "./date-range-picker-B89Q973N.js";
|
|
15
|
+
import { t as pe } from "./datetime-picker-Cx6Z52Ka.js";
|
|
16
16
|
import { t as me } from "./datetime-field-DavJbR0H.js";
|
|
17
|
-
import { t as he } from "./datetime-range-picker-
|
|
17
|
+
import { t as he } from "./datetime-range-picker-DYshAlgq.js";
|
|
18
18
|
import { a as ge, i as _e, n as ve, s as ye } from "./multi-select-C1GNk4e0.js";
|
|
19
19
|
import { t as be } from "./number-field-BPYe9kLB.js";
|
|
20
20
|
import { a as xe, t as Se } from "./segmented-control-B1U-s58C.js";
|
package/dist/data-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-aHlR2FHu.js";
|
|
2
2
|
export { e as DRAG_COLUMN, n as DataGrid, i as DataGridDefaultsProvider, r as EXPANDER_COLUMN, a as SELECTION_COLUMN, t as useDataGridDefaults, o as usePersistedGridView };
|
|
@@ -7,7 +7,7 @@ import { i as d, n as f } from "./skeleton-DeEOmm1y.js";
|
|
|
7
7
|
import { t as p } from "./visually-hidden-BUSrFZ1_.js";
|
|
8
8
|
import { n as m, o as ne, r as h, t as re } from "./result-state-BMYhelu1.js";
|
|
9
9
|
import { n as ie, r as ae } from "./list-B7gaPH1U.js";
|
|
10
|
-
import { a as oe, c as se, i as ce, n as le, o as ue, r as de, t as fe, u as pe } from "./list-item-
|
|
10
|
+
import { a as oe, c as se, i as ce, n as le, o as ue, r as de, t as fe, u as pe } from "./list-item-2z75VYyp.js";
|
|
11
11
|
import { withSelectorKey as me } from "@slotted/core/selector-key";
|
|
12
12
|
import { Fragment as he, createContext as ge, useContext as _e, useEffect as ve, useId as ye, useImperativeHandle as be, useLayoutEffect as xe, useMemo as Se, useRef as g, useState as _ } from "react";
|
|
13
13
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
package/dist/data-list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./data-list-
|
|
1
|
+
import { n as e, r as t, t as n } from "./data-list-Cu6LtnDX.js";
|
|
2
2
|
export { n as DataList, e as DataListDefaultsProvider, t as useDataListDefaults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { n as i, r as a, t as ee } from "./calendar-
|
|
3
|
+
import { n as i, r as a, t as ee } from "./calendar-wqDIW4Z8.js";
|
|
4
4
|
import { b as o } from "./field-CnSMUZw6.js";
|
|
5
5
|
import { t as te } from "./date-field-EBPrQL6A.js";
|
|
6
6
|
import { keyedProps as ne } from "@slotted/core/selector-key";
|
package/dist/date-picker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./date-picker-
|
|
1
|
+
import { n as e, r as t, t as n } from "./date-picker-B5V8NZCT.js";
|
|
2
2
|
export { n as DatePicker, e as DatePickerDefaultsProvider, t as useDatePickerDefaults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { i, t as a } from "./calendar-
|
|
3
|
+
import { i, t as a } from "./calendar-wqDIW4Z8.js";
|
|
4
4
|
import { b as ee } from "./field-CnSMUZw6.js";
|
|
5
5
|
import { t as o } from "./date-field-EBPrQL6A.js";
|
|
6
6
|
import { keyedProps as te } from "@slotted/core/selector-key";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./date-range-picker-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./date-range-picker-B89Q973N.js";
|
|
2
2
|
export { r as DateRangePicker, n as DateRangePickerDefaultsProvider, t as DateRangePickerPreset, e as useDateRangePickerDefaults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { t as i } from "./calendar-
|
|
3
|
+
import { t as i } from "./calendar-wqDIW4Z8.js";
|
|
4
4
|
import { b as ee } from "./field-CnSMUZw6.js";
|
|
5
5
|
import { t as te } from "./datetime-field-DavJbR0H.js";
|
|
6
6
|
import { keyedProps as ne } from "@slotted/core/selector-key";
|
package/dist/datetime-picker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./datetime-picker-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./datetime-picker-Cx6Z52Ka.js";
|
|
2
2
|
export { t as DATE_TIME_PICKER_MAX_OPTIONS, r as DateTimePicker, n as DateTimePickerDefaultsProvider, e as useDateTimePickerDefaults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { t as i } from "./calendar-
|
|
3
|
+
import { t as i } from "./calendar-wqDIW4Z8.js";
|
|
4
4
|
import { b as a } from "./field-CnSMUZw6.js";
|
|
5
5
|
import { t as o } from "./datetime-field-DavJbR0H.js";
|
|
6
6
|
import { keyedProps as s } from "@slotted/core/selector-key";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./datetime-range-picker-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./datetime-range-picker-DYshAlgq.js";
|
|
2
2
|
export { n as DATETIME_RANGE_PICKER_MAX_OPTIONS, e as DATETIME_RANGE_PICKER_MONTHS, a as DATETIME_RANGE_PICKER_STEP, c as DateTimeRangePicker, s as DateTimeRangePickerDefaultsProvider, i as DateTimeRangePickerPreset, t as dateTimeRangePickerLengthLabel, o as isSameDateTimeRange, r as useDateTimeRangePickerDefaults };
|
package/dist/docs/calendar.json
CHANGED
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"week-number",
|
|
87
87
|
"cell",
|
|
88
88
|
"day",
|
|
89
|
+
"mark",
|
|
89
90
|
"months",
|
|
90
91
|
"years",
|
|
91
92
|
"period"
|
|
@@ -182,6 +183,12 @@
|
|
|
182
183
|
"required": true,
|
|
183
184
|
"purpose": "The number the reader presses. It holds the roving tabindex, data-today, aria-selected and aria-disabled. It is the cell’s child rather than the cell itself because the range band runs edge to edge while the day stays a rounded box inside it."
|
|
184
185
|
},
|
|
186
|
+
{
|
|
187
|
+
"part": "mark",
|
|
188
|
+
"element": "span",
|
|
189
|
+
"required": false,
|
|
190
|
+
"purpose": "What falls on the day, drawn from marks: a dot in the row today’s dot reserves, in the mark’s tone, holding the visually hidden count that the day’s accessible name ends with."
|
|
191
|
+
},
|
|
185
192
|
{
|
|
186
193
|
"part": "months",
|
|
187
194
|
"element": "div",
|
|
@@ -307,6 +314,13 @@
|
|
|
307
314
|
"appliesTo": "Calendar",
|
|
308
315
|
"description": "What a day of the month either side does: drawn and not pressable, drawn and pressable, or not drawn."
|
|
309
316
|
},
|
|
317
|
+
{
|
|
318
|
+
"name": "marks",
|
|
319
|
+
"type": "ReadonlyMap<string, CalendarMark>",
|
|
320
|
+
"defaultValue": "—",
|
|
321
|
+
"appliesTo": "Calendar",
|
|
322
|
+
"description": "What falls on each day, keyed by its ISO date: a dot under the number in the mark’s tone, and its count in the day’s accessible name (“12, 2 items”). Composes with every selection mode, min, max and outsideDays."
|
|
323
|
+
},
|
|
310
324
|
{
|
|
311
325
|
"name": "locale",
|
|
312
326
|
"type": "string",
|
|
@@ -485,8 +499,12 @@
|
|
|
485
499
|
"--slotted-tone-accent-subtle-active",
|
|
486
500
|
"--slotted-tone-accent-subtle-hover",
|
|
487
501
|
"--slotted-tone-accent-text",
|
|
502
|
+
"--slotted-tone-danger-solid",
|
|
503
|
+
"--slotted-tone-info-solid",
|
|
488
504
|
"--slotted-tone-secondary-subtle-active",
|
|
489
|
-
"--slotted-tone-secondary-subtle-hover"
|
|
505
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
506
|
+
"--slotted-tone-success-solid",
|
|
507
|
+
"--slotted-tone-warning-solid"
|
|
490
508
|
],
|
|
491
509
|
"examples": [
|
|
492
510
|
{
|
package/dist/docs/calendar.md
CHANGED
|
@@ -35,6 +35,7 @@ Excerpt — not a complete module
|
|
|
35
35
|
| `week-number` | th | no |
|
|
36
36
|
| `cell` | td | yes |
|
|
37
37
|
| `day` | span | yes |
|
|
38
|
+
| `mark` | span | no |
|
|
38
39
|
| `months` | div | no |
|
|
39
40
|
| `years` | div | no |
|
|
40
41
|
| `period` | button | no |
|
|
@@ -58,6 +59,7 @@ Excerpt — not a complete module
|
|
|
58
59
|
| `weekNumbers` | `boolean` | false | Calendar | Draws the ISO 8601 week number as a row header. |
|
|
59
60
|
| `fixedWeeks` | `boolean` | false | Calendar | Always six rows, so paging does not change the surface’s height. Worth setting inside a popover. |
|
|
60
61
|
| `outsideDays` | `'shown' \| 'selectable' \| 'hidden'` | shown | Calendar | What a day of the month either side does: drawn and not pressable, drawn and pressable, or not drawn. |
|
|
62
|
+
| `marks` | `ReadonlyMap<string, CalendarMark>` | — | Calendar | What falls on each day, keyed by its ISO date: a dot under the number in the mark’s tone, and its count in the day’s accessible name (“12, 2 items”). Composes with every selection mode, min, max and outsideDays. |
|
|
61
63
|
| `locale` | `string` | the language in force | Calendar | BCP 47. Decides the month names, the weekday names and the day a week starts on. |
|
|
62
64
|
| `timeZone` | `string` | the runtime’s | Calendar | Which zone answers "what is today". |
|
|
63
65
|
| `firstDayOfWeek` | `number` | the locale’s | Calendar | 0 is Sunday. Overrides what the locale says, for a product that fixes one. |
|
|
@@ -102,7 +104,7 @@ Excerpt — not a complete module
|
|
|
102
104
|
|
|
103
105
|
## Tokens
|
|
104
106
|
|
|
105
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-calendar-active-background`, `--slotted-calendar-background`, `--slotted-calendar-cell-size`, `--slotted-calendar-color`, `--slotted-calendar-day-radius`, `--slotted-calendar-disabled-color`, `--slotted-calendar-hover-background`, `--slotted-calendar-in-range-color`, `--slotted-calendar-invalid-edge-width`, `--slotted-calendar-invalid-focus-ring-color`, `--slotted-calendar-outside-color`, `--slotted-calendar-preview-background`, `--slotted-calendar-preview-border-color`, `--slotted-calendar-radius`, `--slotted-calendar-range-active-background`, `--slotted-calendar-range-background`, `--slotted-calendar-range-border-color`, `--slotted-calendar-range-hover-background`, `--slotted-calendar-selected-background`, `--slotted-calendar-selected-color`, `--slotted-calendar-today-color`, `--slotted-calendar-trigger-color`, `--slotted-calendar-unavailable-color`, `--slotted-calendar-week-number-border-color`, `--slotted-calendar-week-number-color`, `--slotted-calendar-weekday-color`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-invalid-edge-width`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--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-highlight-tint-opacity`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
107
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-calendar-active-background`, `--slotted-calendar-background`, `--slotted-calendar-cell-size`, `--slotted-calendar-color`, `--slotted-calendar-day-radius`, `--slotted-calendar-disabled-color`, `--slotted-calendar-hover-background`, `--slotted-calendar-in-range-color`, `--slotted-calendar-invalid-edge-width`, `--slotted-calendar-invalid-focus-ring-color`, `--slotted-calendar-outside-color`, `--slotted-calendar-preview-background`, `--slotted-calendar-preview-border-color`, `--slotted-calendar-radius`, `--slotted-calendar-range-active-background`, `--slotted-calendar-range-background`, `--slotted-calendar-range-border-color`, `--slotted-calendar-range-hover-background`, `--slotted-calendar-selected-background`, `--slotted-calendar-selected-color`, `--slotted-calendar-today-color`, `--slotted-calendar-trigger-color`, `--slotted-calendar-unavailable-color`, `--slotted-calendar-week-number-border-color`, `--slotted-calendar-week-number-color`, `--slotted-calendar-weekday-color`, `--slotted-control-font-family`, `--slotted-control-font-size-md`, `--slotted-control-gap-md`, `--slotted-control-height-md`, `--slotted-control-icon-size-md`, `--slotted-control-invalid-edge-width`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-foreground`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--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-highlight-tint-opacity`, `--slotted-radius-full`, `--slotted-radius-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-on-solid`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-text`, `--slotted-tone-danger-solid`, `--slotted-tone-info-solid`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-success-solid`, `--slotted-tone-warning-solid`
|
|
106
108
|
|
|
107
109
|
## Examples
|
|
108
110
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
false
|
|
13
13
|
],
|
|
14
14
|
"headingLevel": [
|
|
15
|
+
"auto",
|
|
15
16
|
"2",
|
|
16
17
|
"3",
|
|
17
18
|
"4",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"defaults": {
|
|
31
32
|
"columns": 12,
|
|
32
33
|
"editBar": true,
|
|
33
|
-
"headingLevel": "
|
|
34
|
+
"headingLevel": "auto",
|
|
34
35
|
"editing": false,
|
|
35
36
|
"status": "ready",
|
|
36
37
|
"loading": false,
|
|
@@ -272,10 +273,17 @@
|
|
|
272
273
|
},
|
|
273
274
|
{
|
|
274
275
|
"name": "headingLevel",
|
|
275
|
-
"type": "2 | 3 | 4 | 5 | 6",
|
|
276
|
-
"defaultValue": "
|
|
276
|
+
"type": "'auto' | 2 | 3 | 4 | 5 | 6",
|
|
277
|
+
"defaultValue": "auto",
|
|
277
278
|
"appliesTo": "DashboardGrid, DashboardWidget, DashboardGridDefaultsProvider",
|
|
278
|
-
"description": "The level of each widget’s title"
|
|
279
|
+
"description": "The level of each widget’s title; auto is one rank under the heading around the grid — h2 in a page body, one deeper inside a section — and never above h2"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "expandedFrom",
|
|
283
|
+
"type": "number",
|
|
284
|
+
"defaultValue": "1024",
|
|
285
|
+
"appliesTo": "DashboardGrid",
|
|
286
|
+
"description": "The grid’s own width, in pixels, from which the expanded class applies; a grid beside a navigation rail keeps its layout with a lower value"
|
|
279
287
|
},
|
|
280
288
|
{
|
|
281
289
|
"name": "messages",
|
|
@@ -340,6 +348,13 @@
|
|
|
340
348
|
"appliesTo": "DashboardWidget",
|
|
341
349
|
"description": "Rows of a widget the layout does not name"
|
|
342
350
|
},
|
|
351
|
+
{
|
|
352
|
+
"name": "rows",
|
|
353
|
+
"type": "'auto'",
|
|
354
|
+
"defaultValue": "—",
|
|
355
|
+
"appliesTo": "DashboardWidget",
|
|
356
|
+
"description": "Draws the widget as many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum"
|
|
357
|
+
},
|
|
343
358
|
{
|
|
344
359
|
"name": "minColumns",
|
|
345
360
|
"type": "number",
|
|
@@ -438,6 +453,13 @@
|
|
|
438
453
|
"appliesTo": "DashboardWidget",
|
|
439
454
|
"description": "The widget’s own page, as a link in the corner"
|
|
440
455
|
},
|
|
456
|
+
{
|
|
457
|
+
"name": "renderDetail",
|
|
458
|
+
"type": "(props: DashboardDetailProps) => ReactElement",
|
|
459
|
+
"defaultValue": "—",
|
|
460
|
+
"appliesTo": "DashboardWidget",
|
|
461
|
+
"description": "Renders the detail link — a router’s link — from the props the family gives it, href included; spread them all on the element returned"
|
|
462
|
+
},
|
|
441
463
|
{
|
|
442
464
|
"name": "actions",
|
|
443
465
|
"type": "ReactNode",
|
|
@@ -75,7 +75,8 @@ const [editing, setEditing] = useState(false);
|
|
|
75
75
|
| `defaultEditing` | `boolean` | false | DashboardGrid | The uncontrolled mode, read once |
|
|
76
76
|
| `columns` | `number \| { expanded, medium, compact }` | 12 | DashboardGrid, DashboardGridDefaultsProvider | Columns from 1024 pixels of the grid’s width; below it the widgets flow in halves and wholes of half as many, and below 600 in one column |
|
|
77
77
|
| `editBar` | `boolean` | true | DashboardGrid, DashboardGridDefaultsProvider | Whether the family draws Add, Reset, Cancel and Done while editing |
|
|
78
|
-
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` |
|
|
78
|
+
| `headingLevel` | `'auto' \| 2 \| 3 \| 4 \| 5 \| 6` | auto | DashboardGrid, DashboardWidget, DashboardGridDefaultsProvider | The level of each widget’s title; auto is one rank under the heading around the grid — h2 in a page body, one deeper inside a section — and never above h2 |
|
|
79
|
+
| `expandedFrom` | `number` | 1024 | DashboardGrid | The grid’s own width, in pixels, from which the expanded class applies; a grid beside a navigation rail keeps its layout with a lower value |
|
|
79
80
|
| `messages` | `Partial<DashboardGridMessages>` | — | DashboardGrid | Words laid over the language in force, key by key: editBar, editStatus, add, reset, cancel, done, handle, detail, retry, emptyTitle, errorTitle, empty, emptyEditing, the eight menu items, hide, size, moved, movedInOrder, resized, hidden, shown, resetDone, cancelled |
|
|
80
81
|
| `ref` | `Ref<DashboardGridHandle>` | — | DashboardGrid | element, focusWidget(key), commitEditing(), cancelEditing() |
|
|
81
82
|
| `render` | `(props: DashboardGridRootProps) => ReactElement` | a div | DashboardGrid | Substitutes the root element |
|
|
@@ -85,6 +86,7 @@ const [editing, setEditing] = useState(false);
|
|
|
85
86
|
| `description` | `ReactNode` | — | DashboardWidget | The line under the title |
|
|
86
87
|
| `defaultColumns` | `number` | 4 | DashboardWidget | Expanded columns of a widget the layout does not name |
|
|
87
88
|
| `defaultRows` | `number` | 2 | DashboardWidget | Rows of a widget the layout does not name |
|
|
89
|
+
| `rows` | `'auto'` | — | DashboardWidget | Draws the widget as many rows as its content measures, within minRows and maxRows, and moves the widgets below; the stored rows, which a resize sets, stay the minimum |
|
|
88
90
|
| `minColumns` | `number` | 2 | DashboardWidget | The fewest expanded columns a resize leaves |
|
|
89
91
|
| `maxColumns` | `number` | columns | DashboardWidget | The most expanded columns a resize gives |
|
|
90
92
|
| `minRows` | `number` | 2 | DashboardWidget | The fewest rows a resize leaves |
|
|
@@ -99,6 +101,7 @@ const [editing, setEditing] = useState(false);
|
|
|
99
101
|
| `emptyTitle / emptyDescription / emptyAction` | `ReactNode` | messages.emptyTitle / — / — | DashboardWidget | The empty message and the action that creates the first entry |
|
|
100
102
|
| `errorTitle / errorDescription` | `ReactNode` | messages.errorTitle / — | DashboardWidget | The error message |
|
|
101
103
|
| `detailHref` | `string` | — | DashboardWidget | The widget’s own page, as a link in the corner |
|
|
104
|
+
| `renderDetail` | `(props: DashboardDetailProps) => ReactElement` | — | DashboardWidget | Renders the detail link — a router’s link — from the props the family gives it, href included; spread them all on the element returned |
|
|
102
105
|
| `actions` | `ReactNode` | — | DashboardWidget | The consumer’s controls in the header’s corner |
|
|
103
106
|
| `footer` | `ReactNode` | — | DashboardWidget | Content under the body |
|
|
104
107
|
| `fill / size` | `CardFill / CardSize` | outline / md | DashboardWidget | The card’s own axes |
|
|
@@ -121,7 +124,7 @@ const [editing, setEditing] = useState(false);
|
|
|
121
124
|
| Axis | Values | Default |
|
|
122
125
|
| --- | --- | --- |
|
|
123
126
|
| `editBar` | `true`, `false` | `true` |
|
|
124
|
-
| `headingLevel` | `2`, `3`, `4`, `5`, `6` | `
|
|
127
|
+
| `headingLevel` | `auto`, `2`, `3`, `4`, `5`, `6` | `auto` |
|
|
125
128
|
| `status` | `ready`, `empty`, `error` | `ready` |
|
|
126
129
|
|
|
127
130
|
## Rules
|
|
@@ -163,7 +163,7 @@ Excerpt — not a complete module
|
|
|
163
163
|
|
|
164
164
|
### A bottom sheet as a phone draws one
|
|
165
165
|
|
|
166
|
-
The sheet measures what it holds — the default size on top and bottom — stops at forty rems on a wide layer, and
|
|
166
|
+
The sheet measures what it holds — the default size on top and bottom — stops at forty rems on a wide layer, and is moved by the platform’s own scroll, so the finger, the fling and the landing on a stop run on the compositor. The sheet and its content are one scroll: pushing up lifts the sheet to the top of the screen and, without letting go, goes on through the list under the header, which sticks there; pulling down from the top of the list brings the sheet down. A fling out of the list stops at its top and never closes the sheet. A tap on the grabber walks the stops.
|
|
167
167
|
|
|
168
168
|
Example
|
|
169
169
|
|
package/dist/docs/drawer.json
CHANGED
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"grip",
|
|
103
103
|
"header",
|
|
104
104
|
"title",
|
|
105
|
+
"actions",
|
|
105
106
|
"description",
|
|
106
107
|
"body",
|
|
107
108
|
"footer",
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"docs": {
|
|
113
114
|
"drawer": {
|
|
114
115
|
"imports": {
|
|
115
|
-
"source": "import { Drawer, DrawerBody, DrawerClose, DrawerDefaultsProvider, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerResizer, DrawerTitle, DrawerTrigger } from '@slotted/react';"
|
|
116
|
+
"source": "import { Drawer, DrawerActions, DrawerBody, DrawerClose, DrawerDefaultsProvider, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerResizer, DrawerTitle, DrawerTrigger } from '@slotted/react';"
|
|
116
117
|
},
|
|
117
118
|
"anatomy": [
|
|
118
119
|
{
|
|
@@ -161,7 +162,13 @@
|
|
|
161
162
|
"part": "header",
|
|
162
163
|
"element": "header, or the element render returns",
|
|
163
164
|
"required": false,
|
|
164
|
-
"purpose": "Lays out the title and the description in one column and the close button in
|
|
165
|
+
"purpose": "Lays out the title and the description in one column, the actions in a second when they are rendered, and the close button in the last, so a title that wraps grows the row instead of moving the buttons."
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"part": "actions",
|
|
169
|
+
"element": "div, or the element render returns",
|
|
170
|
+
"required": false,
|
|
171
|
+
"purpose": "One or two actions beside the title, such as icon buttons for history and a new conversation, on the title’s row between the title and the close button. The buttons keep the size you give them."
|
|
165
172
|
},
|
|
166
173
|
{
|
|
167
174
|
"part": "title",
|
|
@@ -263,7 +270,7 @@
|
|
|
263
270
|
"type": "'sm' | 'md' | 'lg' | 'xl' | 'full' | 'content'",
|
|
264
271
|
"defaultValue": "content on top and bottom, md on start and end",
|
|
265
272
|
"appliesTo": "Drawer, DrawerDefaultsProvider",
|
|
266
|
-
"description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it."
|
|
273
|
+
"description": "The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. On a bottom sheet, full is the screen’s height and the footer rests at its bottom."
|
|
267
274
|
},
|
|
268
275
|
{
|
|
269
276
|
"name": "mount",
|
|
@@ -305,7 +312,7 @@
|
|
|
305
312
|
"type": "'panel' | 'resizer'",
|
|
306
313
|
"defaultValue": "panel",
|
|
307
314
|
"appliesTo": "Drawer, DrawerDefaultsProvider",
|
|
308
|
-
"description": "What a touch moves a bottom sheet by: panel, anywhere on the panel,
|
|
315
|
+
"description": "What a touch moves a bottom sheet by: panel, anywhere on the panel, the sheet and its content scrolling as one; or resizer, the separator only, the body scrolling on its own at the highest stop. A mouse drags the separator, and the sheet settles on the nearest stop."
|
|
309
316
|
},
|
|
310
317
|
{
|
|
311
318
|
"name": "scrimFrom",
|
|
@@ -422,7 +429,7 @@
|
|
|
422
429
|
{
|
|
423
430
|
"name": "onExtentChange",
|
|
424
431
|
"payload": "(extent: number | undefined, request: DrawerExtentRequest)",
|
|
425
|
-
"when": "Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a
|
|
432
|
+
"when": "Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a bottom sheet fires once its scroll comes to rest, with the stop it rests on. undefined means the panel is back on its size step, or on the height of its content under size=\"content\"."
|
|
426
433
|
},
|
|
427
434
|
{
|
|
428
435
|
"name": "onClick, onKeyDown, onPointerDown, on every part",
|
|
@@ -435,7 +442,7 @@
|
|
|
435
442
|
"Under mode=\"inline\" the panel has no role, because a navigation drawer is a navigation landmark and a filter panel is complementary; give it one with render. The trigger has no aria-haspopup there, because an inline drawer is a disclosure, not a popup.",
|
|
436
443
|
"aria-modal=\"true\" is written only while the drawer is modal, which is the only state in which the page behind is inert. modal is always false under mode=\"inline\".",
|
|
437
444
|
"The separator follows the WAI-ARIA window splitter pattern. The arrow keys move it in the direction they point, Home and End go to the limits, and Enter collapses the panel to its minimum and then restores it. Enter never closes the drawer; Escape does. The values are percentages, and there is no aria-valuetext, so a screen reader announces 40 rather than 40 per cent.",
|
|
438
|
-
"A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator.
|
|
445
|
+
"A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a scrolling region at its edge — a message list at its top — passes the pull on to the sheet, unless it sits inside data-drawer-drag=\"none\".",
|
|
439
446
|
"A closed panel is inert in both modes, so its controls are in neither the tab order nor the accessibility tree.",
|
|
440
447
|
"Focus moves into an overlay panel when it opens, to the first focusable element unless initialFocus names another, and returns on close to the element that had it before; if that element has left the document, focus goes to its nearest ancestor still in it. An inline drawer moves no focus when it opens, and on close restores focus only when focus is inside the panel or on the page body.",
|
|
441
448
|
"The ✕ button and the separator are each at least --slotted-target-min across, so both meet the WCAG 2.2 minimum target size of 24 by 24 pixels."
|
|
@@ -473,7 +480,11 @@
|
|
|
473
480
|
"--slotted-drawer-resizer-line-color",
|
|
474
481
|
"--slotted-drawer-rule-color",
|
|
475
482
|
"--slotted-drawer-scrim",
|
|
483
|
+
"--slotted-drawer-sheet-floor",
|
|
484
|
+
"--slotted-drawer-sheet-height",
|
|
476
485
|
"--slotted-drawer-sheet-inline-size",
|
|
486
|
+
"--slotted-drawer-slide-duration",
|
|
487
|
+
"--slotted-drawer-slide-exit-duration",
|
|
477
488
|
"--slotted-drawer-surface",
|
|
478
489
|
"--slotted-drawer-title-color",
|
|
479
490
|
"--slotted-drawer-title-font-family",
|
|
@@ -571,7 +582,7 @@
|
|
|
571
582
|
{
|
|
572
583
|
"id": "sheet",
|
|
573
584
|
"title": "A bottom sheet as a phone draws one",
|
|
574
|
-
"note": "The sheet measures what it holds — the default size on top and bottom — stops at forty rems on a wide layer, and
|
|
585
|
+
"note": "The sheet measures what it holds — the default size on top and bottom — stops at forty rems on a wide layer, and is moved by the platform’s own scroll, so the finger, the fling and the landing on a stop run on the compositor. The sheet and its content are one scroll: pushing up lifts the sheet to the top of the screen and, without letting go, goes on through the list under the header, which sticks there; pulling down from the top of the list brings the sheet down. A fling out of the list stops at its top and never closes the sheet. A tap on the grabber walks the stops.",
|
|
575
586
|
"language": "tsx",
|
|
576
587
|
"source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerPanel,\n DrawerResizer,\n DrawerTitle,\n DrawerTrigger,\n} from '@slotted/react/drawer';\nimport { FieldGroup, FieldGroupContent, FieldGroupLegend } from '@slotted/react/field-group';\nimport { Inline } from '@slotted/react/inline';\nimport { Radio, RadioGroup } from '@slotted/react/radio-group';\nimport { Text } from '@slotted/react/typography';\n\nconst WINDOWS = [\n { value: 'morning', label: 'Thursday 8 October, 8 AM to noon' },\n { value: 'afternoon', label: 'Thursday 8 October, 1 to 5 PM' },\n { value: 'friday', label: 'Friday 9 October, 8 AM to noon' },\n];\n\nexport default function DrawerSheet() {\n const [open, setOpen] = useState(false);\n const [pickup, setPickup] = useState('morning');\n const [draft, setDraft] = useState(pickup);\n\n return (\n <Inline align=\"center\" gap={3}>\n <Text size=\"sm\">Pickup: {WINDOWS.find((window) => window.value === pickup)?.label}</Text>\n <Drawer\n open={open}\n onOpenChange={(next) => {\n if (next) setDraft(pickup);\n setOpen(next);\n }}\n side=\"bottom\"\n >\n <DrawerTrigger\n render={(props) => (\n <Button {...props} size=\"sm\" tone=\"secondary\" variant=\"outline\">\n Reschedule\n </Button>\n )}\n />\n <DrawerPanel>\n <DrawerResizer />\n <DrawerHeader>\n <DrawerTitle>Reschedule pickup</DrawerTitle>\n <DrawerDescription>Shipment SH-4471, UPS Ground from Reno, NV.</DrawerDescription>\n <DrawerClose />\n </DrawerHeader>\n <DrawerBody>\n <FieldGroup>\n <FieldGroupLegend>Pickup window</FieldGroupLegend>\n <FieldGroupContent>\n <RadioGroup value={draft} onValueChange={setDraft}>\n {WINDOWS.map((window) => (\n <Radio key={window.value} value={window.value}>\n {window.label}\n </Radio>\n ))}\n </RadioGroup>\n </FieldGroupContent>\n </FieldGroup>\n </DrawerBody>\n <DrawerFooter>\n <Button variant=\"ghost\" tone=\"secondary\" onClick={() => setOpen(false)}>\n Cancel\n </Button>\n <Button\n onClick={() => {\n setPickup(draft);\n setOpen(false);\n }}\n >\n Reschedule\n </Button>\n </DrawerFooter>\n </DrawerPanel>\n </Drawer>\n </Inline>\n );\n}\n",
|
|
577
588
|
"verdict": "example"
|
package/dist/docs/drawer.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
## Import
|
|
7
7
|
|
|
8
8
|
```tsx
|
|
9
|
-
import { Drawer, DrawerBody, DrawerClose, DrawerDefaultsProvider, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerResizer, DrawerTitle, DrawerTrigger } from '@slotted/react';
|
|
9
|
+
import { Drawer, DrawerActions, DrawerBody, DrawerClose, DrawerDefaultsProvider, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerResizer, DrawerTitle, DrawerTrigger } from '@slotted/react';
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Minimal example
|
|
@@ -103,6 +103,7 @@ export default function DrawerBasic() {
|
|
|
103
103
|
| `line` | span | yes |
|
|
104
104
|
| `grip` | span[aria-hidden] | yes |
|
|
105
105
|
| `header` | header, or the element render returns | no |
|
|
106
|
+
| `actions` | div, or the element render returns | no |
|
|
106
107
|
| `title` | h2, or the element render returns | no |
|
|
107
108
|
| `description` | p, or the element render returns | no |
|
|
108
109
|
| `body` | div, or the element render returns | no |
|
|
@@ -122,13 +123,13 @@ export default function DrawerBasic() {
|
|
|
122
123
|
| `snapPoints` | `readonly number[]` | — | Drawer | The stops the measure moves between, as fractions. With them an arrow key moves to the next stop, Home and End go to the first and the last, and a drag is released onto the nearest. |
|
|
123
124
|
| `mode` | `'overlay' \| 'inline'` | overlay | Drawer, DrawerDefaultsProvider | overlay puts the drawer over the page, in a portal; inline puts it in your own layout. The value can change while the drawer is open, and the panel’s content and the state of its fields are kept across the change. |
|
|
124
125
|
| `side` | `'start' \| 'end' \| 'top' \| 'bottom'` | end | Drawer, DrawerDefaultsProvider | The edge the panel comes from. start and end follow the writing direction, so the drawer changes sides in a right-to-left document. |
|
|
125
|
-
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | content on top and bottom, md on start and end | Drawer, DrawerDefaultsProvider | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. |
|
|
126
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl' \| 'full' \| 'content'` | content on top and bottom, md on start and end | Drawer, DrawerDefaultsProvider | The panel’s measure at rest: one of the steps sm (18rem), md (24rem), lg (30rem), xl (40rem) and full, or content, which fits what the panel holds, up to 4rem short of the screen. A step wider than the screen is held to it. On a bottom sheet, full is the screen’s height and the footer rests at its bottom. |
|
|
126
127
|
| `mount` | `'active' \| 'lazy' \| 'eager'` | active | Drawer, DrawerDefaultsProvider | When an overlay layer is in the document: active only while it is open or closing, lazy from the first open on, and eager from the start, inert while closed. An inline drawer is always in the document. |
|
|
127
128
|
| `modal` | `boolean` | true | Drawer, DrawerDefaultsProvider | Whether the page behind is inert, its scroll is locked and focus is contained in the panel, and whether the panel carries aria-modal. The scrim is painted either way. Always false under mode="inline". |
|
|
128
129
|
| `escape` | `'close' \| 'none'` | close | Drawer, DrawerDefaultsProvider | Whether Escape asks to close the drawer. Escape reaches only the topmost layer, and a layer that refuses it does not pass it to the one below. |
|
|
129
130
|
| `outsidePress` | `'close' \| 'none'` | close | Drawer, DrawerDefaultsProvider | Whether a press outside the layer, the scrim included, asks to close the drawer. It has no effect under mode="inline". |
|
|
130
131
|
| `back` | `'close' \| 'none'` | close | Drawer, DrawerDefaultsProvider | Whether the browser’s back button or a phone’s back gesture closes a modal drawer instead of leaving the page. The drawer holds one history entry while it is open. It has no effect under mode="inline". |
|
|
131
|
-
| `drag` | `'panel' \| 'resizer'` | panel | Drawer, DrawerDefaultsProvider | What a touch moves a bottom sheet by: panel, anywhere on the panel,
|
|
132
|
+
| `drag` | `'panel' \| 'resizer'` | panel | Drawer, DrawerDefaultsProvider | What a touch moves a bottom sheet by: panel, anywhere on the panel, the sheet and its content scrolling as one; or resizer, the separator only, the body scrolling on its own at the highest stop. A mouse drags the separator, and the sheet settles on the nearest stop. |
|
|
132
133
|
| `scrimFrom` | `number` | 0 | Drawer | While the measure is below this fraction, the scrim is not painted, a press reaches the page, and the root carries data-undimmed. Use it with modal={false} and outsidePress="none". |
|
|
133
134
|
| `loading` | `boolean` | false | Drawer | Marks the body as busy with aria-busy and gives it a minimum height, so the panel does not jump when the content arrives. The header, the ✕, Escape and the separator stay available. |
|
|
134
135
|
| `messages` | `Partial<DrawerMessages>` | — | Drawer | Words laid over the current language, key by key: close, the name of the ✕. An aria-label on DrawerClose takes precedence. |
|
|
@@ -150,7 +151,7 @@ export default function DrawerBasic() {
|
|
|
150
151
|
| --- | --- | --- |
|
|
151
152
|
| `onOpenChange` | `(open: boolean, request: DrawerChangeRequest)` | Before the drawer opens or closes, for every way it can: the trigger, the ✕, Escape, a press outside, the back gesture and the handle. The request carries value, previous, reason (pointer, keyboard, dismiss, escape, outsidePress, back or programmatic), result, the source event and cancel(), which keeps the drawer as it is. |
|
|
152
153
|
| `onOpenChangeComplete` | `(open: boolean)` | After the entrance or the exit has ended: true once the drawer is settled open, false once it has left — the moment an application that renders the drawer conditionally removes it, so the exit runs. A drawer mounted open enters from its closed style, as one opened later does. |
|
|
153
|
-
| `onExtentChange` | `(extent: number \| undefined, request: DrawerExtentRequest)` | Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a
|
|
154
|
+
| `onExtentChange` | `(extent: number \| undefined, request: DrawerExtentRequest)` | Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a bottom sheet fires once its scroll comes to rest, with the stop it rests on. undefined means the panel is back on its size step, or on the height of its content under size="content". |
|
|
154
155
|
| `onClick, onKeyDown, onPointerDown, on every part` | `the element’s own events` | Whenever the element fires them. Your handler runs first, and preventDefault() in it cancels the drawer’s own behaviour for that event. |
|
|
155
156
|
|
|
156
157
|
## Axes and defaults
|
|
@@ -173,14 +174,14 @@ export default function DrawerBasic() {
|
|
|
173
174
|
- Under mode="inline" the panel has no role, because a navigation drawer is a navigation landmark and a filter panel is complementary; give it one with render. The trigger has no aria-haspopup there, because an inline drawer is a disclosure, not a popup.
|
|
174
175
|
- aria-modal="true" is written only while the drawer is modal, which is the only state in which the page behind is inert. modal is always false under mode="inline".
|
|
175
176
|
- The separator follows the WAI-ARIA window splitter pattern. The arrow keys move it in the direction they point, Home and End go to the limits, and Enter collapses the panel to its minimum and then restores it. Enter never closes the drawer; Escape does. The values are percentages, and there is no aria-valuetext, so a screen reader announces 40 rather than 40 per cent.
|
|
176
|
-
- A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator.
|
|
177
|
+
- A bottom sheet moves under a touch on its body as well as on its separator, and every stop a finger reaches, the height of the content among them, is also reachable with the arrow keys on the separator. It is moved by the page’s own scroll, so a control whose touch-action takes vertical movement keeps its gesture, and a scrolling region at its edge — a message list at its top — passes the pull on to the sheet, unless it sits inside data-drawer-drag="none".
|
|
177
178
|
- A closed panel is inert in both modes, so its controls are in neither the tab order nor the accessibility tree.
|
|
178
179
|
- Focus moves into an overlay panel when it opens, to the first focusable element unless initialFocus names another, and returns on close to the element that had it before; if that element has left the document, focus goes to its nearest ancestor still in it. An inline drawer moves no focus when it opens, and on close restores focus only when focus is inside the panel or on the page body.
|
|
179
180
|
- The ✕ button and the separator are each at least --slotted-target-min across, so both meet the WCAG 2.2 minimum target size of 24 by 24 pixels.
|
|
180
181
|
|
|
181
182
|
## Tokens
|
|
182
183
|
|
|
183
|
-
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-backdrop-filter`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-radius-expanded`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--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-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
|
|
184
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-icon-size-md`, `--slotted-control-inner-size-md`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-drawer-backdrop-filter`, `--slotted-drawer-body-color`, `--slotted-drawer-border-color`, `--slotted-drawer-close-active-background`, `--slotted-drawer-close-color`, `--slotted-drawer-close-hover-background`, `--slotted-drawer-color`, `--slotted-drawer-description-color`, `--slotted-drawer-extent`, `--slotted-drawer-extent-lg`, `--slotted-drawer-extent-md`, `--slotted-drawer-extent-sm`, `--slotted-drawer-extent-xl`, `--slotted-drawer-footer-surface`, `--slotted-drawer-radius`, `--slotted-drawer-radius-expanded`, `--slotted-drawer-resizer-line-active-color`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-rule-color`, `--slotted-drawer-scrim`, `--slotted-drawer-sheet-floor`, `--slotted-drawer-sheet-height`, `--slotted-drawer-sheet-inline-size`, `--slotted-drawer-slide-duration`, `--slotted-drawer-slide-exit-duration`, `--slotted-drawer-surface`, `--slotted-drawer-title-color`, `--slotted-drawer-title-font-family`, `--slotted-duration-instant`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--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-lg`, `--slotted-line-height-md`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-space-11`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-space-9`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-overlay`
|
|
184
185
|
|
|
185
186
|
## Examples
|
|
186
187
|
|
package/dist/docs/link.json
CHANGED
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
"summary": "Text link to another page or resource."
|
|
8
8
|
},
|
|
9
9
|
"axes": {
|
|
10
|
+
"size": [
|
|
11
|
+
"xs",
|
|
12
|
+
"sm",
|
|
13
|
+
"md"
|
|
14
|
+
],
|
|
10
15
|
"underline": [
|
|
11
16
|
"always",
|
|
12
17
|
"hover",
|
|
@@ -88,6 +93,13 @@
|
|
|
88
93
|
"appliesTo": "Link",
|
|
89
94
|
"description": "Accent, the colour of the surrounding text, or a solid surface"
|
|
90
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"name": "size",
|
|
98
|
+
"type": "'xs' | 'sm' | 'md'",
|
|
99
|
+
"defaultValue": "—",
|
|
100
|
+
"appliesTo": "Link",
|
|
101
|
+
"description": "The text size: 12, 13 or 14 pixels on the type scale. Unset, the link takes the size its action slot states — a stat card’s action, a section’s or a chart’s actions state sm — or else its parent’s"
|
|
102
|
+
},
|
|
91
103
|
{
|
|
92
104
|
"name": "external",
|
|
93
105
|
"type": "boolean",
|
|
@@ -174,6 +186,9 @@
|
|
|
174
186
|
"--slotted-easing-standard",
|
|
175
187
|
"--slotted-focus-ring-color",
|
|
176
188
|
"--slotted-focus-ring-width",
|
|
189
|
+
"--slotted-font-size-md",
|
|
190
|
+
"--slotted-font-size-sm",
|
|
191
|
+
"--slotted-font-size-xs",
|
|
177
192
|
"--slotted-link-color",
|
|
178
193
|
"--slotted-link-color-active",
|
|
179
194
|
"--slotted-link-color-current",
|
|
@@ -183,6 +198,7 @@
|
|
|
183
198
|
"--slotted-link-external-icon-gap",
|
|
184
199
|
"--slotted-link-external-icon-size",
|
|
185
200
|
"--slotted-link-focus-ring-offset",
|
|
201
|
+
"--slotted-link-font-size",
|
|
186
202
|
"--slotted-link-radius",
|
|
187
203
|
"--slotted-link-underline-color",
|
|
188
204
|
"--slotted-link-underline-offset",
|
package/dist/docs/link.md
CHANGED
|
@@ -33,6 +33,7 @@ Excerpt — not a complete module
|
|
|
33
33
|
| --- | --- | --- | --- | --- |
|
|
34
34
|
| `underline` | `'always' \| 'hover' \| 'none'` | always | Link | When the underline is drawn |
|
|
35
35
|
| `variant` | `'accent' \| 'neutral' \| 'inverse'` | accent | Link | Accent, the colour of the surrounding text, or a solid surface |
|
|
36
|
+
| `size` | `'xs' \| 'sm' \| 'md'` | — | Link | The text size: 12, 13 or 14 pixels on the type scale. Unset, the link takes the size its action slot states — a stat card’s action, a section’s or a chart’s actions state sm — or else its parent’s |
|
|
36
37
|
| `external` | `boolean` | false | Link | Opens a new tab and warns that it does |
|
|
37
38
|
| `messages` | `Partial<LinkMessages>` | — | Link | Words laid over the language in force: the wording of that warning (externalHint) |
|
|
38
39
|
| `disabled` | `boolean` | false | Link | Withholds the destination, keeps the role, the state and the tab stop |
|
|
@@ -47,6 +48,7 @@ Excerpt — not a complete module
|
|
|
47
48
|
|
|
48
49
|
| Axis | Values | Default |
|
|
49
50
|
| --- | --- | --- |
|
|
51
|
+
| `size` | `xs`, `sm`, `md` | — |
|
|
50
52
|
| `underline` | `always`, `hover`, `none` | `always` |
|
|
51
53
|
| `variant` | `accent`, `neutral`, `inverse` | `accent` |
|
|
52
54
|
|
|
@@ -63,7 +65,7 @@ Excerpt — not a complete module
|
|
|
63
65
|
|
|
64
66
|
## Tokens
|
|
65
67
|
|
|
66
|
-
`--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-link-color`, `--slotted-link-color-active`, `--slotted-link-color-current`, `--slotted-link-color-disabled`, `--slotted-link-color-hover`, `--slotted-link-color-visited`, `--slotted-link-external-icon-gap`, `--slotted-link-external-icon-size`, `--slotted-link-focus-ring-offset`, `--slotted-link-radius`, `--slotted-link-underline-color`, `--slotted-link-underline-offset`, `--slotted-link-underline-thickness`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-text`
|
|
68
|
+
`--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xs`, `--slotted-link-color`, `--slotted-link-color-active`, `--slotted-link-color-current`, `--slotted-link-color-disabled`, `--slotted-link-color-hover`, `--slotted-link-color-visited`, `--slotted-link-external-icon-gap`, `--slotted-link-external-icon-size`, `--slotted-link-focus-ring-offset`, `--slotted-link-font-size`, `--slotted-link-radius`, `--slotted-link-underline-color`, `--slotted-link-underline-offset`, `--slotted-link-underline-thickness`, `--slotted-text`, `--slotted-text-inverse`, `--slotted-text-muted`, `--slotted-tone-accent-text`
|
|
67
69
|
|
|
68
70
|
## Examples
|
|
69
71
|
|