@machinemetrics/mm-react-components 0.2.3-27 → 0.2.3-28
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/components/ui/sheet-banner.d.ts +10 -0
- package/dist/components/ui/sheet-banner.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +7 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/mm-react-components.css +1 -1
- package/dist/mm-react-components.es.js +47 -2
- package/dist/mm-react-components.es.js.map +1 -1
- package/dist/mm-react-components.umd.js +7 -7
- package/dist/mm-react-components.umd.js.map +1 -1
- package/dist/preview/SheetBannerPreview.d.ts +2 -0
- package/dist/preview/SheetBannerPreview.d.ts.map +1 -0
- package/dist/preview/SheetPreview.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10340,6 +10340,32 @@ var Content$3 = DialogContent$1;
|
|
|
10340
10340
|
var Title = DialogTitle$1;
|
|
10341
10341
|
var Description = DialogDescription$1;
|
|
10342
10342
|
var Close = DialogClose$1;
|
|
10343
|
+
const SheetBanner = React.forwardRef(
|
|
10344
|
+
({ variant, icon, text: text2, additionalText, className, ...props }, ref) => {
|
|
10345
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10346
|
+
"div",
|
|
10347
|
+
{
|
|
10348
|
+
ref,
|
|
10349
|
+
"data-slot": "sheet-banner",
|
|
10350
|
+
className: cn$1(
|
|
10351
|
+
"sheet-banner",
|
|
10352
|
+
variant === "shared" ? "sheet-banner-shared" : "sheet-banner-company",
|
|
10353
|
+
className
|
|
10354
|
+
),
|
|
10355
|
+
...props,
|
|
10356
|
+
children: [
|
|
10357
|
+
icon,
|
|
10358
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sheet-banner-text", children: text2 }),
|
|
10359
|
+
additionalText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10360
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sheet-banner-text", children: "|" }),
|
|
10361
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sheet-banner-text", children: additionalText })
|
|
10362
|
+
] })
|
|
10363
|
+
]
|
|
10364
|
+
}
|
|
10365
|
+
);
|
|
10366
|
+
}
|
|
10367
|
+
);
|
|
10368
|
+
SheetBanner.displayName = "SheetBanner";
|
|
10343
10369
|
function Sheet({ ...props }) {
|
|
10344
10370
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Root$9, { "data-slot": "sheet", ...props });
|
|
10345
10371
|
}
|
|
@@ -10425,6 +10451,11 @@ function SheetContent({
|
|
|
10425
10451
|
side = "right",
|
|
10426
10452
|
showCloseButton = true,
|
|
10427
10453
|
closeButtonPosition = "corner",
|
|
10454
|
+
showBanner = false,
|
|
10455
|
+
bannerVariant,
|
|
10456
|
+
bannerIcon,
|
|
10457
|
+
bannerText,
|
|
10458
|
+
bannerAdditionalText,
|
|
10428
10459
|
...props
|
|
10429
10460
|
}) {
|
|
10430
10461
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SheetPortal, { children: [
|
|
@@ -10434,7 +10465,8 @@ function SheetContent({
|
|
|
10434
10465
|
{
|
|
10435
10466
|
"data-slot": "sheet-content",
|
|
10436
10467
|
className: cn$1(
|
|
10437
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col
|
|
10468
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 outline-none",
|
|
10469
|
+
showBanner ? "gap-0" : "gap-4",
|
|
10438
10470
|
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
10439
10471
|
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
10440
10472
|
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
@@ -10443,12 +10475,24 @@ function SheetContent({
|
|
|
10443
10475
|
),
|
|
10444
10476
|
...props,
|
|
10445
10477
|
children: [
|
|
10478
|
+
showBanner && bannerVariant && bannerIcon && bannerText && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10479
|
+
SheetBanner,
|
|
10480
|
+
{
|
|
10481
|
+
variant: bannerVariant,
|
|
10482
|
+
icon: bannerIcon,
|
|
10483
|
+
text: bannerText,
|
|
10484
|
+
additionalText: bannerAdditionalText
|
|
10485
|
+
}
|
|
10486
|
+
),
|
|
10446
10487
|
children,
|
|
10447
10488
|
showCloseButton && closeButtonPosition === "corner" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10448
10489
|
Close,
|
|
10449
10490
|
{
|
|
10450
10491
|
"data-slot": "sheet-close",
|
|
10451
|
-
className:
|
|
10492
|
+
className: cn$1(
|
|
10493
|
+
"absolute right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",
|
|
10494
|
+
showBanner ? "top-12" : "top-4"
|
|
10495
|
+
),
|
|
10452
10496
|
children: [
|
|
10453
10497
|
/* @__PURE__ */ jsxRuntimeExports.jsx(X$1, { className: "size-4" }),
|
|
10454
10498
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Close" })
|
|
@@ -45722,6 +45766,7 @@ export {
|
|
|
45722
45766
|
SelectValue,
|
|
45723
45767
|
Separator,
|
|
45724
45768
|
Sheet,
|
|
45769
|
+
SheetBanner,
|
|
45725
45770
|
SheetClose,
|
|
45726
45771
|
SheetCloseButton,
|
|
45727
45772
|
SheetContent,
|