@setsquare/ui 0.2.3 → 0.2.4
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 +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/theme.css +107 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tokens.json +5 -0
- package/dist/ui/feature-card.d.ts +85 -0
- package/dist/ui/feature-card.d.ts.map +1 -0
- package/dist/ui/feature-card.js +65 -0
- package/dist/ui/feature-card.js.map +1 -0
- package/dist/ui/time-of-day-icon.d.ts +18 -0
- package/dist/ui/time-of-day-icon.d.ts.map +1 -0
- package/dist/ui/time-of-day-icon.js +26 -0
- package/dist/ui/time-of-day-icon.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.4 — 2026-10-05
|
|
4
|
+
|
|
5
|
+
- **`FeatureCard`**, for the top of an overview: a title (a greeting, often) beside an icon, and a panel of
|
|
6
|
+
what's new that the person shows and hides with React Aria's Disclosure. Closed, one line says how many updates
|
|
7
|
+
there are and what the newest is. `FeatureCardItem` is an update, larger in the `featured` slot, either one link
|
|
8
|
+
or an article with its own actions. `TimeOfDayIcon` and `timeOfDay()` draw the sun or moon for a greeting. The
|
|
9
|
+
card arrives once, in under three seconds, without fading its text; at AAA nothing moves and under reduced
|
|
10
|
+
motion nothing animates. New token `duration-arrive`. The contrast check now measures text over the card's dots,
|
|
11
|
+
muted text on `accent` (a hovered link card) and the count pill.
|
|
12
|
+
|
|
3
13
|
## 0.2.3 — 2026-10-05
|
|
4
14
|
|
|
5
15
|
- **`SettingsCard`**, for a settings page that saves one thing at a time: a title, a description, the field, and
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,10 @@ export type { CardProps, CardGridProps } from './ui/card.js';
|
|
|
64
64
|
export { LinkCard } from './ui/link-card.js';
|
|
65
65
|
export { SettingsCard } from './ui/settings-card.js';
|
|
66
66
|
export type { SettingsCardProps } from './ui/settings-card.js';
|
|
67
|
+
export { FeatureCard, FeatureCardItem } from './ui/feature-card.js';
|
|
68
|
+
export type { FeatureCardProps, FeatureCardItemProps } from './ui/feature-card.js';
|
|
69
|
+
export { TimeOfDayIcon, timeOfDay } from './ui/time-of-day-icon.js';
|
|
70
|
+
export type { TimeOfDay, TimeOfDayIconProps } from './ui/time-of-day-icon.js';
|
|
67
71
|
export type { LinkCardProps } from './ui/link-card.js';
|
|
68
72
|
export { Hero, HeroHighlight } from './ui/hero.js';
|
|
69
73
|
export type { HeroProps } from './ui/hero.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CA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E,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACvF,YAAY,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9D,YAAY,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,8 @@ export { Container, Eyebrow, Section, SectionHeader } from './ui/section.js';
|
|
|
42
42
|
export { Card, CardGrid } from './ui/card.js';
|
|
43
43
|
export { LinkCard } from './ui/link-card.js';
|
|
44
44
|
export { SettingsCard } from './ui/settings-card.js';
|
|
45
|
+
export { FeatureCard, FeatureCardItem } from './ui/feature-card.js';
|
|
46
|
+
export { TimeOfDayIcon, timeOfDay } from './ui/time-of-day-icon.js';
|
|
45
47
|
export { Hero, HeroHighlight } from './ui/hero.js';
|
|
46
48
|
export { Prose } from './ui/prose.js';
|
|
47
49
|
export { Steps, Step } from './ui/steps.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.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0; translate: 0 var(--motion-distance); } }
|
|
431
431
|
|
|
432
|
+
/* ---------- arrivals: a FeatureCard and its parts, once, as it first renders ----------
|
|
433
|
+
Text and controls never fade: they are readable from the first frame, so nothing waits on an animation to be
|
|
434
|
+
seen. arrive-rise only travels --motion-distance, so at AAA (0) and under reduced motion it does nothing. The
|
|
435
|
+
rest is decoration (the icon tile, the icon's strokes): it may fade in, and at AAA it only fades, as everything
|
|
436
|
+
that moves in this system does; 2.3.3's Understanding page doesn't count a change of opacity as motion. All of
|
|
437
|
+
it is over in under three seconds. Under reduced motion nothing animates. */
|
|
438
|
+
@keyframes setsquare-rise { from { translate: 0 var(--motion-distance); } }
|
|
439
|
+
@keyframes setsquare-pop { 0% { opacity: 0; scale: 0.6; } 60% { opacity: 1; scale: 1.06; } }
|
|
440
|
+
@keyframes setsquare-sunrise { from { opacity: 0.2; translate: 0 var(--motion-distance); } }
|
|
441
|
+
@keyframes setsquare-spin-in { from { opacity: 0; rotate: -75deg; scale: 0.7; } }
|
|
442
|
+
@keyframes setsquare-moon-in { from { opacity: 0; rotate: -35deg; scale: 0.85; } }
|
|
443
|
+
@keyframes setsquare-twinkle { 0% { opacity: 0; scale: 0.2; } 30% { opacity: 1; scale: 1.25; } 55% { opacity: 0.35; scale: 0.8; } 80% { opacity: 1; scale: 1.08; } }
|
|
444
|
+
@keyframes setsquare-ripple { from { --feature-ripple-radius: 0px; opacity: 0.72; } 70% { opacity: 0.72; } to { --feature-ripple-radius: 1600px; opacity: 0; } }
|
|
445
|
+
@utility arrive-rise {
|
|
446
|
+
animation: setsquare-rise var(--duration-arrive) var(--ease-standard) both;
|
|
447
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
448
|
+
}
|
|
449
|
+
@utility arrive-pop {
|
|
450
|
+
animation: setsquare-pop calc(var(--duration-arrive) * 1.1) var(--ease-standard) both;
|
|
451
|
+
transform-box: fill-box;
|
|
452
|
+
transform-origin: center;
|
|
453
|
+
@variant aaa { animation-name: setsquare-fade; }
|
|
454
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
455
|
+
}
|
|
456
|
+
@utility arrive-sunrise {
|
|
457
|
+
animation: setsquare-sunrise calc(var(--duration-arrive) * 2.3) var(--ease-standard) both;
|
|
458
|
+
transform-box: fill-box;
|
|
459
|
+
transform-origin: center;
|
|
460
|
+
@variant aaa { animation-name: setsquare-fade; }
|
|
461
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
462
|
+
}
|
|
463
|
+
@utility arrive-spin-in {
|
|
464
|
+
animation: setsquare-spin-in calc(var(--duration-arrive) * 2.1) var(--ease-standard) both;
|
|
465
|
+
transform-box: view-box;
|
|
466
|
+
transform-origin: 16px 16px;
|
|
467
|
+
@variant aaa { animation-name: setsquare-fade; }
|
|
468
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
469
|
+
}
|
|
470
|
+
@utility arrive-moon-in {
|
|
471
|
+
animation: setsquare-moon-in calc(var(--duration-arrive) * 1.9) var(--ease-standard) both;
|
|
472
|
+
transform-box: view-box;
|
|
473
|
+
transform-origin: 16px 16px;
|
|
474
|
+
@variant aaa { animation-name: setsquare-fade; }
|
|
475
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
476
|
+
}
|
|
477
|
+
@utility arrive-twinkle {
|
|
478
|
+
animation: setsquare-twinkle calc(var(--duration-arrive) * 2.9) var(--ease-standard) both;
|
|
479
|
+
transform-box: fill-box;
|
|
480
|
+
transform-origin: center;
|
|
481
|
+
@variant aaa { animation-name: setsquare-fade; }
|
|
482
|
+
@media (prefers-reduced-motion: reduce) { animation: none; }
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/* ---------- FeatureCard's ground: dots fading out from the icon, and one ripple across them ----------
|
|
486
|
+
The dots sit behind the title and the muted text, so they are light enough for that text to keep 4.5:1 on a
|
|
487
|
+
dot as well as on the card (scripts/lib/contrast.mjs measures it on the darkest dot). At AAA there are none:
|
|
488
|
+
7:1 leaves a product's muted text too little room over a pattern. The ripple brightens them as it passes,
|
|
489
|
+
once, in about two seconds; it doesn't run at AAA or under reduced motion. Each layer's strength is its opacity,
|
|
490
|
+
not a color-mix(), which Tailwind would give a full-strength fallback. */
|
|
491
|
+
@property --feature-ripple-radius { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
492
|
+
@utility feature-dots {
|
|
493
|
+
position: absolute;
|
|
494
|
+
inset: 0;
|
|
495
|
+
pointer-events: none;
|
|
496
|
+
opacity: 0.2;
|
|
497
|
+
background-image: radial-gradient(circle, var(--input) 1px, transparent 1.5px);
|
|
498
|
+
background-size: 16px 16px;
|
|
499
|
+
mask-image: radial-gradient(120% 170% at 0% 0%, black 0%, rgb(0 0 0 / 0.45) 38%, transparent 72%);
|
|
500
|
+
@variant aaa { display: none; }
|
|
501
|
+
}
|
|
502
|
+
@utility feature-ripple {
|
|
503
|
+
position: absolute;
|
|
504
|
+
inset: 0;
|
|
505
|
+
pointer-events: none;
|
|
506
|
+
opacity: 0;
|
|
507
|
+
background-image: radial-gradient(circle, var(--foreground) 1.1px, transparent 1.6px);
|
|
508
|
+
background-size: 16px 16px;
|
|
509
|
+
mask-image: radial-gradient(circle at var(--feature-ripple-origin, 48px 44px), transparent calc(var(--feature-ripple-radius) - 170px), black calc(var(--feature-ripple-radius) - 70px), transparent var(--feature-ripple-radius));
|
|
510
|
+
animation: setsquare-ripple calc(var(--duration-arrive) * 4.4) cubic-bezier(0.3, 0.1, 0.3, 1) 120ms both;
|
|
511
|
+
@variant aaa { display: none; }
|
|
512
|
+
@media (prefers-reduced-motion: reduce) { display: none; }
|
|
513
|
+
}
|
|
514
|
+
/* An update's picture: a muted, dotted frame for an illustration or a screenshot. */
|
|
515
|
+
@utility feature-media {
|
|
516
|
+
position: relative;
|
|
517
|
+
overflow: clip;
|
|
518
|
+
background-color: var(--muted);
|
|
519
|
+
&::before {
|
|
520
|
+
content: '';
|
|
521
|
+
position: absolute;
|
|
522
|
+
inset: 0;
|
|
523
|
+
opacity: 0.26;
|
|
524
|
+
background-image: radial-gradient(circle, var(--input) 1px, transparent 1.5px);
|
|
525
|
+
background-size: 14px 14px;
|
|
526
|
+
}
|
|
527
|
+
& > :is(svg, img, video, picture) {
|
|
528
|
+
position: absolute;
|
|
529
|
+
inset: 0;
|
|
530
|
+
width: 100%;
|
|
531
|
+
height: 100%;
|
|
532
|
+
display: block;
|
|
533
|
+
}
|
|
534
|
+
& > img, & > video {
|
|
535
|
+
object-fit: cover;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
432
539
|
/* ---------- view transitions: the shell is the anchor, content moves ---------- */
|
|
433
540
|
::view-transition { pointer-events: none; }
|
|
434
541
|
::view-transition-group(shell-header), ::view-transition-group(shell-sidebar), ::view-transition-group(site-header) { animation: none; z-index: 100; }
|
package/dist/styles/tokens.css
CHANGED
package/dist/tokens.json
CHANGED
|
@@ -948,6 +948,11 @@
|
|
|
948
948
|
"value": "900ms",
|
|
949
949
|
"usage": "One turn of the spinner. At AAA and under reduced motion it pulses instead of turning."
|
|
950
950
|
},
|
|
951
|
+
{
|
|
952
|
+
"name": "duration-arrive",
|
|
953
|
+
"value": "480ms",
|
|
954
|
+
"usage": "A FeatureCard arriving, once, as it first renders: the card and its updates rise, its icon draws in. The icon's parts and the ripple across its ground are multiples of it. At AAA only opacity changes; under reduced motion nothing does."
|
|
955
|
+
},
|
|
951
956
|
{
|
|
952
957
|
"name": "ease-standard",
|
|
953
958
|
"value": "cubic-bezier(0.2, 0, 0, 1)",
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DisclosureProps as RACDisclosureProps } from 'react-aria-components';
|
|
3
|
+
import { type IconProp } from './icon.js';
|
|
4
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5;
|
|
5
|
+
export interface FeatureCardProps extends Omit<RACDisclosureProps, 'children' | 'className'> {
|
|
6
|
+
/** The heading: a greeting ("Good morning, Ana") or what the card holds ("What's new"). */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** 1 when the card heads the page, as on an overview; 2 (default) under the page's h1; 3 under a section's h2. */
|
|
9
|
+
headingLevel?: 1 | 2 | 3;
|
|
10
|
+
/** In a tile before the title: a `TimeOfDayIcon` beside a greeting, or any icon. Decorative. */
|
|
11
|
+
icon?: IconProp;
|
|
12
|
+
/**
|
|
13
|
+
* What the panel holds, default "What's new". It ends the toggle's name ("Show what's new"), leads the line
|
|
14
|
+
* shown while the card is closed, and is the panel's heading, which only a screen reader shows.
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Under the title while the card is open: "Here's what's new since you were last here on 28 September." */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
/** While the card is closed, a pill after the label: "3 new". Leave it out when there's nothing new. */
|
|
20
|
+
count?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* While the card is closed, the rest of its line: the newest update's title ("Visual comparisons for every run,
|
|
23
|
+
* and 2 more"), or "You're up to date."
|
|
24
|
+
*/
|
|
25
|
+
summary?: ReactNode;
|
|
26
|
+
/** Beside the toggle while the card is open: a ghost `LinkButton` to every update, usually. */
|
|
27
|
+
action?: ReactNode;
|
|
28
|
+
/** The update shown largest, before the others: a `FeatureCardItem`. */
|
|
29
|
+
featured?: ReactNode;
|
|
30
|
+
/** The other updates: `FeatureCardItem`s, beside the featured one on a wide card and under it on a narrow one. */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The card at the top of an overview: a title (a greeting, often) with an icon, and a panel of what's new that
|
|
36
|
+
* the person can show and hide. React Aria's Disclosure: the Show/Hide button is the trigger, with
|
|
37
|
+
* `aria-expanded`, and the panel is hidden while it is closed. Open, it shows a description, an action and the
|
|
38
|
+
* updates; closed, one line in their place says how many there are and what the newest is. Open by default:
|
|
39
|
+
* keep the person's choice with `isExpanded` and `onExpandedChange`.
|
|
40
|
+
*
|
|
41
|
+
* It lays itself out by its own width (a container query), not the window's: beside a sidebar or on a phone,
|
|
42
|
+
* the title goes under the icon and the updates go under the featured one.
|
|
43
|
+
*
|
|
44
|
+
* It arrives once as it renders: the card and its updates rise --motion-distance, the icon tile pops in, and a
|
|
45
|
+
* ripple crosses the dots behind the title. The text and the controls never fade, so they can be read from the
|
|
46
|
+
* first frame. At AAA nothing moves (the icon only fades in) and the card has no dots or ripple; under reduced
|
|
47
|
+
* motion nothing animates.
|
|
48
|
+
*/
|
|
49
|
+
export declare function FeatureCard({ title, headingLevel, icon, label, description, count, summary, action, featured, children, defaultExpanded, className, ...props }: FeatureCardProps): import("react").JSX.Element;
|
|
50
|
+
interface FeatureCardItemBase {
|
|
51
|
+
/** The update's name: "Visual comparisons for every run". */
|
|
52
|
+
title: ReactNode;
|
|
53
|
+
/** A word before the date: "New", "Improved". */
|
|
54
|
+
tag?: ReactNode;
|
|
55
|
+
/** When it shipped: "1 October", or a `<time>`. */
|
|
56
|
+
date?: ReactNode;
|
|
57
|
+
/** What it does for the person, in a sentence or two. */
|
|
58
|
+
description?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* A picture of it, in a muted frame above the words: 2:1 when featured, 3:1 otherwise. An `<svg>`, `<img>` or
|
|
61
|
+
* `<video>` fills the frame. Hidden from assistive tech, so the words have to say what it shows.
|
|
62
|
+
*/
|
|
63
|
+
media?: ReactNode;
|
|
64
|
+
/** Overrides the level the card gives it: two below the card's title. */
|
|
65
|
+
headingLevel?: HeadingLevel;
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
export type FeatureCardItemProps = FeatureCardItemBase & ({
|
|
69
|
+
/** The whole item is one link, here: to the update in the changelog. It can then hold no other control. */
|
|
70
|
+
href: string;
|
|
71
|
+
actions?: never;
|
|
72
|
+
} | {
|
|
73
|
+
href?: never;
|
|
74
|
+
/** Buttons or links after the words: "Set up Review", "How it works". The item is then not a link. */
|
|
75
|
+
actions?: ReactNode;
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* One update in a FeatureCard: a picture, a tag and a date, a title and a description. In the card's `featured`
|
|
79
|
+
* slot it is larger. With `href` the whole item is a link named by everything it shows, as LinkCard is, with
|
|
80
|
+
* the arrow after its title; with `actions` it is an article with its own buttons or links. Not both: a link
|
|
81
|
+
* can't hold another control.
|
|
82
|
+
*/
|
|
83
|
+
export declare function FeatureCardItem({ title, tag, date, description, media, headingLevel, href, actions, className, }: FeatureCardItemProps): import("react").JSX.Element;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=feature-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-card.d.ts","sourceRoot":"","sources":["../../src/ui/feature-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAIL,KAAK,eAAe,IAAI,kBAAkB,EAC3C,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGtD,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAQtC,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,WAAW,CAAC;IAC1F,2FAA2F;IAC3F,KAAK,EAAE,SAAS,CAAC;IACjB,kHAAkH;IAClH,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,gGAAgG;IAChG,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4GAA4G;IAC5G,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,wGAAwG;IACxG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,+FAA+F;IAC/F,MAAM,CAA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
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children, createContext, useContext, useId, } from 'react';
|
|
4
|
+
import { ArrowRight, ChevronDown } from 'lucide-react';
|
|
5
|
+
import { Disclosure as RACDisclosure, DisclosurePanel, Link as RACLink, } from 'react-aria-components';
|
|
6
|
+
import { cn } from '../lib/cn.js';
|
|
7
|
+
import { Button } from './button.js';
|
|
8
|
+
import { renderIcon } from './icon.js';
|
|
9
|
+
import { Tag } from './tag.js';
|
|
10
|
+
/** What an item needs from its card: its heading level, and whether it is the featured one. */
|
|
11
|
+
const ItemContext = createContext({
|
|
12
|
+
headingLevel: 3,
|
|
13
|
+
featured: false,
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* The card at the top of an overview: a title (a greeting, often) with an icon, and a panel of what's new that
|
|
17
|
+
* the person can show and hide. React Aria's Disclosure: the Show/Hide button is the trigger, with
|
|
18
|
+
* `aria-expanded`, and the panel is hidden while it is closed. Open, it shows a description, an action and the
|
|
19
|
+
* updates; closed, one line in their place says how many there are and what the newest is. Open by default:
|
|
20
|
+
* keep the person's choice with `isExpanded` and `onExpandedChange`.
|
|
21
|
+
*
|
|
22
|
+
* It lays itself out by its own width (a container query), not the window's: beside a sidebar or on a phone,
|
|
23
|
+
* the title goes under the icon and the updates go under the featured one.
|
|
24
|
+
*
|
|
25
|
+
* It arrives once as it renders: the card and its updates rise --motion-distance, the icon tile pops in, and a
|
|
26
|
+
* ripple crosses the dots behind the title. The text and the controls never fade, so they can be read from the
|
|
27
|
+
* first frame. At AAA nothing moves (the icon only fades in) and the card has no dots or ripple; under reduced
|
|
28
|
+
* motion nothing animates.
|
|
29
|
+
*/
|
|
30
|
+
export function FeatureCard({ title, headingLevel = 2, icon, label = "What's new", description, count, summary, action, featured, children, defaultExpanded = true, className, ...props }) {
|
|
31
|
+
const Heading = `h${headingLevel}`;
|
|
32
|
+
const PanelHeading = `h${headingLevel + 1}`;
|
|
33
|
+
const itemLevel = (headingLevel + 2);
|
|
34
|
+
const itemCount = Children.toArray(children).length;
|
|
35
|
+
return (_jsxs(RACDisclosure, { ...props, defaultExpanded: defaultExpanded, className: cn('group/feature-card @container/feature-card arrive-rise relative overflow-clip rounded-lg border border-border bg-card text-card-foreground shadow-(--shadow-sm)', className), children: [_jsx("div", { "aria-hidden": "true", className: "feature-dots" }), _jsx("div", { "aria-hidden": "true", className: "feature-ripple [--feature-ripple-origin:40px_40px] @min-[35rem]/feature-card:[--feature-ripple-origin:48px_44px]" }), _jsxs("div", { className: cn('relative grid items-center gap-x-4 gap-y-3 p-4 @min-[35rem]/feature-card:px-6 @min-[35rem]/feature-card:py-5', icon
|
|
36
|
+
? "grid-cols-[auto_minmax(0,1fr)] [grid-template-areas:'icon_toggle'_'text_text'] @min-[35rem]/feature-card:grid-cols-[auto_minmax(0,1fr)_auto] @min-[35rem]/feature-card:[grid-template-areas:'icon_text_toggle']"
|
|
37
|
+
: "grid-cols-[minmax(0,1fr)_auto] [grid-template-areas:'text_toggle']"), children: [icon && (_jsx("span", { "aria-hidden": "true", className: "arrive-pop grid size-12 place-items-center rounded-xl border border-border bg-background text-foreground [grid-area:icon]", style: { animationDelay: '60ms' }, children: renderIcon(icon, 'size-8') })), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-x-3.5 gap-y-1 [grid-area:text]", children: [_jsx(Heading, { className: "text-title text-foreground", children: title }), description && (_jsx("p", { className: "hidden basis-full text-body text-muted-foreground group-data-expanded/feature-card:block", children: description })), _jsxs("p", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1 text-ui text-muted-foreground group-data-expanded/feature-card:hidden", children: [_jsx("span", { "aria-hidden": "true", className: "hidden h-5 w-px bg-border @min-[35rem]/feature-card:block" }), _jsx("strong", { className: "text-ui-strong text-foreground", children: label }), count && (_jsx("span", { className: "inline-flex h-[22px] items-center rounded-full bg-foreground px-2 text-caption-strong text-background", children: count })), summary && _jsx("span", { children: summary })] })] }), _jsxs("div", { className: "flex items-center gap-(--control-gap) justify-self-end [grid-area:toggle]", children: [action && (_jsx("div", { className: "hidden items-center gap-(--control-gap) group-data-expanded/feature-card:flex", children: action })), _jsxs(Button, { slot: "trigger", variant: "ghost", children: [_jsx(ChevronDown, { "aria-hidden": "true", className: "group-data-expanded/feature-card:rotate-180" }), _jsx("span", { className: "group-data-expanded/feature-card:hidden", children: "Show" }), _jsx("span", { className: "hidden group-data-expanded/feature-card:inline", children: "Hide" }), _jsxs("span", { className: "sr-only", children: [" ", label] })] })] })] }), _jsx(DisclosurePanel, { className: "relative", children: _jsxs("div", { className: "flex flex-col px-4 pb-4 @min-[35rem]/feature-card:px-6 @min-[35rem]/feature-card:pb-6", children: [_jsx(PanelHeading, { className: "sr-only", children: label }), _jsxs("ul", {
|
|
38
|
+
// oxlint-disable-next-line jsx-a11y/no-redundant-roles -- VoiceOver in Safari drops a list with no markers.
|
|
39
|
+
role: "list", style: { '--feature-card-rows': Math.max(1, itemCount) }, className: cn('grid gap-4', featured
|
|
40
|
+
? '@min-[56rem]/feature-card:grid-cols-[minmax(0,1.7fr)_minmax(0,1fr)]'
|
|
41
|
+
: 'grid-cols-[repeat(auto-fit,minmax(min(18rem,100%),1fr))]'), children: [featured && (_jsx("li", { className: "arrive-rise grid @min-[56rem]/feature-card:row-span-(--feature-card-rows)", style: { animationDelay: '200ms' }, children: _jsx(ItemContext.Provider, { value: { headingLevel: itemLevel, featured: true }, children: featured }) })), _jsx(ItemContext.Provider, { value: { headingLevel: itemLevel, featured: false }, children: Children.map(children, (child, i) => child == null || typeof child === 'boolean' ? null : (_jsx("li", { className: "arrive-rise grid", style: { animationDelay: `${(featured ? 280 : 200) + i * 80}ms` }, children: child }))) })] })] }) })] }));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* One update in a FeatureCard: a picture, a tag and a date, a title and a description. In the card's `featured`
|
|
45
|
+
* slot it is larger. With `href` the whole item is a link named by everything it shows, as LinkCard is, with
|
|
46
|
+
* the arrow after its title; with `actions` it is an article with its own buttons or links. Not both: a link
|
|
47
|
+
* can't hold another control.
|
|
48
|
+
*/
|
|
49
|
+
export function FeatureCardItem({ title, tag, date, description, media, headingLevel, href, actions, className, }) {
|
|
50
|
+
const context = useContext(ItemContext);
|
|
51
|
+
const titleId = useId();
|
|
52
|
+
const featured = context.featured;
|
|
53
|
+
const Heading = `h${Math.min(headingLevel ?? context.headingLevel, 6)}`;
|
|
54
|
+
const picture = media && (_jsx("div", { "aria-hidden": "true", className: cn('feature-media border-b border-border', featured ? 'aspect-[2/1]' : 'aspect-[3/1]'), children: media }));
|
|
55
|
+
const meta = (tag || date) && (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [tag && _jsx(Tag, { children: tag }), date && _jsx("span", { className: "text-caption text-muted-foreground", children: date })] }));
|
|
56
|
+
const words = cn('flex flex-1 flex-col', featured ? 'gap-2 p-5' : 'gap-1.5 p-4');
|
|
57
|
+
const titleType = featured ? 'text-heading' : 'text-subheading';
|
|
58
|
+
const descriptionType = featured ? 'text-body' : 'text-ui';
|
|
59
|
+
const surface = 'flex w-full flex-col overflow-clip rounded-lg border border-border bg-background';
|
|
60
|
+
if (href) {
|
|
61
|
+
return (_jsx(RACLink, { href: href, className: cn('group/feature-item relative flex min-h-target min-w-target cursor-pointer text-foreground no-underline outline-none', className), children: _jsxs("div", { className: cn(surface, 'transition-colors duration-(--duration-fast) ease-(--ease-standard) group-data-focus-visible/feature-item:focus-ring group-data-hovered/feature-item:border-input group-data-hovered/feature-item:bg-accent'), children: [picture, _jsxs("div", { className: words, children: [meta, _jsxs(Heading, { className: cn('flex items-start gap-1.5 text-foreground group-data-hovered/feature-item:underline', titleType), children: [_jsx("span", { className: "min-w-0", children: title }), _jsx(ArrowRight, { "aria-hidden": "true", className: "mt-1 size-4 shrink-0" })] }), description && (_jsx("p", { className: cn('max-w-[62ch] text-muted-foreground', descriptionType), children: description }))] })] }) }));
|
|
62
|
+
}
|
|
63
|
+
return (_jsxs("article", { "aria-labelledby": titleId, className: cn(surface, className), children: [picture, _jsxs("div", { className: words, children: [meta, _jsx(Heading, { id: titleId, className: cn('text-foreground', titleType), children: title }), description && (_jsx("p", { className: cn('max-w-[62ch] text-muted-foreground', descriptionType), children: description })), actions && (_jsx("div", { className: "mt-auto flex flex-wrap items-center gap-(--control-gap) pt-3", children: actions }))] })] }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=feature-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-card.js","sourceRoot":"","sources":["../../src/ui/feature-card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,GAGN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,eAAe,EACf,IAAI,IAAI,OAAO,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,+FAA+F;AAC/F,MAAM,WAAW,GAAG,aAAa,CAAoD;IACnF,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAC;AAgCH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,YAAY,GAAG,CAAC,EAChB,IAAI,EACJ,KAAK,GAAG,YAAY,EACpB,WAAW,EACX,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,SAAS,EACT,GAAG,KAAK,EACS;IACjB,MAAM,OAAO,GAAG,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
+
export type TimeOfDay = 'morning' | 'afternoon' | 'evening';
|
|
3
|
+
/**
|
|
4
|
+
* The part of the day an hour falls in: morning from 5 to 12, afternoon from 12 to 18, evening otherwise. Pass a
|
|
5
|
+
* date in the person's own time zone: on a server, `new Date()` is the server's clock.
|
|
6
|
+
*/
|
|
7
|
+
export declare function timeOfDay(date?: Date): TimeOfDay;
|
|
8
|
+
export interface TimeOfDayIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
|
|
9
|
+
period: TimeOfDay;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A rising sun, a sun or a moon, drawn in as it first renders: the sun comes up and its rays appear, the sun's
|
|
13
|
+
* rays turn in, the moon turns in and two stars twinkle. Once, in under three seconds. At AAA the parts only
|
|
14
|
+
* fade in; under reduced motion it is drawn at once. Decorative: hidden from assistive tech, so the words
|
|
15
|
+
* beside it say what it shows. 32 by 32, in the current colour. Server-safe.
|
|
16
|
+
*/
|
|
17
|
+
export declare function TimeOfDayIcon({ period, className, ...props }: TimeOfDayIconProps): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=time-of-day-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-of-day-icon.d.ts","sourceRoot":"","sources":["../../src/ui/time-of-day-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG7C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,IAAiB,GAAG,SAAS,CAK5D;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC;IACnF,MAAM,EAAE,SAAS,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAsEhF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
/**
|
|
5
|
+
* The part of the day an hour falls in: morning from 5 to 12, afternoon from 12 to 18, evening otherwise. Pass a
|
|
6
|
+
* date in the person's own time zone: on a server, `new Date()` is the server's clock.
|
|
7
|
+
*/
|
|
8
|
+
export function timeOfDay(date = new Date()) {
|
|
9
|
+
const hour = date.getHours();
|
|
10
|
+
if (hour >= 5 && hour < 12)
|
|
11
|
+
return 'morning';
|
|
12
|
+
if (hour >= 12 && hour < 18)
|
|
13
|
+
return 'afternoon';
|
|
14
|
+
return 'evening';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A rising sun, a sun or a moon, drawn in as it first renders: the sun comes up and its rays appear, the sun's
|
|
18
|
+
* rays turn in, the moon turns in and two stars twinkle. Once, in under three seconds. At AAA the parts only
|
|
19
|
+
* fade in; under reduced motion it is drawn at once. Decorative: hidden from assistive tech, so the words
|
|
20
|
+
* beside it say what it shows. 32 by 32, in the current colour. Server-safe.
|
|
21
|
+
*/
|
|
22
|
+
export function TimeOfDayIcon({ period, className, ...props }) {
|
|
23
|
+
const clip = useId();
|
|
24
|
+
return (_jsxs("svg", { viewBox: "0 0 32 32", width: "32", height: "32", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, className: cn('overflow-visible', className), children: [period === 'morning' && (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clip, children: _jsx("rect", { x: "0", y: "0", width: "32", height: "21.2" }) }) }), _jsx("g", { clipPath: `url(#${clip})`, children: _jsx("path", { className: "arrive-sunrise", style: { animationDelay: '220ms' }, d: "M9.5 21.2a6.5 6.5 0 0 1 13 0" }) }), _jsx("path", { className: "arrive-pop", style: { animationDelay: '760ms' }, d: "M16 8.6v2.6" }), _jsx("path", { className: "arrive-pop", style: { animationDelay: '840ms' }, d: "M8.1 11.9l1.8 1.8" }), _jsx("path", { className: "arrive-pop", style: { animationDelay: '840ms' }, d: "M23.9 11.9l-1.8 1.8" }), _jsx("path", { className: "arrive-pop", style: { animationDelay: '920ms' }, d: "M4.6 17.4l2.4 0.8" }), _jsx("path", { className: "arrive-pop", style: { animationDelay: '920ms' }, d: "M27.4 17.4l-2.4 0.8" }), _jsx("path", { d: "M4 21.2h24" }), _jsx("path", { d: "M9 25.6h5M18 25.6h5", opacity: "0.55" })] })), period === 'afternoon' && (_jsxs(_Fragment, { children: [_jsx("circle", { className: "arrive-pop", style: { animationDelay: '180ms' }, cx: "16", cy: "16", r: "5.5" }), _jsx("g", { className: "arrive-spin-in", style: { animationDelay: '260ms' }, children: _jsx("path", { d: "M16 4.6v3M16 24.4v3M4.6 16h3M24.4 16h3M7.9 7.9l2.1 2.1M22 22l2.1 2.1M7.9 24.1l2.1-2.1M22 10l2.1-2.1" }) })] })), period === 'evening' && (_jsxs(_Fragment, { children: [_jsx("g", { transform: "translate(1.6 2.4) scale(0.88)", children: _jsx("path", { className: "arrive-moon-in", style: { animationDelay: '200ms' }, d: "M16 4a8 8 0 0 0 12 12 12 12 0 1 1-12-12Z" }) }), _jsx("path", { className: "arrive-twinkle", style: { animationDelay: '700ms' }, d: "M23.5 5.1v4.8M21.1 7.5h4.8" }), _jsx("path", { className: "arrive-twinkle", style: { animationDelay: '950ms' }, d: "M28 11.8v2.8M26.6 13.2h2.8" })] }))] }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=time-of-day-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-of-day-icon.js","sourceRoot":"","sources":["../../src/ui/time-of-day-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAiB,MAAM,OA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ACF,eACE,SAAS,EAAC,gBAAgB,EAC1B,KAAK,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,EAClC,CAAC,EAAC,4BAA4B,GAC9B,IACD,CACJ,IACG,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@setsquare/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "React Aria components, design tokens, a dashboard shell and a site shell, with a switch between WCAG 2.2 AA and AAA sizing, spacing and contrast.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/Worktree-Amigos/setsquare-ui#readme",
|