@m3ui-vue/m3ui-vue 0.9.1 → 0.9.2

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 (86) hide show
  1. package/README.md +41 -0
  2. package/dist/API.md +199 -54
  3. package/dist/{MTextField-pJU1vFaR.js → MTextField-Ck0oWDMk.js} +8 -2
  4. package/dist/MTextField-Ck0oWDMk.js.map +1 -0
  5. package/dist/api.json +1 -1
  6. package/dist/code-editor.js +1 -1
  7. package/dist/components/MBox.vue.d.ts +3 -3
  8. package/dist/components/MColorPicker.vue.d.ts +13 -1
  9. package/dist/components/MColorPickerModal.vue.d.ts +14 -2
  10. package/dist/components/MDragHandle.vue.d.ts +12 -0
  11. package/dist/components/MEmojiSelector.vue.d.ts +1 -1
  12. package/dist/components/MFab.vue.d.ts +1 -1
  13. package/dist/components/MFabMenu.vue.d.ts +1 -1
  14. package/dist/components/MListItem.vue.d.ts +5 -5
  15. package/dist/components/MOverlay.vue.d.ts +1 -1
  16. package/dist/components/MScrollField.vue.d.ts +40 -0
  17. package/dist/components/MScrollable.vue.d.ts +9 -0
  18. package/dist/components/MSplitter.vue.d.ts +2 -2
  19. package/dist/components/MSwipeToDismiss.vue.d.ts +49 -0
  20. package/dist/components/MTransition.vue.d.ts +34 -0
  21. package/dist/components/MWindow.vue.d.ts +1 -1
  22. package/dist/components/_MColorPanel.vue.d.ts +18 -0
  23. package/dist/composables/_colorUtils.d.ts +34 -0
  24. package/dist/composables/_themeColor.d.ts +1 -0
  25. package/dist/composables/_useSpring.d.ts +15 -0
  26. package/dist/composables/dynamicColor.d.ts +18 -0
  27. package/dist/composables/useColorPalette.d.ts +27 -0
  28. package/dist/composables/useLocale.d.ts +10 -0
  29. package/dist/index.d.ts +9 -1
  30. package/dist/locales/index.js +70 -0
  31. package/dist/locales/index.js.map +1 -1
  32. package/dist/m3ui-vue.css +1 -1
  33. package/dist/m3ui.js +4808 -3622
  34. package/dist/m3ui.js.map +1 -1
  35. package/dist/material-color-utilities-Cktu8DBU.js +3160 -0
  36. package/dist/material-color-utilities-Cktu8DBU.js.map +1 -0
  37. package/dist/plugin.d.ts +18 -0
  38. package/dist/rich-text-editor.js +2 -2
  39. package/dist/styles/palettes.css +546 -0
  40. package/dist/styles/theme.css +77 -0
  41. package/dist/styles.css +1 -1
  42. package/dist/{useLocale-Drihe5G2.js → useLocale-CFW8cIzL.js} +11 -1
  43. package/dist/useLocale-CFW8cIzL.js.map +1 -0
  44. package/package.json +2 -1
  45. package/src/__tests__/MButtonGroup.test.ts +51 -0
  46. package/src/__tests__/MColorPicker.test.ts +141 -0
  47. package/src/__tests__/MDragHandle.test.ts +57 -0
  48. package/src/__tests__/MListItemShape.test.ts +76 -0
  49. package/src/__tests__/MScrollField.test.ts +41 -0
  50. package/src/__tests__/MScrollable.test.ts +42 -0
  51. package/src/__tests__/MSwipeToDismiss.test.ts +104 -0
  52. package/src/__tests__/MTransition.test.ts +27 -0
  53. package/src/__tests__/dynamicColor.test.ts +191 -0
  54. package/src/components/MBox.vue +4 -2
  55. package/src/components/MButtonGroup.vue +116 -35
  56. package/src/components/MColorPicker.vue +114 -210
  57. package/src/components/MColorPickerModal.vue +50 -251
  58. package/src/components/MDragHandle.vue +54 -0
  59. package/src/components/MList.vue +33 -3
  60. package/src/components/MListItem.vue +75 -5
  61. package/src/components/MScrollField.vue +302 -0
  62. package/src/components/MScrollable.vue +160 -5
  63. package/src/components/MSplitter.vue +33 -10
  64. package/src/components/MSwipeToDismiss.vue +247 -0
  65. package/src/components/MTransition.vue +149 -0
  66. package/src/components/_MColorPanel.vue +478 -0
  67. package/src/composables/_colorUtils.ts +107 -0
  68. package/src/composables/_themeColor.ts +33 -0
  69. package/src/composables/_useSpring.ts +89 -0
  70. package/src/composables/dynamicColor.ts +85 -0
  71. package/src/composables/useColorPalette.ts +171 -25
  72. package/src/composables/useFieldBg.ts +6 -0
  73. package/src/composables/useLocale.ts +22 -0
  74. package/src/index.ts +9 -1
  75. package/src/locales/de.ts +10 -0
  76. package/src/locales/es.ts +10 -0
  77. package/src/locales/fr.ts +10 -0
  78. package/src/locales/ja.ts +10 -0
  79. package/src/locales/ko.ts +10 -0
  80. package/src/locales/pt.ts +10 -0
  81. package/src/locales/zh.ts +10 -0
  82. package/src/plugin.ts +28 -7
  83. package/src/styles/palettes.css +546 -0
  84. package/src/styles/theme.css +77 -0
  85. package/dist/MTextField-pJU1vFaR.js.map +0 -1
  86. package/dist/useLocale-Drihe5G2.js.map +0 -1
