@m3-baseui/react-tailwind 3.0.0 → 5.0.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 (67) hide show
  1. package/dist/components/badge/index.js +13 -1
  2. package/dist/components/badge/index.js.map +1 -1
  3. package/dist/components/bottom-app-bar/index.js +13 -1
  4. package/dist/components/bottom-app-bar/index.js.map +1 -1
  5. package/dist/components/bottom-sheet/index.js +13 -1
  6. package/dist/components/bottom-sheet/index.js.map +1 -1
  7. package/dist/components/button/index.d.ts +106 -1
  8. package/dist/components/button/index.js +168 -25
  9. package/dist/components/button/index.js.map +1 -1
  10. package/dist/components/button-group/index.js +13 -1
  11. package/dist/components/button-group/index.js.map +1 -1
  12. package/dist/components/card/index.js +13 -1
  13. package/dist/components/card/index.js.map +1 -1
  14. package/dist/components/carousel/index.js +13 -1
  15. package/dist/components/carousel/index.js.map +1 -1
  16. package/dist/components/date-picker/index.js +13 -1
  17. package/dist/components/date-picker/index.js.map +1 -1
  18. package/dist/components/dialog/index.js +13 -1
  19. package/dist/components/dialog/index.js.map +1 -1
  20. package/dist/components/fab-menu/index.js +13 -1
  21. package/dist/components/fab-menu/index.js.map +1 -1
  22. package/dist/components/icon-button/index.d.ts +50 -22
  23. package/dist/components/icon-button/index.js +130 -33
  24. package/dist/components/icon-button/index.js.map +1 -1
  25. package/dist/components/item/index.d.ts +5 -5
  26. package/dist/components/item/index.js +13 -1
  27. package/dist/components/item/index.js.map +1 -1
  28. package/dist/components/list/index.js +13 -1
  29. package/dist/components/list/index.js.map +1 -1
  30. package/dist/components/loading-indicator/index.js +13 -1
  31. package/dist/components/loading-indicator/index.js.map +1 -1
  32. package/dist/components/menu/index.js +13 -1
  33. package/dist/components/menu/index.js.map +1 -1
  34. package/dist/components/navigation-drawer/index.js +13 -1
  35. package/dist/components/navigation-drawer/index.js.map +1 -1
  36. package/dist/components/navigation-rail/index.js +13 -1
  37. package/dist/components/navigation-rail/index.js.map +1 -1
  38. package/dist/components/search/index.js +13 -1
  39. package/dist/components/search/index.js.map +1 -1
  40. package/dist/components/segmented-button/index.js +13 -1
  41. package/dist/components/segmented-button/index.js.map +1 -1
  42. package/dist/components/select/index.js +13 -1
  43. package/dist/components/select/index.js.map +1 -1
  44. package/dist/components/side-sheet/index.js +13 -1
  45. package/dist/components/side-sheet/index.js.map +1 -1
  46. package/dist/components/slider/index.js +49 -15
  47. package/dist/components/slider/index.js.map +1 -1
  48. package/dist/components/snackbar/index.d.ts +5 -5
  49. package/dist/components/split-button/index.js +13 -1
  50. package/dist/components/split-button/index.js.map +1 -1
  51. package/dist/components/tabs/index.js +13 -1
  52. package/dist/components/tabs/index.js.map +1 -1
  53. package/dist/components/time-picker/index.js +13 -1
  54. package/dist/components/time-picker/index.js.map +1 -1
  55. package/dist/components/toolbar/index.js +13 -1
  56. package/dist/components/toolbar/index.js.map +1 -1
  57. package/dist/components/tooltip/index.js +13 -1
  58. package/dist/components/tooltip/index.js.map +1 -1
  59. package/dist/components/top-app-bar/index.js +13 -1
  60. package/dist/components/top-app-bar/index.js.map +1 -1
  61. package/dist/index.d.ts +1 -1
  62. package/dist/index.js +333 -141
  63. package/dist/index.js.map +1 -1
  64. package/dist/tv.d.ts +13 -8
  65. package/dist/tv.js +13 -1
  66. package/dist/tv.js.map +1 -1
  67. package/package.json +3 -3
