mainbase-ui 1.2.4 → 1.2.5-b
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 +22 -266
- package/dist/index.cjs +148 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +97 -49
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +145 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,279 +1,35 @@
|
|
|
1
1
|
# Mainbase UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React component library built with React and TypeScript.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
CSS variables, and typed component APIs for building web applications.
|
|
5
|
+
Mainbase UI provides reusable interface components, a customizable theme system, CSS variables, and fully typed component APIs for building modern web applications.
|
|
7
6
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
- React 18 or higher
|
|
11
|
-
- React DOM 18 or higher
|
|
12
|
-
- TypeScript 5 or higher (recommended)
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
Install the package using npm:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install mainbase-ui
|
|
20
|
-
|
|
21
|
-
or using pnpm:
|
|
22
|
-
|
|
23
|
-
pnpm add mainbase-ui
|
|
24
|
-
|
|
25
|
-
or using yarn:
|
|
26
|
-
|
|
27
|
-
yarn add mainbase-ui
|
|
28
|
-
Basic Usage
|
|
29
|
-
|
|
30
|
-
Import the global styles:
|
|
31
|
-
|
|
32
|
-
import "mainbase-ui/styles.css";
|
|
33
|
-
|
|
34
|
-
Import required components:
|
|
35
|
-
|
|
36
|
-
import {
|
|
37
|
-
MainbaseProvider,
|
|
38
|
-
Button,
|
|
39
|
-
} from "mainbase-ui";
|
|
40
|
-
|
|
41
|
-
Example:
|
|
42
|
-
|
|
43
|
-
export default function App() {
|
|
44
|
-
return (
|
|
45
|
-
<MainbaseProvider>
|
|
46
|
-
<Button>
|
|
47
|
-
Click me
|
|
48
|
-
</Button>
|
|
49
|
-
</MainbaseProvider>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
MainbaseProvider
|
|
53
|
-
|
|
54
|
-
MainbaseProvider is the root configuration component.
|
|
55
|
-
|
|
56
|
-
It provides:
|
|
57
|
-
|
|
58
|
-
theme configuration;
|
|
59
|
-
component default values;
|
|
60
|
-
design tokens;
|
|
61
|
-
CSS variables.
|
|
62
|
-
|
|
63
|
-
Example:
|
|
64
|
-
|
|
65
|
-
<MainbaseProvider
|
|
66
|
-
theme={{
|
|
67
|
-
colors: {
|
|
68
|
-
primary: "#ff8a1f",
|
|
69
|
-
primaryHover: "#f47c0f",
|
|
70
|
-
primaryActive: "#dd6d06",
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
radii: {
|
|
74
|
-
sm: 4,
|
|
75
|
-
md: 4,
|
|
76
|
-
lg: 4,
|
|
77
|
-
xl: 4,
|
|
78
|
-
full: 999,
|
|
79
|
-
},
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<App />
|
|
83
|
-
</MainbaseProvider>
|
|
84
|
-
Theme Configuration
|
|
85
|
-
|
|
86
|
-
The theme system allows changing global interface values.
|
|
87
|
-
|
|
88
|
-
Supported theme sections:
|
|
89
|
-
|
|
90
|
-
colors;
|
|
91
|
-
typography;
|
|
92
|
-
radii;
|
|
93
|
-
spacing;
|
|
94
|
-
shadows;
|
|
95
|
-
transitions;
|
|
96
|
-
z-index;
|
|
97
|
-
component defaults.
|
|
98
|
-
|
|
99
|
-
Example:
|
|
7
|
+
## Features
|
|
100
8
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
9
|
+
- React 18+ support
|
|
10
|
+
- TypeScript-first API
|
|
11
|
+
- Customizable theme system
|
|
12
|
+
- Design tokens
|
|
13
|
+
- Reusable UI components
|
|
14
|
+
- CSS variables support
|
|
15
|
+
- Accessibility support
|
|
16
|
+
- Tree-shakable component exports
|
|
107
17
|
|
|
108
|
-
|
|
109
|
-
primary: "#2563eb",
|
|
110
|
-
},
|
|
111
|
-
}}
|
|
112
|
-
>
|
|
113
|
-
<App />
|
|
114
|
-
</MainbaseProvider>
|
|
115
|
-
Colors
|
|
18
|
+
---
|
|
116
19
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
colors: {
|
|
120
|
-
primary,
|
|
121
|
-
primaryHover,
|
|
122
|
-
primaryActive,
|
|
123
|
-
|
|
124
|
-
text,
|
|
125
|
-
textSecondary,
|
|
126
|
-
textMuted,
|
|
127
|
-
|
|
128
|
-
background,
|
|
129
|
-
backgroundSecondary,
|
|
130
|
-
|
|
131
|
-
border,
|
|
132
|
-
borderHover,
|
|
133
|
-
|
|
134
|
-
success,
|
|
135
|
-
warning,
|
|
136
|
-
danger,
|
|
137
|
-
info
|
|
138
|
-
}
|
|
139
|
-
Border Radius
|
|
140
|
-
|
|
141
|
-
Global component radius can be configured:
|
|
142
|
-
|
|
143
|
-
<MainbaseProvider
|
|
144
|
-
theme={{
|
|
145
|
-
radii: {
|
|
146
|
-
sm: 4,
|
|
147
|
-
md: 4,
|
|
148
|
-
lg: 4,
|
|
149
|
-
xl: 4,
|
|
150
|
-
full: 999,
|
|
151
|
-
},
|
|
152
|
-
}}
|
|
153
|
-
>
|
|
154
|
-
|
|
155
|
-
These values are used by components automatically.
|
|
156
|
-
|
|
157
|
-
Typography
|
|
158
|
-
|
|
159
|
-
Example:
|
|
160
|
-
|
|
161
|
-
<MainbaseProvider
|
|
162
|
-
theme={{
|
|
163
|
-
typography: {
|
|
164
|
-
fontFamily:
|
|
165
|
-
"Manrope, sans-serif",
|
|
166
|
-
},
|
|
167
|
-
}}
|
|
168
|
-
>
|
|
169
|
-
Components
|
|
170
|
-
|
|
171
|
-
Mainbase UI includes the following components.
|
|
172
|
-
|
|
173
|
-
Layout
|
|
174
|
-
Stack
|
|
175
|
-
Group
|
|
176
|
-
Card
|
|
177
|
-
Divider
|
|
178
|
-
Typography
|
|
179
|
-
Text
|
|
180
|
-
Title
|
|
181
|
-
Buttons
|
|
182
|
-
Button
|
|
183
|
-
IconButton
|
|
184
|
-
Inputs
|
|
185
|
-
Input
|
|
186
|
-
Textarea
|
|
187
|
-
PasswordInput
|
|
188
|
-
PinInput
|
|
189
|
-
Select
|
|
190
|
-
FileInput
|
|
191
|
-
DatePicker
|
|
192
|
-
Selection
|
|
193
|
-
Checkbox
|
|
194
|
-
Radio
|
|
195
|
-
Switch
|
|
196
|
-
Feedback
|
|
197
|
-
Alert
|
|
198
|
-
Badge
|
|
199
|
-
Spinner
|
|
200
|
-
Progress
|
|
201
|
-
Skeleton
|
|
202
|
-
Toast
|
|
203
|
-
Navigation
|
|
204
|
-
Tabs
|
|
205
|
-
Accordion
|
|
206
|
-
Pagination
|
|
207
|
-
Overlay
|
|
208
|
-
Modal
|
|
209
|
-
Drawer
|
|
210
|
-
Menu
|
|
211
|
-
Popover
|
|
212
|
-
Tooltip
|
|
213
|
-
User Components
|
|
214
|
-
Avatar
|
|
215
|
-
AvatarGroup
|
|
216
|
-
Component Defaults
|
|
217
|
-
|
|
218
|
-
Default component settings can be configured through the theme.
|
|
219
|
-
|
|
220
|
-
Example:
|
|
221
|
-
|
|
222
|
-
<MainbaseProvider
|
|
223
|
-
theme={{
|
|
224
|
-
components: {
|
|
225
|
-
Button: {
|
|
226
|
-
size: "lg",
|
|
227
|
-
variant: "primary",
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
Card: {
|
|
231
|
-
radius: "md",
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
}}
|
|
235
|
-
>
|
|
236
|
-
TypeScript Support
|
|
237
|
-
|
|
238
|
-
Mainbase UI provides TypeScript definitions for all public components.
|
|
239
|
-
|
|
240
|
-
Example:
|
|
241
|
-
|
|
242
|
-
import type {
|
|
243
|
-
ButtonProps,
|
|
244
|
-
DatePickerProps,
|
|
245
|
-
} from "mainbase-ui";
|
|
246
|
-
CSS Variables
|
|
247
|
-
|
|
248
|
-
Mainbase UI exposes CSS variables that can be customized.
|
|
249
|
-
|
|
250
|
-
Example:
|
|
251
|
-
|
|
252
|
-
:root {
|
|
253
|
-
--mb-primary: #ff8a1f;
|
|
254
|
-
--mb-radius: 8px;
|
|
255
|
-
}
|
|
256
|
-
Accessibility
|
|
257
|
-
|
|
258
|
-
Components are designed with accessibility support:
|
|
20
|
+
## Requirements
|
|
259
21
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
disabled states.
|
|
264
|
-
Browser Support
|
|
22
|
+
- React `18` or higher
|
|
23
|
+
- React DOM `18` or higher
|
|
24
|
+
- TypeScript `5` or higher (recommended)
|
|
265
25
|
|
|
266
|
-
|
|
26
|
+
---
|
|
267
27
|
|
|
268
|
-
|
|
269
|
-
Edge
|
|
270
|
-
Firefox
|
|
271
|
-
Safari
|
|
272
|
-
License
|
|
28
|
+
# Installation
|
|
273
29
|
|
|
274
|
-
Mainbase UI
|
|
30
|
+
Install Mainbase UI using your preferred package manager.
|
|
275
31
|
|
|
276
|
-
|
|
277
|
-
according to the terms of the license.
|
|
32
|
+
## npm
|
|
278
33
|
|
|
279
|
-
|
|
34
|
+
```bash
|
|
35
|
+
npm install mainbase-ui
|
package/dist/index.cjs
CHANGED
|
@@ -33,8 +33,10 @@ __export(index_exports, {
|
|
|
33
33
|
Drawer: () => Drawer,
|
|
34
34
|
FileInput: () => FileInput,
|
|
35
35
|
Group: () => Group,
|
|
36
|
+
Highlight: () => Highlight,
|
|
36
37
|
Icon: () => Icon,
|
|
37
38
|
IconButton: () => IconButton,
|
|
39
|
+
Image: () => Image,
|
|
38
40
|
Input: () => Input,
|
|
39
41
|
MainbasePortalContext: () => MainbasePortalContext,
|
|
40
42
|
MainbaseProvider: () => MainbaseProvider,
|
|
@@ -235,6 +237,10 @@ var defaultMainbaseTheme = {
|
|
|
235
237
|
size: "md",
|
|
236
238
|
firstDayOfWeek: 1,
|
|
237
239
|
clearable: true
|
|
240
|
+
},
|
|
241
|
+
Image: {
|
|
242
|
+
radius: "md",
|
|
243
|
+
fit: "cover"
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
};
|
|
@@ -431,6 +437,10 @@ function mergeTheme(parentTheme, override) {
|
|
|
431
437
|
DatePicker: {
|
|
432
438
|
...parentTheme.components.DatePicker,
|
|
433
439
|
...override.components?.DatePicker
|
|
440
|
+
},
|
|
441
|
+
Image: {
|
|
442
|
+
...parentTheme.components.Image,
|
|
443
|
+
...override.components?.Image
|
|
434
444
|
}
|
|
435
445
|
}
|
|
436
446
|
};
|
|
@@ -629,6 +639,11 @@ function Badge({
|
|
|
629
639
|
// src/components/Button/Button.tsx
|
|
630
640
|
var import_react6 = require("react");
|
|
631
641
|
|
|
642
|
+
// src/utils/cx.ts
|
|
643
|
+
function cx(...classes) {
|
|
644
|
+
return classes.filter((value) => Boolean(value)).join(" ");
|
|
645
|
+
}
|
|
646
|
+
|
|
632
647
|
// src/components/Spinner/Spinner.tsx
|
|
633
648
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
634
649
|
function Spinner({
|
|
@@ -674,42 +689,52 @@ var Button = (0, import_react6.forwardRef)(function Button2({
|
|
|
674
689
|
type = "button",
|
|
675
690
|
...props
|
|
676
691
|
}, ref) {
|
|
677
|
-
const defaults = useComponentDefaults(
|
|
692
|
+
const defaults = useComponentDefaults(
|
|
693
|
+
"Button"
|
|
694
|
+
);
|
|
678
695
|
const resolvedVariant = variant ?? defaults.variant ?? "primary";
|
|
679
696
|
const resolvedSize = size ?? defaults.size ?? "md";
|
|
680
|
-
const classes = [
|
|
681
|
-
"mb-button",
|
|
682
|
-
`mb-button--${resolvedVariant}`,
|
|
683
|
-
`mb-button--${resolvedSize}`,
|
|
684
|
-
className
|
|
685
|
-
].filter(Boolean).join(" ");
|
|
686
|
-
const iconSize = {
|
|
687
|
-
sm: 16,
|
|
688
|
-
md: 18,
|
|
689
|
-
lg: 20
|
|
690
|
-
}[resolvedSize];
|
|
691
697
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
692
698
|
"button",
|
|
693
699
|
{
|
|
694
700
|
ref,
|
|
695
701
|
type,
|
|
696
|
-
className:
|
|
702
|
+
className: cx(
|
|
703
|
+
"mb-button",
|
|
704
|
+
`mb-button--${resolvedVariant}`,
|
|
705
|
+
`mb-button--${resolvedSize}`,
|
|
706
|
+
loading ? "mb-button--loading" : void 0,
|
|
707
|
+
className
|
|
708
|
+
),
|
|
697
709
|
disabled: disabled || loading,
|
|
698
|
-
"aria-busy": loading || void 0,
|
|
699
710
|
...props,
|
|
700
711
|
children: [
|
|
701
712
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
702
713
|
Spinner,
|
|
703
714
|
{
|
|
704
|
-
size:
|
|
705
|
-
thickness: 2,
|
|
706
|
-
color: "currentColor",
|
|
707
|
-
trackColor: "transparent",
|
|
708
|
-
"aria-hidden": "true"
|
|
715
|
+
size: 16
|
|
709
716
|
}
|
|
710
|
-
) : leftSection
|
|
711
|
-
|
|
712
|
-
|
|
717
|
+
) : leftSection && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
718
|
+
"span",
|
|
719
|
+
{
|
|
720
|
+
className: "mb-button__icon",
|
|
721
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { size: 18, children: leftSection })
|
|
722
|
+
}
|
|
723
|
+
),
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
725
|
+
"span",
|
|
726
|
+
{
|
|
727
|
+
className: "mb-button__label",
|
|
728
|
+
children
|
|
729
|
+
}
|
|
730
|
+
),
|
|
731
|
+
rightSection && !loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
732
|
+
"span",
|
|
733
|
+
{
|
|
734
|
+
className: "mb-button__icon",
|
|
735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { size: 18, children: rightSection })
|
|
736
|
+
}
|
|
737
|
+
) : null
|
|
713
738
|
]
|
|
714
739
|
}
|
|
715
740
|
);
|
|
@@ -931,11 +956,6 @@ function useLockScroll(locked = true) {
|
|
|
931
956
|
}, [locked]);
|
|
932
957
|
}
|
|
933
958
|
|
|
934
|
-
// src/utils/cx.ts
|
|
935
|
-
function cx(...classes) {
|
|
936
|
-
return classes.filter((value) => Boolean(value)).join(" ");
|
|
937
|
-
}
|
|
938
|
-
|
|
939
959
|
// src/components/Portal/Portal.tsx
|
|
940
960
|
var import_react11 = require("react");
|
|
941
961
|
var import_react_dom = require("react-dom");
|
|
@@ -6167,8 +6187,79 @@ function DatePicker({
|
|
|
6167
6187
|
);
|
|
6168
6188
|
}
|
|
6169
6189
|
|
|
6170
|
-
// src/components/
|
|
6190
|
+
// src/components/Image/Image.tsx
|
|
6191
|
+
var import_react31 = require("react");
|
|
6171
6192
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6193
|
+
var Image = (0, import_react31.forwardRef)(function Image2({
|
|
6194
|
+
radius,
|
|
6195
|
+
fit,
|
|
6196
|
+
fallback,
|
|
6197
|
+
className = "",
|
|
6198
|
+
src,
|
|
6199
|
+
onError,
|
|
6200
|
+
...props
|
|
6201
|
+
}, ref) {
|
|
6202
|
+
const defaults = useComponentDefaults(
|
|
6203
|
+
"Image"
|
|
6204
|
+
);
|
|
6205
|
+
const [
|
|
6206
|
+
currentSrc,
|
|
6207
|
+
setCurrentSrc
|
|
6208
|
+
] = (0, import_react31.useState)(
|
|
6209
|
+
src
|
|
6210
|
+
);
|
|
6211
|
+
const resolvedRadius = radius ?? defaults.radius ?? "md";
|
|
6212
|
+
const resolvedFit = fit ?? defaults.fit ?? "cover";
|
|
6213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6214
|
+
"img",
|
|
6215
|
+
{
|
|
6216
|
+
ref,
|
|
6217
|
+
src: currentSrc,
|
|
6218
|
+
className: cx(
|
|
6219
|
+
"mb-image",
|
|
6220
|
+
`mb-image--${resolvedRadius}`,
|
|
6221
|
+
`mb-image--${resolvedFit}`,
|
|
6222
|
+
className
|
|
6223
|
+
),
|
|
6224
|
+
onError: (event) => {
|
|
6225
|
+
if (fallback && currentSrc !== fallback) {
|
|
6226
|
+
setCurrentSrc(
|
|
6227
|
+
fallback
|
|
6228
|
+
);
|
|
6229
|
+
}
|
|
6230
|
+
onError?.(
|
|
6231
|
+
event
|
|
6232
|
+
);
|
|
6233
|
+
},
|
|
6234
|
+
...props
|
|
6235
|
+
}
|
|
6236
|
+
);
|
|
6237
|
+
});
|
|
6238
|
+
|
|
6239
|
+
// src/components/Highlight/Highlight.tsx
|
|
6240
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6241
|
+
function Highlight({
|
|
6242
|
+
children,
|
|
6243
|
+
color = "primary",
|
|
6244
|
+
className = "",
|
|
6245
|
+
...props
|
|
6246
|
+
}) {
|
|
6247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6248
|
+
"span",
|
|
6249
|
+
{
|
|
6250
|
+
className: cx(
|
|
6251
|
+
"mb-highlight",
|
|
6252
|
+
`mb-highlight--${color}`,
|
|
6253
|
+
className
|
|
6254
|
+
),
|
|
6255
|
+
...props,
|
|
6256
|
+
children
|
|
6257
|
+
}
|
|
6258
|
+
);
|
|
6259
|
+
}
|
|
6260
|
+
|
|
6261
|
+
// src/components/Card/Card.tsx
|
|
6262
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6172
6263
|
function Card({
|
|
6173
6264
|
padding,
|
|
6174
6265
|
radius,
|
|
@@ -6190,24 +6281,24 @@ function Card({
|
|
|
6190
6281
|
`mb-card--shadow-${resolvedShadow}`,
|
|
6191
6282
|
className
|
|
6192
6283
|
].filter(Boolean).join(" ");
|
|
6193
|
-
return /* @__PURE__ */ (0,
|
|
6284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
6194
6285
|
"div",
|
|
6195
6286
|
{
|
|
6196
6287
|
className: classes,
|
|
6197
6288
|
...props,
|
|
6198
6289
|
children: [
|
|
6199
|
-
header != null ? /* @__PURE__ */ (0,
|
|
6200
|
-
/* @__PURE__ */ (0,
|
|
6201
|
-
footer != null ? /* @__PURE__ */ (0,
|
|
6290
|
+
header != null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-card__header", children: header }) : null,
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-card__content", children }),
|
|
6292
|
+
footer != null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-card__footer", children: footer }) : null
|
|
6202
6293
|
]
|
|
6203
6294
|
}
|
|
6204
6295
|
);
|
|
6205
6296
|
}
|
|
6206
6297
|
|
|
6207
6298
|
// src/components/IconButton/IconButton.tsx
|
|
6208
|
-
var
|
|
6209
|
-
var
|
|
6210
|
-
var IconButton = (0,
|
|
6299
|
+
var import_react32 = require("react");
|
|
6300
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6301
|
+
var IconButton = (0, import_react32.forwardRef)(function IconButton2({
|
|
6211
6302
|
icon,
|
|
6212
6303
|
label,
|
|
6213
6304
|
variant,
|
|
@@ -6232,7 +6323,7 @@ var IconButton = (0, import_react31.forwardRef)(function IconButton2({
|
|
|
6232
6323
|
md: 18,
|
|
6233
6324
|
lg: 20
|
|
6234
6325
|
}[resolvedSize];
|
|
6235
|
-
return /* @__PURE__ */ (0,
|
|
6326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6236
6327
|
"button",
|
|
6237
6328
|
{
|
|
6238
6329
|
ref,
|
|
@@ -6242,7 +6333,7 @@ var IconButton = (0, import_react31.forwardRef)(function IconButton2({
|
|
|
6242
6333
|
"aria-label": label,
|
|
6243
6334
|
"aria-busy": loading || void 0,
|
|
6244
6335
|
...props,
|
|
6245
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
6336
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6246
6337
|
Spinner,
|
|
6247
6338
|
{
|
|
6248
6339
|
size: 14,
|
|
@@ -6251,13 +6342,13 @@ var IconButton = (0, import_react31.forwardRef)(function IconButton2({
|
|
|
6251
6342
|
trackColor: "transparent",
|
|
6252
6343
|
"aria-hidden": "true"
|
|
6253
6344
|
}
|
|
6254
|
-
) : /* @__PURE__ */ (0,
|
|
6345
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { size: iconSize, children: icon })
|
|
6255
6346
|
}
|
|
6256
6347
|
);
|
|
6257
6348
|
});
|
|
6258
6349
|
|
|
6259
6350
|
// src/components/Input/Input.tsx
|
|
6260
|
-
var
|
|
6351
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6261
6352
|
function Input({
|
|
6262
6353
|
leftSection,
|
|
6263
6354
|
rightSection,
|
|
@@ -6274,9 +6365,9 @@ function Input({
|
|
|
6274
6365
|
disabled && "mb-input--disabled",
|
|
6275
6366
|
className
|
|
6276
6367
|
].filter(Boolean).join(" ");
|
|
6277
|
-
return /* @__PURE__ */ (0,
|
|
6278
|
-
leftSection ? /* @__PURE__ */ (0,
|
|
6279
|
-
/* @__PURE__ */ (0,
|
|
6368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: classes, children: [
|
|
6369
|
+
leftSection ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "mb-input__section mb-input__section--left", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { size: 18, children: leftSection }) }) : null,
|
|
6370
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6280
6371
|
"input",
|
|
6281
6372
|
{
|
|
6282
6373
|
className: "mb-input__control",
|
|
@@ -6285,17 +6376,17 @@ function Input({
|
|
|
6285
6376
|
...props
|
|
6286
6377
|
}
|
|
6287
6378
|
),
|
|
6288
|
-
rightSection ? /* @__PURE__ */ (0,
|
|
6379
|
+
rightSection ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "mb-input__section mb-input__section--right", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { size: 18, children: rightSection }) }) : null
|
|
6289
6380
|
] });
|
|
6290
6381
|
}
|
|
6291
6382
|
|
|
6292
6383
|
// src/components/Textarea/Textarea.tsx
|
|
6293
|
-
var
|
|
6384
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6294
6385
|
function Textarea({
|
|
6295
6386
|
className = "",
|
|
6296
6387
|
...props
|
|
6297
6388
|
}) {
|
|
6298
|
-
return /* @__PURE__ */ (0,
|
|
6389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6299
6390
|
"textarea",
|
|
6300
6391
|
{
|
|
6301
6392
|
className: `mb-textarea ${className}`,
|
|
@@ -6305,7 +6396,7 @@ function Textarea({
|
|
|
6305
6396
|
}
|
|
6306
6397
|
|
|
6307
6398
|
// src/components/Text/Text.tsx
|
|
6308
|
-
var
|
|
6399
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6309
6400
|
function Text({
|
|
6310
6401
|
as: Component = "p",
|
|
6311
6402
|
size,
|
|
@@ -6334,22 +6425,22 @@ function Text({
|
|
|
6334
6425
|
md: 16,
|
|
6335
6426
|
lg: 18
|
|
6336
6427
|
}[resolvedSize];
|
|
6337
|
-
return /* @__PURE__ */ (0,
|
|
6428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6338
6429
|
Component,
|
|
6339
6430
|
{
|
|
6340
6431
|
className: classes,
|
|
6341
6432
|
...props,
|
|
6342
6433
|
children: [
|
|
6343
|
-
leftSection != null ? /* @__PURE__ */ (0,
|
|
6344
|
-
/* @__PURE__ */ (0,
|
|
6345
|
-
rightSection != null ? /* @__PURE__ */ (0,
|
|
6434
|
+
leftSection != null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { size: iconSize, children: leftSection }) : null,
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "mb-text__content", children }),
|
|
6436
|
+
rightSection != null ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { size: iconSize, children: rightSection }) : null
|
|
6346
6437
|
]
|
|
6347
6438
|
}
|
|
6348
6439
|
);
|
|
6349
6440
|
}
|
|
6350
6441
|
|
|
6351
6442
|
// src/components/Title/Title.tsx
|
|
6352
|
-
var
|
|
6443
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6353
6444
|
function Title({
|
|
6354
6445
|
order,
|
|
6355
6446
|
size,
|
|
@@ -6387,15 +6478,15 @@ function Title({
|
|
|
6387
6478
|
`mb-title--${color}`,
|
|
6388
6479
|
className
|
|
6389
6480
|
].filter(Boolean).join(" ");
|
|
6390
|
-
return /* @__PURE__ */ (0,
|
|
6481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6391
6482
|
Component,
|
|
6392
6483
|
{
|
|
6393
6484
|
className: classes,
|
|
6394
6485
|
...props,
|
|
6395
6486
|
children: [
|
|
6396
|
-
leftSection != null ? /* @__PURE__ */ (0,
|
|
6397
|
-
/* @__PURE__ */ (0,
|
|
6398
|
-
rightSection != null ? /* @__PURE__ */ (0,
|
|
6487
|
+
leftSection != null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { size: iconSize, children: leftSection }) : null,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "mb-title__content", children }),
|
|
6489
|
+
rightSection != null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { size: iconSize, children: rightSection }) : null
|
|
6399
6490
|
]
|
|
6400
6491
|
}
|
|
6401
6492
|
);
|
|
@@ -6415,8 +6506,10 @@ function Title({
|
|
|
6415
6506
|
Drawer,
|
|
6416
6507
|
FileInput,
|
|
6417
6508
|
Group,
|
|
6509
|
+
Highlight,
|
|
6418
6510
|
Icon,
|
|
6419
6511
|
IconButton,
|
|
6512
|
+
Image,
|
|
6420
6513
|
Input,
|
|
6421
6514
|
MainbasePortalContext,
|
|
6422
6515
|
MainbaseProvider,
|