@thewhatmatters/wmds 0.4.8 → 0.4.9
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 +31 -2
- package/CONSUMING.md +1 -1
- package/bin/wmds-check.mjs +8 -4
- package/dist/components/atoms/TextLink/TextLink.d.ts +9 -3
- package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/atoms/TextLink/TextLink.js +22 -17
- package/dist/components/molecules/IndexList/IndexList.d.ts +6 -3
- package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -1
- package/dist/components/molecules/IndexList/IndexList.js +22 -21
- package/dist/components/molecules/LinkTile/LinkTile.d.ts.map +1 -1
- package/dist/components/molecules/LinkTile/LinkTile.js +74 -68
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts +7 -1
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts.map +1 -1
- package/dist/components/molecules/LinkTile/linkTileStyles.js +2 -2
- package/dist/components/molecules/TileGrid/tileGridStyles.d.ts +2 -2
- package/dist/lib/typography.d.ts +2 -2
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/lib/typography.js +11 -0
- package/dist/styles.css +1 -1
- package/dist/typography.css +16 -0
- package/docs/components.md +7 -7
- package/docs/exports.json +1 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +7 -3
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +21 -4
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +13 -4
- package/docs/patterns/index.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,35 @@ Every release of `@thewhatmatters/wmds` is listed here, newest first.
|
|
|
7
7
|
- **Pasted patterns:** when a release changes a **Pattern — …** story's Show code, it is named under Consumer actions so apps re-copy it.
|
|
8
8
|
- **How to add an entry** (contributors): add your change to the top entry. If that version is already on npm (`npm view @thewhatmatters/wmds versions`), start a new entry above it and bump `version` in `package.json` to match. `npm run check:changelog` enforces the format.
|
|
9
9
|
|
|
10
|
+
## 0.4.9
|
|
11
|
+
|
|
12
|
+
**Fixes from the site's 0.4.8 upgrade: router links in every page pattern, a tighter tile caption, and a checker that no longer skips files.**
|
|
13
|
+
|
|
14
|
+
- **`renderLink` on the page patterns** — one prop name everywhere, for links the app's router should handle. Without it they were plain anchors that reload the page, and swapping one in the pasted markup reads as drift.
|
|
15
|
+
- **Guides/Filter panel → Pattern — filtered index**: `renderLink={(post) => <Link href={post.href} />}` (new) — post titles.
|
|
16
|
+
- **Guides/Post page → Pattern — post page**: `renderLink={(link) => <Link href={link.href} />}` (new) — the **Breadcrumb** and the category tags. View as Markdown and the share links stay plain anchors.
|
|
17
|
+
- **Guides/Resource detail → Pattern — resource detail**: `renderLink={(item) => <Link href={item.href} />}` (new) on `ResourceDetailPage` — the **Breadcrumb**.
|
|
18
|
+
- **Pattern — filtered grid** already had it, for tiles.
|
|
19
|
+
- **IndexList.Item** `render` (new) — `render={<Link href="/blog/post" />}` in place of `href`, the same shape as **LinkTile** and **Badge**. `href` is now optional.
|
|
20
|
+
- **TextLink** `render` (new) — the same, for any text link. `href` is now optional; pass one or the other.
|
|
21
|
+
- **`type-caption`** (new type step; `typographyClass("caption-tight")`) — `type-supporting`'s size and weight on a 16px line. For a single line directly under a label; not for wrapped text, which stays on `type-supporting`. In this release it is used on **LinkTile**'s meta line only. **Foundations → Typography** lists it.
|
|
22
|
+
- **LinkTile** — the title and the meta line sit as a pair: no gap between them, and the meta line is on `type-caption`. The space between the title's text and the meta's goes from about 9px to about 5px. The 12px between the image and the title and the two-line clamp are unchanged. A tile with a meta line is 6px shorter. The `loading` placeholder's bars sit in the same 20px and 16px lines, so a placeholder is exactly as tall as a loaded tile with a one-line title.
|
|
23
|
+
- **`wmds-check`** — finds a pasted pattern's header when a `"use client"` or `"use server"` directive (or blank lines) comes before it. It read line 1 only, so such a file was skipped silently and never checked for drift. Findings name the header's line.
|
|
24
|
+
- **0.4.8 Consumer actions corrected** — they said to put `"use client"` above the pattern header. The header goes first and the directive below it, as the `use-wmds` skill says. Both orders now work with `wmds-check`.
|
|
25
|
+
- **TileGrid docs** — the space under a masonry tile is the 2rem row gap plus less than 4px (32px to just under 36px), not "within 3px". A tile's height rounds up to the next 4px row track. The behavior has not changed.
|
|
26
|
+
|
|
27
|
+
### Consumer actions
|
|
28
|
+
|
|
29
|
+
Re-copy three patterns, then pass the app's link through `renderLink`. Do the wiring in a client component (a function cannot cross from a server component), and remove any `<Link>` added to pasted markup.
|
|
30
|
+
|
|
31
|
+
1. **Re-copy Guides/Filter panel → Pattern — filtered index** (`node_modules/@thewhatmatters/wmds/docs/patterns/guides-filter-panel--filtered-index.tsx`) over `components/blog-index.tsx`, re-apply your content, data, and handlers, and pass `renderLink={(post) => <Link href={post.href} />}` to `<FilteredIndex>`.
|
|
32
|
+
2. **Re-copy Guides/Post page → Pattern — post page** (`…/docs/patterns/guides-post-page--post-page.tsx`) over `components/post-page.tsx`, re-apply your content, and pass `renderLink={(link) => <Link href={link.href} />}` to `<PostPage>`.
|
|
33
|
+
3. **Re-copy Guides/Resource detail → Pattern — resource detail** (`…/docs/patterns/guides-resource-detail--detail.tsx`) over `components/resource-detail.tsx`, re-apply your content, and pass `renderLink={(item) => <Link href={item.href} />}` to `<ResourceDetailPage>`.
|
|
34
|
+
4. **Pattern headers:** the header stays on the first lines with `"use client"` below it. A file with the directive first is now checked too, so `npx wmds-check` may report drift it skipped before. Fix the drift, or re-copy.
|
|
35
|
+
5. **LinkTile:** nothing to do. Tiles with a meta line are 6px shorter. Update a screenshot baseline or a test that measures a tile's height. **Pattern — filtered grid** did not change; no re-copy.
|
|
36
|
+
6. **`type-caption`:** do not move other text to it. It is for one line under a label.
|
|
37
|
+
7. Other apps: none. `render` on **TextLink** and **IndexList.Item** is optional.
|
|
38
|
+
|
|
10
39
|
## 0.4.8
|
|
11
40
|
|
|
12
41
|
**A filtered grid and a resource detail for a resources page.** Three new components and two page patterns: a tile that is one link, a grid that packs tiles in reading order, the filter panel as a component, and a resource's detail as a dialog over the grid or as its own page. The WhatMatters Resources page is the first use. See **ADR-0044**.
|
|
@@ -25,9 +54,9 @@ Every release of `@thewhatmatters/wmds` is listed here, newest first.
|
|
|
25
54
|
|
|
26
55
|
### Consumer actions
|
|
27
56
|
|
|
28
|
-
1. **WhatMatters site, Resources page: use the new grid.** Copy **Guides/Filter panel → Pattern — filtered grid** (`node_modules/@thewhatmatters/wmds/docs/patterns/guides-filter-panel--filtered-grid.tsx`) into `components/resource-grid.tsx`, keep its header comment, and add `"use client"`
|
|
57
|
+
1. **WhatMatters site, Resources page: use the new grid.** Copy **Guides/Filter panel → Pattern — filtered grid** (`node_modules/@thewhatmatters/wmds/docs/patterns/guides-filter-panel--filtered-grid.tsx`) into `components/resource-grid.tsx`, keep its header comment as the first lines, and add `"use client"` below it. Each item is `{ id, title, href, image: { src, alt, width, height }, meta?, tag?, facets }` with `href: "/resources/<slug>"`; give every image its real `width` and `height`. Delete the hand-built list in `app/resources/page.tsx` and its classes.
|
|
29
58
|
2. **Wire the grid in one small client file** (functions cannot cross from a server component): `components/resources.tsx` with `"use client"` renders `<FilteredGrid title="Resources" caption="Library" items={items} groups={groups} renderLink={(item) => <Link href={item.href} scroll={false} />} renderImage={(image) => <Image {...image} sizes="(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw" />} overlay={<SiteGridOverlay />} />`. `app/resources/page.tsx` loads the items and renders it. Change `sizes` if you change `columns`; allow the image hosts in `next.config.ts`. Do not edit the pasted file for any of this.
|
|
30
|
-
3. **Add the detail.** Copy **Guides/Resource detail → Pattern — resource detail** (`…/docs/patterns/guides-resource-detail--detail.tsx`) into `components/resource-detail.tsx`, keep its header comment, and add `"use client"
|
|
59
|
+
3. **Add the detail.** Copy **Guides/Resource detail → Pattern — resource detail** (`…/docs/patterns/guides-resource-detail--detail.tsx`) into `components/resource-detail.tsx`, keep its header comment as the first lines, and add `"use client"` below it. Each resource needs `{ id, title, image, video?: { src, poster, captions? }, category, tags?, meta?, note, added, addedLabel, visitHref, rows? }`.
|
|
31
60
|
4. **Pick the form by route.**
|
|
32
61
|
- The page: `app/resources/[slug]/page.tsx` renders `<ResourceDetailPage item={…} breadcrumb={[{ label: "Home", href: "/" }, { label: "Resources", href: "/resources" }, { label: item.title }]} overlay={<SiteGridOverlay />} />`. Delete `app/resources/[category]`: the categories become a filter group on the grid. No redirects.
|
|
33
62
|
- The dialog: a parallel slot with an intercepting route (`app/resources/@detail/(.)[slug]/page.tsx`, a `default.tsx` that returns `null`, and `{detail}` in `app/resources/layout.tsx`) renders a client component with `<ResourceDetailDialog item={…} open onClose={() => router.back()} onPrevious={previous ? () => router.replace("/resources/" + previous.slug, { scroll: false }) : undefined} onNext={…} position={"3 of 9"} />`. Leave `onPrevious` out on the first resource and `onNext` out on the last.
|
package/CONSUMING.md
CHANGED
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
| `DescriptionList` | `layout` (`inline` \| `stacked`), `rule` (`solid` \| `dotted` \| `none`), `variant` (`sans` \| `mono`), `DescriptionList.Item` `name` / `layout` | Components/DescriptionList — **Pattern — post metadata**, **Pattern — details** |
|
|
274
274
|
| `SectionCaption` | `children`, `as`, `id`, `end`, `marker`, `rule` | Components/SectionCaption — **Pattern — column caption**, **Pattern — caption with an action** |
|
|
275
275
|
| `Prose` | `size` (`lg` \| `md`), `measure` (`reading` \| `none`), `as` | Components/Prose — **Pattern — article body**. Full page: **Guides/Post page → Pattern — post page** |
|
|
276
|
-
| `IndexList` | `captions`, `size`, `titleAs`, `empty`, `IndexList.Item` `meta` / `title` / `href` / `preview` | Components/IndexList — **Pattern — post index**. With filters: **Guides/Filter panel → Pattern — filtered index** |
|
|
276
|
+
| `IndexList` | `captions`, `size`, `titleAs`, `empty`, `IndexList.Item` `meta` / `title` / `href` or `render` / `preview` | Components/IndexList — **Pattern — post index**. With filters: **Guides/Filter panel → Pattern — filtered index** |
|
|
277
277
|
| `LinkTile` | `title`, `href` / `render`, `external`, `media`, `ratio`, `meta`, `tag`, `source`, `loading` | Components/LinkTile — **Pattern — resource tile**, **Pattern — router link** |
|
|
278
278
|
| `TileGrid` | `layout` (`masonry` / `uniform`), `columns`, `empty`, `busy`, `TileGrid.Item` | Components/TileGrid — **Pattern — tile grid**. With filters: **Guides/Filter panel → Pattern — filtered grid** |
|
|
279
279
|
| `FilterPanel` | `groups`, `selection`, `onSelectionChange`, `resultsLabel`, `labels`; `FilterPanel.Rail` / `.Trigger` / `.Sheet`; `useFilterSelection`, `matchesFilterSelection`, `countFilterOptions` | Components/FilterPanel — **Pattern — filter panel** |
|
package/bin/wmds-check.mjs
CHANGED
|
@@ -230,22 +230,26 @@ for (const file of files) {
|
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
// Pasted patterns.
|
|
233
|
-
|
|
233
|
+
// The header is the file's first comment line. A "use client" / "use server" directive or blank
|
|
234
|
+
// lines may come before it.
|
|
235
|
+
const headerIndex = lines.findIndex((line) => line.trim() !== "" && !/^\s*["']use (client|server)["'];?\s*$/.test(line));
|
|
236
|
+
const headerLine = headerIndex === -1 ? 0 : headerIndex;
|
|
237
|
+
const header = lines[headerLine]?.match(/^\/\/ @thewhatmatters\/wmds@([\w.-]+) · (.+)$/);
|
|
234
238
|
const id = source.match(/\?path=\/story\/([\w-]+)/)?.[1];
|
|
235
239
|
if (header && id && packageRoot) {
|
|
236
240
|
const shipped = path.join(packageRoot, "docs", "patterns", `${id}.tsx`);
|
|
237
241
|
if (!existsSync(shipped)) {
|
|
238
|
-
report(file, 1, "pattern-removed", "error", `pattern ${id} no longer ships in ${packageVersion} — see CHANGELOG.md`);
|
|
242
|
+
report(file, headerLine + 1, "pattern-removed", "error", `pattern ${id} no longer ships in ${packageVersion} — see CHANGELOG.md`);
|
|
239
243
|
} else {
|
|
240
244
|
if (header[1] !== packageVersion) {
|
|
241
|
-
report(file, 1, "pattern-stale", "warn", `pasted from ${header[1]}, installed ${packageVersion} — re-copy if CHANGELOG names it`);
|
|
245
|
+
report(file, headerLine + 1, "pattern-stale", "warn", `pasted from ${header[1]}, installed ${packageVersion} — re-copy if CHANGELOG names it`);
|
|
242
246
|
}
|
|
243
247
|
const shippedStructure = patternStructure(readFileSync(shipped, "utf8"));
|
|
244
248
|
const pastedStructure = patternStructure(source);
|
|
245
249
|
if (shippedStructure.join("\n") !== pastedStructure.join("\n")) {
|
|
246
250
|
report(
|
|
247
251
|
file,
|
|
248
|
-
1,
|
|
252
|
+
headerLine + 1,
|
|
249
253
|
"pattern-drift",
|
|
250
254
|
"warn",
|
|
251
255
|
`markup or classes differ from docs/patterns/${id}.tsx (${firstDifference(shippedStructure, pastedStructure)}) — allowed edits are content, data, handlers, exports`,
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type { AnchorHTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import type { AnchorHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
2
|
import { type TextLinkVariant } from "./textLinkStyles";
|
|
3
3
|
export { textLinkVariants, type TextLinkVariant } from "./textLinkStyles";
|
|
4
4
|
/** Layout-only — margin or placement; not for changing the link treatment. */
|
|
5
5
|
export type TextLinkLayoutClassName = string;
|
|
6
6
|
export interface TextLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "href" | "target"> {
|
|
7
|
-
|
|
7
|
+
/** Where the link goes. Leave it out when `render` carries the destination. */
|
|
8
|
+
href?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Compose the link onto another element (Base UI `render`) — `render={<Link href="/blog/post" />}`
|
|
11
|
+
* for a router link. The treatment, the focus ring, and `external` stay the same.
|
|
12
|
+
*/
|
|
13
|
+
render?: ReactElement;
|
|
8
14
|
children: ReactNode;
|
|
9
15
|
/**
|
|
10
16
|
* `prose` (default) — medium weight with a solid underline, for links inside body copy.
|
|
@@ -18,5 +24,5 @@ export interface TextLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorEleme
|
|
|
18
24
|
className?: TextLinkLayoutClassName;
|
|
19
25
|
}
|
|
20
26
|
/** Inline text navigation — the solid-underline prose link, or a quiet link for titles. */
|
|
21
|
-
export declare function TextLink({ href, children, variant, external, className, rel, ...anchorProps }: TextLinkProps): import("react").
|
|
27
|
+
export declare function TextLink({ href, render, children, variant, external, className, rel, ...anchorProps }: TextLinkProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
22
28
|
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextLink/TextLink.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextLink/TextLink.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAC7C;IACD,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,2FAA2F;AAC3F,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,OAAiB,EACjB,QAAgB,EAChB,SAAS,EACT,GAAG,EACH,GAAG,WAAW,EACf,EAAE,aAAa,8EA6Bf"}
|
|
@@ -3,24 +3,29 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { textLinkExternalIconClasses as t, textLinkVariantClasses as n, textLinkVariants as r } from "./textLinkStyles.js";
|
|
4
4
|
import { SquareArrowOutUpRight as i } from "lucide-react";
|
|
5
5
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { useRender as c } from "@base-ui/react/use-render";
|
|
6
7
|
//#region src/components/atoms/TextLink/TextLink.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
function l({ href: r, render: l, children: u, variant: d = "prose", external: f = !1, className: p, rel: m, ...h }) {
|
|
9
|
+
let g = f && m == null ? "noopener noreferrer" : m;
|
|
10
|
+
return r == null && l == null && console.warn("[WMDS TextLink] Pass `href`, or `render` with a link that carries it."), c({
|
|
11
|
+
render: l,
|
|
12
|
+
defaultTagName: "a",
|
|
13
|
+
props: {
|
|
14
|
+
...h,
|
|
15
|
+
...r == null ? null : { href: r },
|
|
16
|
+
...f ? { target: "_blank" } : null,
|
|
17
|
+
...g == null ? null : { rel: g },
|
|
18
|
+
className: e(n[d], p),
|
|
19
|
+
children: /* @__PURE__ */ s(a, { children: [u, f ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(i, {
|
|
20
|
+
className: t,
|
|
21
|
+
strokeWidth: 2,
|
|
22
|
+
"aria-hidden": !0
|
|
23
|
+
}), /* @__PURE__ */ o("span", {
|
|
24
|
+
className: "sr-only",
|
|
25
|
+
children: " (opens in a new tab)"
|
|
26
|
+
})] }) : null] })
|
|
27
|
+
}
|
|
23
28
|
});
|
|
24
29
|
}
|
|
25
30
|
//#endregion
|
|
26
|
-
export {
|
|
31
|
+
export { l as TextLink, r as textLinkVariants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type IndexListSize, type IndexListTitleElement } from "./indexListStyles";
|
|
3
3
|
export { indexListSizes, indexListTitleElements, type IndexListSize, type IndexListTitleElement, } from "./indexListStyles";
|
|
4
4
|
/** Layout-only — width, margin, or grid placement. */
|
|
@@ -32,7 +32,10 @@ export interface IndexListProps {
|
|
|
32
32
|
export interface IndexListItemProps {
|
|
33
33
|
/** The row's title — a link to `href`. */
|
|
34
34
|
title: string;
|
|
35
|
-
|
|
35
|
+
/** Where the title goes. Leave it out when `render` carries the destination. */
|
|
36
|
+
href?: string;
|
|
37
|
+
/** The router's link for the title, in place of a plain anchor — `render={<Link href="/blog/post" />}`. */
|
|
38
|
+
render?: ReactElement;
|
|
36
39
|
/** The meta column, for example a `<time>`. Above the title where the list is one column. */
|
|
37
40
|
meta?: ReactNode;
|
|
38
41
|
/** A short preview. When set, a control at the row's end expands it under the title. */
|
|
@@ -51,7 +54,7 @@ export interface IndexListItemProps {
|
|
|
51
54
|
* optional preview that expands under the title. Optional column captions share the rows' tracks.
|
|
52
55
|
*/
|
|
53
56
|
declare function IndexListRoot({ captions, size, titleAs, empty, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className, }: IndexListProps): import("react").JSX.Element;
|
|
54
|
-
declare function IndexListItem({ title, href, meta, preview, defaultOpen, open: openProp, onOpenChange, previewLabel, className, }: IndexListItemProps): import("react").JSX.Element;
|
|
57
|
+
declare function IndexListItem({ title, href, render, meta, preview, defaultOpen, open: openProp, onOpenChange, previewLabel, className, }: IndexListItemProps): import("react").JSX.Element;
|
|
55
58
|
export declare const IndexList: typeof IndexListRoot & {
|
|
56
59
|
Item: typeof IndexListItem;
|
|
57
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/IndexList/IndexList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAiBL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,iGAAiG;IACjG,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IndexList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/IndexList/IndexList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAiBL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,iGAAiG;IACjG,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2GAA2G;IAC3G,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AASD;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,IAAW,EACX,OAAc,EACd,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,+BA8BhB;AAED,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,WAAmB,EACnB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,GACV,EAAE,kBAAkB,+BA6CpB;AAED,eAAO,MAAM,SAAS;;CAEpB,CAAC"}
|
|
@@ -43,48 +43,49 @@ function k({ captions: t, size: n = "lg", titleAs: i = "h2", empty: o, "aria-lab
|
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
function A({ title: r, href: a,
|
|
47
|
-
let { size:
|
|
48
|
-
function
|
|
49
|
-
let e = !
|
|
50
|
-
|
|
46
|
+
function A({ title: r, href: a, render: s, meta: f, preview: p, defaultOpen: g = !1, open: y, onOpenChange: b, previewLabel: C, className: k }) {
|
|
47
|
+
let { size: A, titleAs: j } = x(O), M = S(), [N, P] = w(g), F = y !== void 0, I = F ? y : N, L = p != null;
|
|
48
|
+
function R() {
|
|
49
|
+
let e = !I;
|
|
50
|
+
F || P(e), b?.(e);
|
|
51
51
|
}
|
|
52
52
|
return /* @__PURE__ */ D("li", {
|
|
53
|
-
className: e(o,
|
|
53
|
+
className: e(o, k),
|
|
54
54
|
children: [
|
|
55
|
-
|
|
55
|
+
f == null ? null : /* @__PURE__ */ E("div", {
|
|
56
56
|
className: c,
|
|
57
|
-
children:
|
|
57
|
+
children: f
|
|
58
58
|
}),
|
|
59
59
|
/* @__PURE__ */ D("div", {
|
|
60
60
|
className: m,
|
|
61
|
-
children: [/* @__PURE__ */ E(
|
|
62
|
-
className: e(h, _[
|
|
61
|
+
children: [/* @__PURE__ */ E(j, {
|
|
62
|
+
className: e(h, _[A]),
|
|
63
63
|
children: /* @__PURE__ */ E(n, {
|
|
64
64
|
variant: "quiet",
|
|
65
65
|
href: a,
|
|
66
|
+
render: s,
|
|
66
67
|
children: r
|
|
67
68
|
})
|
|
68
|
-
}),
|
|
69
|
+
}), L ? /* @__PURE__ */ E(t, {
|
|
69
70
|
size: "md",
|
|
70
|
-
className: v[
|
|
71
|
-
icon: /* @__PURE__ */ E(T, { className: e(i,
|
|
72
|
-
"aria-label":
|
|
71
|
+
className: v[A],
|
|
72
|
+
icon: /* @__PURE__ */ E(T, { className: e(i, I && "rotate-180") }),
|
|
73
|
+
"aria-label": C ?? `Preview: ${r}`,
|
|
73
74
|
title: "",
|
|
74
|
-
"aria-expanded":
|
|
75
|
-
"aria-controls":
|
|
76
|
-
onClick:
|
|
75
|
+
"aria-expanded": I,
|
|
76
|
+
"aria-controls": M,
|
|
77
|
+
onClick: R
|
|
77
78
|
}) : null]
|
|
78
79
|
}),
|
|
79
|
-
|
|
80
|
+
L ? /* @__PURE__ */ E("div", {
|
|
80
81
|
className: e("motion-collapse", l),
|
|
81
|
-
"data-visible":
|
|
82
|
+
"data-visible": I ? "true" : "false",
|
|
82
83
|
children: /* @__PURE__ */ E("div", {
|
|
83
|
-
id:
|
|
84
|
+
id: M,
|
|
84
85
|
className: d,
|
|
85
86
|
children: /* @__PURE__ */ E("div", {
|
|
86
87
|
className: u,
|
|
87
|
-
children:
|
|
88
|
+
children: p
|
|
88
89
|
})
|
|
89
90
|
})
|
|
90
91
|
}) : null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkTile.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/LinkTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkTile.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/LinkTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+GAA+G;IAC/G,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6GAA6G;IAC7G,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAuBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,GAAG,EACH,MAAM,EACN,OAAe,EACf,SAAS,GACV,EAAE,aAAa,+BA0Ff"}
|
|
@@ -1,115 +1,121 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { Skeleton as t } from "../../atoms/Skeleton/Skeleton.js";
|
|
4
|
-
import { linkTileCaptionClasses as n, linkTileExternalIconClasses as r, linkTileFrameClasses as i, linkTileFrameFixedClasses as a, linkTileFrameNaturalClasses as o,
|
|
5
|
-
import { useId as
|
|
6
|
-
import { SquareArrowOutUpRight as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { useRender as
|
|
4
|
+
import { linkTileCaptionClasses as n, linkTileExternalIconClasses as r, linkTileFrameClasses as i, linkTileFrameFixedClasses as a, linkTileFrameNaturalClasses as o, linkTileLoadingLineClasses as s, linkTileLoadingMetaLineClasses as c, linkTileLoadingRatio as l, linkTileLoadingRootClasses as u, linkTileMetaClasses as d, linkTileRootClasses as f, linkTileSourceClasses as p, linkTileTagInlineClasses as m, linkTileTagOverClasses as h, linkTileTextClasses as g, linkTileTitleClasses as _ } from "./linkTileStyles.js";
|
|
5
|
+
import { useId as v } from "react";
|
|
6
|
+
import { SquareArrowOutUpRight as y } from "lucide-react";
|
|
7
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
8
|
+
import { useRender as S } from "@base-ui/react/use-render";
|
|
9
9
|
//#region src/components/molecules/LinkTile/LinkTile.tsx
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
function C({ render: e, ...t }) {
|
|
11
|
+
return S({
|
|
12
12
|
render: e,
|
|
13
13
|
defaultTagName: "a",
|
|
14
14
|
props: t
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function w(e) {
|
|
18
18
|
return e == null ? void 0 : { aspectRatio: String(e) };
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
className: e(
|
|
20
|
+
function T({ title: l, href: S, render: T, external: E = !1, media: D, ratio: O, meta: k, tag: A, source: j, loading: M = !1, className: N }) {
|
|
21
|
+
let P = v(), F = `${P}-title`, I = `${P}-meta`, L = `${P}-tag`, R = `${P}-hint`;
|
|
22
|
+
if (M) return /* @__PURE__ */ x("div", {
|
|
23
|
+
className: e(u, N),
|
|
24
24
|
"data-link-tile": "",
|
|
25
25
|
"data-loading": "",
|
|
26
26
|
"aria-hidden": "true",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ b("span", {
|
|
28
28
|
className: i,
|
|
29
|
-
style:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
}), /* @__PURE__ */
|
|
32
|
-
className:
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
style: w(O ?? 1.3333333333333333),
|
|
30
|
+
children: /* @__PURE__ */ b(t, { radius: "none" })
|
|
31
|
+
}), /* @__PURE__ */ x("span", {
|
|
32
|
+
className: g,
|
|
33
|
+
children: [/* @__PURE__ */ b("span", {
|
|
34
|
+
className: s,
|
|
35
|
+
children: /* @__PURE__ */ b(t, {
|
|
36
|
+
width: "70%",
|
|
37
|
+
height: 12,
|
|
38
|
+
radius: "inner",
|
|
39
|
+
index: 1
|
|
40
|
+
})
|
|
41
|
+
}), /* @__PURE__ */ b("span", {
|
|
42
|
+
className: c,
|
|
43
|
+
children: /* @__PURE__ */ b(t, {
|
|
44
|
+
width: "40%",
|
|
45
|
+
height: 10,
|
|
46
|
+
radius: "inner",
|
|
47
|
+
index: 2
|
|
48
|
+
})
|
|
43
49
|
})]
|
|
44
50
|
})]
|
|
45
51
|
});
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
S == null && T == null && console.warn("[WMDS LinkTile] Pass `href`, or `render` with a link that carries it.");
|
|
53
|
+
let z = D != null, B = [
|
|
54
|
+
F,
|
|
55
|
+
k != null && I,
|
|
56
|
+
A != null && L,
|
|
57
|
+
E && R
|
|
52
58
|
].filter(Boolean).join(" ");
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
render:
|
|
55
|
-
...
|
|
56
|
-
...
|
|
59
|
+
return /* @__PURE__ */ x(C, {
|
|
60
|
+
render: T,
|
|
61
|
+
...S == null ? null : { href: S },
|
|
62
|
+
...E ? {
|
|
57
63
|
target: "_blank",
|
|
58
64
|
rel: "noopener noreferrer"
|
|
59
65
|
} : null,
|
|
60
|
-
className: e(
|
|
61
|
-
"aria-labelledby":
|
|
66
|
+
className: e(f, N),
|
|
67
|
+
"aria-labelledby": B,
|
|
62
68
|
"data-link-tile": "",
|
|
63
|
-
"data-external":
|
|
64
|
-
children: [
|
|
65
|
-
className: e(i,
|
|
66
|
-
style:
|
|
69
|
+
"data-external": E ? "" : void 0,
|
|
70
|
+
children: [z ? /* @__PURE__ */ x("span", {
|
|
71
|
+
className: e(i, O == null ? o : a),
|
|
72
|
+
style: w(O),
|
|
67
73
|
"data-link-tile-frame": "",
|
|
68
|
-
children: [
|
|
69
|
-
id:
|
|
70
|
-
className:
|
|
71
|
-
children:
|
|
74
|
+
children: [D, A == null ? null : /* @__PURE__ */ b("span", {
|
|
75
|
+
id: L,
|
|
76
|
+
className: h,
|
|
77
|
+
children: A
|
|
72
78
|
})]
|
|
73
|
-
}) : null, /* @__PURE__ */
|
|
79
|
+
}) : null, /* @__PURE__ */ x("span", {
|
|
74
80
|
className: n,
|
|
75
81
|
children: [
|
|
76
|
-
|
|
77
|
-
className:
|
|
82
|
+
j == null ? null : /* @__PURE__ */ b("span", {
|
|
83
|
+
className: p,
|
|
78
84
|
"aria-hidden": "true",
|
|
79
|
-
children:
|
|
85
|
+
children: j
|
|
80
86
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
className:
|
|
87
|
+
/* @__PURE__ */ x("span", {
|
|
88
|
+
className: g,
|
|
83
89
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
id:
|
|
86
|
-
className:
|
|
87
|
-
children: [
|
|
90
|
+
/* @__PURE__ */ x("span", {
|
|
91
|
+
id: F,
|
|
92
|
+
className: _,
|
|
93
|
+
children: [l, E ? /* @__PURE__ */ b(y, {
|
|
88
94
|
className: r,
|
|
89
95
|
strokeWidth: 2,
|
|
90
96
|
"aria-hidden": !0
|
|
91
97
|
}) : null]
|
|
92
98
|
}),
|
|
93
|
-
|
|
94
|
-
id: P,
|
|
95
|
-
className: l,
|
|
96
|
-
children: D
|
|
97
|
-
}),
|
|
98
|
-
w ? /* @__PURE__ */ v("span", {
|
|
99
|
+
k == null ? null : /* @__PURE__ */ b("span", {
|
|
99
100
|
id: I,
|
|
101
|
+
className: d,
|
|
102
|
+
children: k
|
|
103
|
+
}),
|
|
104
|
+
E ? /* @__PURE__ */ b("span", {
|
|
105
|
+
id: R,
|
|
100
106
|
className: "sr-only",
|
|
101
107
|
children: "(opens in a new tab)"
|
|
102
108
|
}) : null
|
|
103
109
|
]
|
|
104
110
|
}),
|
|
105
|
-
|
|
106
|
-
id:
|
|
107
|
-
className:
|
|
108
|
-
children:
|
|
111
|
+
A != null && !z ? /* @__PURE__ */ b("span", {
|
|
112
|
+
id: L,
|
|
113
|
+
className: m,
|
|
114
|
+
children: A
|
|
109
115
|
}) : null
|
|
110
116
|
]
|
|
111
117
|
})]
|
|
112
118
|
});
|
|
113
119
|
}
|
|
114
120
|
//#endregion
|
|
115
|
-
export {
|
|
121
|
+
export { T as LinkTile, l as linkTileLoadingRatio };
|
|
@@ -21,10 +21,16 @@ export declare const linkTileTagOverClasses = "absolute start-2 top-2 z-[1] flex
|
|
|
21
21
|
export declare const linkTileCaptionClasses = "flex min-w-0 items-start gap-2";
|
|
22
22
|
/** Holds the source mark on the title's first line. */
|
|
23
23
|
export declare const linkTileSourceClasses = "flex h-5 shrink-0 items-center";
|
|
24
|
-
|
|
24
|
+
/** The title's lines, then the meta line on its 16px line, with no gap between them: the leading is the space. */
|
|
25
|
+
export declare const linkTileTextClasses = "flex min-w-0 flex-1 flex-col";
|
|
26
|
+
/** The loading placeholder's title line — the title's 20px line box, with the bar centered in it. */
|
|
27
|
+
export declare const linkTileLoadingLineClasses = "flex h-5 items-center";
|
|
28
|
+
/** The loading placeholder's meta line — the meta's 16px line box. */
|
|
29
|
+
export declare const linkTileLoadingMetaLineClasses = "flex h-4 items-center";
|
|
25
30
|
/** Two lines at most. Hover and keyboard focus underline it, as a quiet **TextLink** does. */
|
|
26
31
|
export declare const linkTileTitleClasses: string;
|
|
27
32
|
export declare const linkTileExternalIconClasses = "ml-1 inline-block size-[0.85em] align-[-0.05em] stroke-current text-muted";
|
|
33
|
+
/** One line, on the 16px caption line so it sits close under the title. */
|
|
28
34
|
export declare const linkTileMetaClasses: string;
|
|
29
35
|
/** A tag on a tile with no image sits at the caption's end. */
|
|
30
36
|
export declare const linkTileTagInlineClasses = "flex shrink-0 items-center";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkTileStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/linkTileStyles.ts"],"names":[],"mappings":"AAIA,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,2BAA2B,gDAAgD,CAAC;AAEzF,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,0FACmD,CAAC;AAE1F,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,8DAA8D,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"linkTileStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/linkTileStyles.ts"],"names":[],"mappings":"AAIA,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,2BAA2B,gDAAgD,CAAC;AAEzF,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,0FACmD,CAAC;AAE1F,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,8DAA8D,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,kHAAkH;AAClH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,qGAAqG;AACrG,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,sEAAsE;AACtE,eAAO,MAAM,8BAA8B,0BAA0B,CAAC;AAEtE,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,eAAO,MAAM,2BAA2B,8EAA8E,CAAC;AAEvH,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,QAAmD,CAAC;AAEpF,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,+BAA+B,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
import { focusRingTransitionClasses as n, motionTransition as r } from "../../../lib/motion.js";
|
|
5
5
|
//#region src/components/molecules/LinkTile/linkTileStyles.ts
|
|
6
|
-
var i = 4 / 3, a = e("group/link-tile relative flex w-full min-w-0 flex-col gap-3 rounded-[var(--radius-card-body)] text-left no-underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-4 focus-visible:ring-offset-body", n), o = "flex w-full min-w-0 flex-col gap-3", s = e("relative block w-full overflow-hidden rounded-[var(--radius-card-body)] bg-muted-surface", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:content-['']", "after:transition-[border-color,background-color] after:duration-fast after:ease-standard", "group-hover/link-tile:after:border-border-emphasized group-hover/link-tile:after:bg-overlay-hover", "group-focus-visible/link-tile:after:border-border-emphasized"), c = "[&>img]:block [&>img]:h-auto [&>img]:w-full", l = "[&>img]:absolute [&>img]:inset-0 [&>img]:block [&>img]:size-full [&>img]:object-cover", u = "absolute start-2 top-2 z-[1] flex max-w-[calc(100%-1rem)]", d = "flex min-w-0 items-start gap-2", f = "flex h-5 shrink-0 items-center", p = "flex min-w-0 flex-1 flex-col
|
|
6
|
+
var i = 4 / 3, a = e("group/link-tile relative flex w-full min-w-0 flex-col gap-3 rounded-[var(--radius-card-body)] text-left no-underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-4 focus-visible:ring-offset-body", n), o = "flex w-full min-w-0 flex-col gap-3", s = e("relative block w-full overflow-hidden rounded-[var(--radius-card-body)] bg-muted-surface", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:content-['']", "after:transition-[border-color,background-color] after:duration-fast after:ease-standard", "group-hover/link-tile:after:border-border-emphasized group-hover/link-tile:after:bg-overlay-hover", "group-focus-visible/link-tile:after:border-border-emphasized"), c = "[&>img]:block [&>img]:h-auto [&>img]:w-full", l = "[&>img]:absolute [&>img]:inset-0 [&>img]:block [&>img]:size-full [&>img]:object-cover", u = "absolute start-2 top-2 z-[1] flex max-w-[calc(100%-1rem)]", d = "flex min-w-0 items-start gap-2", f = "flex h-5 shrink-0 items-center", p = "flex min-w-0 flex-1 flex-col", m = "flex h-5 items-center", h = "flex h-4 items-center", g = e(t("ui-label"), "line-clamp-2 text-pretty underline decoration-transparent decoration-solid underline-offset-[0.2em]", "transition-[text-decoration-color]", r("fast"), "group-hover/link-tile:decoration-current group-focus-visible/link-tile:decoration-current"), _ = "ml-1 inline-block size-[0.85em] align-[-0.05em] stroke-current text-muted", v = e(t("caption-tight"), "truncate"), y = "flex shrink-0 items-center";
|
|
7
7
|
//#endregion
|
|
8
|
-
export { d as linkTileCaptionClasses,
|
|
8
|
+
export { d as linkTileCaptionClasses, _ as linkTileExternalIconClasses, s as linkTileFrameClasses, l as linkTileFrameFixedClasses, c as linkTileFrameNaturalClasses, m as linkTileLoadingLineClasses, h as linkTileLoadingMetaLineClasses, i as linkTileLoadingRatio, o as linkTileLoadingRootClasses, v as linkTileMetaClasses, a as linkTileRootClasses, f as linkTileSourceClasses, y as linkTileTagInlineClasses, u as linkTileTagOverClasses, p as linkTileTextClasses, g as linkTileTitleClasses };
|
|
@@ -15,8 +15,8 @@ export declare const tileGridDefaultColumns: {
|
|
|
15
15
|
readonly lg: 3;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* A packed grid's row track, in px (`--spacing`). A tile spans as many as its height needs,
|
|
19
|
-
* the space under a tile is the row gap plus
|
|
18
|
+
* A packed grid's row track, in px (`--spacing`). A tile spans as many as its height needs, rounded
|
|
19
|
+
* up, so the space under a tile is the row gap plus less than this much (32px to just under 36px).
|
|
20
20
|
*/
|
|
21
21
|
export declare const tileGridRowUnitPx = 4;
|
|
22
22
|
export declare const tileGridRootClasses = "w-full min-w-0";
|
package/dist/lib/typography.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Atoms with fixed-height shells still use text-sm + leading-none until Phase 4 (type-control).
|
|
7
7
|
*/
|
|
8
8
|
/** WMDS document roles — map to Astryx semantic type scale. */
|
|
9
|
-
export type TypographyRole = "display" | "page-heading" | "section-heading" | "subheading" | "body" | "ui-label" | "caption" | "overline" | "eyebrow" | "reading";
|
|
9
|
+
export type TypographyRole = "display" | "page-heading" | "section-heading" | "subheading" | "body" | "ui-label" | "caption" | "caption-tight" | "overline" | "eyebrow" | "reading";
|
|
10
10
|
/** Astryx semantic type names (Foundation reference). */
|
|
11
|
-
export type AstryxTypeScale = "display-1" | "display-2" | "display-3" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "large" | "body" | "label" | "supporting" | "code" | "control" | "eyebrow" | "reading";
|
|
11
|
+
export type AstryxTypeScale = "display-1" | "display-2" | "display-3" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "large" | "body" | "label" | "supporting" | "caption" | "code" | "control" | "eyebrow" | "reading";
|
|
12
12
|
export type TypographyTracking = "tight" | "normal" | "wider";
|
|
13
13
|
export interface GeometricScaleStep {
|
|
14
14
|
token: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/lib/typography.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,YAAY,GACZ,MAAM,GACN,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,MAAM,GACN,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC;IAChC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAgBA,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAc9C,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAKd,CAAC;AAEX,mFAAmF;AACnF,eAAO,MAAM,SAAS;;;;;GAKnB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/lib/typography.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,YAAY,GACZ,MAAM,GACN,UAAU,GACV,SAAS,GACT,eAAe,GACf,UAAU,GACV,SAAS,GACT,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC;IAChC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAgBA,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAc9C,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAKd,CAAC;AAEX,mFAAmF;AACnF,eAAO,MAAM,SAAS;;;;;GAKnB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA6H7C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAmBA,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;EAsBf,CAAC;AAEX,kGAAkG;AAClG,eAAO,MAAM,qBAAqB,EAE7B,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AAEpC,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE5D;AAED,8EAA8E;AAC9E,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,OAAO,GAAG,IAErD,GAAG,kBAAkB,EAAE,CAS9B"}
|
package/dist/lib/typography.js
CHANGED
|
@@ -151,6 +151,17 @@ var t = [
|
|
|
151
151
|
sample: "Updated 2 minutes ago",
|
|
152
152
|
usedIn: ["Address line", "Input description"]
|
|
153
153
|
},
|
|
154
|
+
{
|
|
155
|
+
role: "caption-tight",
|
|
156
|
+
label: "Caption, tight",
|
|
157
|
+
description: "A single line directly under a label — supporting size and weight on a 16px line (WMDS extension). Not for wrapped text; that stays caption",
|
|
158
|
+
astryxType: "caption",
|
|
159
|
+
className: "type-caption text-muted",
|
|
160
|
+
tracking: "normal",
|
|
161
|
+
trackingClass: "tracking-normal",
|
|
162
|
+
sample: "contrast.example",
|
|
163
|
+
usedIn: ["LinkTile meta line"]
|
|
164
|
+
},
|
|
154
165
|
{
|
|
155
166
|
role: "overline",
|
|
156
167
|
label: "Overline",
|