@xerios/design-system 0.1.2 → 0.1.3

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 (39) hide show
  1. package/CHANGELOG.md +86 -1
  2. package/README.md +11 -7
  3. package/dist/components/CollapsibleAdvanced.svelte +1 -1
  4. package/dist/components/WorkingBorder.svelte +10 -8
  5. package/dist/components/empty/EmptyError.svelte +61 -12
  6. package/dist/components/empty/EmptyError.svelte.d.ts +2 -1
  7. package/dist/components/filters/OptionList.svelte +29 -13
  8. package/dist/components/filters/Panel.svelte +1 -1
  9. package/dist/components/icons.d.ts +3 -0
  10. package/dist/components/icons.js +3 -0
  11. package/dist/components/inputs/Calendar.svelte +232 -172
  12. package/dist/components/inputs/Calendar.svelte.d.ts +2 -0
  13. package/dist/components/inputs/DateField.svelte +209 -92
  14. package/dist/components/inputs/DateField.svelte.d.ts +16 -10
  15. package/dist/components/inputs/DateInput.svelte +22 -9
  16. package/dist/components/inputs/DateInput.svelte.d.ts +3 -0
  17. package/dist/components/inputs/DatePicker.svelte +63 -38
  18. package/dist/components/inputs/DatePicker.svelte.d.ts +5 -2
  19. package/dist/components/inputs/DateRangePicker.svelte +69 -39
  20. package/dist/components/inputs/DateRangePicker.svelte.d.ts +5 -2
  21. package/dist/components/inputs/DateRangeSelect.svelte +26 -25
  22. package/dist/components/inputs/Select.svelte +18 -8
  23. package/dist/components/inputs/TextArea.svelte +1 -1
  24. package/dist/components/scroll/ScrollButton.svelte +260 -0
  25. package/dist/components/scroll/ScrollButton.svelte.d.ts +61 -0
  26. package/dist/components/scroll/ScrollMore.svelte +57 -0
  27. package/dist/components/scroll/ScrollMore.svelte.d.ts +28 -0
  28. package/dist/components/scroll/ScrollToTop.svelte +57 -0
  29. package/dist/components/scroll/ScrollToTop.svelte.d.ts +22 -0
  30. package/dist/css/atoms.css +1 -1
  31. package/dist/css/effects.css +259 -16
  32. package/dist/css/tokens.css +61 -34
  33. package/dist/index.d.ts +3 -0
  34. package/dist/index.js +3 -0
  35. package/dist/lib/dates.d.ts +38 -5
  36. package/dist/lib/dates.js +88 -19
  37. package/dist/lib/edge-glow.d.ts +11 -0
  38. package/dist/lib/edge-glow.js +251 -0
  39. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- /* Light and motion: scroll-edge fades, the lit edge, corner glow, shine, shell atmosphere, the working shimmer, the spotlight and dialog motion. */
1
+ /* Light and motion: scroll-edge fades, the new-content glow, the lit edge, corner glow, shine, shell atmosphere, the working shimmer, the spotlight and dialog motion. */
2
2
 
3
3
  /* ---------- scroll fade ---------- */
