@sniptide/ui 0.3.0 → 0.4.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/README.md +1 -1
- package/package.json +2 -2
- package/src/styles/globals.css +0 -6
- package/src/components/stripes.tsx +0 -75
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @sniptide/ui
|
|
2
2
|
|
|
3
|
-
Sniptide's shared React components (shadcn on Base UI), brand
|
|
3
|
+
Sniptide's shared React components (shadcn on Base UI), the brand `Logo` and the
|
|
4
4
|
Tailwind v4 theme. The Sniptide app uses it from this monorepo; the website installs it from npm.
|
|
5
5
|
|
|
6
6
|
The package ships TypeScript source, so the consuming Next.js app compiles it.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sniptide/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"gitHead": "d74bebf044b1eb57318d9ed9f25b85e6e510a185",
|
|
5
5
|
"description": "Sniptide's shared React components and Tailwind theme, used by the app and the website.",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
7
7
|
"homepage": "https://sniptide.com",
|
package/src/styles/globals.css
CHANGED
|
@@ -45,8 +45,6 @@
|
|
|
45
45
|
--float-shadow: 0 1px 2px rgb(27 25 25 / 0.06), 0 8px 24px -6px rgb(27 25 25 / 0.14);
|
|
46
46
|
--dialog-shadow: 0 2px 4px rgb(27 25 25 / 0.06), 0 24px 48px -12px rgb(27 25 25 / 0.22);
|
|
47
47
|
--logo-primary: #2a26ec;
|
|
48
|
-
--logo-ink: #1b1919;
|
|
49
|
-
--logo-hatch: #000000;
|
|
50
48
|
--link: #2a26ec;
|
|
51
49
|
/* Pink is the second brand colour. It marks what stands out without being an action: search
|
|
52
50
|
matches, stars, the peak of a chart. --pink is the surface with --pink-foreground on it;
|
|
@@ -107,8 +105,6 @@
|
|
|
107
105
|
/* The inverse logo from the Paper brand page: its own deep blue, light grey blocks and dim
|
|
108
106
|
hatching. */
|
|
109
107
|
--logo-primary: #1b17c6;
|
|
110
|
-
--logo-ink: #dfdfdf;
|
|
111
|
-
--logo-hatch: #535151;
|
|
112
108
|
/* One blue, two weights. Tide Blue fills buttons and chart bars in both themes (white on it is
|
|
113
109
|
8.1:1) but is too dark to read as text on these surfaces (2.3:1), so links, focus rings,
|
|
114
110
|
code keywords and blue collection icons use its light tint, the same one the landing uses
|
|
@@ -170,8 +166,6 @@
|
|
|
170
166
|
--color-sidebar-border: var(--sidebar-border);
|
|
171
167
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
172
168
|
--color-logo-primary: var(--logo-primary);
|
|
173
|
-
--color-logo-ink: var(--logo-ink);
|
|
174
|
-
--color-logo-hatch: var(--logo-hatch);
|
|
175
169
|
--color-link: var(--link);
|
|
176
170
|
--color-pink: var(--pink);
|
|
177
171
|
--color-pink-foreground: var(--pink-foreground);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { cn } from "@sniptide/ui/lib/utils"
|
|
2
|
-
|
|
3
|
-
type Bar = [number, number, number?, number?]
|
|
4
|
-
|
|
5
|
-
// Barcode stripes from the Paper auth screens' brand panel (720×900 artboard units).
|
|
6
|
-
const ink: Bar[] = [
|
|
7
|
-
[0, 1],
|
|
8
|
-
[5, 2],
|
|
9
|
-
[11, 3],
|
|
10
|
-
[18, 4],
|
|
11
|
-
[32, 36],
|
|
12
|
-
[140, 1],
|
|
13
|
-
[145, 2],
|
|
14
|
-
[151, 3],
|
|
15
|
-
[158, 4],
|
|
16
|
-
[172, 72],
|
|
17
|
-
[244, 1],
|
|
18
|
-
[249, 2],
|
|
19
|
-
[255, 3],
|
|
20
|
-
[262, 4],
|
|
21
|
-
[276, 1],
|
|
22
|
-
[281, 2],
|
|
23
|
-
[287, 3],
|
|
24
|
-
[294, 4],
|
|
25
|
-
[308, 1],
|
|
26
|
-
[313, 2],
|
|
27
|
-
[319, 3],
|
|
28
|
-
[326, 4],
|
|
29
|
-
[340, 48],
|
|
30
|
-
[388, 16, 280, 620],
|
|
31
|
-
[420, 36],
|
|
32
|
-
[456, 1],
|
|
33
|
-
[461, 2],
|
|
34
|
-
[467, 3],
|
|
35
|
-
[474, 4],
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
const accent: Bar[] = [
|
|
39
|
-
[68, 72, 420, 480],
|
|
40
|
-
[404, 16],
|
|
41
|
-
[488, 24],
|
|
42
|
-
[584, 48],
|
|
43
|
-
[668, 48],
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
// Hairlines are the thin 1-4 unit bars, blocks the wide ones. Dark mode dims the hairlines and
|
|
47
|
-
// lightens the blocks the way the brand's inverse logo does.
|
|
48
|
-
const hairlines = ink.filter(([, width]) => width <= 4)
|
|
49
|
-
const blocks = ink.filter(([, width]) => width > 4)
|
|
50
|
-
|
|
51
|
-
function Bars({ bars, className }: { bars: Bar[]; className: string }) {
|
|
52
|
-
return (
|
|
53
|
-
<g className={className}>
|
|
54
|
-
{bars.map(([x, width, y = 0, height = 900]) => (
|
|
55
|
-
<rect key={x} x={x} y={y} width={width} height={height} />
|
|
56
|
-
))}
|
|
57
|
-
</g>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function Stripes({ className }: { className?: string }) {
|
|
62
|
-
return (
|
|
63
|
-
<svg
|
|
64
|
-
viewBox="0 0 720 900"
|
|
65
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
-
aria-hidden="true"
|
|
67
|
-
preserveAspectRatio="xMinYMid slice"
|
|
68
|
-
className={cn("absolute", className)}
|
|
69
|
-
>
|
|
70
|
-
<Bars bars={hairlines} className="fill-logo-hatch" />
|
|
71
|
-
<Bars bars={blocks} className="fill-logo-ink" />
|
|
72
|
-
<Bars bars={accent} className="fill-primary" />
|
|
73
|
-
</svg>
|
|
74
|
-
)
|
|
75
|
-
}
|