@bug-on/m3-expressive 1.3.1 → 1.3.3
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 +113 -60
- package/dist/buttons.d.mts +3 -3
- package/dist/buttons.d.ts +3 -3
- package/dist/{core-CAU8g2HY.d.mts → core-D8FdHY6I.d.mts} +1 -1
- package/dist/{core-DRrLnsnJ.d.ts → core-DyEy8H9Z.d.ts} +1 -1
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +9 -7
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +9 -7
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.d.mts +2 -1
- package/dist/feedback.d.ts +2 -1
- package/dist/feedback.js +11 -8
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +11 -9
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.d.mts +4 -3
- package/dist/forms.d.ts +4 -3
- package/dist/forms.js +5084 -2987
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +5083 -2989
- package/dist/forms.mjs.map +1 -1
- package/dist/{icon-button-USJo7AqO.d.mts → icon-button-CxyJv7UV.d.mts} +1 -1
- package/dist/{icon-button-CqdQBsRe.d.ts → icon-button-Di8VX6ou.d.ts} +1 -1
- package/dist/index.d.mts +13 -83
- package/dist/index.d.ts +13 -83
- package/dist/index.js +2843 -1210
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2692 -1072
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +496 -37
- package/dist/layout.d.ts +496 -37
- package/dist/layout.js +1537 -238
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +1509 -226
- package/dist/layout.mjs.map +1 -1
- package/dist/{md3-D0_Z7IXj.d.mts → md3-BQhRygSi.d.mts} +1 -1
- package/dist/{md3-D0_Z7IXj.d.ts → md3-BQhRygSi.d.ts} +1 -1
- package/dist/menu-types-rZNQFO7Y.d.mts +315 -0
- package/dist/menu-types-rZNQFO7Y.d.ts +315 -0
- package/dist/navigation.d.mts +28 -296
- package/dist/navigation.d.ts +28 -296
- package/dist/navigation.js +584 -288
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +576 -282
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.d.mts +2 -2
- package/dist/overlays.d.ts +2 -2
- package/dist/{side-sheet-modal-Dgjt739k.d.mts → side-sheet-modal-64FGhDxL.d.mts} +1 -1
- package/dist/{side-sheet-modal-DdEZR6Vl.d.ts → side-sheet-modal-Bd5Qqvp9.d.ts} +1 -1
- package/dist/{split-button-trailing-uncheckable-DTQJjzsB.d.ts → split-button-trailing-uncheckable-CGzk7KcG.d.ts} +1 -1
- package/dist/{split-button-trailing-uncheckable-CIVEYgjY.d.mts → split-button-trailing-uncheckable-gAz6OAIi.d.mts} +1 -1
- package/dist/{text-field-Ear3hCSq.d.mts → text-field-4OlT9o8s.d.mts} +155 -5
- package/dist/{text-field-CiOmDM_8.d.ts → text-field-DARNdj14.d.ts} +155 -5
- package/llms-full.txt +255 -0
- package/llms.txt +102 -0
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @bug-on/m3-expressive
|
|
2
2
|
|
|
3
|
+
## 1.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 719c20f: Add AI docs and TOC hierarchy
|
|
8
|
+
|
|
9
|
+
## 1.3.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fd99c6c: Fix some minor errors.
|
|
14
|
+
- Updated dependencies [fd99c6c]
|
|
15
|
+
- @bug-on/m3-tailwind@1.2.2
|
|
16
|
+
- @bug-on/m3-tokens@1.2.2
|
|
17
|
+
|
|
3
18
|
## 1.3.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://tailwindcss.com/)
|
|
6
6
|
|
|
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
|
|
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 physics, flexible shape morphing, dynamic Material You color generation (2025 spec), SSR support, and native compatibility with Next.js 16 (App Router / Turbopack), React 19, and Tailwind CSS v4.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## 📖 Documentation & Interactive Demos
|
|
12
12
|
|
|
13
|
-
For
|
|
13
|
+
For live interactive component playgrounds, code examples, and API references, visit:
|
|
14
14
|
👉 **[Official Documentation & Live Demos](https://bug-on-md3.vercel.app)**
|
|
15
15
|
👉 **[GitHub Repository](https://github.com/nguyentruongton/bug-on-md3-expressive)**
|
|
16
16
|
|
|
@@ -26,46 +26,44 @@ npm install @bug-on/m3-expressive motion
|
|
|
26
26
|
|
|
27
27
|
### Peer Dependencies
|
|
28
28
|
|
|
29
|
-
Ensure your project includes the following peer dependencies:
|
|
30
|
-
|
|
31
29
|
| Package | Version Requirement | Description |
|
|
32
30
|
| :--- | :--- | :--- |
|
|
33
|
-
| `react` |
|
|
34
|
-
| `react-dom` |
|
|
35
|
-
| `motion` | `>=
|
|
36
|
-
| `tailwindcss` | `>=4.0.0` |
|
|
31
|
+
| `react` | `^19.0.0` | React core framework |
|
|
32
|
+
| `react-dom` | `^19.0.0` | React DOM renderer |
|
|
33
|
+
| `motion` | `>=12.0.0` *(optional)* | Spring physics animation engine (FABs, Carousels, Tabs, Sheets) |
|
|
34
|
+
| `tailwindcss` | `>=4.0.0` | Tailwind CSS v4 CSS-first framework |
|
|
37
35
|
|
|
38
36
|
---
|
|
39
37
|
|
|
40
38
|
## 🛠️ Configuration & Setup (Tailwind CSS v4)
|
|
41
39
|
|
|
42
40
|
> [!WARNING]
|
|
43
|
-
> This library requires **Tailwind CSS v4** (CSS-first
|
|
41
|
+
> This library requires **Tailwind CSS v4** (CSS-first architecture via `@import "tailwindcss"`). Tailwind CSS v3 is not supported.
|
|
44
42
|
|
|
45
|
-
Import the required stylesheets into your application's
|
|
43
|
+
Import the required stylesheets into your application's root CSS entry point (e.g., `app/globals.css` or `src/index.css`):
|
|
46
44
|
|
|
47
45
|
```css
|
|
48
46
|
/* 1. Core Tailwind CSS v4 */
|
|
49
47
|
@import "tailwindcss";
|
|
50
48
|
|
|
51
|
-
/* 2. MD3 Expressive Tokens & Theme Resets */
|
|
49
|
+
/* 2. MD3 Expressive Tokens & Theme Resets (Required) */
|
|
52
50
|
@import "@bug-on/m3-expressive/index.css";
|
|
53
51
|
|
|
54
|
-
/* 3. (Optional) Extended MD3 Tailwind Utilities (Elevations, Transitions) */
|
|
52
|
+
/* 3. (Optional) Extended MD3 Tailwind Utilities (Elevations, Transitions, Shiki) */
|
|
55
53
|
@import "@bug-on/m3-tailwind";
|
|
56
54
|
|
|
57
|
-
/* 4. (Optional)
|
|
55
|
+
/* 4. (Optional) Typography Preset Classes */
|
|
58
56
|
@import "@bug-on/m3-expressive/typography.css";
|
|
59
57
|
```
|
|
60
58
|
|
|
61
59
|
### Icon Font Setup (Material Symbols Outlined)
|
|
62
60
|
|
|
63
|
-
The `<Icon />` component
|
|
61
|
+
The `<Icon />` component renders **Material Symbols Outlined** variable font glyphs:
|
|
64
62
|
|
|
65
63
|
#### Option A: Google Fonts CDN (Recommended for Web)
|
|
66
64
|
|
|
67
65
|
```tsx
|
|
68
|
-
// app/layout.tsx
|
|
66
|
+
// app/layout.tsx
|
|
69
67
|
import "@bug-on/m3-expressive/material-symbols-cdn.css";
|
|
70
68
|
import { MaterialSymbolsPreconnect } from "@bug-on/m3-expressive";
|
|
71
69
|
|
|
@@ -83,7 +81,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
83
81
|
|
|
84
82
|
#### Option B: Offline / Self-Hosted Assets
|
|
85
83
|
|
|
86
|
-
For air-gapped
|
|
84
|
+
For air-gapped networks, enterprise privacy, or offline PWAs, install `@bug-on/m3-fonts`:
|
|
87
85
|
|
|
88
86
|
```bash
|
|
89
87
|
pnpm add @bug-on/m3-fonts
|
|
@@ -98,19 +96,19 @@ pnpm add @bug-on/m3-fonts
|
|
|
98
96
|
|
|
99
97
|
## 🧩 Subpath Exports Guide
|
|
100
98
|
|
|
101
|
-
|
|
99
|
+
Optimize your bundle size and tree-shaking by importing directly from modular subpaths:
|
|
102
100
|
|
|
103
101
|
| Subpath Import | Module Contents |
|
|
104
102
|
| :--- | :--- |
|
|
105
|
-
| `@bug-on/m3-expressive/core` | `MD3ThemeProvider`, `createMd3ExpressiveTheme`, `generateM3Theme`, `applyTheme` |
|
|
103
|
+
| `@bug-on/m3-expressive/core` | `MD3ThemeProvider`, `createMd3ExpressiveTheme`, `generateM3Theme`, `applyTheme`, `useTheme`, `useThemeMode`, `Icon`, `Ripple`, `MaterialSymbolsPreconnect`, `cn` |
|
|
106
104
|
| `@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`, `
|
|
109
|
-
| `@bug-on/m3-expressive/overlays` | `Dialog`, `
|
|
110
|
-
| `@bug-on/m3-expressive/feedback` | `Snackbar`, `SnackbarProvider`, `useSnackbar`, `ProgressIndicator
|
|
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`, `
|
|
105
|
+
| `@bug-on/m3-expressive/forms` | `TextField`, `Checkbox`, `TriStateCheckbox`, `RadioButton`, `RadioGroup`, `Switch`, `Slider`, `RangeSlider`, `Select`, `Chip`, `Search` |
|
|
106
|
+
| `@bug-on/m3-expressive/navigation` | `NavigationBar`, `NavigationRail`, `NavigationDrawer`, `Tabs`, `Tab`, `TabsList`, `TabsContent`, `SmallAppBar`, `MediumFlexibleAppBar`, `LargeFlexibleAppBar`, `BottomAppBar`, `DockedToolbar`, `HorizontalFloatingToolbar`, `VerticalFloatingToolbar`, `Menu`, `ContextMenu`, `VerticalMenu`, `Search` |
|
|
107
|
+
| `@bug-on/m3-expressive/overlays` | `Dialog`, `DialogFullScreenContent`, `Drawer`, `BottomSheet`, `BottomSheetModal`, `SideSheet`, `SideSheetModal` |
|
|
108
|
+
| `@bug-on/m3-expressive/feedback` | `Snackbar`, `SnackbarProvider`, `useSnackbar`, `ProgressIndicator` (linear, circular, wavy), `LoadingIndicator`, `Badge`, `BadgedBox`, `PlainTooltip`, `RichTooltip` |
|
|
109
|
+
| `@bug-on/m3-expressive/layout` | `Card`, `Carousel` (Morphing layout, Multi-browse, Uncontained), `Divider`, `List`, `ListItem`, `ListDivider`, `ScrollArea`, `CodeBlock`, `TableOfContents`, `Text`, `Typography` |
|
|
110
|
+
| `@bug-on/m3-expressive/pickers` | `DatePicker`, `DatePickerDialog`, `DatePickerInput`, `DateRangePicker`, `TimePicker`, `TimePickerDialog`, `TimeInput`, `useDatePickerState`, `useDateRangePickerState`, `useTimePickerState` |
|
|
111
|
+
| `@bug-on/m3-expressive/shapes` | `ShapeMedia`, `ShapeSvg`, `ShapeIcon`, `useShapeMorph`, MD3 shape morphing engine |
|
|
114
112
|
|
|
115
113
|
---
|
|
116
114
|
|
|
@@ -119,10 +117,10 @@ To keep bundle sizes lean, `@bug-on/m3-expressive` offers dedicated subpath entr
|
|
|
119
117
|
```tsx
|
|
120
118
|
import { MD3ThemeProvider } from "@bug-on/m3-expressive/core";
|
|
121
119
|
import { Button } from "@bug-on/m3-expressive/buttons";
|
|
122
|
-
import { TextField } from "@bug-on/m3-expressive/forms";
|
|
120
|
+
import { TextField, Chip } from "@bug-on/m3-expressive/forms";
|
|
123
121
|
import { Icon } from "@bug-on/m3-expressive";
|
|
124
122
|
|
|
125
|
-
export default function
|
|
123
|
+
export default function App() {
|
|
126
124
|
return (
|
|
127
125
|
<MD3ThemeProvider sourceColor="#00639b" defaultMode="system">
|
|
128
126
|
<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">
|
|
@@ -134,6 +132,10 @@ export default function LoginCard() {
|
|
|
134
132
|
leadingIcon={<Icon name="mail" />}
|
|
135
133
|
/>
|
|
136
134
|
|
|
135
|
+
<div className="flex gap-2">
|
|
136
|
+
<Chip variant="filter" selected label="Remember me" />
|
|
137
|
+
</div>
|
|
138
|
+
|
|
137
139
|
<Button
|
|
138
140
|
colorStyle="filled"
|
|
139
141
|
size="md"
|
|
@@ -152,48 +154,99 @@ export default function LoginCard() {
|
|
|
152
154
|
## 🎨 Component Inventory
|
|
153
155
|
|
|
154
156
|
### 🔘 Buttons & Actions
|
|
155
|
-
- **`Button`**: Filled, Elevated, Tonal, Outlined, Text
|
|
157
|
+
- **`Button`**: Filled, Elevated, Tonal, Outlined, Text, Tertiary, Primary-Fixed, and Tertiary-Fixed color styles.
|
|
156
158
|
- **`IconButton`**: Standard, Filled, Tonal, Outlined, with toggle state support.
|
|
157
|
-
- **`FAB` / `ExtendedFAB`**: Small, Medium, Large, Extended with
|
|
158
|
-
- **`FABMenu`**: Speed-dial
|
|
159
|
-
- **`SplitButton`**: Combined primary button action with dropdown
|
|
160
|
-
- **`ButtonGroup` / `ButtonDistribute`**:
|
|
159
|
+
- **`FAB` / `ExtendedFAB`**: Small, Medium, Large, Extended with icon motion and responsive collapsing.
|
|
160
|
+
- **`FABMenu`**: Speed-dial expandable Floating Action Button menu with spring transition physics.
|
|
161
|
+
- **`SplitButton`**: Combined primary button action with trailing menu dropdown.
|
|
162
|
+
- **`ButtonGroup` / `ButtonDistribute`**: Segmented button groups with shared morphing shapes and dynamic width distribution.
|
|
163
|
+
|
|
164
|
+
### 🏷️ Chips
|
|
165
|
+
- **`Chip`**: Assist, Filter, Input, and Suggestion chip variants.
|
|
166
|
+
- **`ChipGroup`**: Horizontally scrollable and wrapping chip containers.
|
|
167
|
+
- **Features**: Leading avatars/icons, animated selection checkmarks, and trailing remove/action icons.
|
|
161
168
|
|
|
162
169
|
### 📝 Forms & Inputs
|
|
163
|
-
- **`TextField`**: Outlined and Filled
|
|
164
|
-
- **`Checkbox`**: Standard and
|
|
165
|
-
- **`RadioButton`**:
|
|
166
|
-
- **`Switch`**:
|
|
170
|
+
- **`TextField`**: Outlined and Filled text inputs with floating labels, character count, error helper text, and icon slots.
|
|
171
|
+
- **`Checkbox` / `TriStateCheckbox`**: Standard and indeterminate checkboxes with animated checkmarks.
|
|
172
|
+
- **`RadioButton` / `RadioGroup`**: Single-selection groups with smooth scale transitions.
|
|
173
|
+
- **`Switch`**: Expressive toggle switch with optional custom inline icons.
|
|
167
174
|
- **`Slider` / `RangeSlider`**: Continuous and discrete sliders with value tooltips and step indicators.
|
|
168
|
-
- **`Select
|
|
169
|
-
- **`Search`**: Search
|
|
175
|
+
- **`Select`**: Exposed dropdown menu and autocomplete search select (`searchable`, `matchTriggerWidth`).
|
|
176
|
+
- **`Search` / `SearchBar` / `SearchView`**: Search input bars and full-screen docked/expanded search surfaces.
|
|
177
|
+
|
|
178
|
+
### 📅 Date & Time Pickers
|
|
179
|
+
- **`DatePicker` / `DatePickerDialog` / `DatePickerInput`**: Modal and inline calendar date pickers with hoisted `useDatePickerState()`.
|
|
180
|
+
- **`DateRangePicker`**: Range selection date picker with `useDateRangePickerState()`.
|
|
181
|
+
- **`TimePicker` / `TimePickerDialog` / `TimeInput`**: Dial clock face and numeric time inputs with `useTimePickerState()`.
|
|
170
182
|
|
|
171
183
|
### 🧭 Navigation & Toolbars
|
|
172
|
-
- **`NavigationBar`**: Bottom navigation bar with animated active
|
|
173
|
-
- **`NavigationRail`**: Vertical navigation bar for
|
|
174
|
-
- **`NavigationDrawer`**: Standard docked and modal
|
|
175
|
-
- **`Tabs` / `Tab` / `TabsList` / `TabsContent`**: Primary and Secondary tabs with sliding indicator.
|
|
176
|
-
- **`SmallAppBar` / `MediumFlexibleAppBar` / `LargeFlexibleAppBar` / `BottomAppBar`**: Collapsible
|
|
177
|
-
- **`DockedToolbar`**:
|
|
178
|
-
|
|
179
|
-
###
|
|
180
|
-
- **`
|
|
181
|
-
- **`
|
|
182
|
-
- **`
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
- **`
|
|
186
|
-
- **`
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- **`
|
|
191
|
-
- **`
|
|
192
|
-
- **`
|
|
193
|
-
- **`
|
|
184
|
+
- **`NavigationBar`**: Bottom navigation bar with animated pill active indicator and label visibility controls.
|
|
185
|
+
- **`NavigationRail`**: Vertical navigation bar for tablets and desktop viewports.
|
|
186
|
+
- **`NavigationDrawer` / `Drawer`**: Standard docked and modal side navigation drawers.
|
|
187
|
+
- **`Tabs` / `Tab` / `TabsList` / `TabsContent`**: Primary and Secondary tabs with sliding underline indicator.
|
|
188
|
+
- **`SmallAppBar` / `MediumFlexibleAppBar` / `LargeFlexibleAppBar` / `BottomAppBar`**: Collapsible header app bars with scroll behavior binding (`useAppBarScroll`).
|
|
189
|
+
- **`DockedToolbar` / `HorizontalFloatingToolbar` / `VerticalFloatingToolbar`**: Floating and docked adaptive toolbars with optional embedded FAB.
|
|
190
|
+
|
|
191
|
+
### 📜 Menus
|
|
192
|
+
- **`Menu`**: Popup menus with cascading submenu support and trigger width matching.
|
|
193
|
+
- **`ContextMenu`**: Right-click contextual popover menu.
|
|
194
|
+
- **`VerticalMenu`**: Always-visible static vertical navigation menu with container shape morphing.
|
|
195
|
+
|
|
196
|
+
### 🖼️ Overlays & Sheets
|
|
197
|
+
- **`Dialog` / `DialogFullScreenContent`**: Expressive modal dialogs, alert confirmations, and full-screen dialogs.
|
|
198
|
+
- **`BottomSheet` / `BottomSheetModal`**: Draggable bottom sheets with snap points and drag gestures (`useBottomSheet`).
|
|
199
|
+
- **`SideSheet` / `SideSheetModal`**: Contextual docked and modal side panels.
|
|
200
|
+
|
|
201
|
+
### ⚡ Feedback & Status
|
|
202
|
+
- **`Snackbar` / `SnackbarProvider` / `useSnackbar`**: Imperative queue toast notification system with action triggers.
|
|
203
|
+
- **`ProgressIndicator`**: Linear and circular progress indicators (determinate, indeterminate, wavy shape `shape="wavy"`, and track stop dots).
|
|
204
|
+
- **`LoadingIndicator`**: Expressive indeterminate loading animations.
|
|
205
|
+
- **`Badge` / `BadgedBox`**: Small status dots and numerical count notification badges.
|
|
206
|
+
- **`PlainTooltip` / `RichTooltip`**: Informative plain tooltips and rich interactive popover tooltips with carets and actions.
|
|
207
|
+
|
|
208
|
+
### 📐 Layout, Surfaces & Carousel
|
|
209
|
+
- **`Carousel`**: MD3 Expressive morphing carousel supporting Multi-browse, Uncontained, and Hero layouts (`useCarouselKeylines`, `useCarouselA11y`).
|
|
210
|
+
- **`Card`**: Elevated, Filled, and Outlined surface cards with header, media, content, and footer slots.
|
|
211
|
+
- **`Divider`**: Full-bleed, inset, and decorative wavy dividers (`buildWavePath`).
|
|
212
|
+
- **`List` / `ListItem` / `ListDivider`**: Single and multi-line list rows with avatar, checkbox, and action controls.
|
|
213
|
+
- **`ScrollArea`**: Lightweight customized scrollable container.
|
|
214
|
+
- **`CodeBlock`**: Syntax-highlighted code container with copy button.
|
|
215
|
+
- **`TableOfContents`**: Interactive documentation navigation anchor list.
|
|
216
|
+
- **`Text` / `Typography`**: Expressive typography renderers with standard MD3 type scales.
|
|
217
|
+
|
|
218
|
+
### 🔮 Shapes & Motion Engine
|
|
219
|
+
- **`ShapeMedia` / `ShapeSvg` / `ShapeIcon`**: Morphing media frames supporting MD3 expressive geometry (Full, Extra Large, Large, Medium, Small, Star, Clover, Arch, etc.).
|
|
220
|
+
- **`useShapeMorph`**: Dynamic spring-based corner shape interpolation hook.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🤖 AI Agent Integration
|
|
225
|
+
|
|
226
|
+
This package ships with machine-readable LLM documentation (`llms.txt` and `llms-full.txt`) adhering to the [llmstxt.org](https://llmstxt.org/) standard. When installed in your project, AI coding assistants (Cursor, GitHub Copilot, Claude Code, ChatGPT Codex) can read the bundled specification directly to understand APIs and avoid hallucinating props.
|
|
227
|
+
|
|
228
|
+
### 📚 Locating LLM Documentation
|
|
229
|
+
|
|
230
|
+
- **Local (in your project after install)**:
|
|
231
|
+
- `node_modules/@bug-on/m3-expressive/llms-full.txt` *(Full API & Gotchas reference - Recommended)*
|
|
232
|
+
- `node_modules/@bug-on/m3-expressive/llms.txt` *(Quick overview)*
|
|
233
|
+
- **Remote CDN**:
|
|
234
|
+
- `https://unpkg.com/@bug-on/m3-expressive/llms-full.txt`
|
|
235
|
+
- `https://cdn.jsdelivr.net/npm/@bug-on/m3-expressive/llms-full.txt`
|
|
236
|
+
- `https://raw.githubusercontent.com/nguyentruongton/bug-on-md3-expressive/main/llms-full.txt`
|
|
237
|
+
|
|
238
|
+
### 💡 Suggested Prompt for your AI Assistant
|
|
239
|
+
Add this instruction to your project's `CLAUDE.md`, `.cursorrules`, or system prompt:
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
Before generating or modifying UI components using @bug-on/m3-expressive, read:
|
|
243
|
+
- Local: node_modules/@bug-on/m3-expressive/llms-full.txt
|
|
244
|
+
- CDN: https://unpkg.com/@bug-on/m3-expressive/llms-full.txt
|
|
245
|
+
```
|
|
194
246
|
|
|
195
247
|
---
|
|
196
248
|
|
|
197
249
|
## ⚖️ License
|
|
198
250
|
|
|
199
251
|
[MIT](./LICENSE)
|
|
252
|
+
|
package/dist/buttons.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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-gAz6OAIi.mjs';
|
|
2
2
|
import { Transition } from 'motion/react';
|
|
3
|
-
import {
|
|
4
|
-
export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-
|
|
3
|
+
import { b as MD3Size } from './md3-BQhRygSi.mjs';
|
|
4
|
+
export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-CxyJv7UV.mjs';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
package/dist/buttons.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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-CGzk7KcG.js';
|
|
2
2
|
import { Transition } from 'motion/react';
|
|
3
|
-
import {
|
|
4
|
-
export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-
|
|
3
|
+
import { b as MD3Size } from './md3-BQhRygSi.js';
|
|
4
|
+
export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-Di8VX6ou.js';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
5
|
-
import './md3-
|
|
5
|
+
import './md3-BQhRygSi.mjs';
|
|
6
6
|
import { a as Typography, F as FontVariationAxes } from './typography-339RV6v7.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
5
|
-
import './md3-
|
|
5
|
+
import './md3-BQhRygSi.js';
|
|
6
6
|
import { a as Typography, F as FontVariationAxes } from './typography-339RV6v7.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/core.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { I as Icon, a as IconProps, M as MD3ColorScheme, b as MD3ThemeProvider, c as MD3ThemeProviderProps, d as MaterialSymbolsPreconnect, R as Ripple, e as RippleOrigin, f as RippleProps, T as ThemeMode, U as UseRippleStateOptions, g as applyTheme, h as cn, i as generateM3Theme, r as resolveMode, u as useDOMRipple, j as useMediaQuery, k as useRipple, l as useRippleState, m as useTheme, n as useThemeMode } from './core-
|
|
2
|
-
export {
|
|
1
|
+
export { I as Icon, a as IconProps, M as MD3ColorScheme, b as MD3ThemeProvider, c as MD3ThemeProviderProps, d as MaterialSymbolsPreconnect, R as Ripple, e as RippleOrigin, f as RippleProps, T as ThemeMode, U as UseRippleStateOptions, g as applyTheme, h as cn, i as generateM3Theme, r as resolveMode, u as useDOMRipple, j as useMediaQuery, k as useRipple, l as useRippleState, m as useTheme, n as useThemeMode } from './core-D8FdHY6I.mjs';
|
|
2
|
+
export { M as MD3ColorStyle, a as MD3Shape, b as MD3Size, P as PolymorphicProps, c as PolymorphicRef } from './md3-BQhRygSi.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'clsx';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { I as Icon, a as IconProps, M as MD3ColorScheme, b as MD3ThemeProvider, c as MD3ThemeProviderProps, d as MaterialSymbolsPreconnect, R as Ripple, e as RippleOrigin, f as RippleProps, T as ThemeMode, U as UseRippleStateOptions, g as applyTheme, h as cn, i as generateM3Theme, r as resolveMode, u as useDOMRipple, j as useMediaQuery, k as useRipple, l as useRippleState, m as useTheme, n as useThemeMode } from './core-
|
|
2
|
-
export {
|
|
1
|
+
export { I as Icon, a as IconProps, M as MD3ColorScheme, b as MD3ThemeProvider, c as MD3ThemeProviderProps, d as MaterialSymbolsPreconnect, R as Ripple, e as RippleOrigin, f as RippleProps, T as ThemeMode, U as UseRippleStateOptions, g as applyTheme, h as cn, i as generateM3Theme, r as resolveMode, u as useDOMRipple, j as useMediaQuery, k as useRipple, l as useRippleState, m as useTheme, n as useThemeMode } from './core-DyEy8H9Z.js';
|
|
2
|
+
export { M as MD3ColorStyle, a as MD3Shape, b as MD3Size, P as PolymorphicProps, c as PolymorphicRef } from './md3-BQhRygSi.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'clsx';
|
package/dist/core.js
CHANGED
|
@@ -2150,11 +2150,13 @@ var Snackbar = React4__namespace.memo(function Snackbar2({
|
|
|
2150
2150
|
type: "button",
|
|
2151
2151
|
onClick: handleAction,
|
|
2152
2152
|
className: cn(
|
|
2153
|
-
"
|
|
2154
|
-
"px-
|
|
2155
|
-
"
|
|
2156
|
-
"
|
|
2157
|
-
"
|
|
2153
|
+
"inline-flex items-center justify-center",
|
|
2154
|
+
"h-10 px-3 py-2.5 rounded-sm",
|
|
2155
|
+
"text-sm font-medium leading-5 whitespace-nowrap",
|
|
2156
|
+
"text-m3-inverse-primary",
|
|
2157
|
+
"hover:bg-m3-inverse-primary/8 focus-visible:bg-m3-inverse-primary/12 active:bg-m3-inverse-primary/12",
|
|
2158
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-inverse-primary",
|
|
2159
|
+
"transition-colors select-none cursor-pointer"
|
|
2158
2160
|
),
|
|
2159
2161
|
children: actionLabel
|
|
2160
2162
|
}
|
|
@@ -2163,10 +2165,10 @@ var Snackbar = React4__namespace.memo(function Snackbar2({
|
|
|
2163
2165
|
IconButton,
|
|
2164
2166
|
{
|
|
2165
2167
|
size: "sm",
|
|
2166
|
-
colorStyle: "
|
|
2168
|
+
colorStyle: "standard",
|
|
2167
2169
|
"aria-label": "Dismiss notification",
|
|
2168
2170
|
onClick: handleDismiss,
|
|
2169
|
-
className: "text-m3-inverse-on-surface bg-m3-inverse-surface",
|
|
2171
|
+
className: "text-m3-inverse-on-surface hover:bg-m3-inverse-on-surface/8 active:bg-m3-inverse-on-surface/12 focus-visible:ring-m3-inverse-primary",
|
|
2170
2172
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", "aria-hidden": "true" })
|
|
2171
2173
|
}
|
|
2172
2174
|
)
|