rouse-ui-kit 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/src/App.tsx ADDED
@@ -0,0 +1,435 @@
1
+ import StarIcon from "@mui/icons-material/Star";
2
+ import VisibilityIcon from "@mui/icons-material/Visibility";
3
+ import { Box, Divider, Stack, Typography } from "@mui/material";
4
+ import { useState } from "react";
5
+ import { ButtonContained, ButtonOutlined, ButtonText } from "./components/Button";
6
+ import { Checkbox } from "./components/Checkbox";
7
+ import { IconButtonOutlined } from "./components/IconButton";
8
+ import { ChipFilled, ChipOutlined, ChipStatus, ChipStatusOutlined } from "./components/Chip";
9
+ import { LabelFilled, LabelOutlined, type LabelColor } from "./components/Label";
10
+ import { Menu, type MenuOption } from "./components/Menu";
11
+ import { SelectOutlined } from "./components/Select";
12
+ import { TextFieldOutlined } from "./components/TextField";
13
+
14
+ const OPTIONS: MenuOption[] = [
15
+ { value: "option1", label: "Option 1" },
16
+ { value: "option2", label: "Option 2" },
17
+ { value: "option3", label: "Option 3" },
18
+ ];
19
+
20
+ export default function App() {
21
+ const [val, setVal] = useState("option1");
22
+ const [valClearable, setValClearable] = useState("option1");
23
+ const [tfVal, setTfVal] = useState("Value");
24
+ const [tfClearable, setTfClearable] = useState("Value");
25
+ const [menuSelected, setMenuSelected] = useState(["option2"]);
26
+ const [menuSearch, setMenuSearch] = useState("");
27
+ return (
28
+ <Box sx={{ p: 4, bgcolor: "#f5f5f5", minHeight: "100vh" }}>
29
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
30
+ Button / Contained
31
+ </Typography>
32
+ <Stack spacing={2} sx={{ mb: 4 }}>
33
+ <Stack direction="row" spacing={2} alignItems="center">
34
+ <ButtonContained label="Medium" icon="none" />
35
+ <ButtonContained label="Medium" icon="right" />
36
+ <ButtonContained label="Medium" icon="left" />
37
+ </Stack>
38
+ <Stack direction="row" spacing={2} alignItems="center">
39
+ <ButtonContained label="Medium" icon="none" disabled />
40
+ <ButtonContained label="Medium" icon="right" disabled />
41
+ <ButtonContained label="Medium" icon="left" disabled />
42
+ </Stack>
43
+ </Stack>
44
+
45
+ <Divider sx={{ mb: 4 }} />
46
+
47
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
48
+ Button / Outlined
49
+ </Typography>
50
+ <Stack spacing={2} sx={{ mb: 4 }}>
51
+ <Stack direction="row" spacing={2} alignItems="center">
52
+ <ButtonOutlined label="Medium" icon="none" />
53
+ <ButtonOutlined label="Medium" icon="right" />
54
+ <ButtonOutlined label="Medium" icon="left" />
55
+ </Stack>
56
+ <Stack direction="row" spacing={2} alignItems="center">
57
+ <ButtonOutlined label="Medium" icon="none" disabled />
58
+ <ButtonOutlined label="Medium" icon="right" disabled />
59
+ <ButtonOutlined label="Medium" icon="left" disabled />
60
+ </Stack>
61
+ </Stack>
62
+
63
+ <Divider sx={{ mb: 4 }} />
64
+
65
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
66
+ Button / Text
67
+ </Typography>
68
+ <Stack spacing={2}>
69
+ <Stack direction="row" spacing={2} alignItems="center">
70
+ <ButtonText label="Medium" icon="none" />
71
+ <ButtonText label="Medium" icon="right" />
72
+ <ButtonText label="Medium" icon="left" />
73
+ </Stack>
74
+ <Stack direction="row" spacing={2} alignItems="center">
75
+ <ButtonText label="Medium" icon="none" disabled />
76
+ <ButtonText label="Medium" icon="right" disabled />
77
+ <ButtonText label="Medium" icon="left" disabled />
78
+ </Stack>
79
+ </Stack>
80
+
81
+ <Divider sx={{ mb: 4 }} />
82
+
83
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
84
+ Checkbox
85
+ </Typography>
86
+ <Stack spacing={1}>
87
+ <Stack direction="row" spacing={3} alignItems="center">
88
+ <Checkbox />
89
+ <Checkbox checked />
90
+ <Checkbox indeterminate />
91
+ <Checkbox label="Label" />
92
+ <Checkbox label="Label" checked />
93
+ <Checkbox label="Label" indeterminate />
94
+ </Stack>
95
+ <Stack direction="row" spacing={3} alignItems="center">
96
+ <Checkbox disabled />
97
+ <Checkbox disabled checked />
98
+ <Checkbox disabled indeterminate />
99
+ <Checkbox label="Label" disabled />
100
+ <Checkbox label="Label" disabled checked />
101
+ <Checkbox label="Label" disabled indeterminate />
102
+ </Stack>
103
+ </Stack>
104
+
105
+ <Divider sx={{ mb: 4 }} />
106
+
107
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
108
+ IconButton / Outlined
109
+ </Typography>
110
+ <Stack spacing={2}>
111
+ <Stack direction="row" spacing={2} alignItems="center">
112
+ <IconButtonOutlined icon={StarIcon} size="large" aria-label="star large" />
113
+ <IconButtonOutlined icon={StarIcon} size="medium" aria-label="star medium" />
114
+ <IconButtonOutlined icon={StarIcon} size="small" aria-label="star small" />
115
+ <IconButtonOutlined icon={StarIcon} size="xSmall" aria-label="star xsmall" />
116
+ </Stack>
117
+ <Stack direction="row" spacing={2} alignItems="center">
118
+ <IconButtonOutlined icon={StarIcon} size="large" disabled aria-label="star large disabled" />
119
+ <IconButtonOutlined icon={StarIcon} size="medium" disabled aria-label="star medium disabled" />
120
+ <IconButtonOutlined icon={StarIcon} size="small" disabled aria-label="star small disabled" />
121
+ <IconButtonOutlined icon={StarIcon} size="xSmall" disabled aria-label="star xsmall disabled" />
122
+ </Stack>
123
+ </Stack>
124
+
125
+ <Divider sx={{ mb: 4 }} />
126
+
127
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
128
+ Select / Outlined
129
+ </Typography>
130
+ <Stack spacing={2}>
131
+ {/* No value (label as placeholder) */}
132
+ <Stack direction="row" spacing={2} alignItems="flex-start">
133
+ <Box sx={{ width: 220 }}>
134
+ <SelectOutlined label="Label" options={OPTIONS} />
135
+ </Box>
136
+ <Box sx={{ width: 220 }}>
137
+ <SelectOutlined label="Label" options={OPTIONS} helperText="Helper text" />
138
+ </Box>
139
+ <Box sx={{ width: 220 }}>
140
+ <SelectOutlined label="Label" options={OPTIONS} disabled />
141
+ </Box>
142
+ <Box sx={{ width: 220 }}>
143
+ <SelectOutlined label="Label" options={OPTIONS} error helperText="Error message" />
144
+ </Box>
145
+ </Stack>
146
+ {/* With value (floating label) */}
147
+ <Stack direction="row" spacing={2} alignItems="flex-start">
148
+ <Box sx={{ width: 220 }}>
149
+ <SelectOutlined label="Label" value={val} options={OPTIONS} onChange={setVal} />
150
+ </Box>
151
+ <Box sx={{ width: 220 }}>
152
+ <SelectOutlined label="Label" value={val} options={OPTIONS} onChange={setVal} helperText="Helper text" />
153
+ </Box>
154
+ <Box sx={{ width: 220 }}>
155
+ <SelectOutlined label="Label" value="option1" options={OPTIONS} disabled />
156
+ </Box>
157
+ <Box sx={{ width: 220 }}>
158
+ <SelectOutlined label="Label" value="option1" options={OPTIONS} error helperText="Error message" />
159
+ </Box>
160
+ </Stack>
161
+ {/* With value + clear button */}
162
+ <Stack direction="row" spacing={2} alignItems="flex-start">
163
+ <Box sx={{ width: 220 }}>
164
+ <SelectOutlined
165
+ label="Label"
166
+ value={valClearable}
167
+ options={OPTIONS}
168
+ clearable
169
+ onChange={setValClearable}
170
+ onClear={() => setValClearable("")}
171
+ />
172
+ </Box>
173
+ <Box sx={{ width: 220 }}>
174
+ <SelectOutlined
175
+ label="Label"
176
+ value={valClearable}
177
+ options={OPTIONS}
178
+ clearable
179
+ onChange={setValClearable}
180
+ onClear={() => setValClearable("")}
181
+ helperText="Helper text"
182
+ />
183
+ </Box>
184
+ <Box sx={{ width: 220 }}>
185
+ <SelectOutlined label="Label" value="option1" options={OPTIONS} clearable disabled />
186
+ </Box>
187
+ <Box sx={{ width: 220 }}>
188
+ <SelectOutlined label="Label" value="option1" options={OPTIONS} clearable error helperText="Error message" />
189
+ </Box>
190
+ </Stack>
191
+ </Stack>
192
+
193
+ <Divider sx={{ mb: 4 }} />
194
+
195
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
196
+ TextField / Outlined
197
+ </Typography>
198
+ <Stack spacing={2}>
199
+ {/* No value */}
200
+ <Stack direction="row" spacing={2} alignItems="flex-start">
201
+ <Box sx={{ width: 220 }}>
202
+ <TextFieldOutlined label="Label" value="" onChange={() => {}} />
203
+ </Box>
204
+ <Box sx={{ width: 220 }}>
205
+ <TextFieldOutlined label="Label" value="" icon={VisibilityIcon} onChange={() => {}} />
206
+ </Box>
207
+ <Box sx={{ width: 220 }}>
208
+ <TextFieldOutlined label="Label" value="" helperText="Helper text" onChange={() => {}} />
209
+ </Box>
210
+ <Box sx={{ width: 220 }}>
211
+ <TextFieldOutlined label="Label" value="" disabled onChange={() => {}} />
212
+ </Box>
213
+ <Box sx={{ width: 220 }}>
214
+ <TextFieldOutlined label="Label" value="" error helperText="Error message" onChange={() => {}} />
215
+ </Box>
216
+ </Stack>
217
+
218
+ {/* With value */}
219
+ <Stack direction="row" spacing={2} alignItems="flex-start">
220
+ <Box sx={{ width: 220 }}>
221
+ <TextFieldOutlined label="Label" value={tfVal} onChange={setTfVal} />
222
+ </Box>
223
+ <Box sx={{ width: 220 }}>
224
+ <TextFieldOutlined label="Label" value={tfVal} icon={VisibilityIcon} onIconClick={() => {}} onChange={setTfVal} />
225
+ </Box>
226
+ <Box sx={{ width: 220 }}>
227
+ <TextFieldOutlined label="Label" value={tfVal} helperText="Helper text" onChange={setTfVal} />
228
+ </Box>
229
+ <Box sx={{ width: 220 }}>
230
+ <TextFieldOutlined label="Label" value="Value" disabled onChange={() => {}} />
231
+ </Box>
232
+ <Box sx={{ width: 220 }}>
233
+ <TextFieldOutlined label="Label" value="Value" error helperText="Error message" onChange={() => {}} />
234
+ </Box>
235
+ </Stack>
236
+
237
+ {/* With value + clear */}
238
+ <Stack direction="row" spacing={2} alignItems="flex-start">
239
+ <Box sx={{ width: 220 }}>
240
+ <TextFieldOutlined
241
+ label="Label"
242
+ value={tfClearable}
243
+ clearable
244
+ onChange={setTfClearable}
245
+ onClear={() => setTfClearable("")}
246
+ />
247
+ </Box>
248
+ <Box sx={{ width: 220 }}>
249
+ <TextFieldOutlined
250
+ label="Label"
251
+ value={tfClearable}
252
+ clearable
253
+ icon={VisibilityIcon}
254
+ onIconClick={() => {}}
255
+ onChange={setTfClearable}
256
+ onClear={() => setTfClearable("")}
257
+ />
258
+ </Box>
259
+ <Box sx={{ width: 220 }}>
260
+ <TextFieldOutlined
261
+ label="Label"
262
+ value={tfClearable}
263
+ clearable
264
+ helperText="Helper text"
265
+ onChange={setTfClearable}
266
+ onClear={() => setTfClearable("")}
267
+ />
268
+ </Box>
269
+ <Box sx={{ width: 220 }}>
270
+ <TextFieldOutlined label="Label" value="Value" clearable disabled onChange={() => {}} />
271
+ </Box>
272
+ <Box sx={{ width: 220 }}>
273
+ <TextFieldOutlined label="Label" value="Value" clearable error helperText="Error message" onChange={() => {}} />
274
+ </Box>
275
+ </Stack>
276
+ </Stack>
277
+
278
+ <Divider sx={{ mb: 4 }} />
279
+
280
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
281
+ Menu
282
+ </Typography>
283
+ <Stack direction="row" spacing={3} alignItems="flex-start" flexWrap="wrap" useFlexGap>
284
+ {/* Basic single-select */}
285
+ <Menu
286
+ options={OPTIONS}
287
+ selectedValues={menuSelected}
288
+ onSelect={(v) => setMenuSelected([v])}
289
+ />
290
+ {/* With search */}
291
+ <Menu
292
+ options={OPTIONS}
293
+ selectedValues={menuSelected}
294
+ search
295
+ searchValue={menuSearch}
296
+ onSearchChange={setMenuSearch}
297
+ onSelect={(v) => setMenuSelected([v])}
298
+ />
299
+ {/* Multi-select with Select All / Clear */}
300
+ <Menu
301
+ options={OPTIONS}
302
+ selectedValues={menuSelected}
303
+ multiSelect
304
+ onSelect={(v) =>
305
+ setMenuSelected((prev) =>
306
+ prev.includes(v) ? prev.filter((s) => s !== v) : [...prev, v]
307
+ )
308
+ }
309
+ onSelectAll={() => setMenuSelected(OPTIONS.map((o) => o.value))}
310
+ onClear={() => setMenuSelected([])}
311
+ />
312
+ {/* Search + Multi-select */}
313
+ <Menu
314
+ options={OPTIONS}
315
+ selectedValues={menuSelected}
316
+ search
317
+ multiSelect
318
+ searchValue={menuSearch}
319
+ onSearchChange={setMenuSearch}
320
+ onSelect={(v) =>
321
+ setMenuSelected((prev) =>
322
+ prev.includes(v) ? prev.filter((s) => s !== v) : [...prev, v]
323
+ )
324
+ }
325
+ onSelectAll={() => setMenuSelected(OPTIONS.map((o) => o.value))}
326
+ onClear={() => setMenuSelected([])}
327
+ />
328
+ </Stack>
329
+
330
+ <Divider sx={{ mb: 4 }} />
331
+
332
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
333
+ Label / Filled
334
+ </Typography>
335
+ {(["default", "primary", "secondary", "error", "warning", "success", "info"] as LabelColor[]).map(
336
+ (color) => (
337
+ <Stack key={color} direction="row" spacing={2} alignItems="center" sx={{ mb: 1.5 }}>
338
+ <LabelFilled label="Label Name" color={color} icon="none" />
339
+ <LabelFilled label="Label Name" color={color} icon="left" />
340
+ <LabelFilled label="Label Name" color={color} icon="right" />
341
+ <LabelFilled color={color} icon="only" />
342
+ </Stack>
343
+ )
344
+ )}
345
+
346
+ <Divider sx={{ mb: 4 }} />
347
+
348
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
349
+ Label / Outlined
350
+ </Typography>
351
+ {(["default", "primary", "secondary", "error", "warning", "success", "info"] as LabelColor[]).map(
352
+ (color) => (
353
+ <Stack key={color} direction="row" spacing={2} alignItems="center" sx={{ mb: 1.5 }}>
354
+ <LabelOutlined label="Label Name" color={color} icon="none" />
355
+ <LabelOutlined label="Label Name" color={color} icon="left" />
356
+ <LabelOutlined label="Label Name" color={color} icon="right" />
357
+ <LabelOutlined color={color} icon="only" />
358
+ </Stack>
359
+ )
360
+ )}
361
+
362
+ <Divider sx={{ mb: 4 }} />
363
+
364
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
365
+ Chip / Filled
366
+ </Typography>
367
+ {(["primary", "secondary"] as const).map((color) => (
368
+ <Stack key={color} spacing={1.5} sx={{ mb: 3 }}>
369
+ <Typography variant="body2" sx={{ color: "#666", textTransform: "capitalize" }}>
370
+ {color}
371
+ </Typography>
372
+ <Stack direction="row" spacing={2} alignItems="center">
373
+ <ChipFilled label="Chip" color={color} />
374
+ <ChipFilled label="Chip" color={color} selected />
375
+ <ChipFilled label="Chip" color={color} disabled />
376
+ </Stack>
377
+ <Stack direction="row" spacing={2} alignItems="center">
378
+ <ChipFilled label="Chip" color={color} deletable onDelete={() => {}} />
379
+ <ChipFilled label="Chip" color={color} selected deletable onDelete={() => {}} />
380
+ <ChipFilled label="Chip" color={color} disabled deletable onDelete={() => {}} />
381
+ </Stack>
382
+ </Stack>
383
+ ))}
384
+
385
+ <Divider sx={{ mb: 4 }} />
386
+
387
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
388
+ Chip / Outlined
389
+ </Typography>
390
+ {(["primary", "secondary"] as const).map((color) => (
391
+ <Stack key={color} spacing={1.5} sx={{ mb: 3 }}>
392
+ <Typography variant="body2" sx={{ color: "#666", textTransform: "capitalize" }}>
393
+ {color}
394
+ </Typography>
395
+ <Stack direction="row" spacing={2} alignItems="center">
396
+ <ChipOutlined label="Chip" color={color} />
397
+ <ChipOutlined label="Chip" color={color} selected />
398
+ <ChipOutlined label="Chip" color={color} disabled />
399
+ </Stack>
400
+ <Stack direction="row" spacing={2} alignItems="center">
401
+ <ChipOutlined label="Chip" color={color} deletable onDelete={() => {}} />
402
+ <ChipOutlined label="Chip" color={color} selected deletable onDelete={() => {}} />
403
+ <ChipOutlined label="Chip" color={color} disabled deletable onDelete={() => {}} />
404
+ </Stack>
405
+ </Stack>
406
+ ))}
407
+
408
+ <Divider sx={{ mb: 4 }} />
409
+
410
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
411
+ Chip / Status
412
+ </Typography>
413
+ <Stack direction="row" spacing={2} alignItems="center" flexWrap="wrap" useFlexGap>
414
+ <ChipStatus label="Chip" color="default" />
415
+ <ChipStatus label="Chip" color="default" icon />
416
+ <ChipStatus label="Chip" color="primary" />
417
+ <ChipStatus label="Chip" color="primary" icon />
418
+ <ChipStatus label="Chip" color="secondary" />
419
+ <ChipStatus label="Chip" color="secondary" icon />
420
+ </Stack>
421
+
422
+ <Divider sx={{ mb: 4 }} />
423
+
424
+ <Typography variant="h5" sx={{ mb: 3, fontWeight: 600 }}>
425
+ Chip / Status Outlined
426
+ </Typography>
427
+ <Stack direction="row" spacing={2} alignItems="center" flexWrap="wrap" useFlexGap>
428
+ <ChipStatusOutlined label="Chip" color="primary" />
429
+ <ChipStatusOutlined label="Chip" color="primary" icon />
430
+ <ChipStatusOutlined label="Chip" color="secondary" />
431
+ <ChipStatusOutlined label="Chip" color="secondary" icon />
432
+ </Stack>
433
+ </Box>
434
+ );
435
+ }
@@ -0,0 +1,37 @@
1
+ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2
+ import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
3
+ import { Button } from "@mui/material";
4
+
5
+ type ButtonContainedProps = {
6
+ label?: string;
7
+ icon?: "none" | "left" | "right";
8
+ disabled?: boolean;
9
+ onClick?: () => void;
10
+ };
11
+
12
+ export default function ButtonContained({
13
+ label = "Button",
14
+ icon = "none",
15
+ disabled = false,
16
+ onClick,
17
+ }: ButtonContainedProps) {
18
+ return (
19
+ <Button
20
+ variant="contained"
21
+ color="primary"
22
+ disabled={disabled}
23
+ onClick={onClick}
24
+ startIcon={icon === "left" ? <ArrowBackIcon sx={{ fontSize: "20px !important" }} /> : undefined}
25
+ endIcon={icon === "right" ? <ArrowForwardIcon sx={{ fontSize: "20px !important" }} /> : undefined}
26
+ disableElevation
27
+ sx={{
28
+ "& .MuiButton-startIcon, & .MuiButton-endIcon": {
29
+ margin: 0,
30
+ },
31
+ gap: icon !== "none" ? "6px" : 0,
32
+ }}
33
+ >
34
+ {label}
35
+ </Button>
36
+ );
37
+ }
@@ -0,0 +1,37 @@
1
+ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2
+ import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
3
+ import { Button } from "@mui/material";
4
+
5
+ type ButtonOutlinedProps = {
6
+ label?: string;
7
+ icon?: "none" | "left" | "right";
8
+ disabled?: boolean;
9
+ onClick?: () => void;
10
+ };
11
+
12
+ export default function ButtonOutlined({
13
+ label = "Button",
14
+ icon = "none",
15
+ disabled = false,
16
+ onClick,
17
+ }: ButtonOutlinedProps) {
18
+ return (
19
+ <Button
20
+ variant="outlined"
21
+ color="primary"
22
+ disabled={disabled}
23
+ onClick={onClick}
24
+ startIcon={icon === "left" ? <ArrowBackIcon sx={{ fontSize: "20px !important" }} /> : undefined}
25
+ endIcon={icon === "right" ? <ArrowForwardIcon sx={{ fontSize: "20px !important" }} /> : undefined}
26
+ disableElevation
27
+ sx={{
28
+ "& .MuiButton-startIcon, & .MuiButton-endIcon": {
29
+ margin: 0,
30
+ },
31
+ gap: icon !== "none" ? "6px" : 0,
32
+ }}
33
+ >
34
+ {label}
35
+ </Button>
36
+ );
37
+ }
@@ -0,0 +1,36 @@
1
+ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2
+ import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
3
+ import { Button } from "@mui/material";
4
+
5
+ type ButtonTextProps = {
6
+ label?: string;
7
+ icon?: "none" | "left" | "right";
8
+ disabled?: boolean;
9
+ onClick?: () => void;
10
+ };
11
+
12
+ export default function ButtonText({
13
+ label = "Button",
14
+ icon = "none",
15
+ disabled = false,
16
+ onClick,
17
+ }: ButtonTextProps) {
18
+ return (
19
+ <Button
20
+ variant="text"
21
+ color="primary"
22
+ disabled={disabled}
23
+ onClick={onClick}
24
+ startIcon={icon === "left" ? <ArrowBackIcon sx={{ fontSize: "20px !important" }} /> : undefined}
25
+ endIcon={icon === "right" ? <ArrowForwardIcon sx={{ fontSize: "20px !important" }} /> : undefined}
26
+ sx={{
27
+ "& .MuiButton-startIcon, & .MuiButton-endIcon": {
28
+ margin: 0,
29
+ },
30
+ gap: icon !== "none" ? "6px" : 0,
31
+ }}
32
+ >
33
+ {label}
34
+ </Button>
35
+ );
36
+ }
@@ -0,0 +1,3 @@
1
+ export { default as ButtonContained } from "./ButtonContained";
2
+ export { default as ButtonOutlined } from "./ButtonOutlined";
3
+ export { default as ButtonText } from "./ButtonText";
@@ -0,0 +1,41 @@
1
+ import { Checkbox as MuiCheckbox, FormControlLabel } from "@mui/material";
2
+
3
+ type CheckboxProps = {
4
+ label?: string;
5
+ checked?: boolean;
6
+ indeterminate?: boolean;
7
+ disabled?: boolean;
8
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
9
+ };
10
+
11
+ export default function Checkbox({
12
+ label,
13
+ checked = false,
14
+ indeterminate = false,
15
+ disabled = false,
16
+ onChange,
17
+ }: CheckboxProps) {
18
+ const checkbox = (
19
+ <MuiCheckbox
20
+ checked={checked}
21
+ indeterminate={indeterminate}
22
+ disabled={disabled}
23
+ onChange={onChange}
24
+ size="small"
25
+ color="primary"
26
+ />
27
+ );
28
+
29
+ if (label) {
30
+ return (
31
+ <FormControlLabel
32
+ control={checkbox}
33
+ label={label}
34
+ disabled={disabled}
35
+ sx={{ margin: 0, gap: 0 }}
36
+ />
37
+ );
38
+ }
39
+
40
+ return checkbox;
41
+ }
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from "./Checkbox";