@xerios/design-system 0.1.1 → 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.
- package/CHANGELOG.md +133 -0
- package/README.md +12 -8
- package/dist/components/Button.svelte +0 -7
- package/dist/components/Button.svelte.d.ts +1 -13
- package/dist/components/CollapsibleAdvanced.svelte +1 -1
- package/dist/components/Dialogs.svelte +12 -0
- package/dist/components/WorkingBorder.svelte +10 -8
- package/dist/components/empty/EmptyError.svelte +61 -12
- package/dist/components/empty/EmptyError.svelte.d.ts +2 -1
- package/dist/components/filters/FilterChip.svelte +2 -2
- package/dist/components/filters/OptionList.svelte +29 -13
- package/dist/components/filters/Panel.svelte +1 -1
- package/dist/components/icons.d.ts +3 -0
- package/dist/components/icons.js +3 -0
- package/dist/components/inputs/ButtonGroup.svelte +4 -1
- package/dist/components/inputs/Calendar.svelte +232 -172
- package/dist/components/inputs/Calendar.svelte.d.ts +2 -0
- package/dist/components/inputs/DateField.svelte +209 -92
- package/dist/components/inputs/DateField.svelte.d.ts +16 -10
- package/dist/components/inputs/DateInput.svelte +22 -9
- package/dist/components/inputs/DateInput.svelte.d.ts +3 -0
- package/dist/components/inputs/DatePicker.svelte +63 -38
- package/dist/components/inputs/DatePicker.svelte.d.ts +5 -2
- package/dist/components/inputs/DateRangePicker.svelte +69 -39
- package/dist/components/inputs/DateRangePicker.svelte.d.ts +5 -2
- package/dist/components/inputs/DateRangeSelect.svelte +26 -25
- package/dist/components/inputs/RadioGroup.svelte +3 -1
- package/dist/components/inputs/Segmented.svelte +4 -1
- package/dist/components/inputs/Select.svelte +18 -8
- package/dist/components/inputs/TextArea.svelte +1 -1
- package/dist/components/scroll/ScrollButton.svelte +260 -0
- package/dist/components/scroll/ScrollButton.svelte.d.ts +61 -0
- package/dist/components/scroll/ScrollMore.svelte +57 -0
- package/dist/components/scroll/ScrollMore.svelte.d.ts +28 -0
- package/dist/components/scroll/ScrollToTop.svelte +57 -0
- package/dist/components/scroll/ScrollToTop.svelte.d.ts +22 -0
- package/dist/css/atoms.css +13 -9
- package/dist/css/base.css +1 -2
- package/dist/css/effects.css +259 -16
- package/dist/css/tokens.css +99 -72
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/lib/dates.d.ts +38 -5
- package/dist/lib/dates.js +88 -19
- package/dist/lib/edge-glow.d.ts +11 -0
- package/dist/lib/edge-glow.js +251 -0
- package/package.json +5 -3
package/dist/css/effects.css
CHANGED
|
@@ -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
|
|
189
|
-
|
|
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
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
--shimmer-image:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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;
|
package/dist/css/tokens.css
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
|
40
|
-
/* Shine (Linear's .shine): a 200px beam of brighter hairline on the view card's left edge, near the top.
|
|
41
|
-
|
|
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
|
-
|
|
55
|
-
--raised-
|
|
56
|
-
|
|
57
|
-
|
|
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(
|
|
69
|
-
inset 0 2px 0 light-dark(
|
|
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,
|
|
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
|
|
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(#
|
|
99
|
-
--brand: #
|
|
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
|
|
104
|
-
AA on every surface: 5.
|
|
105
|
-
--link: light-dark(#
|
|
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
|
-
|
|
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
|
|
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
|
|
126
|
-
inside, a contact ring and a soft drop outside
|
|
127
|
-
|
|
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(
|
|
130
|
-
0 0 0 1px light-dark(
|
|
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(
|
|
133
|
-
0
|
|
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));
|
|
@@ -165,50 +190,50 @@
|
|
|
165
190
|
--dur-enter: 120ms;
|
|
166
191
|
--ease-exit: cubic-bezier(0.3, 0, 1, 1);
|
|
167
192
|
--dur-exit: 80ms;
|
|
168
|
-
/* Modal dialogs' own motion. Spring: a damped spring that overshoots by
|
|
193
|
+
/* Modal dialogs' own motion. Spring: a damped spring that overshoots by about 8% and settles back (the bounce a dialog
|
|
169
194
|
scales in with). Dip: sinks to a third of the way below the start by 30%, then accelerates to the end (the small
|
|
170
195
|
drop before a dialog lifts away). Both are sampled curves, so they go past 0 and 1 where cubic-bezier() can't shape them. */
|
|
171
196
|
--ease-spring: linear(
|
|
172
197
|
0,
|
|
173
|
-
0.
|
|
174
|
-
0.
|
|
175
|
-
0.
|
|
176
|
-
0.
|
|
177
|
-
0.
|
|
178
|
-
0.
|
|
179
|
-
0.
|
|
180
|
-
|
|
181
|
-
1.
|
|
182
|
-
1.
|
|
183
|
-
1.
|
|
184
|
-
1.
|
|
185
|
-
1.
|
|
186
|
-
1.
|
|
187
|
-
1.
|
|
188
|
-
1.
|
|
189
|
-
1.
|
|
190
|
-
1,
|
|
191
|
-
0.979,
|
|
192
|
-
0.966,
|
|
193
|
-
0.959,
|
|
194
|
-
0.958,
|
|
195
|
-
0.961,
|
|
196
|
-
0.966,
|
|
197
|
-
0.973,
|
|
198
|
-
0.981,
|
|
199
|
-
0.988,
|
|
200
|
-
0.995,
|
|
201
|
-
1.001,
|
|
202
|
-
1.005,
|
|
203
|
-
1.007,
|
|
204
|
-
1.008,
|
|
198
|
+
0.049,
|
|
199
|
+
0.168,
|
|
200
|
+
0.322,
|
|
201
|
+
0.485,
|
|
202
|
+
0.639,
|
|
203
|
+
0.773,
|
|
204
|
+
0.881,
|
|
205
|
+
0.963,
|
|
206
|
+
1.021,
|
|
207
|
+
1.056,
|
|
208
|
+
1.075,
|
|
209
|
+
1.08,
|
|
210
|
+
1.076,
|
|
211
|
+
1.066,
|
|
212
|
+
1.054,
|
|
213
|
+
1.041,
|
|
214
|
+
1.029,
|
|
215
|
+
1.018,
|
|
205
216
|
1.009,
|
|
206
|
-
1.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
217
|
+
1.003,
|
|
218
|
+
0.998,
|
|
219
|
+
0.996,
|
|
220
|
+
0.994,
|
|
221
|
+
0.994,
|
|
222
|
+
0.994,
|
|
223
|
+
0.995,
|
|
224
|
+
0.996,
|
|
225
|
+
0.997,
|
|
226
|
+
0.998,
|
|
227
|
+
0.999,
|
|
228
|
+
0.999,
|
|
229
|
+
1.0,
|
|
230
|
+
1.0,
|
|
231
|
+
1.0,
|
|
232
|
+
1.0,
|
|
211
233
|
1.001,
|
|
234
|
+
1.0,
|
|
235
|
+
1.0,
|
|
236
|
+
1.0,
|
|
212
237
|
1
|
|
213
238
|
);
|
|
214
239
|
--dur-spring: 400ms;
|
|
@@ -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'
|