4
4
  /* Set by the scrollFade attachment (../lib/scroll-fade.js) on scroll areas that overflow: the top edge fades while there's
@@ -79,6 +79,241 @@
79
79
  }
80
80
  }
81
81
 
82
+ /* ---------- new-content glow ---------- */
83
+ /* Laid for a while by edgeGlow() (../lib/edge-glow.js) over a scroll area, to say new content arrived past its bottom
84
+ (.below) or top (.above) edge, in the working shimmer's metal (--sheen-*: silver greys and an indigo glint on dark,
85
+ grey and violet on light) with the colours it takes on at an angle (steel cyan, dusty rose, champagne gold). The
86
+ overlay covers the area's visible box and clips to its corners. It has three parts:
87
+ - .edge-glow-main, the glow on the edge: a soft metallic bloom pooled on the edge's middle, breathing (::before). It
88
+ holds for --edge-glow-hold (default 1200ms), then fades;
89
+ - the ripples (.edge-glow-waves, holding an .edge-glow-wave for each; --i is each one's order, --n how many): wide
90
+ elliptical rings centred on the edge's middle, growing out and fading, like ripples on water, the metal's colours
91
+ running round the ring. They keep spreading out of the edge after the glow fades, until it all ends; edgeGlow then
92
+ lets the rings under way finish rather than cutting them off. They are cut out with a mask, which would trim a blur
93
+ of their own back to a sharp edge (a filter is applied before the mask), so their softness is a filter on the
94
+ .edge-glow-waves around them instead;
95
+ - the line on the edge (the overlay's ::after): a 1px metal hairline with a pair of bright glints running out from
96
+ its middle to both ends with each ripple, where its ring meets the edge. It lasts as long as the ripples: when the
97
+ glow ends, edgeGlow sets [data-ending] and --edge-glow-line-out (the time the last ring has left), and it fades over
98
+ that time.
99
+ Reach: --edge-glow-size on the area or above (default 120px). Strength: --edge-glow-strength. Reduced motion stills
100
+ it (the global rule in base.css): the rings are hidden at rest, so only the bloom and hairline come and go. */
101
+ @property --edge-glow-turn {
102
+ syntax: '<angle>';
103
+ inherits: false;
104
+ initial-value: 0deg;
105
+ }
106
+ .edge-glow {
107
+ /* Metal catching the light: from the low tone through a bright band, then the colours of its sheen (cyan, indigo,
108
+ rose, gold) and bright again, back to the low tone, so it repeats seamlessly. */
109
+ --edge-glow-hues:
110
+ var(--sheen-lo), var(--sheen-hi) 14%, var(--sheen-cool) 26%, var(--sheen-tint) 38%, var(--sheen-rose) 52%, var(--sheen-gold) 64%,
111
+ var(--sheen-hi) 78%, var(--sheen-lo) 92%;
112
+ position: fixed;
113
+ z-index: var(--z-overlay);
114
+ overflow: clip;
115
+ pointer-events: none;
116
+ animation: edge-glow-in 480ms var(--ease-enter) both;
117
+ }
118
+ /* The light on the edge: holds, then fades, sooner than the ripples (edgeGlow starts the fade at once if the glow ends
119
+ before then). */
120
+ .edge-glow-main {
121
+ position: absolute;
122
+ inset: 0;
123
+ animation: edge-glow-out 700ms var(--ease-exit) var(--edge-glow-hold, 1200ms) forwards;
124
+ }
125
+ /* The line: the low metal tone, faded at both ends, with two glints running out from its middle, one each way, each a
126
+ bright head (the high tone, a cyan fringe ahead) trailing rose and gold back towards the middle. They sit
127
+ --edge-glow-spread either side of the middle and glow by --edge-glow-lit (mixed into their colours, so the line
128
+ under them is untouched), both animated by edge-glow-glint. Over the waves. */
129
+ @property --edge-glow-spread {
130
+ syntax: '<percentage>';
131
+ inherits: false;
132
+ initial-value: 0%;
133
+ }
134
+ @property --edge-glow-lit {
135
+ syntax: '<number>';
136
+ inherits: false;
137
+ initial-value: 0;
138
+ }
139
+ .edge-glow::after {
140
+ --edge-glow-r: calc(50% + var(--edge-glow-spread));
141
+ --edge-glow-l: calc(50% - var(--edge-glow-spread));
142
+ --edge-glow-g1: color-mix(in lch, var(--sheen-cool) calc(var(--edge-glow-lit) * 100%), transparent);
143
+ --edge-glow-g2: color-mix(in lch, var(--sheen-hi) calc(var(--edge-glow-lit) * 100%), transparent);
144
+ --edge-glow-g3: color-mix(in lch, var(--sheen-rose) calc(var(--edge-glow-lit) * 100%), transparent);
145
+ --edge-glow-g4: color-mix(in lch, var(--sheen-gold) calc(var(--edge-glow-lit) * 100%), transparent);
146
+ content: '';
147
+ position: absolute;
148
+ inset-inline: 0;
149
+ bottom: 0;
150
+ height: 1px;
151
+ background:
152
+ linear-gradient(
153
+ 90deg,
154
+ transparent calc(var(--edge-glow-r) - 16%),
155
+ var(--edge-glow-g4) calc(var(--edge-glow-r) - 10%),
156
+ var(--edge-glow-g3) calc(var(--edge-glow-r) - 5%),
157
+ var(--edge-glow-g2) var(--edge-glow-r),
158
+ var(--edge-glow-g1) calc(var(--edge-glow-r) + 3%),
159
+ transparent calc(var(--edge-glow-r) + 6%)
160
+ ),
161
+ linear-gradient(
162
+ 90deg,
163
+ transparent calc(var(--edge-glow-l) - 6%),
164
+ var(--edge-glow-g1) calc(var(--edge-glow-l) - 3%),
165
+ var(--edge-glow-g2) var(--edge-glow-l),
166
+ var(--edge-glow-g3) calc(var(--edge-glow-l) + 5%),
167
+ var(--edge-glow-g4) calc(var(--edge-glow-l) + 10%),
168
+ transparent calc(var(--edge-glow-l) + 16%)
169
+ ),
170
+ linear-gradient(90deg, transparent, color-mix(in lch, var(--sheen-lo) 70%, transparent) 25% 75%, transparent);
171
+ animation: edge-glow-glint 800ms linear infinite;
172
+ }
173
+ /* Ending: it fades out as the last ring spreads (the glints, first in the list, carry on undisturbed). */
174
+ .edge-glow[data-ending]::after {
175
+ animation:
176
+ edge-glow-glint 800ms linear infinite,
177
+ edge-glow-out var(--edge-glow-line-out, 700ms) var(--ease-in) forwards;
178
+ }
179
+ .edge-glow.above::after {
180
+ top: 0;
181
+ bottom: auto;
182
+ }
183
+ /* The bloom: a metallic light pooled on the edge, fading away from it and towards the sides. */
184
+ .edge-glow-main::before {
185
+ content: '';
186
+ position: absolute;
187
+ inset-inline: 10%;
188
+ bottom: 0;
189
+ height: calc(var(--edge-glow-size, 120px) * 0.4);
190
+ max-height: 100%;
191
+ opacity: var(--edge-glow-strength);
192
+ filter: blur(14px);
193
+ background: linear-gradient(90deg, var(--edge-glow-hues)) 0 0 / 200% 100%;
194
+ -webkit-mask-image: radial-gradient(50% 100% at 50% 100%, #000 20%, transparent);
195
+ mask-image: radial-gradient(50% 100% at 50% 100%, #000 20%, transparent);
196
+ transform-origin: 50% 100%;
197
+ animation:
198
+ edge-glow-bloom 640ms var(--ease-enter) both,
199
+ edge-glow-hue 6s linear infinite alternate,
200
+ edge-glow-breathe 1.6s ease-in-out 640ms infinite alternate;
201
+ }
202
+ /* Above: the same bloom with its light and its origin moved up, not flipped (a flip turns it about one of its edges,
203
+ which carries it off the edge it belongs on). */
204
+ .edge-glow.above .edge-glow-main::before {
205
+ top: 0;
206
+ bottom: auto;
207
+ -webkit-mask-image: radial-gradient(50% 100% at 50% 0, #000 20%, transparent);
208
+ mask-image: radial-gradient(50% 100% at 50% 0, #000 20%, transparent);
209
+ transform-origin: 50% 0;
210
+ }
211
+ /* What holds the rings, softening them (see above). */
212
+ .edge-glow-waves {
213
+ position: absolute;
214
+ inset: 0;
215
+ filter: blur(3px);
216
+ }
217
+ /* A ring: a wide ellipse centred on the edge's middle (only its half inside the area shows), drawn as a soft ring of the
218
+ hues turning round it, growing from a sliver at the edge, bright as it leaves and gone as it lands. Hidden at rest,
219
+ so a still one (reduced motion) never shows; edge-glow-ripple brings it in. */
220
+ .edge-glow-wave {
221
+ position: absolute;
222
+ opacity: 0;
223
+ left: 50%;
224
+ bottom: 0;
225
+ width: 170%;
226
+ height: calc(var(--edge-glow-size, 120px) * 2);
227
+ translate: -50% 50%;
228
+ background: conic-gradient(from var(--edge-glow-turn), var(--edge-glow-hues));
229
+ -webkit-mask-image: radial-gradient(closest-side, transparent 72%, #000 88%, transparent 100%);
230
+ mask-image: radial-gradient(closest-side, transparent 72%, #000 88%, transparent 100%);
231
+ animation:
232
+ edge-glow-ripple 2400ms var(--ease-out) calc(var(--i) * 2400ms / var(--n)) infinite backwards,
233
+ edge-glow-turn 5s linear infinite;
234
+ }
235
+ .edge-glow.above .edge-glow-wave {
236
+ top: 0;
237
+ bottom: auto;
238
+ translate: -50% -50%;
239
+ }
240
+
241
+ @keyframes edge-glow-in {
242
+ from {
243
+ opacity: 0;
244
+ }
245
+ }
246
+ @keyframes edge-glow-out {
247
+ to {
248
+ opacity: 0;
249
+ }
250
+ }
251
+ @keyframes edge-glow-bloom {
252
+ from {
253
+ opacity: 0;
254
+ scale: 0.4 0.2;
255
+ }
256
+ }
257
+ /* The glints ride out with each ripple's ring, at the brightest part of it where it meets the edge: 88% of the ring's
258
+ half-width (85% of the line) from the middle, so 74.8% × the ring's scale. A ring starts every 800ms (2400ms / 3) and
259
+ has reached the line's ends by then, so the glints repeat at that period and follow the first third of a ring's
260
+ spread: its scale on --ease-out sampled at each quarter (0.15, 0.2825, 0.4137, 0.5354, 0.6421) and run linearly
261
+ between. They light as the ring does and are dark again as the loop restarts, so it doesn't jump. */
262
+ @keyframes edge-glow-glint {
263
+ 0% {
264
+ --edge-glow-spread: 11.22%;
265
+ --edge-glow-lit: 0;
266
+ }
267
+ 25% {
268
+ --edge-glow-spread: 21.13%;
269
+ }
270
+ 36% {
271
+ --edge-glow-lit: 1;
272
+ }
273
+ 50% {
274
+ --edge-glow-spread: 30.95%;
275
+ }
276
+ 75% {
277
+ --edge-glow-spread: 40.05%;
278
+ }
279
+ 100% {
280
+ --edge-glow-spread: 48.03%;
281
+ --edge-glow-lit: 0;
282
+ }
283
+ }
284
+ @keyframes edge-glow-hue {
285
+ to {
286
+ background-position-x: 100%;
287
+ }
288
+ }
289
+ /* From full, where the bloom's entry leaves it, so it eases down into the breath rather than dropping to it. */
290
+ @keyframes edge-glow-breathe {
291
+ from {
292
+ opacity: var(--edge-glow-strength);
293
+ }
294
+ to {
295
+ opacity: calc(var(--edge-glow-strength) * 0.55);
296
+ }
297
+ }
298
+ @keyframes edge-glow-turn {
299
+ to {
300
+ --edge-glow-turn: 360deg;
301
+ }
302
+ }
303
+ @keyframes edge-glow-ripple {
304
+ 0% {
305
+ scale: 0.15 0.05;
306
+ opacity: 0;
307
+ }
308
+ 12% {
309
+ opacity: var(--edge-glow-strength);
310
+ }
311
+ 100% {
312
+ scale: 1;
313
+ opacity: 0;
314
+ }
315
+ }
316
+
82
317
  /* ---------- edges ---------- */
83
318
  /* Linear's lit corner (their .edgeHighlightRing): the element's hairline in --edge-b, with --edge-a stacked on top inside a
84
319
  radial at the top-left corner, solid for the first --edge-plateau and fading out by --edge-r. --edge-shadow rings the outside.
@@ -185,22 +420,30 @@
185
420
  }
186
421
 
187
422
  /* ---------- working shimmer ---------- */
188
- /* Linear's "working" badge: a blurred, tilted stripe (indigo and greys, the image below) sweeps along the pill's hairline
189
- every 2s. Put .shimmer on the pill and a Shimmer label inside it. Reduced motion leaves it still. */
423
+ /* Linear's "working" badge: a soft, tilted stripe sweeps along the pill's hairline every 2s, in the metal of the
424
+ new-content glow (--sheen-*: silver and an indigo glint, with the cyan, rose and gold of its sheen). Put .shimmer on
425
+ the pill and a Shimmer label inside it. Reduced motion leaves it still. */
190
426
  :root {
191
- /* The stripe, two ways: on dark, indigo with pale greys (Linear's); on light the greys would vanish into the
192
- surface, so it is a deeper indigo, violet and dark grey, blurred less, so more of it lands on the 1px edge. */
193
- --shimmer-image-dark: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%2072%22%20fill%3D%22none%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cfilter%20id%3D%22blur%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%0A%20%20%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%226%22%20%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22rotate(-30%2090%2036)%22%20filter%3D%22url(%23blur)%22%3E%0A%20%20%20%20%3Crect%20x%3D%2272%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%235e6ad2%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%23e4e5e9%22%20fill-opacity%3D%220.5%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2290%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%239c9da1%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%23e4e5e9%22%20fill-opacity%3D%220.4%22%20%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E');
194
- --shimmer-image-light: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%2072%22%20fill%3D%22none%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cfilter%20id%3D%22blur%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%0A%20%20%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%224%22%20%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22rotate%28-30%2090%2036%29%22%20filter%3D%22url%28%23blur%29%22%3E%0A%20%20%20%20%3Crect%20x%3D%2272%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%234f46e5%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%238b5cf6%22%20fill-opacity%3D%220.7%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2290%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%233c4149%22%20fill-opacity%3D%220.9%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%236366f1%22%20fill-opacity%3D%220.5%22%20%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E');
195
- --shimmer-image: var(--shimmer-image-light);
196
- }
197
- :root[data-theme='dark'] {
198
- --shimmer-image: var(--shimmer-image-dark);
199
- }
200
- @media (prefers-color-scheme: dark) {
201
- :root:not([data-theme='light']) {
202
- --shimmer-image: var(--shimmer-image-dark);
203
- }
427
+ /* The stripe: one 120 × 72px tile (repeated along the pill, centred on it), tilted 30° from upright, about 36px across:
428
+ the low metal tone at its edges, bright and coloured through its middle, its soft stops standing in for a blur. The
429
+ --sheen-* tokens differ by theme, so it does too (silver on dark; grey and violet on light, where pale greys would
430
+ vanish). */
431
+ --shimmer-image: linear-gradient(
432
+ 60deg,
433
+ transparent 30%,
434
+ var(--sheen-lo) 36%,
435
+ var(--sheen-hi) 41%,
436
+ var(--sheen-cool) 45%,
437
+ var(--sheen-tint) 49%,
438
+ var(--sheen-rose) 54%,
439
+ var(--sheen-gold) 58%,
440
+ var(--sheen-hi) 62%,
441
+ var(--sheen-lo) 65%,
442
+ transparent 70%
443
+ );
444
+ /* Deprecated: the stripe for each theme, from when it was an image per theme. Both are --shimmer-image now. */
445
+ --shimmer-image-dark: var(--shimmer-image);
446
+ --shimmer-image-light: var(--shimmer-image);
204
447
  }
205
448
  .shimmer {
206
449
  position: relative;
@@ -1,7 +1,7 @@
1
1
  /* Theme tokens, light and dark. Token names are stable across themes; components only ever read tokens.
2
2
  Design language: Linear's app (as in the interactive demo on linear.app). Surfaces are near-black (or white) with
3
3
  translucent hairlines, translucent fills for hover/active, pill-shaped controls, Inter at 13px with weights 510/590
4
- (JetBrains Mono for data), and one indigo accent.
4
+ (JetBrains Mono for data), and one teal accent.
5
5
  Text: --fg (primary), --fg-2 (secondary), --muted (tertiary), --faint (quaternary).
6
6
  Fills (translucent, stack on any surface): --fill-1 resting, --fill-2 hover, --fill-3 pressed/raised, --fill-4 active.
7
7
  Controls take the same steps tinted with the brand hue (--control-1..4), so they stand apart from neutral surfaces.
@@ -26,8 +26,9 @@
26
26
  --edge-grad / --edge-grad-float paint the same edge as background layers, for scroll containers: under a transparent
27
27
  1px border, below a padding-box fill (effects.css). Each layer is placed and clipped on the border box (border-box)
28
28
  and drawn once (no-repeat): placed on the padding box, as backgrounds are by default, the image is 2px smaller than
29
- the box and repeats into the border, so the next tile's lit corner showed along the right and bottom hairlines. */
30
- --edge-hi: light-dark(rgb(0 0 0 / 0.1), rgb(255 255 255 / 0.12));
29
+ the box and repeats into the border, so the next tile's lit corner showed along the right and bottom hairlines.
30
+ Light is flat: no lit corner (--edge-hi transparent, leaving the plain hairline) and no outer ring or drop. */
31
+ --edge-hi: light-dark(transparent, rgb(255 255 255 / 0.12));
31
32
  --edge-r: 100px;
32
33
  --edge-plateau: 16%;
33
34
  --edge-grad:
@@ -36,25 +37,41 @@
36
37
  --edge-grad-float:
37
38
  radial-gradient(var(--edge-r) var(--edge-r) at 0 0, var(--edge-hi) 0%, var(--edge-hi) var(--edge-plateau), transparent 100%) border-box no-repeat,
38
39
  linear-gradient(var(--line-float), var(--line-float)) border-box no-repeat;
39
- --edge-shadow: 0 1px 2px light-dark(rgb(0 0 0 / 0.04), transparent), 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2));
40
- /* Shine (Linear's .shine): a 200px beam of brighter hairline on the view card's left edge, near the top. */
41
- --shine: light-dark(rgb(0 0 0 / 0.4), rgb(255 255 255 / 0.4));
40
+ --edge-shadow: 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2));
41
+ /* Shine (Linear's .shine): a 200px beam of brighter hairline on the view card's left edge, near the top. Dark only;
42
+ light is flat. */
43
+ --shine: light-dark(transparent, rgb(255 255 255 / 0.4));
42
44
  --view-line: light-dark(rgb(0 0 0 / 0.07), rgb(255 255 255 / 0.05));
43
- --view-shadow:
44
- 0 0 0 1px light-dark(rgb(0 0 0 / 0.015), transparent), 0 1px 3px light-dark(rgb(0 0 0 / 0.04), transparent),
45
- 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2));
45
+ --view-shadow: 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2)), 0 1px 3px light-dark(rgb(0 0 0 / 0.04), transparent);
46
46
  /* Thinking shimmer (see Shimmer.svelte): the label rests at --shimmer-base and a band of --shimmer-hi sweeps across it. */
