@atelic-action/ui 3.10.0 → 3.12.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 +5 -3
- package/package.json +1 -1
- package/src/primitives/Bubble.tsx +38 -0
- package/src/primitives/index.ts +1 -0
- package/src/sections/SplitSection.tsx +6 -3
- package/src/styles/primitives.css +95 -2
- package/src/styles/sections.css +13 -0
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ Every export, grouped by the entry it is imported from. The gallery column links
|
|
|
99
99
|
| `SocialStrip` | `@atelic-action/ui/sections` | A static grid of the business's social photos linking to the profile, never a live embed | [#social-strip](https://ui.atelic.me/#social-strip) |
|
|
100
100
|
| `SplitSection` | `@atelic-action/ui/sections` | The two column band: copy beside copy, or media beside copy | [#split-section](https://ui.atelic.me/#split-section) |
|
|
101
101
|
| `SiteConfig` and its member types, `formatClock`, `formatHoursRange`, `isClosed`, `isHoneypotFilled`, `trackEvent` | `@atelic-action/ui/sections` | The site contract the sections read, and the hours, honeypot, and lead event helpers | none |
|
|
102
|
-
| `ImageFrame`, `ProseBlocks`, `QuoteCard`, `StarRow`, `TickList` | `@atelic-action/ui/primitives` | The marketing primitives: a framed image, prose blocks (headings at two levels, paragraphs, lists, and figures: small captioned tiles in rows, an image or a silent looping clip played only while on screen, each opening large in a dialog), a quote card, a row of filled stars, a tick list | [#marketing-primitives](https://ui.atelic.me/#marketing-primitives) |
|
|
102
|
+
| `Bubble`, `ImageFrame`, `ProseBlocks`, `QuoteCard`, `StarRow`, `TickList` | `@atelic-action/ui/primitives` | The marketing primitives: a round tile holding an icon or a step number, a framed image, prose blocks (headings at two levels, paragraphs, lists, and figures: small captioned tiles in rows, an image or a silent looping clip played only while on screen, each opening large in a dialog), a quote card, a row of filled stars, a tick list | [#marketing-primitives](https://ui.atelic.me/#marketing-primitives) |
|
|
103
103
|
| `SiteShell` | `@atelic-action/ui/chrome` | A marketing page's whole chrome: skip link, header, main, footer, sticky bar, mounting the base path provider | none |
|
|
104
104
|
| `BasePathProvider`, `useBasePath`, `useWithBase`, `joinBase`, `stripBase`, `hasBase`, `normalizeBasePath` | `@atelic-action/ui/routing` | The base path a site is served under, read by Button, Chip, and every section that builds a link | none |
|
|
105
105
|
| `joinBase`, `stripBase`, `hasBase`, `normalizeBasePath` | `@atelic-action/ui/routing/base-path` | The same four pure helpers, built, for what Node runs (a Playwright spec, a script) | none |
|
|
@@ -236,6 +236,8 @@ import { Button, SectionHeading } from "@atelic-action/ui/primitives";
|
|
|
236
236
|
|
|
237
237
|
`Button` is an anchor when it has an `href` and a real button otherwise. It puts the base path from `BasePathProvider` on a root path `href` (0.19.0), so a site served under a prefix needs no wrapper; with no provider above it the `href` renders as given. Its arrow is hidden from the name a screen reader hears.
|
|
238
238
|
|
|
239
|
+
`Bubble` (3.11.0) is the round tile set beside a heading or a numbered step, holding either a lucide icon the caller sizes (`icon`) or a short mono index (`num`, such as "01"); given both, the icon sits inside and the number rides a small badge on the lower right rim, the way an unread count sits on an app icon. It comes in three sizes (`sm`, `md`, `lg`: 36, 48, and 60 pixels across, `md` by default) and lifts its fill for a dark band with `onDark`, the way `Chip` does. It is decoration and wears `aria-hidden`, so the heading beside it carries the meaning, the step's number included.
|
|
240
|
+
|
|
239
241
|
## The Access Gate
|
|
240
242
|
|
|
241
243
|
The gate puts a whole host behind an email sign in with no database: a reader on the allowlist asks for a link, the link starts a signed session cookie, and the middleware holds every page and file back from anyone without one. It is opt in and fails open, so a host with no `GATE_SESSION_SECRET` is fully public.
|
|
@@ -479,7 +481,7 @@ export function SiteShell(props: Omit<SiteShellProps, "currentPath" | "basePath"
|
|
|
479
481
|
| `Hero` | The home page opener: a full bleed image (or the token gradient), a headline with a serif accent, a pair of actions, trust figures, and a scroll cue |
|
|
480
482
|
| `PageHero` | The interior page opener on the alternate band; children sit under the lead |
|
|
481
483
|
| `LogoMarquee` | A dark band of chips scrolling without end: credentials, clients, or press |
|
|
482
|
-
| `SplitSection` | The two column band: copy beside copy, or media beside copy |
|
|
484
|
+
| `SplitSection` | The two column band: copy beside copy, or media beside copy. `ratio` is `even`, `narrow-first`, or `media`, a fixed 420px shot column and the gap a card row uses, so a photo beside copy lines up with a case study entry above it; `even` and `narrow-first` stack below 920px, `media` below 761px |
|
|
483
485
|
| `PricingBand` | A brand colored band with the price in a card beside it, informational by design |
|
|
484
486
|
| `MediaBand` | A plain full bleed image band, cropped from the center |
|
|
485
487
|
| `CTABanner` | A mid page banner behind a directional wash, with the token gradient before any photography |
|
|
@@ -512,7 +514,7 @@ export function SiteShell(props: Omit<SiteShellProps, "currentPath" | "basePath"
|
|
|
512
514
|
| `BlogPost` | One article: back link, title, byline and dateline, body |
|
|
513
515
|
| `LegalPage` | A legal document from data, its last revised date first |
|
|
514
516
|
|
|
515
|
-
The primitives that came with them, in `@atelic-action/ui/primitives`: `ImageFrame`, `ProseBlocks`, `QuoteCard`, `StarRow`, and `TickList
|
|
517
|
+
The primitives that came with them, in `@atelic-action/ui/primitives`: `ImageFrame`, `ProseBlocks`, `QuoteCard`, `StarRow`, and `TickList`, with `Bubble` (see Primitives) shown beside them in the gallery. `StarRow` stays beside `StarRating` on purpose: it draws only the filled stars a review shows, in whole steps and the brand color, named "4 out of 5 stars", where `StarRating` draws the whole scale with outlines in half steps and can take a rating.
|
|
516
518
|
|
|
517
519
|
The entry also exports the helpers the sections use, for a site's own code: `formatClock`, `formatHoursRange`, and `isClosed` for hours, `isHoneypotFilled`, and `trackEvent`.
|
|
518
520
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atelic-action/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Shared UI for the Atelic templates: site chrome, base styles, the component library, the access gate, and the app shell they install",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export interface BubbleProps {
|
|
4
|
+
/** The icon inside: a lucide element the caller sizes. */
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* A short mono index, such as "01": set in the middle when there is no
|
|
8
|
+
* icon, and on a small badge at the lower right rim when there is one.
|
|
9
|
+
*/
|
|
10
|
+
num?: string;
|
|
11
|
+
/** 36, 48, or 60 pixels across. */
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
/** Lifts the fill for a dark band, the way the chip's dark form does. */
|
|
14
|
+
onDark?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A round tile holding an icon or a step number, set beside a heading or a
|
|
20
|
+
* numbered step. Given both, the icon sits inside and the number rides a
|
|
21
|
+
* badge on the rim, the way an unread count sits on an app icon. It is
|
|
22
|
+
* decoration, so it is hidden from assistive tech
|
|
23
|
+
* (`aria-hidden`) and the meaning stays in the heading beside it: a step's
|
|
24
|
+
* number belongs in that heading's text or the list's order, never only here.
|
|
25
|
+
*/
|
|
26
|
+
export function Bubble({ icon, num, size = "md", onDark = false, className }: BubbleProps) {
|
|
27
|
+
const classes = ["bubble", `bubble-${size}`, onDark && "on-dark", className]
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.join(" ");
|
|
30
|
+
const hasIcon = icon !== undefined && icon !== null && icon !== false;
|
|
31
|
+
const hasNum = num !== undefined && num !== "";
|
|
32
|
+
return (
|
|
33
|
+
<span className={classes} aria-hidden="true">
|
|
34
|
+
{hasIcon ? icon : hasNum && <span className="bubble-num">{num}</span>}
|
|
35
|
+
{hasIcon && hasNum && <span className="bubble-badge">{num}</span>}
|
|
36
|
+
</span>
|
|
37
|
+
);
|
|
38
|
+
}
|
package/src/primitives/index.ts
CHANGED
|
@@ -4,10 +4,13 @@ export interface SplitSectionProps {
|
|
|
4
4
|
left: ReactNode;
|
|
5
5
|
right: ReactNode;
|
|
6
6
|
/**
|
|
7
|
-
* Column proportions
|
|
8
|
-
*
|
|
7
|
+
* Column proportions from 920px up (`media` from 761px, where a card row splits); below that every ratio stacks.
|
|
8
|
+
* "even" (1/1); "narrow-first" (0.9/1.1, a looser media plus copy);
|
|
9
|
+
* or "media", a fixed 420px media column and the gap a card row uses,
|
|
10
|
+
* so a photo beside copy lines up with a case study entry above it,
|
|
11
|
+
* with an `ImageFrame` in it held to the column's left edge.
|
|
9
12
|
*/
|
|
10
|
-
ratio?: "even" | "narrow-first";
|
|
13
|
+
ratio?: "even" | "narrow-first" | "media";
|
|
11
14
|
align?: "start" | "center";
|
|
12
15
|
/** Section background band. */
|
|
13
16
|
surface?: "default" | "alt";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* The primitives under src/primitives: the button, the chip, the
|
|
2
|
-
the lead paragraph, and the section heading. Every value is a theme token.
|
|
1
|
+
/* The primitives under src/primitives: the button, the chip, the bubble, the
|
|
2
|
+
eyebrow, the lead paragraph, and the section heading. Every value is a theme token.
|
|
3
3
|
They sit in the package's layer like every sheet here, so any rule a site
|
|
4
4
|
writes outside a layer still wins over them whatever its specificity. */
|
|
5
5
|
@layer atelic-ui {
|
|
@@ -101,6 +101,99 @@
|
|
|
101
101
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* Bubble: a round tile holding an icon or a step number, set beside a
|
|
105
|
+
heading. The icon takes the primary through currentColor; the number is
|
|
106
|
+
set in the mono face and steps with the tile's size. Given both, the
|
|
107
|
+
number rides a badge on the lower right rim. The dark form mirrors the
|
|
108
|
+
chip's: a translucent white fill and an inset ring. */
|
|
109
|
+
.atelic-ui .bubble {
|
|
110
|
+
position: relative;
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
flex: none;
|
|
115
|
+
width: 48px;
|
|
116
|
+
height: 48px;
|
|
117
|
+
border-radius: 50%;
|
|
118
|
+
background: var(--card);
|
|
119
|
+
border: 1px solid var(--hairline);
|
|
120
|
+
color: var(--primary);
|
|
121
|
+
box-shadow: var(--shadow-sm);
|
|
122
|
+
}
|
|
123
|
+
.atelic-ui .bubble svg {
|
|
124
|
+
flex: none;
|
|
125
|
+
}
|
|
126
|
+
.atelic-ui .bubble-num {
|
|
127
|
+
font-family: var(--font-mono);
|
|
128
|
+
font-size: 0.8rem;
|
|
129
|
+
font-weight: 600;
|
|
130
|
+
letter-spacing: 0.1em;
|
|
131
|
+
/* The tracking trails the last glyph; the same lead on the left keeps
|
|
132
|
+
the number optically centered in the circle. */
|
|
133
|
+
padding-left: 0.1em;
|
|
134
|
+
line-height: 1;
|
|
135
|
+
color: var(--primary);
|
|
136
|
+
}
|
|
137
|
+
/* The badge: a small filled pill on the lower right rim, ringed in the
|
|
138
|
+
card color so it sits clean over the circle's edge. */
|
|
139
|
+
.atelic-ui .bubble-badge {
|
|
140
|
+
position: absolute;
|
|
141
|
+
right: -4px;
|
|
142
|
+
bottom: -4px;
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
min-width: 1.9em;
|
|
147
|
+
height: 1.9em;
|
|
148
|
+
padding: 0 0.4em;
|
|
149
|
+
border-radius: var(--radius-pill);
|
|
150
|
+
background: var(--primary);
|
|
151
|
+
color: #fff;
|
|
152
|
+
box-shadow: 0 0 0 2px var(--card);
|
|
153
|
+
font-family: var(--font-mono);
|
|
154
|
+
font-size: 0.62rem;
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
letter-spacing: 0.04em;
|
|
157
|
+
line-height: 1;
|
|
158
|
+
}
|
|
159
|
+
.atelic-ui .bubble-sm {
|
|
160
|
+
width: 36px;
|
|
161
|
+
height: 36px;
|
|
162
|
+
}
|
|
163
|
+
.atelic-ui .bubble-sm .bubble-num {
|
|
164
|
+
font-size: 0.66rem;
|
|
165
|
+
}
|
|
166
|
+
.atelic-ui .bubble-sm .bubble-badge {
|
|
167
|
+
right: -5px;
|
|
168
|
+
bottom: -5px;
|
|
169
|
+
font-size: 0.52rem;
|
|
170
|
+
}
|
|
171
|
+
.atelic-ui .bubble-lg {
|
|
172
|
+
width: 60px;
|
|
173
|
+
height: 60px;
|
|
174
|
+
}
|
|
175
|
+
.atelic-ui .bubble-lg .bubble-num {
|
|
176
|
+
font-size: 0.95rem;
|
|
177
|
+
}
|
|
178
|
+
.atelic-ui .bubble-lg .bubble-badge {
|
|
179
|
+
right: -3px;
|
|
180
|
+
bottom: -3px;
|
|
181
|
+
font-size: 0.72rem;
|
|
182
|
+
}
|
|
183
|
+
.atelic-ui .bubble.on-dark {
|
|
184
|
+
background: rgba(255, 255, 255, 0.08);
|
|
185
|
+
border-color: transparent;
|
|
186
|
+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
|
|
187
|
+
color: var(--primary-bright);
|
|
188
|
+
}
|
|
189
|
+
.atelic-ui .bubble.on-dark .bubble-num {
|
|
190
|
+
color: var(--primary-bright);
|
|
191
|
+
}
|
|
192
|
+
/* On a dark band the badge's ring takes the band's color, not the card's. */
|
|
193
|
+
.atelic-ui .bubble.on-dark .bubble-badge {
|
|
194
|
+
box-shadow: 0 0 0 2px var(--surface-dark);
|
|
195
|
+
}
|
|
196
|
+
|
|
104
197
|
/* Eyebrow: mono uppercase kicker trailed by a bar that fades off to the
|
|
105
198
|
right — the wordmark's signature, in the brand's primary. This fade is
|
|
106
199
|
the only rendering; the old leading-dash mode is retired. */
|
package/src/styles/sections.css
CHANGED
|
@@ -2632,6 +2632,19 @@
|
|
|
2632
2632
|
gap: 72px;
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
|
+
/* Two columns from 761px, where a card row does, so the photo lines up. */
|
|
2636
|
+
@media (min-width: 761px) {
|
|
2637
|
+
/* The media column and the gap a card row uses. */
|
|
2638
|
+
.atelic-ui .split.ratio-media {
|
|
2639
|
+
grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
|
|
2640
|
+
gap: clamp(24px, 4vw, 44px);
|
|
2641
|
+
}
|
|
2642
|
+
/* The frame hugs the media column's left edge rather than centering;
|
|
2643
|
+
stacked, it keeps the primitive's centering. */
|
|
2644
|
+
.atelic-ui .split.ratio-media .imgframe {
|
|
2645
|
+
margin-inline: 0;
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2635
2648
|
.atelic-ui .split.align-start {
|
|
2636
2649
|
align-items: start;
|
|
2637
2650
|
}
|