@bug-on/m3-expressive 1.2.3 → 1.2.5

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +128 -41
  3. package/dist/buttons.d.mts +1 -1
  4. package/dist/buttons.d.ts +1 -1
  5. package/dist/buttons.js +33 -14
  6. package/dist/buttons.js.map +1 -1
  7. package/dist/buttons.mjs +33 -14
  8. package/dist/buttons.mjs.map +1 -1
  9. package/dist/forms.d.mts +2 -2
  10. package/dist/forms.d.ts +2 -2
  11. package/dist/index.d.mts +79 -7
  12. package/dist/index.d.ts +79 -7
  13. package/dist/index.js +6071 -5547
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +5964 -5441
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/layout.js +10 -7
  18. package/dist/layout.js.map +1 -1
  19. package/dist/layout.mjs +10 -7
  20. package/dist/layout.mjs.map +1 -1
  21. package/dist/md3-expressive-shapes-CPcfl_Hf.d.mts +498 -0
  22. package/dist/md3-expressive-shapes-CPcfl_Hf.d.ts +498 -0
  23. package/dist/navigation.d.mts +93 -20
  24. package/dist/navigation.d.ts +93 -20
  25. package/dist/navigation.js +2824 -561
  26. package/dist/navigation.js.map +1 -1
  27. package/dist/navigation.mjs +2815 -554
  28. package/dist/navigation.mjs.map +1 -1
  29. package/dist/overlays.d.mts +2 -2
  30. package/dist/overlays.d.ts +2 -2
  31. package/dist/shapes.d.mts +3 -498
  32. package/dist/shapes.d.ts +3 -498
  33. package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-DdEZR6Vl.d.ts} +1 -1
  34. package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-Dgjt739k.d.mts} +1 -1
  35. package/dist/{split-button-trailing-uncheckable-C-qQlyZx.d.ts → split-button-trailing-uncheckable--BhNTEJw.d.ts} +10 -5
  36. package/dist/{split-button-trailing-uncheckable-DHJqNeq_.d.mts → split-button-trailing-uncheckable-DPJL3bO6.d.mts} +10 -5
  37. package/dist/{text-field-T4Rg-9Bw.d.mts → text-field-DWC7qOvp.d.mts} +128 -128
  38. package/dist/{text-field-T4Rg-9Bw.d.ts → text-field-DWC7qOvp.d.ts} +128 -128
  39. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @bug-on/m3-expressive
2
2
 
3
+ ## 1.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 97fb801: Add Select component Expose Menus, fix UI menu, readme
8
+ - Updated dependencies [97fb801]
9
+ - @bug-on/m3-tailwind@1.2.1
10
+ - @bug-on/m3-tokens@1.2.1
11
+
12
+ ## 1.2.4
13
+
14
+ ### Patch Changes
15
+
16
+ - 3aab9b2: Improve Navigation components, fix some issues
17
+
3
18
  ## 1.2.3
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -1,73 +1,78 @@
1
1
  # @bug-on/m3-expressive
2
2
 