47
47
  --shimmer-base: var(--muted);
48
48
  --shimmer-hi: var(--fg);
49
49
  /* How strongly the working sweep along a pill's edge shows (.shimmer: Select loading, a busy Button, status pills).
50
50
  Its image is indigo and greys, so light surfaces need all of it, dark ones less: 1 here, 0.7 in dark (below). */
51
51
  --shimmer-strength: 1;
52
+ /* Metallic sheen, the working shimmer's stripe (.shimmer, the "Deploying" chip) as colours: a low and a high
53
+ metal tone and an indigo glint. Dark: silver greys; light: a cool grey and violet, as pale greys vanish on white
54
+ (the shimmer's dark grey would smudge in a glow wider than its 1px line). For effects that catch the light the
55
+ same way (the new-content glow, css/effects.css). */
56
+ --sheen-lo: light-dark(#8b8f98, #9c9da1);
57
+ --sheen-hi: light-dark(#8b5cf6, #e4e5e9);
58
+ --sheen-tint: light-dark(#4f46e5, #5e6ad2);
59
+ /* The colours metal takes on where it catches the light at an angle (anodised titanium, an oil sheen on steel), muted so
60
+ they stay metal rather than paint: a steel cyan, a dusty rose and a champagne gold. Deeper on light. */
61
+ --sheen-cool: light-dark(#2f8fa6, #7cc6d6);
62
+ --sheen-rose: light-dark(#c2668a, #e3a6bd);
63
+ --sheen-gold: light-dark(#b88a3e, #e6c891);
64
+ /* How strongly the new-content glow shows: lighter on light surfaces, where saturated colour reads as a stain, fuller
65
+ on dark (0.85, below). */
66
+ --edge-glow-strength: 0.5;
52
67
  /* Raised relief (the chosen segment of a RadioGroup): the top inner edge catches the light and the bottom inner edge
53
- falls into shade, so the box reads as standing off the surface. Use both: inset 0 1px 0 …-edge, inset 0 -1px 0 …-base. */
54
- --raised-edge: light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.12));
55
- --raised-base: light-dark(rgb(0 0 0 / 0.06), rgb(0 0 0 / 0.25));
56
- /* Solid buttons (primary, danger) on their own colour, both themes: the lit top inner edge, and the hairline around them. */
57
- --solid-edge: rgb(255 255 255 / 0.2);
68
+ falls into shade, so the box reads as standing off the surface. Use both: inset 0 1px 0 …-edge, inset 0 -1px 0 …-base.
69
+ Dark only; light is flat. */
70
+ --raised-edge: light-dark(transparent, rgb(255 255 255 / 0.12));
71
+ --raised-base: light-dark(transparent, rgb(0 0 0 / 0.25));
72
+ /* Solid buttons (primary, danger) on their own colour: the lit top inner edge (dark only; light is flat), and the
73
+ hairline around them. */
74
+ --solid-edge: light-dark(transparent, rgb(255 255 255 / 0.2));
58
75
  --solid-line: rgb(255 255 255 / 0.12);
59
76
  /* Thumbs and knobs (Switch, Slider): a white disc that keeps its contact shadow on any track. */
60
77
  --knob: #ffffff;
@@ -63,14 +80,15 @@
63
80
  /* Sunken relief for fields and tracks, the counterpart of --shadow-btn at about the same edge contrast, kept crisp: the
64
81
  button's faint lit ring inside, a sharp shade under the top edge with a short falloff, and the lit edge at the bottom
65
82
  instead of the top, so the box reads as pressed into the surface. No dark ring: on the dark frame it would sink the
66
- edge into the page instead of drawing it. Goes under the field's own hairline. */
83
+ edge into the page instead of drawing it. Goes under the field's own hairline. Dark only; light is flat (the hairline
84
+ alone). */
67
85
  --sunken-shadow:
68
- inset 0 0 0 1px light-dark(transparent, rgb(255 255 255 / 0.03)), inset 0 -1px 0 light-dark(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.04)),
69
- inset 0 2px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.35)), inset 0 2px 2px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.2));
86
+ inset 0 0 0 1px light-dark(transparent, rgb(255 255 255 / 0.03)), inset 0 -1px 0 light-dark(transparent, rgb(255 255 255 / 0.04)),
87
+ inset 0 2px 0 light-dark(transparent, rgb(0 0 0 / 0.35)), inset 0 2px 2px light-dark(transparent, rgb(0 0 0 / 0.2));
70
88
  /* Atmosphere: a soft light in the top-left corner of the shell (Linear's sidebar glow), and a fine film grain for the
71
89
  modal backdrops. The grain's strength is baked into its alpha (the matrix's last value), so it can be one background
72
90
  layer over a colour. */
