sheerly 0.0.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/README.md +3 -0
- package/lib/accordion.css +1 -0
- package/lib/accordion.d.ts +6 -0
- package/lib/alert.css +1 -0
- package/lib/alert.d.ts +8 -0
- package/lib/avatar.css +1 -0
- package/lib/avatar.d.ts +13 -0
- package/lib/badge.css +1 -0
- package/lib/badge.d.ts +5 -0
- package/lib/breadcrumb.css +1 -0
- package/lib/breadcrumb.d.ts +8 -0
- package/lib/button.css +1 -0
- package/lib/button.d.ts +7 -0
- package/lib/card.css +1 -0
- package/lib/card.d.ts +14 -0
- package/lib/carousel.css +1 -0
- package/lib/carousel.d.ts +21 -0
- package/lib/checkbox.css +1 -0
- package/lib/checkbox.d.ts +3 -0
- package/lib/cn.d.ts +5 -0
- package/lib/dialog.css +1 -0
- package/lib/dialog.d.ts +15 -0
- package/lib/dropdown-menu.css +1 -0
- package/lib/dropdown-menu.d.ts +49 -0
- package/lib/hover-card.css +1 -0
- package/lib/hover-card.d.ts +7 -0
- package/lib/index.css +1 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.js +652 -0
- package/lib/input.css +1 -0
- package/lib/input.d.ts +5 -0
- package/lib/kbd.css +1 -0
- package/lib/kbd.d.ts +5 -0
- package/lib/label.css +1 -0
- package/lib/label.d.ts +5 -0
- package/lib/pagination.css +1 -0
- package/lib/pagination.d.ts +17 -0
- package/lib/popover.css +1 -0
- package/lib/popover.d.ts +7 -0
- package/lib/progress.css +1 -0
- package/lib/progress.d.ts +6 -0
- package/lib/radio.css +1 -0
- package/lib/radio.d.ts +5 -0
- package/lib/root.css +1 -0
- package/lib/select.css +1 -0
- package/lib/select.d.ts +10 -0
- package/lib/separator.css +1 -0
- package/lib/separator.d.ts +5 -0
- package/lib/sheet.css +1 -0
- package/lib/sheet.d.ts +16 -0
- package/lib/skeleton.css +1 -0
- package/lib/skeleton.d.ts +3 -0
- package/lib/slider.css +1 -0
- package/lib/slider.d.ts +3 -0
- package/lib/spinner.css +1 -0
- package/lib/spinner.d.ts +10 -0
- package/lib/switch.css +1 -0
- package/lib/switch.d.ts +5 -0
- package/lib/table.css +1 -0
- package/lib/table.d.ts +5 -0
- package/lib/tabs.css +1 -0
- package/lib/tabs.d.ts +13 -0
- package/lib/textarea.css +1 -0
- package/lib/textarea.d.ts +3 -0
- package/lib/toggle.css +1 -0
- package/lib/toggle.d.ts +16 -0
- package/lib/tooltip.css +1 -0
- package/lib/tooltip.d.ts +7 -0
- package/lib/typography.css +1 -0
- package/lib/typography.d.ts +9 -0
- package/package.json +33 -0
- package/src/accordion.css +108 -0
- package/src/accordion.tsx +15 -0
- package/src/alert.css +126 -0
- package/src/alert.tsx +25 -0
- package/src/avatar.css +75 -0
- package/src/avatar.tsx +30 -0
- package/src/badge.css +71 -0
- package/src/badge.tsx +19 -0
- package/src/breadcrumb.css +166 -0
- package/src/breadcrumb.tsx +71 -0
- package/src/button.css +214 -0
- package/src/button.tsx +30 -0
- package/src/card.css +99 -0
- package/src/card.tsx +41 -0
- package/src/carousel.css +183 -0
- package/src/carousel.tsx +30 -0
- package/src/checkbox.css +56 -0
- package/src/checkbox.tsx +10 -0
- package/src/cn.ts +7 -0
- package/src/dialog.css +175 -0
- package/src/dialog.tsx +47 -0
- package/src/dropdown-menu.css +257 -0
- package/src/dropdown-menu.tsx +88 -0
- package/src/hover-card.css +75 -0
- package/src/hover-card.tsx +16 -0
- package/src/index.css +33 -0
- package/src/index.ts +37 -0
- package/src/input.css +62 -0
- package/src/input.tsx +10 -0
- package/src/kbd.css +32 -0
- package/src/kbd.tsx +14 -0
- package/src/label.css +17 -0
- package/src/label.tsx +10 -0
- package/src/pagination.css +150 -0
- package/src/pagination.tsx +95 -0
- package/src/popover.css +65 -0
- package/src/popover.tsx +16 -0
- package/src/progress.css +79 -0
- package/src/progress.tsx +19 -0
- package/src/radio.css +61 -0
- package/src/radio.tsx +14 -0
- package/src/root.css +78 -0
- package/src/select.css +164 -0
- package/src/select.tsx +22 -0
- package/src/separator.css +14 -0
- package/src/separator.tsx +10 -0
- package/src/sheet.css +225 -0
- package/src/sheet.tsx +48 -0
- package/src/skeleton.css +15 -0
- package/src/skeleton.tsx +8 -0
- package/src/slider.css +68 -0
- package/src/slider.tsx +8 -0
- package/src/spinner.css +43 -0
- package/src/spinner.tsx +24 -0
- package/src/switch.css +79 -0
- package/src/switch.tsx +18 -0
- package/src/table.css +77 -0
- package/src/table.tsx +14 -0
- package/src/tabs.css +110 -0
- package/src/tabs.tsx +38 -0
- package/src/textarea.css +38 -0
- package/src/textarea.tsx +8 -0
- package/src/toggle.css +148 -0
- package/src/toggle.tsx +47 -0
- package/src/tooltip.css +60 -0
- package/src/tooltip.tsx +16 -0
- package/src/types.d.ts +42 -0
- package/src/typography.css +176 -0
- package/src/typography.tsx +13 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/* Typography — a prose wrapper that styles all its children.
|
|
2
|
+
*
|
|
3
|
+
* Unlike shadcn (which ships per-element utility classes), Sheerly applies one
|
|
4
|
+
* `.sheerly-typography` class to a container and styles every descendant
|
|
5
|
+
* element (h1–h4, p, a, blockquote, ul/ol, li, code, table, small, etc.).
|
|
6
|
+
* Follows the shadcn Nova typography scale. */
|
|
7
|
+
.sheerly-typography {
|
|
8
|
+
font-family: "Geist Sans", "Geist", system-ui, -apple-system, sans-serif;
|
|
9
|
+
color: var(--sheerly-foreground);
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
line-height: 1.75;
|
|
12
|
+
|
|
13
|
+
& h1 {
|
|
14
|
+
font-size: 36px;
|
|
15
|
+
font-weight: 800;
|
|
16
|
+
line-height: 1.1;
|
|
17
|
+
letter-spacing: -0.025em;
|
|
18
|
+
text-wrap: balance;
|
|
19
|
+
scroll-margin-block-start: 5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& h2 {
|
|
23
|
+
font-size: 30px;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
line-height: 1.2;
|
|
26
|
+
letter-spacing: -0.025em;
|
|
27
|
+
border-bottom: 1px solid var(--sheerly-border);
|
|
28
|
+
padding-bottom: 8px;
|
|
29
|
+
scroll-margin-block-start: 5rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& h3 {
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
line-height: 1.3;
|
|
36
|
+
letter-spacing: -0.025em;
|
|
37
|
+
scroll-margin-block-start: 5rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& h4 {
|
|
41
|
+
font-size: 20px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
line-height: 1.4;
|
|
44
|
+
letter-spacing: -0.025em;
|
|
45
|
+
scroll-margin-block-start: 5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Vertical rhythm: every element gets top margin except the first child and
|
|
49
|
+
* the first element after a heading (headings supply their own spacing). */
|
|
50
|
+
& h1,
|
|
51
|
+
& h2,
|
|
52
|
+
& h3,
|
|
53
|
+
& h4,
|
|
54
|
+
& p,
|
|
55
|
+
& blockquote,
|
|
56
|
+
& ul,
|
|
57
|
+
& ol,
|
|
58
|
+
& table,
|
|
59
|
+
& pre {
|
|
60
|
+
margin-block-start: 24px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& h2 {
|
|
64
|
+
margin-block-start: 40px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
& h3,
|
|
68
|
+
& h4 {
|
|
69
|
+
margin-block-start: 32px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& > :first-child {
|
|
73
|
+
margin-block-start: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& a {
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
color: var(--sheerly-primary);
|
|
79
|
+
text-decoration: underline;
|
|
80
|
+
text-underline-offset: 4px;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
color: oklch(from var(--sheerly-primary) l c h / 80%);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
& blockquote {
|
|
88
|
+
border-inline-start: 2px solid var(--sheerly-border);
|
|
89
|
+
padding-inline-start: 24px;
|
|
90
|
+
font-style: italic;
|
|
91
|
+
color: var(--sheerly-muted-foreground);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
& ul {
|
|
95
|
+
list-style: disc;
|
|
96
|
+
padding-inline-start: 24px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& ol {
|
|
100
|
+
list-style: decimal;
|
|
101
|
+
padding-inline-start: 24px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
& li {
|
|
105
|
+
margin-block-start: 8px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& li::marker {
|
|
109
|
+
color: var(--sheerly-muted-foreground);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
& code {
|
|
113
|
+
font-family: "Geist Mono", ui-monospace, monospace;
|
|
114
|
+
font-size: 0.875em;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
border-radius: var(--sheerly-radius-sm);
|
|
117
|
+
background-color: var(--sheerly-muted);
|
|
118
|
+
padding: 0.2em 0.35em;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
& pre {
|
|
122
|
+
overflow-x: auto;
|
|
123
|
+
border-radius: var(--sheerly-radius-md);
|
|
124
|
+
background-color: var(--sheerly-muted);
|
|
125
|
+
padding: 16px;
|
|
126
|
+
|
|
127
|
+
& code {
|
|
128
|
+
background-color: transparent;
|
|
129
|
+
padding: 0;
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
& table {
|
|
135
|
+
width: 100%;
|
|
136
|
+
border-collapse: collapse;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
& th,
|
|
141
|
+
& td {
|
|
142
|
+
border: 1px solid var(--sheerly-border);
|
|
143
|
+
padding: 8px 16px;
|
|
144
|
+
text-align: start;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
& th {
|
|
148
|
+
font-weight: 700;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
& tbody tr:nth-child(even) {
|
|
152
|
+
background-color: oklch(from var(--sheerly-muted) l c h / 50%);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
& small {
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
line-height: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Lead paragraph and muted text helpers */
|
|
162
|
+
& [data-variant="lead"] {
|
|
163
|
+
font-size: 20px;
|
|
164
|
+
color: var(--sheerly-muted-foreground);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
& [data-variant="large"] {
|
|
168
|
+
font-size: 18px;
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
& [data-variant="muted"] {
|
|
173
|
+
font-size: 14px;
|
|
174
|
+
color: var(--sheerly-muted-foreground);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
|
+
import { cn } from './cn'
|
|
3
|
+
|
|
4
|
+
export interface TypographyProps extends HTMLAttributes<HTMLDivElement> {}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A prose wrapper. Unlike shadcn (per-element utility classes), Sheerly styles
|
|
8
|
+
* every child element (h1–h4, p, a, blockquote, ul/ol, li, code, table, …) via
|
|
9
|
+
* one `.sheerly-typography` class — just render semantic HTML inside it.
|
|
10
|
+
*/
|
|
11
|
+
export function Typography({ className, ...props }: TypographyProps) {
|
|
12
|
+
return <div className={cn('sheerly-typography', className)} {...props} />
|
|
13
|
+
}
|