@slotted/react 0.1.0-beta.41 → 0.1.0-beta.42

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 (286) hide show
  1. package/dist/{accordion-n5D6mcmS.js → accordion-xW-aFeGb.js} +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/{action-bar-Cq4dt4hP.js → action-bar-BSUuY6pJ.js} +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/{action-sheet-dNnB26br.js → action-sheet-BouG2qh_.js} +1 -1
  6. package/dist/action-sheet.js +1 -1
  7. package/dist/{app-shell-DyPHYe4K.js → app-shell-D54YkU7E.js} +126 -110
  8. package/dist/app-shell.js +2 -2
  9. package/dist/{calendar-DRuJ7z0H.js → calendar-YQ784o4d.js} +139 -123
  10. package/dist/calendar.js +1 -1
  11. package/dist/{cascader-CivJ76VR.js → cascader-fq8fNWSr.js} +1 -1
  12. package/dist/cascader.js +1 -1
  13. package/dist/{chart-CgXbG6gZ.js → chart-vedR0BDN.js} +1 -1
  14. package/dist/chart.js +1 -1
  15. package/dist/{checkbox-D3E4gzMe.js → checkbox-DsJhlB5c.js} +3 -3
  16. package/dist/{checkbox-group-Dg5YN3fx.js → checkbox-group-pvX9R_yS.js} +2 -2
  17. package/dist/checkbox-group.js +1 -1
  18. package/dist/checkbox.js +1 -1
  19. package/dist/{collapsible-CT4_3aXm.js → collapsible-KzBs5HvA.js} +2 -2
  20. package/dist/collapsible.js +1 -1
  21. package/dist/{color-picker-CeOl4ikV.js → color-picker-i-MJ5VVs.js} +4 -4
  22. package/dist/color-picker.js +1 -1
  23. package/dist/{column-manager-CnOhzVGP.js → column-manager-D028QbfO.js} +5 -5
  24. package/dist/column-manager.js +1 -1
  25. package/dist/{combobox-C2qlkTw6.js → combobox-599heRN_.js} +1 -1
  26. package/dist/combobox.js +1 -1
  27. package/dist/{context-menu-WiKS4Zwv.js → context-menu-WM_tT9hz.js} +1 -1
  28. package/dist/context-menu.js +1 -1
  29. package/dist/{currency-field-LAawS9qo.js → currency-field-rS36pjCO.js} +1 -1
  30. package/dist/currency-field.js +1 -1
  31. package/dist/{dashboard-grid-Zzqmbzqq.js → dashboard-grid-Dh2Q3IQv.js} +2 -2
  32. package/dist/dashboard-grid.js +1 -1
  33. package/dist/{data-grid-Y5aX9njc.js → data-grid-D106baPp.js} +17 -17
  34. package/dist/data-grid.js +1 -1
  35. package/dist/{data-list-CyEq7M2D.js → data-list-BA0xrySM.js} +2 -2
  36. package/dist/data-list.js +1 -1
  37. package/dist/{date-field-CxubN_3u.js → date-field-BZ5JcvXJ.js} +1 -1
  38. package/dist/date-field.js +1 -1
  39. package/dist/{date-picker-6hj83x5D.js → date-picker-BvEbsbJC.js} +4 -4
  40. package/dist/date-picker.js +2 -2
  41. package/dist/{date-range-picker-CBWnFTgL.js → date-range-picker-uIr-yReE.js} +5 -5
  42. package/dist/date-range-picker.js +1 -1
  43. package/dist/{datetime-field-GMIqBuTa.js → datetime-field-DDs3mV9Z.js} +1 -1
  44. package/dist/datetime-field.js +1 -1
  45. package/dist/{datetime-picker-DwUYd3zF.js → datetime-picker-DDYXqrjm.js} +6 -6
  46. package/dist/datetime-picker.js +1 -1
  47. package/dist/{datetime-range-picker-CX_tBt6b.js → datetime-range-picker-CFTHW771.js} +6 -6
  48. package/dist/datetime-range-picker.js +1 -1
  49. package/dist/docs/accordion.examples.md +743 -0
  50. package/dist/docs/accordion.json +84 -28
  51. package/dist/docs/accordion.md +56 -152
  52. package/dist/docs/action-sheet.examples.md +771 -0
  53. package/dist/docs/action-sheet.json +91 -51
  54. package/dist/docs/action-sheet.md +72 -233
  55. package/dist/docs/app-shell.json +7 -0
  56. package/dist/docs/app-shell.md +1 -0
  57. package/dist/docs/breadcrumb.json +64 -16
  58. package/dist/docs/breadcrumb.md +489 -56
  59. package/dist/docs/collapsible.examples.md +575 -0
  60. package/dist/docs/collapsible.json +89 -49
  61. package/dist/docs/collapsible.md +47 -197
  62. package/dist/docs/context-menu.json +58 -18
  63. package/dist/docs/context-menu.md +442 -77
  64. package/dist/docs/field.json +15 -1
  65. package/dist/docs/field.md +3 -1
  66. package/dist/docs/floating-panel.json +56 -0
  67. package/dist/docs/floating-panel.md +329 -8
  68. package/dist/docs/hover-card.json +65 -17
  69. package/dist/docs/hover-card.md +422 -64
  70. package/dist/docs/loading-overlay.examples.md +577 -0
  71. package/dist/docs/loading-overlay.json +55 -23
  72. package/dist/docs/loading-overlay.md +49 -168
  73. package/dist/docs/menu.json +67 -0
  74. package/dist/docs/menu.md +8 -1
  75. package/dist/docs/menubar.json +55 -15
  76. package/dist/docs/menubar.md +488 -42
  77. package/dist/docs/pagination.json +89 -33
  78. package/dist/docs/pagination.md +462 -55
  79. package/dist/docs/popover.json +1 -1
  80. package/dist/docs/popover.md +1 -1
  81. package/dist/docs/select.json +55 -1
  82. package/dist/docs/select.md +7 -2
  83. package/dist/docs/toggle-group.examples.md +584 -0
  84. package/dist/docs/toggle-group.json +84 -20
  85. package/dist/docs/toggle-group.md +17 -182
  86. package/dist/docs/toggle.json +93 -37
  87. package/dist/docs/toggle.md +304 -51
  88. package/dist/{drawer-Du1aC1px.js → drawer-CQagePr_.js} +256 -256
  89. package/dist/drawer.js +1 -1
  90. package/dist/{entity-picker-BwJX0gNJ.js → entity-picker-CC4VoC3p.js} +2 -2
  91. package/dist/entity-picker.js +1 -1
  92. package/dist/{event-calendar-DzlL95E4.js → event-calendar-CjmF_e0H.js} +5 -5
  93. package/dist/event-calendar.js +1 -1
  94. package/dist/field-C-HRhke0.js +421 -0
  95. package/dist/{field-group-7zV68b3d.js → field-group-CU0PasvW.js} +1 -1
  96. package/dist/field-group.js +1 -1
  97. package/dist/field.js +1 -1
  98. package/dist/{filter-bar-DMuP5P6e.js → filter-bar-B3QJD7SZ.js} +11 -11
  99. package/dist/filter-bar.js +1 -1
  100. package/dist/{hover-card-CWCSZ5_p.js → hover-card-CTItbEfH.js} +2 -2
  101. package/dist/hover-card.js +1 -1
  102. package/dist/{import-export-center-DzAUMTq5.js → import-export-center-CW8YVZev.js} +1 -1
  103. package/dist/import-export-center.js +1 -1
  104. package/dist/index.js +132 -132
  105. package/dist/{listbox-CWU3DiEt.js → listbox-ZqiJ2yer.js} +1 -1
  106. package/dist/listbox.js +1 -1
  107. package/dist/{markdown-7wOBMXTl.js → markdown-BdskE4-L.js} +1 -1
  108. package/dist/markdown.js +1 -1
  109. package/dist/menu-parts-DXs5YuUA.js +932 -0
  110. package/dist/menu.js +1 -1
  111. package/dist/{menubar-k8Q4_p9l.js → menubar-CVoAFc6r.js} +2 -2
  112. package/dist/menubar.js +1 -1
  113. package/dist/{multi-select-DEd_92BC.js → multi-select-Dc2d6dDB.js} +1 -1
  114. package/dist/multi-select.js +1 -1
  115. package/dist/{number-field-BJKoidAE.js → number-field-BQ54hXmk.js} +1 -1
  116. package/dist/number-field.js +1 -1
  117. package/dist/{otp-input-Czz9Z6dQ.js → otp-input-DRooqa3f.js} +1 -1
  118. package/dist/otp-input.js +1 -1
  119. package/dist/{pagination-D0PUAFYm.js → pagination-BRXuyPzo.js} +1 -1
  120. package/dist/pagination.js +1 -1
  121. package/dist/{picker-frame-CT5WNEnw.js → picker-frame-B6sPCP5Y.js} +1 -1
  122. package/dist/{popover-B2t__iNO.js → popover-1DlOu95x.js} +198 -197
  123. package/dist/popover.js +1 -1
  124. package/dist/{prompt-composer-Lsfcz_i9.js → prompt-composer-tYIs39rn.js} +1 -1
  125. package/dist/prompt-composer.js +1 -1
  126. package/dist/{radio-group-_ZRUgcI5.js → radio-group-AW3xcYYh.js} +2 -2
  127. package/dist/radio-group.js +1 -1
  128. package/dist/{rating-C6AkIIUi.js → rating-h3qdHLNi.js} +1 -1
  129. package/dist/rating.js +1 -1
  130. package/dist/{saved-views-zM-DxT1F.js → saved-views-nqn0SDXn.js} +4 -4
  131. package/dist/saved-views.js +1 -1
  132. package/dist/{segmented-control-D52GeOlS.js → segmented-control-CbK7SurB.js} +2 -2
  133. package/dist/segmented-control.js +1 -1
  134. package/dist/select-d448Wkzb.js +1124 -0
  135. package/dist/select.js +1 -1
  136. package/dist/{side-navigation-CtZuP87S.js → side-navigation-CKRETc8E.js} +99 -99
  137. package/dist/side-navigation.js +1 -1
  138. package/dist/{slider-DQqQ0skr.js → slider-DQ2CnxTO.js} +1 -1
  139. package/dist/slider.js +1 -1
  140. package/dist/{split-button-BYowsA6Q.js → split-button-D4MPKSB2.js} +1 -1
  141. package/dist/split-button.js +1 -1
  142. package/dist/styles/action-bar.css +1 -1
  143. package/dist/styles/app-shell.css +1 -1
  144. package/dist/styles/cascader.css +2 -0
  145. package/dist/styles/chart.css +1 -1
  146. package/dist/styles/checkbox-group.css +2 -0
  147. package/dist/styles/checkbox.css +2 -0
  148. package/dist/styles/color-picker.css +3 -3
  149. package/dist/styles/column-manager.css +2 -2
  150. package/dist/styles/combobox.css +2 -0
  151. package/dist/styles/context-menu.css +1 -1
  152. package/dist/styles/currency-field.css +2 -0
  153. package/dist/styles/dashboard-grid.css +2 -2
  154. package/dist/styles/data-grid.css +4 -4
  155. package/dist/styles/data-list.css +3 -1
  156. package/dist/styles/date-field.css +2 -0
  157. package/dist/styles/date-picker.css +3 -1
  158. package/dist/styles/date-range-picker.css +3 -1
  159. package/dist/styles/datetime-field.css +2 -0
  160. package/dist/styles/datetime-picker.css +3 -1
  161. package/dist/styles/datetime-range-picker.css +3 -1
  162. package/dist/styles/entity-picker.css +3 -1
  163. package/dist/styles/event-calendar.css +2 -2
  164. package/dist/styles/field-group.css +2 -0
  165. package/dist/styles/field.css +2 -0
  166. package/dist/styles/filter-bar.css +4 -4
  167. package/dist/styles/floating-panel.css +1 -1
  168. package/dist/styles/hover-card.css +1 -1
  169. package/dist/styles/import-export-center.css +3 -3
  170. package/dist/styles/index.css +9 -9
  171. package/dist/styles/listbox.css +2 -0
  172. package/dist/styles/markdown.css +2 -0
  173. package/dist/styles/menu.css +1 -1
  174. package/dist/styles/menubar.css +1 -1
  175. package/dist/styles/multi-select.css +2 -0
  176. package/dist/styles/number-field.css +2 -0
  177. package/dist/styles/otp-input.css +2 -0
  178. package/dist/styles/pagination.css +1 -1
  179. package/dist/styles/popover.css +1 -1
  180. package/dist/styles/prompt-composer.css +2 -0
  181. package/dist/styles/radio-group.css +2 -0
  182. package/dist/styles/rating.css +2 -0
  183. package/dist/styles/saved-views.css +3 -3
  184. package/dist/styles/segmented-control.css +2 -0
  185. package/dist/styles/select.css +3 -1
  186. package/dist/styles/side-navigation.css +1 -1
  187. package/dist/styles/slider.css +2 -0
  188. package/dist/styles/split-button.css +1 -1
  189. package/dist/styles/switch.css +2 -0
  190. package/dist/styles/table.css +3 -3
  191. package/dist/styles/tags-input.css +2 -0
  192. package/dist/styles/text-field.css +2 -0
  193. package/dist/styles/textarea.css +2 -0
  194. package/dist/styles/time-field.css +2 -0
  195. package/dist/styles/time-picker.css +3 -1
  196. package/dist/styles/time-range-picker.css +3 -1
  197. package/dist/styles/toggle-group.css +3 -1
  198. package/dist/styles/toolbar.css +1 -1
  199. package/dist/styles/top-navigation.css +1 -1
  200. package/dist/styles/transfer.css +2 -0
  201. package/dist/styles/upload.css +2 -0
  202. package/dist/styles.css +1 -1
  203. package/dist/{switch-CcZAVLiW.js → switch-DxMukg7F.js} +1 -1
  204. package/dist/switch.js +1 -1
  205. package/dist/{table-D4oX9Gvn.js → table-BecApjeD.js} +13 -13
  206. package/dist/table.js +1 -1
  207. package/dist/{tags-input-O87zTh7h.js → tags-input-CqCeLtk-.js} +1 -1
  208. package/dist/tags-input.js +1 -1
  209. package/dist/{text-field-Cnjc7LB5.js → text-field-CMOkJ9Z6.js} +1 -1
  210. package/dist/text-field.js +1 -1
  211. package/dist/{textarea-DcA7jwOM.js → textarea-DfqPfXTr.js} +1 -1
  212. package/dist/textarea.js +1 -1
  213. package/dist/{time-field-BanhrUvf.js → time-field-GyLQsxcc.js} +1 -1
  214. package/dist/time-field.js +1 -1
  215. package/dist/{time-picker-Cu1iV039.js → time-picker-CGHPnust.js} +3 -3
  216. package/dist/time-picker.js +1 -1
  217. package/dist/{time-range-picker-sdbaFJFN.js → time-range-picker-BMRtAqPy.js} +4 -4
  218. package/dist/time-range-picker.js +1 -1
  219. package/dist/{toggle-zDTD5G3H.js → toggle-DSEEtL3Y.js} +7 -2
  220. package/dist/{toggle-group-D7GQyNQP.js → toggle-group-DZEWkVRo.js} +8 -3
  221. package/dist/toggle-group.js +1 -1
  222. package/dist/toggle.js +1 -1
  223. package/dist/{toolbar-DOV4BKY8.js → toolbar-BP7ka6lN.js} +1 -1
  224. package/dist/toolbar.js +1 -1
  225. package/dist/{top-navigation-D3rpgBV2.js → top-navigation-D8IHPOmm.js} +1 -1
  226. package/dist/top-navigation.js +1 -1
  227. package/dist/{transfer-CuLlF_nY.js → transfer-sKUvmEKe.js} +5 -5
  228. package/dist/transfer.js +1 -1
  229. package/dist/types/app-shell/app-shell-parts.d.ts +7 -0
  230. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  231. package/dist/types/app-shell/index.d.ts +1 -1
  232. package/dist/types/app-shell/index.d.ts.map +1 -1
  233. package/dist/types/calendar/calendar.d.ts.map +1 -1
  234. package/dist/types/calendar/use-clock-today.d.ts +10 -0
  235. package/dist/types/calendar/use-clock-today.d.ts.map +1 -0
  236. package/dist/types/field/field-defaults.d.ts +1 -1
  237. package/dist/types/field/field-defaults.d.ts.map +1 -1
  238. package/dist/types/field/field-help-sheet.d.ts +15 -0
  239. package/dist/types/field/field-help-sheet.d.ts.map +1 -0
  240. package/dist/types/field/field-parts.d.ts +1 -1
  241. package/dist/types/field/field-parts.d.ts.map +1 -1
  242. package/dist/types/field/field.types.d.ts +11 -0
  243. package/dist/types/field/field.types.d.ts.map +1 -1
  244. package/dist/types/field/index.d.ts +1 -1
  245. package/dist/types/field/index.d.ts.map +1 -1
  246. package/dist/types/menu/index.d.ts +1 -1
  247. package/dist/types/menu/index.d.ts.map +1 -1
  248. package/dist/types/menu/menu-defaults.d.ts.map +1 -1
  249. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  250. package/dist/types/menu/menu-sheet-step.d.ts +6 -0
  251. package/dist/types/menu/menu-sheet-step.d.ts.map +1 -0
  252. package/dist/types/menu/menu.d.ts +1 -1
  253. package/dist/types/menu/menu.d.ts.map +1 -1
  254. package/dist/types/menu/menu.types.d.ts +15 -0
  255. package/dist/types/menu/menu.types.d.ts.map +1 -1
  256. package/dist/types/menu/use-menu-sheet.d.ts +9 -0
  257. package/dist/types/menu/use-menu-sheet.d.ts.map +1 -0
  258. package/dist/types/pagination/pagination-parts.d.ts.map +1 -1
  259. package/dist/types/picker-panel/picker-layer.d.ts +4 -1
  260. package/dist/types/picker-panel/picker-layer.d.ts.map +1 -1
  261. package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
  262. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  263. package/dist/types/select/index.d.ts +1 -1
  264. package/dist/types/select/index.d.ts.map +1 -1
  265. package/dist/types/select/select-defaults.d.ts.map +1 -1
  266. package/dist/types/select/select-parts.d.ts.map +1 -1
  267. package/dist/types/select/select.d.ts +6 -2
  268. package/dist/types/select/select.d.ts.map +1 -1
  269. package/dist/types/select/select.types.d.ts +9 -0
  270. package/dist/types/select/select.types.d.ts.map +1 -1
  271. package/dist/types/select/use-select-sheet.d.ts +9 -0
  272. package/dist/types/select/use-select-sheet.d.ts.map +1 -0
  273. package/dist/types/toggle/toggle.d.ts.map +1 -1
  274. package/dist/types/toggle/toggle.types.d.ts +4 -1
  275. package/dist/types/toggle/toggle.types.d.ts.map +1 -1
  276. package/dist/types/toggle-group/toggle-group-parts.d.ts.map +1 -1
  277. package/dist/types/toggle-group/toggle-group.types.d.ts +4 -1
  278. package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
  279. package/dist/{upload-CPl38p-S.js → upload-CuMOaPK3.js} +1 -1
  280. package/dist/upload.js +1 -1
  281. package/dist/{use-date-picker-DWV7KWS7.js → use-date-picker-DdSX3RE4.js} +2 -2
  282. package/dist/{use-picker-draft-BJlHcb6J.js → use-picker-draft-I_pxqYsc.js} +48 -35
  283. package/package.json +6 -6
  284. package/dist/field-vOVzvq5t.js +0 -368
  285. package/dist/menu-parts-DgL617_H.js +0 -814
  286. package/dist/select-BkUuIVBK.js +0 -1017