73
- --glow: light-dark(color-mix(in lch, #5e6ad2 7%, transparent), rgb(255 255 255 / 0.04));
91
+ --glow: light-dark(color-mix(in lch, var(--brand) 7%, transparent), rgb(255 255 255 / 0.04));
74
92
  --grain: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 .13'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
75
93
  /* Lit relief (Surface Lab: texture 0.3, reflection 0.2, light 137°), painted under the frame. A lit fractal-noise bump map
76
94
  that overlay-blends into --bg, so flat areas stay neutral and only the relief reads; works on light and dark alike.
@@ -84,7 +102,7 @@
84
102
  --fill-4: light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.08));
85
103
  /* Control fills: the --fill-* scale with a faint cast of the brand hue, for anything you can press, type into or drag
86
104
  (buttons, fields, triggers, segments, tracks, menu items). Surfaces and their fills stay neutral grey, so a control
87
- reads apart from the elevation it sits on. --control-hue is a deep indigo on light, a pale one on dark, so the
105
+ reads apart from the elevation it sits on. --control-hue is a deep teal on light, a pale one on dark, so the
88
106
  cast darkens light surfaces and lightens dark ones as the plain fills do. */
89
107
  --control-hue: light-dark(color-mix(in lch, var(--brand), black 25%), color-mix(in lch, var(--brand), white 20%));
90
108
  --control-1: color-mix(in lch, var(--control-hue) 5%, transparent);
@@ -95,14 +113,14 @@
95
113
  --fg-2: light-dark(#3c4149, #d0d6e0);
96
114
  --muted: light-dark(#6f6e77, #8a8f98);
97
115
  --faint: light-dark(#8f8d96, #62666d);
98
- --accent: light-dark(#5e6ad2, #7170ff);
99
- --brand: #5e6ad2;
116
+ --accent: light-dark(#0f766e, #14b8a6);
117
+ --brand: #0f766e;
100
118
  --accent-ink: #ffffff;
101
119
  --accent-soft: light-dark(color-mix(in lch, var(--accent) 10%, transparent), color-mix(in lch, var(--brand) 18%, transparent));
102
120
  --accent-line: light-dark(color-mix(in lch, var(--accent) 36%, transparent), color-mix(in lch, var(--accent) 45%, transparent));
103
- /* Link text (a, .linklike): a brighter, more vivid indigo than --accent so links stand out from accented text.
104
- AA on every surface: 5.2:1 on light --surface, 6.7:1 on dark --surface. */
105
- --link: light-dark(#4c5ce8, #8f95ff);
121
+ /* Link text (a, .linklike): a brighter, more vivid teal than --accent so links stand out from accented text.
122
+ AA on every surface: 5.3:1 on light --surface, 9.6:1 on dark --surface. */
123
+ --link: light-dark(#00787f, #2dd4bf);
106
124
 
107
125
  /* Semantic tones (separate from the accent): Linear's green / blue / yellow / grey / red. Each has a translucent -soft
108
126
  fill for chips and tinted rows. Set data-tone="success|info|warning|neutral|danger" on an element to get --tone / --tone-soft. */
@@ -117,20 +135,27 @@
117
135
  --neutral-soft: light-dark(color-mix(in lch, var(--neutral) 10%, transparent), color-mix(in lch, var(--neutral) 13%, transparent));
118
136
  --danger-soft: light-dark(color-mix(in lch, var(--danger) 10%, transparent), color-mix(in lch, var(--danger) 14%, transparent));
119
137
 
120
- /* Elevation: Linear keeps resting surfaces flat; only floating layers (menus, popovers, dialogs) cast a shadow. */
121
- --shadow-sm: 0 1px 1px light-dark(rgb(0 0 0 / 0.04), transparent), 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2));
138
+ /* Elevation: Linear keeps resting surfaces flat; only floating layers (menus, popovers, dialogs) cast a shadow.
139
+ Light is flatter still: hairlines draw the edges, and soft shadows are kept for three things only: a short drop under
140
+ raised controls (--shadow-btn) and the view card (--view-shadow), and a wider one under floating layers (--shadow). */
141
+ --shadow-sm: 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2));
122
142
  --shadow-md:
123
- 0 1px 4px -1px light-dark(rgb(0 0 0 / 0.09), transparent), 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2)),
143
+ 0 1px 2px light-dark(rgb(0 0 0 / 0.04), transparent), 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2)),
124
144
  0 2px 4px light-dark(transparent, rgb(0 0 0 / 0.1));
125
- /* Raised controls (buttons, select triggers, chosen segments; Linear's buttons): a faint lit ring and a lit top edge
126
- inside, a contact ring and a soft drop outside. Dark rings the control in near-black against the frame; light has
127
- no use for the inner ring, takes a stronger top light and a quieter contact ring and drop. */
145
+ /* Raised controls (buttons, select triggers, chosen segments; Linear's buttons). Dark: a faint lit ring and a lit top
146
+ edge inside, a near-black contact ring and a soft drop outside, so the control stands off the frame. Light: no hard
147
+ edges, the control's own hairline and fill, curved top to bottom by two soft inner glows (a light one fading down
148
+ from the top, a shade fading up from the bottom; each spread inwards so neither reaches the sides) over a soft,
149
+ short drop. */
128
150
  --shadow-btn:
129
- inset 0 0 0 1px light-dark(transparent, rgb(255 255 255 / 0.03)), inset 0 1px 0 light-dark(rgb(255 255 255 / 0.17), rgb(255 255 255 / 0.04)),
130
- 0 0 0 1px light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.6)), 0 4px 4px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.1));
151
+ inset 0 0 0 1px light-dark(transparent, rgb(255 255 255 / 0.03)), inset 0 1px 0 light-dark(transparent, rgb(255 255 255 / 0.04)),
152
+ 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.6)), 0 4px 4px light-dark(transparent, rgb(0 0 0 / 0.1)),
153
+ inset 0 12px 12px -8px light-dark(rgb(255 255 255 / 0.22), transparent),
154
+ inset 0 -14px 16px -10px light-dark(rgb(0 0 0 / 0.035), transparent), 0 1px 2px light-dark(rgb(0 0 0 / 0.04), transparent);
131
155
  --shadow:
