@hilum/ui 3.6.3 → 3.6.4
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 +23 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/combobox.tsx +5 -5
- package/src/components/context-menu.tsx +2 -2
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/menubar.tsx +2 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/select.tsx +1 -1
- package/src/lib/mobile-popper-sheet.ts +10 -10
package/package.json
CHANGED
|
@@ -181,21 +181,21 @@ function Combobox({
|
|
|
181
181
|
<button
|
|
182
182
|
type="button"
|
|
183
183
|
aria-label="Close options"
|
|
184
|
-
className="fixed inset-0 z-40 hidden bg-black/30 backdrop-blur-sm max-
|
|
184
|
+
className="fixed inset-0 z-40 hidden bg-black/30 backdrop-blur-sm max-md:block"
|
|
185
185
|
onClick={closeDropdown}
|
|
186
186
|
/>
|
|
187
187
|
<div
|
|
188
188
|
className={cn(
|
|
189
189
|
"absolute z-50 mt-1 w-full overflow-hidden rounded-lg border border-border bg-card shadow-elevated",
|
|
190
|
-
"max-
|
|
191
|
-
"max-
|
|
192
|
-
"max-
|
|
190
|
+
"max-md:fixed max-md:inset-x-3 max-md:bottom-3 max-md:[bottom:max(0.75rem,env(safe-area-inset-bottom))] max-md:top-auto max-md:mt-0 max-md:w-auto",
|
|
191
|
+
"max-md:max-h-[min(70dvh,28rem)] max-md:rounded-2xl max-md:p-2 max-md:pt-5",
|
|
192
|
+
"max-md:before:absolute max-md:before:left-1/2 max-md:before:top-2 max-md:before:h-1 max-md:before:w-9 max-md:before:-translate-x-1/2 max-md:before:rounded-full max-md:before:bg-muted-foreground/35",
|
|
193
193
|
)}
|
|
194
194
|
>
|
|
195
195
|
<ul
|
|
196
196
|
id={listboxId}
|
|
197
197
|
role="listbox"
|
|
198
|
-
className="max-h-60 overflow-auto py-1 max-
|
|
198
|
+
className="max-h-60 overflow-auto py-1 max-md:max-h-[calc(min(70dvh,28rem)-3rem)]"
|
|
199
199
|
>
|
|
200
200
|
{filtered.length === 0 ? (
|
|
201
201
|
<li className="px-3 py-2 body text-muted-foreground">{emptyText}</li>
|
|
@@ -32,7 +32,7 @@ const ContextMenuContent = React.forwardRef<
|
|
|
32
32
|
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-card p-1 text-card-foreground shadow-elevated outline-none",
|
|
33
33
|
mobilePopperSheetPositionClassName,
|
|
34
34
|
mobilePopperSheetSurfaceClassName,
|
|
35
|
-
"max-
|
|
35
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
36
36
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
37
37
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
38
38
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -184,7 +184,7 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
184
184
|
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-card p-1 text-card-foreground shadow-elevated outline-none",
|
|
185
185
|
mobilePopperSheetPositionClassName,
|
|
186
186
|
mobilePopperSheetSurfaceClassName,
|
|
187
|
-
"max-
|
|
187
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
188
188
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
189
189
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
190
190
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -39,7 +39,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
39
39
|
"z-50 min-w-[8rem] rounded-xl border border-border bg-card p-1 shadow-elevated",
|
|
40
40
|
mobilePopperSheetPositionClassName,
|
|
41
41
|
mobilePopperSheetSurfaceClassName,
|
|
42
|
-
"max-
|
|
42
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
43
43
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
44
44
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
45
45
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -193,7 +193,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
193
193
|
"z-50 min-w-[8rem] rounded-xl border border-border bg-card p-1 shadow-elevated",
|
|
194
194
|
mobilePopperSheetPositionClassName,
|
|
195
195
|
mobilePopperSheetSurfaceClassName,
|
|
196
|
-
"max-
|
|
196
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
197
197
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
198
198
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
199
199
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -69,7 +69,7 @@ const MenubarContent = React.forwardRef<
|
|
|
69
69
|
"z-50 min-w-[12rem] bg-card rounded-xl shadow-natural p-1",
|
|
70
70
|
mobilePopperSheetPositionClassName,
|
|
71
71
|
mobilePopperSheetSurfaceClassName,
|
|
72
|
-
"max-
|
|
72
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
73
73
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
74
74
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
75
75
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -214,7 +214,7 @@ const MenubarSubContent = React.forwardRef<
|
|
|
214
214
|
"z-50 min-w-[8rem] bg-card rounded-xl border border-border shadow-natural p-1",
|
|
215
215
|
mobilePopperSheetPositionClassName,
|
|
216
216
|
mobilePopperSheetSurfaceClassName,
|
|
217
|
-
"max-
|
|
217
|
+
"max-md:overflow-y-auto max-md:px-2 max-md:pb-2 max-md:pt-5",
|
|
218
218
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
219
219
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
220
220
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -32,7 +32,7 @@ const PopoverContent = React.forwardRef<
|
|
|
32
32
|
motionClasses,
|
|
33
33
|
mobilePopperSheetPositionClassName,
|
|
34
34
|
mobilePopperSheetSurfaceClassName,
|
|
35
|
-
"max-
|
|
35
|
+
"max-md:overflow-y-auto max-md:px-4 max-md:pb-4 max-md:pt-6",
|
|
36
36
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
37
37
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
38
38
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -448,7 +448,7 @@ const SelectContent = forwardRef<HTMLDivElement, SelectContentProps>(
|
|
|
448
448
|
}}
|
|
449
449
|
onKeyDown={handleKeyDown}
|
|
450
450
|
className={cn(
|
|
451
|
-
`relative flex flex-col gap-0.5 max-h-[300px] overflow-y-auto ${shape.container} p-1 select-none outline-none max-
|
|
451
|
+
`relative flex flex-col gap-0.5 max-h-[300px] overflow-y-auto ${shape.container} p-1 select-none outline-none max-md:!fixed max-md:rounded-2xl max-md:data-[state=open]:slide-in-from-bottom`,
|
|
452
452
|
className,
|
|
453
453
|
)}
|
|
454
454
|
>
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export const mobileDialogSheetContentClassName = [
|
|
2
2
|
"fixed inset-x-0 bottom-0 z-50 max-h-[calc(100dvh-1rem)] w-full overflow-y-auto",
|
|
3
3
|
"rounded-t-2xl border border-border bg-card p-6 shadow-elevated",
|
|
4
|
-
"max-
|
|
5
|
-
"max-
|
|
6
|
-
"max-
|
|
4
|
+
"max-md:pb-[calc(1.5rem+env(safe-area-inset-bottom))] max-md:pt-8",
|
|
5
|
+
"max-md:before:absolute max-md:before:left-1/2 max-md:before:top-3 max-md:before:h-1 max-md:before:w-9",
|
|
6
|
+
"max-md:before:-translate-x-1/2 max-md:before:rounded-full max-md:before:bg-muted-foreground/35",
|
|
7
7
|
].join(" ");
|
|
8
8
|
|
|
9
9
|
export const desktopDialogContentClassName =
|
|
10
|
-
"
|
|
10
|
+
"md:bottom-auto md:left-1/2 md:top-1/2 md:max-h-[calc(100dvh-2rem)] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-2xl";
|
|
11
11
|
|
|
12
12
|
export const dialogSheetMotionClassName = [
|
|
13
13
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
14
14
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
15
15
|
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
16
|
-
"
|
|
16
|
+
"md:data-[state=closed]:zoom-out-95 md:data-[state=open]:zoom-in-95",
|
|
17
17
|
].join(" ");
|
|
18
18
|
|
|
19
19
|
export const mobilePopperSheetPositionClassName = [
|
|
20
|
-
"max-
|
|
21
|
-
"max-
|
|
20
|
+
"max-md:!fixed max-md:!inset-x-3 max-md:!bottom-3 max-md:!top-auto max-md:!left-3 max-md:!right-3",
|
|
21
|
+
"max-md:!w-auto max-md:!min-w-0 max-md:!max-w-none max-md:!transform-none",
|
|
22
22
|
].join(" ");
|
|
23
23
|
|
|
24
24
|
export const mobilePopperSheetSurfaceClassName =
|
|
25
|
-
"max-
|
|
25
|
+
"max-md:max-h-[min(70dvh,28rem)] max-md:rounded-2xl max-md:border max-md:border-border max-md:shadow-elevated";
|
|
26
26
|
|
|
27
27
|
export const mobilePopperSheetMotionClassName = [
|
|
28
|
-
"max-
|
|
28
|
+
"max-md:data-[state=closed]:slide-out-to-bottom max-md:data-[state=open]:slide-in-from-bottom",
|
|
29
29
|
].join(" ");
|
|
30
30
|
|
|
31
31
|
export const mobilePopperSheetStyle = `
|
|
32
|
-
@media (max-width:
|
|
32
|
+
@media (max-width: 767px) {
|
|
33
33
|
[data-radix-popper-content-wrapper]:has([data-hilum-mobile-sheet="true"]) {
|
|
34
34
|
position: fixed !important;
|
|
35
35
|
inset: 0 !important;
|