@editio-ui/react 0.0.0-stage → 0.1.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 (37) hide show
  1. package/dist/components/button/button.d.ts +17 -0
  2. package/dist/components/button/button.js +11 -0
  3. package/dist/components/button/index.d.ts +2 -0
  4. package/dist/components/checkbox/checkbox.d.ts +23 -0
  5. package/dist/components/checkbox/checkbox.js +19 -0
  6. package/dist/components/checkbox/index.d.ts +2 -0
  7. package/dist/components/input/index.d.ts +2 -0
  8. package/dist/components/input/input.d.ts +15 -0
  9. package/dist/components/input/input.js +14 -0
  10. package/dist/components/radio-group/index.d.ts +2 -0
  11. package/dist/components/radio-group/radio-group.d.ts +31 -0
  12. package/dist/components/radio-group/radio-group.js +47 -0
  13. package/dist/components/separator/index.d.ts +2 -0
  14. package/dist/components/separator/separator.d.ts +18 -0
  15. package/dist/components/separator/separator.js +13 -0
  16. package/dist/components/switch/index.d.ts +2 -0
  17. package/dist/components/switch/switch.d.ts +7 -0
  18. package/dist/components/switch/switch.js +12 -0
  19. package/dist/components/textarea/index.d.ts +2 -0
  20. package/dist/components/textarea/textarea.d.ts +15 -0
  21. package/dist/components/textarea/textarea.js +14 -0
  22. package/dist/editorial/backgrounds.css +201 -0
  23. package/dist/editorial/buttons.css +209 -0
  24. package/dist/editorial/choices.css +360 -0
  25. package/dist/editorial/disclosure.css +359 -0
  26. package/dist/editorial/feedback.css +272 -0
  27. package/dist/editorial/fields.css +205 -0
  28. package/dist/editorial/motion.css +184 -0
  29. package/dist/editorial/showcase.css +395 -0
  30. package/dist/editorial/tokens.css +129 -0
  31. package/dist/editorial/type.css +379 -0
  32. package/dist/editorial-fonts.css +4 -0
  33. package/dist/editorial.css +2704 -0
  34. package/dist/index.d.ts +14 -0
  35. package/dist/index.js +8 -0
  36. package/package.json +74 -4
  37. package/README.md +0 -3
