@mortenbrudvik/waveui 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -32
- package/dist/components/data-display/InfoButton.cjs +1 -1
- package/dist/components/data-display/InfoButton.cjs.map +1 -1
- package/dist/components/data-display/InfoButton.mjs +90 -82
- package/dist/components/data-display/InfoButton.mjs.map +1 -1
- package/dist/components/data-display/InfoLabel.cjs +1 -1
- package/dist/components/data-display/InfoLabel.cjs.map +1 -1
- package/dist/components/data-display/InfoLabel.mjs +19 -18
- package/dist/components/data-display/InfoLabel.mjs.map +1 -1
- package/dist/components/feedback/MessageBarGroup.cjs +2 -0
- package/dist/components/feedback/MessageBarGroup.cjs.map +1 -0
- package/dist/components/feedback/MessageBarGroup.mjs +63 -0
- package/dist/components/feedback/MessageBarGroup.mjs.map +1 -0
- package/dist/components/feedback/ProgressBar.cjs +1 -1
- package/dist/components/feedback/ProgressBar.cjs.map +1 -1
- package/dist/components/feedback/ProgressBar.mjs +41 -39
- package/dist/components/feedback/ProgressBar.mjs.map +1 -1
- package/dist/components/feedback/Toaster.cjs +1 -1
- package/dist/components/feedback/Toaster.cjs.map +1 -1
- package/dist/components/feedback/Toaster.mjs +222 -216
- package/dist/components/feedback/Toaster.mjs.map +1 -1
- package/dist/components/layout/Accordion.cjs +1 -1
- package/dist/components/layout/Accordion.cjs.map +1 -1
- package/dist/components/layout/Accordion.mjs +124 -109
- package/dist/components/layout/Accordion.mjs.map +1 -1
- package/dist/components/layout/Carousel.cjs +1 -1
- package/dist/components/layout/Carousel.cjs.map +1 -1
- package/dist/components/layout/Carousel.mjs +207 -193
- package/dist/components/layout/Carousel.mjs.map +1 -1
- package/dist/components/layout/TabList.cjs +1 -1
- package/dist/components/layout/TabList.cjs.map +1 -1
- package/dist/components/layout/TabList.mjs +149 -108
- package/dist/components/layout/TabList.mjs.map +1 -1
- package/dist/components/layout/Tree.cjs.map +1 -1
- package/dist/components/layout/Tree.context.cjs +1 -1
- package/dist/components/layout/Tree.context.cjs.map +1 -1
- package/dist/components/layout/Tree.context.mjs +2 -1
- package/dist/components/layout/Tree.context.mjs.map +1 -1
- package/dist/components/layout/Tree.core.cjs +1 -1
- package/dist/components/layout/Tree.core.cjs.map +1 -1
- package/dist/components/layout/Tree.core.mjs +178 -165
- package/dist/components/layout/Tree.core.mjs.map +1 -1
- package/dist/components/layout/Tree.mjs.map +1 -1
- package/dist/components/navigation/Menu.popover.cjs +1 -1
- package/dist/components/navigation/Menu.popover.cjs.map +1 -1
- package/dist/components/navigation/Menu.popover.mjs +154 -168
- package/dist/components/navigation/Menu.popover.mjs.map +1 -1
- package/dist/components/navigation/Nav.cjs +1 -1
- package/dist/components/navigation/Nav.cjs.map +1 -1
- package/dist/components/navigation/Nav.mjs +156 -136
- package/dist/components/navigation/Nav.mjs.map +1 -1
- package/dist/components/navigation/NavDrawer.cjs +1 -1
- package/dist/components/navigation/NavDrawer.cjs.map +1 -1
- package/dist/components/navigation/NavDrawer.mjs +48 -45
- package/dist/components/navigation/NavDrawer.mjs.map +1 -1
- package/dist/components/overlays/Dialog.cjs +1 -1
- package/dist/components/overlays/Dialog.cjs.map +1 -1
- package/dist/components/overlays/Dialog.mjs +128 -122
- package/dist/components/overlays/Dialog.mjs.map +1 -1
- package/dist/components/overlays/Dialog.slots.cjs +1 -1
- package/dist/components/overlays/Dialog.slots.cjs.map +1 -1
- package/dist/components/overlays/Dialog.slots.mjs +12 -12
- package/dist/components/overlays/Dialog.slots.mjs.map +1 -1
- package/dist/components/overlays/Drawer.cjs.map +1 -1
- package/dist/components/overlays/Drawer.mjs.map +1 -1
- package/dist/components/overlays/Drawer.panel.cjs +1 -1
- package/dist/components/overlays/Drawer.panel.cjs.map +1 -1
- package/dist/components/overlays/Drawer.panel.mjs +97 -81
- package/dist/components/overlays/Drawer.panel.mjs.map +1 -1
- package/dist/components/overlays/Drawer.root.cjs +1 -1
- package/dist/components/overlays/Drawer.root.cjs.map +1 -1
- package/dist/components/overlays/Drawer.root.mjs +34 -31
- package/dist/components/overlays/Drawer.root.mjs.map +1 -1
- package/dist/components/overlays/Popover.cjs +1 -1
- package/dist/components/overlays/Popover.cjs.map +1 -1
- package/dist/components/overlays/Popover.mjs +231 -216
- package/dist/components/overlays/Popover.mjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.cjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.mjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.parts.cjs +1 -1
- package/dist/components/overlays/TeachingPopover.parts.cjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.parts.mjs +202 -173
- package/dist/components/overlays/TeachingPopover.parts.mjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.root.cjs +1 -1
- package/dist/components/overlays/TeachingPopover.root.cjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.root.mjs +108 -99
- package/dist/components/overlays/TeachingPopover.root.mjs.map +1 -1
- package/dist/components/overlays/Tooltip.cjs +1 -1
- package/dist/components/overlays/Tooltip.cjs.map +1 -1
- package/dist/components/overlays/Tooltip.mjs +66 -61
- package/dist/components/overlays/Tooltip.mjs.map +1 -1
- package/dist/components/provider/WaveProvider.cjs +1 -1
- package/dist/components/provider/WaveProvider.cjs.map +1 -1
- package/dist/components/provider/WaveProvider.mjs +26 -23
- package/dist/components/provider/WaveProvider.mjs.map +1 -1
- package/dist/hooks/useCollapsePresence.cjs +2 -0
- package/dist/hooks/useCollapsePresence.cjs.map +1 -0
- package/dist/hooks/useCollapsePresence.mjs +21 -0
- package/dist/hooks/useCollapsePresence.mjs.map +1 -0
- package/dist/hooks/useFocusBeforeClose.cjs +2 -0
- package/dist/hooks/useFocusBeforeClose.cjs.map +1 -0
- package/dist/hooks/useFocusBeforeClose.mjs +33 -0
- package/dist/hooks/useFocusBeforeClose.mjs.map +1 -0
- package/dist/hooks/useMotion.cjs +2 -0
- package/dist/hooks/useMotion.cjs.map +1 -0
- package/dist/hooks/useMotion.mjs +14 -0
- package/dist/hooks/useMotion.mjs.map +1 -0
- package/dist/hooks/usePresenceGroup.cjs +2 -0
- package/dist/hooks/usePresenceGroup.cjs.map +1 -0
- package/dist/hooks/usePresenceGroup.mjs +68 -0
- package/dist/hooks/usePresenceGroup.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +721 -131
- package/dist/index.d.ts +721 -131
- package/dist/index.mjs +136 -135
- package/dist/lib/classNames.cjs +1 -1
- package/dist/lib/classNames.cjs.map +1 -1
- package/dist/lib/classNames.mjs +101 -90
- package/dist/lib/classNames.mjs.map +1 -1
- package/dist/lib/motion.cjs +2 -0
- package/dist/lib/motion.cjs.map +1 -0
- package/dist/lib/motion.mjs +43 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,9 @@ import { ReactPortal } from 'react';
|
|
|
11
11
|
/**
|
|
12
12
|
* A vertically stacked set of disclosure sections (WAI-ARIA Accordion pattern). Each
|
|
13
13
|
* `Accordion.Item` renders an `Accordion.Trigger` button inside a heading (`headingLevel`) and an
|
|
14
|
-
* `Accordion.Panel` region that is shown while the item is open.
|
|
14
|
+
* `Accordion.Panel` region that is shown while the item is open. A panel opens and closes its
|
|
15
|
+
* space with a short collapse and fade (`Accordion.Panel`'s `motion`; none under reduced motion or
|
|
16
|
+
* a `WaveProvider` with `motion="none"`), and focus inside a closing panel moves to its trigger.
|
|
15
17
|
*
|
|
16
18
|
* Single mode (the default) keeps at most one item open (`openItem`, `defaultOpenItem`,
|
|
17
19
|
* `onOpenItemChange`); `type="multiple"` lets any number of items open (`openItems`,
|
|
@@ -34,7 +36,7 @@ export declare const Accordion: {
|
|
|
34
36
|
displayName: string;
|
|
35
37
|
};
|
|
36
38
|
Panel: {
|
|
37
|
-
({ id: idProp, className, children, ref, ...rest }: AccordionPanelProps): React_2.JSX.Element | null;
|
|
39
|
+
({ id: idProp, className, children, motion, ref, ...rest }: AccordionPanelProps): React_2.JSX.Element | null;
|
|
38
40
|
displayName: string;
|
|
39
41
|
};
|
|
40
42
|
};
|
|
@@ -113,22 +115,46 @@ export declare interface AccordionMultipleProps extends AccordionBaseProps {
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
/**
|
|
116
|
-
* The content region of an Accordion.Item, rendered
|
|
117
|
-
*
|
|
118
|
-
* non-empty `id` replaces the generated one (the trigger's
|
|
118
|
+
* The content region of an Accordion.Item, labelled by its trigger and rendered while the item is
|
|
119
|
+
* open and while it collapses after a close. Its props (className merged, `ref`, `data-*`,
|
|
120
|
+
* handlers) land on the region, and a non-empty `id` replaces the generated one (the trigger's
|
|
121
|
+
* `aria-controls` follows it).
|
|
122
|
+
*
|
|
123
|
+
* The region renders as the only child of a collapse element (its stable class
|
|
124
|
+
* `wave-accordion-panel__collapse`), which opens and closes the region's space (`motion`) and has
|
|
125
|
+
* no box of its own while the item is open, so the region lays out in the Item as before. An item
|
|
126
|
+
* opened by default appears without motion. After a close the region stays in the document until
|
|
127
|
+
* the collapse ends, `inert` and with `data-state="closed"`, while its trigger already reports the
|
|
128
|
+
* item collapsed; opening the item again during the collapse keeps the same region and the state
|
|
129
|
+
* of its content. Focus inside the region when the item closes moves to the item's trigger.
|
|
119
130
|
*/
|
|
120
131
|
export declare const AccordionPanel: {
|
|
121
|
-
({ id: idProp, className, children, ref, ...rest }: AccordionPanelProps): React_2.JSX.Element | null;
|
|
132
|
+
({ id: idProp, className, children, motion, ref, ...rest }: AccordionPanelProps): React_2.JSX.Element | null;
|
|
122
133
|
displayName: string;
|
|
123
134
|
};
|
|
124
135
|
|
|
125
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Accordion.Panel: `root` on the `role="region"` element; `collapse` on the element around it
|
|
138
|
+
* (the element that opens and closes the region's space, 0.15).
|
|
139
|
+
*/
|
|
126
140
|
export declare const accordionPanelClassNames: {
|
|
127
141
|
readonly root: "wave-accordion-panel";
|
|
142
|
+
readonly collapse: "wave-accordion-panel__collapse";
|
|
128
143
|
};
|
|
129
144
|
|
|
130
145
|
/** Properties for the AccordionPanel sub-component (merged onto the `role="region"` element). */
|
|
131
146
|
export declare interface AccordionPanelProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
147
|
+
/**
|
|
148
|
+
* Replaces the panel's collapse (Fluent's `AccordionPanel collapseMotion`), on the element
|
|
149
|
+
* around the region: by default the space the region takes opens from nothing and closes back
|
|
150
|
+
* to it, with a fade, over the normal duration (200 ms) with the max easy-ease curve, both ways.
|
|
151
|
+
* `null` turns it off (the region appears and disappears at once); a class string or
|
|
152
|
+
* `{ className }` replaces it, written as `MotionSlot` describes. A `WaveProvider` with
|
|
153
|
+
* `motion="none"` turns the default off, and a value here still applies under it. A panel
|
|
154
|
+
* rendered inside another panel has no motion of its own.
|
|
155
|
+
* @default the collapse described above
|
|
156
|
+
*/
|
|
157
|
+
motion?: MotionSlot | null;
|
|
132
158
|
/** Ref to the panel `<div role="region">`. */
|
|
133
159
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
134
160
|
}
|
|
@@ -1588,12 +1614,16 @@ export declare type CardProps<C extends React_2.ElementType = 'div'> = Polymorph
|
|
|
1588
1614
|
* - `controlsLayout` places the Previous and Next buttons over the slides (`overlay`,
|
|
1589
1615
|
* `overlay-wide`) or beside them (`inline`, `inline-wide`); `Carousel.Button` replaces the
|
|
1590
1616
|
* built-in button of its `direction` with one of your own glyph.
|
|
1617
|
+
* - The slides glide to the new page over 300 ms; `motion="fade"` cross-fades them instead (one
|
|
1618
|
+
* slide per page), `motion={null}` turns the motion off and `motionDuration` times it. Under
|
|
1619
|
+
* reduced motion, or below a `WaveProvider` with `motion="none"` (unless `motion` is set), the
|
|
1620
|
+
* page changes at once.
|
|
1591
1621
|
*
|
|
1592
1622
|
* Compound access (`Carousel.Item`, `Carousel.Button`) needs a client module; React Server
|
|
1593
1623
|
* Components import the flat names `CarouselItem` and `CarouselButton` instead.
|
|
1594
1624
|
*/
|
|
1595
1625
|
export declare const Carousel: {
|
|
1596
|
-
({ value: controlledValue, defaultValue, onValueChange, autoPlay, autoPlayInterval, autoPlayLabels, labels, loop, groupSize, align, draggable, controlsLayout, appearance, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...rest }: CarouselProps): React_2.JSX.Element;
|
|
1626
|
+
({ value: controlledValue, defaultValue, onValueChange, autoPlay, autoPlayInterval, autoPlayLabels, labels, loop, groupSize, align, draggable, controlsLayout, appearance, motion, motionDuration, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...rest }: CarouselProps): React_2.JSX.Element;
|
|
1597
1627
|
displayName: string;
|
|
1598
1628
|
} & {
|
|
1599
1629
|
Item: {
|
|
@@ -1741,6 +1771,12 @@ export declare interface CarouselLabels {
|
|
|
1741
1771
|
slideRoleDescription?: string;
|
|
1742
1772
|
}
|
|
1743
1773
|
|
|
1774
|
+
/**
|
|
1775
|
+
* How a Carousel moves between pages: `slide` moves the slides in from the side of the page order,
|
|
1776
|
+
* `fade` cross-fades them in place (one slide per page only).
|
|
1777
|
+
*/
|
|
1778
|
+
export declare type CarouselMotion = 'slide' | 'fade';
|
|
1779
|
+
|
|
1744
1780
|
/** Properties for the Carousel component. */
|
|
1745
1781
|
export declare interface CarouselProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1746
1782
|
/**
|
|
@@ -1774,10 +1810,12 @@ export declare interface CarouselProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
1774
1810
|
/**
|
|
1775
1811
|
* Lets the pointer drag the slides (mouse, touch and pen). The track follows the pointer and,
|
|
1776
1812
|
* on release, the page changes when the drag passed a quarter of the width or left fast, else
|
|
1777
|
-
* it snaps back; the direction follows the carousel's.
|
|
1778
|
-
*
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1813
|
+
* it snaps back; the direction follows the carousel's. Under `motion="fade"` the slides do not
|
|
1814
|
+
* follow the pointer (they share one place): the same drag still changes the page on release,
|
|
1815
|
+
* and the slides cross-fade. The click that ends a drag is not delivered to the slide, and a
|
|
1816
|
+
* vertical swipe still scrolls the page. Dragging pauses autoplay like the pointer over the
|
|
1817
|
+
* carousel does. The buttons and the keyboard stay the way to operate the carousel without a
|
|
1818
|
+
* pointer.
|
|
1781
1819
|
* @default false
|
|
1782
1820
|
*/
|
|
1783
1821
|
draggable?: boolean;
|
|
@@ -1825,6 +1863,26 @@ export declare interface CarouselProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
1825
1863
|
* @default false
|
|
1826
1864
|
*/
|
|
1827
1865
|
loop?: boolean;
|
|
1866
|
+
/**
|
|
1867
|
+
* How the carousel moves between pages: `slide` glides the slides in from the side of the page
|
|
1868
|
+
* order (mirrored in right-to-left layouts), `fade` cross-fades them in place, and `null` turns
|
|
1869
|
+
* the motion off (the page changes at once). Fluent's `motion`; its object form with a
|
|
1870
|
+
* `duration` is not offered: use `motionDuration`. `fade` needs one slide per page: with
|
|
1871
|
+
* `groupSize` above 1 or `'auto'` the slides slide, and a development warning says so. Under
|
|
1872
|
+
* `fade` a drag still changes the page on release, but the slides do not follow the pointer.
|
|
1873
|
+
* Below a `WaveProvider` with `motion="none"` the carousel does not move unless this prop is
|
|
1874
|
+
* set. Either motion is off while the user prefers reduced motion. The root renders the motion
|
|
1875
|
+
* it resolves from this prop, `groupSize` and the provider as `data-motion` (`slide`, `fade` or
|
|
1876
|
+
* `none`); reduced motion leaves it unchanged.
|
|
1877
|
+
* @default 'slide'
|
|
1878
|
+
*/
|
|
1879
|
+
motion?: CarouselMotion | null;
|
|
1880
|
+
/**
|
|
1881
|
+
* How long the slide or the fade takes, in milliseconds. Fluent's `duration` is a different
|
|
1882
|
+
* unit (Embla's unitless speed, 20 to 60), so a value ported from Fluent is far too short.
|
|
1883
|
+
* @default 300
|
|
1884
|
+
*/
|
|
1885
|
+
motionDuration?: number;
|
|
1828
1886
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
1829
1887
|
}
|
|
1830
1888
|
|
|
@@ -4173,8 +4231,11 @@ export declare type DeprecatedPresenceStatus = 'dnd' | 'oof';
|
|
|
4173
4231
|
* closed, so a form keeps what was typed and the components inside keep their state; each open
|
|
4174
4232
|
* focuses the first focusable element again (an `autoFocus` inside never applies), and a kept
|
|
4175
4233
|
* dialog opened while another overlay is open stacks above it.
|
|
4176
|
-
* - **
|
|
4177
|
-
* motion
|
|
4234
|
+
* - **Motion**: the surface scales and fades in and out and the backdrop fades with it (none under
|
|
4235
|
+
* reduced motion); `Dialog.Content`'s `motion` and `backdropMotion` turn each off (`null`) or
|
|
4236
|
+
* replace it, and `WaveProvider motion="none"` turns both off. The surface mounts through the
|
|
4237
|
+
* presence core and renders `data-presence`; while it exits it stays on screen, `inert`, and
|
|
4238
|
+
* focus, the trap and the scroll lock are already released.
|
|
4178
4239
|
* - **Naming**: give `Dialog.Content` a `title`, a `Dialog.Title`, or `aria-label`.
|
|
4179
4240
|
*
|
|
4180
4241
|
* The sub-components are also exported under flat names (`DialogTrigger`, `DialogContent`,
|
|
@@ -4202,7 +4263,7 @@ export declare const Dialog: {
|
|
|
4202
4263
|
displayName: string;
|
|
4203
4264
|
};
|
|
4204
4265
|
Content: {
|
|
4205
|
-
({ title, size, backdrop, closeButton, titleAction, closeLabel, children, className, style, id, onKeyDown, ref, ...rest }: DialogContentProps): React_2.JSX.Element | null;
|
|
4266
|
+
({ title, size, backdrop, motion, backdropMotion, closeButton, titleAction, closeLabel, children, className, style, id, onKeyDown, ref, ...rest }: DialogContentProps): React_2.JSX.Element | null;
|
|
4206
4267
|
displayName: string;
|
|
4207
4268
|
};
|
|
4208
4269
|
Footer: {
|
|
@@ -4267,17 +4328,22 @@ export declare interface DialogCloseRenderProps extends React_2.HTMLAttributes<H
|
|
|
4267
4328
|
* centres the surface and lets presses through to the page. The titles' end padding follows the
|
|
4268
4329
|
* width of the title-actions area (`--wave-dialog-title-end-padding`, 2rem until it is measured).
|
|
4269
4330
|
*
|
|
4270
|
-
* It
|
|
4271
|
-
*
|
|
4272
|
-
*
|
|
4273
|
-
*
|
|
4274
|
-
*
|
|
4275
|
-
* `
|
|
4276
|
-
*
|
|
4277
|
-
*
|
|
4331
|
+
* It moves in and out: the surface scales up from 85% of its size and fades in over 250 ms, and
|
|
4332
|
+
* scales down and fades out over 200 ms, while the backdrop fades in over 250 ms and out with the
|
|
4333
|
+
* surface; a dialog open by default animates in when it mounts in the browser. Under reduced
|
|
4334
|
+
* motion both appear and disappear at once. `motion` (the surface) and `backdropMotion` (the
|
|
4335
|
+
* backdrop) turn each motion off (`null`) or replace its classes, and a `WaveProvider` with
|
|
4336
|
+
* `motion="none"` turns both defaults off. It mounts through the presence core: the backdrop, the
|
|
4337
|
+
* positioner and the surface render `data-presence` (`entering` and `exiting` while the surface's
|
|
4338
|
+
* motion runs, `entered` while open, `exited` while kept closed), and the backdrop and the
|
|
4339
|
+
* positioner are `inert` while exiting and `hidden` and `inert` while kept closed. A closed
|
|
4340
|
+
* surface waits for its motion before it unmounts or hides, while focus, the trap, the isolation
|
|
4341
|
+
* and the scroll lock follow the open state at once: an exiting dialog lets clicks through to the
|
|
4342
|
+
* page (an `inert` element takes no pointer events), and the page's scrollbar comes back while the
|
|
4343
|
+
* dialog still fades. Opened again during its exit, the same surface enters again.
|
|
4278
4344
|
*/
|
|
4279
4345
|
export declare const DialogContent: {
|
|
4280
|
-
({ title, size, backdrop, closeButton, titleAction, closeLabel, children, className, style, id, onKeyDown, ref, ...rest }: DialogContentProps): React_2.JSX.Element | null;
|
|
4346
|
+
({ title, size, backdrop, motion, backdropMotion, closeButton, titleAction, closeLabel, children, className, style, id, onKeyDown, ref, ...rest }: DialogContentProps): React_2.JSX.Element | null;
|
|
4281
4347
|
displayName: string;
|
|
4282
4348
|
};
|
|
4283
4349
|
|
|
@@ -4328,6 +4394,29 @@ export declare interface DialogContentProps extends Omit<React_2.HTMLAttributes<
|
|
|
4328
4394
|
backdrop?: Slot<'div'> | (SlotObject<'div'> & {
|
|
4329
4395
|
appearance?: BackdropAppearance;
|
|
4330
4396
|
});
|
|
4397
|
+
/**
|
|
4398
|
+
* The surface's motion. By default it scales up from 85% of its size and fades in over 250 ms
|
|
4399
|
+
* with a decelerating curve, and scales down and fades out over 200 ms with an accelerating
|
|
4400
|
+
* curve; under reduced motion it appears and disappears at once. `null` turns the motion off
|
|
4401
|
+
* (the surface still renders its `data-presence` phases, which then end at once); a class string
|
|
4402
|
+
* or `{ className }` replaces the default classes with yours (see `MotionSlot`), also under a
|
|
4403
|
+
* `WaveProvider` with `motion="none"`, which otherwise turns the default off. A `className` that
|
|
4404
|
+
* holds `data-[presence=…]` classes while `motion` is unset keeps 0.14's behaviour: no default
|
|
4405
|
+
* motion, your classes animate the surface. Fluent's `Dialog` `surfaceMotion`.
|
|
4406
|
+
* @default the scale and fade above
|
|
4407
|
+
*/
|
|
4408
|
+
motion?: MotionSlot | null;
|
|
4409
|
+
/**
|
|
4410
|
+
* The backdrop's motion. By default it fades in over 250 ms and out over 200 ms, the surface's
|
|
4411
|
+
* exit, with an easy-ease curve; under reduced motion it appears and disappears at once. `null`
|
|
4412
|
+
* turns the motion off; a class string or `{ className }` replaces the default classes with yours
|
|
4413
|
+
* (see `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns the
|
|
4414
|
+
* default off. The surface's motion decides when the dialog unmounts or hides: a replacement
|
|
4415
|
+
* longer than the surface's exit is cut off there. Ignored with `modalType="non-modal"` (a
|
|
4416
|
+
* development warning says so). Fluent's `DialogSurface` `backdropMotion`.
|
|
4417
|
+
* @default the fade above
|
|
4418
|
+
*/
|
|
4419
|
+
backdropMotion?: MotionSlot | null;
|
|
4331
4420
|
/**
|
|
4332
4421
|
* Content of the built-in Close button (the dismiss glyph by default). It renders inside the
|
|
4333
4422
|
* button, decorative (`aria-hidden`), so the button keeps the name `closeLabel`; a slot object's
|
|
@@ -4456,13 +4545,13 @@ export declare interface DialogProps {
|
|
|
4456
4545
|
*/
|
|
4457
4546
|
finalFocusRef?: React_2.RefObject<HTMLElement | null>;
|
|
4458
4547
|
/**
|
|
4459
|
-
* Removes `Dialog.Content` (the surface and everything in it) when the dialog closes
|
|
4460
|
-
* keeps it mounted while closed, `hidden` and `inert`, so a form
|
|
4461
|
-
* the components inside keep their state; the surface then
|
|
4462
|
-
* the browser only, as an open one), and an `autoFocus`
|
|
4463
|
-
* focuses the first focusable element). A popup opened inside
|
|
4464
|
-
* dialog closes stays open over the page (a development warning says
|
|
4465
|
-
* Fluent's `unmountOnClose`.
|
|
4548
|
+
* Removes `Dialog.Content` (the surface and everything in it) when the dialog closes, once its
|
|
4549
|
+
* exit motion has ended. `false` keeps it mounted while closed, `hidden` and `inert`, so a form
|
|
4550
|
+
* inside keeps what was typed and the components inside keep their state; the surface then
|
|
4551
|
+
* mounts with the Dialog, closed (in the browser only, as an open one), and an `autoFocus`
|
|
4552
|
+
* inside it never applies (each open focuses the first focusable element). A popup opened inside
|
|
4553
|
+
* that is still open when the dialog closes stays open over the page (a development warning says
|
|
4554
|
+
* so): close it first. Fluent's `unmountOnClose`.
|
|
4466
4555
|
* @default true
|
|
4467
4556
|
*/
|
|
4468
4557
|
unmountOnClose?: boolean;
|
|
@@ -4693,13 +4782,28 @@ export declare type DividerProps<C extends React_2.ElementType = 'hr'> = Polymor
|
|
|
4693
4782
|
* each open of an overlay focuses the first focusable element again (an `autoFocus` inside never
|
|
4694
4783
|
* applies), and a kept overlay opened while another overlay is open stacks above it. A kept
|
|
4695
4784
|
* inline drawer is in the server HTML, hidden.
|
|
4785
|
+
* - **Motion**: an overlay panel slides in from its edge and fades in, and slides back and fades
|
|
4786
|
+
* out, over 250 ms (`small`), 300 ms (`medium`), 400 ms (`large`) or 500 ms (`full`), and its
|
|
4787
|
+
* backdrop fades with it; an overlay open by default animates in when it mounts in the browser.
|
|
4788
|
+
* An inline drawer opens and closes the space it takes in the layout over the same durations,
|
|
4789
|
+
* its panel held at its size and fading, so it reads as sliding out from its edge; one open by
|
|
4790
|
+
* default does not animate in, and one at `full` has no motion (a percentage width in
|
|
4791
|
+
* `className` resizes oddly during the motion: give it a length, or pass `motion={null}`).
|
|
4792
|
+
* Under reduced motion every drawer appears and disappears at once. `motion` (the panel, or an
|
|
4793
|
+
* inline drawer's space) and `backdropMotion` (the backdrop) turn each off (`null`) or replace
|
|
4794
|
+
* it, and `WaveProvider motion="none"` turns both defaults off. `data-[presence=…]:` classes in
|
|
4795
|
+
* `className` keep 0.14's behaviour: no default motion, they animate the panel.
|
|
4696
4796
|
* - **Presence**: the panel and the backdrop mount through the presence core and render
|
|
4697
|
-
* `data-presence` (`
|
|
4698
|
-
*
|
|
4699
|
-
*
|
|
4700
|
-
*
|
|
4701
|
-
*
|
|
4702
|
-
*
|
|
4797
|
+
* `data-presence` (`entering` and `exiting` while the drawer's motion runs, `entered` while
|
|
4798
|
+
* open, `exited` while kept closed). An inline drawer's `<aside>` is the only child of an
|
|
4799
|
+
* element of its own (`wave-drawer__collapse`), which renders the same phases, carries the
|
|
4800
|
+
* inline motion and has no box while open, so the `<aside>` lays out in your page as without
|
|
4801
|
+
* it. The backdrop and the panel (an inline drawer's `<aside>` and the element around it) are
|
|
4802
|
+
* `inert` while exiting and `hidden` and `inert` while kept closed. A closed drawer waits for
|
|
4803
|
+
* its motion (the panel's, an inline one's on the element around it) before it unmounts or
|
|
4804
|
+
* hides, while focus, the trap, the isolation and the scroll lock follow the open state at
|
|
4805
|
+
* once: an exiting overlay lets clicks through to the page (an `inert` element takes no pointer
|
|
4806
|
+
* events). Opened again during its exit, the same panel enters again.
|
|
4703
4807
|
*
|
|
4704
4808
|
* The sub-components are also exported under flat names (`DrawerTrigger`, `DrawerClose`,
|
|
4705
4809
|
* `DrawerTitle`, `DrawerHeader`, `DrawerHeaderTitle`, `DrawerHeaderNavigation`, `DrawerBody`,
|
|
@@ -4720,7 +4824,7 @@ export declare type DividerProps<C extends React_2.ElementType = 'hr'> = Polymor
|
|
|
4720
4824
|
* </Drawer>
|
|
4721
4825
|
*/
|
|
4722
4826
|
export declare const Drawer: {
|
|
4723
|
-
({ open: openProp, defaultOpen, onOpenChange, type, separator, position, size, modalType, backdrop, closeButton, titleAction, title, closeLabel, finalFocusRef, unmountOnClose, children, id, ref, ...rest }: DrawerProps): JSX.Element;
|
|
4827
|
+
({ open: openProp, defaultOpen, onOpenChange, type, separator, position, size, modalType, backdrop, motion, backdropMotion, closeButton, titleAction, title, closeLabel, finalFocusRef, unmountOnClose, children, id, ref, ...rest }: DrawerProps): JSX.Element;
|
|
4724
4828
|
displayName: string;
|
|
4725
4829
|
} & {
|
|
4726
4830
|
Trigger: {
|
|
@@ -4790,16 +4894,19 @@ export declare interface DrawerBodyProps extends React_2.HTMLAttributes<HTMLDivE
|
|
|
4790
4894
|
/**
|
|
4791
4895
|
* Drawer: `root` on the panel (the portaled `role="dialog"` element of an overlay drawer, while it
|
|
4792
4896
|
* is open or kept mounted, or the `<aside>` of an inline one); `backdrop` on the backdrop of a
|
|
4793
|
-
* modal or alert overlay drawer; `
|
|
4794
|
-
*
|
|
4795
|
-
*
|
|
4796
|
-
*
|
|
4797
|
-
*
|
|
4798
|
-
*
|
|
4897
|
+
* modal or alert overlay drawer; `collapse` on the element around an inline drawer's panel (its
|
|
4898
|
+
* only child), which carries the presence phases and the motion of an inline drawer; `header` on
|
|
4899
|
+
* the built-in header row (absent with a Drawer.Header); `titleAction` on the element of the
|
|
4900
|
+
* `titleAction` slot in that row; `closeButton` on every built-in Close button (which also
|
|
4901
|
+
* carries Button's root), in the built-in header and in each Drawer.HeaderTitle; `body` on the
|
|
4902
|
+
* scrolling body. The heading of its `title` prop carries Drawer.Title's class. The panel carries
|
|
4903
|
+
* `data-type`, `data-position` and `data-size`; the body, the header and the footer carry
|
|
4904
|
+
* `data-scroll-state`.
|
|
4799
4905
|
*/
|
|
4800
4906
|
export declare const drawerClassNames: {
|
|
4801
4907
|
readonly root: "wave-drawer";
|
|
4802
4908
|
readonly backdrop: "wave-drawer__backdrop";
|
|
4909
|
+
readonly collapse: "wave-drawer__collapse";
|
|
4803
4910
|
readonly header: "wave-drawer__header";
|
|
4804
4911
|
readonly titleAction: "wave-drawer__title-action";
|
|
4805
4912
|
readonly closeButton: "wave-drawer__close-button";
|
|
@@ -5057,7 +5164,10 @@ export declare interface DrawerProps extends Omit<React_2.HTMLAttributes<HTMLEle
|
|
|
5057
5164
|
* viewport's width — or its height at the bottom (the same values; `full` the viewport's height).
|
|
5058
5165
|
* It never exceeds the viewport. An inline panel takes the same sizes, where `full` is its
|
|
5059
5166
|
* container's width (height), and never grows past its container. A width class in `className`
|
|
5060
|
-
* (a height class for `bottom`) replaces it.
|
|
5167
|
+
* (a height class for `bottom`) replaces it. It also times the motion, an overlay's slide and an
|
|
5168
|
+
* inline drawer's collapse alike: 250 ms small, 300 ms medium, 400 ms large, 500 ms full (an
|
|
5169
|
+
* inline drawer at `full` has no motion; see `motion`). Rendered as `data-size`. Fluent's
|
|
5170
|
+
* `size`.
|
|
5061
5171
|
* @default 'small'
|
|
5062
5172
|
*/
|
|
5063
5173
|
size?: DrawerSize;
|
|
@@ -5091,6 +5201,43 @@ export declare interface DrawerProps extends Omit<React_2.HTMLAttributes<HTMLEle
|
|
|
5091
5201
|
backdrop?: Slot<'div'> | (SlotObject<'div'> & {
|
|
5092
5202
|
appearance?: BackdropAppearance;
|
|
5093
5203
|
});
|
|
5204
|
+
/**
|
|
5205
|
+
* The drawer's motion. By default an overlay panel slides in from beyond its edge and fades in
|
|
5206
|
+
* with a decelerating curve, and slides back out and fades out with an accelerating curve; the
|
|
5207
|
+
* `start` and `end` edges follow the text direction, `left` and `right` do not mirror, and a
|
|
5208
|
+
* `bottom` panel rises from below. An inline drawer by default opens the space it takes in your
|
|
5209
|
+
* layout from nothing (its width at a side, its height at the bottom) while its panel fades in,
|
|
5210
|
+
* held at its size against its inner edge, so it reads as sliding out from that edge, with a
|
|
5211
|
+
* decelerating curve; closing runs the same backwards with an accelerating curve. Both take a
|
|
5212
|
+
* duration that follows `size` both ways: 250 ms small, 300 ms medium, 400 ms large, 500 ms
|
|
5213
|
+
* full. An inline drawer at `full` has no motion, as its size is its container's (a value here
|
|
5214
|
+
* does not apply to it either), and an inline drawer whose width (height at the bottom) in
|
|
5215
|
+
* `className` is a percentage resizes oddly during the motion, correctly once open: give it a
|
|
5216
|
+
* length, or pass `null`. Under reduced motion the drawer appears and disappears at once.
|
|
5217
|
+
* `null` turns the motion off (the drawer still renders its `data-presence` phases, which then
|
|
5218
|
+
* end at once); a class string or `{ className }` replaces the default classes with yours (see
|
|
5219
|
+
* `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns the
|
|
5220
|
+
* default off. They go on the overlay panel, or on the element around an inline drawer's
|
|
5221
|
+
* `<aside>` (`wave-drawer__collapse`), whose phases the drawer waits for. A `className` that
|
|
5222
|
+
* holds `data-[presence=…]` classes while `motion` is unset keeps 0.14's behaviour: no default
|
|
5223
|
+
* motion, your classes animate the panel, and the drawer waits for the panel's motion (an
|
|
5224
|
+
* inline one's `<aside>`, not the element around it). Fluent's `OverlayDrawer` and
|
|
5225
|
+
* `InlineDrawer` `surfaceMotion`.
|
|
5226
|
+
* @default the slide (overlay) or the collapse (inline) above
|
|
5227
|
+
*/
|
|
5228
|
+
motion?: MotionSlot | null;
|
|
5229
|
+
/**
|
|
5230
|
+
* The backdrop's motion (a modal or alert overlay). By default it fades in and out with a
|
|
5231
|
+
* linear curve over the panel's duration (250 to 500 ms, by `size`), so it ends with the panel;
|
|
5232
|
+
* under reduced motion it appears and disappears at once. `null` turns the motion off; a class
|
|
5233
|
+
* string or `{ className }` replaces the default classes with yours (see `MotionSlot`), also
|
|
5234
|
+
* under a `WaveProvider` with `motion="none"`, which otherwise turns the default off. The
|
|
5235
|
+
* panel's motion decides when the drawer unmounts or hides: a replacement longer than the
|
|
5236
|
+
* panel's exit is cut off there. Ignored with `modalType="non-modal"` and by an inline drawer
|
|
5237
|
+
* (a development warning says so). Fluent's `OverlayDrawer` `backdropMotion`.
|
|
5238
|
+
* @default the fade above
|
|
5239
|
+
*/
|
|
5240
|
+
backdropMotion?: MotionSlot | null;
|
|
5094
5241
|
/**
|
|
5095
5242
|
* Content of the built-in Close button, in the built-in header and in every
|
|
5096
5243
|
* `Drawer.HeaderTitle`, as `Dialog.Content`'s `closeButton`: decorative content inside the button
|
|
@@ -5136,16 +5283,17 @@ export declare interface DrawerProps extends Omit<React_2.HTMLAttributes<HTMLEle
|
|
|
5136
5283
|
*/
|
|
5137
5284
|
finalFocusRef?: React_2.RefObject<HTMLElement | null>;
|
|
5138
5285
|
/**
|
|
5139
|
-
* Removes the panel and its content when the drawer closes
|
|
5140
|
-
* closed, `hidden` and `inert` (out of the layout, the
|
|
5141
|
-
* what was typed and the state of the components
|
|
5142
|
-
* content then mounts with the Drawer, closed, and
|
|
5143
|
-
* overlay focuses its first focusable element on each
|
|
5144
|
-
* in the browser; a kept inline panel is in the
|
|
5145
|
-
* to its form: a `required` empty field in a
|
|
5146
|
-
* its submission without a visible message. A
|
|
5147
|
-
* drawer closes stays open over the page (a
|
|
5148
|
-
* `key` on the Drawer resets the kept content.
|
|
5286
|
+
* Removes the panel and its content when the drawer closes, once the panel's exit motion has
|
|
5287
|
+
* ended. `false` keeps them mounted while closed, `hidden` and `inert` (out of the layout, the
|
|
5288
|
+
* Tab order and the accessibility tree), so what was typed and the state of the components
|
|
5289
|
+
* inside survive closing and opening again; the content then mounts with the Drawer, closed, and
|
|
5290
|
+
* an `autoFocus` inside it never applies (an overlay focuses its first focusable element on each
|
|
5291
|
+
* open). An overlay panel still renders only in the browser; a kept inline panel is in the
|
|
5292
|
+
* server HTML, hidden. Kept content still belongs to its form: a `required` empty field in a
|
|
5293
|
+
* closed inline drawer inside a page `<form>` blocks its submission without a visible message. A
|
|
5294
|
+
* popup opened inside that is still open when the drawer closes stays open over the page (a
|
|
5295
|
+
* development warning says so): close it first. A `key` on the Drawer resets the kept content.
|
|
5296
|
+
* Fluent's `unmountOnClose`.
|
|
5149
5297
|
* @default true
|
|
5150
5298
|
*/
|
|
5151
5299
|
unmountOnClose?: boolean;
|
|
@@ -6410,8 +6558,14 @@ export declare interface ImageSwatchProps extends Omit<React_2.ButtonHTMLAttribu
|
|
|
6410
6558
|
* attribute go to it, the consumer's handlers first. The description and the note render next
|
|
6411
6559
|
* to it, never inside it. Its box is 24×24px at every `size` and renders `data-size`. The note
|
|
6412
6560
|
* mounts through the presence core: it carries `data-presence`, `data-state` (`open`, and
|
|
6413
|
-
* `closed` while it exits, `inert`) and the `data-wave-infolabel-surface` marker
|
|
6414
|
-
*
|
|
6561
|
+
* `closed` while it exits, `inert`) and the `data-wave-infolabel-surface` marker.
|
|
6562
|
+
* - **Motion.** The note fades in and slides toward the button from the side it opened on, and
|
|
6563
|
+
* fades out and slides back as it closes (see `motion`); it stays in the document, `inert`,
|
|
6564
|
+
* until the exit ends, with `info` still inside it (never twice in the document), while the
|
|
6565
|
+
* dismiss layer, the focus restore and the button's `aria-expanded` follow the open state at
|
|
6566
|
+
* once. Focus inside a closing note moves to the button in the closing commit. Without motion
|
|
6567
|
+
* (reduced motion, `motion={null}`, or a provider with `motion="none"`) it unmounts as soon as
|
|
6568
|
+
* it closes.
|
|
6415
6569
|
*
|
|
6416
6570
|
* Fluent's InfoButton takes the same `info` and `size`. It opens on click only
|
|
6417
6571
|
* (`openOnHover={false}` here), renders its note in place, and moves focus into the note; this one
|
|
@@ -6427,7 +6581,7 @@ export declare interface ImageSwatchProps extends Omit<React_2.ButtonHTMLAttribu
|
|
|
6427
6581
|
* />
|
|
6428
6582
|
*/
|
|
6429
6583
|
export declare const InfoButton: {
|
|
6430
|
-
({ info, size: sizeProp, openOnHover, id: idProp, type, "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, disabled, onClick, onFocus, onBlur, onKeyDown, onPointerDown, onMouseDown, onPointerEnter, onPointerMove, onPointerLeave, ref, ...rest }: InfoButtonProps): React_2.JSX.Element;
|
|
6584
|
+
({ info, size: sizeProp, openOnHover, id: idProp, type, "aria-label": ariaLabelProp, motion, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, disabled, onClick, onFocus, onBlur, onKeyDown, onPointerDown, onMouseDown, onPointerEnter, onPointerMove, onPointerLeave, ref, ...rest }: InfoButtonProps): React_2.JSX.Element;
|
|
6431
6585
|
displayName: string;
|
|
6432
6586
|
};
|
|
6433
6587
|
|
|
@@ -6472,6 +6626,17 @@ export declare interface InfoButtonProps extends Omit<React_2.ButtonHTMLAttribut
|
|
|
6472
6626
|
* @default 'Information'
|
|
6473
6627
|
*/
|
|
6474
6628
|
'aria-label'?: string;
|
|
6629
|
+
/**
|
|
6630
|
+
* The note's motion. By default it fades in and slides 4px away from the button, on the side it
|
|
6631
|
+
* opened on, over 200 ms with a decelerating curve, and fades out and slides back over 100 ms
|
|
6632
|
+
* with an accelerating curve; under reduced motion it appears and disappears at once. `null`
|
|
6633
|
+
* turns the motion off (the note still renders its `data-presence` phases, which then end at
|
|
6634
|
+
* once); a class string or `{ className }` replaces the default classes with yours (see
|
|
6635
|
+
* `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns the
|
|
6636
|
+
* default off. Fluent's `Popover` `surfaceMotion` (its InfoButton is a Popover).
|
|
6637
|
+
* @default the fade and slide above
|
|
6638
|
+
*/
|
|
6639
|
+
motion?: MotionSlot | null;
|
|
6475
6640
|
/** Ref to the button. */
|
|
6476
6641
|
ref?: React_2.Ref<HTMLButtonElement>;
|
|
6477
6642
|
}
|
|
@@ -6489,7 +6654,7 @@ export declare interface InfoButtonProps extends Omit<React_2.ButtonHTMLAttribut
|
|
|
6489
6654
|
* - The button is named "‹label text› ‹infoButtonLabel›" through `aria-labelledby`, which points
|
|
6490
6655
|
* at the `<label>` and at the button's own id (whose `aria-label` supplies the second half), so
|
|
6491
6656
|
* several InfoLabels on a page are told apart; `infoButtonLabel` localizes that second half.
|
|
6492
|
-
* `openOnHover` and `size` reach the button too.
|
|
6657
|
+
* `openOnHover`, `motion` and `size` reach the button too.
|
|
6493
6658
|
* - No `controlRef`: InfoLabel is a label, not a form control, so C-ROUTING's composite-control
|
|
6494
6659
|
* routing does not apply to it; a layout that needs the button's own element renders `InfoButton`
|
|
6495
6660
|
* next to a `Label` instead.
|
|
@@ -6498,7 +6663,7 @@ export declare interface InfoButtonProps extends Omit<React_2.ButtonHTMLAttribut
|
|
|
6498
6663
|
* <InfoLabel info="Use at least 8 characters.">Password</InfoLabel>
|
|
6499
6664
|
*/
|
|
6500
6665
|
export declare const InfoLabel: {
|
|
6501
|
-
({ children, label, info, infoButtonLabel, openOnHover, id, htmlFor, required, size, weight, disabled, className, ref, ...rest }: InfoLabelProps): React_2.JSX.Element;
|
|
6666
|
+
({ children, label, info, infoButtonLabel, openOnHover, motion, id, htmlFor, required, size, weight, disabled, className, ref, ...rest }: InfoLabelProps): React_2.JSX.Element;
|
|
6502
6667
|
displayName: string;
|
|
6503
6668
|
};
|
|
6504
6669
|
|
|
@@ -6537,6 +6702,13 @@ export declare interface InfoLabelProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
6537
6702
|
* @default true
|
|
6538
6703
|
*/
|
|
6539
6704
|
openOnHover?: boolean;
|
|
6705
|
+
/**
|
|
6706
|
+
* The motion of the info button's note, passed through unchanged (see `InfoButton`'s `motion`:
|
|
6707
|
+
* `undefined` is the default fade and slide, `null` none, a value replaces it). Fluent's
|
|
6708
|
+
* `Popover` `surfaceMotion`.
|
|
6709
|
+
* @default the fade and slide of InfoButton's note
|
|
6710
|
+
*/
|
|
6711
|
+
motion?: MotionSlot | null;
|
|
6540
6712
|
/** Ref to the root `<span>`. */
|
|
6541
6713
|
ref?: React_2.Ref<HTMLSpanElement>;
|
|
6542
6714
|
}
|
|
@@ -7826,7 +7998,7 @@ export declare const Menu: {
|
|
|
7826
7998
|
displayName: string;
|
|
7827
7999
|
};
|
|
7828
8000
|
Popover: {
|
|
7829
|
-
({ side, align, offset, target: targetProp, positioning, children, className, style, onKeyDown, onKeyDownCapture, onFocus, onPointerEnter, onPointerLeave, onPointerMove, onContextMenu, ref, ...rest }: MenuPopoverProps): JSX.Element | null;
|
|
8001
|
+
({ side, align, offset, target: targetProp, positioning, motion, children, className, style, onKeyDown, onKeyDownCapture, onFocus, onPointerEnter, onPointerLeave, onPointerMove, onContextMenu, ref, ...rest }: MenuPopoverProps): JSX.Element | null;
|
|
7830
8002
|
displayName: string;
|
|
7831
8003
|
};
|
|
7832
8004
|
ItemCheckbox: {
|
|
@@ -8288,16 +8460,23 @@ export declare interface MenuItemSwitchProps extends MenuItemProps, MenuItemSele
|
|
|
8288
8460
|
* the element focused at the gesture; it is not labelled by its region, so give it `aria-label`
|
|
8289
8461
|
* (development warning otherwise), as for a menu placed at a `target` without `Menu.Trigger`.
|
|
8290
8462
|
*
|
|
8291
|
-
*
|
|
8292
|
-
*
|
|
8293
|
-
*
|
|
8294
|
-
*
|
|
8295
|
-
*
|
|
8463
|
+
* It moves in and out: the surface fades in and slides 4px away from its trigger over 200 ms, and
|
|
8464
|
+
* fades out and slides back over 100 ms, on the side it opened on (`data-side`), so a submenu
|
|
8465
|
+
* slides out of its parent menu; a menu open by default animates in when it mounts in the
|
|
8466
|
+
* browser. Under reduced motion it appears and disappears at once. `motion` turns the motion off
|
|
8467
|
+
* (`null`) or replaces its classes, and a `WaveProvider` with `motion="none"` turns the default
|
|
8468
|
+
* off; a `className` with `data-[presence=…]` classes and no `motion` keeps 0.14's behaviour (your
|
|
8469
|
+
* classes, no default motion). The surface mounts through the presence core (`usePresence`): it
|
|
8470
|
+
* carries `data-presence="entering" | "entered" | "exiting"` and, while it closes,
|
|
8471
|
+
* `data-state="closed"` and `inert`, so it stays on screen, where it was, until its exit motion
|
|
8472
|
+
* ends. Focus, the dismiss layer and positioning follow the open state, not the exit: focus
|
|
8473
|
+
* inside a closing menu leaves it in the commit that closes it. Without motion it unmounts as
|
|
8474
|
+
* soon as it closes.
|
|
8296
8475
|
*
|
|
8297
8476
|
* Also exported as `MenuPopover` (import the flat name from React Server Components).
|
|
8298
8477
|
*/
|
|
8299
8478
|
export declare const MenuPopover: {
|
|
8300
|
-
({ side, align, offset, target: targetProp, positioning, children, className, style, onKeyDown, onKeyDownCapture, onFocus, onPointerEnter, onPointerLeave, onPointerMove, onContextMenu, ref, ...rest }: MenuPopoverProps): React_2.JSX.Element | null;
|
|
8479
|
+
({ side, align, offset, target: targetProp, positioning, motion, children, className, style, onKeyDown, onKeyDownCapture, onFocus, onPointerEnter, onPointerLeave, onPointerMove, onContextMenu, ref, ...rest }: MenuPopoverProps): React_2.JSX.Element | null;
|
|
8301
8480
|
displayName: string;
|
|
8302
8481
|
};
|
|
8303
8482
|
|
|
@@ -8335,6 +8514,19 @@ export declare interface MenuPopoverProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
8335
8514
|
* @default `{ fitViewport: true }`
|
|
8336
8515
|
*/
|
|
8337
8516
|
positioning?: PopupPositioning;
|
|
8517
|
+
/**
|
|
8518
|
+
* The menu's motion. By default it fades in and slides 4px away from its trigger, on the side
|
|
8519
|
+
* it opened on (a submenu away from its parent menu), over 200 ms with a decelerating curve, and
|
|
8520
|
+
* fades out and slides back over 100 ms with an accelerating curve; under reduced motion it
|
|
8521
|
+
* appears and disappears at once. `null` turns the motion off (the surface still renders its
|
|
8522
|
+
* `data-presence` phases, which then end at once); a class string or `{ className }` replaces
|
|
8523
|
+
* the default classes with yours (see `MotionSlot`), also under a `WaveProvider` with
|
|
8524
|
+
* `motion="none"`, which otherwise turns the default off. A `className` that holds
|
|
8525
|
+
* `data-[presence=…]` classes while `motion` is unset keeps 0.14's behaviour: no default motion,
|
|
8526
|
+
* your classes animate the surface. Fluent's `Menu` `surfaceMotion`.
|
|
8527
|
+
* @default the fade and slide above
|
|
8528
|
+
*/
|
|
8529
|
+
motion?: MotionSlot | null;
|
|
8338
8530
|
/** Menu items and dividers. */
|
|
8339
8531
|
children: React_2.ReactNode;
|
|
8340
8532
|
/**
|
|
@@ -8687,6 +8879,85 @@ export declare const messageBarClassNames: {
|
|
|
8687
8879
|
readonly dismissIcon: "wave-message-bar__dismiss-icon";
|
|
8688
8880
|
};
|
|
8689
8881
|
|
|
8882
|
+
/**
|
|
8883
|
+
* A stack of MessageBars that animates the bars it gains and loses, Fluent's MessageBarGroup with
|
|
8884
|
+
* its `animate` prop: a bar removed from the children fades out while its row closes, so the bars
|
|
8885
|
+
* below glide up instead of jumping (Fluent's bar only fades, and the bars below jump when it is
|
|
8886
|
+
* gone), and with `animate="both"` a bar added after mount opens its row and fades in.
|
|
8887
|
+
*
|
|
8888
|
+
* - **Keys.** Give every bar a stable `key` (`key={message.id}`): the group follows its children
|
|
8889
|
+
* by key, so it can keep a removed bar on screen during its exit, in its place, and move bars
|
|
8890
|
+
* that are reordered without replacing them. A removed bar that comes back during its exit is
|
|
8891
|
+
* shown again. A child without a key of its own, or text, renders after the bars as given,
|
|
8892
|
+
* without motion, with a development warning. Any keyed element animates; MessageBar is the
|
|
8893
|
+
* one the group is made for.
|
|
8894
|
+
* - **Motion.** Bars present at the group's first render (on the server too) never animate. Each
|
|
8895
|
+
* bar sits in an element of its own, which renders no box while the bar is shown, so the bars
|
|
8896
|
+
* are the stack's own items; while a bar enters or exits, that element clips it while its row
|
|
8897
|
+
* opens or closes. An exiting bar is `inert`. See `motion` for the default and how to replace
|
|
8898
|
+
* or turn it off; under `prefers-reduced-motion: reduce` a bar is added and removed at once.
|
|
8899
|
+
* - **Focus.** When a bar leaves with focus inside it (its Dismiss button was pressed), focus moves
|
|
8900
|
+
* in the same commit to the first tabbable element of the nearest bar after it that stays and
|
|
8901
|
+
* holds a tabbable element, else of the nearest such bar before it. When no such bar is left,
|
|
8902
|
+
* the app decides where focus goes.
|
|
8903
|
+
* - **Markup.** A plain `<div>` without a role stacking the bars with an 8px gap; each MessageBar
|
|
8904
|
+
* stays its own live region. MessageBarGroup is a component of its own rather than a part of
|
|
8905
|
+
* MessageBar, so a page that imports only MessageBar does not load the group's motion.
|
|
8906
|
+
*
|
|
8907
|
+
* @example
|
|
8908
|
+
* <MessageBarGroup animate="both">
|
|
8909
|
+
* {messages.map((message) => (
|
|
8910
|
+
* <MessageBar key={message.id} status={message.status} onDismiss={() => dismiss(message.id)}>
|
|
8911
|
+
* {message.text}
|
|
8912
|
+
* </MessageBar>
|
|
8913
|
+
* ))}
|
|
8914
|
+
* </MessageBarGroup>
|
|
8915
|
+
*/
|
|
8916
|
+
export declare const MessageBarGroup: {
|
|
8917
|
+
({ animate, motion, children, className, ref, ...rest }: MessageBarGroupProps): React_2.JSX.Element;
|
|
8918
|
+
displayName: string;
|
|
8919
|
+
};
|
|
8920
|
+
|
|
8921
|
+
/**
|
|
8922
|
+
* MessageBarGroup: `root` on the element that stacks the bars; `item` on the element around each
|
|
8923
|
+
* bar (the element its enter and exit run on).
|
|
8924
|
+
*/
|
|
8925
|
+
export declare const messageBarGroupClassNames: {
|
|
8926
|
+
readonly root: "wave-message-bar-group";
|
|
8927
|
+
readonly item: "wave-message-bar-group__item";
|
|
8928
|
+
};
|
|
8929
|
+
|
|
8930
|
+
/** Properties for the MessageBarGroup component. */
|
|
8931
|
+
export declare interface MessageBarGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
8932
|
+
/**
|
|
8933
|
+
* Which changes animate: `'exit-only'` (a bar removed from the children fades and collapses
|
|
8934
|
+
* out) or `'both'` (a bar added after mount also fades and slides in). Bars present at the
|
|
8935
|
+
* group's first render never animate. Fluent's `animate`. The root renders it as
|
|
8936
|
+
* `data-animate`.
|
|
8937
|
+
* @default 'exit-only'
|
|
8938
|
+
*/
|
|
8939
|
+
animate?: 'exit-only' | 'both';
|
|
8940
|
+
/**
|
|
8941
|
+
* Replaces the bars' motion (both directions); `null` turns it off. The motion is on the element
|
|
8942
|
+
* around each bar (`className` stays on the root). By default a removed bar fades out while its
|
|
8943
|
+
* row and its bottom margin close over 250 ms with the linear curve, so the bars after it glide
|
|
8944
|
+
* up and nothing jumps when it unmounts (the margin makes up for the group's 8px gap, so a
|
|
8945
|
+
* different gap in `className` needs a `motion` whose margin matches it); with
|
|
8946
|
+
* `animate="both"`, a bar added after mount opens its row and fades in the same way. Under
|
|
8947
|
+
* reduced motion bars appear and disappear at once. `null` turns the motion off (the element
|
|
8948
|
+
* still renders its `data-presence` phases, which then end at once); a class string or
|
|
8949
|
+
* `{ className }` replaces the default classes with yours (see `MotionSlot`), also under a
|
|
8950
|
+
* `WaveProvider` with `motion="none"`, which otherwise turns the default off. A WaveUI addition:
|
|
8951
|
+
* Fluent's MessageBarGroup has no motion slot (its bar only fades out).
|
|
8952
|
+
* @default the collapse and fade above
|
|
8953
|
+
*/
|
|
8954
|
+
motion?: MotionSlot | null;
|
|
8955
|
+
/** MessageBar elements, each with a stable `key`. */
|
|
8956
|
+
children?: React_2.ReactNode;
|
|
8957
|
+
/** Ref to the root `<div>`. */
|
|
8958
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
8959
|
+
}
|
|
8960
|
+
|
|
8690
8961
|
/** Properties for the MessageBar component. */
|
|
8691
8962
|
export declare interface MessageBarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
8692
8963
|
/** Status level controlling the color, icon, status text and role of the message bar.
|
|
@@ -8829,6 +9100,26 @@ export declare type ModalOpenChangeReason = 'trigger' | 'close' | 'close-button'
|
|
|
8829
9100
|
*/
|
|
8830
9101
|
export declare type ModalType = 'modal' | 'alert' | 'non-modal';
|
|
8831
9102
|
|
|
9103
|
+
/** Motion below a `WaveProvider`: `'default'`, or `'none'` (every motion slot acts as `null`). */
|
|
9104
|
+
export declare type MotionPreference = 'default' | 'none';
|
|
9105
|
+
|
|
9106
|
+
/**
|
|
9107
|
+
* Replaces a part's default motion (its `motion`, `backdropMotion`, `expandIconMotion` or
|
|
9108
|
+
* `indeterminateMotion` prop): a class string, or `{ className }`. `null` on the prop turns the
|
|
9109
|
+
* motion off and `undefined` keeps the default. On a part with presence phases (a surface, a
|
|
9110
|
+
* backdrop, a collapsing part, a toast, a bar of a MessageBarGroup), write the phases as the
|
|
9111
|
+
* default motion does: the enter's start with the starting variant gated on the entering phase
|
|
9112
|
+
* (`data-[presence=entering]:starting:…`), the exit with `data-[presence=exiting]:…`, and a
|
|
9113
|
+
* reduced-motion counterpart. The other parts (a Nav category's expand icon, ProgressBar's
|
|
9114
|
+
* indeterminate fill, TabList's selection line) have no phases: give them plain transition or
|
|
9115
|
+
* animation classes with a reduced-motion counterpart. The classes must exist in your CSS: the
|
|
9116
|
+
* precompiled stylesheet holds only Wave's own classes, so without Tailwind pass a class of your
|
|
9117
|
+
* own CSS (written against `[data-presence]` for a part with phases).
|
|
9118
|
+
*/
|
|
9119
|
+
export declare type MotionSlot = string | {
|
|
9120
|
+
className: string;
|
|
9121
|
+
};
|
|
9122
|
+
|
|
8832
9123
|
/**
|
|
8833
9124
|
* A vertical side navigation (`<nav>` landmark, default name "Navigation") with items, links and
|
|
8834
9125
|
* collapsible categories.
|
|
@@ -8854,9 +9145,14 @@ export declare type ModalType = 'modal' | 'alert' | 'non-modal';
|
|
|
8854
9145
|
* `href` or a button; it is never selected. `Nav.AppItemStatic` shows them as plain text.
|
|
8855
9146
|
* - **Item actions**: `actions` on `Nav.Item` and `Nav.SubItem` (Fluent's SplitNavItem) puts your
|
|
8856
9147
|
* own controls beside the item, in a group named by it; each is a Tab stop after the item, and
|
|
8857
|
-
* none selects it. They
|
|
8858
|
-
* has its menu open, and always on touch screens and in forced colours. With actions, a
|
|
8859
|
-
* item's background and indicator are drawn on its row (`.wave-nav-item__list-item`).
|
|
9148
|
+
* none selects it. They fade in while the row is hovered or has focus, while one is pressed or
|
|
9149
|
+
* has its menu open, and are always drawn on touch screens and in forced colours. With actions, a
|
|
9150
|
+
* selected item's background and indicator are drawn on its row (`.wave-nav-item__list-item`).
|
|
9151
|
+
* - **Motion**: a category's list opens and closes its space with a short collapse and fade
|
|
9152
|
+
* (`motion` on `Nav.Category`), its chevron's turn is animated (`expandIconMotion`) and item
|
|
9153
|
+
* actions fade in. None of these defaults runs under reduced motion, and a `WaveProvider` with
|
|
9154
|
+
* `motion="none"` turns them off, while a category's own `motion` or `expandIconMotion` value
|
|
9155
|
+
* still applies. Focus inside a list that closes moves to its category's toggle button.
|
|
8860
9156
|
*
|
|
8861
9157
|
* Sub-components are also exported under flat names (`NavCategory`, `NavItem`, `NavSubItem`,
|
|
8862
9158
|
* `NavSectionHeader`, `NavDivider`, `NavAppItem`, `NavAppItemStatic`): React Server Components
|
|
@@ -8867,7 +9163,7 @@ export declare const Nav: {
|
|
|
8867
9163
|
displayName: string;
|
|
8868
9164
|
} & {
|
|
8869
9165
|
Category: {
|
|
8870
|
-
({ value, label, icon, className, children, ref, ...rest }: NavCategoryProps): React_2.JSX.Element;
|
|
9166
|
+
({ value, label, icon, expandIcon, expandIconMotion, motion, className, children, ref, ...rest }: NavCategoryProps): React_2.JSX.Element;
|
|
8871
9167
|
displayName: string;
|
|
8872
9168
|
};
|
|
8873
9169
|
Item: typeof NavItem;
|
|
@@ -9007,8 +9303,19 @@ export declare interface NavAppItemStaticProps extends React_2.HTMLAttributes<HT
|
|
|
9007
9303
|
|
|
9008
9304
|
/**
|
|
9009
9305
|
* A collapsible group of sub-items. Its toggle button shows `label` and reports `aria-expanded`
|
|
9010
|
-
* (and `aria-controls` while open); the sub-items render in a nested list while it is open
|
|
9011
|
-
* Open state lives on `Nav`
|
|
9306
|
+
* (and `aria-controls` while open); the sub-items render in a nested list while it is open and
|
|
9307
|
+
* while the list collapses after a close. Open state lives on `Nav`
|
|
9308
|
+
* (`openCategories`/`defaultOpenCategories`).
|
|
9309
|
+
*
|
|
9310
|
+
* The list renders as the only child of a collapse element (its stable class
|
|
9311
|
+
* `wave-nav-category__collapse`), which opens and closes the list's space (`motion`) and has no
|
|
9312
|
+
* box of its own while the category is open, so the list lays out in the category as before. A
|
|
9313
|
+
* category open by default appears without motion. After a close the list stays in the document
|
|
9314
|
+
* until the collapse ends, `inert` (its items leave the Tab order and an arrow-key body's arrow
|
|
9315
|
+
* keys at once), while the toggle button already reports the category closed, without
|
|
9316
|
+
* `aria-controls`; opening the category again during the collapse keeps the same list. Focus
|
|
9317
|
+
* inside the list when the category closes moves to the toggle button. The expand chevron turns
|
|
9318
|
+
* while the category is open (`expandIcon` replaces it, `expandIconMotion` animates its turn).
|
|
9012
9319
|
*
|
|
9013
9320
|
* A closed category that contains the current item marks its toggle button with
|
|
9014
9321
|
* `aria-current="true"` (the button is not the page's link, so not `"page"`),
|
|
@@ -9021,14 +9328,15 @@ export declare interface NavAppItemStaticProps extends React_2.HTMLAttributes<HT
|
|
|
9021
9328
|
* Also exported as `NavCategory` (import the flat name from React Server Components).
|
|
9022
9329
|
*/
|
|
9023
9330
|
export declare const NavCategory: {
|
|
9024
|
-
({ value, label, icon, className, children, ref, ...rest }: NavCategoryProps): React_2.JSX.Element;
|
|
9331
|
+
({ value, label, icon, expandIcon, expandIconMotion, motion, className, children, ref, ...rest }: NavCategoryProps): React_2.JSX.Element;
|
|
9025
9332
|
displayName: string;
|
|
9026
9333
|
};
|
|
9027
9334
|
|
|
9028
9335
|
/**
|
|
9029
9336
|
* Nav.Category: `root` on its `<li>`; `button` on the toggle button; `icon` on the icon span;
|
|
9030
|
-
* `label` on the label span; `expandIcon` on the chevron `<svg
|
|
9031
|
-
* sub-items
|
|
9337
|
+
* `label` on the label span; `expandIcon` on the chevron `<svg>` (or on the span of your
|
|
9338
|
+
* `expandIcon`); `list` on the `<ul>` of its sub-items; `collapse` on the element around that
|
|
9339
|
+
* list (the element that opens and closes the list's space, 0.15).
|
|
9032
9340
|
*/
|
|
9033
9341
|
export declare const navCategoryClassNames: {
|
|
9034
9342
|
readonly root: "wave-nav-category";
|
|
@@ -9037,6 +9345,7 @@ export declare const navCategoryClassNames: {
|
|
|
9037
9345
|
readonly label: "wave-nav-category__label";
|
|
9038
9346
|
readonly expandIcon: "wave-nav-category__expand-icon";
|
|
9039
9347
|
readonly list: "wave-nav-category__list";
|
|
9348
|
+
readonly collapse: "wave-nav-category__collapse";
|
|
9040
9349
|
};
|
|
9041
9350
|
|
|
9042
9351
|
/** Properties for the NavCategory sub-component. */
|
|
@@ -9056,9 +9365,42 @@ export declare interface NavCategoryProps extends React_2.HTMLAttributes<HTMLLIE
|
|
|
9056
9365
|
* (`''`, `0`) or a list of nothing renders no icon box.
|
|
9057
9366
|
*/
|
|
9058
9367
|
icon?: Slot<'span'>;
|
|
9368
|
+
/**
|
|
9369
|
+
* Replaces the expand chevron at the end of the toggle button (decorative, `aria-hidden`).
|
|
9370
|
+
* `null`/`undefined` keep the chevron, which turns while the category is open; `false`, or
|
|
9371
|
+
* anything that renders nothing, hides it (`aria-expanded` still reports the state). Your glyph
|
|
9372
|
+
* renders as given in a span with the expand icon's class and is not turned, so a glyph that
|
|
9373
|
+
* shows the state itself works (a plus or a minus, picked from your `openCategories`). It is
|
|
9374
|
+
* rendered inside the toggle button: a `<button>` or `Button` passed here (or a slot object
|
|
9375
|
+
* whose `as` is one) is not nested (its children become the glyph and its props are dropped,
|
|
9376
|
+
* with a development warning).
|
|
9377
|
+
*/
|
|
9378
|
+
expandIcon?: Slot<'span'>;
|
|
9379
|
+
/**
|
|
9380
|
+
* Replaces the motion of the expand icon (Fluent's `NavCategoryItem expandIconMotion`): by
|
|
9381
|
+
* default the chevron's half turn as the category opens and closes is animated over the fast
|
|
9382
|
+
* duration (150 ms) with the easy-ease curve, both ways, and so is any transform of the span
|
|
9383
|
+
* around your own `expandIcon`. The turn itself is not motion: `null` turns the animation off
|
|
9384
|
+
* and the chevron still turns, at once; a class string or `{ className }` replaces it with
|
|
9385
|
+
* plain transition classes and a reduced-motion counterpart (the icon has no presence phases).
|
|
9386
|
+
* A `WaveProvider` with `motion="none"` turns the default off, and a value here still applies
|
|
9387
|
+
* under it.
|
|
9388
|
+
* @default the animated turn described above
|
|
9389
|
+
*/
|
|
9390
|
+
expandIconMotion?: MotionSlot | null;
|
|
9391
|
+
/**
|
|
9392
|
+
* Replaces the collapse of the category's list (Fluent's `NavSubItemGroup collapseMotion`), on
|
|
9393
|
+
* the element around its `<ul>`: by default the space the list takes opens from nothing and
|
|
9394
|
+
* closes back to it, with a fade, over the normal duration (200 ms) with the max easy-ease
|
|
9395
|
+
* curve, both ways. `null` turns it off (the list appears and disappears at once); a class
|
|
9396
|
+
* string or `{ className }` replaces it, written as `MotionSlot` describes. A `WaveProvider`
|
|
9397
|
+
* with `motion="none"` turns the default off, and a value here still applies under it.
|
|
9398
|
+
* @default the collapse described above
|
|
9399
|
+
*/
|
|
9400
|
+
motion?: MotionSlot | null;
|
|
9059
9401
|
/**
|
|
9060
9402
|
* The category's sub-items (`Nav.SubItem`), and `Nav.SectionHeader` and `Nav.Divider`, rendered
|
|
9061
|
-
* in its list while it is open.
|
|
9403
|
+
* in its list while it is open (and while the list collapses after a close).
|
|
9062
9404
|
*/
|
|
9063
9405
|
children?: React_2.ReactNode;
|
|
9064
9406
|
/** Ref to the category's `<li>` element. */
|
|
@@ -9113,6 +9455,16 @@ export declare interface NavDividerProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
9113
9455
|
* when an item is chosen is yours, in `onItemSelect`, which also fires when the current page is
|
|
9114
9456
|
* activated again. A non-modal overlay (`modalType="non-modal"`) covers the page, which keeps
|
|
9115
9457
|
* its Tab order: keep the page's controls clear of it, or use `type="inline"`.
|
|
9458
|
+
* - **Motion:** an overlay slides in from its edge and fades in, and slides back and fades out,
|
|
9459
|
+
* over 250 ms (`small`, the default), 300 ms (`medium`), 400 ms (`large`) or 500 ms (`full`),
|
|
9460
|
+
* with its backdrop fading along; one open by default animates in when it mounts in the browser.
|
|
9461
|
+
* An inline drawer opens and closes the space it takes in the layout over the same durations,
|
|
9462
|
+
* in an element of its own around the panel (`wave-nav-drawer__collapse`, which has no box
|
|
9463
|
+
* while open); one open by default does not animate in, and one at `full` has no motion. Under
|
|
9464
|
+
* reduced motion every drawer appears and disappears at once. `motion` and `backdropMotion`
|
|
9465
|
+
* turn each off (`null`) or replace it, and `WaveProvider motion="none"` turns both defaults
|
|
9466
|
+
* off. While it exits the panel stays on screen, `inert`, and focus, the trap and the scroll
|
|
9467
|
+
* lock are already released.
|
|
9116
9468
|
* - **Focus:** pass your page's Hamburger as `finalFocusRef`, so focus returns to it when a
|
|
9117
9469
|
* Hamburger inside the drawer closes it. An overlay moves focus in when it opens; an inline
|
|
9118
9470
|
* drawer does not.
|
|
@@ -9155,7 +9507,7 @@ export declare interface NavDividerProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
9155
9507
|
* </NavDrawer>
|
|
9156
9508
|
*/
|
|
9157
9509
|
export declare const NavDrawer: {
|
|
9158
|
-
({ type, open: openProp, defaultOpen, onOpenChange, onItemSelect, position, size, separator, modalType: modalTypeProp, unmountOnClose, finalFocusRef, backdrop, value, defaultValue, onValueChange, openCategories, defaultOpenCategories, onOpenCategoriesChange, currentCategory, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, id, children, ref, ...rest }: NavDrawerProps): React_2.JSX.Element;
|
|
9510
|
+
({ type, open: openProp, defaultOpen, onOpenChange, onItemSelect, position, size, separator, modalType: modalTypeProp, unmountOnClose, finalFocusRef, backdrop, motion, backdropMotion, value, defaultValue, onValueChange, openCategories, defaultOpenCategories, onOpenCategoriesChange, currentCategory, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, id, children, ref, ...rest }: NavDrawerProps): React_2.JSX.Element;
|
|
9159
9511
|
displayName: string;
|
|
9160
9512
|
} & {
|
|
9161
9513
|
Header: {
|
|
@@ -9210,13 +9562,15 @@ export declare interface NavDrawerBodyProps extends React_2.HTMLAttributes<HTMLD
|
|
|
9210
9562
|
|
|
9211
9563
|
/**
|
|
9212
9564
|
* NavDrawer (a Drawer variant: it also carries Drawer's root, and its backdrop Drawer's backdrop
|
|
9213
|
-
* class): `root` on the panel (the portaled
|
|
9214
|
-
*
|
|
9215
|
-
*
|
|
9565
|
+
* class, and its collapse element Drawer's collapse class): `root` on the panel (the portaled
|
|
9566
|
+
* `role="dialog"` element of an overlay drawer, the panel element of an inline one); `backdrop` on
|
|
9567
|
+
* the backdrop of a modal overlay; `collapse` on the element around an inline drawer's panel;
|
|
9568
|
+
* `nav` on the navigation landmark that fills the panel.
|
|
9216
9569
|
*/
|
|
9217
9570
|
export declare const navDrawerClassNames: {
|
|
9218
9571
|
readonly root: "wave-nav-drawer";
|
|
9219
9572
|
readonly backdrop: "wave-nav-drawer__backdrop";
|
|
9573
|
+
readonly collapse: "wave-nav-drawer__collapse";
|
|
9220
9574
|
readonly nav: "wave-nav-drawer__nav";
|
|
9221
9575
|
};
|
|
9222
9576
|
|
|
@@ -9316,7 +9670,10 @@ export declare interface NavDrawerProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
9316
9670
|
* The panel's width at a side (its height at the bottom), on Drawer's scale: `small` 320px,
|
|
9317
9671
|
* `medium` 592px, `large` 940px, `full` the viewport (inline: the container). A width class in
|
|
9318
9672
|
* `className` replaces it (Fluent's navigation pane is 260px wide: the width class of 65
|
|
9319
|
-
* spacing steps).
|
|
9673
|
+
* spacing steps). It also times the motion, an overlay's slide and an inline drawer's collapse
|
|
9674
|
+
* alike: 250 ms small, 300 ms medium, 400 ms large, 500 ms full (an inline drawer at `full` has
|
|
9675
|
+
* no motion; see `motion`), so a drawer without `size` takes 250 ms whatever width a class gives
|
|
9676
|
+
* it. Rendered as `data-size`. Drawer's default too.
|
|
9320
9677
|
* @default 'small'
|
|
9321
9678
|
*/
|
|
9322
9679
|
size?: DrawerSize;
|
|
@@ -9340,11 +9697,11 @@ export declare interface NavDrawerProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
9340
9697
|
*/
|
|
9341
9698
|
modalType?: Extract<ModalType, 'modal' | 'non-modal'>;
|
|
9342
9699
|
/**
|
|
9343
|
-
* Removes the panel when the drawer closes. `false` keeps it
|
|
9344
|
-
* and `inert`, so the state of what is inside survives, and a
|
|
9345
|
-
* `aria-controls` at it at all times: always for an inline drawer,
|
|
9346
|
-
* hydrated for an overlay (whose panel is not in the server HTML).
|
|
9347
|
-
* Drawer's default too.
|
|
9700
|
+
* Removes the panel when the drawer closes, once its exit motion has ended. `false` keeps it
|
|
9701
|
+
* mounted while closed, out of view and `inert`, so the state of what is inside survives, and a
|
|
9702
|
+
* Hamburger outside can point `aria-controls` at it at all times: always for an inline drawer,
|
|
9703
|
+
* and once the page has hydrated for an overlay (whose panel is not in the server HTML).
|
|
9704
|
+
* Fluent's `unmountOnClose`. Drawer's default too.
|
|
9348
9705
|
* @default true
|
|
9349
9706
|
*/
|
|
9350
9707
|
unmountOnClose?: boolean;
|
|
@@ -9362,6 +9719,43 @@ export declare interface NavDrawerProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
9362
9719
|
backdrop?: Slot<'div'> | (SlotObject<'div'> & {
|
|
9363
9720
|
appearance?: BackdropAppearance;
|
|
9364
9721
|
});
|
|
9722
|
+
/**
|
|
9723
|
+
* The drawer's motion, as Drawer's. By default an overlay panel slides in from beyond its edge
|
|
9724
|
+
* and fades in with a decelerating curve, and slides back out and fades out with an accelerating
|
|
9725
|
+
* curve; the `start` and `end` edges follow the text direction, `left` and `right` do not
|
|
9726
|
+
* mirror, and a `bottom` panel rises from below. An inline drawer by default opens the space it
|
|
9727
|
+
* takes in your layout from nothing (its width at a side, its height at the bottom) while its
|
|
9728
|
+
* panel fades in, held at its size against its inner edge, so it reads as sliding out from that
|
|
9729
|
+
* edge, with a decelerating curve; closing runs the same backwards with an accelerating curve.
|
|
9730
|
+
* Both take a duration that follows `size` both ways: 250 ms small (also without `size`), 300 ms
|
|
9731
|
+
* medium, 400 ms large, 500 ms full. An inline drawer at `full` has no motion, as its size is
|
|
9732
|
+
* its container's (a value here does not apply to it either), and an inline drawer whose width
|
|
9733
|
+
* (height at the bottom) in `className` is a percentage resizes oddly during the motion,
|
|
9734
|
+
* correctly once open: give it a length, or pass `null`. Under reduced motion the drawer appears
|
|
9735
|
+
* and disappears at once. `null` turns the motion off (the drawer still renders its
|
|
9736
|
+
* `data-presence` phases, which then end at once); a class string or `{ className }` replaces
|
|
9737
|
+
* the default classes with yours (see `MotionSlot`), also under a `WaveProvider` with
|
|
9738
|
+
* `motion="none"`, which otherwise turns the default off. They go on the overlay panel, or on
|
|
9739
|
+
* the element around an inline drawer's panel (`wave-nav-drawer__collapse`), whose phases the
|
|
9740
|
+
* drawer waits for. A `className` that holds `data-[presence=…]` classes while `motion` is unset
|
|
9741
|
+
* keeps 0.14's behaviour: no default motion, your classes animate the panel, and the drawer
|
|
9742
|
+
* waits for the panel's motion (inline too, not the element around it). Fluent's
|
|
9743
|
+
* `OverlayDrawer` and `InlineDrawer` `surfaceMotion`.
|
|
9744
|
+
* @default the slide (overlay) or the collapse (inline) above
|
|
9745
|
+
*/
|
|
9746
|
+
motion?: MotionSlot | null;
|
|
9747
|
+
/**
|
|
9748
|
+
* The backdrop's motion (a modal overlay), as Drawer's. By default it fades in and out with a
|
|
9749
|
+
* linear curve over the panel's duration (250 to 500 ms, by `size`), so it ends with the panel;
|
|
9750
|
+
* under reduced motion it appears and disappears at once. `null` turns the motion off; a class
|
|
9751
|
+
* string or `{ className }` replaces the default classes with yours (see `MotionSlot`), also
|
|
9752
|
+
* under a `WaveProvider` with `motion="none"`, which otherwise turns the default off. The
|
|
9753
|
+
* panel's motion decides when the drawer unmounts or hides: a replacement longer than the
|
|
9754
|
+
* panel's exit is cut off there. Ignored, with a development warning, by a non-modal or inline
|
|
9755
|
+
* drawer. Fluent's `OverlayDrawer` `backdropMotion`.
|
|
9756
|
+
* @default the fade above
|
|
9757
|
+
*/
|
|
9758
|
+
backdropMotion?: MotionSlot | null;
|
|
9365
9759
|
/**
|
|
9366
9760
|
* Name of the navigation landmark (and of an overlay's dialog). Localize it; rename it when the
|
|
9367
9761
|
* page has another navigation landmark (two with one name are ambiguous). An `aria-labelledby`
|
|
@@ -9491,11 +9885,14 @@ export declare interface NavItemOwnProps {
|
|
|
9491
9885
|
* never inside it, in a group named by the item; each is a Tab stop after the item, and a click
|
|
9492
9886
|
* or key on one never selects the item. They are drawn while the row is hovered or has focus,
|
|
9493
9887
|
* while one of them is pressed or has its popup open, and always in forced colours and on touch
|
|
9494
|
-
* screens; otherwise they are transparent and still focusable. They
|
|
9495
|
-
*
|
|
9496
|
-
*
|
|
9497
|
-
*
|
|
9498
|
-
*
|
|
9888
|
+
* screens; otherwise they are transparent and still focusable. They fade in and out over 150 ms
|
|
9889
|
+
* (at once under reduced motion or a `WaveProvider` with `motion="none"`); the fade sets the
|
|
9890
|
+
* transition of each direct child of the group, so a transition of your own on one is replaced.
|
|
9891
|
+
* They stay enabled when the item is `disabled`. With actions, the selected background and
|
|
9892
|
+
* indicator are drawn on the row (the item's list item, `.wave-nav-item__list-item`), so a
|
|
9893
|
+
* `className` on the item no longer covers them. Content that renders nothing renders no group.
|
|
9894
|
+
* Fluent's `actionButton`, `toggleButton` and `menuButton` slots and their tooltips are your own
|
|
9895
|
+
* controls here.
|
|
9499
9896
|
*/
|
|
9500
9897
|
actions?: React_2.ReactNode;
|
|
9501
9898
|
}
|
|
@@ -10448,6 +10845,8 @@ export declare type PolymorphicProps<C extends React_2.ElementType, OwnProps> =
|
|
|
10448
10845
|
* moving into the content). Name the content with `title` or `aria-label`.
|
|
10449
10846
|
* - **Custom anchors:** `target` places it at another element or at a `VirtualElement` (a point, a
|
|
10450
10847
|
* text selection); with a controlled `open` it needs no trigger.
|
|
10848
|
+
* - **Motion:** the content fades and slides in from its trigger and back out as it closes;
|
|
10849
|
+
* `Popover.Content`'s `motion` turns it off or replaces it.
|
|
10451
10850
|
*
|
|
10452
10851
|
* @example
|
|
10453
10852
|
* <Popover>
|
|
@@ -10464,7 +10863,7 @@ export declare const Popover: {
|
|
|
10464
10863
|
displayName: string;
|
|
10465
10864
|
};
|
|
10466
10865
|
Content: {
|
|
10467
|
-
({ children, title, id: idProp, className, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown, onContextMenu, onPointerEnter, onPointerLeave, ref, ...rest }: PopoverContentProps): React_2.JSX.Element | null;
|
|
10866
|
+
({ children, title, id: idProp, className, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown, onContextMenu, onPointerEnter, onPointerLeave, motion, ref, ...rest }: PopoverContentProps): React_2.JSX.Element | null;
|
|
10468
10867
|
displayName: string;
|
|
10469
10868
|
};
|
|
10470
10869
|
};
|
|
@@ -10497,11 +10896,25 @@ export declare const Popover: {
|
|
|
10497
10896
|
* `target` it is placed at the target and, without a trigger, follows a target element in the
|
|
10498
10897
|
* keyboard order.
|
|
10499
10898
|
*
|
|
10899
|
+
* It moves in and out: the surface fades in and slides 4px away from its trigger over 200 ms, and
|
|
10900
|
+
* fades out and slides back over 100 ms, on the side it opened on (`data-side`); a popover open by
|
|
10901
|
+
* default animates in when it mounts in the browser. Under reduced motion it appears and
|
|
10902
|
+
* disappears at once. `motion` turns the motion off (`null`) or replaces its classes, and a
|
|
10903
|
+
* `WaveProvider` with `motion="none"` turns the default off. The surface mounts through the
|
|
10904
|
+
* presence core (`usePresence`): it carries `data-presence="entering" | "entered" | "exiting"` and
|
|
10905
|
+
* `data-state="open"`, and while it closes `data-state="closed"` and `inert`, so it stays on
|
|
10906
|
+
* screen, where it was, until its exit motion ends. Focus, the dismiss layer, the trigger's
|
|
10907
|
+
* `aria-expanded` and `aria-controls`, and positioning follow the open state, not the exit: focus
|
|
10908
|
+
* inside a closing popover moves, in the commit that closes it, to where the popover returns
|
|
10909
|
+
* focus (so a Dialog opened by a button of the popover as it closes returns focus there too, not
|
|
10910
|
+
* to that button), and a hover close moves no focus. Without motion it unmounts as soon as it
|
|
10911
|
+
* closes.
|
|
10912
|
+
*
|
|
10500
10913
|
* Also exported as `PopoverContent` for React Server Components, which cannot use the dotted
|
|
10501
10914
|
* `Popover.Content` (that needs a client file).
|
|
10502
10915
|
*/
|
|
10503
10916
|
export declare const PopoverContent: {
|
|
10504
|
-
({ children, title, id: idProp, className, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown, onContextMenu, onPointerEnter, onPointerLeave, ref, ...rest }: PopoverContentProps): React_2.JSX.Element | null;
|
|
10917
|
+
({ children, title, id: idProp, className, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onKeyDown, onContextMenu, onPointerEnter, onPointerLeave, motion, ref, ...rest }: PopoverContentProps): React_2.JSX.Element | null;
|
|
10505
10918
|
displayName: string;
|
|
10506
10919
|
};
|
|
10507
10920
|
|
|
@@ -10527,6 +10940,17 @@ export declare interface PopoverContentProps extends Omit<React_2.HTMLAttributes
|
|
|
10527
10940
|
title?: React_2.ReactNode;
|
|
10528
10941
|
/** Id of the surface; the trigger's `aria-controls` follows it. Defaults to a generated id. */
|
|
10529
10942
|
id?: string;
|
|
10943
|
+
/**
|
|
10944
|
+
* The popover's motion. By default it fades in and slides 4px away from its trigger, on the
|
|
10945
|
+
* side it opened on, over 200 ms with a decelerating curve, and fades out and slides back over
|
|
10946
|
+
* 100 ms with an accelerating curve; under reduced motion it appears and disappears at once.
|
|
10947
|
+
* `null` turns the motion off (the surface still renders its `data-presence` phases, which then
|
|
10948
|
+
* end at once); a class string or `{ className }` replaces the default classes with yours (see
|
|
10949
|
+
* `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns the
|
|
10950
|
+
* default off. Fluent's `Popover` `surfaceMotion`.
|
|
10951
|
+
* @default the fade and slide above
|
|
10952
|
+
*/
|
|
10953
|
+
motion?: MotionSlot | null;
|
|
10530
10954
|
/** Ref to the popover surface. */
|
|
10531
10955
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
10532
10956
|
}
|
|
@@ -10961,7 +11385,8 @@ export declare type PresenceStatus = 'available' | 'busy' | 'away' | 'offline' |
|
|
|
10961
11385
|
* a Field's wrapper element, the bar gets an id of its own and leaves the Field's
|
|
10962
11386
|
* `<label htmlFor>` to that control.
|
|
10963
11387
|
* - The indeterminate animation follows the writing direction and becomes a full-width pulse for
|
|
10964
|
-
* reduced motion. In forced-colors mode the fill
|
|
11388
|
+
* reduced motion; `indeterminateMotion` replaces or removes it. In forced-colors mode the fill
|
|
11389
|
+
* uses `Highlight` and the track gets a border.
|
|
10965
11390
|
*
|
|
10966
11391
|
* @example
|
|
10967
11392
|
* <ProgressBar value={uploaded} max={total} label="Uploading photos" showLabel />
|
|
@@ -10972,7 +11397,7 @@ export declare type PresenceStatus = 'available' | 'busy' | 'away' | 'offline' |
|
|
|
10972
11397
|
* </Field>
|
|
10973
11398
|
*/
|
|
10974
11399
|
export declare const ProgressBar: {
|
|
10975
|
-
({ value, max, label, showLabel, color, id, "aria-describedby": ariaDescribedBy, "aria-invalid": _ariaInvalid, "aria-required": _ariaRequired, className, ref, ...rest }: ProgressBarProps): React_2.JSX.Element;
|
|
11400
|
+
({ value, max, label, showLabel, color, indeterminateMotion, id, "aria-describedby": ariaDescribedBy, "aria-invalid": _ariaInvalid, "aria-required": _ariaRequired, className, ref, ...rest }: ProgressBarProps): React_2.JSX.Element;
|
|
10976
11401
|
displayName: string;
|
|
10977
11402
|
};
|
|
10978
11403
|
|
|
@@ -11026,6 +11451,19 @@ export declare interface ProgressBarProps extends React_2.HTMLAttributes<HTMLDiv
|
|
|
11026
11451
|
* @default 'brand'
|
|
11027
11452
|
*/
|
|
11028
11453
|
color?: ProgressBarColor;
|
|
11454
|
+
/**
|
|
11455
|
+
* Replaces the motion of the indeterminate fill (no `value`): by default a fill two fifths of
|
|
11456
|
+
* the track wide sweeps across it, mirrored in right-to-left, and becomes a full-width pulse
|
|
11457
|
+
* for reduced motion. The classes go on the fill and replace the whole default, its width and
|
|
11458
|
+
* its reduced-motion counterparts included. `null` draws a static full-width fill; a class
|
|
11459
|
+
* string or `{ className }` replaces the classes with plain animation classes (and a width) and
|
|
11460
|
+
* their reduced-motion counterparts (the fill has no presence phases). A
|
|
11461
|
+
* `WaveProvider` with `motion="none"` turns the default off (a static full-width fill), and a
|
|
11462
|
+
* value here still applies under it. A determinate bar has no motion and ignores it. Fluent's
|
|
11463
|
+
* ProgressBar `indeterminateMotion` takes a motion slot the same way.
|
|
11464
|
+
* @default the sweep described above
|
|
11465
|
+
*/
|
|
11466
|
+
indeterminateMotion?: MotionSlot | null;
|
|
11029
11467
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
11030
11468
|
}
|
|
11031
11469
|
|
|
@@ -13430,15 +13868,20 @@ export declare interface TableSelectionCellProps extends Omit<React_2.TdHTMLAttr
|
|
|
13430
13868
|
* a Panel that ends up inside the tablist). Content that is not a tab, such as a button next to
|
|
13431
13869
|
* the tabs, does not belong in a tablist either: render it outside the TabList.
|
|
13432
13870
|
*
|
|
13871
|
+
* In the `transparent` appearance the selected tab draws its line with its after pseudo-element,
|
|
13872
|
+
* over a transparent 2px border on its bottom edge (its start edge when vertical), so the tab keeps
|
|
13873
|
+
* the box it has without the line; a class that recolours the line targets that pseudo-element's
|
|
13874
|
+
* border. When the selection moves, the line slides from the tab selected before (`motion`).
|
|
13875
|
+
*
|
|
13433
13876
|
* Sub-components are also exported under flat names (`TabListTab`, `TabListPanel`,
|
|
13434
13877
|
* `TabListPanels`) for React Server Components, which cannot use the dotted form.
|
|
13435
13878
|
*/
|
|
13436
13879
|
export declare const TabList: {
|
|
13437
|
-
({ value: valueProp, defaultValue: defaultValueProp, onValueChange, orientation: orientationProp, appearance, size, selectTabOnFocus, selectedValue, defaultSelectedValue, onTabSelect, vertical, className, children, onKeyDown, onFocus, ref, ...rest }: TabListProps): React_2.JSX.Element;
|
|
13880
|
+
({ value: valueProp, defaultValue: defaultValueProp, onValueChange, orientation: orientationProp, appearance, size, selectTabOnFocus, motion, selectedValue, defaultSelectedValue, onTabSelect, vertical, className, children, onKeyDown, onFocus, ref, ...rest }: TabListProps): React_2.JSX.Element;
|
|
13438
13881
|
displayName: string;
|
|
13439
13882
|
} & {
|
|
13440
13883
|
Tab: {
|
|
13441
|
-
({ value, id: idProp, icon, className, children, onClick, ref, ...rest }: TabProps): React_2.JSX.Element;
|
|
13884
|
+
({ value, id: idProp, icon, className, style, children, onClick, ref, ...rest }: TabProps): React_2.JSX.Element;
|
|
13442
13885
|
displayName: string;
|
|
13443
13886
|
};
|
|
13444
13887
|
Panel: {
|
|
@@ -13537,6 +13980,22 @@ export declare interface TabListProps extends Omit<React_2.HTMLAttributes<HTMLDi
|
|
|
13537
13980
|
* @default true
|
|
13538
13981
|
*/
|
|
13539
13982
|
selectTabOnFocus?: boolean;
|
|
13983
|
+
/**
|
|
13984
|
+
* Replaces the slide of the selected tab's line in the `transparent` appearance (the other
|
|
13985
|
+
* appearances have no line and do not move): by default, when the selection moves, the line
|
|
13986
|
+
* slides and stretches from the tab selected before to the new one, over the slow duration
|
|
13987
|
+
* (300 ms) with the max decelerating curve. The classes go on the selected tab and time its
|
|
13988
|
+
* line, the tab's after pseudo-element (write them with the after variant, and a reduced-motion
|
|
13989
|
+
* counterpart); the line starts from the previous tab through two custom properties the
|
|
13990
|
+
* TabList writes for one frame. `null` turns the slide off (the line moves at once); a class
|
|
13991
|
+
* string or `{ className }` replaces the classes with plain transition classes for the line, as
|
|
13992
|
+
* above (it has no presence phases). A
|
|
13993
|
+
* `WaveProvider` with `motion="none"` turns the default off, and a value here still applies
|
|
13994
|
+
* under it. The line also moves at once while the user prefers reduced motion. Fluent's
|
|
13995
|
+
* TabList slides its indicator with no prop to turn it off: this prop is a WaveUI addition.
|
|
13996
|
+
* @default the slide described above
|
|
13997
|
+
*/
|
|
13998
|
+
motion?: MotionSlot | null;
|
|
13540
13999
|
/** @deprecated Use `value`. */
|
|
13541
14000
|
selectedValue?: string;
|
|
13542
14001
|
/** @deprecated Use `defaultValue`. */
|
|
@@ -13560,7 +14019,7 @@ export declare interface TabListProps extends Omit<React_2.HTMLAttributes<HTMLDi
|
|
|
13560
14019
|
* with its value is mounted.
|
|
13561
14020
|
*/
|
|
13562
14021
|
export declare const TabListTab: {
|
|
13563
|
-
({ value, id: idProp, icon, className, children, onClick, ref, ...rest }: TabProps): React_2.JSX.Element;
|
|
14022
|
+
({ value, id: idProp, icon, className, style, children, onClick, ref, ...rest }: TabProps): React_2.JSX.Element;
|
|
13564
14023
|
displayName: string;
|
|
13565
14024
|
};
|
|
13566
14025
|
|
|
@@ -14610,8 +15069,11 @@ export declare type TagSize = Extract<Size, 'extra-small' | 'small' | 'medium'>;
|
|
|
14610
15069
|
* `TeachingPopover.Trigger`)/`onOpenChange`; Close, Done, Escape (anywhere in the document) and
|
|
14611
15070
|
* the Trigger dismiss it and call `onDismiss`.
|
|
14612
15071
|
* - The step is controllable with `activeStep`/`defaultActiveStep`/`onStepChange` and clamped to
|
|
14613
|
-
* the available steps.
|
|
14614
|
-
*
|
|
15072
|
+
* the available steps. An uncontrolled step starts again at `defaultActiveStep` each time the
|
|
15073
|
+
* popover opens, so a tour finished with Done or closed midway starts over (`onStepChange`
|
|
15074
|
+
* reports the move back); a controlled `activeStep` is left as it is. The heading carries a
|
|
15075
|
+
* visually hidden “step n of m”, the new step is announced politely, and Back stays focusable
|
|
15076
|
+
* (`aria-disabled`) on the first step.
|
|
14615
15077
|
* - `primaryAction` and `secondaryAction` (on the popover, or on a step, which wins) replace Next/Done
|
|
14616
15078
|
* and Back: a label, a Button-like element or a slot object. The consumer's `onClick` runs first,
|
|
14617
15079
|
* then the step's normal action unless it called `preventDefault()`. Done calls `onFinish`
|
|
@@ -14635,6 +15097,19 @@ export declare type TagSize = Extract<Size, 'extra-small' | 'small' | 'medium'>;
|
|
|
14635
15097
|
* With no control at or before the target, the popover is reached where it is portaled, at the
|
|
14636
15098
|
* end of the page: Tab from the page's last control and Shift+Tab from outside the page enter
|
|
14637
15099
|
* it.
|
|
15100
|
+
* - **Motion.** The surface fades in over 200 ms and out over 100 ms as it closes; pointed at a
|
|
15101
|
+
* target (or the Trigger) it also slides 4px away from it on the side it opened on
|
|
15102
|
+
* (`data-side`), and back. Under reduced motion it appears and disappears at once. `motion` (on
|
|
15103
|
+
* TeachingPopover for the surface it renders, or on `TeachingPopover.Surface`) turns it off
|
|
15104
|
+
* (`null`) or replaces its classes, and a `WaveProvider` with `motion="none"` turns the default
|
|
15105
|
+
* off. The surface mounts through the presence core: it carries `data-presence` and
|
|
15106
|
+
* `data-state="open"`, and while it closes `data-state="closed"` and `inert`, so it stays on
|
|
15107
|
+
* screen, where it was and on the step it closed on, until its exit ends. Escape, focus and the
|
|
15108
|
+
* Trigger's `aria-expanded` follow the open state, not the exit: focus inside a closing popover
|
|
15109
|
+
* moves, in the commit that closes it, to where it returns focus. A popover open by default
|
|
15110
|
+
* animates in when it mounts in the browser, and one opened again during its exit enters again
|
|
15111
|
+
* on the same surface (on its first step, as every opening). Without motion it unmounts as soon
|
|
15112
|
+
* as it closes.
|
|
14638
15113
|
* - **Parts** (Fluent's composition): `TeachingPopover.Trigger` opens and closes the popover, gets
|
|
14639
15114
|
* focus back when it closes and, without a `target`, is what it points at; written directly
|
|
14640
15115
|
* inside TeachingPopover (a Fragment is fine), it makes the popover start closed (`defaultOpen`
|
|
@@ -14692,7 +15167,7 @@ export declare type TagSize = Extract<Size, 'extra-small' | 'small' | 'medium'>;
|
|
|
14692
15167
|
* </TeachingPopover>
|
|
14693
15168
|
*/
|
|
14694
15169
|
export declare const TeachingPopover: {
|
|
14695
|
-
({ steps, activeStep: activeStepProp, defaultActiveStep, currentStep, defaultCurrentStep, onStepChange, onDismiss, onFinish, primaryAction: primaryActionProp, secondaryAction: secondaryActionProp, footerLayout, open: openProp, defaultOpen, onOpenChange, closeLabel, labels, target: targetProp, positioning, side, align, children, id, className, style, onKeyDown, ref, ...rest }: TeachingPopoverProps): JSX.Element;
|
|
15170
|
+
({ steps, activeStep: activeStepProp, defaultActiveStep, currentStep, defaultCurrentStep, onStepChange, onDismiss, onFinish, primaryAction: primaryActionProp, secondaryAction: secondaryActionProp, footerLayout, open: openProp, defaultOpen, onOpenChange, closeLabel, labels, target: targetProp, positioning, side, align, children, id, className, style, onKeyDown, motion, ref, ...rest }: TeachingPopoverProps): JSX.Element;
|
|
14696
15171
|
displayName: string;
|
|
14697
15172
|
} & {
|
|
14698
15173
|
Trigger: {
|
|
@@ -15094,10 +15569,14 @@ export declare interface TeachingPopoverProps extends React_2.HTMLAttributes<HTM
|
|
|
15094
15569
|
steps: readonly TeachingPopoverStep[];
|
|
15095
15570
|
/**
|
|
15096
15571
|
* Controlled index of the displayed step. Out-of-range values are clamped to the first or last
|
|
15097
|
-
* step (with a development warning).
|
|
15572
|
+
* step (with a development warning). Opening the popover leaves it as it is.
|
|
15098
15573
|
*/
|
|
15099
15574
|
activeStep?: number;
|
|
15100
|
-
/**
|
|
15575
|
+
/**
|
|
15576
|
+
* Initial step index for uncontrolled usage, and the step the popover starts on again each time
|
|
15577
|
+
* it opens (after Done, Close, Escape or the Trigger closed it, or a controlled `open` turned it
|
|
15578
|
+
* off), so a tour opened again starts over; `onStepChange` is called with it when the step was
|
|
15579
|
+
* elsewhere.
|
|
15101
15580
|
* @default 0
|
|
15102
15581
|
*/
|
|
15103
15582
|
defaultActiveStep?: number;
|
|
@@ -15107,7 +15586,9 @@ export declare interface TeachingPopoverProps extends React_2.HTMLAttributes<HTM
|
|
|
15107
15586
|
defaultCurrentStep?: number;
|
|
15108
15587
|
/**
|
|
15109
15588
|
* Called with the requested step index when Next, Back or a step button of
|
|
15110
|
-
* `TeachingPopover.CarouselNav` is activated (the button of the current step requests nothing)
|
|
15589
|
+
* `TeachingPopover.CarouselNav` is activated (the button of the current step requests nothing),
|
|
15590
|
+
* and, while the step is uncontrolled, with the initial step when an opening moves the step back
|
|
15591
|
+
* to it (see `defaultActiveStep`).
|
|
15111
15592
|
*/
|
|
15112
15593
|
onStepChange?: (step: number) => void;
|
|
15113
15594
|
/**
|
|
@@ -15206,11 +15687,25 @@ export declare interface TeachingPopoverProps extends React_2.HTMLAttributes<HTM
|
|
|
15206
15687
|
* @default `{ offset: 12 }`
|
|
15207
15688
|
*/
|
|
15208
15689
|
positioning?: PopupPositioning;
|
|
15690
|
+
/**
|
|
15691
|
+
* The motion of the surface TeachingPopover renders (next to a `TeachingPopover.Surface` it is
|
|
15692
|
+
* ignored, with a development warning: give it to the Surface). By default the surface fades in
|
|
15693
|
+
* over 200 ms with a decelerating curve and out over 100 ms with an accelerating curve, and,
|
|
15694
|
+
* pointed at a target (or the Trigger), also slides 4px away from it on the side it opened on,
|
|
15695
|
+
* and back as it closes; under reduced motion it appears and disappears at once. `null` turns
|
|
15696
|
+
* the motion off (the surface still renders its `data-presence` phases, which then end at
|
|
15697
|
+
* once); a class string or `{ className }` replaces the default classes with yours (see
|
|
15698
|
+
* `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns the
|
|
15699
|
+
* default off. Fluent's `TeachingPopover` `surfaceMotion` (a TeachingPopover is a Popover
|
|
15700
|
+
* there).
|
|
15701
|
+
* @default the fade and slide above
|
|
15702
|
+
*/
|
|
15703
|
+
motion?: MotionSlot | null;
|
|
15209
15704
|
/**
|
|
15210
15705
|
* `TeachingPopover.Trigger` and `TeachingPopover.Surface` (Fluent's composition), rendered where
|
|
15211
15706
|
* they are written. Without a `TeachingPopover.Surface` among them, the popover renders its
|
|
15212
15707
|
* surface itself, after the children, with the element props given here (`className`, `style`,
|
|
15213
|
-
* `ref`, …); with one (best written directly inside, a Fragment is fine: see
|
|
15708
|
+
* `ref`, `motion`, …); with one (best written directly inside, a Fragment is fine: see
|
|
15214
15709
|
* `TeachingPopover.Surface`), the Surface takes them instead.
|
|
15215
15710
|
*/
|
|
15216
15711
|
children?: React_2.ReactNode;
|
|
@@ -15242,19 +15737,19 @@ export declare interface TeachingPopoverStep {
|
|
|
15242
15737
|
/**
|
|
15243
15738
|
* The popover surface (Fluent's `TeachingPopoverSurface`): the non-modal `role="dialog"` element
|
|
15244
15739
|
* that the `steps` form renders, with the same behaviour (in place, or portaled next to the
|
|
15245
|
-
* target with a beak; focus, dismissal, keyboard order
|
|
15246
|
-
* `className`, `style`, `ref` and other props reach the element the `steps` form gives
|
|
15740
|
+
* target with a beak; focus, dismissal, keyboard order, step announcements and motion), so your
|
|
15741
|
+
* `className`, `style`, `ref`, `motion` and other props reach the element the `steps` form gives
|
|
15247
15742
|
* TeachingPopover's own. Without children it shows the current step as the `steps` form does;
|
|
15248
15743
|
* children replace that content: build it from `TeachingPopover.Header`, `Title`, `Body` and
|
|
15249
15744
|
* `Footer`, or from your own (then name the surface with `aria-label` or `aria-labelledby`).
|
|
15250
15745
|
*
|
|
15251
15746
|
* Render one inside TeachingPopover; TeachingPopover then renders no surface of its own, and its
|
|
15252
|
-
* own `className`, `style`, `ref` and other element props are ignored (a development
|
|
15253
|
-
* so). Write it directly inside TeachingPopover (a Fragment is fine) where you can:
|
|
15254
|
-
* found while rendering. One inside an element or a component of yours is found once
|
|
15255
|
-
* mounted, so until then TeachingPopover's own surface renders next to it: in the server
|
|
15256
|
-
* in the browser's first commit (before anything is painted or focused). A second
|
|
15257
|
-
* a second popover (a development warning says so).
|
|
15747
|
+
* own `className`, `style`, `ref`, `motion` and other element props are ignored (a development
|
|
15748
|
+
* warning says so). Write it directly inside TeachingPopover (a Fragment is fine) where you can:
|
|
15749
|
+
* there it is found while rendering. One inside an element or a component of yours is found once
|
|
15750
|
+
* it has mounted, so until then TeachingPopover's own surface renders next to it: in the server
|
|
15751
|
+
* HTML, and in the browser's first commit (before anything is painted or focused). A second
|
|
15752
|
+
* Surface renders a second popover (a development warning says so).
|
|
15258
15753
|
*
|
|
15259
15754
|
* Also exported as `TeachingPopoverSurface` for React Server Components, which cannot use the
|
|
15260
15755
|
* dotted `TeachingPopover.Surface` (that needs a client file).
|
|
@@ -15285,6 +15780,19 @@ export declare interface TeachingPopoverSurfaceProps extends React_2.HTMLAttribu
|
|
|
15285
15780
|
* without one, name it with `aria-label` or `aria-labelledby`.
|
|
15286
15781
|
*/
|
|
15287
15782
|
children?: React_2.ReactNode;
|
|
15783
|
+
/**
|
|
15784
|
+
* The surface's motion (TeachingPopover's own `motion` is for the surface it renders without a
|
|
15785
|
+
* Surface). By default it fades in over 200 ms with a decelerating curve and out over 100 ms with
|
|
15786
|
+
* an accelerating curve, and, pointed at a target (or the Trigger), also slides 4px away from it
|
|
15787
|
+
* on the side it opened on, and back as it closes; under reduced motion it appears and
|
|
15788
|
+
* disappears at once. `null` turns the motion off (the surface still renders its
|
|
15789
|
+
* `data-presence` phases, which then end at once); a class string or `{ className }` replaces
|
|
15790
|
+
* the default classes with yours (see `MotionSlot`), also under a `WaveProvider` with
|
|
15791
|
+
* `motion="none"`, which otherwise turns the default off. Fluent's `TeachingPopover`
|
|
15792
|
+
* `surfaceMotion` (a TeachingPopover is a Popover there).
|
|
15793
|
+
* @default the fade and slide above
|
|
15794
|
+
*/
|
|
15795
|
+
motion?: MotionSlot | null;
|
|
15288
15796
|
/** Ref to the popover surface (`role="dialog"`). */
|
|
15289
15797
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
15290
15798
|
}
|
|
@@ -15883,7 +16391,8 @@ export declare interface ToastController {
|
|
|
15883
16391
|
};
|
|
15884
16392
|
/**
|
|
15885
16393
|
* Dismisses the toast with this id and cancels its timer: a shown toast exits (it stays, inert,
|
|
15886
|
-
* until
|
|
16394
|
+
* until its exit motion ends; see the Toaster's `motion`), a waiting one is removed. Unknown ids
|
|
16395
|
+
* are ignored.
|
|
15887
16396
|
*/
|
|
15888
16397
|
dismissToast: (id: string) => void;
|
|
15889
16398
|
/**
|
|
@@ -15961,6 +16470,10 @@ export declare interface ToastDispatchOptions {
|
|
|
15961
16470
|
* - `limit` caps how many toasts show at once: the others wait in a queue, in dispatch order,
|
|
15962
16471
|
* unannounced and without a running timer, and appear as shown toasts go.
|
|
15963
16472
|
* `dismissAllToasts()` removes every toast, shown and queued.
|
|
16473
|
+
* - **Motion:** a toast slides and fades in from the stack's edge while its place opens; a
|
|
16474
|
+
* dismissed one fades out, then its place closes and the others glide together. It stays in
|
|
16475
|
+
* the document, `inert`, until then; at once under reduced motion. `motion` replaces or turns
|
|
16476
|
+
* off the motion of every toast.
|
|
15964
16477
|
*
|
|
15965
16478
|
* @example
|
|
15966
16479
|
* <Toaster position="bottom-end" limit={3}>
|
|
@@ -15968,17 +16481,19 @@ export declare interface ToastDispatchOptions {
|
|
|
15968
16481
|
* </Toaster>
|
|
15969
16482
|
*/
|
|
15970
16483
|
export declare const Toaster: {
|
|
15971
|
-
({ position, limit: limitProp, shortcuts, toaster: handle, className, style, children, onFocus, onBlur, onKeyDown, onPointerEnter, onPointerLeave, onPointerOver, ref, ...rest }: ToasterProps): React_2.JSX.Element;
|
|
16484
|
+
({ position, limit: limitProp, shortcuts, toaster: handle, motion, className, style, children, onFocus, onBlur, onKeyDown, onPointerEnter, onPointerLeave, onPointerOver, ref, ...rest }: ToasterProps): React_2.JSX.Element;
|
|
15972
16485
|
displayName: string;
|
|
15973
16486
|
};
|
|
15974
16487
|
|
|
15975
16488
|
/**
|
|
15976
16489
|
* Toaster: `root` on the portaled toast region; `toast` on the `role="group"` container the
|
|
15977
|
-
* Toaster renders around each toast
|
|
16490
|
+
* Toaster renders around each toast; `toastContent` on the element inside each container, its
|
|
16491
|
+
* only child, which holds the toast's status text and content (0.15).
|
|
15978
16492
|
*/
|
|
15979
16493
|
export declare const toasterClassNames: {
|
|
15980
16494
|
readonly root: "wave-toaster";
|
|
15981
16495
|
readonly toast: "wave-toaster__toast";
|
|
16496
|
+
readonly toastContent: "wave-toaster__toast-content";
|
|
15982
16497
|
};
|
|
15983
16498
|
|
|
15984
16499
|
/**
|
|
@@ -16015,6 +16530,20 @@ export declare interface ToasterProps extends React_2.HTMLAttributes<HTMLDivElem
|
|
|
16015
16530
|
* queues again until a Toaster binds it.
|
|
16016
16531
|
*/
|
|
16017
16532
|
toaster?: ToasterHandle;
|
|
16533
|
+
/**
|
|
16534
|
+
* The motion of every toast's container (the `role="group"` element; `className` stays on the
|
|
16535
|
+
* region). By default a toast opens its place in the stack, fades in and slides 8px in from the
|
|
16536
|
+
* stack's edge (the top or bottom edge `position` names) over 250 ms with a decelerating curve,
|
|
16537
|
+
* all together; dismissed, it fades out over 200 ms, then its place closes over 200 ms more,
|
|
16538
|
+
* so the toasts around it glide together and nothing jumps when it unmounts (the timer still
|
|
16539
|
+
* starts when the toast is shown). Under reduced motion it appears and disappears at once.
|
|
16540
|
+
* `null` turns the motion off (the container still renders its `data-presence` phases, which
|
|
16541
|
+
* then end at once); a class string or `{ className }` replaces the default classes with yours
|
|
16542
|
+
* (see `MotionSlot`), also under a `WaveProvider` with `motion="none"`, which otherwise turns
|
|
16543
|
+
* the default off. A WaveUI addition: Fluent's Toaster has no motion slot.
|
|
16544
|
+
* @default the slide, fade and collapse above
|
|
16545
|
+
*/
|
|
16546
|
+
motion?: MotionSlot | null;
|
|
16018
16547
|
/** Ref to the toast region (the portaled `<div role="region">`). */
|
|
16019
16548
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
16020
16549
|
}
|
|
@@ -16563,8 +17092,13 @@ export declare interface ToolbarToggleButtonProps extends Omit<ToggleButtonProps
|
|
|
16563
17092
|
* - The text is always present as a hidden `role="tooltip"` element referenced by the child's
|
|
16564
17093
|
* `aria-describedby` (or `aria-labelledby` with `relationship="label"`), so screen readers get
|
|
16565
17094
|
* it on focus without waiting for the delay; the child's own ids are kept.
|
|
16566
|
-
* - The visual surface is rendered in a portal
|
|
16567
|
-
*
|
|
17095
|
+
* - The visual surface is rendered in a portal while visible (it is `aria-hidden`, a copy of the
|
|
17096
|
+
* description), positioned on `side`/`align` with flipping and shifting to stay in view.
|
|
17097
|
+
* - It fades in and out over 100 ms (see `motion`; at once under reduced motion). The surface
|
|
17098
|
+
* mounts through the presence core: it carries `data-presence` and `data-state="open"`, and
|
|
17099
|
+
* while it fades out `data-state="closed"` and `inert`, staying where it was until its exit
|
|
17100
|
+
* ends; the Escape layer goes as it hides, not after the fade. Shown again during its exit, the
|
|
17101
|
+
* same surface fades back in. The hidden description is unchanged in every phase.
|
|
16568
17102
|
* - It appears `openDelay` after the pointer rests on the child or the child takes keyboard focus,
|
|
16569
17103
|
* stays visible while the pointer moves onto it, hides `closeDelay` after the pointer leaves or
|
|
16570
17104
|
* immediately on blur, and Escape hides it without closing an enclosing dialog or popover. Focus
|
|
@@ -16600,7 +17134,7 @@ export declare interface ToolbarToggleButtonProps extends Omit<ToggleButtonProps
|
|
|
16600
17134
|
* </Menu>
|
|
16601
17135
|
*/
|
|
16602
17136
|
export declare const Tooltip: {
|
|
16603
|
-
({ content, appearance: appearanceProp, variant, openDelay: openDelayProp, closeDelay, delay, open: openProp, defaultOpen, onOpenChange, relationship, side, align, positioning, children, className, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...rest }: TooltipProps): React_2.JSX.Element;
|
|
17137
|
+
({ content, appearance: appearanceProp, variant, openDelay: openDelayProp, closeDelay, delay, open: openProp, defaultOpen, onOpenChange, relationship, side, align, positioning, motion, children, className, onMouseEnter, onMouseLeave, onFocus, onBlur, ref, ...rest }: TooltipProps): React_2.JSX.Element;
|
|
16604
17138
|
displayName: string;
|
|
16605
17139
|
};
|
|
16606
17140
|
|
|
@@ -16683,6 +17217,17 @@ export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSp
|
|
|
16683
17217
|
* @default `{ offset: 8 }`
|
|
16684
17218
|
*/
|
|
16685
17219
|
positioning?: PopupPositioningOptions;
|
|
17220
|
+
/**
|
|
17221
|
+
* The motion of the tooltip's surface (the portaled box; `className` stays on the wrapper
|
|
17222
|
+
* `<span>`). By default it fades in over 100 ms and out over 100 ms with the easy-ease curve,
|
|
17223
|
+
* without a slide; under reduced motion it appears and disappears at once. `null` turns the
|
|
17224
|
+
* motion off (the surface still renders its `data-presence` phases, which then end at once); a
|
|
17225
|
+
* class string or `{ className }` replaces the default classes with yours (see `MotionSlot`),
|
|
17226
|
+
* also under a `WaveProvider` with `motion="none"`, which otherwise turns the default off. A
|
|
17227
|
+
* WaveUI addition: Fluent's Tooltip has no motion.
|
|
17228
|
+
* @default the fade above
|
|
17229
|
+
*/
|
|
17230
|
+
motion?: MotionSlot | null;
|
|
16686
17231
|
/**
|
|
16687
17232
|
* A single element that triggers the tooltip on hover and focus: it receives the
|
|
16688
17233
|
* `aria-describedby`/`aria-labelledby`, plus any `id` and `aria-*` props given to the Tooltip
|
|
@@ -16705,6 +17250,10 @@ export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSp
|
|
|
16705
17250
|
* Keyboard focus enters at the `selected` item, else the first item; while focus is inside, the
|
|
16706
17251
|
* tab stop follows it, so Shift+Tab leaves the tree.
|
|
16707
17252
|
*
|
|
17253
|
+
* A child group opens and closes its space with a short collapse and fade (the Tree's `motion`;
|
|
17254
|
+
* none under reduced motion or a `WaveProvider` with `motion="none"`), and focus inside a group
|
|
17255
|
+
* that collapses moves to its item.
|
|
17256
|
+
*
|
|
16708
17257
|
* `selectionMode="multiple"` draws a checkbox on every item, bound to `checkedItems`: Space
|
|
16709
17258
|
* toggles the focused item's check, a click on the checkbox toggles it, and a click elsewhere on
|
|
16710
17259
|
* the row activates the item (as Enter does). Checks cascade: checking an item checks every item
|
|
@@ -16731,7 +17280,7 @@ export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSp
|
|
|
16731
17280
|
* `TreeItemPersonaLayout` for React Server Components, which cannot use the dotted form.
|
|
16732
17281
|
*/
|
|
16733
17282
|
export declare const Tree: {
|
|
16734
|
-
({ expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemSelect, selected, current, selectionMode, navigationMode, checkedItems, defaultCheckedItems, onCheckedItemsChange, className, children, onKeyDown, onKeyDownCapture, onFocus, onBlur, ref, ...rest }: TreeProps): JSX.Element;
|
|
17283
|
+
({ expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemSelect, selected, current, selectionMode, navigationMode, checkedItems, defaultCheckedItems, onCheckedItemsChange, motion, className, children, onKeyDown, onKeyDownCapture, onFocus, onBlur, ref, ...rest }: TreeProps): JSX.Element;
|
|
16735
17284
|
displayName: string;
|
|
16736
17285
|
} & {
|
|
16737
17286
|
Item: {
|
|
@@ -16763,6 +17312,16 @@ export declare const treeClassNames: {
|
|
|
16763
17312
|
* One node of a Tree. Text and other content are the label; nested `Tree.Item` children form its
|
|
16764
17313
|
* child group, which is shown while the item is expanded.
|
|
16765
17314
|
*
|
|
17315
|
+
* The child group renders as the only child of a collapse element (its stable class
|
|
17316
|
+
* `wave-tree-item__collapse`), which opens and closes the group's space (the Tree's `motion`) and
|
|
17317
|
+
* has no box of its own while the item is expanded, so the group lays out in the item as before.
|
|
17318
|
+
* An item expanded by default appears without motion. After a collapse the group stays in the
|
|
17319
|
+
* document until the collapse ends, `inert` (its items leave the arrow keys and typeahead at once)
|
|
17320
|
+
* while the item already reports itself collapsed; expanding the item again during the collapse
|
|
17321
|
+
* keeps the same group. Focus inside the group when the item collapses moves to the item. A
|
|
17322
|
+
* pointer click that falls through the exiting group onto the item (an `inert` element lets the
|
|
17323
|
+
* pointer through) is not the item's: it neither expands nor activates it.
|
|
17324
|
+
*
|
|
16766
17325
|
* Nested items must be `Tree.Item` elements among the item's own children: written directly, in
|
|
16767
17326
|
* Fragments, or returned by a render function (`{node.children.map(renderNode)}`). A component
|
|
16768
17327
|
* that renders `Tree.Item` itself (a recursive `<NodeView node={child} />`) is not recognised:
|
|
@@ -16772,14 +17331,14 @@ export declare const treeClassNames: {
|
|
|
16772
17331
|
* renders is not checked with its parent.
|
|
16773
17332
|
*
|
|
16774
17333
|
* `ref` and every other prop land on the `role="treeitem"` element, which contains the label row
|
|
16775
|
-
* and the child group. Its `onClick` receives only clicks on its own
|
|
16776
|
-
* or nested items) and its `onKeyDown` only keys pressed while focus
|
|
16777
|
-
* run before the built-in behaviour (call `event.preventDefault()`
|
|
16778
|
-
* tree, a click on the item's checkbox toggles its check and is not
|
|
16779
|
-
* neither is a click on its actions; `onKeyDown` receives no keys pressed
|
|
16780
|
-
* other event handlers (`onFocus`, `onDoubleClick`, `onContextMenu` and the
|
|
16781
|
-
* filtered: as DOM events bubble, they also receive events from its child group and
|
|
16782
|
-
* (compare `event.target` with `event.currentTarget` to tell them apart).
|
|
17334
|
+
* and the child group (in its collapse element). Its `onClick` receives only clicks on its own
|
|
17335
|
+
* row (not on its child group or nested items) and its `onKeyDown` only keys pressed while focus
|
|
17336
|
+
* is on it or in its row; both run before the built-in behaviour (call `event.preventDefault()`
|
|
17337
|
+
* to skip it). In a checkbox tree, a click on the item's checkbox toggles its check and is not
|
|
17338
|
+
* passed to `onClick`, and neither is a click on its actions; `onKeyDown` receives no keys pressed
|
|
17339
|
+
* in the actions. Its other event handlers (`onFocus`, `onDoubleClick`, `onContextMenu` and the
|
|
17340
|
+
* rest) are not filtered: as DOM events bubble, they also receive events from its child group and
|
|
17341
|
+
* nested items (compare `event.target` with `event.currentTarget` to tell them apart).
|
|
16783
17342
|
*
|
|
16784
17343
|
* `actions` render in a toolbar at the end of the row, named by the item; keys and clicks on them
|
|
16785
17344
|
* belong to them and never activate or check the item. `aside` sits before them and describes the
|
|
@@ -16799,7 +17358,8 @@ export declare const TreeItem: {
|
|
|
16799
17358
|
* chevron (or your `expandIcon`); `indicator` on the checkbox of a multi-select tree or the radio
|
|
16800
17359
|
* of a single-select one; `icon` on the icon span; `label` on the label span; `iconAfter` on the
|
|
16801
17360
|
* icon after the label; `aside` on the aside content; `actions` on the row's actions toolbar;
|
|
16802
|
-
* `group` on the `role="group"` element of its nested items
|
|
17361
|
+
* `group` on the `role="group"` element of its nested items; `collapse` on the element around
|
|
17362
|
+
* that group (the element that opens and closes the group's space, 0.15).
|
|
16803
17363
|
*/
|
|
16804
17364
|
export declare const treeItemClassNames: {
|
|
16805
17365
|
readonly root: "wave-tree-item";
|
|
@@ -16812,6 +17372,7 @@ export declare const treeItemClassNames: {
|
|
|
16812
17372
|
readonly aside: "wave-tree-item__aside";
|
|
16813
17373
|
readonly actions: "wave-tree-item__actions";
|
|
16814
17374
|
readonly group: "wave-tree-item__group";
|
|
17375
|
+
readonly collapse: "wave-tree-item__collapse";
|
|
16815
17376
|
};
|
|
16816
17377
|
|
|
16817
17378
|
/**
|
|
@@ -16953,6 +17514,17 @@ export declare interface TreeProps extends React_2.HTMLAttributes<HTMLDivElement
|
|
|
16953
17514
|
* @default 'tree'
|
|
16954
17515
|
*/
|
|
16955
17516
|
navigationMode?: 'tree' | 'treegrid';
|
|
17517
|
+
/**
|
|
17518
|
+
* Replaces the collapse of every child group in the tree (Fluent's `Tree collapseMotion`), on
|
|
17519
|
+
* the element around each `role="group"` element: by default the space a group takes opens
|
|
17520
|
+
* from nothing and closes back to it, with a fade, over the normal duration (200 ms) with the
|
|
17521
|
+
* max easy-ease curve, both ways. `null` turns it off (a group appears and disappears at once);
|
|
17522
|
+
* a class string or `{ className }` replaces it, written as `MotionSlot` describes. A
|
|
17523
|
+
* `WaveProvider` with `motion="none"` turns the default off, and a value here still applies
|
|
17524
|
+
* under it. The expand chevron's turn is not part of it, and a nested `Tree` takes its own.
|
|
17525
|
+
* @default the collapse described above
|
|
17526
|
+
*/
|
|
17527
|
+
motion?: MotionSlot | null;
|
|
16956
17528
|
/** Ref to the `role="tree"` element. */
|
|
16957
17529
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
16958
17530
|
}
|
|
@@ -18589,6 +19161,8 @@ export declare interface WaveContextValue {
|
|
|
18589
19161
|
portalContainer: HTMLElement | null;
|
|
18590
19162
|
/** The merged input defaults of the providers above (`{}` outside a provider). */
|
|
18591
19163
|
inputDefaults: InputDefaults;
|
|
19164
|
+
/** The motion preference of the providers above (`'default'` outside a provider). */
|
|
19165
|
+
motion: MotionPreference;
|
|
18592
19166
|
/** `false` when no {@link WaveProvider} is above the caller (the defaults are returned). */
|
|
18593
19167
|
hasProvider: boolean;
|
|
18594
19168
|
}
|
|
@@ -18615,9 +19189,13 @@ export declare type WaveDir = 'ltr' | 'rtl';
|
|
|
18615
19189
|
* - `inputDefaults` nests differently: a nested provider's defined keys override the enclosing
|
|
18616
19190
|
* provider's, and an omitted key is inherited, so setting only `appearance` in a nested provider
|
|
18617
19191
|
* keeps the enclosing provider's `size`.
|
|
19192
|
+
* - `motion="none"` turns the default motion of every animated part below it off (its motion
|
|
19193
|
+
* slots, Carousel's slide, TabList's sliding line, the reveal of Nav item actions; a part's own
|
|
19194
|
+
* `motion` still wins), while transitions without a slot keep running (Accordion's and Tree's
|
|
19195
|
+
* chevron turns, colour changes); a nested provider inherits an omitted `motion` like `theme`.
|
|
18618
19196
|
*/
|
|
18619
19197
|
export declare const WaveProvider: {
|
|
18620
|
-
({ theme: themeProp, dir: dirProp, portalContainer: portalContainerProp, inputDefaults: inputDefaultsProp, children, className, ref, ...rest }: WaveProviderProps): React_2.JSX.Element;
|
|
19198
|
+
({ theme: themeProp, dir: dirProp, portalContainer: portalContainerProp, inputDefaults: inputDefaultsProp, motion: motionProp, children, className, ref, ...rest }: WaveProviderProps): React_2.JSX.Element;
|
|
18621
19199
|
displayName: string;
|
|
18622
19200
|
};
|
|
18623
19201
|
|
|
@@ -18653,6 +19231,18 @@ export declare interface WaveProviderProps extends React_2.HTMLAttributes<HTMLDi
|
|
|
18653
19231
|
* @default the enclosing WaveProvider's defaults, else none (`medium`, `outline`)
|
|
18654
19232
|
*/
|
|
18655
19233
|
inputDefaults?: InputDefaults;
|
|
19234
|
+
/**
|
|
19235
|
+
* Motion of the subtree. `'none'` makes every motion slot below it (a part's `motion`,
|
|
19236
|
+
* `backdropMotion`, `expandIconMotion` or `indeterminateMotion` left unset) behave as `null`,
|
|
19237
|
+
* which also stops the slide of TabList's selection line, and turns off Carousel's slide or fade
|
|
19238
|
+
* (a Carousel without its own `motion`) and the reveal of Nav item actions; a part's own value
|
|
19239
|
+
* still wins. Transitions that are no motion slot keep running: the turn of Accordion's and
|
|
19240
|
+
* Tree's chevrons, colour changes on hover and press. Fluent's `MotionBehaviourProvider` with `'skip'` is the counterpart, which
|
|
19241
|
+
* `@fluentui/react-components` does not export. A nested provider inherits an omitted `motion`
|
|
19242
|
+
* like `theme`.
|
|
19243
|
+
* @default the enclosing WaveProvider's motion, else 'default'
|
|
19244
|
+
*/
|
|
19245
|
+
motion?: MotionPreference;
|
|
18656
19246
|
/** Content rendered inside the themed container. */
|
|
18657
19247
|
children: React_2.ReactNode;
|
|
18658
19248
|
/** Ref to the themed root `<div>`. */
|