@charcuterie/ui 2.6.0 → 2.8.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.
Files changed (98) hide show
  1. package/README.md +13 -1
  2. package/dist/AdaptiveGrid/AdaptiveGrid.d.ts +94 -0
  3. package/dist/AdaptiveGrid/AdaptiveGrid.d.ts.map +1 -0
  4. package/dist/AdaptiveGrid/AdaptiveGrid.js +73 -0
  5. package/dist/AdaptiveGrid/AdaptiveGrid.js.map +1 -0
  6. package/dist/AdaptiveGrid/chooseColumns.d.ts +206 -0
  7. package/dist/AdaptiveGrid/chooseColumns.d.ts.map +1 -0
  8. package/dist/AdaptiveGrid/chooseColumns.js +156 -0
  9. package/dist/AdaptiveGrid/chooseColumns.js.map +1 -0
  10. package/dist/AdaptiveGrid/useAdaptiveColumns.d.ts +155 -0
  11. package/dist/AdaptiveGrid/useAdaptiveColumns.d.ts.map +1 -0
  12. package/dist/AdaptiveGrid/useAdaptiveColumns.js +153 -0
  13. package/dist/AdaptiveGrid/useAdaptiveColumns.js.map +1 -0
  14. package/dist/Button/Button.d.ts.map +1 -1
  15. package/dist/Button/Button.js +11 -6
  16. package/dist/Button/Button.js.map +1 -1
  17. package/dist/ButtonLink/ButtonLink.d.ts +59 -0
  18. package/dist/ButtonLink/ButtonLink.d.ts.map +1 -0
  19. package/dist/ButtonLink/ButtonLink.js +69 -0
  20. package/dist/ButtonLink/ButtonLink.js.map +1 -0
  21. package/dist/Combobox/Combobox.d.ts.map +1 -1
  22. package/dist/Combobox/Combobox.js +1 -1
  23. package/dist/Combobox/Combobox.js.map +1 -1
  24. package/dist/Dialog/Dialog.js +1 -1
  25. package/dist/Dialog/Dialog.js.map +1 -1
  26. package/dist/LogViewer/LogViewer.d.ts.map +1 -1
  27. package/dist/LogViewer/LogViewer.js +33 -1
  28. package/dist/LogViewer/LogViewer.js.map +1 -1
  29. package/dist/RouterLink/AnchorLink.d.ts +17 -0
  30. package/dist/RouterLink/AnchorLink.d.ts.map +1 -0
  31. package/dist/RouterLink/AnchorLink.js +16 -0
  32. package/dist/RouterLink/AnchorLink.js.map +1 -0
  33. package/dist/RouterLink/RouterLinkProvider.d.ts +13 -0
  34. package/dist/RouterLink/RouterLinkProvider.d.ts.map +1 -0
  35. package/dist/RouterLink/RouterLinkProvider.js +47 -0
  36. package/dist/RouterLink/RouterLinkProvider.js.map +1 -0
  37. package/dist/RouterLink/routerLink.d.ts +45 -0
  38. package/dist/RouterLink/routerLink.d.ts.map +1 -0
  39. package/dist/RouterLink/routerLink.js +31 -0
  40. package/dist/RouterLink/routerLink.js.map +1 -0
  41. package/dist/TextLink/TextLink.d.ts +69 -0
  42. package/dist/TextLink/TextLink.d.ts.map +1 -0
  43. package/dist/TextLink/TextLink.js +79 -0
  44. package/dist/TextLink/TextLink.js.map +1 -0
  45. package/dist/controlStyles.d.ts +36 -1
  46. package/dist/controlStyles.d.ts.map +1 -1
  47. package/dist/controlStyles.js +30 -0
  48. package/dist/controlStyles.js.map +1 -1
  49. package/dist/index.d.ts +16 -2
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +10 -2
  52. package/dist/index.js.map +1 -1
  53. package/dist/intentStyles.d.ts +17 -0
  54. package/dist/intentStyles.d.ts.map +1 -1
  55. package/dist/intentStyles.js +17 -0
  56. package/dist/intentStyles.js.map +1 -1
  57. package/dist/reactRouter/ReactRouterLink.d.ts +23 -0
  58. package/dist/reactRouter/ReactRouterLink.d.ts.map +1 -0
  59. package/dist/reactRouter/ReactRouterLink.js +23 -0
  60. package/dist/reactRouter/ReactRouterLink.js.map +1 -0
  61. package/dist/reactRouter/index.d.ts +29 -0
  62. package/dist/reactRouter/index.d.ts.map +1 -0
  63. package/dist/reactRouter/index.js +29 -0
  64. package/dist/reactRouter/index.js.map +1 -0
  65. package/dist/styles.css +88 -8
  66. package/package.json +15 -3
  67. package/src/AdaptiveGrid/AdaptiveGrid.mdx +169 -0
  68. package/src/AdaptiveGrid/AdaptiveGrid.stories.tsx +240 -0
  69. package/src/AdaptiveGrid/AdaptiveGrid.test.tsx +243 -0
  70. package/src/AdaptiveGrid/AdaptiveGrid.tsx +150 -0
  71. package/src/AdaptiveGrid/chooseColumns.test.ts +253 -0
  72. package/src/AdaptiveGrid/chooseColumns.ts +270 -0
  73. package/src/AdaptiveGrid/useAdaptiveColumns.ts +355 -0
  74. package/src/Button/Button.tsx +10 -22
  75. package/src/ButtonLink/ButtonLink.mdx +75 -0
  76. package/src/ButtonLink/ButtonLink.stories.tsx +281 -0
  77. package/src/ButtonLink/ButtonLink.test.tsx +203 -0
  78. package/src/ButtonLink/ButtonLink.tsx +149 -0
  79. package/src/Combobox/Combobox.tsx +4 -1
  80. package/src/Dialog/Dialog.tsx +1 -1
  81. package/src/LogViewer/LogViewer.test.tsx +47 -0
  82. package/src/LogViewer/LogViewer.tsx +35 -1
  83. package/src/RouterLink/AnchorLink.tsx +23 -0
  84. package/src/RouterLink/RouterLink.mdx +178 -0
  85. package/src/RouterLink/RouterLinkProvider.tsx +68 -0
  86. package/src/RouterLink/routerLink.ts +56 -0
  87. package/src/TextLink/TextLink.mdx +93 -0
  88. package/src/TextLink/TextLink.stories.tsx +260 -0
  89. package/src/TextLink/TextLink.test.tsx +230 -0
  90. package/src/TextLink/TextLink.tsx +194 -0
  91. package/src/controlStyles.ts +69 -1
  92. package/src/icons.storyHelpers.tsx +32 -0
  93. package/src/index.ts +41 -0
  94. package/src/intentStyles.ts +19 -0
  95. package/src/reactRouter/ReactRouterLink.tsx +30 -0
  96. package/src/reactRouter/index.ts +29 -0
  97. package/src/sourceRules.test.ts +41 -6
  98. package/src/styles.css +88 -8
