@motor-hero/ui-kit 0.46.0 → 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/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 max-h-[92vh] flex-col bg-background shadow-lg outline-none",
462
- "inset-x-0 bottom-0 rounded-t-2xl",
463
- "sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[92vh] sm:w-full sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg",
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
@@ -804,7 +808,7 @@ function Combobox({
804
808
  CommandPrimitive.List,
805
809
  {
806
810
  ref: listRef,
807
- className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
811
+ className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
808
812
  children: [
809
813
  !isServer && !showCreate && /* @__PURE__ */ jsx9(CommandPrimitive.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
810
814
  showCreate && /* @__PURE__ */ jsxs7(
@@ -872,7 +876,7 @@ function Combobox({
872
876
  /* @__PURE__ */ jsx9(DrawerPrimitive2.Trigger, { asChild: true, children: trigger }),
873
877
  /* @__PURE__ */ jsxs7(DrawerPrimitive2.Portal, { children: [
874
878
  /* @__PURE__ */ jsx9(DrawerPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
875
- /* @__PURE__ */ jsxs7(DrawerPrimitive2.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
879
+ /* @__PURE__ */ jsxs7(DrawerPrimitive2.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
876
880
  /* @__PURE__ */ jsx9(DrawerPrimitive2.Title, { className: "sr-only", children: placeholder }),
877
881
  /* @__PURE__ */ jsx9("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
878
882
  command
@@ -1254,7 +1258,7 @@ function DatePickerImpl({
1254
1258
  onInteractOutside: (event) => {
1255
1259
  if (triggerRef.current?.contains(event.target)) event.preventDefault();
1256
1260
  },
1257
- className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none",
1261
+ className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none",
1258
1262
  children: [
1259
1263
  /* @__PURE__ */ jsx12(DrawerPrimitive3.Title, { className: "sr-only", children: withTime ? "Selecione a data e o hor\xE1rio" : "Selecione a data" }),
1260
1264
  /* @__PURE__ */ jsx12("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
@@ -1379,7 +1383,7 @@ function FilterPopover({
1379
1383
  /* @__PURE__ */ jsx14(DrawerPrimitive4.Trigger, { asChild: true, children: trigger }),
1380
1384
  /* @__PURE__ */ jsxs12(DrawerPrimitive4.Portal, { children: [
1381
1385
  /* @__PURE__ */ jsx14(DrawerPrimitive4.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
1382
- /* @__PURE__ */ jsxs12(DrawerPrimitive4.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
1386
+ /* @__PURE__ */ jsxs12(DrawerPrimitive4.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
1383
1387
  /* @__PURE__ */ jsx14(DrawerPrimitive4.Title, { className: "sr-only", children: title ?? label }),
1384
1388
  /* @__PURE__ */ jsx14("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
1385
1389
  /* @__PURE__ */ jsx14("div", { className: "overflow-y-auto p-2", children: content })
@@ -1878,7 +1882,7 @@ function MultiCombobox({
1878
1882
  CommandPrimitive2.List,
1879
1883
  {
1880
1884
  ref: listRef,
1881
- className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
1885
+ className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
1882
1886
  children: [
1883
1887
  !isServer && /* @__PURE__ */ jsx21(CommandPrimitive2.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
1884
1888
  options.map((option) => /* @__PURE__ */ jsxs17(
@@ -1931,7 +1935,7 @@ function MultiCombobox({
1931
1935
  /* @__PURE__ */ jsx21(DrawerPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
1932
1936
  /* @__PURE__ */ jsxs17(DrawerPrimitive5.Portal, { children: [
1933
1937
  /* @__PURE__ */ jsx21(DrawerPrimitive5.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
1934
- /* @__PURE__ */ jsxs17(DrawerPrimitive5.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
1938
+ /* @__PURE__ */ jsxs17(DrawerPrimitive5.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
1935
1939
  /* @__PURE__ */ jsx21(DrawerPrimitive5.Title, { className: "sr-only", children: placeholder }),
1936
1940
  /* @__PURE__ */ jsx21("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
1937
1941
  command
@@ -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" }),