@sniptide/ui 0.8.0 → 0.9.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sniptide/ui",
3
- "version": "0.8.0",
4
- "gitHead": "656cc21517d20214ccec78c9bdf7784a2e96e0c1",
3
+ "version": "0.9.0",
4
+ "gitHead": "1cf91eb5d702b9a5f324de69dfd136d7a1a2914a",
5
5
  "description": "Sniptide's React components, Tailwind CSS theme and logo, shared by the app and the website.",
6
6
  "license": "AGPL-3.0-only",
7
7
  "homepage": "https://sniptide.com",
@@ -23,7 +23,7 @@ function DropdownMenuContent({
23
23
  <MenuPrimitive.Popup
24
24
  data-slot="dropdown-menu-content"
25
25
  className={cn(
26
- "min-w-48 rounded-lg p-1 border border-border bg-popover text-popover-foreground shadow-(--float-shadow) outline-none origin-[var(--transform-origin)] transition-[scale,opacity] duration-100 data-starting-style:scale-[0.98] data-starting-style:opacity-0 data-ending-style:scale-[0.98] data-ending-style:opacity-0",
26
+ "min-w-48 max-lg:min-w-56 rounded-lg p-1 border border-border bg-popover text-popover-foreground shadow-(--float-shadow) outline-none origin-[var(--transform-origin)] transition-[scale,opacity] duration-100 data-starting-style:scale-[0.98] data-starting-style:opacity-0 data-ending-style:scale-[0.98] data-ending-style:opacity-0",
27
27
  className,
28
28
  )}
29
29
  {...props}
@@ -43,7 +43,7 @@ function DropdownMenuItem({
43
43
  data-slot="dropdown-menu-item"
44
44
  data-variant={variant}
45
45
  className={cn(
46
- "flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-muted data-[variant=destructive]:text-destructive [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
46
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-muted data-[variant=destructive]:text-destructive [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
47
47
  className,
48
48
  )}
49
49
  {...props}
@@ -60,7 +60,7 @@ function DropdownMenuCheckboxItem({
60
60
  <MenuPrimitive.CheckboxItem
61
61
  data-slot="dropdown-menu-checkbox-item"
62
62
  className={cn(
63
- "flex h-8 cursor-default items-center gap-2 rounded-md pr-3 pl-2 text-sm outline-none select-none data-highlighted:bg-muted [&_svg]:size-4 [&_svg]:shrink-0",
63
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md pr-3 pl-2 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted [&_svg]:size-4 [&_svg]:shrink-0",
64
64
  className,
65
65
  )}
66
66
  {...props}
@@ -82,7 +82,7 @@ function DropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.
82
82
  <MenuPrimitive.RadioItem
83
83
  data-slot="dropdown-menu-radio-item"
84
84
  className={cn(
85
- "grid h-8 cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-highlighted:bg-muted",
85
+ "grid h-8 max-lg:h-11 cursor-default grid-cols-[1fr_1rem] items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted",
86
86
  className,
87
87
  )}
88
88
  {...props}
@@ -97,7 +97,12 @@ function DropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.
97
97
 
98
98
  // A plain heading row. Use MenuPrimitive.GroupLabel inside a DropdownMenuGroup for labelled groups.
99
99
  function DropdownMenuLabel({ className, ...props }: React.ComponentProps<"div">) {
100
- return <div className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)} {...props} />
100
+ return (
101
+ <div
102
+ className={cn("px-2 py-1.5 text-xs text-muted-foreground max-lg:text-[13px]", className)}
103
+ {...props}
104
+ />
105
+ )
101
106
  }
102
107
 
103
108
  // A nested menu: wrap a DropdownMenuSubTrigger and a DropdownMenuContent in DropdownMenuSub.
@@ -112,7 +117,7 @@ function DropdownMenuSubTrigger({
112
117
  <MenuPrimitive.SubmenuTrigger
113
118
  data-slot="dropdown-menu-sub-trigger"
114
119
  className={cn(
115
- "flex h-8 cursor-default items-center gap-2 rounded-md px-3 text-sm outline-none select-none data-highlighted:bg-muted data-popup-open:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
120
+ "flex h-8 max-lg:h-11 cursor-default items-center gap-2 rounded-md px-3 text-sm max-lg:text-base outline-none select-none data-highlighted:bg-muted data-popup-open:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",
116
121
  className,
117
122
  )}
118
123
  {...props}
@@ -33,6 +33,8 @@
33
33
  --chart-5: #e8e8e8;
34
34
  --radius: 0.375rem;
35
35
  --sidebar: #fafafa;
36
+ /* The canvas of grouped phone screens, under white panels like an iOS grouped table. */
37
+ --grouped: #f4f4f4;
36
38
  --sidebar-foreground: #1b1919;
37
39
  --sidebar-primary: #2a26ec;
38
40
  --sidebar-primary-foreground: #ffffff;
@@ -106,6 +108,7 @@
106
108
  --chart-4: #6b6b6b;
107
109
  --chart-5: #2f2c2c;
108
110
  --sidebar: #0c0b0b;
111
+ --grouped: #0c0b0b;
109
112
  --sidebar-foreground: #f4f4f4;
110
113
  --sidebar-primary: #2a26ec;
111
114
  --sidebar-primary-foreground: #ffffff;
@@ -172,6 +175,7 @@
172
175
  --radius-3xl: calc(var(--radius) * 2.2);
173
176
  --radius-4xl: calc(var(--radius) * 2.6);
174
177
  --color-sidebar: var(--sidebar);
178
+ --color-grouped: var(--grouped);
175
179
  --color-sidebar-foreground: var(--sidebar-foreground);
176
180
  --color-sidebar-primary: var(--sidebar-primary);
177
181
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
@@ -675,3 +675,15 @@
675
675
  -webkit-text-fill-color: currentColor;
676
676
  }
677
677
  }
678
+
679
+ /* The phone's sticky top bars: content scrolling under them shows through a blurred tint of the
680
+ canvas, like an iOS navigation bar. Grouped screens tint with the grouped canvas. */
681
+ @utility bar-translucent {
682
+ background-color: color-mix(in oklab, var(--background) 80%, transparent);
683
+ -webkit-backdrop-filter: blur(20px) saturate(1.8);
684
+ backdrop-filter: blur(20px) saturate(1.8);
685
+
686
+ :root:has([data-grouped]) & {
687
+ background-color: color-mix(in oklab, var(--grouped) 80%, transparent);
688
+ }
689
+ }