@bug-on/m3-expressive 1.3.3 → 1.3.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 (60) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +31 -7
  3. package/dist/assets/material-symbols-cdn.css +17 -23
  4. package/dist/buttons.js +129 -35
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +129 -35
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/{core-DyEy8H9Z.d.ts → core-Cckt8qEm.d.ts} +11 -8
  9. package/dist/{core-D8FdHY6I.d.mts → core-DDfG4pym.d.mts} +11 -8
  10. package/dist/core.d.mts +2 -3
  11. package/dist/core.d.ts +2 -3
  12. package/dist/core.js +7 -7
  13. package/dist/core.js.map +1 -1
  14. package/dist/core.mjs +8 -7
  15. package/dist/core.mjs.map +1 -1
  16. package/dist/fading-blur-mask--uZbBKLj.d.mts +77 -0
  17. package/dist/fading-blur-mask--uZbBKLj.d.ts +77 -0
  18. package/dist/feedback.js +1 -1
  19. package/dist/feedback.js.map +1 -1
  20. package/dist/feedback.mjs +1 -1
  21. package/dist/feedback.mjs.map +1 -1
  22. package/dist/forms.js +1 -1
  23. package/dist/forms.js.map +1 -1
  24. package/dist/forms.mjs +1 -1
  25. package/dist/forms.mjs.map +1 -1
  26. package/dist/index.d.mts +5 -5
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +270 -127
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +271 -127
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/layout.d.mts +5 -3
  33. package/dist/layout.d.ts +5 -3
  34. package/dist/layout.js +61 -6
  35. package/dist/layout.js.map +1 -1
  36. package/dist/layout.mjs +61 -7
  37. package/dist/layout.mjs.map +1 -1
  38. package/dist/material-symbols-cdn.css +17 -23
  39. package/dist/navigation.d.mts +25 -83
  40. package/dist/navigation.d.ts +25 -83
  41. package/dist/navigation.js +22 -9
  42. package/dist/navigation.js.map +1 -1
  43. package/dist/navigation.mjs +22 -9
  44. package/dist/navigation.mjs.map +1 -1
  45. package/dist/overlays.js +1 -1
  46. package/dist/overlays.js.map +1 -1
  47. package/dist/overlays.mjs +1 -1
  48. package/dist/overlays.mjs.map +1 -1
  49. package/dist/pickers.d.mts +12 -0
  50. package/dist/pickers.d.ts +12 -0
  51. package/dist/pickers.js +98 -65
  52. package/dist/pickers.js.map +1 -1
  53. package/dist/pickers.mjs +98 -65
  54. package/dist/pickers.mjs.map +1 -1
  55. package/dist/{typography-339RV6v7.d.mts → typography-CKTjvlZ4.d.mts} +25 -0
  56. package/dist/{typography-339RV6v7.d.ts → typography-CKTjvlZ4.d.ts} +25 -0
  57. package/dist/typography.css +1 -1
  58. package/llms-full.txt +17 -13
  59. package/llms.txt +11 -6
  60. package/package.json +18 -18
@@ -97,14 +97,39 @@ interface FontVariationAxes {
97
97
  ROND?: number;
98
98
  /**
99
99
  * Weight axis. Overrides `font-weight` via variation settings.
100
+ * Range: `100` (thin) – `1000` (extra black).
100
101
  * @default font default
101
102
  */
102
103
  wght?: number;
103
104
  /**
104
105
  * Width axis. Controls glyph condensation/expansion.
106
+ * Range: `75` (condensed) – `125` (expanded).
105
107
  * @default font default
106
108
  */
107
109
  wdth?: number;
110
+ /**
111
+ * Optical Size axis. Adjusts stroke thickness, proportions, and spacing
112
+ * for optimal readability at different text sizes.
113
+ * Range: `6` (caption/fine print) – `144` (display/banner).
114
+ *
115
+ * Note: Browsers normally handle optical sizing automatically via `font-optical-sizing: auto`.
116
+ * When manually overriding `opsz` in CSS, set `font-optical-sizing: none` to prevent conflicts.
117
+ * @default font default
118
+ */
119
+ opsz?: number;
120
+ /**
121
+ * Grade axis. Modifies stroke weight/density without changing layout, line wrapping, or glyph advance widths.
122
+ * Ideal for dark mode adjustments or subtle hover/emphasis states.
123
+ * Range: `-200` (light grade) – `150` (heavy grade).
124
+ * @default 0
125
+ */
126
+ GRAD?: number;
127
+ /**
128
+ * Slant axis. Applies font-designed slant angle in degrees.
129
+ * Range: `-15` (15-degree forward slant) – `0` (upright).
130
+ * @default 0
131
+ */
132
+ slnt?: number;
108
133
  /** Any additional named variation axis supported by the font. */
109
134
  [axis: string]: number | undefined;
110
135
  }