@@ -0,0 +1,395 @@
1
+ /* ==========================================================================
2
+ Showcase: page-sized pieces. Covers, indexes, cards, galleries, charts,
3
+ tables and timelines. Native elements and CSS; scroll-driven effects are
4
+ progressive enhancement and fall back to a still page.
5
+ ========================================================================== */
6
+
7
+ /* @variant showcase/cover */
8
+ /* Cover story. Text lines settle in one after another, the picture is
9
+ uncovered like a curtain going up. */
10
+ .ed-cover { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: end; color: var(--ed-ink); }
11
+ .ed-cover__text { display: grid; gap: 1.1rem; justify-items: start; }
12
+ .ed-cover__text > * { margin: 0; animation: ed-cover-in 0.85s var(--ed-ease) both; }
13
+ .ed-cover__text > :nth-child(2) { animation-delay: 0.1s; }
14
+ .ed-cover__text > :nth-child(3) { animation-delay: 0.2s; }
15
+ .ed-cover__text > :nth-child(4) { animation-delay: 0.3s; }
16
+ .ed-cover__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; }
17
+ .ed-cover__media { margin: 0; animation: ed-cover-curtain 1.2s var(--ed-ease) 0.15s both; }
18
+ .ed-cover__media figcaption { margin-top: 0.55rem; font: 500 0.6875rem/1.4 var(--ed-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-ink-2); }
19
+ @keyframes ed-cover-in { from { opacity: 0; transform: translateY(1.1rem); } }
20
+ @keyframes ed-cover-curtain { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
21
+ @media (prefers-reduced-motion: reduce) { .ed-cover__text > *, .ed-cover__media { animation: none; } }
22
+ /* @end */
23
+
24
+ /* @variant showcase/index */
25
+ /* Hover index. Rows list stories; the one you point at slides a picture out
26
+ and the rest step back. The picture is a placeholder until you add an <img>.
27
+ Works with keyboard focus too. */
28
+ .ed-index { max-width: 46rem; margin: 0; padding: 0; list-style: none; color: var(--ed-ink); border-top: var(--ed-thick) solid var(--ed-ink); counter-reset: ed-idx; }
29
+ .ed-index li { counter-increment: ed-idx; border-bottom: var(--ed-hair) solid var(--ed-ink); transition: opacity 0.35s; }
30
+ .ed-index:has(a:is(:hover, :focus-visible)) li:not(:has(a:is(:hover, :focus-visible))) { opacity: 0.3; }
31
+ .ed-index a {
32
+ display: grid;
33
+ grid-template-columns: 2.4rem minmax(0, 1fr) auto auto auto;
34
+ align-items: center;
35
+ gap: 1rem;
36
+ padding: 1.05rem 0;
37
+ color: inherit;
38
+ text-decoration: none;
39
+ }
40
+ .ed-index a:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; }
41
+ .ed-index a::before { content: counter(ed-idx, decimal-leading-zero); font: 600 0.75rem/1 var(--ed-font-mono); color: var(--ed-ink-2); }
42
+ .ed-index a::after {
43
+ content: "";
44
+ width: 1.2rem;
45
+ height: 1.2rem;
46
+ background: currentColor;
47
+ -webkit-mask: var(--ed-i-arrow) center / contain no-repeat;
48
+ mask: var(--ed-i-arrow) center / contain no-repeat;
49
+ transform: translateX(-0.4rem);
50
+ opacity: 0;
51
+ transition: transform 0.4s var(--ed-ease), opacity 0.3s;
52
+ }
53
+ .ed-index__title { font: italic 500 clamp(1.35rem, 3vw, 1.9rem)/1.1 var(--ed-font-swash); transition: transform 0.45s var(--ed-ease); }
54
+ .ed-index__tag { font: 700 0.6875rem/1 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-ink-2); }
55
+ .ed-index__thumb {
56
+ display: block;
57
+ width: 0;
58
+ height: 3.4rem;
59
+ overflow: hidden;
60
+ opacity: 0;
61
+ background:
62
+ linear-gradient(to top right, transparent calc(50% - 0.5px), var(--ed-ink-2) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
63
+ linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--ed-ink-2) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
64
+ radial-gradient(circle, var(--ed-tint) 1px, transparent 1.3px) 0 0 / 5px 5px,
65
+ var(--ed-paper);
66
+ box-shadow: inset 0 0 0 var(--ed-hair) var(--ed-ink);
67
+ transition: width 0.5s var(--ed-ease), opacity 0.3s;
68
+ }
69
+ /* A placeholder until you give it a picture: put an <img> inside and it covers the crosses. */
70
+ .ed-index__thumb img { display: block; width: 6.5rem; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35); }
71
+ .ed-index a:hover .ed-index__thumb,
72
+ .ed-index a:focus-visible .ed-index__thumb { width: 6.5rem; opacity: 1; }
73
+ .ed-index a:hover .ed-index__title,
74
+ .ed-index a:focus-visible .ed-index__title { transform: translateX(0.4rem); }
75
+ .ed-index a:hover::after,
76
+ .ed-index a:focus-visible::after { transform: none; opacity: 1; }
77
+ @media (max-width: 34rem) { .ed-index a { grid-template-columns: 2rem minmax(0, 1fr) auto auto; } .ed-index__thumb { display: none; } }
78
+ @media (prefers-reduced-motion: reduce) { .ed-index li, .ed-index__thumb, .ed-index__title, .ed-index a::after { transition: none; } }
79
+ /* @end */
80
+
81
+ /* @variant showcase/flip */
82
+ /* Flip card. The card turns over on hover, focus or tap to show its back.
83
+ Both faces stay in the page, so a screen reader reads both. */
84
+ .ed-flip { width: 17rem; max-width: 100%; aspect-ratio: 3 / 4; color: var(--ed-ink); perspective: 1200px; }
85
+ .ed-flip:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 6px; }
86
+ .ed-flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.85s var(--ed-ease); }
87
+ .ed-flip:hover .ed-flip__inner,
88
+ .ed-flip:focus-within .ed-flip__inner,
89
+ .ed-flip:focus .ed-flip__inner { transform: rotateY(180deg); }
90
+ .ed-flip__face {
91
+ position: absolute;
92
+ inset: 0;
93
+ display: grid;
94
+ align-content: space-between;
95
+ gap: 1rem;
96
+ padding: 1.25rem;
97
+ border: 1.5px solid var(--ed-ink);
98
+ -webkit-backface-visibility: hidden;
99
+ backface-visibility: hidden;
100
+ }
101
+ .ed-flip__front { background: radial-gradient(circle, var(--ed-tint) 1.2px, transparent 1.5px) 0 0 / 7px 7px, var(--ed-paper); }
102
+ .ed-flip__back { color: var(--ed-paper); background: var(--ed-ink); transform: rotateY(180deg); }
103
+ .ed-flip__no { margin: 0; font: 600 0.75rem/1 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
104
+ .ed-flip__title { margin: 0; font: italic 500 2.3rem/1 var(--ed-font-swash); text-wrap: balance; }
105
+ .ed-flip__hint { margin: 0; font: 600 0.6875rem/1 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-ink-2); }
106
+ .ed-flip__back p { margin: 0; font: 400 1rem/1.5 var(--ed-font-text); }
107
+ .ed-flip__back .ed-flip__no { font: 600 0.75rem/1 var(--ed-font-mono); opacity: 0.7; }
108
+ @media (prefers-reduced-motion: reduce) {
109
+ .ed-flip__inner { transform: none !important; transition: none; }
110
+ .ed-flip__face { position: relative; backface-visibility: visible; transform: none; }
111
+ .ed-flip__inner { display: grid; gap: 0.75rem; height: auto; }
112
+ .ed-flip { aspect-ratio: auto; }
113
+ }
114
+ /* @end */
115
+
116
+ /* @variant showcase/carousel */
117
+ /* Carousel from scroll-snap. Swipe, scroll, or focus the strip and use the
118
+ arrow keys. Where supported, cards ease in and out as they cross the edge. */
119
+ .ed-carousel { color: var(--ed-ink); }
120
+ .ed-carousel__track {
121
+ display: flex;
122
+ gap: 1rem;
123
+ margin: 0;
124
+ padding: 0.6rem 0.2rem 1.3rem;
125
+ overflow-x: auto;
126
+ list-style: none;
127
+ scroll-snap-type: x mandatory;
128
+ scroll-behavior: smooth;
129
+ overscroll-behavior-x: contain;
130
+ scrollbar-width: thin;
131
+ scrollbar-color: var(--ed-ink) transparent;
132
+ }
133
+ .ed-carousel__track:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 3px; }
134
+ .ed-carousel__track > li { flex: 0 0 min(76%, 16.5rem); scroll-snap-align: start; }
135
+ .ed-slide {
136
+ display: grid;
137
+ grid-template-rows: auto 1fr auto;
138
+ gap: 1rem;
139
+ height: 100%;
140
+ min-height: 17rem;
141
+ padding: 1.2rem;
142
+ background: radial-gradient(circle at 100% 0, var(--ed-tint) 1.2px, transparent 1.5px) 0 0 / 7px 7px, var(--ed-paper);
143
+ border: 1.5px solid var(--ed-ink);
144
+ transition: transform 0.4s var(--ed-ease), box-shadow 0.4s var(--ed-ease);
145
+ }
146
+ .ed-slide:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ed-accent); }
147
+ .ed-slide__no { margin: 0; font: italic 500 3rem/0.9 var(--ed-font-swash); }
148
+ .ed-slide__title { margin: 0; align-self: end; font: 800 1.2rem/1.12 var(--ed-font-display); font-stretch: 106%; text-wrap: balance; }
149
+ .ed-slide__meta { margin: 0; font: 500 0.6875rem/1.3 var(--ed-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ed-ink-2); }
150
+ @supports (animation-timeline: view(inline)) {
151
+ .ed-carousel__track > li > .ed-slide { animation: ed-slide-edge linear both; animation-timeline: view(inline); }
152
+ }
153
+ @keyframes ed-slide-edge {
154
+ 0% { opacity: 0.35; scale: 0.94; }
155
+ 30%, 70% { opacity: 1; scale: 1; }
156
+ 100% { opacity: 0.35; scale: 0.94; }
157
+ }
158
+ @media (prefers-reduced-motion: reduce) { .ed-carousel__track { scroll-behavior: auto; } .ed-slide { transition: none; animation: none !important; } }
159
+ /* @end */
160
+
161
+ /* @variant showcase/filter */
162
+ /* Filter grid with no script. A segmented control of radios decides which
163
+ cards show; ones that appear pop in. Add one rule per topic. */
164
+ .ed-filter { display: grid; gap: 1.5rem; max-width: 46rem; color: var(--ed-ink); }
165
+ .ed-filter__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
166
+ .ed-filter__item { display: grid; align-content: space-between; gap: 1.6rem; min-height: 9rem; padding: 1rem; border: 1.5px solid var(--ed-ink); animation: ed-filter-in 0.55s var(--ed-ease) both; }
167
+ .ed-filter__item h3 { margin: 0; font: 800 1.05rem/1.15 var(--ed-font-display); font-stretch: 106%; text-wrap: balance; }
168
+ .ed-filter__item p { margin: 0; font: 500 0.6875rem/1 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-ink-2); }
169
+ .ed-filter:has(input[value="film"]:checked) .ed-filter__item:not([data-topic="film"]),
170
+ .ed-filter:has(input[value="music"]:checked) .ed-filter__item:not([data-topic="music"]),
171
+ .ed-filter:has(input[value="print"]:checked) .ed-filter__item:not([data-topic="print"]),
172
+ .ed-filter:has(input[value="essay"]:checked) .ed-filter__item:not([data-topic="essay"]) { display: none; }
173
+ @keyframes ed-filter-in { from { opacity: 0; transform: translateY(0.8rem) scale(0.96); } }
174
+ @media (prefers-reduced-motion: reduce) { .ed-filter__item { animation: none; } }
175
+ /* @end */
176
+
177
+ /* @variant showcase/chart */
178
+ /* Bar chart from a list. Heights come from --v (0 to 100) and the bars grow
179
+ from the baseline. The values are real text, so no chart library. */
180
+ .ed-chart { max-width: 34rem; margin: 0; color: var(--ed-ink); }
181
+ .ed-chart figcaption { margin-bottom: 1.4rem; font: italic 500 1.35rem/1.15 var(--ed-font-swash); }
182
+ .ed-chart figcaption small { display: block; margin-top: 0.4rem; font: 500 0.6875rem/1.3 var(--ed-font-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ed-ink-2); }
183
+ .ed-chart__bars {
184
+ display: grid;
185
+ grid-auto-flow: column;
186
+ grid-auto-columns: 1fr;
187
+ gap: 0.7rem;
188
+ height: 13rem;
189
+ margin: 0 0 2rem;
190
+ padding: 1.4rem 0 0;
191
+ list-style: none;
192
+ background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--ed-tint) calc(25% - 1px) 25%);
193
+ background-origin: content-box;
194
+ background-clip: content-box;
195
+ border-bottom: var(--ed-hair) solid var(--ed-ink);
196
+ }
197
+ .ed-chart__bars li { position: relative; display: grid; align-items: end; min-width: 0; }
198
+ .ed-chart__bar {
199
+ position: relative;
200
+ align-self: end;
201
+ height: calc(var(--v) * 1%);
202
+ background: repeating-linear-gradient(135deg, var(--ed-ink) 0 2px, transparent 2px 6px);
203
+ border-top: 3px solid var(--ed-ink);
204
+ transform-origin: bottom;
205
+ animation: ed-bar-up 1s var(--ed-ease) both;
206
+ animation-delay: calc(var(--i, 0) * 0.08s);
207
+ transition: background-color 0.3s;
208
+ }
209
+ .ed-chart__bars li[data-hi] .ed-chart__bar { background: var(--ed-ink); }
210
+ .ed-chart__bars li:hover .ed-chart__bar { background-color: var(--ed-accent-tint); }
211
+ .ed-chart__bar b {
212
+ position: absolute;
213
+ inset: auto 0 calc(100% + 0.4rem);
214
+ font: 700 0.75rem/1 var(--ed-font-mono);
215
+ text-align: center;
216
+ animation: ed-fade-in 0.5s ease 0.7s both;
217
+ animation-delay: calc(var(--i, 0) * 0.08s + 0.7s);
218
+ }
219
+ .ed-chart__bars i { position: absolute; inset: 100% 0 auto; padding-top: 0.6rem; font: 600 0.6875rem/1 var(--ed-font-mono); font-style: normal; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; color: var(--ed-ink-2); }
220
+ @keyframes ed-bar-up { from { transform: scaleY(0); } }
221
+ @keyframes ed-fade-in { from { opacity: 0; } }
222
+ @media (prefers-reduced-motion: reduce) { .ed-chart__bar, .ed-chart__bar b { animation: none; } }
223
+ /* @end */
224
+
225
+ /* @variant showcase/table */
226
+ /* Ledger table. Hairline rows, mono numerals, and a highlight that wipes
227
+ across the row you are on. Wrap it in a focusable region so wide tables
228
+ scroll by keyboard. */
229
+ .ed-table-wrap { max-width: 100%; overflow-x: auto; color: var(--ed-ink); }
230
+ .ed-table-wrap:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 3px; }
231
+ .ed-table { width: 100%; min-width: 30rem; border-collapse: collapse; font: 400 1rem/1.35 var(--ed-font-text); }
232
+ .ed-table caption { padding-bottom: 0.9rem; text-align: left; font: italic 500 1.4rem/1.1 var(--ed-font-swash); }
233
+ .ed-table thead th {
234
+ padding: 0.75rem 0.9rem;
235
+ text-align: left;
236
+ font: 800 0.6875rem/1 var(--ed-font-display);
237
+ letter-spacing: 0.12em;
238
+ text-transform: uppercase;
239
+ border-top: var(--ed-thick) solid var(--ed-ink);
240
+ border-bottom: var(--ed-hair) solid var(--ed-ink);
241
+ }
242
+ .ed-table th[scope="row"] { font-weight: 600; text-align: left; }
243
+ .ed-table th, .ed-table td { padding: 0.9rem; }
244
+ .ed-table tbody th, .ed-table tbody td { border-bottom: var(--ed-hair) solid var(--ed-tint); }
245
+ .ed-table [data-num] { text-align: right; font: 500 0.875rem/1 var(--ed-font-mono); font-variant-numeric: tabular-nums; }
246
+ .ed-table thead [data-num] { text-align: right; }
247
+ .ed-table tbody tr { background: linear-gradient(var(--ed-accent-tint), var(--ed-accent-tint)) 0 0 / 0 100% no-repeat; transition: background-size 0.5s var(--ed-ease); }
248
+ .ed-table tbody tr:hover { background-size: 100% 100%; }
249
+ .ed-table [data-dir]::before { content: ""; display: inline-block; margin-right: 0.5em; border: 0.28em solid transparent; }
250
+ .ed-table [data-dir="up"]::before { border-width: 0 0.3em 0.5em; border-bottom-color: var(--ed-ink); }
251
+ .ed-table [data-dir="down"]::before { border-width: 0.5em 0.3em 0; border-top-color: var(--ed-hot); }
252
+ .ed-table tfoot td, .ed-table tfoot th { font-weight: 700; border-top: var(--ed-hair) solid var(--ed-ink); }
253
+ @media (prefers-reduced-motion: reduce) { .ed-table tbody tr { transition: none; } }
254
+ /* @end */
255
+
256
+ /* @variant showcase/timeline */
257
+ /* Vertical timeline. The spine draws down, then each entry rises in. Where
258
+ scroll-driven animation is supported the entries arrive as you scroll. */
259
+ .ed-timeline { position: relative; max-width: 36rem; margin: 0; padding: 0 0 0 2.2rem; list-style: none; color: var(--ed-ink); }
260
+ .ed-timeline::before {
261
+ content: "";
262
+ position: absolute;
263
+ top: 0.5rem;
264
+ bottom: 0.5rem;
265
+ left: 0.42rem;
266
+ width: 2px;
267
+ background: var(--ed-ink);
268
+ transform-origin: top;
269
+ animation: ed-tl-draw 1.5s var(--ed-ease) both;
270
+ }
271
+ .ed-timeline li { position: relative; padding-bottom: 1.9rem; animation: ed-tl-in 0.7s var(--ed-ease) both; }
272
+ .ed-timeline li:last-child { padding-bottom: 0; }
273
+ .ed-timeline li:nth-child(1) { animation-delay: 0.15s; }
274
+ .ed-timeline li:nth-child(2) { animation-delay: 0.35s; }
275
+ .ed-timeline li:nth-child(3) { animation-delay: 0.55s; }
276
+ .ed-timeline li:nth-child(4) { animation-delay: 0.75s; }
277
+ .ed-timeline li:nth-child(5) { animation-delay: 0.95s; }
278
+ .ed-timeline li::before {
279
+ content: "";
280
+ position: absolute;
281
+ top: 0.28rem;
282
+ left: -2.2rem;
283
+ width: 0.95rem;
284
+ height: 0.95rem;
285
+ background: var(--ed-paper);
286
+ border: 2px solid var(--ed-ink);
287
+ border-radius: 50%;
288
+ }
289
+ .ed-timeline li[data-state="now"]::before { background: var(--ed-accent); animation: ed-tl-ring 2s ease-out infinite; }
290
+ .ed-timeline time { display: block; margin-bottom: 0.35rem; font: 600 0.6875rem/1 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-ink-2); }
291
+ .ed-timeline h3 { margin: 0 0 0.3rem; font: italic 500 1.5rem/1.1 var(--ed-font-swash); }
292
+ .ed-timeline p { margin: 0; font: 400 1rem/1.5 var(--ed-font-text); color: var(--ed-ink-2); }
293
+ @keyframes ed-tl-draw { from { transform: scaleY(0); } }
294
+ @keyframes ed-tl-in { from { opacity: 0; transform: translateY(1rem); } }
295
+ @keyframes ed-tl-ring { 0% { box-shadow: 0 0 0 0 var(--ed-accent-tint); } 70%, 100% { box-shadow: 0 0 0 0.6rem transparent; } }
296
+ @supports (animation-timeline: view()) {
297
+ .ed-timeline li { animation: ed-tl-in linear both; animation-timeline: view(); animation-range: entry 5% entry 55%; animation-delay: 0s; }
298
+ }
299
+ @media (prefers-reduced-motion: reduce) {
300
+ .ed-timeline::before, .ed-timeline li, .ed-timeline li[data-state="now"]::before { animation: none; }
301
+ }
302
+ /* @end */
303
+
304
+ /* @variant showcase/develop */
305
+ /* Darkroom hover. A bench seen from above, lit by one safelight. The sheet
306
+ lies blank in the tray, then the picture comes up through the bath as you
307
+ point at it, and a caption slides up. A link, so it is keyboard reachable. */
308
+ .ed-develop {
309
+ --ed-light: color-mix(in srgb, var(--ed-accent) 70%, #000);
310
+ position: relative;
311
+ display: block;
312
+ width: 22rem;
313
+ max-width: 100%;
314
+ aspect-ratio: 4 / 5;
315
+ overflow: hidden;
316
+ isolation: isolate;
317
+ color: #fff;
318
+ text-decoration: none;
319
+ background:
320
+ radial-gradient(ellipse 85% 60% at 88% 0%, var(--ed-light), transparent 70%),
321
+ repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 2.2rem),
322
+ #060606;
323
+ animation: ed-develop-in 1.1s var(--ed-ease) both;
324
+ }
325
+ .ed-develop:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 4px; }
326
+ /* the tray */
327
+ .ed-develop::before {
328
+ content: "";
329
+ position: absolute;
330
+ inset: 10% 9% 12%;
331
+ z-index: -1;
332
+ background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015) 55%);
333
+ border: 2px solid rgba(255, 255, 255, 0.2);
334
+ box-shadow: 0 0 0 0.45rem rgba(255, 255, 255, 0.035), inset 0 0 2.2rem rgba(0, 0, 0, 0.7);
335
+ }
336
+ /* the bath ripples when the sheet is touched */
337
+ .ed-develop::after {
338
+ content: "";
339
+ position: absolute;
340
+ inset: 10% 9% 12%;
341
+ z-index: -1;
342
+ border: 1px solid rgba(255, 255, 255, 0.35);
343
+ opacity: 0;
344
+ pointer-events: none;
345
+ }
346
+ .ed-develop:hover::after, .ed-develop:focus-visible::after { animation: ed-develop-ripple 2.4s ease-out 0.2s; }
347
+ .ed-develop__print {
348
+ position: absolute;
349
+ inset: 19% 17% 23%;
350
+ display: block;
351
+ width: calc(100% - 34%);
352
+ height: calc(100% - 42%);
353
+ object-fit: cover;
354
+ background: #d8d8d8;
355
+ border: 0.45rem solid #d8d8d8;
356
+ box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.65);
357
+ rotate: -3deg;
358
+ filter: grayscale(1) brightness(3.4) contrast(0.06) blur(1.5px);
359
+ transition: filter 2.6s var(--ed-ease), rotate 1.6s var(--ed-ease);
360
+ }
361
+ .ed-develop__cap { position: absolute; inset: auto 0 0; display: grid; gap: 0.35rem; padding: 2.4rem 1.1rem 1.1rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.88)); translate: 0 100%; transition: translate 0.7s var(--ed-ease); }
362
+ .ed-develop__cap b { font: 800 0.6875rem/1 var(--ed-font-display); letter-spacing: 0.14em; text-transform: uppercase; }
363
+ .ed-develop__cap span { font: italic 500 1.35rem/1.1 var(--ed-font-swash); }
364
+ .ed-develop:hover .ed-develop__print, .ed-develop:focus-visible .ed-develop__print { filter: none; rotate: -1deg; }
365
+ .ed-develop:hover .ed-develop__cap, .ed-develop:focus-visible .ed-develop__cap { translate: 0 0; }
366
+ @keyframes ed-develop-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
367
+ @keyframes ed-develop-ripple { from { opacity: 0.8; scale: 0.9; } to { opacity: 0; scale: 1.12; } }
368
+ @media (hover: none) { .ed-develop__print { filter: none; rotate: -1deg; } .ed-develop__cap { translate: 0 0; } }
369
+ @media (prefers-reduced-motion: reduce) { .ed-develop, .ed-develop__print, .ed-develop__cap { animation: none; transition: none; } .ed-develop::after { display: none; } }
370
+ /* @end */
371
+
372
+ /* @variant showcase/paywall */
373
+ /* Metered paywall. The article fades into the page and a card with an offset
374
+ shadow rises over the break. */
375
+ .ed-wall { max-width: 36rem; color: var(--ed-ink); }
376
+ .ed-wall__text { max-height: 12.5rem; overflow: hidden; font: 400 1.0625rem/1.6 var(--ed-font-text); -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
377
+ .ed-wall__text p { margin: 0 0 1em; }
378
+ .ed-wall__gate {
379
+ position: relative;
380
+ display: grid;
381
+ gap: 0.9rem;
382
+ justify-items: center;
383
+ margin-top: -2.6rem;
384
+ padding: 1.6rem 1.4rem;
385
+ text-align: center;
386
+ background: var(--ed-paper);
387
+ border: 1.5px solid var(--ed-ink);
388
+ box-shadow: 6px 6px 0 var(--ed-accent);
389
+ animation: ed-gate-in 0.9s var(--ed-ease) 0.25s both;
390
+ }
391
+ .ed-wall__gate h3 { margin: 0; font: italic 500 1.9rem/1.05 var(--ed-font-swash); text-wrap: balance; }
392
+ .ed-wall__gate p { margin: 0; font: 400 1rem/1.5 var(--ed-font-text); color: var(--ed-ink-2); }
393
+ @keyframes ed-gate-in { from { opacity: 0; transform: translateY(1.6rem); } }
394
+ @media (prefers-reduced-motion: reduce) { .ed-wall__gate { animation: none; } }
395
+ /* @end */
@@ -0,0 +1,129 @@
1
+ /* ==========================================================================
2
+ Editio Editorial: tokens
3
+ Everything in this kit reads these custom properties and nothing else.
4
+ Change a token and every component follows. Themes are just token sets.
5
+
6
+ Palette tokens --ed-p-* the theme's real colours (edit these)
7
+ Role tokens --ed-paper / --ed-ink / --ed-accent what components use
8
+ Surfaces data-ed-surface="paper|ink|accent" swaps the roles locally
9
+ ========================================================================== */
10
+
11
+ /* @variant tokens */
12
+ @property --ed-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
13
+ @property --ed-m { syntax: "<length-percentage>"; inherits: false; initial-value: 8px; }
14
+
15
+ /* Theme 1: Mono. The default. White stock, black ink, one mid grey. */
16
+ :root,
17
+ [data-ed-theme="mono"] {
18
+ --ed-p-paper: #ffffff;
19
+ --ed-p-ink: #0a0a0a;
20
+ --ed-p-accent: #8e8e8e;
21
+ --ed-p-on-accent: #0a0a0a;
22
+ --ed-hot: #3d3d3d;
23
+
24
+ --ed-font-display: "Archivo Variable", "Archivo", "Helvetica Neue", Arial, sans-serif;
25
+ --ed-font-swash: "Bodoni Moda Variable", "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
26
+ --ed-font-text: "Newsreader Variable", "Newsreader", Georgia, "Times New Roman", serif;
27
+ --ed-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
28
+
29
+ --ed-hair: 1px; /* hairline rule weight */
30
+ --ed-thick: 3px; /* heavy rule weight */
31
+ --ed-radius: 0px; /* 0 is the point. Raise it if you must. */
32
+ --ed-dot: 7px; /* halftone cell size */
33
+ --ed-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
34
+ --ed-grain-blend: multiply;
35
+ --ed-grain-opacity: 0.32;
36
+ --ed-ht-blend: multiply; /* halftone on light stock: black dots multiplied in */
37
+ --ed-ht-invert: 0;
38
+ }
39
+
40
+ /* Theme 2: Graphite. Mono turned over: near-black stock, off-white ink. */
41
+ [data-ed-theme="graphite"] {
42
+ color-scheme: dark;
43
+ --ed-p-paper: #0d0d0d;
44
+ --ed-p-ink: #ececec;
45
+ --ed-p-accent: #8a8a8a;
46
+ --ed-p-on-accent: #0d0d0d;
47
+ --ed-hot: #bcbcbc;
48
+ --ed-grain-blend: screen;
49
+ --ed-grain-opacity: 0.14;
50
+ --ed-ht-blend: screen; /* halftone on dark stock: light dots screened in */
51
+ --ed-ht-invert: 1;
52
+ }
53
+
54
+ /* Theme 3: Bone. Warm grey stock, soft black. */
55
+ [data-ed-theme="bone"] {
56
+ --ed-p-paper: #ebe8e2;
57
+ --ed-p-ink: #181715;
58
+ --ed-p-accent: #8d887e;
59
+ --ed-p-on-accent: #181715;
60
+ --ed-hot: #4a4640;
61
+ --ed-font-swash: "Newsreader Variable", "Newsreader", Georgia, serif;
62
+ }
63
+
64
+ /* Theme 4: Slate. Cool grey stock with one muted blue-grey. */
65
+ [data-ed-theme="slate"] {
66
+ --ed-p-paper: #eef0f3;
67
+ --ed-p-ink: #0f1620;
68
+ --ed-p-accent: #4d5f7a;
69
+ --ed-p-on-accent: #ffffff;
70
+ --ed-hot: #2b3647;
71
+ --ed-font-swash: "Instrument Serif", "Bodoni Moda Variable", Georgia, serif;
72
+ }
73
+
74
+ /* Theme 5: Oxide. Warm paper with a single brick red. */
75
+ [data-ed-theme="oxide"] {
76
+ --ed-p-paper: #f3efea;
77
+ --ed-p-ink: #1b1512;
78
+ --ed-p-accent: #8a3b2e;
79
+ --ed-p-on-accent: #fff7f0;
80
+ --ed-hot: #5c2a22;
81
+ --ed-font-swash: "Playfair Display Variable", "Playfair Display", Didot, Georgia, serif;
82
+ }
83
+
84
+ /* Role tokens: what components actually read. Recomputed wherever a theme or
85
+ surface is declared, so nested themes and surfaces just work. */
86
+ :root,
87
+ [data-ed-theme],
88
+ [data-ed-surface] {
89
+ --ed-paper: var(--ed-p-paper);
90
+ --ed-ink: var(--ed-p-ink);
91
+ --ed-accent: var(--ed-p-accent);
92
+ --ed-on-accent: var(--ed-p-on-accent);
93
+ --ed-paper-2: color-mix(in srgb, var(--ed-paper) 88%, var(--ed-ink));
94
+ --ed-ink-2: color-mix(in srgb, var(--ed-ink) 62%, var(--ed-paper));
95
+ --ed-tint: color-mix(in srgb, var(--ed-ink) 15%, transparent);
96
+ --ed-accent-tint: color-mix(in srgb, var(--ed-accent) 26%, transparent);
97
+
98
+ /* icons are masks, so they take any colour */
99
+ --ed-i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='square'%3E%3Cpath d='M3 12h17M13 5l7 7-7 7'/%3E%3C/svg%3E");
100
+ --ed-i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M4 12.5l5.2 5.2L20 6.5'/%3E%3C/svg%3E");
101
+ --ed-i-scribble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' preserveAspectRatio='none'%3E%3Cpath d='M16 2C8 1.4 1.6 6 2 12.6 2.5 19.6 10 22.6 18 21.5 26.6 20.4 30.6 15 28 8.6 25.4 3.4 18 1.4 9 3.2'/%3E%3C/svg%3E");
102
+ }
103
+
104
+ /* Surfaces: put data-ed-surface on any container. */
105
+ [data-ed-surface] { background: var(--ed-paper); color: var(--ed-ink); }
106
+ [data-ed-surface="paper"] {
107
+ --ed-paper: var(--ed-p-paper);
108
+ --ed-ink: var(--ed-p-ink);
109
+ --ed-accent: var(--ed-p-accent);
110
+ --ed-on-accent: var(--ed-p-on-accent);
111
+ }
112
+ [data-ed-surface="ink"] {
113
+ --ed-paper: var(--ed-p-ink);
114
+ --ed-ink: var(--ed-p-paper);
115
+ --ed-accent: var(--ed-p-accent);
116
+ --ed-on-accent: var(--ed-p-on-accent);
117
+ --ed-grain-blend: screen;
118
+ --ed-grain-opacity: 0.14;
119
+ --ed-ht-blend: screen;
120
+ --ed-ht-invert: 1;
121
+ }
122
+ [data-ed-surface="paper"] { --ed-ht-blend: multiply; --ed-ht-invert: 0; --ed-grain-blend: multiply; --ed-grain-opacity: 0.32; }
123
+ [data-ed-surface="accent"] {
124
+ --ed-paper: var(--ed-p-accent);
125
+ --ed-ink: var(--ed-p-on-accent);
126
+ --ed-accent: var(--ed-p-paper);
127
+ --ed-on-accent: var(--ed-p-ink);
128
+ }
129
+ /* @end */