@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.
- package/LICENSE +163 -0
- package/README.md +82 -2
- package/package.json +112 -3
- package/src/action/action.yaml +291 -0
- package/src/action/button-group.yaml +56 -0
- package/src/action/button.yaml +239 -0
- package/src/action/split-button.yaml +87 -0
- package/src/color/color.yaml +181 -0
- package/src/color/palette.yaml +147 -0
- package/src/container/card.yaml +170 -0
- package/src/container/corner-radius.yaml +50 -0
- package/src/container/elevation.yaml +19 -0
- package/src/design.yaml +41 -0
- package/src/feedback/feedback.yaml +225 -0
- package/src/icon/icon-font.yaml +28 -0
- package/src/icon/icon.yaml +31 -0
- package/src/input/date-picker.yaml +144 -0
- package/src/input/date-range-input.yaml +162 -0
- package/src/input/range-slider.yaml +161 -0
- package/src/input/select.yaml +230 -0
- package/src/input/slider.yaml +172 -0
- package/src/input/text-field.yaml +240 -0
- package/src/input/time-picker.yaml +220 -0
- package/src/motion/motion.yaml +371 -0
- package/src/navigation/app-bar.yaml +147 -0
- package/src/navigation/navigation.yaml +339 -0
- package/src/navigation/scroll.yaml +23 -0
- package/src/navigation/search.yaml +112 -0
- package/src/navigation/tabs.yaml +144 -0
- package/src/navigation/toolbar.yaml +130 -0
- package/src/selection/checkbox.yaml +162 -0
- package/src/selection/chip.yaml +219 -0
- package/src/selection/radio.yaml +125 -0
- package/src/selection/segmented-group.yaml +11 -0
- package/src/selection/segmented.yaml +69 -0
- package/src/selection/switch.yaml +209 -0
- package/src/spacing/measurement.yaml +80 -0
- package/src/state/state.yaml +38 -0
- package/src/surface/surface.yaml +483 -0
- package/src/text/line-height.yaml +144 -0
- package/src/text/typeface.yaml +31 -0
- package/src/text/typescale.yaml +726 -0
- package/target/esbuild/action/action.css +1 -0
- package/target/esbuild/action/base.jsx +1 -0
- package/target/esbuild/action/button.jsx +17 -0
- package/target/esbuild/action/fab-menu-context.jsx +1 -0
- package/target/esbuild/action/fab-menu.jsx +15 -0
- package/target/esbuild/action/fab.jsx +7 -0
- package/target/esbuild/action/group.jsx +22 -0
- package/target/esbuild/action/icon-button.jsx +5 -0
- package/target/esbuild/action/index.jsx +1 -0
- package/target/esbuild/action/split-button.jsx +12 -0
- package/target/esbuild/color/contrast.jsx +1 -0
- package/target/esbuild/color/dynamic.jsx +1 -0
- package/target/esbuild/color/hct.jsx +1 -0
- package/target/esbuild/color/index.css +1 -0
- package/target/esbuild/color/index.jsx +1 -0
- package/target/esbuild/color/palette.jsx +1 -0
- package/target/esbuild/color/scheme.jsx +1 -0
- package/target/esbuild/color/temperature.jsx +1 -0
- package/target/esbuild/container/card.css +1 -0
- package/target/esbuild/container/card.jsx +1 -0
- package/target/esbuild/container/elevation-shadow.css +1 -0
- package/target/esbuild/container/elevation-shadow.jsx +1 -0
- package/target/esbuild/container/index.jsx +1 -0
- package/target/esbuild/dom/client.jsx +1 -0
- package/target/esbuild/dom/index.jsx +1 -0
- package/target/esbuild/dom/server.jsx +1 -0
- package/target/esbuild/dom/types.jsx +1 -0
- package/target/esbuild/feedback/badge.jsx +15 -0
- package/target/esbuild/feedback/feedback.css +1 -0
- package/target/esbuild/feedback/focus.jsx +1 -0
- package/target/esbuild/feedback/index.jsx +1 -0
- package/target/esbuild/feedback/loading.jsx +7 -0
- package/target/esbuild/feedback/observe.jsx +1 -0
- package/target/esbuild/feedback/progress.jsx +35 -0
- package/target/esbuild/feedback/snackbar.jsx +23 -0
- package/target/esbuild/feedback/tooltip.jsx +24 -0
- package/target/esbuild/icon/icon.css +1 -0
- package/target/esbuild/icon/icon.jsx +1 -0
- package/target/esbuild/icon/index.jsx +1 -0
- package/target/esbuild/index.css +1 -0
- package/target/esbuild/index.jsx +1 -0
- package/target/esbuild/input/autocomplete.jsx +5 -0
- package/target/esbuild/input/base.jsx +4 -0
- package/target/esbuild/input/date-picker.css +1 -0
- package/target/esbuild/input/date-picker.jsx +104 -0
- package/target/esbuild/input/date-range-input.css +1 -0
- package/target/esbuild/input/date-time.jsx +21 -0
- package/target/esbuild/input/index.css +1 -0
- package/target/esbuild/input/index.jsx +1 -0
- package/target/esbuild/input/paired-input.jsx +1 -0
- package/target/esbuild/input/picker-dialog.css +1 -0
- package/target/esbuild/input/picker-dialog.jsx +14 -0
- package/target/esbuild/input/select.css +1 -0
- package/target/esbuild/input/select.jsx +63 -0
- package/target/esbuild/input/slider.css +1 -0
- package/target/esbuild/input/slider.jsx +51 -0
- package/target/esbuild/input/text-field.css +1 -0
- package/target/esbuild/input/text-field.jsx +67 -0
- package/target/esbuild/input/time-picker.css +1 -0
- package/target/esbuild/input/time-picker.jsx +29 -0
- package/target/esbuild/motion/frame.jsx +1 -0
- package/target/esbuild/motion/index.css +1 -0
- package/target/esbuild/motion/index.jsx +1 -0
- package/target/esbuild/motion/material.jsx +1 -0
- package/target/esbuild/motion/motion.jsx +1 -0
- package/target/esbuild/motion/spring.jsx +1 -0
- package/target/esbuild/motion/transition.css +1 -0
- package/target/esbuild/motion/transition.jsx +1 -0
- package/target/esbuild/motion/velocity.jsx +1 -0
- package/target/esbuild/navigation/app-bar.jsx +51 -0
- package/target/esbuild/navigation/base.jsx +1 -0
- package/target/esbuild/navigation/drawer.jsx +25 -0
- package/target/esbuild/navigation/index.jsx +1 -0
- package/target/esbuild/navigation/navigation.css +1 -0
- package/target/esbuild/navigation/navigation.jsx +29 -0
- package/target/esbuild/navigation/scroll.jsx +1 -0
- package/target/esbuild/navigation/search.jsx +29 -0
- package/target/esbuild/navigation/tabs.jsx +7 -0
- package/target/esbuild/navigation/toolbar.jsx +23 -0
- package/target/esbuild/selection/base.jsx +1 -0
- package/target/esbuild/selection/checkbox.jsx +14 -0
- package/target/esbuild/selection/chip.jsx +23 -0
- package/target/esbuild/selection/index.jsx +1 -0
- package/target/esbuild/selection/radio.jsx +9 -0
- package/target/esbuild/selection/segmented.jsx +15 -0
- package/target/esbuild/selection/selection.css +1 -0
- package/target/esbuild/selection/switch.jsx +14 -0
- package/target/esbuild/shape/corner-rounding.jsx +1 -0
- package/target/esbuild/shape/cubic.jsx +1 -0
- package/target/esbuild/shape/index.jsx +1 -0
- package/target/esbuild/shape/material-shapes.jsx +1 -0
- package/target/esbuild/shape/morph.jsx +1 -0
- package/target/esbuild/shape/path.jsx +1 -0
- package/target/esbuild/shape/point.jsx +1 -0
- package/target/esbuild/shape/rounded-polygon.jsx +1 -0
- package/target/esbuild/shape/shapes.jsx +1 -0
- package/target/esbuild/spacing/index.jsx +1 -0
- package/target/esbuild/state/component.css +1 -0
- package/target/esbuild/state/component.jsx +1 -0
- package/target/esbuild/state/controller.jsx +1 -0
- package/target/esbuild/state/index.jsx +1 -0
- package/target/esbuild/state/ripple.jsx +1 -0
- package/target/esbuild/state/state.jsx +1 -0
- package/target/esbuild/state/style.jsx +1 -0
- package/target/esbuild/surface/carousel-layout.jsx +1 -0
- package/target/esbuild/surface/carousel.css +1 -0
- package/target/esbuild/surface/carousel.jsx +10 -0
- package/target/esbuild/surface/dialog.jsx +35 -0
- package/target/esbuild/surface/divider.jsx +1 -0
- package/target/esbuild/surface/drag.jsx +1 -0
- package/target/esbuild/surface/gestures.css +1 -0
- package/target/esbuild/surface/gestures.jsx +7 -0
- package/target/esbuild/surface/index.css +1 -0
- package/target/esbuild/surface/index.jsx +1 -0
- package/target/esbuild/surface/interactive.jsx +1 -0
- package/target/esbuild/surface/list-patterns.jsx +26 -0
- package/target/esbuild/surface/list.css +1 -0
- package/target/esbuild/surface/list.jsx +9 -0
- package/target/esbuild/surface/menu.css +1 -0
- package/target/esbuild/surface/menu.jsx +12 -0
- package/target/esbuild/surface/scaffold.jsx +47 -0
- package/target/esbuild/surface/sheet.jsx +21 -0
- package/target/esbuild/surface/side-sheet.jsx +17 -0
- package/target/esbuild/surface/slots.jsx +1 -0
- package/target/esbuild/surface/surface.css +1 -0
- package/target/esbuild/surface/surface.jsx +1 -0
- package/target/esbuild/text/index.css +1 -0
- package/target/esbuild/text/index.jsx +1 -0
- package/target/esbuild/text/text.css +1 -0
- package/target/esbuild/text/text.jsx +3 -0
- package/target/esbuild/text/typography.css +1 -0
- package/target/esbuild/text/typography.jsx +1 -0
- package/target/esbuild/util/box-side.jsx +1 -0
- package/target/esbuild/util/debug.jsx +1 -0
- package/target/esbuild/util/dom.jsx +1 -0
- package/target/esbuild/util/event.jsx +1 -0
- package/target/esbuild/util/index.jsx +1 -0
- package/target/esbuild/util/preconditions.jsx +1 -0
- package/target/esbuild/util/reactive.jsx +1 -0
- package/target/tsc/action/action.css.d.ts +3 -0
- package/target/tsc/action/base.d.ts +211 -0
- package/target/tsc/action/button.d.ts +126 -0
- package/target/tsc/action/fab-menu-context.d.ts +16 -0
- package/target/tsc/action/fab-menu.d.ts +112 -0
- package/target/tsc/action/fab.d.ts +98 -0
- package/target/tsc/action/group.d.ts +166 -0
- package/target/tsc/action/icon-button.d.ts +79 -0
- package/target/tsc/action/index.d.ts +24 -0
- package/target/tsc/action/split-button.d.ts +78 -0
- package/target/tsc/color/contrast.d.ts +48 -0
- package/target/tsc/color/dynamic.d.ts +203 -0
- package/target/tsc/color/hct.d.ts +114 -0
- package/target/tsc/color/index.css.d.ts +3 -0
- package/target/tsc/color/index.d.ts +23 -0
- package/target/tsc/color/palette.d.ts +30 -0
- package/target/tsc/color/scheme.d.ts +446 -0
- package/target/tsc/color/temperature.d.ts +24 -0
- package/target/tsc/container/card.css.d.ts +3 -0
- package/target/tsc/container/card.d.ts +110 -0
- package/target/tsc/container/elevation-shadow.css.d.ts +3 -0
- package/target/tsc/container/elevation-shadow.d.ts +23 -0
- package/target/tsc/container/index.d.ts +44 -0
- package/target/tsc/dom/client.d.ts +387 -0
- package/target/tsc/dom/index.d.ts +93 -0
- package/target/tsc/dom/server.d.ts +65 -0
- package/target/tsc/dom/types.d.ts +134 -0
- package/target/tsc/feedback/badge.d.ts +116 -0
- package/target/tsc/feedback/feedback.css.d.ts +3 -0
- package/target/tsc/feedback/focus.d.ts +20 -0
- package/target/tsc/feedback/index.d.ts +17 -0
- package/target/tsc/feedback/loading.d.ts +194 -0
- package/target/tsc/feedback/observe.d.ts +75 -0
- package/target/tsc/feedback/progress.d.ts +281 -0
- package/target/tsc/feedback/snackbar.d.ts +398 -0
- package/target/tsc/feedback/tooltip.d.ts +326 -0
- package/target/tsc/icon/icon.css.d.ts +3 -0
- package/target/tsc/icon/icon.d.ts +69 -0
- package/target/tsc/icon/index.d.ts +13 -0
- package/target/tsc/index.css.d.ts +3 -0
- package/target/tsc/index.d.ts +7 -0
- package/target/tsc/input/autocomplete.d.ts +119 -0
- package/target/tsc/input/base.d.ts +282 -0
- package/target/tsc/input/date-picker.css.d.ts +3 -0
- package/target/tsc/input/date-picker.d.ts +351 -0
- package/target/tsc/input/date-range-input.css.d.ts +3 -0
- package/target/tsc/input/date-time.d.ts +171 -0
- package/target/tsc/input/index.css.d.ts +3 -0
- package/target/tsc/input/index.d.ts +27 -0
- package/target/tsc/input/paired-input.d.ts +435 -0
- package/target/tsc/input/picker-dialog.css.d.ts +3 -0
- package/target/tsc/input/picker-dialog.d.ts +84 -0
- package/target/tsc/input/select.css.d.ts +3 -0
- package/target/tsc/input/select.d.ts +267 -0
- package/target/tsc/input/slider.css.d.ts +3 -0
- package/target/tsc/input/slider.d.ts +372 -0
- package/target/tsc/input/text-field.css.d.ts +3 -0
- package/target/tsc/input/text-field.d.ts +415 -0
- package/target/tsc/input/time-picker.css.d.ts +3 -0
- package/target/tsc/input/time-picker.d.ts +212 -0
- package/target/tsc/motion/frame.d.ts +36 -0
- package/target/tsc/motion/index.css.d.ts +3 -0
- package/target/tsc/motion/index.d.ts +34 -0
- package/target/tsc/motion/material.d.ts +110 -0
- package/target/tsc/motion/motion.d.ts +235 -0
- package/target/tsc/motion/spring.d.ts +223 -0
- package/target/tsc/motion/transition.css.d.ts +3 -0
- package/target/tsc/motion/transition.d.ts +597 -0
- package/target/tsc/motion/velocity.d.ts +54 -0
- package/target/tsc/navigation/app-bar.d.ts +473 -0
- package/target/tsc/navigation/base.d.ts +331 -0
- package/target/tsc/navigation/drawer.d.ts +301 -0
- package/target/tsc/navigation/index.d.ts +25 -0
- package/target/tsc/navigation/navigation.css.d.ts +3 -0
- package/target/tsc/navigation/navigation.d.ts +537 -0
- package/target/tsc/navigation/scroll.d.ts +218 -0
- package/target/tsc/navigation/search.d.ts +332 -0
- package/target/tsc/navigation/tabs.d.ts +497 -0
- package/target/tsc/navigation/toolbar.d.ts +248 -0
- package/target/tsc/selection/base.d.ts +100 -0
- package/target/tsc/selection/checkbox.d.ts +194 -0
- package/target/tsc/selection/chip.d.ts +358 -0
- package/target/tsc/selection/index.d.ts +21 -0
- package/target/tsc/selection/radio.d.ts +198 -0
- package/target/tsc/selection/segmented.d.ts +333 -0
- package/target/tsc/selection/selection.css.d.ts +3 -0
- package/target/tsc/selection/switch.d.ts +165 -0
- package/target/tsc/shape/corner-rounding.d.ts +36 -0
- package/target/tsc/shape/cubic.d.ts +215 -0
- package/target/tsc/shape/index.d.ts +35 -0
- package/target/tsc/shape/material-shapes.d.ts +176 -0
- package/target/tsc/shape/morph.d.ts +91 -0
- package/target/tsc/shape/path.d.ts +177 -0
- package/target/tsc/shape/point.d.ts +165 -0
- package/target/tsc/shape/rounded-polygon.d.ts +289 -0
- package/target/tsc/shape/shapes.d.ts +76 -0
- package/target/tsc/spacing/index.d.ts +19 -0
- package/target/tsc/state/component.css.d.ts +3 -0
- package/target/tsc/state/component.d.ts +276 -0
- package/target/tsc/state/controller.d.ts +257 -0
- package/target/tsc/state/index.d.ts +19 -0
- package/target/tsc/state/ripple.d.ts +50 -0
- package/target/tsc/state/state.d.ts +129 -0
- package/target/tsc/state/style.d.ts +22 -0
- package/target/tsc/surface/carousel-layout.d.ts +212 -0
- package/target/tsc/surface/carousel.css.d.ts +3 -0
- package/target/tsc/surface/carousel.d.ts +231 -0
- package/target/tsc/surface/dialog.d.ts +582 -0
- package/target/tsc/surface/divider.d.ts +92 -0
- package/target/tsc/surface/drag.d.ts +92 -0
- package/target/tsc/surface/gestures.css.d.ts +3 -0
- package/target/tsc/surface/gestures.d.ts +292 -0
- package/target/tsc/surface/index.css.d.ts +3 -0
- package/target/tsc/surface/index.d.ts +29 -0
- package/target/tsc/surface/interactive.d.ts +22 -0
- package/target/tsc/surface/list-patterns.d.ts +384 -0
- package/target/tsc/surface/list.css.d.ts +3 -0
- package/target/tsc/surface/list.d.ts +340 -0
- package/target/tsc/surface/menu.css.d.ts +3 -0
- package/target/tsc/surface/menu.d.ts +590 -0
- package/target/tsc/surface/scaffold.d.ts +337 -0
- package/target/tsc/surface/sheet.d.ts +384 -0
- package/target/tsc/surface/side-sheet.d.ts +183 -0
- package/target/tsc/surface/slots.d.ts +21 -0
- package/target/tsc/surface/surface.css.d.ts +3 -0
- package/target/tsc/surface/surface.d.ts +192 -0
- package/target/tsc/text/index.css.d.ts +3 -0
- package/target/tsc/text/index.d.ts +18 -0
- package/target/tsc/text/text.css.d.ts +3 -0
- package/target/tsc/text/text.d.ts +94 -0
- package/target/tsc/text/typography.css.d.ts +3 -0
- package/target/tsc/text/typography.d.ts +82 -0
- package/target/tsc/util/box-side.d.ts +76 -0
- package/target/tsc/util/debug.d.ts +20 -0
- package/target/tsc/util/dom.d.ts +35 -0
- package/target/tsc/util/event.d.ts +93 -0
- package/target/tsc/util/index.d.ts +12 -0
- package/target/tsc/util/preconditions.d.ts +79 -0
- package/target/tsc/util/reactive.d.ts +36 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import type { Accessor, JSX } from "solid-js";
|
|
2
|
+
import type { DomComponent, DomProps, StyleElement } from "..";
|
|
3
|
+
import { DomController } from "../dom/client";
|
|
4
|
+
import "./surface.css";
|
|
5
|
+
/**
|
|
6
|
+
* Position of a scaffold's floating action button.
|
|
7
|
+
*
|
|
8
|
+
* | Position | Placement |
|
|
9
|
+
* | -------------- | ----------------------------------------------------------------- |
|
|
10
|
+
* | `"start"` | at the start edge, above the bottom bar |
|
|
11
|
+
* | `"center"` | centered, above the bottom bar |
|
|
12
|
+
* | `"end"` | at the end edge, above the bottom bar |
|
|
13
|
+
* | `"endOverlay"` | at the end edge, overlaying the bottom bar |
|
|
14
|
+
*
|
|
15
|
+
* @see Compose `FabPosition`
|
|
16
|
+
*/
|
|
17
|
+
export type FabPosition = "start" | "center" | "end" | "endOverlay";
|
|
18
|
+
/**
|
|
19
|
+
* Material window size class of a window width.
|
|
20
|
+
*
|
|
21
|
+
* | Class | Window width |
|
|
22
|
+
* | -------------- | --------------------- |
|
|
23
|
+
* | `"compact"` | below 600px |
|
|
24
|
+
* | `"medium"` | 600px to below 840px |
|
|
25
|
+
* | `"expanded"` | 840px to below 1200px |
|
|
26
|
+
* | `"large"` | 1200px to below 1600px |
|
|
27
|
+
* | `"extraLarge"` | 1600px and wider |
|
|
28
|
+
*
|
|
29
|
+
* @see androidx.window `WindowSizeClass` width breakpoints (`BREAKPOINTS_V2`)
|
|
30
|
+
*/
|
|
31
|
+
export type WindowSizeClass = "compact" | "medium" | "expanded" | "large" | "extraLarge";
|
|
32
|
+
/**
|
|
33
|
+
* Properties accepted by {@link Scaffold}.
|
|
34
|
+
*/
|
|
35
|
+
export type ScaffoldProps = DomProps<HTMLDivElement, Omit<JSX.HTMLAttributes<HTMLDivElement>, "role">> & {
|
|
36
|
+
/**
|
|
37
|
+
* Top app bar.
|
|
38
|
+
*/
|
|
39
|
+
topBar?: JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Main content, which scrolls between the bars. Children are used when omitted.
|
|
42
|
+
*/
|
|
43
|
+
content?: JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Landmark role of the content; omit it when the scaffold is inside another landmark.
|
|
46
|
+
*/
|
|
47
|
+
contentRole?: "main" | "region" | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Accessible name of a `region` content landmark.
|
|
50
|
+
*/
|
|
51
|
+
contentLabel?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Bottom app bar or navigation bar.
|
|
54
|
+
*/
|
|
55
|
+
bottomBar?: JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Floating action button.
|
|
58
|
+
*/
|
|
59
|
+
floatingActionButton?: JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* Position of the floating action button.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue `"end"`
|
|
64
|
+
*/
|
|
65
|
+
floatingActionButtonPosition?: FabPosition | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Snackbar host, placed above the floating action button, or above the bottom bar without one.
|
|
68
|
+
*/
|
|
69
|
+
snackbarHost?: JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* Standard {@link ./sheet#BottomSheet | bottom sheet}, which peeks above the bottom bar.
|
|
72
|
+
*
|
|
73
|
+
* The content and the floating elements end above the sheet's peek, whichever height sets it.
|
|
74
|
+
*/
|
|
75
|
+
bottomSheet?: JSX.Element;
|
|
76
|
+
/**
|
|
77
|
+
* Pad the scaffold by the safe-area insets of the viewport.
|
|
78
|
+
*
|
|
79
|
+
* The bars take the top and bottom insets; without a bar, the content and the floating
|
|
80
|
+
* elements take them instead. The scaffold takes the left and right insets.
|
|
81
|
+
*
|
|
82
|
+
* @defaultValue `false`
|
|
83
|
+
*/
|
|
84
|
+
safeArea?: boolean | undefined;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Properties accepted by {@link BottomSheetScaffold}.
|
|
88
|
+
*/
|
|
89
|
+
export type BottomSheetScaffoldProps = ScaffoldProps & {
|
|
90
|
+
/**
|
|
91
|
+
* Peek height of the {@link ScaffoldProps.bottomSheet | bottom sheet}, in CSS pixels or as a
|
|
92
|
+
* CSS length.
|
|
93
|
+
*
|
|
94
|
+
* A sheet's own `peekHeight` takes precedence. When omitted, the `sheetPeekHeight` role
|
|
95
|
+
* applies.
|
|
96
|
+
*/
|
|
97
|
+
sheetPeekHeight?: number | string | undefined;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Properties accepted by {@link ListDetailPaneScaffold}.
|
|
101
|
+
*/
|
|
102
|
+
export type ListDetailPaneScaffoldProps = DomProps<HTMLDivElement, JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
103
|
+
/**
|
|
104
|
+
* List pane, the secondary pane, shown first.
|
|
105
|
+
*/
|
|
106
|
+
list?: JSX.Element;
|
|
107
|
+
/**
|
|
108
|
+
* Detail pane, the primary pane. Children are used when omitted.
|
|
109
|
+
*/
|
|
110
|
+
detail?: JSX.Element;
|
|
111
|
+
/**
|
|
112
|
+
* Extra pane, the tertiary pane, shown last.
|
|
113
|
+
*/
|
|
114
|
+
extra?: JSX.Element;
|
|
115
|
+
/**
|
|
116
|
+
* Pane the user navigated to, which remains visible when fewer panes fit.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue `"list"`
|
|
119
|
+
*/
|
|
120
|
+
activePane?: "list" | "detail" | "extra" | undefined;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Properties accepted by {@link SupportingPaneScaffold}.
|
|
124
|
+
*/
|
|
125
|
+
export type SupportingPaneScaffoldProps = DomProps<HTMLDivElement, JSX.HTMLAttributes<HTMLDivElement>> & {
|
|
126
|
+
/**
|
|
127
|
+
* Main pane, the primary pane, shown first. Children are used when omitted.
|
|
128
|
+
*/
|
|
129
|
+
main?: JSX.Element;
|
|
130
|
+
/**
|
|
131
|
+
* Supporting pane, the secondary pane.
|
|
132
|
+
*/
|
|
133
|
+
supporting?: JSX.Element;
|
|
134
|
+
/**
|
|
135
|
+
* Extra pane, the tertiary pane, shown last.
|
|
136
|
+
*/
|
|
137
|
+
extra?: JSX.Element;
|
|
138
|
+
/**
|
|
139
|
+
* Pane the user navigated to, which remains visible when fewer panes fit.
|
|
140
|
+
*
|
|
141
|
+
* @defaultValue `"main"`
|
|
142
|
+
*/
|
|
143
|
+
activePane?: "main" | "supporting" | "extra" | undefined;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Determine the window size class of a window width.
|
|
147
|
+
*
|
|
148
|
+
* @param width - window width in CSS pixels
|
|
149
|
+
* @returns window size class
|
|
150
|
+
*/
|
|
151
|
+
export declare function windowSizeClassOf(width: number): WindowSizeClass;
|
|
152
|
+
/**
|
|
153
|
+
* Create a signal tracking the window size class of a window.
|
|
154
|
+
*
|
|
155
|
+
* The class follows the same width breakpoints as the CSS of the pane scaffolds, through media
|
|
156
|
+
* queries, so it changes only when the window crosses a breakpoint. During server rendering, or
|
|
157
|
+
* without a window, the class is `"compact"`, the class to design for first.
|
|
158
|
+
*
|
|
159
|
+
* Within a Solid owner, the media query listeners are removed when the owner is disposed.
|
|
160
|
+
*
|
|
161
|
+
* @param view - window to track
|
|
162
|
+
* @returns accessor of the current window size class
|
|
163
|
+
*/
|
|
164
|
+
export declare function createWindowSizeClass(view?: Window | undefined): Accessor<WindowSizeClass>;
|
|
165
|
+
/**
|
|
166
|
+
* Client controller of a {@link Scaffold} or {@link BottomSheetScaffold}.
|
|
167
|
+
*
|
|
168
|
+
* The client renders the server's element tree; slots without content are hidden by CSS, so the
|
|
169
|
+
* tree is static and hydrates node for node.
|
|
170
|
+
*/
|
|
171
|
+
export declare class ScaffoldController extends DomController<BottomSheetScaffoldProps> {
|
|
172
|
+
#private;
|
|
173
|
+
/**
|
|
174
|
+
* Construct a new `ScaffoldController`.
|
|
175
|
+
*
|
|
176
|
+
* @param props - component properties
|
|
177
|
+
* @param cssClassName - public CSS class name of the scaffold
|
|
178
|
+
*/
|
|
179
|
+
constructor(props: BottomSheetScaffoldProps, cssClassName?: string);
|
|
180
|
+
/**
|
|
181
|
+
* Apply local properties to component state and styling.
|
|
182
|
+
*
|
|
183
|
+
* @see {@link ../dom/client#DomController.applyComponentProps}
|
|
184
|
+
*/
|
|
185
|
+
protected applyComponentProps(): void;
|
|
186
|
+
/**
|
|
187
|
+
* Handle style element replacement before the controller reference is updated.
|
|
188
|
+
*
|
|
189
|
+
* The style-element getter still exposes the previous element during this hook.
|
|
190
|
+
*
|
|
191
|
+
* @param curr - new style element, or `null` when absent
|
|
192
|
+
* @see {@link ../dom/client#DomController.onStyleElementChanged}
|
|
193
|
+
*/
|
|
194
|
+
protected onStyleElementChanged(curr: StyleElement | null): void;
|
|
195
|
+
/**
|
|
196
|
+
* Render the component's element tree.
|
|
197
|
+
*
|
|
198
|
+
* Every slot is a reactive slot.
|
|
199
|
+
*
|
|
200
|
+
* @param children - nested component children, possibly an accessor
|
|
201
|
+
* @returns rendered component elements
|
|
202
|
+
* @see {@link ../dom/client#DomController.render}
|
|
203
|
+
*/
|
|
204
|
+
protected render(children: JSX.Element): JSX.Element;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Material scaffold.
|
|
208
|
+
*
|
|
209
|
+
* A scaffold lays out a screen as Compose `Scaffold` does: the top bar, the content, which scrolls
|
|
210
|
+
* between the bars, and the bottom bar. The floating action button sits 16 pixels (`FabSpacing`)
|
|
211
|
+
* above the bottom bar, at its {@link ScaffoldProps.floatingActionButtonPosition | position}, and
|
|
212
|
+
* the snackbar host, a `SnackbarHost` included, sits above the floating action button, or above
|
|
213
|
+
* the bottom bar without one. A standard bottom sheet peeks above the bottom bar, and the content
|
|
214
|
+
* and the floating elements end above its peek, whichever height sets it; an `endOverlay`
|
|
215
|
+
* floating action button overlays the bottom bar only while no sheet peeks above it.
|
|
216
|
+
*
|
|
217
|
+
* The scaffold fills its container; give it a height, such as `100dvh`, for the bars to stay in
|
|
218
|
+
* view. It has no content padding: content uses the pane margins of its layout.
|
|
219
|
+
*
|
|
220
|
+
* # Design
|
|
221
|
+
*
|
|
222
|
+
* The scaffold uses the background color role. The floating action button spacing is controlled
|
|
223
|
+
* through the `scaffoldFabSpacing` role of the [`cw-Surface`](./surface.yaml) design attribute.
|
|
224
|
+
*
|
|
225
|
+
* @param props - component properties
|
|
226
|
+
* @returns rendered component elements
|
|
227
|
+
*/
|
|
228
|
+
export declare const Scaffold: DomComponent<ScaffoldProps>;
|
|
229
|
+
/**
|
|
230
|
+
* Material scaffold for a standard bottom sheet.
|
|
231
|
+
*
|
|
232
|
+
* A bottom sheet scaffold is a {@link Scaffold} whose {@link
|
|
233
|
+
* BottomSheetScaffoldProps.sheetPeekHeight | sheet peek height} is set on the scaffold, as Compose
|
|
234
|
+
* `BottomSheetScaffold`: the sheet peeks by that height, and the content ends above it, so that
|
|
235
|
+
* the content can scroll clear of the collapsed sheet.
|
|
236
|
+
*
|
|
237
|
+
* @param props - component properties
|
|
238
|
+
* @returns rendered component elements
|
|
239
|
+
*/
|
|
240
|
+
export declare const BottomSheetScaffold: DomComponent<BottomSheetScaffoldProps>;
|
|
241
|
+
/**
|
|
242
|
+
* Client controller of a {@link ListDetailPaneScaffold}.
|
|
243
|
+
*/
|
|
244
|
+
export declare class ListDetailPaneScaffoldController extends DomController<ListDetailPaneScaffoldProps> {
|
|
245
|
+
/**
|
|
246
|
+
* Construct a new `ListDetailPaneScaffoldController`.
|
|
247
|
+
*
|
|
248
|
+
* @param props - component properties
|
|
249
|
+
*/
|
|
250
|
+
constructor(props: ListDetailPaneScaffoldProps);
|
|
251
|
+
/**
|
|
252
|
+
* Apply local properties to component state and styling.
|
|
253
|
+
*
|
|
254
|
+
* @see {@link ../dom/client#DomController.applyComponentProps}
|
|
255
|
+
*/
|
|
256
|
+
protected applyComponentProps(): void;
|
|
257
|
+
/**
|
|
258
|
+
* Render the component's element tree.
|
|
259
|
+
*
|
|
260
|
+
* Every pane is a reactive slot.
|
|
261
|
+
*
|
|
262
|
+
* @param children - nested component children, possibly an accessor
|
|
263
|
+
* @returns rendered component elements
|
|
264
|
+
* @see {@link ../dom/client#DomController.render}
|
|
265
|
+
*/
|
|
266
|
+
protected render(children: JSX.Element): JSX.Element;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Material list-detail canonical layout.
|
|
270
|
+
*
|
|
271
|
+
* The scaffold places the list, detail and extra panes side by side, in that order, as many as
|
|
272
|
+
* the window size class fits, as Compose `ListDetailPaneScaffold` with its default directive: one
|
|
273
|
+
* pane in compact and medium windows, two in expanded windows, and three in large and wider
|
|
274
|
+
* windows. The {@link ListDetailPaneScaffoldProps.activePane | active pane} stays visible; with two
|
|
275
|
+
* panes, the detail pane, which has the highest priority, joins it, and with one, only the active
|
|
276
|
+
* pane is shown. Panes without content take no space.
|
|
277
|
+
*
|
|
278
|
+
* # Design
|
|
279
|
+
*
|
|
280
|
+
* Panes are separated by the `paneSpacing` role, and the list and extra panes take the
|
|
281
|
+
* `panePreferredWidth` role (`panePreferredWidthExtraLarge` in large and wider windows) while the
|
|
282
|
+
* detail pane fills the rest. The scaffold is inset by the `paneMarginCompact` role in compact
|
|
283
|
+
* windows and by `paneMargin` otherwise. These are roles of the [`cw-Surface`](./surface.yaml)
|
|
284
|
+
* design attribute.
|
|
285
|
+
*
|
|
286
|
+
* @param props - component properties
|
|
287
|
+
* @returns rendered component elements
|
|
288
|
+
* @see Compose `calculatePaneScaffoldDirective` and `ListDetailPaneScaffoldDefaults.PaneOrder`
|
|
289
|
+
*/
|
|
290
|
+
export declare const ListDetailPaneScaffold: DomComponent<ListDetailPaneScaffoldProps>;
|
|
291
|
+
/**
|
|
292
|
+
* Client controller of a {@link SupportingPaneScaffold}.
|
|
293
|
+
*/
|
|
294
|
+
export declare class SupportingPaneScaffoldController extends DomController<SupportingPaneScaffoldProps> {
|
|
295
|
+
/**
|
|
296
|
+
* Construct a new `SupportingPaneScaffoldController`.
|
|
297
|
+
*
|
|
298
|
+
* @param props - component properties
|
|
299
|
+
*/
|
|
300
|
+
constructor(props: SupportingPaneScaffoldProps);
|
|
301
|
+
/**
|
|
302
|
+
* Apply local properties to component state and styling.
|
|
303
|
+
*
|
|
304
|
+
* @see {@link ../dom/client#DomController.applyComponentProps}
|
|
305
|
+
*/
|
|
306
|
+
protected applyComponentProps(): void;
|
|
307
|
+
/**
|
|
308
|
+
* Render the component's element tree.
|
|
309
|
+
*
|
|
310
|
+
* Every pane is a reactive slot.
|
|
311
|
+
*
|
|
312
|
+
* @param children - nested component children, possibly an accessor
|
|
313
|
+
* @returns rendered component elements
|
|
314
|
+
* @see {@link ../dom/client#DomController.render}
|
|
315
|
+
*/
|
|
316
|
+
protected render(children: JSX.Element): JSX.Element;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Material supporting pane canonical layout.
|
|
320
|
+
*
|
|
321
|
+
* The scaffold places the main, supporting and extra panes side by side, in that order, as many
|
|
322
|
+
* as the window size class fits, as Compose `SupportingPaneScaffold` with its default directive:
|
|
323
|
+
* one pane in compact and medium windows, two in expanded windows, and three in large and wider
|
|
324
|
+
* windows. The {@link SupportingPaneScaffoldProps.activePane | active pane} stays visible; with two
|
|
325
|
+
* panes, the main pane, which has the highest priority, joins it, and with one, only the active
|
|
326
|
+
* pane is shown. Panes without content take no space. A standard side sheet placed in a pane fills
|
|
327
|
+
* it, docked beside the main pane.
|
|
328
|
+
*
|
|
329
|
+
* # Design
|
|
330
|
+
*
|
|
331
|
+
* Pane spacing, widths and margins follow the roles described for {@link ListDetailPaneScaffold}.
|
|
332
|
+
*
|
|
333
|
+
* @param props - component properties
|
|
334
|
+
* @returns rendered component elements
|
|
335
|
+
* @see Compose `calculatePaneScaffoldDirective` and `SupportingPaneScaffoldDefaults.PaneOrder`
|
|
336
|
+
*/
|
|
337
|
+
export declare const SupportingPaneScaffold: DomComponent<SupportingPaneScaffoldProps>;
|