@tinybigui/react 0.22.0 → 0.23.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 +527 -234
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -13
- package/dist/index.d.ts +43 -13
- package/dist/index.js +527 -234
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -19
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -756,12 +756,21 @@ declare const AppBarHeadless: React$1.ForwardRefExoticComponent<AppBarHeadlessPr
|
|
|
756
756
|
* - Content flags (data-with-icon, data-loading) are set explicitly by the component.
|
|
757
757
|
*
|
|
758
758
|
* Slot responsibilities:
|
|
759
|
-
* buttonVariants — root <button>; shape, color, elevation
|
|
759
|
+
* buttonVariants — root <button>; shape, text color, elevation (shadow)
|
|
760
|
+
* buttonContainerVariants — absolute inset child; background color + disabled bg override
|
|
760
761
|
* buttonStateLayerVariants — hover/focus/press opacity ring (absolute inset overlay)
|
|
761
762
|
* buttonFocusRingVariants — keyboard focus outline, MUST NOT be inside overflow-hidden
|
|
762
763
|
* buttonIconVariants — leading/trailing icon wrapper
|
|
763
764
|
* buttonLabelVariants — label text slot
|
|
764
765
|
*
|
|
766
|
+
* Why background lives on a child slot (buttonContainerVariants) rather than the root:
|
|
767
|
+
* Tailwind `group-data-[x]/button:` generates a descendant combinator selector —
|
|
768
|
+
* `.group\/button[data-x] .target`. The root <button> IS the group host and cannot
|
|
769
|
+
* be its own descendant, so group selectors cannot target it directly. Moving the
|
|
770
|
+
* background to an absolutely-positioned child span lets us use the proven
|
|
771
|
+
* `group-data-[disabled]/button:bg-on-surface/12` pattern (same as Switch track)
|
|
772
|
+
* to override the container background on disabled, guaranteeing correct specificity.
|
|
773
|
+
*
|
|
765
774
|
* MD3 Spec:
|
|
766
775
|
* Shape: rounded-full (corner-full)
|
|
767
776
|
* Height: 32dp small | 40dp medium | 56dp large
|
|
@@ -780,12 +789,19 @@ declare const AppBarHeadless: React$1.ForwardRefExoticComponent<AppBarHeadlessPr
|
|
|
780
789
|
/**
|
|
781
790
|
* Root <button> element.
|
|
782
791
|
*
|
|
792
|
+
* Owns: shape, text color, elevation (box-shadow), cursor, layout.
|
|
793
|
+
* Does NOT own background-color — that lives on buttonContainerVariants so
|
|
794
|
+
* the group-data disabled override can reach it via descendant selector.
|
|
795
|
+
*
|
|
783
796
|
* IMPORTANT — overflow is intentionally NOT on the root.
|
|
784
797
|
* Overflow clipping is delegated to the ripple container and state layer
|
|
785
798
|
* via `overflow-hidden rounded-[inherit]` on those children. This lets the
|
|
786
799
|
* focus ring span (`inset-[-3px]`) extend outside the button boundary and
|
|
787
800
|
* remain fully visible — if overflow-hidden were on the root it would be
|
|
788
801
|
* clipped to zero width.
|
|
802
|
+
*
|
|
803
|
+
* Elevation state classes use self-targeting `data-[x]:` (not group-data)
|
|
804
|
+
* because the root is the group host and cannot be its own descendant.
|
|
789
805
|
*/
|
|
790
806
|
declare const buttonVariants: (props?: ({
|
|
791
807
|
variant?: "text" | "filled" | "outlined" | "tonal" | "elevated" | null | undefined;
|
|
@@ -5331,10 +5347,17 @@ declare namespace MenuTrigger {
|
|
|
5331
5347
|
/**
|
|
5332
5348
|
* MD3 styled MenuItem component (Layer 3).
|
|
5333
5349
|
*
|
|
5334
|
-
*
|
|
5335
|
-
*
|
|
5336
|
-
*
|
|
5337
|
-
*
|
|
5350
|
+
* Slot architecture (mirrors Button/Switch):
|
|
5351
|
+
* root (group/menuitem) — layout, cursor, color, density height
|
|
5352
|
+
* highlight (z-0) — selected/active background fill
|
|
5353
|
+
* stateLayer (z-[1]) — hover/press opacity overlay
|
|
5354
|
+
* focusRing (z-[2]) — keyboard focus outline (inset, not on state-layer)
|
|
5355
|
+
* ripple (z-[3]) — press ripple feedback
|
|
5356
|
+
* content (z-10) — icon, label, trailing text/icon, description
|
|
5357
|
+
*
|
|
5358
|
+
* All interaction/selection styles are driven by data-* attributes that RAC
|
|
5359
|
+
* MenuItem emits natively (data-hovered, data-pressed, data-focus-visible,
|
|
5360
|
+
* data-selected, data-disabled, data-open) consumed via group-data selectors.
|
|
5338
5361
|
*
|
|
5339
5362
|
* @example
|
|
5340
5363
|
* ```tsx
|
|
@@ -5351,6 +5374,10 @@ declare const MenuItem: React$1.ForwardRefExoticComponent<MenuItemProps & React$
|
|
|
5351
5374
|
* Groups related `MenuItem` elements with an optional section header and an
|
|
5352
5375
|
* optional top divider.
|
|
5353
5376
|
*
|
|
5377
|
+
* The section header color adapts to the `colorScheme` from `MenuContext`:
|
|
5378
|
+
* standard → text-on-surface-variant
|
|
5379
|
+
* vibrant → text-on-tertiary-container
|
|
5380
|
+
*
|
|
5354
5381
|
* **Implementation note**: The divider is rendered as a SIBLING BEFORE the
|
|
5355
5382
|
* `RACMenuSection`, NOT inside it. RAC's `Section`/`MenuSection` only accepts
|
|
5356
5383
|
* `Header` and `MenuItem` children — placing a `Separator` inside the section
|
|
@@ -5435,17 +5462,20 @@ declare function HeadlessMenuDivider({ className, ...props }: SeparatorProps & {
|
|
|
5435
5462
|
/**
|
|
5436
5463
|
* Material Design 3 Menu container variants (CVA).
|
|
5437
5464
|
*
|
|
5438
|
-
*
|
|
5439
|
-
*
|
|
5465
|
+
* Architecture: Variants vs States
|
|
5466
|
+
* - CVA holds design-time structure only (menuStyle, colorScheme).
|
|
5467
|
+
* - Animation (enter/exit motion) lives on `menuPopoverVariants` which is
|
|
5468
|
+
* applied to the RAC Popover element — the element where RAC actually emits
|
|
5469
|
+
* data-entering, data-exiting, and data-placement.
|
|
5440
5470
|
*
|
|
5441
5471
|
* Shape per menuStyle:
|
|
5442
|
-
*
|
|
5443
|
-
*
|
|
5472
|
+
* baseline: `rounded-xs` (4dp extra-small)
|
|
5473
|
+
* vertical: `rounded-lg` (16dp large, MD3 Expressive)
|
|
5444
5474
|
*
|
|
5445
|
-
* Background per
|
|
5446
|
-
*
|
|
5447
|
-
* -
|
|
5448
|
-
*
|
|
5475
|
+
* Background per menuStyle:
|
|
5476
|
+
* baseline: bg-surface-container (solid, houses all items)
|
|
5477
|
+
* vertical: bg-transparent (items paint their own segment cards; gap reveals
|
|
5478
|
+
* the page background between segments — acting as the divider)
|
|
5449
5479
|
*
|
|
5450
5480
|
* @see https://m3.material.io/components/menus/specs
|
|
5451
5481
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -756,12 +756,21 @@ declare const AppBarHeadless: React$1.ForwardRefExoticComponent<AppBarHeadlessPr
|
|
|
756
756
|
* - Content flags (data-with-icon, data-loading) are set explicitly by the component.
|
|
757
757
|
*
|
|
758
758
|
* Slot responsibilities:
|
|
759
|
-
* buttonVariants — root <button>; shape, color, elevation
|
|
759
|
+
* buttonVariants — root <button>; shape, text color, elevation (shadow)
|
|
760
|
+
* buttonContainerVariants — absolute inset child; background color + disabled bg override
|
|
760
761
|
* buttonStateLayerVariants — hover/focus/press opacity ring (absolute inset overlay)
|
|
761
762
|
* buttonFocusRingVariants — keyboard focus outline, MUST NOT be inside overflow-hidden
|
|
762
763
|
* buttonIconVariants — leading/trailing icon wrapper
|
|
763
764
|
* buttonLabelVariants — label text slot
|
|
764
765
|
*
|
|
766
|
+
* Why background lives on a child slot (buttonContainerVariants) rather than the root:
|
|
767
|
+
* Tailwind `group-data-[x]/button:` generates a descendant combinator selector —
|
|
768
|
+
* `.group\/button[data-x] .target`. The root <button> IS the group host and cannot
|
|
769
|
+
* be its own descendant, so group selectors cannot target it directly. Moving the
|
|
770
|
+
* background to an absolutely-positioned child span lets us use the proven
|
|
771
|
+
* `group-data-[disabled]/button:bg-on-surface/12` pattern (same as Switch track)
|
|
772
|
+
* to override the container background on disabled, guaranteeing correct specificity.
|
|
773
|
+
*
|
|
765
774
|
* MD3 Spec:
|
|
766
775
|
* Shape: rounded-full (corner-full)
|
|
767
776
|
* Height: 32dp small | 40dp medium | 56dp large
|
|
@@ -780,12 +789,19 @@ declare const AppBarHeadless: React$1.ForwardRefExoticComponent<AppBarHeadlessPr
|
|
|
780
789
|
/**
|
|
781
790
|
* Root <button> element.
|
|
782
791
|
*
|
|
792
|
+
* Owns: shape, text color, elevation (box-shadow), cursor, layout.
|
|
793
|
+
* Does NOT own background-color — that lives on buttonContainerVariants so
|
|
794
|
+
* the group-data disabled override can reach it via descendant selector.
|
|
795
|
+
*
|
|
783
796
|
* IMPORTANT — overflow is intentionally NOT on the root.
|
|
784
797
|
* Overflow clipping is delegated to the ripple container and state layer
|
|
785
798
|
* via `overflow-hidden rounded-[inherit]` on those children. This lets the
|
|
786
799
|
* focus ring span (`inset-[-3px]`) extend outside the button boundary and
|
|
787
800
|
* remain fully visible — if overflow-hidden were on the root it would be
|
|
788
801
|
* clipped to zero width.
|
|
802
|
+
*
|
|
803
|
+
* Elevation state classes use self-targeting `data-[x]:` (not group-data)
|
|
804
|
+
* because the root is the group host and cannot be its own descendant.
|
|
789
805
|
*/
|
|
790
806
|
declare const buttonVariants: (props?: ({
|
|
791
807
|
variant?: "text" | "filled" | "outlined" | "tonal" | "elevated" | null | undefined;
|
|
@@ -5331,10 +5347,17 @@ declare namespace MenuTrigger {
|
|
|
5331
5347
|
/**
|
|
5332
5348
|
* MD3 styled MenuItem component (Layer 3).
|
|
5333
5349
|
*
|
|
5334
|
-
*
|
|
5335
|
-
*
|
|
5336
|
-
*
|
|
5337
|
-
*
|
|
5350
|
+
* Slot architecture (mirrors Button/Switch):
|
|
5351
|
+
* root (group/menuitem) — layout, cursor, color, density height
|
|
5352
|
+
* highlight (z-0) — selected/active background fill
|
|
5353
|
+
* stateLayer (z-[1]) — hover/press opacity overlay
|
|
5354
|
+
* focusRing (z-[2]) — keyboard focus outline (inset, not on state-layer)
|
|
5355
|
+
* ripple (z-[3]) — press ripple feedback
|
|
5356
|
+
* content (z-10) — icon, label, trailing text/icon, description
|
|
5357
|
+
*
|
|
5358
|
+
* All interaction/selection styles are driven by data-* attributes that RAC
|
|
5359
|
+
* MenuItem emits natively (data-hovered, data-pressed, data-focus-visible,
|
|
5360
|
+
* data-selected, data-disabled, data-open) consumed via group-data selectors.
|
|
5338
5361
|
*
|
|
5339
5362
|
* @example
|
|
5340
5363
|
* ```tsx
|
|
@@ -5351,6 +5374,10 @@ declare const MenuItem: React$1.ForwardRefExoticComponent<MenuItemProps & React$
|
|
|
5351
5374
|
* Groups related `MenuItem` elements with an optional section header and an
|
|
5352
5375
|
* optional top divider.
|
|
5353
5376
|
*
|
|
5377
|
+
* The section header color adapts to the `colorScheme` from `MenuContext`:
|
|
5378
|
+
* standard → text-on-surface-variant
|
|
5379
|
+
* vibrant → text-on-tertiary-container
|
|
5380
|
+
*
|
|
5354
5381
|
* **Implementation note**: The divider is rendered as a SIBLING BEFORE the
|
|
5355
5382
|
* `RACMenuSection`, NOT inside it. RAC's `Section`/`MenuSection` only accepts
|
|
5356
5383
|
* `Header` and `MenuItem` children — placing a `Separator` inside the section
|
|
@@ -5435,17 +5462,20 @@ declare function HeadlessMenuDivider({ className, ...props }: SeparatorProps & {
|
|
|
5435
5462
|
/**
|
|
5436
5463
|
* Material Design 3 Menu container variants (CVA).
|
|
5437
5464
|
*
|
|
5438
|
-
*
|
|
5439
|
-
*
|
|
5465
|
+
* Architecture: Variants vs States
|
|
5466
|
+
* - CVA holds design-time structure only (menuStyle, colorScheme).
|
|
5467
|
+
* - Animation (enter/exit motion) lives on `menuPopoverVariants` which is
|
|
5468
|
+
* applied to the RAC Popover element — the element where RAC actually emits
|
|
5469
|
+
* data-entering, data-exiting, and data-placement.
|
|
5440
5470
|
*
|
|
5441
5471
|
* Shape per menuStyle:
|
|
5442
|
-
*
|
|
5443
|
-
*
|
|
5472
|
+
* baseline: `rounded-xs` (4dp extra-small)
|
|
5473
|
+
* vertical: `rounded-lg` (16dp large, MD3 Expressive)
|
|
5444
5474
|
*
|
|
5445
|
-
* Background per
|
|
5446
|
-
*
|
|
5447
|
-
* -
|
|
5448
|
-
*
|
|
5475
|
+
* Background per menuStyle:
|
|
5476
|
+
* baseline: bg-surface-container (solid, houses all items)
|
|
5477
|
+
* vertical: bg-transparent (items paint their own segment cards; gap reveals
|
|
5478
|
+
* the page background between segments — acting as the divider)
|
|
5449
5479
|
*
|
|
5450
5480
|
* @see https://m3.material.io/components/menus/specs
|
|
5451
5481
|
*/
|