package/README.md CHANGED
@@ -361,6 +361,20 @@ UI components come from @m3ui-vue/m3ui-vue; its API is in node_modules/@m3ui-vue
361
361
 
362
362
  `purple` (default) `indigo` `navy` `blue` `cyan` `teal` `green` `lime` `olive` `amber` `sand` `orange` `deep-orange` `brown` `red` `coral` `crimson` `pink` `violet` `slate` `graphite` `charcoal` `steel` `ash` `iron` `fog` `pewter` `smoke` `stone` `zinc` `monochrome` `rust` `gold` `emerald` `turquoise` `cobalt` `sapphire` `amethyst` `magenta` `mauve`
363
363
 
364
+ ### Dynamic Color (from a seed)
365
+
366
+ Instead of a named palette, generate the whole scheme (light and dark) from one color with Google's dynamic color algorithm:
367
+
368
+ ```ts
369
+ app.use(createM3UI({ seed: '#0b57d0', seedOptions: { variant: 'tonal-spot', contrast: 0 } }))
370
+ ```
371
+
372
+ At runtime, `useColorPalette().setSeed('#0b57d0')`; `set(id)` switches back to a named palette (the last choice wins). A named `palette` wins over `seed` in `createM3UI`. `generateScheme(seed, options)` returns the tokens if you want them yourself.
373
+
374
+ ### Browser Bar Color on Phones
375
+
376
+ `createM3UI({ themeColor: 'surface' })` keeps `<meta name="theme-color">` in sync with a color role of the active palette (palette, seed and dark mode changes included). Off by default. Chrome and Samsung Internet on Android ignore it in a regular tab while the system is in dark mode; installed apps (PWA) still get it.
377
+
364
378
  ### Switch at Runtime
365
379
 
366
380
  ```vue
@@ -421,6 +435,33 @@ Install only the packages you need:
421
435
  | `MQRCode` | `qrcode-generator` |
422
436
  | `MBarcode` | `jsbarcode` |
423
437
 
438
+ ## Roadmap to 1.0.0
439
+
440
+ 1.0.0 ships once all of Material 3's core is in the library. Still to come:
441
+
442
+ **Components**
443
+
444
+ - [ ] Bottom app bar (`BottomAppBar`) and the Expressive flexible bottom app bar
445
+ - [ ] Standard (non-modal) bottom sheet
446
+ - [ ] Wheel time picker (`TimeScroll`)
447
+ - [ ] Icon toggle buttons (standard, filled, tonal and outlined, with a selected state)
448
+ - [ ] Top app bar scroll behaviors (collapse on scroll, hide on scroll) and the Expressive medium/large flexible app bars with subtitle
449
+ - [ ] Selectable and checkable menu items
450
+ - [ ] Search in the top app bar, and the contained full-screen search
451
+ - [ ] The four chip types (assist, filter, input, suggestion) and their elevated variants
452
+ - [ ] Tabs with the icon beside the label
453
+ - [ ] Swipe to close the modal navigation rail
454
+
455
+ **Foundations**
456
+
457
+ - [ ] Material 3 Expressive shape scale (large-increased, extra-large-increased, extra-extra-large)
458
+ - [ ] Motion tokens: easings, durations and springs, exposed for your own animations
459
+ - [ ] Scrollbars: drop the global rule that hides them in Chromium/WebKit (it reaches the whole app, and Firefox shows them anyway) in favor of thin theme-colored scrollbars with `scrollbar-gutter: stable`, hiding them only where a component needs it. For now, set `scrollbar-width: auto` where you want them visible
460
+
461
+ Already in: dynamic color from a seed, fixed color roles, elevation levels 0–5, the emphasized type scale, and the
462
+ Expressive components so far (button groups, split buttons, toggle buttons, loading indicator, FAB menu, toolbars,
463
+ shapes, carousel, scroll field, short navigation bar…).
464
+
424
465
  ## About this project
425
466
 
426
467
  M3UI Vue started as a set of components I built for my own projects. Over time it grew
package/dist/API.md CHANGED
@@ -1,4 +1,4 @@
1
- # @m3ui-vue/m3ui-vue 0.9.1 — API reference
1
+ # @m3ui-vue/m3ui-vue 0.9.2 — API reference
2
2
 
3
3
  Material Design 3 components for Vue 3 + Tailwind CSS v4. Generated from the source by
4
4
  `scripts/generate-api.mjs`; full docs with live demos at https://m3ui.dev.
@@ -246,7 +246,7 @@ Props:
246
246
  - `surface?: "default" | "container" | "container-low" | "container-high" | "container-highest" | "primary-container" | "secondary-container" | "tertiary-container" | "inverse"` — Surface color variant
247
247
  - `padding?: "none" | "xs" | "sm" | "md" | "lg" | "xl" = "none"` — Padding size
248
248
  - `rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full" = "none"` — Border radius
