@krizaka/ui 4.4.1 → 4.6.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 (238) hide show
  1. package/README.md +1 -0
  2. package/dist/account-settings.js +56 -43
  3. package/dist/account-settings.js.map +1 -1
  4. package/dist/{chunk-CZHPWLNW.js → chunk-WKQ5CB3I.js} +18 -5
  5. package/dist/chunk-WKQ5CB3I.js.map +1 -0
  6. package/dist/columns.d.ts +132 -0
  7. package/dist/columns.js +91 -0
  8. package/dist/columns.js.map +1 -0
  9. package/dist/comparison-table.js +3 -3
  10. package/dist/comparison-table.js.map +1 -1
  11. package/dist/filter-bar.d.ts +3 -3
  12. package/dist/kind-config-editor.js +1 -1
  13. package/dist/nav-bar.d.ts +1 -1
  14. package/dist/notification-preferences.js +1 -1
  15. package/dist/router.js +2 -2
  16. package/dist/router.js.map +1 -1
  17. package/dist/schema-form.js +1 -1
  18. package/dist/site-cahier.d.ts +2 -0
  19. package/dist/site-cahier.js +2 -1
  20. package/dist/site-cahier.js.map +1 -1
  21. package/dist/site-footer.d.ts +52 -6
  22. package/dist/site-footer.js +98 -60
  23. package/dist/site-footer.js.map +1 -1
  24. package/dist/{sites-iJkCPeiH.d.ts → sites-BPshUouf.d.ts} +2 -2
  25. package/dist/switch.d.ts +25 -3
  26. package/dist/switch.js +1 -1
  27. package/package.json +24 -10
  28. package/registry/account-menu.json +1 -1
  29. package/registry/account-settings.json +1 -1
  30. package/registry/achievement.json +1 -1
  31. package/registry/action-bar.json +1 -1
  32. package/registry/activity-feed.json +1 -1
  33. package/registry/agenda.json +1 -1
  34. package/registry/alert.json +1 -1
  35. package/registry/analysis-report.json +1 -1
  36. package/registry/anatomy-plate.json +1 -1
  37. package/registry/app-frame.json +2 -2
  38. package/registry/app-header.json +1 -1
  39. package/registry/app-shell.json +1 -1
  40. package/registry/argument-card.json +1 -1
  41. package/registry/auth-layout.json +1 -1
  42. package/registry/avatar.json +1 -1
  43. package/registry/badge.json +1 -1
  44. package/registry/bird-plate.json +1 -1
  45. package/registry/button.json +1 -1
  46. package/registry/captcha.json +1 -1
  47. package/registry/card-grid.json +1 -1
  48. package/registry/card.json +1 -1
  49. package/registry/catalogue-page.json +1 -1
  50. package/registry/changelog-page.json +1 -1
  51. package/registry/chapter.json +1 -1
  52. package/registry/chat.json +1 -1
  53. package/registry/checkbox.json +1 -1
  54. package/registry/chip-link.json +1 -1
  55. package/registry/chip-row.json +1 -1
  56. package/registry/chip.json +1 -1
  57. package/registry/choice-grid.json +1 -1
  58. package/registry/code-block.json +1 -1
  59. package/registry/collection-switcher.json +1 -1
  60. package/registry/columns.json +319 -0
  61. package/registry/combobox.json +1 -1
  62. package/registry/command.json +1 -1
  63. package/registry/comparison-table.json +2 -2
  64. package/registry/component-page.json +1 -1
  65. package/registry/confirm-button.json +1 -1
  66. package/registry/contact-page.json +1 -1
  67. package/registry/continue-prompt.json +1 -1
  68. package/registry/copy-button.json +1 -1
  69. package/registry/countdown.json +1 -1
  70. package/registry/cover-hero.json +1 -1
  71. package/registry/cta-panel.json +1 -1
  72. package/registry/dashboard-layout.json +1 -1
  73. package/registry/data-table.json +1 -1
  74. package/registry/date-picker.json +1 -1
  75. package/registry/decision-list.json +1 -1
  76. package/registry/description-list.json +1 -1
  77. package/registry/desktop-window.json +1 -1
  78. package/registry/detail-layout.json +1 -1
  79. package/registry/dialog.json +1 -1
  80. package/registry/docs-article-page.json +1 -1
  81. package/registry/docs-hub-page.json +1 -1
  82. package/registry/docs-layout.json +1 -1
  83. package/registry/docs-nav.json +1 -1
  84. package/registry/document-viewer.json +1 -1
  85. package/registry/doodle.json +1 -1
  86. package/registry/drop-overlay.json +1 -1
  87. package/registry/dropdown-menu.json +1 -1
  88. package/registry/elephant.json +1 -1
  89. package/registry/embed-facade.json +1 -1
  90. package/registry/empty-state.json +1 -1
  91. package/registry/engine-flow.json +1 -1
  92. package/registry/entity-header.json +1 -1
  93. package/registry/environment-notice.json +1 -1
  94. package/registry/error-page.json +1 -1
  95. package/registry/examples/columns/columns.d.ts +4 -0
  96. package/registry/examples/columns/columns.js +21 -0
  97. package/registry/examples/columns/columns.tsx +18 -0
  98. package/registry/examples/columns/photos.d.ts +4 -0
  99. package/registry/examples/columns/photos.js +12 -0
  100. package/registry/examples/columns/photos.tsx +16 -0
  101. package/registry/examples/columns/stats.d.ts +4 -0
  102. package/registry/examples/columns/stats.js +20 -0
  103. package/registry/examples/columns/stats.tsx +22 -0
  104. package/registry/examples/site-footer/family.d.ts +4 -0
  105. package/registry/examples/site-footer/family.js +25 -0
  106. package/registry/examples/site-footer/family.tsx +28 -0
  107. package/registry/examples/switch/row.d.ts +4 -0
  108. package/registry/examples/switch/row.js +14 -0
  109. package/registry/examples/switch/row.tsx +13 -0
  110. package/registry/field.json +1 -1
  111. package/registry/file-upload.json +1 -1
  112. package/registry/filter-bar.json +1 -1
  113. package/registry/flock.json +1 -1
  114. package/registry/footnote.json +1 -1
  115. package/registry/force-update-screen.json +1 -1
  116. package/registry/form.json +1 -1
  117. package/registry/gallery-page.json +1 -1
  118. package/registry/genui.json +1 -1
  119. package/registry/glossary-term.json +1 -1
  120. package/registry/glossary.json +1 -1
  121. package/registry/glow-card.json +1 -1
  122. package/registry/goal-gauge.json +1 -1
  123. package/registry/grade-stamp.json +1 -1
  124. package/registry/grid.json +4 -3
  125. package/registry/identity-card.json +1 -1
  126. package/registry/image-cropper.json +1 -1
  127. package/registry/index.json +42 -11
  128. package/registry/kanban.json +1 -1
  129. package/registry/kbd.json +1 -1
  130. package/registry/kind-config-editor.json +1 -1
  131. package/registry/kpi-explained.json +1 -1
  132. package/registry/landing-page.json +1 -1
  133. package/registry/landscape.json +1 -1
  134. package/registry/language-switch.json +1 -1
  135. package/registry/legal-page.json +1 -1
  136. package/registry/link-card.json +1 -1
  137. package/registry/list.json +1 -1
  138. package/registry/loader.json +1 -1
  139. package/registry/longform-page.json +1 -1
  140. package/registry/maintenance-screen.json +1 -1
  141. package/registry/map.json +2 -2
  142. package/registry/margin-layout.json +1 -1
  143. package/registry/markdown.json +1 -1
  144. package/registry/marketing-layout.json +1 -1
  145. package/registry/mascot-quote.json +1 -1
  146. package/registry/mascot-state.json +1 -1
  147. package/registry/mascots.json +1 -1
  148. package/registry/match-dialog.json +1 -1
  149. package/registry/media-capture.json +1 -1
  150. package/registry/media-gallery.json +1 -1
  151. package/registry/meter.json +1 -1
  152. package/registry/money-input.json +1 -1
  153. package/registry/nav-bar.json +2 -2
  154. package/registry/next-actions.json +1 -1
  155. package/registry/notification-preferences.json +1 -1
  156. package/registry/number-ticker.json +1 -1
  157. package/registry/opening-hours.json +1 -1
  158. package/registry/page-header.json +1 -1
  159. package/registry/page-hero.json +1 -1
  160. package/registry/page-index.json +1 -1
  161. package/registry/page.json +1 -1
  162. package/registry/pagination.json +1 -1
  163. package/registry/pointer-light.json +1 -1
  164. package/registry/popover.json +1 -1
  165. package/registry/price-catalogue-editor.json +1 -1
  166. package/registry/pricing-page.json +1 -1
  167. package/registry/product-page.json +1 -1
  168. package/registry/profile-card.json +1 -1
  169. package/registry/progress.json +1 -1
  170. package/registry/promise-card.json +1 -1
  171. package/registry/promo-code-field.json +1 -1
  172. package/registry/proposal.json +1 -1
  173. package/registry/qr-code.json +1 -1
  174. package/registry/quota-meter.json +1 -1
  175. package/registry/radio-group.json +1 -1
  176. package/registry/rail-nav.json +2 -2
  177. package/registry/recipes.json +1 -1
  178. package/registry/retro-tv.json +1 -1
  179. package/registry/reviews.json +1 -1
  180. package/registry/router.json +2 -2
  181. package/registry/schema-form.json +1 -1
  182. package/registry/scroll-stage.json +1 -1
  183. package/registry/search-field.json +1 -1
  184. package/registry/section-backdrop.json +1 -1
  185. package/registry/separator.json +1 -1
  186. package/registry/service-card.json +1 -1
  187. package/registry/settings-layout.json +1 -1
  188. package/registry/shop-composer.json +1 -1
  189. package/registry/shop-gallery.json +1 -1
  190. package/registry/shop.json +2 -2
  191. package/registry/showcase.json +1 -1
  192. package/registry/signature.json +1 -1
  193. package/registry/site-cahier.json +1 -1
  194. package/registry/site-footer.json +307 -6
  195. package/registry/sites.json +1 -1
  196. package/registry/skeleton.json +1 -1
  197. package/registry/skip-link.json +1 -1
  198. package/registry/slider.json +1 -1
  199. package/registry/slot-picker.json +1 -1
  200. package/registry/slot.json +1 -1
  201. package/registry/specimen-tag.json +1 -1
  202. package/registry/speed-lines.json +1 -1
  203. package/registry/spinner.json +1 -1
  204. package/registry/split-view.json +1 -1
  205. package/registry/stage-banner.json +1 -1
  206. package/registry/stat.json +1 -1
  207. package/registry/status-chip.json +1 -1
  208. package/registry/status-page.json +1 -1
  209. package/registry/step-progress.json +1 -1
  210. package/registry/step-showcase.json +1 -1
  211. package/registry/stepper.json +1 -1
  212. package/registry/sticky-action.json +1 -1
  213. package/registry/stuck.json +1 -1
  214. package/registry/swipe-deck.json +1 -1
  215. package/registry/switch.json +44 -7
  216. package/registry/tabs.json +1 -1
  217. package/registry/tag-input.json +1 -1
  218. package/registry/tag-selector.json +1 -1
  219. package/registry/taped-photo.json +1 -1
  220. package/registry/terminal-replay.json +1 -1
  221. package/registry/text-style.json +1 -1
  222. package/registry/theme.json +1 -1
  223. package/registry/toast.json +1 -1
  224. package/registry/toc.json +1 -1
  225. package/registry/tooltip.json +1 -1
  226. package/registry/tree-view.json +1 -1
  227. package/registry/update-prompt.json +1 -1
  228. package/registry/upload-queue.json +1 -1
  229. package/registry/usage.json +1 -1
  230. package/registry/verified-badge.json +1 -1
  231. package/registry/versus-card.json +1 -1
  232. package/registry/vertical-video.json +1 -1
  233. package/registry/video-player.json +1 -1
  234. package/registry/video-trimmer.json +1 -1
  235. package/registry/virtual.json +1 -1
  236. package/registry/wall.json +1 -1
  237. package/registry/waveform.json +1 -1
  238. package/dist/chunk-CZHPWLNW.js.map +0 -1
