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.
Files changed (140) hide show
  1. package/README.md +3 -0
  2. package/lib/accordion.css +1 -0
  3. package/lib/accordion.d.ts +6 -0
  4. package/lib/alert.css +1 -0
  5. package/lib/alert.d.ts +8 -0
  6. package/lib/avatar.css +1 -0
  7. package/lib/avatar.d.ts +13 -0
  8. package/lib/badge.css +1 -0
  9. package/lib/badge.d.ts +5 -0
  10. package/lib/breadcrumb.css +1 -0
  11. package/lib/breadcrumb.d.ts +8 -0
  12. package/lib/button.css +1 -0
  13. package/lib/button.d.ts +7 -0
  14. package/lib/card.css +1 -0
  15. package/lib/card.d.ts +14 -0
  16. package/lib/carousel.css +1 -0
  17. package/lib/carousel.d.ts +21 -0
  18. package/lib/checkbox.css +1 -0
  19. package/lib/checkbox.d.ts +3 -0
  20. package/lib/cn.d.ts +5 -0
  21. package/lib/dialog.css +1 -0
  22. package/lib/dialog.d.ts +15 -0
  23. package/lib/dropdown-menu.css +1 -0
  24. package/lib/dropdown-menu.d.ts +49 -0
  25. package/lib/hover-card.css +1 -0
  26. package/lib/hover-card.d.ts +7 -0
  27. package/lib/index.css +1 -0
  28. package/lib/index.d.ts +33 -0
  29. package/lib/index.js +652 -0
  30. package/lib/input.css +1 -0
  31. package/lib/input.d.ts +5 -0
  32. package/lib/kbd.css +1 -0
  33. package/lib/kbd.d.ts +5 -0
  34. package/lib/label.css +1 -0
  35. package/lib/label.d.ts +5 -0
  36. package/lib/pagination.css +1 -0
  37. package/lib/pagination.d.ts +17 -0
  38. package/lib/popover.css +1 -0
  39. package/lib/popover.d.ts +7 -0
  40. package/lib/progress.css +1 -0
  41. package/lib/progress.d.ts +6 -0
  42. package/lib/radio.css +1 -0
  43. package/lib/radio.d.ts +5 -0
  44. package/lib/root.css +1 -0
  45. package/lib/select.css +1 -0
  46. package/lib/select.d.ts +10 -0
  47. package/lib/separator.css +1 -0
  48. package/lib/separator.d.ts +5 -0
  49. package/lib/sheet.css +1 -0
  50. package/lib/sheet.d.ts +16 -0
  51. package/lib/skeleton.css +1 -0
  52. package/lib/skeleton.d.ts +3 -0
  53. package/lib/slider.css +1 -0
  54. package/lib/slider.d.ts +3 -0
  55. package/lib/spinner.css +1 -0
  56. package/lib/spinner.d.ts +10 -0
  57. package/lib/switch.css +1 -0
  58. package/lib/switch.d.ts +5 -0
  59. package/lib/table.css +1 -0
  60. package/lib/table.d.ts +5 -0
  61. package/lib/tabs.css +1 -0
  62. package/lib/tabs.d.ts +13 -0
  63. package/lib/textarea.css +1 -0
  64. package/lib/textarea.d.ts +3 -0
  65. package/lib/toggle.css +1 -0
  66. package/lib/toggle.d.ts +16 -0
  67. package/lib/tooltip.css +1 -0
  68. package/lib/tooltip.d.ts +7 -0
  69. package/lib/typography.css +1 -0
  70. package/lib/typography.d.ts +9 -0
  71. package/package.json +33 -0
  72. package/src/accordion.css +108 -0
  73. package/src/accordion.tsx +15 -0
  74. package/src/alert.css +126 -0
  75. package/src/alert.tsx +25 -0
  76. package/src/avatar.css +75 -0
  77. package/src/avatar.tsx +30 -0
  78. package/src/badge.css +71 -0
  79. package/src/badge.tsx +19 -0
  80. package/src/breadcrumb.css +166 -0
  81. package/src/breadcrumb.tsx +71 -0
  82. package/src/button.css +214 -0
  83. package/src/button.tsx +30 -0
  84. package/src/card.css +99 -0
  85. package/src/card.tsx +41 -0
  86. package/src/carousel.css +183 -0
  87. package/src/carousel.tsx +30 -0
  88. package/src/checkbox.css +56 -0
  89. package/src/checkbox.tsx +10 -0
  90. package/src/cn.ts +7 -0
  91. package/src/dialog.css +175 -0
  92. package/src/dialog.tsx +47 -0
  93. package/src/dropdown-menu.css +257 -0
  94. package/src/dropdown-menu.tsx +88 -0
  95. package/src/hover-card.css +75 -0
  96. package/src/hover-card.tsx +16 -0
  97. package/src/index.css +33 -0
  98. package/src/index.ts +37 -0
  99. package/src/input.css +62 -0
  100. package/src/input.tsx +10 -0
  101. package/src/kbd.css +32 -0
  102. package/src/kbd.tsx +14 -0
  103. package/src/label.css +17 -0
  104. package/src/label.tsx +10 -0
  105. package/src/pagination.css +150 -0
  106. package/src/pagination.tsx +95 -0
  107. package/src/popover.css +65 -0
  108. package/src/popover.tsx +16 -0
  109. package/src/progress.css +79 -0
  110. package/src/progress.tsx +19 -0
  111. package/src/radio.css +61 -0
  112. package/src/radio.tsx +14 -0
  113. package/src/root.css +78 -0
  114. package/src/select.css +164 -0
  115. package/src/select.tsx +22 -0
  116. package/src/separator.css +14 -0
  117. package/src/separator.tsx +10 -0
  118. package/src/sheet.css +225 -0
  119. package/src/sheet.tsx +48 -0
  120. package/src/skeleton.css +15 -0
  121. package/src/skeleton.tsx +8 -0
  122. package/src/slider.css +68 -0
  123. package/src/slider.tsx +8 -0
  124. package/src/spinner.css +43 -0
  125. package/src/spinner.tsx +24 -0
  126. package/src/switch.css +79 -0
  127. package/src/switch.tsx +18 -0
  128. package/src/table.css +77 -0
  129. package/src/table.tsx +14 -0
  130. package/src/tabs.css +110 -0
  131. package/src/tabs.tsx +38 -0
  132. package/src/textarea.css +38 -0
  133. package/src/textarea.tsx +8 -0
  134. package/src/toggle.css +148 -0
  135. package/src/toggle.tsx +47 -0
  136. package/src/tooltip.css +60 -0
  137. package/src/tooltip.tsx +16 -0
  138. package/src/types.d.ts +42 -0
  139. package/src/typography.css +176 -0
  140. 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
+ }