249
- - `elevation?: 0 | 1 | 2 | 3 = 0` — Shadow elevation level
249
+ - `elevation?: 0 | 1 | 2 | 3 | 4 | 5 = 0` — Shadow elevation level (M3 levels 0–5)
250
250
  - `border?: boolean = false` — Show border
251
251
  - `tag?: string = "div"` — HTML tag to render
252
252
 
@@ -533,31 +533,16 @@ type Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python'
533
533
 
534
534
  ### MColorPicker
535
535
 
536
- An inline, dropdown-anchored color picker — hue slider, saturation/brightness area, and preset swatches.
536
+ An outlined field that opens a color picker in a dropdown: saturation/brightness area, hue (and optional opacity) slider, eyedropper, HEX/RGB/HSL fields, recent colors and preset swatches. Updates the value live while picking.
537
537
 
538
538
  Props:
539
- - `modelValue: string` (v-model) — Selected color in hex format (v-model)
539
+ - `modelValue: string` (v-model) — Selected color in hex format (v-model). `#rrggbb`, or `#rrggbbaa` when `alpha` is on and the color isn't opaque.
540
540
  - `label?: string` — Field label
541
- - `presets?: string[] = [
542
- "#f44336",
543
- "#e91e63",
544
- "#9c27b0",
545
- "#673ab7",
546
- "#3f51b5",
547
- "#2196f3",
548
- "#03a9f4",
549
- "#00bcd4",
550
- "#009688",
551
- "#4caf50",
552
- "#8bc34a",
553
- "#cddc39",
554
- "#ffeb3b",
555
- "#ffc107",
556
- "#ff9800",
557
- "#ff5722",
558
- "#795548",
559
- "#607d8b",
560
- ]` — Preset color swatches shown in the panel
541
+ - `presets?: string[] = defaultColorPresets` — Preset color swatches shown in the panel
542
+ - `alpha?: boolean = false` — Adds an opacity slider and an alpha channel to the value
543
+ - `recent?: boolean = true` — Remember picked colors and show them above the presets (stored in localStorage, shared by every picker).
544
+ - `recentLimit?: number = 7` — How many recent colors to keep.
545
+ - `eyedropper?: boolean = true` — Show a button to pick a color from the screen, where the browser supports it (Chrome, Edge).
561
546
  - `disabled?: boolean` — Disables the picker
562
547
  - `error?: boolean` — Error state
563
548
  - `errorLabel?: string` — Error message shown when error is true
@@ -565,36 +550,21 @@ Props:
565
550
  - `fieldBg?: string` — Overrides the auto-detected background color used to cut the floating label out of the border
566
551
 
567
552
  Events:
568
- - `update:modelValue(string)` — Emitted with the picked color.
553
+ - `update:modelValue(string)` — Emitted with the picked color, live while dragging or typing.
569
554
 
570
555
  ### MColorPickerModal
571
556
 
572
- A modal, centered color picker with saturation/brightness area, hue slider, hex input, and preset swatches — the sibling of MColorPicker, a fully separate component rather than a shared internal. Only emits on confirm.
557
+ A color picker in a dialog: saturation/brightness area, hue (and optional opacity) slider, eyedropper, HEX/RGB/HSL fields, recent colors and preset swatches. Built on MDialog; the color is only applied on confirm, and the preview shows it next to the original.
573
558
 
574
559
  Props:
575
- - `modelValue: string` (v-model) — Selected color in hex format (v-model)
560
+ - `modelValue: string` (v-model) — Selected color in hex format (v-model). `#rrggbb`, or `#rrggbbaa` when `alpha` is on and the color isn't opaque.
576
561
  - `show?: boolean = false` (v-model:show) — Controls dialog visibility (v-model:show)
