@slotted/react 0.1.0-beta.0 → 0.1.0-beta.2

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.
Files changed (91) hide show
  1. package/README.md +4 -0
  2. package/dist/{action-sheet-D8Glxl7l.js → action-sheet-DgwzC3iY.js} +1 -1
  3. package/dist/action-sheet.js +1 -1
  4. package/dist/{chart-BNzfIfQe.js → chart-Gb_P3Kdq.js} +344 -333
  5. package/dist/chart.js +1 -1
  6. package/dist/{column-manager-CNZ7Xk5_.js → column-manager-B7_a_jDK.js} +1 -1
  7. package/dist/column-manager.js +1 -1
  8. package/dist/{combobox-C46GRqAA.js → combobox-C66dNlMR.js} +176 -172
  9. package/dist/combobox.js +1 -1
  10. package/dist/dashboard-grid-CKdyO4j6.js +1043 -0
  11. package/dist/dashboard-grid.js +1 -1
  12. package/dist/{data-grid-BUgOJuGp.js → data-grid-rWMDNl-6.js} +2 -2
  13. package/dist/data-grid.js +1 -1
  14. package/dist/docs/AGENTS.snippet.md +10 -0
  15. package/dist/docs/event-calendar.json +7 -0
  16. package/dist/docs/event-calendar.md +1 -0
  17. package/dist/docs/guidelines/README.md +27 -0
  18. package/dist/docs/guidelines/async-feedback.md +108 -0
  19. package/dist/docs/guidelines/browsing.md +74 -0
  20. package/dist/docs/guidelines/builders.md +97 -0
  21. package/dist/docs/guidelines/composition.md +129 -0
  22. package/dist/docs/guidelines/conversations.md +59 -0
  23. package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
  24. package/dist/docs/guidelines/forms.md +192 -0
  25. package/dist/docs/guidelines/index.md +121 -0
  26. package/dist/docs/guidelines/layout-alignment.md +95 -0
  27. package/dist/docs/guidelines/ledgers.md +45 -0
  28. package/dist/docs/guidelines/list-pages.md +165 -0
  29. package/dist/docs/guidelines/overviews.md +66 -0
  30. package/dist/docs/guidelines/own-elements.md +115 -0
  31. package/dist/docs/guidelines/reading-permissions.md +55 -0
  32. package/dist/docs/guidelines/record-pages.md +178 -0
  33. package/dist/docs/guidelines/reports.md +123 -0
  34. package/dist/docs/guidelines/shell-composition.md +94 -0
  35. package/dist/docs/guidelines/workspaces.md +46 -0
  36. package/dist/docs/index.md +12 -0
  37. package/dist/docs/progress-indicator.json +1 -2
  38. package/dist/docs/progress-indicator.md +2 -2
  39. package/dist/docs/skills/build-own-element/SKILL.md +90 -0
  40. package/dist/docs/skills/compose-screen/SKILL.md +76 -0
  41. package/dist/docs/skills/index.md +9 -0
  42. package/dist/docs/skills/review-screen/SKILL.md +70 -0
  43. package/dist/docs/skills/theme-app/SKILL.md +74 -0
  44. package/dist/docs/skills/waiting-states/SKILL.md +139 -0
  45. package/dist/docs/stat-card.json +1 -0
  46. package/dist/docs/stat-card.md +1 -1
  47. package/dist/docs/tabs.json +1 -4
  48. package/dist/docs/tabs.md +1 -1
  49. package/dist/docs/tokens.md +424 -0
  50. package/dist/{drawer-Ci3wuCVa.js → drawer-Dtospdqk.js} +1 -1
  51. package/dist/drawer.js +1 -1
  52. package/dist/{entity-picker-UGhbVwkC.js → entity-picker-Dm-y0RNE.js} +1 -1
  53. package/dist/entity-picker.js +1 -1
  54. package/dist/{event-calendar-BFdeGfC-.js → event-calendar-DYjVwTI6.js} +387 -386
  55. package/dist/event-calendar.js +1 -1
  56. package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-Bh7cbqDE.js} +3 -3
  57. package/dist/filter-bar.js +1 -1
  58. package/dist/{import-export-center-D8xbCLWs.js → import-export-center-CkZ_Ar9w.js} +1 -1
  59. package/dist/import-export-center.js +1 -1
  60. package/dist/index.js +14 -14
  61. package/dist/{multi-select-CfzsvAeI.js → multi-select-B-tuIwAu.js} +226 -231
  62. package/dist/multi-select.js +1 -1
  63. package/dist/{select-UTwKjheK.js → select-hRFp8nCj.js} +128 -141
  64. package/dist/select.js +1 -1
  65. package/dist/styles.css +1 -1
  66. package/dist/{table-CzBIw9ng.js → table-Bd79IwDC.js} +1 -1
  67. package/dist/table.js +1 -1
  68. package/dist/types/chart/chart.d.ts.map +1 -1
  69. package/dist/types/combobox/combobox-collection.d.ts +1 -0
  70. package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
  71. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  72. package/dist/types/combobox/combobox.d.ts.map +1 -1
  73. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  74. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  75. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  76. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  77. package/dist/types/event-calendar/event-calendar.d.ts +1 -1
  78. package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
  79. package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
  80. package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
  81. package/dist/types/menu/menu.types.d.ts +3 -1
  82. package/dist/types/menu/menu.types.d.ts.map +1 -1
  83. package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
  84. package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
  85. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  86. package/dist/types/multi-select/multi-select.d.ts.map +1 -1
  87. package/dist/types/select/select-collection.d.ts +0 -2
  88. package/dist/types/select/select-collection.d.ts.map +1 -1
  89. package/dist/types/select/select.d.ts.map +1 -1
  90. package/package.json +6 -6
  91. package/dist/dashboard-grid-nfhEewA4.js +0 -1005
