@tinybigui/react 0.9.0 → 0.11.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 +16 -16
- package/dist/index.cjs +213 -166
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -34
- package/dist/index.d.ts +102 -34
- package/dist/index.js +213 -166
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -598,6 +598,9 @@ interface AppBarProps {
|
|
|
598
598
|
* Renders a `<header role="banner">` and manages scroll elevation state.
|
|
599
599
|
* Use this for full visual control when the styled `AppBar` is not sufficient.
|
|
600
600
|
*
|
|
601
|
+
* Extends `React.HTMLAttributes<HTMLElement>` so all standard HTML attributes
|
|
602
|
+
* (including `data-*` attributes) are forwarded to the underlying `<header>`.
|
|
603
|
+
*
|
|
601
604
|
* @example
|
|
602
605
|
* ```tsx
|
|
603
606
|
* <AppBarHeadless
|
|
@@ -609,11 +612,7 @@ interface AppBarProps {
|
|
|
609
612
|
* </AppBarHeadless>
|
|
610
613
|
* ```
|
|
611
614
|
*/
|
|
612
|
-
interface AppBarHeadlessProps {
|
|
613
|
-
/**
|
|
614
|
-
* Additional CSS classes
|
|
615
|
-
*/
|
|
616
|
-
className?: string;
|
|
615
|
+
interface AppBarHeadlessProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
617
616
|
/**
|
|
618
617
|
* The content to render inside the header
|
|
619
618
|
*/
|
|
@@ -630,26 +629,41 @@ interface AppBarHeadlessProps {
|
|
|
630
629
|
}
|
|
631
630
|
|
|
632
631
|
/**
|
|
633
|
-
* Material Design 3 Top App Bar Component
|
|
632
|
+
* Material Design 3 Top App Bar Component (M3 Expressive Flexible)
|
|
634
633
|
*
|
|
635
634
|
* Provides context and actions for the current screen. Supports four size variants,
|
|
636
|
-
* a navigation icon slot, title, and trailing action icon slots.
|
|
637
|
-
* scroll-triggered elevation changes per MD3 specification.
|
|
635
|
+
* a navigation icon slot, title, optional subtitle, and trailing action icon slots.
|
|
636
|
+
* Implements scroll-triggered elevation changes per MD3 specification.
|
|
638
637
|
*
|
|
639
638
|
* **Architecture:**
|
|
640
|
-
* - Layer 3 (this file): MD3 styled, CVA variants, layout composition
|
|
639
|
+
* - Layer 3 (this file): MD3 styled, CVA slot variants, layout composition
|
|
641
640
|
* - Layer 2: `AppBarHeadless` — `<header role="banner">`, scroll state
|
|
642
641
|
* - Layer 1: React Aria via `<IconButton>` in consumer slots
|
|
643
642
|
*
|
|
643
|
+
* **Slot-based styling:**
|
|
644
|
+
* All layout and state styling follows the Variants vs States pattern:
|
|
645
|
+
* - `variant` prop drives design-time choices (height, type scale, alignment)
|
|
646
|
+
* - Scroll elevation state is emitted as `data-scrolled=""` on the root and
|
|
647
|
+
* consumed by `group-data-[scrolled]/appbar:*` selectors (presence-based)
|
|
648
|
+
* - Subtitle presence is emitted as `data-with-subtitle=""` on the root and
|
|
649
|
+
* used to grow medium/large bar heights (group-data-[with-subtitle]/appbar:*)
|
|
650
|
+
*
|
|
644
651
|
* **Key Features:**
|
|
645
652
|
* - 4 MD3 variants: small, center-aligned, medium, large
|
|
646
|
-
* -
|
|
653
|
+
* - M3 Expressive flexible: medium and large grow vertically with a subtitle
|
|
654
|
+
* (136dp / 152dp respectively), per the M3 Expressive flexible spec
|
|
647
655
|
* - Composable API: pass `<IconButton>` nodes into navigation and action slots
|
|
648
|
-
* - Scroll elevation:
|
|
656
|
+
* - Scroll elevation: bg-surface at rest → bg-surface-container + shadow-elevation-2
|
|
649
657
|
* - Controlled and uncontrolled scroll state
|
|
658
|
+
* - MD3 motion: background-color + box-shadow use standard effects spring pair
|
|
650
659
|
* - WCAG 2.1 AA: `role="banner"` landmark, keyboard accessible slots
|
|
651
660
|
* - Dark mode via existing token system
|
|
652
661
|
*
|
|
662
|
+
* **M3 Expressive Flexible subtitle type scales:**
|
|
663
|
+
* - small / center-aligned: label-medium, on-surface-variant
|
|
664
|
+
* - medium expanded: label-large, on-surface-variant
|
|
665
|
+
* - large expanded: title-medium, on-surface-variant
|
|
666
|
+
*
|
|
653
667
|
* **MD3 Accessibility (m3.material.io/components/app-bars/accessibility):**
|
|
654
668
|
* - Focus lands on the leading navigation button first (first interactive element in DOM)
|
|
655
669
|
* - Tab navigates: leading icon → trailing action icons (left to right)
|
|
@@ -682,7 +696,7 @@ interface AppBarHeadlessProps {
|
|
|
682
696
|
* onScrollStateChange={setIsScrolled}
|
|
683
697
|
* />
|
|
684
698
|
*
|
|
685
|
-
* // Medium with expanded title and subtitle
|
|
699
|
+
* // Medium with expanded title and subtitle (grows to 136dp with subtitle)
|
|
686
700
|
* <AppBar
|
|
687
701
|
* variant="medium"
|
|
688
702
|
* title="Article Title"
|
|
@@ -9178,6 +9192,22 @@ interface BottomSheetHandleProps {
|
|
|
9178
9192
|
*/
|
|
9179
9193
|
declare const BottomSheet: React$1.ForwardRefExoticComponent<BottomSheetProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
9180
9194
|
|
|
9195
|
+
/**
|
|
9196
|
+
* `BottomSheetHandle` — the draggable handle at the top of the Bottom Sheet.
|
|
9197
|
+
*
|
|
9198
|
+
* Implements the Variants-vs-States architecture used across TinyBigUI:
|
|
9199
|
+
* - Carries `group/handle` on its wrapper so child slots consume data-* selectors.
|
|
9200
|
+
* - Emits `getInteractionDataAttributes` for hover/focus/pressed states from React Aria.
|
|
9201
|
+
* - Emits `data-dragging` as a component-specific content flag (ternary encoding).
|
|
9202
|
+
* - Renders three slots inside the wrapper (stacked via absolute positioning):
|
|
9203
|
+
* 1. State layer — hover/focus/pressed/dragged opacity feedback (aria-hidden)
|
|
9204
|
+
* 2. Focus ring overlay — keyboard focus indicator (aria-hidden)
|
|
9205
|
+
* 3. Pill — the visible 32×4dp decoration (aria-hidden)
|
|
9206
|
+
*
|
|
9207
|
+
* Pointer and keyboard props are injected from `BottomSheetContext` (via `useBottomSheetDrag`).
|
|
9208
|
+
* React Aria `useHover` and `useFocusRing` are merged on top — they do not conflict with the
|
|
9209
|
+
* existing `onPointerDown`/`onPointerUp` drag handlers.
|
|
9210
|
+
*/
|
|
9181
9211
|
declare function BottomSheetHandle({ className, "aria-label": ariaLabelOverride, }: BottomSheetHandleProps): ReactElement;
|
|
9182
9212
|
declare namespace BottomSheetHandle {
|
|
9183
9213
|
var displayName: string;
|
|
@@ -9283,13 +9313,40 @@ interface UseBottomSheetDragReturn {
|
|
|
9283
9313
|
*/
|
|
9284
9314
|
declare function useBottomSheetDrag({ snapPoints, onSnapChange, onClose, }: UseBottomSheetDragOptions): UseBottomSheetDragReturn;
|
|
9285
9315
|
|
|
9316
|
+
/**
|
|
9317
|
+
* Material Design 3 Bottom Sheet Variants
|
|
9318
|
+
*
|
|
9319
|
+
* Architecture: Variants vs States
|
|
9320
|
+
* - CVA holds design-time structure only (no state variants, no state compoundVariants).
|
|
9321
|
+
* - The drag handle's interaction states are driven by data-* attributes on its wrapper
|
|
9322
|
+
* via group-data-[x]/handle Tailwind selectors in each slot's base classes.
|
|
9323
|
+
* - Content flags (data-dragging) are set explicitly by the component, not via helper.
|
|
9324
|
+
*
|
|
9325
|
+
* Slot responsibilities:
|
|
9326
|
+
* bottomSheetVariants — fixed container; surface, shape, elevation, snap spring
|
|
9327
|
+
* bottomSheetScrimVariants — modal scrim overlay; opacity fade (screen-level token)
|
|
9328
|
+
* bottomSheetAnimationVariants — enter/exit animation state machine classes
|
|
9329
|
+
* bottomSheetHandleWrapperVariants — 48dp touch target; carries `group/handle`; data-* host
|
|
9330
|
+
* bottomSheetHandleStateLayerVariants — hover/focus/pressed/dragged opacity ring around pill
|
|
9331
|
+
* bottomSheetHandleFocusRingVariants — keyboard focus outline overlay (opacity-driven)
|
|
9332
|
+
* bottomSheetHandlePillVariants — 32×4dp pill decoration; pointer-events-none
|
|
9333
|
+
*
|
|
9334
|
+
* MD3 Spec:
|
|
9335
|
+
* Container surface: surface-container-low, elevation level-1
|
|
9336
|
+
* Shape: extra-large top corners (28dp), square bottom (attached to screen edge)
|
|
9337
|
+
* Width: full width up to 640dp; centered at max-width 640dp on wider viewports
|
|
9338
|
+
* Top margin: 72dp default, 56dp when viewport > 640dp
|
|
9339
|
+
* Drag handle: 32dp × 4dp, on-surface-variant, centered, 22dp top/bottom padding → 48dp target
|
|
9340
|
+
* Scrim: bg-scrim, 32% opacity
|
|
9341
|
+
* State-layer opacities: hover 8% | focus 10% | pressed 10% | dragged 16%
|
|
9342
|
+
*/
|
|
9286
9343
|
/**
|
|
9287
9344
|
* CVA animation state variants for the Bottom Sheet panel.
|
|
9288
9345
|
*
|
|
9289
9346
|
* Motion decision rationale:
|
|
9290
9347
|
* - Bottom sheet is a standard-size component → `default` speed tier
|
|
9291
9348
|
* - Slides in/out of screen → composite `animate-md-*` utilities (not manual spring tokens)
|
|
9292
|
-
* - Scrim opacity is an effects property → `duration-short4 ease-standard` (legacy screen-level
|
|
9349
|
+
* - Scrim opacity is an effects property → `duration-short4 ease-standard` (legacy screen-level)
|
|
9293
9350
|
* - Snap spring is a spatial on-screen transition → `ease-spring-standard-default-spatial` +
|
|
9294
9351
|
* `duration-spring-standard-default-spatial` (applied in bottomSheetVariants base)
|
|
9295
9352
|
* - Standard personality (not expressive) — sheets are utility UI, not moments of delight
|
|
@@ -9299,53 +9356,64 @@ declare const bottomSheetAnimationVariants: (props?: ({
|
|
|
9299
9356
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9300
9357
|
type BottomSheetAnimationVariants = VariantProps<typeof bottomSheetAnimationVariants>;
|
|
9301
9358
|
/**
|
|
9302
|
-
*
|
|
9359
|
+
* Root container — the bottom sheet panel.
|
|
9303
9360
|
*
|
|
9304
9361
|
* MD3 tokens applied:
|
|
9305
9362
|
* - Surface: bg-surface-container-low
|
|
9306
9363
|
* - Elevation: shadow-elevation-1
|
|
9307
|
-
* - Shape: rounded-t-xl
|
|
9308
|
-
* - Width: full width up to 640dp
|
|
9309
|
-
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
9312
|
-
*
|
|
9313
|
-
*
|
|
9314
|
-
*
|
|
9364
|
+
* - Shape: extra-large top corners (28dp via rounded-t-xl), square bottom (attached to edge)
|
|
9365
|
+
* - Width: full width up to 640dp (mx-auto + w-[640px] max-w-full)
|
|
9366
|
+
* - Height: snap-point driven via inline style; constrained by max-height to enforce top margin
|
|
9367
|
+
* Default: 72dp top margin → max-h-[calc(100vh-72px)]
|
|
9368
|
+
* Wide (> 640dp): 56dp top margin → sm:max-h-[calc(100vh-56px)]
|
|
9369
|
+
* - Snap spring: spatial on-screen transition → spring-standard default spatial pair
|
|
9370
|
+
* data-[dragging]:transition-none suppresses spring during active drag (1:1 pointer tracking)
|
|
9371
|
+
*
|
|
9372
|
+
* NOTE: overflow-hidden clips content during height transitions. The handle's state layer and
|
|
9373
|
+
* focus-ring overlay are sized/positioned to fit within the wrapper, so they are not clipped.
|
|
9315
9374
|
*/
|
|
9316
9375
|
declare const bottomSheetVariants: (props?: ({
|
|
9317
9376
|
variant?: "standard" | "modal" | null | undefined;
|
|
9318
9377
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9319
9378
|
type BottomSheetVariants = VariantProps<typeof bottomSheetVariants>;
|
|
9320
9379
|
/**
|
|
9321
|
-
*
|
|
9380
|
+
* Scrim overlay (modal variant only).
|
|
9322
9381
|
*
|
|
9323
9382
|
* MD3 tokens applied:
|
|
9324
9383
|
* - bg-scrim: scrim surface role
|
|
9325
9384
|
* - opacity-32: 32% opacity per MD3 spec
|
|
9326
|
-
* - Transition: opacity fade (scrim is
|
|
9385
|
+
* - Transition: opacity fade (scrim is a screen-level effects property → legacy duration tokens)
|
|
9327
9386
|
*/
|
|
9328
9387
|
declare const bottomSheetScrimVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9329
9388
|
type BottomSheetScrimVariants = VariantProps<typeof bottomSheetScrimVariants>;
|
|
9330
9389
|
/**
|
|
9331
|
-
*
|
|
9390
|
+
* Drag handle wrapper — 48dp touch target area + group scope host.
|
|
9391
|
+
*
|
|
9392
|
+
* Carries `group/handle` so all handle child slots can consume data-* interaction
|
|
9393
|
+
* states via `group-data-[x]/handle:` Tailwind selectors without any CVA variant props.
|
|
9332
9394
|
*
|
|
9333
|
-
* MD3 spec:
|
|
9334
|
-
*
|
|
9395
|
+
* MD3 spec: 22dp top + 4dp handle + 22dp bottom = 48dp interaction zone.
|
|
9396
|
+
* NOTE: py-[22px] is a measurement-derived value from MD3 spec; permitted exception.
|
|
9397
|
+
*
|
|
9398
|
+
* `relative` provides positioning context for the state layer and focus ring overlays.
|
|
9399
|
+
* `focus-visible:outline-none` suppresses the browser default — the focus ring overlay
|
|
9400
|
+
* in `bottomSheetHandleFocusRingVariants` provides the MD3-spec visible indicator instead.
|
|
9335
9401
|
*/
|
|
9336
9402
|
declare const bottomSheetHandleWrapperVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9403
|
+
type BottomSheetHandleWrapperVariants = VariantProps<typeof bottomSheetHandleWrapperVariants>;
|
|
9337
9404
|
/**
|
|
9338
|
-
*
|
|
9405
|
+
* Drag handle pill — the visible 32×4dp decoration.
|
|
9339
9406
|
*
|
|
9340
9407
|
* MD3 tokens applied:
|
|
9341
|
-
* - bg-on-surface-variant: handle color
|
|
9342
|
-
* - w-8: 32dp
|
|
9343
|
-
* -
|
|
9344
|
-
*
|
|
9345
|
-
* -
|
|
9408
|
+
* - bg-on-surface-variant: handle color (muted, low-emphasis by role — no opacity override needed)
|
|
9409
|
+
* - w-8 / h-1: 32dp × 4dp per MD3 spec (measurement-derived; permitted exception)
|
|
9410
|
+
* - rounded-full: fully-rounded pill shape
|
|
9411
|
+
*
|
|
9412
|
+
* `pointer-events-none` — all interaction is handled by the wrapper.
|
|
9413
|
+
* `relative z-10` — renders above the state layer overlay.
|
|
9346
9414
|
*/
|
|
9347
9415
|
declare const bottomSheetHandlePillVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9348
|
-
type BottomSheetHandleVariants =
|
|
9416
|
+
type BottomSheetHandleVariants = BottomSheetHandleWrapperVariants;
|
|
9349
9417
|
|
|
9350
9418
|
/**
|
|
9351
9419
|
* Variant of the MD3 Time Picker.
|
package/dist/index.d.ts
CHANGED
|
@@ -598,6 +598,9 @@ interface AppBarProps {
|
|
|
598
598
|
* Renders a `<header role="banner">` and manages scroll elevation state.
|
|
599
599
|
* Use this for full visual control when the styled `AppBar` is not sufficient.
|
|
600
600
|
*
|
|
601
|
+
* Extends `React.HTMLAttributes<HTMLElement>` so all standard HTML attributes
|
|
602
|
+
* (including `data-*` attributes) are forwarded to the underlying `<header>`.
|
|
603
|
+
*
|
|
601
604
|
* @example
|
|
602
605
|
* ```tsx
|
|
603
606
|
* <AppBarHeadless
|
|
@@ -609,11 +612,7 @@ interface AppBarProps {
|
|
|
609
612
|
* </AppBarHeadless>
|
|
610
613
|
* ```
|
|
611
614
|
*/
|
|
612
|
-
interface AppBarHeadlessProps {
|
|
613
|
-
/**
|
|
614
|
-
* Additional CSS classes
|
|
615
|
-
*/
|
|
616
|
-
className?: string;
|
|
615
|
+
interface AppBarHeadlessProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
617
616
|
/**
|
|
618
617
|
* The content to render inside the header
|
|
619
618
|
*/
|
|
@@ -630,26 +629,41 @@ interface AppBarHeadlessProps {
|
|
|
630
629
|
}
|
|
631
630
|
|
|
632
631
|
/**
|
|
633
|
-
* Material Design 3 Top App Bar Component
|
|
632
|
+
* Material Design 3 Top App Bar Component (M3 Expressive Flexible)
|
|
634
633
|
*
|
|
635
634
|
* Provides context and actions for the current screen. Supports four size variants,
|
|
636
|
-
* a navigation icon slot, title, and trailing action icon slots.
|
|
637
|
-
* scroll-triggered elevation changes per MD3 specification.
|
|
635
|
+
* a navigation icon slot, title, optional subtitle, and trailing action icon slots.
|
|
636
|
+
* Implements scroll-triggered elevation changes per MD3 specification.
|
|
638
637
|
*
|
|
639
638
|
* **Architecture:**
|
|
640
|
-
* - Layer 3 (this file): MD3 styled, CVA variants, layout composition
|
|
639
|
+
* - Layer 3 (this file): MD3 styled, CVA slot variants, layout composition
|
|
641
640
|
* - Layer 2: `AppBarHeadless` — `<header role="banner">`, scroll state
|
|
642
641
|
* - Layer 1: React Aria via `<IconButton>` in consumer slots
|
|
643
642
|
*
|
|
643
|
+
* **Slot-based styling:**
|
|
644
|
+
* All layout and state styling follows the Variants vs States pattern:
|
|
645
|
+
* - `variant` prop drives design-time choices (height, type scale, alignment)
|
|
646
|
+
* - Scroll elevation state is emitted as `data-scrolled=""` on the root and
|
|
647
|
+
* consumed by `group-data-[scrolled]/appbar:*` selectors (presence-based)
|
|
648
|
+
* - Subtitle presence is emitted as `data-with-subtitle=""` on the root and
|
|
649
|
+
* used to grow medium/large bar heights (group-data-[with-subtitle]/appbar:*)
|
|
650
|
+
*
|
|
644
651
|
* **Key Features:**
|
|
645
652
|
* - 4 MD3 variants: small, center-aligned, medium, large
|
|
646
|
-
* -
|
|
653
|
+
* - M3 Expressive flexible: medium and large grow vertically with a subtitle
|
|
654
|
+
* (136dp / 152dp respectively), per the M3 Expressive flexible spec
|
|
647
655
|
* - Composable API: pass `<IconButton>` nodes into navigation and action slots
|
|
648
|
-
* - Scroll elevation:
|
|
656
|
+
* - Scroll elevation: bg-surface at rest → bg-surface-container + shadow-elevation-2
|
|
649
657
|
* - Controlled and uncontrolled scroll state
|
|
658
|
+
* - MD3 motion: background-color + box-shadow use standard effects spring pair
|
|
650
659
|
* - WCAG 2.1 AA: `role="banner"` landmark, keyboard accessible slots
|
|
651
660
|
* - Dark mode via existing token system
|
|
652
661
|
*
|
|
662
|
+
* **M3 Expressive Flexible subtitle type scales:**
|
|
663
|
+
* - small / center-aligned: label-medium, on-surface-variant
|
|
664
|
+
* - medium expanded: label-large, on-surface-variant
|
|
665
|
+
* - large expanded: title-medium, on-surface-variant
|
|
666
|
+
*
|
|
653
667
|
* **MD3 Accessibility (m3.material.io/components/app-bars/accessibility):**
|
|
654
668
|
* - Focus lands on the leading navigation button first (first interactive element in DOM)
|
|
655
669
|
* - Tab navigates: leading icon → trailing action icons (left to right)
|
|
@@ -682,7 +696,7 @@ interface AppBarHeadlessProps {
|
|
|
682
696
|
* onScrollStateChange={setIsScrolled}
|
|
683
697
|
* />
|
|
684
698
|
*
|
|
685
|
-
* // Medium with expanded title and subtitle
|
|
699
|
+
* // Medium with expanded title and subtitle (grows to 136dp with subtitle)
|
|
686
700
|
* <AppBar
|
|
687
701
|
* variant="medium"
|
|
688
702
|
* title="Article Title"
|
|
@@ -9178,6 +9192,22 @@ interface BottomSheetHandleProps {
|
|
|
9178
9192
|
*/
|
|
9179
9193
|
declare const BottomSheet: React$1.ForwardRefExoticComponent<BottomSheetProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
9180
9194
|
|
|
9195
|
+
/**
|
|
9196
|
+
* `BottomSheetHandle` — the draggable handle at the top of the Bottom Sheet.
|
|
9197
|
+
*
|
|
9198
|
+
* Implements the Variants-vs-States architecture used across TinyBigUI:
|
|
9199
|
+
* - Carries `group/handle` on its wrapper so child slots consume data-* selectors.
|
|
9200
|
+
* - Emits `getInteractionDataAttributes` for hover/focus/pressed states from React Aria.
|
|
9201
|
+
* - Emits `data-dragging` as a component-specific content flag (ternary encoding).
|
|
9202
|
+
* - Renders three slots inside the wrapper (stacked via absolute positioning):
|
|
9203
|
+
* 1. State layer — hover/focus/pressed/dragged opacity feedback (aria-hidden)
|
|
9204
|
+
* 2. Focus ring overlay — keyboard focus indicator (aria-hidden)
|
|
9205
|
+
* 3. Pill — the visible 32×4dp decoration (aria-hidden)
|
|
9206
|
+
*
|
|
9207
|
+
* Pointer and keyboard props are injected from `BottomSheetContext` (via `useBottomSheetDrag`).
|
|
9208
|
+
* React Aria `useHover` and `useFocusRing` are merged on top — they do not conflict with the
|
|
9209
|
+
* existing `onPointerDown`/`onPointerUp` drag handlers.
|
|
9210
|
+
*/
|
|
9181
9211
|
declare function BottomSheetHandle({ className, "aria-label": ariaLabelOverride, }: BottomSheetHandleProps): ReactElement;
|
|
9182
9212
|
declare namespace BottomSheetHandle {
|
|
9183
9213
|
var displayName: string;
|
|
@@ -9283,13 +9313,40 @@ interface UseBottomSheetDragReturn {
|
|
|
9283
9313
|
*/
|
|
9284
9314
|
declare function useBottomSheetDrag({ snapPoints, onSnapChange, onClose, }: UseBottomSheetDragOptions): UseBottomSheetDragReturn;
|
|
9285
9315
|
|
|
9316
|
+
/**
|
|
9317
|
+
* Material Design 3 Bottom Sheet Variants
|
|
9318
|
+
*
|
|
9319
|
+
* Architecture: Variants vs States
|
|
9320
|
+
* - CVA holds design-time structure only (no state variants, no state compoundVariants).
|
|
9321
|
+
* - The drag handle's interaction states are driven by data-* attributes on its wrapper
|
|
9322
|
+
* via group-data-[x]/handle Tailwind selectors in each slot's base classes.
|
|
9323
|
+
* - Content flags (data-dragging) are set explicitly by the component, not via helper.
|
|
9324
|
+
*
|
|
9325
|
+
* Slot responsibilities:
|
|
9326
|
+
* bottomSheetVariants — fixed container; surface, shape, elevation, snap spring
|
|
9327
|
+
* bottomSheetScrimVariants — modal scrim overlay; opacity fade (screen-level token)
|
|
9328
|
+
* bottomSheetAnimationVariants — enter/exit animation state machine classes
|
|
9329
|
+
* bottomSheetHandleWrapperVariants — 48dp touch target; carries `group/handle`; data-* host
|
|
9330
|
+
* bottomSheetHandleStateLayerVariants — hover/focus/pressed/dragged opacity ring around pill
|
|
9331
|
+
* bottomSheetHandleFocusRingVariants — keyboard focus outline overlay (opacity-driven)
|
|
9332
|
+
* bottomSheetHandlePillVariants — 32×4dp pill decoration; pointer-events-none
|
|
9333
|
+
*
|
|
9334
|
+
* MD3 Spec:
|
|
9335
|
+
* Container surface: surface-container-low, elevation level-1
|
|
9336
|
+
* Shape: extra-large top corners (28dp), square bottom (attached to screen edge)
|
|
9337
|
+
* Width: full width up to 640dp; centered at max-width 640dp on wider viewports
|
|
9338
|
+
* Top margin: 72dp default, 56dp when viewport > 640dp
|
|
9339
|
+
* Drag handle: 32dp × 4dp, on-surface-variant, centered, 22dp top/bottom padding → 48dp target
|
|
9340
|
+
* Scrim: bg-scrim, 32% opacity
|
|
9341
|
+
* State-layer opacities: hover 8% | focus 10% | pressed 10% | dragged 16%
|
|
9342
|
+
*/
|
|
9286
9343
|
/**
|
|
9287
9344
|
* CVA animation state variants for the Bottom Sheet panel.
|
|
9288
9345
|
*
|
|
9289
9346
|
* Motion decision rationale:
|
|
9290
9347
|
* - Bottom sheet is a standard-size component → `default` speed tier
|
|
9291
9348
|
* - Slides in/out of screen → composite `animate-md-*` utilities (not manual spring tokens)
|
|
9292
|
-
* - Scrim opacity is an effects property → `duration-short4 ease-standard` (legacy screen-level
|
|
9349
|
+
* - Scrim opacity is an effects property → `duration-short4 ease-standard` (legacy screen-level)
|
|
9293
9350
|
* - Snap spring is a spatial on-screen transition → `ease-spring-standard-default-spatial` +
|
|
9294
9351
|
* `duration-spring-standard-default-spatial` (applied in bottomSheetVariants base)
|
|
9295
9352
|
* - Standard personality (not expressive) — sheets are utility UI, not moments of delight
|
|
@@ -9299,53 +9356,64 @@ declare const bottomSheetAnimationVariants: (props?: ({
|
|
|
9299
9356
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9300
9357
|
type BottomSheetAnimationVariants = VariantProps<typeof bottomSheetAnimationVariants>;
|
|
9301
9358
|
/**
|
|
9302
|
-
*
|
|
9359
|
+
* Root container — the bottom sheet panel.
|
|
9303
9360
|
*
|
|
9304
9361
|
* MD3 tokens applied:
|
|
9305
9362
|
* - Surface: bg-surface-container-low
|
|
9306
9363
|
* - Elevation: shadow-elevation-1
|
|
9307
|
-
* - Shape: rounded-t-xl
|
|
9308
|
-
* - Width: full width up to 640dp
|
|
9309
|
-
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
9312
|
-
*
|
|
9313
|
-
*
|
|
9314
|
-
*
|
|
9364
|
+
* - Shape: extra-large top corners (28dp via rounded-t-xl), square bottom (attached to edge)
|
|
9365
|
+
* - Width: full width up to 640dp (mx-auto + w-[640px] max-w-full)
|
|
9366
|
+
* - Height: snap-point driven via inline style; constrained by max-height to enforce top margin
|
|
9367
|
+
* Default: 72dp top margin → max-h-[calc(100vh-72px)]
|
|
9368
|
+
* Wide (> 640dp): 56dp top margin → sm:max-h-[calc(100vh-56px)]
|
|
9369
|
+
* - Snap spring: spatial on-screen transition → spring-standard default spatial pair
|
|
9370
|
+
* data-[dragging]:transition-none suppresses spring during active drag (1:1 pointer tracking)
|
|
9371
|
+
*
|
|
9372
|
+
* NOTE: overflow-hidden clips content during height transitions. The handle's state layer and
|
|
9373
|
+
* focus-ring overlay are sized/positioned to fit within the wrapper, so they are not clipped.
|
|
9315
9374
|
*/
|
|
9316
9375
|
declare const bottomSheetVariants: (props?: ({
|
|
9317
9376
|
variant?: "standard" | "modal" | null | undefined;
|
|
9318
9377
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9319
9378
|
type BottomSheetVariants = VariantProps<typeof bottomSheetVariants>;
|
|
9320
9379
|
/**
|
|
9321
|
-
*
|
|
9380
|
+
* Scrim overlay (modal variant only).
|
|
9322
9381
|
*
|
|
9323
9382
|
* MD3 tokens applied:
|
|
9324
9383
|
* - bg-scrim: scrim surface role
|
|
9325
9384
|
* - opacity-32: 32% opacity per MD3 spec
|
|
9326
|
-
* - Transition: opacity fade (scrim is
|
|
9385
|
+
* - Transition: opacity fade (scrim is a screen-level effects property → legacy duration tokens)
|
|
9327
9386
|
*/
|
|
9328
9387
|
declare const bottomSheetScrimVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9329
9388
|
type BottomSheetScrimVariants = VariantProps<typeof bottomSheetScrimVariants>;
|
|
9330
9389
|
/**
|
|
9331
|
-
*
|
|
9390
|
+
* Drag handle wrapper — 48dp touch target area + group scope host.
|
|
9391
|
+
*
|
|
9392
|
+
* Carries `group/handle` so all handle child slots can consume data-* interaction
|
|
9393
|
+
* states via `group-data-[x]/handle:` Tailwind selectors without any CVA variant props.
|
|
9332
9394
|
*
|
|
9333
|
-
* MD3 spec:
|
|
9334
|
-
*
|
|
9395
|
+
* MD3 spec: 22dp top + 4dp handle + 22dp bottom = 48dp interaction zone.
|
|
9396
|
+
* NOTE: py-[22px] is a measurement-derived value from MD3 spec; permitted exception.
|
|
9397
|
+
*
|
|
9398
|
+
* `relative` provides positioning context for the state layer and focus ring overlays.
|
|
9399
|
+
* `focus-visible:outline-none` suppresses the browser default — the focus ring overlay
|
|
9400
|
+
* in `bottomSheetHandleFocusRingVariants` provides the MD3-spec visible indicator instead.
|
|
9335
9401
|
*/
|
|
9336
9402
|
declare const bottomSheetHandleWrapperVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9403
|
+
type BottomSheetHandleWrapperVariants = VariantProps<typeof bottomSheetHandleWrapperVariants>;
|
|
9337
9404
|
/**
|
|
9338
|
-
*
|
|
9405
|
+
* Drag handle pill — the visible 32×4dp decoration.
|
|
9339
9406
|
*
|
|
9340
9407
|
* MD3 tokens applied:
|
|
9341
|
-
* - bg-on-surface-variant: handle color
|
|
9342
|
-
* - w-8: 32dp
|
|
9343
|
-
* -
|
|
9344
|
-
*
|
|
9345
|
-
* -
|
|
9408
|
+
* - bg-on-surface-variant: handle color (muted, low-emphasis by role — no opacity override needed)
|
|
9409
|
+
* - w-8 / h-1: 32dp × 4dp per MD3 spec (measurement-derived; permitted exception)
|
|
9410
|
+
* - rounded-full: fully-rounded pill shape
|
|
9411
|
+
*
|
|
9412
|
+
* `pointer-events-none` — all interaction is handled by the wrapper.
|
|
9413
|
+
* `relative z-10` — renders above the state layer overlay.
|
|
9346
9414
|
*/
|
|
9347
9415
|
declare const bottomSheetHandlePillVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9348
|
-
type BottomSheetHandleVariants =
|
|
9416
|
+
type BottomSheetHandleVariants = BottomSheetHandleWrapperVariants;
|
|
9349
9417
|
|
|
9350
9418
|
/**
|
|
9351
9419
|
* Variant of the MD3 Time Picker.
|