@m3ui-vue/m3ui-vue 0.6.3 → 0.6.4

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/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ---
18
18
 
19
- 120+ tree-shakeable components following [Material Design 3](https://m3.material.io/) guidelines. Ships with 20 color palettes, dark mode, i18n support, and full TypeScript coverage.
19
+ 135+ tree-shakeable components following [Material Design 3](https://m3.material.io/) guidelines. Ships with 30 color palettes, dark mode, i18n support, and full TypeScript coverage.
20
20
 
21
21
  ## Getting Started
22
22
 
@@ -58,7 +58,7 @@ In your main stylesheet (e.g. `src/style.css`):
58
58
  ```css
59
59
  @import 'tailwindcss';
60
60
  @import '@m3ui-vue/m3ui-vue/theme';
61
- @import '@m3ui-vue/m3ui-vue/palettes'; /* 20 color palettes */
61
+ @import '@m3ui-vue/m3ui-vue/palettes'; /* 30 color palettes */
62
62
  @import '@m3ui-vue/m3ui-vue/styles'; /* component transitions & animations */
63
63
  ```
64
64
 
@@ -182,6 +182,7 @@ const name = ref('')
182
182
  | `MBottomSheet` | Bottom sheet |
183
183
  | `MSideSheet` | Side sheet |
184
184
  | `MProgressBar` | Linear progress |
185
+ | `MCircleProgressBar` | Circular progress (circle or wavy variant) |
185
186
  | `MPageProgress` | Top/bottom page-loading bar, auto-wired to vue-router when present, or driven by hand via `usePageProgress()` |
186
187
  | `MSpinner` | Circular spinner |
187
188
  | `MLoadingOverlay` | Full-area loading |
@@ -195,7 +196,7 @@ const name = ref('')
195
196
  | | |
196
197
  |---|---|
197
198
  | `MTabs` | Tab navigation |
198
- | `MMenu` / `MMenuItem` | Dropdown menus |
199
+ | `MMenu` / `MMenuItem` / `MMenuDivider` | Dropdown menus |
199
200
  | `MContextMenu` | Right-click context menu |
200
201
  | `MBreadcrumbs` | Breadcrumb trail |
201
202
  | `MStepper` | Step-by-step wizard |
@@ -267,6 +268,7 @@ const name = ref('')
267
268
  | `MTransferList` | Dual-list transfer |
268
269
  | `MInfiniteScroll` | Infinite scroll wrapper |
269
270
  | `MTour` | Feature tour / onboarding |
271
+ | `MShader` | Shadertoy-style GLSL/WGSL fragment shader renderer (WebGPU with WebGL2 fallback) |
270
272
 
271
273
  ### Separate Entry Points
272
274
 
@@ -287,7 +289,7 @@ import { MBarcode } from '@m3ui-vue/m3ui-vue/barcode'
287
289
  | | |
288
290
  |---|---|
289
291
  | `useTheme()` | Light / dark / system theme with `cycle()` |
290
- | `useColorPalette()` | Switch between 20 palettes at runtime |
292
+ | `useColorPalette()` | Switch between 30 palettes at runtime |
291
293
  | `useToast()` | Programmatic toast notifications |
292
294
  | `useNotification()` | Rich notifications with actions |
293
295
  | `useFieldBg()` | Context-aware field background color |
@@ -297,9 +299,9 @@ import { MBarcode } from '@m3ui-vue/m3ui-vue/barcode'
297
299
 
298
300
  ## Color Palettes
299
301
 
300
- 20 built-in palettes with light and dark variants:
302
+ 30 built-in palettes with light and dark variants:
301
303
 
302
- `purple` (default) `indigo` `navy` `blue` `cyan` `teal` `green` `lime` `olive` `amber` `sand` `orange` `deep-orange` `brown` `red` `coral` `crimson` `pink` `violet` `slate`
304
+ `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`
303
305
 
304
306
  ### Switch at Runtime
305
307
 
package/dist/m3ui.js CHANGED
@@ -9859,24 +9859,51 @@ void main() {
9859
9859
  return e.length <= 28 ? e : [];
9860
9860
  });
9861
9861
  function K(e) {
9862
- return `calc(${re(e)} - ${D.value}px)`;
9862
+ return `calc(${fe(e)} - ${D.value}px)`;
9863
9863
  }
9864
9864
  function J(e) {
9865
- return `calc(100% - ${re(e)} - ${D.value}px)`;
9865
+ return `calc(100% - ${fe(e)} - ${D.value}px)`;
9866
+ }
9867
+ function Y() {
9868
+ return `calc(${fe(d.value)} - ${D.value}px)`;
9869
+ }
9870
+ function X() {
9871
+ return `calc(${fe(d.value)} + ${D.value}px)`;
9866
9872
  }
9867
- let Y = v(() => w.value.radius), X = v(() => Math.max(2, Y.value / 4));
9868
9873
  function ee() {
9869
- return s.value ? `${X.value}px ${X.value}px ${Y.value}px ${Y.value}px` : `${Y.value}px ${X.value}px ${X.value}px ${Y.value}px`;
9874
+ return `calc(${fe(f.value)} - ${fe(d.value)} - ${D.value * 2}px)`;
9870
9875
  }
9871
9876
  function te() {
9872
- return s.value ? `${Y.value}px ${Y.value}px ${X.value}px ${X.value}px` : `${X.value}px ${Y.value}px ${Y.value}px ${X.value}px`;
9877
+ return `calc(100% - ${fe(f.value)} - ${D.value}px)`;
9873
9878
  }
9874
- let ne = v(() => o.value === !1), Z = v(() => ne.value ? "75ms ease" : "0s");
9875
- function re(e) {
9879
+ function ne() {
9880
+ return d.value >= p.value ? `${p.value}%` : `calc(${fe(d.value)} + ${D.value}px)`;
9881
+ }
9882
+ function Z() {
9883
+ return d.value >= p.value ? `calc(${fe(d.value)} - ${p.value}% - ${D.value}px)` : `calc(${p.value}% - ${fe(d.value)} - ${D.value}px)`;
9884
+ }
9885
+ function re() {
9886
+ return d.value >= p.value ? `calc(100% - ${fe(d.value)} - ${D.value}px)` : `calc(100% - ${p.value}% - ${D.value}px)`;
9887
+ }
9888
+ function ie() {
9889
+ return d.value <= p.value ? `calc(${fe(d.value)} - ${D.value}px)` : `calc(${p.value}% - ${D.value}px)`;
9890
+ }
9891
+ let ae = v(() => w.value.radius), $ = v(() => Math.max(2, ae.value / 4)), oe = v(() => ae.value * 1.3);
9892
+ function se() {
9893
+ return `${$.value}px`;
9894
+ }
9895
+ function ce() {
9896
+ return s.value ? `${$.value}px ${$.value}px ${oe.value}px ${oe.value}px` : `${oe.value}px ${$.value}px ${$.value}px ${oe.value}px`;
9897
+ }
9898
+ function le() {
9899
+ return s.value ? `${oe.value}px ${oe.value}px ${$.value}px ${$.value}px` : `${$.value}px ${oe.value}px ${oe.value}px ${$.value}px`;
9900
+ }
9901
+ let ue = v(() => o.value === !1), de = v(() => ue.value ? "75ms ease" : "0s");
9902
+ function fe(e) {
9876
9903
  let t = w.value.thumbInset;
9877
9904
  return `clamp(${t}px, ${e}%, calc(100% - ${t}px))`;
9878
9905
  }
9879
- function ie(e) {
9906
+ function pe(e) {
9880
9907
  let t = s.value ? w.value.thumbH : w.value.thumbW, n = s.value ? w.value.thumbW : w.value.thumbH, r = Math.min(t, n) / 2, i = o.value !== !1, a = {
9881
9908
  position: "absolute",
9882
9909
  width: `${t}px`,
@@ -9884,35 +9911,35 @@ void main() {
9884
9911
  borderRadius: `${r}px`,
9885
9912
  backgroundColor: j.value.active,
9886
9913
  zIndex: "2",
9887
- transition: ne.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9914
+ transition: ue.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9888
9915
  }, c = i ? 1.08 : 1, l = i ? .6 : 1;
9889
- return s.value ? (a.left = "50%", a.bottom = re(e), a.transform = `translateX(-50%) translateY(50%) scaleX(${c}) scaleY(${l})`) : (a.left = re(e), a.top = "50%", a.transform = `translateX(-50%) translateY(-50%) scaleY(${c}) scaleX(${l})`), a;
9916
+ return s.value ? (a.left = "50%", a.bottom = fe(e), a.transform = `translateX(-50%) translateY(50%) scaleX(${c}) scaleY(${l})`) : (a.left = fe(e), a.top = "50%", a.transform = `translateX(-50%) translateY(-50%) scaleY(${c}) scaleX(${l})`), a;
9890
9917
  }
9891
- function ae(e) {
9918
+ function me(e) {
9892
9919
  let t = o.value === !1 ? 1 : 1.15, n = {
9893
9920
  position: "absolute",
9894
9921
  color: j.value.active,
9895
9922
  zIndex: "2",
9896
- transition: ne.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9923
+ transition: ue.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9897
9924
  };
9898
- return s.value ? (n.left = "50%", n.bottom = re(e), n.transform = `translateX(-50%) translateY(50%) scale(${t})`) : (n.left = re(e), n.top = "50%", n.transform = `translateX(-50%) translateY(-50%) scale(${t})`), n;
9925
+ return s.value ? (n.left = "50%", n.bottom = fe(e), n.transform = `translateX(-50%) translateY(50%) scale(${t})`) : (n.left = fe(e), n.top = "50%", n.transform = `translateX(-50%) translateY(-50%) scale(${t})`), n;
9899
9926
  }
9900
- function $(e) {
9927
+ function he(e) {
9901
9928
  let t = w.value.track / 2 + 36, n = w.value.track / 2 + 40;
9902
9929
  return s.value ? {
9903
9930
  left: `calc(50% - ${n}px)`,
9904
- bottom: re(e),
9931
+ bottom: fe(e),
9905
9932
  transform: "translateY(50%)",
9906
- transition: ne.value ? "bottom " + Z.value : "none"
9933
+ transition: ue.value ? "bottom " + de.value : "none"
9907
9934
  } : {
9908
- left: re(e),
9935
+ left: fe(e),
9909
9936
  top: `calc(50% - ${t}px)`,
9910
9937
  transform: "translateX(-50%)",
9911
- transition: ne.value ? "left " + Z.value : "none"
9938
+ transition: ue.value ? "left " + de.value : "none"
9912
9939
  };
9913
9940
  }
9914
- let oe = v(() => c.value ? `${l.value.lo} – ${l.value.hi}` : String(n.modelValue)), se = v(() => c.value && typeof o.value == "number" ? n.modelValue[o.value] : n.modelValue), ce = v(() => c.value && typeof o.value == "number" ? u(n.modelValue[o.value]) : d.value);
9915
- return (t, n) => (R(), S("div", { class: N(["flex select-none", s.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (R(), S("div", Sf, [e.label ? (R(), S("span", Cf, q(e.label), 1)) : x("", !0), e.showValue ? (R(), S("span", wf, q(oe.value), 1)) : x("", !0)])) : x("", !0), C("div", { class: N(["flex items-center", s.value ? "flex-1 flex-col" : ""]) }, [C("div", {
9941
+ let ge = v(() => c.value ? `${l.value.lo} – ${l.value.hi}` : String(n.modelValue)), _e = v(() => c.value && typeof o.value == "number" ? n.modelValue[o.value] : n.modelValue), ve = v(() => c.value && typeof o.value == "number" ? u(n.modelValue[o.value]) : d.value);
9942
+ return (t, n) => (R(), S("div", { class: N(["flex select-none", s.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (R(), S("div", Sf, [e.label ? (R(), S("span", Cf, q(e.label), 1)) : x("", !0), e.showValue ? (R(), S("span", wf, q(ge.value), 1)) : x("", !0)])) : x("", !0), C("div", { class: N(["flex items-center", s.value ? "flex-1 flex-col" : ""]) }, [C("div", {
9916
9943
  ref_key: "trackEl",
9917
9944
  ref: a,
9918
9945
  role: "slider",
@@ -9942,14 +9969,14 @@ void main() {
9942
9969
  bottom: "0",
9943
9970
  width: `${w.value.track}px`,
9944
9971
  transform: "translateX(-50%)",
9945
- borderRadius: `${Y.value}px`
9972
+ borderRadius: `${oe.value}px`
9946
9973
  } : {
9947
9974
  top: "50%",
9948
9975
  left: "0",
9949
9976
  right: "0",
9950
9977
  height: `${w.value.track}px`,
9951
9978
  transform: "translateY(-50%)",
9952
- borderRadius: `${Y.value}px`
9979
+ borderRadius: `${oe.value}px`
9953
9980
  })
9954
9981
  }, [
9955
9982
  e.variant === "standard" ? (R(), S(m, { key: 0 }, [C("div", {
@@ -9966,9 +9993,9 @@ void main() {
9966
9993
  left: 0,
9967
9994
  width: K(d.value)
9968
9995
  },
9969
- borderRadius: ee(),
9996
+ borderRadius: ce(),
9970
9997
  backgroundColor: A.value.active,
9971
- transition: `all ${Z.value}`
9998
+ transition: `all ${de.value}`
9972
9999
  })
9973
10000
  }, null, 4), C("div", {
9974
10001
  class: "absolute",
@@ -9984,38 +10011,28 @@ void main() {
9984
10011
  right: 0,
9985
10012
  width: J(d.value)
9986
10013
  },
9987
- borderRadius: te(),
10014
+ borderRadius: le(),
9988
10015
  backgroundColor: A.value.inactive,
9989
- transition: `all ${Z.value}`
10016
+ transition: `all ${de.value}`
9990
10017
  })
9991
10018
  }, null, 4)], 64)) : e.variant === "centered" ? (R(), S(m, { key: 1 }, [
9992
10019
  C("div", {
9993
10020
  class: "absolute",
9994
10021
  style: P({
9995
- ...s.value ? d.value >= p.value ? {
9996
- left: 0,
9997
- right: 0,
9998
- bottom: `${p.value}%`,
9999
- height: `calc(${d.value - p.value}% - ${D.value}px)`
10000
- } : {
10022
+ ...s.value ? {
10001
10023
  left: 0,
10002
10024
  right: 0,
10003
- bottom: `calc(${d.value}% + ${D.value}px)`,
10004
- height: `calc(${p.value - d.value}% - ${D.value}px)`
10005
- } : d.value >= p.value ? {
10006
- top: 0,
10007
- bottom: 0,
10008
- left: `${p.value}%`,
10009
- width: `calc(${d.value - p.value}% - ${D.value}px)`
10025
+ bottom: ne(),
10026
+ height: Z()
10010
10027
  } : {
10011
10028
  top: 0,
10012
10029
  bottom: 0,
10013
- left: `calc(${d.value}% + ${D.value}px)`,
10014
- width: `calc(${p.value - d.value}% - ${D.value}px)`
10030
+ left: ne(),
10031
+ width: Z()
10015
10032
  },
10016
- borderRadius: `${Y.value}px`,
10033
+ borderRadius: se(),
10017
10034
  backgroundColor: A.value.active,
10018
- transition: `all ${Z.value}`
10035
+ transition: `all ${de.value}`
10019
10036
  })
10020
10037
  }, null, 4),
10021
10038
  C("div", {
@@ -10025,16 +10042,16 @@ void main() {
10025
10042
  left: 0,
10026
10043
  right: 0,
10027
10044
  top: 0,
10028
- height: `calc(${100 - Math.max(d.value, p.value)}% - ${D.value}px)`
10045
+ height: re()
10029
10046
  } : {
10030
10047
  top: 0,
10031
10048
  bottom: 0,
10032
10049
  right: 0,
10033
- width: `calc(${100 - Math.max(d.value, p.value)}% - ${D.value}px)`
10050
+ width: re()
10034
10051
  },
10035
- borderRadius: `${Y.value}px`,
10052
+ borderRadius: le(),
10036
10053
  backgroundColor: A.value.inactive,
10037
- transition: `all ${Z.value}`
10054
+ transition: `all ${de.value}`
10038
10055
  })
10039
10056
  }, null, 4),
10040
10057
  C("div", {
@@ -10044,16 +10061,16 @@ void main() {
10044
10061
  left: 0,
10045
10062
  right: 0,
10046
10063
  bottom: 0,
10047
- height: `calc(${Math.min(d.value, p.value)}% - ${D.value}px)`
10064
+ height: ie()
10048
10065
  } : {
10049
10066
  top: 0,
10050
10067
  bottom: 0,
10051
10068
  left: 0,
10052
- width: `calc(${Math.min(d.value, p.value)}% - ${D.value}px)`
10069
+ width: ie()
10053
10070
  },
10054
- borderRadius: `${Y.value}px`,
10071
+ borderRadius: ce(),
10055
10072
  backgroundColor: A.value.inactive,
10056
- transition: `all ${Z.value}`
10073
+ transition: `all ${de.value}`
10057
10074
  })
10058
10075
  }, null, 4)
10059
10076
  ], 64)) : e.variant === "range" ? (R(), S(m, { key: 2 }, [
@@ -10064,16 +10081,16 @@ void main() {
10064
10081
  left: 0,
10065
10082
  right: 0,
10066
10083
  bottom: 0,
10067
- height: `calc(${d.value}% - ${D.value}px)`
10084
+ height: Y()
10068
10085
  } : {
10069
10086
  top: 0,
10070
10087
  bottom: 0,
10071
10088
  left: 0,
10072
- width: `calc(${d.value}% - ${D.value}px)`
10089
+ width: Y()
10073
10090
  },
10074
- borderRadius: `${Y.value}px`,
10091
+ borderRadius: ce(),
10075
10092
  backgroundColor: A.value.inactive,
10076
- transition: `all ${Z.value}`
10093
+ transition: `all ${de.value}`
10077
10094
  })
10078
10095
  }, null, 4),
10079
10096
  C("div", {
@@ -10082,17 +10099,17 @@ void main() {
10082
10099
  ...s.value ? {
10083
10100
  left: 0,
10084
10101
  right: 0,
10085
- bottom: `calc(${d.value}% + ${D.value}px)`,
10086
- height: `calc(${f.value - d.value}% - ${D.value * 2}px)`
10102
+ bottom: X(),
10103
+ height: ee()
10087
10104
  } : {
10088
10105
  top: 0,
10089
10106
  bottom: 0,
10090
- left: `calc(${d.value}% + ${D.value}px)`,
10091
- width: `calc(${f.value - d.value}% - ${D.value * 2}px)`
10107
+ left: X(),
10108
+ width: ee()
10092
10109
  },
10093
- borderRadius: `${Y.value}px`,
10110
+ borderRadius: se(),
10094
10111
  backgroundColor: A.value.active,
10095
- transition: `all ${Z.value}`
10112
+ transition: `all ${de.value}`
10096
10113
  })
10097
10114
  }, null, 4),
10098
10115
  C("div", {
@@ -10102,16 +10119,16 @@ void main() {
10102
10119
  left: 0,
10103
10120
  right: 0,
10104
10121
  top: 0,
10105
- height: `calc(${100 - f.value}% - ${D.value}px)`
10122
+ height: te()
10106
10123
  } : {
10107
10124
  top: 0,
10108
10125
  bottom: 0,
10109
10126
  right: 0,
10110
- width: `calc(${100 - f.value}% - ${D.value}px)`
10127
+ width: te()
10111
10128
  },
10112
- borderRadius: `${Y.value}px`,
10129
+ borderRadius: le(),
10113
10130
  backgroundColor: A.value.inactive,
10114
- transition: `all ${Z.value}`
10131
+ transition: `all ${de.value}`
10115
10132
  })
10116
10133
  }, null, 4)
10117
10134
  ], 64)) : x("", !0),
@@ -10201,7 +10218,7 @@ void main() {
10201
10218
  name: e.thumbIcon,
10202
10219
  size: w.value.thumbIconSize,
10203
10220
  class: "pointer-events-none",
10204
- style: P(ae(d.value))
10221
+ style: P(me(d.value))
10205
10222
  }, null, 8, [
10206
10223
  "name",
10207
10224
  "size",
@@ -10211,18 +10228,18 @@ void main() {
10211
10228
  name: e.thumbIcon,
10212
10229
  size: w.value.thumbIconSize,
10213
10230
  class: "pointer-events-none",
10214
- style: P(ae(f.value))
10231
+ style: P(me(f.value))
10215
10232
  }, null, 8, [
10216
10233
  "name",
10217
10234
  "size",
10218
10235
  "style"
10219
10236
  ])) : x("", !0)], 64)) : (R(), S(m, { key: 1 }, [C("div", {
10220
10237
  class: "pointer-events-none",
10221
- style: P(ie(d.value))
10238
+ style: P(pe(d.value))
10222
10239
  }, null, 4), c.value ? (R(), S("div", {
10223
10240
  key: 0,
10224
10241
  class: "pointer-events-none",
10225
- style: P(ie(f.value))
10242
+ style: P(pe(f.value))
10226
10243
  }, null, 4)) : x("", !0)], 64)),
10227
10244
  E(g, {
10228
10245
  "enter-active-class": "transition-opacity duration-100",
@@ -10233,8 +10250,8 @@ void main() {
10233
10250
  default: Q(() => [e.showTooltip && o.value !== !1 ? (R(), S("div", {
10234
10251
  key: 0,
10235
10252
  class: "pointer-events-none absolute z-10 flex h-7 min-w-7 items-center justify-center rounded-full bg-inverse-surface px-2 text-label-small tabular-nums text-inverse-on-surface",
10236
- style: P($(ce.value))
10237
- }, q(se.value), 5)) : x("", !0)]),
10253
+ style: P(he(ve.value))
10254
+ }, q(_e.value), 5)) : x("", !0)]),
10238
10255
  _: 1
10239
10256
  })
10240
10257
  ], 46, Tf)], 2)], 2));