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/README.md +131 -54
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/index.d.cts +216 -0
- package/dist-lib/index.d.ts +216 -0
- package/dist-lib/index.js +222 -265
- package/package.json +81 -14
- package/dist-lib/.nojekyll +0 -0
- package/dist-lib/types/components/CollageFab.d.ts +0 -134
- package/dist-lib/types/components/CollageFab.d.ts.map +0 -1
- package/dist-lib/types/index.d.ts +0 -2
- package/dist-lib/types/index.d.ts.map +0 -1
package/dist-lib/index.js
CHANGED
|
@@ -1,271 +1,228 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
41
|
-
|
|
47
|
+
function _(e) {
|
|
48
|
+
return c("MuiCollageFab", e);
|
|
42
49
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})(({ ownerState:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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.
|
|
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/
|
|
32
|
+
"types": "./dist-lib/index.d.ts",
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
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": ">=
|
|
51
|
+
"node": ">=22.13.0"
|
|
47
52
|
},
|
|
48
53
|
"scripts": {
|
|
49
54
|
"dev": "vite",
|
|
50
55
|
"build": "tsc --noEmit && vite build",
|
|
51
|
-
"build:
|
|
52
|
-
"
|
|
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
|
-
"
|
|
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.
|
|
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": "^
|
|
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
|
-
"
|
|
83
|
-
"
|
|
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
|
}
|
package/dist-lib/.nojekyll
DELETED
|
File without changes
|