@hilum/ui 3.6.3 → 3.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hilum/ui",
3
- "version": "3.6.3",
3
+ "version": "3.6.5",
4
4
  "private": false,
5
5
  "description": "Hilum UI — design system primitives (Button, Input, Dialog, Combobox, …) + tokens + fonts + icons",
6
6
  "license": "MIT",
@@ -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-sm:block"
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-sm:fixed max-sm:inset-x-3 max-sm:bottom-3 max-sm:[bottom:max(0.75rem,env(safe-area-inset-bottom))] max-sm:top-auto max-sm:mt-0 max-sm:w-auto",
191
- "max-sm:max-h-[min(70dvh,28rem)] max-sm:rounded-2xl max-sm:p-2 max-sm:pt-5",
192
- "max-sm:before:absolute max-sm:before:left-1/2 max-sm:before:top-2 max-sm:before:h-1 max-sm:before:w-9 max-sm:before:-translate-x-1/2 max-sm:before:rounded-full max-sm:before:bg-muted-foreground/35",
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-sm:max-h-[calc(min(70dvh,28rem)-3rem)]"
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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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",
@@ -84,10 +84,10 @@ const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(
84
84
  size === "sm"
85
85
  ? container
86
86
  ? "max-w-[400px]"
87
- : "sm:max-w-[400px]"
87
+ : "lg:max-w-[400px]"
88
88
  : container
89
89
  ? "max-w-[540px]"
90
- : "sm:max-w-[540px]";
90
+ : "lg:max-w-[540px]";
91
91
 
92
92
  return (
93
93
  <DialogPrimitive.Portal forceMount container={container ?? undefined}>
@@ -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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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-sm:overflow-y-auto max-sm:px-2 max-sm:pb-2 max-sm:pt-5",
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-sm:overflow-y-auto max-sm:px-4 max-sm:pb-4 max-sm:pt-6",
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-sm:!fixed max-sm:rounded-2xl max-sm:data-[state=open]:slide-in-from-bottom`,
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,36 @@
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
+ "max-lg:!w-full max-lg:!max-w-none max-lg:!rounded-b-none",
3
4
  "rounded-t-2xl border border-border bg-card p-6 shadow-elevated",
4
- "max-sm:pb-[calc(1.5rem+env(safe-area-inset-bottom))] max-sm:pt-8",
5
- "max-sm:before:absolute max-sm:before:left-1/2 max-sm:before:top-3 max-sm:before:h-1 max-sm:before:w-9",
6
- "max-sm:before:-translate-x-1/2 max-sm:before:rounded-full max-sm:before:bg-muted-foreground/35",
5
+ "max-lg:pb-[calc(1.5rem+env(safe-area-inset-bottom))] max-lg:pt-8",
6
+ "max-lg:before:absolute max-lg:before:left-1/2 max-lg:before:top-3 max-lg:before:h-1 max-lg:before:w-9",
7
+ "max-lg:before:-translate-x-1/2 max-lg:before:rounded-full max-lg:before:bg-muted-foreground/35",
7
8
  ].join(" ");
8
9
 
9
10
  export const desktopDialogContentClassName =
10
- "sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[calc(100dvh-2rem)] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-2xl";
11
+ "lg:bottom-auto lg:left-1/2 lg:top-1/2 lg:max-h-[calc(100dvh-2rem)] lg:-translate-x-1/2 lg:-translate-y-1/2 lg:rounded-2xl";
11
12
 
12
13
  export const dialogSheetMotionClassName = [
13
14
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
14
15
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15
16
  "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
16
- "sm:data-[state=closed]:zoom-out-95 sm:data-[state=open]:zoom-in-95",
17
+ "lg:data-[state=closed]:zoom-out-95 lg:data-[state=open]:zoom-in-95",
17
18
  ].join(" ");
18
19
 
19
20
  export const mobilePopperSheetPositionClassName = [
20
- "max-sm:!fixed max-sm:!inset-x-3 max-sm:!bottom-3 max-sm:!top-auto max-sm:!left-3 max-sm:!right-3",
21
- "max-sm:!w-auto max-sm:!min-w-0 max-sm:!max-w-none max-sm:!transform-none",
21
+ "max-md:!fixed max-md:!inset-x-3 max-md:!bottom-3 max-md:!top-auto max-md:!left-3 max-md:!right-3",
22
+ "max-md:!w-auto max-md:!min-w-0 max-md:!max-w-none max-md:!transform-none",
22
23
  ].join(" ");
23
24
 
24
25
  export const mobilePopperSheetSurfaceClassName =
25
- "max-sm:max-h-[min(70dvh,28rem)] max-sm:rounded-2xl max-sm:border max-sm:border-border max-sm:shadow-elevated";
26
+ "max-md:max-h-[min(70dvh,28rem)] max-md:rounded-2xl max-md:border max-md:border-border max-md:shadow-elevated";
26
27
 
27
28
  export const mobilePopperSheetMotionClassName = [
28
- "max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:slide-in-from-bottom",
29
+ "max-md:data-[state=closed]:slide-out-to-bottom max-md:data-[state=open]:slide-in-from-bottom",
29
30
  ].join(" ");
30
31
 
31
32
  export const mobilePopperSheetStyle = `
32
- @media (max-width: 639px) {
33
+ @media (max-width: 767px) {
33
34
  [data-radix-popper-content-wrapper]:has([data-hilum-mobile-sheet="true"]) {
34
35
  position: fixed !important;
35
36
  inset: 0 !important;