@kerf-js/veneer 0.0.0-stage → 0.1.0

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 (389) hide show
  1. package/LICENSE +16 -0
  2. package/README.md +1338 -2
  3. package/package.json +56 -3
  4. package/plugin.d.mts +187 -0
  5. package/plugin.mjs +399 -0
  6. package/src/Accordion.tsx +98 -0
  7. package/src/Alert.tsx +55 -0
  8. package/src/Badge.tsx +39 -0
  9. package/src/Button.tsx +175 -0
  10. package/src/Calendar-month.tsx +140 -0
  11. package/src/Calendar.tsx +335 -0
  12. package/src/Canvas.tsx +221 -0
  13. package/src/Card.tsx +85 -0
  14. package/src/Chart.tsx +278 -0
  15. package/src/Charts.tsx +158 -0
  16. package/src/Chip.tsx +61 -0
  17. package/src/Choice-checkbox.tsx +53 -0
  18. package/src/Choice-parts.tsx +7 -0
  19. package/src/Choice-radio.tsx +78 -0
  20. package/src/Choice-segmented.tsx +76 -0
  21. package/src/Choice-switch.tsx +51 -0
  22. package/src/Choice.tsx +4 -0
  23. package/src/CloseX.tsx +14 -0
  24. package/src/CodeBlock.tsx +81 -0
  25. package/src/CodeInput.tsx +256 -0
  26. package/src/Combobox.tsx +281 -0
  27. package/src/CommandPalette-controller.ts +314 -0
  28. package/src/CommandPalette-rows.tsx +137 -0
  29. package/src/CommandPalette.tsx +196 -0
  30. package/src/DataGrid-actions.ts +119 -0
  31. package/src/DataGrid-body.tsx +58 -0
  32. package/src/DataGrid-controller.ts +145 -0
  33. package/src/DataGrid-header.tsx +108 -0
  34. package/src/DataGrid-model.ts +248 -0
  35. package/src/DataGrid-pivot.tsx +108 -0
  36. package/src/DataGrid-rows.tsx +296 -0
  37. package/src/DataGrid-toolbar.tsx +127 -0
  38. package/src/DataGrid-tree.ts +149 -0
  39. package/src/DataGrid-viewport.tsx +37 -0
  40. package/src/DataGrid.tsx +145 -0
  41. package/src/DateField-presets.tsx +27 -0
  42. package/src/DateField-range.tsx +370 -0
  43. package/src/DateField.tsx +295 -0
  44. package/src/Dither.tsx +313 -0
  45. package/src/Drawer.tsx +123 -0
  46. package/src/DurationField.tsx +227 -0
  47. package/src/Feed.tsx +78 -0
  48. package/src/Field/view.tsx +147 -0
  49. package/src/Field.tsx +238 -0
  50. package/src/HamburgerMenu.tsx +119 -0
  51. package/src/Icon.tsx +15 -0
  52. package/src/Kbd.tsx +6 -0
  53. package/src/KeyValueEditor/actions.ts +75 -0
  54. package/src/KeyValueEditor/rows.tsx +104 -0
  55. package/src/KeyValueEditor.tsx +112 -0
  56. package/src/Layout.tsx +221 -0
  57. package/src/Markdown.tsx +127 -0
  58. package/src/MentionsInput/actions.ts +161 -0
  59. package/src/MentionsInput/end.tsx +82 -0
  60. package/src/MentionsInput.tsx +103 -0
  61. package/src/Menu.tsx +221 -0
  62. package/src/Modal.tsx +109 -0
  63. package/src/MonthPicker/month.tsx +117 -0
  64. package/src/MonthPicker/period.tsx +197 -0
  65. package/src/MonthPicker/shared.tsx +272 -0
  66. package/src/MonthPicker/week.tsx +103 -0
  67. package/src/MonthPicker.tsx +11 -0
  68. package/src/MultiSelect.tsx +139 -0
  69. package/src/Nav.tsx +36 -0
  70. package/src/NumberField.tsx +156 -0
  71. package/src/Pagination.tsx +335 -0
  72. package/src/PaymentCard.tsx +111 -0
  73. package/src/Picker.tsx +228 -0
  74. package/src/PlaceField.tsx +285 -0
  75. package/src/Popover.tsx +88 -0
  76. package/src/Presence.tsx +37 -0
  77. package/src/Progress.tsx +71 -0
  78. package/src/RecurrenceField.tsx +372 -0
  79. package/src/RichSelect/codes.tsx +94 -0
  80. package/src/RichSelect/list.tsx +380 -0
  81. package/src/RichSelect/phone-view.tsx +114 -0
  82. package/src/RichSelect/phone.tsx +305 -0
  83. package/src/RichSelect/search-keys.ts +28 -0
  84. package/src/RichSelect/timezone.tsx +53 -0
  85. package/src/RichSelect.tsx +13 -0
  86. package/src/RichTextEditor/controller.tsx +305 -0
  87. package/src/RichTextEditor/editor.tsx +61 -0
  88. package/src/RichTextEditor/tools.tsx +132 -0
  89. package/src/RichTextEditor/view.tsx +210 -0
  90. package/src/RichTextEditor.tsx +9 -0
  91. package/src/ScrollGrid/measure.ts +39 -0
  92. package/src/ScrollGrid/parts.tsx +112 -0
  93. package/src/ScrollGrid.tsx +375 -0
  94. package/src/ScrollRail.tsx +114 -0
  95. package/src/ScrollView.tsx +57 -0
  96. package/src/Segments/controller.tsx +148 -0
  97. package/src/Segments/events.ts +99 -0
  98. package/src/Segments/view.tsx +77 -0
  99. package/src/Segments.tsx +2 -0
  100. package/src/Select.tsx +343 -0
  101. package/src/Shape.tsx +41 -0
  102. package/src/Shell/branches.tsx +108 -0
  103. package/src/Shell/button.tsx +33 -0
  104. package/src/Shell/shared.tsx +220 -0
  105. package/src/Shell/shell.tsx +25 -0
  106. package/src/Shell/state.ts +138 -0
  107. package/src/Shell/view.tsx +280 -0
  108. package/src/Shell.tsx +17 -0
  109. package/src/SideNav/sections.tsx +50 -0
  110. package/src/SideNav/state.ts +140 -0
  111. package/src/SideNav.tsx +130 -0
  112. package/src/SideNavTitle.tsx +25 -0
  113. package/src/SignaturePad/state.ts +172 -0
  114. package/src/SignaturePad/view.tsx +69 -0
  115. package/src/SignaturePad.tsx +76 -0
  116. package/src/Skeleton.tsx +46 -0
  117. package/src/Slider.tsx +81 -0
  118. package/src/Spinner.tsx +21 -0
  119. package/src/Stage-director.ts +361 -0
  120. package/src/Stage-look.ts +75 -0
  121. package/src/Stage-poster.tsx +62 -0
  122. package/src/Stage-types.ts +206 -0
  123. package/src/Stage.tsx +147 -0
  124. package/src/TabBar.tsx +114 -0
  125. package/src/Table-actions.tsx +51 -0
  126. package/src/Table-base.ts +70 -0
  127. package/src/Table-body.tsx +84 -0
  128. package/src/Table-columns.tsx +58 -0
  129. package/src/Table-details.tsx +66 -0
  130. package/src/Table-editor.tsx +66 -0
  131. package/src/Table-head.tsx +52 -0
  132. package/src/Table-model.ts +82 -0
  133. package/src/Table-notice.ts +39 -0
  134. package/src/Table-paging.ts +50 -0
  135. package/src/Table-rows.tsx +308 -0
  136. package/src/Table-selection.ts +63 -0
  137. package/src/Table-sortbar.tsx +41 -0
  138. package/src/Table-source.ts +66 -0
  139. package/src/Table-toolbar.tsx +71 -0
  140. package/src/Table-types.ts +115 -0
  141. package/src/Table-view.tsx +87 -0
  142. package/src/Table.tsx +31 -0
  143. package/src/Tabs.tsx +129 -0
  144. package/src/Tag.tsx +40 -0
  145. package/src/Ticker.tsx +42 -0
  146. package/src/TimeField-date-model.ts +77 -0
  147. package/src/TimeField-date-view.tsx +152 -0
  148. package/src/TimeField-model.ts +80 -0
  149. package/src/TimeField-options.tsx +224 -0
  150. package/src/TimeField-slots.tsx +32 -0
  151. package/src/TimeField-types.ts +33 -0
  152. package/src/TimeField-view.tsx +124 -0
  153. package/src/TimeField.tsx +126 -0
  154. package/src/Toast.tsx +143 -0
  155. package/src/Toggle.tsx +75 -0
  156. package/src/Tooltip.tsx +69 -0
  157. package/src/Type.tsx +136 -0
  158. package/src/VirtualList-controls.ts +105 -0
  159. package/src/VirtualList-data.ts +43 -0
  160. package/src/VirtualList-measure.ts +169 -0
  161. package/src/VirtualList-metrics.ts +41 -0
  162. package/src/VirtualList-mount.ts +145 -0
  163. package/src/VirtualList-rows.tsx +91 -0
  164. package/src/VirtualList-types.ts +76 -0
  165. package/src/VirtualList-view.tsx +123 -0
  166. package/src/VirtualList.tsx +81 -0
  167. package/src/admin/ApiKeys-actions.ts +124 -0
  168. package/src/admin/ApiKeys-form.tsx +64 -0
  169. package/src/admin/ApiKeys-view.tsx +101 -0
  170. package/src/admin/ApiKeys.tsx +224 -0
  171. package/src/admin/Audit.tsx +246 -0
  172. package/src/admin/Billing.tsx +307 -0
  173. package/src/admin/Cart.tsx +177 -0
  174. package/src/admin/Checkout-address.tsx +125 -0
  175. package/src/admin/Checkout-cart.tsx +78 -0
  176. package/src/admin/Checkout-coupon.ts +34 -0
  177. package/src/admin/Checkout-done.tsx +31 -0
  178. package/src/admin/Checkout-model.ts +33 -0
  179. package/src/admin/Checkout-navigation.ts +76 -0
  180. package/src/admin/Checkout-payment-view.tsx +49 -0
  181. package/src/admin/Checkout-payment.ts +80 -0
  182. package/src/admin/Checkout-review.tsx +60 -0
  183. package/src/admin/Checkout-shipping.tsx +47 -0
  184. package/src/admin/Checkout-state.ts +122 -0
  185. package/src/admin/Checkout-steps.ts +10 -0
  186. package/src/admin/Checkout-summary.tsx +97 -0
  187. package/src/admin/Checkout-types.ts +60 -0
  188. package/src/admin/Checkout-view.tsx +51 -0
  189. package/src/admin/Checkout.tsx +72 -0
  190. package/src/admin/CsvImport-actions.ts +131 -0
  191. package/src/admin/CsvImport.tsx +379 -0
  192. package/src/admin/Danger.tsx +240 -0
  193. package/src/admin/Integrations/Card.tsx +82 -0
  194. package/src/admin/Integrations/Webhooks.tsx +341 -0
  195. package/src/admin/Integrations.tsx +169 -0
  196. package/src/admin/InviteDialog.tsx +153 -0
  197. package/src/admin/Members/columns.tsx +181 -0
  198. package/src/admin/Members.tsx +316 -0
  199. package/src/admin/Order.tsx +115 -0
  200. package/src/admin/PlainTable.tsx +34 -0
  201. package/src/admin/Plans.tsx +375 -0
  202. package/src/admin/SaveBar/actions.ts +86 -0
  203. package/src/admin/SaveBar.tsx +153 -0
  204. package/src/admin/Secret.tsx +74 -0
  205. package/src/admin/Settings.tsx +145 -0
  206. package/src/admin/StepBar.tsx +66 -0
  207. package/src/admin/TagsInput/actions.ts +60 -0
  208. package/src/admin/TagsInput.tsx +95 -0
  209. package/src/admin/atoms.tsx +73 -0
  210. package/src/admin/index.ts +67 -0
  211. package/src/agent/Actions/reasons.tsx +38 -0
  212. package/src/agent/Actions.tsx +166 -0
  213. package/src/agent/AgentPlan.tsx +86 -0
  214. package/src/agent/ArtifactPanel.tsx +299 -0
  215. package/src/agent/Assistant.tsx +168 -0
  216. package/src/agent/Checkpoint.tsx +19 -0
  217. package/src/agent/Cite.tsx +70 -0
  218. package/src/agent/ContextMeter.tsx +70 -0
  219. package/src/agent/Conversation.tsx +70 -0
  220. package/src/agent/Message.tsx +92 -0
  221. package/src/agent/ModelPicker.tsx +167 -0
  222. package/src/agent/Prompt-model.ts +118 -0
  223. package/src/agent/Prompt-view.tsx +246 -0
  224. package/src/agent/Prompt.tsx +128 -0
  225. package/src/agent/Prose.tsx +118 -0
  226. package/src/agent/Question.tsx +137 -0
  227. package/src/agent/Reasoning.tsx +31 -0
  228. package/src/agent/Shimmer.tsx +11 -0
  229. package/src/agent/Sources.tsx +23 -0
  230. package/src/agent/SpeechInput.tsx +243 -0
  231. package/src/agent/Suggestions.tsx +36 -0
  232. package/src/agent/ToolCall.tsx +219 -0
  233. package/src/agent/TraceViewer.tsx +96 -0
  234. package/src/agent/bits.tsx +88 -0
  235. package/src/agent/index.ts +38 -0
  236. package/src/bind.ts +57 -0
  237. package/src/collab/AutoTrack.tsx +91 -0
  238. package/src/collab/Comments.tsx +204 -0
  239. package/src/collab/Composer/state.ts +125 -0
  240. package/src/collab/Composer/view.tsx +155 -0
  241. package/src/collab/Composer.tsx +141 -0
  242. package/src/collab/ConversationList.tsx +120 -0
  243. package/src/collab/Cursors.tsx +71 -0
  244. package/src/collab/DataIntegrity.tsx +103 -0
  245. package/src/collab/Kanban-card.ts +74 -0
  246. package/src/collab/Kanban.tsx +368 -0
  247. package/src/collab/Lock.tsx +36 -0
  248. package/src/collab/PresenceStack.tsx +176 -0
  249. package/src/collab/ShareDialog.tsx +273 -0
  250. package/src/collab/Status.tsx +101 -0
  251. package/src/collab/SyncedForm.tsx +42 -0
  252. package/src/collab/Thread/Message.tsx +265 -0
  253. package/src/collab/Thread/rows.tsx +56 -0
  254. package/src/collab/Thread.tsx +323 -0
  255. package/src/collab/VersionHistory.tsx +173 -0
  256. package/src/collab/ViewportRail.tsx +73 -0
  257. package/src/collab/index.ts +37 -0
  258. package/src/collab/peer.tsx +42 -0
  259. package/src/fields.ts +5 -0
  260. package/src/flow/AuthScreen.tsx +81 -0
  261. package/src/flow/AuthSteps.tsx +296 -0
  262. package/src/flow/Checklist.tsx +211 -0
  263. package/src/flow/ConnBanner.tsx +304 -0
  264. package/src/flow/Flow.tsx +97 -0
  265. package/src/flow/MfaSetup.tsx +244 -0
  266. package/src/flow/Otp.tsx +243 -0
  267. package/src/flow/ReauthDialog.tsx +79 -0
  268. package/src/flow/ShortcutsOverlay.tsx +121 -0
  269. package/src/flow/SignGate.tsx +184 -0
  270. package/src/flow/SignIn.tsx +136 -0
  271. package/src/flow/SignUp.tsx +149 -0
  272. package/src/flow/Sso.tsx +96 -0
  273. package/src/flow/SystemPage/accounts.tsx +74 -0
  274. package/src/flow/SystemPage/art.tsx +113 -0
  275. package/src/flow/SystemPage.tsx +395 -0
  276. package/src/flow/Tour.tsx +207 -0
  277. package/src/flow/index.ts +29 -0
  278. package/src/flow/kit.tsx +334 -0
  279. package/src/index.ts +237 -0
  280. package/src/layout.css +4 -0
  281. package/src/links.css +4 -0
  282. package/src/live/ActivityFeed.tsx +88 -0
  283. package/src/live/Bell.tsx +108 -0
  284. package/src/live/Connection.tsx +113 -0
  285. package/src/live/Inbox.tsx +113 -0
  286. package/src/live/InboxFeed.tsx +67 -0
  287. package/src/live/InboxGestures.ts +41 -0
  288. package/src/live/InboxHandlers.ts +102 -0
  289. package/src/live/InboxHeader.tsx +81 -0
  290. package/src/live/InboxModel.ts +81 -0
  291. package/src/live/InboxRow.tsx +125 -0
  292. package/src/live/MeetingRoom.tsx +22 -0
  293. package/src/live/MeetingRoomControlBar.tsx +197 -0
  294. package/src/live/MeetingRoomHandlers.ts +53 -0
  295. package/src/live/MeetingRoomLayout.tsx +27 -0
  296. package/src/live/MeetingRoomModel.ts +49 -0
  297. package/src/live/MeetingRoomMount.ts +49 -0
  298. package/src/live/MeetingRoomParts.tsx +178 -0
  299. package/src/live/MeetingRoomPerson.tsx +21 -0
  300. package/src/live/MeetingRoomState.ts +88 -0
  301. package/src/live/MeetingRoomTile.tsx +84 -0
  302. package/src/live/MeetingRoomTypes.ts +68 -0
  303. package/src/live/MeetingRoomView.tsx +36 -0
  304. package/src/live/NotificationPreferences.tsx +99 -0
  305. package/src/live/NotificationPreferencesActions.ts +55 -0
  306. package/src/live/NotificationPreferencesCell.tsx +26 -0
  307. package/src/live/NotificationPreferencesCells.tsx +59 -0
  308. package/src/live/NotificationPreferencesGrid.tsx +129 -0
  309. package/src/live/NotificationPreferencesModel.tsx +91 -0
  310. package/src/live/NotificationPreferencesSave.ts +85 -0
  311. package/src/live/NotificationPreferencesWatch.ts +31 -0
  312. package/src/live/Prejoin.tsx +238 -0
  313. package/src/live/PrejoinMeter.tsx +26 -0
  314. package/src/live/PrejoinPreview.tsx +53 -0
  315. package/src/live/PushSoftAsk.tsx +63 -0
  316. package/src/live/TransportPicker.tsx +341 -0
  317. package/src/live/TransportPickerDetails.tsx +130 -0
  318. package/src/live/index.ts +31 -0
  319. package/src/live/notify.tsx +22 -0
  320. package/src/live/shared.tsx +110 -0
  321. package/src/parts.tsx +199 -0
  322. package/src/plugin/catalog.mjs +129 -0
  323. package/src/plugin/dtcg.mjs +79 -0
  324. package/src/plugin/icons.mjs +7 -0
  325. package/src/plugin/seed.mjs +40 -0
  326. package/src/plugin/theme-context.mjs +44 -0
  327. package/src/plugin/theme-css.mjs +143 -0
  328. package/src/plugin/theme-motion.mjs +43 -0
  329. package/src/plugin/theme-parts.d.mts +41 -0
  330. package/src/plugin/theme-parts.mjs +224 -0
  331. package/src/plugin/theme-text.mjs +93 -0
  332. package/src/plugin/theme-values.mjs +15 -0
  333. package/src/plugin/theme.d.mts +82 -0
  334. package/src/plugin/theme.mjs +316 -0
  335. package/src/schedule/Agenda.tsx +124 -0
  336. package/src/schedule/AgendaActions.ts +31 -0
  337. package/src/schedule/AgendaDay.tsx +124 -0
  338. package/src/schedule/AgendaGestures.ts +27 -0
  339. package/src/schedule/AgendaKeys.ts +52 -0
  340. package/src/schedule/AgendaModel.ts +82 -0
  341. package/src/schedule/AgendaNavigation.ts +38 -0
  342. package/src/schedule/AgendaPage.tsx +39 -0
  343. package/src/schedule/AgendaStrip.tsx +55 -0
  344. package/src/schedule/AvailabilityEditor-actions.ts +146 -0
  345. package/src/schedule/AvailabilityEditor-day.tsx +119 -0
  346. package/src/schedule/AvailabilityEditor-view.tsx +205 -0
  347. package/src/schedule/AvailabilityEditor.tsx +113 -0
  348. package/src/schedule/BookingCalendar.tsx +121 -0
  349. package/src/schedule/BookingCalendarActions.ts +85 -0
  350. package/src/schedule/BookingCalendarModel.ts +86 -0
  351. package/src/schedule/BookingCalendarParts.tsx +87 -0
  352. package/src/schedule/Calendar/AgendaView.tsx +45 -0
  353. package/src/schedule/Calendar/CalendarDialogs.tsx +105 -0
  354. package/src/schedule/Calendar/CalendarMain.tsx +47 -0
  355. package/src/schedule/Calendar/CalendarToolbar.tsx +106 -0
  356. package/src/schedule/Calendar/Column.tsx +129 -0
  357. package/src/schedule/Calendar/EventBlock.tsx +71 -0
  358. package/src/schedule/Calendar/MiniMonth.tsx +169 -0
  359. package/src/schedule/Calendar/MonthGrid.tsx +296 -0
  360. package/src/schedule/Calendar/TimeGrid.tsx +252 -0
  361. package/src/schedule/Calendar/Timeline.tsx +287 -0
  362. package/src/schedule/Calendar/ZoneChip.tsx +73 -0
  363. package/src/schedule/Calendar/calendar-shell.ts +160 -0
  364. package/src/schedule/Calendar/calendar-state.ts +30 -0
  365. package/src/schedule/Calendar/now-spans.tsx +33 -0
  366. package/src/schedule/Calendar/shared.ts +3 -0
  367. package/src/schedule/Calendar/state-actions.ts +189 -0
  368. package/src/schedule/Calendar/state-base.ts +143 -0
  369. package/src/schedule/Calendar/state-keys.ts +128 -0
  370. package/src/schedule/Calendar/time-fit.ts +84 -0
  371. package/src/schedule/Calendar.tsx +182 -0
  372. package/src/schedule/EventEditor.tsx +267 -0
  373. package/src/schedule/EventPopover.tsx +190 -0
  374. package/src/schedule/MeetingPlanner-model.ts +222 -0
  375. package/src/schedule/MeetingPlanner-view.tsx +310 -0
  376. package/src/schedule/MeetingPlanner.tsx +122 -0
  377. package/src/schedule/MoveSheet.tsx +168 -0
  378. package/src/schedule/YearView-model.ts +164 -0
  379. package/src/schedule/YearView-parts.tsx +147 -0
  380. package/src/schedule/YearView.tsx +100 -0
  381. package/src/schedule/bits.tsx +65 -0
  382. package/src/schedule/index.ts +25 -0
  383. package/src/skeleton-css.ts +4 -0
  384. package/src/styles.ts +13 -0
  385. package/src/type.css +15 -0
  386. package/src/ui.ts +41 -0
  387. package/src/use-ui.ts +10 -0
  388. package/tailwind.css +38 -0
  389. package/tokens/color.mjs +87 -0