@@ -0,0 +1,132 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as React from 'react';
3
+
4
+ /** The size class of a container: where each one begins, in px of the room (Material's window size classes, as on native). */
5
+ declare const SIZE_CLASS_FROM: {
6
+ readonly regular: 600;
7
+ readonly expanded: 840;
8
+ };
9
+ /** The gap tokens, in px — the spacing scale (`gap-1` … `gap-6`), the same numbers as native. */
10
+ declare const GRID_GAPS: {
11
+ readonly none: 0;
12
+ readonly xs: 4;
13
+ readonly sm: 8;
14
+ readonly md: 12;
15
+ readonly lg: 16;
16
+ readonly xl: 24;
17
+ };
18
+ type GridGap = keyof typeof GRID_GAPS;
19
+ /** How many columns per size class, or one number for all. A size class left out takes the one before it (compact → regular → expanded). */
20
+ type GridColumns = number | Partial<Record<"compact" | "regular" | "expanded", number>>;
21
+ /** One column on a compact room, two on a regular one, three on an expanded one. */
22
+ declare const DEFAULT_COLUMNS: {
23
+ readonly compact: 1;
24
+ readonly regular: 2;
25
+ readonly expanded: 3;
26
+ };
27
+ declare const columnsLayout: tailwind_variants.TVReturnType<{
28
+ gap: Record<GridGap, {
29
+ track: string;
30
+ columns: string;
31
+ }>;
32
+ equalHeight: {
33
+ true: {
34
+ track: string;
35
+ cell: string;
36
+ };
37
+ false: {
38
+ track: string;
39
+ };
40
+ };
41
+ }, {
42
+ grid: string;
43
+ track: string;
44
+ cell: string;
45
+ columns: string;
46
+ column: string;
47
+ }, undefined, {
48
+ gap: Record<GridGap, {
49
+ track: string;
50
+ columns: string;
51
+ }>;
52
+ equalHeight: {
53
+ true: {
54
+ track: string;
55
+ cell: string;
56
+ };
57
+ false: {
58
+ track: string;
59
+ };
60
+ };
61
+ }, {
62
+ grid: string;
63
+ track: string;
64
+ cell: string;
65
+ columns: string;
66
+ column: string;
67
+ }, tailwind_variants.TVReturnTypeLike<{
68
+ gap: Record<GridGap, {
69
+ track: string;
70
+ columns: string;
71
+ }>;
72
+ equalHeight: {
73
+ true: {
74
+ track: string;
75
+ cell: string;
76
+ };
77
+ false: {
78
+ track: string;
79
+ };
80
+ };
81
+ }, {
82
+ grid: string;
83
+ track: string;
84
+ cell: string;
85
+ columns: string;
86
+ column: string;
87
+ }>>;
88
+ /** The columns of a size class: a size class left out takes the one before it. */
89
+ declare function columnsFor(columns: GridColumns | undefined, sizeClass: keyof typeof DEFAULT_COLUMNS): number;
90
+ type GridProps = Omit<React.ComponentProps<"div">, "children"> & {
91
+ /** The items. Each is one cell. */
92
+ children: React.ReactNode;
93
+ /** Columns per size class of the container the grid is in (default 1 · 2 · 3), or one number. A ceiling: it drops when `minItemWidth` does not fit. */
94
+ columns?: GridColumns;
95
+ /** No cell is narrower than this, in px (default 160); it grows with the text scale. */
96
+ minItemWidth?: number;
97
+ /** The space between cells (default `md`). */
98
+ gap?: GridGap;
99
+ /** The most columns, whatever the container (default 6). */
100
+ maxColumns?: number;
101
+ /** The cells of a row are as tall as the tallest (default true); `false` lets each keep its own height. */
102
+ equalHeight?: boolean;
103
+ /** The text scale to lay out for, on top of the browser's (widths are in `rem`, so a larger text size is followed already). Pass 2 to see 200 % text. */
104
+ fontScale?: number;
105
+ };
106
+ /**
107
+ * A grid that fits its container: the columns come from the size class of the container's width, and no cell is narrower
108
+ * than `minItemWidth`, so nothing overflows in a page, a side panel or a split. The order mirrors in right-to-left.
109
+ */
110
+ declare function Grid({ children, columns, minItemWidth, gap, maxColumns, equalHeight, fontScale, "aria-label": label, className, style, ...props }: GridProps): React.JSX.Element;
111
+ type ColumnsProps = Omit<React.ComponentProps<"div">, "children"> & {
112
+ /** The columns, in reading order (the first is at the start edge, on the right in right-to-left). */
113
+ children: React.ReactNode;
114
+ /** The share of each column (default equal); `[1, 2]` is a third and two thirds. */
115
+ weights?: readonly number[];
116
+ /** Below this width per column, in px, the columns stack top to bottom (default 280); it grows with the text scale. */
117
+ minColumnWidth?: number;
118
+ /** The space between columns, and between stacked ones (default `lg`). */
119
+ gap?: GridGap;
120
+ /** The text scale to lay out for, on top of the browser's. Pass 2 to see 200 % text. */
121
+ fontScale?: number;
122
+ };
123
+ /** The width, in px, that `count` columns need to sit side by side. */
124
+ declare function columnsNeed(count: number, minColumnWidth: number, gapPx: number, fontScale?: number): number;
125
+ /**
126
+ * A few columns that sit side by side when their container holds them and stack when it does not — the master and the
127
+ * detail, a form and its summary. Stacked, they keep their order and each takes the full width.
128
+ */
129
+ declare function Columns({ children, weights, minColumnWidth, gap, fontScale, className, style, ...props }: ColumnsProps): React.JSX.Element;
130
+
131
+ export { Columns, DEFAULT_COLUMNS, GRID_GAPS, Grid, SIZE_CLASS_FROM, columnsFor, columnsLayout, columnsNeed };
132
+ export type { ColumnsProps, GridColumns, GridGap, GridProps };
@@ -0,0 +1,91 @@
1
+ // src/columns/columns.tsx
2
+ import * as React from "react";
3
+ import { tv } from "tailwind-variants";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var SIZE_CLASS_FROM = { regular: 600, expanded: 840 };
6
+ var GRID_GAPS = { none: 0, xs: 4, sm: 8, md: 12, lg: 16, xl: 24 };
7
+ var DEFAULT_COLUMNS = { compact: 1, regular: 2, expanded: 3 };
8
+ var PX_PER_REM = 16;
9
+ var rem = (px) => `${px / PX_PER_REM}rem`;
10
+ var columnsLayout = tv({
11
+ slots: {
12
+ // `@container`: the grid reads the width of this element. The track inside switches its columns at its widths.
13
+ grid: "@container w-full min-w-0",
14
+ track: "grid [--kz-grid-cols:var(--kz-grid-compact)] @min-[600px]:[--kz-grid-cols:var(--kz-grid-regular)] @min-[840px]:[--kz-grid-cols:var(--kz-grid-expanded)]",
15
+ cell: "flex min-w-0 flex-col",
16
+ columns: "flex w-full min-w-0 flex-wrap",
17
+ column: "min-w-0"
18
+ },
19
+ variants: {
20
+ gap: Object.fromEntries(
21
+ Object.entries({ none: "gap-0", xs: "gap-1", sm: "gap-2", md: "gap-3", lg: "gap-4", xl: "gap-6" }).map(([name, cls]) => [name, { track: cls, columns: cls }])
22
+ ),
23
+ equalHeight: { true: { track: "items-stretch", cell: "*:flex-1" }, false: { track: "items-start" } }
24
+ }
25
+ });
26
+ function columnsFor(columns, sizeClass) {
27
+ const asked = columns ?? DEFAULT_COLUMNS;
28
+ if (typeof asked === "number") return Math.max(1, Math.floor(asked));
29
+ const order = ["compact", "regular", "expanded"];
30
+ for (let i = order.indexOf(sizeClass); i >= 0; i--) {
31
+ const value = asked[order[i]];
32
+ if (value) return Math.max(1, Math.floor(value));
33
+ }
34
+ return 1;
35
+ }
36
+ function Grid({ children, columns, minItemWidth = 160, gap = "md", maxColumns = 6, equalHeight = true, fontScale = 1, "aria-label": label, className, style, ...props }) {
37
+ const s = columnsLayout({ gap, equalHeight });
38
+ const items = React.Children.toArray(children);
39
+ const cap = Math.max(1, Math.floor(maxColumns));
40
+ const at = (sizeClass) => Math.min(columnsFor(columns, sizeClass), cap);
41
+ const vars = {
42
+ "--kz-grid-compact": at("compact"),
43
+ "--kz-grid-regular": at("regular"),
44
+ "--kz-grid-expanded": at("expanded"),
45
+ "--kz-grid-min": rem(minItemWidth * Math.max(1, fontScale)),
46
+ "--kz-grid-gap": rem(GRID_GAPS[gap]),
47
+ // As many tracks as `--kz-grid-cols` allows, none narrower than the minimum: the ceiling drops on its own.
48
+ gridTemplateColumns: "repeat(auto-fill, minmax(max(var(--kz-grid-min), calc((100% - (var(--kz-grid-cols) - 1) * var(--kz-grid-gap)) / var(--kz-grid-cols))), 1fr))"
49
+ };
50
+ const Track = label ? "ul" : "div";
51
+ const Cell = label ? "li" : "div";
52
+ return /* @__PURE__ */ jsx("div", { className: s.grid({ className }), style, ...props, children: /* @__PURE__ */ jsx(Track, { className: s.track({ className: label ? "m-0 list-none p-0" : void 0 }), style: vars, "aria-label": label, children: items.map((child, index) => /* @__PURE__ */ jsx(Cell, { className: s.cell(), children: child }, React.isValidElement(child) && child.key != null ? child.key : index)) }) });
53
+ }
54
+ function columnsNeed(count, minColumnWidth, gapPx, fontScale = 1) {
55
+ return count * minColumnWidth * Math.max(1, fontScale) + gapPx * (count - 1);
56
+ }
57
+ function Columns({ children, weights, minColumnWidth = 280, gap = "lg", fontScale = 1, className, style, ...props }) {
58
+ const s = columnsLayout({ gap });
59
+ const items = React.Children.toArray(children);
60
+ const need = columnsNeed(items.length, minColumnWidth, GRID_GAPS[gap], fontScale);
61
+ const side = items.length > 1;
62
+ return /* @__PURE__ */ jsx(
63
+ "div",
64
+ {
65
+ className: s.columns({ className }),
66
+ style: { "--kz-columns-need": rem(need), ...style },
67
+ "data-layout": "columns",
68
+ ...props,
69
+ children: items.map((child, index) => /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ className: s.column(),
73
+ style: { flexGrow: weights?.[index] ?? 1, flexBasis: side ? "calc((var(--kz-columns-need) - 100%) * 999)" : "100%" },
74
+ children: child
75
+ },
76
+ React.isValidElement(child) && child.key != null ? child.key : index
77
+ ))
78
+ }
79
+ );
80
+ }
81
+ export {
82
+ Columns,
83
+ DEFAULT_COLUMNS,
84
+ GRID_GAPS,
85
+ Grid,
86
+ SIZE_CLASS_FROM,
87
+ columnsFor,
88
+ columnsLayout,
89
+ columnsNeed
90
+ };
91
+ //# sourceMappingURL=columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/columns/columns.tsx"],"sourcesContent":["// Server-safe. Layouts that decide on the width of the room they sit in — their container, never the viewport or a device —\n// like the native `Grid` and `Columns` (src/native/grid.tsx), with the same props and the same size classes\n// (compact < 600 px, regular < 840 px, expanded from there). No JS measures anything: `Grid` is a CSS container\n// (`@container`) whose columns come from the size class of that container, and `Columns` stacks by container-relative\n// sizing (a `flex-basis` that is huge below the width the columns need and zero above it). Every width is in `rem`, so a\n// larger text size grows the room an item needs: at 200 % a card that held two per row stacks into one. The order is the\n// reading order and it mirrors in `rtl`: no physical edge is used.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\n/** The size class of a container: where each one begins, in px of the room (Material's window size classes, as on native). */\nexport const SIZE_CLASS_FROM = { regular: 600, expanded: 840 } as const;\n\n/** The gap tokens, in px — the spacing scale (`gap-1` … `gap-6`), the same numbers as native. */\nexport const GRID_GAPS = { none: 0, xs: 4, sm: 8, md: 12, lg: 16, xl: 24 } as const;\nexport type GridGap = keyof typeof GRID_GAPS;\n\n/** How many columns per size class, or one number for all. A size class left out takes the one before it (compact → regular → expanded). */\nexport type GridColumns = number | Partial<Record<\"compact\" | \"regular\" | \"expanded\", number>>;\n\n/** One column on a compact room, two on a regular one, three on an expanded one. */\nexport const DEFAULT_COLUMNS = { compact: 1, regular: 2, expanded: 3 } as const;\n\nconst PX_PER_REM = 16;\nconst rem = (px: number) => `${px / PX_PER_REM}rem`;\n\nexport const columnsLayout = tv({\n slots: {\n // `@container`: the grid reads the width of this element. The track inside switches its columns at its widths.\n grid: \"@container w-full min-w-0\",\n track:\n \"grid [--kz-grid-cols:var(--kz-grid-compact)] @min-[600px]:[--kz-grid-cols:var(--kz-grid-regular)] @min-[840px]:[--kz-grid-cols:var(--kz-grid-expanded)]\",\n cell: \"flex min-w-0 flex-col\",\n columns: \"flex w-full min-w-0 flex-wrap\",\n column: \"min-w-0\",\n },\n variants: {\n gap: Object.fromEntries(\n Object.entries({ none: \"gap-0\", xs: \"gap-1\", sm: \"gap-2\", md: \"gap-3\", lg: \"gap-4\", xl: \"gap-6\" }).map(([name, cls]) => [name, { track: cls, columns: cls }]),\n ) as Record<GridGap, { track: string; columns: string }>,\n equalHeight: { true: { track: \"items-stretch\", cell: \"*:flex-1\" }, false: { track: \"items-start\" } },\n },\n});\n\n/** The columns of a size class: a size class left out takes the one before it. */\nexport function columnsFor(columns: GridColumns | undefined, sizeClass: keyof typeof DEFAULT_COLUMNS): number {\n const asked = columns ?? DEFAULT_COLUMNS;\n if (typeof asked === \"number\") return Math.max(1, Math.floor(asked));\n const order = [\"compact\", \"regular\", \"expanded\"] as const;\n for (let i = order.indexOf(sizeClass); i >= 0; i--) {\n const value = asked[order[i] as (typeof order)[number]];\n if (value) return Math.max(1, Math.floor(value));\n }\n return 1;\n}\n\nexport type GridProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The items. Each is one cell. */\n children: React.ReactNode;\n /** Columns per size class of the container the grid is in (default 1 · 2 · 3), or one number. A ceiling: it drops when `minItemWidth` does not fit. */\n columns?: GridColumns;\n /** No cell is narrower than this, in px (default 160); it grows with the text scale. */\n minItemWidth?: number;\n /** The space between cells (default `md`). */\n gap?: GridGap;\n /** The most columns, whatever the container (default 6). */\n maxColumns?: number;\n /** The cells of a row are as tall as the tallest (default true); `false` lets each keep its own height. */\n equalHeight?: boolean;\n /** The text scale to lay out for, on top of the browser's (widths are in `rem`, so a larger text size is followed already). Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/**\n * A grid that fits its container: the columns come from the size class of the container's width, and no cell is narrower\n * than `minItemWidth`, so nothing overflows in a page, a side panel or a split. The order mirrors in right-to-left.\n */\nexport function Grid({ children, columns, minItemWidth = 160, gap = \"md\", maxColumns = 6, equalHeight = true, fontScale = 1, \"aria-label\": label, className, style, ...props }: GridProps) {\n const s = columnsLayout({ gap, equalHeight });\n const items = React.Children.toArray(children);\n const cap = Math.max(1, Math.floor(maxColumns));\n const at = (sizeClass: keyof typeof DEFAULT_COLUMNS) => Math.min(columnsFor(columns, sizeClass), cap);\n const vars = {\n \"--kz-grid-compact\": at(\"compact\"),\n \"--kz-grid-regular\": at(\"regular\"),\n \"--kz-grid-expanded\": at(\"expanded\"),\n \"--kz-grid-min\": rem(minItemWidth * Math.max(1, fontScale)),\n \"--kz-grid-gap\": rem(GRID_GAPS[gap]),\n // As many tracks as `--kz-grid-cols` allows, none narrower than the minimum: the ceiling drops on its own.\n gridTemplateColumns:\n \"repeat(auto-fill, minmax(max(var(--kz-grid-min), calc((100% - (var(--kz-grid-cols) - 1) * var(--kz-grid-gap)) / var(--kz-grid-cols))), 1fr))\",\n } as React.CSSProperties;\n // A labelled grid is a list: real <ul>/<li> (native semantics on every device), never a div with an ARIA role.\n const Track = label ? \"ul\" : \"div\";\n const Cell = label ? \"li\" : \"div\";\n return (\n <div className={s.grid({ className })} style={style} {...props}>\n <Track className={s.track({ className: label ? \"m-0 list-none p-0\" : undefined })} style={vars} aria-label={label}>\n {items.map((child, index) => (\n <Cell key={React.isValidElement(child) && child.key != null ? child.key : index} className={s.cell()}>\n {child}\n </Cell>\n ))}\n </Track>\n </div>\n );\n}\n\nexport type ColumnsProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The columns, in reading order (the first is at the start edge, on the right in right-to-left). */\n children: React.ReactNode;\n /** The share of each column (default equal); `[1, 2]` is a third and two thirds. */\n weights?: readonly number[];\n /** Below this width per column, in px, the columns stack top to bottom (default 280); it grows with the text scale. */\n minColumnWidth?: number;\n /** The space between columns, and between stacked ones (default `lg`). */\n gap?: GridGap;\n /** The text scale to lay out for, on top of the browser's. Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/** The width, in px, that `count` columns need to sit side by side. */\nexport function columnsNeed(count: number, minColumnWidth: number, gapPx: number, fontScale = 1): number {\n return count * minColumnWidth * Math.max(1, fontScale) + gapPx * (count - 1);\n}\n\n/**\n * A few columns that sit side by side when their container holds them and stack when it does not — the master and the\n * detail, a form and its summary. Stacked, they keep their order and each takes the full width.\n */\nexport function Columns({ children, weights, minColumnWidth = 280, gap = \"lg\", fontScale = 1, className, style, ...props }: ColumnsProps) {\n const s = columnsLayout({ gap });\n const items = React.Children.toArray(children);\n const need = columnsNeed(items.length, minColumnWidth, GRID_GAPS[gap], fontScale);\n const side = items.length > 1;\n return (\n <div\n className={s.columns({ className })}\n style={{ \"--kz-columns-need\": rem(need), ...style } as React.CSSProperties}\n data-layout=\"columns\"\n {...props}\n >\n {items.map((child, index) => (\n <div\n key={React.isValidElement(child) && child.key != null ? child.key : index}\n className={s.column()}\n // Container-relative: a basis above the row's width wraps the column onto its own line (stacked, full width);\n // below it the basis is 0 and the free space is shared by weight.\n style={{ flexGrow: weights?.[index] ?? 1, flexBasis: side ? \"calc((var(--kz-columns-need) - 100%) * 999)\" : \"100%\" }}\n >\n {child}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";AAOA,YAAY,WAAW;AACvB,SAAS,UAAU;AA2FT;AAxFH,IAAM,kBAAkB,EAAE,S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AC;AAC/B,QAAM,QAAc,eAAS,QAAQ,QAAQ;AAC7C,QAAM,OAAO,YAAY,MAAM,QAAQ,gBAAgB,UAAU,GAAG,GAAG,SAAS;AAChF,QAAM,OAAO,MAAM,SAAS;AAC5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC;AAAA,MAClC,OAAO,EAAE,qBAAqB,IAAI,IAAI,GAAG,GAAG,MAAM;AAAA,MAClD,eAAY;AAAA,MACX,GAAG;AAAA,MAEH,gBAAM,IAAI,CAAC,OAAO,UACjB;AAAA,QAAC;AAAA;AAAA,UAEC,WAAW,EAAE,OAAO;AAAA,UAGpB,OAAO,EAAE,UAAU,UAAU,KAAK,KAAK,GAAG,WAAW,OAAO,gDAAgD,OAAO;AAAA,UAElH;AAAA;AAAA,QANU,qBAAe,KAAK,KAAK,MAAM,OAAO,OAAO,MAAM,MAAM;AAAA,MAOtE,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -27,7 +27,7 @@ function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal =
27
27
  {
28
28
  "aria-hidden": true,
29
29
  "data-band": true,
30
- className: "pointer-events-none rounded-2xl border border-accent/35 bg-accent-soft shadow-[0_0_48px_-16px_var(--kz-accent)]",
30
+ className: "pointer-events-none rounded-none border border-accent bg-accent-soft",
31
31
  style: { gridColumn: at + 2, gridRow: `1 / span ${rows.length + 1}` }
32
32
  }
