mui-collage-fab 0.1.1 → 0.1.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/dist-lib/index.js CHANGED
@@ -1,271 +1,228 @@
1
- import { jsx as $ } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { ClickAwayListener as et } from "@mui/material";
4
- import { styled as _, useThemeProps as ot } from "@mui/material/styles";
5
- import { useControlled as nt, useForkRef as v } from "@mui/material/utils";
6
- import U from "@mui/utils/useSlotProps";
7
- import rt from "@mui/utils/composeClasses";
8
- import at from "@mui/utils/generateUtilityClass";
9
- const st = {
10
- small: 40,
11
- medium: 48,
12
- large: 56
13
- }, it = {
14
- circular: "50%",
15
- rounded: "25%",
16
- square: 0
17
- }, lt = [
18
- "a[href]",
19
- "button:not([disabled])",
20
- "input:not([disabled])",
21
- "select:not([disabled])",
22
- "textarea:not([disabled])",
23
- '[tabindex]:not([tabindex="-1"])'
24
- ].join(",");
25
- function ct(o) {
26
- return typeof o == "number" ? o : st[o];
1
+ import * as e from "react";
2
+ import { ClickAwayListener as t } from "@mui/material";
3
+ import { styled as n, useThemeProps as r } from "@mui/material/styles";
4
+ import { useControlled as i, useForkRef as a } from "@mui/material/utils";
5
+ import o from "@mui/utils/useSlotProps";
6
+ import s from "@mui/utils/composeClasses";
7
+ import c from "@mui/utils/generateUtilityClass";
8
+ import { jsx as l } from "react/jsx-runtime";
9
+ // src/components/collageFabGeometry.ts
10
+ var u = {
11
+ small: 40,
12
+ medium: 48,
13
+ large: 56
14
+ };
15
+ function d(e) {
16
+ return typeof e == "number" ? e : u[e];
27
17
  }
28
- function j(o, e) {
29
- return `${o}ms ${e}`;
18
+ function f(e, t) {
19
+ let { count: n, size: r, gap: i, fadeWidth: a, open: o, direction: s } = t, c = r + i, l = (n - 1) * c + r + a, u = e * c, d = s === "left" || s === "up", f = s === "left" || s === "right", p = e === 0 ? l : (n - e) * (r / n), m = e === 0 ? -a / 2 : r / n * e, h = o ? u : 0, g = d ? p - l - a / 2 + h : m - l - a / 2 - h, _ = d ? `#000 0px, #000 ${l}px, transparent ${l + a}px, transparent ${2 * l}px` : `transparent 0px, transparent ${l}px, #000 ${l + a}px, #000 ${2 * l}px`, v = `${d ? "-" : ""}${h}`;
20
+ return {
21
+ translate: f ? `translateX(${v}px)` : `translateY(${v}px)`,
22
+ maskImage: n > 1 ? `linear-gradient(${f ? "to right" : "to bottom"}, ${_})` : "none",
23
+ maskSize: f ? `${2 * l}px 100%` : `100% ${2 * l}px`,
24
+ maskPosition: f ? `${g}px 0px` : `0px ${g}px`
25
+ };
30
26
  }
31
- function ut(o, e) {
32
- const { count: r, size: s, gap: i, fadeWidth: l, open: f, direction: u } = e, p = s + i, a = (r - 1) * p + s + l, n = o * p, h = u === "left" || u === "up", k = u === "left" || u === "right", C = o === 0 ? a : (r - o) * (s / r), b = o === 0 ? -l / 2 : o * (s / r), R = f ? n : 0, g = h ? C - a - l / 2 + R : b - a - l / 2 - R, E = h ? `#000 0px, #000 ${a}px, transparent ${a + l}px, transparent ${2 * a}px` : `transparent 0px, transparent ${a}px, #000 ${a + l}px, #000 ${2 * a}px`, w = `${h ? "-" : ""}${R}`;
33
- return {
34
- translate: k ? `translateX(${w}px)` : `translateY(${w}px)`,
35
- maskImage: r > 1 ? `linear-gradient(${k ? "to right" : "to bottom"}, ${E})` : "none",
36
- maskSize: k ? `${2 * a}px 100%` : `100% ${2 * a}px`,
37
- maskPosition: k ? `${g}px 0px` : `0px ${g}px`
38
- };
27
+ // src/components/collageFabDefaults.ts
28
+ var p = {
29
+ direction: "left",
30
+ size: "large",
31
+ variant: "circular",
32
+ gap: 16,
33
+ fadeWidth: 12,
34
+ trigger: "hover",
35
+ defaultOpen: !1,
36
+ disableClickAway: !1,
37
+ transitionDuration: 400,
38
+ transitionEasing: "cubic-bezier(0.4, 0, 0.2, 1)"
39
+ }, m = {
40
+ circular: "50%",
41
+ rounded: "25%",
42
+ square: 0
43
+ }, h = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
44
+ function g(e, t) {
45
+ return `${e}ms ${t}`;
39
46
  }
40
- function pt(o) {
41
- return at("MuiCollageFab", o);
47
+ function _(e) {
48
+ return c("MuiCollageFab", e);
42
49
  }
43
- const mt = (o, e) => rt({
44
- root: ["root", o ? "expanded" : "collapsed"],
45
- item: ["item"]
46
- }, pt, e), ft = _("div", {
47
- name: "MuiCollageFab",
48
- slot: "root",
49
- overridesResolver: (o, e) => e.root
50
- })(({ ownerState: o }) => {
51
- const { open: e, direction: r, size: s, gap: i, count: l, transitionDuration: f, transitionEasing: u } = o, p = r === "left" || r === "right", a = r === "left" || r === "up", n = e ? l * s + Math.max(l - 1, 0) * i : s;
52
- return {
53
- position: "relative",
54
- width: p ? n : s,
55
- height: p ? s : n,
56
- display: "flex",
57
- flexDirection: p ? "row" : "column",
58
- justifyContent: a ? "flex-end" : "flex-start",
59
- transition: `${p ? "width" : "height"} ${j(
60
- f,
61
- u
62
- )}`,
63
- // A filter traces the soft mask edges; a box-shadow would trace the wrapper rectangles.
64
- filter: "drop-shadow(0px 6px 12px rgba(0,0,0,0.25))",
65
- cursor: e ? "default" : "pointer",
66
- WebkitTapHighlightColor: "transparent"
67
- };
68
- }), dt = _("div", {
69
- name: "MuiCollageFab",
70
- slot: "item",
71
- overridesResolver: (o, e) => e.item
72
- })(({ ownerState: o }) => {
73
- const { direction: e, size: r, index: s, geometry: i, cornerRadius: l, transitionDuration: f, transitionEasing: u } = o, p = e === "left" || e === "right", a = e === "left" ? { right: 0 } : e === "right" ? { left: 0 } : e === "up" ? { bottom: 0 } : { top: 0 }, n = j(f, u);
74
- return {
75
- position: "absolute",
76
- ...a,
77
- ...p ? { top: 0 } : { left: 0 },
78
- width: r,
79
- height: r,
80
- borderRadius: l,
81
- overflow: "hidden",
82
- display: "flex",
83
- alignItems: "center",
84
- justifyContent: "center",
85
- // The left-most slices have to stack on top of the right-ward ones.
86
- zIndex: s,
87
- // Always present, even collapsed: the transform is what makes this wrapper a
88
- // stacking context, which neutralizes the child's own z-index.
89
- transform: i.translate,
90
- WebkitMaskImage: i.maskImage,
91
- maskImage: i.maskImage,
92
- WebkitMaskSize: i.maskSize,
93
- maskSize: i.maskSize,
94
- WebkitMaskPosition: i.maskPosition,
95
- maskPosition: i.maskPosition,
96
- WebkitMaskRepeat: "no-repeat",
97
- maskRepeat: "no-repeat",
98
- transition: `transform ${n}, -webkit-mask-position ${n}, mask-position ${n}`,
99
- // Strip arbitrary shadows from the children and make them inherit the wrapper's
100
- // silhouette, so the root controls the global 3D shape.
101
- "& > *": {
102
- boxShadow: "none !important",
103
- borderRadius: "inherit !important",
104
- width: "100%",
105
- height: "100%",
106
- margin: 0
107
- }
108
- };
50
+ var v = (e, t) => s({
51
+ root: ["root", e ? "expanded" : "collapsed"],
52
+ item: ["item"]
53
+ }, _, t), y = n("div", {
54
+ name: "MuiCollageFab",
55
+ slot: "root",
56
+ overridesResolver: (e, t) => t.root
57
+ })(({ ownerState: e }) => {
58
+ let { open: t, direction: n, size: r, gap: i, count: a, transitionDuration: o, transitionEasing: s } = e, c = n === "left" || n === "right", l = n === "left" || n === "up", u = t ? a * r + Math.max(a - 1, 0) * i : r;
59
+ return {
60
+ position: "relative",
61
+ width: c ? u : r,
62
+ height: c ? r : u,
63
+ display: "flex",
64
+ flexDirection: c ? "row" : "column",
65
+ justifyContent: l ? "flex-end" : "flex-start",
66
+ transition: `${c ? "width" : "height"} ${g(o, s)}`,
67
+ filter: "drop-shadow(0px 6px 12px rgba(0,0,0,0.25))",
68
+ cursor: t ? "default" : "pointer",
69
+ WebkitTapHighlightColor: "transparent"
70
+ };
71
+ }), b = n("div", {
72
+ name: "MuiCollageFab",
73
+ slot: "item",
74
+ overridesResolver: (e, t) => t.item
75
+ })(({ ownerState: e }) => {
76
+ let { direction: t, size: n, index: r, geometry: i, cornerRadius: a, transitionDuration: o, transitionEasing: s } = e, c = t === "left" || t === "right", l = t === "left" ? { right: 0 } : t === "right" ? { left: 0 } : t === "up" ? { bottom: 0 } : { top: 0 }, u = g(o, s);
77
+ return {
78
+ position: "absolute",
79
+ ...l,
80
+ ...c ? { top: 0 } : { left: 0 },
81
+ width: n,
82
+ height: n,
83
+ borderRadius: a,
84
+ overflow: "hidden",
85
+ display: "flex",
86
+ alignItems: "center",
87
+ justifyContent: "center",
88
+ zIndex: r,
89
+ transform: i.translate,
90
+ WebkitMaskImage: i.maskImage,
91
+ maskImage: i.maskImage,
92
+ WebkitMaskSize: i.maskSize,
93
+ maskSize: i.maskSize,
94
+ WebkitMaskPosition: i.maskPosition,
95
+ maskPosition: i.maskPosition,
96
+ WebkitMaskRepeat: "no-repeat",
97
+ maskRepeat: "no-repeat",
98
+ transition: `transform ${u}, -webkit-mask-position ${u}, mask-position ${u}`,
99
+ "& > *": {
100
+ boxShadow: "none !important",
101
+ borderRadius: "inherit !important",
102
+ width: "100%",
103
+ height: "100%",
104
+ margin: 0
105
+ }
106
+ };
109
107
  });
110
- function gt(o) {
111
- const {
112
- index: e,
113
- ownerState: r,
114
- geometry: s,
115
- className: i,
116
- component: l,
117
- inert: f,
118
- itemRefs: u,
119
- slotProps: p,
120
- children: a
121
- } = o, n = c.useMemo(
122
- () => ({ ...r, index: e, isAnchor: e === 0, geometry: s }),
123
- [r, e, s]
124
- ), h = c.useRef(null), k = c.useCallback(
125
- (g) => {
126
- u.current[e] = g;
127
- },
128
- [u, e]
129
- ), C = v(k, h);
130
- c.useEffect(() => {
131
- const g = h.current;
132
- !g || !("inert" in HTMLElement.prototype) || (g.inert = f);
133
- }, [f]);
134
- const b = U({
135
- elementType: l,
136
- externalSlotProps: p,
137
- ownerState: n,
138
- additionalProps: {
139
- ref: C,
140
- className: i,
141
- "aria-hidden": f || void 0,
142
- children: a
143
- }
144
- });
145
- return /* @__PURE__ */ $(l, { ...b });
108
+ function x(t) {
109
+ let { index: n, ownerState: r, geometry: i, className: s, component: c, inert: u, itemRefs: d, slotProps: f, children: p } = t, m = e.useMemo(() => ({
110
+ ...r,
111
+ index: n,
112
+ isAnchor: n === 0,
113
+ geometry: i
114
+ }), [
115
+ r,
116
+ n,
117
+ i
118
+ ]), h = e.useRef(null), g = e.useCallback((e) => {
119
+ d.current[n] = e;
120
+ }, [d, n]), _ = a(g, h);
121
+ e.useEffect(() => {
122
+ let e = h.current;
123
+ e && "inert" in HTMLElement.prototype && (e.inert = u);
124
+ }, [u]);
125
+ let v = o({
126
+ elementType: c,
127
+ externalSlotProps: f,
128
+ ownerState: m,
129
+ additionalProps: {
130
+ ref: _,
131
+ className: s,
132
+ "aria-hidden": u || void 0,
133
+ children: p
134
+ }
135
+ });
136
+ return /* @__PURE__ */ l(c, { ...v });
146
137
  }
147
- const Pt = c.forwardRef(
148
- function(e, r) {
149
- const s = ot({ props: e, name: "MuiCollageFab" }), {
150
- children: i,
151
- direction: l = "left",
152
- size: f = "large",
153
- variant: u = "circular",
154
- gap: p = 16,
155
- fadeWidth: a = 12,
156
- trigger: n = "hover",
157
- open: h,
158
- defaultOpen: k = !1,
159
- onOpen: C,
160
- onClose: b,
161
- disableClickAway: R = !1,
162
- transitionDuration: g = 400,
163
- transitionEasing: E = "cubic-bezier(0.4, 0, 0.2, 1)",
164
- classes: w,
165
- slots: x,
166
- slotProps: P,
167
- className: q,
168
- ...B
169
- } = s, [m, z] = nt({
170
- controlled: h,
171
- default: k,
172
- name: "CollageFab",
173
- state: "open"
174
- }), T = c.useMemo(
175
- () => c.Children.toArray(i).filter((t) => c.isValidElement(t)),
176
- [i]
177
- ), D = T.length, I = {
178
- open: m,
179
- direction: l,
180
- trigger: n,
181
- size: ct(f),
182
- variant: u,
183
- cornerRadius: it[u],
184
- gap: p,
185
- fadeWidth: a,
186
- count: D,
187
- transitionDuration: g,
188
- transitionEasing: E
189
- }, M = mt(m, w), A = c.useRef(null), N = c.useRef([]), S = c.useRef(!1), W = c.useRef("mouse"), F = c.useRef(!1), H = v(A, r), y = c.useCallback(
190
- (t, d) => {
191
- t !== m && (z(t), t ? C == null || C(d) : b == null || b(d));
192
- },
193
- [m, z, C, b]
194
- ), K = (t) => {
195
- n !== "hover" || t.pointerType !== "mouse" || y(!0, t);
196
- }, G = (t) => {
197
- n !== "hover" || t.pointerType !== "mouse" || y(!1, t);
198
- }, V = (t) => {
199
- n !== "manual" && (W.current = t.pointerType, S.current = !1, !(t.pointerType === "mouse" || m) && (S.current = !0, y(!0, t)));
200
- }, X = (t) => {
201
- S.current && (S.current = !1, t.stopPropagation(), t.preventDefault());
202
- }, Y = (t) => {
203
- if (n !== "manual") {
204
- if (n === "click") {
205
- y(!m, t);
206
- return;
207
- }
208
- m && W.current !== "mouse" && y(!1, t);
209
- }
210
- }, Z = (t) => {
211
- var d;
212
- if (n !== "manual") {
213
- if (m) {
214
- if (t.key !== "Escape")
215
- return;
216
- t.stopPropagation(), y(!1, t), (d = A.current) == null || d.focus();
217
- return;
218
- }
219
- t.key !== "Enter" && t.key !== " " || (t.preventDefault(), F.current = !0, y(!0, t));
220
- }
221
- }, J = (t) => {
222
- y(!1, t);
223
- }, L = (x == null ? void 0 : x.root) ?? ft, Q = (x == null ? void 0 : x.item) ?? dt, tt = U({
224
- elementType: L,
225
- externalForwardedProps: B,
226
- externalSlotProps: P == null ? void 0 : P.root,
227
- ownerState: I,
228
- additionalProps: {
229
- ref: H,
230
- role: "group",
231
- tabIndex: !m && n !== "manual" ? 0 : -1,
232
- onPointerEnter: K,
233
- onPointerLeave: G,
234
- onPointerDown: V,
235
- onClick: Y,
236
- onClickCapture: X,
237
- onKeyDown: Z
238
- },
239
- className: [M.root, q]
240
- });
241
- if (c.useEffect(() => {
242
- if (!m || !F.current)
243
- return;
244
- F.current = !1;
245
- const t = N.current[0];
246
- if (!t)
247
- return;
248
- (t.querySelector(lt) ?? t).focus();
249
- }, [m]), D === 0)
250
- return null;
251
- const O = /* @__PURE__ */ $(L, { ...tt, children: T.map((t, d) => /* @__PURE__ */ $(
252
- gt,
253
- {
254
- index: d,
255
- ownerState: I,
256
- geometry: ut(d, I),
257
- className: M.item,
258
- component: Q,
259
- inert: !m && n !== "manual",
260
- itemRefs: N,
261
- slotProps: P == null ? void 0 : P.item,
262
- children: t
263
- },
264
- d
265
- )) });
266
- return R || n === "manual" ? O : /* @__PURE__ */ $(et, { onClickAway: J, children: O });
267
- }
268
- );
269
- export {
270
- Pt as CollageFab
271
- };
138
+ var S = e.forwardRef(function(n, s) {
139
+ let { children: c, direction: u = p.direction, size: g = p.size, variant: _ = p.variant, gap: S = p.gap, fadeWidth: C = p.fadeWidth, trigger: w = p.trigger, open: T, defaultOpen: E = p.defaultOpen, onOpen: D, onClose: O, disableClickAway: k = p.disableClickAway, transitionDuration: ee = p.transitionDuration, transitionEasing: te = p.transitionEasing, classes: A, slots: j, slotProps: M, className: N, ...P } = r({
140
+ props: n,
141
+ name: "MuiCollageFab"
142
+ }), [F, I] = i({
143
+ controlled: T,
144
+ default: E,
145
+ name: "CollageFab",
146
+ state: "open"
147
+ }), L = e.useMemo(() => e.Children.toArray(c).filter((t) => e.isValidElement(t)), [c]), R = L.length, z = {
148
+ open: F,
149
+ direction: u,
150
+ trigger: w,
151
+ size: d(g),
152
+ variant: _,
153
+ cornerRadius: m[_],
154
+ gap: S,
155
+ fadeWidth: C,
156
+ count: R,
157
+ transitionDuration: ee,
158
+ transitionEasing: te
159
+ }, B = v(F, A), V = e.useRef(null), H = e.useRef([]), U = e.useRef(!1), W = e.useRef("mouse"), G = e.useRef(!1), K = a(V, s), q = e.useCallback((e, t) => {
160
+ e !== F && (I(e), e ? D?.(t) : O?.(t));
161
+ }, [
162
+ F,
163
+ I,
164
+ D,
165
+ O
166
+ ]), J = (e) => {
167
+ w === "hover" && e.pointerType === "mouse" && q(!0, e);
168
+ }, Y = (e) => {
169
+ w === "hover" && e.pointerType === "mouse" && q(!1, e);
170
+ }, X = (e) => {
171
+ w !== "manual" && (W.current = e.pointerType, U.current = !1, e.pointerType === "mouse" || F || (U.current = !0, q(!0, e)));
172
+ }, Z = (e) => {
173
+ U.current && (U.current = !1, e.stopPropagation(), e.preventDefault());
174
+ }, ne = (e) => {
175
+ w !== "manual" && (w === "click" ? q(!F, e) : F && W.current !== "mouse" && q(!1, e));
176
+ }, re = (e) => {
177
+ if (w !== "manual") {
178
+ if (F) {
179
+ if (e.key !== "Escape") return;
180
+ e.stopPropagation(), q(!1, e), V.current?.focus();
181
+ } else (e.key === "Enter" || e.key === " ") && (e.preventDefault(), G.current = !0, q(!0, e));
182
+ }
183
+ }, ie = (e) => {
184
+ q(!1, e);
185
+ }, Q = j?.root ?? y, ae = j?.item ?? b, oe = o({
186
+ elementType: Q,
187
+ externalForwardedProps: P,
188
+ externalSlotProps: M?.root,
189
+ ownerState: z,
190
+ additionalProps: {
191
+ ref: K,
192
+ role: "group",
193
+ tabIndex: !F && w !== "manual" ? 0 : -1,
194
+ onPointerEnter: J,
195
+ onPointerLeave: Y,
196
+ onPointerDown: X,
197
+ onClick: ne,
198
+ onClickCapture: Z,
199
+ onKeyDown: re
200
+ },
201
+ className: [B.root, N]
202
+ });
203
+ if (e.useEffect(() => {
204
+ if (!F || !G.current) return;
205
+ G.current = !1;
206
+ let e = H.current[0];
207
+ e && (e.querySelector(h) ?? e).focus();
208
+ }, [F]), R === 0) return null;
209
+ let $ = /* @__PURE__ */ l(Q, {
210
+ ...oe,
211
+ children: L.map((e, t) => /* @__PURE__ */ l(x, {
212
+ index: t,
213
+ ownerState: z,
214
+ geometry: f(t, z),
215
+ className: B.item,
216
+ component: ae,
217
+ inert: !F && w !== "manual",
218
+ itemRefs: H,
219
+ slotProps: M?.item,
220
+ children: e
221
+ }, t))
222
+ });
223
+ return k || w === "manual" ? $ : /* @__PURE__ */ l(t, {
224
+ onClickAway: ie,
225
+ children: $
226
+ });
227
+ });
228
+ export { S as CollageFab };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mui-collage-fab",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Material UI floating action button that unfolds a stack of overlapping Fab circles into a row.",
5
5
  "license": "MIT",
6
6
  "author": "Radomir Wojtera",
@@ -29,12 +29,17 @@
29
29
  ],
30
30
  "main": "./dist-lib/index.cjs",
31
31
  "module": "./dist-lib/index.js",
32
- "types": "./dist-lib/types/index.d.ts",
32
+ "types": "./dist-lib/index.d.ts",
33
33
  "exports": {
34
34
  ".": {
35
- "types": "./dist-lib/types/index.d.ts",
36
- "import": "./dist-lib/index.js",
37
- "require": "./dist-lib/index.cjs"
35
+ "import": {
36
+ "types": "./dist-lib/index.d.ts",
37
+ "default": "./dist-lib/index.js"
38
+ },
39
+ "require": {
40
+ "types": "./dist-lib/index.d.cts",
41
+ "default": "./dist-lib/index.cjs"
42
+ }
38
43
  },
39
44
  "./package.json": "./package.json"
40
45
  },
@@ -43,18 +48,39 @@
43
48
  "provenance": true
44
49
  },
45
50
  "engines": {
46
- "node": ">=18"
51
+ "node": ">=22.13.0"
47
52
  },
48
53
  "scripts": {
49
54
  "dev": "vite",
50
55
  "build": "tsc --noEmit && vite build",
51
- "build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json",
52
- "prepublishOnly": "npm run build:lib",
56
+ "build:preview": "tsc --noEmit && vite build --base=\"${SITE_BASE_PATH:?set SITE_BASE_PATH to the deployed preview path}\"",
57
+ "build:lib": "vite build --config vite.lib.config.ts && node scripts/build-dts.mjs",
53
58
  "preview": "vite preview",
54
- "release": "semantic-release"
59
+ "format:check": "prettier --check .",
60
+ "format": "prettier --write .",
61
+ "lint": "eslint .",
62
+ "typecheck": "tsc --noEmit",
63
+ "test": "vitest run",
64
+ "test:watch": "vitest",
65
+ "test:coverage": "vitest run --coverage",
66
+ "test:e2e": "npm run build && playwright test",
67
+ "types:test": "vitest --run --typecheck",
68
+ "docs": "node scripts/write-readme-api.ts",
69
+ "docs:check": "node scripts/write-readme-api.ts --check",
70
+ "fix": "npm run format && npm run lint -- --fix",
71
+ "release": "semantic-release",
72
+ "prepublishOnly": "npm run build:lib",
73
+ "check:package": "publint && attw --pack . && node scripts/check-pack.mjs",
74
+ "check:size": "size-limit",
75
+ "doctor": "node scripts/doctor.mjs",
76
+ "doctor:fast": "node scripts/doctor.mjs --fast",
77
+ "check:actions": "node scripts/actionlint.mjs",
78
+ "check:unused": "knip",
79
+ "check:release": "semantic-release --dry-run --no-ci",
80
+ "check:actions-security": "zizmor .github/workflows"
55
81
  },
56
82
  "dependencies": {
57
- "@mui/utils": "^5.15.0"
83
+ "@mui/utils": "^9.5.0"
58
84
  },
59
85
  "peerDependencies": {
60
86
  "@emotion/react": "^11.0.0",
@@ -64,22 +90,63 @@
64
90
  "react-dom": "^18.0.0"
65
91
  },
66
92
  "devDependencies": {
93
+ "@arethetypeswrong/cli": "^0.18.5",
94
+ "@axe-core/playwright": "^4.14.0",
67
95
  "@emotion/react": "^11.13.3",
68
96
  "@emotion/styled": "^11.13.0",
97
+ "@eslint/js": "^9.39.5",
69
98
  "@mui/icons-material": "^5.16.7",
70
99
  "@mui/material": "^5.16.7",
100
+ "@playwright/test": "^1.65.1",
71
101
  "@semantic-release/changelog": "^7.0.0",
72
102
  "@semantic-release/git": "^11.0.1",
73
103
  "@semantic-release/github": "^12.0.11",
74
104
  "@semantic-release/npm": "^13.2.0",
105
+ "@size-limit/file": "^14.3.0",
106
+ "@testing-library/jest-dom": "^7.0.1",
107
+ "@testing-library/react": "^16.3.3",
108
+ "@testing-library/user-event": "^14.6.10",
109
+ "@types/jest-axe": "^3.5.9",
110
+ "@types/node": "^22.20.5",
75
111
  "@types/react": "^18.3.12",
76
112
  "@types/react-dom": "^18.3.1",
77
- "@vitejs/plugin-react": "^4.3.3",
113
+ "@vitejs/plugin-react": "^6.3.0",
114
+ "@vitest/coverage-v8": "^5.1.0",
115
+ "eslint": "^9.39.5",
116
+ "eslint-config-prettier": "^10.1.8",
117
+ "eslint-plugin-jsx-a11y": "^6.10.2",
118
+ "eslint-plugin-react-hooks": "^7.1.1",
119
+ "globals": "^17.14.0",
120
+ "jest-axe": "^11.0.0",
121
+ "jsdom": "^31.0.1",
122
+ "listr2": "^11.4.1",
123
+ "prettier": "^3.10.1",
124
+ "publint": "^0.3.25",
78
125
  "react": "^18.3.1",
79
126
  "react-dom": "^18.3.1",
80
127
  "react-router-dom": "^7.18.4",
128
+ "rollup": "^4.68.3",
129
+ "rollup-plugin-dts": "^6.5.1",
81
130
  "semantic-release": "^25.0.9",
82
- "typescript": "~5.6.3",
83
- "vite": "^5.4.10"
84
- }
131
+ "size-limit": "^14.3.0",
132
+ "typedoc": "^0.28.20",
133
+ "typescript": "~6.0.3",
134
+ "typescript-eslint": "^8.72.2",
135
+ "vite": "^8.3.4",
136
+ "vitest": "^5.1.0",
137
+ "fast-check": "^4.5.0",
138
+ "knip": "^6.20.0"
139
+ },
140
+ "size-limit": [
141
+ {
142
+ "name": "ESM build",
143
+ "path": "dist-lib/index.js",
144
+ "limit": "3.6 kB"
145
+ },
146
+ {
147
+ "name": "CJS build",
148
+ "path": "dist-lib/index.cjs",
149
+ "limit": "3.1 kB"
150
+ }
151
+ ]
85
152
  }
File without changes