package/dist/tv.d.ts CHANGED
@@ -1,17 +1,22 @@
1
1
  import { TV } from 'tailwind-variants';
2
2
 
3
3
  /**
4
- * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale.
4
+ * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale and
5
+ * shape scale.
5
6
  *
6
7
  * The Tailwind v4 preset exposes the 15 typescale roles as `text-<role>`
7
- * font-size utilities (e.g. `text-body-small`, `text-label-large`). Stock
8
- * tailwind-merge does not know these custom names, so it groups them with the
9
- * `text-<color>` utilities and drops one when a slot sets both a color *and* a
10
- * typescale (the common M3 case). That silently strips either the color or the
11
- * type, breaking token compliance.
8
+ * font-size utilities (e.g. `text-body-small`, `text-label-large`) and the
9
+ * shape scale as `rounded-<role>` border-radius utilities (e.g. `rounded-small`,
10
+ * `rounded-extra-large`). Stock tailwind-merge does not know these custom names,
11
+ * so it (a) groups the typescale names with `text-<color>` and drops one when a
12
+ * slot sets both a color *and* a typescale, and (b) fails to see two custom
13
+ * `rounded-<role>` classes as conflicting, so a later corner override never
14
+ * dedupes the resting one (both survive, and CSS source order — not intent —
15
+ * decides). Either way token compliance / shape morph silently breaks.
12
16
  *
13
- * Teaching tailwind-merge that the typescale names belong to the `font-size`
14
- * group keeps color and type independent, so both survive the merge.
17
+ * Teaching tailwind-merge that the typescale names belong to `font-size` and the
18
+ * shape names belong to `rounded` keeps color and type independent and makes the
19
+ * corner utilities override one another as expected.
15
20
  */
16
21
 
17
22
  declare const tv: TV;
package/dist/tv.js CHANGED
@@ -19,12 +19,24 @@ var TYPESCALE = [
19
19
  "label-medium",
20
20
  "label-small"
21
21
  ];
