@bug-on/m3-expressive 1.0.0 → 1.2.0

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 (57) hide show
  1. package/CHANGELOG.md +41 -2
  2. package/README.md +20 -18
  3. package/dist/assets/material-symbols-self-hosted.css +27 -26
  4. package/dist/buttons.d.mts +2 -2
  5. package/dist/buttons.d.ts +2 -2
  6. package/dist/buttons.js +30 -1
  7. package/dist/buttons.js.map +1 -1
  8. package/dist/buttons.mjs +30 -1
  9. package/dist/buttons.mjs.map +1 -1
  10. package/dist/core-Bc5Wj_pc.d.ts +497 -0
  11. package/dist/core-D4048_K5.d.mts +497 -0
  12. package/dist/core.d.mts +6 -422
  13. package/dist/core.d.ts +6 -422
  14. package/dist/core.js +137 -68
  15. package/dist/core.js.map +1 -1
  16. package/dist/core.mjs +138 -69
  17. package/dist/core.mjs.map +1 -1
  18. package/dist/feedback.d.mts +54 -54
  19. package/dist/feedback.d.ts +54 -54
  20. package/dist/feedback.js.map +1 -1
  21. package/dist/feedback.mjs.map +1 -1
  22. package/dist/index.css +9 -1
  23. package/dist/index.d.mts +66 -4
  24. package/dist/index.d.ts +66 -4
  25. package/dist/index.js +214 -94
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +214 -95
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/layout.d.mts +40 -40
  30. package/dist/layout.d.ts +40 -40
  31. package/dist/layout.js +34 -5
  32. package/dist/layout.js.map +1 -1
  33. package/dist/layout.mjs +34 -5
  34. package/dist/layout.mjs.map +1 -1
  35. package/dist/material-symbols-self-hosted.css +27 -26
  36. package/dist/{md3-DFhj-NZj.d.mts → md3-Dty-Qcad.d.mts} +7 -1
  37. package/dist/{md3-DFhj-NZj.d.ts → md3-Dty-Qcad.d.ts} +7 -1
  38. package/dist/navigation.js.map +1 -1
  39. package/dist/navigation.mjs.map +1 -1
  40. package/dist/overlays.d.mts +2 -2
  41. package/dist/overlays.d.ts +2 -2
  42. package/dist/overlays.js +2 -2
  43. package/dist/overlays.js.map +1 -1
  44. package/dist/overlays.mjs +2 -2
  45. package/dist/overlays.mjs.map +1 -1
  46. package/dist/pickers.d.mts +241 -243
  47. package/dist/pickers.d.ts +241 -243
  48. package/dist/pickers.js +1 -1
  49. package/dist/pickers.js.map +1 -1
  50. package/dist/pickers.mjs +1 -1
  51. package/dist/pickers.mjs.map +1 -1
  52. package/dist/{side-sheet-modal-BY6VCC8p.d.mts → side-sheet-modal-64FGhDxL.d.mts} +20 -21
  53. package/dist/{side-sheet-modal-CglP6KYA.d.ts → side-sheet-modal-Bd5Qqvp9.d.ts} +20 -21
  54. package/dist/{split-button-trailing-uncheckable-C5CLCIKP.d.ts → split-button-trailing-uncheckable-BkPbiBo3.d.ts} +169 -152
  55. package/dist/{split-button-trailing-uncheckable-MXj_kyNt.d.mts → split-button-trailing-uncheckable-D_PLPb-u.d.mts} +169 -152
  56. package/dist/typography.css +5 -0
  57. package/package.json +5 -5
@@ -4,56 +4,57 @@
4
4
  * SETUP STEPS:
5
5
  *
6
6
  * Step 1 — Download font files
7
- * Truy cập: https://github.com/google/material-design-icons/tree/master/variablefont
7
+ * Visit: https://github.com/google/material-design-icons/tree/master/variablefont
8
8
  * Download file: MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].woff2
9
- * ( Rounded / Sharp nếu cần)
9
+ * (and Rounded / Sharp if needed)
10
10
  *
11
11
  * Step 2 — Place font files in your app
12
- * Recommended location: public/fonts/ hoặc src/assets/fonts/
12
+ * Recommended location: public/fonts/ or src/assets/fonts/
13
13
  * Example: public/fonts/MaterialSymbolsOutlined.woff2
14
14
  *
15
- * Step 3 — Copy điều chỉnh @font-face block bên dưới
16
- * Thay đổi src url() để trỏ đúng đường dẫn trong project của bạn
15
+ * Step 3 — Copy and adjust @font-face block below
16
+ * Change src url() to point to the correct path in your project
17
17
  *
18
- * @deprecated New integrations should install `@bug-on/m3-fonts` and import
19
- * `@bug-on/m3-fonts/material-symbols.css`. This legacy export remains only
18
+ * @deprecated New integrations should install `@bug-on/md3-fonts` and import
19
+ * `@bug-on/md3-fonts/material-symbols.css`. This legacy export remains only
20
20
  * for backwards compatibility and will be removed in the next major version.
