@pg-labs-incubator/cobweb 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/LICENSE +163 -0
  2. package/README.md +82 -2
  3. package/package.json +112 -3
  4. package/src/action/action.yaml +291 -0
  5. package/src/action/button-group.yaml +56 -0
  6. package/src/action/button.yaml +239 -0
  7. package/src/action/split-button.yaml +87 -0
  8. package/src/color/color.yaml +181 -0
  9. package/src/color/palette.yaml +147 -0
  10. package/src/container/card.yaml +170 -0
  11. package/src/container/corner-radius.yaml +50 -0
  12. package/src/container/elevation.yaml +19 -0
  13. package/src/design.yaml +41 -0
  14. package/src/feedback/feedback.yaml +225 -0
  15. package/src/icon/icon-font.yaml +28 -0
  16. package/src/icon/icon.yaml +31 -0
  17. package/src/input/date-picker.yaml +144 -0
  18. package/src/input/date-range-input.yaml +162 -0
  19. package/src/input/range-slider.yaml +161 -0
  20. package/src/input/select.yaml +230 -0
  21. package/src/input/slider.yaml +172 -0
  22. package/src/input/text-field.yaml +240 -0
  23. package/src/input/time-picker.yaml +220 -0
  24. package/src/motion/motion.yaml +371 -0
  25. package/src/navigation/app-bar.yaml +147 -0
  26. package/src/navigation/navigation.yaml +339 -0
  27. package/src/navigation/scroll.yaml +23 -0
  28. package/src/navigation/search.yaml +112 -0
  29. package/src/navigation/tabs.yaml +144 -0
  30. package/src/navigation/toolbar.yaml +130 -0
  31. package/src/selection/checkbox.yaml +162 -0
  32. package/src/selection/chip.yaml +219 -0
  33. package/src/selection/radio.yaml +125 -0
  34. package/src/selection/segmented-group.yaml +11 -0
  35. package/src/selection/segmented.yaml +69 -0
  36. package/src/selection/switch.yaml +209 -0
  37. package/src/spacing/measurement.yaml +80 -0
  38. package/src/state/state.yaml +38 -0
  39. package/src/surface/surface.yaml +483 -0
  40. package/src/text/line-height.yaml +144 -0
  41. package/src/text/typeface.yaml +31 -0
  42. package/src/text/typescale.yaml +726 -0
  43. package/target/esbuild/action/action.css +1 -0
  44. package/target/esbuild/action/base.jsx +1 -0
  45. package/target/esbuild/action/button.jsx +17 -0
  46. package/target/esbuild/action/fab-menu-context.jsx +1 -0
  47. package/target/esbuild/action/fab-menu.jsx +15 -0
  48. package/target/esbuild/action/fab.jsx +7 -0
  49. package/target/esbuild/action/group.jsx +22 -0
  50. package/target/esbuild/action/icon-button.jsx +5 -0
  51. package/target/esbuild/action/index.jsx +1 -0
  52. package/target/esbuild/action/split-button.jsx +12 -0
  53. package/target/esbuild/color/contrast.jsx +1 -0
  54. package/target/esbuild/color/dynamic.jsx +1 -0
  55. package/target/esbuild/color/hct.jsx +1 -0
  56. package/target/esbuild/color/index.css +1 -0
  57. package/target/esbuild/color/index.jsx +1 -0
  58. package/target/esbuild/color/palette.jsx +1 -0
  59. package/target/esbuild/color/scheme.jsx +1 -0
  60. package/target/esbuild/color/temperature.jsx +1 -0
  61. package/target/esbuild/container/card.css +1 -0
  62. package/target/esbuild/container/card.jsx +1 -0
  63. package/target/esbuild/container/elevation-shadow.css +1 -0
  64. package/target/esbuild/container/elevation-shadow.jsx +1 -0
  65. package/target/esbuild/container/index.jsx +1 -0
  66. package/target/esbuild/dom/client.jsx +1 -0
  67. package/target/esbuild/dom/index.jsx +1 -0
  68. package/target/esbuild/dom/server.jsx +1 -0
  69. package/target/esbuild/dom/types.jsx +1 -0
  70. package/target/esbuild/feedback/badge.jsx +15 -0
  71. package/target/esbuild/feedback/feedback.css +1 -0
  72. package/target/esbuild/feedback/focus.jsx +1 -0
  73. package/target/esbuild/feedback/index.jsx +1 -0
  74. package/target/esbuild/feedback/loading.jsx +7 -0
  75. package/target/esbuild/feedback/observe.jsx +1 -0
  76. package/target/esbuild/feedback/progress.jsx +35 -0
  77. package/target/esbuild/feedback/snackbar.jsx +23 -0
  78. package/target/esbuild/feedback/tooltip.jsx +24 -0
  79. package/target/esbuild/icon/icon.css +1 -0
  80. package/target/esbuild/icon/icon.jsx +1 -0
  81. package/target/esbuild/icon/index.jsx +1 -0
  82. package/target/esbuild/index.css +1 -0
  83. package/target/esbuild/index.jsx +1 -0
  84. package/target/esbuild/input/autocomplete.jsx +5 -0
  85. package/target/esbuild/input/base.jsx +4 -0
  86. package/target/esbuild/input/date-picker.css +1 -0
  87. package/target/esbuild/input/date-picker.jsx +104 -0
  88. package/target/esbuild/input/date-range-input.css +1 -0
  89. package/target/esbuild/input/date-time.jsx +21 -0
  90. package/target/esbuild/input/index.css +1 -0
  91. package/target/esbuild/input/index.jsx +1 -0
  92. package/target/esbuild/input/paired-input.jsx +1 -0
  93. package/target/esbuild/input/picker-dialog.css +1 -0
  94. package/target/esbuild/input/picker-dialog.jsx +14 -0
  95. package/target/esbuild/input/select.css +1 -0
  96. package/target/esbuild/input/select.jsx +63 -0
  97. package/target/esbuild/input/slider.css +1 -0
  98. package/target/esbuild/input/slider.jsx +51 -0
  99. package/target/esbuild/input/text-field.css +1 -0
  100. package/target/esbuild/input/text-field.jsx +67 -0
  101. package/target/esbuild/input/time-picker.css +1 -0
  102. package/target/esbuild/input/time-picker.jsx +29 -0
  103. package/target/esbuild/motion/frame.jsx +1 -0
  104. package/target/esbuild/motion/index.css +1 -0
  105. package/target/esbuild/motion/index.jsx +1 -0
  106. package/target/esbuild/motion/material.jsx +1 -0
  107. package/target/esbuild/motion/motion.jsx +1 -0
  108. package/target/esbuild/motion/spring.jsx +1 -0
  109. package/target/esbuild/motion/transition.css +1 -0
  110. package/target/esbuild/motion/transition.jsx +1 -0
  111. package/target/esbuild/motion/velocity.jsx +1 -0
  112. package/target/esbuild/navigation/app-bar.jsx +51 -0
  113. package/target/esbuild/navigation/base.jsx +1 -0
  114. package/target/esbuild/navigation/drawer.jsx +25 -0
  115. package/target/esbuild/navigation/index.jsx +1 -0
  116. package/target/esbuild/navigation/navigation.css +1 -0
  117. package/target/esbuild/navigation/navigation.jsx +29 -0
  118. package/target/esbuild/navigation/scroll.jsx +1 -0
  119. package/target/esbuild/navigation/search.jsx +29 -0
  120. package/target/esbuild/navigation/tabs.jsx +7 -0
  121. package/target/esbuild/navigation/toolbar.jsx +23 -0
  122. package/target/esbuild/selection/base.jsx +1 -0
  123. package/target/esbuild/selection/checkbox.jsx +14 -0
  124. package/target/esbuild/selection/chip.jsx +23 -0
  125. package/target/esbuild/selection/index.jsx +1 -0
  126. package/target/esbuild/selection/radio.jsx +9 -0
  127. package/target/esbuild/selection/segmented.jsx +15 -0
  128. package/target/esbuild/selection/selection.css +1 -0
  129. package/target/esbuild/selection/switch.jsx +14 -0
  130. package/target/esbuild/shape/corner-rounding.jsx +1 -0
  131. package/target/esbuild/shape/cubic.jsx +1 -0
  132. package/target/esbuild/shape/index.jsx +1 -0
  133. package/target/esbuild/shape/material-shapes.jsx +1 -0
  134. package/target/esbuild/shape/morph.jsx +1 -0
  135. package/target/esbuild/shape/path.jsx +1 -0
  136. package/target/esbuild/shape/point.jsx +1 -0
  137. package/target/esbuild/shape/rounded-polygon.jsx +1 -0
  138. package/target/esbuild/shape/shapes.jsx +1 -0
  139. package/target/esbuild/spacing/index.jsx +1 -0
  140. package/target/esbuild/state/component.css +1 -0
  141. package/target/esbuild/state/component.jsx +1 -0
  142. package/target/esbuild/state/controller.jsx +1 -0
  143. package/target/esbuild/state/index.jsx +1 -0
  144. package/target/esbuild/state/ripple.jsx +1 -0
  145. package/target/esbuild/state/state.jsx +1 -0
  146. package/target/esbuild/state/style.jsx +1 -0
  147. package/target/esbuild/surface/carousel-layout.jsx +1 -0
  148. package/target/esbuild/surface/carousel.css +1 -0
  149. package/target/esbuild/surface/carousel.jsx +10 -0
  150. package/target/esbuild/surface/dialog.jsx +35 -0
  151. package/target/esbuild/surface/divider.jsx +1 -0
  152. package/target/esbuild/surface/drag.jsx +1 -0
  153. package/target/esbuild/surface/gestures.css +1 -0
  154. package/target/esbuild/surface/gestures.jsx +7 -0
  155. package/target/esbuild/surface/index.css +1 -0
  156. package/target/esbuild/surface/index.jsx +1 -0
  157. package/target/esbuild/surface/interactive.jsx +1 -0
  158. package/target/esbuild/surface/list-patterns.jsx +26 -0
  159. package/target/esbuild/surface/list.css +1 -0
  160. package/target/esbuild/surface/list.jsx +9 -0
  161. package/target/esbuild/surface/menu.css +1 -0
  162. package/target/esbuild/surface/menu.jsx +12 -0
  163. package/target/esbuild/surface/scaffold.jsx +47 -0
  164. package/target/esbuild/surface/sheet.jsx +21 -0
  165. package/target/esbuild/surface/side-sheet.jsx +17 -0
  166. package/target/esbuild/surface/slots.jsx +1 -0
  167. package/target/esbuild/surface/surface.css +1 -0
  168. package/target/esbuild/surface/surface.jsx +1 -0
  169. package/target/esbuild/text/index.css +1 -0
  170. package/target/esbuild/text/index.jsx +1 -0
  171. package/target/esbuild/text/text.css +1 -0
  172. package/target/esbuild/text/text.jsx +3 -0
  173. package/target/esbuild/text/typography.css +1 -0
  174. package/target/esbuild/text/typography.jsx +1 -0
  175. package/target/esbuild/util/box-side.jsx +1 -0
  176. package/target/esbuild/util/debug.jsx +1 -0
  177. package/target/esbuild/util/dom.jsx +1 -0
  178. package/target/esbuild/util/event.jsx +1 -0
  179. package/target/esbuild/util/index.jsx +1 -0
  180. package/target/esbuild/util/preconditions.jsx +1 -0
  181. package/target/esbuild/util/reactive.jsx +1 -0
  182. package/target/tsc/action/action.css.d.ts +3 -0
  183. package/target/tsc/action/base.d.ts +211 -0
  184. package/target/tsc/action/button.d.ts +126 -0
  185. package/target/tsc/action/fab-menu-context.d.ts +16 -0
  186. package/target/tsc/action/fab-menu.d.ts +112 -0
  187. package/target/tsc/action/fab.d.ts +98 -0
  188. package/target/tsc/action/group.d.ts +166 -0
  189. package/target/tsc/action/icon-button.d.ts +79 -0
  190. package/target/tsc/action/index.d.ts +24 -0
  191. package/target/tsc/action/split-button.d.ts +78 -0
  192. package/target/tsc/color/contrast.d.ts +48 -0
  193. package/target/tsc/color/dynamic.d.ts +203 -0
  194. package/target/tsc/color/hct.d.ts +114 -0
  195. package/target/tsc/color/index.css.d.ts +3 -0
  196. package/target/tsc/color/index.d.ts +23 -0
  197. package/target/tsc/color/palette.d.ts +30 -0
  198. package/target/tsc/color/scheme.d.ts +446 -0
  199. package/target/tsc/color/temperature.d.ts +24 -0
  200. package/target/tsc/container/card.css.d.ts +3 -0
  201. package/target/tsc/container/card.d.ts +110 -0
  202. package/target/tsc/container/elevation-shadow.css.d.ts +3 -0
  203. package/target/tsc/container/elevation-shadow.d.ts +23 -0
  204. package/target/tsc/container/index.d.ts +44 -0
  205. package/target/tsc/dom/client.d.ts +387 -0
  206. package/target/tsc/dom/index.d.ts +93 -0
  207. package/target/tsc/dom/server.d.ts +65 -0
  208. package/target/tsc/dom/types.d.ts +134 -0
  209. package/target/tsc/feedback/badge.d.ts +116 -0
  210. package/target/tsc/feedback/feedback.css.d.ts +3 -0
  211. package/target/tsc/feedback/focus.d.ts +20 -0
  212. package/target/tsc/feedback/index.d.ts +17 -0
  213. package/target/tsc/feedback/loading.d.ts +194 -0
  214. package/target/tsc/feedback/observe.d.ts +75 -0
  215. package/target/tsc/feedback/progress.d.ts +281 -0
  216. package/target/tsc/feedback/snackbar.d.ts +398 -0
  217. package/target/tsc/feedback/tooltip.d.ts +326 -0
  218. package/target/tsc/icon/icon.css.d.ts +3 -0
  219. package/target/tsc/icon/icon.d.ts +69 -0
  220. package/target/tsc/icon/index.d.ts +13 -0
  221. package/target/tsc/index.css.d.ts +3 -0
  222. package/target/tsc/index.d.ts +7 -0
  223. package/target/tsc/input/autocomplete.d.ts +119 -0
  224. package/target/tsc/input/base.d.ts +282 -0
  225. package/target/tsc/input/date-picker.css.d.ts +3 -0
  226. package/target/tsc/input/date-picker.d.ts +351 -0
  227. package/target/tsc/input/date-range-input.css.d.ts +3 -0
  228. package/target/tsc/input/date-time.d.ts +171 -0
  229. package/target/tsc/input/index.css.d.ts +3 -0
  230. package/target/tsc/input/index.d.ts +27 -0
  231. package/target/tsc/input/paired-input.d.ts +435 -0
  232. package/target/tsc/input/picker-dialog.css.d.ts +3 -0
  233. package/target/tsc/input/picker-dialog.d.ts +84 -0
  234. package/target/tsc/input/select.css.d.ts +3 -0
  235. package/target/tsc/input/select.d.ts +267 -0
  236. package/target/tsc/input/slider.css.d.ts +3 -0
  237. package/target/tsc/input/slider.d.ts +372 -0
  238. package/target/tsc/input/text-field.css.d.ts +3 -0
  239. package/target/tsc/input/text-field.d.ts +415 -0
  240. package/target/tsc/input/time-picker.css.d.ts +3 -0
  241. package/target/tsc/input/time-picker.d.ts +212 -0
  242. package/target/tsc/motion/frame.d.ts +36 -0
  243. package/target/tsc/motion/index.css.d.ts +3 -0
  244. package/target/tsc/motion/index.d.ts +34 -0
  245. package/target/tsc/motion/material.d.ts +110 -0
  246. package/target/tsc/motion/motion.d.ts +235 -0
  247. package/target/tsc/motion/spring.d.ts +223 -0
  248. package/target/tsc/motion/transition.css.d.ts +3 -0
  249. package/target/tsc/motion/transition.d.ts +597 -0
  250. package/target/tsc/motion/velocity.d.ts +54 -0
  251. package/target/tsc/navigation/app-bar.d.ts +473 -0
  252. package/target/tsc/navigation/base.d.ts +331 -0
  253. package/target/tsc/navigation/drawer.d.ts +301 -0
  254. package/target/tsc/navigation/index.d.ts +25 -0
  255. package/target/tsc/navigation/navigation.css.d.ts +3 -0
  256. package/target/tsc/navigation/navigation.d.ts +537 -0
  257. package/target/tsc/navigation/scroll.d.ts +218 -0
  258. package/target/tsc/navigation/search.d.ts +332 -0
  259. package/target/tsc/navigation/tabs.d.ts +497 -0
  260. package/target/tsc/navigation/toolbar.d.ts +248 -0
  261. package/target/tsc/selection/base.d.ts +100 -0
  262. package/target/tsc/selection/checkbox.d.ts +194 -0
  263. package/target/tsc/selection/chip.d.ts +358 -0
  264. package/target/tsc/selection/index.d.ts +21 -0
  265. package/target/tsc/selection/radio.d.ts +198 -0
  266. package/target/tsc/selection/segmented.d.ts +333 -0
  267. package/target/tsc/selection/selection.css.d.ts +3 -0
  268. package/target/tsc/selection/switch.d.ts +165 -0
  269. package/target/tsc/shape/corner-rounding.d.ts +36 -0
  270. package/target/tsc/shape/cubic.d.ts +215 -0
  271. package/target/tsc/shape/index.d.ts +35 -0
  272. package/target/tsc/shape/material-shapes.d.ts +176 -0
  273. package/target/tsc/shape/morph.d.ts +91 -0
  274. package/target/tsc/shape/path.d.ts +177 -0
  275. package/target/tsc/shape/point.d.ts +165 -0
  276. package/target/tsc/shape/rounded-polygon.d.ts +289 -0
  277. package/target/tsc/shape/shapes.d.ts +76 -0
  278. package/target/tsc/spacing/index.d.ts +19 -0
  279. package/target/tsc/state/component.css.d.ts +3 -0
  280. package/target/tsc/state/component.d.ts +276 -0
  281. package/target/tsc/state/controller.d.ts +257 -0
  282. package/target/tsc/state/index.d.ts +19 -0
  283. package/target/tsc/state/ripple.d.ts +50 -0
  284. package/target/tsc/state/state.d.ts +129 -0
  285. package/target/tsc/state/style.d.ts +22 -0
  286. package/target/tsc/surface/carousel-layout.d.ts +212 -0
  287. package/target/tsc/surface/carousel.css.d.ts +3 -0
  288. package/target/tsc/surface/carousel.d.ts +231 -0
  289. package/target/tsc/surface/dialog.d.ts +582 -0
  290. package/target/tsc/surface/divider.d.ts +92 -0
  291. package/target/tsc/surface/drag.d.ts +92 -0
  292. package/target/tsc/surface/gestures.css.d.ts +3 -0
  293. package/target/tsc/surface/gestures.d.ts +292 -0
  294. package/target/tsc/surface/index.css.d.ts +3 -0
  295. package/target/tsc/surface/index.d.ts +29 -0
  296. package/target/tsc/surface/interactive.d.ts +22 -0
  297. package/target/tsc/surface/list-patterns.d.ts +384 -0
  298. package/target/tsc/surface/list.css.d.ts +3 -0
  299. package/target/tsc/surface/list.d.ts +340 -0
  300. package/target/tsc/surface/menu.css.d.ts +3 -0
  301. package/target/tsc/surface/menu.d.ts +590 -0
  302. package/target/tsc/surface/scaffold.d.ts +337 -0
  303. package/target/tsc/surface/sheet.d.ts +384 -0
  304. package/target/tsc/surface/side-sheet.d.ts +183 -0
  305. package/target/tsc/surface/slots.d.ts +21 -0
  306. package/target/tsc/surface/surface.css.d.ts +3 -0
  307. package/target/tsc/surface/surface.d.ts +192 -0
  308. package/target/tsc/text/index.css.d.ts +3 -0
  309. package/target/tsc/text/index.d.ts +18 -0
  310. package/target/tsc/text/text.css.d.ts +3 -0
  311. package/target/tsc/text/text.d.ts +94 -0
  312. package/target/tsc/text/typography.css.d.ts +3 -0
  313. package/target/tsc/text/typography.d.ts +82 -0
  314. package/target/tsc/util/box-side.d.ts +76 -0
  315. package/target/tsc/util/debug.d.ts +20 -0
  316. package/target/tsc/util/dom.d.ts +35 -0
  317. package/target/tsc/util/event.d.ts +93 -0
  318. package/target/tsc/util/index.d.ts +12 -0
  319. package/target/tsc/util/preconditions.d.ts +79 -0
  320. package/target/tsc/util/reactive.d.ts +36 -0