@@ -97,14 +97,39 @@ interface FontVariationAxes {
97
97
  ROND?: number;
98
98
  /**
99
99
  * Weight axis. Overrides `font-weight` via variation settings.
100
+ * Range: `100` (thin) – `1000` (extra black).
100
101
  * @default font default
101
102
  */
102
103
  wght?: number;
103
104
  /**
104
105
  * Width axis. Controls glyph condensation/expansion.
106
+ * Range: `75` (condensed) – `125` (expanded).
105
107
  * @default font default
106
108
  */
107
109
  wdth?: number;
110
+ /**
111
+ * Optical Size axis. Adjusts stroke thickness, proportions, and spacing
112
+ * for optimal readability at different text sizes.
113
+ * Range: `6` (caption/fine print) – `144` (display/banner).
114
+ *
115
+ * Note: Browsers normally handle optical sizing automatically via `font-optical-sizing: auto`.
116
+ * When manually overriding `opsz` in CSS, set `font-optical-sizing: none` to prevent conflicts.
117
+ * @default font default
118
+ */
119
+ opsz?: number;
120
+ /**
121
+ * Grade axis. Modifies stroke weight/density without changing layout, line wrapping, or glyph advance widths.
122
+ * Ideal for dark mode adjustments or subtle hover/emphasis states.
123
+ * Range: `-200` (light grade) – `150` (heavy grade).
124
+ * @default 0
125
+ */
126
+ GRAD?: number;
127
+ /**
128
+ * Slant axis. Applies font-designed slant angle in degrees.
129
+ * Range: `-15` (15-degree forward slant) – `0` (upright).
130
+ * @default 0
131
+ */
132
+ slnt?: number;
108
133
  /** Any additional named variation axis supported by the font. */
109
134
  [axis: string]: number | undefined;
110
135
  }
@@ -5,7 +5,7 @@
5
5
  src: url('./assets/fonts/GoogleSansFlex-VariableFont.woff2')
6
6
  format("woff2");
7
7
  font-weight: 100 1000;
8
- font-style: normal;
8
+ font-style: oblique -15deg 0deg;
9
9
  font-display: swap;
10
10
  }
11
11
 
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
- # @bug-on/m3-expressive — Full AI Documentation (v1.1.1)
1
+ # @bug-on/m3-expressive — Full AI Documentation & API Specification (Latest Stable Release)
2
2
 
3
- This file contains the complete context for the `@bug-on/m3-expressive` library (version 1.1.1), including core principles, multi-package architecture, styling guides, component references, and AI gotchas.
3
+ This document provides complete, canonical context for the `@bug-on/m3-expressive` ecosystem (React 19 + Tailwind CSS v4 + Motion for React), including core principles, multi-package architecture, styling guides, component references, subpath exports, and AI gotchas.
4
4
 
5
5
  ---
6
6
 
@@ -113,7 +113,10 @@ Icons use **Material Symbols** (Variable Font).
113
113
  <Icon name="search" weight={500} size={24} />
114
114
  ```
115
115
 
116
- - Standard CDN imports: `@import "@bug-on/m3-expressive/typography.css";` and `@import "@bug-on/m3-expressive/material-symbols-cdn.css";`
116
+ - Standard CDN setup:
117
+ - Base styles: `@import "@bug-on/m3-expressive/material-symbols-cdn.css";` and `@import "@bug-on/m3-expressive/typography.css";` in root CSS.
118
+ - React + Vite: Add `<link rel="preconnect" ...>` and `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block" />` to `index.html` inside `<head>`.
119
+ - Next.js (App Router): Add `<MaterialSymbolsPreconnect variants={["rounded"]} display="block" />` in `app/layout.tsx` inside `<head>`.
117
120
  - Offline / Self-hosted imports: `pnpm add @bug-on/m3-fonts`, then `@import "@bug-on/m3-fonts/typography.css";` and `@import "@bug-on/m3-fonts/material-symbols.css";`
