@tinybigui/react 0.4.1 → 0.4.2
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/dist/index.cjs +272 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +187 -99
- package/dist/index.d.ts +187 -99
- package/dist/index.js +273 -256
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -733,22 +733,51 @@ declare const AppBar: React$1.ForwardRefExoticComponent<AppBarProps & React$1.Re
|
|
|
733
733
|
declare const AppBarHeadless: React$1.ForwardRefExoticComponent<AppBarHeadlessProps & React$1.RefAttributes<HTMLElement>>;
|
|
734
734
|
|
|
735
735
|
/**
|
|
736
|
-
* Material Design 3 Button Variants
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
736
|
+
* Material Design 3 Button Variants
|
|
737
|
+
*
|
|
738
|
+
* Architecture: Variants vs States
|
|
739
|
+
* - CVA holds design-time structure only (no disabled/loading state variants).
|
|
740
|
+
* - All interaction states are driven by data-* attributes on the root via
|
|
741
|
+
* group-data-[x]/button Tailwind selectors in each slot's base classes.
|
|
742
|
+
* - Content flags (data-with-icon, data-loading) are set explicitly by the component.
|
|
743
|
+
*
|
|
744
|
+
* Slot responsibilities:
|
|
745
|
+
* buttonVariants — root <button>; shape, color, elevation
|
|
746
|
+
* buttonStateLayerVariants — hover/focus/press opacity ring (absolute inset overlay)
|
|
747
|
+
* buttonFocusRingVariants — keyboard focus outline, MUST NOT be inside overflow-hidden
|
|
748
|
+
* buttonIconVariants — leading/trailing icon wrapper
|
|
749
|
+
* buttonLabelVariants — label text slot
|
|
750
|
+
*
|
|
751
|
+
* MD3 Spec:
|
|
752
|
+
* Shape: rounded-full (corner-full)
|
|
753
|
+
* Height: 32dp small | 40dp medium | 56dp large
|
|
754
|
+
* Padding: 16dp small | 24dp medium | 32dp large (12dp text variant)
|
|
755
|
+
* Icon size: 18px × 18px
|
|
756
|
+
* State-layer opacities: hover 8% | focus 10% | pressed 10%
|
|
757
|
+
* Disabled: container 12% opacity, content 38% opacity
|
|
758
|
+
*
|
|
759
|
+
* Elevation per state (MD3 comp tokens):
|
|
760
|
+
* Filled base=0 hover=1 focus=0 pressed=0
|
|
761
|
+
* Tonal base=0 hover=1 focus=0 pressed=0
|
|
762
|
+
* Elevated base=1 hover=2 focus=1 pressed=1
|
|
763
|
+
* Outlined base=0 hover=0 focus=0 pressed=0
|
|
764
|
+
* Text base=0 hover=0 focus=0 pressed=0
|
|
765
|
+
*/
|
|
766
|
+
/**
|
|
767
|
+
* Root <button> element.
|
|
768
|
+
*
|
|
769
|
+
* IMPORTANT — overflow is intentionally NOT on the root.
|
|
770
|
+
* Overflow clipping is delegated to the ripple container and state layer
|
|
771
|
+
* via `overflow-hidden rounded-[inherit]` on those children. This lets the
|
|
772
|
+
* focus ring span (`inset-[-3px]`) extend outside the button boundary and
|
|
773
|
+
* remain fully visible — if overflow-hidden were on the root it would be
|
|
774
|
+
* clipped to zero width.
|
|
740
775
|
*/
|
|
741
776
|
declare const buttonVariants: (props?: ({
|
|
742
777
|
variant?: "text" | "filled" | "outlined" | "tonal" | "elevated" | null | undefined;
|
|
743
|
-
color?: "primary" | "secondary" | "tertiary" | "error" | null | undefined;
|
|
744
778
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
745
779
|
fullWidth?: boolean | null | undefined;
|
|
746
|
-
disabled?: boolean | null | undefined;
|
|
747
|
-
loading?: boolean | null | undefined;
|
|
748
780
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
749
|
-
/**
|
|
750
|
-
* Extract variant prop types from CVA
|
|
751
|
-
*/
|
|
752
781
|
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
753
782
|
|
|
754
783
|
/**
|
|
@@ -756,68 +785,63 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
|
756
785
|
*/
|
|
757
786
|
type ButtonVariant = "filled" | "outlined" | "tonal" | "elevated" | "text";
|
|
758
787
|
/**
|
|
759
|
-
* Button
|
|
760
|
-
*/
|
|
761
|
-
type ButtonColor = "primary" | "secondary" | "tertiary" | "error";
|
|
762
|
-
/**
|
|
763
|
-
* Button sizes
|
|
788
|
+
* Button sizes (Material Design 3)
|
|
764
789
|
*/
|
|
765
790
|
type ButtonSize = "small" | "medium" | "large";
|
|
766
791
|
/**
|
|
767
792
|
* Material Design 3 Button Component Props
|
|
768
793
|
*
|
|
769
794
|
* Built on React Aria for world-class accessibility.
|
|
770
|
-
* Supports 5 variants: filled, outlined, tonal, elevated, text
|
|
771
|
-
*
|
|
795
|
+
* Supports 5 strict MD3 variants: filled, outlined, tonal, elevated, text.
|
|
796
|
+
* Each variant uses its spec-defined color roles — no color override prop.
|
|
797
|
+
*
|
|
798
|
+
* Interaction states (hover, focus, press, disabled) are managed via
|
|
799
|
+
* React Aria hooks and expressed as data-* attributes on the root element,
|
|
800
|
+
* consumed by slot classes via group-data-[x]/button selectors.
|
|
772
801
|
*
|
|
773
802
|
* @example
|
|
774
803
|
* ```tsx
|
|
775
|
-
* // Filled button (default)
|
|
776
|
-
* <Button variant="filled"
|
|
777
|
-
*
|
|
778
|
-
*
|
|
804
|
+
* // Filled button (default, highest emphasis)
|
|
805
|
+
* <Button variant="filled">Save</Button>
|
|
806
|
+
*
|
|
807
|
+
* // Outlined button (medium emphasis)
|
|
808
|
+
* <Button variant="outlined">Cancel</Button>
|
|
779
809
|
*
|
|
780
|
-
* //
|
|
781
|
-
* <Button variant="tonal"
|
|
810
|
+
* // Tonal button (secondary emphasis)
|
|
811
|
+
* <Button variant="tonal">Learn more</Button>
|
|
812
|
+
*
|
|
813
|
+
* // With icon (MD3 spec: 18px × 18px)
|
|
814
|
+
* <Button variant="filled" icon={<IconAdd className="h-[18px] w-[18px]" />}>
|
|
782
815
|
* Add Item
|
|
783
816
|
* </Button>
|
|
784
817
|
*
|
|
785
818
|
* // Loading state
|
|
786
|
-
* <Button variant="elevated" loading>
|
|
787
|
-
* Saving...
|
|
788
|
-
* </Button>
|
|
819
|
+
* <Button variant="elevated" loading>Saving...</Button>
|
|
789
820
|
*
|
|
790
821
|
* // Disabled
|
|
791
|
-
* <Button variant="outlined" isDisabled>
|
|
792
|
-
* Disabled
|
|
793
|
-
* </Button>
|
|
822
|
+
* <Button variant="outlined" isDisabled>Disabled</Button>
|
|
794
823
|
*
|
|
795
824
|
* // Headless version (custom styling)
|
|
796
|
-
* <ButtonHeadless className="my-custom-styles">
|
|
797
|
-
* Click me
|
|
798
|
-
* </ButtonHeadless>
|
|
825
|
+
* <ButtonHeadless className="my-custom-styles">Click me</ButtonHeadless>
|
|
799
826
|
* ```
|
|
800
827
|
*/
|
|
801
828
|
interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttributes<HTMLButtonElement>, keyof AriaButtonProps | "children"> {
|
|
802
829
|
/**
|
|
803
|
-
* Button variant
|
|
830
|
+
* Button variant (MD3 specification).
|
|
831
|
+
* Determines visual emphasis and color roles.
|
|
804
832
|
* @default 'filled'
|
|
805
833
|
*/
|
|
806
834
|
variant?: ButtonVariant;
|
|
807
835
|
/**
|
|
808
|
-
*
|
|
809
|
-
*
|
|
810
|
-
*/
|
|
811
|
-
color?: ButtonColor;
|
|
812
|
-
/**
|
|
813
|
-
* Size variant
|
|
836
|
+
* Size variant.
|
|
837
|
+
* MD3 heights: small=32dp, medium=40dp, large=56dp
|
|
814
838
|
* @default 'medium'
|
|
815
839
|
*/
|
|
816
840
|
size?: ButtonSize;
|
|
817
841
|
/**
|
|
818
|
-
* Leading icon (before text)
|
|
842
|
+
* Leading icon (before label text).
|
|
819
843
|
*
|
|
820
|
-
* MD3 Specification: Icons
|
|
844
|
+
* MD3 Specification: Icons must be 18px × 18px.
|
|
821
845
|
*
|
|
822
846
|
* @example
|
|
823
847
|
* ```tsx
|
|
@@ -828,9 +852,9 @@ interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttribute
|
|
|
828
852
|
*/
|
|
829
853
|
icon?: React__default.ReactNode;
|
|
830
854
|
/**
|
|
831
|
-
* Trailing icon (after text)
|
|
855
|
+
* Trailing icon (after label text).
|
|
832
856
|
*
|
|
833
|
-
* MD3 Specification: Icons
|
|
857
|
+
* MD3 Specification: Icons must be 18px × 18px.
|
|
834
858
|
*
|
|
835
859
|
* @example
|
|
836
860
|
* ```tsx
|
|
@@ -841,35 +865,36 @@ interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttribute
|
|
|
841
865
|
*/
|
|
842
866
|
trailingIcon?: React__default.ReactNode;
|
|
843
867
|
/**
|
|
844
|
-
* Button content
|
|
868
|
+
* Button label content.
|
|
845
869
|
*/
|
|
846
870
|
children: React__default.ReactNode;
|
|
847
871
|
/**
|
|
848
|
-
* Full width button (spans container)
|
|
872
|
+
* Full width button (spans container width).
|
|
849
873
|
* @default false
|
|
850
874
|
*/
|
|
851
875
|
fullWidth?: boolean;
|
|
852
876
|
/**
|
|
853
|
-
* Loading state
|
|
877
|
+
* Loading state — shows spinner and disables interaction.
|
|
878
|
+
* The button remains in the DOM as disabled while loading.
|
|
854
879
|
* @default false
|
|
855
880
|
*/
|
|
856
881
|
loading?: boolean;
|
|
857
882
|
/**
|
|
858
|
-
* Disable ripple effect
|
|
883
|
+
* Disable the ripple effect on press.
|
|
859
884
|
* @default false
|
|
860
885
|
*/
|
|
861
886
|
disableRipple?: boolean;
|
|
862
887
|
/**
|
|
863
|
-
* Additional CSS classes
|
|
888
|
+
* Additional Tailwind CSS classes applied to the root element.
|
|
864
889
|
*/
|
|
865
890
|
className?: string;
|
|
866
891
|
/**
|
|
867
|
-
* Tab index for keyboard navigation
|
|
892
|
+
* Tab index for keyboard navigation.
|
|
868
893
|
* @default 0
|
|
869
894
|
*/
|
|
870
895
|
tabIndex?: number;
|
|
871
896
|
/**
|
|
872
|
-
* Button type attribute
|
|
897
|
+
* Button type attribute.
|
|
873
898
|
* @default 'button'
|
|
874
899
|
*/
|
|
875
900
|
type?: "button" | "submit" | "reset";
|
|
@@ -879,58 +904,51 @@ interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttribute
|
|
|
879
904
|
* Material Design 3 Button Component (Layer 3: Styled)
|
|
880
905
|
*
|
|
881
906
|
* Built on React Aria for world-class accessibility.
|
|
882
|
-
*
|
|
883
|
-
*
|
|
907
|
+
* Implements the Variants-vs-States architecture: all interaction states are
|
|
908
|
+
* expressed as data-* attributes on the root and consumed by each slot via
|
|
909
|
+
* group-data-[x]/button Tailwind selectors — no state variants in CVA.
|
|
884
910
|
*
|
|
885
911
|
* Features:
|
|
886
912
|
* - ✅ 5 MD3 variants: filled, outlined, tonal, elevated, text
|
|
887
|
-
* - ✅
|
|
888
|
-
* - ✅ 3 sizes: small, medium, large
|
|
913
|
+
* - ✅ 3 sizes: small (32dp), medium (40dp), large (56dp)
|
|
889
914
|
* - ✅ Loading state with spinner
|
|
890
915
|
* - ✅ Ripple effect (Material Design)
|
|
916
|
+
* - ✅ Proper MD3 state layer (hover 8%, focus 10%, pressed 10%)
|
|
891
917
|
* - ✅ Full keyboard accessibility (via React Aria)
|
|
892
918
|
* - ✅ Screen reader support (via React Aria)
|
|
893
919
|
* - ✅ Focus management (via React Aria)
|
|
894
920
|
* - ✅ ButtonGroup-aware: applies connected corner radii and min-width when inside a group
|
|
895
921
|
*
|
|
896
922
|
* MD3 Specifications:
|
|
897
|
-
* - Height: 40dp (medium), 32dp (small),
|
|
898
|
-
* - Typography: Label Large (
|
|
923
|
+
* - Height: 40dp (medium), 32dp (small), 56dp (large)
|
|
924
|
+
* - Typography: Label Large (medium), Label Medium (small), Title Medium (large)
|
|
899
925
|
* - Icon size: 18px × 18px (per MD3 spec)
|
|
900
|
-
* - State layers: 8% hover,
|
|
901
|
-
* - Elevation: Level 1 on hover (filled), Level 1→2 (elevated)
|
|
926
|
+
* - State layers: 8% hover, 10% focus/pressed
|
|
927
|
+
* - Elevation: Level 1 on hover (filled), Level 1 base → Level 2 hover (elevated)
|
|
902
928
|
*
|
|
903
929
|
* @example
|
|
904
930
|
* ```tsx
|
|
905
931
|
* // Basic usage
|
|
906
932
|
* <Button>Click me</Button>
|
|
907
933
|
*
|
|
908
|
-
* // With variant
|
|
909
|
-
* <Button variant="outlined"
|
|
910
|
-
* Secondary Action
|
|
911
|
-
* </Button>
|
|
934
|
+
* // With variant
|
|
935
|
+
* <Button variant="outlined">Secondary Action</Button>
|
|
912
936
|
*
|
|
913
|
-
* // With icon (MD3 spec: icons
|
|
937
|
+
* // With icon (MD3 spec: icons are 18px × 18px)
|
|
914
938
|
* <Button icon={<IconAdd className="h-[18px] w-[18px]" />}>
|
|
915
939
|
* Add Item
|
|
916
940
|
* </Button>
|
|
917
941
|
*
|
|
918
942
|
* // Loading state
|
|
919
|
-
* <Button loading>
|
|
920
|
-
* Saving...
|
|
921
|
-
* </Button>
|
|
943
|
+
* <Button loading>Saving...</Button>
|
|
922
944
|
*
|
|
923
945
|
* // Disabled
|
|
924
|
-
* <Button isDisabled>
|
|
925
|
-
* Disabled
|
|
926
|
-
* </Button>
|
|
946
|
+
* <Button isDisabled>Disabled</Button>
|
|
927
947
|
*
|
|
928
948
|
* // Full width
|
|
929
|
-
* <Button fullWidth>
|
|
930
|
-
* Full Width Button
|
|
931
|
-
* </Button>
|
|
949
|
+
* <Button fullWidth>Full Width Button</Button>
|
|
932
950
|
*
|
|
933
|
-
* // Inside a connected ButtonGroup
|
|
951
|
+
* // Inside a connected ButtonGroup
|
|
934
952
|
* <ButtonGroup variant="connected" selectionMode="required" defaultValue="md">
|
|
935
953
|
* <Button value="sm">S</Button>
|
|
936
954
|
* <Button value="md">M</Button>
|
|
@@ -938,7 +956,7 @@ interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttribute
|
|
|
938
956
|
* </ButtonGroup>
|
|
939
957
|
* ```
|
|
940
958
|
*/
|
|
941
|
-
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Omit<ButtonVariants,
|
|
959
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Omit<ButtonVariants, never> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
942
960
|
|
|
943
961
|
/**
|
|
944
962
|
* ButtonGroup layout variant (Material Design 3)
|
|
@@ -999,6 +1017,13 @@ interface ButtonGroupContextValue {
|
|
|
999
1017
|
* The child passes its own `value` string.
|
|
1000
1018
|
*/
|
|
1001
1019
|
onSelectionChange: (value: string) => void;
|
|
1020
|
+
/**
|
|
1021
|
+
* Whether the entire group is disabled.
|
|
1022
|
+
* When `true`, all child buttons should be non-interactive.
|
|
1023
|
+
*
|
|
1024
|
+
* @default false
|
|
1025
|
+
*/
|
|
1026
|
+
isDisabled: boolean;
|
|
1002
1027
|
/**
|
|
1003
1028
|
* Tailwind class for the inner (adjacent) corner radius in the connected variant.
|
|
1004
1029
|
* Applied to all four corners of every button in a connected group.
|
|
@@ -1124,6 +1149,14 @@ interface ButtonGroupProps extends Omit<React__default.HTMLAttributes<HTMLDivEle
|
|
|
1124
1149
|
* @default new Set()
|
|
1125
1150
|
*/
|
|
1126
1151
|
defaultValue?: string | string[] | undefined;
|
|
1152
|
+
/**
|
|
1153
|
+
* Whether the entire group and all child buttons are disabled.
|
|
1154
|
+
* When `true`, the group container receives `data-disabled` and
|
|
1155
|
+
* all children inherit the disabled state via context.
|
|
1156
|
+
*
|
|
1157
|
+
* @default false
|
|
1158
|
+
*/
|
|
1159
|
+
isDisabled?: boolean;
|
|
1127
1160
|
/**
|
|
1128
1161
|
* Child buttons (Button, IconButton, or any element with a `value` prop).
|
|
1129
1162
|
*/
|
|
@@ -1137,10 +1170,21 @@ interface ButtonGroupProps extends Omit<React__default.HTMLAttributes<HTMLDivEle
|
|
|
1137
1170
|
/**
|
|
1138
1171
|
* Material Design 3 ButtonGroup Component (Layer 3: Styled)
|
|
1139
1172
|
*
|
|
1173
|
+
* Built on the Variants-vs-States architecture: interaction/selection states
|
|
1174
|
+
* are expressed as data-* attributes on the root and consumed by child slots
|
|
1175
|
+
* via group-data-[x]/button-group Tailwind selectors.
|
|
1176
|
+
*
|
|
1140
1177
|
* An invisible container that:
|
|
1141
|
-
* - Applies MD3-spec gap between child buttons
|
|
1178
|
+
* - Applies MD3-spec gap between child buttons with spatial spring transitions
|
|
1142
1179
|
* - Manages selection state (single / multi / required) across toggle buttons
|
|
1143
|
-
* - Passes shape, size, and
|
|
1180
|
+
* - Passes shape, size, variant, and disabled metadata to children via React Context
|
|
1181
|
+
* - Emits container-level state attributes for CSS targeting
|
|
1182
|
+
*
|
|
1183
|
+
* Container data attributes:
|
|
1184
|
+
* - `data-connected` — variant is "connected"
|
|
1185
|
+
* - `data-has-selection` — at least one child button is selected
|
|
1186
|
+
* - `data-selection-mode` — "single" | "required" | "multi"
|
|
1187
|
+
* - `data-disabled` — group is non-interactive (via getInteractionDataAttributes)
|
|
1144
1188
|
*
|
|
1145
1189
|
* Variants:
|
|
1146
1190
|
* - `standard`: Buttons float independently. Gap is larger for xs/sm to preserve
|
|
@@ -1153,6 +1197,11 @@ interface ButtonGroupProps extends Omit<React__default.HTMLAttributes<HTMLDivEle
|
|
|
1153
1197
|
* - `required`: Exactly one always selected; pressing the active button is a no-op.
|
|
1154
1198
|
* - `multi`: Any number of buttons selected simultaneously.
|
|
1155
1199
|
*
|
|
1200
|
+
* Motion:
|
|
1201
|
+
* - Gap transitions use spring-standard-fast-spatial (350ms) for smooth layout changes
|
|
1202
|
+
* - Border-radius morphing on child buttons uses expressive-fast-spatial (350ms, overshoot)
|
|
1203
|
+
* - Color/opacity effects on children use spring-standard-fast-effects (150ms, no overshoot)
|
|
1204
|
+
*
|
|
1156
1205
|
* @example
|
|
1157
1206
|
* ```tsx
|
|
1158
1207
|
* // Standard icon-button group (no selection management)
|
|
@@ -1173,16 +1222,10 @@ interface ButtonGroupProps extends Omit<React__default.HTMLAttributes<HTMLDivEle
|
|
|
1173
1222
|
* <Button value="16oz">16 oz</Button>
|
|
1174
1223
|
* </ButtonGroup>
|
|
1175
1224
|
*
|
|
1176
|
-
* //
|
|
1177
|
-
* <ButtonGroup
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
* selectedValues={selected}
|
|
1181
|
-
* onSelectionChange={setSelected}
|
|
1182
|
-
* aria-label="Text formatting"
|
|
1183
|
-
* >
|
|
1184
|
-
* <Button value="bold">Bold</Button>
|
|
1185
|
-
* <Button value="italic">Italic</Button>
|
|
1225
|
+
* // Disabled group
|
|
1226
|
+
* <ButtonGroup variant="connected" isDisabled aria-label="Unavailable options">
|
|
1227
|
+
* <Button value="a">A</Button>
|
|
1228
|
+
* <Button value="b">B</Button>
|
|
1186
1229
|
* </ButtonGroup>
|
|
1187
1230
|
* ```
|
|
1188
1231
|
*/
|
|
@@ -1224,28 +1267,73 @@ declare const ButtonGroup: React__default.ForwardRefExoticComponent<ButtonGroupP
|
|
|
1224
1267
|
declare const ButtonGroupHeadless: React__default.ForwardRefExoticComponent<ButtonGroupProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1225
1268
|
|
|
1226
1269
|
/**
|
|
1227
|
-
* Material Design 3 ButtonGroup Variants
|
|
1270
|
+
* Material Design 3 ButtonGroup Variants
|
|
1271
|
+
*
|
|
1272
|
+
* Architecture: Variants vs States
|
|
1273
|
+
* - CVA holds design-time structure only (no interaction state variants).
|
|
1274
|
+
* - All interaction/selection states are driven by data-* attributes on the root
|
|
1275
|
+
* via group-data-[x]/button-group Tailwind selectors.
|
|
1276
|
+
* - Container-level state attributes:
|
|
1277
|
+
* data-connected — variant is "connected"
|
|
1278
|
+
* data-has-selection — at least one child button is selected
|
|
1279
|
+
* data-disabled — entire group is non-interactive
|
|
1280
|
+
* data-selection-mode — "single" | "required" | "multi" (when applicable)
|
|
1228
1281
|
*
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
* (display, width) and the inner gap between child buttons.
|
|
1282
|
+
* Slot responsibilities:
|
|
1283
|
+
* buttonGroupRootVariants — layout container; gap, alignment, motion, disabled state
|
|
1232
1284
|
*
|
|
1233
|
-
* MD3 Inner Gap
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1285
|
+
* MD3 Spec (Inner Gap):
|
|
1286
|
+
* | Size | standard | connected |
|
|
1287
|
+
* |-------------|------------|-----------|
|
|
1288
|
+
* | extra-small | 18dp | 2dp |
|
|
1289
|
+
* | small | 12dp | 2dp |
|
|
1290
|
+
* | medium | 8dp | 2dp |
|
|
1291
|
+
* | large | 8dp | 2dp |
|
|
1292
|
+
* | extra-large | 8dp | 2dp |
|
|
1293
|
+
*
|
|
1294
|
+
* Motion:
|
|
1295
|
+
* Gap is a spatial property — uses spring-standard-fast-spatial (350ms, no overshoot
|
|
1296
|
+
* for gap since CSS gap cannot visually overshoot). This ensures smooth transitions
|
|
1297
|
+
* when the size prop changes or buttons are added/removed.
|
|
1241
1298
|
*
|
|
1242
1299
|
* Note: xs/sm standard gaps are intentionally large to preserve 48dp touch targets.
|
|
1243
1300
|
* Connected gap is always 2dp (`gap-0.5`) regardless of size.
|
|
1244
1301
|
*/
|
|
1302
|
+
/**
|
|
1303
|
+
* Root container element — carries `group/button-group` scope via the styled layer.
|
|
1304
|
+
*
|
|
1305
|
+
* Handles:
|
|
1306
|
+
* - Flexbox layout (inline-flex or flex)
|
|
1307
|
+
* - Gap between child buttons (per variant × size)
|
|
1308
|
+
* - Spatial motion for gap transitions
|
|
1309
|
+
* - Disabled state (opacity + pointer-events)
|
|
1310
|
+
*/
|
|
1311
|
+
declare const buttonGroupRootVariants: (props?: ({
|
|
1312
|
+
variant?: "standard" | "connected" | null | undefined;
|
|
1313
|
+
size?: "small" | "large" | "medium" | "extra-small" | "extra-large" | null | undefined;
|
|
1314
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Focus ring overlay for the group container.
|
|
1317
|
+
*
|
|
1318
|
+
* Visible only when the group itself receives keyboard focus (rare — typically
|
|
1319
|
+
* focus goes to child buttons). Included for completeness and edge cases where
|
|
1320
|
+
* the group container might receive programmatic focus.
|
|
1321
|
+
*
|
|
1322
|
+
* Uses the same pattern as Switch/Button focus rings:
|
|
1323
|
+
* - Always in DOM (opacity-0)
|
|
1324
|
+
* - Transitions to opacity-100 on group-data-[focus-visible]
|
|
1325
|
+
*/
|
|
1326
|
+
declare const buttonGroupFocusRingVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
1327
|
+
/**
|
|
1328
|
+
* @deprecated Use `buttonGroupRootVariants` instead.
|
|
1329
|
+
* Kept for backward compatibility during migration.
|
|
1330
|
+
*/
|
|
1245
1331
|
declare const buttonGroupVariants: (props?: ({
|
|
1246
1332
|
variant?: "standard" | "connected" | null | undefined;
|
|
1247
1333
|
size?: "small" | "large" | "medium" | "extra-small" | "extra-large" | null | undefined;
|
|
1248
1334
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1335
|
+
type ButtonGroupRootVariants = VariantProps<typeof buttonGroupRootVariants>;
|
|
1336
|
+
type ButtonGroupFocusRingVariants = VariantProps<typeof buttonGroupFocusRingVariants>;
|
|
1249
1337
|
|
|
1250
1338
|
/**
|
|
1251
1339
|
* Context that provides ButtonGroup state to all child buttons.
|
|
@@ -10617,4 +10705,4 @@ type DatePickerSupportingTextVariants = VariantProps<typeof datePickerSupporting
|
|
|
10617
10705
|
declare const datePickerScrimVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
10618
10706
|
type DatePickerScrimVariants = VariantProps<typeof datePickerScrimVariants>;
|
|
10619
10707
|
|
|
10620
|
-
export { AppBar, AppBarHeadless, type AppBarHeadlessProps, type AppBarProps, type AppBarVariant, Badge, type BadgeColor, BadgeContent, type BadgeContentProps, BadgeHeadless, type BadgeHeadlessProps, type BadgeProps, type BadgeVariants, BottomSheet, type BottomSheetAnimationState, type BottomSheetAnimationVariants, BottomSheetContext, type BottomSheetContextValue, BottomSheetHandle, type BottomSheetHandleProps, type BottomSheetHandleVariants, BottomSheetHeadless, type BottomSheetHeadlessProps, type BottomSheetProps, type BottomSheetScrimVariants, type BottomSheetVariant, type BottomSheetVariants, Button,
|
|
10708
|
+
export { AppBar, AppBarHeadless, type AppBarHeadlessProps, type AppBarProps, type AppBarVariant, Badge, type BadgeColor, BadgeContent, type BadgeContentProps, BadgeHeadless, type BadgeHeadlessProps, type BadgeProps, type BadgeVariants, BottomSheet, type BottomSheetAnimationState, type BottomSheetAnimationVariants, BottomSheetContext, type BottomSheetContextValue, BottomSheetHandle, type BottomSheetHandleProps, type BottomSheetHandleVariants, BottomSheetHeadless, type BottomSheetHeadlessProps, type BottomSheetProps, type BottomSheetScrimVariants, type BottomSheetVariant, type BottomSheetVariants, Button, ButtonGroup, ButtonGroupContext, type ButtonGroupContextValue, type ButtonGroupFocusRingVariants, ButtonGroupHeadless, type ButtonGroupProps, type ButtonGroupRootVariants, type ButtonGroupSelectionMode, type ButtonGroupShape, type ButtonGroupSize, type ButtonGroupVariant, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarCellProps, type CalendarCellType, type CalendarCellVariants, CalendarCore, type CalendarGridProps, type CalendarView, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardHeadless, type CardHeadlessProps, CardMedia, type CardMediaProps, type CardProps, type CardVariant, type CardVariants, Checkbox, type CheckboxProps, Chip, ChipHeadless, type ChipHeadlessProps, type ChipProps, ChipSet, type ChipSetProps, type ChipSurface, type ChipType, type ChipVariants, type ClockDialContainerVariants, type ClockDialNumberVariants, type ClockDialProps, type ClockHandCenterVariants, type ClockHandHandleVariants, type ClockHandProps, type ClockHandTrackVariants, type ClockSelectionMode, DateField, type DateFieldProps, type DateInputFieldProps, DatePicker, type DatePickerActionButtonVariants, type DatePickerActionVariants, type DatePickerActionsProps, type DatePickerContainerVariants, type DatePickerDividerVariants, DatePickerDocked, type DatePickerDockedProps, type DatePickerHeaderVariants, type DatePickerHeadlessProps, type DatePickerHeadlineVariants, DatePickerModal, type DatePickerModalHeaderProps, DatePickerModalInput, type DatePickerModalInputProps, type DatePickerModalProps, type DatePickerNavVariants, type DatePickerProps, type DatePickerRangeIndicatorVariants, type DatePickerRenderState, type DatePickerScrimVariants, type DatePickerSupportingTextVariants, type DatePickerVariant, type DatePickerWeekdayVariants, type DateSelectionMode, Dialog, DialogActions, type DialogActionsProps, type DialogAnimationState, DialogContent, type DialogContentProps, DialogContext, type DialogContextValue, DialogHeadless, type DialogHeadlessProps, DialogHeadline, type DialogHeadlineProps, type DialogProps, type DialogVariant, Divider, DividerHeadless, type DividerHeadlessProps, type DividerInset, type DividerOrientation, type DividerProps, type DividerVariants, Drawer, type DrawerContextValue, DrawerIconOnlyContext, DrawerItem, type DrawerItemBadgeConfig, type DrawerItemProps, type DrawerProps, DrawerSection, type DrawerSectionProps, type DrawerVariant, FAB, type FABColor, FABHeadless, type FABHeadlessProps, FABMenu, FABMenuContext, type FABMenuContextValue, type FABMenuDirection, FABMenuHeadless, type FABMenuHeadlessProps, FABMenuItem, type FABMenuItemProps, type FABMenuItemVariants, type FABMenuProps, type FABMenuVariants, type FABProps, type FABSize, HeadlessDrawer, HeadlessDrawerItem, type HeadlessDrawerItemProps, type HeadlessDrawerProps, HeadlessMenu, HeadlessMenuDivider, HeadlessMenuItem, type HeadlessMenuItemProps, type HeadlessMenuProps, HeadlessMenuSection, type HeadlessMenuSectionProps, HeadlessMenuTrigger, type HeadlessMenuTriggerProps, HeadlessNavigationBar, HeadlessNavigationBarItem, type HeadlessNavigationBarItemProps, type HeadlessNavigationBarProps, HeadlessTab, HeadlessTabList, HeadlessTabPanel, type HeadlessTabPanelProps, type HeadlessTabProps, IconButton, type IconButtonColor, IconButtonHeadless, type IconButtonHeadlessProps, type IconButtonProps, type IconButtonSize, type IconButtonVariant, List, type ListDensity, ListHeadless, type ListHeadlessProps, ListItem, ListItemHeadless, ListItemLeading, type ListItemLeadingProps, type ListItemProps, ListItemText, type ListItemTextProps, ListItemTrailing, type ListItemTrailingProps, type ListItemVariants, type ListLeadingType, type ListProps, type ListTrailingType, type ListVariants, type MD3ColorRole, type MD3TypographyScale, type MD3TypographySize, type MD3TypographyStyle, Menu, type MenuContainerVariants, MenuContext, type MenuContextValue, MenuDivider, type MenuDividerProps, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuTrigger, type MenuTriggerProps, NavigationBar, type NavigationBarBadge, NavigationBarItem, type NavigationBarItemConfig, type NavigationBarItemProps, type NavigationBarItemRenderProps, type NavigationBarProps, type PeriodSelectorContainerVariants, type PeriodSelectorItemVariants, type PeriodSelectorProps, Progress, ProgressHeadless, type ProgressHeadlessProps, type ProgressProps, Radio, RadioGroup, RadioGroupHeadless, type RadioGroupHeadlessProps, type RadioGroupProps, RadioHeadless, type RadioHeadlessProps, type RadioProps, type RangeCalendarProps, RichTooltip, type RichTooltipProps, type RichTooltipVariants, STATE_LAYER_OPACITY, Search, SearchBar, SearchBarHeadless, type SearchBarHeadlessProps, type SearchBarProps, type SearchLayout, type SearchProps, type SearchStyle, SearchView, SearchViewHeadless, type SearchViewHeadlessProps, type SearchViewProps, Slider, SliderHeadless, type SliderHeadlessProps, type SliderOrientation, type SliderProps, type SliderRangeThumbLabels, type SliderRenderState, type SliderSize, type SliderThumbProps, type SliderThumbState, type SliderVariant, Snackbar, type SnackbarAction, SnackbarContext, type SnackbarContextValue, SnackbarHeadless, type SnackbarHeadlessProps, type SnackbarItem, type SnackbarProps, SnackbarProvider, type SnackbarProviderProps, type SnackbarSeverity, SplitButton, type SplitButtonContainerVariants, type SplitButtonDropdownVariants, SplitButtonHeadless, type SplitButtonHeadlessProps, type SplitButtonMenuItem, type SplitButtonPrimaryVariants, type SplitButtonProps, type SplitButtonSize, type SplitButtonVariant, Switch, type SwitchProps, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, Tab, type TabItem, type TabLayout, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, type TabVariant, Tabs, type TabsProps, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, type TimeFormat, type TimeInputFieldProps, type TimeInputFieldVariants, type TimePeriod, TimePicker, type TimePickerActionButtonVariants, type TimePickerActionRowVariants, type TimePickerContainerVariants, TimePickerDial, type TimePickerDialProps, type TimePickerHeadlessProps, type TimePickerHeadlineVariants, TimePickerInput, type TimePickerInputProps, type TimePickerModeToggleVariants, type TimePickerOrientation, type TimePickerProps, type TimePickerRenderState, type TimePickerVariant, type TimeSelectorContainerVariants, type TimeSelectorProps, type TimeSeparatorVariants, type TimeValue, Tooltip, type TooltipHeadlessProps, TooltipOverlayHeadless, type TooltipPlacement, type TooltipProps, TooltipTrigger, TooltipTriggerHeadless, type TooltipTriggerProps, type TooltipTriggerStyledProps, type TooltipVariant, type TooltipVariants, type TypographyProperty, type TypographyStyleObject, type UseBottomSheetDragOptions, type UseBottomSheetDragReturn, type YearItemVariants, applyStateLayer, badgeVariants, bottomSheetAnimationVariants, bottomSheetHandlePillVariants, bottomSheetHandleWrapperVariants, bottomSheetScrimVariants, bottomSheetVariants, buttonGroupFocusRingVariants, buttonGroupRootVariants, buttonGroupVariants, calendarCellVariants, cardVariants, chipVariants, clockDialContainerVariants, clockDialNumberVariants, clockHandCenterVariants, clockHandHandleVariants, clockHandTrackVariants, cn, datePickerActionButtonVariants, datePickerActionVariants, datePickerContainerVariants, datePickerDividerVariants, datePickerHeaderVariants, datePickerHeadlineVariants, datePickerNavVariants, datePickerRangeIndicatorVariants, datePickerScrimVariants, datePickerSupportingTextVariants, datePickerWeekdayVariants, dividerVariants, fabMenuItemVariants, fabMenuVariants, generateMD3Theme, getColorValue, getConnectedRadiusClasses, getFontFamily, getMD3Color, getResponsiveTypography, getTypographyClassName, getTypographyForElement, getTypographyStyle, getTypographyToken, hexToRgb, listItemVariants, listVariants, periodSelectorContainerVariants, periodSelectorItemVariants, pxToRem, remToPx, rgbToHex, richTooltipVariants, searchBarVariants, searchViewHeaderVariants, searchViewVariants, sliderActiveTrackVariants, sliderContainerVariants, sliderHandleStateLayerVariants, sliderHandleVariants, sliderInactiveTrackVariants, sliderTrackLayoutVariants, splitButtonContainerVariants, splitButtonDropdownVariants, splitButtonPrimaryVariants, splitButtonVariants, timeInputFieldVariants, timePickerActionButtonVariants, timePickerActionRowVariants, timePickerContainerVariants, timePickerHeadlineVariants, timePickerModeToggleVariants, timeSelectorContainerVariants, timeSeparatorVariants, tooltipVariants, truncateText, useBottomSheetContext, useBottomSheetDrag, useButtonGroup, useDialogContext, useFABMenuContext, useMenuContext, useOptionalButtonGroup, useSnackbar, withOpacity, yearItemVariants };
|