@@ -0,0 +1,384 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { DomComponent, DomProps, StyleElement } from "..";
3
+ import type { DialogCloseReason, DialogProps } from "./dialog";
4
+ import { DomController } from "../dom/client";
5
+ import { DialogController } from "./dialog";
6
+ import "../container/elevation-shadow.css";
7
+ import "./surface.css";
8
+ /**
9
+ * Bottom-sheet expansion request callback.
10
+ *
11
+ * @param expanded - requested expansion state
12
+ * @param event - originating event, if any
13
+ */
14
+ export type BottomSheetExpansionHandler = (expanded: boolean, event?: Event) => void;
15
+ /**
16
+ * Properties shared by {@link ModalBottomSheet} and {@link BottomSheet}.
17
+ */
18
+ export type BottomSheetBaseProps = {
19
+ /**
20
+ * Accessible name used when no `aria-label` is supplied.
21
+ *
22
+ * @defaultValue `"Bottom sheet"`
23
+ */
24
+ label?: string | undefined;
25
+ /**
26
+ * Sheet can be dismissed by the user.
27
+ *
28
+ * A dismissible sheet can be dragged out of view; a modal sheet is also dismissed by Escape,
29
+ * the scrim, and its drag handle. Programmatic closure is always possible.
30
+ */
31
+ dismissible?: boolean | undefined;
32
+ /**
33
+ * Show the drag handle.
34
+ *
35
+ * The handle is a button which changes the sheet's detent; it can also be dragged.
36
+ *
37
+ * @defaultValue `true`
38
+ */
39
+ dragHandle?: boolean | undefined;
40
+ /**
41
+ * Custom drag handle content, which replaces the handle bar.
42
+ */
43
+ dragHandleContent?: JSX.Element;
44
+ /**
45
+ * Handle a user dismissal *before* closure is requested.
46
+ *
47
+ * Call `event.preventDefault()`, when an event is supplied, to keep the sheet open.
48
+ *
49
+ * @remarks
50
+ * This is **not** reactive.
51
+ *
52
+ * @param event - originating event, if any
53
+ */
54
+ onDismiss?: ((event?: Event) => void) | undefined;
55
+ };
56
+ /**
57
+ * Properties accepted by {@link ModalBottomSheet}.
58
+ */
59
+ export type ModalBottomSheetProps = Omit<DialogProps, "modal" | "role"> & BottomSheetBaseProps & {
60
+ /**
61
+ * Accessible name of the drag handle while it dismisses the sheet.
62
+ *
63
+ * @defaultValue `"Close bottom sheet"`
64
+ */
65
+ closeLabel?: string | undefined;
66
+ /**
67
+ * Accessible name of the drag handle while it expands a partially expanded sheet.
68
+ *
69
+ * @defaultValue `"Expand bottom sheet"`
70
+ */
71
+ expandLabel?: string | undefined;
72
+ /**
73
+ * Skip the partially expanded detent.
74
+ *
75
+ * Without this, a sheet taller than half the viewport opens partially expanded, showing half
76
+ * the viewport, as Compose `ModalBottomSheet`; dragging it up, or activating its drag handle,
77
+ * expands it.
78
+ *
79
+ * @defaultValue `false`
80
+ */
81
+ skipPartiallyExpanded?: boolean | undefined;
82
+ };
83
+ /**
84
+ * Properties accepted by {@link BottomSheet}.
85
+ */
86
+ export type BottomSheetProps = DomProps<HTMLDivElement, Omit<JSX.HTMLAttributes<HTMLDivElement>, "role" | "aria-expanded" | "aria-hidden">> & BottomSheetBaseProps & {
87
+ /**
88
+ * Controlled open state.
89
+ *
90
+ * Supplying this property, even as `undefined`, makes the open state controlled.
91
+ */
92
+ open?: boolean | undefined;
93
+ /**
94
+ * Initial open state of an uncontrolled sheet.
95
+ *
96
+ * @remarks
97
+ * This is **not** reactive.
98
+ *
99
+ * @defaultValue `false`
100
+ */
101
+ defaultOpen?: boolean | undefined;
102
+ /**
103
+ * Height of the collapsed sheet, in CSS pixels or as a CSS length.
104
+ *
105
+ * When omitted, an enclosing scaffold's `sheetPeekHeight` or the `sheetPeekHeight` role
106
+ * applies.
107
+ */
108
+ peekHeight?: number | string | undefined;
109
+ /**
110
+ * Controlled expansion state.
111
+ *
112
+ * Supplying this property, even as `undefined`, makes expansion controlled.
113
+ */
114
+ expanded?: boolean | undefined;
115
+ /**
116
+ * Initial expansion state of a sheet with uncontrolled expansion.
117
+ *
118
+ * @remarks
119
+ * This is **not** reactive.
120
+ *
121
+ * @defaultValue `false`
122
+ */
123
+ defaultExpanded?: boolean | undefined;
124
+ /**
125
+ * Accessible name of the drag handle while the sheet is collapsed.
126
+ *
127
+ * @defaultValue `"Expand bottom sheet"`
128
+ */
129
+ expandLabel?: string | undefined;
130
+ /**
131
+ * Accessible name of the drag handle while the sheet is expanded.
132
+ *
133
+ * @defaultValue `"Collapse bottom sheet"`
134
+ */
135
+ collapseLabel?: string | undefined;
136
+ /**
137
+ * Handle a request to change the open state.
138
+ *
139
+ * @remarks
140
+ * This is **not** reactive.
141
+ *
142
+ * @param open - requested open state
143
+ * @param event - originating event, if any
144
+ */
145
+ onOpenChange?: ((open: boolean, event?: Event) => void) | undefined;
146
+ /**
147
+ * Handle a request to change the expansion state.
148
+ *
149
+ * @remarks
150
+ * This is **not** reactive.
151
+ */
152
+ onExpandedChange?: BottomSheetExpansionHandler | undefined;
153
+ };
154
+ /**
155
+ * Client controller of a {@link ModalBottomSheet}.
156
+ *
157
+ * The native dialog lifecycle is that of {@link DialogController}; this controller adds the
158
+ * partially expanded and expanded detents, the drag gesture and its settling spring, and the drag
159
+ * handle.
160
+ */
161
+ export declare class ModalBottomSheetController extends DialogController<ModalBottomSheetProps> {
162
+ #private;
163
+ /**
164
+ * Construct a new `ModalBottomSheetController`.
165
+ *
166
+ * @param props - component properties
167
+ */
168
+ constructor(props: ModalBottomSheetProps);
169
+ /**
170
+ * Default accessible name, used when no `aria-label` is supplied.
171
+ *
172
+ * @returns accessible name
173
+ */
174
+ protected defaultLabel(): string | undefined;
175
+ /**
176
+ * Test whether a user dismissal may close the sheet.
177
+ *
178
+ * A sheet which is not {@link BottomSheetBaseProps.dismissible | dismissible} vetoes every
179
+ * user dismissal; otherwise `onDismiss` may veto it.
180
+ *
181
+ * @param _reason - dismissal reason
182
+ * @param event - originating event, if any
183
+ * @returns `true` if, and only if, the dismissal is allowed
184
+ */
185
+ protected allowDismiss(_reason: DialogCloseReason, event: Event | undefined): boolean;
186
+ /**
187
+ * Request closure for a user dismissal.
188
+ *
189
+ * A close request, such as Escape, first collapses an expanded sheet to its partially expanded
190
+ * detent, as Compose `ModalBottomSheet` does for back navigation.
191
+ *
192
+ * @param reason - dismissal reason
193
+ * @param event - originating event, if any
194
+ */
195
+ protected requestDismiss(reason: DialogCloseReason, event: Event | undefined): void;
196
+ /**
197
+ * Reset the detent and prepare the entry when the sheet opens, and stop tracking it when it
198
+ * closes.
199
+ *
200
+ * @param open - applied open state
201
+ */
202
+ protected onOpenStateChanged(open: boolean): void;
203
+ /**
204
+ * Slide an opening sheet in on the settling spring, from out of view or from where its closing
205
+ * left it.
206
+ *
207
+ * As Compose's `SheetState.show()`, the entry runs through the sheet's offset, so that a drag
208
+ * interrupts it and its overshoot is covered as that of a settle.
209
+ */
210
+ protected onShown(): void;
211
+ /**
212
+ * Apply local properties to component state and styling.
213
+ *
214
+ * @see {@link ../dom/client#DomController.applyComponentProps}
215
+ */
216
+ protected applyComponentProps(): void;
217
+ /**
218
+ * Handle style element replacement before the controller reference is updated.
219
+ *
220
+ * The style-element getter still exposes the previous element during this hook.
221
+ *
222
+ * @param curr - new style element, or `null` when absent
223
+ * @see {@link ../dom/client#DomController.onStyleElementChanged}
224
+ */
225
+ protected onStyleElementChanged(curr: StyleElement | null): void;
226
+ /**
227
+ * Render the component's element tree.
228
+ *
229
+ * The drag handle content is a reactive slot.
230
+ *
231
+ * @param children - nested component children, possibly an accessor
232
+ * @returns rendered component elements
233
+ * @see {@link ../dom/client#DomController.render}
234
+ */
235
+ protected render(children: JSX.Element): JSX.Element;
236
+ /**
237
+ * Release the gesture, observer, and handle listener when the controller is disposed.
238
+ *
239
+ * @see {@link ../dom/client#DomController.onControllerCleanup}
240
+ */
241
+ protected onControllerCleanup(): void;
242
+ }
243
+ /**
244
+ * Material modal bottom sheet.
245
+ *
246
+ * A modal bottom sheet is a native modal dialog anchored to the bottom edge, at most the
247
+ * `sheetMaxWidth` role wide, above a scrim. A sheet taller than half the viewport opens partially
248
+ * expanded, showing half of the viewport. The drag handle expands a partially expanded sheet and
249
+ * otherwise dismisses it. The sheet can be dragged by its handle with any pointer and by its
250
+ * surface with touch, and a downward wheel scroll over a partially expanded sheet expands it.
251
+ * Escape collapses an expanded sheet which has a partially expanded detent, and otherwise
252
+ * dismisses it, as Compose's back handling; the scrim dismisses it.
253
+ *
254
+ * A released drag settles as Compose sheets do: a fling of at least 125 pixels per second moves on
255
+ * to the next detent in its direction, and a slower release moves on only after 56 pixels of
256
+ * travel; settling below the lowest detent dismisses the sheet unless it is not {@link
257
+ * BottomSheetBaseProps.dismissible | dismissible} or `onDismiss` vetoes it.
258
+ *
259
+ * # Motion
260
+ *
261
+ * The sheet slides in, between detents, and after a drag on a runtime default spatial spring, as
262
+ * Compose `SheetState` animates its offset: a settle continues the release velocity, a new drag
263
+ * interrupts the spring where it is, and an overshoot above the expanded position stretches the
264
+ * sheet instead of opening a gap below it. The sheet slides out on the fast effects spring, as
265
+ * Compose `BottomSheet`'s hide motion, and the scrim fades on the default effects spring, as
266
+ * Compose `ModalBottomSheet`.
267
+ *
268
+ * # Design
269
+ *
270
+ * Sheet design is controlled through the `sheet*`, `dragHandle*`, and `dialogScrim*` roles of the
271
+ * [`cw-Surface`](./surface.yaml) design attribute. The `cw-ModalBottomSheet-open` and
272
+ * `cw-ModalBottomSheet-expanded` classes reflect the sheet state, and `cw-BottomSheet-dragging` is
273
+ * applied while it is dragged.
274
+ *
275
+ * @param props - component properties
276
+ * @returns rendered component elements
277
+ */
278
+ export declare const ModalBottomSheet: DomComponent<ModalBottomSheetProps>;
279
+ /**
280
+ * Client controller of a {@link BottomSheet}.
281
+ */
282
+ export declare class BottomSheetController extends DomController<BottomSheetProps> {
283
+ #private;
284
+ /**
285
+ * Construct a new `BottomSheetController`.
286
+ *
287
+ * @param props - component properties
288
+ */
289
+ constructor(props: BottomSheetProps);
290
+ /**
291
+ * Request that the sheet open.
292
+ *
293
+ * A controlled sheet requests the change through `onOpenChange` and waits for the parent to
294
+ * update `open`.
295
+ */
296
+ open(): void;
297
+ /**
298
+ * Request that the sheet close.
299
+ *
300
+ * Programmatic closure is never vetoed by {@link BottomSheetBaseProps.dismissible |
301
+ * `dismissible`} or `onDismiss`. A controlled sheet requests the change through `onOpenChange`
302
+ * and stays open until the parent updates `open`.
303
+ *
304
+ * @param event - originating event, if any
305
+ */
306
+ close(event?: Event): void;
307
+ /**
308
+ * Request the expanded detent.
309
+ *
310
+ * When `expanded` is controlled, the change is requested through `onExpandedChange`.
311
+ *
312
+ * @param event - originating event, if any
313
+ */
314
+ expand(event?: Event): void;
315
+ /**
316
+ * Request the collapsed (peek) detent.
317
+ *
318
+ * When `expanded` is controlled, the change is requested through `onExpandedChange`.
319
+ *
320
+ * @param event - originating event, if any
321
+ */
322
+ collapse(event?: Event): void;
323
+ /**
324
+ * Apply local properties to component state and styling.
325
+ *
326
+ * @see {@link ../dom/client#DomController.applyComponentProps}
327
+ */
328
+ protected applyComponentProps(): void;
329
+ /**
330
+ * Handle style element replacement before the controller reference is updated.
331
+ *
332
+ * The style-element getter still exposes the previous element during this hook.
333
+ *
334
+ * @param curr - new style element, or `null` when absent
335
+ * @see {@link ../dom/client#DomController.onStyleElementChanged}
336
+ */
337
+ protected onStyleElementChanged(curr: StyleElement | null): void;
338
+ /**
339
+ * Render the component's element tree.
340
+ *
341
+ * The drag handle content is a reactive slot.
342
+ *
343
+ * @param children - nested component children, possibly an accessor
344
+ * @returns rendered component elements
345
+ * @see {@link ../dom/client#DomController.render}
346
+ */
347
+ protected render(children: JSX.Element): JSX.Element;
348
+ /**
349
+ * Release the gesture and listeners when the controller is disposed.
350
+ *
351
+ * @see {@link ../dom/client#DomController.onControllerCleanup}
352
+ */
353
+ protected onControllerCleanup(): void;
354
+ }
355
+ /**
356
+ * Material standard bottom sheet.
357
+ *
358
+ * A standard bottom sheet is a nonmodal region which peeks from the bottom edge, at most the
359
+ * `sheetMaxWidth` role wide, and expands over the content. On its own it is fixed to the
360
+ * viewport; in a {@link ./scaffold#Scaffold | scaffold} it sits above the bottom bar. The drag
361
+ * handle toggles between the peek and expanded detents. The sheet can be dragged by its handle
362
+ * with any pointer and by its surface with touch, and settles as a {@link ModalBottomSheet} does;
363
+ * as Compose's standard sheet, it cannot be dragged out of view unless it is {@link
364
+ * BottomSheetBaseProps.dismissible | dismissible}. Keyboard focus entering the collapsed content
365
+ * expands the sheet; collapsing moves focus from the content to the drag handle, and closing
366
+ * moves focus out of the sheet.
367
+ *
368
+ * # Motion
369
+ *
370
+ * The sheet slides in, between detents, and after a drag on a runtime default spatial spring, as
371
+ * Compose `SheetState` animates its offset, and slides out on the fast effects spring, as Compose
372
+ * `BottomSheet`'s hide motion; see {@link ModalBottomSheet}.
373
+ *
374
+ * # Design
375
+ *
376
+ * Sheet design is controlled through the `sheet*` and `dragHandle*` roles of the
377
+ * [`cw-Surface`](./surface.yaml) design attribute. The `cw-BottomSheet-open` and
378
+ * `cw-BottomSheet-expanded` classes reflect the sheet state, and `cw-BottomSheet-dragging` is
379
+ * applied while it is dragged.
380
+ *
381
+ * @param props - component properties
382
+ * @returns rendered component elements
383
+ */
384
+ export declare const BottomSheet: DomComponent<BottomSheetProps>;
@@ -0,0 +1,183 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { DomComponent, StyleElement } from "..";
3
+ import type { DialogCloseReason, DialogProps } from "./dialog";
4
+ import { DialogController } from "./dialog";
5
+ import "../container/elevation-shadow.css";
6
+ import "./surface.css";
7
+ /**
8
+ * Properties accepted by {@link StandardSideSheet} and {@link ModalSideSheet}.
9
+ */
10
+ export type SideSheetProps = Omit<DialogProps, "modal"> & {
11
+ /**
12
+ * Logical edge the sheet is attached to.
13
+ *
14
+ * @defaultValue `"end"`
15
+ */
16
+ edge?: "start" | "end" | undefined;
17
+ /**
18
+ * Detach the sheet from the viewport edges, with rounded corners.
19
+ *
20
+ * @defaultValue `false`
21
+ */
22
+ detached?: boolean | undefined;
23
+ /**
24
+ * Headline, which also names the sheet when no `aria-label`, `aria-labelledby`, or `label` is
25
+ * supplied.
26
+ */
27
+ header?: JSX.Element;
28
+ /**
29
+ * Leading header content, such as a back icon button.
30
+ */
31
+ leadingIcon?: JSX.Element;
32
+ /**
33
+ * Scrolling body. Children are used when omitted.
34
+ */
35
+ body?: JSX.Element;
36
+ /**
37
+ * Actions, below a divider at the bottom of the sheet.
38
+ */
39
+ actions?: JSX.Element;
40
+ /**
41
+ * Sheet can be dismissed by the user.
42
+ *
43
+ * A dismissible sheet shows a close icon button; a modal one is also dismissed by Escape and
44
+ * the scrim. Programmatic closure is always possible.
45
+ *
46
+ * @defaultValue `true`
47
+ */
48
+ dismissible?: boolean | undefined;
49
+ /**
50
+ * Accessible name of the close icon button.
51
+ *
52
+ * @defaultValue `"Close side sheet"`
53
+ */
54
+ dismissLabel?: string | undefined;
55
+ };
56
+ /**
57
+ * Properties of the side sheet implementation, which presents a standard or a modal sheet.
58
+ */
59
+ type SideSheetBaseProps = SideSheetProps & {
60
+ /**
61
+ * Sheet is modal.
62
+ */
63
+ modal: boolean;
64
+ };
65
+ /**
66
+ * Client controller of a {@link StandardSideSheet} or {@link ModalSideSheet}.
67
+ *
68
+ * The native dialog lifecycle is that of {@link DialogController}: a standard sheet is shown
69
+ * nonmodally and a modal sheet modally. This controller adds the header naming, the close icon
70
+ * button, and the edge and detachment classes.
71
+ */
72
+ export declare class SideSheetController extends DialogController<SideSheetBaseProps> {
73
+ #private;
74
+ /**
75
+ * Construct a new `SideSheetController`.
76
+ *
77
+ * @param props - component properties
78
+ */
79
+ constructor(props: SideSheetBaseProps);
80
+ /**
81
+ * Default accessible name, used when no naming attribute applies.
82
+ *
83
+ * A `label` takes precedence over the headline.
84
+ *
85
+ * @returns accessible name, or `undefined` when the headline names the sheet
86
+ */
87
+ protected defaultLabel(): string | undefined;
88
+ /**
89
+ * Identifier of the headline, which names the sheet unless a `label` is supplied.
90
+ *
91
+ * @returns headline identifier, or `undefined` without a headline or with a `label`
92
+ */
93
+ protected defaultLabelledBy(): string | undefined;
94
+ /**
95
+ * Test whether a user dismissal may close the sheet.
96
+ *
97
+ * @param _reason - dismissal reason
98
+ * @param _event - originating event, if any
99
+ * @returns `true` if, and only if, the sheet is {@link SideSheetProps.dismissible |
100
+ * dismissible}
101
+ */
102
+ protected allowDismiss(_reason: DialogCloseReason, _event: Event | undefined): boolean;
103
+ /**
104
+ * Apply local properties to component state and styling.
105
+ *
106
+ * @see {@link ../dom/client#DomController.applyComponentProps}
107
+ */
108
+ protected applyComponentProps(): void;
109
+ /**
110
+ * Handle style element replacement before the controller reference is updated.
111
+ *
112
+ * The style-element getter still exposes the previous element during this hook.
113
+ *
114
+ * @param curr - new style element, or `null` when absent
115
+ * @see {@link ../dom/client#DomController.onStyleElementChanged}
116
+ */
117
+ protected onStyleElementChanged(curr: StyleElement | null): void;
118
+ /**
119
+ * Render the component's element tree.
120
+ *
121
+ * The headline, leading icon, body, and actions are reactive slots.
122
+ *
123
+ * @param children - nested component children, possibly an accessor
124
+ * @returns rendered component elements
125
+ * @see {@link ../dom/client#DomController.render}
126
+ */
127
+ protected render(children: JSX.Element): JSX.Element;
128
+ /**
129
+ * Release the action listener when the controller is disposed.
130
+ *
131
+ * @see {@link ../dom/client#DomController.onControllerCleanup}
132
+ */
133
+ protected onControllerCleanup(): void;
134
+ }
135
+ /**
136
+ * Material standard side sheet.
137
+ *
138
+ * A standard side sheet shows content which complements the main content without blocking it:
139
+ * a nonmodal dialog attached to the {@link SideSheetProps.edge | edge} of the viewport, or placed
140
+ * in a {@link ./scaffold#SupportingPaneScaffold | pane}, which it then fills, docked beside the
141
+ * main pane. Its header holds an optional leading icon, the headline, which names the sheet, and
142
+ * a close icon button; actions sit below a divider at the bottom. Closing it returns focus to its
143
+ * opener only while focus is within the sheet.
144
+ *
145
+ * # Motion
146
+ *
147
+ * Opening slides the sheet in from its edge on the default spatial spring; closing slides it out
148
+ * on the fast effects spring, as the bottom sheets.
149
+ *
150
+ * # Design
151
+ *
152
+ * Side sheet design is controlled through the `sideSheet*` roles of the
153
+ * [`cw-Surface`](./surface.yaml) design attribute, after `md.comp.sheet.side`: the docked
154
+ * container is 256 pixels wide, on the surface color without elevation, and a detached sheet is
155
+ * inset by a margin and fully rounded. The `cw-SideSheet-open` class is applied while the sheet is
156
+ * open.
157
+ *
158
+ * @param props - component properties
159
+ * @returns rendered component elements
160
+ */
161
+ export declare const StandardSideSheet: DomComponent<SideSheetProps>;
162
+ /**
163
+ * Material modal side sheet.
164
+ *
165
+ * A modal side sheet is a {@link StandardSideSheet} presented as a native modal dialog above a
166
+ * scrim: the rest of the document is inert, Escape and the scrim dismiss it, and focus returns to
167
+ * its opener when it closes.
168
+ *
169
+ * # Motion
170
+ *
171
+ * The sheet slides as a {@link StandardSideSheet} does, and the scrim fades on the default effects
172
+ * spring.
173
+ *
174
+ * # Design
175
+ *
176
+ * The modal container takes the `sideSheetModalColor` and `sideSheetModalElevation` roles, and its
177
+ * inner corners the `sideSheetShape` role.
178
+ *
179
+ * @param props - component properties
180
+ * @returns rendered component elements
181
+ */
182
+ export declare const ModalSideSheet: DomComponent<SideSheetProps>;
183
+ export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Resolve JSX slot properties in author order before the containing component claims its
3
+ * hydration key.
4
+ *
5
+ * Server rendering evaluates slot properties when the renderer reads them, while a client
6
+ * controller may read them in a different order, or not at all until an effect runs. Resolving
7
+ * every slot named in `names` up front, in the order the author wrote the properties, makes slot
8
+ * components consume hydration keys and unique identifiers in the same order on the server and the
9
+ * client, whatever order the renderers read them in. Each resolved slot is cached, so reading it
10
+ * again neither re-creates its elements nor moves them.
11
+ *
12
+ * Slots named in `factories` are cached as values instead of being resolved as children, so a
13
+ * function value, such as a render-prop factory, remains callable.
14
+ *
15
+ * @typeParam P - component properties type
16
+ * @param props - component properties
17
+ * @param names - JSX slot properties to resolve
18
+ * @param factories - slot properties whose function values must remain callable
19
+ * @returns properties with reactive, cached slot values
20
+ */
21
+ export declare function resolveSurfaceSlots<P extends object>(props: P, names: readonly string[], factories?: readonly string[]): P;
@@ -0,0 +1,3 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+
3
+ export {};