@@ -141,7 +141,39 @@ export const LogViewer = ({ className, isAnnounced = false, label, lines, maxLin
141
141
  observer.disconnect();
142
142
  };
143
143
  }, [isFollowing]);
144
- return (_jsxs("div", { className: toClassName("relative flex flex-col", className), children: [_jsx("div", { "aria-label": label, "aria-live": isAnnounced ? "polite" : "off", className: "max-h-64 overflow-y-auto rounded-md border border-border-subtle bg-surface-sunken p-2 font-mono text-content-secondary text-xs", onScroll: (scrollEvent) => {
144
+ return (_jsxs("div", { className: toClassName("relative flex flex-col", className), children: [_jsx("div", { "aria-label": label, "aria-live": isAnnounced ? "polite" : "off", className: toClassName("max-h-64 overflow-y-auto rounded-md border border-border-subtle bg-surface-sunken p-2 font-mono text-content-secondary text-xs",
145
+ // A sixth defect, and this one is nobody's code: scroll
146
+ // anchoring is the browser quietly *undoing* the follow
147
+ // above, and only sometimes.
148
+ //
149
+ // Chromium picks an anchor node in a scroll container and
150
+ // adjusts `scrollTop` to hold it still across a relayout.
151
+ // That is right for an article and wrong for a log: the
152
+ // whole contract here is "the bottom stays the bottom".
153
+ // `@charcuterie/tokens` ships Victor Mono `font-display:
154
+ // swap`, so a pane that mounts before the face arrives is
155
+ // laid out in the fallback and re-laid-out a moment later —
156
+ // and the anchor drags a followed pane off the end.
157
+ // Measured on the 60-line `Interactive` story, holding the
158
+ // font request back:
159
+ //
160
+ // anchoring on, font before mount : scrollTop 722, at the end
161
+ // anchoring on, font after mount : scrollTop 721, a pixel short
162
+ // anchoring off, either : scrollTop 722, at the end
163
+ //
164
+ // Whether the swap beats the mount is a race, so the pane
165
+ // followed correctly on some renders and not others. It
166
+ // read as visual-regression flake for a week — one story,
167
+ // `components-logviewer--interactive`, shifted a pixel —
168
+ // because a race is what it is. The DOM test missed it: its
169
+ // four pixels of slack are there for fractional device
170
+ // pixel ratios, and one pixel fits inside them.
171
+ //
172
+ // Only while following. A user who scrolled up to read an
173
+ // error *wants* the anchor — `maxLines` drops old lines off
174
+ // the top, and anchoring is what stops that shoving the
175
+ // line they are reading up the pane.
176
+ isFollowing ? "[overflow-anchor:none]" : null), onScroll: (scrollEvent) => {
145
177
  const pane = scrollEvent.currentTarget;
146
178
  // A few pixels of slack, because a fractional device pixel
147
179
  // ratio means `scrollTop + clientHeight` never lands
@@ -1 +1 @@
1
- {"version":3,"file":"LogViewer.js","sourceRoot":"","sources":["../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oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CACtC,YAGA,IAAI,CAAC,IAAI,IAFL,IAAI,CAAC,GAAG,CAGX,CACL,CAAC,CACH,GACG,EAEL,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,KAAC,MAAM,IACL,UAAU,EAAC,MAAM,EACjB,SAAS,EAAC,2CAA2C,EACrD,MAAM,EAAC,SAAS,EAChB,OAAO,EAAE,GAAG,EAAE;oBACZ,cAAc,CAAC,IAAI,CAAC,CAAA;gBACtB,CAAC,EACD,IAAI,EAAC,IAAI,+BAGF,CACV,IACG,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from "react";
2
+ import type { RouterLinkProps } from "./routerLink.ts";
3
+ /**
4
+ * A plain `<a href>`, and the default every link component falls
5
+ * back to.
6
+ *
7
+ * It is the context's default value rather than a `null` check at
8
+ * each call site, which is what makes "no router installed" a
9
+ * configuration rather than a code path: `TextLink` and `ButtonLink`
10
+ * render `useRouterLink()` unconditionally and behave identically
11
+ * with and without a provider.
12
+ *
13
+ * It is also what a routed component falls back *to* for a
14
+ * destination the router must not intercept — see `getIsRoutedHref`.
15
+ */
16
+ export declare const AnchorLink: ({ href, ...anchorProps }: RouterLinkProps) => ReactNode;
17
+ //# sourceMappingURL=AnchorLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnchorLink.d.ts","sourceRoot":"","sources":["../../src/RouterLink/AnchorLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GAAI,0BAGxB,eAAe,KAAG,SAEpB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * A plain `<a href>`, and the default every link component falls
4
+ * back to.
5
+ *
6
+ * It is the context's default value rather than a `null` check at
7
+ * each call site, which is what makes "no router installed" a
8
+ * configuration rather than a code path: `TextLink` and `ButtonLink`
9
+ * render `useRouterLink()` unconditionally and behave identically
10
+ * with and without a provider.
11
+ *
12
+ * It is also what a routed component falls back *to* for a
13
+ * destination the router must not intercept — see `getIsRoutedHref`.
14
+ */
15
+ export const AnchorLink = ({ href, ...anchorProps }) => (_jsx("a", { ...anchorProps, href: href }));
16
+ //# sourceMappingURL=AnchorLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnchorLink.js","sourceRoot":"","sources":["../../src/RouterLink/AnchorLink.tsx"],"names":[],"mappings":";AAIA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,GAAG,WAAW,EACE,EAAa,EAAE,CAAC,CAChC,eAAO,WAAW,EAAE,IAAI,EAAE,IAAI,GAAI,CACnC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ import type { RouterLinkComponent } from "./routerLink.ts";
3
+ export declare const useRouterLink: () => RouterLinkComponent;
4
+ export declare const RouterLinkProvider: ({ children, link, }: {
5
+ children: ReactNode;
6
+ /**
7
+ * The app's link component, taking `href`. `ReactRouterLink` from
8
+ * `@charcuterie/ui/react-router`, or the app's own four-line
9
+ * wrapper around whatever it routes with.
10
+ */
11
+ link: RouterLinkComponent;
12
+ }) => ReactNode;
13
+ //# sourceMappingURL=RouterLinkProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouterLinkProvider.d.ts","sourceRoot":"","sources":["../../src/RouterLink/RouterLinkProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AA6C1D,eAAO,MAAM,aAAa,QAAO,mBACF,CAAA;AAE/B,eAAO,MAAM,kBAAkB,GAAI,qBAGhC;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,IAAI,EAAE,mBAAmB,CAAA;CAC1B,KAAG,SAIH,CAAA"}
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext } from "react";
3
+ import { AnchorLink } from "./AnchorLink.js";
4
+ /**
5
+ * The router seam: one injection at the app root, and every
6
+ * `TextLink` / `ButtonLink` in the tree navigates the app's own way.
7
+ *
8
+ * ### Why the library cannot just pick a router
9
+ *
10
+ * The fleet has five answers at once — react-router v8 (mux-magic),
11
+ * react-router-dom v7 (bambuddy), wouter-preact (spoolbuddy), two
12
+ * hand-rolled routers, and five apps with no router at all. A
13
+ * dependency on any one of them would be wrong for four of the five,
14
+ * and `@charcuterie/ui` taking a router as a runtime dependency is a
15
+ * thing every consumer inherits.
16
+ *
17
+ * So the shape is the one `ColorSchemeSwitcher` already uses for the
18
+ * browser: **the seam has a working default**. Nothing injected means
19
+ * `AnchorLink` — a real `<a href>` that navigates by reloading, which
20
+ * is correct, just not soft. An app that wants soft navigation
21
+ * injects its router's link once:
22
+ *
23
+ * ```tsx
24
+ * import { RouterLinkProvider } from "@charcuterie/ui"
25
+ * import { ReactRouterLink } from "@charcuterie/ui/react-router"
26
+ *
27
+ * <RouterLinkProvider link={ReactRouterLink}>
28
+ * <App />
29
+ * </RouterLinkProvider>
30
+ * ```
31
+ *
32
+ * A router with no adapter here needs no adapter *from* here — the
33
+ * contract is a component taking `href`, so a four-line wrapper in
34
+ * the app is the whole integration. `Guides/Routing` shows both.
35
+ *
36
+ * ### It is deliberately not a hook the app calls
37
+ *
38
+ * `useNavigate` + `onClick` is what mux-magic and plex-channels do
39
+ * today, and it is how a nav item stops being a link: no middle-click,
40
+ * no ctrl-click, no "open in new tab", no status bar, nothing to copy.
41
+ * Injecting a *component* keeps the `<a href>` — the router only gets
42
+ * to intercept the plain-left-click that it can actually improve.
43
+ */
44
+ const RouterLinkContext = createContext(AnchorLink);
45
+ export const useRouterLink = () => useContext(RouterLinkContext);
46
+ export const RouterLinkProvider = ({ children, link, }) => (_jsx(RouterLinkContext.Provider, { value: link, children: children }));
47
+ //# sourceMappingURL=RouterLinkProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouterLinkProvider.js","sourceRoot":"","sources":["../../src/RouterLink/RouterLinkProvider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAA;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,iBAAiB,GACrB,aAAa,CAAsB,UAAU,CAAC,CAAA;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAwB,EAAE,CACrD,UAAU,CAAC,iBAAiB,CAAC,CAAA;AAE/B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,EACR,IAAI,GASL,EAAa,EAAE,CAAC,CACf,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YACpC,QAAQ,GACkB,CAC9B,CAAA"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The shape of the thing a router injects, and the one question the
3
+ * link components ask before they use it.
4
+ *
5
+ * Types live here rather than beside either implementation so
6
+ * `AnchorLink` (the default) and `RouterLinkProvider` (which defaults
7
+ * to it) can both name them without importing each other.
8
+ */
9
+ import type { ComponentPropsWithRef, ComponentType } from "react";
10
+ /**
11
+ * `href`, not `to`.
12
+ *
13
+ * The library is router-agnostic and the platform's word for a
14
+ * destination is `href` — so the contract is the DOM's, and each
15
+ * adapter renames it on the way in (`ReactRouterLink` maps `href` to
16
+ * react-router's `to`). Injecting a component whose prop is `to`
17
+ * would make `@charcuterie/ui`'s own API a mirror of one router's.
18
+ */
19
+ export type RouterLinkProps = Omit<ComponentPropsWithRef<"a">, "href"> & {
20
+ href: string;
21
+ };
22
+ export type RouterLinkComponent = ComponentType<RouterLinkProps>;
23
+ /**
24
+ * Whether this destination is the injected router's to handle.
25
+ *
26
+ * A router's `<Link>` intercepts the click and pushes history, which
27
+ * is right for `/settings` and wrong for three cases it cannot serve:
28
+ *
29
+ * - **Another origin or another scheme** — `https://…`, `mailto:`,
30
+ * `tel:`, protocol-relative `//cdn…`. Pushing those onto the
31
+ * history stack navigates the SPA to a route that does not exist.
32
+ * - **A same-page fragment** — `#credits`. The browser's own
33
+ * scroll-to-id is the behaviour a reader expects; a router turns
34
+ * it into a route change.
35
+ *
36
+ * Everything else — `/x`, `x`, `?sort=name` — is the router's.
37
+ *
38
+ * Deliberately a *destination* test rather than a prop: a component
39
+ * that routed whatever it was given would make `isExternal` a
40
+ * correctness switch instead of a presentation one, and an app that
41
+ * forgot it would ship a broken link rather than a slightly plain
42
+ * one.
43
+ */
44
+ export declare const getIsRoutedHref: (href: string) => boolean;
45
+ //# sourceMappingURL=routerLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routerLink.d.ts","sourceRoot":"","sources":["../../src/RouterLink/routerLink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACd,MAAM,OAAO,CAAA;AAEd;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,CAAC,GAAG,CAAC,EAC1B,MAAM,CACP,GAAG;IACF,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mBAAmB,GAC7B,aAAa,CAAC,eAAe,CAAC,CAAA;AAEhC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OACA,CAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The shape of the thing a router injects, and the one question the
3
+ * link components ask before they use it.
4
+ *
5
+ * Types live here rather than beside either implementation so
6
+ * `AnchorLink` (the default) and `RouterLinkProvider` (which defaults
7
+ * to it) can both name them without importing each other.
8
+ */
9
+ /**
10
+ * Whether this destination is the injected router's to handle.
11
+ *
12
+ * A router's `<Link>` intercepts the click and pushes history, which
13
+ * is right for `/settings` and wrong for three cases it cannot serve:
14
+ *
15
+ * - **Another origin or another scheme** — `https://…`, `mailto:`,
16
+ * `tel:`, protocol-relative `//cdn…`. Pushing those onto the
17
+ * history stack navigates the SPA to a route that does not exist.
18
+ * - **A same-page fragment** — `#credits`. The browser's own
19
+ * scroll-to-id is the behaviour a reader expects; a router turns
20
+ * it into a route change.
21
+ *
22
+ * Everything else — `/x`, `x`, `?sort=name` — is the router's.
23
+ *
24
+ * Deliberately a *destination* test rather than a prop: a component
25
+ * that routed whatever it was given would make `isExternal` a
26
+ * correctness switch instead of a presentation one, and an app that
27
+ * forgot it would ship a broken link rather than a slightly plain
28
+ * one.
29
+ */
30
+ export const getIsRoutedHref = (href) => !/^(?:[a-z][a-z\d+\-.]*:|\/\/|#)/i.test(href);
31
+ //# sourceMappingURL=routerLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routerLink.js","sourceRoot":"","sources":["../../src/RouterLink/routerLink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA0BH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAW,EAAE,CACvD,CAAC,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,69 @@
1
+ import type { IntentName } from "@charcuterie/tokens";
2
+ import type { ComponentPropsWithRef, ReactNode } from "react";
3
+ /**
4
+ * Two ways a link sits in a layout, and the difference is real rather
5
+ * than decorative.
6
+ *
7
+ * - `inline` lives **inside a sentence**. It is `display: inline`, so
8
+ * it wraps across lines with the prose around it, it inherits the
9
+ * surrounding font size rather than declaring one, and it is
10
+ * underlined — because inside a paragraph, colour alone is the
11
+ * thing WCAG 1.4.1 says cannot carry the meaning on its own.
12
+ * - `standalone` is **its own element**: a back-link, a nav item, a
13
+ * "view all" beside a heading. It is an inline flex box so an
14
+ * `iconStart` sits on the text's centre line with a real gap, and
15
+ * it underlines on hover instead of permanently — a column of
16
+ * permanently-underlined nav items reads as a mistake.
17
+ */
18
+ export type TextLinkAppearance = "inline" | "standalone";
19
+ export type TextLinkProps = Omit<ComponentPropsWithRef<"a">, "href"> & {
20
+ appearance?: TextLinkAppearance;
21
+ /**
22
+ * Required, and required even when disabled — a navigation that
23
+ * cannot say where it goes is a button wearing a link's clothes.
24
+ */
25
+ href: string;
26
+ iconEnd?: ReactNode;
27
+ /**
28
+ * The back-arrow, supplied by the app. The library ships no glyphs
29
+ * — see
30
+ * `docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-glyphs.md`
31
+ * — and the seven repos that hand-roll a `← Back` today already own
32
+ * the character they want.
33
+ */
34
+ iconStart?: ReactNode;
35
+ intent?: IntentName;
36
+ isDisabled?: boolean;
37
+ isExternal?: boolean;
38
+ /** What `isExternal` announces. Not shown. */
39
+ newTabLabel?: string;
40
+ };
41
+ /**
42
+ * Navigation that looks like a link.
43
+ *
44
+ * The fleet has **seven repos** hand-rolling a back-link — each with
45
+ * its own `←`, its own hover rule, and its own idea of whether focus
46
+ * is visible — and points-market's header title is a clickable
47
+ * `<div>`. This is the thing to reach for instead, and the reason the
48
+ * split with `ButtonLink` exists at all: the two differ in **paint,
49
+ * not semantics**. Both render a real `<a href>`; picking between
50
+ * them is picking how it looks, which is a decision an agent can make
51
+ * correctly from the name alone
52
+ * ([decision](../../../docs/decisions/2026-08-10-buttons-are-actions-links-are-navigation.md)).
53
+ *
54
+ * What it does not do is as load-bearing as what it does:
55
+ *
56
+ * - **No `onClick`-only mode.** If it does not navigate, it is a
57
+ * `Button` with `appearance="ghost"`, not a link.
58
+ * - **No `size`.** Text takes the size of the text around it. A
59
+ * standalone link that wants `text-sm` gets it from the block it
60
+ * sits in, or from `className`.
61
+ * - **No colour change on hover.** See `TEXT_LINK_BASE_CLASS`.
62
+ *
63
+ * `isDisabled` drops `href` rather than shipping a focusable anchor
64
+ * that ignores clicks; `role="link"` + `aria-disabled` keeps it
65
+ * announced. Rarer here than on `ButtonLink` — a dead link in a
66
+ * sentence is usually better written as plain text.
67
+ */
68
+ export declare const TextLink: ({ appearance, children, className, href, iconEnd, iconStart, intent, isDisabled, isExternal, newTabLabel, ...anchorProps }: TextLinkProps) => ReactNode;
69
+ //# sourceMappingURL=TextLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../src/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;AAWd;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,YAAY,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,qBAAqB,CAAC,GAAG,CAAC,EAC1B,MAAM,CACP,GAAG;IACF,UAAU,CAAC,EAAE,kBAAkB,CAAA;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAuCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,GAAI,4HAYtB,aAAa,KAAG,SA2DlB,CAAA"}
@@ -0,0 +1,79 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FOCUS_RING_CLASS, INTENT_CONTENT_CLASS, } from "../intentStyles.js";
3
+ import { useRouterLink } from "../RouterLink/RouterLinkProvider.js";
4
+ import { getIsRoutedHref } from "../RouterLink/routerLink.js";
5
+ import { toClassName } from "../toClassName.js";
6
+ import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
7
+ const TEXT_LINK_APPEARANCE_CLASS = {
8
+ // No `text-*` of its own: an inline link that resized itself would
9
+ // be a hole in whatever type scale the paragraph is set in.
10
+ inline: "underline decoration-1 underline-offset-2 hover:decoration-2",
11
+ standalone: "inline-flex items-center gap-1 font-medium no-underline underline-offset-2 hover:underline",
12
+ };
13
+ /**
14
+ * Hover changes the **underline**, never the colour, and there is no
15
+ * hover-tinted background either.
16
+ *
17
+ * A text link has no box to fill, so `INTENT_HOVER_CLASS` — which
18
+ * lands on the intent's tinted surface — would paint a coloured
19
+ * rectangle around a word mid-sentence. And there is no
20
+ * `intent.*.content-hover` token to shift the text to: the ramp goes
21
+ * `surface` / `surface-hover` / `border` / `content` / `solid` /
22
+ * `solid-hover` / `on-solid`, so a hover colour here would have to be
23
+ * invented, and an invented colour is one the contrast gate has never
24
+ * measured. Underline weight is free of both problems and shifts no
25
+ * layout.
26
+ */
27
+ const TEXT_LINK_BASE_CLASS = "cursor-pointer rounded-xs";
28
+ /**
29
+ * The disabled paint, keyed off `aria-disabled` because an `<a>` has
30
+ * no `:disabled` to match. See `ARIA_DISABLED_CLASS` — this is its
31
+ * text-shaped twin, minus the box treatment a run of prose has no
32
+ * room for.
33
+ */
34
+ const TEXT_LINK_ARIA_DISABLED_CLASS = "aria-disabled:pointer-events-none aria-disabled:text-content-disabled aria-disabled:no-underline";
35
+ /**
36
+ * Navigation that looks like a link.
37
+ *
38
+ * The fleet has **seven repos** hand-rolling a back-link — each with
39
+ * its own `←`, its own hover rule, and its own idea of whether focus
40
+ * is visible — and points-market's header title is a clickable
41
+ * `<div>`. This is the thing to reach for instead, and the reason the
42
+ * split with `ButtonLink` exists at all: the two differ in **paint,
43
+ * not semantics**. Both render a real `<a href>`; picking between
44
+ * them is picking how it looks, which is a decision an agent can make
45
+ * correctly from the name alone
46
+ * ([decision](../../../docs/decisions/2026-08-10-buttons-are-actions-links-are-navigation.md)).
47
+ *
48
+ * What it does not do is as load-bearing as what it does:
49
+ *
50
+ * - **No `onClick`-only mode.** If it does not navigate, it is a
51
+ * `Button` with `appearance="ghost"`, not a link.
52
+ * - **No `size`.** Text takes the size of the text around it. A
53
+ * standalone link that wants `text-sm` gets it from the block it
54
+ * sits in, or from `className`.
55
+ * - **No colour change on hover.** See `TEXT_LINK_BASE_CLASS`.
56
+ *
57
+ * `isDisabled` drops `href` rather than shipping a focusable anchor
58
+ * that ignores clicks; `role="link"` + `aria-disabled` keeps it
59
+ * announced. Rarer here than on `ButtonLink` — a dead link in a
60
+ * sentence is usually better written as plain text.
61
+ */
62
+ export const TextLink = ({ appearance = "inline", children, className, href, iconEnd, iconStart, intent = "accent", isDisabled = false, isExternal = false, newTabLabel = "(opens in a new tab)", ...anchorProps }) => {
63
+ const RouterLink = useRouterLink();
64
+ // An external destination or a fragment is never the router's, and
65
+ // a disabled one goes nowhere at all — each falls back to the plain
66
+ // anchor below rather than through the injected component.
67
+ const LinkElement = isExternal || !getIsRoutedHref(href) ? "a" : RouterLink;
68
+ const linkClassName = toClassName(TEXT_LINK_BASE_CLASS, TEXT_LINK_APPEARANCE_CLASS[appearance], INTENT_CONTENT_CLASS[intent], FOCUS_RING_CLASS, TEXT_LINK_ARIA_DISABLED_CLASS, className);
69
+ const content = (_jsxs(_Fragment, { children: [iconStart, children, iconEnd, isExternal ? (_jsx(VisuallyHidden, { children: newTabLabel })) : null] }));
70
+ if (isDisabled) {
71
+ return (_jsx("a", { ...anchorProps, "aria-disabled": "true", className: linkClassName, role: "link", children: content }));
72
+ }
73
+ return (_jsx(LinkElement, { ...anchorProps, className: linkClassName, href: href,
74
+ // `noreferrer` alongside `noopener` on purpose: `noopener`
75
+ // closes the `window.opener` hole, and `noreferrer` is what
76
+ // keeps a private app's URL out of the destination's logs.
77
+ rel: isExternal ? "noopener noreferrer" : undefined, target: isExternal ? "_blank" : undefined, children: content }));
78
+ };
79
+ //# sourceMappingURL=TextLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../src/TextLink/TextLink.tsx"],"names":[],"mappings":";AAMA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAsC,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAsC,CAAA;AA6CrE,MAAM,0BAA0B,GAG5B;IACF,mEAAmE;IACnE,4DAA4D;IAC5D,MAAM,EACJ,8DAA8D;IAChE,UAAU,EACR,4FAA4F;CAC/F,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,oBAAoB,GAAG,2BAA2B,CAAA;AAExD;;;;;GAKG;AACH,MAAM,6BAA6B,GACjC,kGAAkG,CAAA;AAEpG;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,UAAU,GAAG,QAAQ,EACrB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,MAAM,GAAG,QAAQ,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,sBAAsB,EACpC,GAAG,WAAW,EACA,EAAa,EAAE;IAC7B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,mEAAmE;IACnE,oEAAoE;IACpE,2DAA2D;IAC3D,MAAM,WAAW,GACf,UAAU,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAA;IAEzD,MAAM,aAAa,GAAG,WAAW,CAC/B,oBAAoB,EACpB,0BAA0B,CAAC,UAAU,CAAC,EACtC,oBAAoB,CAAC,MAAM,CAAC,EAC5B,gBAAgB,EAChB,6BAA6B,EAC7B,SAAS,CACV,CAAA;IAED,MAAM,OAAO,GAAG,CACd,8BACG,SAAS,EAET,QAAQ,EAER,OAAO,EAEP,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,cAAc,cAAE,WAAW,GAAkB,CAC/C,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAA;IAED,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,CACL,eACM,WAAW,mBACD,MAAM,EACpB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAC,MAAM,YAEV,OAAO,GACN,CACL,CAAA;IACH,CAAC;IAED,OAAO,CACL,KAAC,WAAW,OACN,WAAW,EACf,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,IAAI;QACV,2DAA2D;QAC3D,4DAA4D;QAC5D,2DAA2D;QAC3D,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EACnD,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,YAExC,OAAO,GACI,CACf,CAAA;AACH,CAAC,CAAA"}
@@ -15,7 +15,8 @@
15
15
  * density axis also scales. See
16
16
  * `packages/tokens/src/tailwindCollisions.test.ts`.
17
17
  */
18
- import type { ControlSize } from "@charcuterie/tokens";
18
+ import type { ControlSize, IntentName } from "@charcuterie/tokens";
19
+ import type { IntentAppearance } from "./intentStyles.ts";
19
20
  export declare const CONTROL_SIZE_CLASS: Record<ControlSize, string>;
20
21
  /**
21
22
  * Square, and sized by the *height* token on both axes so an icon
@@ -38,6 +39,40 @@ export declare const ICON_CONTROL_SIZE_CLASS: Record<ControlSize, string>;
38
39
  * `docs/decisions/2026-08-05-controls-share-one-height-no-per-component-touch-floor.md`.
39
40
  */
40
41
  export declare const MIN_TOUCH_TARGET_CLASS = "min-h-(--control-min-touch-target) min-w-(--control-min-touch-target)";
42
+ /**
43
+ * Everything a pressable control looks like before an intent, a size,
44
+ * or a state is applied to it.
45
+ *
46
+ * Pulled out of `Button` the day `ButtonLink` shipped. Those two must
47
+ * paint **identically** — the whole point of `ButtonLink` is that a
48
+ * navigation can read as a primary button — and "identically" spelled
49
+ * as two copies of the same string is a promise that survives exactly
50
+ * one edit.
51
+ */
52
+ export declare const CONTROL_BASE_CLASS = "inline-flex cursor-pointer items-center justify-center rounded-md border font-medium whitespace-nowrap transition-colors duration-(--duration-fast) ease-standard select-none";
53
+ /**
54
+ * The one class list a button-shaped control wears, assembled once.
55
+ *
56
+ * `Button` and `ButtonLink` call this with the same arguments and get
57
+ * the same string back, so a new appearance, a changed radius, or a
58
+ * different hover ramp reaches both or neither. `ButtonLink.test.tsx`
59
+ * asserts the resulting *computed styles* match, which is the version
60
+ * of this claim a class-name refactor cannot quietly break.
61
+ *
62
+ * The disabled treatment is the caller's, because it is the one thing
63
+ * that genuinely differs: a `<button>` has a real `disabled`
64
+ * attribute and gets `DISABLED_CLASS`, while an `<a>` has no such
65
+ * concept and gets `ARIA_DISABLED_CLASS` keyed off `aria-disabled`.
66
+ */
67
+ export declare const getControlClassName: ({ appearance, className, disabledClass, intent, isFullWidth, size, sizing, }: {
68
+ appearance: IntentAppearance;
69
+ className?: string;
70
+ disabledClass: string;
71
+ intent: IntentName;
72
+ isFullWidth: boolean;
73
+ size: ControlSize;
74
+ sizing: "control" | "icon";
75
+ }) => string;
41
76
  /**
42
77
  * Non-control sizing: badges, indicator dots, spinners. These are
43
78
  * type-relative on purpose — a badge beside `text-sm` prose that
@@ -1 +1 @@
1
- {"version":3,"file":"controlStyles.d.ts","sourceRoot":"","sources":["../src/controlStyles.ts"],"names":[],"mappings":"AA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B,MAAM,EAAE,UAAU,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;CAC3B,KAAG,MAYD,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAA;AAErD,eAAO,MAAM,cAAc;;;;CAIjB,CAAA;AAEV,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,WAAW,EACX,MAAM,CAKP,CAAA"}
@@ -15,6 +15,8 @@
15
15
  * density axis also scales. See
16
16
  * `packages/tokens/src/tailwindCollisions.test.ts`.
17
17
  */
18
+ import { FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_HOVER_CLASS, } from "./intentStyles.js";
19
+ import { toClassName } from "./toClassName.js";
18
20
  export const CONTROL_SIZE_CLASS = {
19
21
  sm: "h-(--control-height-sm) gap-(--control-gap-sm) px-(--control-padding-inline-sm) text-sm",
20
22
  md: "h-(--control-height-md) gap-(--control-gap-md) px-(--control-padding-inline-md) text-md",
@@ -45,6 +47,34 @@ export const ICON_CONTROL_SIZE_CLASS = {
45
47
  * `docs/decisions/2026-08-05-controls-share-one-height-no-per-component-touch-floor.md`.
46
48
  */
47
49
  export const MIN_TOUCH_TARGET_CLASS = "min-h-(--control-min-touch-target) min-w-(--control-min-touch-target)";
50
+ /**
51
+ * Everything a pressable control looks like before an intent, a size,
52
+ * or a state is applied to it.
53
+ *
54
+ * Pulled out of `Button` the day `ButtonLink` shipped. Those two must
55
+ * paint **identically** — the whole point of `ButtonLink` is that a
56
+ * navigation can read as a primary button — and "identically" spelled
57
+ * as two copies of the same string is a promise that survives exactly
58
+ * one edit.
59
+ */
60
+ export const CONTROL_BASE_CLASS = "inline-flex cursor-pointer items-center justify-center rounded-md border font-medium whitespace-nowrap transition-colors duration-(--duration-fast) ease-standard select-none";
61
+ /**
62
+ * The one class list a button-shaped control wears, assembled once.
63
+ *
64
+ * `Button` and `ButtonLink` call this with the same arguments and get
65
+ * the same string back, so a new appearance, a changed radius, or a
66
+ * different hover ramp reaches both or neither. `ButtonLink.test.tsx`
67
+ * asserts the resulting *computed styles* match, which is the version
68
+ * of this claim a class-name refactor cannot quietly break.
69
+ *
70
+ * The disabled treatment is the caller's, because it is the one thing
71
+ * that genuinely differs: a `<button>` has a real `disabled`
72
+ * attribute and gets `DISABLED_CLASS`, while an `<a>` has no such
73
+ * concept and gets `ARIA_DISABLED_CLASS` keyed off `aria-disabled`.
74
+ */
75
+ export const getControlClassName = ({ appearance, className, disabledClass, intent, isFullWidth, size, sizing, }) => toClassName(CONTROL_BASE_CLASS, sizing === "icon"
76
+ ? ICON_CONTROL_SIZE_CLASS[size]
77
+ : CONTROL_SIZE_CLASS[size], INTENT_APPEARANCE_CLASS[intent][appearance], INTENT_HOVER_CLASS[intent][appearance], FOCUS_RING_CLASS, disabledClass, isFullWidth && "w-full", className);
48
78
  /**
49
79
  * Non-control sizing: badges, indicator dots, spinners. These are
50
80
  * type-relative on purpose — a badge beside `text-sm` prose that
@@ -1 +1 @@
1
- {"version":3,"file":"controlStyles.js","sourceRoot":"","sources":["../src/controlStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAG3B;IACF,EAAE,EAAE,yFAAyF;IAC7F,EAAE,EAAE,yFAAyF;IAC7F,EAAE,EAAE,yFAAyF;CAC9F,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,EAAE,EAAE,yCAAyC;IAC7C,EAAE,EAAE,yCAAyC;IAC7C,EAAE,EAAE,yCAAyC;CAC9C,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,sBAAsB,GACjC,uEAAuE,CAAA;AAEzE;;;;;GAKG;AACH,MAAM,CAAC,MAA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AC,uBAAuB,CAAC,IAAI,CAAC;IAC/B,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAC5B,uBAAuB,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,EAC3C,kBAAkB,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,EACtC,gBAAgB,EAChB,aAAa,EACb,WAAW,IAAI,QAAQ,EACvB,SAAS,CACV,CAAA;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,2BAA2B;IAC/B,EAAE,EAAE,6BAA6B;CACzB,CAAA;AAIV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,UAAU;CACN,CAAA;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAG3B;IACF,EAAE,EAAE,mBAAmB;IACvB,EAAE,EAAE,iBAAiB;IACrB,EAAE,EAAE,iBAAiB;CACtB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -32,12 +32,20 @@
32
32
  */
33
33
  export type { AccordionHeadingLevel, AccordionItem, AccordionProps, } from "./Accordion/Accordion.tsx";
34
34
  export { Accordion } from "./Accordion/Accordion.tsx";
35
+ export type { AdaptiveGridProps } from "./AdaptiveGrid/AdaptiveGrid.tsx";
36
+ export { AdaptiveGrid } from "./AdaptiveGrid/AdaptiveGrid.tsx";
37
+ export type { ColumnChoice } from "./AdaptiveGrid/chooseColumns.ts";
38
+ export { chooseColumns, DEFAULT_MAX_AUTO_COLUMNS, DEFAULT_MAX_MANUAL_COLUMNS, DEFAULT_MIN_COLUMN_INLINE_SIZE_PX, getColumnChoices, getContentMaxInlineSize, } from "./AdaptiveGrid/chooseColumns.ts";
39
+ export type { BlockSizeResolver, ColumnPersistence, } from "./AdaptiveGrid/useAdaptiveColumns.ts";
40
+ export { localStorageColumnPersistence, readStoredChoice, useAdaptiveColumns, viewportBlockSizeResolver, } from "./AdaptiveGrid/useAdaptiveColumns.ts";
35
41
  export type { AlertProps, AlertSize, } from "./Alert/Alert.tsx";
36
42
  export { Alert } from "./Alert/Alert.tsx";
37
43
  export type { BadgeProps } from "./Badge/Badge.tsx";
38
44
  export { Badge } from "./Badge/Badge.tsx";
39
45
  export type { ButtonProps } from "./Button/Button.tsx";
40
46
  export { Button } from "./Button/Button.tsx";
47
+ export type { ButtonLinkProps } from "./ButtonLink/ButtonLink.tsx";
48
+ export { ButtonLink } from "./ButtonLink/ButtonLink.tsx";
41
49
  export type { CardPadding, CardProps, CardSurface, } from "./Card/Card.tsx";
42
50
  export { Card } from "./Card/Card.tsx";
43
51
  export type { CheckboxProps } from "./Checkbox/Checkbox.tsx";
@@ -49,7 +57,7 @@ export { ColorSchemeToggle } from "./ColorSchemeToggle/ColorSchemeToggle.tsx";
49
57
  export type { ComboboxProps } from "./Combobox/Combobox.tsx";
50
58
  export { Combobox } from "./Combobox/Combobox.tsx";
51
59
  export type { BadgeSize } from "./controlStyles.ts";
52
- export { BADGE_SIZE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.ts";
60
+ export { BADGE_SIZE_CLASS, CONTROL_BASE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, getControlClassName, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.ts";
53
61
  export type { DialogProps, DialogSize, } from "./Dialog/Dialog.tsx";
54
62
  export { Dialog } from "./Dialog/Dialog.tsx";
55
63
  export type { EmptyStateProps, EmptyStateSize, } from "./EmptyState/EmptyState.tsx";
@@ -63,7 +71,7 @@ export { FileDropZone } from "./FileDropZone/FileDropZone.tsx";
63
71
  export type { IconButtonProps } from "./IconButton/IconButton.tsx";
64
72
  export { IconButton } from "./IconButton/IconButton.tsx";
65
73
  export type { IntentAppearance } from "./intentStyles.ts";
66
- export { DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.ts";
74
+ export { ARIA_DISABLED_CLASS, DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.ts";
67
75
  export type { LightboxProps } from "./Lightbox/Lightbox.tsx";
68
76
  export { Lightbox } from "./Lightbox/Lightbox.tsx";
69
77
  export type { ListboxItem, ListboxProps, } from "./Listbox/Listbox.tsx";
@@ -88,6 +96,10 @@ export type { ProgressThreshold } from "./ProgressBar/progressValue.ts";
88
96
  export { getProgressIntent, toProgressPercent, toProgressValue, } from "./ProgressBar/progressValue.ts";
89
97
  export type { RadioGroupProps, RadioItem, } from "./RadioGroup/RadioGroup.tsx";
90
98
  export { RadioGroup } from "./RadioGroup/RadioGroup.tsx";
99
+ export { AnchorLink } from "./RouterLink/AnchorLink.tsx";
100
+ export { RouterLinkProvider, useRouterLink, } from "./RouterLink/RouterLinkProvider.tsx";
101
+ export type { RouterLinkComponent, RouterLinkProps, } from "./RouterLink/routerLink.ts";
102
+ export { getIsRoutedHref } from "./RouterLink/routerLink.ts";
91
103
  export type { SegmentedControlProps, SegmentedItem, } from "./SegmentedControl/SegmentedControl.tsx";
92
104
  export { SegmentedControl } from "./SegmentedControl/SegmentedControl.tsx";
93
105
  export type { SelectItem, SelectOption, SelectOptionGroup, SelectProps, } from "./Select/Select.tsx";
@@ -107,6 +119,8 @@ export { mergeSlotProps } from "./slotProps.ts";
107
119
  export { getAsyncIntent, getAsyncLabel, getConnectionIntent, getConnectionLabel, getIsConnectionBusy, } from "./statusIntent.ts";
108
120
  export type { TabItem, TabsActivation, TabsOrientation, TabsProps, } from "./Tabs/Tabs.tsx";
109
121
  export { Tabs } from "./Tabs/Tabs.tsx";
122
+ export type { TextLinkAppearance, TextLinkProps, } from "./TextLink/TextLink.tsx";
123
+ export { TextLink } from "./TextLink/TextLink.tsx";
110
124
  export type { ToastProps } from "./Toast/Toast.tsx";
111
125
  export { Toast } from "./Toast/Toast.tsx";
112
126
  export type { ToastRecord, ToastRegionProps, } from "./Toast/ToastRegion.tsx";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,YAAY,EACV,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EACV,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,YAAY,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAA;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AACnF,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,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