@bug-on/md3-react 3.0.1 → 3.0.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/.turbo/turbo-build.log +42 -42
- package/CHANGELOG.md +10 -0
- package/dist/index.css +107 -0
- package/dist/index.d.mts +1491 -1053
- package/dist/index.d.ts +1491 -1053
- package/dist/index.js +4457 -3156
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4394 -3109
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -6
- package/scripts/copy-assets.js +113 -8
- package/src/index.ts +66 -18
- package/src/test/button.test.tsx +1 -1
- package/src/ui/app-bar/app-bar.tokens.ts +5 -24
- package/src/ui/badge.tsx +2 -1
- package/src/ui/buttons/button/button-tokens.ts +118 -0
- package/src/ui/{button.test.tsx → buttons/button/button.test.tsx} +0 -21
- package/src/ui/buttons/button/button.tsx +381 -0
- package/src/ui/buttons/button/index.ts +3 -0
- package/src/ui/buttons/button/types.ts +90 -0
- package/src/ui/buttons/button-group/button-group-defaults.ts +95 -0
- package/src/ui/buttons/button-group/button-group-tokens.ts +20 -0
- package/src/ui/{button-group.test.tsx → buttons/button-group/button-group.test.tsx} +9 -10
- package/src/ui/buttons/button-group/button-group.tsx +699 -0
- package/src/ui/buttons/button-group/index.ts +8 -0
- package/src/ui/buttons/button-group/types.ts +77 -0
- package/src/ui/{fab.tsx → buttons/fabs/fab/fab.tsx} +6 -6
- package/src/ui/buttons/fabs/fab/index.ts +1 -0
- package/src/ui/{fab-menu.tsx → buttons/fabs/fab-menu/fab-menu.tsx} +7 -4
- package/src/ui/buttons/fabs/fab-menu/index.ts +1 -0
- package/src/ui/buttons/fabs/index.ts +2 -0
- package/src/ui/{icon-button.tsx → buttons/icon-button/icon-button.tsx} +6 -6
- package/src/ui/buttons/icon-button/index.ts +1 -0
- package/src/ui/buttons/index.ts +4 -0
- package/src/ui/code-block.tsx +1 -1
- package/src/ui/dialog.tsx +4 -7
- package/src/ui/drawer.tsx +4 -7
- package/src/ui/menu/menu-animations.ts +14 -20
- package/src/ui/menu/menu-tokens.ts +7 -5
- package/src/ui/menu/menu.test.tsx +9 -4
- package/src/ui/navigation-bar.test.tsx +111 -0
- package/src/ui/navigation-bar.tsx +464 -0
- package/src/ui/navigation-rail.test.tsx +5 -4
- package/src/ui/navigation-rail.tsx +32 -23
- package/src/ui/scroll-area.tsx +4 -0
- package/src/ui/search/search-view-fullscreen.tsx +1 -1
- package/src/ui/search/search.tokens.ts +9 -43
- package/src/ui/search/trailing-action.tsx +1 -1
- package/src/ui/shared/constants.ts +25 -27
- package/src/ui/shared/motion-tokens.ts +238 -0
- package/src/ui/snackbar/snackbar.tsx +4 -6
- package/src/ui/switch/switch.tsx +12 -18
- package/src/ui/text-field/text-field.tokens.ts +12 -12
- package/src/ui/text-field/text-field.tsx +31 -19
- package/src/ui/theme-provider/index.tsx +1 -5
- package/src/ui/toc.tsx +1 -1
- package/src/ui/toolbar/__snapshots__/bottom-docked-toolbar.test.tsx.snap +51 -0
- package/src/ui/toolbar/__snapshots__/floating-toolbar-with-fab.test.tsx.snap +113 -0
- package/src/ui/toolbar/__snapshots__/floating-toolbar.test.tsx.snap +169 -0
- package/src/ui/toolbar/bottom-docked-toolbar.test.tsx +114 -0
- package/src/ui/toolbar/docked-toolbar.tsx +186 -0
- package/src/ui/toolbar/floating-toolbar-with-fab.test.tsx +139 -0
- package/src/ui/toolbar/floating-toolbar-with-fab.tsx +199 -0
- package/src/ui/toolbar/floating-toolbar.test.tsx +230 -0
- package/src/ui/toolbar/floating-toolbar.tsx +344 -0
- package/src/ui/toolbar/index.ts +35 -0
- package/src/ui/toolbar/toolbar-colors.ts +37 -0
- package/src/ui/toolbar/toolbar-context.tsx +13 -0
- package/src/ui/toolbar/toolbar-divider.test.tsx +54 -0
- package/src/ui/toolbar/toolbar-divider.tsx +73 -0
- package/src/ui/toolbar/toolbar-icon-button.test.tsx +68 -0
- package/src/ui/toolbar/toolbar-icon-button.tsx +136 -0
- package/src/ui/toolbar/toolbar-scroll-behavior.ts +140 -0
- package/src/ui/toolbar/toolbar-tokens.ts +51 -0
- package/test-clip.html +31 -0
- package/test-shadow.html +5 -1
- package/test-width.html +34 -0
- package/src/ui/button-group.tsx +0 -350
- package/src/ui/button.tsx +0 -665
- package/test-render.tsx +0 -4
- package/test_output.txt +0 -164
- package/test_output_v2.txt +0 -5
- /package/src/ui/{fab.test.tsx → buttons/fabs/fab/fab.test.tsx} +0 -0
- /package/src/ui/{fab-menu.test.tsx → buttons/fabs/fab-menu/fab-menu.test.tsx} +0 -0
- /package/src/ui/{icon-button.test.tsx → buttons/icon-button/icon-button.test.tsx} +0 -0
- /package/src/ui/{Text.tsx → text.tsx} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
✅ Copied
|
|
26
|
-
✅
|
|
27
|
-
✅ Bundled
|
|
28
|
-
✅
|
|
29
|
-
✅
|
|
30
|
-
✅ Copied material-symbols-cdn.css to dist/material-symbols-cdn.css
|
|
31
|
-
✅ Copied material-symbols-self-hosted.css to dist/material-symbols-self-hosted.css
|
|
32
|
-
✅ Generated index.css.d.ts
|
|
33
|
-
✅ Generated typography.css.d.ts
|
|
34
|
-
✅ Generated material-symbols-cdn.css.d.ts
|
|
35
|
-
✅ Generated material-symbols-self-hosted.css.d.ts
|
|
36
|
-
✅ Prepended "use client" to index.js
|
|
37
|
-
✅ Prepended "use client" to index.mjs
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
|
|
2
|
+
> @bug-on/md3-react@3.0.3 build /home/runner/work/bug-on-md3-expressive/bug-on-md3-expressive/packages/react
|
|
3
|
+
> tsup
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/index.ts, src/plugin.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/bug-on-md3-expressive/bug-on-md3-expressive/packages/react/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es2017
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[34mDTS[39m Build start
|
|
13
|
+
[32mCJS[39m [1mdist/plugin.js [22m[32m337.00 B[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m549.29 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/plugin.js.map [22m[32m90.00 B[39m
|
|
16
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m1.21 MB[39m
|
|
17
|
+
[32mCJS[39m ⚡️ Build success in 1802ms
|
|
18
|
+
[32mESM[39m [1mdist/plugin.mjs [22m[32m119.00 B[39m
|
|
19
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m528.28 KB[39m
|
|
20
|
+
[32mESM[39m [1mdist/plugin.mjs.map [22m[32m91.00 B[39m
|
|
21
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.21 MB[39m
|
|
22
|
+
[32mESM[39m ⚡️ Build success in 1802ms
|
|
23
|
+
Copying assets to dist...
|
|
24
|
+
✅ Copied src/assets to dist/assets
|
|
25
|
+
✅ Copied typography.css to dist/typography.css
|
|
26
|
+
✅ Bundled colors.css from md3-tokens into index.css
|
|
27
|
+
✅ Bundled shape.css from md3-tokens into index.css
|
|
28
|
+
✅ Built bundled index.css (tokens + @theme + component base) to dist/index.css
|
|
29
|
+
✅ Tailwind v4 @theme block injected — bg-m3-primary etc. work without manual mapping
|
|
30
|
+
✅ Copied material-symbols-cdn.css to dist/material-symbols-cdn.css
|
|
31
|
+
✅ Copied material-symbols-self-hosted.css to dist/material-symbols-self-hosted.css
|
|
32
|
+
✅ Generated index.css.d.ts
|
|
33
|
+
✅ Generated typography.css.d.ts
|
|
34
|
+
✅ Generated material-symbols-cdn.css.d.ts
|
|
35
|
+
✅ Generated material-symbols-self-hosted.css.d.ts
|
|
36
|
+
✅ Prepended "use client" to index.js
|
|
37
|
+
✅ Prepended "use client" to index.mjs
|
|
38
|
+
[32mDTS[39m ⚡️ Build success in 5184ms
|
|
39
|
+
[32mDTS[39m [1mdist/plugin.d.ts [22m[32m48.00 B[39m
|
|
40
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m252.63 KB[39m
|
|
41
|
+
[32mDTS[39m [1mdist/plugin.d.mts [22m[32m48.00 B[39m
|
|
42
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m252.63 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @bug-on/md3-react
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Motion**: Improved `SPRING_TRANSITION_EXPRESSIVE` with a stronger bounce (0.35 → 0.45) to match MD3 Expressive standards.
|
|
8
|
+
- **Navigation**: Added `activeIndicatorTransition` prop to `NavigationBar` and `NavigationRail` for custom spring configuration.
|
|
9
|
+
- **Navigation**: Enhanced active indicator pill with a stronger "pop" scale animation.
|
|
10
|
+
- **Documentation**: Added custom animation examples for Navigation components and updated API references.
|
|
11
|
+
- **AI Context**: Updated `llms.txt` and `llms-full.txt` with the latest motion specs and Navigation Bar reference.
|
|
12
|
+
|
|
3
13
|
## 3.0.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.css
CHANGED
|
@@ -165,12 +165,21 @@
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
:root {
|
|
168
|
+
/* ── MD3 Expressive Corner Radius Scale (10 levels) ─────────────────────── */
|
|
169
|
+
/* Source: https://m3.material.io/styles/shape/corner-radius-scale */
|
|
170
|
+
|
|
168
171
|
--md-sys-shape-corner-none: 0px;
|
|
169
172
|
--md-sys-shape-corner-extra-small: 4px;
|
|
170
173
|
--md-sys-shape-corner-small: 8px;
|
|
171
174
|
--md-sys-shape-corner-medium: 12px;
|
|
172
175
|
--md-sys-shape-corner-large: 16px;
|
|
176
|
+
/* New in M3 Expressive (May 2025) */
|
|
177
|
+
--md-sys-shape-corner-large-increased: 20px;
|
|
173
178
|
--md-sys-shape-corner-extra-large: 28px;
|
|
179
|
+
/* New in M3 Expressive (May 2025) */
|
|
180
|
+
--md-sys-shape-corner-extra-large-increased: 32px;
|
|
181
|
+
/* New in M3 Expressive (May 2025) */
|
|
182
|
+
--md-sys-shape-corner-extra-extra-large: 48px;
|
|
174
183
|
--md-sys-shape-corner-full: 9999px;
|
|
175
184
|
}
|
|
176
185
|
|
|
@@ -199,3 +208,101 @@ input::-ms-reveal {
|
|
|
199
208
|
width: 0;
|
|
200
209
|
height: 0;
|
|
201
210
|
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/* @bug-on/md3-react — Tailwind v4 Theme Registration */
|
|
214
|
+
/* Registers MD3 tokens as Tailwind utilities. No manual @theme mapping needed. */
|
|
215
|
+
@theme {
|
|
216
|
+
/* ── Colors: Primary ── */
|
|
217
|
+
--color-m3-primary: var(--md-sys-color-primary);
|
|
218
|
+
--color-m3-on-primary: var(--md-sys-color-on-primary);
|
|
219
|
+
--color-m3-primary-container: var(--md-sys-color-primary-container);
|
|
220
|
+
--color-m3-on-primary-container: var(--md-sys-color-on-primary-container);
|
|
221
|
+
--color-m3-primary-fixed: var(--md-sys-color-primary-fixed);
|
|
222
|
+
--color-m3-primary-fixed-dim: var(--md-sys-color-primary-fixed-dim);
|
|
223
|
+
--color-m3-on-primary-fixed: var(--md-sys-color-on-primary-fixed);
|
|
224
|
+
--color-m3-on-primary-fixed-variant: var(--md-sys-color-on-primary-fixed-variant);
|
|
225
|
+
|
|
226
|
+
/* ── Colors: Secondary ── */
|
|
227
|
+
--color-m3-secondary: var(--md-sys-color-secondary);
|
|
228
|
+
--color-m3-on-secondary: var(--md-sys-color-on-secondary);
|
|
229
|
+
--color-m3-secondary-container: var(--md-sys-color-secondary-container);
|
|
230
|
+
--color-m3-on-secondary-container: var(--md-sys-color-on-secondary-container);
|
|
231
|
+
--color-m3-secondary-fixed: var(--md-sys-color-secondary-fixed);
|
|
232
|
+
--color-m3-secondary-fixed-dim: var(--md-sys-color-secondary-fixed-dim);
|
|
233
|
+
--color-m3-on-secondary-fixed: var(--md-sys-color-on-secondary-fixed);
|
|
234
|
+
--color-m3-on-secondary-fixed-variant: var(--md-sys-color-on-secondary-fixed-variant);
|
|
235
|
+
|
|
236
|
+
/* ── Colors: Tertiary ── */
|
|
237
|
+
--color-m3-tertiary: var(--md-sys-color-tertiary);
|
|
238
|
+
--color-m3-on-tertiary: var(--md-sys-color-on-tertiary);
|
|
239
|
+
--color-m3-tertiary-container: var(--md-sys-color-tertiary-container);
|
|
240
|
+
--color-m3-on-tertiary-container: var(--md-sys-color-on-tertiary-container);
|
|
241
|
+
--color-m3-tertiary-fixed: var(--md-sys-color-tertiary-fixed);
|
|
242
|
+
--color-m3-tertiary-fixed-dim: var(--md-sys-color-tertiary-fixed-dim);
|
|
243
|
+
--color-m3-on-tertiary-fixed: var(--md-sys-color-on-tertiary-fixed);
|
|
244
|
+
--color-m3-on-tertiary-fixed-variant: var(--md-sys-color-on-tertiary-fixed-variant);
|
|
245
|
+
|
|
246
|
+
/* ── Colors: Error ── */
|
|
247
|
+
--color-m3-error: var(--md-sys-color-error);
|
|
248
|
+
--color-m3-on-error: var(--md-sys-color-on-error);
|
|
249
|
+
--color-m3-error-container: var(--md-sys-color-error-container);
|
|
250
|
+
--color-m3-on-error-container: var(--md-sys-color-on-error-container);
|
|
251
|
+
|
|
252
|
+
/* ── Colors: Surface ── */
|
|
253
|
+
--color-m3-surface: var(--md-sys-color-surface);
|
|
254
|
+
--color-m3-surface-dim: var(--md-sys-color-surface-dim);
|
|
255
|
+
--color-m3-surface-bright: var(--md-sys-color-surface-bright);
|
|
256
|
+
--color-m3-on-surface: var(--md-sys-color-on-surface);
|
|
257
|
+
--color-m3-surface-variant: var(--md-sys-color-surface-variant);
|
|
258
|
+
--color-m3-on-surface-variant: var(--md-sys-color-on-surface-variant);
|
|
259
|
+
--color-m3-surface-container-lowest: var(--md-sys-color-surface-container-lowest);
|
|
260
|
+
--color-m3-surface-container-low: var(--md-sys-color-surface-container-low);
|
|
261
|
+
--color-m3-surface-container: var(--md-sys-color-surface-container);
|
|
262
|
+
--color-m3-surface-container-high: var(--md-sys-color-surface-container-high);
|
|
263
|
+
--color-m3-surface-container-highest: var(--md-sys-color-surface-container-highest);
|
|
264
|
+
|
|
265
|
+
/* ── Colors: Inverse ── */
|
|
266
|
+
--color-m3-inverse-surface: var(--md-sys-color-inverse-surface);
|
|
267
|
+
--color-m3-inverse-on-surface: var(--md-sys-color-inverse-on-surface);
|
|
268
|
+
--color-m3-inverse-primary: var(--md-sys-color-inverse-primary);
|
|
269
|
+
|
|
270
|
+
/* ── Colors: Outline / Shadow / Scrim ── */
|
|
271
|
+
--color-m3-outline: var(--md-sys-color-outline);
|
|
272
|
+
--color-m3-outline-variant: var(--md-sys-color-outline-variant);
|
|
273
|
+
--color-m3-shadow: var(--md-sys-color-shadow);
|
|
274
|
+
--color-m3-scrim: var(--md-sys-color-scrim);
|
|
275
|
+
--color-m3-surface-tint: var(--md-sys-color-surface-tint);
|
|
276
|
+
|
|
277
|
+
/* ── Colors: Background ── */
|
|
278
|
+
--color-m3-background: var(--md-sys-color-background);
|
|
279
|
+
--color-m3-on-background: var(--md-sys-color-on-background);
|
|
280
|
+
|
|
281
|
+
/* ── Colors: Navigation Indicator ── */
|
|
282
|
+
--color-m3-indicator-active: var(--md-sys-color-indicator-active);
|
|
283
|
+
--color-m3-indicator-container: var(--md-sys-color-indicator-container);
|
|
284
|
+
--color-m3-indicator-contained-active: var(--md-sys-color-indicator-contained-active);
|
|
285
|
+
--color-m3-indicator-contained-container: var(--md-sys-color-indicator-contained-container);
|
|
286
|
+
--color-m3-indicator-track: var(--md-sys-color-indicator-track);
|
|
287
|
+
--color-m3-indicator-stop: var(--md-sys-color-indicator-stop);
|
|
288
|
+
|
|
289
|
+
/* ── Shape: Corner Radius Scale (10 levels, M3 Expressive) ── */
|
|
290
|
+
--radius-m3-none: var(--md-sys-shape-corner-none, 0px);
|
|
291
|
+
--radius-m3-xs: var(--md-sys-shape-corner-extra-small, 4px);
|
|
292
|
+
--radius-m3-sm: var(--md-sys-shape-corner-small, 8px);
|
|
293
|
+
--radius-m3-md: var(--md-sys-shape-corner-medium, 12px);
|
|
294
|
+
--radius-m3-lg: var(--md-sys-shape-corner-large, 16px);
|
|
295
|
+
--radius-m3-lg-inc: var(--md-sys-shape-corner-large-increased, 20px);
|
|
296
|
+
--radius-m3-xl: var(--md-sys-shape-corner-extra-large, 28px);
|
|
297
|
+
--radius-m3-xl-inc: var(--md-sys-shape-corner-extra-large-increased, 32px);
|
|
298
|
+
--radius-m3-xxl: var(--md-sys-shape-corner-extra-extra-large, 48px);
|
|
299
|
+
--radius-m3-full: var(--md-sys-shape-corner-full, 9999px);
|
|
300
|
+
|
|
301
|
+
/* ── Motion Easing ── */
|
|
302
|
+
--ease-m3-emphasized: cubic-bezier(0.2, 0, 0, 1);
|
|
303
|
+
--ease-m3-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
304
|
+
--ease-m3-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
305
|
+
--ease-m3-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
306
|
+
--ease-m3-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
|
|
307
|
+
--ease-m3-standard-decelerate: cubic-bezier(0, 0, 0, 1);
|
|
308
|
+
}
|