118
121
 
119
122
  ---
@@ -222,16 +225,17 @@ import {
222
225
 
223
226
  ## Subpath Exports Map
224
227
 
225
- - `@bug-on/m3-expressive` — complete package exports
226
- - `@bug-on/m3-expressive/index.css` — **REQUIRED**: bundled tokens + Tailwind `@theme` + resets
227
- - `@bug-on/m3-expressive/core` — base providers, hooks, motion tokens
228
- - `@bug-on/m3-expressive/buttons` — Button, IconButton, ButtonDistribute, FAB, ExtendedFAB, FABMenu, SplitButton, ButtonGroup
229
- - `@bug-on/m3-expressive/forms` — Select, TextField, Checkbox, RadioButton, Switch, Slider, Search
230
- - `@bug-on/m3-expressive/feedback` — Dialog, Menu, ContextMenu, VerticalMenu, Tooltip, SnackbarProvider, ProgressIndicator
231
- - `@bug-on/m3-expressive/navigation` — NavigationBar, NavigationRail, Drawer, Tabs
232
- - `@bug-on/m3-expressive/overlays` — BottomSheet, SideSheet
233
- - `@bug-on/m3-expressive/pickers` — DatePicker, DateRangePicker, TimePicker, state hooks
234
- - `@bug-on/m3-expressive/shapes` — ShapeMedia, ShapeSvg
228
+ - `@bug-on/m3-expressive` — Complete package root exports
229
+ - `@bug-on/m3-expressive/index.css` — **REQUIRED**: Bundled tokens + Tailwind v4 `@theme` + resets
230
+ - `@bug-on/m3-expressive/core` — Base providers (`MD3ThemeProvider`), theme utilities (`createMd3ExpressiveTheme`, `generateM3Theme`, `applyTheme`, `resolveMode`), hooks (`useMediaQuery`, `useDOMRipple`, `useTheme`, `useThemeMode`, `useSnackbar`), `Icon`, `Ripple`, `MaterialSymbolsPreconnect`
231
+ - `@bug-on/m3-expressive/buttons` — `Button`, `IconButton`, `ButtonDistribute`, `FAB`, `ExtendedFAB`, `FABMenu`, `SplitButton`, `ButtonGroup`
232
+ - `@bug-on/m3-expressive/forms` — `TextField`, `Select`, `Chip`, `Checkbox`, `TriStateCheckbox`, `RadioButton`, `RadioGroup`, `Switch`, `Slider`, `RangeSlider`
233
+ - `@bug-on/m3-expressive/navigation` — `NavigationBar`, `NavigationBarItem`, `NavigationRail`, `NavigationRailItem`, `NavigationDrawer`, `Tabs`, `Tab`, `TabsList`, `TabsContent`, `SmallAppBar`, `MediumFlexibleAppBar`, `LargeFlexibleAppBar`, `BottomAppBar`, `DockedToolbar`, `HorizontalFloatingToolbar`, `VerticalFloatingToolbar`, `ToolbarIconButton`, `ToolbarToggleButton`, `Menu`, `ContextMenu`, `VerticalMenu`, `Search`, `SearchBar`, `SearchView`
234
+ - `@bug-on/m3-expressive/overlays` — `Dialog`, `DialogTrigger`, `DialogContent`, `DialogHeader`, `DialogTitle`, `DialogBody`, `DialogFooter`, `DialogClose`, `DialogFullScreenContent`, `Drawer`, `BottomSheet`, `BottomSheetModal`, `SideSheet`, `SideSheetModal`
235
+ - `@bug-on/m3-expressive/feedback` — `Badge`, `BadgedBox`, `LoadingIndicator`, `ProgressIndicator`, `Snackbar`, `SnackbarProvider`, `useSnackbar`, `PlainTooltip`, `RichTooltip`
236
+ - `@bug-on/m3-expressive/layout` — `Card`, `Carousel`, `Divider`, `List`, `ListItem`, `ListDivider`, `ScrollArea`, `CodeBlock`, `TableOfContents`, `Text`, `Typography`, `FadingBlurMask`
237
+ - `@bug-on/m3-expressive/pickers` — `DatePicker`, `DatePickerDialog`, `DatePickerInput`, `DateRangePicker`, `TimePicker`, `TimePickerDialog`, `TimeInput`, `useDatePickerState`, `useDateRangePickerState`, `useTimePickerState`
238
+ - `@bug-on/m3-expressive/shapes` — `ShapeMedia`, `ShapeSvg`, `ShapeIcon`, `useShapeMorph`
235
239
 
236
240
  ---
237
241
 
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bug-on/m3-expressive
2
2
 
3
- > MD3 Expressive Design System for React + Tailwind v4 + Framer Motion. Version: 1.3.1
3
+ > MD3 Expressive Design System for React 19 + Tailwind CSS v4 + Motion for React (Current Stable Release).
4
4
 
5
5
  > [!WARNING]
6
6
  > Bug On MD3 Expressive only supports **Tailwind CSS v4** (peer dependency `tailwindcss: ">=4.0.0"`). **Tailwind CSS v3 is no longer supported**.
@@ -23,14 +23,19 @@ pnpm add @bug-on/m3-expressive motion
23
23
  ```
24
24
 
25
25
  ```css
26
- /* globals.css — Zero Config Tailwind v4 setup */
26
+ /* globals.css / index.css — Zero Config Tailwind v4 setup */
27
27
  @import "tailwindcss";
28
28
  @import "@bug-on/m3-expressive/index.css"; /* tokens + @theme + resets (REQUIRED) */
29
29
  @import "@bug-on/m3-tailwind"; /* optional: MD3 utilities & elevation */
30
30
  @import "@bug-on/m3-expressive/typography.css"; /* optional: typography preset classes */
31
- @import "@bug-on/m3-expressive/material-symbols-cdn.css"; /* optional: Material Symbols (CDN) */
31
+ @import "@bug-on/m3-expressive/material-symbols-cdn.css"; /* base styles for .md-icon */
32
32
  ```
33
33
 
34
+ Material Symbols CDN Font Loading:
35
+ - **React + Vite**: Add font link tags to `index.html` inside `<head>` (use `display=block` to prevent ligature text flashing):
36
+ `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block" />`
37
+ - **Next.js (App Router)**: Add `<MaterialSymbolsPreconnect variants={["rounded"]} display="block" />` in `app/layout.tsx` inside `<head>`.
38
+
34
39
  For offline or self-hosted fonts:
35
40
  ```bash
36
41
  pnpm add @bug-on/m3-fonts
@@ -83,13 +88,13 @@ function Root({ children }: { children: React.ReactNode }) {
83
88
 
84
89
  - `@bug-on/m3-expressive` — complete package exports
85
90
  - `@bug-on/m3-expressive/index.css` — **REQUIRED**: bundled tokens + Tailwind `@theme` + resets
86
- - `@bug-on/m3-expressive/core` — base providers (`MD3ThemeProvider`), hooks (`useTheme`, `useThemeMode`, `useSnackbar`), `Icon`, `Ripple`
91
+ - `@bug-on/m3-expressive/core` — base providers (`MD3ThemeProvider`), theme utilities (`createMd3ExpressiveTheme`, `generateM3Theme`, `applyTheme`, `resolveMode`), hooks (`useTheme`, `useThemeMode`, `useSnackbar`, `useMediaQuery`, `useDOMRipple`), `Icon`, `Ripple`, `MaterialSymbolsPreconnect`
87
92
  - `@bug-on/m3-expressive/buttons` — Button, IconButton, ButtonDistribute, FAB, ExtendedFAB, FABMenu, SplitButton, ButtonGroup
88
- - `@bug-on/m3-expressive/forms` — TextField, Chip, Checkbox, TriStateCheckbox, RadioButton, RadioGroup, Switch, Slider, RangeSlider, Select, Search
93
+ - `@bug-on/m3-expressive/forms` — TextField, Chip, Checkbox, TriStateCheckbox, RadioButton, RadioGroup, Switch, Slider, RangeSlider, Select
89
94
  - `@bug-on/m3-expressive/feedback` — Snackbar, SnackbarProvider, useSnackbar, ProgressIndicator (linear, circular, wavy), LoadingIndicator, Badge, BadgedBox, PlainTooltip, RichTooltip
90
95
  - `@bug-on/m3-expressive/navigation` — NavigationBar, NavigationRail, NavigationDrawer, Tabs, Tab, SmallAppBar, MediumFlexibleAppBar, LargeFlexibleAppBar, BottomAppBar, DockedToolbar, HorizontalFloatingToolbar, VerticalFloatingToolbar, Menu, ContextMenu, VerticalMenu, Search
91
96
  - `@bug-on/m3-expressive/overlays` — Dialog, DialogFullScreenContent, Drawer, BottomSheet, BottomSheetModal, SideSheet, SideSheetModal
92
- - `@bug-on/m3-expressive/layout` — Card, Carousel, Divider, List, ListItem, ListDivider, ScrollArea, CodeBlock, TableOfContents, Text, Typography
97
+ - `@bug-on/m3-expressive/layout` — Card, Carousel, Divider, List, ListItem, ListDivider, ScrollArea, CodeBlock, TableOfContents, Text, Typography, FadingBlurMask
93
98
  - `@bug-on/m3-expressive/pickers` — DatePicker, DatePickerDialog, DatePickerInput, DateRangePicker, TimePicker, TimePickerDialog, TimeInput, state hooks
94
99
  - `@bug-on/m3-expressive/shapes` — ShapeMedia, ShapeSvg, ShapeIcon, useShapeMorph
95
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bug-on/m3-expressive",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Material Design 3 Expressive React components",
5
5
  "author": "Bug On",
6
6
  "license": "MIT",
@@ -174,33 +174,33 @@
174
174
  "@dnd-kit/sortable": "^10.0.0",
175
175
  "@dnd-kit/utilities": "^3.2.2",
176
176
  "@material/material-color-utilities": "^0.4.0",
177
- "@radix-ui/react-context-menu": "^2.2.16",
178
- "@radix-ui/react-dialog": "^1.1.15",
179
- "@radix-ui/react-dropdown-menu": "^2.1.16",
180
- "@radix-ui/react-scroll-area": "^1.2.10",
181
- "@radix-ui/react-slot": "^1.2.4",
177
+ "@radix-ui/react-context-menu": "^2.3.7",
178
+ "@radix-ui/react-dialog": "^1.1.23",
179
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
180
+ "@radix-ui/react-scroll-area": "^1.2.18",
181
+ "@radix-ui/react-slot": "^1.3.3",
182
182
  "@use-gesture/react": "^10.3.1",
183
183
  "class-variance-authority": "^0.7.1",
184
184
  "clsx": "^2.1.1",
185
- "tailwind-merge": "^3.3.1",
186
- "@bug-on/m3-tokens": "1.2.2",
187
- "@bug-on/m3-tailwind": "1.2.2"
185
+ "tailwind-merge": "^3.6.0",
186
+ "@bug-on/m3-tailwind": "1.2.3",
187
+ "@bug-on/m3-tokens": "1.2.2"
188
188
  },
189
189
  "devDependencies": {
190
190
  "@testing-library/jest-dom": "^6.9.1",
191
- "@testing-library/react": "^16.3.2",
192
- "@testing-library/user-event": "^14.6.1",
191
+ "@testing-library/react": "^16.3.3",
192
+ "@testing-library/user-event": "^14.6.7",
193
193
  "@types/jest-axe": "^3.5.9",
194
194
  "@types/react": "^19.0.0",
195
195
  "@types/react-dom": "^19.0.0",
196
- "@vitejs/plugin-react": "^6.0.2",
197
- "@vitest/coverage-v8": "4.1.4",
198
- "jest-axe": "^10.0.0",
199
- "jsdom": "^29.0.0",
200
- "tsup": "^8.4.0",
196
+ "@vitejs/plugin-react": "^6.1.1",
197
+ "@vitest/coverage-v8": "^4.1.11",
198
+ "jest-axe": "^11.0.0",
199
+ "jsdom": "^30.0.1",
200
+ "tsup": "^8.5.1",
201
201
  "typescript": "5.8.3",
202
- "vite": ">=8.0.5",
203
- "vitest": "^4.1.6"
202
+ "vite": ">=8.2.2",
203
+ "vitest": "^4.1.11"
204
204
  },
205
205
  "scripts": {
206
206
  "prebuild": "node -e \"const fs=require('fs'); if(fs.existsSync('../../llms.txt')) { fs.copyFileSync('../../llms.txt', 'llms.txt'); fs.copyFileSync('../../llms-full.txt', 'llms-full.txt'); }\"",