132
- 0 0 0 1px light-dark(rgb(0 0 0 / 0.02), rgb(0 0 0 / 0.2)), 0 2px 32px light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.25)),
133
- 0 4px 12px light-dark(rgb(0 0 0 / 0.05), transparent), 0 8px 16px light-dark(transparent, rgb(0 0 0 / 0.2));
156
+ 0 0 0 1px light-dark(transparent, rgb(0 0 0 / 0.2)), 0 2px 32px light-dark(transparent, rgb(0 0 0 / 0.25)),
157
+ 0 8px 16px light-dark(transparent, rgb(0 0 0 / 0.2)), 0 6px 24px light-dark(rgb(0 0 0 / 0.08), transparent),
158
+ 0 1px 3px light-dark(rgb(0 0 0 / 0.05), transparent);
134
159
  --ring: 0 0 0 2px light-dark(color-mix(in lch, var(--accent) 30%, transparent), color-mix(in lch, var(--accent) 40%, transparent));
135
160
  /* Translucent chrome over scrolling content. */
136
161
  --glass: light-dark(color-mix(in lch, var(--bg) 82%, transparent), color-mix(in lch, var(--bg) 80%, transparent));
@@ -287,10 +312,12 @@
287
312
  :root[data-theme='dark'] {
288
313
  color-scheme: dark;
289
314
  --shimmer-strength: 0.7;
315
+ --edge-glow-strength: 0.85;
290
316
  }