@@ -0,0 +1,123 @@
1
+ ---
2
+ topic: reports
3
+ prefix: RE
4
+ triggers:
5
+ [
6
+ report,
7
+ analytics,
8
+ period,
9
+ comparison,
10
+ compare,
11
+ trend,
12
+ segment,
13
+ drill-down,
14
+ download,
15
+ csv,
16
+ anomaly,
17
+ annotation,
18
+ coverage,
19
+ history,
20
+ ranking,
21
+ ]
22
+ families: [page-header, select, stat-card, chart, table, list, section, inline-message]
23
+ ---
24
+
25
+ # Reports
26
+
27
+ How a screen that reads records over a chosen period is composed: what it
28
+ reads from the operational screens, how a period and its comparison are
29
+ chosen and kept, what it says where the records are not kept, how a figure
30
+ is flagged and how a breakdown is downloaded. The library gives `chart` a
31
+ period of data, `stat-card` a change and its base, `table` a summary row; it
32
+ does not say that a period lives in the address, that a figure the history
33
+ does not hold is no number, or which rule flags a figure.
34
+
35
+ ### RE-01 · A report reads a period; an overview reads today
36
+
37
+ Level: SHOULD
38
+ Applies to: a report that shows a state of today beside its period's flows — receivables, a backlog, stock on hand
39
+ Rule: A figure of the report is a flow over its period against a period of the same length; a state of today is read through the operational screen's own read, says "as of today", and opens the operational screen's door.
40
+ Why: Two reads of one state drift — a receivables figure computed twice says two numbers on two screens — and a state read beside a period reads as the period's.
41
+ Do: Read the overview's answer beside the report's and draw its figures from it, with the overview's door and the overview's thresholds; give the read a region of its own, so a failure of either leaves the other on screen.
42
+ Don't: Recompute an overview's figure inside the report, or draw a state of today without saying it is today's.
43
+ Check: Read each state of today on the report: it says "as of today", equals the figure of the operational screen it opens, and stays on screen when the report's own read fails.
44
+
45
+ ### RE-02 · The period is the address
46
+
47
+ Level: SHOULD
48
+ Applies to: the period, the comparison and the segment filters of a report
49
+ Rule: They are query parameters of the report's address; a report opened without them takes the ones last chosen on any report, and the back gesture from a list it opened returns to the same period.
50
+ Why: A period held in the page alone is lost on the way back from a drill-down, and a reader moving from one report to the next would choose it again on each.
51
+ Do: Write each choice into the address by replacing the current history entry, so a change of period is no step of the history and the back gesture leaves the report; remember the last choice for the next report opened without one.
52
+ Don't: Keep the period in a store the address does not name, or push a history entry per change.
53
+ Check: Choose a period, open a figure's list and go back: the report is on the same period. Open another report with no period in its address: it takes the period last chosen.
54
+
55
+ ### RE-03 · What the records do not cover is not a number
56
+
57
+ Level: MUST
58
+ Applies to: a period, a comparison or a measure whose records the backend does not keep for all of its days
59
+ Rule: The period control offers only the periods the report's records are kept for; a figure, a cell or a breakdown whose records start after its range says "not kept" and from when, and is never drawn as a number.
60
+ Why: A sum over the days that happen to be kept is a part drawn as a whole: a ninety-day ratio over thirty days of invoices read 84 days of sales outstanding where the book held about 35.
61
+ Do: State once, under the controls, from which day each kind of record is kept; leave a comparison that starts earlier as "kept from", and replace a breakdown that cannot be read with the sentence that says why and which period can.
62
+ Don't: Draw a zero, a dash or a short bar for days the history does not hold, or offer a period the report will answer with nothing.
63
+ Check: Choose the longest period offered: every figure whose records start after its range says "not kept" and from when, and the period control offers no period the records do not cover.
64
+
65
+ ### RE-04 · A change says its base
66
+
67
+ Level: SHOULD
68
+ Applies to: the change a `stat-card` draws against a comparison period
69
+ Rule: The comparison line names the value compared with and the period it belongs to; an amount and a count move by a percentage, a share by points, a duration in its own unit.
70
+ Why: "+7%" with no base is a number a reader cannot check, and a share that moves from 36% to 37% reads as a 3% rise when it is one point.
71
+ Do: Hand the card the change and write "vs $15.22M, the 30 days before" in its `comparison`, on one line cut with its title; tell the card from the measure which direction is good, so a rise in discounts or in days to ship reads as a fall in quality.
72
+ Don't: Draw a relative change of a share, or a change whose base period the page does not name.
73
+ Check: Read each card with a change: the base value and its period stand on its comparison line, and a share's change ends in "pts".
74
+
75
+ ### RE-05 · An anomaly says its rule
76
+
77
+ Level: SHOULD
78
+ Applies to: a figure or a bucket a report flags as unusual
79
+ Rule: A value is flagged only by a rule the page states in words, and the flag names the value, the range it fell in, the band it left and opens the records of that range.
80
+ Why: A flag with no rule is an opinion the reader cannot weigh, and a flag that fires on noise teaches the reader to ignore the flags.
81
+ Do: Flag a value outside the mean of its own history plus or minus two standard deviations — the six periods of the same length before it, or the earlier buckets of the period — and keep a count's band no narrower than its chance variation; state a threshold the product sets (OV-04) beside it as a second kind of flag.
82
+ Don't: Flag by a fixed number the screen chose for itself, or by a comparison with a single earlier period.
83
+ Check: Read each flag: the page states its rule in words, the flag names the value, its range and the band it left, and it opens the records of that range.
84
+
85
+ ### RE-06 · A report's filters stand in the header
86
+
87
+ Level: SHOULD
88
+ Applies to: the period, comparison and segment controls of a report
89
+ Rule: They stand in `page-header`'s `content`, under the header's `toggle` and `pin`; below 600 pixels the area opens collapsed, so the figures lead the screen.
90
+ Why: The header's area is the family's place for filters, and a pinned area keeps the period in sight over a long report; a block in the body scrolls away and, on a phone, filled the first screen before a single figure.
91
+ Do: Write the controls and the one sentence of what the records cover in the `content`, and let the `subheading` say the period on the title row, where it stays when the area collapses.
92
+ Don't: Put the controls as the first block of the body, or keep the area open on a phone.
93
+ Check: At 1280 pixels the controls stand in the header with the pin; at 390 pixels with a coarse pointer the first screen holds the figures and the collapsed area's toggle.
94
+
95
+ ### RE-07 · Every number of a report opens what it counts
96
+
97
+ Level: SHOULD
98
+ Applies to: a report's figures, the bars and points of its charts, and the cells of its tables
99
+ Rule: Each opens the list of the records it counts, with its condition and its period as the list's own pills and the same total, and a record named by its id is named in the pill by its record's words.
100
+ Why: A breakdown the reader cannot open is a claim, and a pill reading "Account is any of cus_000412" says nothing a reader can check.
101
+ Do: Carry the condition in the address, field by field, and the names of the records it names beside their ids; let the list read them into its bar as it reads any filter (OV-01).
102
+ Don't: Open the unfiltered list, a list whose total differs from the number, or a pill of raw ids.
103
+ Check: Open a figure, a bar and a cell: each list's pills name the condition and the period in words, and its total equals the number opened.
104
+
105
+ ### RE-08 · A ranking draws ten
106
+
107
+ Level: SHOULD
108
+ Applies to: a `horizontal` `chart` that ranks categories whose number grows with the period or the tenant — accounts, products, representatives
109
+ Rule: The chart draws at most the ten first categories and says so in its title; the table under it holds every row and its summary.
110
+ Why: Forty-four representatives drawn on one plot stacked their names into a column nobody could read.
111
+ Do: Rank in the answer, cut the chart's data at ten and keep the rest — or one "other" row — to the table; place the section whose table holds every row last, since the wait cannot know its length and its growth then moves nothing.
112
+ Don't: Grow the plot with the categories, or cut the table with the chart.
113
+ Check: Choose the longest period: the ranking chart holds at most ten bars and says so in its title, and its table holds every row and the summary.
114
+
115
+ ### RE-09 · A download is the table on screen
116
+
117
+ Level: SHOULD
118
+ Applies to: the file a report's section offers
119
+ Rule: The download is the section's table as the reader sees it — its columns, its rows and its summary row, in its words — built in the browser from the answer the page drew, for every reader of the report.
120
+ Why: A file built by another read can say other numbers than the screen, and a column the reader may not see on screen would reach them in the file.
121
+ Do: Offer "Download CSV" in the section's actions and write the file from the table's lines; name it by report, section and period.
122
+ Don't: Offer a server export the reader's permissions were not applied to, or a file of raw minor units the table does not show.
123
+ Check: Press Download CSV on a section: the file's rows are the table's rows and its summary, and a withheld column is absent from both.
@@ -0,0 +1,94 @@
1
+ ---
2
+ topic: shell composition
3
+ prefix: SC
4
+ triggers:
5
+ [
6
+ app-shell,
7
+ shell,
8
+ banner,
9
+ header bar,
10
+ top-navigation,
11
+ search,
12
+ command palette,
13
+ magnifier,
14
+ mobile,
15
+ narrow,
16
+ overlay,
17
+ drawer,
18
+ dialog,
19
+ layer,
20
+ host,
21
+ popover,
22
+ notification-center,
23
+ brand,
24
+ ]
25
+ families: [app-shell, top-navigation, command-palette, popover, drawer, dialog, notification-center]
26
+ ---
27
+
28
+ # Shell composition
29
+
30
+ How the application frame is put together from `app-shell`, the bar inside its
31
+ banner and the layers the bar opens. Each family states its own anatomy; the
32
+ seams between them — what stands in the search slot, what a component host
33
+ costs in a flex row, how wide a panel is when its content has no width — are
34
+ the consumer's to get right.
35
+
36
+ ### SC-01 · A palette trigger is not a search field
37
+
38
+ Level: MUST
39
+ Applies to: `top-navigation`'s `search` region when what stands in it opens a `command-palette` rather than filtering in place
40
+ Rule: Below the bar's medium step, the magnifier opens the palette directly; the search region is never expanded over the bar.
41
+ Why: The bar's fold is written for a text field — open the region, move focus to its input. A region holding a trigger button costs the reader a second press and shows a button beside a close control, aligned with nothing.
42
+ Do: Answer the bar's request to open the search by cancelling it and opening the palette. Above the step the region shows the trigger as it always did.
43
+ Don't: Let the region open, or hide the magnifier and leave a narrow bar with no way to the palette.
44
+ Check: At a width under the medium step, one press on the magnifier shows the palette and the bar does not carry the open-search state.
45
+
46
+ ### SC-02 · Layer hosts leave the banner's row
47
+
48
+ Level: MUST
49
+ Applies to: a consumer component placed inside `app-shell`'s `banner` whose only output is a layer — a palette, a drawer, a dialog
50
+ Rule: A component host inside the banner that draws no box of its own contributes no box to the banner's row.
51
+ Why: The banner is a flex row with a gap; an empty host is still a flex item and costs one gap, which is air on one end of the bar and not the other.
52
+ Do: Give such a host no box — the library's own layer hosts have none — or place the component outside the banner.
53
+ Don't: Leave a consumer host in the row because its content is portalled anyway.
54
+ Check: The bar's first and last controls stand the same distance from the frame's two edges.
55
+
56
+ ### SC-03 · A panel around a query container states its measure
57
+
58
+ Level: SHOULD
59
+ Applies to: a `popover` whose content is a family that is a container query — `notification-center`, any consumer region with inline-size containment
60
+ Rule: The consumer states the content's inline size, and its block cap, on the content; the popover's measure alone does not size it.
61
+ Why: A query container contributes no intrinsic width, so a panel sized to its content settles at the family's floor whatever the popover's measure says, and a panel with no cap runs to the bottom of the viewport.
62
+ Do: Size the content to the popover's measure less the layer's own gap, bounded by the viewport on a phone, and cap its block size so the family's scrolling part scrolls.
63
+ Don't: Retune the popover's measure and expect a query container to grow into it.
64
+ Check: The panel is as wide as the popover's measure allows and no taller than the stated cap; the feed scrolls inside it.
65
+
66
+ ### SC-04 · The search slot stands one space step off the brand
67
+
68
+ Level: SHOULD
69
+ Applies to: `top-navigation`'s `search` region when nothing — no context, no destinations — stands between it and `brand`
70
+ Rule: The search region carries one space step of leading margin beyond the bar's own gap.
71
+ Why: The bar's gap is the air between the mark and the wordmark; a bordered field at that distance reads as a third part of the brand.
72
+ Do: Add one space step at the region's start. When the region takes the whole bar below the medium step it has its own inset and the margin does not apply.
73
+ Don't: Widen the bar's gap, which also moves the actions apart.
74
+ Check: The field's left edge stands one space step further from the wordmark than the wordmark stands from the mark.
75
+
76
+ ### SC-05 · A phone's bar holds five controls
77
+
78
+ Level: SHOULD
79
+ Applies to: what a consumer places in `top-navigation`'s `actions` — `action` controls of the product's own, beside the family's bell, help and account
80
+ Rule: Below the bar's high step the actions hold the search toggle, the bell, the help and the account; a product's own `action` leaves the bar and stays reachable from the navigation column or the palette.
81
+ Why: On a touch screen every control is a 44-pixel target; nine of them with the mark and the shell's toggle are wider than a phone, and the family folds none of a consumer's actions.
82
+ Do: Hide the product's own actions under the bar's own container query at the high step, and keep each one a destination in the column or a command in the palette.
83
+ Don't: Keep every action in the bar and let the cluster overflow, or shrink the controls under the touch target.
84
+ Check: At 390px with a coarse pointer, the bar's first and last controls are whole and no control overlaps another.
85
+
86
+ ### SC-06 · No key legends where there are no keys
87
+
88
+ Level: SHOULD
89
+ Applies to: a `kbd` or `shortcut` drawn as a hint beside a control — the search trigger's hotkey, a menu item's shortcut, a footer of hints
90
+ Rule: Where the primary input is a touch screen — `(hover: none) and (pointer: coarse)` — a shortcut drawn as a hint is not shown.
91
+ Why: The legend names a key the reader has no way to press; on a phone it is noise beside the control it decorates.
92
+ Do: Hide the hint under the media query. Keep a `kbd` that is content — a settings page listing the application's shortcuts — because it documents rather than hints.
93
+ Don't: Hide the control the hint stands beside, or key the rule on width: a narrow window on a laptop still has a keyboard.
94
+ Check: On a touch screen the search trigger shows the magnifier and the words alone, and the palette's footer is absent.
@@ -0,0 +1,46 @@
1
+ ---
2
+ topic: workspaces
3
+ prefix: WS
4
+ triggers:
5
+ [
6
+ workspace,
7
+ reconciliation,
8
+ match,
9
+ candidate,
10
+ confidence,
11
+ score,
12
+ queue,
13
+ three columns,
14
+ dense,
15
+ phone,
16
+ ]
17
+ families: [detail-panel, list, list-item, table, filter-bar, scroll-area, tag]
18
+ ---
19
+
20
+ # Workspaces
21
+
22
+ How a dense screen that works a queue against candidates is composed: what a
23
+ phone keeps of its regions, and how a machine's score is put before a person
24
+ who confirms it. The library gives `detail-panel` a main column and an aside,
25
+ `list` rows that lead somewhere and `table` a summary row; it does not say
26
+ how three regions become one on a phone, or that a score is shown taken apart.
27
+
28
+ ### WS-01 · A phone reads one region at a time
29
+
30
+ Level: SHOULD
31
+ Applies to: a workspace of three regions — a queue, the record opened from it, and what the record is matched against
32
+ Rule: Below 600 pixels the workspace shows the queue, and opening a row goes to the row's own address, where the record's page holds the other two regions, the third under the second; the back gesture returns to the queue.
33
+ Why: Three columns in 390 pixels are three columns nobody can read, and a region hidden on a phone is work a phone reader cannot finish.
34
+ Do: Make the opened record a place in the address at every width, so the selection is a link and the back gesture walks it back. From 600 pixels keep the queue beside the record and draw the record as a `detail-panel` whose `aside` is the third region, so the family decides whether it stands beside or under. Drop nothing: the phone reaches every region, one at a time.
35
+ Don't: Scroll the workspace sideways, hide the third region on a phone, or keep the selection in the page's state alone.
36
+ Check: At 390 pixels, open a row of the queue: the address changes, the record and the third region stand one under the other with no sideways scroll, and the back gesture returns to the queue.
37
+
38
+ ### WS-02 · A score that decides is taken apart
39
+
40
+ Level: SHOULD
41
+ Applies to: a score a person confirms or refuses — a match confidence, a risk rating the reader acts on
42
+ Rule: The score is shown as a table of its criteria, each with the points it earned or none of its points, ending in the summary row that adds back up to the score and says where a cap applies, and its band is one mark beside one sentence giving the thresholds.
43
+ Why: A number or a band alone asks the reader to trust the machine, and a confirmation given on trust is the one a person was asked to give.
44
+ Do: Map each criterion the backend reports to its points, draw the ones the candidate did not earn as "0 of N", sum them in the table's `summary` (RP-07), and state the bands once ("high from 85, medium from 60"). Say the difference between the two compared amounts beside the command that confirms.
45
+ Don't: Show the band twice at two weights (CP-06), or put the reasons in a tooltip.
46
+ Check: Read one score: its criteria rows add up to the summary row, the summary equals the score or names its cap, and the band is stated once with its thresholds.
@@ -139,3 +139,15 @@ Each family is documented in `./<family>.md`.
139
139
  - splitter: Resizable panes divided by a handle.
