@motor-hero/ui-kit 0.46.1 → 0.47.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/dist/components/base-dialog.d.ts +16 -5
- package/dist/components/base-dialog.d.ts.map +1 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/base-dialog.tsx +24 -9
- package/src/components/pagination.tsx +4 -1
package/dist/index.js
CHANGED
|
@@ -422,7 +422,7 @@ function BaseDialog({
|
|
|
422
422
|
)
|
|
423
423
|
] }),
|
|
424
424
|
/* @__PURE__ */ jsx6("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children }),
|
|
425
|
-
footer && /* @__PURE__ */ jsx6("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-3 sm:flex-row sm:justify-end", children: footer })
|
|
425
|
+
footer && /* @__PURE__ */ jsx6("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:flex-row sm:justify-end", children: footer })
|
|
426
426
|
] });
|
|
427
427
|
const isModal = modal ?? !isDesktop;
|
|
428
428
|
return /* @__PURE__ */ jsx6(Dialog.Root, { open, onOpenChange, modal: isModal, children: /* @__PURE__ */ jsxs5(Dialog.Portal, { children: [
|
|
@@ -458,9 +458,13 @@ function BaseDialog({
|
|
|
458
458
|
document.body.style.pointerEvents = "";
|
|
459
459
|
},
|
|
460
460
|
className: cn(
|
|
461
|
-
"fixed z-50 flex
|
|
462
|
-
"inset-x-0 bottom-0 rounded-t-2xl",
|
|
463
|
-
|
|
461
|
+
"fixed z-50 flex w-full flex-col bg-background shadow-lg outline-none",
|
|
462
|
+
"inset-x-0 bottom-0 rounded-t-2xl max-h-[calc(100dvh_-_max(0.75rem,env(safe-area-inset-top)))]",
|
|
463
|
+
// Entra deslizando de baixo, como os drawers (vaul) do restante do
|
|
464
|
+
// kit; no desktop os slides sairiam brigando com o translate de
|
|
465
|
+
// centralização, então ficam restritos ao mobile.
|
|
466
|
+
"max-sm:slide-in-from-bottom-8 max-sm:slide-out-to-bottom-8",
|
|
467
|
+
"sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[92dvh] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg",
|
|
464
468
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
465
469
|
sizeClasses[size],
|
|
466
470
|
className
|
|
@@ -1976,7 +1980,7 @@ function Pagination({
|
|
|
1976
1980
|
return /* @__PURE__ */ jsxs19(
|
|
1977
1981
|
"div",
|
|
1978
1982
|
{
|
|
1979
|
-
className: `flex items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-4 ${className ?? ""}`,
|
|
1983
|
+
className: `flex flex-wrap items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-x-4 gap-y-2 ${className ?? ""}`,
|
|
1980
1984
|
children: [
|
|
1981
1985
|
showPageSizeSelector && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
1982
1986
|
/* @__PURE__ */ jsx23("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|