@pg-labs-incubator/cobweb 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +163 -0
- package/README.md +82 -2
- package/package.json +111 -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 +320 -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 +580 -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,537 @@
|
|
|
1
|
+
import type { Accessor, JSX } from "solid-js";
|
|
2
|
+
import type { DomComponent, DomProps, FunctionElement, StyleElement } from "..";
|
|
3
|
+
import type { InteractableComponent, InteractableProps } from "../state";
|
|
4
|
+
import type { NavigationChangeHandler, NavigationElementProps, NavigationOpenChangeHandler } from "./base";
|
|
5
|
+
import { DomController } from "../dom/client";
|
|
6
|
+
import { InteractableController } from "../state/controller";
|
|
7
|
+
import "../container/elevation-shadow.css";
|
|
8
|
+
import "./navigation.css";
|
|
9
|
+
/**
|
|
10
|
+
* Properties of a navigation bar or navigation rail.
|
|
11
|
+
*/
|
|
12
|
+
export type NavigationContainerProps = NavigationElementProps<HTMLElement> & {
|
|
13
|
+
/**
|
|
14
|
+
* Controlled value of the selected destination.
|
|
15
|
+
*
|
|
16
|
+
* When this key is present, selection changes only when this value changes; activating a
|
|
17
|
+
* destination requests a change through {@link NavigationContainerProps.onChange | `onChange`}.
|
|
18
|
+
* An `undefined` value selects no destination.
|
|
19
|
+
*/
|
|
20
|
+
value?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Alias for {@link NavigationContainerProps.value | `value`}.
|
|
23
|
+
*/
|
|
24
|
+
selectedValue?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Initial value of the selected destination of an uncontrolled container.
|
|
27
|
+
*
|
|
28
|
+
* When omitted, the first enabled destination which is itself selected becomes the selection.
|
|
29
|
+
*/
|
|
30
|
+
defaultValue?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Callback invoked after a destination is activated.
|
|
33
|
+
*
|
|
34
|
+
* Distinct callbacks run in `onChange`, `onValueChange`, `onSelectedChange` order; identical
|
|
35
|
+
* references run once. An uncontrolled container updates its selection before the callbacks.
|
|
36
|
+
*/
|
|
37
|
+
onChange?: NavigationChangeHandler | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Alias for {@link NavigationContainerProps.onChange | `onChange`}.
|
|
40
|
+
*/
|
|
41
|
+
onValueChange?: NavigationChangeHandler | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Alias for {@link NavigationContainerProps.onChange | `onChange`}.
|
|
44
|
+
*/
|
|
45
|
+
onSelectedChange?: NavigationChangeHandler | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Position of destination icons relative to their labels.
|
|
48
|
+
*
|
|
49
|
+
* `"top"` stacks icons above labels; `"start"` places icons before labels. Bars use `"top"` in
|
|
50
|
+
* compact windows and `"start"` in medium windows. Rails place icons at the top while collapsed
|
|
51
|
+
* and at the start while expanded unless this is specified.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue `"top"` for bars and collapsed rails; `"start"` for expanded rails
|
|
54
|
+
*/
|
|
55
|
+
itemIconPlacement?: "start" | "top" | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Show the labels of unselected destinations.
|
|
58
|
+
*
|
|
59
|
+
* When `false`, a {@link NavigationBar} or collapsed {@link NavigationRail} shows only the icon
|
|
60
|
+
* of unselected destinations, centered, and reveals the label on selection.
|
|
61
|
+
*
|
|
62
|
+
* @defaultValue `true`
|
|
63
|
+
*/
|
|
64
|
+
alwaysShowLabel?: boolean | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Arrangement of destinations within the container.
|
|
67
|
+
*
|
|
68
|
+
* | Value | Container | Arrangement |
|
|
69
|
+
* | --------------- | --------- | ------------------------------------------------------- |
|
|
70
|
+
* | `"equalWeight"` | Bars | Destinations share the bar width equally. |
|
|
71
|
+
* | `"centered"` | Bars | Destinations are centered with a count-based inset. |
|
|
72
|
+
* | `"top"` | Rails | Destinations follow the header at the top of the rail. |
|
|
73
|
+
* | `"center"` | Rails | Destinations are centered within the rail's height. |
|
|
74
|
+
*
|
|
75
|
+
* Values which do not apply to the container are ignored.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue `"centered"` for bars with `"start"` icons, `"equalWeight"` for other bars,
|
|
78
|
+
* and `"top"` for rails
|
|
79
|
+
*/
|
|
80
|
+
arrangement?: "center" | "centered" | "equalWeight" | "top" | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Expand a rail to show horizontal destinations with their labels.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue `false`; {@link WideNavigationRail} defaults to `true`
|
|
85
|
+
*/
|
|
86
|
+
expanded?: boolean | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Present an expanded rail in a modal surface above the application.
|
|
89
|
+
*
|
|
90
|
+
* The collapsed rail remains in layout, unless {@link NavigationContainerProps.hideOnCollapse
|
|
91
|
+
* | `hideOnCollapse`} is `true`. While {@link NavigationContainerProps.expanded | `expanded`},
|
|
92
|
+
* the destinations move into a modal top-layer surface with a scrim; Escape and scrim clicks
|
|
93
|
+
* request collapse through {@link NavigationContainerProps.onExpandedChange |
|
|
94
|
+
* `onExpandedChange`}.
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue `false`
|
|
97
|
+
*/
|
|
98
|
+
modal?: boolean | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Remove a collapsed rail from layout.
|
|
101
|
+
*
|
|
102
|
+
* A modal rail with this set slides in from the start edge when expanded instead of expanding
|
|
103
|
+
* from the collapsed rail.
|
|
104
|
+
*
|
|
105
|
+
* @defaultValue `false`
|
|
106
|
+
*/
|
|
107
|
+
hideOnCollapse?: boolean | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Header content of a rail, such as a menu button or floating action button.
|
|
110
|
+
*/
|
|
111
|
+
header?: JSX.Element;
|
|
112
|
+
/**
|
|
113
|
+
* Callback invoked when a modal rail requests collapse.
|
|
114
|
+
*
|
|
115
|
+
* @param open - requested expanded state, `false` for a dismissal request
|
|
116
|
+
* @param event - event which requested the change
|
|
117
|
+
*/
|
|
118
|
+
onExpandedChange?: NavigationOpenChangeHandler | undefined;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Properties of a navigation destination.
|
|
122
|
+
*
|
|
123
|
+
* A destination with an {@link NavigationItemProps.href | `href`} renders a native link, and
|
|
124
|
+
* otherwise a native button of type `"button"`. The `disabled`, `href`, `id`, and `tabIndex`
|
|
125
|
+
* properties are local component properties, applied to the native element by the component
|
|
126
|
+
* controller; `id` and `tabIndex` take precedence over `attr:id` and `attr:tabindex`. Other native
|
|
127
|
+
* attributes of either element remain available through the namespaced `attr:` properties
|
|
128
|
+
* supplied by {@link DomProps}, such as `attr:target`, `attr:rel`, `attr:download`,
|
|
129
|
+
* `attr:hreflang`, and `attr:referrerpolicy` of a link. The function element which `ref` and
|
|
130
|
+
* native listeners receive is typed as an `HTMLElement`, since it may be either.
|
|
131
|
+
*/
|
|
132
|
+
export type NavigationItemProps = DomProps<HTMLElement, Omit<JSX.AnchorHTMLAttributes<HTMLElement> & JSX.ButtonHTMLAttributes<HTMLElement>, "disabled" | "href" | "type">> & {
|
|
133
|
+
/**
|
|
134
|
+
* Value identifying the destination within its navigation container.
|
|
135
|
+
*/
|
|
136
|
+
value?: string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Controlled selected state of a destination outside a navigation container.
|
|
139
|
+
*/
|
|
140
|
+
selected?: boolean | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Initial selected state of an uncontrolled destination outside a navigation container.
|
|
143
|
+
*
|
|
144
|
+
* Within an uncontrolled container without a `defaultValue`, the first enabled destination
|
|
145
|
+
* with this set becomes the container's selection.
|
|
146
|
+
*/
|
|
147
|
+
defaultSelected?: boolean | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Link destination.
|
|
150
|
+
*
|
|
151
|
+
* When specified, the destination renders a native link; otherwise, it renders a native button.
|
|
152
|
+
*/
|
|
153
|
+
href?: string | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Element id; takes precedence over `attr:id`.
|
|
156
|
+
*/
|
|
157
|
+
id?: string | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Disable activation and remove the destination from sequential focus.
|
|
160
|
+
*
|
|
161
|
+
* @defaultValue `false`
|
|
162
|
+
*/
|
|
163
|
+
disabled?: boolean | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Sequential focus index; takes precedence over `attr:tabindex`.
|
|
166
|
+
*/
|
|
167
|
+
tabIndex?: number | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Token of `aria-current` exposed while the destination is selected.
|
|
170
|
+
*
|
|
171
|
+
* @defaultValue `"page"`
|
|
172
|
+
*/
|
|
173
|
+
current?: "date" | "location" | "page" | "step" | "time" | "true" | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Icon content.
|
|
176
|
+
*
|
|
177
|
+
* The icon is hidden from assistive technology, so the label names the destination. Supply
|
|
178
|
+
* `attr:aria-label` for a destination without a label.
|
|
179
|
+
*/
|
|
180
|
+
icon?: JSX.Element;
|
|
181
|
+
/**
|
|
182
|
+
* Label content; `children` are used when this is omitted.
|
|
183
|
+
*/
|
|
184
|
+
label?: JSX.Element;
|
|
185
|
+
/**
|
|
186
|
+
* Badge content, such as a {@link ../feedback#Badge | badge}.
|
|
187
|
+
*
|
|
188
|
+
* Bars and rails anchor the badge to the icon's top end corner; drawers show it at the end of
|
|
189
|
+
* the destination as badge label text.
|
|
190
|
+
*/
|
|
191
|
+
badge?: JSX.Element;
|
|
192
|
+
/**
|
|
193
|
+
* Callback invoked when a destination outside a navigation container is activated.
|
|
194
|
+
*
|
|
195
|
+
* Distinct callbacks run in `onChange`, `onSelect`, `onSelectedChange` order; identical
|
|
196
|
+
* references run once. An uncontrolled destination is selected before the callbacks run.
|
|
197
|
+
*
|
|
198
|
+
* @param selected - requested selection state, always `true`
|
|
199
|
+
* @param event - click event which activated the destination
|
|
200
|
+
*/
|
|
201
|
+
onChange?: ((selected: boolean, event: Event) => void) | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Alias for {@link NavigationItemProps.onChange | `onChange`}.
|
|
204
|
+
*/
|
|
205
|
+
onSelect?: ((selected: boolean, event: Event) => void) | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* Alias for {@link NavigationItemProps.onChange | `onChange`}.
|
|
208
|
+
*/
|
|
209
|
+
onSelectedChange?: ((selected: boolean, event: Event) => void) | undefined;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Properties of a component which coordinates the selection of its destinations.
|
|
213
|
+
*
|
|
214
|
+
* @see {@link NavigationSelection}
|
|
215
|
+
*/
|
|
216
|
+
export type NavigationSelectionProps = Pick<NavigationContainerProps, "defaultValue" | "onChange" | "onSelectedChange" | "onValueChange" | "selectedValue" | "value">;
|
|
217
|
+
/**
|
|
218
|
+
* Navigation container family.
|
|
219
|
+
*
|
|
220
|
+
* | Kind | Component |
|
|
221
|
+
* | ---------------------- | ------------------------- |
|
|
222
|
+
* | `"NavigationBar"` | {@link NavigationBar} |
|
|
223
|
+
* | `"ShortNavigationBar"` | {@link ShortNavigationBar} |
|
|
224
|
+
* | `"NavigationRail"` | {@link NavigationRail} |
|
|
225
|
+
* | `"WideNavigationRail"` | {@link WideNavigationRail} |
|
|
226
|
+
*/
|
|
227
|
+
type NavigationKind = "NavigationBar" | "NavigationRail" | "ShortNavigationBar" | "WideNavigationRail";
|
|
228
|
+
/**
|
|
229
|
+
* Attribute identifying a navigation root and its family.
|
|
230
|
+
*/
|
|
231
|
+
export declare const NAVIGATION_KIND_ATTRIBUTE = "data-cw-navigation-kind";
|
|
232
|
+
/**
|
|
233
|
+
* Selection coordinator for the destinations of a navigation root.
|
|
234
|
+
*
|
|
235
|
+
* A root coordinates the selection of every {@link NavigationItem} within it, except destinations
|
|
236
|
+
* of nested roots. Activation is handled by one delegated click listener; a `MutationObserver`
|
|
237
|
+
* keeps the selection consistent as destinations are added, removed, enabled, or revalued. Each
|
|
238
|
+
* synchronization discards the observer records produced by its own writes.
|
|
239
|
+
*
|
|
240
|
+
* # Ownership of `aria-current`
|
|
241
|
+
*
|
|
242
|
+
* The root assigns `aria-current` to selected destinations it *owns*. A destination is not owned
|
|
243
|
+
* when its consumer authored `aria-current`, through `attr:aria-current` or by changing the value
|
|
244
|
+
* the root assigned; such a consumer value is never overwritten. When an owned destination leaves
|
|
245
|
+
* the root, or the root is disposed, the root restores the value it replaced, unless the consumer
|
|
246
|
+
* changed `aria-current` in the meantime. A value assigned while a destination is detached is
|
|
247
|
+
* treated as authored when the destination returns.
|
|
248
|
+
*
|
|
249
|
+
* | Destination state | Root behavior |
|
|
250
|
+
* | ----------------------------------------- | --------------------------------------- |
|
|
251
|
+
* | Rendered without `attr:aria-current` | Owned: assigned while selected. |
|
|
252
|
+
* | Rendered with `attr:aria-current` | Not owned: consumer value is retained. |
|
|
253
|
+
* | Owned, consumer changes `aria-current` | Ownership is relinquished permanently. |
|
|
254
|
+
* | Owned, removed from the root | Assigned value is restored. |
|
|
255
|
+
*/
|
|
256
|
+
export declare class NavigationSelection {
|
|
257
|
+
#private;
|
|
258
|
+
/**
|
|
259
|
+
* Construct a new selection coordinator.
|
|
260
|
+
*
|
|
261
|
+
* @param props - properties of the coordinating component
|
|
262
|
+
* @param onSynchronized - optional callback invoked with the destinations after each
|
|
263
|
+
* synchronization
|
|
264
|
+
*/
|
|
265
|
+
constructor(props: NavigationSelectionProps, onSynchronized?: (items: readonly HTMLElement[]) => void);
|
|
266
|
+
/**
|
|
267
|
+
* Attach the coordinator to a navigation root, or detach it.
|
|
268
|
+
*
|
|
269
|
+
* Detaching from a root restores the `aria-current` values the root owns.
|
|
270
|
+
*
|
|
271
|
+
* @param root - new navigation root, or `null` to detach
|
|
272
|
+
*/
|
|
273
|
+
attach(root: HTMLElement | null): void;
|
|
274
|
+
/**
|
|
275
|
+
* Read the controlled value from the component properties.
|
|
276
|
+
*
|
|
277
|
+
* This tracks `value` and `selectedValue` when invoked within a tracking context.
|
|
278
|
+
*/
|
|
279
|
+
update(): void;
|
|
280
|
+
/**
|
|
281
|
+
* Apply the selected value to the root's destinations.
|
|
282
|
+
*/
|
|
283
|
+
sync(): void;
|
|
284
|
+
/**
|
|
285
|
+
* Detach from the root and release its destinations.
|
|
286
|
+
*/
|
|
287
|
+
dispose(): void;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Client controller of navigation bars and navigation rails.
|
|
291
|
+
*
|
|
292
|
+
* The controller coordinates destination selection through a {@link NavigationSelection} and
|
|
293
|
+
* applies the container's presentation attributes. Rails additionally animate between their
|
|
294
|
+
* collapsed and expanded widths, and present a modal rail's destinations in a top-layer `dialog`.
|
|
295
|
+
*
|
|
296
|
+
* # Elements
|
|
297
|
+
*
|
|
298
|
+
* | Element | Description |
|
|
299
|
+
* | ---------------------------------------- | ---------------------------------------------- |
|
|
300
|
+
* | `nav.cw-<Kind>` | Style and function element. |
|
|
301
|
+
* | `div.cw-NavigationRail-content` (rails) | Header and destinations. |
|
|
302
|
+
* | `div.cw-NavigationRail-header` (rails) | {@link NavigationContainerProps.header} slot. |
|
|
303
|
+
* | `dialog.cw-NavigationRail-modal` (rails) | Modal surface of an expanded modal rail. |
|
|
304
|
+
*
|
|
305
|
+
* # Motion
|
|
306
|
+
*
|
|
307
|
+
* Expanding or collapsing an in-layout rail adopts the new layout at once, and animates the
|
|
308
|
+
* rail's width from the next animation frame with the default spatial spring, while the labels
|
|
309
|
+
* of its destinations fade in with the default effects spring (`WideNavigationRail.kt`). A modal
|
|
310
|
+
* rail's surface expands from the collapsed rail with the fast spatial spring, or, when the rail
|
|
311
|
+
* hides on collapse, slides in from the start edge with the default spatial spring; its scrim
|
|
312
|
+
* fades with the default effects spring (`ModalWideNavigationRail`).
|
|
313
|
+
*
|
|
314
|
+
* The sliding surface of a modal rail which hides on collapse follows a horizontal drag towards
|
|
315
|
+
* the start edge. On release, it settles expanded or collapsed with Compose's anchored drag
|
|
316
|
+
* thresholds (half the surface width, 125dp per second), continuing the release velocity with the
|
|
317
|
+
* default spatial spring; settling collapsed requests collapse.
|
|
318
|
+
*/
|
|
319
|
+
export declare class NavigationController extends DomController<NavigationContainerProps> {
|
|
320
|
+
#private;
|
|
321
|
+
/**
|
|
322
|
+
* Construct a new navigation controller.
|
|
323
|
+
*
|
|
324
|
+
* @param props - component properties
|
|
325
|
+
* @param kind - navigation family to render
|
|
326
|
+
*/
|
|
327
|
+
constructor(props: NavigationContainerProps, kind: NavigationKind);
|
|
328
|
+
/**
|
|
329
|
+
* Apply local properties to component state and styling.
|
|
330
|
+
*
|
|
331
|
+
* @see {@link ../dom/client#DomController.applyComponentProps}
|
|
332
|
+
*/
|
|
333
|
+
protected applyComponentProps(): void;
|
|
334
|
+
/**
|
|
335
|
+
* Handle style element replacement before the controller reference is updated.
|
|
336
|
+
*
|
|
337
|
+
* @param curr - new style element, or `null` when absent
|
|
338
|
+
* @see {@link ../dom/client#DomController.onStyleElementChanged}
|
|
339
|
+
*/
|
|
340
|
+
protected onStyleElementChanged(curr: StyleElement | null): void;
|
|
341
|
+
/**
|
|
342
|
+
* Release the selection coordinator, pending motion, and drag, and close the modal surface.
|
|
343
|
+
*
|
|
344
|
+
* @see {@link ../dom/client#DomController.onControllerCleanup}
|
|
345
|
+
*/
|
|
346
|
+
protected onControllerCleanup(): void;
|
|
347
|
+
/**
|
|
348
|
+
* Render the component's element tree.
|
|
349
|
+
*
|
|
350
|
+
* The tree is static: presentation attributes are applied by {@link
|
|
351
|
+
* NavigationController.applyComponentProps}. The header slot is reactive content.
|
|
352
|
+
*
|
|
353
|
+
* @param children - nested component children, possibly an accessor
|
|
354
|
+
* @returns rendered component elements
|
|
355
|
+
* @see {@link ../dom/client#DomController.render}
|
|
356
|
+
*/
|
|
357
|
+
protected render(children: JSX.Element): JSX.Element;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Provide the server-side selection of a component which coordinates its destinations.
|
|
361
|
+
*
|
|
362
|
+
* Destinations rendered on the server read the selection to render their initial selected state.
|
|
363
|
+
* The provider is created on server and client alike, so hydration keys match; only the server
|
|
364
|
+
* reads its value.
|
|
365
|
+
*
|
|
366
|
+
* @param props - properties of the coordinating component
|
|
367
|
+
* @param coordinates - the component coordinates the selection of its destinations
|
|
368
|
+
* @param children - function rendering the component's content
|
|
369
|
+
* @returns rendered content
|
|
370
|
+
*/
|
|
371
|
+
export declare function provideNavigationSelection(props: NavigationSelectionProps, coordinates: boolean, children: () => JSX.Element): JSX.Element;
|
|
372
|
+
/**
|
|
373
|
+
* Material navigation bar.
|
|
374
|
+
*
|
|
375
|
+
* A navigation bar is an 80px high bar of three to five {@link NavigationBarItem} destinations,
|
|
376
|
+
* at the bottom of compact windows. Destinations stack their icon above their label and share
|
|
377
|
+
* the bar width equally, separated by 8px.
|
|
378
|
+
*
|
|
379
|
+
* # States
|
|
380
|
+
*
|
|
381
|
+
* The bar coordinates the selection of its destinations; see {@link NavigationContainerProps}
|
|
382
|
+
* for the controlled and uncontrolled contracts. The selected destination shows its active
|
|
383
|
+
* indicator and exposes `aria-current`.
|
|
384
|
+
*
|
|
385
|
+
* # Design
|
|
386
|
+
*
|
|
387
|
+
* The bar is designed through the [`cw-Navigation`](./navigation.yaml) component design attribute
|
|
388
|
+
* (`bar` roles) and is the `NavigationBar` of Material 3 (`NavigationBarTokens`). Prefer {@link
|
|
389
|
+
* ShortNavigationBar}, the Material 3 Expressive flexible navigation bar, for new layouts.
|
|
390
|
+
*
|
|
391
|
+
* @param props - component properties
|
|
392
|
+
* @returns rendered component elements
|
|
393
|
+
*/
|
|
394
|
+
export declare const NavigationBar: DomComponent<NavigationContainerProps>;
|
|
395
|
+
/**
|
|
396
|
+
* Material 3 Expressive flexible navigation bar.
|
|
397
|
+
*
|
|
398
|
+
* A flexible navigation bar is a 64px high bar of destinations. In compact windows its
|
|
399
|
+
* destinations stack their icon above their label and share the bar width equally; in medium
|
|
400
|
+
* windows, set {@link NavigationContainerProps.itemIconPlacement | `itemIconPlacement`} to
|
|
401
|
+
* `"start"` to place icons before labels in a centered arrangement.
|
|
402
|
+
*
|
|
403
|
+
* # Design
|
|
404
|
+
*
|
|
405
|
+
* The bar is designed through the [`cw-Navigation`](./navigation.yaml) component design attribute
|
|
406
|
+
* (`bar` roles), following `ShortNavigationBar` and `NavigationBarTokens`.
|
|
407
|
+
*
|
|
408
|
+
* @param props - component properties
|
|
409
|
+
* @returns rendered component elements
|
|
410
|
+
*/
|
|
411
|
+
export declare const ShortNavigationBar: DomComponent<NavigationContainerProps>;
|
|
412
|
+
/**
|
|
413
|
+
* Alias of {@link ShortNavigationBar} using the Material 3 Expressive name.
|
|
414
|
+
*/
|
|
415
|
+
export declare const FlexibleNavigationBar: typeof ShortNavigationBar;
|
|
416
|
+
/**
|
|
417
|
+
* Material 3 Expressive navigation rail.
|
|
418
|
+
*
|
|
419
|
+
* A navigation rail shows three to seven destinations at the start edge of medium and larger
|
|
420
|
+
* windows. A collapsed rail is 96px wide and stacks each icon above its label; an {@link
|
|
421
|
+
* NavigationContainerProps.expanded | expanded} rail is 220px to 360px wide, fitting its
|
|
422
|
+
* content, and places icons before labels. A {@link NavigationContainerProps.modal | modal}
|
|
423
|
+
* rail keeps its collapsed rail in layout and presents its expanded destinations in a modal
|
|
424
|
+
* top-layer surface with a scrim.
|
|
425
|
+
*
|
|
426
|
+
* # Elements
|
|
427
|
+
*
|
|
428
|
+
* See {@link NavigationController} for the rendered elements and motion.
|
|
429
|
+
*
|
|
430
|
+
* # Design
|
|
431
|
+
*
|
|
432
|
+
* The rail is designed through the [`cw-Navigation`](./navigation.yaml) component design attribute
|
|
433
|
+
* (`rail` roles), following `WideNavigationRail` and the `NavigationRail*Tokens`.
|
|
434
|
+
*
|
|
435
|
+
* @param props - component properties
|
|
436
|
+
* @returns rendered component elements
|
|
437
|
+
*/
|
|
438
|
+
export declare const NavigationRail: DomComponent<NavigationContainerProps>;
|
|
439
|
+
/**
|
|
440
|
+
* Navigation rail which is expanded unless {@link NavigationContainerProps.expanded |
|
|
441
|
+
* `expanded`} is `false`.
|
|
442
|
+
*
|
|
443
|
+
* @param props - component properties
|
|
444
|
+
* @returns rendered component elements
|
|
445
|
+
* @see {@link NavigationRail}
|
|
446
|
+
*/
|
|
447
|
+
export declare const WideNavigationRail: DomComponent<NavigationContainerProps>;
|
|
448
|
+
/**
|
|
449
|
+
* Client controller of a navigation destination.
|
|
450
|
+
*
|
|
451
|
+
* Within a navigation root, the root coordinates the destination's selection; outside a root,
|
|
452
|
+
* the destination keeps its own controlled or uncontrolled selection.
|
|
453
|
+
*/
|
|
454
|
+
export declare class NavigationItemController extends InteractableController<NavigationItemProps> {
|
|
455
|
+
#private;
|
|
456
|
+
/**
|
|
457
|
+
* Construct a new destination controller.
|
|
458
|
+
*
|
|
459
|
+
* @param props - component properties
|
|
460
|
+
*/
|
|
461
|
+
constructor(props: InteractableProps<NavigationItemProps>);
|
|
462
|
+
/**
|
|
463
|
+
* Apply local properties to component state and styling.
|
|
464
|
+
*
|
|
465
|
+
* @see {@link ../dom/client#DomController.applyComponentProps}
|
|
466
|
+
*/
|
|
467
|
+
protected applyComponentProps(): void;
|
|
468
|
+
/**
|
|
469
|
+
* Handle function element replacement before the controller reference is updated.
|
|
470
|
+
*
|
|
471
|
+
* @param curr - new function element, or `null` when absent
|
|
472
|
+
* @see {@link ../dom/client#DomController.onFunctionElementChanged}
|
|
473
|
+
*/
|
|
474
|
+
protected onFunctionElementChanged(curr: FunctionElement<NavigationItemProps> | null): void;
|
|
475
|
+
/**
|
|
476
|
+
* Render the component's element tree.
|
|
477
|
+
*
|
|
478
|
+
* The destination renders a native link while it has an `href`, and a native button
|
|
479
|
+
* otherwise. Attributes and state classes are applied by {@link
|
|
480
|
+
* NavigationItemController.applyComponentProps}; the icon element's `aria-hidden` follows the
|
|
481
|
+
* reactive icon slot.
|
|
482
|
+
*
|
|
483
|
+
* @param children - nested component children, possibly an accessor
|
|
484
|
+
* @param funcRef - callback receiving the native function element
|
|
485
|
+
* @returns rendered component elements
|
|
486
|
+
* @see {@link ../dom/client#DomController.render}
|
|
487
|
+
*/
|
|
488
|
+
protected render(children: JSX.Element, funcRef?: (element: HTMLElement) => void): Accessor<JSX.Element>;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Material navigation destination.
|
|
492
|
+
*
|
|
493
|
+
* A destination is a native link, when it has an `href`, or a native button. Within a
|
|
494
|
+
* {@link NavigationBar}, {@link ShortNavigationBar}, {@link NavigationRail}, {@link
|
|
495
|
+
* WideNavigationRail}, or a selecting {@link ./drawer#NavigationDrawer | NavigationDrawer}, the
|
|
496
|
+
* container coordinates its selection by `value`; outside a container, the destination keeps its
|
|
497
|
+
* own `selected` state.
|
|
498
|
+
*
|
|
499
|
+
* # States
|
|
500
|
+
*
|
|
501
|
+
* Destinations enter the {@link FocusState | focus}, {@link HoverState | hover}, and {@link
|
|
502
|
+
* PressState | press} states, which apply `cw-NavigationItem-<state>` classes and show a state
|
|
503
|
+
* layer and ripple on the active indicator. Selected destinations have the
|
|
504
|
+
* `cw-NavigationItem-selected` class and `aria-current`; disabled destinations have the
|
|
505
|
+
* `cw-NavigationItem-disabled` class and `aria-disabled`.
|
|
506
|
+
*
|
|
507
|
+
* # Design
|
|
508
|
+
*
|
|
509
|
+
* Destinations are designed through the [`cw-Navigation`](./navigation.yaml) component design
|
|
510
|
+
* attribute (`item` roles); their layout follows the containing bar, rail, or drawer.
|
|
511
|
+
*
|
|
512
|
+
* @param props - component properties
|
|
513
|
+
* @returns rendered component elements
|
|
514
|
+
*/
|
|
515
|
+
export declare const NavigationItem: InteractableComponent<NavigationItemProps>;
|
|
516
|
+
/**
|
|
517
|
+
* Alias of {@link NavigationItem} using the Material 3 navigation drawer item name.
|
|
518
|
+
*/
|
|
519
|
+
export declare const NavigationDrawerItem: typeof NavigationItem;
|
|
520
|
+
/**
|
|
521
|
+
* Alias of {@link NavigationItem} using the Material 3 navigation bar item name.
|
|
522
|
+
*/
|
|
523
|
+
export declare const NavigationBarItem: typeof NavigationItem;
|
|
524
|
+
/**
|
|
525
|
+
* Alias of {@link NavigationItem} using the Material 3 Expressive flexible navigation bar item
|
|
526
|
+
* name.
|
|
527
|
+
*/
|
|
528
|
+
export declare const ShortNavigationBarItem: typeof NavigationItem;
|
|
529
|
+
/**
|
|
530
|
+
* Alias of {@link NavigationItem} using the Material 3 navigation rail item name.
|
|
531
|
+
*/
|
|
532
|
+
export declare const NavigationRailItem: typeof NavigationItem;
|
|
533
|
+
/**
|
|
534
|
+
* Alias of {@link NavigationItem} using the Material 3 Expressive navigation rail item name.
|
|
535
|
+
*/
|
|
536
|
+
export declare const WideNavigationRailItem: typeof NavigationItem;
|
|
537
|
+
export {};
|