@@ -0,0 +1,178 @@
1
+ import { LiveStatus } from '../parts'
2
+ import { Button } from '../Button'
3
+ import { G } from './shared'
4
+ import { Tile } from './MeetingRoomTile'
5
+ import { Person } from './MeetingRoomPerson'
6
+ import { LayoutPicker } from './MeetingRoomLayout'
7
+ import type { MeetingLayout } from './MeetingRoomTypes'
8
+ import type { meetingModel, RoomInputs } from './MeetingRoomModel'
9
+
10
+ type ViewProps = { model: ReturnType<typeof meetingModel>; p: () => RoomInputs }
11
+
12
+ export function MeetingHeader({ model, p: get }: ViewProps) {
13
+ return (
14
+ <div data-part="header">
15
+ <b>{get().title}</b>
16
+ {get().timer !== undefined && <span data-numeric="">{get().timer}</span>}
17
+ {get().recording && (
18
+ <span data-part="rec">
19
+ <span data-scope="status-dot" data-tone="critical"></span>Rec
20
+ </span>
21
+ )}
22
+ <span data-part="spacer"></span>
23
+ {!model.phone.value && (
24
+ <LayoutPicker
25
+ value={model.L.value}
26
+ onChange={(l: MeetingLayout) => {
27
+ model.chosen.set(l)
28
+ if (model.sharingOn.value) model.sharingOn.set(false)
29
+ model.say(`${l[0]!.toUpperCase()}${l.slice(1)} layout`)
30
+ }}
31
+ />
32
+ )}
33
+ <LiveStatus state={model.network.value} label="Connection">
34
+ {model.phone.value ? '' : model.netWords.value}
35
+ </LiveStatus>
36
+ </div>
37
+ )
38
+ }
39
+
40
+ export function MeetingStage({ model, p: get }: ViewProps) {
41
+ return (
42
+ <div
43
+ ref={model.setStage}
44
+ data-part="stage"
45
+ data-layout={model.L.value}
46
+ style={`--_cols:${model.cols.value}`}
47
+ role="group"
48
+ aria-label="Participants"
49
+ >
50
+ {model.L.value === 'gallery' && (
51
+ <div data-part="tiles" role="list" aria-label="Participants">
52
+ {model.people.value.map((p) => (
53
+ <Tile key={p.id} p={p} video={model.v} role="listitem" />
54
+ ))}
55
+ </div>
56
+ )}
57
+ {model.L.value === 'speaker' && model.main.value && (
58
+ <Tile key={model.main.value.id} p={model.main.value} video={model.v} />
59
+ )}
60
+ {model.L.value === 'speaker' && (
61
+ <div data-part="strip" role="list" aria-label="Other participants">
62
+ {model.others.value.map((p) => (
63
+ <Tile key={p.id} p={p} video={model.v} role="listitem" />
64
+ ))}
65
+ </div>
66
+ )}
67
+ {model.L.value === 'presentation' && <Presentation model={model} p={get} />}
68
+ {model.L.value === 'board' && (
69
+ <div data-part="share">
70
+ <header>
71
+ <G name="board" /> Whiteboard · everyone can draw
72
+ </header>
73
+ {get().board ? get().board!() : <div></div>}
74
+ </div>
75
+ )}
76
+ {(model.L.value === 'presentation' || model.L.value === 'board') && (
77
+ <div data-part="rail" role="list" aria-label="Participants">
78
+ {model.people.value.map((p) => (
79
+ <Tile key={p.id} p={p} video={model.v} role="listitem" />
80
+ ))}
81
+ </div>
82
+ )}
83
+ <div
84
+ ref={model.setPip}
85
+ data-scope="pip"
86
+ role="group"
87
+ aria-roledescription="draggable self view"
88
+ aria-label="Self view. Arrow keys move it to a corner."
89
+ tabindex="0"
90
+ >
91
+ <Tile p={model.me.value} self video={model.v} />
92
+ </div>
93
+ </div>
94
+ )
95
+ }
96
+
97
+ function Presentation({ model, p: get }: ViewProps) {
98
+ return (
99
+ <div data-part="share">
100
+ <header>
101
+ <G name="screen" /> {model.presenterText.value} ·{' '}
102
+ {get().shareTitle === undefined ? 'Shared screen' : get().shareTitle}
103
+ {model.sharingOn.value && (
104
+ <Button tone="critical" size="sm" onClick={() => model.toggle('share')}>
105
+ Stop sharing
106
+ </Button>
107
+ )}
108
+ </header>
109
+ {get().share ? get().share!() : <div></div>}
110
+ </div>
111
+ )
112
+ }
113
+
114
+ export function MeetingSidebar({ model, p: get }: ViewProps) {
115
+ return (
116
+ <aside
117
+ data-part="sidebar"
118
+ hidden={!model.side.value}
119
+ aria-label={model.side.value === 'chat' ? 'Chat' : 'People'}
120
+ onKeyDown={model.sideKey}
121
+ >
122
+ <div data-part="app-bar">
123
+ <b>{model.side.value === 'chat' ? 'Chat' : `People · ${model.people.value.length + 1}`}</b>
124
+ <span data-part="spacer"></span>
125
+ {model.phone.value && get().chat && (
126
+ <Button
127
+ emphasis="ghost"
128
+ tone="neutral"
129
+ size="sm"
130
+ onClick={() => model.side.set(model.side.value === 'chat' ? 'people' : 'chat')}
131
+ >
132
+ {model.side.value === 'chat' ? 'People' : 'Chat'}
133
+ </Button>
134
+ )}
135
+ <Button
136
+ emphasis="ghost"
137
+ tone="neutral"
138
+ size="sm"
139
+ data-icon-only=""
140
+ aria-label="Close panel"
141
+ onClick={model.closeSide}
142
+ >
143
+ <G name="x" />
144
+ </Button>
145
+ </div>
146
+ {model.side.value === 'chat' ? (
147
+ get().chat ? (
148
+ get().chat!()
149
+ ) : (
150
+ <div></div>
151
+ )
152
+ ) : (
153
+ <ul data-part="people">
154
+ <Person p={model.me.value} sub="You" />
155
+ {model.people.value.map((p) => (
156
+ <Person
157
+ key={p.id}
158
+ p={p}
159
+ sub={
160
+ p.role ||
161
+ (p.handRaised
162
+ ? 'Hand raised'
163
+ : p.network === 'poor'
164
+ ? 'Poor connection'
165
+ : 'Participant')
166
+ }
167
+ />
168
+ ))}
169
+ </ul>
170
+ )}
171
+ {model.side.value !== 'chat' && get().invite ? (
172
+ <div>{get().invite!()}</div>
173
+ ) : (
174
+ <div hidden></div>
175
+ )}
176
+ </aside>
177
+ )
178
+ }
@@ -0,0 +1,21 @@
1
+ import { Avatar } from '../parts'
2
+ import { avatarTint, G } from './shared'
3
+ import type { Participant } from './MeetingRoomTypes'
4
+
5
+ export function Person({ p, sub }: { p: Participant; sub: string }) {
6
+ return (
7
+ <li>
8
+ <Avatar name={p.name} size="sm" style={avatarTint(p.id)} />
9
+ <span>
10
+ {p.name}
11
+ <small>{sub}</small>
12
+ </span>
13
+ {p.handRaised && (
14
+ <span role="img" aria-label="Hand raised">
15
+ <G name="hand" />
16
+ </span>
17
+ )}
18
+ {p.isMuted ? <G name="micoff" /> : <G name="mic" />}
19
+ </li>
20
+ )
21
+ }
@@ -0,0 +1,88 @@
1
+ import { type LiveState, galleryCols } from '@kerf-js/veneer-core'
2
+ import { derived, state, untrack } from '@kerf-js/core'
3
+ import { held, val } from './shared'
4
+ import type { MeetingLayout, Participant } from './MeetingRoomTypes'
5
+ import type { RoomInputs } from './MeetingRoomModel'
6
+
7
+ export function meetingControls(props: () => RoomInputs) {
8
+ const narrow = state(false)
9
+ const phone = derived(() => props().compact ?? narrow.value)
10
+ const chosen = held<MeetingLayout>(
11
+ () => props().layout,
12
+ untrack(() => props().compact) ? 'speaker' : 'gallery',
13
+ () => props().onLayoutChange,
14
+ )
15
+ const micOn = held<boolean>(
16
+ () => props().mic,
17
+ true,
18
+ () => props().onMic,
19
+ )
20
+ const camOn = held<boolean>(
21
+ () => props().camera,
22
+ true,
23
+ () => props().onCamera,
24
+ )
25
+ const handUp = held<boolean>(
26
+ () => props().hand,
27
+ false,
28
+ () => props().onHand,
29
+ )
30
+ const sharingOn = held<boolean>(
31
+ () => props().sharing,
32
+ false,
33
+ () => props().onShare,
34
+ )
35
+ const side = held<'people' | 'chat' | null>(() => props().sidebar, null)
36
+ const L = derived<MeetingLayout>(() =>
37
+ sharingOn.value
38
+ ? 'presentation'
39
+ : phone.value && chosen.value === 'gallery'
40
+ ? 'speaker'
41
+ : chosen.value,
42
+ )
43
+ return { narrow, phone, chosen, micOn, camOn, handUp, sharingOn, side, L }
44
+ }
45
+
46
+ export function meetingPeople(
47
+ props: () => RoomInputs,
48
+ controls: ReturnType<typeof meetingControls>,
49
+ people: { readonly value: Participant[] },
50
+ ) {
51
+ const speaking = derived(() => people.value.find((p) => p.isSpeaking)?.id)
52
+ const speaker = state<string | undefined>(untrack(() => speaking.value ?? people.value[0]?.id))
53
+ const main = derived(() => people.value.find((p) => p.id === speaker.value) ?? people.value[0])
54
+ const others = derived(() => people.value.filter((p) => p.id !== main.value?.id))
55
+ const me = derived<Participant>(() => ({
56
+ ...props().self,
57
+ isMuted: !controls.micOn.value,
58
+ handRaised: controls.handUp.value,
59
+ isCamOn: controls.camOn.value,
60
+ }))
61
+ const cols = derived(() => galleryCols(people.value.length))
62
+ const network = derived<LiveState>(() => {
63
+ const s = val<string>(props().live === undefined ? 'live' : props().live!)
64
+ return s === 'open' || s === 'live'
65
+ ? 'live'
66
+ : s === 'reconnecting'
67
+ ? 'reconnecting'
68
+ : s === 'connecting'
69
+ ? 'connecting'
70
+ : 'offline'
71
+ })
72
+ const netWords = derived(() =>
73
+ network.value === 'live'
74
+ ? 'Good connection'
75
+ : network.value === 'reconnecting'
76
+ ? 'Reconnecting…'
77
+ : network.value === 'connecting'
78
+ ? 'Connecting…'
79
+ : 'Offline',
80
+ )
81
+ const presenterText = derived(() =>
82
+ controls.sharingOn.value
83
+ ? 'You are presenting'
84
+ : `${props().presenter ?? 'Someone'} is presenting`,
85
+ )
86
+ const v = untrack(() => props().video)
87
+ return { speaking, speaker, main, others, me, cols, network, netWords, presenterText, v }
88
+ }
@@ -0,0 +1,84 @@
1
+ import { hueOf, speakingOut, tileLabel } from '@kerf-js/veneer-core'
2
+ import { derived, untrack } from '@kerf-js/core'
3
+ import { use } from '@kerf-js/veneer-core/kerf'
4
+ import { Avatar } from '../parts'
5
+ import { avatarTint, G } from './shared'
6
+ import type { Participant } from './MeetingRoomTypes'
7
+
8
+ type Video = (p: Participant) => unknown
9
+
10
+ /**
11
+ * A tile (07 §3.1): video slot or avatar, name chip with level bars, flags with words in the name. The speaking ring is
12
+ * the sweep: `data-speaking`, then `data-speaking-out` until it has left. The bars read `--level`: set it on the tile
13
+ * (`[data-pid]`) at whatever rate the audio arrives; nothing re-renders.
14
+ */
15
+ export function Tile({
16
+ p,
17
+ self,
18
+ video,
19
+ role = 'group',
20
+ }: {
21
+ p: Participant
22
+ self?: boolean
23
+ video?: Video | undefined
24
+ role?: string
25
+ }) {
26
+ let el: HTMLDivElement | undefined
27
+ use(
28
+ speakingOut,
29
+ () => el,
30
+ () => !!p.isSpeaking,
31
+ )
32
+ const label = derived(() => tileLabel(self ? { ...p, name: `${p.name}, you` } : p))
33
+ const slot = untrack(() => video)
34
+ const camera = derived(() => !!slot && p.isCamOn !== false)
35
+ return (
36
+ <div
37
+ ref={(n) => (el = n)}
38
+ data-scope="tile"
39
+ role={role}
40
+ tabindex="-1"
41
+ aria-label={label.value}
42
+ data-pid={p.id}
43
+ data-speaking={p.isSpeaking ? '' : undefined}
44
+ data-hand={p.handRaised ? '' : undefined}
45
+ data-network={p.network === 'poor' ? 'poor' : undefined}
46
+ data-cam={p.isCamOn === false ? 'off' : undefined}
47
+ style={`--_hue:var(--veneer-color-data-${hueOf(p.id)})`}
48
+ >
49
+ {camera.value ? (
50
+ <div data-part="video">{slot!(p)}</div>
51
+ ) : (
52
+ <Avatar name={p.name} size="xl" style={avatarTint(p.id)} />
53
+ )}
54
+ <span data-part="flags">
55
+ {p.handRaised && (
56
+ <span data-part="flag" data-kind="hand" role="img" aria-label="Hand raised">
57
+ <G name="hand" />
58
+ </span>
59
+ )}
60
+ {p.network === 'poor' && (
61
+ <span data-part="flag" data-tone="caution" role="img" aria-label="Poor connection">
62
+ <G name="signal" />
63
+ </span>
64
+ )}
65
+ {p.isMuted && (
66
+ <span data-part="flag" data-tone="critical" role="img" aria-label="Muted">
67
+ <G name="micoff" />
68
+ </span>
69
+ )}
70
+ </span>
71
+ <span data-part="name">
72
+ {!p.isMuted && (
73
+ <span data-part="level">
74
+ <i></i>
75
+ <i></i>
76
+ <i></i>
77
+ </span>
78
+ )}
79
+ {self ? 'You' : p.name}
80
+ {p.role ? <small> · {p.role}</small> : null}
81
+ </span>
82
+ </div>
83
+ )
84
+ }
@@ -0,0 +1,68 @@
1
+ import type { ParticipantLike } from '@kerf-js/veneer-core'
2
+ import type { State } from '@kerf-js/core'
3
+
4
+ /** How the room arranges its tiles. */
5
+ export type MeetingLayout = 'gallery' | 'speaker' | 'presentation' | 'board'
6
+ /** Someone in the room. */
7
+ export interface Participant extends ParticipantLike {
8
+ isCamOn?: boolean
9
+ }
10
+ export type Video = (p: Participant) => unknown
11
+
12
+ /** Props for MeetingRoom. */
13
+ export interface MeetingRoomProps {
14
+ title: string
15
+ participants: Participant[] | { value: Participant[] } | (() => Participant[])
16
+ self: Participant
17
+ layout?: State<MeetingLayout> | MeetingLayout | undefined
18
+ /** Called with the layout picked in the switcher. */
19
+ onLayoutChange?: ((l: MeetingLayout) => void) | undefined
20
+ /** Elapsed time, already formatted (the caller owns the clock). */
21
+ timer?: unknown
22
+ /** Shows a Rec badge in the header. */
23
+ recording?: boolean | undefined
24
+ /** The room's connection: `room.status`, mapped. */
25
+ live?: string | (() => string) | undefined
26
+ /** Phone: speaker layout, no switcher, icon-only Leave. Unset: decided by the room's own width after mount. */
27
+ compact?: boolean | undefined
28
+ /** Dark island by default (07 §7). */
29
+ theme?: 'dark' | 'light' | undefined
30
+ /** Media is the caller's: Veneer never touches getUserMedia. Return the <video> for a participant. */
31
+ video?: Video | undefined
32
+ /** The shared screen, for presentation layout. */
33
+ share?: (() => unknown) | undefined
34
+ presenter?: string | undefined
35
+ /** What is being shared, in the presentation header. Default "Shared screen". */
36
+ shareTitle?: string | undefined
37
+ board?: (() => unknown) | undefined
38
+ /** The Chat panel's body. */
39
+ chat?: (() => unknown) | undefined
40
+ /** Below People: "Invite people". */
41
+ invite?: (() => unknown) | undefined
42
+ /** Whether your mic is on: a state the room writes, or a value with `onMic`. */
43
+ mic?: State<boolean> | boolean | undefined
44
+ /** Whether your camera is on: a state the room writes, or a value with `onCamera`. */
45
+ camera?: State<boolean> | boolean | undefined
46
+ /** Whether your hand is raised: a state the room writes, or a value with `onHand`. */
47
+ hand?: State<boolean> | boolean | undefined
48
+ /** Whether you are sharing your screen: a state the room writes, or a value with `onShare`. */
49
+ sharing?: State<boolean> | boolean | undefined
50
+ /** The open side panel, `people` or `chat`, or null for none. */
51
+ sidebar?: State<'people' | 'chat' | null> | 'people' | 'chat' | null | undefined
52
+ /** The emoji the React button sends. Default 🎉. */
53
+ reaction?: string | undefined
54
+ /** Called with the mic's new state. Start or stop the track here. */
55
+ onMic?: ((on: boolean) => void) | undefined
56
+ /** Called with the camera's new state. Start or stop the track here. */
57
+ onCamera?: ((on: boolean) => void) | undefined
58
+ /** Called with `true` when you raise your hand and `false` when you lower it. */
59
+ onHand?: ((on: boolean) => void) | undefined
60
+ /** Called with `true` to start sharing your screen and `false` to stop. */
61
+ onShare?: ((on: boolean) => void) | undefined
62
+ /** Called with the emoji when you react. */
63
+ onReact?: ((emoji: string) => void) | undefined
64
+ /** Called when Leave is pressed. */
65
+ onLeave?: (() => void) | undefined
66
+ /** More: replaces the phone's default, which opens the People and Chat panel. */
67
+ onMore?: (() => void) | undefined
68
+ }
@@ -0,0 +1,36 @@
1
+ import { ControlBar } from './MeetingRoomControlBar'
2
+ import { MeetingHeader, MeetingStage, MeetingSidebar } from './MeetingRoomParts'
3
+ import type { meetingModel, RoomInputs } from './MeetingRoomModel'
4
+
5
+ export function MeetingRoomView({
6
+ model,
7
+ p,
8
+ }: {
9
+ model: ReturnType<typeof meetingModel>
10
+ p: () => RoomInputs
11
+ }) {
12
+ return (
13
+ <div
14
+ ref={model.setRoot}
15
+ data-scope="room"
16
+ data-part="root"
17
+ data-theme={p().theme === undefined ? 'dark' : p().theme}
18
+ role="region"
19
+ aria-label={`${p().title} meeting`}
20
+ >
21
+ <MeetingHeader model={model} p={p} />
22
+ <MeetingStage model={model} p={p} />
23
+ <MeetingSidebar model={model} p={p} />
24
+ <ControlBar
25
+ mic={model.micOn.value}
26
+ camera={model.camOn.value}
27
+ sharing={model.sharingOn.value}
28
+ hand={model.handUp.value}
29
+ side={model.side.value}
30
+ compact={model.phone.value}
31
+ onToggle={model.toggle}
32
+ onLeave={() => p().onLeave?.()}
33
+ />
34
+ </div>
35
+ )
36
+ }
@@ -0,0 +1,99 @@
1
+ import { type PrefChange, type PrefGroup, type PrefValues } from '@kerf-js/veneer-core'
2
+ import { Button } from '../Button'
3
+ import { Select } from '../Select'
4
+ import { preferencesModel } from './NotificationPreferencesModel'
5
+ import { PreferencesHead, PreferencesGroup } from './NotificationPreferencesGrid'
6
+ import '../fields'
7
+ import '@kerf-js/veneer-core/styles/app/prefs-matrix.css'
8
+
9
+ /** A column of the preferences grid: email, push and so on. */
10
+ export interface PrefChannel {
11
+ id: string
12
+ label: string
13
+ }
14
+ /** Props for NotificationPreferences. */
15
+ export interface NotificationPreferencesProps {
16
+ /** The grid's name: the id of a heading, else this text is rendered in a visually hidden one. */
17
+ title?: string
18
+ groups: PrefGroup[]
19
+ channels: PrefChannel[]
20
+ value: PrefValues | { value: PrefValues } | (() => PrefValues)
21
+ /** Event id → the channels it can use. An event not listed can use all. */
22
+ offered?: Record<string, string[]> | undefined
23
+ /** Event id → the channels it must use. */
24
+ locked?: Record<string, string[]> | undefined
25
+ lockReason?: string
26
+ /** Every change saves on its own; a rejected promise flips the cells back and says why. */
27
+ onChange?: ((changes: PrefChange[]) => void | Promise<unknown>) | undefined
28
+ digest?: string
29
+ /** The channel the digest applies to. */
30
+ digestChannel?: string
31
+ /** The email delivery choices, such as instant, hourly or daily. */
32
+ digests?: { value: string; label: string }[]
33
+ /** Called with the delivery picked. A rejected promise puts the old one back. */
34
+ onDigest?: (digest: string) => void | Promise<unknown>
35
+ /** Enables Reset to defaults. */
36
+ defaults?: { value: PrefValues; digest?: string }
37
+ }
38
+
39
+ const DIGESTS = [
40
+ { value: 'instant', label: 'Instantly' },
41
+ { value: 'hourly', label: 'Hourly digest' },
42
+ { value: 'daily', label: 'Daily digest at 9:00' },
43
+ { value: 'weekly', label: 'Weekly digest, Mondays' },
44
+ ]
45
+
46
+ /**
47
+ * NotificationPreferences (07 §4.6): event × channel, one APG grid with one tab stop. Group and channel toggles are
48
+ * tri-state; a required channel is locked and says why; a channel an event can't use is a plain "—" that still takes
49
+ * focus. Saves on every change, optimistically; a rejected save flips back. The same DOM restacks below 560px.
50
+ */
51
+ export function NotificationPreferences(props: NotificationPreferencesProps) {
52
+ const state = preferencesModel(() => props)
53
+ return (
54
+ <div data-scope="prefs-matrix">
55
+ <span data-part="sr-only" id={`${state.id}-t`}>
56
+ {props.title === undefined ? 'Notification preferences' : props.title}
57
+ </span>
58
+ <div
59
+ ref={state.setGrid}
60
+ role="grid"
61
+ data-part="grid"
62
+ aria-labelledby={`${state.id}-t`}
63
+ aria-describedby={`${state.id}-k`}
64
+ >
65
+ <PreferencesHead channels={props.channels} state={state} />
66
+ {props.groups.map((g) => (
67
+ <PreferencesGroup key={g.id} g={g} channels={props.channels} state={state} />
68
+ ))}
69
+ </div>
70
+ <span data-part="sr-only" id={`${state.id}-k`}>
71
+ Arrow keys move between cells, Home and End to the row's ends, Control Home and End to the
72
+ grid's corners, Space toggles.
73
+ </span>
74
+ <span data-part="sr-only" id={`${state.id}-lock`}>
75
+ {props.lockReason === undefined
76
+ ? 'Required: this alert always goes to your account.'
77
+ : props.lockReason}
78
+ </span>
79
+ <div data-part="footer">
80
+ <Select
81
+ label="Email delivery"
82
+ options={props.digests === undefined ? DIGESTS : props.digests}
83
+ value={state.mail.value}
84
+ disabled={!state.emailOn.value}
85
+ hint={state.hint.value}
86
+ onChange={state.pickDigest}
87
+ />
88
+ <span data-part="status" role="status" data-state={state.save.value}>
89
+ {state.statusText.value}
90
+ </span>
91
+ {state.reset && (
92
+ <Button emphasis="ghost" tone="neutral" size="sm" onClick={state.doReset}>
93
+ Reset to defaults
94
+ </Button>
95
+ )}
96
+ </div>
97
+ </div>
98
+ )
99
+ }
@@ -0,0 +1,55 @@
1
+ import { prefCell, type PrefEvent, type PrefRules, type PrefValues } from '@kerf-js/veneer-core'
2
+ import type { State } from '@kerf-js/core'
3
+ import type { Inputs } from './NotificationPreferencesModel'
4
+ import type { preferencesSave } from './NotificationPreferencesSave'
5
+
6
+ export function preferencesActions({
7
+ p,
8
+ model,
9
+ mail,
10
+ events,
11
+ reset,
12
+ fixed,
13
+ commit,
14
+ }: {
15
+ p: () => Inputs
16
+ model: State<PrefValues>
17
+ mail: State<string>
18
+ events: { readonly value: PrefEvent[] }
19
+ reset: Inputs['defaults']
20
+ fixed: PrefRules
21
+ commit: ReturnType<typeof preferencesSave>['commit']
22
+ }) {
23
+ const doReset = () =>
24
+ commit(
25
+ () => {
26
+ model.value = reset!.value
27
+ mail.value = reset!.digest ?? 'instant'
28
+ },
29
+ async () => {
30
+ await p().onChange?.(
31
+ events.value.flatMap((e) =>
32
+ p().channels.flatMap((c) =>
33
+ prefCell(reset!.value, fixed, e.id, c.id) === 'na' ||
34
+ prefCell(reset!.value, fixed, e.id, c.id) === 'locked'
35
+ ? []
36
+ : [{ event: e.id, channel: c.id, on: !!reset!.value[e.id]?.[c.id] }],
37
+ ),
38
+ ),
39
+ )
40
+ await p().onDigest?.(reset!.digest ?? 'instant')
41
+ },
42
+ 'Notification settings reset to defaults',
43
+ )
44
+ const pickDigest = (e: Event) => {
45
+ const el = e.target as HTMLSelectElement
46
+ const next = el.value
47
+ void commit(
48
+ () => (mail.value = next),
49
+ () => p().onDigest?.(next),
50
+ `Email delivery: ${el.selectedOptions[0]!.textContent}`,
51
+ )
52
+ }
53
+
54
+ return { doReset, pickDigest }
55
+ }
@@ -0,0 +1,26 @@
1
+ import { Checkbox } from '../Choice'
2
+
3
+ export function EventCell({
4
+ on,
5
+ text,
6
+ ch,
7
+ onToggle,
8
+ }: {
9
+ on: boolean
10
+ text: string
11
+ ch: string
12
+ onToggle: (v: boolean) => unknown
13
+ }) {
14
+ return (
15
+ <Checkbox
16
+ checked={on}
17
+ tabindex="-1"
18
+ onChange={(e: Event) => onToggle((e.target as HTMLInputElement).checked)}
19
+ >
20
+ <span data-part="sr-only">{text}</span>
21
+ <span data-part="ch-name" aria-hidden="true">
22
+ {ch}
23
+ </span>
24
+ </Checkbox>
25
+ )
26
+ }