21
21
  *
22
- * Step 4 — Import file này:
22
+ * Step 4 — Import this file:
23
23
  * import '@bug-on/m3-expressive/material-symbols-self-hosted.css'
24
24
  *
25
25
  * PERFORMANCE NOTES:
26
- * - Self-hosting tốt hơn CDN khi bạn dùng CDN + HTTP/2 cho static assets
27
- * - Nếu không CDN, Google Fonts CDN thể nhanh hơn do cache sharing
28
- * - Dùng font-display: block cho icon fonts (xem do file CDN)
29
- * - WOFF2 format duy nhất cần thiết (100% modern browser support, Brotli compression)
30
- * - Không cần WOFF fallback nữa
26
+ * - Self-hosting is better than CDN when using HTTP/2 CDN for static assets
27
+ * - Without a CDN, Google Fonts CDN may be faster due to cache sharing
28
+ * - Use font-display: block for icon fonts (see reasons in CDN file)
29
+ * - WOFF2 is the only format needed (100% modern browser support, Brotli compression)
30
+ * - WOFF fallback is no longer required
31
31
  *
32
- * SUBSETTING (QUAN TRỌNG để giảm file size):
33
- * Full variable font ~295 KB. Sau khi subset còn ~1-2 KB cho vài chục icons.
34
- * Dùng tool: https://everythingfonts.com/subsetter
35
- * Hoặc dùng Google Fonts text parameter để subset trên CDN:
32
+
33
+ * SUBSETTING (IMPORTANT for reducing file size):
34
+ * Full variable font ~295 KB. After subsetting ~1-2 KB for a few dozen icons.
35
+ * Use tool: https://everythingfonts.com/subsetter
36
+ * Or use Google Fonts text parameter to subset on CDN:
36
37
  * ?family=Material+Symbols+Outlined&text=home%20search%20settings
37
38
  *
38
39
  * GDPR NOTE:
39
- * Self-hosting loại bỏ việc gửi user IP đến Google servers,
40
- * giải quyết GDPR compliance requirement.
40
+ * Self-hosting eliminates sending user IP addresses to Google servers,
41
+ * resolving GDPR compliance requirements.
41
42
  */
42
43
 
43
44
  @font-face {
44
45
  font-family: "Material Symbols Outlined";
45
46
  font-style: normal;
46
- /* Khai báo full axis range để browser biết đây là variable font */
47
+ /* Declare full axis range so browser recognizes variable font */
47
48
  font-weight: 100 700;
48
- /* font-display: block bắt buộc cho icon fonts:
49
- * - Tránh render text thô "arrow_forward" thay icon
50
- * - Max 3s block, sau đó icon xuất hiện
51
- * Tham khảo: https://web.dev/articles/font-best-practices#icon_fonts */
49
+ /* font-display: block is required for icon fonts:
50
+ * - Prevents rendering raw text "arrow_forward" instead of icon
51
+ * - Max 3s block, then icon appears
52
+ * Reference: https://web.dev/articles/font-best-practices#icon_fonts */
52
53
  font-display: block;
53
54
  src: url("/fonts/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].woff2")
54
55
  format("woff2");
55
- /* unicode-range: chỉ load font khi page chứa tự trong range này.
56
- * Material Symbols dùng PUA (Private Use Area) cho ligatures. */
56
+ /* unicode-range: loads font only when page contains characters in range.
57
+ * Material Symbols uses PUA (Private Use Area) for ligatures. */
57
58
  }
58
59
 
59
60
  /*
@@ -1,7 +1,13 @@
1
1
  import { ElementType, ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef } from 'react';
2
2
 
3
3
  /** MD3 button color variants */
4
- type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text";
4
+ type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text"
5
+ /** High-chroma tertiary tone — for hero accents, CTAs, expressive moments. */
6
+ | "tertiary"
7
+ /** Brand-stable primary fixed — same hue across light/dark, for badges/pills. */
8
+ | "primary-fixed"
9
+ /** Brand-stable tertiary fixed — same hue across light/dark, for special states. */
10
+ | "tertiary-fixed";
5
11
  /** MD3 Expressive button sizes */
6
12
  type MD3Size = "xs" | "sm" | "md" | "lg" | "xl";
7
13
  /** MD3 shape families */
@@ -1,7 +1,13 @@
1
1
  import { ElementType, ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef } from 'react';
2
2
 
3
3
  /** MD3 button color variants */
4
- type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text";
4
+ type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text"
5
+ /** High-chroma tertiary tone — for hero accents, CTAs, expressive moments. */
6
+ | "tertiary"
7
+ /** Brand-stable primary fixed — same hue across light/dark, for badges/pills. */
8
+ | "primary-fixed"
9
+ /** Brand-stable tertiary fixed — same hue across light/dark, for special states. */
10
+ | "tertiary-fixed";
5
11
  /** MD3 Expressive button sizes */
6
12
  type MD3Size = "xs" | "sm" | "md" | "lg" | "xl";
7
13
  /** MD3 shape families */