@motor-hero/ui-kit 0.46.0 → 0.46.1
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 +8 -2
- package/dist/components/base-dialog.d.ts.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/base-dialog.tsx +10 -4
- package/src/components/combobox.tsx +2 -2
- package/src/components/date-picker.tsx +1 -1
- package/src/components/filter-toolbar.tsx +1 -1
- package/src/components/multi-combobox.tsx +2 -2
|
@@ -49,10 +49,16 @@ export interface BaseDialogProps {
|
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Standardized, responsive dialog shell:
|
|
52
|
-
* - mobile: bottom sheet (full width, up to
|
|
53
|
-
* - desktop: centered dialog (up to
|
|
52
|
+
* - mobile: bottom sheet (full width, up to 92dvh tall)
|
|
53
|
+
* - desktop: centered dialog (up to 92dvh tall)
|
|
54
54
|
* Header and footer stay fixed; only the body scrolls.
|
|
55
55
|
*
|
|
56
|
+
* Heights use `dvh`, not `vh`: on iOS `vh` is locked to the large viewport
|
|
57
|
+
* (toolbars collapsed), so `92vh` can exceed the visible area by 10-15%. With
|
|
58
|
+
* the sheet anchored to `bottom-0` the overflow leaves through the top, and
|
|
59
|
+
* since the body is the only scrollable child, what goes off-screen is the
|
|
60
|
+
* header - title and close button. Does not reproduce outside real iOS.
|
|
61
|
+
*
|
|
56
62
|
* Also fixes the known Radix bug where `body { pointer-events: none }`
|
|
57
63
|
* can persist after closing a dialog that contained a Select/Popover,
|
|
58
64
|
* which would otherwise make the rest of the page unclickable.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-dialog.d.ts","sourceRoot":"","sources":["../../src/components/base-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,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EAAE,SAAS,CAAA;IAClB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,CAAA;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,IAAW,EACX,SAAS,EACT,KAAK,EACL,YAAmB,EACnB,iBAAiB,EACjB,cAAqC,GACtC,EAAE,eAAe,qBAuFjB"}
|
package/dist/index.cjs
CHANGED
|
@@ -542,9 +542,9 @@ function BaseDialog({
|
|
|
542
542
|
document.body.style.pointerEvents = "";
|
|
543
543
|
},
|
|
544
544
|
className: cn(
|
|
545
|
-
"fixed z-50 flex max-h-[
|
|
545
|
+
"fixed z-50 flex max-h-[92dvh] flex-col bg-background shadow-lg outline-none",
|
|
546
546
|
"inset-x-0 bottom-0 rounded-t-2xl",
|
|
547
|
-
"sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[
|
|
547
|
+
"sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[92dvh] sm:w-full sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg",
|
|
548
548
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
549
549
|
sizeClasses[size],
|
|
550
550
|
className
|
|
@@ -884,7 +884,7 @@ function Combobox({
|
|
|
884
884
|
import_cmdk.Command.List,
|
|
885
885
|
{
|
|
886
886
|
ref: listRef,
|
|
887
|
-
className: "max-h-[
|
|
887
|
+
className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
888
888
|
children: [
|
|
889
889
|
!isServer && !showCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_cmdk.Command.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
890
890
|
showCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
@@ -952,7 +952,7 @@ function Combobox({
|
|
|
952
952
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
953
953
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.Portal, { children: [
|
|
954
954
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
955
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.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: [
|
|
956
956
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Title, { className: "sr-only", children: placeholder }),
|
|
957
957
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
958
958
|
command
|
|
@@ -1334,7 +1334,7 @@ function DatePickerImpl({
|
|
|
1334
1334
|
onInteractOutside: (event) => {
|
|
1335
1335
|
if (triggerRef.current?.contains(event.target)) event.preventDefault();
|
|
1336
1336
|
},
|
|
1337
|
-
className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[
|
|
1337
|
+
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",
|
|
1338
1338
|
children: [
|
|
1339
1339
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_vaul3.Drawer.Title, { className: "sr-only", children: withTime ? "Selecione a data e o hor\xE1rio" : "Selecione a data" }),
|
|
1340
1340
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
@@ -1459,7 +1459,7 @@ function FilterPopover({
|
|
|
1459
1459
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
1460
1460
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.Portal, { children: [
|
|
1461
1461
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1462
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.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: [
|
|
1463
1463
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Title, { className: "sr-only", children: title ?? label }),
|
|
1464
1464
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1465
1465
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-y-auto p-2", children: content })
|
|
@@ -1958,7 +1958,7 @@ function MultiCombobox({
|
|
|
1958
1958
|
import_cmdk2.Command.List,
|
|
1959
1959
|
{
|
|
1960
1960
|
ref: listRef,
|
|
1961
|
-
className: "max-h-[
|
|
1961
|
+
className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
1962
1962
|
children: [
|
|
1963
1963
|
!isServer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_cmdk2.Command.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1964
1964
|
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -2011,7 +2011,7 @@ function MultiCombobox({
|
|
|
2011
2011
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Trigger, { asChild: true, disabled, children: trigger }),
|
|
2012
2012
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.Portal, { children: [
|
|
2013
2013
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
2014
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.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: [
|
|
2015
2015
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Title, { className: "sr-only", children: placeholder }),
|
|
2016
2016
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
2017
2017
|
command
|