@thewhatmatters/wmds 0.4.0 → 0.4.2

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 (250) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/CONSUMING.md +9 -4
  3. package/dist/collapse.css +9 -1
  4. package/dist/colors.css +7 -0
  5. package/dist/components/atoms/Badge/Badge.d.ts +16 -4
  6. package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
  7. package/dist/components/atoms/Badge/Badge.js +54 -42
  8. package/dist/components/atoms/Badge/badgeStyles.d.ts +12 -2
  9. package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
  10. package/dist/components/atoms/Badge/badgeStyles.js +24 -13
  11. package/dist/components/atoms/Button/Button.d.ts +11 -3
  12. package/dist/components/atoms/Button/Button.d.ts.map +1 -1
  13. package/dist/components/atoms/Button/Button.js +118 -98
  14. package/dist/components/atoms/Button/ButtonStatusButton.d.ts +3 -1
  15. package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
  16. package/dist/components/atoms/Button/ButtonStatusButton.js +19 -18
  17. package/dist/components/atoms/Button/ButtonStatusContent.d.ts +7 -1
  18. package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -1
  19. package/dist/components/atoms/Button/ButtonStatusContent.js +9 -6
  20. package/dist/components/atoms/Button/buttonStatusStyles.d.ts +5 -0
  21. package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -1
  22. package/dist/components/atoms/Button/buttonStatusStyles.js +10 -10
  23. package/dist/components/atoms/Button/buttonStyles.d.ts +2 -0
  24. package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
  25. package/dist/components/atoms/Button/buttonStyles.js +12 -12
  26. package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -0
  27. package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
  28. package/dist/components/atoms/Checkbox/Checkbox.js +86 -69
  29. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +6 -0
  30. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
  31. package/dist/components/atoms/Checkbox/checkboxStyles.js +11 -11
  32. package/dist/components/atoms/IconButton/IconButton.d.ts +5 -0
  33. package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
  34. package/dist/components/atoms/IconButton/IconButton.js +73 -68
  35. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +5 -0
  36. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
  37. package/dist/components/atoms/IconButton/iconButtonStyles.js +4 -4
  38. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts +13 -4
  39. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts.map +1 -1
  40. package/dist/components/atoms/Kbd/useKbdChoiceKeys.js +32 -13
  41. package/dist/components/atoms/Prose/Prose.d.ts +23 -0
  42. package/dist/components/atoms/Prose/Prose.d.ts.map +1 -0
  43. package/dist/components/atoms/Prose/Prose.js +15 -0
  44. package/dist/components/atoms/Prose/proseStyles.d.ts +17 -0
  45. package/dist/components/atoms/Prose/proseStyles.d.ts.map +1 -0
  46. package/dist/components/atoms/Prose/proseStyles.js +16 -0
  47. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts +26 -0
  48. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts.map +1 -0
  49. package/dist/components/atoms/SectionCaption/SectionCaption.js +25 -0
  50. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts +11 -0
  51. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts.map +1 -0
  52. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.js +12 -0
  53. package/dist/components/atoms/TextLink/TextLink.d.ts +10 -2
  54. package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
  55. package/dist/components/atoms/TextLink/TextLink.js +15 -15
  56. package/dist/components/atoms/TextLink/textLinkStyles.d.ts +13 -0
  57. package/dist/components/atoms/TextLink/textLinkStyles.d.ts.map +1 -1
  58. package/dist/components/atoms/TextLink/textLinkStyles.js +7 -3
  59. package/dist/components/molecules/Accordion/Accordion.d.ts +6 -1
  60. package/dist/components/molecules/Accordion/Accordion.d.ts.map +1 -1
  61. package/dist/components/molecules/Accordion/Accordion.js +57 -50
  62. package/dist/components/molecules/Accordion/accordionStyles.d.ts +9 -0
  63. package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
  64. package/dist/components/molecules/Accordion/accordionStyles.js +2 -2
  65. package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts +59 -0
  66. package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  67. package/dist/components/molecules/Breadcrumb/Breadcrumb.js +188 -0
  68. package/dist/components/molecules/Breadcrumb/breadcrumbStyles.d.ts +21 -0
  69. package/dist/components/molecules/Breadcrumb/breadcrumbStyles.d.ts.map +1 -0
  70. package/dist/components/molecules/Breadcrumb/breadcrumbStyles.js +11 -0
  71. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts +5 -1
  72. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts.map +1 -1
  73. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.js +12 -10
  74. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts +37 -0
  75. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts.map +1 -0
  76. package/dist/components/molecules/DescriptionList/DescriptionList.js +50 -0
  77. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts +21 -0
  78. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts.map +1 -0
  79. package/dist/components/molecules/DescriptionList/descriptionListStyles.js +27 -0
  80. package/dist/components/molecules/Dropdown/DropdownItem.d.ts +7 -2
  81. package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
  82. package/dist/components/molecules/Dropdown/DropdownItem.js +40 -24
  83. package/dist/components/molecules/IndexList/IndexList.d.ts +58 -0
  84. package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -0
  85. package/dist/components/molecules/IndexList/IndexList.js +96 -0
  86. package/dist/components/molecules/IndexList/indexListStyles.d.ts +29 -0
  87. package/dist/components/molecules/IndexList/indexListStyles.d.ts.map +1 -0
  88. package/dist/components/molecules/IndexList/indexListStyles.js +24 -0
  89. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +3 -2
  90. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
  91. package/dist/components/molecules/PromptBar/promptBarStyles.js +1 -1
  92. package/dist/components/organisms/ChatDock/ChatDock.d.ts +120 -10
  93. package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
  94. package/dist/components/organisms/ChatDock/ChatDock.js +654 -212
  95. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +52 -0
  96. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -0
  97. package/dist/components/organisms/ChatDock/ChatDockGate.js +161 -0
  98. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +16 -0
  99. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -0
  100. package/dist/components/organisms/ChatDock/chatDockGateStyles.js +8 -0
  101. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +60 -10
  102. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
  103. package/dist/components/organisms/ChatDock/chatDockStyles.js +15 -9
  104. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts +21 -0
  105. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts.map +1 -0
  106. package/dist/components/organisms/ChatDock/chatDockViewport.js +46 -0
  107. package/dist/components/organisms/SiteNav/SiteNav.js +86 -86
  108. package/dist/components/organisms/Toast/Toast.js +5 -5
  109. package/dist/index.d.ts +8 -3
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +124 -112
  112. package/dist/lib/compositionAudit.d.ts.map +1 -1
  113. package/dist/lib/typography.d.ts +2 -2
  114. package/dist/lib/typography.d.ts.map +1 -1
  115. package/dist/lib/typography.js +27 -1
  116. package/dist/styles.css +1 -1
  117. package/dist/theme.css +1 -0
  118. package/dist/typography.css +34 -0
  119. package/docs/README.md +1 -1
  120. package/docs/component-contracts.md +15 -0
  121. package/docs/components.md +17 -12
  122. package/docs/exports.json +85 -4
  123. package/docs/patterns/components-accordion--flush.tsx +29 -0
  124. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  125. package/docs/patterns/components-badge--outline-tags.tsx +25 -0
  126. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  127. package/docs/patterns/components-breadcrumb--editorial.tsx +9 -0
  128. package/docs/patterns/components-breadcrumb--long-path.tsx +9 -0
  129. package/docs/patterns/components-breadcrumb--path.tsx +9 -0
  130. package/docs/patterns/components-breadcrumb--router-links.tsx +10 -0
  131. package/docs/patterns/components-button-button--copy-button.tsx +39 -0
  132. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  133. package/docs/patterns/components-button-button--external-link.tsx +30 -0
  134. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  135. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  136. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  137. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  138. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  139. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  140. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  141. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  142. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  143. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  144. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  145. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  146. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  147. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  148. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  149. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  150. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  151. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  152. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  153. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  154. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  155. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  156. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  157. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  158. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  159. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  160. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +101 -11
  161. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +180 -0
  162. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  163. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  164. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +19 -0
  165. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  166. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  167. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +17 -0
  168. package/docs/patterns/components-descriptionlist--details.tsx +21 -0
  169. package/docs/patterns/components-descriptionlist--post-metadata.tsx +52 -0
  170. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  171. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  172. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  173. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  174. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  175. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  176. package/docs/patterns/components-field--multi-control.tsx +1 -1
  177. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  178. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  179. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  180. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  181. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  182. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  183. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  184. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  185. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  186. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  187. package/docs/patterns/components-indexlist--post-index.tsx +36 -0
  188. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  189. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  190. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  191. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  192. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  193. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  194. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  195. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  196. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  197. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  198. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  199. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  200. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  201. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  202. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  203. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  204. package/docs/patterns/components-prose--article-body.tsx +11 -0
  205. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  206. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  207. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  208. package/docs/patterns/components-sectioncaption--column-caption.tsx +16 -0
  209. package/docs/patterns/components-sectioncaption--with-action.tsx +19 -0
  210. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  211. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  212. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  213. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  214. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  215. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  216. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  217. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  218. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  219. package/docs/patterns/components-switch--default.tsx +1 -1
  220. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  221. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  222. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  223. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  224. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  225. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  226. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  227. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  228. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  229. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  230. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  231. package/docs/patterns/components-textlink--quiet-title.tsx +15 -0
  232. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  233. package/docs/patterns/components-textsequence--default.tsx +1 -1
  234. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  235. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  236. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  237. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  238. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  239. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  240. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  241. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  242. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  243. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  244. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  245. package/docs/patterns/guides-filter-panel--filtered-index.tsx +174 -0
  246. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  247. package/docs/patterns/guides-post-page--post-page.tsx +148 -0
  248. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  249. package/docs/patterns/index.json +161 -1
  250. package/package.json +1 -1
