@bug-on/m3-expressive 1.2.4 → 1.2.6
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/CHANGELOG.md +15 -0
- package/README.md +128 -41
- package/dist/buttons.d.mts +1 -1
- package/dist/buttons.d.ts +1 -1
- package/dist/buttons.js +59 -45
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +59 -45
- package/dist/buttons.mjs.map +1 -1
- package/dist/core.js +54 -40
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +54 -40
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.js +53 -39
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +53 -39
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/index.d.mts +77 -6
- package/dist/index.d.ts +77 -6
- package/dist/index.js +5607 -5429
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5506 -5329
- package/dist/index.mjs.map +1 -1
- package/dist/layout.js +60 -46
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +60 -46
- package/dist/layout.mjs.map +1 -1
- package/dist/navigation.d.mts +27 -7
- package/dist/navigation.d.ts +27 -7
- package/dist/navigation.js +481 -474
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +473 -466
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.d.mts +2 -2
- package/dist/overlays.d.ts +2 -2
- package/dist/overlays.js +53 -39
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +53 -39
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +53 -39
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +53 -39
- package/dist/pickers.mjs.map +1 -1
- package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-DdEZR6Vl.d.ts} +1 -1
- package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-Dgjt739k.d.mts} +1 -1
- package/dist/{split-button-trailing-uncheckable-DtxrcLxH.d.ts → split-button-trailing-uncheckable--BhNTEJw.d.ts} +5 -5
- package/dist/{split-button-trailing-uncheckable-BTWfIN2k.d.mts → split-button-trailing-uncheckable-DPJL3bO6.d.mts} +5 -5
- package/dist/{text-field-T4Rg-9Bw.d.mts → text-field-DWC7qOvp.d.mts} +128 -128
- package/dist/{text-field-T4Rg-9Bw.d.ts → text-field-DWC7qOvp.d.ts} +128 -128
- package/package.json +3 -3
package/dist/navigation.d.mts
CHANGED
|
@@ -811,6 +811,8 @@ declare function SmallAppBar({ title, subtitle, titleAlignment, navigationIcon,
|
|
|
811
811
|
type MenuColorVariant = "standard" | "vibrant";
|
|
812
812
|
/** Visual variant of the menu. */
|
|
813
813
|
type MenuVariant = "baseline" | "expressive";
|
|
814
|
+
/** Layout density for menu items: 0 (default: 48dp), -2 (40dp), -4 (32dp). */
|
|
815
|
+
type MenuDensity = 0 | -2 | -4;
|
|
814
816
|
/**
|
|
815
817
|
* Which Radix primitive family drives this menu:
|
|
816
818
|
* - `dropdown` → @radix-ui/react-dropdown-menu (button, text field, icon trigger)
|
|
@@ -843,6 +845,11 @@ interface MenuProps {
|
|
|
843
845
|
* - `vibrant`: tertiary-container background (use sparingly, high emphasis)
|
|
844
846
|
*/
|
|
845
847
|
colorVariant?: MenuColorVariant;
|
|
848
|
+
/**
|
|
849
|
+
* Layout density of menu items: 0 (48dp), -2 (40dp), -4 (32dp).
|
|
850
|
+
* @default 0
|
|
851
|
+
*/
|
|
852
|
+
density?: MenuDensity;
|
|
846
853
|
/**
|
|
847
854
|
* Visual variant of the menu.
|
|
848
855
|
* - `baseline`: original M3 specs (4dp corners, no shape morphing)
|
|
@@ -895,6 +902,11 @@ interface MenuContentProps {
|
|
|
895
902
|
* Default: "gap"
|
|
896
903
|
*/
|
|
897
904
|
separatorStyle?: VerticalMenuSeparatorStyle;
|
|
905
|
+
/**
|
|
906
|
+
* When true, automatically sets the menu popover width to match the trigger width
|
|
907
|
+
* using Radix CSS variable `--radix-dropdown-menu-trigger-width`.
|
|
908
|
+
*/
|
|
909
|
+
matchTriggerWidth?: boolean;
|
|
898
910
|
className?: string;
|
|
899
911
|
}
|
|
900
912
|
interface MenuItemProps {
|
|
@@ -928,6 +940,8 @@ interface MenuItemProps {
|
|
|
928
940
|
itemPosition?: MenuItemPosition;
|
|
929
941
|
/** Override colorVariant from MenuContext */
|
|
930
942
|
colorVariant?: MenuColorVariant;
|
|
943
|
+
/** Layout density of this menu item: 0 (48dp), -2 (40dp), -4 (32dp). */
|
|
944
|
+
density?: MenuDensity;
|
|
931
945
|
/** If true, keeps the menu open after clicking (e.g. for multi-select items) */
|
|
932
946
|
keepOpen?: boolean;
|
|
933
947
|
className?: string;
|
|
@@ -937,6 +951,8 @@ interface MenuItemProps {
|
|
|
937
951
|
isSubTrigger?: boolean;
|
|
938
952
|
/** ARIA role override. Defaults to 'menuitem', 'menuitemcheckbox', or 'menuitemradio' based on selected prop. */
|
|
939
953
|
role?: string;
|
|
954
|
+
/** Internal flag: true if rendered inside a gap-variant expressive menu */
|
|
955
|
+
isGapVariant?: boolean;
|
|
940
956
|
}
|
|
941
957
|
interface MenuGroupProps {
|
|
942
958
|
/** MenuItem children — itemPosition is auto-injected */
|
|
@@ -967,6 +983,7 @@ interface MenuGroupProps {
|
|
|
967
983
|
}
|
|
968
984
|
interface MenuDividerProps {
|
|
969
985
|
className?: string;
|
|
986
|
+
isGapVariant?: boolean;
|
|
970
987
|
}
|
|
971
988
|
interface SubMenuProps {
|
|
972
989
|
/** The SubMenu children (another MenuContent) */
|
|
@@ -1159,7 +1176,7 @@ declare const ContextMenuContent: React$1.ForwardRefExoticComponent<ContextMenuC
|
|
|
1159
1176
|
* </MenuContent>
|
|
1160
1177
|
* </Menu>
|
|
1161
1178
|
*/
|
|
1162
|
-
declare function Menu({ children, variant, menuVariant, colorVariant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1179
|
+
declare function Menu({ children, variant, menuVariant, colorVariant, density, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1163
1180
|
declare namespace Menu {
|
|
1164
1181
|
var displayName: string;
|
|
1165
1182
|
}
|
|
@@ -1237,6 +1254,8 @@ interface MenuContextValue {
|
|
|
1237
1254
|
variant: MenuVariant;
|
|
1238
1255
|
/** Color variant inherited by all children unless overridden */
|
|
1239
1256
|
colorVariant: MenuColorVariant;
|
|
1257
|
+
/** Density of menu items: 0, -2, -4 */
|
|
1258
|
+
density: MenuDensity;
|
|
1240
1259
|
/**
|
|
1241
1260
|
* Which Radix primitive family drives this menu:
|
|
1242
1261
|
* - "dropdown" → @radix-ui/react-dropdown-menu (button/field trigger)
|
|
@@ -1255,12 +1274,13 @@ interface MenuContextValue {
|
|
|
1255
1274
|
interface MenuProviderProps {
|
|
1256
1275
|
variant?: MenuVariant;
|
|
1257
1276
|
colorVariant?: MenuColorVariant;
|
|
1277
|
+
density?: MenuDensity;
|
|
1258
1278
|
menuPrimitive?: MenuPrimitive;
|
|
1259
1279
|
open: boolean;
|
|
1260
1280
|
onOpenChange: (open: boolean) => void;
|
|
1261
1281
|
children: React$1.ReactNode;
|
|
1262
1282
|
}
|
|
1263
|
-
declare function MenuProvider({ variant, colorVariant, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1283
|
+
declare function MenuProvider({ variant, colorVariant, density, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1264
1284
|
/**
|
|
1265
1285
|
* Returns the nearest MenuContext value.
|
|
1266
1286
|
* Safe to use outside a MenuProvider (returns default: baseline, dropdown, closed).
|
|
@@ -1397,7 +1417,7 @@ declare const ITEM_SHAPE_CLASSES: {
|
|
|
1397
1417
|
readonly leading: "rounded-t-[12px] rounded-b-[4px]";
|
|
1398
1418
|
readonly middle: "rounded-[4px]";
|
|
1399
1419
|
readonly trailing: "rounded-t-[4px] rounded-b-[12px]";
|
|
1400
|
-
readonly standalone: "rounded-[
|
|
1420
|
+
readonly standalone: "rounded-[12px]";
|
|
1401
1421
|
readonly selected: "rounded-[12px]";
|
|
1402
1422
|
};
|
|
1403
1423
|
/**
|
|
@@ -1424,9 +1444,9 @@ declare const STANDARD_COLORS: {
|
|
|
1424
1444
|
/** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
|
|
1425
1445
|
readonly trailingIconColor: "text-m3-on-surface-variant";
|
|
1426
1446
|
/** Hover state layer (OnSurface @ 8% opacity) */
|
|
1427
|
-
readonly hoverLayer: "hover:bg-m3-on-surface/8";
|
|
1447
|
+
readonly hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8";
|
|
1428
1448
|
/** Focus state layer (OnSurface @ 12% opacity) */
|
|
1429
|
-
readonly focusLayer: "focus:bg-m3-on-surface/12";
|
|
1449
|
+
readonly focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8";
|
|
1430
1450
|
/** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
|
|
1431
1451
|
readonly selectedBg: "bg-m3-tertiary-container";
|
|
1432
1452
|
/** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
|
|
@@ -1460,9 +1480,9 @@ declare const VIBRANT_COLORS: {
|
|
|
1460
1480
|
/** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
|
|
1461
1481
|
readonly trailingIconColor: "text-m3-on-tertiary-container";
|
|
1462
1482
|
/** Hover state layer (OnTertiaryContainer @ 8% opacity) */
|
|
1463
|
-
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8";
|
|
1483
|
+
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1464
1484
|
/** Focus state layer (OnTertiaryContainer @ 12% opacity) */
|
|
1465
|
-
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12";
|
|
1485
|
+
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1466
1486
|
/** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
|
|
1467
1487
|
readonly selectedBg: "bg-m3-tertiary";
|
|
1468
1488
|
/** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
|
package/dist/navigation.d.ts
CHANGED
|
@@ -811,6 +811,8 @@ declare function SmallAppBar({ title, subtitle, titleAlignment, navigationIcon,
|
|
|
811
811
|
type MenuColorVariant = "standard" | "vibrant";
|
|
812
812
|
/** Visual variant of the menu. */
|
|
813
813
|
type MenuVariant = "baseline" | "expressive";
|
|
814
|
+
/** Layout density for menu items: 0 (default: 48dp), -2 (40dp), -4 (32dp). */
|
|
815
|
+
type MenuDensity = 0 | -2 | -4;
|
|
814
816
|
/**
|
|
815
817
|
* Which Radix primitive family drives this menu:
|
|
816
818
|
* - `dropdown` → @radix-ui/react-dropdown-menu (button, text field, icon trigger)
|
|
@@ -843,6 +845,11 @@ interface MenuProps {
|
|
|
843
845
|
* - `vibrant`: tertiary-container background (use sparingly, high emphasis)
|
|
844
846
|
*/
|
|
845
847
|
colorVariant?: MenuColorVariant;
|
|
848
|
+
/**
|
|
849
|
+
* Layout density of menu items: 0 (48dp), -2 (40dp), -4 (32dp).
|
|
850
|
+
* @default 0
|
|
851
|
+
*/
|
|
852
|
+
density?: MenuDensity;
|
|
846
853
|
/**
|
|
847
854
|
* Visual variant of the menu.
|
|
848
855
|
* - `baseline`: original M3 specs (4dp corners, no shape morphing)
|
|
@@ -895,6 +902,11 @@ interface MenuContentProps {
|
|
|
895
902
|
* Default: "gap"
|
|
896
903
|
*/
|
|
897
904
|
separatorStyle?: VerticalMenuSeparatorStyle;
|
|
905
|
+
/**
|
|
906
|
+
* When true, automatically sets the menu popover width to match the trigger width
|
|
907
|
+
* using Radix CSS variable `--radix-dropdown-menu-trigger-width`.
|
|
908
|
+
*/
|
|
909
|
+
matchTriggerWidth?: boolean;
|
|
898
910
|
className?: string;
|
|
899
911
|
}
|
|
900
912
|
interface MenuItemProps {
|
|
@@ -928,6 +940,8 @@ interface MenuItemProps {
|
|
|
928
940
|
itemPosition?: MenuItemPosition;
|
|
929
941
|
/** Override colorVariant from MenuContext */
|
|
930
942
|
colorVariant?: MenuColorVariant;
|
|
943
|
+
/** Layout density of this menu item: 0 (48dp), -2 (40dp), -4 (32dp). */
|
|
944
|
+
density?: MenuDensity;
|
|
931
945
|
/** If true, keeps the menu open after clicking (e.g. for multi-select items) */
|
|
932
946
|
keepOpen?: boolean;
|
|
933
947
|
className?: string;
|
|
@@ -937,6 +951,8 @@ interface MenuItemProps {
|
|
|
937
951
|
isSubTrigger?: boolean;
|
|
938
952
|
/** ARIA role override. Defaults to 'menuitem', 'menuitemcheckbox', or 'menuitemradio' based on selected prop. */
|
|
939
953
|
role?: string;
|
|
954
|
+
/** Internal flag: true if rendered inside a gap-variant expressive menu */
|
|
955
|
+
isGapVariant?: boolean;
|
|
940
956
|
}
|
|
941
957
|
interface MenuGroupProps {
|
|
942
958
|
/** MenuItem children — itemPosition is auto-injected */
|
|
@@ -967,6 +983,7 @@ interface MenuGroupProps {
|
|
|
967
983
|
}
|
|
968
984
|
interface MenuDividerProps {
|
|
969
985
|
className?: string;
|
|
986
|
+
isGapVariant?: boolean;
|
|
970
987
|
}
|
|
971
988
|
interface SubMenuProps {
|
|
972
989
|
/** The SubMenu children (another MenuContent) */
|
|
@@ -1159,7 +1176,7 @@ declare const ContextMenuContent: React$1.ForwardRefExoticComponent<ContextMenuC
|
|
|
1159
1176
|
* </MenuContent>
|
|
1160
1177
|
* </Menu>
|
|
1161
1178
|
*/
|
|
1162
|
-
declare function Menu({ children, variant, menuVariant, colorVariant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1179
|
+
declare function Menu({ children, variant, menuVariant, colorVariant, density, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1163
1180
|
declare namespace Menu {
|
|
1164
1181
|
var displayName: string;
|
|
1165
1182
|
}
|
|
@@ -1237,6 +1254,8 @@ interface MenuContextValue {
|
|
|
1237
1254
|
variant: MenuVariant;
|
|
1238
1255
|
/** Color variant inherited by all children unless overridden */
|
|
1239
1256
|
colorVariant: MenuColorVariant;
|
|
1257
|
+
/** Density of menu items: 0, -2, -4 */
|
|
1258
|
+
density: MenuDensity;
|
|
1240
1259
|
/**
|
|
1241
1260
|
* Which Radix primitive family drives this menu:
|
|
1242
1261
|
* - "dropdown" → @radix-ui/react-dropdown-menu (button/field trigger)
|
|
@@ -1255,12 +1274,13 @@ interface MenuContextValue {
|
|
|
1255
1274
|
interface MenuProviderProps {
|
|
1256
1275
|
variant?: MenuVariant;
|
|
1257
1276
|
colorVariant?: MenuColorVariant;
|
|
1277
|
+
density?: MenuDensity;
|
|
1258
1278
|
menuPrimitive?: MenuPrimitive;
|
|
1259
1279
|
open: boolean;
|
|
1260
1280
|
onOpenChange: (open: boolean) => void;
|
|
1261
1281
|
children: React$1.ReactNode;
|
|
1262
1282
|
}
|
|
1263
|
-
declare function MenuProvider({ variant, colorVariant, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1283
|
+
declare function MenuProvider({ variant, colorVariant, density, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1264
1284
|
/**
|
|
1265
1285
|
* Returns the nearest MenuContext value.
|
|
1266
1286
|
* Safe to use outside a MenuProvider (returns default: baseline, dropdown, closed).
|
|
@@ -1397,7 +1417,7 @@ declare const ITEM_SHAPE_CLASSES: {
|
|
|
1397
1417
|
readonly leading: "rounded-t-[12px] rounded-b-[4px]";
|
|
1398
1418
|
readonly middle: "rounded-[4px]";
|
|
1399
1419
|
readonly trailing: "rounded-t-[4px] rounded-b-[12px]";
|
|
1400
|
-
readonly standalone: "rounded-[
|
|
1420
|
+
readonly standalone: "rounded-[12px]";
|
|
1401
1421
|
readonly selected: "rounded-[12px]";
|
|
1402
1422
|
};
|
|
1403
1423
|
/**
|
|
@@ -1424,9 +1444,9 @@ declare const STANDARD_COLORS: {
|
|
|
1424
1444
|
/** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
|
|
1425
1445
|
readonly trailingIconColor: "text-m3-on-surface-variant";
|
|
1426
1446
|
/** Hover state layer (OnSurface @ 8% opacity) */
|
|
1427
|
-
readonly hoverLayer: "hover:bg-m3-on-surface/8";
|
|
1447
|
+
readonly hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8";
|
|
1428
1448
|
/** Focus state layer (OnSurface @ 12% opacity) */
|
|
1429
|
-
readonly focusLayer: "focus:bg-m3-on-surface/12";
|
|
1449
|
+
readonly focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8";
|
|
1430
1450
|
/** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
|
|
1431
1451
|
readonly selectedBg: "bg-m3-tertiary-container";
|
|
1432
1452
|
/** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
|
|
@@ -1460,9 +1480,9 @@ declare const VIBRANT_COLORS: {
|
|
|
1460
1480
|
/** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
|
|
1461
1481
|
readonly trailingIconColor: "text-m3-on-tertiary-container";
|
|
1462
1482
|
/** Hover state layer (OnTertiaryContainer @ 8% opacity) */
|
|
1463
|
-
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8";
|
|
1483
|
+
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1464
1484
|
/** Focus state layer (OnTertiaryContainer @ 12% opacity) */
|
|
1465
|
-
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12";
|
|
1485
|
+
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1466
1486
|
/** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
|
|
1467
1487
|
readonly selectedBg: "bg-m3-tertiary";
|
|
1468
1488
|
/** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
|