mainbase-ui 1.2.5-b → 1.2.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.cjs +54 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +37 -6
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +51 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
IconButton: () => IconButton,
|
|
39
39
|
Image: () => Image,
|
|
40
40
|
Input: () => Input,
|
|
41
|
+
Link: () => Link,
|
|
41
42
|
MainbasePortalContext: () => MainbasePortalContext,
|
|
42
43
|
MainbaseProvider: () => MainbaseProvider,
|
|
43
44
|
Menu: () => Menu,
|
|
@@ -6258,8 +6259,32 @@ function Highlight({
|
|
|
6258
6259
|
);
|
|
6259
6260
|
}
|
|
6260
6261
|
|
|
6261
|
-
// src/components/
|
|
6262
|
+
// src/components/Link/Link.tsx
|
|
6263
|
+
var import_react32 = require("react");
|
|
6262
6264
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6265
|
+
var Link = (0, import_react32.forwardRef)(function Link2({
|
|
6266
|
+
variant = "default",
|
|
6267
|
+
className = "",
|
|
6268
|
+
children,
|
|
6269
|
+
...props
|
|
6270
|
+
}, ref) {
|
|
6271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6272
|
+
"a",
|
|
6273
|
+
{
|
|
6274
|
+
ref,
|
|
6275
|
+
className: cx(
|
|
6276
|
+
"mb-link",
|
|
6277
|
+
`mb-link--${variant}`,
|
|
6278
|
+
className
|
|
6279
|
+
),
|
|
6280
|
+
...props,
|
|
6281
|
+
children
|
|
6282
|
+
}
|
|
6283
|
+
);
|
|
6284
|
+
});
|
|
6285
|
+
|
|
6286
|
+
// src/components/Card/Card.tsx
|
|
6287
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6263
6288
|
function Card({
|
|
6264
6289
|
padding,
|
|
6265
6290
|
radius,
|
|
@@ -6281,24 +6306,24 @@ function Card({
|
|
|
6281
6306
|
`mb-card--shadow-${resolvedShadow}`,
|
|
6282
6307
|
className
|
|
6283
6308
|
].filter(Boolean).join(" ");
|
|
6284
|
-
return /* @__PURE__ */ (0,
|
|
6309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
6285
6310
|
"div",
|
|
6286
6311
|
{
|
|
6287
6312
|
className: classes,
|
|
6288
6313
|
...props,
|
|
6289
6314
|
children: [
|
|
6290
|
-
header != null ? /* @__PURE__ */ (0,
|
|
6291
|
-
/* @__PURE__ */ (0,
|
|
6292
|
-
footer != null ? /* @__PURE__ */ (0,
|
|
6315
|
+
header != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-card__header", children: header }) : null,
|
|
6316
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-card__content", children }),
|
|
6317
|
+
footer != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-card__footer", children: footer }) : null
|
|
6293
6318
|
]
|
|
6294
6319
|
}
|
|
6295
6320
|
);
|
|
6296
6321
|
}
|
|
6297
6322
|
|
|
6298
6323
|
// src/components/IconButton/IconButton.tsx
|
|
6299
|
-
var
|
|
6300
|
-
var
|
|
6301
|
-
var IconButton = (0,
|
|
6324
|
+
var import_react33 = require("react");
|
|
6325
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6326
|
+
var IconButton = (0, import_react33.forwardRef)(function IconButton2({
|
|
6302
6327
|
icon,
|
|
6303
6328
|
label,
|
|
6304
6329
|
variant,
|
|
@@ -6323,7 +6348,7 @@ var IconButton = (0, import_react32.forwardRef)(function IconButton2({
|
|
|
6323
6348
|
md: 18,
|
|
6324
6349
|
lg: 20
|
|
6325
6350
|
}[resolvedSize];
|
|
6326
|
-
return /* @__PURE__ */ (0,
|
|
6351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6327
6352
|
"button",
|
|
6328
6353
|
{
|
|
6329
6354
|
ref,
|
|
@@ -6333,7 +6358,7 @@ var IconButton = (0, import_react32.forwardRef)(function IconButton2({
|
|
|
6333
6358
|
"aria-label": label,
|
|
6334
6359
|
"aria-busy": loading || void 0,
|
|
6335
6360
|
...props,
|
|
6336
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
6361
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6337
6362
|
Spinner,
|
|
6338
6363
|
{
|
|
6339
6364
|
size: 14,
|
|
@@ -6342,13 +6367,13 @@ var IconButton = (0, import_react32.forwardRef)(function IconButton2({
|
|
|
6342
6367
|
trackColor: "transparent",
|
|
6343
6368
|
"aria-hidden": "true"
|
|
6344
6369
|
}
|
|
6345
|
-
) : /* @__PURE__ */ (0,
|
|
6370
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { size: iconSize, children: icon })
|
|
6346
6371
|
}
|
|
6347
6372
|
);
|
|
6348
6373
|
});
|
|
6349
6374
|
|
|
6350
6375
|
// src/components/Input/Input.tsx
|
|
6351
|
-
var
|
|
6376
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6352
6377
|
function Input({
|
|
6353
6378
|
leftSection,
|
|
6354
6379
|
rightSection,
|
|
@@ -6365,9 +6390,9 @@ function Input({
|
|
|
6365
6390
|
disabled && "mb-input--disabled",
|
|
6366
6391
|
className
|
|
6367
6392
|
].filter(Boolean).join(" ");
|
|
6368
|
-
return /* @__PURE__ */ (0,
|
|
6369
|
-
leftSection ? /* @__PURE__ */ (0,
|
|
6370
|
-
/* @__PURE__ */ (0,
|
|
6393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: classes, children: [
|
|
6394
|
+
leftSection ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "mb-input__section mb-input__section--left", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { size: 18, children: leftSection }) }) : null,
|
|
6395
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6371
6396
|
"input",
|
|
6372
6397
|
{
|
|
6373
6398
|
className: "mb-input__control",
|
|
@@ -6376,17 +6401,17 @@ function Input({
|
|
|
6376
6401
|
...props
|
|
6377
6402
|
}
|
|
6378
6403
|
),
|
|
6379
|
-
rightSection ? /* @__PURE__ */ (0,
|
|
6404
|
+
rightSection ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "mb-input__section mb-input__section--right", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { size: 18, children: rightSection }) }) : null
|
|
6380
6405
|
] });
|
|
6381
6406
|
}
|
|
6382
6407
|
|
|
6383
6408
|
// src/components/Textarea/Textarea.tsx
|
|
6384
|
-
var
|
|
6409
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6385
6410
|
function Textarea({
|
|
6386
6411
|
className = "",
|
|
6387
6412
|
...props
|
|
6388
6413
|
}) {
|
|
6389
|
-
return /* @__PURE__ */ (0,
|
|
6414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6390
6415
|
"textarea",
|
|
6391
6416
|
{
|
|
6392
6417
|
className: `mb-textarea ${className}`,
|
|
@@ -6396,7 +6421,7 @@ function Textarea({
|
|
|
6396
6421
|
}
|
|
6397
6422
|
|
|
6398
6423
|
// src/components/Text/Text.tsx
|
|
6399
|
-
var
|
|
6424
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6400
6425
|
function Text({
|
|
6401
6426
|
as: Component = "p",
|
|
6402
6427
|
size,
|
|
@@ -6425,22 +6450,22 @@ function Text({
|
|
|
6425
6450
|
md: 16,
|
|
6426
6451
|
lg: 18
|
|
6427
6452
|
}[resolvedSize];
|
|
6428
|
-
return /* @__PURE__ */ (0,
|
|
6453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6429
6454
|
Component,
|
|
6430
6455
|
{
|
|
6431
6456
|
className: classes,
|
|
6432
6457
|
...props,
|
|
6433
6458
|
children: [
|
|
6434
|
-
leftSection != null ? /* @__PURE__ */ (0,
|
|
6435
|
-
/* @__PURE__ */ (0,
|
|
6436
|
-
rightSection != null ? /* @__PURE__ */ (0,
|
|
6459
|
+
leftSection != null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { size: iconSize, children: leftSection }) : null,
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "mb-text__content", children }),
|
|
6461
|
+
rightSection != null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { size: iconSize, children: rightSection }) : null
|
|
6437
6462
|
]
|
|
6438
6463
|
}
|
|
6439
6464
|
);
|
|
6440
6465
|
}
|
|
6441
6466
|
|
|
6442
6467
|
// src/components/Title/Title.tsx
|
|
6443
|
-
var
|
|
6468
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6444
6469
|
function Title({
|
|
6445
6470
|
order,
|
|
6446
6471
|
size,
|
|
@@ -6478,15 +6503,15 @@ function Title({
|
|
|
6478
6503
|
`mb-title--${color}`,
|
|
6479
6504
|
className
|
|
6480
6505
|
].filter(Boolean).join(" ");
|
|
6481
|
-
return /* @__PURE__ */ (0,
|
|
6506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6482
6507
|
Component,
|
|
6483
6508
|
{
|
|
6484
6509
|
className: classes,
|
|
6485
6510
|
...props,
|
|
6486
6511
|
children: [
|
|
6487
|
-
leftSection != null ? /* @__PURE__ */ (0,
|
|
6488
|
-
/* @__PURE__ */ (0,
|
|
6489
|
-
rightSection != null ? /* @__PURE__ */ (0,
|
|
6512
|
+
leftSection != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { size: iconSize, children: leftSection }) : null,
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "mb-title__content", children }),
|
|
6514
|
+
rightSection != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { size: iconSize, children: rightSection }) : null
|
|
6490
6515
|
]
|
|
6491
6516
|
}
|
|
6492
6517
|
);
|
|
@@ -6511,6 +6536,7 @@ function Title({
|
|
|
6511
6536
|
IconButton,
|
|
6512
6537
|
Image,
|
|
6513
6538
|
Input,
|
|
6539
|
+
Link,
|
|
6514
6540
|
MainbasePortalContext,
|
|
6515
6541
|
MainbaseProvider,
|
|
6516
6542
|
Menu,
|