@dipesh.singh/proton 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +170 -0
- package/dist/ProtonTypography-Cp9sfQ06.js +650 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +22 -0
- package/dist/react/components/ProtonButton.d.ts +16 -0
- package/dist/react/components/ProtonCard.d.ts +25 -0
- package/dist/react/components/ProtonDialog.d.ts +13 -0
- package/dist/react/components/ProtonInput.d.ts +17 -0
- package/dist/react/components/ProtonMetricBox.d.ts +15 -0
- package/dist/react/components/ProtonSlider.d.ts +13 -0
- package/dist/react/components/ProtonStatusBadge.d.ts +12 -0
- package/dist/react/components/ProtonTypography.d.ts +15 -0
- package/dist/react/components/index.d.ts +8 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +22 -0
- package/dist/react/theme/ProtonThemeProvider.d.ts +12 -0
- package/dist/react/theme/index.d.ts +2 -0
- package/dist/react/theme/muiTheme.d.ts +4 -0
- package/dist/tokens/colors.d.ts +79 -0
- package/dist/tokens/index.d.ts +179 -0
- package/dist/tokens/index.js +168 -0
- package/dist/tokens/radii.d.ts +11 -0
- package/dist/tokens/shadows.d.ts +10 -0
- package/dist/tokens/spacing.d.ts +21 -0
- package/dist/tokens/typography.d.ts +54 -0
- package/dist/vue/components/ProtonButton.d.ts +48 -0
- package/dist/vue/components/ProtonCard.d.ts +27 -0
- package/dist/vue/components/ProtonStatusBadge.d.ts +47 -0
- package/dist/vue/components/index.d.ts +3 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +115 -0
- package/package.json +67 -0
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
import { jsxs as f, jsx as r, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { createTheme as k, ThemeProvider as w, CssBaseline as v, Button as W, CircularProgress as z, Card as P, CardContent as T, TextField as R, InputAdornment as C, Slider as $, Dialog as M, DialogTitle as B, DialogContent as H, DialogActions as I } from "@mui/material";
|
|
3
|
+
import { radii as u, colors as e, typography as b, shadows as x } from "./tokens/index.js";
|
|
4
|
+
const j = {
|
|
5
|
+
palette: {
|
|
6
|
+
mode: "light",
|
|
7
|
+
primary: {
|
|
8
|
+
main: e.amber[700],
|
|
9
|
+
light: e.amber[500],
|
|
10
|
+
dark: e.amber[900],
|
|
11
|
+
contrastText: "#ffffff"
|
|
12
|
+
},
|
|
13
|
+
secondary: {
|
|
14
|
+
main: e.coffee[900],
|
|
15
|
+
light: e.coffee[700],
|
|
16
|
+
dark: e.coffee[950],
|
|
17
|
+
contrastText: "#ffffff"
|
|
18
|
+
},
|
|
19
|
+
background: {
|
|
20
|
+
default: e.slate[50],
|
|
21
|
+
paper: "#ffffff"
|
|
22
|
+
},
|
|
23
|
+
text: {
|
|
24
|
+
primary: e.slate[900],
|
|
25
|
+
secondary: e.slate[500]
|
|
26
|
+
},
|
|
27
|
+
success: {
|
|
28
|
+
main: e.status.success.main,
|
|
29
|
+
light: e.status.success.light,
|
|
30
|
+
dark: e.status.success.dark
|
|
31
|
+
},
|
|
32
|
+
warning: {
|
|
33
|
+
main: e.status.warning.main,
|
|
34
|
+
light: e.status.warning.light,
|
|
35
|
+
dark: e.status.warning.dark
|
|
36
|
+
},
|
|
37
|
+
error: {
|
|
38
|
+
main: e.status.error.main,
|
|
39
|
+
light: e.status.error.light,
|
|
40
|
+
dark: e.status.error.dark
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
typography: {
|
|
44
|
+
fontFamily: b.fonts.sans,
|
|
45
|
+
button: {
|
|
46
|
+
textTransform: "none",
|
|
47
|
+
fontWeight: 700
|
|
48
|
+
},
|
|
49
|
+
h1: { fontWeight: 900 },
|
|
50
|
+
h2: { fontWeight: 800 },
|
|
51
|
+
h3: { fontWeight: 700 },
|
|
52
|
+
h4: { fontWeight: 700 },
|
|
53
|
+
h5: { fontWeight: 600 },
|
|
54
|
+
h6: { fontWeight: 600 }
|
|
55
|
+
},
|
|
56
|
+
shape: {
|
|
57
|
+
borderRadius: parseInt(u.md, 10)
|
|
58
|
+
},
|
|
59
|
+
components: {
|
|
60
|
+
MuiButton: {
|
|
61
|
+
styleOverrides: {
|
|
62
|
+
root: {
|
|
63
|
+
borderRadius: u.lg,
|
|
64
|
+
boxShadow: "none",
|
|
65
|
+
"&:hover": {
|
|
66
|
+
boxShadow: "none"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
MuiCard: {
|
|
72
|
+
styleOverrides: {
|
|
73
|
+
root: {
|
|
74
|
+
borderRadius: u["2xl"],
|
|
75
|
+
borderColor: e.slate[200],
|
|
76
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.05)"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
MuiDialog: {
|
|
81
|
+
styleOverrides: {
|
|
82
|
+
paper: {
|
|
83
|
+
borderRadius: u["2xl"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, D = k(j), A = ({
|
|
89
|
+
children: o,
|
|
90
|
+
theme: t = D
|
|
91
|
+
}) => /* @__PURE__ */ f(w, { theme: t, children: [
|
|
92
|
+
/* @__PURE__ */ r(v, {}),
|
|
93
|
+
o
|
|
94
|
+
] }), L = ({
|
|
95
|
+
children: o,
|
|
96
|
+
variant: t = "primary",
|
|
97
|
+
size: n = "md",
|
|
98
|
+
isLoading: i = !1,
|
|
99
|
+
disabled: a = !1,
|
|
100
|
+
fullWidth: s = !1,
|
|
101
|
+
startIcon: d,
|
|
102
|
+
endIcon: c,
|
|
103
|
+
onClick: l,
|
|
104
|
+
type: g = "button",
|
|
105
|
+
className: h = ""
|
|
106
|
+
}) => /* @__PURE__ */ r(
|
|
107
|
+
W,
|
|
108
|
+
{
|
|
109
|
+
type: g,
|
|
110
|
+
onClick: l,
|
|
111
|
+
disabled: a || i,
|
|
112
|
+
fullWidth: s,
|
|
113
|
+
sx: (() => {
|
|
114
|
+
const p = {
|
|
115
|
+
borderRadius: u.xl,
|
|
116
|
+
fontWeight: 700,
|
|
117
|
+
textTransform: "none",
|
|
118
|
+
letterSpacing: "-0.01em",
|
|
119
|
+
transition: "all 0.2s ease-in-out",
|
|
120
|
+
display: "inline-flex",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
justifyContent: "center",
|
|
123
|
+
gap: "6px"
|
|
124
|
+
};
|
|
125
|
+
switch (n === "sm" ? (p.fontSize = "0.75rem", p.py = "6px", p.px = "12px") : n === "lg" ? (p.fontSize = "0.95rem", p.py = "12px", p.px = "24px") : (p.fontSize = "0.85rem", p.py = "9px", p.px = "18px"), t) {
|
|
126
|
+
case "primary":
|
|
127
|
+
return {
|
|
128
|
+
...p,
|
|
129
|
+
backgroundColor: e.amber[700],
|
|
130
|
+
color: "#ffffff",
|
|
131
|
+
"&:hover": {
|
|
132
|
+
backgroundColor: e.amber[800],
|
|
133
|
+
transform: "translateY(-1px)",
|
|
134
|
+
boxShadow: "0 4px 12px rgba(180, 83, 9, 0.25)"
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
case "secondary":
|
|
138
|
+
return {
|
|
139
|
+
...p,
|
|
140
|
+
backgroundColor: e.coffee[900],
|
|
141
|
+
color: "#ffffff",
|
|
142
|
+
"&:hover": {
|
|
143
|
+
backgroundColor: e.coffee[950],
|
|
144
|
+
transform: "translateY(-1px)",
|
|
145
|
+
boxShadow: "0 4px 12px rgba(44, 30, 25, 0.25)"
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
case "outline":
|
|
149
|
+
return {
|
|
150
|
+
...p,
|
|
151
|
+
backgroundColor: "transparent",
|
|
152
|
+
color: e.slate[800],
|
|
153
|
+
border: `1px solid ${e.slate[300]}`,
|
|
154
|
+
"&:hover": {
|
|
155
|
+
backgroundColor: e.slate[100],
|
|
156
|
+
borderColor: e.slate[400]
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
case "ghost":
|
|
160
|
+
return {
|
|
161
|
+
...p,
|
|
162
|
+
backgroundColor: "transparent",
|
|
163
|
+
color: e.slate[700],
|
|
164
|
+
"&:hover": {
|
|
165
|
+
backgroundColor: e.slate[100]
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
case "danger":
|
|
169
|
+
return {
|
|
170
|
+
...p,
|
|
171
|
+
backgroundColor: e.status.error.main,
|
|
172
|
+
color: "#ffffff",
|
|
173
|
+
"&:hover": {
|
|
174
|
+
backgroundColor: e.status.error.dark,
|
|
175
|
+
boxShadow: "0 4px 12px rgba(239, 68, 68, 0.25)"
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
})(),
|
|
180
|
+
className: h,
|
|
181
|
+
children: i ? /* @__PURE__ */ f(S, { children: [
|
|
182
|
+
/* @__PURE__ */ r(z, { size: 16, color: "inherit", sx: { mr: 1 } }),
|
|
183
|
+
/* @__PURE__ */ r("span", { children: "Loading..." })
|
|
184
|
+
] }) : /* @__PURE__ */ f(S, { children: [
|
|
185
|
+
d && /* @__PURE__ */ r("span", { style: { display: "inline-flex" }, children: d }),
|
|
186
|
+
o,
|
|
187
|
+
c && /* @__PURE__ */ r("span", { style: { display: "inline-flex" }, children: c })
|
|
188
|
+
] })
|
|
189
|
+
}
|
|
190
|
+
), m = ({
|
|
191
|
+
children: o,
|
|
192
|
+
variant: t = "outlined",
|
|
193
|
+
padding: n = "md",
|
|
194
|
+
hoverEffect: i = !1,
|
|
195
|
+
onClick: a,
|
|
196
|
+
className: s = ""
|
|
197
|
+
}) => {
|
|
198
|
+
const d = () => {
|
|
199
|
+
switch (n) {
|
|
200
|
+
case "none":
|
|
201
|
+
return 0;
|
|
202
|
+
case "sm":
|
|
203
|
+
return "12px";
|
|
204
|
+
case "lg":
|
|
205
|
+
return "28px";
|
|
206
|
+
default:
|
|
207
|
+
return "20px";
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ r(P, { sx: (() => {
|
|
211
|
+
const l = {
|
|
212
|
+
borderRadius: u["2xl"],
|
|
213
|
+
transition: "all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
214
|
+
cursor: a ? "pointer" : "default"
|
|
215
|
+
};
|
|
216
|
+
return t === "elevated" ? (l.backgroundColor = "#ffffff", l.boxShadow = x.md, l.border = "none", i && (l["&:hover"] = {
|
|
217
|
+
boxShadow: x.xl,
|
|
218
|
+
transform: "translateY(-2px)"
|
|
219
|
+
})) : t === "flat" ? (l.backgroundColor = e.slate[50], l.boxShadow = "none", l.border = `1px solid ${e.slate[100]}`) : (l.backgroundColor = "#ffffff", l.border = `1px solid ${e.slate[200]}`, l.boxShadow = x.xs, i && (l["&:hover"] = {
|
|
220
|
+
borderColor: e.amber[500],
|
|
221
|
+
boxShadow: x.md,
|
|
222
|
+
transform: "translateY(-2px)"
|
|
223
|
+
})), l;
|
|
224
|
+
})(), onClick: a, className: s, children: /* @__PURE__ */ r(T, { sx: { p: `${d()} !important` }, children: o }) });
|
|
225
|
+
};
|
|
226
|
+
m.Header = ({ title: o, subtitle: t, action: n }) => /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "12px" }, children: [
|
|
227
|
+
/* @__PURE__ */ f("div", { children: [
|
|
228
|
+
/* @__PURE__ */ r("div", { style: { fontWeight: 800, fontSize: "1.05rem", color: e.slate[900], letterSpacing: "-0.01em" }, children: o }),
|
|
229
|
+
t && /* @__PURE__ */ r("div", { style: { fontSize: "0.75rem", color: e.slate[500], marginTop: "2px" }, children: t })
|
|
230
|
+
] }),
|
|
231
|
+
n && /* @__PURE__ */ r("div", { children: n })
|
|
232
|
+
] });
|
|
233
|
+
m.Body = ({ children: o, className: t = "" }) => /* @__PURE__ */ r("div", { className: t, children: o });
|
|
234
|
+
m.Footer = ({ children: o, className: t = "" }) => /* @__PURE__ */ r(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: t,
|
|
238
|
+
style: {
|
|
239
|
+
marginTop: "16px",
|
|
240
|
+
paddingTop: "12px",
|
|
241
|
+
borderTop: `1px solid ${e.slate[100]}`,
|
|
242
|
+
display: "flex",
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
justifyContent: "space-between"
|
|
245
|
+
},
|
|
246
|
+
children: o
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
const V = ({
|
|
250
|
+
label: o,
|
|
251
|
+
status: t = "neutral",
|
|
252
|
+
pulse: n = !1,
|
|
253
|
+
icon: i,
|
|
254
|
+
size: a = "md",
|
|
255
|
+
className: s = ""
|
|
256
|
+
}) => {
|
|
257
|
+
const c = (() => {
|
|
258
|
+
switch (t) {
|
|
259
|
+
case "success":
|
|
260
|
+
return {
|
|
261
|
+
bg: e.status.success.light,
|
|
262
|
+
text: e.status.success.text,
|
|
263
|
+
border: e.status.success.border,
|
|
264
|
+
dot: e.status.success.main
|
|
265
|
+
};
|
|
266
|
+
case "warning":
|
|
267
|
+
return {
|
|
268
|
+
bg: e.status.warning.light,
|
|
269
|
+
text: e.status.warning.text,
|
|
270
|
+
border: e.status.warning.border,
|
|
271
|
+
dot: e.status.warning.main
|
|
272
|
+
};
|
|
273
|
+
case "error":
|
|
274
|
+
return {
|
|
275
|
+
bg: e.status.error.light,
|
|
276
|
+
text: e.status.error.text,
|
|
277
|
+
border: e.status.error.border,
|
|
278
|
+
dot: e.status.error.main
|
|
279
|
+
};
|
|
280
|
+
case "info":
|
|
281
|
+
return {
|
|
282
|
+
bg: e.status.info.light,
|
|
283
|
+
text: e.status.info.text,
|
|
284
|
+
border: e.status.info.border,
|
|
285
|
+
dot: e.status.info.main
|
|
286
|
+
};
|
|
287
|
+
case "coffee":
|
|
288
|
+
return {
|
|
289
|
+
bg: e.amber[50],
|
|
290
|
+
text: e.amber[800],
|
|
291
|
+
border: e.amber[200],
|
|
292
|
+
dot: e.amber[600]
|
|
293
|
+
};
|
|
294
|
+
default:
|
|
295
|
+
return {
|
|
296
|
+
bg: e.slate[100],
|
|
297
|
+
text: e.slate[700],
|
|
298
|
+
border: e.slate[200],
|
|
299
|
+
dot: e.slate[500]
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
})(), l = a === "sm" ? "2px" : "4px", g = a === "sm" ? "8px" : "10px", h = a === "sm" ? "0.6875rem" : "0.75rem";
|
|
303
|
+
return /* @__PURE__ */ f(
|
|
304
|
+
"span",
|
|
305
|
+
{
|
|
306
|
+
className: s,
|
|
307
|
+
style: {
|
|
308
|
+
display: "inline-flex",
|
|
309
|
+
alignItems: "center",
|
|
310
|
+
gap: "6px",
|
|
311
|
+
padding: `${l} ${g}`,
|
|
312
|
+
borderRadius: u.full,
|
|
313
|
+
backgroundColor: c.bg,
|
|
314
|
+
color: c.text,
|
|
315
|
+
border: `1px solid ${c.border}`,
|
|
316
|
+
fontSize: h,
|
|
317
|
+
fontWeight: 700,
|
|
318
|
+
letterSpacing: "-0.01em",
|
|
319
|
+
lineHeight: 1.2
|
|
320
|
+
},
|
|
321
|
+
children: [
|
|
322
|
+
n && /* @__PURE__ */ r(
|
|
323
|
+
"span",
|
|
324
|
+
{
|
|
325
|
+
style: {
|
|
326
|
+
width: "6px",
|
|
327
|
+
height: "6px",
|
|
328
|
+
borderRadius: "50%",
|
|
329
|
+
backgroundColor: c.dot,
|
|
330
|
+
display: "inline-block"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
),
|
|
334
|
+
i && /* @__PURE__ */ r("span", { style: { display: "inline-flex" }, children: i }),
|
|
335
|
+
/* @__PURE__ */ r("span", { children: o })
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
}, _ = ({
|
|
340
|
+
label: o,
|
|
341
|
+
value: t,
|
|
342
|
+
onChange: n,
|
|
343
|
+
placeholder: i,
|
|
344
|
+
type: a = "text",
|
|
345
|
+
error: s = !1,
|
|
346
|
+
helperText: d,
|
|
347
|
+
disabled: c = !1,
|
|
348
|
+
fullWidth: l = !0,
|
|
349
|
+
startAdornment: g,
|
|
350
|
+
endAdornment: h,
|
|
351
|
+
className: y = ""
|
|
352
|
+
}) => /* @__PURE__ */ r(
|
|
353
|
+
R,
|
|
354
|
+
{
|
|
355
|
+
label: o,
|
|
356
|
+
value: t,
|
|
357
|
+
onChange: n,
|
|
358
|
+
placeholder: i,
|
|
359
|
+
type: a,
|
|
360
|
+
error: s,
|
|
361
|
+
helperText: d,
|
|
362
|
+
disabled: c,
|
|
363
|
+
fullWidth: l,
|
|
364
|
+
variant: "outlined",
|
|
365
|
+
size: "small",
|
|
366
|
+
className: y,
|
|
367
|
+
InputProps: {
|
|
368
|
+
startAdornment: g ? /* @__PURE__ */ r(C, { position: "start", children: g }) : void 0,
|
|
369
|
+
endAdornment: h ? /* @__PURE__ */ r(C, { position: "end", children: h }) : void 0,
|
|
370
|
+
sx: {
|
|
371
|
+
borderRadius: u.lg,
|
|
372
|
+
backgroundColor: "#ffffff",
|
|
373
|
+
fontSize: "0.85rem",
|
|
374
|
+
"& fieldset": {
|
|
375
|
+
borderColor: e.slate[300]
|
|
376
|
+
},
|
|
377
|
+
"&:hover fieldset": {
|
|
378
|
+
borderColor: e.amber[600]
|
|
379
|
+
},
|
|
380
|
+
"&.Mui-focused fieldset": {
|
|
381
|
+
borderColor: e.amber[700],
|
|
382
|
+
borderWidth: "2px"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
InputLabelProps: {
|
|
387
|
+
sx: {
|
|
388
|
+
fontSize: "0.85rem",
|
|
389
|
+
fontWeight: 600,
|
|
390
|
+
"&.Mui-focused": {
|
|
391
|
+
color: e.amber[800]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
), q = ({
|
|
397
|
+
value: o,
|
|
398
|
+
onChange: t,
|
|
399
|
+
min: n = 30,
|
|
400
|
+
max: i = 70,
|
|
401
|
+
step: a = 1,
|
|
402
|
+
unit: s = "cm",
|
|
403
|
+
label: d,
|
|
404
|
+
className: c = ""
|
|
405
|
+
}) => /* @__PURE__ */ f("div", { className: c, style: { width: "100%" }, children: [
|
|
406
|
+
d && /* @__PURE__ */ f("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "8px" }, children: [
|
|
407
|
+
/* @__PURE__ */ r("span", { style: { fontSize: "0.75rem", fontWeight: 700, color: e.slate[700] }, children: d }),
|
|
408
|
+
/* @__PURE__ */ f(
|
|
409
|
+
"span",
|
|
410
|
+
{
|
|
411
|
+
style: {
|
|
412
|
+
fontSize: "0.75rem",
|
|
413
|
+
fontWeight: 800,
|
|
414
|
+
color: e.amber[800],
|
|
415
|
+
backgroundColor: e.amber[50],
|
|
416
|
+
border: `1px solid ${e.amber[200]}`,
|
|
417
|
+
padding: "2px 8px",
|
|
418
|
+
borderRadius: u.md
|
|
419
|
+
},
|
|
420
|
+
children: [
|
|
421
|
+
o,
|
|
422
|
+
" ",
|
|
423
|
+
s
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
] }),
|
|
428
|
+
/* @__PURE__ */ r(
|
|
429
|
+
$,
|
|
430
|
+
{
|
|
431
|
+
value: o,
|
|
432
|
+
min: n,
|
|
433
|
+
max: i,
|
|
434
|
+
step: a,
|
|
435
|
+
onChange: (l, g) => t(g),
|
|
436
|
+
sx: {
|
|
437
|
+
color: e.amber[700],
|
|
438
|
+
height: 6,
|
|
439
|
+
"& .MuiSlider-track": {
|
|
440
|
+
border: "none"
|
|
441
|
+
},
|
|
442
|
+
"& .MuiSlider-thumb": {
|
|
443
|
+
height: 18,
|
|
444
|
+
width: 18,
|
|
445
|
+
backgroundColor: "#ffffff",
|
|
446
|
+
border: `3px solid ${e.amber[700]}`,
|
|
447
|
+
"&:focus, &:hover, &.Mui-active, &.Mui-focusVisible": {
|
|
448
|
+
boxShadow: "0 0 0 8px rgba(180, 83, 9, 0.16)"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"& .MuiSlider-rail": {
|
|
452
|
+
color: e.slate[200],
|
|
453
|
+
opacity: 1
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
] }), G = ({
|
|
459
|
+
isOpen: o,
|
|
460
|
+
onClose: t,
|
|
461
|
+
title: n,
|
|
462
|
+
subtitle: i,
|
|
463
|
+
children: a,
|
|
464
|
+
actions: s,
|
|
465
|
+
maxWidth: d = "sm",
|
|
466
|
+
className: c = ""
|
|
467
|
+
}) => /* @__PURE__ */ f(
|
|
468
|
+
M,
|
|
469
|
+
{
|
|
470
|
+
open: o,
|
|
471
|
+
onClose: t,
|
|
472
|
+
maxWidth: d,
|
|
473
|
+
fullWidth: !0,
|
|
474
|
+
className: c,
|
|
475
|
+
PaperProps: {
|
|
476
|
+
sx: {
|
|
477
|
+
borderRadius: u["2xl"],
|
|
478
|
+
p: 1
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
children: [
|
|
482
|
+
n && /* @__PURE__ */ f(B, { sx: { pb: 1 }, children: [
|
|
483
|
+
/* @__PURE__ */ r("div", { style: { fontWeight: 800, fontSize: "1.25rem", color: e.slate[900], letterSpacing: "-0.02em" }, children: n }),
|
|
484
|
+
i && /* @__PURE__ */ r("div", { style: { fontSize: "0.8rem", color: e.slate[500], marginTop: "4px", fontWeight: 500 }, children: i })
|
|
485
|
+
] }),
|
|
486
|
+
/* @__PURE__ */ r(H, { sx: { py: 2 }, children: a }),
|
|
487
|
+
s && /* @__PURE__ */ r(I, { sx: { px: 3, pb: 2, pt: 1 }, children: s })
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
), J = ({
|
|
491
|
+
title: o = "Physical Dimensions",
|
|
492
|
+
badgeText: t = "Metric Specs",
|
|
493
|
+
metrics: n,
|
|
494
|
+
highlightNotice: i,
|
|
495
|
+
className: a = ""
|
|
496
|
+
}) => /* @__PURE__ */ f(
|
|
497
|
+
"div",
|
|
498
|
+
{
|
|
499
|
+
className: a,
|
|
500
|
+
style: {
|
|
501
|
+
backgroundColor: "#ffffff",
|
|
502
|
+
borderRadius: u["2xl"],
|
|
503
|
+
border: `1px solid ${e.slate[200]}`,
|
|
504
|
+
padding: "20px"
|
|
505
|
+
},
|
|
506
|
+
children: [
|
|
507
|
+
/* @__PURE__ */ f("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "16px" }, children: [
|
|
508
|
+
/* @__PURE__ */ r(
|
|
509
|
+
"h4",
|
|
510
|
+
{
|
|
511
|
+
style: {
|
|
512
|
+
margin: 0,
|
|
513
|
+
fontSize: "0.75rem",
|
|
514
|
+
fontWeight: 800,
|
|
515
|
+
textTransform: "uppercase",
|
|
516
|
+
letterSpacing: "0.05em",
|
|
517
|
+
color: e.slate[400]
|
|
518
|
+
},
|
|
519
|
+
children: o
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
t && /* @__PURE__ */ r(
|
|
523
|
+
"span",
|
|
524
|
+
{
|
|
525
|
+
style: {
|
|
526
|
+
fontSize: "0.65rem",
|
|
527
|
+
fontWeight: 700,
|
|
528
|
+
backgroundColor: e.slate[100],
|
|
529
|
+
color: e.slate[600],
|
|
530
|
+
padding: "2px 8px",
|
|
531
|
+
borderRadius: u.full,
|
|
532
|
+
fontFamily: "monospace"
|
|
533
|
+
},
|
|
534
|
+
children: t
|
|
535
|
+
}
|
|
536
|
+
)
|
|
537
|
+
] }),
|
|
538
|
+
/* @__PURE__ */ r(
|
|
539
|
+
"div",
|
|
540
|
+
{
|
|
541
|
+
style: {
|
|
542
|
+
display: "grid",
|
|
543
|
+
gridTemplateColumns: `repeat(${n.length}, 1fr)`,
|
|
544
|
+
backgroundColor: e.slate[50],
|
|
545
|
+
borderRadius: u.xl,
|
|
546
|
+
border: `1px solid ${e.slate[100]}`,
|
|
547
|
+
padding: "14px",
|
|
548
|
+
textAlign: "center",
|
|
549
|
+
gap: "8px"
|
|
550
|
+
},
|
|
551
|
+
children: n.map((s, d) => /* @__PURE__ */ f(
|
|
552
|
+
"div",
|
|
553
|
+
{
|
|
554
|
+
style: {
|
|
555
|
+
borderLeft: d > 0 ? `1px solid ${e.slate[200]}` : "none",
|
|
556
|
+
paddingLeft: d > 0 ? "8px" : "0"
|
|
557
|
+
},
|
|
558
|
+
children: [
|
|
559
|
+
/* @__PURE__ */ r("span", { style: { display: "block", fontSize: "0.75rem", color: e.slate[400], fontWeight: 500 }, children: s.label }),
|
|
560
|
+
/* @__PURE__ */ f("span", { style: { display: "block", fontSize: "0.95rem", fontWeight: 900, color: e.slate[800], marginTop: "2px" }, children: [
|
|
561
|
+
s.value,
|
|
562
|
+
" ",
|
|
563
|
+
s.unit || "cm"
|
|
564
|
+
] })
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
s.label
|
|
568
|
+
))
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
i && /* @__PURE__ */ r(
|
|
572
|
+
"div",
|
|
573
|
+
{
|
|
574
|
+
style: {
|
|
575
|
+
marginTop: "12px",
|
|
576
|
+
padding: "10px 14px",
|
|
577
|
+
backgroundColor: e.amber[50],
|
|
578
|
+
border: `1px solid ${e.amber[200]}`,
|
|
579
|
+
borderRadius: u.lg,
|
|
580
|
+
fontSize: "0.75rem",
|
|
581
|
+
color: e.amber[900],
|
|
582
|
+
fontWeight: 600
|
|
583
|
+
},
|
|
584
|
+
children: i
|
|
585
|
+
}
|
|
586
|
+
)
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
), K = ({
|
|
590
|
+
level: o = 2,
|
|
591
|
+
children: t,
|
|
592
|
+
className: n = "",
|
|
593
|
+
style: i = {}
|
|
594
|
+
}) => {
|
|
595
|
+
const a = () => {
|
|
596
|
+
const s = {
|
|
597
|
+
color: e.slate[900],
|
|
598
|
+
fontFamily: b.fonts.sans,
|
|
599
|
+
letterSpacing: "-0.02em",
|
|
600
|
+
margin: 0,
|
|
601
|
+
...i
|
|
602
|
+
};
|
|
603
|
+
switch (o) {
|
|
604
|
+
case 1:
|
|
605
|
+
return { ...s, fontSize: "2.5rem", fontWeight: 900, lineHeight: 1.1 };
|
|
606
|
+
case 2:
|
|
607
|
+
return { ...s, fontSize: "1.75rem", fontWeight: 800, lineHeight: 1.2 };
|
|
608
|
+
case 3:
|
|
609
|
+
return { ...s, fontSize: "1.25rem", fontWeight: 700, lineHeight: 1.3 };
|
|
610
|
+
case 4:
|
|
611
|
+
return { ...s, fontSize: "1rem", fontWeight: 700, lineHeight: 1.4 };
|
|
612
|
+
default:
|
|
613
|
+
return { ...s, fontSize: "0.875rem", fontWeight: 600 };
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
return o === 1 ? /* @__PURE__ */ r("h1", { className: n, style: a(), children: t }) : o === 2 ? /* @__PURE__ */ r("h2", { className: n, style: a(), children: t }) : o === 3 ? /* @__PURE__ */ r("h3", { className: n, style: a(), children: t }) : o === 4 ? /* @__PURE__ */ r("h4", { className: n, style: a(), children: t }) : o === 5 ? /* @__PURE__ */ r("h5", { className: n, style: a(), children: t }) : /* @__PURE__ */ r("h6", { className: n, style: a(), children: t });
|
|
617
|
+
}, Q = ({
|
|
618
|
+
children: o,
|
|
619
|
+
variant: t = "body",
|
|
620
|
+
className: n = "",
|
|
621
|
+
style: i = {}
|
|
622
|
+
}) => /* @__PURE__ */ r("p", { className: n, style: (() => {
|
|
623
|
+
const s = {
|
|
624
|
+
fontFamily: b.fonts.sans,
|
|
625
|
+
margin: 0,
|
|
626
|
+
...i
|
|
627
|
+
};
|
|
628
|
+
switch (t) {
|
|
629
|
+
case "caption":
|
|
630
|
+
return { ...s, fontSize: "0.75rem", color: e.slate[500], lineHeight: 1.3 };
|
|
631
|
+
case "muted":
|
|
632
|
+
return { ...s, fontSize: "0.85rem", color: e.slate[400], lineHeight: 1.4 };
|
|
633
|
+
default:
|
|
634
|
+
return { ...s, fontSize: "0.9rem", color: e.slate[700], lineHeight: 1.5 };
|
|
635
|
+
}
|
|
636
|
+
})(), children: o });
|
|
637
|
+
export {
|
|
638
|
+
L as P,
|
|
639
|
+
m as a,
|
|
640
|
+
G as b,
|
|
641
|
+
K as c,
|
|
642
|
+
_ as d,
|
|
643
|
+
J as e,
|
|
644
|
+
q as f,
|
|
645
|
+
V as g,
|
|
646
|
+
Q as h,
|
|
647
|
+
A as i,
|
|
648
|
+
j,
|
|
649
|
+
D as p
|
|
650
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { colors as a, radii as r, shadows as s, spacing as n, default as e, typography as P } from "./tokens/index.js";
|
|
2
|
+
import { P as p, a as d, b as g, c as h, d as m, e as u, f as c, g as f, h as l, i as x, p as T, j as B } from "./ProtonTypography-Cp9sfQ06.js";
|
|
3
|
+
export {
|
|
4
|
+
p as ProtonButton,
|
|
5
|
+
d as ProtonCard,
|
|
6
|
+
g as ProtonDialog,
|
|
7
|
+
h as ProtonHeading,
|
|
8
|
+
m as ProtonInput,
|
|
9
|
+
u as ProtonMetricBox,
|
|
10
|
+
c as ProtonSlider,
|
|
11
|
+
f as ProtonStatusBadge,
|
|
12
|
+
l as ProtonText,
|
|
13
|
+
x as ProtonThemeProvider,
|
|
14
|
+
a as colors,
|
|
15
|
+
T as protonMuiTheme,
|
|
16
|
+
B as protonThemeOptions,
|
|
17
|
+
r as radii,
|
|
18
|
+
s as shadows,
|
|
19
|
+
n as spacing,
|
|
20
|
+
e as tokens,
|
|
21
|
+
P as typography
|
|
22
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ProtonButtonProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
startIcon?: React.ReactNode;
|
|
10
|
+
endIcon?: React.ReactNode;
|
|
11
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
+
type?: 'button' | 'submit' | 'reset';
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const ProtonButton: React.FC<ProtonButtonProps>;
|
|
16
|
+
export default ProtonButton;
|