@@ -92,14 +92,14 @@
92
92
  "docs": {
93
93
  "collapsible": {
94
94
  "imports": {
95
- "source": "import { Collapsible, CollapsibleActions, CollapsibleDefaultsProvider, CollapsibleHeader, CollapsiblePanel, CollapsibleTrigger } from '@slotted/react';"
95
+ "source": "import { Collapsible, CollapsibleActions, CollapsibleDefaultsProvider, CollapsibleHeader, CollapsibleMore, CollapsiblePanel, CollapsibleTrigger } from '@slotted/react';"
96
96
  },
97
97
  "anatomy": [
98
98
  {
99
99
  "part": "root",
100
100
  "element": "div, or the element render returns",
101
101
  "required": true,
102
- "purpose": "The family. A two-column, two-row grid carrying data-ui=\"collapsible\", the six axes, data-open, data-disabled, data-loading and data-value. It is also its own container, so the header reflows on its own inline size rather than the viewport’s."
102
+ "purpose": "The root. A two-column, two-row grid carrying data-ui=\"collapsible\", data-size, data-variant, data-indicator, data-toggle-placement, data-mount, data-truncate, data-open, data-disabled, data-loading, data-peek and data-value. It is also its own container, so the header reflows on its own inline size rather than the viewport’s."
103
103
  },
104
104
  {
105
105
  "part": "header",
@@ -111,7 +111,7 @@
111
111
  "part": "trigger",
112
112
  "element": "button",
113
113
  "required": true,
114
- "purpose": "The control. Holds aria-expanded, aria-controls, the identifier, and every native prop and ref the consumer wrote. Enter and Space are the platform’s, so the family binds no key of its own."
114
+ "purpose": "The control. Holds aria-expanded, aria-controls, the identifier, and every native prop and ref the consumer wrote. Enter and Space are the platform’s, so Collapsible binds no key of its own."
115
115
  },
116
116
  {
117
117
  "part": "indicator",
@@ -159,7 +159,7 @@
159
159
  "part": "more",
160
160
  "element": "button",
161
161
  "required": false,
162
- "purpose": "The control at the end of a peeking panel, past the fade and --slotted-collapsible-more-overlap over the panel, where the content is masked whole; a Button takes its place. Present only while the panel is closed and peek is set, it opens the panel and names it through aria-controls, as the header trigger does."
162
+ "purpose": "The control that opens a peeking panel, placed after the panel and drawn over its fade. It exists only while the panel is closed and peek is set. It opens the panel and names it through aria-controls, as the trigger does. render replaces it, with a Button for example."
163
163
  }
164
164
  ],
165
165
  "api": [
@@ -168,112 +168,112 @@
168
168
  "type": "boolean",
169
169
  "defaultValue": "—",
170
170
  "appliesTo": "Collapsible",
171
- "description": "Present means the consumer owns the state, for the life of the component. Inside an Accordion the set owns it instead, and an explicit open still wins over both"
171
+ "description": "Present means the consumer owns the state, for the life of the component. Inside an Accordion the set owns it instead, and an explicit open still wins over both."
172
172
  },
173
173
  {
174
174
  "name": "defaultOpen",
175
175
  "type": "boolean",
176
176
  "defaultValue": "—",
177
177
  "appliesTo": "Collapsible",
178
- "description": "The value an uncontrolled disclosure starts from, read once. A later change to it does not silently become new state"
178
+ "description": "The value an uncontrolled disclosure starts from, read once. A later change to it does not silently become new state."
179
179
  },
180
180
  {
181
181
  "name": "size",
182
182
  "type": "'sm' | 'md' | 'lg'",
183
183
  "defaultValue": "md",
184
184
  "appliesTo": "Collapsible, Accordion, CollapsibleDefaultsProvider",
185
- "description": "The step the header sits at. The title comes from the type scale and everything geometric from the control scales, so a density changes the rhythm rather than the reading size"
185
+ "description": "The step the header sits at. The title comes from the type scale and everything geometric from the control scales, so a density changes the rhythm rather than the reading size."
186
186
  },
187
187
  {
188
188
  "name": "variant",
189
189
  "type": "'plain' | 'ruled' | 'framed'",
190
190
  "defaultValue": "plain",
191
191
  "appliesTo": "Collapsible, CollapsibleDefaultsProvider",
192
- "description": "plain paints no chrome, ruled draws a hairline above the header so a stack reads as one list, and framed is its own card. An Accordion hands its items the one its own variant maps onto"
192
+ "description": "plain paints no chrome, ruled draws a hairline above the header so a stack reads as one list, and framed is its own card. An Accordion hands its items the one its own variant maps onto."
193
193
  },
194
194
  {
195
195
  "name": "indicator",
196
196
  "type": "'chevron' | 'plus-minus' | 'none'",
197
197
  "defaultValue": "chevron",
198
198
  "appliesTo": "Collapsible, Accordion, CollapsibleDefaultsProvider",
199
- "description": "The mark, drawn from a glyph token. The chevron turns between down and up rather than pointing along the inline axis, so nothing is mirrored for a right-to-left document"
199
+ "description": "The mark, drawn from a glyph token. The chevron turns between down and up rather than pointing along the inline axis, so nothing is mirrored for a right-to-left document."
200
200
  },
201
201
  {
202
202
  "name": "togglePlacement",
203
203
  "type": "'end' | 'start'",
204
204
  "defaultValue": "end",
205
205
  "appliesTo": "Collapsible, Accordion, CollapsibleDefaultsProvider",
206
- "description": "Which side of the words the mark stands on. With it at the start the panel’s content is indented to line up with the title rather than with the mark"
206
+ "description": "Which side of the words the mark stands on. With it at the start the panel’s content is indented to line up with the title rather than with the mark."
207
207
  },
208
208
  {
209
209
  "name": "level",
210
210
  "type": "'none' | '1' | '2' | '3' | '4' | '5' | '6'",
211
211
  "defaultValue": "none",
212
212
  "appliesTo": "Collapsible, CollapsibleDefaultsProvider",
213
- "description": "The heading element the trigger is wrapped in. none renders a div and writes no heading semantics; an Accordion sets it for a whole set through headingLevel"
213
+ "description": "The heading element the trigger is wrapped in. none renders a div and writes no heading semantics; an Accordion sets it for a whole set through headingLevel."
214
214
  },
215
215
  {
216
216
  "name": "mount",
217
217
  "type": "'active' | 'lazy' | 'eager' | 'until-found'",
218
218
  "defaultValue": "eager",
219
219
  "appliesTo": "Collapsible, Accordion, CollapsibleDefaultsProvider",
220
- "description": "When the panel’s content exists. The box always does, so aria-controls never names an element that is gone. until-found writes hidden=\"until-found\" and answers beforematch by opening"
220
+ "description": "When the panel’s content exists. The box always does, so aria-controls never names an element that is gone. until-found writes hidden=\"until-found\" and answers beforematch by opening."
221
221
  },
222
222
  {
223
223
  "name": "peek",
224
224
  "type": "string",
225
225
  "defaultValue": "—",
226
226
  "appliesTo": "Collapsible, CollapsibleDefaultsProvider",
227
- "description": "A length (9rem): a closed panel keeps that block size of its content in view under a fade, stays inert, and animates to its full size with the same durations; forced colors drop the fade and keep the clip. The panel carries data-state=\"peek\", and mount is forced to eager"
227
+ "description": "A length (9rem): a closed panel keeps that block size of its content in view under a fade, stays inert, and animates to its full size with the same durations; forced colors drop the fade and keep the clip. The panel carries data-state=\"peek\", and mount is forced to eager."
228
228
  },
229
229
  {
230
230
  "name": "truncate",
231
231
  "type": "boolean",
232
232
  "defaultValue": "false",
233
233
  "appliesTo": "Collapsible, Accordion, CollapsibleDefaultsProvider",
234
- "description": "Clips the title to one line instead of letting the row grow. The whole string stays in the DOM, which the library decided once for every family"
234
+ "description": "Clips the title to one line instead of letting the row grow. The whole string stays in the DOM, which holds for every component."
235
235
  },
236
236
  {
237
237
  "name": "region",
238
238
  "type": "boolean",
239
239
  "defaultValue": "false",
240
240
  "appliesTo": "Collapsible",
241
- "description": "Makes the panel a region landmark. Off by default, because the pattern’s own example warns that a landmark per panel fills the landmark list"
241
+ "description": "Makes the panel a region landmark. Off by default, because the pattern’s own example warns that a landmark per panel fills the landmark list."
242
242
  },
243
243
  {
244
244
  "name": "disabled",
245
245
  "type": "boolean",
246
246
  "defaultValue": "false",
247
247
  "appliesTo": "Collapsible",
248
- "description": "Reaches the trigger as the native attribute, which is also what stops the press. Unstated rather than false, so the disclosure defers to the Accordion around it"
248
+ "description": "Reaches the trigger as the native attribute, which is also what stops the press. Unstated rather than false, so the disclosure defers to the Accordion around it."
249
249
  },
250
250
  {
251
251
  "name": "loading",
252
252
  "type": "boolean",
253
253
  "defaultValue": "false",
254
254
  "appliesTo": "Collapsible",
255
- "description": "The panel keeps a line’s height and carries aria-busy; what stands in for the content is Skeleton, composed by the consumer"
255
+ "description": "The panel keeps a line’s height and carries aria-busy; what stands in for the content is Skeleton, composed by the consumer."
256
256
  },
257
257
  {
258
258
  "name": "value",
259
259
  "type": "string",
260
260
  "defaultValue": "from useId",
261
261
  "appliesTo": "Collapsible",
262
- "description": "What this disclosure is called inside an Accordion. It is identity rather than state, and it reaches the DOM as data-value"
262
+ "description": "What this disclosure is called inside an Accordion. It is identity rather than state, and it reaches the DOM as data-value."
263
263
  },
264
264
  {
265
265
  "name": "summary",
266
266
  "type": "ReactNode",
267
267
  "defaultValue": "—",
268
268
  "appliesTo": "CollapsibleTrigger",
269
- "description": "What the disclosure holds, at the end of the title line and before the mark, cut with an ellipsis; inside the trigger and therefore inside its accessible name"
269
+ "description": "What the disclosure holds, at the end of the title line and before the mark, cut with an ellipsis; inside the trigger and therefore inside its accessible name."
270
270
  },
271
271
  {
272
272
  "name": "description",
273
273
  "type": "ReactNode",
274
274
  "defaultValue": "—",
275
275
  "appliesTo": "CollapsibleTrigger",
276
- "description": "A second line under the title, inside the trigger and therefore inside its accessible name"
276
+ "description": "A second line under the title, inside the trigger and therefore inside its accessible name."
277
277
  }
278
278
  ],
279
279
  "composition": [
@@ -282,28 +282,28 @@
282
282
  "type": "(props) => ReactNode",
283
283
  "defaultValue": "—",
284
284
  "appliesTo": "Collapsible, CollapsibleHeader, CollapsibleTrigger, CollapsibleActions, CollapsiblePanel",
285
- "description": "Substitutes any of the five roots and hands it every attribute — a disclosure can be a section, a panel an article. The heading may become another element, but the trigger has to stay its only child"
285
+ "description": "Substitutes any of the five roots and hands it every attribute — a disclosure can be a section, a panel an article. The heading may become another element, but the trigger has to stay its only child."
286
286
  },
287
287
  {
288
288
  "name": "ref",
289
289
  "type": "Ref<HTMLElement>",
290
290
  "defaultValue": "—",
291
291
  "appliesTo": "every part",
292
- "description": "Reaches the element itself, so focus() and click() are the platform’s and no imperative handle is invented for what it already ships"
292
+ "description": "Reaches the element itself, so focus() and click() are the platform’s and no imperative handle is invented for what it already ships."
293
293
  },
294
294
  {
295
295
  "name": "useCollapsible()",
296
296
  "type": "() => CollapsibleContextValue",
297
297
  "defaultValue": "—",
298
298
  "appliesTo": "inside Collapsible",
299
- "description": "What the parts read: the open state, the identifiers, the mount strategy, whether the group holds this one open, and toggle(next, reason). It throws outside a family rather than rendering a control that does nothing"
299
+ "description": "What the parts read: the open state, the identifiers, the mount strategy, whether the group holds this one open, and toggle(next, reason). It throws outside Collapsible rather than rendering a control that does nothing."
300
300
  },
301
301
  {
302
302
  "name": "CollapsibleDefaultsProvider",
303
- "type": "{ size, variant, indicator, togglePlacement, level, mount, truncate }",
303
+ "type": "{ size, variant, indicator, togglePlacement, level, mount, peek, truncate }",
304
304
  "defaultValue": "—",
305
305
  "appliesTo": "a subtree",
306
- "description": "The seven decisions an application takes once. An Accordion sits between it and the item, and a disclosure that states any of them itself still wins"
306
+ "description": "The decisions an application takes once: size, variant, indicator, togglePlacement, level, mount, peek and truncate. An Accordion sits between it and the item, and a disclosure that states any of them itself still wins."
307
307
  }
308
308
  ],
