@tanrei/mcp 0.1.0-next.0 → 0.1.0-next.1

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 (224) hide show
  1. package/NOTICE +4 -5
  2. package/README.md +21 -6
  3. package/bin/tanrei-mcp.js +3 -3
  4. package/dist/server.js +2218 -711
  5. package/dist/vocabulary/docs/governance/mimicry-gaps.json +95 -21
  6. package/dist/vocabulary/packages/tokens-build/generated/component-catalog.json +1825 -0
  7. package/dist/vocabulary/specs/accordion.spec.json +1 -0
  8. package/dist/vocabulary/specs/app-bar.spec.json +1 -0
  9. package/dist/vocabulary/specs/app-shell.spec.json +1 -0
  10. package/dist/vocabulary/specs/avatar.spec.json +1 -0
  11. package/dist/vocabulary/specs/badge.spec.json +1 -0
  12. package/dist/vocabulary/specs/bottom-sheet.spec.json +1 -0
  13. package/dist/vocabulary/specs/breadcrumbs.spec.json +1 -0
  14. package/dist/vocabulary/specs/button-group.spec.json +1 -0
  15. package/dist/vocabulary/specs/button-with-menu.spec.json +1 -0
  16. package/dist/vocabulary/specs/button.spec.json +1 -0
  17. package/dist/vocabulary/specs/calendar.spec.json +1 -0
  18. package/dist/vocabulary/specs/callout.spec.json +1 -0
  19. package/dist/vocabulary/specs/card.spec.json +1 -0
  20. package/dist/vocabulary/specs/carousel.spec.json +1 -0
  21. package/dist/vocabulary/specs/chat-composer.spec.json +1 -0
  22. package/dist/vocabulary/specs/checkbox-group.spec.json +1 -0
  23. package/dist/vocabulary/specs/checkbox.spec.json +1 -0
  24. package/dist/vocabulary/specs/chip-field.spec.json +1 -0
  25. package/dist/vocabulary/specs/chip.spec.json +1 -0
  26. package/dist/vocabulary/specs/code-block.spec.json +1 -0
  27. package/dist/vocabulary/specs/color-field.spec.json +1 -0
  28. package/dist/vocabulary/specs/color-input.spec.json +1 -0
  29. package/dist/vocabulary/specs/combobox-field.spec.json +1 -0
  30. package/dist/vocabulary/specs/combobox.spec.json +1 -0
  31. package/dist/vocabulary/specs/component.schema.json +1 -0
  32. package/dist/vocabulary/specs/copy-button.spec.json +1 -0
  33. package/dist/vocabulary/specs/date-time-picker.spec.json +1 -0
  34. package/dist/vocabulary/specs/description-list.spec.json +1 -0
  35. package/dist/vocabulary/specs/dialog.spec.json +1 -0
  36. package/dist/vocabulary/specs/divider.spec.json +1 -0
  37. package/dist/vocabulary/specs/drop-zone.spec.json +1 -0
  38. package/dist/vocabulary/specs/embedded-text-input.spec.json +1 -0
  39. package/dist/vocabulary/specs/empty-state.spec.json +1 -0
  40. package/dist/vocabulary/specs/fab-menu.spec.json +1 -0
  41. package/dist/vocabulary/specs/field-group.spec.json +1 -0
  42. package/dist/vocabulary/specs/field.spec.json +1 -0
  43. package/dist/vocabulary/specs/figure.spec.json +1 -0
  44. package/dist/vocabulary/specs/file-item.spec.json +1 -0
  45. package/dist/vocabulary/specs/file-picker.spec.json +1 -0
  46. package/dist/vocabulary/specs/file-upload.spec.json +1 -0
  47. package/dist/vocabulary/specs/handle.spec.json +1 -0
  48. package/dist/vocabulary/specs/image-preview.spec.json +1 -0
  49. package/dist/vocabulary/specs/inline-code.spec.json +1 -0
  50. package/dist/vocabulary/specs/inventory.json +1 -0
  51. package/dist/vocabulary/specs/keyboard-shortcut.spec.json +1 -0
  52. package/dist/vocabulary/specs/link-card.spec.json +1 -0
  53. package/dist/vocabulary/specs/link.spec.json +1 -0
  54. package/dist/vocabulary/specs/list-row.spec.json +1 -0
  55. package/dist/vocabulary/specs/list.spec.json +1 -0
  56. package/dist/vocabulary/specs/loading-indicator.spec.json +1 -0
  57. package/dist/vocabulary/specs/main-action-button.spec.json +1 -0
  58. package/dist/vocabulary/specs/marquee-text.spec.json +1 -0
  59. package/dist/vocabulary/specs/menu.spec.json +1 -0
  60. package/dist/vocabulary/specs/menubar.spec.json +1 -0
  61. package/dist/vocabulary/specs/meter.spec.json +1 -0
  62. package/dist/vocabulary/specs/modal-layer.spec.json +1 -0
  63. package/dist/vocabulary/specs/navigation-bar.spec.json +1 -0
  64. package/dist/vocabulary/specs/navigation-drawer.spec.json +1 -0
  65. package/dist/vocabulary/specs/number-field.spec.json +1 -0
  66. package/dist/vocabulary/specs/number-input.spec.json +1 -0
  67. package/dist/vocabulary/specs/number-ticker.spec.json +1 -0
  68. package/dist/vocabulary/specs/one-time-code-field.spec.json +1 -0
  69. package/dist/vocabulary/specs/one-time-code-input.spec.json +1 -0
  70. package/dist/vocabulary/specs/page-header.spec.json +1 -0
  71. package/dist/vocabulary/specs/pagination.spec.json +1 -0
  72. package/dist/vocabulary/specs/popover.spec.json +1 -0
  73. package/dist/vocabulary/specs/previous-next-links.spec.json +1 -0
  74. package/dist/vocabulary/specs/progress-indicator.spec.json +1 -0
  75. package/dist/vocabulary/specs/prose.spec.json +1 -0
  76. package/dist/vocabulary/specs/radio-button.spec.json +1 -0
  77. package/dist/vocabulary/specs/radio-group.spec.json +1 -0
  78. package/dist/vocabulary/specs/rating.spec.json +1 -0
  79. package/dist/vocabulary/specs/resizable-frame.spec.json +1 -0
  80. package/dist/vocabulary/specs/scroll-area.spec.json +1 -0
  81. package/dist/vocabulary/specs/search.spec.json +1 -0
  82. package/dist/vocabulary/specs/segmented-button.spec.json +1 -0
  83. package/dist/vocabulary/specs/select-field.spec.json +1 -0
  84. package/dist/vocabulary/specs/select.spec.json +1 -0
  85. package/dist/vocabulary/specs/side-sheet.spec.json +1 -0
  86. package/dist/vocabulary/specs/size-transition.spec.json +1 -0
  87. package/dist/vocabulary/specs/skeleton.spec.json +1 -0
  88. package/dist/vocabulary/specs/slider-field.spec.json +1 -0
  89. package/dist/vocabulary/specs/slider.spec.json +1 -0
  90. package/dist/vocabulary/specs/snackbar.spec.json +1 -0
  91. package/dist/vocabulary/specs/split-view.spec.json +1 -0
  92. package/dist/vocabulary/specs/stepper.spec.json +1 -0
  93. package/dist/vocabulary/specs/steps.spec.json +1 -0
  94. package/dist/vocabulary/specs/swatch.spec.json +1 -0
  95. package/dist/vocabulary/specs/switch.spec.json +1 -0
  96. package/dist/vocabulary/specs/tab-view.spec.json +1 -0
  97. package/dist/vocabulary/specs/table-of-contents.spec.json +1 -0
  98. package/dist/vocabulary/specs/table.spec.json +1 -0
  99. package/dist/vocabulary/specs/tabs.spec.json +1 -0
  100. package/dist/vocabulary/specs/tag-group.spec.json +1 -0
  101. package/dist/vocabulary/specs/tag.spec.json +1 -0
  102. package/dist/vocabulary/specs/text-field.spec.json +1 -0
  103. package/dist/vocabulary/specs/text-input.spec.json +1 -0
  104. package/dist/vocabulary/specs/timeline.spec.json +1 -0
  105. package/dist/vocabulary/specs/toolbar.spec.json +1 -0
  106. package/dist/vocabulary/specs/tooltip.spec.json +1 -0
  107. package/dist/vocabulary/specs/tree-view.spec.json +1 -0
  108. package/dist/vocabulary/tanrei.config.json +2 -1
  109. package/dist/vocabulary/tokens/comp/accordion.tokens.json +70 -47
  110. package/dist/vocabulary/tokens/comp/app-bar.tokens.json +99 -2
  111. package/dist/vocabulary/tokens/comp/app-shell.tokens.json +1 -1
  112. package/dist/vocabulary/tokens/comp/avatar.tokens.json +17 -5
  113. package/dist/vocabulary/tokens/comp/badge.tokens.json +2 -1
  114. package/dist/vocabulary/tokens/comp/bottom-sheet.tokens.json +143 -73
  115. package/dist/vocabulary/tokens/comp/breadcrumbs.tokens.json +3 -3
  116. package/dist/vocabulary/tokens/comp/button-group.tokens.json +26 -4
  117. package/dist/vocabulary/tokens/comp/button-with-menu.tokens.json +256 -28
  118. package/dist/vocabulary/tokens/comp/button.tokens.json +275 -22
  119. package/dist/vocabulary/tokens/comp/calendar.tokens.json +28 -18
  120. package/dist/vocabulary/tokens/comp/callout.tokens.json +55 -299
  121. package/dist/vocabulary/tokens/comp/card.tokens.json +3 -3
  122. package/dist/vocabulary/tokens/comp/carousel.tokens.json +70 -10
  123. package/dist/vocabulary/tokens/comp/chat-composer.tokens.json +37 -3
  124. package/dist/vocabulary/tokens/comp/checkbox.tokens.json +18 -22
  125. package/dist/vocabulary/tokens/comp/chip.tokens.json +67 -16
  126. package/dist/vocabulary/tokens/comp/code-block.tokens.json +15 -1
  127. package/dist/vocabulary/tokens/comp/combobox.tokens.json +202 -33
  128. package/dist/vocabulary/tokens/comp/copy-button.tokens.json +19 -2
  129. package/dist/vocabulary/tokens/comp/date-time-picker.tokens.json +66 -35
  130. package/dist/vocabulary/tokens/comp/description-list.tokens.json +45 -23
  131. package/dist/vocabulary/tokens/comp/dialog.tokens.json +95 -35
  132. package/dist/vocabulary/tokens/comp/drop-zone.tokens.json +151 -0
  133. package/dist/vocabulary/tokens/comp/embedded-text-input.tokens.json +2 -2
  134. package/dist/vocabulary/tokens/comp/field-group.tokens.json +21 -1
  135. package/dist/vocabulary/tokens/comp/field.tokens.json +33 -4
  136. package/dist/vocabulary/tokens/comp/figure.tokens.json +56 -2
  137. package/dist/vocabulary/tokens/comp/file-item.tokens.json +4 -4
  138. package/dist/vocabulary/tokens/comp/file-picker.tokens.json +3 -3
  139. package/dist/vocabulary/tokens/comp/file-upload.tokens.json +2 -7
  140. package/dist/vocabulary/tokens/comp/handle.tokens.json +343 -0
  141. package/dist/vocabulary/tokens/comp/image-preview.tokens.json +53 -23
  142. package/dist/vocabulary/tokens/comp/input-box.tokens.json +161 -26
  143. package/dist/vocabulary/tokens/comp/keyboard-shortcut.tokens.json +5 -3
  144. package/dist/vocabulary/tokens/comp/link-card.tokens.json +24 -4
  145. package/dist/vocabulary/tokens/comp/link.tokens.json +3 -3
  146. package/dist/vocabulary/tokens/comp/list-row.tokens.json +249 -0
  147. package/dist/vocabulary/tokens/comp/list.tokens.json +106 -225
  148. package/dist/vocabulary/tokens/comp/loading-indicator.tokens.json +13 -3
  149. package/dist/vocabulary/tokens/comp/main-action-button.tokens.json +96 -23
  150. package/dist/vocabulary/tokens/comp/marquee-text.tokens.json +110 -0
  151. package/dist/vocabulary/tokens/comp/menu.tokens.json +248 -43
  152. package/dist/vocabulary/tokens/comp/menubar.tokens.json +63 -12
  153. package/dist/vocabulary/tokens/comp/meter.tokens.json +173 -0
  154. package/dist/vocabulary/tokens/comp/modal-layer.tokens.json +69 -0
  155. package/dist/vocabulary/tokens/comp/navigation-bar.tokens.json +5 -36
  156. package/dist/vocabulary/tokens/comp/navigation-drawer.tokens.json +478 -122
  157. package/dist/vocabulary/tokens/comp/number-input.tokens.json +2 -2
  158. package/dist/vocabulary/tokens/comp/number-ticker.tokens.json +77 -0
  159. package/dist/vocabulary/tokens/comp/one-time-code-input.tokens.json +22 -7
  160. package/dist/vocabulary/tokens/comp/pagination.tokens.json +118 -79
  161. package/dist/vocabulary/tokens/comp/popover.tokens.json +84 -13
  162. package/dist/vocabulary/tokens/comp/previous-next-links.tokens.json +194 -0
  163. package/dist/vocabulary/tokens/comp/progress-indicator.tokens.json +14 -4
  164. package/dist/vocabulary/tokens/comp/prose.tokens.json +16 -0
  165. package/dist/vocabulary/tokens/comp/radio-button.tokens.json +16 -20
  166. package/dist/vocabulary/tokens/comp/rating.tokens.json +230 -0
  167. package/dist/vocabulary/tokens/comp/resizable-frame.tokens.json +166 -0
  168. package/dist/vocabulary/tokens/comp/scroll-area.tokens.json +99 -0
  169. package/dist/vocabulary/tokens/comp/search.tokens.json +144 -58
  170. package/dist/vocabulary/tokens/comp/segmented-button.tokens.json +75 -21
  171. package/dist/vocabulary/tokens/comp/select.tokens.json +168 -34
  172. package/dist/vocabulary/tokens/comp/side-sheet.tokens.json +60 -13
  173. package/dist/vocabulary/tokens/comp/size-transition.tokens.json +49 -0
  174. package/dist/vocabulary/tokens/comp/skeleton.tokens.json +5 -2
  175. package/dist/vocabulary/tokens/comp/slider.tokens.json +11 -10
  176. package/dist/vocabulary/tokens/comp/snackbar.tokens.json +81 -255
  177. package/dist/vocabulary/tokens/comp/split-view.tokens.json +52 -0
  178. package/dist/vocabulary/tokens/comp/stepper.tokens.json +538 -0
  179. package/dist/vocabulary/tokens/comp/swatch.tokens.json +208 -0
  180. package/dist/vocabulary/tokens/comp/switch.tokens.json +19 -18
  181. package/dist/vocabulary/tokens/comp/tab-view.tokens.json +5 -5
  182. package/dist/vocabulary/tokens/comp/table-of-contents.tokens.json +58 -33
  183. package/dist/vocabulary/tokens/comp/table.tokens.json +141 -30
  184. package/dist/vocabulary/tokens/comp/tabs.tokens.json +132 -44
  185. package/dist/vocabulary/tokens/comp/tag-group.tokens.json +15 -4
  186. package/dist/vocabulary/tokens/comp/tag.tokens.json +32 -8
  187. package/dist/vocabulary/tokens/comp/text-input.tokens.json +18 -88
  188. package/dist/vocabulary/tokens/comp/timeline.tokens.json +15 -19
  189. package/dist/vocabulary/tokens/comp/toolbar.tokens.json +121 -6
  190. package/dist/vocabulary/tokens/comp/tooltip.tokens.json +8 -32
  191. package/dist/vocabulary/tokens/comp/tree-view.tokens.json +136 -51
  192. package/dist/vocabulary/tokens/dial/dial.tokens.json +23 -3
  193. package/dist/vocabulary/tokens/fidelity/cupertino.fidelity.json +165 -0
  194. package/dist/vocabulary/tokens/fidelity/m3-like.fidelity.json +215 -5
  195. package/dist/vocabulary/tokens/fidelity/reference/androidx-material3.json +144 -0
  196. package/dist/vocabulary/tokens/fidelity/reference/apple-hig.json +196 -0
  197. package/dist/vocabulary/tokens/generated/cupertino/components.json +1749 -0
  198. package/dist/vocabulary/tokens/generated/cupertino/fidelity.json +162 -0
  199. package/dist/vocabulary/tokens/generated/m3-like/components.json +1761 -0
  200. package/dist/vocabulary/tokens/generated/m3-like/fidelity.json +182 -12
  201. package/dist/vocabulary/tokens/generated/tanrei/components.json +1764 -0
  202. package/dist/vocabulary/tokens/icon-sets/material-symbols.icon-set.json +2 -1
  203. package/dist/vocabulary/tokens/schema/system.schema.json +324 -35
  204. package/dist/vocabulary/tokens/sys/behavior.tokens.json +66 -1
  205. package/dist/vocabulary/tokens/sys/measure.tokens.json +105 -21
  206. package/dist/vocabulary/tokens/sys/motion.tokens.json +474 -2
  207. package/dist/vocabulary/tokens/sys/scroll-edge.tokens.json +50 -0
  208. package/dist/vocabulary/tokens/sys/shape.tokens.json +1 -1
  209. package/dist/vocabulary/tokens/sys/state.tokens.json +16 -3
  210. package/dist/vocabulary/tokens/sys/typescale.tokens.json +5 -5
  211. package/dist/vocabulary/tokens/systems/core.system.json +1889 -0
  212. package/dist/vocabulary/tokens/systems/cupertino.system.json +298 -79
  213. package/dist/vocabulary/tokens/{comp → systems/m3-like/comp}/fab-menu.tokens.json +5 -15
  214. package/dist/vocabulary/tokens/systems/m3-like.system.json +451 -125
  215. package/dist/vocabulary/tokens/systems/tanrei.system.json +619 -321
  216. package/dist/vocabulary/tokens/tanrei.resolver.json +48 -6
  217. package/package.json +22 -6
  218. package/dist/vocabulary/tokens/AGENTS.md +0 -15
  219. package/dist/vocabulary/tokens/comp/navigation-rail.tokens.json +0 -254
  220. package/dist/vocabulary/tokens/fidelity/m3-expressive-like.fidelity.json +0 -68
  221. package/dist/vocabulary/tokens/fidelity/reference/androidx-material3-buttons.json +0 -67
  222. package/dist/vocabulary/tokens/generated/m3-expressive-like/fidelity.json +0 -99
  223. package/dist/vocabulary/tokens/systems/m3-expressive-like.system.json +0 -83
  224. package/dist/vocabulary/tokens/vocabulary.lock.json +0 -7052