3
- > ⚠️ **Work in progress** — Material Design 3 Expressive React Component Library.
3
+ [![npm version](https://img.shields.io/npm/v/@bug-on/m3-expressive.svg)](https://www.npmjs.com/package/@bug-on/m3-expressive)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Tailwind CSS v4](https://img.shields.io/badge/Tailwind_CSS-v4-38bdf8.svg)](https://tailwindcss.com/)
4
6
 
5
- High-performance React component library designed following the [Material Design 3 Expressive](https://m3.material.io/) design system. Featuring smooth motion, robust accessibility (a11y) support, and seamless compatibility with SSR and Next.js App Router.
7
+ A high-performance, accessible React component library built strictly following the [Material Design 3 Expressive](https://m3.material.io/) design system specifications. Features fluid spring motion, flexible shape morphing, dynamic Material You color generation, SSR support, and native compatibility with Next.js 16 (App Router) and Tailwind CSS v4.
6
8
 
7
9
  ---
8
10
 
9
- ## 📖 Documentation & Demos
10
- For component API guides, customization options, and interactive component previews, please visit:
11
- 👉 **[Official Documentation & Demos (GitHub Repository)](https://github.com/nguyentruongton/bug-on-md3-expressive)**
11
+ ## 📖 Documentation & Interactive Demos
12
+
13
+ For detailed API references, interactive component playgrounds, and customization guides, visit:
14
+ 👉 **[Official Documentation & Live Demos](https://bug-on-md3.vercel.app)**
15
+ 👉 **[GitHub Repository](https://github.com/nguyentruongton/bug-on-md3-expressive)**
12
16
 
13
17
  ---
14
18
 
15
19
  ## 📦 Installation
16
20
 
17
- Install the React component package alongside core ecosystem packages:
18
-
19
21
  ```bash
20
- npm install @bug-on/m3-expressive @bug-on/m3-tailwind @bug-on/m3-tokens
22
+ pnpm add @bug-on/m3-expressive motion
21
23
  # or
22
- pnpm add @bug-on/m3-expressive @bug-on/m3-tailwind @bug-on/m3-tokens
24
+ npm install @bug-on/m3-expressive motion
23
25
  ```
24
26
 
25
- ### Essential Peer Dependencies
26
- Ensure the following peer dependencies are installed in your project:
27
- ```bash
28
- npm install react react-dom
29
- # Required for animated components (Fab, Tabs, Dialog, etc.):
30
- npm install motion
31
- ```
27
+ ### Peer Dependencies
28
+
29
+ Ensure your project includes the following peer dependencies:
30
+
31
+ | Package | Version Requirement | Description |
32
+ | :--- | :--- | :--- |
33
+ | `react` | `>=18.0.0 || ^19.0.0` | Core React framework |
34
+ | `react-dom` | `>=18.0.0 || ^19.0.0` | DOM renderer for React |
35
+ | `motion` | `>=11.0.0` | Animation engine (FAB, Tabs, Dialogs, Sheets, etc.) |
36
+ | `tailwindcss` | `>=4.0.0` | Utility CSS framework (CSS-first architecture) |
32
37
 
33
38
  ---
34
39
 
35
40
  ## 🛠️ Configuration & Setup (Tailwind CSS v4)
36
41
 
37
42
  > [!WARNING]
38
- > The library only supports **Tailwind CSS v4** (peer dependency `tailwindcss: ">=4.0.0"`). **Tailwind CSS v3 is no longer supported**.
43
+ > This library requires **Tailwind CSS v4** (CSS-first configuration). Tailwind CSS v3 is not supported.
39
44
 
40
- This system is designed around the CSS-first architecture of **Tailwind CSS v4**. Setup is extremely simple and requires no JS/TS configuration files. Just import the stylesheets directly into your application's main CSS entry point (e.g., `globals.css` or `index.css`):
45
+ Import the required stylesheets into your application's main CSS entry point (e.g. `globals.css` or `app/globals.css`):
41
46
 
42
47
  ```css
43
- /* 1. Import core Tailwind CSS v4 */
48
+ /* 1. Core Tailwind CSS v4 */
44
49
  @import "tailwindcss";
45
50
 
46
- /* 2. Register core Design Tokens + Tailwind Theme + Resets (Zero Config) */
51
+ /* 2. MD3 Expressive Tokens & Theme Resets */
47
52
  @import "@bug-on/m3-expressive/index.css";
48
53
 
49
- /* 3. (Optional) Integrate MD3 advanced utility classes (elevations, transitions, icons) */
54
+ /* 3. (Optional) Extended MD3 Tailwind Utilities (Elevations, Transitions) */
50
55
  @import "@bug-on/m3-tailwind";
51
56
 
52
- /* 4. (Optional) Integrate specialized Typography CSS for React Components */
57
+ /* 4. (Optional) Expressive Typography Preset Classes */
53
58
  @import "@bug-on/m3-expressive/typography.css";
54
59
  ```
55
60
 
56
- > **Zero Config:** Once `@bug-on/m3-expressive/index.css` is imported, basic MD3 utility classes (`bg-m3-primary`, `text-m3-on-surface`, `rounded-m3-xl`, etc.) work immediately. For the full set of utilities like depth shadows (`elevation-3`), icon axis control (`icon-fill-1`), or physics-based transitions (`transition-m3-fast-spatial`), import `@bug-on/m3-tailwind` as well. Do NOT use JS plugins in Tailwind v4.
61
+ ### Icon Font Setup (Material Symbols Outlined)
62
+
63
+ The `<Icon />` component uses **Material Symbols Outlined**. You can choose CDN font delivery or self-hosted assets:
57
64
 
58
- ### Icons Configuration (Material Symbols)
59
- The library includes a built-in `<Icon />` component using the `Material Symbols Outlined` font. Import the icon stylesheet at your application root (e.g., `layout.tsx` or `main.tsx`):
65
+ #### Option A: Google Fonts CDN (Recommended for Web)
60
66
 
61
67
  ```tsx
62
68
  // app/layout.tsx or src/main.tsx
63
- import '@bug-on/m3-expressive/material-symbols-cdn.css';
64
- import { MaterialSymbolsPreconnect } from '@bug-on/m3-expressive';
69
+ import "@bug-on/m3-expressive/material-symbols-cdn.css";
70
+ import { MaterialSymbolsPreconnect } from "@bug-on/m3-expressive";
65
71
 
66
- export default function RootLayout({ children }) {
72
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
67
73
  return (
68
- <html>
74
+ <html lang="en">
69
75
  <head>
70
- {/* Preconnect helper to accelerate font loading */}
71
76
  <MaterialSymbolsPreconnect />
72
77
  </head>
73
78
  <body>{children}</body>
@@ -76,7 +81,9 @@ export default function RootLayout({ children }) {
76
81
  }
77
82
  ```
78
83
 
79
- For offline support or self-hosted font deployments:
84
+ #### Option B: Offline / Self-Hosted Assets
85
+
86
+ For air-gapped environments or offline font delivery, install `@bug-on/m3-fonts`:
80
87
 
81
88
  ```bash
82
89
  pnpm add @bug-on/m3-fonts
@@ -87,26 +94,106 @@ pnpm add @bug-on/m3-fonts
87
94
  @import "@bug-on/m3-fonts/typography.css";
88
95
  ```
89
96
 
90
- `@bug-on/m3-expressive/material-symbols-self-hosted.css` remains active for backward compatibility, but is deprecated and will be removed in the next major version.
97
+ ---
98
+
99
+ ## 🧩 Subpath Exports Guide
100
+
101
+ To keep bundle sizes lean, `@bug-on/m3-expressive` offers dedicated subpath entrypoints:
102
+
103
+ | Subpath Import | Module Contents |
104
+ | :--- | :--- |
105
+ | `@bug-on/m3-expressive/core` | `MD3ThemeProvider`, `createMd3ExpressiveTheme`, `generateM3Theme`, `applyTheme` |
106
+ | `@bug-on/m3-expressive/buttons` | `Button`, `IconButton`, `FAB`, `ExtendedFAB`, `FABMenu`, `SplitButton`, `ButtonGroup`, `ButtonDistribute` |
107
+ | `@bug-on/m3-expressive/forms` | `TextField`, `Checkbox`, `RadioButton`, `Switch`, `Slider`, `RangeSlider`, `Select`, `Search` |
108
+ | `@bug-on/m3-expressive/navigation` | `NavigationBar`, `NavigationRail`, `NavigationDrawer`, `Tabs`, `Tab`, `TabsList`, `TabsContent`, `App Bar`, `Toolbar` |
109
+ | `@bug-on/m3-expressive/overlays` | `Dialog`, `SideSheet`, `BottomSheet`, `Tooltip` |
110
+ | `@bug-on/m3-expressive/feedback` | `Snackbar`, `SnackbarProvider`, `useSnackbar`, `ProgressIndicator`, `LoadingIndicator`, `Badge`, `BadgedBox` |
111
+ | `@bug-on/m3-expressive/layout` | `Card`, `Divider`, `List`, `ListItem`, `ListDivider`, `ScrollArea`, `CodeBlock`, `TableOfContents` |
112
+ | `@bug-on/m3-expressive/pickers` | `DatePicker`, `TimePicker` |
113
+ | `@bug-on/m3-expressive/shapes` | `ShapeMedia`, `ShapeEngine`, `MD3Shape` utilities |
91
114
 
92
115
  ---
93
116
 
94
- ## 🚀 Basic Usage
117
+ ## 🚀 Quick Code Example
95
118
 
96
119
  ```tsx
97
- import { Button, Icon } from '@bug-on/m3-expressive';
120
+ import { MD3ThemeProvider } from "@bug-on/m3-expressive/core";
121
+ import { Button } from "@bug-on/m3-expressive/buttons";
122
+ import { TextField } from "@bug-on/m3-expressive/forms";
123
+ import { Icon } from "@bug-on/m3-expressive";
98
124
 
99
- export default function Page() {
125
+ export default function LoginCard() {
100
126
  return (
101
- <div className="p-8 bg-m3-surface min-h-screen flex items-center justify-center">
102
- <Button colorStyle="filled" size="md" icon={<Icon name="add" />}>
103
- Get Started
104
- </Button>
105
- </div>
127
+ <MD3ThemeProvider sourceColor="#00639b" defaultMode="system">
128
+ <div className="p-6 bg-m3-surface text-m3-on-surface rounded-m3-extra-large shadow-m3-elevation-2 max-w-sm space-y-4">
129
+ <h2 className="text-m3-title-large font-bold">Welcome Back</h2>
130
+
131
+ <TextField
132
+ label="Email Address"
133
+ variant="outlined"
134
+ leadingIcon={<Icon name="mail" />}
135
+ />
136
+
137
+ <Button
138
+ colorStyle="filled"
139
+ size="md"
140
+ icon={<Icon name="arrow_forward" />}
141
+ >
142
+ Sign In
143
+ </Button>
144
+ </div>
145
+ </MD3ThemeProvider>
106
146
  );
107
147
  }
108
148
  ```
109
149
 
150
+ ---
151
+
152
+ ## 🎨 Component Inventory
153
+
154
+ ### 🔘 Buttons & Actions
155
+ - **`Button`**: Filled, Elevated, Tonal, Outlined, Text variants.
156
+ - **`IconButton`**: Standard, Filled, Tonal, Outlined, with toggle state support.
157
+ - **`FAB` / `ExtendedFAB`**: Small, Medium, Large, Extended with label & animated icons.
158
+ - **`FABMenu`**: Speed-dial style Floating Action Button expandable menu.
159
+ - **`SplitButton`**: Combined primary button action with dropdown trigger.
160
+ - **`ButtonGroup` / `ButtonDistribute`**: Grouped segmented buttons with shared shape states.
161
+
162
+ ### 📝 Forms & Inputs
163
+ - **`TextField`**: Outlined and Filled variants with leading/trailing icons, error state, and helper text.
164
+ - **`Checkbox`**: Standard and TriState indeterminate checkbox with animated checkmark.
165
+ - **`RadioButton`**: Standard Material Design 3 single select options.
166
+ - **`Switch`**: Toggle switch with optional inline icons.
167
+ - **`Slider` / `RangeSlider`**: Continuous and discrete sliders with value tooltips and step indicators.
168
+ - **`Select` / `Menu`**: Expressive dropdown select and popover menus.
169
+ - **`Search`**: Search bar and full-screen Search View overlays.
170
+
171
+ ### 🧭 Navigation & Toolbars
172
+ - **`NavigationBar`**: Bottom navigation bar with animated active indicators.
173
+ - **`NavigationRail`**: Vertical navigation bar for wide displays and desktop screens.
174
+ - **`NavigationDrawer`**: Standard docked and modal drawer components.
175
+ - **`Tabs` / `Tab` / `TabsList` / `TabsContent`**: Primary and Secondary tabs with sliding indicator.
176
+ - **`SmallAppBar` / `MediumFlexibleAppBar` / `LargeFlexibleAppBar` / `BottomAppBar`**: Collapsible & flexible app bars.
177
+ - **`DockedToolbar`**: Expressive floating/docked action toolbar.
178
+
179
+ ### 🖼️ Overlays & Feedback
180
+ - **`Dialog`**: Expressive alert and full-screen dialogs powered by Framer Motion.
181
+ - **`SideSheet` / `BottomSheet`**: Modal and non-modal contextual sheets.
182
+ - **`Tooltip`**: Plain and Rich tooltips with carets and call-to-action buttons.
183
+ - **`Snackbar` / `SnackbarProvider` / `useSnackbar`**: Toast notification queue system.
184
+ - **`ProgressIndicator`**: Circular and Linear progress bars (determinate, indeterminate, wavy).
185
+ - **`LoadingIndicator`**: Expressive loading animation.
186
+ - **`Badge` / `BadgedBox`**: Dot and numerical status badges.
187
+
188
+ ### 📐 Layout, Surfaces & Shapes
189
+ - **`Card`**: Elevated, Filled, Outlined card surfaces.
190
+ - **`Divider`**: Full-bleed and inset divider lines.
191
+ - **`List` / `ListItem` / `ListDivider`**: Single and multi-line list items with avatar/icon slots.
192
+ - **`ScrollArea`**: Styled scrollable container.
193
+ - **`ShapeMedia`**: Morphing media frame supporting MD3 expressive shapes (Full, Extra Large, Large, Medium, Small).
194
+
195
+ ---
196
+
110
197
  ## ⚖️ License
111
- MIT
112
198
 
199
+ [MIT](./LICENSE)
@@ -1,4 +1,4 @@
1
- export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, V as SplitButtonSizeTokens, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable-DHJqNeq_.mjs';
1
+ export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, V as SplitButtonSizeTokens, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable-DPJL3bO6.mjs';
2
2
  import { Transition } from 'motion/react';
3
3
  import { b as MD3Size } from './md3-Dty-Qcad.mjs';
4
4
  export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-CSsDmuQC.mjs';
package/dist/buttons.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, V as SplitButtonSizeTokens, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable-C-qQlyZx.js';
1
+ export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, V as SplitButtonSizeTokens, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable--BhNTEJw.js';
2
2
  import { Transition } from 'motion/react';
3
3
  import { b as MD3Size } from './md3-Dty-Qcad.js';
4
4
  export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-CSsDmuQC.js';
package/dist/buttons.js CHANGED
@@ -1100,6 +1100,7 @@ function TouchTarget() {
1100
1100
  }
1101
1101
  var BUTTON_SHAPE_MORPH_SPRING = FAST_SPATIAL_SPRING;
1102
1102
  var BUTTON_RADIUS_SPRING = FAST_EFFECTS_SPRING;
1103
+ var ROUND_SHAPE_RADIUS = 9999;
1103
1104
  var BUTTON_SIZE_TOKENS = {
1104
1105
  xs: {
1105
1106
  height: "2rem",
@@ -1118,7 +1119,7 @@ var BUTTON_SIZE_TOKENS = {
1118
1119
  // 12dp
1119
1120
  pressedShapeRadius: m3Tokens.cornerRadius.small,
1120
1121
  // 8dp
1121
- roundShapeRadius: 16
1122
+ roundShapeRadius: ROUND_SHAPE_RADIUS
1122
1123
  },
1123
1124
  sm: {
1124
1125
  height: "2.5rem",
@@ -1137,7 +1138,7 @@ var BUTTON_SIZE_TOKENS = {
1137
1138
  // 12dp
1138
1139
  pressedShapeRadius: m3Tokens.cornerRadius.small,
1139
1140
  // 8dp
1140
- roundShapeRadius: 20
1141
+ roundShapeRadius: ROUND_SHAPE_RADIUS
1141
1142
  },
1142
1143
  md: {
1143
1144
  height: "3.5rem",
@@ -1156,7 +1157,7 @@ var BUTTON_SIZE_TOKENS = {
1156
1157
  // 16dp
1157
1158
  pressedShapeRadius: m3Tokens.cornerRadius.medium,
1158
1159
  // 12dp
1159
- roundShapeRadius: 28
1160
+ roundShapeRadius: ROUND_SHAPE_RADIUS
1160
1161
  },
1161
1162
  lg: {
1162
1163
  height: "6rem",
@@ -1175,7 +1176,7 @@ var BUTTON_SIZE_TOKENS = {
1175
1176
  // 28dp
1176
1177
  pressedShapeRadius: m3Tokens.cornerRadius.large,
1177
1178
  // 16dp
1178
- roundShapeRadius: 48
1179
+ roundShapeRadius: ROUND_SHAPE_RADIUS
1179
1180
  },
1180
1181
  xl: {
1181
1182
  height: "8.5rem",
@@ -1194,7 +1195,7 @@ var BUTTON_SIZE_TOKENS = {
1194
1195
  // 28dp
1195
1196
  pressedShapeRadius: m3Tokens.cornerRadius.large,
1196
1197
  // 16dp
1197
- roundShapeRadius: 68
1198
+ roundShapeRadius: ROUND_SHAPE_RADIUS
1198
1199
  }
1199
1200
  };
1200
1201
  var BUTTON_TYPOGRAPHY_TOKENS = {
@@ -1331,6 +1332,7 @@ var ButtonComponent = React16__namespace.forwardRef(
1331
1332
  loading = false,
1332
1333
  loadingVariant = "loading-indicator",
1333
1334
  asChild = false,
1335
+ fullWidth = false,
1334
1336
  outlineWidth,
1335
1337
  children,
1336
1338
  onClick,
@@ -1353,6 +1355,7 @@ var ButtonComponent = React16__namespace.forwardRef(
1353
1355
  "loading",
1354
1356
  "loadingVariant",
1355
1357
  "asChild",
1358
+ "fullWidth",
1356
1359
  "outlineWidth",
1357
1360
  "children",
1358
1361
  "onClick",
@@ -1432,7 +1435,8 @@ var ButtonComponent = React16__namespace.forwardRef(
1432
1435
  [loading, onClick, onKeyDown]
1433
1436
  );
1434
1437
  const buttonClassName = cn(
1435
- "relative w-fit shrink-0 inline-flex flex-row items-center justify-center",
1438
+ "relative inline-flex flex-row items-center justify-center",
1439
+ fullWidth ? "w-full" : "w-fit shrink-0",
1436
1440
  "whitespace-nowrap select-none cursor-pointer",
1437
1441
  "transition-[background-color,color,border-color,box-shadow,opacity,filter] duration-200",
1438
1442
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-2",
@@ -1543,7 +1547,6 @@ var ButtonComponent = React16__namespace.forwardRef(
1543
1547
  react.m.button,
1544
1548
  __spreadProps(__spreadValues({
1545
1549
  ref,
1546
- layout: true,
1547
1550
  type: "button",
1548
1551
  "aria-pressed": isToggle ? isSelected : void 0,
1549
1552
  "aria-label": computedAriaLabel,
@@ -2707,7 +2710,9 @@ var FABComponent = React16__namespace.forwardRef(
2707
2710
  asChild = false,
2708
2711
  onClick,
2709
2712
  onKeyDown,
2710
- "aria-label": ariaLabel
2713
+ "aria-label": ariaLabel,
2714
+ layout,
2715
+ layoutId
2711
2716
  } = _b, restProps = __objRest(_b, [
2712
2717
  "className",
2713
2718
  "style",
@@ -2723,7 +2728,9 @@ var FABComponent = React16__namespace.forwardRef(
2723
2728
  "asChild",
2724
2729
  "onClick",
2725
2730
  "onKeyDown",
2726
- "aria-label"
2731
+ "aria-label",
2732
+ "layout",
2733
+ "layoutId"
2727
2734
  ]);
2728
2735
  var _a2, _b2, _c, _d;
2729
2736
  const colors = (_a2 = COLOR_CLASSES2[colorStyle]) != null ? _a2 : COLOR_CLASSES2.primary;
@@ -2764,7 +2771,9 @@ var FABComponent = React16__namespace.forwardRef(
2764
2771
  /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
2765
2772
  /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
2766
2773
  react.m.span,
2767
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
2774
+ __spreadProps(__spreadValues({
2775
+ layout: "position"
2776
+ }, ICON_SPAN_VARIANTS), {
2768
2777
  transition: SPRING_TRANSITION,
2769
2778
  className: cn(
2770
2779
  "flex items-center justify-center shrink-0",
@@ -2791,7 +2800,9 @@ var FABComponent = React16__namespace.forwardRef(
2791
2800
  "loading"
2792
2801
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2793
2802
  react.m.span,
2794
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
2803
+ __spreadProps(__spreadValues({
2804
+ layout: "position"
2805
+ }, ICON_SPAN_VARIANTS), {
2795
2806
  transition: SPRING_TRANSITION,
2796
2807
  "aria-hidden": "true",
2797
2808
  className: cn(
@@ -2805,10 +2816,15 @@ var FABComponent = React16__namespace.forwardRef(
2805
2816
  /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: extended && labelContent && /* @__PURE__ */ jsxRuntime.jsx(
2806
2817
  react.m.span,
2807
2818
  {
2819
+ layout: "position",
2808
2820
  initial: { width: 0, opacity: 0 },
2809
2821
  animate: { width: "auto", opacity: 1 },
2810
2822
  exit: { width: 0, opacity: 0 },
2811
- transition: SPRING_TRANSITION,
2823
+ transition: {
2824
+ opacity: { duration: 0.15, ease: "linear" },
2825
+ width: SPRING_TRANSITION,
2826
+ layout: SPRING_TRANSITION
2827
+ },
2812
2828
  className: "overflow-hidden whitespace-nowrap ml-3",
2813
2829
  children: labelContent
2814
2830
  },
@@ -2825,7 +2841,7 @@ var FABComponent = React16__namespace.forwardRef(
2825
2841
  colors.text,
2826
2842
  lowered ? "shadow-sm" : colors.shadow,
2827
2843
  (_d = SIZE_STYLES[size]) != null ? _d : "h-14 w-14",
2828
- extended && "w-auto px-6",
2844
+ extended && "w-auto pl-4 pr-6",
2829
2845
  SIZE_TEXT_CLASS[size],
2830
2846
  loading && "pointer-events-none opacity-75 cursor-not-allowed",
2831
2847
  className
@@ -2856,6 +2872,8 @@ var FABComponent = React16__namespace.forwardRef(
2856
2872
  __spreadProps(__spreadValues({
2857
2873
  ref,
2858
2874
  type: "button",
2875
+ layout: layout !== void 0 ? layout : true,
2876
+ layoutId,
2859
2877
  "aria-label": computedAriaLabel,
2860
2878
  "aria-busy": loading || void 0,
2861
2879
  "aria-disabled": loading || restProps.disabled,
@@ -2874,7 +2892,8 @@ var FABComponent = React16__namespace.forwardRef(
2874
2892
  transition: {
2875
2893
  borderRadius: SPRING_TRANSITION_FAST,
2876
2894
  scale: SPRING_TRANSITION,
2877
- opacity: { duration: 0.25, ease: "easeOut" }
2895
+ opacity: { duration: 0.25, ease: "easeOut" },
2896
+ layout: SPRING_TRANSITION
2878
2897
  },
2879
2898
  className: containerClassName
2880
2899
  }, restProps), {