291
317
  /* Dark values that aren't colours (light-dark() only takes colours), when the OS is dark and no theme is pinned. */
292
318
  @media (prefers-color-scheme: dark) {
293
319
  :root:not([data-theme='light']) {
294
320
  --shimmer-strength: 0.7;
321
+ --edge-glow-strength: 0.85;
295
322
  }
296
323
  }
package/dist/index.d.ts CHANGED
@@ -18,6 +18,8 @@ export { default as Toast } from "./components/Toast.svelte";
18
18
  export { default as Dialogs } from "./components/Dialogs.svelte";
19
19
  export { default as Modal } from "./components/Modal.svelte";
20
20
  export { default as Drawer } from "./components/Drawer.svelte";
21
+ export { default as ScrollToTop } from "./components/scroll/ScrollToTop.svelte";
22
+ export { default as ScrollMore } from "./components/scroll/ScrollMore.svelte";
21
23
  export { default as Breadcrumbs } from "./components/Breadcrumbs.svelte";
22
24
  export { default as ButtonGroup } from "./components/inputs/ButtonGroup.svelte";
23
25
  export { default as SearchField } from "./components/inputs/SearchField.svelte";
@@ -48,6 +50,7 @@ export { reveal } from "./lib/reveal.js";
48
50
  export { fieldErrors } from "./lib/field-errors.svelte.js";