577
- - `presets?: string[] = [
578
- "#f44336",
579
- "#e91e63",
580
- "#9c27b0",
581
- "#673ab7",
582
- "#3f51b5",
583
- "#2196f3",
584
- "#03a9f4",
585
- "#00bcd4",
586
- "#009688",
587
- "#4caf50",
588
- "#8bc34a",
589
- "#cddc39",
590
- "#ffeb3b",
591
- "#ffc107",
592
- "#ff9800",
593
- "#ff5722",
594
- "#795548",
595
- "#607d8b",
596
- ]` — Preset color swatches shown in the dialog
597
- - `title?: string` — Dialog title
562
+ - `presets?: string[] = defaultColorPresets` — Preset color swatches shown in the dialog
563
+ - `title?: string` — Dialog title; defaults to the locale's `selectColor`
564
+ - `alpha?: boolean = false` — Adds an opacity slider and an alpha channel to the value
565
+ - `recent?: boolean = true` — Remember confirmed colors and show them above the presets (stored in localStorage, shared by every picker).
566
+ - `recentLimit?: number = 7` — How many recent colors to keep.
567
+ - `eyedropper?: boolean = true` — Show a button to pick a color from the screen, where the browser supports it (Chrome, Edge).
598
568
 
599
569
  Events:
600
570
  - `update:modelValue(string)` — Emitted when a color is confirmed — powers v-model. Only fires on confirm, not while dragging
@@ -917,6 +887,14 @@ export interface DragDropItem {
917
887
  }
918
888
  ```
919
889
 
890
+ ### MDragHandle
891
+
892
+ M3's drag handle: the capsule users drag to resize or move something, e.g. the divider between two panes. Port of Compose's `VerticalDragHandle`; it only draws the handle and its pressed/dragged look, the dragging itself is up to the parent (MSplitter uses it).
893
+
894
+ Props:
895
+ - `orientation?: "horizontal" | "vertical" = "vertical"` — `vertical` is a tall capsule for horizontal drags (between side-by-side panes); `horizontal` is a wide one for vertical drags.
896
+ - `dragging?: boolean = false` — Show the dragged look (the parent is dragging)
897
+
920
898
  ### MEmoji
921
899
 
922
900
  Renders a single emoji character at a fixed pixel size, with optional accessible labeling.
@@ -2129,16 +2107,36 @@ export interface SchedulerEvent {
2129
2107
 
2130
2108
  ### MScrollable
2131
2109
 
2132
- A constrained scroll area — vertical, horizontal, or both directions.
2110
+ A constrained scroll area — vertical, horizontal, or both directions. Shows the browser's scrollbar, or with `scrollbar="indicator"` M3's thin visual-only scrollbar (Compose's `Modifier.nonInteractiveScrollbar`), which appears while scrolling and fades out after.
2133
2111
 
2134
2112
  Props:
2135
2113
  - `direction?: "horizontal" | "vertical" | "both" = "vertical"` — Scroll direction
2136
2114
  - `height?: string` — Fixed height (CSS value)
2137
2115
  - `maxHeight?: string` — Maximum height (CSS value)
2116
+ - `scrollbar?: "none" | "native" | "indicator" = "native"` — `native`: the browser's scrollbar. `indicator`: M3's thin scrollbar, visual only (scroll with the wheel, touch or keys). `none`: no scrollbar at all.
2117
+ - `scrollbarFade?: boolean = true` — With `scrollbar="indicator"`: show it only while scrolling, fading out after (false keeps it visible)
2138
2118
 
2139
2119
  Slots:
2140
2120
  - `#default` — The scrolling content.
2141
2121
 
2122
+ ### MScrollField
2123
+
2124
+ An endless wheel to pick a number or option by scrolling (M3 Expressive's ScrollField, a port of Compose's `ScrollField`): the centered item is the selected one. Drag, flick, use the mouse wheel, the arrow keys, or click an item. Put two side by side for a time (hours and minutes).
2125
+
2126
+ Props:
2127
+ - `modelValue: number` (v-model) — Index of the selected item, 0 to count - 1 (v-model)
2128
+ - `count: number` — Number of items; the wheel wraps around after the last one
2129
+ - `label?: string` — Accessible name of the field. Include the range when it isn't obvious ("Select year between 2000 and 2025"): the wheel wraps, so screen readers can't tell where it ends.
2130
+ - `format?: ((index: number) => string) = String(index).padStart(2, "0")` — Text for each item (also what screen readers announce). Defaults to the index with at least 2 digits.
2131
+ - `height?: number = 200` — Height in px; three items fit in the default 200 (ScrollFieldDefaults.ScrollFieldHeight)
2132
+ - `disabled?: boolean = false` — Disables the field
2133
+
2134
+ Events:
2135
+ - `update:modelValue(number)` — Emitted with the index of the centered item, as it changes while scrolling
2136
+
2137
+ Slots:
2138
+ - `#item { index: number; selected: boolean; }` — Custom content for each item, instead of the formatted number. Receives `{ index, selected }`.
2139
+
2142
2140
  ### MSearchBar
2143
2141
 