@@ -0,0 +1 @@
1
+ {"name":"chat-composer","title":"Chat composer","summary":"Lets a person write a message and send it, in one capsule that holds everything: a typing area that grows with what is written, the files attached to the message as a strip of File items above it, a product's own actions, and a send button that is enabled only while what is there can be sent; it reports the message when the person sends it and never sends anything itself.","level":"feature","listing":"default","builtFrom":["embedded-text-input","file-picker","file-item","button"],"anatomy":[{"id":"container","description":"The capsule: the one container the chat composer draws, behind everything it holds — its fill, its edge and its corners. The chat composer's own part. It carries the state answer: its edge is the focus indication of the typing area inside it, and it is drawn in its error condition and as receiving while files are dragged over it."},{"id":"strip","description":"The attachments, one File item each, at the top of the capsule: an arrangement of the chat composer's own — where the items stand and how they wrap — holding File items that are drawn from their own tokens.","optional":true},{"id":"input","description":"The typing area: the embedded text input — typing alone, with no container, edge or focus indication of its own — growing with its lines up to maxRows and scrolling inside itself beyond. A member, drawn from its own tokens."},{"id":"attach-button","description":"The File picker's trigger: an icon-only Button the chat composer brings, or the product's own in the attach slot. Shown while attachments is not none.","optional":true},{"id":"leading-actions","description":"The product's Buttons in the leading slot: before the typing area in the inline layout, and at the start of the row beneath it in the stacked one, after the attach button: laid out, never restyled.","optional":true},{"id":"trailing-actions","description":"The product's Buttons in the trailing slot: before the send button in the inline layout, and at the end of the row beneath the typing area in the stacked one: laid out, never restyled.","optional":true},{"id":"counter","description":"The number of characters, and the limit, before the trailing actions. The chat composer's own part.","optional":true},{"id":"send-button","description":"The Button that sends, on the typing area's line in both layouts — at its end, and at its bottom edge once the text has more lines than one: one the chat composer brings, or the product's own in the send slot; while a stoppable sending is under way, the stop button in its place. A member, drawn from the Button's own tokens."},{"id":"drop-indicator","description":"The capsule's own fill and edge while files are dragged over it: the receiving condition of the container, not a second shape. It takes no layout space.","optional":true}],"props":[{"name":"value","from":"embedded-text-input.value","note":"The chat composer shows what the product sets and reports what a person types with input; it never trims, shortens or rewrites it."},{"name":"label","from":"embedded-text-input.label","note":"Also the name of the chat composer as a group. It is not drawn: a composer has a name and no label row. Required, unless a Field around the chat composer names it (CCM-28)."},{"name":"placeholder","from":"embedded-text-input.placeholder"},{"name":"layout","type":"enum","values":["inline","stacked"],"default":"inline","description":"Where the actions stand in the capsule. inline, the default: on the typing area's line — the attach button and the leading actions before it, the counter, the trailing actions and the send button after it — and at the bottom of the capsule once the text has more lines than one. stacked: the typing area and the send button on one line — the send button at its end, and at the bottom edge of the typing area once the text has more lines than one — and everything else in one row beneath them, inside the capsule: the attach button and the leading actions at its start, the counter and the trailing actions at its end — for a composer with many actions, and for messages written in paragraphs. A capsule too narrow for inline — narrower than its own least width, or so full of actions that they would leave the typing area less than its least width — is laid out stacked whatever this says; the number of lines never changes the layout (CCM-4)."},{"name":"minRows","from":"embedded-text-input.minRows","note":"One line by default, at which the capsule is fully rounded."},{"name":"maxRows","type":"number","default":6,"description":"The most lines the typing area grows to before it scrolls inside itself. Given to the embedded text input as its maxRows, with a default of the chat composer's own: six lines, where the embedded text input alone has no limit. 0 sets no limit, which a composer at the bottom of a screen should not choose."},{"name":"maxLength","type":"number","default":0,"description":"The most user-perceived characters a message may hold; 0 is no limit. It refuses no edit and shortens no paste: text beyond it stays, is marked, and stops sending until the person has cut it (CCM-18)."},{"name":"counter","type":"boolean","default":false,"description":"Draws the number of characters, and maxLength where one is set, before the trailing actions."},{"name":"sendKey","type":"enum","values":["enter","modifier"],"default":"enter","description":"What Enter does on a hardware keyboard. enter: Enter sends and Shift+Enter begins a new line — for short messages sent often. modifier: Enter begins a new line and Control+Enter or Command+Enter sends — for long messages written in paragraphs. Control+Enter and Command+Enter send under both; the return key of an on-screen keyboard begins a new line under both (CCM-12)."},{"name":"attachments","type":"enum","values":["none","own","given"],"default":"none","description":"Whether files can be attached, and who holds them. none: text alone; no attach button, and files dropped or pasted are not taken. own: the chat composer keeps the files a person attached and draws a File item for each, and send carries them — nothing written by the product until then. given: the product gives the File items and the chat composer lays them out and keeps no file — for a product that begins sending a file the moment it is attached and reports each one's progress."},{"name":"attachmentForm","type":"enum","values":["auto","tile","row"],"default":"auto","description":"The form of the File items the chat composer draws itself, while attachments is own. auto: a tile with its picture for a file the platform can draw as an image, and a row — glyph, name and state on a line of the strip — for every other file. tile: every file a tile, a file that is no image by the glyph of its format and its name. row: every file a row, and no picture is drawn. A file the chat composer refused is a row under every value (CCM-44). While attachments is given the product sets each File item's own form, and this is not read."},{"name":"multiple","type":"boolean","default":true,"description":"Whether more than one file can be attached. Given to the file picker as its multiple; the default is true, where a file picker alone offers one."},{"name":"accept","from":"file-picker.accept"},{"name":"maxSize","from":"file-picker.maxSize"},{"name":"maxFiles","from":"file-picker.maxFiles","note":"The most files one message may carry while multiple is true; the room that is left is what the file picker is given (CCM-22)."},{"name":"sending","type":"boolean","default":false,"description":"What was sent is on its way, or its answer is still arriving: the product's to set and to clear. While it is true nothing more can be sent; the typing area stays open, so the next message can be written."},{"name":"stoppable","type":"boolean","default":false,"description":"While sending is true, puts a stop button in the send button's place, which asks the product to stop what is under way (stop) — for an answer that arrives over time and can be cut short. Ignored while sending is false."},{"name":"blocked","type":"boolean","default":false,"description":"The product's own reason that nothing can be sent now — no connection, a limit on how often, a check of its own. The send button is disabled and the send key sends nothing; the product says why in its own words, around the composer or with announcement."},{"name":"keepAfterSend","type":"boolean","default":false,"description":"Keeps the text and the attachments after send, for a product that clears them itself once it knows the message arrived. False: the chat composer empties itself as it hands the message over (CCM-15)."},{"name":"disabled","type":"boolean","default":false,"description":"Nothing can be written, attached, removed or sent: every member and every Button in a slot is disabled. Inside a Field, disable the Field."},{"name":"error","type":"boolean","default":false,"description":"Draws the capsule in its error condition and exposes the typing area as invalid. A Field sets it with its own error; the words are the Field's errorText. It does not stop sending by itself: blocked does."},{"name":"sendLabel","type":"string","default":"","words":"sendLabel","description":"The accessible name of the send button the chat composer brings (\"Send\"). Empty reads the product's words; with neither, CCM-31 says what happens."},{"name":"stopLabel","type":"string","default":"","words":"stopLabel","description":"The accessible name of the stop button the chat composer brings (\"Stop\"). Empty reads the product's words. Needed while stoppable is used."},{"name":"attachLabel","type":"string","default":"","words":"attachLabel","description":"The accessible name of the attach button the chat composer brings (\"Attach files\"). Empty reads the product's words. Needed while attachments is not none."},{"name":"removeLabel","from":"file-item.removeLabel","note":"Given to every File item the chat composer draws."},{"name":"retryLabel","from":"file-item.retryLabel","note":"Given to every File item the chat composer draws."},{"name":"typeErrorText","type":"string","default":"","words":"fileTypeErrorText","description":"While attachments is own: the sentence on the File item of a file refused for its kind (\"This kind of file cannot be added.\"). Empty reads the product's words. The key the file upload reads."},{"name":"sizeErrorText","type":"string","default":"","words":"fileSizeErrorText","description":"While attachments is own: the sentence on the File item of a file refused for its size (\"This file is too large.\"). Empty reads the product's words. The key the file upload reads."},{"name":"countErrorText","type":"string","default":"","words":"fileCountErrorText","description":"While attachments is own: the sentence on the File item of a file refused because no more can be added (\"No more files can be added.\"). Empty reads the product's words. The key the file upload reads."},{"name":"announcement","type":"string","default":"","description":"A message the product has assistive technology hear through the chat composer's one live region when it sets or changes it (\"Message sent\", \"The message is 12 characters too long\"). It is not drawn."}],"items":[{"name":"file","summary":"One attachment, as a File item of the strip: its glyph by the file's format or its picture, its name, its size, where it stands — waiting, being sent, done or failed — and the actions to try it again and to remove it. The File item's own props and events, by the same names and with its own descriptions; fourteen of them are listed here, the ones a strip of attachments is drawn with, and a product may set any other on its items. While attachments is given the product adds it, changes it and removes it; while it is own the chat composer draws one itself for each file it keeps and for each file it refused, and the product gives none.","component":"file-item","props":[{"name":"value","type":"string","default":"","description":"What identifies the item to the product: given back by remove and retry, and carried by send. Unique within one chat composer."},{"name":"name","type":"string","default":"","description":"The file's name as the person knows it (\"report-2026.pdf\"). The file item's name for assistive technology in every form, also where it is not drawn."},{"name":"sizeText","type":"string","default":"","description":"The file's size as text, formatted by the product for the reader's locale (\"1.2 MB\"). Empty draws none."},{"name":"status","type":"enum","values":["pending","uploading","done","error"],"default":"pending","description":"Where the file stands. pending: attached, and nothing is happening to it yet. uploading: the product is sending it; nothing can be sent until it has arrived. done: the product has it. error: it failed or was refused; errorText says why."},{"name":"statusText","type":"string","default":"","description":"The status in the product's words (\"Waiting\", \"Uploading\", \"Uploaded\"), drawn last on the second line and read with the file. The mark and its color are never the only sign of a status."},{"name":"progress","type":"number","default":null,"description":"How far the sending has come, from 0 to 1, while status is uploading. Null draws the bar as under way without saying how far. Ignored in every other status."},{"name":"errorText","type":"string","default":"","description":"Why the file failed and what to do, in the product's words (\"Larger than 10 MB\", \"The connection was lost\"). Drawn in the status's place while status is error, in every form, and never cut."},{"name":"retryable","type":"boolean","default":false,"description":"Whether a failed item offers the retry action. A failed item that can be tried again holds the message back until it is retried or removed; one that cannot is left out of what is sent (CCM-9, CCM-11)."},{"name":"form","type":"enum","values":["row","tile"],"default":"row","description":"How the file is shown. row: one line across the width the layout gives — the glyph or a small picture, the name, the second line, the bar, the actions at the end — for a column of files. tile: a box of a width and a height, holding the picture or the glyph, with the texts beneath it and the actions at its corner — for a strip of attached pictures. The product chooses by where the file stands. A design system may add values."},{"name":"preview","type":"boolean","default":false,"description":"Whether a picture of the file is drawn in the glyph's place, where the file is an image and the product gave an address (previewSrc) or the file itself in the platform's idiom. False draws the glyph, also for an image. The picture is drawn by the platform; the file item reads no file."},{"name":"previewSrc","type":"string","default":"","description":"The address of a picture of the file, as the platform's images take one: a small rendition the product's server made of a file it already has. With preview it is drawn for a file of any format. Empty, the picture comes from the file itself where the product gave it."},{"name":"nameHidden","type":"boolean","default":false,"description":"In the tile form: the name is not drawn beneath a tile that draws a picture, for a dense strip of pictures. The name stays the file item's name for assistive technology, and is drawn all the same wherever no picture is (FIT-8). Not read in the row form."},{"name":"width","type":"number","default":null,"description":"In the tile form: the width of the box, in the platform's layout unit. Null makes it as wide as it is high."},{"name":"height","type":"number","default":null,"description":"In the tile form: the height of the box, in the platform's layout unit. Null reads the File item's own token for it."}],"events":[{"name":"remove","description":"The person asked to remove this item (the File item's remove). Carries the item's value. The product removes the item, and stops sending the file if it was. It reaches the product only while attachments is given: an item the chat composer drew for a file it keeps is removed by the chat composer, which emits attachmentsChange."},{"name":"retry","description":"The person asked to try a failed item again (the File item's retry). Carries the item's value. The product sends the file again and sets the item's status. Only while attachments is given: an item the chat composer draws itself is never retryable."}]}],"slots":[{"name":"leading","description":"The product's own Buttons after the attach button: before the typing area in the inline layout, at the start of the row beneath it in the stacked one: what adds to the message (a mention, an emoji, formatting, a menu of further sources). Icon-only Buttons of the text variant are the quiet form; the chat composer lays them out inside the capsule and never restyles them.","fixture":"icon-only-button"},{"name":"trailing","description":"The product's own Buttons before the send button in the inline layout, and at the end of the row beneath the typing area in the stacked one: what stands beside sending (a voice message, a time to send at). Laid out inside the capsule and never restyled.","fixture":"icon-only-button"},{"name":"attach","description":"The product's own Button in place of the attach button the chat composer brings (another glyph, a labelled Button). Exactly one; the chat composer gives it the behaviour — it opens the platform's picker — and never restyles it. Ignored while attachments is none.","fixture":"icon-only-button"},{"name":"send","description":"The product's own Button in place of the send button the chat composer brings (a labelled Button, another variant or size). Exactly one; the chat composer gives it the behaviour — it sends, and is disabled while nothing can be sent — and never restyles it.","fixture":"button"},{"name":"stop","description":"The product's own Button in place of the stop button the chat composer brings, shown in the send button's place while sending and stoppable are true. Exactly one.","fixture":"button"}],"events":[{"name":"input","description":"The person changed the text; carries the new value (the embedded text input's input). Emitted for every change, not when the product sets value and not when the chat composer empties itself after send. A commit when focus leaves is not reported: a composer's text is committed by sending."},{"name":"send","description":"The person sent what the chat composer holds, by the send button or the keyboard, while it could be sent. Carries the text exactly as written and the attachments in the order of the strip: the kept files as the platform's own handles while attachments is own, the values of the File items that have not failed while it is given. The product does the sending. Unless keepAfterSend is true the chat composer is empty once the event has been emitted."},{"name":"stop","description":"The person activated the stop button while sending and stoppable were true. The product stops what is under way and sets sending."},{"name":"sendableChange","description":"Whether what the chat composer holds can be sent changed, or the reasons it cannot did. Carries the answer and the reasons, by name: disabled, sending, blocked, empty, length, uploading, failed. For a product that says in its own words what holds a message back, or that mirrors the state elsewhere."},{"name":"sendBlocked","description":"The person asked to send by the keyboard while it could not be sent for a reason other than being empty or disabled. Carries the reasons. For a product that answers the attempt, with announcement or with a Field's error text."},{"name":"select","description":"Files were chosen in the picker, dropped on the capsule or pasted, and passed accept, maxSize and the count (the file picker's select). While attachments is given the product adds a File item for each; while it is own the chat composer has already kept them."},{"name":"reject","description":"Files of one arrival were refused (the file picker's reject), each with its reason: type, size or count. The reasons are names for the product's code, not words."},{"name":"attachmentsChange","description":"The files the chat composer keeps changed by what a person did: an arrival that kept at least one file, or a kept file removed by its File item. Carries the files now kept, in order. Emitted only while attachments is own, and never for what the product or the chat composer itself did (files handed over, the emptying after send, a form reset)."}],"states":["enabled","disabled","hovered","focused","dragged","error","loading"],"behavior":[{"id":"CCM-1","text":"THE chat composer SHALL draw one container of its own, the capsule (CCM-41), and SHALL lay out inside it, from top to bottom: WHILE attachments is not none and it holds at least one File item, the strip of attachments (CCM-43); and below it the typing area, the actions and the send button, as layout says (CCM-2, CCM-3). It SHALL draw nothing outside the capsule; SHALL be as wide as its layout gives it and as tall as what it holds, never less than comp.chat-composer.container.height; SHALL draw no label, no help, no error text and no requirement mark of its own: those are a Field's (CCM-28) or the product's; and SHALL stand where the product places it — it SHALL NOT fix or stick itself to an edge of the screen, cover content, or reserve room outside its own box."},{"id":"CCM-2","text":"WHILE it is laid out inline THE chat composer SHALL draw one row inside the capsule, in reading order: the attach button WHILE attachments is not none, the Buttons of the leading slot, the typing area, the counter WHILE it is drawn (CCM-19), the Buttons of the trailing slot, and the send button. The typing area SHALL take all the room the others leave; neighbours within the group before the typing area and within the group after it SHALL stand comp.chat-composer.actions.gap apart, and each group comp.chat-composer.container.gap from the typing area. The row SHALL stand comp.chat-composer.container.padding-block from the capsule's top edge, or comp.chat-composer.strip.offset below the strip, and comp.chat-composer.container.padding-block from its bottom edge; at each inline edge it SHALL stand comp.chat-composer.container.padding-inline-with-button from the capsule's edge WHERE a Button is the outermost part there and comp.chat-composer.container.padding-inline WHERE the typing area is. The typing area SHALL have comp.chat-composer.input.padding-block above its first line and below its last. WHILE the text has one line every Button and the counter SHALL be centred on that line; WHEN the text has more lines the row SHALL grow with the typing area and every Button and the counter SHALL stay at the bottom edge of the row, level with the last line, at the distance from the capsule's bottom edge they had with one line."},{"id":"CCM-3","text":"WHILE it is laid out stacked THE chat composer SHALL draw, inside the capsule, the typing area and the send button on one line, and everything else in one row beneath that line. The line SHALL stand comp.chat-composer.container.padding-block from the capsule's top edge, or comp.chat-composer.strip.offset below the strip: the typing area from comp.chat-composer.container.padding-inline inside the capsule's start edge, taking all the room the send button leaves, with comp.chat-composer.input.padding-block above its first line and below its last; and the send button — or the stop button in its place (CCM-17) — after it, comp.chat-composer.container.gap from the typing area and comp.chat-composer.container.padding-inline-with-button from the capsule's end edge. WHILE the text has one line the send button SHALL be centred on that line; WHEN the text has more lines the line SHALL grow with the typing area and the send button SHALL stay at its bottom edge, level with the last line of the text, at the distance from the row beneath that it had with one line, as the Buttons of the inline layout stay at theirs (CCM-2). The row beneath SHALL stand comp.chat-composer.container.row-gap below that line, comp.chat-composer.container.padding-inline-with-button from each inline edge and comp.chat-composer.container.padding-block from the capsule's bottom edge, and SHALL hold: at its start the attach button WHILE attachments is not none and the Buttons of the leading slot, and at its end the counter WHILE it is drawn (CCM-19) and the Buttons of the trailing slot, neighbours comp.chat-composer.actions.gap apart and centred on one line. It SHALL never hold the send button: in both layouts the send button is on the line being written. WHERE the row is too short for all it holds THE chat composer SHALL wrap the start group onto further lines, comp.chat-composer.actions.gap apart, and keep the end group together at the end of the last line; it SHALL NOT cut, shrink, overlap or hide a Button. WHILE the row would hold nothing — no attach button, no Button in either slot and no counter — THE chat composer SHALL draw no row and keep no room for one, and is then drawn as it is laid out inline."},{"id":"CCM-4","text":"WHILE the capsule's own inline size is less than comp.chat-composer.layout.inline-min-width, or WHILE the inline layout would leave the typing area less than comp.chat-composer.layout.input-min-width — the capsule's inline size less the paddings, the gaps and the parts CCM-2 puts on its line, the counter counted as wide as it is drawn with maxLength characters WHILE maxLength is greater than 0 — THE chat composer SHALL be laid out stacked whatever layout says, and inline again WHEN neither holds and layout is inline — by its own width and the widths of its parts, never the window's. THE chat composer SHALL NOT change between the two layouts for the number of lines the text has, for the count as the person types or for the attachments it holds: a layout that changed as the second line began would move every Button from under the person's hand and, by giving the text another width, could give it one line again. WHEN layout names a value the chat composer does not know THE chat composer SHALL behave as inline, and in debug builds report the unknown value."},{"id":"CCM-5","text":"THE chat composer SHALL hold exactly one embedded text input as its typing area, with multiline true, and leave it what it is: typing alone, with no container, no edge, no padding and no focus indication of its own (ETI-1, ETI-11); exactly as tall as its lines between minRows and maxRows, scrolling inside itself beyond maxRows with the caret kept in view (ETI-7); changing its height over its own motion (ETI-8); editing in the platform's own text element and reporting every change (ETI-2); given value and placeholder, named by label (ETI-13), and drawn from the embedded text input's own tokens in every state. THE chat composer SHALL give it no other look and SHALL draw nothing over it. WHEN the person presses a point of the capsule that no control covers — its padding, the room beside a short text, the gaps of the strip — THE chat composer SHALL pass the press on to the typing area by the way the embedded text input offers what holds it (ETI-12), so that the typing area has focus and the caret stands where a press on the nearest point of the text would put it, and SHALL show no pressed state (CCM-42). IF minRows is not a number of at least 1 THE chat composer SHALL use 1; IF maxRows is neither 0 nor a number of at least minRows THE chat composer SHALL use minRows."},{"id":"CCM-6","text":"THE chat composer SHALL have exactly one send button: the one element in the send slot — a Button of the product's, with the product's own label, glyph, variant and size, left as it is — or, WHILE that slot is empty, a Button it brings: icon-only, of the medium size and of the variant comp.chat-composer.send-button.variant names, showing the send glyph of the system's icon set through the platform's icon helper, and named by sendLabel. Either one SHALL be drawn from the Button's own tokens and SHALL answer hover, focus and a press as the Button says (BTN-5, BTN-8, BTN-9, BTN-10); the chat composer SHALL give it its behaviour (CCM-10, CCM-11) and SHALL NOT restyle it."},{"id":"CCM-7","text":"WHILE attachments is not none THE chat composer SHALL hold one File picker, given accept, multiple, maxSize and maxFiles, whose trigger is the one element in the attach slot — a Button of the product's, left as it is — or, WHILE that slot is empty, a Button it brings: icon-only, of the text variant and the medium size, showing the attach_file glyph of the system's icon set, and named by attachLabel. WHEN the trigger is activated THE chat composer SHALL have the file picker open the platform's own picker and judge what is chosen (FPK-6, FPK-9); the file picker draws nothing but its trigger (FPK-2). WHILE attachments is none THE chat composer SHALL hold no picker, draw no attach button and no strip, SHALL NOT draw an element in the attach slot, and in debug builds SHALL report one that is there."},{"id":"CCM-8","text":"THE chat composer SHALL lay out the Buttons of the leading slot and of the trailing slot in the order given, at the places CCM-2 and CCM-3 name, each at the size, the variant and the width the product gave it; SHALL add to them no name, role, state or look; and SHALL NOT read what they do — a mention, an emoji, a recording and a menu of further actions are the product's, which writes into the message by setting value and hands over files as CCM-22 says. IF a slot holds an element that is not a Button THE chat composer SHALL lay it out in its place as it is and in debug builds report it."},{"id":"CCM-9","text":"THE chat composer SHALL hold, as state of its own that no member holds, whether what it holds can be sent, and SHALL answer yes only WHILE all of these are true: disabled is false; sending is false; blocked is false; there is something to send — value holds at least one character that is not white space, or at least one attachment would be carried (CCM-11); WHILE maxLength is greater than 0, value is no longer than maxLength (CCM-18); no File item's status is uploading; and no File item's status is error WHILE its retryable is true. For each that is not true it SHALL hold a reason by name — disabled, sending, blocked, empty, length, uploading, failed — and the names are for the product's code, not words. WHEN the answer or the set of reasons changes, by what a person did or by what the product set, THE chat composer SHALL emit sendableChange exactly once with both; it SHALL NOT emit it when it is first presented."},{"id":"CCM-10","text":"WHILE what it holds cannot be sent (CCM-9) THE chat composer SHALL disable the send button as that Button's own disabled does — drawn, exposed and left out of the focus order as the Button says — and enable it again WHEN it can be sent, never enabling a Button in the send slot that the product disabled itself. It SHALL add no state to the Button that a Button does not have: a send button that cannot send is a disabled Button and nothing else, and what holds the message back is shown where it is — on the counter (CCM-19), on the File item still on its way or failed (CCM-20), and in the product's own words."},{"id":"CCM-11","text":"WHEN the person activates the send button by any means the Button has, or asks to send by the keyboard (CCM-12), WHILE what it holds can be sent THE chat composer SHALL emit send exactly once, carrying value exactly as it stands — no character trimmed, joined or replaced — and the attachments in the order of the strip: WHILE attachments is own, the files it keeps, as the platform's own handles; WHILE attachments is given, the value of every File item whose status is not error. THE chat composer SHALL NOT send: it SHALL open no connection and pass the text and the files to no one but the product, as its file picker passes them to no one (FPK-7)."},{"id":"CCM-12","text":"THE chat composer SHALL decide what the embedded text input's action is (ETI-6): a request to send (CCM-11). It SHALL give the embedded text input enterKey action WHILE sendKey is enter and enterKey line-break WHILE sendKey is modifier, and SHALL ask to send WHEN the embedded text input emits action, so that on a hardware keyboard, WHILE no input method is composing (CCM-13): WHILE sendKey is enter, Enter with no modifier asks to send and inserts no line break, and Shift+Enter inserts a line break; WHILE sendKey is modifier, Enter, with or without Shift, inserts a line break; and under both values Control+Enter and, on Apple platforms, Command+Enter ask to send and insert nothing. THE return key of an on-screen keyboard SHALL insert a line break under both values, and that keyboard SHALL be asked for a return key and not for a send or a done key (ETI-6): there the send button sends. WHEN sendKey names a value the chat composer does not know THE chat composer SHALL behave as enter, and in debug builds report the unknown value. No other key SHALL send, and Escape SHALL do nothing to the chat composer."},{"id":"CCM-13","text":"WHILE an input method is composing text in the typing area THE chat composer SHALL leave every key to the input method and the platform's text element, as the embedded text input does (ETI-4): the Enter that chooses a candidate or commits the composition SHALL NOT send, SHALL NOT be counted as a request to send, and SHALL leave the committed text in the typing area; the first Enter pressed after the composition has ended SHALL be read as CCM-12 says. THE chat composer SHALL send for no key it reads itself: it has no key listener that could send beside the embedded text input's action."},{"id":"CCM-14","text":"WHEN the person asks to send by the keyboard WHILE what it holds cannot be sent THE chat composer SHALL emit no send, SHALL insert no line break for a key that would have sent, and SHALL keep the text, the attachments and the focus as they are; and WHILE a reason other than empty and disabled holds, SHALL emit sendBlocked exactly once with the reasons (CCM-9), so that the product can say in its own words what holds the message back (announcement). A request to send WHILE the only reason is empty SHALL do nothing at all."},{"id":"CCM-15","text":"WHEN send has been emitted WHILE keepAfterSend is false THE chat composer SHALL empty itself at once, without waiting to learn what became of the message: value becomes empty and, WHILE attachments is own, it lets go of every file it keeps and removes every File item it drew, those of refused files with them. It SHALL emit neither input nor attachmentsChange for this, since send has said it. WHILE attachments is given the File items are the product's and THE chat composer SHALL remove none: the product removes the items it gave. WHILE keepAfterSend is true THE chat composer SHALL keep everything as it is, and SHALL offer the product, in the platform's idiom, a way to empty it that does exactly what this sentence says for false. Whether the message arrived is the product's to know and to say; the chat composer never says it."},{"id":"CCM-16","text":"WHEN send has been emitted THE chat composer SHALL move focus to the typing area, whether the person sent with the send button, with a key or through assistive technology, so that the next message can be written at once and an on-screen keyboard stays open; WHILE disabled is true it SHALL move focus nowhere."},{"id":"CCM-17","text":"WHILE sending is true THE chat composer SHALL send nothing more (CCM-9), SHALL leave the typing area and the attachments as open to the person as they were, and SHALL expose itself as busy. WHILE sending and stoppable are both true THE chat composer SHALL put in the send button's place a stop button — the one element in the stop slot, or, WHILE that slot is empty, a Button it brings: icon-only, of the size and the variant of the send button it brings, showing the stop glyph of the system's icon set, and named by stopLabel — enabled WHILE disabled is false; WHEN it is activated THE chat composer SHALL emit stop exactly once and SHALL change nothing itself: the product stops what is under way and sets sending. No key SHALL stop. WHEN the button in that place changes while it has focus THE chat composer SHALL keep focus on the button now there, or move it to the typing area WHERE that button is disabled."},{"id":"CCM-18","text":"WHILE maxLength is greater than 0 THE chat composer SHALL count the user-perceived characters of value (grapheme clusters: an emoji, or a letter with its accents, counts once) and SHALL keep the limit to itself — the embedded text input has none: it SHALL refuse no edit, shorten no paste and cut no value, during a composition or after it. WHILE the count is greater than maxLength THE chat composer SHALL hold the reason length (CCM-9), draw the capsule in its error condition and expose the typing area as invalid, as error does (CCM-27), and end both WHEN the count is within the limit again. IF maxLength is not a number above zero THE chat composer SHALL set no limit."},{"id":"CCM-19","text":"WHILE counter is true and disabled is false THE chat composer SHALL draw the counter at the place CCM-2 and CCM-3 name: the count of user-perceived characters in value, followed by a slash and maxLength WHILE maxLength is greater than 0, on one line in comp.chat-composer.counter.typescale and comp.chat-composer.counter.color, as text of its own direction isolated from the text around it, with digits of equal width so that the row does not shift as the number changes. WHILE the count is greater than maxLength it SHALL draw it in comp.chat-composer.counter.error.color; the two numbers say it without the color. THE chat composer SHALL give what the counter shows to the embedded text input as the first part of its description (ETI-13), and the counter SHALL NOT be a live region."},{"id":"CCM-20","text":"WHILE attachments is not none THE chat composer SHALL show each attachment as one File item in the strip, and as nothing else: the item's glyph by the file's format or its picture, its name, its second line, its bar while it is sent, and its retry and remove actions are drawn, exposed to assistive technology and answered as the File item says (FIT-1, FIT-4, FIT-5, FIT-6, FIT-10, FIT-11), from the File item's own tokens, with removeLabel and retryLabel as the names of its actions. THE chat composer SHALL decide only where the items stand (CCM-43) and, for the items it draws itself, which of the File item's own props they are given (CCM-44); it SHALL draw no second kind of attachment, SHALL NOT restyle an item, and SHALL NOT reorder the items or let a person reorder them: the order of the strip is the order given or kept, and reordering is a List's."},{"id":"CCM-21","text":"WHILE attachments is given THE chat composer SHALL keep no file and SHALL lay out the File items the product gives, in the order given, each with the form, the picture and every other prop the product gave it, changing none: WHEN files arrive — chosen in the picker, dropped (CCM-23) or pasted (CCM-24) — it SHALL have its file picker judge them and emit select and reject (FPK-9, FPK-31), and draw of them only what the product gives back as File items; WHEN an item's remove or retry action is activated the item emits remove or retry with its value (FIT-11) and THE chat composer SHALL change nothing itself."},{"id":"CCM-22","text":"WHILE attachments is own THE chat composer SHALL keep the files a person attaches itself. WHEN files arrive — chosen in its file picker and judged by it (FPK-9), or dropped on the capsule, pasted or handed over by the product, which it SHALL have its file picker judge by the same rule (FPK-31) — it SHALL first remove the File items of the files an earlier arrival refused; SHALL pass over, as if it had not arrived, a file that passed and that it already keeps; WHILE multiple is true SHALL keep each file that passed after the files it keeps, refusing with the reason count each one beyond the room maxFiles leaves, and WHILE multiple is false SHALL let go of the file it keeps and keep the new one in its place; SHALL draw each kept file as a File item given the file itself, whose name is the file's as the platform reports it (FIT-33) and whose status is pending, in the order it keeps them, and after them each file the arrival refused as a File item in error, not retryable and given no handle of the file, with the product's sentence for its reason as its errorText (typeErrorText, sizeErrorText or countErrorText); SHALL remove an item itself when its remove action is activated (FIT-11); SHALL hold of a file only the platform's own handle; and SHALL emit for one arrival select, then reject, then attachmentsChange, each once and only where it applies, and attachmentsChange once for a removal of a kept file. It SHALL offer the product, in the platform's idiom, the files it keeps, a way to hand it files — which it treats as an arrival, for a product whose own action in a slot makes a file (a photograph, a recording) — and a way to let go of them all. The file upload keeps its own files by the same rule, in sentences of its own: the chat composer holds no file upload and cites none of them."},{"id":"CCM-23","text":"WHILE attachments is not none and disabled is false, WHILE files are dragged over any part of the capsule THE chat composer SHALL draw the capsule as receiving — filled with comp.chat-composer.receiving.container.color, its edge comp.chat-composer.receiving.outline.width wide in comp.chat-composer.receiving.outline.color, at the capsule's own shape and inside its own box, in place of its resting, hovered, focused and error drawing — so that nothing moves and no second shape is drawn; WHEN the files are let go over it THE chat composer SHALL end the condition at once, take the drop so that the platform does not open or navigate to a file, and have the files judged exactly as a choice in the picker (FPK-31, CCM-21, CCM-22). WHILE what is dragged holds no file THE chat composer SHALL draw nothing for it and leave the drag to the typing area and the platform. Dragging SHALL never be the only way to attach: the attach button opens the picker by keyboard, by touch and through assistive technology."},{"id":"CCM-24","text":"WHEN the person pastes into the typing area WHILE attachments is not none and disabled is false, and what is pasted holds files and no plain text, THE chat composer SHALL take those files as an arrival (CCM-21, CCM-22) and insert nothing into the text. WHERE what is pasted holds plain text — with or without a file beside it, as a copied table carries a picture of itself — THE chat composer SHALL leave the paste to the typing area, which inserts the text, and SHALL take no file from it. WHILE attachments is none every paste SHALL be the typing area's."},{"id":"CCM-25","text":"WHEN the platform's picker closes with at least one file kept (attachments own) or handed to the product (attachments given) THE chat composer SHALL move focus to the typing area; WHEN it closes with nothing chosen, or with every file refused, THE chat composer SHALL leave focus on the attach button. A drop and a paste SHALL move focus nowhere. WHEN a File item leaves the strip while focus is in it — which the File item leaves to what holds it (FIT-30) — THE chat composer SHALL move focus to the remove action of the item that followed it, or of the item before it WHERE none follows, or to the typing area WHERE no item is left, so that a person who removes several files in a row goes on from where they were."},{"id":"CCM-26","text":"WHILE disabled is true THE chat composer SHALL disable every member as that member's own disabled does — the embedded text input (ETI-15), the attach button, the send or the stop button, and every File item (FIT-21) — and every Button in the leading and the trailing slot, giving each back as it was WHEN disabled becomes false and never enabling one the product disabled itself; SHALL draw the capsule from the disabled tokens of its condition (CCM-42); SHALL NOT draw the counter; SHALL take no drop and no paste of files and pass on no press on the capsule; SHALL emit no send, stop, sendBlocked, select, reject or attachmentsChange; and SHALL expose itself as disabled. The text, the File items and the files it keeps SHALL stay, readable by assistive technology."},{"id":"CCM-27","text":"WHILE error is true THE chat composer SHALL draw the capsule in its error condition — every state from the error tokens, its edge at rest in comp.chat-composer.error.outline.color, so that the capsule itself is marked and not only a text beside it (CCM-42) — and SHALL give error to the embedded text input, which exposes the typing area as invalid and draws nothing for it (ETI-14); it SHALL draw nothing else: the words of the error are a Field's or the product's. THE chat composer SHALL enter that condition itself only for the limit (CCM-18), SHALL never set its own error prop, and SHALL NOT hold a message back for error alone."},{"id":"CCM-28","text":"WHILE the chat composer is the control of a Field THE chat composer SHALL take from it what a Field gives its control (FLD-8, FLD-10, FLD-11, FLD-14) and pass it on to the embedded text input, which asks no Field itself (ETI-13): the Field's label as its own name and as the typing area's WHILE its own label is empty; the Field's supporting text with, in error, the error text after it as the last part of the typing area's description; error WHILE the Field is in error; and disabled WHILE the Field is disabled. It SHALL draw none of the Field's rows itself."},{"id":"CCM-29","text":"THE chat composer SHALL expose itself to assistive technology as a group named by label, holding, in the order they are drawn: WHILE there are File items, one list of them, each exposed as an item of that list (FIT-19); then, WHILE it is laid out inline (CCM-2), the attach button, the Buttons of the leading slot, the typing area — a text box of several lines named by label and described by the counter WHILE it is drawn (ETI-13) — the Buttons of the trailing slot, and the send or the stop button; and WHILE it is laid out stacked (CCM-3), the typing area, the send or the stop button, and then what the row beneath them holds: the attach button, the Buttons of the leading slot and the Buttons of the trailing slot; each a button named as CCM-6, CCM-7 and CCM-17 say. Tab and Shift+Tab SHALL move through them in the order of the layout it is drawn in, which is the order a person reads them in, each control one stop — the actions of each File item among them, in the order of the strip — and THE chat composer SHALL add no stop, no roving focus and no key of its own: Backspace and Delete in an empty typing area SHALL remove no attachment, and the arrow keys SHALL stay the typing area's, though the embedded text input lets what holds it take a key first (ETI-21). WHERE the visual size of a Button it brings is below the minimum target THE chat composer SHALL leave the hit area the Button extends to sys.target.touch for touch input and sys.target.pointer for fine pointers (BTN-5) uncovered by a neighbour and inside the capsule."},{"id":"CCM-30","text":"THE chat composer SHALL have exactly one live region, polite and never assertive, for itself and for every File item it holds, since a File item announces nothing (FIT-19), and SHALL announce through it, once each and in the product's words alone: announcement WHEN the product sets or changes it to a text that is not empty; WHILE attachments is given, WHEN a File item is added after the chat composer was first presented its name and its statusText, and WHEN an item's status becomes done or error its name and its statusText or errorText; WHILE attachments is own, for each arrival one message, in the order of the strip — the name of each file it newly kept and, for each refused file, its name and its sentence. It SHALL announce no progress and nothing of its own making — not that a message was sent, not why one cannot be, not a count: a sent message is told by the typing area standing empty under the focus (CCM-15, CCM-16), and anything more by the product's announcement."},{"id":"CCM-31","text":"THE chat composer SHALL have no words of its own: it SHALL take sendLabel, stopLabel, attachLabel, removeLabel, retryLabel, typeErrorText, sizeErrorText and countErrorText from the instance's prop and, WHILE that is empty, from the product's words of the keys sendLabel, stopLabel, attachLabel, removeLabel, retryLabel, fileTypeErrorText, fileSizeErrorText and fileCountErrorText, and every other word — label, placeholder, announcement, a File item's texts, the names of the product's own Buttons — from the product, and from nowhere else. IF neither gives a name to a button the chat composer brings THE chat composer SHALL draw the button without a name and in debug builds report a control that assistive technology cannot name as a functional failure; IF label is empty and no Field names it, likewise."},{"id":"CCM-32","text":"WHILE the text size is enlarged THE chat composer SHALL grow with its texts: the typing area and the File items as they say (ETI-24, FIT-24), the counter with its text, the Buttons as the Button says, the capsule with what it holds — its corners with the height of one line (CCM-41) — and comp.chat-composer.layout.inline-min-width and comp.chat-composer.layout.input-min-width with the text size, so that a composer whose text has doubled is laid out stacked sooner. At 200 % in a width of 320 CSS pixels, or the platform's equivalent, nothing SHALL be cut, overlap or need scrolling sideways: the typing area keeps the capsule's width but for the send button beside it, the row of actions beneath wraps (CCM-3), and the strip wraps, a row never wider than the strip and a tile never wider than it either (CCM-43)."},{"id":"CCM-33","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE chat composer SHALL draw the capsule on the platform's own background with an edge in the platform's text color, comp.chat-composer.outline.width wide, at rest — so that the capsule is still seen where its fill is taken away; in the platform's highlight color, at the focused width of comp.chat-composer.outline.width (CCM-42), WHILE the typing area has focus; in the platform's highlight color at twice comp.chat-composer.receiving.outline.width WHILE it is receiving; and in the platform's disabled text color WHILE disabled. In its error condition the edge SHALL stay the platform's text color: the typing area is exposed as invalid and the counter's two numbers still say the limit. THE counter SHALL be drawn in the platform's text color, and every member SHALL draw as it says there (ETI-23, FIT-25)."},{"id":"CCM-34","text":"WHERE the layout direction is right-to-left THE chat composer SHALL mirror its layout: the attach button and the leading actions at the right, the counter, the trailing actions and the send button at the left, with the send button outermost; in the stacked layout the send button at the left end of the typing area's line, and in the row beneath the attach button and the leading actions at the right and the counter and the trailing actions at the left; and the strip filled from the right, each line from right to left. It SHALL take its direction from where it is used and have no direction setting of its own; SHALL draw the send glyph through the icon helper, which mirrors a glyph the icon set marks as directional; and SHALL leave the direction of the text itself to the typing area, which sets each paragraph by its own first strong character (ETI-20)."},{"id":"CCM-35","text":"WHEN the capsule's fill or edge changes — between rest, hover, focus, the error condition, disabled and receiving — or the counter changes color, THE chat composer SHALL animate the change over comp.chat-composer.motion.state-duration with comp.chat-composer.motion.state-easing. THE capsule SHALL size itself to what it holds, so that its height follows the typing area's at every frame of the embedded text input's own change of height (ETI-8, ETI-10), with no duration, delay or curve of its own; its corners SHALL keep their radius throughout and its Buttons their distance from its bottom edge, or — the send button of the stacked layout — from the row beneath (CCM-2, CCM-3, CCM-41): the capsule's shape is never animated apart from its height. WHEN a File item is added to the strip or removed from it — by the person, by the product, or by the chat composer itself (CCM-15, CCM-22) — THE chat composer SHALL change the capsule's height to its new one in one motion over comp.chat-composer.motion.resize-duration with comp.chat-composer.motion.resize-easing, in its layout at every frame (MOT-5), anchored to the row of the typing area: the strip opens or closes between the items that stay and that row, so that the row of the typing area, its actions and its send button keep their place against the capsule's bottom edge, and the items that stay theirs against its top edge, at every frame — where the capsule's bottom edge stays where it is, as at the foot of a conversation, the row being written does not move at all — and nothing in the capsule scrolls; over the same motion an item that is added SHALL fade in at its place, an item that is removed SHALL fade out where it was drawn and then be gone, and an item that stays and whose place in the strip changes SHALL move to its new place. What a person and assistive technology are given SHALL change at once, not at the end of the motion: from the moment an item is removed it is out of the accessibility tree and the focus order and takes no press, and the strip's list and its count, what can be sent and the send button's state are those of the items there now (CCM-9, CCM-10, CCM-25, CCM-29). WHEN the send and the stop button change places (CCM-17) THE chat composer SHALL make the change at once — which button it is, its name, its action and whether it is enabled — and SHALL cross-fade only the glyph of the Button it brings, the one going out as the other comes in, in place, over comp.chat-composer.motion.glyph-fade-duration with comp.chat-composer.motion.state-easing; the send button's change between enabled and disabled (CCM-10) is that Button's own change of state and SHALL move as the Button's does, over its state motion. WHEN one of these changes comes while an earlier one moves THE chat composer SHALL go on from what is drawn — the height, each item's place and opacity, the glyphs' opacities (MOT-2). WHERE motion is reduced, and while the chat composer is first presented (MOT-3), THE chat composer SHALL make every one of these changes at once (MOT-6). A change between the inline and the stacked layout SHALL take effect at once."},{"id":"CCM-36","text":"WHERE the platform has forms that submit named values (the web) and the chat composer stands in one THE chat composer SHALL take part in it as one control: it SHALL submit value under its name and, WHILE attachments is own, every file it keeps under the name given for its files, WHILE it is not disabled; SHALL be disabled WHILE the form disables the set it is in; SHALL become empty WHEN the form is reset; and WHEN send has been emitted and the product has not cancelled it, SHALL ask the form to submit as a submit button of the platform's own does — the form's validation first, then its submit event, which the product may cancel (BTN-27). In a form THE chat composer SHALL NOT empty itself after send, whatever keepAfterSend says: a submission that leaves the page takes the composer with it, and a product that cancels the submission to send by itself empties the composer when it knows the message arrived (CCM-15)."},{"id":"CCM-37","text":"WHERE the platform shows markup before a component is defined (the web) THE chat composer SHALL let a product write, as its children, the platform's own text area and submit button, so that a form holding it works with no script: the person writes in the text area and the button submits the form. WHEN the chat composer is defined THE chat composer SHALL take the text the text area holds as its value WHILE its own value is empty, SHALL take the text area and the button out of what is drawn, out of the focus order, out of what assistive technology reads and out of what the form submits, and SHALL submit under its own name (CCM-36) from then on."},{"id":"CCM-38","text":"WHEN a prop of the chat composer or of a File item changes while it is shown THE chat composer SHALL draw and expose the new value at once, keeping its focus, the caret and the typing area's scroll position, and SHALL announce only what CCM-30 names. WHEN attachments names a value the chat composer does not know THE chat composer SHALL behave as none, and in debug builds report it; WHEN attachments changes between own and given THE chat composer SHALL let go of every file it keeps and remove every File item it drew itself, or stop drawing the product's items and begin with no kept file, emitting and announcing nothing for the change itself; and WHEN it becomes none SHALL let go of every file it keeps and draw no strip."},{"id":"CCM-39","text":"WHEN an on-screen keyboard opens, closes or changes its height THE chat composer SHALL NOT move, resize or scroll itself or the page for it: keeping the composer above the keyboard is the screen's, by the platform's own means, and the product's where it places the composer. THE chat composer SHALL leave the caret kept in view to the typing area (ETI-7) and SHALL NOT close a keyboard a person opened, WHEN a message is sent (CCM-16) or at any other time."},{"id":"CCM-40","text":"THE chat composer SHALL hold the text and the files it keeps for as long as it is shown and no longer: it SHALL NOT write a draft to any store, SHALL NOT restore one, and SHALL NOT read, copy or keep a file's content — the picture of a kept image is the File item's, made and let go of as it says (FIT-7). A product that keeps a draft across a reload or between conversations SHALL be able to do so from input and attachmentsChange and by setting value; WHERE the platform restores a form's controls itself (the web, on going back to a page) THE chat composer SHALL take the restored text and SHALL begin with no file."},{"id":"CCM-41","text":"THE chat composer SHALL draw the capsule as one container behind everything it holds: filled with the container color of its condition (comp.chat-composer.standard.container.color, or comp.chat-composer.error.container.color in error), lifted by the container elevation of its condition (comp.chat-composer.standard.container.elevation, comp.chat-composer.error.container.elevation), with an edge comp.chat-composer.outline.width wide in the outline color of its condition (comp.chat-composer.standard.outline.color, comp.chat-composer.error.outline.color), drawn inside its box so that no state moves what it holds. Its four corners SHALL have one radius: comp.chat-composer.container.shape, and never more than half the height the capsule has WHILE it is laid out inline with one line of text and no attachment — half of comp.chat-composer.container.height, or of more where enlarged text makes that line taller. WHILE that token is the full step a capsule of one line is therefore fully rounded, and a capsule that has grown — by lines, by attachments or by the stacked layout — SHALL keep exactly that radius: it SHALL NOT round further as it grows taller, SHALL NOT take another radius for a grown form, and SHALL clip nothing it holds, since the paddings of CCM-2, CCM-3 and CCM-43 keep the text, the Buttons and the File items inside its corners. THE chat composer SHALL ease the corners by sys.shape.corner-smoothing as a Button eases its own (BTN-10)."},{"id":"CCM-42","text":"THE chat composer SHALL answer focus with the capsule's edge, because the embedded text input draws no focus indication and leaves it to what holds it (ETI-11): WHILE the typing area has focus — given by the keyboard, a pointer, touch or the product alike — it SHALL draw the edge from the focused tokens of its condition — the focused width of comp.chat-composer.outline.width, in the focused color of comp.chat-composer.standard.outline.color (of comp.chat-composer.error.outline.color in error) — in place of a focus ring and with the container as at rest (the focused value of comp.chat-composer.standard.container.color), and WHERE sys.behavior.focus-style is glow SHALL also draw the glow around the capsule. WHILE focus is on a Button or inside a File item the capsule SHALL draw its resting edge and that control its own focus indication, so that focus is shown once. WHILE a pointer that can hover is over the capsule and disabled is false THE chat composer SHALL draw the capsule from the hovered tokens of its condition (the hovered value of comp.chat-composer.standard.container.color, in which the default system mixes comp.chat-composer.standard.state-layer.color into the fill, or of comp.chat-composer.error.container.color with comp.chat-composer.error.state-layer.color in error), as every box that is typed in answers hover; a Button or a File item under the pointer answers its own as well. THE capsule SHALL answer no press: it has no pressed tokens, draws no ripple and holds no pressed state, and a press on it only passes focus on (CCM-5). WHILE disabled is true it SHALL be drawn from the disabled tokens of its condition (the disabled values of comp.chat-composer.standard.container.color, comp.chat-composer.standard.outline.color and comp.chat-composer.outline.width, and the group's disabled opacity). WHERE more than one holds, the capsule SHALL be drawn as the first of: disabled, receiving (CCM-23), focused, hovered; the error condition recolors rest, hovered, focused and disabled alike."},{"id":"CCM-43","text":"WHILE it holds at least one File item THE chat composer SHALL lay the items out as a strip at the top of the capsule — comp.chat-composer.container.padding-block and comp.chat-composer.strip.padding-block-start below the capsule's top edge, comp.chat-composer.container.padding-inline from each inline edge, and comp.chat-composer.strip.offset above what follows — in the order given (CCM-21) or kept (CCM-22), from the start edge, comp.chat-composer.strip.gap apart: a File item of the tile form at the width and the height the File item gives it (FIT-3), beside its neighbours and aligned to the top of its line; a File item of the row form across a whole line of the strip (FIT-2), so that its name and its sentence have the strip's width. WHERE a line is full THE chat composer SHALL wrap the next tile onto a further line, comp.chat-composer.strip.gap below; it SHALL NOT scroll the strip sideways, cut or shrink an item, fold items into a count, or hide one — every attachment and its state stays in view, since one that is still on its way or has failed is what holds the message back (CCM-9). The strip SHALL grow the capsule, which keeps its corners (CCM-41); how many attachments one message may carry is the product's, by maxFiles."},{"id":"CCM-44","text":"WHILE attachments is own THE chat composer SHALL give each File item it draws the form attachmentForm names: tile; row; or, for auto, tile for a kept file whose kind the File item reads as image (FIT-5) and row for every other kept file. A file it refused (CCM-22) SHALL be a row whatever attachmentForm says: its sentence is why it is shown, and a row gives the sentence the strip's width. To a tile of an image it SHALL give preview and nameHidden, so that the File item draws the picture from the file on the person's own device and lets go of it itself (FIT-6, FIT-7, FIT-8) and the strip is one of pictures; to every other item it SHALL give neither, and THE chat composer SHALL itself read nothing of any file but what the platform reports. The File items it draws SHALL NOT be pressable and SHALL have the size the File item's own tokens give: a product that opens an attachment where it stands, or sizes its tiles, gives the items itself. WHILE attachments is given every prop of each item is the product's, set on the item, and attachmentForm SHALL NOT be read. WHEN attachmentForm names a value the chat composer does not know THE chat composer SHALL behave as auto, and in debug builds report the unknown value."},{"id":"CCM-45","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE chat composer SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on its group (CCM-29) — an id reference by the elements it names in the host's tree or a tree around it, a description after its own — except those the chat composer owns (aria-label, aria-labelledby, aria-busy, aria-disabled, aria-invalid, aria-errormessage), which it SHALL move and not expose: its name is label, its busy state is sending and its other states are its props (CCM-29). WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE chat composer SHALL take it off that element. WHEN the product sets an aria- attribute the chat composer owns THE chat composer SHALL report it in debug builds."}],"accessibility":{"role":"group","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves through the chat composer in the order it is drawn: the actions of each File item in the strip's order, then — inline — the attach button, the leading actions, the typing area, the trailing actions and the send or the stop button; stacked, the typing area, the send or the stop button beside it, and then the row beneath: the attach button, the leading actions and the trailing actions. A disabled send button is not a stop, as no disabled Button is."},{"keys":"Enter","action":"In the typing area, on a hardware keyboard: sends while sendKey is enter, and begins a new line while it is modifier. Never while an input method is composing: that Enter is the input method's. On an on-screen keyboard the return key begins a new line."},{"keys":"Shift+Enter","action":"In the typing area: begins a new line under both values of sendKey."},{"keys":"Control+Enter / Command+Enter","action":"In the typing area: sends, under both values of sendKey."},{"keys":"Enter or Space","action":"On a Button: what that Button does — sends, stops, opens the platform's file picker, removes or retries an attachment, or the product's own action."},{"keys":"The typing area's own keys","action":"Everything else in the typing area — moving the caret, selecting, the input method, undo, Backspace and Delete — is the platform's text element's. No key in the typing area removes an attachment."}],"labeling":"A group named by label, or by the label of the Field around it. The typing area is a text box of several lines with the same name — the embedded text input has no name of its own and takes it from the chat composer — described by the counter while it is drawn and by the Field's help and, in error, its error text, and exposed as invalid while error is true or the text is over the limit. The send, stop and attach buttons the chat composer brings are named by sendLabel, stopLabel and attachLabel; a Button of the product's keeps its own name. The attachments are one list, each read as an item of that list (FIT-19), its actions named by removeLabel and retryLabel with the file's name in them. One polite live region says the product's announcement and what changed among the attachments; the chat composer has no words of its own.","minimumTarget":true,"notes":["The capsule is the focus indication of the typing area (CCM-42): the embedded text input draws none (ETI-11), so the chat composer must, and it does so for every focus of the typing area — keyboard, pointer or touch — as a text box does. The focused edge is held to 3:1 against the capsule's fill and against the surface around it, as the search bar's is (WCAG 2.4.7, 1.4.11). A Button or a File item's action inside the capsule shows its own focus ring, and the capsule is then at rest: focus is never shown twice, and the ring is never clipped by the capsule, whose paddings leave it room.","A press on the capsule where no control is moves focus to the typing area and does nothing else (CCM-5): the capsule is the box of the text, as a text input's container is, and not a pressable control. It answers hover as every box that is typed in does and has no pressed state, and so the chat composer copies no press sentence of the Button for its own name. Every press that acts is on a Button or on a File item's action, and is answered as BTN-8, BTN-9 and BTN-10 and FIT-15 and FIT-16 say.","The group and the typing area carry the same name: a person who tabs to the typing area hears it once as the group is entered and once on the text box. A second name for the group is left out: it would be one more word for every product to write, for a group whose every other control names itself.","A send button that cannot send is a disabled Button, out of the focus order (CCM-10). What holds the message back is never said by the button: it is on the counter, whose two numbers say it without color (CCM-19); on the File item that is still on its way or has failed, in the product's words (CCM-20); and, for the product's own reasons, in the product's words beside the composer. A person on the keyboard who asks to send anyway is answered through sendBlocked and announcement (CCM-14).","Sending is told without a word of Tanrei's: the typing area stands empty and focus is in it (CCM-15, CCM-16). A product that wants a sentence sets announcement (\"Message sent\") in its send handler; one whose sending can fail says so itself, and with keepAfterSend the text is still there to send again.","While sending is true the group is exposed as busy; the typing area stays a text box that can be written in. The stop button is a Button with its own name, never a state of the send button.","An input method's Enter never sends (CCM-13). This is a functional requirement of every language written through composition, not a refinement: a composer that sends on the Enter that chooses a candidate cannot be written in.","The strip wraps and never scrolls sideways (CCM-43): no attachment is under an edge, every File item's actions are in view when focus reaches them (WCAG 2.4.7, 2.4.11), and at 200 % text in a width of 320 nothing needs scrolling in two directions (WCAG 1.4.10). The actions of the File items are Tab stops before the typing area, in the order drawn (WCAG 1.3.2, 2.4.3); a person who wants the text reaches it at once because focus() on the chat composer, a press on the capsule, sending and attaching all go to the typing area (CCM-5, CCM-16, CCM-25).","A tile of a picture does not draw the file's name (CCM-44, FIT-8); the name stays the item's name for assistive technology, is drawn wherever no picture is, and an error's sentence is drawn beneath a tile in every case (FIT-4). A file the chat composer refused is still always a row (CCM-44): a sentence under a tile has the tile's width, and a row gives it the strip's.","Dragging and pasting are never the only way to attach (WCAG 2.5.7): the attach button opens the same picker by keyboard, touch, switch and voice (CCM-23). What is dragged over the composer is the pointer user's own act and is not announced.","Status is never color alone (WCAG 1.4.1): a File item has its words and a glyph that changes shape; the counter over the limit has its two numbers; the capsule in error has its edge where at rest it has none, and the typing area is exposed as invalid.","The chat composer moves focus only where a control under the focus has gone or the person's act has ended: to the typing area after sending and after attaching, and to a neighbouring File item's remove action after an item is removed (CCM-25).","Without script, and until the component is defined, on the web: the product's own text area and submit button inside the element are a working form (CCM-37). The text area needs its own accessible name (aria-label, or a label element), since the composer's label is not yet read. The capsule is not drawn until then.","A fixture whose attachments is own and that holds file items cannot be drawn from props alone: each file item stands for one file the stage hands over, in order, by the platform's way of CCM-22, before anything is recorded — an image file of the stage's own for a name that ends in an image's extension. A file item of such a fixture sets no form: CCM-44 chooses it. A fixture's string in the attach slot is a glyph in an icon-only Button of the text variant; in the send and the stop slot, a labelled Button of the filled variant.","The members' sentences are cited by their ids: ETI (the embedded text input), FIT (the File item) and FPK (the File picker). No sentence of the file upload is cited: the chat composer keeps its own files by the rule the file upload keeps its own by, said here in sentences of its own (CCM-22, CCM-38), because the file upload is not held and a sentence is cited only from a member. The holder's contract of the embedded text input (H1 to H7) is met by sentences of this spec: H1 the box, CCM-41; H2 the focus indication, CCM-42; H3 the mark of an error and the disabled look, CCM-27 and CCM-42; H4 the padding and the press passed on, CCM-2, CCM-3 and CCM-5; H5 the name and the description, CCM-19, CCM-28 and CCM-29; H6 what the action is, CCM-12; H7 forced colors, CCM-33."]},"tokens":"comp.chat-composer","fixtures":[{"id":"inline-empty","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send"}},{"id":"stacked-empty","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","layout":"stacked","attachments":"own","attachLabel":"Attach files"}},{"id":"inline-typed","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","value":"Could you send the floor plan before Friday?"}},{"id":"stacked-typed","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","value":"Could you send the floor plan before Friday?","layout":"stacked","attachments":"own","attachLabel":"Attach files"}},{"id":"inline-lines-at-maximum","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","maxRows":6,"value":"Notes from the site visit:\n1. The north wall is two metres short of the drawing.\n2. The survey marks are missing on the east side.\n3. Access is through the yard until the gate is repaired.\n4. Power is on from Tuesday.\n5. The neighbour asked about working hours.\n6. Deliveries before nine only.\n7. Keys are with the caretaker.\n8. Next visit on the 14th."}},{"id":"stacked-lines-at-maximum","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","maxRows":6,"value":"Notes from the site visit:\n1. The north wall is two metres short of the drawing.\n2. The survey marks are missing on the east side.\n3. Access is through the yard until the gate is repaired.\n4. Power is on from Tuesday.\n5. The neighbour asked about working hours.\n6. Deliveries before nine only.\n7. Keys are with the caretaker.\n8. Next visit on the 14th.","layout":"stacked","attachments":"own","attachLabel":"Attach files"}},{"id":"inline-image-tiles","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"Three photographs from the site."},"items":[{"kind":"file","props":{"value":"p1","name":"site-north.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-1.png"}},{"kind":"file","props":{"value":"p2","name":"site-east.png","sizeText":"1.8 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-2.png"}},{"kind":"file","props":{"value":"p3","name":"floor-plan.png","sizeText":"3.4 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}]},{"id":"stacked-image-tiles","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"Three photographs from the site.","layout":"stacked"},"items":[{"kind":"file","props":{"value":"p1","name":"site-north.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-1.png"}},{"kind":"file","props":{"value":"p2","name":"site-east.png","sizeText":"1.8 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-2.png"}},{"kind":"file","props":{"value":"p3","name":"floor-plan.png","sizeText":"3.4 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}]},{"id":"inline-file-rows","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","value":"The brief and the survey are attached."},"items":[{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}},{"kind":"file","props":{"name":"survey.csv","sizeText":"64 KB"}}]},{"id":"stacked-file-rows","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","value":"The brief and the survey are attached.","layout":"stacked"},"items":[{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}},{"kind":"file","props":{"name":"survey.csv","sizeText":"64 KB"}}]},{"id":"inline-uploading","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"The two drawings are attached."},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"b","name":"floor-plan.png","sizeText":"3.4 MB","status":"uploading","statusText":"Uploading","progress":0.4,"form":"tile","preview":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}]},{"id":"stacked-uploading","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"The two drawings are attached.","layout":"stacked"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"b","name":"floor-plan.png","sizeText":"3.4 MB","status":"uploading","statusText":"Uploading","progress":0.4,"form":"tile","preview":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}]},{"id":"inline-failed","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"The two drawings are attached."},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"e","name":"site-photo.png","sizeText":"6.8 MB","status":"error","errorText":"The connection was lost","retryable":true}},{"kind":"file","props":{"value":"f","name":"survey.mov","sizeText":"48 MB","status":"error","errorText":"Larger than 10 MB"}}]},{"id":"stacked-failed","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","value":"The two drawings are attached.","layout":"stacked"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"e","name":"site-photo.png","sizeText":"6.8 MB","status":"error","errorText":"The connection was lost","retryable":true}},{"kind":"file","props":{"value":"f","name":"survey.mov","sizeText":"48 MB","status":"error","errorText":"Larger than 10 MB"}}]},{"id":"inline-over-limit","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","maxLength":80,"counter":true,"value":"Could you send the floor plan, the survey and the signed forms before Friday, and tell me who holds the keys to the yard?"}},{"id":"stacked-over-limit","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","maxLength":80,"counter":true,"value":"Could you send the floor plan, the survey and the signed forms before Friday, and tell me who holds the keys to the yard?","layout":"stacked"}},{"id":"inline-disabled","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","disabled":true,"attachments":"given","counter":true,"value":"The two drawings are attached."},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}}],"slots":{"leading":["mood"]}},{"id":"stacked-disabled","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","disabled":true,"attachments":"given","counter":true,"value":"The two drawings are attached.","layout":"stacked"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}}],"slots":{"leading":["mood"]}},{"id":"inline-sending","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","sending":true,"value":"And one more thing"}},{"id":"stacked-sending","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","sending":true,"value":"And one more thing","layout":"stacked","attachments":"own","attachLabel":"Attach files"}},{"id":"inline-stoppable","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","stopLabel":"Stop","sending":true,"stoppable":true}},{"id":"stacked-stoppable","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","stopLabel":"Stop","sending":true,"stoppable":true,"layout":"stacked","attachments":"own","attachLabel":"Attach files"}},{"id":"inline-rtl","direction":"rtl","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","maxLength":280,"counter":true,"value":"Could you send the floor plan before Friday?"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"b","name":"floor-plan.png","sizeText":"3.4 MB","status":"uploading","statusText":"Uploading","progress":0.4,"form":"tile","preview":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}],"slots":{"leading":["alternate_email"],"trailing":["mic"]}},{"id":"stacked-rtl","direction":"rtl","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","maxLength":280,"counter":true,"value":"Could you send the floor plan before Friday?","layout":"stacked"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf","sizeText":"820 KB","status":"done","statusText":"Uploaded"}},{"kind":"file","props":{"value":"b","name":"floor-plan.png","sizeText":"3.4 MB","status":"uploading","statusText":"Uploading","progress":0.4,"form":"tile","preview":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}}],"slots":{"leading":["alternate_email"],"trailing":["mic"]}},{"id":"inline-actions","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachments":"own","attachLabel":"Attach files"},"slots":{"leading":["alternate_email","mood"],"trailing":["mic"]}},{"id":"stacked-actions","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachments":"own","attachLabel":"Attach files","layout":"stacked"},"slots":{"leading":["alternate_email","mood"],"trailing":["mic"]}},{"id":"counter","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","maxLength":280,"counter":true,"value":"Could you send the floor plan before Friday?"}},{"id":"blocked","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","blocked":true,"value":"Could you send the floor plan before Friday?"}},{"id":"error","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","error":true,"value":"Could you send the floor plan before Friday?"}},{"id":"own-image-tiles","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","value":"Two photographs and the brief."},"items":[{"kind":"file","props":{"name":"site-north.png","sizeText":"2.1 MB"}},{"kind":"file","props":{"name":"site-east.png","sizeText":"1.8 MB"}},{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}}]},{"id":"form-tile","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","attachmentForm":"tile"},"items":[{"kind":"file","props":{"name":"site-north.png","sizeText":"2.1 MB"}},{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}},{"kind":"file","props":{"name":"survey.csv","sizeText":"64 KB"}}]},{"id":"form-row","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","attachmentForm":"row"},"items":[{"kind":"file","props":{"name":"site-north.png","sizeText":"2.1 MB"}},{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}}]},{"id":"attachments-refused","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"own","accept":[".pdf",".png"],"typeErrorText":"Only PDF and PNG files can be added.","value":"Here is the brief."},"items":[{"kind":"file","props":{"name":"brief.pdf","sizeText":"820 KB"}},{"kind":"file","props":{"name":"holiday.mov","sizeText":"48 MB"}}]},{"id":"tiles-wrapped","props":{"label":"Message","placeholder":"Write a message","sendLabel":"Send","attachLabel":"Attach files","removeLabel":"Remove {name}","attachments":"given","retryLabel":"Retry {name}","layout":"stacked"},"items":[{"kind":"file","props":{"value":"p1","name":"site-01.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-2.png"}},{"kind":"file","props":{"value":"p2","name":"site-02.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}},{"kind":"file","props":{"value":"p3","name":"site-03.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-1.png"}},{"kind":"file","props":{"value":"p4","name":"site-04.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-2.png"}},{"kind":"file","props":{"value":"p5","name":"site-05.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}},{"kind":"file","props":{"value":"p6","name":"site-06.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-1.png"}},{"kind":"file","props":{"value":"p7","name":"site-07.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-2.png"}},{"kind":"file","props":{"value":"p8","name":"site-08.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-3.png"}},{"kind":"file","props":{"value":"p9","name":"site-09.png","sizeText":"2.1 MB","status":"done","statusText":"Uploaded","form":"tile","preview":true,"nameHidden":true,"previewSrc":"fixtures/chat-composer-photo-1.png"}}]},{"id":"own-buttons","props":{"label":"Message","placeholder":"Write a message","attachments":"own","layout":"stacked","value":"Could you send the floor plan before Friday?"},"slots":{"attach":"add","send":"Send"}},{"id":"long-text","props":{"label":"Message to everyone on the municipal planning application","placeholder":"Write what you want every member of the planning group to read before the meeting","sendLabel":"Send","attachments":"given","attachLabel":"Attach files","removeLabel":"Remove {name}","retryLabel":"Retry {name}","maxLength":2000,"counter":true,"value":"Thesupportingstatementforthemunicipalplanningapplicationisattachedinitsfourteenthrevision, signed by all parties."},"items":[{"kind":"file","props":{"value":"a","name":"municipal-planning-application-supporting-statement-revision-14-final-signed-by-all-parties.pdf","sizeText":"9.6 MB","status":"uploading","statusText":"Uploading over a slow connection","progress":0.72}}],"slots":{"leading":["alternate_email","mood","format_bold","format_list_bulleted"],"trailing":["mic"]}},{"id":"without-words","props":{"attachments":"given"},"items":[{"kind":"file","props":{"value":"a","name":"brief.pdf"}},{"kind":"file","props":{"value":"e","name":"site-photo.png","status":"error","retryable":true}}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-chat-composer","props":{"value":"value","label":"label","placeholder":"placeholder","layout":"layout","minRows":"minRows","maxRows":"maxRows","maxLength":"maxLength","counter":"counter","sendKey":"sendKey","attachments":"attachments","attachmentForm":"attachmentForm","multiple":"multiple","accept":"accept","maxSize":"maxSize","maxFiles":"maxFiles","sending":"sending","stoppable":"stoppable","blocked":"blocked","keepAfterSend":"keepAfterSend","disabled":"disabled","error":"error","sendLabel":"sendLabel","stopLabel":"stopLabel","attachLabel":"attachLabel","removeLabel":"removeLabel","retryLabel":"retryLabel","typeErrorText":"typeErrorText","sizeErrorText":"sizeErrorText","countErrorText":"countErrorText","announcement":"announcement"},"events":{"input":"input","send":"send","stop":"stop","sendableChange":"sendablechange","sendBlocked":"sendblocked","select":"select","reject":"reject","attachmentsChange":"attachmentschange"},"items":{"file":{"name":"tanrei-file-item","props":{"value":"value","name":"name","sizeText":"sizeText","status":"status","statusText":"statusText","progress":"progress","errorText":"errorText","retryable":"retryable","form":"form","preview":"preview","previewSrc":"previewSrc","nameHidden":"nameHidden","width":"width","height":"height"},"events":{"remove":"remove","retry":"retry"},"notes":"The File item's own element, written by the product as a child of the chat composer in its default slot while `attachments=\"given\"`; it stays the product's light DOM and is laid out by the strip. Attributes as the File item's (`size-text`, `status-text`, `error-text`, `preview-src`, `name-hidden`, `form`; `progress` absent for null). `remove` and `retry` bubble and are composed, with `detail.value`. While `attachments` is `own` the chat composer renders the File items itself, in its shadow root, and sets each one's `file` property to the kept `File`."}},"parts":{"container":"container","strip":"strip","input":"embedded-text-input","attach-button":"attach-button","leading-actions":"slot:leading","trailing-actions":"slot:trailing","counter":"counter","send-button":"send-button","drop-indicator":"container"},"notes":"Planned; built after the embedded text input, the File picker and the File item. The shadow-root form, composed as every composed web element is: its members' own custom elements in its shadow root, beside its own parts. The shadow root holds the capsule — `<div part=\"container\">`, the chat composer's own — and inside it the strip (`part=\"strip\"`, a wrapping flex row holding a default `<slot>` for the product's File items and the `<tanrei-file-item>`s the composer renders itself), `<tanrei-file-picker>` around its trigger, `<tanrei-embedded-text-input multiline>`, the counter (`part=\"counter\"`), `<tanrei-button>` for send or stop, and the live region. `<tanrei-chat-composer label=\"Message\" placeholder=\"Write a message\" send-label=\"Send\" attachments=\"own\" attach-label=\"Attach files\" remove-label=\"Remove\" max-length=\"2000\" counter name=\"message\" files-name=\"files\"><tanrei-button slot=\"leading\" variant=\"text\" label=\"Mention someone\"><span slot=\"icon\">alternate_email</span></tanrei-button></tanrei-chat-composer>`. React: `ChatComposer` from the React package, `onSend`, `onStop`, `onSendableChange`, `onSendBlocked`, `onSelect`, `onReject`, `onAttachmentsChange`, `onInput`. Attributes are kebab-case (`send-key`, `max-rows`, `keep-after-send`, `attachment-form`); `accept` is a comma-separated list. Slots: `leading`, `trailing`, `attach`, `send`, `stop` are named slots and the default slot takes the File items (`attachments=\"given\"`); all stay in the product's light DOM. The capsule: `border-radius: min(var(--…-container-shape), calc(H / 2))` where `H` is the one-line height — `max(var(--…-container-height), 1lh + 2 * input.padding-block + 2 * container.padding-block)`, with `1lh` taken in the embedded text input's text style (the composer reads the member's computed line height, never its token) — so the radius does not depend on the capsule's present height; the edge is an inset `box-shadow` or an `outline` with a negative offset, never a border that changes width, so that no state moves the content. The focused edge is a state the composer sets from the embedded text input's own `focusin` and `focusout` (ETI-11), not `:host(:focus-within)` alone, which would also hold while a Button or a File item's action has focus. A `pointerdown` on the capsule whose target is the capsule itself, the strip's own gaps or the paddings is passed on to the embedded text input by the way it offers what holds it (ETI-12), and its default is prevented so that focus is not taken away again. Tokens reach the members by inheritance and the element writes none of a member's custom properties; a product sets one composer apart with a custom property on the element. Parts: `container`, `strip`, `counter` are its own; the members' documented parts are exported prefixed by the member (`input-…`, `attach-…`, `send-…`). Focus: the shadow root does not delegate focus (the capsule holds File items and a counter a press must not act on); `focus()` is overridden to go to the typing area. Keys (CCM-12, CCM-13): the composer has no `keydown` listener that sends. It sets `enter-key=\"action\"` on the embedded text input while `send-key` is `enter` and `enter-key=\"line-break\"` while it is `modifier`, and asks to send on the input's `action`; the composition, the engines that report the committing Enter late, and the guess that stands for an on-screen keyboard (`(pointer: coarse) and (hover: none)`) are all the embedded text input's (ETI-4, ETI-6), so a tablet with a keyboard attached sends with Control+Enter or Command+Enter and with the send button. Where the message cannot be sent the composer still takes the `action` (CCM-14) and inserts nothing. Events are CustomEvents that bubble and are composed: `send` has `detail.value` and `detail.attachments` (a `File[]` while `own`, a `string[]` of item values while `given`) and is cancelable — cancelling it keeps the content for this one message and requests no form submission; `sendablechange` and `sendblocked` have `detail.sendable` and `detail.reasons`; `select`, `reject` as the file picker's; `attachmentschange` has `detail.files`. The embedded text input's `action`, `change` and `rowschange` are stopped at the shadow root; its `input` leaves as it is. Methods: `clear()`, `addFiles(files)` (answers the refused files and their reasons), the read-only `files`. Drop (CCM-23): `dragenter`, `dragover`, `dragleave` and `drop` on the host, counting enters and leaves, read only while `DataTransfer.types` holds `Files`; the files are handed to the file picker to judge (FPK-31). Paste (CCM-24): the `paste` event from the typing area; files are taken only while `clipboardData.files` is not empty and `clipboardData.getData(\"text/plain\")` is. Pictures (CCM-44): the composer makes no object URL; it sets `file`, `preview` and `name-hidden` on the File item of a kept image, and the File item makes and revokes the address itself (FIT-7). The strip is `role=\"list\"`, and each File item is told it is an item of a list by the channel the File upload uses for its own (FIT-19) — the product's slotted items too. A File item of the row form has `flex: 1 0 100%`; a tile `flex: none`. Motion (CCM-35): the strip stands in a box of its own whose height follows its items (`AnimatedSize`, anchored at its start), and the items fade and move by `animate()`; while one of the product's File items leaves, the product's own element is put back where it stood, as its child, `inert`, `aria-hidden=\"true\"` and `data-leaving`, until its fade has ended, and is then removed and given back what it had — a script that reads the children meanwhile selects `tanrei-file-item:not([data-leaving])`. The glyph of the Button it brings in the send button's place cross-fades with a copy of the one that goes out, laid over it in the Button's icon slot. Form-associated (CCM-36): the composer has no single value member — it is a feature — so it sets its own form value: `setFormValue` receives a `FormData` with the text under `name` and one entry per kept file under `files-name`; `form.requestSubmit()` after `send`; `formResetCallback` empties; `formStateRestoreCallback` restores the text. Without script (CCM-37): `<form method=\"post\" action=\"/messages\"><tanrei-chat-composer name=\"message\" label=\"Message\" send-label=\"Send\"><textarea name=\"message\" aria-label=\"Message\" rows=\"3\"></textarea><button type=\"submit\">Send</button></tanrei-chat-composer></form>` — until the element is defined these two children are the form, drawn as the page's own styles draw them and with no capsule; once it is, they are not slotted (they are neither a File item nor in a named slot), the text area's text becomes the value, and both are set `disabled` and `hidden` so that the form submits the composer alone. A file cannot be attached without script: a page that must take files there adds the platform's own `<input type=\"file\" name=\"files\" multiple>` beside the text area, which the composer takes out in the same way. The layout of CCM-4 is a container query on the capsule. One level down, by hand — the product draws the box, since the capsule cannot be taken separately: `<div class=\"my-composer\" role=\"group\" aria-label=\"Message\"><ul class=\"strip\"><li><tanrei-file-item value=\"a\" name=\"brief.pdf\" size-text=\"820 KB\" remove-label=\"Remove\"></tanrei-file-item></li></ul><div class=\"row\"><tanrei-file-picker multiple><tanrei-button slot=\"trigger\" variant=\"text\" label=\"Attach files\"><span slot=\"icon\">attach_file</span></tanrei-button></tanrei-file-picker><tanrei-embedded-text-input label=\"Message\" multiline max-rows=\"6\" enter-key=\"action\"></tanrei-embedded-text-input><tanrei-button label=\"Send\" disabled><span slot=\"icon\">send</span></tanrei-button></div></div>`, with `.my-composer:has(tanrei-embedded-text-input:focus-within)` drawing the focus indication the embedded text input leaves to its holder, the row a flex row whose items align to its end edge, and a listener on the input's `action` that sends."},"swiftui":{"status":"planned","name":"TanreiChatComposer","props":{"value":"text","label":"label","placeholder":"prompt","layout":"layout","minRows":"lineLimit","maxRows":"lineLimit","maxLength":"maxLength","counter":"counter","sendKey":"sendKey","attachments":"attachments","attachmentForm":"attachmentForm","multiple":"allowsMultipleSelection","accept":"allowedContentTypes","maxSize":"maxSize","maxFiles":"maxFiles","sending":"isSending","stoppable":"isStoppable","blocked":"isBlocked","keepAfterSend":"keepsContentAfterSend","disabled":"disabled","error":"isError","sendLabel":"sendLabel","stopLabel":"stopLabel","attachLabel":"attachLabel","removeLabel":"removeLabel","retryLabel":"retryLabel","typeErrorText":"typeErrorText","sizeErrorText":"sizeErrorText","countErrorText":"countErrorText","announcement":"announcement"},"events":{"input":"text","send":"onSend","stop":"onStop","sendableChange":"onSendableChange","sendBlocked":"onSendBlocked","select":"onSelect","reject":"onReject","attachmentsChange":"onAttachmentsChange"},"items":{"file":{"name":"TanreiFileItem","props":{"value":"id","name":"name","sizeText":"sizeText","status":"status","statusText":"statusText","progress":"progress","errorText":"errorText","retryable":"isRetryable","form":"form","preview":"showsPreview","previewSrc":"previewURL","nameHidden":"isNameHidden","width":"width","height":"height"},"events":{"remove":"onRemove","retry":"onRetry"},"notes":"A value in the `attachments` array, identified by `id`. Passed only while the product gives the File items."}},"notes":"Planned. `TanreiChatComposer(\"Message\", text: $text, onSend: { message in … }) { leading } trailing: { … }`: a view that draws the capsule itself (a background shape whose corner radius is the lesser of the token and half the one-line height) and holds `TanreiEmbeddedTextInput`, `TanreiFilePicker`, `TanreiFileItem`s in a wrapping layout, and `TanreiButton`. `minRows` and `maxRows` are one `lineLimit(1...6)`. `attachments` is `.none`, `.own` or `.given([TanreiFileItem.Model])`. `sendKey` sets the embedded text input's `enterKey`, and its `onSubmit` is the request to send (ETI-6); marked text (`NSTextInputClient`, `UITextInput.markedTextRange`) is the composition of CCM-13. The focused edge follows a `@FocusState` of the typing area. The drop is `dropDestination(for: URL.self)` on the whole capsule with its `isTargeted` binding; the paste of files is `onPasteCommand(of:)` on macOS and the text view's paste configuration on iOS. A kept image's picture is the File item's to draw, from the file it is given (FIT-7). `keepAfterSend` with a `TanreiChatComposerState` whose `clear()`, `add(urls)` and `files` are CCM-15 and CCM-22. Keeping the composer above the keyboard is the screen's: `safeAreaInset(edge: .bottom)` and the system's keyboard avoidance. No form."},"compose":{"status":"planned","name":"TanreiChatComposer","props":{"value":"value","label":"contentDescription","placeholder":"placeholder","layout":"layout","minRows":"minLines","maxRows":"maxLines","maxLength":"maxLength","counter":"counter","sendKey":"sendKey","attachments":"attachments","attachmentForm":"attachmentForm","multiple":"multiple","accept":"mimeTypes","maxSize":"maxSize","maxFiles":"maxFiles","sending":"sending","stoppable":"stoppable","blocked":"blocked","keepAfterSend":"keepAfterSend","disabled":"enabled","error":"isError","sendLabel":"sendContentDescription","stopLabel":"stopContentDescription","attachLabel":"attachContentDescription","removeLabel":"removeContentDescription","retryLabel":"retryContentDescription","typeErrorText":"typeErrorText","sizeErrorText":"sizeErrorText","countErrorText":"countErrorText","announcement":"announcement"},"events":{"input":"onValueChange","send":"onSend","stop":"onStop","sendableChange":"onSendableChange","sendBlocked":"onSendBlocked","select":"onSelect","reject":"onReject","attachmentsChange":"onAttachmentsChange"},"items":{"file":{"name":"TanreiFileItem","props":{"value":"key","name":"name","sizeText":"sizeText","status":"status","statusText":"statusText","progress":"progress","errorText":"errorText","retryable":"retryable","form":"form","preview":"showPreview","previewSrc":"previewModel","nameHidden":"nameHidden","width":"width","height":"height"},"events":{"remove":"onRemove","retry":"onRetry"},"notes":"A value in the `attachments` list, identified by `key`. Passed only while the product gives the File items."}},"notes":"Planned. `TanreiChatComposer(value = text, onValueChange = { text = it }, onSend = { message -> … }, leading = { … }, trailing = { … })`: a composable that draws the capsule itself (a `Surface` whose shape's radius is the lesser of the token and half the one-line height) and holds `TanreiEmbeddedTextInput`, `TanreiFilePicker`, `TanreiFileItem`s in a `FlowRow`, and `TanreiButton`. `disabled` is the inverse flag `enabled`. `sendKey` sets the embedded text input's `enterKey`, and its `onAction` is the request to send (ETI-6); `TextFieldValue.composition` not null is the composition of CCM-13. The focused edge follows the typing area's `onFocusChanged`. The drop is `Modifier.dragAndDropTarget` on the whole capsule; the paste of files is the text field's `receiveContent`. A kept image's picture is the File item's to draw, from the file it is given (FIT-7). `rememberTanreiChatComposerState()` holds `files`, `add(uris)` and `clear()`. Keeping the composer above the keyboard is the screen's: `Modifier.imePadding()` where the product places it. No form."},"flutter":{"status":"planned","name":"TanreiChatComposer","props":{"value":"controller","label":"semanticLabel","placeholder":"hintText","layout":"layout","minRows":"minLines","maxRows":"maxLines","maxLength":"maxLength","counter":"showCounter","sendKey":"sendKey","attachments":"attachments","attachmentForm":"attachmentForm","multiple":"multiple","accept":"accept","maxSize":"maxSize","maxFiles":"maxFiles","sending":"sending","stoppable":"stoppable","blocked":"blocked","keepAfterSend":"keepAfterSend","disabled":"enabled","error":"isError","sendLabel":"sendSemanticLabel","stopLabel":"stopSemanticLabel","attachLabel":"attachSemanticLabel","removeLabel":"removeSemanticLabel","retryLabel":"retrySemanticLabel","typeErrorText":"typeErrorText","sizeErrorText":"sizeErrorText","countErrorText":"countErrorText","announcement":"announcement"},"events":{"input":"onChanged","send":"onSend","stop":"onStop","sendableChange":"onSendableChanged","sendBlocked":"onSendBlocked","select":"onSelect","reject":"onReject","attachmentsChange":"onAttachmentsChanged"},"items":{"file":{"name":"TanreiFileItem","props":{"value":"key","name":"name","sizeText":"sizeText","status":"status","statusText":"statusText","progress":"progress","errorText":"errorText","retryable":"retryable","form":"form","preview":"showPreview","previewSrc":"previewImage","nameHidden":"nameHidden","width":"width","height":"height"},"events":{"remove":"onRemove","retry":"onRetry"},"notes":"A value in the `attachments` list, identified by `id`. Passed only while the product gives the File items."}},"notes":"Planned. `TanreiChatComposer(controller: controller, semanticLabel: \"Message\", onSend: (message) { … }, leading: [ … ], trailing: [ … ])`: a widget that draws the capsule itself (a `DecoratedBox` whose radius is the lesser of the token and half the one-line height) and holds `TanreiEmbeddedTextInput`, `TanreiFilePicker`, `TanreiFileItem`s in a `Wrap`, and `TanreiButton`. `value` is the `TextEditingController`; `disabled` is the inverse flag `enabled`. `sendKey` sets the embedded text input's `enterKey`, and its `onAction` is the request to send (ETI-6); `controller.value.composing` valid is the composition of CCM-13. The focused edge follows the typing area's `FocusNode`. The framework has no picker and no drop target for files: `onPick` and the controller's `dragEntered / dragExited / dropped(files)` are the file picker's, as its notes say. A kept image's picture is the File item's to draw, from the file it is given (FIT-7). Keeping the composer above the keyboard is the screen's: a `Scaffold` that resizes for the inset, or `MediaQuery.viewInsetsOf`. No form."},"react-native":{"status":"planned","name":"ChatComposer","props":{"value":"value","label":"accessibilityLabel","placeholder":"placeholder","layout":"layout","minRows":"minRows","maxRows":"maxRows","maxLength":"maxLength","counter":"counter","sendKey":"sendKey","attachments":"attachments","attachmentForm":"attachmentForm","multiple":"multiple","accept":"accept","maxSize":"maxSize","maxFiles":"maxFiles","sending":"sending","stoppable":"stoppable","blocked":"blocked","keepAfterSend":"keepAfterSend","disabled":"disabled","error":"error","sendLabel":"sendAccessibilityLabel","stopLabel":"stopAccessibilityLabel","attachLabel":"attachAccessibilityLabel","removeLabel":"removeAccessibilityLabel","retryLabel":"retryAccessibilityLabel","typeErrorText":"typeErrorText","sizeErrorText":"sizeErrorText","countErrorText":"countErrorText","announcement":"announcement"},"events":{"input":"onChangeText","send":"onSend","stop":"onStop","sendableChange":"onSendableChange","sendBlocked":"onSendBlocked","select":"onSelect","reject":"onReject","attachmentsChange":"onAttachmentsChange"},"items":{"file":{"name":"FileItem","props":{"value":"value","name":"name","sizeText":"sizeText","status":"status","statusText":"statusText","progress":"progress","errorText":"errorText","retryable":"retryable","form":"form","preview":"preview","previewSrc":"previewSource","nameHidden":"nameHidden","width":"width","height":"height"},"events":{"remove":"onRemove","retry":"onRetry"},"notes":"An object in the `attachments` array, identified by `id`. Passed only while the product gives the File items."}},"notes":"Planned. `<ChatComposer value={text} onChangeText={setText} accessibilityLabel=\"Message\" onSend={({ value, attachments }) => …} leading={…} trailing={…} />`: a component that draws the capsule itself (a `View` whose `borderRadius` is the lesser of the token and half the one-line height) and holds `EmbeddedTextInput`, `FilePicker`, `FileItem`s in a wrapping row, and `Button`. `sendKey` sets the embedded text input's `enterKey`, and its `onAction` is the request to send (ETI-6); React Native gives JavaScript no signal that a composition is in progress, so how CCM-13 is held there is to be found when the platform is built, and until then the platform is to send with the send button alone. The focused edge follows the typing area's `onFocus` and `onBlur`. `onPick` is the product's function that opens its picker, as the file picker's notes say; no drop of files on phones. A kept image's picture is the File item's to draw, from the file it is given (FIT-7). A ref holds `files`, `add(files)` and `clear()`. Keeping the composer above the keyboard is the screen's: `KeyboardAvoidingView` or the product's own. No form."}}}
@@ -0,0 +1 @@
1
+ {"name":"checkbox-group","title":"Checkbox group","summary":"Asks one question that may have several answers among a few choices shown all at once: a set of checkboxes that holds the list of the checked values under one name, with a label that can say an answer is required or optional, a description and one error for the set, and, where wanted, one checkbox that checks them all.","level":"composed","listing":"default","builtFrom":["field-group","checkbox"],"anatomy":[{"id":"label","description":"The field group's label: names the set — the question — above the checkboxes. The requirement mark follows it."},{"id":"requirement-label","description":"The field group's requirement mark: a small tag that is not a control, saying an answer is required or optional; or, for required, an asterisk after the label.","optional":true},{"id":"supporting-text","description":"The field group's description: a line under the label, before the checkboxes, that says how to answer. It stays while the group is in error.","optional":true},{"id":"select-all","description":"One more checkbox before the first, brought by the group where selectAllLabel is given: the Checkbox component, checked, unchecked or indeterminate from the checkboxes of the set, and checking or unchecking them all. It is no entry of the value.","optional":true},{"id":"checkboxes","description":"The checkboxes of the set, in the order given, in a column or in a row that wraps. Each is the Checkbox component with its own label, drawn from its own tokens; which of them are checked is the group's value."},{"id":"error-text","description":"The field group's error text: the reason the answer was refused or is missing, below the last checkbox.","optional":true}],"props":[{"name":"value","type":"strings","default":[],"description":"The values of the checked checkboxes: a list of strings, empty while none is checked (the platforms whose idiom it is take a set). The checkbox group sets it when a person switches a checkbox, and emits change; the product may also set it. It is the set's value: what a form submits under the group's one name."},{"name":"label","from":"field-group.label"},{"name":"labelHidden","from":"field-group.labelHidden"},{"name":"supportingText","from":"field-group.supportingText"},{"name":"errorText","from":"field-group.errorText","note":"On the web it is also what the form's own validation says of a required group left empty (CKG-8)."},{"name":"error","from":"field-group.error","note":"Every checkbox of the set is drawn in its own error condition and exposed as invalid."},{"name":"disabled","from":"field-group.disabled","note":"The value is kept, and on the web it is not submitted (CKG-6, CKG-8)."},{"name":"required","from":"field-group.required","note":"means at least one checkbox checked: on the web an empty list is reported to the form's own validation (CKG-8)."},{"name":"optional","from":"field-group.optional"},{"name":"requiredMark","from":"field-group.requiredMark"},{"name":"requiredText","from":"field-group.requiredText"},{"name":"optionalText","from":"field-group.optionalText"},{"name":"orientation","from":"field-group.orientation"},{"name":"selectAllLabel","type":"string","default":"","description":"Not empty: the group brings one more checkbox before the first, labelled by this text (\"All of these\", \"Every weekday\"), that checks or unchecks every enabled checkbox of the set at once and shows checked, unchecked or indeterminate from them (CKG-12, CKG-13). Empty, the default: there is none. The instance's own words: it names this set, so it is not read from the product's words."}],"items":[{"name":"checkbox","summary":"A choice of the set: the Checkbox component with its own label, checked by the group's value, placed, spaced, disabled and put in its error condition by the group's frame, otherwise drawn and pressed as it is anywhere.","component":"checkbox","props":[{"name":"value","type":"string","default":"","description":"What the choice stands for: an entry of the group's value while this checkbox is checked. Unique in the group and not empty. The group reads it from the item; it is not a prop of the Checkbox (on the web, the checkbox's own value attribute)."},{"name":"label","type":"string","default":"","description":"Its own label, as the Checkbox's label."},{"name":"disabled","type":"boolean","default":false,"description":"As the Checkbox's disabled: one checkbox of an enabled group may be disabled by itself. The person cannot switch it, the select-all checkbox leaves it alone, and its entry stays in the value while the value holds it."}]}],"events":[{"name":"change","description":"The person switched a checkbox of the set, or activated the select-all checkbox; carries the new list, which the group already holds. Emitted once per action, by the group and not by its checkboxes. Not emitted when the product sets value."}],"states":["enabled","disabled","error"],"behavior":[{"id":"CKG-1","text":"THE checkbox group SHALL be a field group whose spacing is controls, around its checkboxes: the field group itself, with the field group's own tokens, measures and sentences, and no copy of it — its rows, their order and their gaps (FGR-1), the label (FGR-2), the requirement, its mark and its words (FGR-4, FGR-5, FGR-6, FGR-24), the description, which stays while the group is in error (FGR-7), the error text (FGR-8), the column and the row that wraps (FGR-3, FGR-13), the disabled frame (FGR-14) and what an unknown value of required, optional, requiredMark or orientation does (FGR-22), each from the prop of the same name, which is the field group's. It SHALL have no look and no token of its own: it SHALL draw no container, edge, fill or elevation, SHALL add no padding around its rows and no distance between its checkboxes but the field group's, and SHALL leave each checkbox drawn from the checkbox's own tokens at the checkbox's own size (CHK-4, CHK-12, CHK-15)."},{"id":"CKG-2","text":"THE checkbox group SHALL hold one value, a list of strings, and show as checked exactly those of its checkboxes whose value is in the list; WHILE the list is empty none SHALL be checked. WHEN the product sets value THE checkbox group SHALL check and uncheck its checkboxes to match, each over the checkbox's own selection motion (CHK-13), without emitting change and without moving focus. THE checkbox group SHALL keep in value an entry that is the value of none of its checkboxes, because the checkbox it belongs to may arrive later or be out of the set for now (a list of choices narrowed by a search), and SHALL give it back with the rest in change (CKG-4) and to a form (CKG-8). IF value holds one entry twice THEN THE checkbox group SHALL treat it as held once; IF two checkboxes carry one value THEN both SHALL be shown checked or unchecked together, and switching either SHALL switch the entry; IF a checkbox carries no value THEN it SHALL be drawn unchecked and a press on it SHALL change nothing and emit nothing, because the list has no entry to stand for it; and in debug builds THE checkbox group SHALL report each of the three."},{"id":"CKG-3","text":"WHERE the platform lets the product mark one checkbox as checked by itself (on the web, checked on a child element) and the product has not set value, THE checkbox group SHALL take as its value the values of the checkboxes so marked, in the order given, so that markup that says checked on some of its checkboxes is a group with that value, and a checkbox that arrives so marked SHALL add its value to the list. WHEN the product has set value, value SHALL decide: a checkbox that is first drawn or arrives marked against it SHALL be shown as value says. WHEN the product sets or clears checked on a checkbox the checkbox group already holds THE checkbox group SHALL add that checkbox's value to the list or take it out, without emitting change, so that the two never disagree."},{"id":"CKG-4","text":"WHEN the person switches one of the group's checkboxes — by pointer, touch, Space, a click on its label or assistive technology, as CHK-1 says of the checkbox — THE checkbox group SHALL add that checkbox's value to the list where the checkbox became checked and take it out where it became unchecked, and SHALL emit change exactly once, carrying the new list, with value already set when the event is received. The list it then holds SHALL be the values of its checked checkboxes in the order the checkboxes are given, not the order in which they were checked, followed by the entries that belong to no checkbox, in the order they had. No other checkbox SHALL change, and nothing the checkbox emits SHALL reach a listener on the group as a second change (CHK-23). A person can empty the list: unchecking the last checked checkbox emits change with an empty list."},{"id":"CKG-5","text":"THE checkbox group SHALL leave every enabled checkbox its own place in the focus order, in the order given, as the platform has it for checkboxes: Tab and Shift+Tab SHALL move from one checkbox to the next and out of the group at either end, and THE checkbox group SHALL handle no key — no arrow key moves focus or checks, and there is no single stop and no roving focus — because each checkbox is a choice of its own that a person may stop at and switch; Space is the checkbox's (CHK-1), and Enter is left to the form on the web. THE checkbox group SHALL NOT be a stop itself, and a press on its label, its requirement mark, its description or its error text SHALL check nothing and move no focus into the group (FGR-12). WHEN the product asks the group itself for focus, where the platform has such a call, THE checkbox group SHALL give focus to the first enabled checkbox it shows, the select-all checkbox where one is drawn."},{"id":"CKG-6","text":"WHILE disabled is true THE checkbox group SHALL be a disabled field group (FGR-14): its frame drawn from the field group's disabled tokens and every checkbox it holds disabled as the checkbox's own disabled does (CHK-3, CHK-8), the checked ones still shown checked; it SHALL emit no change and SHALL keep value. WHILE disabled is false THE checkbox group SHALL NOT enable a checkbox the product disabled itself: that one keeps its entry in the list WHILE the list holds it, is shown checked or unchecked as value says, cannot be switched by the person, and is left as it is by the select-all checkbox (CKG-13). THE checkbox group SHALL have no read-only state, because a checkbox has none and a composed component adds no state its members have not."},{"id":"CKG-7","text":"THE checkbox group SHALL take from required and optional what the form asks of the set, as a field group does (FGR-4): required means that the list holds at least one entry."},{"id":"CKG-8","text":"WHERE the platform has forms that submit named values (the web) THE checkbox group SHALL take part in its form as one control: WHILE it is not disabled it SHALL submit one entry under its own name for each entry of value, in the list's order, and nothing WHILE the list is empty — what checkboxes of one name submit by themselves, so that whatever receives the form reads the same list from either; SHALL return to the value it was first given WHEN the form is reset, without emitting change; SHALL be disabled WHILE the form disables the set it is in; SHALL report a missing value to the form's own validation WHILE required is true and the list is empty, in the product's words, because the platform has a message for one unchecked checkbox and none for a set; and its checkboxes, the select-all checkbox among them, SHALL submit nothing of their own, whatever name they carry (CHK-23), so that no entry is submitted twice. A checkbox the product disabled itself SHALL still have its entry submitted WHILE the list holds it, because the value is the group's and that checkbox's disabled says only that the person cannot switch it. WHERE the platform has no such forms value and change are the whole of it."},{"id":"CKG-9","text":"THE checkbox group SHALL be exposed to assistive technology as the field group it is, and SHALL add nothing to it: one group that contains its checkboxes, named by label whether or not the label is drawn (FGR-10); described by supportingText, errorText WHILE error is true, requiredText WHILE required is true and optionalText WHILE optional is true (FGR-11); and disabled WHILE disabled is true (FGR-14). A group has neither a required nor an invalid state, so the requirement is said in the product's words and each checkbox says invalid for itself. Each checkbox SHALL expose its own role, its name and its checked state (CHK-14), and the select-all checkbox its mixed state WHILE it is indeterminate. THE checkbox group SHALL NOT expose a second group around the first, SHALL give its checkboxes no position in a set, and SHALL NOT say how many are checked: a product that wants the count said writes it in supportingText."},{"id":"CKG-10","text":"WHEN a checkbox is added to the group, removed from it or moved, or its value or its disabled changes, while the group is shown THE checkbox group SHALL be laid out again as a field group is (FGR-23); SHALL check by value again (CKG-2), so that a checkbox that arrives with a value the list holds is shown checked, and SHALL keep the entry of a checked checkbox that leaves; SHALL set the select-all checkbox again (CKG-12); SHALL emit no change; and SHALL leave focus on the checkbox that has it."},{"id":"CKG-11","text":"THE checkbox group SHALL hold checkboxes and nothing else that can be operated. IF it holds no checkbox THEN THE checkbox group SHALL draw its rows without one and in debug builds report it (FGR-20); IF it holds another control, or a group of controls inside it, THEN in debug builds THE checkbox group SHALL report it and SHALL make no entry of its value from what that one holds. THE checkbox group SHALL NOT restyle a checkbox or change how it answers hover, focus or a press (CHK-5 to CHK-10), and SHALL NOT set indeterminate on a checkbox of the set: a checkbox of the set is in the list or it is not."},{"id":"CKG-12","text":"WHILE selectAllLabel is not empty THE checkbox group SHALL bring one more checkbox, the select-all checkbox: the Checkbox component itself, labelled by selectAllLabel, placed before the first checkbox of the set as one more control of the field group — the same distance from the next, in a column or in a row, the set not indented under it — and so disabled and put in its error condition with the others (CKG-6, CKG-7). It SHALL stand for the checkboxes of the set that the product did not disable one by one: checked WHILE each of them is checked, indeterminate WHILE some are and some are not, unchecked WHILE none is (CHK-4), and disabled WHILE there is no such checkbox. It SHALL have no value, SHALL be no entry of the list, and SHALL follow every change of value and of the set at once, whoever made the change. WHILE selectAllLabel is empty THE checkbox group SHALL bring none."},{"id":"CKG-13","text":"WHEN the person activates the select-all checkbox while it is unchecked or indeterminate THE checkbox group SHALL check every checkbox of the set that the product did not disable itself, as CHK-2 says of an indeterminate checkbox, and while it is checked SHALL uncheck every one of them; a checkbox the product disabled SHALL stay as it is, and an entry of value that belongs to no checkbox SHALL stay in the list. THE checkbox group SHALL emit change exactly once, carrying the list after the change (CKG-4), and nothing of the select-all checkbox's own SHALL reach a listener on the group."},{"id":"CKG-14","text":"THE checkbox group SHALL add nothing of its own to how its members answer the layout direction, enlarged text and forced colors. WHERE the layout direction is right-to-left it SHALL be mirrored as the field group is (FGR-18), SHALL take its direction from where it is used and follow a change of it at once (FGR-19), keeping its value and its focus, and SHALL lay out each of its texts by that text's own direction (FGR-21), each checkbox mirroring itself (CHK-15, CHK-20, CHK-21); it has no key to exchange (CKG-5). WHILE the text size is enlarged it SHALL grow as the field group does (FGR-16): every text wraps, a row becomes a column where one line no longer holds two checkboxes, and the boxes keep their size. WHERE the platform draws with a person's own forced colors it SHALL be drawn as the field group is there (FGR-17), the error carried by the words of errorText and by each checkbox's invalid state, never by a color of the group's."},{"id":"CKG-15","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE checkbox group SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on the group of the field group it is (CKG-9) — an id reference by the elements it names in the host's tree or a tree around it, a description after its own — except those the checkbox group owns (aria-label, aria-labelledby, aria-disabled, aria-required, aria-invalid, aria-errormessage), which it SHALL move and not expose: its name is label and its states are its props (CKG-9). WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE checkbox group SHALL take it off that element. WHEN the product sets an aria- attribute the checkbox group owns THE checkbox group SHALL report it in debug builds."}],"accessibility":{"role":"group","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves focus to each enabled checkbox of the set in the order given — the select-all checkbox first where there is one — and out of the group. Every checkbox is a stop; the group is not (CKG-5)."},{"keys":"Space","action":"Switches the focused checkbox (CHK-1); on the select-all checkbox, checks every enabled checkbox of the set, or unchecks them all where all were checked (CKG-13)."},{"keys":"Arrow keys","action":"Nothing: a set of checkboxes has no arrow keys on any platform, because moving among them must not change them and each is a stop already."},{"keys":"Enter","action":"Nothing on the web, where it submits the form; switches the focused checkbox where the platform activates any focused control with Enter (Android, tvOS), as CHK-1 says."}],"labeling":"label names the group, drawn or not (labelHidden). Each checkbox keeps its own name, its own label beside it; the select-all checkbox is named by selectAllLabel. The group's description is the field group's: supportingText, then errorText while error is true, then requiredText while the group is required, then optionalText while it is optional (FGR-11). A group has no required and no invalid state: the requirement is said in the product's words, and each checkbox of a group in error is exposed as invalid and described by errorText. How many are checked is not said unless the product writes it in supportingText.","minimumTarget":true,"notes":["Not a target itself: the group takes no press and is not a focus stop (CKG-5), so minimumTarget holds through its checkboxes, each of which keeps a whole touch target of its own at the distance the field group puts between them (CHK-7, FGR-3).","The checkbox group is a field group of checkboxes that owns their value (composed: the field group frames it, its checkboxes hold its value). What it adds to the two is what every product otherwise writes: the list of checked values and one change for it, one name in a form with reset and the form's own check that a required set is not empty, and the select-all checkbox's three states. It adds no look and has no tokens of its own.","One level down is always open: a field group around checkboxes, each checked by the product, is the same picture, the same group, the same names, descriptions and states. Take it where each checkbox must have a name of its own in the form, where the set holds something that is not a checkbox, or where the product wants its own rule for what \"all\" means.","Beside the radio group. A radio group has one answer, so it is one stop in the focus order, its arrow keys move and select, and its role has a required and an invalid state. A checkbox group has a list: every checkbox is a stop and Space switches it, there are no arrow keys, and its role is the plain group's — the requirement is said in words and each checkbox says invalid for itself. A radio group in error leaves its rings as they are; a checkbox group in error marks every box, because a checkbox has an error condition and a radio button has none.","required means \"at least one\". A least or a greatest number of choices (\"choose up to three\") is the product's rule: it reads the length of the list in change, sets error and writes errorText with the number in its own words, or disables what may no longer be chosen. The group knows no number, because it would have no words to say it with.","The select-all checkbox stands for the checkboxes the group holds and a person can switch, never for choices the product has not given it. It is one more stop before the set. It is not the place for a hierarchy: choices inside choices are a tree.","A disabled group is not submitted; a checkbox disabled by itself in an enabled group keeps its entry in the value and is submitted with it. A choice that is always on (\"Email, required for your account\") is therefore one disabled, checked checkbox, and needs no hidden field beside it.","When a checkbox group, and when something else. Several of a few choices that are all worth seeing at once, in a form or a setting: a checkbox group, of up to about seven. One of a few: a radio group. One thing on or off, on its own: a checkbox, or a switch where it takes effect at once. Several of many, or where there is little room: a list with multiple selection, or a select. Rows of a table chosen for an action: the table's own selection. Things on or off that are not one answer — each with a name of its own in the form — or a set of switches: a field group.","On the web the group's shadow root holds the field group's own element around a slot, and the checkboxes stay the product's children: the group is the field group's `fieldset` with its `legend`, exposed once.","Heights are the texts' and the checkboxes': at 200% text size every text wraps, a row becomes a column, and nothing is cut (WCAG 1.4.4, 1.4.10).","How a state looks is a value decision of the active design system; components read the state's tokens and never compute the effect themselves."]},"tokens":"comp.field-group","fixtures":[{"id":"default","props":{"label":"Notify me by","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"supporting","props":{"label":"Notify me by","supportingText":"Choose all that apply.","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"label-hidden","props":{"label":"Notify me by","labelHidden":true,"supportingText":"Choose all that apply.","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"required","props":{"label":"Notify me by","supportingText":"Choose all that apply.","required":true,"requiredText":"Required","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"optional","props":{"label":"Notify me by","optional":true,"optionalText":"Optional"},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"required-asterisk","props":{"label":"Notify me by","required":true,"requiredMark":"asterisk","requiredText":"Required","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"required-error","props":{"label":"Notify me by","supportingText":"Choose all that apply.","required":true,"error":true,"errorText":"Choose at least one way to reach you.","requiredText":"Required"},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"horizontal","props":{"label":"Notify me by","orientation":"horizontal","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text"}},{"kind":"checkbox","props":{"value":"push","label":"Push"}}]},{"id":"horizontal-many","props":{"label":"Days","supportingText":"The days the report is sent.","orientation":"horizontal","value":["mon","tue","wed","thu","fri"]},"items":[{"kind":"checkbox","props":{"value":"mon","label":"Monday"}},{"kind":"checkbox","props":{"value":"tue","label":"Tuesday"}},{"kind":"checkbox","props":{"value":"wed","label":"Wednesday"}},{"kind":"checkbox","props":{"value":"thu","label":"Thursday"}},{"kind":"checkbox","props":{"value":"fri","label":"Friday"}},{"kind":"checkbox","props":{"value":"sat","label":"Saturday"}},{"kind":"checkbox","props":{"value":"sun","label":"Sunday"}},{"kind":"checkbox","props":{"value":"holidays","label":"Public holidays"}},{"kind":"checkbox","props":{"value":"month-end","label":"The last working day of the month"}},{"kind":"checkbox","props":{"value":"release","label":"The first working day after a release"}}]},{"id":"disabled","props":{"label":"Notify me by","supportingText":"Choose all that apply.","required":true,"disabled":true,"requiredText":"Required","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"one-disabled","props":{"label":"Notify me by","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message","disabled":true}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"long-label","props":{"label":"Which of these ways may we use to reach you when a delivery is late, damaged or returned to the depot before you have seen it","required":true,"supportingText":"Choose all that apply. We use the first one that answers, and we never use a way you have not chosen here, whatever the reason.","error":true,"errorText":"Choose at least one way to reach you, or tell us below that you do not want to be reached about deliveries at all.","requiredText":"Required"},"items":[{"kind":"checkbox","props":{"value":"email","label":"An email to the address on the order, sent as soon as the carrier reports the delay"}},{"kind":"checkbox","props":{"value":"text","label":"A text message"}},{"kind":"checkbox","props":{"value":"call","label":"A call from the depot during its opening hours"}}]},{"id":"required-ja","props":{"label":"連絡方法","supportingText":"当てはまるものをすべて選んでください。","required":true,"requiredText":"必須","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"メール"}},{"kind":"checkbox","props":{"value":"phone","label":"電話"}},{"kind":"checkbox","props":{"value":"post","label":"郵送"}}]},{"id":"rtl","direction":"rtl","props":{"label":"طرق الإشعار","supportingText":"اختر كل ما ينطبق.","required":true,"requiredText":"مطلوب","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"البريد الإلكتروني"}},{"kind":"checkbox","props":{"value":"text","label":"رسالة نصية"}},{"kind":"checkbox","props":{"value":"push","label":"إشعار فوري"}}]},{"id":"horizontal-rtl","direction":"rtl","props":{"label":"ימים","orientation":"horizontal","error":true,"errorText":"יש לבחור יום אחד לפחות."},"items":[{"kind":"checkbox","props":{"value":"sun","label":"ראשון"}},{"kind":"checkbox","props":{"value":"mon","label":"שני"}},{"kind":"checkbox","props":{"value":"tue","label":"שלישי"}}]},{"id":"ltr-label-rtl","direction":"rtl","props":{"label":"Wi-Fi 6E","supportingText":"2.4 GHz, 5 GHz, 6 GHz","value":["2.4","5"]},"items":[{"kind":"checkbox","props":{"value":"2.4","label":"2.4 GHz"}},{"kind":"checkbox","props":{"value":"5","label":"5 GHz"}},{"kind":"checkbox","props":{"value":"6","label":"6 GHz"}}]},{"id":"error-selected","props":{"label":"Notify me by","supportingText":"Choose all that apply.","required":true,"requiredText":"Required","value":["text"],"error":true,"errorText":"This number cannot receive text messages. Choose another way, or change the number."},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"select-all-none","props":{"label":"Notify me by","selectAllLabel":"All of these"},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"select-all-some","props":{"label":"Notify me by","selectAllLabel":"All of these","value":["email"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"select-all-all","props":{"label":"Notify me by","selectAllLabel":"All of these","value":["email","text","push"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message"}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]},{"id":"select-all-one-disabled","props":{"label":"Notify me by","selectAllLabel":"All of these","value":["email","push"]},"items":[{"kind":"checkbox","props":{"value":"email","label":"Email"}},{"kind":"checkbox","props":{"value":"text","label":"Text message","disabled":true}},{"kind":"checkbox","props":{"value":"push","label":"Push notification"}}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-checkbox-group","props":{"value":"value","label":"label","labelHidden":"labelHidden","supportingText":"supportingText","errorText":"errorText","error":"error","disabled":"disabled","required":"required","optional":"optional","requiredMark":"requiredMark","requiredText":"requiredText","optionalText":"optionalText","orientation":"orientation","selectAllLabel":"selectAllLabel"},"events":{"change":"change"},"items":{"checkbox":{"name":"tanrei-checkbox","props":{"value":"value","label":"label","disabled":"disabled"},"notes":"A `tanrei-checkbox` child: inside a `tanrei-checkbox-group` it takes its `checked` from the group's value and its own `value` attribute, submits nothing itself and fires no `input` or `change` of its own (CHK-23). A child with no `value` attribute has no value: the `on` a bare checkbox submits by default is not read inside a group."}},"parts":{"label":"label","requirement-label":"requirement-label","supporting-text":"supporting-text","select-all":"select-all","checkboxes":"slot","error-text":"error-text"},"notes":"`<tanrei-checkbox-group label=\"Notify me by\" name=\"notify\"><tanrei-checkbox value=\"email\" label=\"Email\" checked></tanrei-checkbox>…</tanrei-checkbox-group>`; class `TanreiCheckboxGroup`; in `@tanrei/react`, `CheckboxGroup` with `value` and `onChange`. Composed as every composed element on the web is (a custom element whose shadow root holds its members' own elements); what differs here: the members that hold the value are the product's own children. The shadow root holds one `<tanrei-field-group spacing=\"controls\">` — the member's own element, not drawing code shared with it — around, in this order, the select-all `<tanrei-checkbox part=\"select-all\">` while `select-all-label` is given, and a `<slot>`; the product's checkboxes stay in its light DOM and are assigned through the group's slot into the field group's. The eleven props that are the field group's are set on that element as they are given, and its documented parts are exported under its own names (`exportparts`); the group writes none of its custom properties, so `--tanrei-comp-field-group-*` set on the host is inherited by the field group inside. Name, description and states are the field group's own `fieldset` and `legend`, once: the host has no role. The field group gives `disabled`, the error condition and the error text to each checkbox by the `tanrei-field-connect` event it already answers — a slotted checkbox's event passes the field group on its composed path before it reaches the host, so the group forwards nothing. `value` is a property only, an array that is copied in and out; there is no `value` attribute, because the first value is written where HTML writes it, as `checked` on the children (CKG-3), and that is also what a reset returns to where the property was never set. A checkbox finds its group with `closest('tanrei-checkbox-group')` when it connects; the group's checkboxes are those among its descendants whose nearest checkbox group it is, found again when its child list changes. A checkbox inside a group fires no `input` and no `change` at all — stopped at the group they would still pass a capture listener on an ancestor — it tells its group, which sets `value` and fires `input` and one `change`, a bubbling `CustomEvent` whose `detail.value` is a copy of the list; a listener set on a checkbox inside a group hears nothing. A form-associated custom element (`static formAssociated = true`): `name` is a web attribute, not a spec prop; it submits a `FormData` of one entry per value under `name` (`ElementInternals.setFormValue`), restores the list on navigation (`formStateRestoreCallback`), follows `<fieldset disabled>`, and reports `valueMissing` while `required` and the list is empty, anchored on its first enabled checkbox, with the message `errorText`, else the required text (the instance's or the product's), else `label` — never a browser's sentence for one unchecked box. The host is not focusable and does not delegate focus; `focus()` moves to the first enabled checkbox. Attributes are kebab-case: `label-hidden`, `supporting-text`, `error-text`, `required-mark`, `required-text`, `optional-text`, `select-all-label`. The host is `display: block`. Without script the element is not defined and draws nothing of its own, as every Tanrei element with a shadow root; a page that must work without script writes a native `fieldset` of native checkboxes of one `name`, which submits the same entries. Words: the element has no words of its own; `required-text` and `optional-text` left empty read the product's words through the field group, and `select-all-label` is the instance's alone."},"swiftui":{"status":"planned","name":"TanreiCheckboxGroup","props":{"value":"selection","label":"label","labelHidden":"labelsHidden","supportingText":"supportingText","errorText":"errorText","error":"error","disabled":"disabled","required":"isRequired","optional":"isOptional","requiredMark":"requiredMark","requiredText":"requiredText","optionalText":"optionalText","orientation":"orientation","selectAllLabel":"selectAllLabel"},"events":{"change":"selection"},"items":{"checkbox":{"name":"TanreiCheckbox","props":{"value":"value","label":"title","disabled":"disabled"}}},"notes":"`TanreiCheckboxGroup(\"Notify me by\", selection: $channels, supportingText:, errorText:, error:, required:, optional:, orientation:, selectAllLabel:) { TanreiCheckbox(\"Email\", value: Channel.email) … }`, generic over a `Hashable` value: `selection` is a `Binding<Set<V>>`, and writing it is the change event; a set has no order to keep (CKG-4). The view is a `TanreiFieldGroup` around its content — the field group's own view, which reads `comp.field-group` from the environment, so one group is set apart with `.tanreiTheme(_:)` on it — and the checkboxes inside read and write the selection through the environment: `TanreiCheckbox(_:value:)` is the Checkbox with its `isOn` bound to membership. `labelHidden` follows `.labelsHidden()` and `disabled` follows `.disabled(_:)`. The select-all checkbox is a `TanreiCheckbox` with `isIndeterminate`. No forms: CKG-8 does not apply. The product's words are read from the `\\.tanreiWords` environment value."},"compose":{"status":"planned","name":"TanreiCheckboxGroup","props":{"value":"values","label":"label","labelHidden":"labelHidden","supportingText":"supportingText","errorText":"errorText","error":"isError","disabled":"enabled","required":"required","optional":"optional","requiredMark":"requiredMark","requiredText":"requiredText","optionalText":"optionalText","orientation":"orientation","selectAllLabel":"selectAllLabel"},"events":{"change":"onValuesChange"},"items":{"checkbox":{"name":"TanreiCheckbox","props":{"value":"value","label":"label","disabled":"enabled"}}},"notes":"`TanreiCheckboxGroup(label = \"Notify me by\", values = channels, onValuesChange = { channels = it }, supportingText = …, isError = …, required = …, optional = …, orientation = …, selectAllLabel = …) { TanreiCheckbox(value = \"email\", label = \"Email\") … }`: controlled, as Compose is — `values` is a `Set<T>`, the group calls `onValuesChange` and the caller moves it. The composable is a `TanreiFieldGroup` around its content, which runs in a `TanreiCheckboxGroupScope` whose `TanreiCheckbox(value, label)` is the Checkbox with `checked` and its click taken from the group; one group is set apart with a `TanreiTheme` around it. `enabled` is the inverse flag. The select-all checkbox is the `TanreiCheckbox(state: ToggleableState, onClick)` overload. No forms: CKG-8 does not apply. The product's words are read from `LocalTanreiWords`."},"flutter":{"status":"planned","name":"TanreiCheckboxGroup","props":{"value":"values","label":"labelText","labelHidden":"labelHidden","supportingText":"helperText","errorText":"errorText","error":"isError","disabled":"enabled","required":"required","optional":"optional","requiredMark":"requiredMark","requiredText":"requiredText","optionalText":"optionalText","orientation":"orientation","selectAllLabel":"selectAllLabel"},"events":{"change":"onChanged"},"items":{"checkbox":{"name":"TanreiCheckbox","props":{"value":"entry","label":"label","disabled":"enabled"},"notes":"`TanreiCheckbox.value` is the checked state on this platform, so the entry a checkbox stands for has a name of its own: `TanreiCheckbox<T>.inGroup(entry:, label:, enabled:)` is the Checkbox itself, checked from the group and without `value` and `onChanged`."}},"notes":"`TanreiCheckboxGroup<T>(values:, onChanged:, labelText: 'Notify me by', helperText: …, errorText: …, isError: …, required: …, optional: …, orientation: …, selectAllLabel: …, children: [TanreiCheckbox<T>.inGroup(entry:, label:), …])`: `values` is a `Set<T>`. The widget builds a `TanreiFieldGroup` around its children and an inherited scope that gives each checkbox its checked state and takes its change; one group is set apart with a `TanreiTheme` around it. `enabled` is the inverse flag. The select-all checkbox is a `TanreiCheckbox` with `tristate`. `FormField` integration is the product's: CKG-8 does not apply. The product's words are read from the `TanreiWords` inherited widget."},"react-native":{"status":"planned","name":"CheckboxGroup","props":{"value":"value","label":"label","labelHidden":"labelHidden","supportingText":"supportingText","errorText":"errorText","error":"error","disabled":"disabled","required":"required","optional":"optional","requiredMark":"requiredMark","requiredText":"requiredText","optionalText":"optionalText","orientation":"orientation","selectAllLabel":"selectAllLabel"},"events":{"change":"onValueChange"},"items":{"checkbox":{"name":"Checkbox","props":{"value":"entry","label":"label","disabled":"disabled"},"notes":"`Checkbox`'s `value` is the checked state on this platform, so the entry a checkbox stands for has a name of its own: `<Checkbox entry=\"email\" label=\"Email\" />` inside a `CheckboxGroup` is the Checkbox itself, checked from the group's context and without `value` and `onValueChange`."}},"notes":"`<CheckboxGroup label=\"Notify me by\" value={channels} onValueChange={setChannels} supportingText=\"…\" selectAllLabel=\"…\"><Checkbox entry=\"email\" label=\"Email\" />…</CheckboxGroup>`: controlled; `value` is an array of strings in the order of the checkboxes. The component renders a `FieldGroup` around its children and a context that gives each checkbox its checked state; one group is set apart with a provider around it. The select-all checkbox is a `Checkbox` with `indeterminate`. Follows the app's direction where an ancestor's is not known. No forms: CKG-8 does not apply. The product's words are read from the `TanreiWordsProvider` context."}}}
@@ -0,0 +1 @@
1
+ {"name":"checkbox","title":"Checkbox","summary":"Lets people turn one independent choice on or off, show a parent choice that is only partly on, and mark a required choice left unmade.","level":"base","listing":"default","anatomy":[{"id":"container","description":"The round state layer behind the box: the control height across (36 in the default system; Material Design 3's is 40), and the height the checkbox takes in a row (CHK-26). It carries hover, focus and press and is invisible at rest."},{"id":"box","description":"The small square that shows the condition (Material Design 3's 18, with a 2 corner): empty with an outline when unchecked, filled when checked or indeterminate."},{"id":"outline","description":"The border of the box, drawn inside its edge. The fill sits inside the border, so a translucent fill and border never overlap; where the two meet they are drawn as one shape, so nothing behind the box shows between them."},{"id":"mark","description":"The glyph check (checked) or the glyph remove (indeterminate) of the system's icon set, centered on the box and drawn with the icon set's family, fill and optical size at the mark's own weight, comp.checkbox.mark.weight: in the default system heavier than the system's icons, because the mark is a thin stroke on a small filled box and is what tells checked from indeterminate. The checkbox draws no mark of its own; a system that wants another check chooses another icon set. The glyph is decorative: the condition is announced from the state."},{"id":"label","description":"The visible text that names the choice. A click on it toggles the checkbox.","optional":true},{"id":"focus-ring","description":"Gap-then-ring indicator shown for keyboard focus, following the box's shape."}],"props":[{"name":"checked","type":"boolean","default":false,"description":"Whether the choice is on."},{"name":"indeterminate","type":"boolean","default":false,"description":"Shows the choice as partly on (a parent whose children are mixed). Wins over checked for what is drawn and announced; activation clears it."},{"name":"error","type":"boolean","default":false,"description":"Marks the choice as invalid (a required choice left unmade). Draws the error form of the condition and is exposed as invalid; the message itself belongs to the surrounding form."},{"name":"disabled","type":"boolean","default":false,"description":"Prevents interaction and removes the checkbox from the focus order."},{"name":"readOnly","type":"boolean","default":false,"description":"Shows the choice and keeps it: the checkbox can be focused and read and is submitted with its form, but the person cannot switch it. Drawn as an enabled checkbox, without the hover and press answers (CHK-24)."},{"name":"label","type":"string","default":"","description":"The text that names the choice: drawn next to the box and used as the accessible name."},{"name":"labelHidden","type":"boolean","default":false,"description":"Draws no visible label but keeps label as the accessible name (a row-selection checkbox in a table whose row already says what it is)."}],"events":[{"name":"change","description":"The user switched the checkbox; carries the new value of checked (indeterminate is then false)."}],"states":["enabled","disabled","hovered","focused","pressed","selected","error"],"behavior":[{"id":"CHK-1","text":"WHEN the user activates the checkbox by pointer, touch, Space, assistive technology or a click on its label THE checkbox SHALL switch checked and emit change exactly once with the new value; Enter SHALL activate it only on a platform whose convention activates any focused control with Enter (Android, tvOS), and SHALL NOT on the web, where Enter submits the form."},{"id":"CHK-2","text":"WHEN the user activates the checkbox while indeterminate is true THE checkbox SHALL set checked to true, clear indeterminate, and emit change with true."},{"id":"CHK-3","text":"WHILE disabled is true THE checkbox SHALL NOT change or emit change, SHALL NOT be focusable, SHALL ignore clicks on its label and SHALL expose the disabled state to assistive technology."},{"id":"CHK-4","text":"THE checkbox SHALL draw the condition its props select: indeterminate when indeterminate is true, otherwise selected when checked is true, otherwise unselected; and the error- form of that condition while error is true."},{"id":"CHK-5","text":"WHILE hovered, keyboard-focused or pressed THE checkbox SHALL render its container, box, mark, outline, label and opacity from the component tokens of its condition in the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state. A part the interaction states recolor changes over the component's state motion, as the container does; only a change of condition uses the selection motion."},{"id":"CHK-6","text":"WHEN the checkbox receives keyboard focus THE checkbox SHALL show the focus ring around its box without animation; focus gained by pointer or touch SHALL NOT show it."},{"id":"CHK-7","text":"WHERE the visual size is below the minimum target THE checkbox SHALL extend its hit area on both axes to sys.target.touch for touch input and sys.target.pointer for fine pointers, without changing its visual size; a platform that cannot tell the input type SHALL use sys.target.touch. The visible label SHALL be part of the hit area as well."},{"id":"CHK-8","text":"WHILE disabled is true THE checkbox SHALL render its container, box, mark, outline, label and opacity from the disabled component tokens of its condition."},{"id":"CHK-9","text":"WHEN the checkbox is pressed by pointer, touch or Space, or by Enter where Enter activates it (Android, tvOS; never on the web, where Enter submits the form) THE checkbox SHALL show the pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner."},{"id":"CHK-10","text":"WHILE pressed THE checkbox SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole container at once; ripple grows the pressed state layer from the point of contact (from the center for keyboard activation; a press outside the container (on the label) grows it from the container's center); dim applies the pressed opacity to the whole control and draws no state layer; none draws no answer to the press. Under ripple and dim only the container color stays with the state under the press; box, mark, outline, label, opacity and shape still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.checkbox.motion.feedback-duration with motion.state-easing, fades over motion.state-duration with motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced."},{"id":"CHK-11","text":"THE checkbox SHALL ease its container and box corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README."},{"id":"CHK-12","text":"THE checkbox SHALL draw a box of side comp.checkbox.box.size with corners comp.checkbox.box.shape, centered in a round container of diameter comp.checkbox.container.size; its outline of width comp.checkbox.outline.width SHALL lie inside the box's edge and its fill inside the outline, never under it. Its mark SHALL be a glyph of the system's icon set, check while selected and remove while indeterminate, and SHALL NOT be drawn while unselected: centered on the box at comp.checkbox.mark.size, with sys.icon.family.selected, sys.icon.fill.selected, the weight comp.checkbox.mark.weight (not sys.icon.weight) and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max, not clipped by the box, and hidden from assistive technology. THE checkbox SHALL draw no mark of its own (no path, shape or character of its own for the check or the dash). The weight SHALL change the stroke of the glyph only: the glyph box stays comp.checkbox.mark.size, and the box, the container and the place of the glyph are the same at every weight."},{"id":"CHK-13","text":"WHEN the condition changes after the checkbox was first drawn THE checkbox SHALL change the box, outline and mark colors over comp.checkbox.motion.selection-duration with comp.checkbox.motion.selection-easing; a glyph that appears SHALL fade in over the same duration and curve while growing about the box's center from comp.checkbox.motion.mark-enter-scale of its size to its full size over comp.checkbox.motion.mark-scale-duration with comp.checkbox.motion.mark-scale-easing, and a glyph that goes SHALL fade out and shrink to comp.checkbox.motion.mark-enter-scale the same way; between checked and indeterminate the check goes and the dash appears at the same time. A change of error alone SHALL only recolor, and the box and container SHALL NOT change size or move."},{"id":"CHK-14","text":"THE checkbox SHALL expose the role checkbox with the state checked, not checked or mixed (mixed while indeterminate is true), and SHALL expose the invalid state while error is true."},{"id":"CHK-15","text":"WHILE label is not empty and labelHidden is false THE checkbox SHALL draw label at the inline end of the container, comp.checkbox.label.gap away, in comp.checkbox.label.typescale, wrapping rather than truncating, the control centered on the label's first line; right-to-left layouts SHALL mirror the order."},{"id":"CHK-16","text":"WHILE labelHidden is true THE checkbox SHALL draw no label and SHALL still expose label as its accessible name; WHILE label is not empty, or a Field that frames it gives it a label, THE checkbox SHALL expose that label as its accessible name, over a name the product gives it on the element (aria-label or aria-labelledby); WHILE label is empty and the product gives the checkbox a name of its own on the element — aria-label, or aria-labelledby naming an element — THE checkbox SHALL expose that name as its accessible name; WHILE label is empty and the product gives it none THE checkbox SHALL still render, and in debug builds report that it has no accessible name."},{"id":"CHK-17","text":"WHERE motion is reduced THE checkbox SHALL draw the new condition whole in the first frame after the change: the box, outline and mark colors of the new condition, the new glyph at its full size and full opacity, and the old glyph gone, with no frame in between; a change that arrives while a selection motion is running SHALL end that motion in the same frame. The change SHALL be neither delayed nor skipped."},{"id":"CHK-18","text":"WHEN the condition changes again before the selection motion of CHK-13 has ended THE checkbox SHALL move from what it draws at that moment to the latest condition, never first jumping to the end of the earlier change, and SHALL end on the latest condition's colors and glyph alone."},{"id":"CHK-19","text":"IF the icon set cannot draw the glyph yet (its font is still loading or failed to load) THE checkbox SHALL draw nothing in the glyph's place, never the glyph's name as text, SHALL still draw the box, its fill and its outline and expose its state, and SHALL show the glyph once the icon set can draw it, without the selection motion."},{"id":"CHK-20","text":"THE checkbox SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the checkbox is shown THE checkbox SHALL draw itself for the new direction at once, without a motion of its own, keeping its selection and its focus."},{"id":"CHK-21","text":"THE checkbox SHALL lay out its label as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word, a number with its sign or unit, a telephone number and an address keep their own order in a right-to-left layout and reorder nothing beside them; THE checkbox SHALL still place the label and align its lines by the layout direction, not by the text's own."},{"id":"CHK-22","text":"THE checkbox SHALL draw the outline and the fill of its box as one shape: every point inside the box's outer edge SHALL be painted by the outline, by the fill, or, along the line where the two meet, by both in shares that add up to the whole, so that nothing behind the box shows between them at any zoom, display density or fractional position, in any frame of the selection motion (CHK-13), and so that a box whose outline and fill have the same color is that one color, evenly, from its edge to its mark; the two SHALL NOT be painted over one another either (CHK-12), so that a translucent outline or fill is nowhere darker than its token."},{"id":"CHK-23","text":"WHILE the checkbox stands in a checkbox group THE checkbox SHALL take its checked from the group's value and from the value the group reads from it (CKG-2), SHALL be disabled WHILE the group is (CKG-6), SHALL have its switching by the person reported by the group's change and by no event of its own that a listener on the group would receive as well (CKG-4), and WHERE the platform has forms SHALL submit nothing of its own, whatever name it carries (CKG-8). WHERE the checkbox stands in no checkbox group it SHALL be as it is anywhere — in a field, in a field group, in a table's row or alone: checked is its own, change is its own, and on the web it submits its own entry under its own name."},{"id":"CHK-24","text":"WHILE readOnly is true and disabled is false THE checkbox SHALL stay focusable and in the focus order; SHALL NOT change checked or indeterminate, and SHALL NOT emit change, on any activation — pointer, touch, Space, Enter where Enter activates it, assistive technology, a click on its label or a click dispatched on the element; SHALL expose the read-only state to assistive technology beside its checked, not checked or mixed state; WHERE the platform has forms SHALL be submitted with its form as it is drawn, and SHALL NOT report a missing value to the form's own validation, because the person cannot give one; and SHALL be drawn from the resting component tokens of its condition — the enabled ones, never the disabled ones — and SHALL show no hovered and no pressed state, under any pressed feedback (no overlay, no ripple, no dim), while keyboard focus still selects the focused state and shows the focus ring (CHK-5, CHK-6). The product may still set checked and indeterminate, which then take the selection motion (CHK-13). WHILE disabled is true as well, disabled wins (CHK-3)."},{"id":"CHK-25","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE checkbox SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on the element that carries its role — an id reference by the elements it names in the host's tree or a tree around it, an error message as part of the description while the checkbox is invalid — except those the checkbox owns (aria-checked, aria-pressed, aria-disabled), which it SHALL move and not expose. WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE checkbox SHALL take it off that element. WHEN the product sets an aria- attribute the checkbox owns THE checkbox SHALL report it in debug builds."},{"id":"CHK-26","text":"WHEN the control height (dial.control.height) is N THE checkbox SHALL be N tall in a row: its round container SHALL be drawn at comp.checkbox.container.size, which is sys.control.height.medium, and SHALL be the height the checkbox takes in layout, so that a checkbox stands as tall as the Buttons and fields beside it and a checkbox with a label of one line is a row N tall, the label's line centered on the container (CHK-15). The box (comp.checkbox.box.size), its corner, its outline and its mark are the sign of the condition drawn inside the container, sized for the eye and the glyph and no control on a row: they SHALL keep their own sizes at every control height. The hit area SHALL still meet the minimum target (CHK-7)."}],"accessibility":{"role":"checkbox","keyboard":[{"keys":"Tab","action":"Moves focus to the checkbox."},{"keys":"Space","action":"Switches it (an indeterminate checkbox becomes checked); nothing while it is read-only."},{"keys":"Enter","action":"Nothing on the web (it submits the form); switches it where the platform activates any focused control with Enter (Android, tvOS)."}],"labeling":"label is the accessible name, visible or not (labelHidden). A click on the visible label toggles the checkbox, as a native label does. A checkbox with no label is reported in debug builds.","minimumTarget":true,"notes":["The mixed state is announced as such (aria-checked=\"mixed\" on the web, a toggleable state of Indeterminate on Android, a Semantics mixed value in Flutter, accessibilityState checked \"mixed\" in React Native). SwiftUI has no mixed trait on iOS: the value is announced as \"mixed\" through accessibilityValue.","error is exposed as invalid (aria-invalid on the web, the error semantics on Android and Flutter). The reason is text the form shows and associates with the checkbox; the checkbox does not draw it.","Read-only (CHK-24) is a checkbox that shows an answer in place and keeps it in the focus order, so that it is read with its form — on a review step, or where only some people may change it. HTML's readonly attribute does not apply to a checkbox, so a read-only checkbox is not a native one's: on the web it keeps the native checkbox enabled, cancels its activation and says read-only with aria-readonly, which WAI-ARIA allows on the checkbox role; React Aria's isReadOnly is the same: focusable, announced with its value, not changeable. Where the answer needs no control at all, write it as text; where the person may not reach it at all, it is disabled.","Several checkboxes that answer one question are a checkbox group: it names the set, holds the list of the checked values under one name and says the set's error (CHK-23). A checkbox stands alone where it is one choice of its own — a consent, a setting — and in a field group where each checkbox of a set has a name of its own.","The check and the dash are decorative glyphs of the icon set, hidden from assistive technology: where a glyph is written as a ligature (the web), its name (\"check\", \"remove\") is never announced or shown as text (CHK-12, CHK-19). Checked and indeterminate differ by the glyph alone, and both are exposed as states (CHK-14).","The mark is drawn at its own weight (comp.checkbox.mark.weight, CHK-12), heavier than the system's icons in the default system. Its color already has the contrast of content on its fill; what a light weight loses is the stroke, which at this size is about one pixel wide and is drawn in a mix of the mark's color and the fill's. A system that sets a lighter weight should look at the dash in particular: it is one stroke, and it is all that tells indeterminate from checked.","The selection motion is decoration too: under reduced motion the new condition is drawn whole at once, never later (CHK-17).","The label wraps at 200% text size; the box does not grow with text, because it is a control, not text.","How a state looks is a value decision of the active design system; components read the state's tokens and never compute the effect themselves."]},"tokens":"comp.checkbox","fixtures":[{"id":"unselected","props":{"label":"Email me updates"}},{"id":"selected","props":{"checked":true,"label":"Email me updates"}},{"id":"indeterminate","props":{"indeterminate":true,"label":"Select all"}},{"id":"error-unselected","props":{"error":true,"label":"I accept the terms"}},{"id":"error-selected","props":{"error":true,"checked":true,"label":"I accept the terms"}},{"id":"error-indeterminate","props":{"error":true,"indeterminate":true,"label":"Select all"}},{"id":"disabled-unselected","props":{"disabled":true,"label":"Email me updates"}},{"id":"disabled-selected","props":{"disabled":true,"checked":true,"label":"Email me updates"}},{"id":"disabled-indeterminate","props":{"disabled":true,"indeterminate":true,"label":"Select all"}},{"id":"label-hidden","props":{"checked":true,"label":"Select row","labelHidden":true}},{"id":"read-only-selected","props":{"readOnly":true,"checked":true,"label":"Send me a receipt"}}],"platforms":{"web":{"status":"lagging","name":"tanrei-checkbox","props":{"checked":"checked","indeterminate":"indeterminate","error":"error","disabled":"disabled","readOnly":"readOnly","label":"label","labelHidden":"labelHidden"},"events":{"change":"change"},"parts":{"container":"container","box":"box","outline":"box@outline","mark":"mark","label":"label","focus-ring":"box@focus-ring"},"notes":"Form-associated (ElementInternals): it takes part in a form with `name` and `value` (default \"on\"), resets with it, and honours `required` as the native checkbox does; those three are web attributes, not spec props. It switches its own `checked` before firing `change` (and `input`), as a native checkbox does. `labelHidden` is the `label-hidden` attribute. Inside a `tanrei-checkbox-group` (found with `closest()` when it connects) it takes `checked` from the group, ignores `name` and `required`, submits nothing and fires no `input` or `change` of its own (CHK-23); a `value` attribute it does not carry is no value there, not \"on\". `readOnly` is the `readonly` attribute (HTML's name; the native attribute does not apply to a checkbox, so the element cancels the activation itself and writes `aria-readonly` on its native checkbox)."},"swiftui":{"status":"lagging","name":"TanreiCheckbox","props":{"checked":"isOn","indeterminate":"isIndeterminate","error":"isError","disabled":"disabled","readOnly":"readOnly","label":"title","labelHidden":"labelsHidden"},"events":{"change":"isOn"},"notes":"Toggle idiom: `TanreiCheckbox(_ title:, isOn: Binding<Bool>, isIndeterminate: Bool = false)`; activation writes the binding, which is the change event. `isIndeterminate` is a value the caller derives from its data (a select-all is derived state), so activation sets `isOn` to true and the caller's data clears it. `disabled` follows `.disabled(_:)`; `labelsHidden` follows `.labelsHidden()`."},"compose":{"status":"lagging","name":"TanreiCheckbox","props":{"checked":"checked","indeterminate":"state","error":"isError","disabled":"enabled","readOnly":"readOnly","label":"label","labelHidden":"labelHidden"},"events":{"change":"onCheckedChange"},"notes":"Two overloads, as Compose's own: `TanreiCheckbox(checked, onCheckedChange, …)` and, for a parent that can be indeterminate, `TanreiCheckbox(state: ToggleableState, onClick, …)` in the `TriStateCheckbox` idiom, where the caller computes the next state (CHK-2 says it is `On`). `enabled` is the inverse flag; a null `onCheckedChange` draws a checkbox that only displays."},"flutter":{"status":"lagging","name":"TanreiCheckbox","props":{"checked":"value","indeterminate":"tristate","error":"isError","disabled":"onChanged","readOnly":"readOnly","label":"label","labelHidden":"labelHidden"},"events":{"change":"onChanged"},"notes":"Flutter idiom: `value` is `bool?`; with `tristate: true` a null `value` is indeterminate. Unlike Flutter's Material checkbox, which cycles null → false, activation from null calls `onChanged(true)` (CHK-2). A null `onChanged` disables it."},"react-native":{"status":"lagging","name":"Checkbox","props":{"checked":"value","indeterminate":"indeterminate","error":"error","disabled":"disabled","readOnly":"readOnly","label":"label","labelHidden":"labelHidden"},"events":{"change":"onValueChange"},"notes":"Controlled, in React Native's `value` / `onValueChange` idiom: the caller sets `value` from the callback."}}}