309
309
  "events": [
@@ -315,16 +315,16 @@
315
315
  {
316
316
  "name": "onClick, onFocus, onKeyDown, on the trigger",
317
317
  "payload": "the element’s own events",
318
- "when": "Whenever the button fires them. The family composes with a consumer’s handler rather than replacing it: the consumer’s runs first, and preventDefault() in onClick refuses the toggle as well."
318
+ "when": "Whenever the button fires them. Collapsible composes with a consumer’s handler rather than replacing it: the consumer’s runs first, and preventDefault() in onClick refuses the toggle as well."
319
319
  }
320
320
  ],
321
321
  "accessibility": [
322
- "The pattern is the WAI-ARIA APG’s Disclosure (w3.org/WAI/ARIA/apg/patterns/disclosure/), and inside an Accordion it answers the Accordion pattern as well. Its whole keyboard table is the platform’s: the trigger is a button, so Enter and Space toggle without the family binding a key, and Tab reaches it like any other control — the pattern requires every focusable element in an accordion to be in the page tab sequence, which is why nothing here writes tabindex.",
322
+ "The pattern is the WAI-ARIA APG’s Disclosure (w3.org/WAI/ARIA/apg/patterns/disclosure/), and inside an Accordion it answers the Accordion pattern as well. Its whole keyboard table is the platform’s: the trigger is a button, so Enter and Space toggle without Collapsible binding a key, and Tab reaches it like any other control — the pattern requires every focusable element in an accordion to be in the page tab sequence, which is why nothing here writes tabindex.",
323
323
  "The trigger carries aria-expanded and aria-controls; the panel carries aria-labelledby pointing back. Both identifiers come from useId, so a server response and the first client render agree. The panel’s box is never removed — mount drops its content, not the box — because aria-controls naming an element that is not there is a reference a screen reader has to make sense of.",
324
- "A closed panel is out of the tab sequence and out of the accessibility tree twice over: the stylesheet with content-visibility, and the binding with inert, so a browser without the property still cannot put focus inside it. Under mount=\"until-found\" neither applies: hidden=\"until-found\" is what lets the browser’s page search reach the text and open the panel, and beforematch is what tells the family to.",
324
+ "A closed panel is out of the tab sequence and out of the accessibility tree twice over: the stylesheet with content-visibility, and the binding with inert, so a browser without the property still cannot put focus inside it. Under mount=\"until-found\" neither applies: hidden=\"until-found\" is what lets the browser’s page search reach the text and open the panel, and beforematch is what tells Collapsible to open.",
325
325
  "The heading is real. level renders h1 to h6 and the trigger is its only element, which is what the pattern requires; an accordion sets the level once for a whole set. level=\"none\" writes no heading semantics at all, for a disclosure that belongs to no outline.",
326
326
  "aria-disabled appears on the trigger only when an Accordion refuses to let this panel close. That is the pattern’s own instruction for a set that requires one panel to stay open, and it leaves the control focusable and announced rather than removing it from the reader’s path.",
327
- "The element is a button and a region rather than details and summary. What that costs is written down: a page with JavaScript disabled cannot open a panel. What it buys is the accordion pattern — a summary cannot be wrapped in a heading — a value the consumer can own, a request that carries a reason, and a panel that animates without interpolate-size.",
327
+ "The trigger is a button and the panel a div, rather than details and summary. What that costs is written down: a page with JavaScript disabled cannot open a panel. What it buys is the accordion pattern — a summary cannot be wrapped in a heading — a value the consumer can own, a request that carries a reason, and a panel that animates without interpolate-size.",
328
328
  "The mark is never the only thing that says the state: aria-expanded says it to a reader, and the indicator turns rather than changing color, so the high-contrast scheme and forced colors both keep it."
329
329
  ]