140
140
  - stack: Column of items with a gap.
141
141
  - visually-hidden: Hides content visually, keeps it for readers.
142
+
143
+ ## Tokens
144
+
145
+ What each theme token is for, with its default value: `./tokens.md`.
146
+
147
+ ## Guidelines
148
+
149
+ Rules for composing screens from these families: `./guidelines/index.md`. Read it before writing a screen.
150
+
151
+ ## Skills
152
+
153
+ Procedures for whole tasks, each with when it applies: `./skills/index.md`.
@@ -330,7 +330,6 @@
330
330
  "--slotted-progress-indicator-wave-phase",
331
331
  "--slotted-radius-full",
332
332
  "--slotted-radius-none",
333
- "--slotted-space-1",
334
333
  "--slotted-space-2",
335
334
  "--slotted-space-3",
336
335
  "--slotted-space-4",
@@ -419,7 +418,7 @@
419
418
  {
420
419
  "id": "waveSizes",
421
420
  "title": "The wave is measured in thicknesses",
422
- "note": "One wavelength is ten thicknesses and a crest is three quarters of one at every size, so the small bar’s wave is twenty pixels long and the large bar’s eighty. Every ring carries eight crests, because the wave is wound on the viewBox and the viewBox scales.",
421
+ "note": "One wavelength is ten thicknesses and a crest is three quarters of one at every size, so the small bar’s wave is forty pixels long and the large bar’s eighty. Every ring carries eight crests, because the wave is wound on the viewBox and the viewBox scales.",
423
422
  "language": "tsx",
424
423
  "source": "<ProgressBar label=\"Small\" size=\"sm\" value={55} wave />;\n<ProgressBar label=\"Large\" size=\"lg\" value={55} wave />;\n<ProgressCircle label=\"Saving\" size=\"lg\" value={55} wave />;\n",
425
424
  "verdict": "excerpt"
@@ -82,7 +82,7 @@ Excerpt — not a complete module
82
82
 
83
83
  ## Tokens
84
84
 
85
- `--slotted-border-strong`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-duration-long`, `--slotted-duration-loop`, `--slotted-duration-loop-slow`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-emphasized`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-line-height-md`, `--slotted-progress-indicator-buffer-color`, `--slotted-progress-indicator-buffer-percent`, `--slotted-progress-indicator-gap`, `--slotted-progress-indicator-indicator-color`, `--slotted-progress-indicator-percent`, `--slotted-progress-indicator-position`, `--slotted-progress-indicator-radius`, `--slotted-progress-indicator-size`, `--slotted-progress-indicator-stroke`, `--slotted-progress-indicator-thickness`, `--slotted-progress-indicator-track-color`, `--slotted-progress-indicator-travel-size`, `--slotted-progress-indicator-travel-start`, `--slotted-progress-indicator-wave-amplitude`, `--slotted-progress-indicator-wave-phase`, `--slotted-radius-full`, `--slotted-radius-none`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-sticky`
85
+ `--slotted-border-strong`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-duration-long`, `--slotted-duration-loop`, `--slotted-duration-loop-slow`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-emphasized`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-line-height-md`, `--slotted-progress-indicator-buffer-color`, `--slotted-progress-indicator-buffer-percent`, `--slotted-progress-indicator-gap`, `--slotted-progress-indicator-indicator-color`, `--slotted-progress-indicator-percent`, `--slotted-progress-indicator-position`, `--slotted-progress-indicator-radius`, `--slotted-progress-indicator-size`, `--slotted-progress-indicator-stroke`, `--slotted-progress-indicator-thickness`, `--slotted-progress-indicator-track-color`, `--slotted-progress-indicator-travel-size`, `--slotted-progress-indicator-travel-start`, `--slotted-progress-indicator-wave-amplitude`, `--slotted-progress-indicator-wave-phase`, `--slotted-radius-full`, `--slotted-radius-none`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-sticky`
86
86
 
87
87
  ## Examples
88
88
 
@@ -191,7 +191,7 @@ Excerpt — not a complete module
191
191
 
192
192
  ### The wave is measured in thicknesses
193
193
 
194
- One wavelength is ten thicknesses and a crest is three quarters of one at every size, so the small bar’s wave is twenty pixels long and the large bar’s eighty. Every ring carries eight crests, because the wave is wound on the viewBox and the viewBox scales.
194
+ One wavelength is ten thicknesses and a crest is three quarters of one at every size, so the small bar’s wave is forty pixels long and the large bar’s eighty. Every ring carries eight crests, because the wave is wound on the viewBox and the viewBox scales.
195
195
 
196
196
  Excerpt — not a complete module
197
197
 
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: build-own-element
3
+ description: Use when writing a component, widget or visual element that no family of @slotted/react draws — a timeline strip, a seat map, a heat grid, a bespoke control. Proves first that no family answers, then builds the element from the theme's tokens with the states, focus, target size, forced colours and motion the families keep.
4
+ ---
5
+
6
+ # Build an element of the application's own
7
+
8
+ An element of the application's own is a node the application writes and
9
+ styles itself, outside any family (CP-04). It is the last resort, and it is
10
+ built from the same theme as the families beside it.
11
+
12
+ ## 1. Prove that no family answers
13
+
14
+ 1. Read `node_modules/@slotted/react/dist/docs/index.md` and list the families whose line is near the
15
+ element.
16
+ 2. Read `node_modules/@slotted/react/dist/docs/<family>.md` for each: its anatomy, its slots, its axes.
17
+ When a family draws the element, or names a slot that holds it, the family
18
+ is used (CP-01).
19
+ 3. When a family draws a part of the element — a toggle, a popup, a list, a
20
+ tooltip — that part is the family, and only the rest is written.
21
+ 4. Write, in a comment above the element, the families read and what each
22
+ lacks.
23
+
24
+ ## 2. What is free and what is fixed
25
+
26
+ Free, decided by the problem:
27
+
28
+ - the element's shape, its arrangement and how it encodes the data — a strip,
29
+ a grid, a ring, a map;
30
+ - which states it has, and what each state shows;
31
+ - its layout inside the box it is given.
32
+
33
+ Fixed, read from the theme:
34
+
35
+ - every value it paints comes from a token of the group
36
+ `node_modules/@slotted/react/dist/docs/tokens.md` lists for that decision (OE-01, CP-05);
37
+ - a tone carries the meaning the `tone` group gives it, and a data series takes
38
+ the `data` slots in order;
39
+ - how its states yield, how focus is drawn, how large a target is, what forced
40
+ colours keep and how it moves (OE-02 to OE-07).
41
+
42
+ A new appearance is a new combination of tokens, never a new value.
43
+
44
+ ## 3. Map each decision to a group
45
+
46
+ | Decision | Group in `node_modules/@slotted/react/dist/docs/tokens.md` |
47
+ | ---------------------------------------------- | --------------------------------------------------- |
48
+ | Distance between parts, inner padding | `space` |
49
+ | Corners | `radius` |
50
+ | Ground of the element and its parts | `surface`; `tone` when the ground carries an intent |
51
+ | Text | `text`, `font-size`, `font-weight`, `line-height` |
52
+ | Edges | `border`, `border-width` |
53
+ | Series and categories of data | `data` |
54
+ | The place the reader is on, a matched span | `current`, `highlight` |
55
+ | Focus | `focus-ring` |
56
+ | Hit area | `target` |
57
+ | A part that stands beside controls | `control`, `control-size` |
58
+ | Movement | `duration`, `easing` |
59
+ | A surface above another, a layer over the page | `shadow`, `z-index` |
60
+ | A disabled part | `disabled` |
61
+
62
+ A decision no group names is written as a literal beside a comment that says
63
+ why no token covers it (CP-05).
64
+
65
+ ## 4. Write it
66
+
67
+ 1. Give each interactive part the native element that carries its role: a
68
+ button for an action, a link for a destination, an input for a value. Add
69
+ ARIA only where no element carries the role.
70
+ 2. List the element's states, and paint each pair that can hold at once in the
71
+ order of OE-02.
72
+ 3. Draw focus on `:focus-visible` as an outline of `--slotted-focus-ring-width`
73
+ in `--slotted-focus-ring-color`, offset by `--slotted-focus-ring-offset`
74
+ (OE-03). Size every target to `--slotted-target-min` (OE-04), and take the
75
+ control step of the controls beside it (OE-05).
76
+ 4. Under `forced-colors: active`, tell each state from rest by a border,
77
+ an outline or text (OE-06). Move with the motion tokens, and stop a
78
+ repeating animation under `prefers-reduced-motion: reduce` (OE-07).
79
+ 5. Write the CSS in a layer of the application after the library's, on class
80
+ names of the element's own (OE-08). Reflow by a container query on a
81
+ container of its own (OE-09). Float with a raised surface and one shadow
82
+ step (OE-10).
83
+ 6. Text that stands alone takes its size from the `typography` family (CP-02).
84
+
85
+ ## 5. Done
86
+
87
+ 1. Each `Check` of `node_modules/@slotted/react/dist/docs/guidelines/own-elements.md` passes.
88
+ 2. The element's CSS holds no colour or length literal without its comment.
89
+ 3. Every custom property the element reads is listed in
90
+ `node_modules/@slotted/react/dist/docs/tokens.md` above "Read by their family only".
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: compose-screen
3
+ description: Use when writing or changing a screen of an application built with @slotted/react — a list of records, the page of one record, a form that writes one, an overview, a report, a tree beside a list, a rule builder, a conversation or a ledger. Applies the Slotted guidelines in order and ends with each Check of the rules read.
4
+ ---
5
+
6
+ # Compose a screen
7
+
8
+ A screen is composed from the families' own parts first. An element of the
9
+ screen's own exists only where no family names a place for it.
10
+
11
+ ## 1. Classify the screen
12
+
13
+ | The screen | Topic |
14
+ | ----------------------------------------------------- | ------------------ |
15
+ | Lists records, searches, filters, pages | `list-pages.md` |
16
+ | Shows one record, its figures and its related records | `record-pages.md` |
17
+ | Creates or edits a record | `forms.md` |
18
+ | Summarises a domain in figures and charts | `overviews.md` |
19
+ | Places a list beside a tree of its places | `browsing.md` |
20
+ | Reads records over a chosen period | `reports.md` |
21
+ | Writes or reads a rule the system runs later | `builders.md` |
22
+ | Holds a conversation the reader answers | `conversations.md` |
23
+ | Works a queue against candidates in three regions | `workspaces.md` |
24
+ | Lists immutable changes with their cause and balance | `ledgers.md` |
25
+
26
+ A screen can be two of these: a record with an edit form in place reads both
27
+ topics.
28
+
29
+ ## 2. Read
30
+
31
+ 1. `node_modules/@slotted/react/dist/docs/guidelines/index.md`.
32
+ 2. `node_modules/@slotted/react/dist/docs/guidelines/composition.md`, always.
33
+ 3. The topic of step 1. Add `layout-alignment.md` and `shell-composition.md`
34
+ when the screen places controls in a row or in the application frame.
35
+ 4. Add `errors-and-conflicts.md` and `reading-permissions.md` when the screen
36
+ writes data or reads under a role.
37
+ 5. When the screen writes an element of its own, follow
38
+ `node_modules/@slotted/react/dist/docs/skills/build-own-element/SKILL.md`.
39
+
40
+ ## 3. Read each family before writing beside it
41
+
42
+ For each family the screen uses, read `node_modules/@slotted/react/dist/docs/<family>.md` — its anatomy,
43
+ its slots, its axes (CP-01). When the family names a slot for an element, the
44
+ element stands in that slot.
45
+
46
+ ## 4. Compose
47
+
48
+ - The page's width follows its type: a list is `bleed` with `fill`; a record,
49
+ a dashboard and an overview keep `wide`; a create or edit form is `content`;
50
+ preferences read as prose are `measure` (CP-07).
51
+ - Siblings of the screen's own stand in `inline` (one row) or `stack` (one
52
+ column) with a gap from the space scale; text of the screen's own takes its
53
+ size from the `typography` family's `text` member (CP-02).
54
+ - A track that holds a family which scrolls states a zero minimum, so the
55
+ family's scroller is what scrolls (CP-03).
56
+ - An element of the screen's own paints only with theme tokens; a literal is
57
+ written only beside a comment that says why no token covers it (CP-05).
58
+ - A state a family already draws is set on the family and stated once, with
59
+ nothing louder beside it (CP-06).
60
+ - A control that switches what a region holds changes words and values, never
61
+ the size or the position of a box (CP-08).
62
+ - Where no anatomy answers the problem, the screen writes an element of its
63
+ own instead of bending a family into a shape it does not have (CP-04). That
64
+ element is built with `node_modules/@slotted/react/dist/docs/skills/build-own-element/SKILL.md`.
65
+
66
+ ## 5. Waits
67
+
68
+ Every region filled by a request and every control that starts one follow
69
+ `node_modules/@slotted/react/dist/docs/skills/waiting-states/SKILL.md`.
70
+
71
+ ## 6. Done
72
+
73
+ 1. Each `MUST` rule of the topics read: its `Check` passes.
74
+ 2. Each `SHOULD` rule not followed is listed with its reason.
75
+ 3. No CSS of the screen's own targets a family's parts; a family's appearance
76
+ changes through its axes.
@@ -0,0 +1,9 @@
1
+ # Skills index
2
+
3
+ Each skill, with when it applies. Read a skill before its task.
4
+
5
+ - build-own-element: `./build-own-element/SKILL.md` — Use when writing a component, widget or visual element that no family of @slotted/react draws — a timeline strip, a seat map, a heat grid, a bespoke control. Proves first that no family answers, then builds the element from the theme's tokens with the states, focus, target size, forced colours and motion the families keep.
6
+ - compose-screen: `./compose-screen/SKILL.md` — Use when writing or changing a screen of an application built with @slotted/react — a list of records, the page of one record, a form that writes one, an overview, a report, a tree beside a list, a rule builder, a conversation or a ledger. Applies the Slotted guidelines in order and ends with each Check of the rules read.
7
+ - review-screen: `./review-screen/SKILL.md` — Use when reviewing, auditing or fixing an existing screen of an application built with @slotted/react, or when asked whether a screen follows the Slotted guidelines. Reads the rules that apply, sweeps the screen's code for the defects found without running it, and reports each finding with its rule, level and place.
8
+ - theme-app: `./theme-app/SKILL.md` — Use when changing how an application built with @slotted/react looks, as a whole or in one region — its brand colour, a light, dark or high-contrast scheme, density, fonts, corners, or the shape of a control. Chooses the narrowest level that reaches the change — a seed, a token, a family token or a theme rule — and where it is declared.
9
+ - waiting-states: `./waiting-states/SKILL.md` — Use when building or reviewing anything a person waits in front of in an application built with @slotted/react — placeholders, a control's own loading state, a loading overlay, a progress indicator, or the empty and error states beside them. Decides which indicator answers which wait and how placeholders are built from the anatomy they stand in for.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: review-screen
3
+ description: Use when reviewing, auditing or fixing an existing screen of an application built with @slotted/react, or when asked whether a screen follows the Slotted guidelines. Reads the rules that apply, sweeps the screen's code for the defects found without running it, and reports each finding with its rule, level and place.
4
+ ---
5
+
6
+ # Review a screen
7
+
8
+ A review answers one question per rule read: does the screen pass the rule's
9
+ `Check`. A finding names a rule; a remark that names no rule is not a finding.
10
+
11
+ ## 1. Inventory
12
+
13
+ 1. List the screen's files: its component, its template, its stylesheet and
14
+ the requests it starts.
15
+ 2. List the families it imports, and read `node_modules/@slotted/react/dist/docs/<family>.md` for each.
16
+ 3. List the elements of the screen's own: every element that is not a family,
17
+ with the CSS that paints it.
18
+ 4. Classify the screen with the table in step 1 of
19
+ `node_modules/@slotted/react/dist/docs/skills/compose-screen/SKILL.md`.
20
+
21
+ ## 2. Read
22
+
23
+ 1. `node_modules/@slotted/react/dist/docs/guidelines/index.md` and
24
+ `node_modules/@slotted/react/dist/docs/guidelines/composition.md`.
25
+ 2. The topics of the classification, and each topic whose `triggers` the
26
+ screen matches.
27
+ 3. `own-elements.md` when step 1 listed an element of the screen's own.
28
+ 4. `node_modules/@slotted/react/dist/docs/skills/waiting-states/SKILL.md` when the screen starts a
29
+ request.
30
+
31
+ ## 3. Sweep the code
32
+
33
+ Each search below finds a defect without running the screen.
34
+
35
+ | Search the screen's files for | Defect | Rule |
36
+ | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | ------------ |
37
+ | A colour literal (hex, rgb, hsl, oklch), a length in pixels or rem other than zero, or a font size, in the screen's CSS | a value the theme has a token for | CP-05, OE-01 |
38
+ | A rule of the application's CSS that sets colour, border, radius, padding or type on a family's `data-ui` or `data-part` | the screen restyles a family instead of setting its axes | OE-08 |
39
+ | A control that starts a request and is not in its `loading` state until the answer | a control that fires twice | AF-03 |
40
+ | An empty state drawn from the initial value of the data, before the first answer | a wait shown as nothing | AF-01 |
41
+ | A spinner standing in a region that has no items yet | placeholders missing | AF-02 |
42
+ | Siblings of the page's own spaced by margins, or text with a font size of its own | layout outside the primitives | CP-02 |
43
+ | A grid or flex track around a family that scrolls, with no zero minimum | the page scrolls, not the family | CP-03 |
44
+ | A badge, a tag or a colour beside a family that already draws the same state | a state stated twice | CP-06 |
45
+ | An element of the screen's own that takes focus with no ring in its `focus-visible` state | focus not drawn | OE-03 |
46
+
47
+ A rule whose `Check` needs the screen running — a size class, a throttled
48
+ network, the accessibility tree — is run when the environment can run it, and
49
+ otherwise reported as not checked, with the step that checks it.
50
+
51
+ ## 4. Report
52
+
53
+ One finding per entry, every `MUST` before every `SHOULD`:
54
+
55
+ - the rule's id and level;
56
+ - the file and the line;
57
+ - what the screen does, in one sentence;
58
+ - the change after which the rule's `Check` passes.
59
+
60
+ A `SHOULD` the screen breaks on purpose is listed with its reason, as a
61
+ deviation. The screen passes when no `MUST` finding remains.
62
+
63
+ ## 5. Fix, when asked
64
+
65
+ 1. Fix every `MUST` finding, then each `SHOULD` finding the request covers.
66
+ 2. A fix uses what the family offers — its state, its slot, its axis — and
67
+ never CSS on its parts.
68
+ 3. A literal becomes a token of the group `node_modules/@slotted/react/dist/docs/tokens.md` lists for
69
+ that decision.
70
+ 4. Run the searches of step 3 again on the changed files: none finds anything.