22
+ var SHAPE = [
23
+ "none",
24
+ "extra-small",
25
+ "small",
26
+ "medium",
27
+ "large",
28
+ "large-increased",
29
+ "extra-large",
30
+ "extra-large-increased",
31
+ "full"
32
+ ];
22
33
  var tv = (options, config) => tv$1(options, {
23
34
  ...config,
24
35
  twMergeConfig: {
25
36
  extend: {
26
37
  classGroups: {
27
- "font-size": [{ text: [...TYPESCALE] }]
38
+ "font-size": [{ text: [...TYPESCALE] }],
39
+ rounded: [{ rounded: [...SHAPE] }]
28
40
  }
29
41
  }
30
42
  }
package/dist/tv.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tv.ts"],"names":["baseTv"],"mappings":";;;;AAeA,IAAM,SAAA,GAAY;AAAA,EAChB,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,EAAA,GAAS,CAAC,OAAA,EAAS,MAAA,KAC9BA,KAAO,OAAA,EAAS;AAAA,EACd,GAAG,MAAA;AAAA,EACH,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa;AAAA,QACX,WAAA,EAAa,CAAC,EAAE,IAAA,EAAM,CAAC,GAAG,SAAS,GAAG;AAAA;AACxC;AACF;AAEJ,CAAC","file":"tv.js","sourcesContent":["/**\n * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale.\n *\n * The Tailwind v4 preset exposes the 15 typescale roles as `text-<role>`\n * font-size utilities (e.g. `text-body-small`, `text-label-large`). Stock\n * tailwind-merge does not know these custom names, so it groups them with the\n * `text-<color>` utilities and drops one when a slot sets both a color *and* a\n * typescale (the common M3 case). That silently strips either the color or the\n * type, breaking token compliance.\n *\n * Teaching tailwind-merge that the typescale names belong to the `font-size`\n * group keeps color and type independent, so both survive the merge.\n */\nimport { type TV, tv as baseTv } from 'tailwind-variants';\n\nconst TYPESCALE = [\n 'display-large',\n 'display-medium',\n 'display-small',\n 'headline-large',\n 'headline-medium',\n 'headline-small',\n 'title-large',\n 'title-medium',\n 'title-small',\n 'body-large',\n 'body-medium',\n 'body-small',\n 'label-large',\n 'label-medium',\n 'label-small',\n] as const;\n\nexport const tv: TV = (options, config) =>\n baseTv(options, {\n ...config,\n twMergeConfig: {\n extend: {\n classGroups: {\n 'font-size': [{ text: [...TYPESCALE] }],\n },\n },\n },\n });\n"]}
1
+ {"version":3,"sources":["../src/tv.ts"],"names":["baseTv"],"mappings":";;;;AAoBA,IAAM,SAAA,GAAY;AAAA,EAChB,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAKA,IAAM,KAAA,GAAQ;AAAA,EACZ,MAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,iBAAA;AAAA,EACA,aAAA;AAAA,EACA,uBAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,EAAA,GAAS,CAAC,OAAA,EAAS,MAAA,KAC9BA,KAAO,OAAA,EAAS;AAAA,EACd,GAAG,MAAA;AAAA,EACH,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa;AAAA,QACX,WAAA,EAAa,CAAC,EAAE,IAAA,EAAM,CAAC,GAAG,SAAS,GAAG,CAAA;AAAA,QACtC,OAAA,EAAS,CAAC,EAAE,OAAA,EAAS,CAAC,GAAG,KAAK,GAAG;AAAA;AACnC;AACF;AAEJ,CAAC","file":"tv.js","sourcesContent":["/**\n * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale and\n * shape scale.\n *\n * The Tailwind v4 preset exposes the 15 typescale roles as `text-<role>`\n * font-size utilities (e.g. `text-body-small`, `text-label-large`) and the\n * shape scale as `rounded-<role>` border-radius utilities (e.g. `rounded-small`,\n * `rounded-extra-large`). Stock tailwind-merge does not know these custom names,\n * so it (a) groups the typescale names with `text-<color>` and drops one when a\n * slot sets both a color *and* a typescale, and (b) fails to see two custom\n * `rounded-<role>` classes as conflicting, so a later corner override never\n * dedupes the resting one (both survive, and CSS source order — not intent —\n * decides). Either way token compliance / shape morph silently breaks.\n *\n * Teaching tailwind-merge that the typescale names belong to `font-size` and the\n * shape names belong to `rounded` keeps color and type independent and makes the\n * corner utilities override one another as expected.\n */\nimport { type TV, tv as baseTv } from 'tailwind-variants';\n\nconst TYPESCALE = [\n 'display-large',\n 'display-medium',\n 'display-small',\n 'headline-large',\n 'headline-medium',\n 'headline-small',\n 'title-large',\n 'title-medium',\n 'title-small',\n 'body-large',\n 'body-medium',\n 'body-small',\n 'label-large',\n 'label-medium',\n 'label-small',\n] as const;\n\n// M3 shape scale exposed as `rounded-<role>` (see @m3-baseui/tokens theme.css\n// `--radius-*`). `none` / `full` overlap stock Tailwind and are harmless to\n// re-list; the intermediate roles are what stock tailwind-merge misses.\nconst SHAPE = [\n 'none',\n 'extra-small',\n 'small',\n 'medium',\n 'large',\n 'large-increased',\n 'extra-large',\n 'extra-large-increased',\n 'full',\n] as const;\n\nexport const tv: TV = (options, config) =>\n baseTv(options, {\n ...config,\n twMergeConfig: {\n extend: {\n classGroups: {\n 'font-size': [{ text: [...TYPESCALE] }],\n rounded: [{ rounded: [...SHAPE] }],\n },\n },\n },\n });\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m3-baseui/react-tailwind",
3
- "version": "3.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "M3 components implemented with tailwind-variants over the shared @m3-baseui/core factories. Ships the Tailwind v4 @theme preset.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -225,8 +225,8 @@
225
225
  "typecheck": "tsc --noEmit"
226
226
  },
227
227
  "dependencies": {
228
- "@m3-baseui/core": "0.1.0",
229
- "@m3-baseui/tokens": "0.1.0",
228
+ "@m3-baseui/core": "3.0.0",
229
+ "@m3-baseui/tokens": "1.1.0",
230
230
  "tailwind-variants": "^0.3.0"
231
231
  },
232
232
  "peerDependencies": {