330
330
  }
@@ -404,39 +404,39 @@
404
404
  "title": "The three ways it is drawn",
405
405
  "note": "plain paints no chrome, ruled puts a hairline above the header so a stack reads as one list, and framed is a card. All three keep the same geometry.",
406
406
  "language": "tsx",
407
- "source": "<Collapsible variant=\"framed\" defaultOpen>\n <CollapsibleHeader>\n <CollapsibleTrigger>Payment methods</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Credit card, ACH transfer and Zelle.</CollapsiblePanel>\n</Collapsible>;\n",
408
- "verdict": "excerpt"
407
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleVariant() {\n return (\n <Stack gap={4}>\n <Collapsible defaultOpen variant=\"plain\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Payment terms</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Net 30 from the invoice date.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Shipping terms</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>FOB origin. Freight is billed at cost.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Return terms</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Thirty calendar days, unopened pallets only.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
408
+ "verdict": "example"
409
409
  },
410
410
  {
411
411
  "id": "sizes",
412
412
  "title": "The step the header sits at",
413
413
  "note": "The title comes from the type scale, because a header is prose; the row’s height, padding, gap and mark come from the control scales, so a dense page is tighter rather than smaller.",
414
414
  "language": "tsx",
415
- "source": "<Collapsible size=\"lg\" defaultOpen>\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"3 of 12 items\">Summary</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Delivery scheduled for September 12.</CollapsiblePanel>\n</Collapsible>;\n",
416
- "verdict": "excerpt"
415
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleSizes() {\n return (\n <Stack gap={4}>\n <Collapsible defaultOpen size=\"sm\" variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"3 of 12 items\">Inbound shipments</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Next arrival: pallet PL-4410 at 14:20.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen size=\"md\" variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"8 of 20 items\">Outbound shipments</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Next pickup: UPS Ground at 16:30.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen size=\"lg\" variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"5 of 9 zones\">Cycle counts</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Zone C closes at 17:00.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
416
+ "verdict": "example"
417
417
  },
418
418
  {
419
419
  "id": "indicator",
420
420
  "title": "The mark, and which side it stands on",
421
421
  "note": "The chevron turns rather than pointing along the inline axis, so a right-to-left document needs no mirrored artwork; plus-minus is one pair drawn on one grid, and none draws nothing.",
422
422
  "language": "tsx",
423
- "source": "<Collapsible indicator=\"plus-minus\" togglePlacement=\"start\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Invoice</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Issued on September 3.</CollapsiblePanel>\n</Collapsible>;\n",
424
- "verdict": "excerpt"
423
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleIndicator() {\n return (\n <Stack gap={4}>\n <Collapsible defaultOpen indicator=\"chevron\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Carrier contracts</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Three active contracts renew on January 1.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible indicator=\"chevron\" togglePlacement=\"start\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Customs documents</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Commercial invoice and packing list.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen indicator=\"plus-minus\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Supplier invoices</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Seven invoices are due this week.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible indicator=\"plus-minus\" togglePlacement=\"start\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Purchase orders</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Twelve orders await approval.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen indicator=\"none\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Dock schedule</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Door 4 is reserved from 08:00 to 10:00.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
424
+ "verdict": "example"
425
425
  },
426
426
  {
427
427
  "id": "heading",
428
428
  "title": "Where it sits in the outline",
429
429
  "note": "level renders the heading element itself, so a screen reader’s heading list holds the disclosure at the right depth. none renders a div, for a control that belongs to no outline.",
430
430
  "language": "tsx",
431
- "source": "<Collapsible level=\"3\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Return conditions</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Thirty calendar days.</CollapsiblePanel>\n</Collapsible>;\n",
432
- "verdict": "excerpt"
431
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleHeading() {\n return (\n <Collapsible defaultOpen level=\"2\" region variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Return policy</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n <Stack gap={2}>\n <Collapsible defaultOpen level=\"3\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Domestic orders</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Thirty calendar days from delivery.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible level=\"3\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger>International orders</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Sixty days. The buyer pays return freight.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n </CollapsiblePanel>\n </Collapsible>\n );\n}\n",
432
+ "verdict": "example"
433
433
  },
434
434
  {
435
435
  "id": "description",
436
436
  "title": "A summary that stays visible",
437
- "note": "The second line is inside the trigger and therefore inside the accessible name, which is what the pattern means by a snippet of the hidden content staying visible.",
437
+ "note": "The second line is inside the trigger and therefore inside the accessible name, which makes it part of what a screen reader announces for the control.",
438
438
  "language": "tsx",
439
- "source": "<CollapsibleTrigger description=\"2 regras ativas\">Regras de frete</CollapsibleTrigger>;\n",
439
+ "source": "<CollapsibleTrigger description=\"2 active rules\">Shipping rules</CollapsibleTrigger>;\n",
440
440
  "verdict": "excerpt"
441
441
  },
442
442
  {
@@ -444,28 +444,28 @@
444
444
  "title": "A control beside the heading",
445
445
  "note": "It is a sibling of the heading rather than a child, because the pattern requires the button to be the only element inside it — and a control inside a button is invalid besides.",
446
446
  "language": "tsx",
447
- "source": "<Collapsible variant=\"framed\" defaultOpen>\n <CollapsibleHeader>\n <CollapsibleTrigger>Regras de frete</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsibleActions>\n <Toolbar aria-label=\"Rule actions\" size=\"sm\">\n <Button size=\"sm\" variant=\"ghost\">\n Edit\n </Button>\n </Toolbar>\n </CollapsibleActions>\n <CollapsiblePanel>Free shipping over $250.00.</CollapsiblePanel>\n</Collapsible>;\n",
448
- "verdict": "excerpt"
447
+ "source": "import { Button } from '@slotted/react/button';\nimport {\n Collapsible,\n CollapsibleActions,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Toolbar } from '@slotted/react/toolbar';\n\nexport default function CollapsibleActionsExample() {\n return (\n <Collapsible defaultOpen variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Free shipping rule</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsibleActions>\n <Toolbar aria-label=\"Free shipping rule actions\" size=\"sm\">\n <Button size=\"sm\" variant=\"ghost\">\n Edit\n </Button>\n <Button size=\"sm\" variant=\"ghost\">\n Duplicate\n </Button>\n </Toolbar>\n </CollapsibleActions>\n <CollapsiblePanel>\n Free shipping over $250.00 on orders to the contiguous states.\n </CollapsiblePanel>\n </Collapsible>\n );\n}\n",
448
+ "verdict": "example"
449
449
  },
450
450
  {
451
451
  "id": "mount",
452
452
  "title": "When the content exists",
453
- "note": "eager builds it up front so the panel can transition closed, lazy builds it on the first open, active drops it each time, and until-found lets the browser’s own page search open the panel. A closed item under active commits once and reads no layout and no computed style; it creates no observer and no portal. Fifty closed items inside an Accordion, measured in Chrome: 7 ms of script and 23 ms to layout with a production build of React, 46 ms of script and 83 ms to layout with its development build.",
453
+ "note": "eager builds it up front so the panel can transition closed, lazy builds it on the first open, active drops it each time, and until-found lets the browser’s own page search open the panel. A closed item under active commits once and reads no layout and no computed style; it creates no observer and no portal.",
454
454
  "language": "tsx",
455
- "source": "<Collapsible mount=\"until-found\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Delivery history</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Delivered on September 2 by Anna Rivers.</CollapsiblePanel>\n</Collapsible>;\n",
456
- "verdict": "excerpt"
455
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport type { CollapsibleMount } from '@slotted/react/collapsible';\nimport { Field, FieldLabel } from '@slotted/react/field';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\n\nconst NOTES: { mount: CollapsibleMount; title: string }[] = [\n { mount: 'active', title: 'Dock notes' },\n { mount: 'lazy', title: 'Carrier notes' },\n { mount: 'eager', title: 'Receiving notes' },\n];\n\nexport default function CollapsibleMountExample() {\n return (\n <Stack gap={2}>\n {NOTES.map((note) => (\n <Collapsible key={note.mount} mount={note.mount} variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger description={note.mount}>{note.title}</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n <Field>\n <FieldLabel>Note</FieldLabel>\n <TextField placeholder=\"Type, close and reopen\" />\n </Field>\n </CollapsiblePanel>\n </Collapsible>\n ))}\n\n <Collapsible mount=\"until-found\" variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"until-found\">Delivery history</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n Delivered on March 2 by Anna Rivers to the Reno warehouse.\n </CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
456
+ "verdict": "example"
457
457
  },
458
458
  {
459
459
  "id": "states",
460
- "title": "Every state the family paints",
460
+ "title": "Every state it paints",
461
461
  "note": "Hover lays a wash under the row and press goes one step further; disabled answers neither, because the browser has already taken the control out of action; loading holds the box open and says so.",
462
462
  "language": "tsx",
463
- "source": "<Collapsible loading defaultOpen mount=\"lazy\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Delivery history</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n <Skeleton shape=\"text\" />\n </CollapsiblePanel>\n</Collapsible>;\n",
464
- "verdict": "excerpt"
463
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { SkeletonText } from '@slotted/react/skeleton';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleStates() {\n return (\n <Stack gap={4}>\n <Collapsible defaultOpen disabled variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"Read only\">Archived carriers</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Contracts with these carriers closed on December 31.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible defaultOpen loading variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Delivery history</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n <SkeletonText lines={3} />\n </CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
464
+ "verdict": "example"
465
465
  },
466
466
  {
467
467
  "id": "content",
468
- "title": "Content the family did not choose",
468
+ "title": "Content the component did not choose",
469
469
  "note": "A long title grows the row instead of pushing the mark off the line, truncate clips it to one line with the whole string still in the DOM, and a title in another script reads its own way.",
470
470
  "language": "tsx",
471
471
  "source": "<Collapsible truncate>\n <CollapsibleHeader>\n <CollapsibleTrigger>Return conditions for international orders</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Thirty calendar days.</CollapsiblePanel>\n</Collapsible>;\n",
@@ -474,7 +474,7 @@
474
474
  {
475
475
  "id": "composition",
476
476
  "title": "Setting it once, and reaching past it",
477
- "note": "The provider carries the seven decisions an application takes once, render substitutes every root, and a disclosure nests inside another’s panel without the outer one opening it.",
477
+ "note": "CollapsibleDefaultsProvider carries the decisions an application takes once, render substitutes every root, and a disclosure nests inside another’s panel without the outer one opening it.",
478
478
  "language": "tsx",
479
479
  "source": "<CollapsibleDefaultsProvider variant=\"framed\" size=\"sm\">\n <Collapsible>…</Collapsible>\n</CollapsibleDefaultsProvider>;\n",
480
480
  "verdict": "excerpt"
@@ -486,6 +486,46 @@
486
486
  "language": "tsx",
487
487
  "source": "<Collapsible onOpenChange={(open, request) => report(request.reason)}>\n <CollapsibleHeader>\n <CollapsibleTrigger>With the pointer, then with the keyboard</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>The reason changes with the device.</CollapsiblePanel>\n</Collapsible>;\n",
488
488
  "verdict": "excerpt"
489
+ },
490
+ {
491
+ "id": "basic",
492
+ "title": "basic.tsx",
493
+ "note": null,
494
+ "language": "tsx",
495
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\n\nexport default function CollapsibleBasic() {\n return (\n <Collapsible defaultOpen>\n <CollapsibleHeader>\n <CollapsibleTrigger>Delivery address</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n Northwind Traders, 402 Maple Street, Seattle, WA 98101. The dock entrance is on the east\n side.\n </CollapsiblePanel>\n </Collapsible>\n );\n}\n",
496
+ "verdict": "example"
497
+ },
498
+ {
499
+ "id": "controlled",
500
+ "title": "controlled.tsx",
501
+ "note": null,
502
+ "language": "tsx",
503
+ "source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nexport default function CollapsibleControlled() {\n const [open, setOpen] = useState(false);\n const [reason, setReason] = useState('none yet');\n\n return (\n <Stack gap={3}>\n <Inline gap={2}>\n <Button onClick={() => setOpen(true)} size=\"sm\" variant=\"outline\">\n Show pick list\n </Button>\n <Button onClick={() => setOpen(false)} size=\"sm\" variant=\"outline\">\n Hide pick list\n </Button>\n </Inline>\n\n <Collapsible\n onOpenChange={(next, request) => {\n setOpen(next);\n setReason(request.reason);\n }}\n open={open}\n variant=\"framed\"\n >\n <CollapsibleHeader>\n <CollapsibleTrigger>Pick list for wave 12</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>42 lines across 9 orders, starting at aisle B.</CollapsiblePanel>\n </Collapsible>\n\n <Text size=\"sm\" tone=\"muted\">\n Reason of the last request from the trigger: {reason}.\n </Text>\n </Stack>\n );\n}\n",
504
+ "verdict": "example"
505
+ },
506
+ {
507
+ "id": "defaults",
508
+ "title": "defaults.tsx",
509
+ "note": null,
510
+ "language": "tsx",
511
+ "source": "import {\n Collapsible,\n CollapsibleDefaultsProvider,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleDefaults() {\n return (\n <CollapsibleDefaultsProvider\n indicator=\"plus-minus\"\n size=\"sm\"\n togglePlacement=\"start\"\n variant=\"ruled\"\n >\n <Stack gap={2}>\n <Collapsible defaultOpen>\n <CollapsibleHeader>\n <CollapsibleTrigger>Receiving dock</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Six pallets are waiting for putaway.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible>\n <CollapsibleHeader>\n <CollapsibleTrigger>Cold storage</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Temperature held at 36 degrees F.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible indicator=\"chevron\" togglePlacement=\"end\" variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Returns</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Fourteen units are waiting for inspection.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n </CollapsibleDefaultsProvider>\n );\n}\n",
512
+ "verdict": "example"
513
+ },
514
+ {
515
+ "id": "details",
516
+ "title": "details.tsx",
517
+ "note": null,
518
+ "language": "tsx",
519
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\nimport { Stack } from '@slotted/react/stack';\n\nexport default function CollapsibleDetails() {\n return (\n <Stack gap={2}>\n <Collapsible variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger description=\"14 orders, $182,400.00\">\n Open purchase orders\n </CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>PO-2201 to PO-2214, all due before March 15.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger summary=\"4 scheduled\">Carrier pickups</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>UPS 16:30, FedEx 17:00, USPS 18:00, DHL 18:30.</CollapsiblePanel>\n </Collapsible>\n\n <Collapsible truncate variant=\"ruled\">\n <CollapsibleHeader>\n <CollapsibleTrigger summary=\"Updated Mar 4\">\n Return conditions for international orders shipped from the Reno warehouse\n </CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>Sixty days. The buyer pays return freight.</CollapsiblePanel>\n </Collapsible>\n </Stack>\n );\n}\n",
520
+ "verdict": "example"
521
+ },
522
+ {
523
+ "id": "peek",
524
+ "title": "peek.tsx",
525
+ "note": null,
526
+ "language": "tsx",
527
+ "source": "import {\n Collapsible,\n CollapsibleHeader,\n CollapsibleMore,\n CollapsiblePanel,\n CollapsibleTrigger,\n} from '@slotted/react/collapsible';\n\nexport default function CollapsiblePeek() {\n return (\n <Collapsible peek=\"6rem\" variant=\"framed\">\n <CollapsibleHeader>\n <CollapsibleTrigger>Receiving log</CollapsibleTrigger>\n </CollapsibleHeader>\n <CollapsiblePanel>\n <p>08:05 Pallet PL-4401 received at door 2, 24 cartons, no damage.</p>\n <p>08:40 Pallet PL-4402 received at door 2, 18 cartons, one crushed corner.</p>\n <p>09:15 Pallet PL-4403 received at door 4, 30 cartons, no damage.</p>\n <p>10:02 Pallet PL-4404 held for inspection, seal broken on arrival.</p>\n <p>10:48 Pallet PL-4405 received at door 4, 12 cartons, no damage.</p>\n <p>11:30 Pallet PL-4406 received at door 1, 40 cartons, no damage.</p>\n </CollapsiblePanel>\n <CollapsibleMore>Show full log</CollapsibleMore>\n </Collapsible>\n );\n}\n",
528
+ "verdict": "example"
489
529
  }
490
530
  ]
491
531
  }