2144
2142
  A collapsed search field that expands into a docked panel or a fullscreen overlay, with results shown below the input.
@@ -2477,7 +2475,7 @@ export interface SplitButtonItem {
2477
2475
 
2478
2476
  ### MSplitter
2479
2477
 
2480
- Two resizable panels divided by a draggable handle.
2478
+ Two resizable panels divided by a draggable bar with M3's drag handle (MDragHandle) on it. The bar is also a keyboard separator: arrow keys move it (Shift for 10%), Home/End jump to the limits.
2481
2479
 
2482
2480
  Props:
2483
2481
  - `direction?: "horizontal" | "vertical" = "horizontal"` — Split direction
@@ -2616,6 +2614,33 @@ Slots:
2616
2614
  - `#main { twoPane: boolean; }` — The main content
2617
2615
  - `#supporting { twoPane: boolean; }` — Content that supports the main pane: related items, a summary, details, tools
2618
2616
 
2617
+ ### MSwipeToDismiss
2618
+
2619
+ Content that can be swiped left or right to dismiss it, uncovering a background behind it (a port of Compose's `SwipeToDismissBox`), typically a list item with "archive" and "delete" behind. Once swiped away it stays there until you reset it (`v-model` back to `'settled'`, or `reset()`), so you decide what happens: remove the item, or undo.
2620
+
2621
+ Props:
2622
+ - `modelValue?: SwipeToDismissValue = "settled"` (v-model) — State (v-model): `'settled'`, or dismissed towards `'start-to-end'` / `'end-to-start'`. Set it to animate there.
2623
+ - `startToEnd?: boolean = true` — Allow dismissing by swiping in the reading direction (right in LTR)
2624
+ - `endToStart?: boolean = true` — Allow dismissing by swiping against the reading direction (left in LTR)
2625
+ - `disabled?: boolean = false` — Turns the swipe gesture off (setting v-model still works)
2626
+ - `threshold?: number = 56` — How far, in px, the content has to move before releasing dismisses it (SwipeToDismissBoxDefaults: 56dp)
2627
+
2628
+ Events:
2629
+ - `update:modelValue(SwipeToDismissValue)` — Emitted when it settles in a new state — powers v-model
2630
+ - `dismiss("start-to-end" | "end-to-start")` — Emitted with the direction when the content is swiped away
2631
+
2632
+ Slots:
2633
+ - `#background { direction: SwipeToDismissValue; target: SwipeToDismissValue; progress: number; }` — What the swipe uncovers. Receives `{ direction, target, progress }`: the side being swiped (`'start-to-end'`, `'end-to-start'` or `'settled'`), the state it would settle in if released now, and how far it has moved (0 to 1)
2634
+ - `#default` — The content that moves
2635
+
2636
+ Exposed (template ref):
2637
+ - `reset: () => void` — Animates back to `'settled'`
2638
+ - `dismiss: (dir: "start-to-end" | "end-to-start") => void` — Animates away in the given direction
2639
+
2640
+ ```ts
2641
+ export type SwipeToDismissValue = 'settled' | 'start-to-end' | 'end-to-start'
2642
+ ```
2643
+
2619
2644
  ### MSwitch
2620
2645
 
2621
2646
  A toggle switch with an optional label, 4 semantic colors, and both M3 icon variants.
@@ -3004,6 +3029,18 @@ export interface TransferItem {
3004
3029
  type Value = string | number
3005
3030
  ```
3006
3031
 
3032
+ ### MTransition
3033
+
3034
+ M3's navigation transitions between two views (a port of Compose's `MaterialTransitions`): `shared-axis` slides the new view in from the side as the old one slides out (use `reverse` when going back), and `fade-through` fades the old view out and the new one in with a slight scale, for destinations without a spatial relationship such as navigation bar tabs. Wrap content that changes its `key` (or a `v-if`/`v-else` pair, or a `<RouterView>` slot's component); both views overlap while they animate.
3035
+
3036
+ Props:
3037
+ - `type?: "shared-axis" | "fade-through" = "shared-axis"` — `shared-axis` (horizontal, for forward/back navigation) or `fade-through` (unrelated destinations)
3038
+ - `reverse?: boolean = false` — Shared axis: play the backward transition (the new view comes from the start side)
3039
+ - `appear?: boolean = false` — Animate the first view too
3040
+
3041
+ Slots:
3042
+ - `#default` — The current view; give it a `key` that changes with it
3043
+
3007
3044
  ### MTree
3008
3045
 
3009
3046
  A hierarchical tree view with expand/collapse, single-node selection, and optional cascading checkbox selection.
@@ -3172,6 +3209,8 @@ useColorPalette(): {
3172
3209
  palette: Ref<string>
3173
3210
  palettes: Palette[]
3174
3211
  set: (id: string) => void
3212
+ seed: Readonly<Ref<{ readonly seed: string; readonly variant?: SchemeVariant; readonly contrast?: number; } | null>>
3213
+ setSeed: (seed: string, options?: SeedOptions) => Promise<void>
3175
3214
  persistPalette: Ref<boolean>
3176
3215
  setPersistPalette: (enabled: boolean) => void
3177
3216
  }
@@ -3183,6 +3222,38 @@ useColorPalette(): {
3183
3222
  palettes: Palette[]
3184
3223
  ```
3185
3224
 
3225
+ ### SEED_PALETTE
3226
+
3227
+ The palette id used while a seed color is active (`useColorPalette().setSeed()`).
3228
+
3229
+ ```ts
3230
+ SEED_PALETTE: "seed"
3231
+ ```
3232
+
3233
+ ### generateScheme
3234
+
3235
+ Generates the light and dark schemes for a seed color (`#rrggbb`).
3236
+
3237
+ ```ts
3238
+ generateScheme(seed: string, options: SeedOptions = {}): Promise<GeneratedScheme>
3239
+ ```
3240
+
3241
+ ### schemeToCss
3242
+
3243
+ CSS for a scheme under `[data-palette='<id>']` (light) and `[data-palette='<id>'].dark`, like palettes.css.
3244
+
3245
+ ```ts
3246
+ schemeToCss(scheme: GeneratedScheme, id: string): string
3247
+ ```
3248
+
3249
+ ### schemeRoles
3250
+
3251
+ The `--color-*` roles a generated scheme sets. `success*` is a library extension and stays as themed.
3252
+
3253
+ ```ts
3254
+ schemeRoles: readonly ["primary", "on-primary", "primary-container", "on-primary-container", "secondary", "on-secondary", "secondary-container", "on-secondary-container", "tertiary", "on-tertiary", "tertiary-container", "on-tertiary-container", "error", "on-error", "error-container", "on-error-container", "background", "on-background", "surface", "on-surface", "surface-variant", "on-surface-variant", "surface-dim", "surface-bright", "surface-container-lowest", "surface-container-low", "surface-container", "surface-container-high", "surface-container-highest", "outline", "outline-variant", "inverse-surface", "inverse-on-surface", "inverse-primary", "scrim", "shadow", "primary-fixed", "primary-fixed-dim", "on-primary-fixed", "on-primary-fixed-variant", "secondary-fixed", "secondary-fixed-dim", "on-secondary-fixed", "on-secondary-fixed-variant", "tertiary-fixed", "tertiary-fixed-dim", "on-tertiary-fixed", "on-tertiary-fixed-variant"]
3255
+ ```
3256
+
3186
3257
  ### useToast
3187
3258
 
3188
3259
  ```ts
@@ -3353,7 +3424,24 @@ export interface M3UIOptions {
3353
3424
  * `[data-palette='<id>'].dark { ... }` block, overriding the same tokens as `palettes.css`.
3354
3425
  */
3355
3426
  customPalettes?: Palette[]
3427
+ /**
3428
+ * Generate the whole color scheme (light and dark) from one color instead of using a named palette: Google's
3429
+ * dynamic color, the way Android builds a theme from a wallpaper. `palette` wins when both are given, and like
3430
+ * `palette` it's only the first-visit default unless `persistPalette` is `false`.
3431
+ */
3432
+ seed?: string
3433
+ /** How `seed` becomes a scheme: `variant` (`'tonal-spot'` by default) and `contrast` (0 standard, 0.5 medium, 1 high). */
3434
+ seedOptions?: SeedOptions
3356
3435
  locale?: MaybeRef<Partial<M3Locale>>
3436
+ /**
3437
+ * Keep `<meta name="theme-color">` (the color phones give the browser bar and status bar) in sync with a color
3438
+ * role of the active palette, following palette, seed and dark mode changes. `'surface'` matches a top app
3439
+ * bar, as Material apps on Android do; any role name works (`'primary'`, `'surface-container'`…). Off by default:
3440
+ * when set, the library owns that meta (it's created if missing, and a light/dark `media` pair becomes one).
3441
+ * Note that Chrome and Samsung Internet on Android ignore it in a regular tab while the system is in dark
3442
+ * mode (they keep their own dark bar); installed apps (PWA) still get it.
3443
+ */
3444
+ themeColor?: 'surface' | 'surface-container' | 'primary' | (string & {})
3357
3445
  }
3358
3446
  ```
3359
3447
 
@@ -3365,10 +3453,55 @@ export type Theme = 'light' | 'dark' | 'system'
3365
3453
  export interface Palette {
3366
3454
  id: string
3367
3455
  label: string
3456
+ /**
3457
+ * The palette's key color. A custom palette (`createM3UI({ customPalettes })`) with no CSS of its own gets its
3458
+ * scheme generated from it; one with `[data-palette='<id>']` rules keeps them.
3459
+ */
3460
+ seed: string
3461
+ }
3462
+ ```
3463
+
3464
+ ```ts
3465
+ export interface ActiveSeed extends SeedOptions {
3368
3466
  seed: string
3369
3467
  }
3370
3468
  ```
3371
3469
 
3470
+ ```ts
3471
+ // Dynamic color: a full M3 color scheme (light and dark) generated from one seed color with Google's
3472
+ // material-color-utilities (HCT, DynamicScheme). The package is loaded with a dynamic import, so apps that
3473
+ // never use a seed don't download it; it's bundled into the library (its 0.4.0 ESM build has an extensionless
3474
+ // import that Node can't resolve, which would break SSR and tests if it were left external).
3475
+
3476
+ export type SchemeVariant =
3477
+ | 'tonal-spot'
3478
+ | 'expressive'
3479
+ | 'vibrant'
3480
+ | 'fidelity'
3481
+ | 'content'
3482
+ | 'neutral'
3483
+ | 'monochrome'
3484
+ | 'rainbow'
3485
+ | 'fruit-salad'
3486
+ ```
3487
+
3488
+ ```ts
3489
+ export interface SeedOptions {
3490
+ /** How the seed spreads into the scheme. `tonal-spot` is Android's default (calm, seed-led). */
3491
+ variant?: SchemeVariant
3492
+ /** Contrast level: 0 standard, 0.5 medium, 1 high (-1 reduced). */
3493
+ contrast?: number
3494
+ }
3495
+ ```
3496
+
3497
+ ```ts
3498
+ /** Token name (as in `--color-<name>`) → hex, for each scheme. */
3499
+ export interface GeneratedScheme {
3500
+ light: Record<string, string>
3501
+ dark: Record<string, string>
3502
+ }
3503
+ ```
3504
+
3372
3505
  ```ts
3373
3506
  export interface Toast {
3374
3507
  id: number
@@ -3453,6 +3586,18 @@ export interface M3Locale {
3453
3586
  previousMonth: string
3454
3587
  nextMonth: string
3455
3588
 
3589
+ // Color picker
3590
+ selectColor: string
3591
+ colorHue: string
3592
+ colorSaturation: string
3593
+ colorBrightness: string
3594
+ colorAlpha: string
3595
+ colorEyedropper: string
3596
+ colorOriginal: string
3597
+ colorFormat: string
3598
+ colorRecent: string
3599
+ colorPresets: string
3600
+
3456
3601
  // Scheduler
3457
3602
  dayView: string
3458
3603
  weekView: string
@@ -3650,12 +3795,12 @@ export interface EmojiCategory {
3650
3795
  `M3Locale` keys (pass a partial object to `createM3UI({ locale })`; presets from `@m3ui-vue/m3ui-vue/locales`:
3651
3796
  `esLocale`, `frLocale`, `ptLocale`, `deLocale`, `jaLocale`, `zhLocale`, `koLocale`):
3652
3797
 
3653
- lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, selectTime, selectRange, pickStart, pickEnd, previousMonth, nextMonth, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem
3798
+ lang, search, noResults, close, cancel, confirm, loading, menu, previous, next, today, more, selectedCount, recordCount, expand, columns, exportCsv, noGroup, finish, dropText, selectText, maxSizePrefix, remove, selectDate, selectTime, selectRange, pickStart, pickEnd, previousMonth, nextMonth, selectColor, colorHue, colorSaturation, colorBrightness, colorAlpha, colorEyedropper, colorOriginal, colorFormat, colorRecent, colorPresets, dayView, weekView, allDay, emojiSearch, emojiNoResults, emojiRecent, emojiSkinTone, emojiSkinTones, emojiCategorySmileys, emojiCategoryGestures, emojiCategoryPeople, emojiCategoryAnimals, emojiCategoryNature, emojiCategoryFood, emojiCategoryActivities, emojiCategoryTravel, emojiCategoryObjects, emojiCategorySymbols, emojiCategoryFlags, available, selected, noItems, moveAllRight, moveRight, moveLeft, moveAllLeft, searchCommand, navigateHint, selectHint, openHint, closeHint, loadingMore, noMoreItems, bold, italic, underline, strikethrough, highlight, bulletList, orderedList, blockquote, code, alignLeft, alignCenter, alignRight, undo, redo, link, image, paragraph, heading1, heading2, heading3, insertLink, insertImage, imageUrlLabel, insert, jsonValid, jsonInvalid, jsonFormat, jsonMinify, jsonElements, jsonFields, resultSuccessTitle, resultSuccessDesc, resultErrorTitle, resultErrorDesc, resultWarningTitle, resultWarningDesc, resultInfoTitle, resultInfoDesc, result404Title, result404Desc, result403Title, result403Desc, result500Title, result500Desc, chatTyping, chatRecordingAudio, reorderHandle, reorderGrabbed, reorderMoved, reorderDropped, reorderCancelled, selectAll, clearSearch, kanbanMoved, windowMinimize, windowMaximize, windowRestore, paginationRange, paginationPage, previousPage, nextPage, carousel, carouselItem
3654
3799
 
3655
3800
  ## Theme tokens
3656
3801
 
3657
- - Colors (`bg-*`, `text-*`, `border-*`…): primary, on-primary, primary-container, on-primary-container, secondary, on-secondary, secondary-container, on-secondary-container, tertiary, on-tertiary, tertiary-container, on-tertiary-container, error, on-error, error-container, on-error-container, success, on-success, success-container, on-success-container, background, on-background, surface, on-surface, surface-variant, on-surface-variant, surface-dim, surface-bright, surface-container-lowest, surface-container-low, surface-container, surface-container-high, surface-container-highest, outline, outline-variant, shadow, scrim, inverse-surface, inverse-on-surface, inverse-primary
3658
- - Type scale (`text-*`): display-large, display-medium, display-small, headline-large, headline-medium, headline-small, title-large, title-medium, title-small, body-large, body-medium, body-small, label-large, label-medium, label-small
3802
+ - Colors (`bg-*`, `text-*`, `border-*`…): primary, on-primary, primary-container, on-primary-container, secondary, on-secondary, secondary-container, on-secondary-container, tertiary, on-tertiary, tertiary-container, on-tertiary-container, primary-fixed, primary-fixed-dim, on-primary-fixed, on-primary-fixed-variant, secondary-fixed, secondary-fixed-dim, on-secondary-fixed, on-secondary-fixed-variant, tertiary-fixed, tertiary-fixed-dim, on-tertiary-fixed, on-tertiary-fixed-variant, error, on-error, error-container, on-error-container, success, on-success, success-container, on-success-container, background, on-background, surface, on-surface, surface-variant, on-surface-variant, surface-dim, surface-bright, surface-container-lowest, surface-container-low, surface-container, surface-container-high, surface-container-highest, outline, outline-variant, shadow, scrim, inverse-surface, inverse-on-surface, inverse-primary
3803
+ - Type scale (`text-*`): display-large, display-medium, display-small, headline-large, headline-medium, headline-small, title-large, title-medium, title-small, body-large, body-medium, body-small, label-large, label-medium, label-small, display-large-emphasized, display-medium-emphasized, display-small-emphasized, headline-large-emphasized, headline-medium-emphasized, headline-small-emphasized, title-large-emphasized, title-medium-emphasized, title-small-emphasized, body-large-emphasized, body-medium-emphasized, body-small-emphasized, label-large-emphasized, label-medium-emphasized, label-small-emphasized
3659
3804
  - Radius (`rounded-*`): xs, sm, md, lg, xl
3660
- - Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4
3805
+ - Shadows (`shadow-*`): elevation-1, elevation-2, elevation-3, elevation-4, elevation-5
3661
3806
  - Palettes (`useColorPalette().set(id)` / `createM3UI({ palette })`): purple, indigo, navy, blue, cyan, teal, green, lime, olive, amber, sand, orange, deep-orange, brown, red, coral, crimson, pink, violet, slate, graphite, charcoal, steel, ash, iron, fog, pewter, smoke, stone, zinc, monochrome, rust, gold, emerald, turquoise, cobalt, sapphire, amethyst, magenta, mauve
@@ -1,4 +1,4 @@
1
- import { i as e } from "./useLocale-Drihe5G2.js";
1
+ import { i as e } from "./useLocale-CFW8cIzL.js";
2
2
  import { t } from "./MIcon-CaEooCmZ.js";
3
3
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
4
  import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useId as A, useSlots as j, watch as ee, withCtx as M, withModifiers as N } from "vue";
@@ -76,6 +76,12 @@ var P = ["aria-label"], F = {
76
76
  "bg-secondary-container",
77
77
  "bg-tertiary-container",
78
78
  "bg-error-container",
79
+ "bg-primary-fixed",
80
+ "bg-primary-fixed-dim",
81
+ "bg-secondary-fixed",
82
+ "bg-secondary-fixed-dim",
83
+ "bg-tertiary-fixed",
84
+ "bg-tertiary-fixed-dim",
79
85
  "bg-primary",
80
86
  "bg-secondary",
81
87
  "bg-tertiary",
@@ -1021,4 +1027,4 @@ var re = "relative inline-flex shrink-0 items-center justify-center overflow-hid
1021
1027
  //#endregion
1022
1028
  export { ce as a, U as c, ue as i, H as l, be as n, K as o, ge as r, W as s, ke as t, R as u };
1023
1029
 
1024
- //# sourceMappingURL=MTextField-pJU1vFaR.js.map
1030
+ //# sourceMappingURL=MTextField-Ck0oWDMk.js.map