@tinybigui/react 0.21.0 → 0.22.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 +9 -9
- package/dist/index.cjs +278 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +185 -66
- package/dist/index.d.ts +185 -66
- package/dist/index.js +278 -110
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6249,12 +6249,13 @@ type ChipVariants = VariantProps<typeof chipVariants>;
|
|
|
6249
6249
|
* Structural variant of the MD3 Dialog.
|
|
6250
6250
|
*
|
|
6251
6251
|
* - `basic` — Floating dialog with headline, body, and action buttons.
|
|
6252
|
-
* Supports scale + fade entry animation
|
|
6253
|
-
* Max width 560dp per MD3 spec.
|
|
6252
|
+
* Supports scale + fade entry animation (MD3 Expressive, `animate-md-scale-in`).
|
|
6253
|
+
* Closes on scrim click or Escape. Max width 560dp per MD3 spec.
|
|
6254
6254
|
*
|
|
6255
6255
|
* - `fullscreen` — Full viewport overlay suited for mobile and complex forms.
|
|
6256
6256
|
* Replaces headline with a top app bar row (close icon + confirm action).
|
|
6257
|
-
* Slide-up entry animation. Does NOT close on
|
|
6257
|
+
* Slide-up entry animation (`animate-md-slide-in-bottom`). Does NOT close on
|
|
6258
|
+
* scrim click per MD3 spec.
|
|
6258
6259
|
*
|
|
6259
6260
|
* @default 'basic'
|
|
6260
6261
|
*/
|
|
@@ -6262,10 +6263,12 @@ type DialogVariant = "basic" | "fullscreen";
|
|
|
6262
6263
|
/**
|
|
6263
6264
|
* Internal animation state machine for the Dialog.
|
|
6264
6265
|
*
|
|
6265
|
-
* - `entering` — initial mount state before
|
|
6266
|
-
* - `visible` —
|
|
6267
|
-
* - `exiting` — exit animation
|
|
6268
|
-
* - `exited` —
|
|
6266
|
+
* - `entering` — initial mount state; dialog starts invisible before animation fires
|
|
6267
|
+
* - `visible` — entry animation active (`animate-md-scale-in` / `animate-md-slide-in-bottom`)
|
|
6268
|
+
* - `exiting` — exit animation active (`animate-md-scale-out` / `animate-md-slide-out-bottom`)
|
|
6269
|
+
* - `exited` — animation complete; portal removes element from DOM
|
|
6270
|
+
*
|
|
6271
|
+
* The scrim receives the same state for its own fade-in/out animation.
|
|
6269
6272
|
*/
|
|
6270
6273
|
type DialogAnimationState = "entering" | "visible" | "exiting" | "exited";
|
|
6271
6274
|
/**
|
|
@@ -6302,7 +6305,7 @@ interface DialogContextValue {
|
|
|
6302
6305
|
* onOpenChange={setOpen}
|
|
6303
6306
|
* aria-label="Confirm action"
|
|
6304
6307
|
* className="bg-surface-container-high rounded-xl shadow-elevation-3"
|
|
6305
|
-
* scrimClassName="fixed inset-0 z-40 bg-scrim
|
|
6308
|
+
* scrimClassName="fixed inset-0 z-40 bg-scrim/32"
|
|
6306
6309
|
* >
|
|
6307
6310
|
* <DialogHeadline>Confirm deletion?</DialogHeadline>
|
|
6308
6311
|
* <DialogContent>This action cannot be undone.</DialogContent>
|
|
@@ -6337,6 +6340,21 @@ interface DialogHeadlessProps {
|
|
|
6337
6340
|
* When `DialogHeadline` is present, `aria-labelledby` is preferred automatically.
|
|
6338
6341
|
*/
|
|
6339
6342
|
"aria-label"?: string;
|
|
6343
|
+
/**
|
|
6344
|
+
* Optional hero icon rendered centered above the headline per MD3 spec.
|
|
6345
|
+
* When present, sets `data-with-icon` on the panel root so headline and
|
|
6346
|
+
* supporting text center-align via `group-data-[with-icon]/dialog:` selectors.
|
|
6347
|
+
*
|
|
6348
|
+
* Only rendered in the `basic` variant.
|
|
6349
|
+
*
|
|
6350
|
+
* @example
|
|
6351
|
+
* ```tsx
|
|
6352
|
+
* <Dialog icon={<BookmarkIcon />}>
|
|
6353
|
+
* <DialogHeadline>Save bookmark?</DialogHeadline>
|
|
6354
|
+
* </Dialog>
|
|
6355
|
+
* ```
|
|
6356
|
+
*/
|
|
6357
|
+
icon?: ReactNode;
|
|
6340
6358
|
/**
|
|
6341
6359
|
* Dialog slot content — typically `DialogHeadline`, `DialogContent`, `DialogActions`.
|
|
6342
6360
|
*/
|
|
@@ -6346,13 +6364,28 @@ interface DialogHeadlessProps {
|
|
|
6346
6364
|
*/
|
|
6347
6365
|
className?: string;
|
|
6348
6366
|
/**
|
|
6349
|
-
* Additional CSS classes applied to the
|
|
6367
|
+
* Additional CSS classes applied to the centering/positioning wrapper element.
|
|
6368
|
+
* Consumed from `dialogWrapperVariants` by the styled `Dialog` layer.
|
|
6350
6369
|
*/
|
|
6351
|
-
|
|
6370
|
+
wrapperClassName?: string;
|
|
6371
|
+
/**
|
|
6372
|
+
* Returns CSS classes for the scrim based on the current animation state.
|
|
6373
|
+
* Called at render time to apply the correct fade-in/out animation.
|
|
6374
|
+
* When `undefined`, falls back to a static base scrim class.
|
|
6375
|
+
*
|
|
6376
|
+
* @example
|
|
6377
|
+
* ```tsx
|
|
6378
|
+
* getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
|
|
6379
|
+
* ```
|
|
6380
|
+
*/
|
|
6381
|
+
getScrimClassName?: (state: DialogAnimationState) => string;
|
|
6352
6382
|
/**
|
|
6353
6383
|
* Additional CSS classes injected based on the current animation state.
|
|
6354
6384
|
* Called at render time to merge CVA animation classes onto the panel.
|
|
6355
6385
|
*
|
|
6386
|
+
* Returns empty string when `prefers-reduced-motion: reduce` is active
|
|
6387
|
+
* (handled by the styled `Dialog` layer via `useReducedMotion`).
|
|
6388
|
+
*
|
|
6356
6389
|
* @example
|
|
6357
6390
|
* ```tsx
|
|
6358
6391
|
* getAnimationClassName={(state) => dialogAnimationVariants({ animationState: state, variant })}
|
|
@@ -6382,6 +6415,16 @@ interface DialogHeadlessProps {
|
|
|
6382
6415
|
* </DialogActions>
|
|
6383
6416
|
* </Dialog>
|
|
6384
6417
|
*
|
|
6418
|
+
* // With hero icon
|
|
6419
|
+
* <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
|
|
6420
|
+
* <DialogHeadline>Save bookmark?</DialogHeadline>
|
|
6421
|
+
* <DialogContent>The page will be saved to your bookmarks.</DialogContent>
|
|
6422
|
+
* <DialogActions>
|
|
6423
|
+
* <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
|
|
6424
|
+
* <Button variant="filled" onPress={handleSave}>Save</Button>
|
|
6425
|
+
* </DialogActions>
|
|
6426
|
+
* </Dialog>
|
|
6427
|
+
*
|
|
6385
6428
|
* // Full-screen dialog (controlled)
|
|
6386
6429
|
* <Dialog variant="fullscreen" open={open} onOpenChange={setOpen}>
|
|
6387
6430
|
* <DialogHeadline
|
|
@@ -6419,6 +6462,19 @@ interface DialogProps {
|
|
|
6419
6462
|
* Accessible label for the dialog when no `DialogHeadline` is present.
|
|
6420
6463
|
*/
|
|
6421
6464
|
"aria-label"?: string;
|
|
6465
|
+
/**
|
|
6466
|
+
* Optional hero icon rendered centered above the headline per MD3 spec.
|
|
6467
|
+
* When present, headline and supporting text center-align automatically.
|
|
6468
|
+
* Only rendered in the `basic` variant.
|
|
6469
|
+
*
|
|
6470
|
+
* @example
|
|
6471
|
+
* ```tsx
|
|
6472
|
+
* <Dialog icon={<BookmarkIcon />}>
|
|
6473
|
+
* <DialogHeadline>Save bookmark?</DialogHeadline>
|
|
6474
|
+
* </Dialog>
|
|
6475
|
+
* ```
|
|
6476
|
+
*/
|
|
6477
|
+
icon?: ReactNode;
|
|
6422
6478
|
/**
|
|
6423
6479
|
* Dialog slot content — `DialogHeadline`, `DialogContent`, `DialogActions`.
|
|
6424
6480
|
*/
|
|
@@ -6477,6 +6533,10 @@ interface DialogHeadlineProps {
|
|
|
6477
6533
|
* Renders as a scrollable `<div>` and provides its `id` to `DialogContext`
|
|
6478
6534
|
* so the parent dialog panel can reference it via `aria-describedby`.
|
|
6479
6535
|
*
|
|
6536
|
+
* Shows MD3 scroll dividers (`border-outline-variant`) at the top and/or bottom
|
|
6537
|
+
* of the scroll container when content overflows. Dividers are toggled via
|
|
6538
|
+
* `data-scroll-divider-top` and `data-scroll-divider-bottom` attributes.
|
|
6539
|
+
*
|
|
6480
6540
|
* @example
|
|
6481
6541
|
* ```tsx
|
|
6482
6542
|
* <DialogContent>
|
|
@@ -6531,17 +6591,24 @@ interface DialogActionsProps {
|
|
|
6531
6591
|
* **Basic** (default):
|
|
6532
6592
|
* - Floating card: `bg-surface-container-high`, `rounded-xl`, `shadow-elevation-3`
|
|
6533
6593
|
* - Centered in viewport (min 280dp, max 560dp width)
|
|
6534
|
-
* - Scale + fade entry animation (`
|
|
6535
|
-
* -
|
|
6594
|
+
* - Scale + fade entry animation (`animate-md-scale-in`, expressive-fast-spatial 350ms)
|
|
6595
|
+
* - Scale + fade exit animation (`animate-md-scale-out`, emphasized-accelerate 200ms)
|
|
6596
|
+
* - Scrim fades in/out (`animate-md-fade-in` / `animate-md-fade-out`)
|
|
6536
6597
|
* - Closes on scrim click or Escape key
|
|
6598
|
+
* - Optional hero icon above headline (`icon` prop) — centers headline + content text
|
|
6537
6599
|
*
|
|
6538
6600
|
* **Full-screen**:
|
|
6539
6601
|
* - Full viewport coverage — suited for mobile and complex forms
|
|
6540
6602
|
* - No rounded corners, no elevation shadow
|
|
6541
|
-
* - Slide-up entry / slide-down exit animation
|
|
6603
|
+
* - Slide-up entry / slide-down exit animation (`animate-md-slide-in-bottom` / out)
|
|
6542
6604
|
* - Does NOT close on scrim click per MD3 spec (only via Escape or close button)
|
|
6543
6605
|
* - Headline replaced by top app bar row (close icon + confirm action)
|
|
6544
6606
|
*
|
|
6607
|
+
* **Reduced motion**:
|
|
6608
|
+
* - When `prefers-reduced-motion: reduce` is active, all keyframe animations are
|
|
6609
|
+
* suppressed (no animate-md-* class applied). Dialog appears/disappears instantly.
|
|
6610
|
+
* - `transition-none` is appended so any inherited transitions are also disabled.
|
|
6611
|
+
*
|
|
6545
6612
|
* Both variants:
|
|
6546
6613
|
* - `role="dialog"` + `aria-modal="true"` (React Aria `useDialog`)
|
|
6547
6614
|
* - `aria-labelledby` pointing to `DialogHeadline` id
|
|
@@ -6576,6 +6643,16 @@ interface DialogActionsProps {
|
|
|
6576
6643
|
* );
|
|
6577
6644
|
* }
|
|
6578
6645
|
*
|
|
6646
|
+
* // With hero icon
|
|
6647
|
+
* <Dialog icon={<BookmarkIcon />} open={open} onOpenChange={setOpen}>
|
|
6648
|
+
* <DialogHeadline>Save bookmark?</DialogHeadline>
|
|
6649
|
+
* <DialogContent>The page will be saved to your bookmarks.</DialogContent>
|
|
6650
|
+
* <DialogActions>
|
|
6651
|
+
* <Button variant="text" onPress={() => setOpen(false)}>Cancel</Button>
|
|
6652
|
+
* <Button variant="filled" onPress={handleSave}>Save</Button>
|
|
6653
|
+
* </DialogActions>
|
|
6654
|
+
* </Dialog>
|
|
6655
|
+
*
|
|
6579
6656
|
* // Full-screen dialog — mobile form flow
|
|
6580
6657
|
* function NewEventDialog() {
|
|
6581
6658
|
* const [open, setOpen] = useState(false);
|
|
@@ -6617,9 +6694,15 @@ declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.Re
|
|
|
6617
6694
|
* Renders as an `<h2>` element and registers its `id` with the parent
|
|
6618
6695
|
* `DialogContext` so the dialog panel can wire `aria-labelledby` correctly.
|
|
6619
6696
|
*
|
|
6697
|
+
* When the parent dialog has a hero `icon` prop, the panel root carries
|
|
6698
|
+
* `data-with-icon` and `group/dialog`, so the `group-data-[with-icon]/dialog:text-center`
|
|
6699
|
+
* selector in `dialogHeadlineVariants` automatically centers the headline text —
|
|
6700
|
+
* no additional props needed here.
|
|
6701
|
+
*
|
|
6620
6702
|
* For the `fullscreen` variant, the headline renders as a top app bar row
|
|
6621
6703
|
* containing optional `closeButton` (leading icon button) and `confirmButton`
|
|
6622
|
-
* (trailing text action) per MD3 Full-screen Dialog spec.
|
|
6704
|
+
* (trailing text action) per MD3 Full-screen Dialog spec. The fullscreen app bar
|
|
6705
|
+
* always shows a `border-b border-outline-variant` divider below it.
|
|
6623
6706
|
*
|
|
6624
6707
|
* Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
|
|
6625
6708
|
*
|
|
@@ -6660,6 +6743,13 @@ declare const DialogHeadline: React$1.ForwardRefExoticComponent<DialogHeadlinePr
|
|
|
6660
6743
|
* Styled with `text-body-medium` and `text-on-surface-variant` per MD3 spec.
|
|
6661
6744
|
* Overflows vertically when content exceeds the available height.
|
|
6662
6745
|
*
|
|
6746
|
+
* **Scroll dividers**: Shows `border-outline-variant` dividers at the top and/or
|
|
6747
|
+
* bottom edge when content overflows and is not scrolled to the respective edge.
|
|
6748
|
+
* Dividers are toggled by setting `data-scroll-divider-top` / `data-scroll-divider-bottom`
|
|
6749
|
+
* presence attributes on the element. The CVA base class uses
|
|
6750
|
+
* `data-[scroll-divider-top]:border-t` and `data-[scroll-divider-bottom]:border-b`
|
|
6751
|
+
* to apply the borders — no style props needed.
|
|
6752
|
+
*
|
|
6663
6753
|
* Must be rendered inside a `<Dialog>` or `<DialogHeadless>` component.
|
|
6664
6754
|
*
|
|
6665
6755
|
* @example
|
|
@@ -6739,7 +6829,12 @@ declare function useDialogContext(): DialogContextValue;
|
|
|
6739
6829
|
* Basic variant is dismissable (Escape + outside click);
|
|
6740
6830
|
* Full-screen variant is Escape-dismissable only (no scrim click) per MD3 spec.
|
|
6741
6831
|
* - **Animation state machine**: `entering → visible → exiting → exited`
|
|
6742
|
-
*
|
|
6832
|
+
* Exit advances on `onAnimationEnd` with `e.target === e.currentTarget` guard
|
|
6833
|
+
* (prevents child animation events from advancing the state machine), plus a
|
|
6834
|
+
* 250ms fallback timer in case the animation event doesn't fire.
|
|
6835
|
+
* - **Scrim animation**: state-driven via `getScrimClassName(animationState)`.
|
|
6836
|
+
* - **Hero icon**: optional `icon` prop renders centered above headline;
|
|
6837
|
+
* sets `data-with-icon` on panel root for group-data centering of headline/content.
|
|
6743
6838
|
* - **ARIA wiring**: `DialogContext` provides stable IDs for `aria-labelledby`
|
|
6744
6839
|
* and `aria-describedby`, consumed by slot sub-components.
|
|
6745
6840
|
*
|
|
@@ -6757,8 +6852,9 @@ declare function useDialogContext(): DialogContextValue;
|
|
|
6757
6852
|
* variant="basic"
|
|
6758
6853
|
* open={open}
|
|
6759
6854
|
* onOpenChange={setOpen}
|
|
6760
|
-
* className={cn(
|
|
6761
|
-
*
|
|
6855
|
+
* className={cn(dialogPanelVariants({ variant: 'basic' }))}
|
|
6856
|
+
* wrapperClassName={dialogWrapperVariants({ variant: 'basic' })}
|
|
6857
|
+
* getScrimClassName={(state) => dialogScrimVariants({ animationState: state })}
|
|
6762
6858
|
* getAnimationClassName={(state) =>
|
|
6763
6859
|
* dialogAnimationVariants({ animationState: state, variant: 'basic' })
|
|
6764
6860
|
* }
|
|
@@ -6796,13 +6892,19 @@ interface TooltipTriggerStyledProps {
|
|
|
6796
6892
|
* machine so that tooltips fade/scale in on open and fade/scale out before
|
|
6797
6893
|
* unmounting from the DOM, per MD3 motion specs.
|
|
6798
6894
|
*
|
|
6799
|
-
*
|
|
6895
|
+
* When `prefers-reduced-motion: reduce` is active the overlay is unmounted
|
|
6896
|
+
* immediately on close — no exit animation, no `animationend` dependency.
|
|
6897
|
+
* This prevents the stuck-mount bug that occurs when the global CSS reset
|
|
6898
|
+
* collapses animations and `animationend` never fires.
|
|
6899
|
+
*
|
|
6900
|
+
* Animation state machine (standard motion):
|
|
6800
6901
|
* 1. RA fires `onOpenChange(true)` → mount overlay, play entry animation
|
|
6801
6902
|
* 2. RA fires `onOpenChange(false)` → keep mounted, play exit animation
|
|
6802
6903
|
* 3. `animationend` fires → unmount overlay
|
|
6803
6904
|
*
|
|
6804
|
-
*
|
|
6805
|
-
*
|
|
6905
|
+
* Animation state machine (reduced motion):
|
|
6906
|
+
* 1. RA fires `onOpenChange(true)` → mount overlay, no animation
|
|
6907
|
+
* 2. RA fires `onOpenChange(false)` → unmount overlay immediately
|
|
6806
6908
|
*
|
|
6807
6909
|
* @example
|
|
6808
6910
|
* ```tsx
|
|
@@ -6971,15 +7073,18 @@ interface TooltipHeadlessProps {
|
|
|
6971
7073
|
* Renders a single-line text label with MD3 inverse-surface styling.
|
|
6972
7074
|
* Animation is driven by the `TooltipAnimationContext` provided by
|
|
6973
7075
|
* `TooltipTrigger`:
|
|
6974
|
-
* - Entry: `animate-md-scale-in` (scale 0.85 + fade
|
|
6975
|
-
* - Exit: `animate-md-scale-out` (
|
|
7076
|
+
* - Entry: `animate-md-scale-in` (expressive-fast-spatial: 350ms, scale 0.85 → 1 + fade)
|
|
7077
|
+
* - Exit: `animate-md-scale-out` (emphasized-accelerate: 200ms, scale 1 → 0.85 + fade)
|
|
7078
|
+
* - None: no animation class when `prefers-reduced-motion: reduce` is active
|
|
6976
7079
|
*
|
|
6977
7080
|
* MD3 Tokens applied:
|
|
6978
|
-
* - `bg-inverse-surface`
|
|
6979
|
-
* - `text-inverse-on-surface` — content
|
|
6980
|
-
* - `rounded-xs`
|
|
6981
|
-
* - `
|
|
6982
|
-
* - `
|
|
7081
|
+
* - `bg-inverse-surface` — inverted surface for maximum contrast
|
|
7082
|
+
* - `text-inverse-on-surface` — content colour on inverted surface
|
|
7083
|
+
* - `rounded-xs` — 4dp corner radius (CornerExtraSmall)
|
|
7084
|
+
* - `text-body-small` — BodySmall typescale (12sp)
|
|
7085
|
+
* - `min-h-6` — 24dp minimum height
|
|
7086
|
+
* - `max-w-50` — 200dp maximum width
|
|
7087
|
+
* - `px-2 py-1` — 8dp × 4dp padding
|
|
6983
7088
|
*
|
|
6984
7089
|
* Must be used as the second child of `TooltipTrigger`.
|
|
6985
7090
|
*
|
|
@@ -6996,19 +7101,29 @@ declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipProps & React$1.
|
|
|
6996
7101
|
/**
|
|
6997
7102
|
* `RichTooltip` — Layer 3 MD3 Rich Tooltip styled component.
|
|
6998
7103
|
*
|
|
6999
|
-
* Supports an optional title, multi-line supporting text, and an
|
|
7000
|
-
* action button per MD3 Rich Tooltip specification.
|
|
7104
|
+
* Supports an optional title (subhead), multi-line supporting text, and an
|
|
7105
|
+
* optional action button per MD3 Rich Tooltip specification.
|
|
7001
7106
|
* Animation is driven by the `TooltipAnimationContext` provided by
|
|
7002
7107
|
* `TooltipTrigger`:
|
|
7003
|
-
* - Entry: `animate-md-scale-in` (
|
|
7004
|
-
* - Exit: `animate-md-scale-out` (
|
|
7005
|
-
*
|
|
7006
|
-
*
|
|
7007
|
-
*
|
|
7008
|
-
* - `
|
|
7009
|
-
* - `
|
|
7010
|
-
* - `
|
|
7011
|
-
* - `
|
|
7108
|
+
* - Entry: `animate-md-scale-in` (expressive-fast-spatial: 350ms)
|
|
7109
|
+
* - Exit: `animate-md-scale-out` (emphasized-accelerate: 200ms)
|
|
7110
|
+
* - None: no animation class when `prefers-reduced-motion: reduce` is active
|
|
7111
|
+
*
|
|
7112
|
+
* MD3 Tokens applied — container:
|
|
7113
|
+
* - `bg-surface-container` — surface container background
|
|
7114
|
+
* - `text-on-surface` — base content colour
|
|
7115
|
+
* - `shadow-elevation-2` — MD3 elevation level 2
|
|
7116
|
+
* - `rounded-md` — 12dp corner radius (CornerMedium)
|
|
7117
|
+
* - `max-w-80` — 320dp maximum width
|
|
7118
|
+
* - `px-4 py-3` — 16dp × 12dp padding
|
|
7119
|
+
*
|
|
7120
|
+
* MD3 Tokens applied — subhead (title):
|
|
7121
|
+
* - `text-title-small` — TitleSmall typescale
|
|
7122
|
+
* - `text-on-surface-variant` — subhead colour role per MD3 spec
|
|
7123
|
+
*
|
|
7124
|
+
* MD3 Tokens applied — supporting text:
|
|
7125
|
+
* - `text-body-medium` — BodyMedium typescale
|
|
7126
|
+
* - `text-on-surface-variant` — same colour role as subhead
|
|
7012
7127
|
*
|
|
7013
7128
|
* Must be used as the second child of `TooltipTrigger`.
|
|
7014
7129
|
*
|
|
@@ -7091,46 +7206,50 @@ declare function TooltipTriggerHeadless({ children, delay, isDisabled, isOpen, d
|
|
|
7091
7206
|
declare function TooltipOverlayHeadless({ tooltipProps: incomingTooltipProps, triggerRef, placement, offset, className, children, onPointerEnter, onPointerLeave, }: TooltipHeadlessProps): JSX$1.Element | null;
|
|
7092
7207
|
|
|
7093
7208
|
/**
|
|
7094
|
-
*
|
|
7209
|
+
* Plain tooltip container.
|
|
7210
|
+
*
|
|
7211
|
+
* Renders an inline-flex pill that vertically centres a single-line text label
|
|
7212
|
+
* against the 24dp minimum height.
|
|
7095
7213
|
*
|
|
7096
|
-
*
|
|
7097
|
-
* - bg-inverse-surface
|
|
7098
|
-
* -
|
|
7099
|
-
* -
|
|
7100
|
-
* -
|
|
7101
|
-
* -
|
|
7102
|
-
* -
|
|
7103
|
-
* -
|
|
7214
|
+
* MD3 Tokens:
|
|
7215
|
+
* - `bg-inverse-surface` — inverted surface for maximum contrast
|
|
7216
|
+
* - `text-inverse-on-surface` — content colour on inverted surface
|
|
7217
|
+
* - `rounded-xs` — 4dp corner radius (CornerExtraSmall)
|
|
7218
|
+
* - `text-body-small` — BodySmall typescale (12sp)
|
|
7219
|
+
* - `min-h-6` — 24dp minimum height
|
|
7220
|
+
* - `max-w-50` — 200dp maximum width
|
|
7221
|
+
* - `px-2 py-1` — 8dp × 4dp padding
|
|
7222
|
+
* - `z-50` — above all page content
|
|
7104
7223
|
*
|
|
7105
|
-
*
|
|
7106
|
-
* -
|
|
7107
|
-
* -
|
|
7224
|
+
* Motion:
|
|
7225
|
+
* - `enter` → `animate-md-scale-in` (expressive-fast-spatial: 350ms, scale 0.85 → 1 + fade)
|
|
7226
|
+
* - `exit` → `animate-md-scale-out` (emphasized-accelerate: 200ms, scale 1 → 0.85 + fade)
|
|
7227
|
+
* - `none` → no animation class (prefers-reduced-motion guard)
|
|
7108
7228
|
*/
|
|
7109
7229
|
declare const tooltipVariants: (props?: ({
|
|
7110
|
-
|
|
7230
|
+
animation?: "none" | "enter" | "exit" | null | undefined;
|
|
7111
7231
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7112
7232
|
/**
|
|
7113
|
-
*
|
|
7233
|
+
* Rich tooltip container.
|
|
7234
|
+
*
|
|
7235
|
+
* Wraps the title, supporting text, and optional action row in a flex column.
|
|
7114
7236
|
*
|
|
7115
|
-
*
|
|
7116
|
-
* - bg-surface-container
|
|
7117
|
-
* -
|
|
7118
|
-
* -
|
|
7119
|
-
* -
|
|
7120
|
-
* -
|
|
7121
|
-
* - w-
|
|
7122
|
-
* - px-4 py-3
|
|
7237
|
+
* MD3 Tokens:
|
|
7238
|
+
* - `bg-surface-container` — surface container background
|
|
7239
|
+
* - `text-on-surface` — content colour on surface
|
|
7240
|
+
* - `shadow-elevation-2` — MD3 elevation level 2
|
|
7241
|
+
* - `rounded-md` — 12dp corner radius (CornerMedium)
|
|
7242
|
+
* - `min-h-6` — 24dp minimum height
|
|
7243
|
+
* - `max-w-80` — 320dp maximum width
|
|
7244
|
+
* - `px-4 py-3` — 16dp × 12dp padding
|
|
7245
|
+
* - `z-50` — above all page content
|
|
7123
7246
|
*
|
|
7124
|
-
* `
|
|
7125
|
-
* - true → animate-md-scale-in (component entering with scale+fade)
|
|
7126
|
-
* - false → animate-md-scale-out (component exiting with scale+fade)
|
|
7247
|
+
* Motion: same `animation` variant as plain tooltip.
|
|
7127
7248
|
*/
|
|
7128
7249
|
declare const richTooltipVariants: (props?: ({
|
|
7129
|
-
|
|
7250
|
+
animation?: "none" | "enter" | "exit" | null | undefined;
|
|
7130
7251
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7131
|
-
/** Variant prop types inferred from `tooltipVariants`. */
|
|
7132
7252
|
type TooltipVariants = VariantProps<typeof tooltipVariants>;
|
|
7133
|
-
/** Variant prop types inferred from `richTooltipVariants`. */
|
|
7134
7253
|
type RichTooltipVariants = VariantProps<typeof richTooltipVariants>;
|
|
7135
7254
|
|
|
7136
7255
|
/**
|