49
51
  export { inlineMd } from "./lib/inline-md.js";
50
52
  export { spotlight } from "./lib/spotlight.js";
53
+ export { edgeGlow } from "./lib/edge-glow.js";
51
54
  export { morph } from "./lib/morph.svelte.js";
52
55
  export { default as Icon, registerIcons, iconNames, hasIcon } from "./components/Icon.svelte";
53
56
  export { default as Empty, EmptyError } from "./components/empty/index.js";
package/dist/index.js CHANGED
@@ -26,6 +26,8 @@ export { default as Toast } from './components/Toast.svelte'
26
26
  export { default as Dialogs } from './components/Dialogs.svelte'
27
27
  export { default as Modal } from './components/Modal.svelte'
28
28
  export { default as Drawer } from './components/Drawer.svelte'
29
+ export { default as ScrollToTop } from './components/scroll/ScrollToTop.svelte'
30
+ export { default as ScrollMore } from './components/scroll/ScrollMore.svelte'
29
31
  export { default as Breadcrumbs } from './components/Breadcrumbs.svelte'
30
32
  export { default as SideMenu, SideMenuGroup, SideMenuItem } from './components/side-menu/index.js'
31
33
  export { default as Tile, TileGroup } from './components/tiles/index.js'
@@ -73,5 +75,6 @@ export { reveal } from './lib/reveal.js'
73
75
  export { fieldErrors } from './lib/field-errors.svelte.js'