33
33
  ),
@@ -66,12 +66,12 @@ function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal =
66
66
  ))
67
67
  ] }, row.id))
68
68
  ] }),
69
- /* @__PURE__ */ jsx("ul", { "aria-label": label, className: "grid gap-4 md:hidden", children: rows.map((row, r) => /* @__PURE__ */ jsxs("li", { "data-reveal": reveal ? "soft" : void 0, style: stagger(r), className: "rounded-2xl border border-border-subtle bg-surface-1/80 p-4", children: [
69
+ /* @__PURE__ */ jsx("ul", { "aria-label": label, className: "grid gap-4 md:hidden", children: rows.map((row, r) => /* @__PURE__ */ jsxs("li", { "data-reveal": reveal ? "soft" : void 0, style: stagger(r), className: "rounded-none border border-border-subtle bg-surface-1/80 p-4", children: [
70
70
  /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-3 text-base font-semibold text-fg", children: [
71
71
  row.icon && /* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4", children: row.icon }),
72
72
  row.topic
73
73
  ] }),
74
- /* @__PURE__ */ jsx("dl", { className: "mt-3 grid gap-2", children: columns.map((c, i) => /* @__PURE__ */ jsxs("div", { "data-highlight": band(i) ? "" : void 0, className: cn("rounded-xl p-3 text-sm leading-relaxed", band(i) ? "border border-accent/35 bg-accent-soft" : "bg-surface-2/60"), children: [
74
+ /* @__PURE__ */ jsx("dl", { className: "mt-3 grid gap-2", children: columns.map((c, i) => /* @__PURE__ */ jsxs("div", { "data-highlight": band(i) ? "" : void 0, className: cn("rounded-none p-3 text-sm leading-relaxed", band(i) ? "border border-accent bg-accent-soft" : "bg-surface-2/60"), children: [
75
75
  /* @__PURE__ */ jsx("dt", { className: cn("mb-1 flex items-center gap-1.5 font-mono text-[11px] ", band(i) ? "text-fg-accent" : "text-fg-secondary"), children: c.label }),
76
76
  /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(Answer, { answer: row.answers[c.id] }) })
77
77
  ] }, c.id)) })
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/comparison-table/comparison-table.tsx"],"sourcesContent":["// Server-safe (no state). A fair \"versus\" block: one grid where every row lines up across the columns, the column you\n// argue for drawn AS a column of the grid (a tinted band with the brand's light, its header part of the band), a small icon per question, each answer as its key phrase in bold then its detail. The other columns stay\n// neutral — never crossed out. Below `md` each question is a card: the question, then the answers stacked, the\n// highlighted one tinted. Rows arrive one after the other (`[data-reveal]`, staggered) when a MotionObserver runs.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface ComparisonColumn {\n /** A stable id: the key of the rows' `answers`. */\n id: string;\n /** The column's name (“A cloud assistant”), passed translated. */\n label: string;\n /** A small icon beside the name. */\n icon?: React.ReactNode;\n}\n\nexport interface ComparisonAnswer {\n /** The key phrase, in bold (“On your machines.”). */\n key: string;\n /** The detail after it (“A cloud model only if you connect one.”). */\n detail?: string;\n}\n\nexport interface ComparisonRow {\n /** A stable key. */\n id: string;\n /** The question (“Where do your prompts go?”). */\n topic: string;\n /** A small icon for the question. */\n icon?: React.ReactNode;\n /** One answer per column id. */\n answers: Readonly<Record<string, ComparisonAnswer>>;\n}\n\nexport interface ComparisonTableProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** The table's accessible name (the section's title), passed translated. */\n label: string;\n /** The first column's header (“Question”). */\n topicLabel: string;\n /** The answer columns, in order. */\n columns: readonly ComparisonColumn[];\n /** The column drawn as the highlighted band (yours). */\n highlight: string;\n /** The questions, in order (three to six). */\n rows: readonly ComparisonRow[];\n /** Stagger the rows' entrance with `[data-reveal]` (needs MotionObserver). @default true */\n reveal?: boolean;\n}\n\nfunction Answer({ answer }: { answer?: ComparisonAnswer }) {\n if (!answer) return null;\n return (\n <>\n <strong className=\"font-semibold text-fg\">{answer.key}</strong>\n {answer.detail && <span className=\"text-fg-secondary\"> {answer.detail}</span>}\n </>\n );\n}\n\n/** The rows' stagger: 70 ms apart, through the motion system's `--kz-delay` (reduced motion: no movement at all). */\nconst stagger = (i: number): React.CSSProperties => ({ \"--kz-delay\": `${i * 70}ms` }) as React.CSSProperties;\n\n/** A comparison where your column is a highlighted band of the same grid — aligned rows, fair neutral answers, cards on a phone. */\nexport function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal = true, className, ...props }: ComparisonTableProps) {\n const at = Math.max(columns.findIndex((c) => c.id === highlight), 0);\n const grid = { gridTemplateColumns: `minmax(10rem, 0.9fr) repeat(${columns.length}, minmax(0, 1fr))` };\n const band = (i: number) => i === at;\n return (\n <div data-kz-comparison className={cn(\"w-full\", className)} {...props}>\n {/* Wide: one grid, the band is a grid item spanning every row of its column — the rows cannot drift. */}\n <div role=\"table\" aria-label={label} className=\"relative hidden md:grid\" style={grid}>\n <div\n aria-hidden\n data-band\n className=\"pointer-events-none rounded-2xl border border-accent/35 bg-accent-soft shadow-[0_0_48px_-16px_var(--kz-accent)]\"\n style={{ gridColumn: at + 2, gridRow: `1 / span ${rows.length + 1}` }}\n />\n <div role=\"row\" className=\"contents\">\n <span role=\"columnheader\" className=\"row-start-1 self-end px-4 pb-4 pt-5 font-mono text-xs font-semibold text-fg-secondary\" style={{ gridColumn: 1 }}>\n {topicLabel}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"columnheader\"\n data-highlight={band(i) ? \"\" : undefined}\n className={cn(\"row-start-1 flex items-center gap-2 self-stretch px-5 pb-4 pt-5 text-sm font-semibold\", band(i) ? \"text-fg [&_svg]:text-fg-accent\" : \"text-fg-secondary\")}\n style={{ gridColumn: i + 2 }}\n >\n {c.icon}\n {c.label}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={row.id} role=\"row\" className=\"contents\">\n <span role=\"rowheader\" data-reveal={reveal ? \"soft\" : undefined} style={{ ...stagger(r), gridColumn: 1, gridRow: r + 2 }} className=\"flex items-start gap-3 border-t border-border-subtle px-4 py-5 text-base font-semibold text-fg\">\n {row.icon && <span className=\"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"cell\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={{ ...stagger(r), gridColumn: i + 2, gridRow: r + 2 }}\n className={cn(\"border-t px-5 py-5 text-sm leading-relaxed\", band(i) ? \"border-accent/20\" : \"border-border-subtle\")}\n >\n <Answer answer={row.answers[c.id]} />\n </span>\n ))}\n </div>\n ))}\n </div>\n\n {/* Phone: one card per question, the answers stacked, the highlighted one tinted. */}\n <ul aria-label={label} className=\"grid gap-4 md:hidden\">\n {rows.map((row, r) => (\n <li key={row.id} data-reveal={reveal ? \"soft\" : undefined} style={stagger(r)} className=\"rounded-2xl border border-border-subtle bg-surface-1/80 p-4\">\n <p className=\"flex items-center gap-3 text-base font-semibold text-fg\">\n {row.icon && <span className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </p>\n <dl className=\"mt-3 grid gap-2\">\n {columns.map((c, i) => (\n <div key={c.id} data-highlight={band(i) ? \"\" : undefined} className={cn(\"rounded-xl p-3 text-sm leading-relaxed\", band(i) ? \"border border-accent/35 bg-accent-soft\" : \"bg-surface-2/60\")}>\n <dt className={cn(\"mb-1 flex items-center gap-1.5 font-mono text-[11px] \", band(i) ? \"text-fg-accent\" : \"text-fg-secondary\")}>\n {c.label}\n </dt>\n <dd>\n <Answer answer={row.answers[c.id]} />\n </dd>\n </div>\n ))}\n </dl>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;AAqDI,mBACE,KACkB,YAFpB;AAHJ,SAAS,OAAO,EAAE,OAAO,GAAkC;AACzD,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE,iCACE;AAAA,wBAAC,YAAO,WAAU,yBAAyB,iBAAO,KAAI;AAAA,IACrD,OAAO,UAAU,qBAAC,UAAK,WAAU,qBAAoB;AAAA;AAAA,MAAE,OAAO;AAAA,OAAO;AAAA,KACxE;AAEJ;AAGA,IAAM,UAAU,CAAC,OAAoC,EAAE,cAAc,GAAG,IAAI,EAAE,KAAK;AAG5E,SAAS,gBAAgB,EAAE,OAAO,YAAY,SAAS,WAAW,MAAM,SAAS,MAAM,WAAW,GAAG,MAAM,GAAyB;AACzI,QAAM,KAAK,KAAK,IAAI,QAAQ,UAAU,CAAC,MA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AAA,QACC,QAAQ,IAAI,CAAC,GAAG,MACf;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,eAAa,SAAS,SAAS;AAAA,YAC/B,OAAO,EAAE,GAAG,QAAQ,CAAC,GAAG,YAAY,IAAI,GAAG,SAAS,IAAI,EAAE;AAAA,YAC1D,WAAW,GAAG,8CAA8C,KAAK,CAAC,IAAI,qBAAqB,sBAAsB;AAAA,YAEjH,8BAAC,UAAO,QAAQ,IAAI,QAAQ,EAAE,EAAE,GAAG;AAAA;AAAA,UAN9B,EAAE;AAAA,QAOT,CACD;AAAA,WAfO,IAAI,EAgBd,CACD;AAAA,OACH;AAAA,IAGA,oBAAC,QAAG,cAAY,OAAO,WAAU,wBAC9B,eAAK,IAAI,CAAC,KAAK,MACd,qBAAC,QAAgB,eAAa,SAAS,SAAS,QAAW,OAAO,QAAQ,CAAC,GAAG,WAAU,+DACtF;AAAA,2BAAC,OAAE,WAAU,2DACV;AAAA,YAAI,QAAQ,oBAAC,UAAK,WAAU,iJAAiJ,cAAI,MAAK;AAAA,QACtL,IAAI;AAAA,SACP;AAAA,MACA,oBAAC,QAAG,WAAU,mBACX,kBAAQ,IAAI,CAAC,GAAG,MACf,qBAAC,SAAe,kBAAgB,KAAK,CAAC,IAAI,KAAK,QAAW,WAAW,GAAG,0CAA0C,KAAK,CAAC,IAAI,2CAA2C,iBAAiB,GACtL;AAAA,4BAAC,QAAG,WAAW,GAAG,yDAAyD,KAAK,CAAC,IAAI,mBAAmB,mBAAmB,GACxH,YAAE,OACL;AAAA,QACA,oBAAC,QACC,8BAAC,UAAO,QAAQ,IAAI,QAAQ,EAAE,EAAE,GAAG,GACrC;AAAA,WANQ,EAAE,EAOZ,CACD,GACH;AAAA,SAhBO,IAAI,EAiBb,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/comparison-table/comparison-table.tsx"],"sourcesContent":["// Server-safe (no state). A fair \"versus\" block: one grid where every row lines up across the columns, the column you\n// argue for drawn AS a column of the grid (a tinted band with the brand's light, its header part of the band), a small icon per question, each answer as its key phrase in bold then its detail. The other columns stay\n// neutral — never crossed out. Below `md` each question is a card: the question, then the answers stacked, the\n// highlighted one tinted. Rows arrive one after the other (`[data-reveal]`, staggered) when a MotionObserver runs.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface ComparisonColumn {\n /** A stable id: the key of the rows' `answers`. */\n id: string;\n /** The column's name (“A cloud assistant”), passed translated. */\n label: string;\n /** A small icon beside the name. */\n icon?: React.ReactNode;\n}\n\nexport interface ComparisonAnswer {\n /** The key phrase, in bold (“On your machines.”). */\n key: string;\n /** The detail after it (“A cloud model only if you connect one.”). */\n detail?: string;\n}\n\nexport interface ComparisonRow {\n /** A stable key. */\n id: string;\n /** The question (“Where do your prompts go?”). */\n topic: string;\n /** A small icon for the question. */\n icon?: React.ReactNode;\n /** One answer per column id. */\n answers: Readonly<Record<string, ComparisonAnswer>>;\n}\n\nexport interface ComparisonTableProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** The table's accessible name (the section's title), passed translated. */\n label: string;\n /** The first column's header (“Question”). */\n topicLabel: string;\n /** The answer columns, in order. */\n columns: readonly ComparisonColumn[];\n /** The column drawn as the highlighted band (yours). */\n highlight: string;\n /** The questions, in order (three to six). */\n rows: readonly ComparisonRow[];\n /** Stagger the rows' entrance with `[data-reveal]` (needs MotionObserver). @default true */\n reveal?: boolean;\n}\n\nfunction Answer({ answer }: { answer?: ComparisonAnswer }) {\n if (!answer) return null;\n return (\n <>\n <strong className=\"font-semibold text-fg\">{answer.key}</strong>\n {answer.detail && <span className=\"text-fg-secondary\"> {answer.detail}</span>}\n </>\n );\n}\n\n/** The rows' stagger: 70 ms apart, through the motion system's `--kz-delay` (reduced motion: no movement at all). */\nconst stagger = (i: number): React.CSSProperties => ({ \"--kz-delay\": `${i * 70}ms` }) as React.CSSProperties;\n\n/** A comparison where your column is a highlighted band of the same grid — aligned rows, fair neutral answers, cards on a phone. */\nexport function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal = true, className, ...props }: ComparisonTableProps) {\n const at = Math.max(columns.findIndex((c) => c.id === highlight), 0);\n const grid = { gridTemplateColumns: `minmax(10rem, 0.9fr) repeat(${columns.length}, minmax(0, 1fr))` };\n const band = (i: number) => i === at;\n return (\n <div data-kz-comparison className={cn(\"w-full\", className)} {...props}>\n {/* Wide: one grid, the band is a grid item spanning every row of its column — the rows cannot drift. */}\n <div role=\"table\" aria-label={label} className=\"relative hidden md:grid\" style={grid}>\n <div\n aria-hidden\n data-band\n className=\"pointer-events-none rounded-none border border-accent bg-accent-soft\"\n style={{ gridColumn: at + 2, gridRow: `1 / span ${rows.length + 1}` }}\n />\n <div role=\"row\" className=\"contents\">\n <span role=\"columnheader\" className=\"row-start-1 self-end px-4 pb-4 pt-5 font-mono text-xs font-semibold text-fg-secondary\" style={{ gridColumn: 1 }}>\n {topicLabel}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"columnheader\"\n data-highlight={band(i) ? \"\" : undefined}\n className={cn(\"row-start-1 flex items-center gap-2 self-stretch px-5 pb-4 pt-5 text-sm font-semibold\", band(i) ? \"text-fg [&_svg]:text-fg-accent\" : \"text-fg-secondary\")}\n style={{ gridColumn: i + 2 }}\n >\n {c.icon}\n {c.label}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={row.id} role=\"row\" className=\"contents\">\n <span role=\"rowheader\" data-reveal={reveal ? \"soft\" : undefined} style={{ ...stagger(r), gridColumn: 1, gridRow: r + 2 }} className=\"flex items-start gap-3 border-t border-border-subtle px-4 py-5 text-base font-semibold text-fg\">\n {row.icon && <span className=\"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"cell\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={{ ...stagger(r), gridColumn: i + 2, gridRow: r + 2 }}\n className={cn(\"border-t px-5 py-5 text-sm leading-relaxed\", band(i) ? \"border-accent/20\" : \"border-border-subtle\")}\n >\n <Answer answer={row.answers[c.id]} />\n </span>\n ))}\n </div>\n ))}\n </div>\n\n {/* Phone: one card per question, the answers stacked, the highlighted one tinted. */}\n <ul aria-label={label} className=\"grid gap-4 md:hidden\">\n {rows.map((row, r) => (\n <li key={row.id} data-reveal={reveal ? \"soft\" : undefined} style={stagger(r)} className=\"rounded-none border border-border-subtle bg-surface-1/80 p-4\">\n <p className=\"flex items-center gap-3 text-base font-semibold text-fg\">\n {row.icon && <span className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </p>\n <dl className=\"mt-3 grid gap-2\">\n {columns.map((c, i) => (\n <div key={c.id} data-highlight={band(i) ? \"\" : undefined} className={cn(\"rounded-none p-3 text-sm leading-relaxed\", band(i) ? \"border border-accent bg-accent-soft\" : \"bg-surface-2/60\")}>\n <dt className={cn(\"mb-1 flex items-center gap-1.5 font-mono text-[11px] \", band(i) ? \"text-fg-accent\" : \"text-fg-secondary\")}>\n {c.label}\n </dt>\n <dd>\n <Answer answer={row.answers[c.id]} />\n </dd>\n </div>\n ))}\n </dl>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;AAqDI,mBACE,KACkB,YAFpB;AAHJ,SAAS,OAAO,EAAE,OAAO,GAAkC;AACzD,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE,iCACE;AAAA,wBAAC,YAAO,WAAU,yBAAyB,iBAAO,KAAI;AAAA,IACrD,OAAO,UAAU,qBAAC,UAAK,WAAU,qBAAoB;AAAA;AAAA,MAAE,OAAO;AAAA,OAAO;AAAA,KACxE;AAEJ;AAGA,IAAM,UAAU,CAAC,OAAoC,EAAE,cAAc,GAAG,IAA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H;AAAA,SAhBO,IAAI,EAiBb,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
@@ -83,11 +83,11 @@ declare const filterBar: tailwind_variants.TVReturnType<{
83
83
  [key: string]: {
84
84
  [key: string]: tailwind_variants.ClassValue | {
85
85
  root?: tailwind_variants.ClassValue;
86
+ count?: tailwind_variants.ClassValue;
86
87
  controls?: tailwind_variants.ClassValue;
87
88
  active?: tailwind_variants.ClassValue;
88
89
  clear?: tailwind_variants.ClassValue;
89
90
  results?: tailwind_variants.ClassValue;
90
- count?: tailwind_variants.ClassValue;
91
91
  optionCount?: tailwind_variants.ClassValue;
92
92
  trigger?: tailwind_variants.ClassValue;
93
93
  };
@@ -96,11 +96,11 @@ declare const filterBar: tailwind_variants.TVReturnType<{
96
96
  [x: string]: {
97
97
  [x: string]: tailwind_variants.ClassValue | {
98
98
  root?: tailwind_variants.ClassValue;
99
+ count?: tailwind_variants.ClassValue;
99
100
  controls?: tailwind_variants.ClassValue;
100
101
  active?: tailwind_variants.ClassValue;
101
102
  clear?: tailwind_variants.ClassValue;
102
103
  results?: tailwind_variants.ClassValue;
103
- count?: tailwind_variants.ClassValue;
104
104
  optionCount?: tailwind_variants.ClassValue;
105
105
  trigger?: tailwind_variants.ClassValue;
106
106
  };
@@ -118,11 +118,11 @@ declare const filterBar: tailwind_variants.TVReturnType<{
118
118
  [key: string]: {
119
119
  [key: string]: tailwind_variants.ClassValue | {
120
120
  root?: tailwind_variants.ClassValue;
121
+ count?: tailwind_variants.ClassValue;
121
122
  controls?: tailwind_variants.ClassValue;
122
123
  active?: tailwind_variants.ClassValue;
123
124
  clear?: tailwind_variants.ClassValue;
124
125
  results?: tailwind_variants.ClassValue;
125
- count?: tailwind_variants.ClassValue;
126
126
  optionCount?: tailwind_variants.ClassValue;
127
127
  trigger?: tailwind_variants.ClassValue;
128
128
  };
@@ -6,7 +6,7 @@ import {
6
6
  import "./chunk-3PRYL2LS.js";
7
7
  import {
8
8
  Switch
9
- } from "./chunk-CZHPWLNW.js";
9
+ } from "./chunk-WKQ5CB3I.js";
10
10
  import {
11
11
  Chip,
12
12
  MarkerPicker,
package/dist/nav-bar.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as tailwind_variants from 'tailwind-variants';
2
2
  import { NavigationMenu } from 'radix-ui';
3
3
  import * as React from 'react';
4
4
  import { LanguageSwitchProps } from './language-switch.js';
5
- import { O as OrgFacts, S as SiteId, F as FamilyLabels } from './sites-iJkCPeiH.js';
5
+ import { O as OrgFacts, S as SiteId, F as FamilyLabels } from './sites-BPshUouf.js';
6
6
 
7
7
  /** The body of `GET /api/me`. `account` is the product's own shape, present only when `signedIn`. */
8
8
  interface MeResponse<TAccount = unknown> {
@@ -2,7 +2,7 @@
2
2
  import "./chunk-3PRYL2LS.js";
3
3
  import {
4
4
  Switch
5
- } from "./chunk-CZHPWLNW.js";
5
+ } from "./chunk-WKQ5CB3I.js";
6
6
  import {
7
7
  Chip
8
8
  } from "./chunk-V5RO6JYI.js";
package/dist/router.js CHANGED
@@ -7,8 +7,8 @@ var CHANGE = "kz-route-state";
7
7
  var browserAdapter = {
8
8
  search: () => globalThis.window === void 0 ? "" : globalThis.location.search,
9
9
  navigate: (search, { replace }) => {
10
- const url = `${globalThis.location.pathname}${search}${globalThis.location.hash}`;
11
- globalThis.history[replace ? "replaceState" : "pushState"](globalThis.history.state, "", url);
10
+ const where = globalThis.location;
11
+ if (search !== where.search) globalThis.history[replace ? "replaceState" : "pushState"](null, "", where.pathname + search + where.hash);
12
12
  globalThis.dispatchEvent(new Event(CHANGE));
13
13
  },
14
14
  subscribe: (onChange) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/router/route-state.tsx"],"sourcesContent":["// Client. The URL is the state: a selection the user would want to share, reload or come back to (a tab, a type, a\n// filter) lives in a search parameter, never in `useState` (Oussama, 2026-10-22: « changer les tabs doit changer les routes »).\n// One primitive reads and writes it: `useRouteState`. The selection components take `routeKey` and bind to it.\nimport * as React from \"react\";\n\n/** How a router moves and reads the address: the browser's by default, your framework's through `RouteStateProvider`. */\nexport interface RouteAdapter {\n /** The current query string, with or without `?` (`\"\"` on the server). */\n search: () => string;\n /** Go to `search` (`?type=bail`, or `\"\"`), keeping the path and the hash; `replace` keeps the history as it is. */\n navigate: (search: string, options: { replace: boolean }) => void;\n /** Calls `onChange` when the address changes under you (back, forward, another navigation); returns the unsubscribe. */\n subscribe: (onChange: () => void) => () => void;\n}\n\nconst CHANGE = \"kz-route-state\";\n\n/** The History API: any web app (Vite, a static site). Next.js apps pass their router's adapter once, in the layout. */\nexport const browserAdapter: RouteAdapter = {\n search: () => (globalThis.window === undefined ? \"\" : globalThis.location.search),\n navigate: (search, { replace }) => {\n const url = `${globalThis.location.pathname}${search}${globalThis.location.hash}`;\n globalThis.history[replace ? \"replaceState\" : \"pushState\"](globalThis.history.state, \"\", url);\n globalThis.dispatchEvent(new Event(CHANGE));\n },\n subscribe: (onChange) => {\n globalThis.addEventListener(\"popstate\", onChange);\n globalThis.addEventListener(CHANGE, onChange);\n return () => {\n globalThis.removeEventListener(\"popstate\", onChange);\n globalThis.removeEventListener(CHANGE, onChange);\n };\n },\n};\n\nconst AdapterContext = React.createContext<RouteAdapter>(browserAdapter);\n\nexport interface RouteStateProviderProps {\n /** How your router reads the query string, navigates and tells about changes. */\n adapter: RouteAdapter;\n children: React.ReactNode;\n}\n\n/** Gives `useRouteState` your router: `<RouteStateProvider adapter={nextAdapter}>` once, in the root layout. */\nexport function RouteStateProvider({ adapter, children }: Readonly<RouteStateProviderProps>) {\n return <AdapterContext.Provider value={adapter}>{children}</AdapterContext.Provider>;\n}\n\nexport interface RouteStateOptions<V extends string> {\n /** The values the parameter may hold, as a const list: anything else in the address reads as the default. Omit for free text. */\n values?: readonly V[];\n /** The value when the parameter is absent. It is never written to the address (a clean URL). */\n default: V;\n /** `push` (the default) keeps each change in the history, `replace` overwrites it: use `replace` for a filter typed or toggled in passing. */\n history?: \"push\" | \"replace\";\n}\n\n/** The value a query string holds for `key`, checked against `values`. Pure: the hook and the tests share it. */\nexport function readRouteValue<V extends string>(search: string, key: string, { values, default: fallback }: Pick<RouteStateOptions<V>, \"values\" | \"default\">): V {\n const raw = new URLSearchParams(search).get(key);\n if (raw === null) return fallback;\n return !values || (values as readonly string[]).includes(raw) ? (raw as V) : fallback;\n}\n\n/** The query string with `key` set to `value` (removed when it is the default); every other parameter is kept. Pure. */\nexport function writeRouteValue(search: string, key: string, value: string, fallback: string): string {\n const params = new URLSearchParams(search);\n if (value === fallback) params.delete(key);\n else params.set(key, value);\n const text = params.toString();\n return text ? `?${text}` : \"\";\n}\n\n/**\n * A value kept in the URL's search parameter `key`: `const [type, setType] = useRouteState(\"type\", { values: TYPES, default: \"auto\" })`\n * with `const TYPES = [\"auto\", \"lease\", \"contract\", \"invoice\", \"other\"] as const`. The value is typed from the list, an\n * unknown one in the address reads as the default, the default is not written, other parameters are kept.\n * `key` undefined makes the hook inert (it returns the default) so a component can call it unconditionally.\n */\nexport function useRouteState<V extends string>(key: string | undefined, { values, default: fallback, history = \"push\" }: RouteStateOptions<V>): readonly [V, (next: V) => void] {\n const adapter = React.useContext(AdapterContext);\n const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => \"\");\n const value = key === undefined ? fallback : readRouteValue(search, key, { values, default: fallback });\n const set = React.useCallback(\n (next: V) => {\n if (key === undefined) return;\n navigateFrom(adapter, (search) => writeRouteValue(search, key, next, fallback), { replace: history === \"replace\" });\n },\n [adapter, key, fallback, history],\n );\n return [value, set] as const;\n}\n\n// What was written but not yet read back: a router may apply a navigation later (Next.js), so every writer — two tables,\n// a table and a tab — builds on the last write, not on an address that has not caught up. Cleared at the router's next\n// change (the write landing, back, forward), one subscription per adapter.\nconst pending = new WeakMap<RouteAdapter, string>();\nconst watched = new WeakSet<RouteAdapter>();\n\n/** Navigate to `update(the latest address)`: writes in the same tick, from any hook, compose instead of overwriting each other. */\nexport function navigateFrom(adapter: RouteAdapter, update: (search: string) => string, { replace }: { replace: boolean }) {\n if (!watched.has(adapter)) {\n watched.add(adapter);\n adapter.subscribe(() => pending.delete(adapter));\n }\n const next = update(pending.get(adapter) ?? adapter.search());\n pending.set(adapter, next);\n adapter.navigate(next, { replace });\n}\n\n/**\n * The query string and a way to change several parameters in one navigation (a sort and the page it resets). Writes made\n * in the same tick build on each other — across every hook of the same router — so a router that applies them later never\n * loses one.\n */\nexport function useRouteSearch(): { search: string; write: (update: (search: string) => string, options?: { replace?: boolean }) => void } {\n const adapter = React.useContext(AdapterContext);\n const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => \"\");\n const write = React.useCallback(\n (update: (search: string) => string, { replace = false }: { replace?: boolean } = {}) => navigateFrom(adapter, update, { replace }),\n [adapter],\n );\n return { search, write };\n}\n\n/** What a selection component spreads on its root: `value` and `onValueChange` bound to the URL when `routeKey` is set. */\nexport interface RouteBindable {\n value?: string | null;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n}\n\n/** The props of a selection component bound to the URL (`routeKey`), or its own, unchanged, when there is no `routeKey`. */\nexport function useRouteBinding<P extends RouteBindable>(routeKey: string | undefined, routeValues: readonly string[] | undefined, props: P): P {\n const initial = props.defaultValue ?? props.value ?? routeValues?.[0] ?? \"\";\n const [value, set] = useRouteState<string>(routeKey, { values: routeValues, default: initial });\n if (routeKey === undefined) return props;\n return {\n ...props,\n value,\n defaultValue: undefined,\n onValueChange: (next: string) => {\n set(next);\n props.onValueChange?.(next);\n },\n };\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AA0Cd;AA9BT,IAAM,SAAS;AAGR,IAAM,iBAA+B;AAAA,EAC1C,QAAQ,MAAO,WAAW,WAAW,SAAY,KAAK,WAAW,SAAS;AAAA,EAC1E,UAAU,CAAC,QAAQ,EAAE,QAAQ,MAAM;AACjC,UAAM,MAAM,GAAG,WAAW,SAAS,QAAQ,GAAG,MAAM,GAAG,WAAW,SAAS,IAAI;AAC/E,eAAW,QAAQ,UAAU,iBAAiB,WAAW,EAAE,WAAW,QAAQ,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R,YAAM,gBAAgB,IAAI;AAAA,IAC5B;AAAA,EACF;AACF;","names":["search"]}
1
+ {"version":3,"sources":["../src/router/route-state.tsx"],"sourcesContent":["// Client. The URL is the state: a selection the user would want to share, reload or come back to (a tab, a type, a\n// filter) lives in a search parameter, never in `useState` (Oussama, 2026-10-22: « changer les tabs doit changer les routes »).\n// One primitive reads and writes it: `useRouteState`. The selection components take `routeKey` and bind to it.\nimport * as React from \"react\";\n\n/** How a router moves and reads the address: the browser's by default, your framework's through `RouteStateProvider`. */\nexport interface RouteAdapter {\n /** The current query string, with or without `?` (`\"\"` on the server). */\n search: () => string;\n /** Go to `search` (`?type=bail`, or `\"\"`), keeping the path and the hash; `replace` keeps the history as it is. */\n navigate: (search: string, options: { replace: boolean }) => void;\n /** Calls `onChange` when the address changes under you (back, forward, another navigation); returns the unsubscribe. */\n subscribe: (onChange: () => void) => () => void;\n}\n\nconst CHANGE = \"kz-route-state\";\n\n/** The History API: any web app (Vite, a static site). Next.js apps pass their router's adapter once, in the layout. */\nexport const browserAdapter: RouteAdapter = {\n search: () => (globalThis.window === undefined ? \"\" : globalThis.location.search),\n navigate: (search, { replace }) => {\n const where = globalThis.location;\n // The address already shown adds no entry (a tab fires twice on one click: mousedown, then focus).\n // A null state, never the current one: Next.js keeps its own mark in the state, and an entry that carries it is taken\n // as Next's own and never synced (`useSearchParams` would keep the old value). Without a state, Next adopts the entry.\n if (search !== where.search) globalThis.history[replace ? \"replaceState\" : \"pushState\"](null, \"\", where.pathname + search + where.hash);\n // The change event always fires: it settles what `navigateFrom` kept as pending.\n globalThis.dispatchEvent(new Event(CHANGE));\n },\n subscribe: (onChange) => {\n globalThis.addEventListener(\"popstate\", onChange);\n globalThis.addEventListener(CHANGE, onChange);\n return () => {\n globalThis.removeEventListener(\"popstate\", onChange);\n globalThis.removeEventListener(CHANGE, onChange);\n };\n },\n};\n\nconst AdapterContext = React.createContext<RouteAdapter>(browserAdapter);\n\nexport interface RouteStateProviderProps {\n /** How your router reads the query string, navigates and tells about changes. */\n adapter: RouteAdapter;\n children: React.ReactNode;\n}\n\n/** Gives `useRouteState` your router: `<RouteStateProvider adapter={nextAdapter}>` once, in the root layout. */\nexport function RouteStateProvider({ adapter, children }: Readonly<RouteStateProviderProps>) {\n return <AdapterContext.Provider value={adapter}>{children}</AdapterContext.Provider>;\n}\n\nexport interface RouteStateOptions<V extends string> {\n /** The values the parameter may hold, as a const list: anything else in the address reads as the default. Omit for free text. */\n values?: readonly V[];\n /** The value when the parameter is absent. It is never written to the address (a clean URL). */\n default: V;\n /** `push` (the default) keeps each change in the history, `replace` overwrites it: use `replace` for a filter typed or toggled in passing. */\n history?: \"push\" | \"replace\";\n}\n\n/** The value a query string holds for `key`, checked against `values`. Pure: the hook and the tests share it. */\nexport function readRouteValue<V extends string>(search: string, key: string, { values, default: fallback }: Pick<RouteStateOptions<V>, \"values\" | \"default\">): V {\n const raw = new URLSearchParams(search).get(key);\n if (raw === null) return fallback;\n return !values || (values as readonly string[]).includes(raw) ? (raw as V) : fallback;\n}\n\n/** The query string with `key` set to `value` (removed when it is the default); every other parameter is kept. Pure. */\nexport function writeRouteValue(search: string, key: string, value: string, fallback: string): string {\n const params = new URLSearchParams(search);\n if (value === fallback) params.delete(key);\n else params.set(key, value);\n const text = params.toString();\n return text ? `?${text}` : \"\";\n}\n\n/**\n * A value kept in the URL's search parameter `key`: `const [type, setType] = useRouteState(\"type\", { values: TYPES, default: \"auto\" })`\n * with `const TYPES = [\"auto\", \"lease\", \"contract\", \"invoice\", \"other\"] as const`. The value is typed from the list, an\n * unknown one in the address reads as the default, the default is not written, other parameters are kept.\n * `key` undefined makes the hook inert (it returns the default) so a component can call it unconditionally.\n */\nexport function useRouteState<V extends string>(key: string | undefined, { values, default: fallback, history = \"push\" }: RouteStateOptions<V>): readonly [V, (next: V) => void] {\n const adapter = React.useContext(AdapterContext);\n const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => \"\");\n const value = key === undefined ? fallback : readRouteValue(search, key, { values, default: fallback });\n const set = React.useCallback(\n (next: V) => {\n if (key === undefined) return;\n navigateFrom(adapter, (search) => writeRouteValue(search, key, next, fallback), { replace: history === \"replace\" });\n },\n [adapter, key, fallback, history],\n );\n return [value, set] as const;\n}\n\n// What was written but not yet read back: a router may apply a navigation later (Next.js), so every writer — two tables,\n// a table and a tab — builds on the last write, not on an address that has not caught up. Cleared at the router's next\n// change (the write landing, back, forward), one subscription per adapter.\nconst pending = new WeakMap<RouteAdapter, string>();\nconst watched = new WeakSet<RouteAdapter>();\n\n/** Navigate to `update(the latest address)`: writes in the same tick, from any hook, compose instead of overwriting each other. */\nexport function navigateFrom(adapter: RouteAdapter, update: (search: string) => string, { replace }: { replace: boolean }) {\n if (!watched.has(adapter)) {\n watched.add(adapter);\n adapter.subscribe(() => pending.delete(adapter));\n }\n const next = update(pending.get(adapter) ?? adapter.search());\n pending.set(adapter, next);\n adapter.navigate(next, { replace });\n}\n\n/**\n * The query string and a way to change several parameters in one navigation (a sort and the page it resets). Writes made\n * in the same tick build on each other — across every hook of the same router — so a router that applies them later never\n * loses one.\n */\nexport function useRouteSearch(): { search: string; write: (update: (search: string) => string, options?: { replace?: boolean }) => void } {\n const adapter = React.useContext(AdapterContext);\n const search = React.useSyncExternalStore(adapter.subscribe, adapter.search, () => \"\");\n const write = React.useCallback(\n (update: (search: string) => string, { replace = false }: { replace?: boolean } = {}) => navigateFrom(adapter, update, { replace }),\n [adapter],\n );\n return { search, write };\n}\n\n/** What a selection component spreads on its root: `value` and `onValueChange` bound to the URL when `routeKey` is set. */\nexport interface RouteBindable {\n value?: string | null;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n}\n\n/** The props of a selection component bound to the URL (`routeKey`), or its own, unchanged, when there is no `routeKey`. */\nexport function useRouteBinding<P extends RouteBindable>(routeKey: string | undefined, routeValues: readonly string[] | undefined, props: P): P {\n const initial = props.defaultValue ?? props.value ?? routeValues?.[0] ?? \"\";\n const [value, set] = useRouteState<string>(routeKey, { values: routeValues, default: initial });\n if (routeKey === undefined) return props;\n return {\n ...props,\n value,\n defaultValue: undefined,\n onValueChange: (next: string) => {\n set(next);\n props.onValueChange?.(next);\n },\n };\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AA8Cd;AAlCT,IAAM,SAAS;AAGR,IAAM,iBAA+B;AAAA,EAC1C,QAAQ,MAAO,WAAW,WAAW,SAAY,KAAK,WAAW,SAAS;AAAA,EAC1E,UAAU,CAAC,QAAQ,EAAE,QAAQ,MAAM;AACjC,UAAM,QAAQ,WAAW;AAIzB,QAAI,WAAW,MAAM,OAAQ,YAAW,QAAQ,UAAU,iBAAiB,WAAW,EAAE,MAAM,IAAI,MAAM,WAAW,SAAS,MAAM,IAAI;AAEtI,eAAW,cAAc,IAAI,MAAM,MAAM,CAAC;AAAA,EAC5C;AAAA,EACA,WAAW,CAAC,aAAa;AACvB,eAAW,iBAAiB,YAAY,QAAQ;AAChD,eAAW,iBAAiB,QAAQ,QAAQ;AAC5C,WAAO,MAAM;AACX,iBAAW,oBAAoB,YAAY,QAAQ;AACnD,iBAAW,oBAAoB,QAAQ,QAAQ;AAAA,IACjD;AAAA,EACF;AACF;AAEA,IAAM,iBAAuB,oBAA4B,cAAc;AAShE,SAAS,mBAAmB,EAAE,SAAS,SAAS,GAAsC;AAC3F,SAAO,oBAAC,eAAe,UAAf,EAAwB,OAAO,SAAU,UAAS;AAC5D;AAYO,SAAS,eAAiC,QAAgB,KAAa,EAAE,QAAQ,SAAS,SAAS,GAAwD;AAChK,QAAM,MAAM,IAAI,gBAAgB,MAAM,EAAE,IAAI,GAAG;AAC/C,MAAI,QAAQ,KAAM,QAAO;AACzB,SAAO,CAAC,UAAW,OAA6B,SAAS,GAAG,IAAK,MAAY;AAC/E;AAGO,SAAS,gBAAgB,QAAgB,KAAa,OAAe,UAA0B;AACpG,QAAM,SAAS,IAAI,gBAAgB,MAAM;AACzC,MAAI,UAAU,SAAU,QAAO,OAAO,GAAG;AAAA,MACpC,QAAO,IAAI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,QAAQ,EAAE,QAAQ,CAAC;AAAA,IAClI,CAAC,OAAO;AAAA,EACV;AACA,SAAO,EAAE,QAAQ,MAAM;AACzB;AAUO,SAAS,gBAAyC,UAA8B,aAA4C,OAAa;AAC9I,QAAM,UAAU,MAAM,gBAAgB,MAAM,SAAS,cAAc,CAAC,KAAK;AACzE,QAAM,CAAC,OAAO,GAAG,IAAI,cAAsB,UAAU,EAAE,QAAQ,aAAa,SAAS,QAAQ,CAAC;AAC9F,MAAI,aAAa,OAAW,QAAO;AACnC,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA,cAAc;AAAA,IACd,eAAe,CAAC,SAAiB;AAC/B,UAAI,IAAI;AACR,YAAM,gBAAgB,IAAI;AAAA,IAC5B;AAAA,EACF;AACF;","names":["search"]}
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-HLEBSAGC.js";
11
11
  import {
12
12
  Switch
13
- } from "./chunk-CZHPWLNW.js";
13
+ } from "./chunk-WKQ5CB3I.js";
14
14
  import {
15
15
  Button
16
16
  } from "./chunk-V7W4RLRW.js";
@@ -189,6 +189,8 @@ type SiteFooterProps = Omit<React.ComponentProps<"footer">, "children"> & {
189
189
  * @default current === "krizaka" (and never in `variant="app"`)
190
190
  */
191
191
  family?: boolean;
192
+ /** Only these groups of the family, in reading order (`footerFor(id).groups` of `@krizaka/org`). Omit it to draw them all. */
193
+ groups?: readonly SiteGroup[];
192
194
  /** Only these products in the Products group (the current site always kept). Omit it to list every product. */
193
195
  products?: readonly SiteId[];
194
196
  /**
@@ -519,6 +519,7 @@ function SiteFooter({
519
519
  org,
520
520
  family: familyProp,
521
521
  products,
522
+ groups: only,
522
523
  variant = "site",
523
524
  tone = "product",
524
525
  config,
@@ -552,7 +553,7 @@ function SiteFooter({
552
553
  family && /* @__PURE__ */ jsx9("nav", { "aria-label": labels.family, className: s.family(), children: [
553
554
  ...columns.map((c) => ({ key: c.group, title: labels.groups[c.group], entries: c.entries, ...columnStatus(c.entries) })),
554
555
  { key: "krizaka", title: labels.groups.krizaka, entries: companyEntries, ...NO_STATUS }
555
- ].filter((c) => c.entries.length > 0).map((c) => /* @__PURE__ */ jsxs7("details", { className: s.group(), children: [
556
+ ].filter((c) => c.entries.length > 0 && (!only || only.includes(c.key) || c.key === "open-source" && only.includes("github"))).map((c) => /* @__PURE__ */ jsxs7("details", { className: s.group(), children: [
556
557
  /* @__PURE__ */ jsxs7("summary", { className: s.summary(), children: [
557
558
  /* @__PURE__ */ jsxs7("span", { children: [
558
559
  /* @__PURE__ */ jsx9("span", { id: `${id}-${c.key}`, children: c.title }),