@@ -0,0 +1,188 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { ButtonIcon as t } from "../../atoms/Button/ButtonIcon.js";
4
+ import { IconButton as n } from "../../atoms/IconButton/IconButton.js";
5
+ import { Dropdown as r } from "../Dropdown/Dropdown.js";
6
+ import { measureDropdownMenuStyle as i } from "../Dropdown/dropdownMenuPosition.js";
7
+ import { breadcrumbItemClasses as a, breadcrumbLinkClasses as o, breadcrumbListClasses as s, breadcrumbMoreClasses as c, breadcrumbPageClasses as l, breadcrumbSeparatorClasses as u, breadcrumbSeparators as d, breadcrumbSlashClasses as f, breadcrumbTextClasses as p, breadcrumbVariantClasses as m, breadcrumbVariants as h } from "./breadcrumbStyles.js";
8
+ import { Fragment as g, useCallback as _, useEffect as v, useId as y, useLayoutEffect as b, useRef as x, useState as S } from "react";
9
+ import { ChevronRight as C, Ellipsis as w } from "lucide-react";
10
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
11
+ import { useRender as D } from "@base-ui/react/use-render";
12
+ //#region src/components/molecules/Breadcrumb/Breadcrumb.tsx
13
+ var O = {
14
+ nav: "Breadcrumb",
15
+ more: (e) => `Show ${e} more ${e === 1 ? "page" : "pages"}`
16
+ };
17
+ function k(e, t = 4) {
18
+ let n = Math.max(3, Math.floor(t)), r = e.length - 1, i = (e, t) => ({
19
+ kind: "item",
20
+ item: e,
21
+ current: t === r
22
+ });
23
+ if (e.length <= n) return e.map(i);
24
+ let a = n - 2;
25
+ return [
26
+ i(e[0], 0),
27
+ {
28
+ kind: "more",
29
+ items: e.slice(1, e.length - a)
30
+ },
31
+ ...e.slice(e.length - a).map((t, n) => i(t, e.length - a + n))
32
+ ];
33
+ }
34
+ function A(e) {
35
+ return e.id ?? e.href ?? e.label;
36
+ }
37
+ function j(e) {
38
+ return /* @__PURE__ */ T("a", { href: e.href });
39
+ }
40
+ function M(e) {
41
+ return e.href != null;
42
+ }
43
+ function N({ item: e, renderLink: t }) {
44
+ return D({
45
+ render: t(e),
46
+ props: {
47
+ className: o,
48
+ title: e.label,
49
+ children: e.label
50
+ }
51
+ });
52
+ }
53
+ function P({ separator: e }) {
54
+ return /* @__PURE__ */ T("li", {
55
+ role: "presentation",
56
+ "aria-hidden": "true",
57
+ className: u,
58
+ children: e === "slash" ? /* @__PURE__ */ T("span", {
59
+ className: f,
60
+ children: "/"
61
+ }) : /* @__PURE__ */ T(t, {
62
+ size: "xs",
63
+ children: /* @__PURE__ */ T(C, {})
64
+ })
65
+ });
66
+ }
67
+ function F({ items: e, label: t, renderLink: a }) {
68
+ let o = y(), s = x(null), l = x(null), u = x(null), [d, f] = S(!1), [p, m] = S(null), h = x(!1), g = _(() => {
69
+ let t = l.current;
70
+ t != null && m(i(t, e.map((e) => ({ label: e.label })), {
71
+ align: "start",
72
+ widthMode: "content"
73
+ }));
74
+ }, [e]), C = _((e) => {
75
+ f(!1), m(null), e && l.current?.querySelector("button")?.focus();
76
+ }, []);
77
+ b(() => {
78
+ if (d) return g(), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0), () => {
79
+ window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
80
+ };
81
+ }, [d, g]), v(() => {
82
+ !d || p == null || !h.current || (h.current = !1, u.current?.querySelector("a, [href], button")?.focus());
83
+ }, [d, p]), v(() => {
84
+ if (!d) return;
85
+ function e(e) {
86
+ s.current != null && !s.current.contains(e.target) && C(!1);
87
+ }
88
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
89
+ }, [d, C]);
90
+ function D() {
91
+ return [...u.current?.querySelectorAll("a, [href], button") ?? []];
92
+ }
93
+ function O(e) {
94
+ if (!d) {
95
+ e.key === "ArrowDown" && (e.preventDefault(), h.current = !0, f(!0));
96
+ return;
97
+ }
98
+ if (e.key === "Escape") {
99
+ e.preventDefault(), C(!0);
100
+ return;
101
+ }
102
+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
103
+ let t = D();
104
+ if (t.length === 0) return;
105
+ e.preventDefault();
106
+ let n = t.indexOf(document.activeElement), r = e.key === "ArrowDown" ? 1 : -1;
107
+ t[n === -1 ? r === 1 ? 0 : t.length - 1 : (n + r + t.length) % t.length]?.focus();
108
+ }
109
+ function k(e) {
110
+ if (!d) return;
111
+ let t = e.relatedTarget;
112
+ (t == null || !s.current?.contains(t)) && C(!1);
113
+ }
114
+ return /* @__PURE__ */ E("div", {
115
+ ref: s,
116
+ className: c,
117
+ onKeyDown: O,
118
+ onBlur: k,
119
+ children: [/* @__PURE__ */ T("div", {
120
+ ref: l,
121
+ className: "inline-flex",
122
+ children: /* @__PURE__ */ T(n, {
123
+ size: "sm",
124
+ icon: /* @__PURE__ */ T(w, {}),
125
+ "aria-label": t,
126
+ title: "",
127
+ "aria-expanded": d,
128
+ "aria-controls": d ? o : void 0,
129
+ onClick: () => {
130
+ d ? C(!1) : (h.current = !0, f(!0));
131
+ }
132
+ })
133
+ }), d && p != null ? /* @__PURE__ */ T("div", {
134
+ ref: u,
135
+ children: /* @__PURE__ */ T(r.Menu, {
136
+ id: o,
137
+ "aria-label": t,
138
+ style: p,
139
+ children: e.map((e) => /* @__PURE__ */ T("li", { children: M(e) ? /* @__PURE__ */ T(r.Item, {
140
+ truncate: !1,
141
+ render: a(e),
142
+ onClick: () => C(!1),
143
+ children: e.label
144
+ }) : /* @__PURE__ */ T(r.Item, {
145
+ truncate: !1,
146
+ disabled: !0,
147
+ children: e.label
148
+ }) }, A(e)))
149
+ })
150
+ }) : null]
151
+ });
152
+ }
153
+ function I({ items: t, maxItems: n = 4, separator: r = "chevron", variant: i = "sans", renderLink: o = j, labels: c, className: u }) {
154
+ let d = {
155
+ ...O,
156
+ ...c
157
+ }, f = k(t, n);
158
+ return /* @__PURE__ */ T("nav", {
159
+ "aria-label": d.nav,
160
+ className: u,
161
+ "data-variant": i,
162
+ children: /* @__PURE__ */ T("ol", {
163
+ className: e(s, m[i]),
164
+ children: f.map((e, t) => /* @__PURE__ */ E(g, { children: [t > 0 ? /* @__PURE__ */ T(P, { separator: r }) : null, /* @__PURE__ */ T("li", {
165
+ className: a,
166
+ children: e.kind === "more" ? /* @__PURE__ */ T(F, {
167
+ items: e.items,
168
+ label: d.more(e.items.length),
169
+ renderLink: o
170
+ }) : e.current ? /* @__PURE__ */ T("span", {
171
+ className: l,
172
+ "aria-current": "page",
173
+ title: e.item.label,
174
+ children: e.item.label
175
+ }) : M(e.item) ? /* @__PURE__ */ T(N, {
176
+ item: e.item,
177
+ renderLink: o
178
+ }) : /* @__PURE__ */ T("span", {
179
+ className: p,
180
+ title: e.item.label,
181
+ children: e.item.label
182
+ })
183
+ })] }, e.kind === "more" ? "more" : A(e.item)))
184
+ })
185
+ });
186
+ }
187
+ //#endregion
188
+ export { I as Breadcrumb, O as breadcrumbDefaultLabels, d as breadcrumbSeparators, k as breadcrumbSlots, h as breadcrumbVariants };
@@ -0,0 +1,21 @@
1
+ export declare const breadcrumbSeparators: readonly ["chevron", "slash"];
2
+ /** Between crumbs: a chevron (default) or a slash. */
3
+ export type BreadcrumbSeparator = (typeof breadcrumbSeparators)[number];
4
+ export declare const breadcrumbVariants: readonly ["sans", "mono"];
5
+ /** `sans` (default) — body type. `mono` — `type-eyebrow` caps, for editorial pages beside **SectionCaption**. */
6
+ export type BreadcrumbVariant = (typeof breadcrumbVariants)[number];
7
+ export declare const breadcrumbListClasses = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0 sm:gap-x-2";
8
+ export declare const breadcrumbVariantClasses: Record<BreadcrumbVariant, string>;
9
+ export declare const breadcrumbItemClasses = "inline-flex min-w-0 items-center";
10
+ /** A link crumb — muted, darkening with an underline on hover, the focus ring. */
11
+ export declare const breadcrumbLinkClasses: string;
12
+ /** The current page — the last crumb, not a link. */
13
+ export declare const breadcrumbPageClasses: string;
14
+ /** A crumb with no link that is not the current page. */
15
+ export declare const breadcrumbTextClasses: string;
16
+ export declare const breadcrumbSeparatorClasses = "inline-flex shrink-0 items-center text-muted";
17
+ /** The slash separator — a character in the crumbs' own type. */
18
+ export declare const breadcrumbSlashClasses = "select-none";
19
+ /** Holds the 36px "…" control in the text line without growing the row. */
20
+ export declare const breadcrumbMoreClasses = "relative -mx-2.5 -my-2 inline-flex";
21
+ //# sourceMappingURL=breadcrumbStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Breadcrumb/breadcrumbStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,+BAAgC,CAAC;AAElE,sDAAsD;AACtD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,kBAAkB,2BAA4B,CAAC;AAE5D,iHAAiH;AACjH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,qBAAqB,uFAAuF,CAAC;AAE1H,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAGtE,CAAC;AAEF,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AAKxE,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,QAOjC,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,qBAAqB,QAAwC,CAAC;AAE3E,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,QAA2C,CAAC;AAE9E,eAAO,MAAM,0BAA0B,iDAAiD,CAAC;AAEzF,iEAAiE;AACjE,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,uCAAuC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { typographyClass as t } from "../../../lib/typography.js";
4
+ import { motionTransition as n } from "../../../lib/motion.js";
5
+ //#region src/components/molecules/Breadcrumb/breadcrumbStyles.ts
6
+ var r = ["chevron", "slash"], i = ["sans", "mono"], a = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0 sm:gap-x-2", o = {
7
+ sans: e(t("body"), "text-muted"),
8
+ mono: t("eyebrow")
9
+ }, s = "inline-flex min-w-0 items-center", c = "block max-w-[10rem] truncate sm:max-w-[16rem] lg:max-w-[24rem]", l = e(c, "rounded-sm text-muted underline decoration-transparent decoration-solid underline-offset-4", "transition-[color,text-decoration-color]", n("fast"), "hover:text-fg hover:decoration-current", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body"), u = e(c, "text-fg"), d = e(c, "text-muted"), f = "inline-flex shrink-0 items-center text-muted", p = "select-none", m = "relative -mx-2.5 -my-2 inline-flex";
10
+ //#endregion
11
+ export { s as breadcrumbItemClasses, l as breadcrumbLinkClasses, a as breadcrumbListClasses, m as breadcrumbMoreClasses, u as breadcrumbPageClasses, f as breadcrumbSeparatorClasses, r as breadcrumbSeparators, p as breadcrumbSlashClasses, d as breadcrumbTextClasses, o as breadcrumbVariantClasses, i as breadcrumbVariants };
@@ -4,9 +4,13 @@ export interface CheckboxGroupItemProps {
4
4
  value: string;
5
5
  label: string;
6
6
  description?: string;
7
+ /** Trailing count — how many results the option matches. See **Checkbox** `count`. */
8
+ count?: number;
9
+ /** What screen readers hear for `count`, for example "2 posts". Default: the number. */
10
+ countLabel?: string;
7
11
  disabled?: boolean;
8
12
  className?: CheckboxLayoutClassName;
9
13
  }
10
14
  /** One option inside **CheckboxGroup** — wires `checked` when group `values` / `onValuesChange` are set. */
11
- export declare function CheckboxGroupItem({ value, label, description, disabled, className, }: CheckboxGroupItemProps): import("react").JSX.Element;
15
+ export declare function CheckboxGroupItem({ value, label, description, count, countLabel, disabled, className, }: CheckboxGroupItemProps): import("react").JSX.Element;
12
16
  //# sourceMappingURL=CheckboxGroupItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroupItem.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroupItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGvF,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,+BAoCxB"}
1
+ {"version":3,"file":"CheckboxGroupItem.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroupItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGvF,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,+BAsCxB"}
@@ -4,19 +4,21 @@ import { useCheckboxGroupContext as t } from "./CheckboxGroupContext.js";
4
4
  import "react";
5
5
  import { jsx as n } from "react/jsx-runtime";
6
6
  //#region src/components/molecules/CheckboxGroup/CheckboxGroupItem.tsx
7
- function r({ value: r, label: i, description: a, disabled: o, className: s }) {
8
- let c = t(), l = c?.disabled ?? !1, u = c?.size ?? "md", d = c?.values, f = c?.onValuesChange, p = d != null && f != null, m = p ? d.includes(r) : void 0, h = p ? (e) => {
9
- let t = e.target.checked ? [...d, r] : d.filter((e) => e !== r);
10
- f(t);
7
+ function r({ value: r, label: i, description: a, count: o, countLabel: s, disabled: c, className: l }) {
8
+ let u = t(), d = u?.disabled ?? !1, f = u?.size ?? "md", p = u?.values, m = u?.onValuesChange, h = p != null && m != null, g = h ? p.includes(r) : void 0, _ = h ? (e) => {
9
+ let t = e.target.checked ? [...p, r] : p.filter((e) => e !== r);
10
+ m(t);
11
11
  } : void 0;
12
- return p || console.warn("[WMDS CheckboxGroup] Item requires group `values` and `onValuesChange`, or use bare **Checkbox** children."), /* @__PURE__ */ n(e, {
12
+ return h || console.warn("[WMDS CheckboxGroup] Item requires group `values` and `onValuesChange`, or use bare **Checkbox** children."), /* @__PURE__ */ n(e, {
13
13
  label: i,
14
14
  description: a,
15
- size: u,
16
- checked: m,
17
- disabled: l || o,
18
- onChange: h,
19
- className: s
15
+ count: o,
16
+ countLabel: s,
17
+ size: f,
18
+ checked: g,
19
+ disabled: d || c,
20
+ onChange: _,
21
+ className: l
20
22
  });
21
23
  }
22
24
  //#endregion
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from "react";
2
+ import { type DescriptionListLayout, type DescriptionListRule, type DescriptionListVariant } from "./descriptionListStyles";
3
+ export { descriptionListLayouts, descriptionListRules, descriptionListVariants, type DescriptionListLayout, type DescriptionListRule, type DescriptionListVariant, } from "./descriptionListStyles";
4
+ /** Layout-only — width, margin, or grid placement. */
5
+ export type DescriptionListLayoutClassName = string;
6
+ export interface DescriptionListProps {
7
+ /** Rows' default layout: `inline` (value beside the name, default) or `stacked` (value under it). */
8
+ layout?: DescriptionListLayout;
9
+ /** The hairline between rows: `solid` (default), `dotted`, or `none`. */
10
+ rule?: DescriptionListRule;
11
+ /** `sans` (default) — caption name, body value. `mono` — eyebrow name, mono caps value (metadata). */
12
+ variant?: DescriptionListVariant;
13
+ /** **DescriptionList.Item** rows. */
14
+ children: ReactNode;
15
+ "aria-label"?: string;
16
+ "aria-labelledby"?: string;
17
+ className?: DescriptionListLayoutClassName;
18
+ }
19
+ export interface DescriptionListItemProps {
20
+ /** The name — rendered as `dt`. */
21
+ name: ReactNode;
22
+ /** The value — text, one or more **Badge**, or a row of **Button** — rendered as `dd`. */
23
+ children: ReactNode;
24
+ /** Overrides the list's `layout` for this row — for example `stacked` for a row of actions. */
25
+ layout?: DescriptionListLayout;
26
+ className?: DescriptionListLayoutClassName;
27
+ }
28
+ /**
29
+ * A list of facts — each row a name and a value, with a rule between rows. Renders `dl`, `dt`, and
30
+ * `dd`. Values take text, **Badge** tags, or **Button** actions.
31
+ */
32
+ declare function DescriptionListRoot({ layout, rule, variant, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, }: DescriptionListProps): import("react").JSX.Element;
33
+ declare function DescriptionListItem({ name, children, layout: layoutProp, className }: DescriptionListItemProps): import("react").JSX.Element;
34
+ export declare const DescriptionList: typeof DescriptionListRoot & {
35
+ Item: typeof DescriptionListItem;
36
+ };
37
+ //# sourceMappingURL=DescriptionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DescriptionList/DescriptionList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAOL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,yBAAyB,CAAC;AAEjC,sDAAsD;AACtD,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,qGAAqG;IACrG,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,yEAAyE;IACzE,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,sGAAsG;IACtG,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,qCAAqC;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,mCAAmC;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,0FAA0F;IAC1F,QAAQ,EAAE,SAAS,CAAC;IACpB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAcD;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,MAAiB,EACjB,IAAc,EACd,OAAgB,EAChB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,GACV,EAAE,oBAAoB,+BAgBtB;AAED,iBAAS,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,wBAAwB,+BAevG;AAED,eAAO,MAAM,eAAe;;CAE1B,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { descriptionListLayouts as t, descriptionListNameClasses as n, descriptionListRootClasses as r, descriptionListRowLayoutClasses as i, descriptionListRuleClasses as a, descriptionListRules as o, descriptionListValueClasses as s, descriptionListValueFlowClasses as c, descriptionListVariants as l } from "./descriptionListStyles.js";
4
+ import { createContext as u, useContext as d, useMemo as f } from "react";
5
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ //#region src/components/molecules/DescriptionList/DescriptionList.tsx
7
+ var h = u({
8
+ layout: "inline",
9
+ rule: "solid",
10
+ variant: "sans"
11
+ });
12
+ function g({ layout: t = "inline", rule: n = "solid", variant: i = "sans", children: a, "aria-label": o, "aria-labelledby": s, className: c }) {
13
+ let l = f(() => ({
14
+ layout: t,
15
+ rule: n,
16
+ variant: i
17
+ }), [
18
+ t,
19
+ n,
20
+ i
21
+ ]);
22
+ return /* @__PURE__ */ p(h.Provider, {
23
+ value: l,
24
+ children: /* @__PURE__ */ p("dl", {
25
+ className: e(r, c),
26
+ "aria-label": o,
27
+ "aria-labelledby": s,
28
+ "data-rule": n,
29
+ "data-variant": i,
30
+ children: a
31
+ })
32
+ });
33
+ }
34
+ function _({ name: t, children: r, layout: o, className: l }) {
35
+ let u = d(h), f = o ?? u.layout;
36
+ return /* @__PURE__ */ m("div", {
37
+ className: e(i[f], a[u.rule], l),
38
+ "data-layout": f,
39
+ children: [/* @__PURE__ */ p("dt", {
40
+ className: n[u.variant],
41
+ children: t
42
+ }), /* @__PURE__ */ p("dd", {
43
+ className: e(s[u.variant], c[f]),
44
+ children: r
45
+ })]
46
+ });
47
+ }
48
+ var v = Object.assign(g, { Item: _ });
49
+ //#endregion
50
+ export { v as DescriptionList, t as descriptionListLayouts, o as descriptionListRules, l as descriptionListVariants };
@@ -0,0 +1,21 @@
1
+ export declare const descriptionListLayouts: readonly ["inline", "stacked"];
2
+ /** `inline` — the value beside the name. `stacked` — the value under the name (tags, actions). */
3
+ export type DescriptionListLayout = (typeof descriptionListLayouts)[number];
4
+ export declare const descriptionListRules: readonly ["solid", "dotted", "none"];
5
+ /** The hairline between rows — `solid` (default) or the quieter `dotted`; `none` for no rule. */
6
+ export type DescriptionListRule = (typeof descriptionListRules)[number];
7
+ export declare const descriptionListVariants: readonly ["sans", "mono"];
8
+ /**
9
+ * `sans` (default) — the name in caption type, the value in body type. `mono` — editorial metadata:
10
+ * the name as an eyebrow and the value in mono caps with tabular figures.
11
+ */
12
+ export type DescriptionListVariant = (typeof descriptionListVariants)[number];
13
+ export declare const descriptionListRootClasses = "m-0 flex w-full min-w-0 flex-col";
14
+ /** The rule under each row; the last row keeps it, closing the list. */
15
+ export declare const descriptionListRuleClasses: Record<DescriptionListRule, string>;
16
+ export declare const descriptionListRowLayoutClasses: Record<DescriptionListLayout, string>;
17
+ export declare const descriptionListNameClasses: Record<DescriptionListVariant, string>;
18
+ export declare const descriptionListValueClasses: Record<DescriptionListVariant, string>;
19
+ /** Several values — tags, actions — wrap in a row with a gap. */
20
+ export declare const descriptionListValueFlowClasses: Record<DescriptionListLayout, string>;
21
+ //# sourceMappingURL=descriptionListStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptionListStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DescriptionList/descriptionListStyles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,gCAAiC,CAAC;AAErE,kGAAkG;AAClG,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,oBAAoB,sCAAuC,CAAC;AAEzE,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB,2BAA4B,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAI1E,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAGjF,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAG7E,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAG9E,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAGjF,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { typographyClass as t } from "../../../lib/typography.js";
4
+ //#region src/components/molecules/DescriptionList/descriptionListStyles.ts
5
+ var n = ["inline", "stacked"], r = [
6
+ "solid",
7
+ "dotted",
8
+ "none"
9
+ ], i = ["sans", "mono"], a = "m-0 flex w-full min-w-0 flex-col", o = {
10
+ solid: "border-b border-border",
11
+ dotted: "border-b border-dotted border-border-emphasized",
12
+ none: ""
13
+ }, s = {
14
+ inline: "grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)] items-baseline gap-x-4 py-3",
15
+ stacked: "flex flex-col gap-2.5 py-3"
16
+ }, c = {
17
+ sans: e("m-0", t("caption")),
18
+ mono: e("m-0", t("eyebrow"))
19
+ }, l = {
20
+ sans: e("m-0 min-w-0", t("body")),
21
+ mono: "m-0 min-w-0 type-eyebrow tabular-nums text-fg"
22
+ }, u = {
23
+ inline: "flex flex-wrap items-baseline gap-x-2 gap-y-1.5",
24
+ stacked: "flex flex-wrap items-center gap-2"
25
+ };
26
+ //#endregion
27
+ export { n as descriptionListLayouts, c as descriptionListNameClasses, a as descriptionListRootClasses, s as descriptionListRowLayoutClasses, o as descriptionListRuleClasses, r as descriptionListRules, l as descriptionListValueClasses, u as descriptionListValueFlowClasses, i as descriptionListVariants };
@@ -1,4 +1,4 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from "react";
1
+ import type { ButtonHTMLAttributes, ReactElement, ReactNode } from "react";
2
2
  /** Layout-only — not for row colors or typography overrides. */
3
3
  export type DropdownItemLayoutClassName = string;
4
4
  export interface DropdownItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
@@ -14,10 +14,15 @@ export interface DropdownItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonE
14
14
  active?: boolean;
15
15
  /** When false, label stays full width — **Select** listbox. Default true for action menus. */
16
16
  truncate?: boolean;
17
+ /**
18
+ * Compose the row onto another element (Base UI `render`) — `render={<a href="/docs" />}` for a
19
+ * menu of links, such as **Breadcrumb**'s collapsed pages. `disabled` maps to `aria-disabled`.
20
+ */
21
+ render?: ReactElement;
17
22
  className?: DropdownItemLayoutClassName;
18
23
  }
19
24
  /**
20
25
  * Dropdown row — start | label | end. Used by **Select** listbox options and future menu patterns.
21
26
  */
22
- export declare function DropdownItem({ children, start, end, selected, active, truncate, disabled, className, type, ...props }: DropdownItemProps): import("react").JSX.Element;
27
+ export declare function DropdownItem({ children, start, end, selected, active, truncate, disabled, className, type, render, ...props }: DropdownItemProps): import("react").JSX.Element;
23
28
  //# sourceMappingURL=DropdownItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAc7D,gEAAgE;AAChE,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,yBAAyB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oFAAoF;IACpF,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,GAAG,EACH,QAAgB,EAChB,MAAc,EACd,QAAe,EACf,QAAQ,EACR,SAAS,EACT,IAAe,EACf,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAmCnB"}
1
+ {"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAc3E,gEAAgE;AAChE,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACjE,yBAAyB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oFAAoF;IACpF,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,GAAG,EACH,QAAgB,EAChB,MAAc,EACd,QAAe,EACf,QAAQ,EACR,SAAS,EACT,IAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iBAAiB,+BA2CnB"}
@@ -2,35 +2,51 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { dropdownItemButtonClasses as t, dropdownItemEndClasses as n, dropdownItemLabelClasses as r, dropdownItemLabelFullClasses as i, dropdownItemSelectedCheckClasses as a, dropdownItemStartClasses as o } from "./dropdownStyles.js";
4
4
  import { Check as s } from "lucide-react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ import { useRender as d } from "@base-ui/react/use-render";
6
7
  //#region src/components/molecules/Dropdown/DropdownItem.tsx
7
- function u({ children: u, start: d, end: f, selected: p = !1, active: m = !1, truncate: h = !0, disabled: g, className: _, type: v = "button", ...y }) {
8
- let b = p ? /* @__PURE__ */ c("span", {
8
+ function f({ children: d, start: f, end: m, selected: h = !1, active: g = !1, truncate: _ = !0, disabled: v, className: y, type: b = "button", render: x, ...S }) {
9
+ let C = h ? /* @__PURE__ */ l("span", {
9
10
  className: a,
10
11
  "aria-hidden": !0,
11
- children: /* @__PURE__ */ c(s, { strokeWidth: 2 })
12
- }) : f == null ? null : /* @__PURE__ */ c("span", {
12
+ children: /* @__PURE__ */ l(s, { strokeWidth: 2 })
13
+ }) : m == null ? null : /* @__PURE__ */ l("span", {
13
14
  className: n,
14
- children: f
15
+ children: m
16
+ }), w = e(t, h && "hover:bg-transparent focus-visible:bg-transparent", g && !h && "bg-accent-muted", v && "pointer-events-none opacity-50", y), T = /* @__PURE__ */ u(c, { children: [
17
+ f == null ? null : /* @__PURE__ */ l("span", {
18
+ className: o,
19
+ "aria-hidden": !0,
20
+ children: f
21
+ }),
22
+ /* @__PURE__ */ l("span", {
23
+ className: _ ? r : i,
24
+ children: d
25
+ }),
26
+ C
27
+ ] });
28
+ return /* @__PURE__ */ l(p, {
29
+ ...S,
30
+ render: x,
31
+ type: b,
32
+ disabled: v,
33
+ className: w,
34
+ children: T
15
35
  });
16
- return /* @__PURE__ */ l("button", {
17
- ...y,
18
- type: v,
19
- disabled: g,
20
- className: e(t, p && "hover:bg-transparent focus-visible:bg-transparent", m && !p && "bg-accent-muted", g && "pointer-events-none opacity-50", _),
21
- children: [
22
- d == null ? null : /* @__PURE__ */ c("span", {
23
- className: o,
24
- "aria-hidden": !0,
25
- children: d
26
- }),
27
- /* @__PURE__ */ c("span", {
28
- className: h ? r : i,
29
- children: u
30
- }),
31
- b
32
- ]
36
+ }
37
+ function p({ render: e, type: t, disabled: n, ...r }) {
38
+ return d({
39
+ render: e,
40
+ defaultTagName: "button",
41
+ props: e ? {
42
+ ...r,
43
+ "aria-disabled": n ? !0 : void 0
44
+ } : {
45
+ ...r,
46
+ type: t,
47
+ disabled: n
48
+ }
33
49
  });
34
50
  }
35
51
  //#endregion
36
- export { u as DropdownItem };
52
+ export { f as DropdownItem };
@@ -0,0 +1,58 @@
1
+ import { type ReactNode } from "react";
2
+ import { type IndexListSize, type IndexListTitleElement } from "./indexListStyles";
3
+ export { indexListSizes, indexListTitleElements, type IndexListSize, type IndexListTitleElement, } from "./indexListStyles";
4
+ /** Layout-only — width, margin, or grid placement. */
5
+ export type IndexListLayoutClassName = string;
6
+ export interface IndexListCaptions {
7
+ /** Over the meta column, in sentence case — for example "Date". The "/" marker comes with it. */
8
+ meta: ReactNode;
9
+ /** Over the titles, for example "Name". */
10
+ title: ReactNode;
11
+ }
12
+ export interface IndexListProps {
13
+ /**
14
+ * Column captions over the rows, on the rows' own tracks. Hidden where the list is narrower than
15
+ * 32rem (phones, narrow columns) and each row is one column. Visual only — the rows carry their
16
+ * own meaning.
17
+ */
18
+ captions?: IndexListCaptions;
19
+ /** Title scale: `lg` type-display-3 (default), `md` type-heading-1, `sm` type-heading-3. */
20
+ size?: IndexListSize;
21
+ /** The heading element around each title. Default: `h2`. */
22
+ titleAs?: IndexListTitleElement;
23
+ /** Shown in place of the rows when there are none — for example "No posts match these filters." */
24
+ empty?: ReactNode;
25
+ /** Names the list for screen readers, for example "Posts". */
26
+ "aria-label"?: string;
27
+ "aria-labelledby"?: string;
28
+ /** **IndexList.Item** rows. */
29
+ children?: ReactNode;
30
+ className?: IndexListLayoutClassName;
31
+ }
32
+ export interface IndexListItemProps {
33
+ /** The row's title — a link to `href`. */
34
+ title: string;
35
+ href: string;
36
+ /** The meta column, for example a `<time>`. Above the title where the list is one column. */
37
+ meta?: ReactNode;
38
+ /** A short preview. When set, a control at the row's end expands it under the title. */
39
+ preview?: ReactNode;
40
+ /** Uncontrolled preview state. */
41
+ defaultOpen?: boolean;
42
+ /** Controlled preview state. */
43
+ open?: boolean;
44
+ onOpenChange?: (open: boolean) => void;
45
+ /** Names the preview control. Default: "Preview: {title}". */
46
+ previewLabel?: string;
47
+ className?: IndexListLayoutClassName;
48
+ }
49
+ /**
50
+ * Editorial index — a ruled list where each row has a meta column, a large linked title, and an
51
+ * optional preview that expands under the title. Optional column captions share the rows' tracks.
52
+ */
53
+ declare function IndexListRoot({ captions, size, titleAs, empty, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className, }: IndexListProps): import("react").JSX.Element;
54
+ declare function IndexListItem({ title, href, meta, preview, defaultOpen, open: openProp, onOpenChange, previewLabel, className, }: IndexListItemProps): import("react").JSX.Element;
55
+ export declare const IndexList: typeof IndexListRoot & {
56
+ Item: typeof IndexListItem;
57
+ };
58
+ //# sourceMappingURL=IndexList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/IndexList/IndexList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAiBL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAE3B,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,iGAAiG;IACjG,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,mGAAmG;IACnG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AASD;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,IAAW,EACX,OAAc,EACd,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,+BA8BhB;AAED,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAmB,EACnB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,GACV,EAAE,kBAAkB,+BA6CpB;AAED,eAAO,MAAM,SAAS;;CAEpB,CAAC"}