@zimyo/ui 1.1.3 → 1.1.5

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/index.js ADDED
@@ -0,0 +1,652 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var material = require('@mui/material');
6
+ var MuiCardContent = require('@mui/material/CardContent');
7
+ var CardMedia = require('@mui/material/CardMedia');
8
+ var iconsMaterial = require('@mui/icons-material');
9
+ var styles = require('@mui/material/styles');
10
+
11
+ const Button = React.forwardRef(({ children, loading = false, loadingText, loaderSize = 18, loaderPosition = 'start', variant = 'contained', color = 'primary', size = 'medium', sx = {}, disabled, startIcon, endIcon, ...props }, ref) => {
12
+ material.useTheme();
13
+ const showStartSpinner = loading && loaderPosition === 'start';
14
+ const showEndSpinner = loading && loaderPosition === 'end';
15
+ const showCenterSpinner = loading && loaderPosition === 'center';
16
+ return (jsxRuntime.jsx(material.Button, { ref: ref, variant: variant, color: color, size: size, disabled: disabled || loading, startIcon: showStartSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : (startIcon), endIcon: showEndSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : (endIcon), sx: {
17
+ // borderRadius: theme.radius.sm,
18
+ fontWeight: 500,
19
+ textTransform: 'none',
20
+ letterSpacing: '0.5px',
21
+ px: size === 'small' ? 1.5 : size === 'large' ? 3 : 2,
22
+ py: size === 'small' ? 0.5 : size === 'large' ? 1.5 : 1,
23
+ position: 'relative',
24
+ ...sx,
25
+ }, ...props, children: showCenterSpinner ? (jsxRuntime.jsx(material.CircularProgress, { size: loaderSize, color: "inherit" })) : loading && loadingText ? (loadingText) : (children) }));
26
+ });
27
+ Button.displayName = 'Button';
28
+
29
+ const CardRoot = ({ children, sx = {}, elevation = 1, variant = 'elevated', ...props }) => {
30
+ const theme = material.useTheme();
31
+ return (jsxRuntime.jsx(material.Card, { elevation: variant === 'elevated' ? elevation : 0, variant: variant === 'outlined' ? 'outlined' : 'elevation', sx: {
32
+ borderRadius: theme.radius?.sm || 8,
33
+ border: variant === 'bordered' ? `1px solid ${theme.palette.divider}` : 'none',
34
+ overflow: 'hidden',
35
+ backgroundColor: theme.palette.background.paper,
36
+ ...sx,
37
+ }, ...props, children: children }));
38
+ };
39
+
40
+ const CardHeader = ({ title, subtitle, action, }) => (jsxRuntime.jsx(material.CardHeader, { title: typeof title === 'string' ? (jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, children: title })) : (title), subheader: typeof subtitle === 'string' ? (jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: subtitle })) : (subtitle), action: action }));
41
+
42
+ const CardContent = ({ children, sx }) => (jsxRuntime.jsx(MuiCardContent, { sx: sx, children: children }));
43
+
44
+ const CardActions = ({ children, sx }) => (jsxRuntime.jsx(material.CardActions, { sx: sx, children: children }));
45
+
46
+ const CardImage = ({ src, height = 160, alt = 'card image' }) => (jsxRuntime.jsx(CardMedia, { component: "img", height: height, image: src, alt: alt }));
47
+
48
+ const CardSkeleton = ({ lines = 3 }) => (jsxRuntime.jsxs(material.Box, { p: 2, children: [jsxRuntime.jsx(material.Skeleton, { variant: "rectangular", height: 140 }), [...Array(lines)].map((_, i) => (jsxRuntime.jsx(material.Skeleton, { variant: "text", height: 20, sx: { mt: 1 } }, i)))] }));
49
+
50
+ Object.assign(CardRoot, {
51
+ Header: CardHeader,
52
+ Content: CardContent,
53
+ Body: CardContent, // alias
54
+ Actions: CardActions,
55
+ Image: CardImage,
56
+ Skeleton: CardSkeleton,
57
+ });
58
+
59
+ const Select = React.forwardRef(({ label = '', options = [], value, onChange, error = false, helperText = '', required = false, placeholder = 'Select...', isMulti = false, disabled = false, ...rest }, ref) => {
60
+ material.useTheme();
61
+ const handleRemoveChip = (chipValue) => (e) => {
62
+ e.stopPropagation();
63
+ const newValue = value.filter((v) => v !== chipValue);
64
+ onChange?.({
65
+ target: {
66
+ name: rest.name,
67
+ value: newValue,
68
+ },
69
+ });
70
+ };
71
+ const renderValue = (selected) => {
72
+ if (isMulti && Array.isArray(selected)) {
73
+ return (jsxRuntime.jsx(material.Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 }, children: selected.map((val) => {
74
+ const label = options.find((o) => o.value === val)?.label || val;
75
+ return jsxRuntime.jsx(material.Box, { onMouseDown: (e) => e.stopPropagation(), children: jsxRuntime.jsx(material.Chip, { onDelete: handleRemoveChip(val), label: label, sx: { borderRadius: '12px' } }) }, val);
76
+ }) }));
77
+ }
78
+ return options.find((o) => o.value === selected)?.label || placeholder;
79
+ };
80
+ const handleClearSelection = (e) => {
81
+ e.stopPropagation();
82
+ const emptyValue = isMulti ? [] : '';
83
+ onChange?.({
84
+ target: {
85
+ name: rest.name,
86
+ value: emptyValue,
87
+ },
88
+ });
89
+ };
90
+ return (jsxRuntime.jsxs(material.FormControl, { fullWidth: true, error: error, disabled: disabled, sx: {
91
+ '& .MuiOutlinedInput-root': {
92
+ borderRadius: '8px',
93
+ minHeight: '44px',
94
+ // backgroundColor: theme.palette.background.paper,
95
+ fontSize: '14px'
96
+ },
97
+ '& .MuiSelect-select': {
98
+ fontSize: '14px',
99
+ padding: '10px 14px',
100
+ },
101
+ '& .MuiSelect-placeholder': {
102
+ fontSize: '14px',
103
+ },
104
+ '& .MuiMenuItem-root': {
105
+ fontSize: '14px',
106
+ },
107
+ '& .MuiChip-label': {
108
+ fontSize: '14px',
109
+ },
110
+ }, children: [jsxRuntime.jsx(material.Select, { displayEmpty: true,
111
+ // labelId={labelId}
112
+ multiple: isMulti, value: value || (isMulti ? [] : ''), onChange: onChange, input: jsxRuntime.jsx(material.OutlinedInput, { label: label }), renderValue: renderValue, ref: ref, IconComponent: iconsMaterial.ExpandMore, endAdornment: value && !isMulti && ((isMulti && value.length > 0) || (!isMulti && value !== '')) ? (jsxRuntime.jsx(material.IconButton, { sx: { marginRight: '1rem' }, size: "small", onClick: handleClearSelection, children: jsxRuntime.jsx(iconsMaterial.Clear, { fontSize: "small" }) })) : null, variant: "outlined", ...rest, children: options && options.map((option) => (jsxRuntime.jsx(material.MenuItem, { value: option.value, children: isMulti ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(material.ListItemText, { primary: option.label }) })) : (option.label || placeholder) }, option.value))) }), helperText && jsxRuntime.jsx(material.FormHelperText, { children: helperText })] }));
113
+ });
114
+
115
+ const AccordionContext = React.createContext({});
116
+ // Main Accordion Container Component
117
+ const Accordion = React.forwardRef(({ type = 'single', collapsible = false, value: controlledValue, defaultValue, onValueChange, children, sx = {}, ...props }, ref) => {
118
+ const theme = material.useTheme();
119
+ // Internal state management
120
+ const [internalValue, setInternalValue] = React.useState(() => {
121
+ if (controlledValue !== undefined)
122
+ return controlledValue;
123
+ if (defaultValue !== undefined)
124
+ return defaultValue;
125
+ return type === 'multiple' ? [] : '';
126
+ });
127
+ const value = controlledValue !== undefined ? controlledValue : internalValue;
128
+ const handleValueChange = React.useCallback((newValue) => {
129
+ if (controlledValue === undefined) {
130
+ setInternalValue(newValue);
131
+ }
132
+ onValueChange?.(newValue);
133
+ }, [controlledValue, onValueChange]);
134
+ const contextValue = React.useMemo(() => ({
135
+ type,
136
+ collapsible,
137
+ value,
138
+ defaultValue,
139
+ onValueChange: handleValueChange,
140
+ }), [type, collapsible, value, defaultValue, handleValueChange]);
141
+ return (jsxRuntime.jsx(AccordionContext.Provider, { value: contextValue, children: jsxRuntime.jsx("div", { ref: ref, style: {
142
+ display: 'flex',
143
+ flexDirection: 'column',
144
+ gap: theme.spacing(1),
145
+ }, ...props, children: children }) }));
146
+ });
147
+ // AccordionItem Component
148
+ const AccordionItem = React.forwardRef(({ value: itemValue, children, sx = {}, ...props }, ref) => {
149
+ const theme = material.useTheme();
150
+ const context = React.useContext(AccordionContext);
151
+ const isExpanded = React.useMemo(() => {
152
+ if (context.type === 'multiple') {
153
+ return Array.isArray(context.value) && context.value.includes(itemValue);
154
+ }
155
+ return context.value === itemValue;
156
+ }, [context.value, context.type, itemValue]);
157
+ const handleChange = React.useCallback(() => {
158
+ if (!context.onValueChange)
159
+ return;
160
+ if (context.type === 'multiple') {
161
+ const currentValue = Array.isArray(context.value) ? context.value : [];
162
+ const newValue = isExpanded
163
+ ? currentValue.filter(v => v !== itemValue)
164
+ : [...currentValue, itemValue];
165
+ context.onValueChange(newValue);
166
+ }
167
+ else {
168
+ const newValue = isExpanded && context.collapsible ? '' : itemValue;
169
+ context.onValueChange(newValue);
170
+ }
171
+ }, [context, itemValue, isExpanded]);
172
+ return (jsxRuntime.jsx(material.Accordion, { ref: ref, expanded: isExpanded, onChange: handleChange, variant: "outlined", sx: {
173
+ borderRadius: theme.radius?.sm || theme.shape.borderRadius,
174
+ '&:before': {
175
+ display: 'none',
176
+ },
177
+ '&.Mui-expanded': {
178
+ margin: 0,
179
+ },
180
+ border: `1px solid ${theme.palette.divider}`,
181
+ ...sx,
182
+ }, ...props, children: children }));
183
+ });
184
+ // AccordionTrigger Component
185
+ const AccordionTrigger = React.forwardRef(({ children, sx = {}, expandIcon, ...props }, ref) => {
186
+ const theme = material.useTheme();
187
+ const defaultExpandIcon = expandIcon !== undefined ? expandIcon : jsxRuntime.jsx(iconsMaterial.ExpandMore, {});
188
+ return (jsxRuntime.jsx(material.AccordionSummary, { ref: ref, expandIcon: defaultExpandIcon, sx: {
189
+ borderRadius: theme.radius?.sm || theme.shape.borderRadius,
190
+ minHeight: 56,
191
+ fontWeight: 500,
192
+ '&.Mui-expanded': {
193
+ minHeight: 56,
194
+ borderBottomLeftRadius: 0,
195
+ borderBottomRightRadius: 0,
196
+ borderBottom: `1px solid ${theme.palette.divider}`,
197
+ },
198
+ '& .MuiAccordionSummary-content': {
199
+ margin: '12px 0',
200
+ '&.Mui-expanded': {
201
+ margin: '12px 0',
202
+ },
203
+ },
204
+ '& .MuiAccordionSummary-expandIconWrapper': {
205
+ transition: theme.transitions.create('transform', {
206
+ duration: theme.transitions.duration.shortest,
207
+ }),
208
+ '&.Mui-expanded': {
209
+ transform: 'rotate(180deg)',
210
+ },
211
+ },
212
+ '&:hover': {
213
+ backgroundColor: theme.palette.action.hover,
214
+ },
215
+ ...sx,
216
+ }, ...props, children: children }));
217
+ });
218
+ // AccordionContent Component
219
+ const AccordionContent = React.forwardRef(({ children, sx = {}, ...props }, ref) => {
220
+ const theme = material.useTheme();
221
+ return (jsxRuntime.jsx(material.AccordionDetails, { ref: ref, sx: {
222
+ padding: theme.spacing(2),
223
+ borderBottomLeftRadius: theme.radius?.sm || theme.shape.borderRadius,
224
+ borderBottomRightRadius: theme.radius?.sm || theme.shape.borderRadius,
225
+ ...sx,
226
+ }, ...props, children: children }));
227
+ });
228
+
229
+ const Switch = React.forwardRef(({ label = '', helperText = '', error = false, onChange, checked, required = false, disabled = false, ...rest }, ref) => {
230
+ return (jsxRuntime.jsxs(material.FormControl, { error: error, disabled: disabled, component: "fieldset", children: [jsxRuntime.jsx(material.FormControlLabel, { control: jsxRuntime.jsx(material.Switch, { inputRef: ref, checked: checked, onChange: (e, checked) => onChange?.(e, checked), disabled: disabled, required: required == 1 || required === true ? true : false, ...rest }), label: label }), helperText && jsxRuntime.jsx(material.FormHelperText, { children: helperText })] }));
231
+ });
232
+
233
+ const TextInput = React.forwardRef(({ label = '', placeholder, IS_MANDATORY = false,
234
+ // multiline = false,
235
+ startIcon, endIcon, error = false, helperText, type = 'text', variant = 'outlined', ...rest }, ref) => {
236
+ return (jsxRuntime.jsx(material.TextField, { fullWidth: true, inputRef: ref, type: type,
237
+ // multiline={multiline}
238
+ label: label, placeholder: placeholder, required: (IS_MANDATORY == 1 || IS_MANDATORY == true) ? true : false, error: error, InputLabelProps: !label ? { shrink: false } : undefined, sx: {
239
+ '& .MuiInputLabel-outlined': {
240
+ top: '-4px',
241
+ fontSize: '13px',
242
+ fontWeight: 500,
243
+ },
244
+ '& .MuiOutlinedInput-root': {
245
+ minHeight: '44px',
246
+ borderRadius: '10px',
247
+ },
248
+ '& input': {
249
+ padding: '10.5px 14px',
250
+ },
251
+ '& input::placeholder': {
252
+ fontSize: '13px',
253
+ opacity: 0.5,
254
+ },
255
+ }, helperText: helperText, InputProps: {
256
+ startAdornment: startIcon ? (jsxRuntime.jsx(material.InputAdornment, { position: "start", children: startIcon })) : undefined,
257
+ endAdornment: endIcon ? (jsxRuntime.jsx(material.InputAdornment, { position: "end", children: endIcon })) : undefined,
258
+ }, variant: variant, ...rest }));
259
+ });
260
+
261
+ const RadioGroup = React.forwardRef(({ label, options = [], value, defaultValue, onChange, name, disabled = false, required = false, error = false, helperText, row = false, size = 'medium', color = 'primary', sx = {}, radioSx = {}, labelSx = {}, ...props }, ref) => {
262
+ const theme = material.useTheme();
263
+ const [internalValue, setInternalValue] = React.useState(value || defaultValue || '');
264
+ // Sync with external value prop
265
+ React.useEffect(() => {
266
+ if (value !== undefined) {
267
+ setInternalValue(value);
268
+ }
269
+ }, [value]);
270
+ const handleChange = (event) => {
271
+ const newValue = event.target.value;
272
+ if (value === undefined) {
273
+ setInternalValue(newValue);
274
+ }
275
+ onChange?.(newValue);
276
+ };
277
+ const currentValue = value !== undefined ? value : internalValue;
278
+ return (jsxRuntime.jsxs(material.FormControl, { ref: ref, component: "fieldset", variant: "standard", disabled: disabled, required: required, error: error, sx: {
279
+ borderRadius: '8px',
280
+ ...sx,
281
+ }, ...props, children: [label && (jsxRuntime.jsxs(material.FormLabel, { component: "legend", sx: {
282
+ fontWeight: 500,
283
+ fontSize: size === 'small' ? '0.875rem' : '1rem',
284
+ color: disabled
285
+ ? theme.palette.text.disabled
286
+ : error
287
+ ? theme.palette.error.main
288
+ : theme.palette.text.primary,
289
+ '&.Mui-focused': {
290
+ color: error
291
+ ? theme.palette.error.main
292
+ : `${theme.palette[color].main}`,
293
+ },
294
+ mb: 1,
295
+ ...labelSx,
296
+ }, children: [label, required && (jsxRuntime.jsx(material.Typography, { component: "span", sx: {
297
+ color: theme.palette.error.main,
298
+ ml: 0.5,
299
+ fontSize: 'inherit',
300
+ }, children: "*" }))] })), jsxRuntime.jsx(material.RadioGroup, { name: name, value: currentValue, onChange: handleChange, row: row, sx: {
301
+ gap: size === 'small' ? 1 : 1.5,
302
+ '& .MuiFormControlLabel-root': {
303
+ marginLeft: 0,
304
+ marginRight: row ? 2 : 0,
305
+ },
306
+ }, children: options.map((option) => (jsxRuntime.jsx(material.Box, { children: jsxRuntime.jsx(material.FormControlLabel, { value: option.value, disabled: disabled || option.disabled, control: jsxRuntime.jsx(material.Radio, { size: size, color: color, sx: {
307
+ '&.Mui-checked': {
308
+ color: error
309
+ ? theme.palette.error.main
310
+ : `${theme.palette[color].main}`,
311
+ },
312
+ alignSelf: option.description ? 'flex-start' : 'center',
313
+ mt: option.description ? 0.25 : 0,
314
+ ...radioSx,
315
+ } }), label: jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', flexDirection: 'column' }, children: [jsxRuntime.jsx(material.Typography, { variant: size === 'small' ? 'body2' : 'body1', sx: {
316
+ fontWeight: 400,
317
+ color: disabled || option.disabled
318
+ ? theme.palette.text.disabled
319
+ : theme.palette.text.primary,
320
+ lineHeight: 1.5,
321
+ }, children: option.label }), option.description && (jsxRuntime.jsx(material.Typography, { variant: "caption", sx: {
322
+ color: disabled || option.disabled
323
+ ? theme.palette.text.disabled
324
+ : theme.palette.text.secondary,
325
+ mt: 0.25,
326
+ lineHeight: 1.4,
327
+ }, children: option.description }))] }), sx: {
328
+ alignItems: option.description ? 'flex-start' : 'center',
329
+ margin: 0,
330
+ display: 'flex',
331
+ '& .MuiFormControlLabel-label': {
332
+ ml: 1,
333
+ flex: 1,
334
+ },
335
+ '& .MuiButtonBase-root': {
336
+ p: size === 'small' ? 0.5 : 1,
337
+ },
338
+ } }) }, option.value))) }), helperText && (jsxRuntime.jsx(material.FormHelperText, { sx: {
339
+ mt: 1,
340
+ fontSize: size === 'small' ? '0.75rem' : '0.875rem',
341
+ color: error
342
+ ? theme.palette.error.main
343
+ : theme.palette.text.secondary,
344
+ }, children: helperText }))] }));
345
+ });
346
+
347
+ const Heading = ({ level = 1, ...props }) => {
348
+ const variant = `h${level}`;
349
+ return (jsxRuntime.jsx(material.Typography, { variant: variant, component: props.component || `h${level}`, fontWeight: 600, gutterBottom: true, ...props }));
350
+ };
351
+
352
+ const Text = ({ size = 'md', ...props }) => {
353
+ const variantMap = {
354
+ sm: 'body2',
355
+ md: 'body1',
356
+ lg: 'subtitle1',
357
+ };
358
+ return (jsxRuntime.jsx(material.Typography, { variant: variantMap[size], component: props.component || 'p', ...props }));
359
+ };
360
+
361
+ const Lead = (props) => {
362
+ return (jsxRuntime.jsx(material.Typography, { variant: "subtitle1", component: props.component || 'p', fontWeight: 400, color: "text.secondary", ...props }));
363
+ };
364
+
365
+ const Muted = (props) => {
366
+ return (jsxRuntime.jsx(material.Typography, { variant: "body2", component: props.component || 'span', color: "text.disabled", ...props }));
367
+ };
368
+
369
+ const Strong = (props) => {
370
+ return (jsxRuntime.jsx(material.Typography, { component: props.component || 'strong', fontWeight: 500, display: "inline", ...props }));
371
+ };
372
+
373
+ const Caption = (props) => {
374
+ return (jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", component: props.component || 'span', ...props }));
375
+ };
376
+
377
+ const Blockquote = (props) => {
378
+ return (jsxRuntime.jsx(material.Typography, { component: "blockquote", sx: {
379
+ borderLeft: '4px solid',
380
+ borderColor: 'divider',
381
+ pl: 2,
382
+ color: 'text.secondary',
383
+ fontStyle: 'italic',
384
+ }, ...props }));
385
+ };
386
+
387
+ const Code = ({ children, sx }) => {
388
+ return (jsxRuntime.jsx(material.Box, { component: "code", sx: {
389
+ fontFamily: 'monospace',
390
+ backgroundColor: 'grey.100',
391
+ color: 'primary.main',
392
+ px: 0.5,
393
+ py: 0.25,
394
+ borderRadius: 1,
395
+ fontSize: '0.875rem',
396
+ ...sx,
397
+ }, children: children }));
398
+ };
399
+
400
+ const designTokens = {
401
+ colors: {
402
+ primary: {
403
+ 50: '#e3f2fd',
404
+ 100: '#bbdefb',
405
+ 500: '#2196f3',
406
+ 900: '#0d47a1',
407
+ },
408
+ secondary: {
409
+ 50: '#fce4ec',
410
+ 100: '#f8bbd9',
411
+ 500: '#e91e63',
412
+ 900: '#880e4f',
413
+ },
414
+ neutral: {
415
+ 50: '#fafafa',
416
+ 100: '#f5f5f5',
417
+ 200: '#eeeeee',
418
+ 500: '#9e9e9e',
419
+ 900: '#212121',
420
+ },
421
+ },
422
+ spacing: {
423
+ xs: '4px',
424
+ sm: '8px',
425
+ md: '16px',
426
+ lg: '24px',
427
+ xl: '32px',
428
+ },
429
+ radius: {
430
+ xs: "2px",
431
+ sm: '4px',
432
+ md: '8px',
433
+ lg: '12px',
434
+ xl: '16px',
435
+ full: '9999px',
436
+ },
437
+ typography: {
438
+ fontFamily: `'Inter', system-ui, sans-serif`,
439
+ fontSize: {
440
+ xs: '0.75rem',
441
+ sm: '0.875rem',
442
+ md: '1rem',
443
+ lg: '1.25rem',
444
+ xl: '1.5rem',
445
+ },
446
+ },
447
+ };
448
+
449
+ const createCustomTheme = (config = {}) => {
450
+ const { primaryColor = designTokens.colors.primary[500], secondaryColor = designTokens.colors.secondary[500], } = config;
451
+ return styles.createTheme({
452
+ palette: {
453
+ primary: {
454
+ main: primaryColor,
455
+ },
456
+ secondary: {
457
+ main: secondaryColor,
458
+ },
459
+ divider: '#e5e5e5'
460
+ },
461
+ typography: {
462
+ fontFamily: designTokens.typography.fontFamily,
463
+ fontSize: 14,
464
+ h1: {
465
+ fontSize: '3rem', // 48px
466
+ fontWeight: 700,
467
+ lineHeight: 1.2,
468
+ },
469
+ h2: {
470
+ fontSize: '2.25rem', // 36px
471
+ fontWeight: 600,
472
+ lineHeight: 1.25,
473
+ },
474
+ h3: {
475
+ fontSize: '1.875rem', // 30px
476
+ fontWeight: 600,
477
+ lineHeight: 1.3,
478
+ },
479
+ h4: {
480
+ fontSize: '1.5rem', // 24px
481
+ fontWeight: 500,
482
+ lineHeight: 1.35,
483
+ },
484
+ h5: {
485
+ fontSize: '1.25rem', // 20px
486
+ fontWeight: 500,
487
+ lineHeight: 1.4,
488
+ },
489
+ h6: {
490
+ fontSize: '1rem', // 16px
491
+ fontWeight: 500,
492
+ lineHeight: 1.5,
493
+ },
494
+ body1: {
495
+ fontSize: '1rem', // 16px
496
+ lineHeight: '1.625rem', // 26px
497
+ },
498
+ body2: {
499
+ fontSize: '0.875rem', // 14px
500
+ lineHeight: '1.5rem', // 24px
501
+ },
502
+ caption: {
503
+ fontSize: '0.875rem',
504
+ lineHeight: '1.25rem', // 20px
505
+ },
506
+ button: {
507
+ fontSize: '0.875rem',
508
+ lineHeight: '1.5rem',
509
+ textTransform: 'none',
510
+ },
511
+ subtitle1: {
512
+ fontSize: '1rem', // 16px
513
+ lineHeight: '1.5rem', // 24px
514
+ // fontWeight: 500
515
+ },
516
+ },
517
+ spacing: 8,
518
+ shape: {
519
+ borderRadius: 8,
520
+ },
521
+ radius: designTokens.radius,
522
+ components: {
523
+ MuiButton: {
524
+ styleOverrides: {
525
+ root: {
526
+ textTransform: 'none',
527
+ borderRadius: designTokens.radius.md,
528
+ // fontWeight: 600,
529
+ letterSpacing: '0.5px',
530
+ padding: '6px 12px',
531
+ },
532
+ sizeSmall: {
533
+ padding: '4px 12px',
534
+ // fontSize: '0.875rem',
535
+ },
536
+ sizeLarge: {
537
+ padding: '12px 24px',
538
+ // fontSize: '1rem',
539
+ },
540
+ },
541
+ defaultProps: {
542
+ disableElevation: true
543
+ }
544
+ },
545
+ MuiCard: {
546
+ styleOverrides: {
547
+ root: {
548
+ borderRadius: '12px',
549
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
550
+ },
551
+ },
552
+ },
553
+ MuiTextField: {
554
+ styleOverrides: {
555
+ root: {
556
+ '& .MuiOutlinedInput-root': {
557
+ borderRadius: '8px',
558
+ },
559
+ },
560
+ },
561
+ },
562
+ },
563
+ });
564
+ };
565
+ // Default theme
566
+ const theme = createCustomTheme();
567
+
568
+ function styleInject(css, ref) {
569
+ if ( ref === void 0 ) ref = {};
570
+ var insertAt = ref.insertAt;
571
+
572
+ if (!css || typeof document === 'undefined') { return; }
573
+
574
+ var head = document.head || document.getElementsByTagName('head')[0];
575
+ var style = document.createElement('style');
576
+ style.type = 'text/css';
577
+
578
+ if (insertAt === 'top') {
579
+ if (head.firstChild) {
580
+ head.insertBefore(style, head.firstChild);
581
+ } else {
582
+ head.appendChild(style);
583
+ }
584
+ } else {
585
+ head.appendChild(style);
586
+ }
587
+
588
+ if (style.styleSheet) {
589
+ style.styleSheet.cssText = css;
590
+ } else {
591
+ style.appendChild(document.createTextNode(css));
592
+ }
593
+ }
594
+
595
+ var css_248z$4 = "/* inter-cyrillic-ext-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-cyrillic-ext-300-normal.woff2) format('woff2'), url(./files/inter-cyrillic-ext-300-normal.woff) format('woff');\n unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;\n}\n\n/* inter-cyrillic-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-cyrillic-300-normal.woff2) format('woff2'), url(./files/inter-cyrillic-300-normal.woff) format('woff');\n unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;\n}\n\n/* inter-greek-ext-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-greek-ext-300-normal.woff2) format('woff2'), url(./files/inter-greek-ext-300-normal.woff) format('woff');\n unicode-range: U+1F00-1FFF;\n}\n\n/* inter-greek-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-greek-300-normal.woff2) format('woff2'), url(./files/inter-greek-300-normal.woff) format('woff');\n unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;\n}\n\n/* inter-vietnamese-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-vietnamese-300-normal.woff2) format('woff2'), url(./files/inter-vietnamese-300-normal.woff) format('woff');\n unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;\n}\n\n/* inter-latin-ext-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-latin-ext-300-normal.woff2) format('woff2'), url(./files/inter-latin-ext-300-normal.woff) format('woff');\n unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;\n}\n\n/* inter-latin-300-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src: url(./files/inter-latin-300-normal.woff2) format('woff2'), url(./files/inter-latin-300-normal.woff) format('woff');\n unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;\n}";
596
+ styleInject(css_248z$4);
597
+
598
+ var css_248z$3 = "/* inter-cyrillic-ext-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-cyrillic-ext-400-normal.woff2) format('woff2'), url(./files/inter-cyrillic-ext-400-normal.woff) format('woff');\n unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;\n}\n\n/* inter-cyrillic-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-cyrillic-400-normal.woff2) format('woff2'), url(./files/inter-cyrillic-400-normal.woff) format('woff');\n unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;\n}\n\n/* inter-greek-ext-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-greek-ext-400-normal.woff2) format('woff2'), url(./files/inter-greek-ext-400-normal.woff) format('woff');\n unicode-range: U+1F00-1FFF;\n}\n\n/* inter-greek-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-greek-400-normal.woff2) format('woff2'), url(./files/inter-greek-400-normal.woff) format('woff');\n unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;\n}\n\n/* inter-vietnamese-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-vietnamese-400-normal.woff2) format('woff2'), url(./files/inter-vietnamese-400-normal.woff) format('woff');\n unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;\n}\n\n/* inter-latin-ext-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-latin-ext-400-normal.woff2) format('woff2'), url(./files/inter-latin-ext-400-normal.woff) format('woff');\n unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;\n}\n\n/* inter-latin-400-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src: url(./files/inter-latin-400-normal.woff2) format('woff2'), url(./files/inter-latin-400-normal.woff) format('woff');\n unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;\n}";
599
+ styleInject(css_248z$3);
600
+
601
+ var css_248z$2 = "/* inter-cyrillic-ext-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-cyrillic-ext-500-normal.woff2) format('woff2'), url(./files/inter-cyrillic-ext-500-normal.woff) format('woff');\n unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;\n}\n\n/* inter-cyrillic-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-cyrillic-500-normal.woff2) format('woff2'), url(./files/inter-cyrillic-500-normal.woff) format('woff');\n unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;\n}\n\n/* inter-greek-ext-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-greek-ext-500-normal.woff2) format('woff2'), url(./files/inter-greek-ext-500-normal.woff) format('woff');\n unicode-range: U+1F00-1FFF;\n}\n\n/* inter-greek-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-greek-500-normal.woff2) format('woff2'), url(./files/inter-greek-500-normal.woff) format('woff');\n unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;\n}\n\n/* inter-vietnamese-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-vietnamese-500-normal.woff2) format('woff2'), url(./files/inter-vietnamese-500-normal.woff) format('woff');\n unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;\n}\n\n/* inter-latin-ext-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-latin-ext-500-normal.woff2) format('woff2'), url(./files/inter-latin-ext-500-normal.woff) format('woff');\n unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;\n}\n\n/* inter-latin-500-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src: url(./files/inter-latin-500-normal.woff2) format('woff2'), url(./files/inter-latin-500-normal.woff) format('woff');\n unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;\n}";
602
+ styleInject(css_248z$2);
603
+
604
+ var css_248z$1 = "/* inter-cyrillic-ext-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-cyrillic-ext-600-normal.woff2) format('woff2'), url(./files/inter-cyrillic-ext-600-normal.woff) format('woff');\n unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;\n}\n\n/* inter-cyrillic-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-cyrillic-600-normal.woff2) format('woff2'), url(./files/inter-cyrillic-600-normal.woff) format('woff');\n unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;\n}\n\n/* inter-greek-ext-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-greek-ext-600-normal.woff2) format('woff2'), url(./files/inter-greek-ext-600-normal.woff) format('woff');\n unicode-range: U+1F00-1FFF;\n}\n\n/* inter-greek-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-greek-600-normal.woff2) format('woff2'), url(./files/inter-greek-600-normal.woff) format('woff');\n unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;\n}\n\n/* inter-vietnamese-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-vietnamese-600-normal.woff2) format('woff2'), url(./files/inter-vietnamese-600-normal.woff) format('woff');\n unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;\n}\n\n/* inter-latin-ext-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-latin-ext-600-normal.woff2) format('woff2'), url(./files/inter-latin-ext-600-normal.woff) format('woff');\n unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;\n}\n\n/* inter-latin-600-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 600;\n src: url(./files/inter-latin-600-normal.woff2) format('woff2'), url(./files/inter-latin-600-normal.woff) format('woff');\n unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;\n}";
605
+ styleInject(css_248z$1);
606
+
607
+ var css_248z = "/* inter-cyrillic-ext-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-cyrillic-ext-700-normal.woff2) format('woff2'), url(./files/inter-cyrillic-ext-700-normal.woff) format('woff');\n unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;\n}\n\n/* inter-cyrillic-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-cyrillic-700-normal.woff2) format('woff2'), url(./files/inter-cyrillic-700-normal.woff) format('woff');\n unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;\n}\n\n/* inter-greek-ext-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-greek-ext-700-normal.woff2) format('woff2'), url(./files/inter-greek-ext-700-normal.woff) format('woff');\n unicode-range: U+1F00-1FFF;\n}\n\n/* inter-greek-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-greek-700-normal.woff2) format('woff2'), url(./files/inter-greek-700-normal.woff) format('woff');\n unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;\n}\n\n/* inter-vietnamese-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-vietnamese-700-normal.woff2) format('woff2'), url(./files/inter-vietnamese-700-normal.woff) format('woff');\n unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;\n}\n\n/* inter-latin-ext-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-latin-ext-700-normal.woff2) format('woff2'), url(./files/inter-latin-ext-700-normal.woff) format('woff');\n unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;\n}\n\n/* inter-latin-700-normal */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src: url(./files/inter-latin-700-normal.woff2) format('woff2'), url(./files/inter-latin-700-normal.woff) format('woff');\n unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;\n}";
608
+ styleInject(css_248z);
609
+
610
+ const Fonts = () => (jsxRuntime.jsx(material.GlobalStyles, { styles: {
611
+ body: {
612
+ WebkitFontSmoothing: 'antialiased',
613
+ MozOsxFontSmoothing: 'grayscale',
614
+ },
615
+ html: {
616
+ fontFamily: "'Inter', system-ui, sans-serif",
617
+ },
618
+ } }));
619
+
620
+ const UILibraryThemeProvider = ({ children, primaryColor, secondaryColor, enableCssBaseline = true, }) => {
621
+ const themeConfig = {};
622
+ if (primaryColor) {
623
+ themeConfig.primaryColor = primaryColor;
624
+ }
625
+ if (secondaryColor) {
626
+ themeConfig.secondaryColor = secondaryColor;
627
+ }
628
+ const theme = createCustomTheme(themeConfig);
629
+ return (jsxRuntime.jsxs(styles.ThemeProvider, { theme: theme, children: [enableCssBaseline && jsxRuntime.jsx(material.CssBaseline, {}), jsxRuntime.jsx(Fonts, {}), children] }));
630
+ };
631
+
632
+ exports.Accordion = Accordion;
633
+ exports.AccordionContent = AccordionContent;
634
+ exports.AccordionItem = AccordionItem;
635
+ exports.AccordionTrigger = AccordionTrigger;
636
+ exports.Blockquote = Blockquote;
637
+ exports.Button = Button;
638
+ exports.Caption = Caption;
639
+ exports.Code = Code;
640
+ exports.Heading = Heading;
641
+ exports.Lead = Lead;
642
+ exports.Muted = Muted;
643
+ exports.RadioGroup = RadioGroup;
644
+ exports.Select = Select;
645
+ exports.Strong = Strong;
646
+ exports.Switch = Switch;
647
+ exports.Text = Text;
648
+ exports.TextInput = TextInput;
649
+ exports.UILibraryThemeProvider = UILibraryThemeProvider;
650
+ exports.createCustomTheme = createCustomTheme;
651
+ exports.designTokens = designTokens;
652
+ exports.theme = theme;