74
76
  export { inlineMd } from './lib/inline-md.js'
75
77
  export { spotlight } from './lib/spotlight.js'
78
+ export { edgeGlow } from './lib/edge-glow.js'
76
79
  export { dropped, droppedFiles, filesUnder, filesOfDrop, accepts, fileSize, preview, fileDrop } from './lib/files.js'
77
80
  export { morph } from './lib/morph.svelte.js'
@@ -8,9 +8,12 @@ export function addDays(day: string, n: number): string;
8
8
  export function addMonths(day: string, n: number): string;
9
9
  /** The first day of the week where the user is: 1 Monday (the default) … 7 Sunday, as Intl reports it. */
10
10
  export function firstDayOfWeek(): any;
11
- /** The weeks to draw for a month: 6 rows of 7 ISO days, starting on the locale's first day of the week.
12
- * @param {string} month any day in it */
13
- export function monthGrid(month: string): string[][];
11
+ /** The days of the weekend where the user is, 1 Monday … 7 Sunday, as Intl reports it (default Saturday and Sunday). */
12
+ export function weekendDays(): number[];
13
+ /** The weeks to draw for a month: 6 rows of 7 ISO days, starting on weekStart (1 Monday … 7 Sunday; by default the
14
+ * locale's first day of the week).
15
+ * @param {string} month any day in it @param {number} [weekStart] */
16
+ export function monthGrid(month: string, weekStart?: number): string[][];
14
17
  /** The day of `days` nearest before (or on) `day`, else the first after it; null when `days` is empty.
15
18
  * @param {string} day @param {string[]} days */
16
19
  export function nearest(day: string, days: string[]): string | null;
@@ -57,6 +60,34 @@ export function formatWhen(value: string, { time, year }?: {
57
60
  time?: boolean;
58
61
  year?: boolean;
59
62
  }): string;
63
+ /**
64
+ * A day or moment for reading, with the month's short name: '18 Nov', '18 Nov 2025' (the year only when it isn't this
65
+ * year), '18 Nov 15:30' for a moment (its time where the user is). time: false leaves a moment's time out; year: true or
66
+ * false forces the year in or out.
67
+ * @param {string} value @param {{ time?: boolean, year?: boolean }} [show]
68
+ */
69
+ export function formatShort(value: string, { time, year }?: {
70
+ time?: boolean;
71
+ year?: boolean;
72
+ }): string;
73
+ /**
74
+ * A span of days or moments for reading, as short as it can be said, the month by its short name and what both ends
75
+ * share written once:
76
+ * '18 Nov' one day
77
+ * '3–18 Nov' one month
78
+ * '28 Oct – 3 Nov' one year
79
+ * '28 Dec 2025 – 3 Jan 2026' across years
80
+ * '14:30–16:00 18 Nov' one day, two times
81
+ * '17 Nov 14:30 – 18 Nov 09:00' times on different days
82
+ * The year shows once, at the end, when both ends are in the same year but not this one; on both when they differ.
83
+ * time(value): whether to show that end's time (moments only); by default every moment's. year: true shows the year
84
+ * even when it is this one ('3–18 Nov 2026'). One end empty: 'From 3 Nov', 'Until 18 Nov'; both: ''.
85
+ * @param {string} from @param {string} to @param {{ time?: (value: string) => boolean, year?: boolean }} [show]
86
+ */
87
+ export function formatSpan(from: string, to: string, { time, year }?: {
88
+ time?: (value: string) => boolean;
89
+ year?: boolean;
90
+ }): string;
60
91
  /**
61
92
  * Splits days or moments, in their order (either way), into a run per month, wherever the month or the year differs
62
93
  * from the date before: [{ key: '2026-11', label, items: [{ item, index }] }]. label: the month in full, with the
@@ -84,8 +115,10 @@ export function inputFormat(): {
84
115
  /** A day as it is typed, DD/MM/YYYY ('18/11/2026'). @param {string} day */
85
116
  export function formatInput(day: string): string;
86
117
  /**
87
- * Reads a typed date: ISO ('2026-11-18'), or three numbers as day, month, year with any separators ('18/11/2026',
88
- * '18.11.26', '18 11 2026'). A two-digit year is this century. Returns the ISO day, or null if it isn't a real date.
118
+ * Reads a typed date with any-date-parser: numbers day first, whatever the locale ('18/11/2026', '18.11.26',
119
+ * '18 11 2026', '18/11' for this year), ISO ('2026-11-18'), month names ('18 Nov 2026', 'November 18', in English or
120
+ * the user's language) and words ('today', 'tomorrow', '3 days ago'). A missing year is this year. Returns the ISO
121
+ * day, or null if it isn't a real date.
89
122
  * @param {string} text
90
123
  */
91
124
  export function parseInput(text: string): string | null;