@feitio/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/css/components.css +369 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Components: [`@feitio/astro`](https://www.npmjs.com/package/@feitio/astro) and
|
|
|
29
29
|
[`@feitio/react`](https://www.npmjs.com/package/@feitio/react). Behaviors for plain HTML:
|
|
30
30
|
[`@feitio/vanilla`](https://www.npmjs.com/package/@feitio/vanilla).
|
|
31
31
|
|
|
32
|
-
Guidelines, every component and when not to use it: https://
|
|
32
|
+
Guidelines, every component and when not to use it: https://feitio.bymaid.com/
|
|
33
33
|
|
|
34
34
|
MIT. The Alegreya and Alegreya Sans fonts in `fonts/` are under the SIL Open Font License
|
|
35
35
|
(`fonts/OFL.txt`).
|
package/css/components.css
CHANGED
|
@@ -2133,6 +2133,375 @@
|
|
|
2133
2133
|
font: var(--feitio-font-size-small) var(--feitio-font-ui);
|
|
2134
2134
|
color: var(--feitio-color-text-soft);
|
|
2135
2135
|
}
|
|
2136
|
+
|
|
2137
|
+
/* Kanban: work in columns, one per stage. On a wide screen, a file of folders, each with its tab on
|
|
2138
|
+
top; the cards are lifted paper held by a strip of tape, a little turned, as if pinned by hand.
|
|
2139
|
+
On a phone (the board's own width under 40rem), the stages become a row of tabs with a dot each
|
|
2140
|
+
(full when the stage has cards) and only the chosen stage shows. The card's content is free:
|
|
2141
|
+
the board gives the paper, the tape and the move button. */
|
|
2142
|
+
.feitio-kanban {
|
|
2143
|
+
--feitio-kanban-col: 17rem;
|
|
2144
|
+
--feitio-kanban-col-empty: 11rem;
|
|
2145
|
+
--feitio-kanban-tab: 2.25rem;
|
|
2146
|
+
/* It measures itself (container queries), so it takes the width it is given, never its content's. */
|
|
2147
|
+
container-type: inline-size;
|
|
2148
|
+
display: grid;
|
|
2149
|
+
box-sizing: border-box;
|
|
2150
|
+
inline-size: 100%;
|
|
2151
|
+
min-inline-size: 0;
|
|
2152
|
+
font-family: var(--feitio-font-ui);
|
|
2153
|
+
}
|
|
2154
|
+
/* The board moves on springs (the script); a CSS transition on sizes or spacing would also animate
|
|
2155
|
+
the switch between phone and folders, and the cards would lag behind the hand. Only colors and
|
|
2156
|
+
fades change by transition here. The buttons inside keep their own (the lift on hover). */
|
|
2157
|
+
.feitio-kanban,
|
|
2158
|
+
.feitio-kanban :not(.feitio-button, .feitio-button *),
|
|
2159
|
+
.feitio-kanban-ghost,
|
|
2160
|
+
.feitio-kanban-ghost :not(.feitio-button, .feitio-button *) {
|
|
2161
|
+
transition-property: color, background-color, border-color, opacity;
|
|
2162
|
+
}
|
|
2163
|
+
.feitio-kanban-scroll {
|
|
2164
|
+
position: relative;
|
|
2165
|
+
min-inline-size: 0;
|
|
2166
|
+
}
|
|
2167
|
+
/* The fade at the sides, the ScrollFade turned on its side: only where there is more to scroll. */
|
|
2168
|
+
.feitio-kanban-scroll > .edge {
|
|
2169
|
+
position: absolute;
|
|
2170
|
+
inset-block: 0;
|
|
2171
|
+
z-index: 1;
|
|
2172
|
+
inline-size: 3rem;
|
|
2173
|
+
pointer-events: none;
|
|
2174
|
+
opacity: 0;
|
|
2175
|
+
transition: opacity var(--feitio-duration-change) var(--feitio-easing-change);
|
|
2176
|
+
}
|
|
2177
|
+
.feitio-kanban-scroll > .edge.start {
|
|
2178
|
+
inset-inline-start: 0;
|
|
2179
|
+
background: linear-gradient(
|
|
2180
|
+
to left,
|
|
2181
|
+
transparent,
|
|
2182
|
+
var(--feitio-scroll-fade-to, var(--feitio-color-surface))
|
|
2183
|
+
);
|
|
2184
|
+
}
|
|
2185
|
+
.feitio-kanban-scroll > .edge.end {
|
|
2186
|
+
inset-inline-end: 0;
|
|
2187
|
+
background: linear-gradient(
|
|
2188
|
+
to right,
|
|
2189
|
+
transparent,
|
|
2190
|
+
var(--feitio-scroll-fade-to, var(--feitio-color-surface))
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2193
|
+
.feitio-kanban-scroll > .edge[data-visible] {
|
|
2194
|
+
opacity: 1;
|
|
2195
|
+
}
|
|
2196
|
+
.feitio-kanban .tabs {
|
|
2197
|
+
display: flex;
|
|
2198
|
+
gap: var(--feitio-space-3);
|
|
2199
|
+
overflow-x: auto;
|
|
2200
|
+
overscroll-behavior-x: contain;
|
|
2201
|
+
scrollbar-width: none;
|
|
2202
|
+
padding-block: var(--feitio-space-1) var(--feitio-space-4);
|
|
2203
|
+
}
|
|
2204
|
+
.feitio-kanban .tabs button {
|
|
2205
|
+
flex: none;
|
|
2206
|
+
display: inline-flex;
|
|
2207
|
+
align-items: center;
|
|
2208
|
+
gap: var(--feitio-space-1);
|
|
2209
|
+
min-block-size: var(--feitio-control-min-size-small);
|
|
2210
|
+
padding: 0;
|
|
2211
|
+
font: var(--feitio-font-weight-bold) var(--feitio-font-size-small) var(--feitio-font-ui);
|
|
2212
|
+
white-space: nowrap;
|
|
2213
|
+
color: var(--feitio-color-text-soft);
|
|
2214
|
+
background: none;
|
|
2215
|
+
border: 0;
|
|
2216
|
+
cursor: pointer;
|
|
2217
|
+
}
|
|
2218
|
+
.feitio-kanban .tabs button::before {
|
|
2219
|
+
content: "";
|
|
2220
|
+
inline-size: 0.6rem;
|
|
2221
|
+
block-size: 0.6rem;
|
|
2222
|
+
border-radius: 50%;
|
|
2223
|
+
border: var(--feitio-border-width) solid currentColor;
|
|
2224
|
+
}
|
|
2225
|
+
.feitio-kanban .tabs button[data-has]::before {
|
|
2226
|
+
background: currentColor;
|
|
2227
|
+
}
|
|
2228
|
+
.feitio-kanban .tabs button[aria-pressed="true"] {
|
|
2229
|
+
color: var(--feitio-color-text);
|
|
2230
|
+
text-decoration: underline;
|
|
2231
|
+
text-underline-offset: 0.3em;
|
|
2232
|
+
}
|
|
2233
|
+
.feitio-kanban .tabs .n,
|
|
2234
|
+
.feitio-kanban .col-head .n {
|
|
2235
|
+
font-weight: var(--feitio-font-weight-regular);
|
|
2236
|
+
}
|
|
2237
|
+
.feitio-kanban .cols {
|
|
2238
|
+
display: grid;
|
|
2239
|
+
}
|
|
2240
|
+
.feitio-kanban .col {
|
|
2241
|
+
display: none;
|
|
2242
|
+
gap: var(--feitio-space-5);
|
|
2243
|
+
align-content: start;
|
|
2244
|
+
min-inline-size: 0;
|
|
2245
|
+
}
|
|
2246
|
+
.feitio-kanban .col[data-current] {
|
|
2247
|
+
display: grid;
|
|
2248
|
+
}
|
|
2249
|
+
.feitio-kanban .col-head {
|
|
2250
|
+
display: none;
|
|
2251
|
+
align-items: baseline;
|
|
2252
|
+
gap: var(--feitio-space-2);
|
|
2253
|
+
}
|
|
2254
|
+
.feitio-kanban .col-head h3 {
|
|
2255
|
+
margin: 0;
|
|
2256
|
+
font-size: var(--feitio-font-size-body);
|
|
2257
|
+
white-space: nowrap;
|
|
2258
|
+
}
|
|
2259
|
+
.feitio-kanban .col-head .n {
|
|
2260
|
+
font-size: var(--feitio-font-size-small);
|
|
2261
|
+
color: var(--feitio-color-text-soft);
|
|
2262
|
+
}
|
|
2263
|
+
.feitio-kanban .empty {
|
|
2264
|
+
margin: 0;
|
|
2265
|
+
font: italic var(--feitio-font-size-small) var(--feitio-font-text);
|
|
2266
|
+
color: var(--feitio-color-text-soft);
|
|
2267
|
+
}
|
|
2268
|
+
.feitio-kanban .add {
|
|
2269
|
+
display: flex;
|
|
2270
|
+
align-items: center;
|
|
2271
|
+
justify-content: center;
|
|
2272
|
+
gap: var(--feitio-space-1);
|
|
2273
|
+
min-block-size: var(--feitio-control-min-size);
|
|
2274
|
+
padding: var(--feitio-space-2);
|
|
2275
|
+
font: var(--feitio-font-weight-bold) var(--feitio-font-size-small) var(--feitio-font-ui);
|
|
2276
|
+
color: var(--feitio-color-text-soft);
|
|
2277
|
+
background: none;
|
|
2278
|
+
border: var(--feitio-border-width) dashed var(--feitio-color-text-soft);
|
|
2279
|
+
border-radius: var(--feitio-radius);
|
|
2280
|
+
cursor: pointer;
|
|
2281
|
+
}
|
|
2282
|
+
.feitio-kanban .add:hover {
|
|
2283
|
+
color: var(--feitio-color-text);
|
|
2284
|
+
border-color: var(--feitio-color-text);
|
|
2285
|
+
}
|
|
2286
|
+
.feitio-kanban .add:focus-visible {
|
|
2287
|
+
outline: var(--feitio-focus-width) solid var(--feitio-color-accent);
|
|
2288
|
+
outline-offset: var(--feitio-focus-offset);
|
|
2289
|
+
}
|
|
2290
|
+
/* Where the card would land. */
|
|
2291
|
+
.feitio-kanban .slot {
|
|
2292
|
+
border: 2px dashed var(--feitio-color-accent);
|
|
2293
|
+
border-radius: var(--feitio-radius);
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
/* The card: lifted paper, a strip of tape on top. Its content is whatever the page puts in it. */
|
|
2297
|
+
.feitio-kanban-card {
|
|
2298
|
+
position: relative;
|
|
2299
|
+
display: grid;
|
|
2300
|
+
gap: var(--feitio-space-1);
|
|
2301
|
+
padding: var(--feitio-space-4) var(--feitio-space-3) var(--feitio-space-3);
|
|
2302
|
+
color: var(--feitio-color-text);
|
|
2303
|
+
background: var(--feitio-color-surface-top);
|
|
2304
|
+
border: var(--feitio-border-width) solid var(--feitio-color-text);
|
|
2305
|
+
border-radius: var(--feitio-radius);
|
|
2306
|
+
box-shadow: var(--feitio-shadow-lift);
|
|
2307
|
+
}
|
|
2308
|
+
.feitio-kanban-card::before {
|
|
2309
|
+
content: "";
|
|
2310
|
+
position: absolute;
|
|
2311
|
+
inset-block-start: calc(var(--feitio-space-2) * -1);
|
|
2312
|
+
inset-inline-start: 50%;
|
|
2313
|
+
translate: -50% 0;
|
|
2314
|
+
rotate: -2deg;
|
|
2315
|
+
inline-size: 3.5rem;
|
|
2316
|
+
block-size: var(--feitio-space-4);
|
|
2317
|
+
background: var(--feitio-color-line);
|
|
2318
|
+
opacity: 0.8;
|
|
2319
|
+
pointer-events: none;
|
|
2320
|
+
}
|
|
2321
|
+
.feitio-kanban .col > .feitio-kanban-card:nth-child(odd of .feitio-kanban-card) {
|
|
2322
|
+
rotate: -0.5deg;
|
|
2323
|
+
}
|
|
2324
|
+
.feitio-kanban .col > .feitio-kanban-card:nth-child(even of .feitio-kanban-card) {
|
|
2325
|
+
rotate: 0.6deg;
|
|
2326
|
+
}
|
|
2327
|
+
/* The move button, with its word, closes the card at the end; a card that cannot move says so there. */
|
|
2328
|
+
.feitio-kanban-card > .move,
|
|
2329
|
+
.feitio-kanban-card > .fixed {
|
|
2330
|
+
justify-self: end;
|
|
2331
|
+
margin-block-start: var(--feitio-space-1);
|
|
2332
|
+
}
|
|
2333
|
+
.feitio-kanban-card > .fixed {
|
|
2334
|
+
font-size: var(--feitio-font-size-small);
|
|
2335
|
+
color: var(--feitio-color-text-soft);
|
|
2336
|
+
}
|
|
2337
|
+
/* The new card's form, in the column, as a card that is not pinned yet. */
|
|
2338
|
+
.feitio-kanban-card.draft {
|
|
2339
|
+
rotate: none;
|
|
2340
|
+
gap: var(--feitio-space-2);
|
|
2341
|
+
}
|
|
2342
|
+
.feitio-kanban-card.draft label {
|
|
2343
|
+
font: var(--feitio-font-weight-bold) var(--feitio-font-size-small) var(--feitio-font-ui);
|
|
2344
|
+
}
|
|
2345
|
+
.feitio-kanban-card.draft .actions {
|
|
2346
|
+
display: flex;
|
|
2347
|
+
gap: var(--feitio-space-2);
|
|
2348
|
+
}
|
|
2349
|
+
/* The card in the hand follows the pointer with no transition. */
|
|
2350
|
+
.feitio-kanban-ghost {
|
|
2351
|
+
position: fixed;
|
|
2352
|
+
inset-block-start: 0;
|
|
2353
|
+
inset-inline-start: 0;
|
|
2354
|
+
z-index: 60;
|
|
2355
|
+
margin: 0;
|
|
2356
|
+
pointer-events: none;
|
|
2357
|
+
}
|
|
2358
|
+
.feitio-kanban-ghost > .feitio-kanban-card {
|
|
2359
|
+
rotate: none;
|
|
2360
|
+
}
|
|
2361
|
+
[data-kanban-dragging],
|
|
2362
|
+
[data-kanban-dragging] * {
|
|
2363
|
+
cursor: grabbing;
|
|
2364
|
+
user-select: none;
|
|
2365
|
+
}
|
|
2366
|
+
/* The move list: a Menu list with its title on top. */
|
|
2367
|
+
.feitio-kanban-menu .head {
|
|
2368
|
+
padding: var(--feitio-space-1) var(--feitio-space-2);
|
|
2369
|
+
font-weight: var(--feitio-font-weight-bold);
|
|
2370
|
+
color: var(--feitio-color-text-soft);
|
|
2371
|
+
}
|
|
2372
|
+
.feitio-kanban-menu button {
|
|
2373
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2374
|
+
}
|
|
2375
|
+
/* The board in miniature, when the columns do not fit: a rectangle per column, a line per card,
|
|
2376
|
+
and the part in view in orange. Touching it takes the board there. */
|
|
2377
|
+
.feitio-kanban .minimap {
|
|
2378
|
+
display: none;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
@container (min-width: 40rem) {
|
|
2382
|
+
.feitio-kanban .tabs-scroll {
|
|
2383
|
+
display: none;
|
|
2384
|
+
}
|
|
2385
|
+
.feitio-kanban .cols {
|
|
2386
|
+
display: flex;
|
|
2387
|
+
gap: var(--feitio-space-3);
|
|
2388
|
+
align-items: stretch;
|
|
2389
|
+
overflow-x: auto;
|
|
2390
|
+
scrollbar-width: none;
|
|
2391
|
+
padding-block: var(--feitio-space-2) var(--feitio-space-3);
|
|
2392
|
+
}
|
|
2393
|
+
/* The column is only a frame: the folder (::before) and its tab (.col-head) are both drawn from its
|
|
2394
|
+
very edge, at 0, with no offset to round. The tab has a fixed height and the folder's top line
|
|
2395
|
+
sits right under it, so the tab's paper covers that line and its side lines continue the folder's. */
|
|
2396
|
+
.feitio-kanban .col {
|
|
2397
|
+
position: relative;
|
|
2398
|
+
isolation: isolate;
|
|
2399
|
+
display: grid;
|
|
2400
|
+
flex: 1 0 var(--feitio-kanban-col);
|
|
2401
|
+
min-block-size: 26rem;
|
|
2402
|
+
padding: calc(var(--feitio-kanban-tab) + var(--feitio-space-4)) var(--feitio-space-3)
|
|
2403
|
+
var(--feitio-space-3);
|
|
2404
|
+
}
|
|
2405
|
+
.feitio-kanban .col::before {
|
|
2406
|
+
content: "";
|
|
2407
|
+
position: absolute;
|
|
2408
|
+
z-index: -1;
|
|
2409
|
+
inset: calc(var(--feitio-kanban-tab) - var(--feitio-border-width)) 0 0 0;
|
|
2410
|
+
background: var(--feitio-color-surface-raised);
|
|
2411
|
+
border: var(--feitio-border-width) solid var(--feitio-color-text);
|
|
2412
|
+
border-radius: 0 var(--feitio-radius-top-right) var(--feitio-radius-bottom-right)
|
|
2413
|
+
var(--feitio-radius-bottom-left);
|
|
2414
|
+
pointer-events: none;
|
|
2415
|
+
}
|
|
2416
|
+
.feitio-kanban .col[data-empty]:not(:has(> .add)) {
|
|
2417
|
+
flex: 0 0 var(--feitio-kanban-col-empty);
|
|
2418
|
+
}
|
|
2419
|
+
.feitio-kanban .col-head {
|
|
2420
|
+
position: absolute;
|
|
2421
|
+
inset-block-start: 0;
|
|
2422
|
+
inset-inline-start: 0;
|
|
2423
|
+
display: flex;
|
|
2424
|
+
align-items: center;
|
|
2425
|
+
box-sizing: border-box;
|
|
2426
|
+
block-size: var(--feitio-kanban-tab);
|
|
2427
|
+
padding: 0 var(--feitio-space-3);
|
|
2428
|
+
background: var(--feitio-color-surface-raised);
|
|
2429
|
+
border: var(--feitio-border-width) solid var(--feitio-color-text);
|
|
2430
|
+
border-block-end: 0;
|
|
2431
|
+
border-radius: var(--feitio-radius-top-left) var(--feitio-radius-top-right) 0 0;
|
|
2432
|
+
}
|
|
2433
|
+
.feitio-kanban .col[data-empty]::before {
|
|
2434
|
+
background: transparent;
|
|
2435
|
+
border-color: var(--feitio-color-line);
|
|
2436
|
+
border-style: dashed;
|
|
2437
|
+
}
|
|
2438
|
+
.feitio-kanban .col[data-empty] .col-head {
|
|
2439
|
+
color: var(--feitio-color-text-soft);
|
|
2440
|
+
background: var(--feitio-color-surface);
|
|
2441
|
+
border-color: var(--feitio-color-line);
|
|
2442
|
+
border-style: dashed;
|
|
2443
|
+
}
|
|
2444
|
+
.feitio-kanban[data-dragging] .col[data-blocked] {
|
|
2445
|
+
opacity: 0.4;
|
|
2446
|
+
}
|
|
2447
|
+
.feitio-kanban .col[data-over]::before,
|
|
2448
|
+
.feitio-kanban .col[data-over] .col-head {
|
|
2449
|
+
border-color: var(--feitio-color-accent);
|
|
2450
|
+
border-style: solid;
|
|
2451
|
+
}
|
|
2452
|
+
.feitio-kanban .col > .feitio-kanban-card:has(> .move) {
|
|
2453
|
+
cursor: grab;
|
|
2454
|
+
}
|
|
2455
|
+
.feitio-kanban .minimap:not([hidden]) {
|
|
2456
|
+
position: sticky;
|
|
2457
|
+
inset-block-end: var(--feitio-space-3);
|
|
2458
|
+
z-index: 2;
|
|
2459
|
+
display: flex;
|
|
2460
|
+
gap: 2px;
|
|
2461
|
+
inline-size: max-content;
|
|
2462
|
+
margin: var(--feitio-space-3) 0 0 auto;
|
|
2463
|
+
padding: var(--feitio-space-1);
|
|
2464
|
+
background: var(--feitio-color-surface-top);
|
|
2465
|
+
border: var(--feitio-border-width) solid var(--feitio-color-text);
|
|
2466
|
+
border-radius: var(--feitio-radius);
|
|
2467
|
+
box-shadow: var(--feitio-shadow-lift);
|
|
2468
|
+
cursor: pointer;
|
|
2469
|
+
touch-action: none;
|
|
2470
|
+
}
|
|
2471
|
+
.feitio-kanban .minimap .m-col {
|
|
2472
|
+
box-sizing: border-box;
|
|
2473
|
+
display: flex;
|
|
2474
|
+
flex-direction: column;
|
|
2475
|
+
gap: 2px;
|
|
2476
|
+
block-size: 3.5rem;
|
|
2477
|
+
padding: 3px 2px;
|
|
2478
|
+
background: var(--feitio-color-surface-raised);
|
|
2479
|
+
border-radius: 2px;
|
|
2480
|
+
}
|
|
2481
|
+
.feitio-kanban .minimap .m-col[data-empty] {
|
|
2482
|
+
background: transparent;
|
|
2483
|
+
outline: 1px dashed var(--feitio-color-line);
|
|
2484
|
+
outline-offset: -1px;
|
|
2485
|
+
}
|
|
2486
|
+
.feitio-kanban .minimap .m-card {
|
|
2487
|
+
flex: none;
|
|
2488
|
+
block-size: 5px;
|
|
2489
|
+
background: var(--feitio-color-text-soft);
|
|
2490
|
+
border-radius: 1px;
|
|
2491
|
+
}
|
|
2492
|
+
.feitio-kanban .minimap .view {
|
|
2493
|
+
position: absolute;
|
|
2494
|
+
inset-block: 2px;
|
|
2495
|
+
border: 2px solid var(--feitio-color-accent);
|
|
2496
|
+
border-radius: 3px;
|
|
2497
|
+
pointer-events: none;
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2501
|
+
.feitio-kanban .col > .feitio-kanban-card {
|
|
2502
|
+
rotate: none;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2136
2505
|
}
|
|
2137
2506
|
|
|
2138
2507
|
@keyframes feitio-filter-wait {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feitio/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Feitio's foundation: design tokens, the layered base CSS, the hand-drawn icons and illustrations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"feitio",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dark-mode",
|
|
16
16
|
"themes"
|
|
17
17
|
],
|
|
18
|
-
"homepage": "https://
|
|
18
|
+
"homepage": "https://feitio.bymaid.com/",
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/Made-by-MAID/feitio/issues"
|
|
21
21
|
},
|