@thewhatmatters/wmds 0.4.30 → 0.4.32

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 (235) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/bin/wmds-check.mjs +38 -0
  3. package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
  4. package/dist/components/atoms/Checkbox/Checkbox.js +73 -72
  5. package/dist/components/atoms/Input/Input.d.ts.map +1 -1
  6. package/dist/components/atoms/Input/Input.js +44 -49
  7. package/dist/components/atoms/Input/inputShellStyles.js +2 -2
  8. package/dist/components/atoms/Radio/Radio.d.ts.map +1 -1
  9. package/dist/components/atoms/Radio/Radio.js +61 -60
  10. package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
  11. package/dist/components/atoms/Switch/Switch.js +31 -30
  12. package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
  13. package/dist/components/atoms/TextArea/TextArea.js +56 -55
  14. package/dist/components/atoms/TextArea/textareaShellStyles.js +2 -2
  15. package/dist/components/atoms/inputShared/InputStatusBanner.d.ts +5 -0
  16. package/dist/components/atoms/inputShared/InputStatusBanner.d.ts.map +1 -1
  17. package/dist/components/atoms/inputShared/InputStatusBanner.js +15 -4
  18. package/dist/components/molecules/Breadcrumb/breadcrumbStyles.d.ts +1 -1
  19. package/dist/components/molecules/Breadcrumb/breadcrumbStyles.js +2 -2
  20. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  21. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +53 -53
  22. package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -1
  23. package/dist/components/molecules/CopyField/copyFieldStyles.js +1 -1
  24. package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts +32 -0
  25. package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts.map +1 -0
  26. package/dist/components/molecules/ErrorSummary/ErrorSummary.js +37 -0
  27. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts +12 -0
  28. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts.map +1 -0
  29. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.js +5 -0
  30. package/dist/components/molecules/Field/fieldStyles.d.ts +1 -1
  31. package/dist/components/molecules/Field/fieldStyles.js +1 -1
  32. package/dist/components/molecules/HeroIntro/HeroIntro.d.ts +8 -2
  33. package/dist/components/molecules/HeroIntro/HeroIntro.d.ts.map +1 -1
  34. package/dist/components/molecules/HeroIntro/HeroIntro.js +30 -22
  35. package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts +9 -2
  36. package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts.map +1 -1
  37. package/dist/components/molecules/HeroIntro/heroIntroStyles.js +2 -2
  38. package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
  39. package/dist/components/molecules/IntakeForm/IntakeForm.js +4 -6
  40. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +3 -2
  41. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
  42. package/dist/components/molecules/PromptBar/promptBarStyles.js +2 -2
  43. package/dist/components/molecules/RadioGroup/RadioGroup.d.ts.map +1 -1
  44. package/dist/components/molecules/RadioGroup/RadioGroup.js +53 -53
  45. package/dist/components/molecules/Search/Search.d.ts +5 -0
  46. package/dist/components/molecules/Search/Search.d.ts.map +1 -1
  47. package/dist/components/molecules/Search/Search.js +14 -13
  48. package/dist/components/molecules/Search/searchStyles.d.ts +2 -1
  49. package/dist/components/molecules/Search/searchStyles.d.ts.map +1 -1
  50. package/dist/components/molecules/Search/searchStyles.js +4 -4
  51. package/dist/components/molecules/TileGrid/tileGridStyles.js +1 -1
  52. package/dist/components/organisms/Carousel/carouselStyles.js +3 -3
  53. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +4 -0
  54. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
  55. package/dist/components/organisms/FooterReveal/footerRevealStyles.js +1 -1
  56. package/dist/components/organisms/SiteNav/SiteNav.d.ts +13 -6
  57. package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
  58. package/dist/components/organisms/SiteNav/SiteNav.js +305 -252
  59. package/dist/components/organisms/SiteNav/siteNavStyles.d.ts +33 -5
  60. package/dist/components/organisms/SiteNav/siteNavStyles.d.ts.map +1 -1
  61. package/dist/components/organisms/SiteNav/siteNavStyles.js +3 -3
  62. package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.d.ts +17 -0
  63. package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.d.ts.map +1 -0
  64. package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.js +47 -0
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +3 -1
  68. package/dist/lib/dialogOverlay.d.ts +8 -0
  69. package/dist/lib/dialogOverlay.d.ts.map +1 -1
  70. package/dist/lib/dialogOverlay.js +45 -26
  71. package/dist/styles.css +1 -1
  72. package/docs/components.md +3 -2
  73. package/docs/exports.json +16 -2
  74. package/docs/patterns/components-accordion--flush.tsx +1 -1
  75. package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
  76. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  77. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  78. package/docs/patterns/components-badge--status-pill.tsx +1 -1
  79. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  80. package/docs/patterns/components-band--page-in-bands.tsx +1 -1
  81. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  82. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  83. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  84. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  85. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  86. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  87. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  88. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  89. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  90. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  91. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  92. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  93. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  94. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  95. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  96. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  97. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  98. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  99. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  100. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  101. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  102. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  103. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  104. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  105. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  106. package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
  107. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  108. package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
  109. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  110. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  111. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  112. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  113. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  114. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  115. package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
  116. package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
  117. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  118. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
  119. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
  120. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  121. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  122. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  123. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  124. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  125. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  126. package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
  127. package/docs/patterns/components-copyfield--copied.tsx +1 -1
  128. package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
  129. package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
  130. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  131. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  132. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  133. package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
  134. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  135. package/docs/patterns/components-dialog--form-dialog.tsx +3 -3
  136. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  137. package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
  138. package/docs/patterns/components-errorsummary--contact-form.tsx +35 -0
  139. package/docs/patterns/components-field--horizontal-input.tsx +2 -2
  140. package/docs/patterns/components-field--horizontal-text-area.tsx +2 -2
  141. package/docs/patterns/components-field--multi-control.tsx +2 -2
  142. package/docs/patterns/components-filterpanel--panel.tsx +1 -1
  143. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +2 -2
  144. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  145. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +2 -2
  146. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  147. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +2 -2
  148. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  149. package/docs/patterns/components-herointro--two-line-intro.tsx +2 -2
  150. package/docs/patterns/components-herointro--with-actions.tsx +22 -0
  151. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +2 -2
  152. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  153. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +2 -2
  154. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  155. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  156. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  157. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  158. package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
  159. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  160. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  161. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  162. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  163. package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
  164. package/docs/patterns/components-linktile--router-link.tsx +1 -1
  165. package/docs/patterns/components-logview--detail-pane.tsx +1 -1
  166. package/docs/patterns/components-logview--log-viewer.tsx +1 -1
  167. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  168. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  169. package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
  170. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  171. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  172. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  173. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  174. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  175. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  176. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  177. package/docs/patterns/components-prose--article-body.tsx +1 -1
  178. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  179. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  180. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  181. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  182. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  183. package/docs/patterns/components-sheet--bottom-sheet.tsx +3 -3
  184. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  185. package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
  186. package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
  187. package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
  188. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  189. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  190. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  191. package/docs/patterns/components-sitenav--marketing-header.tsx +2 -1
  192. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  193. package/docs/patterns/components-stat--hero-stat.tsx +1 -1
  194. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  195. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  196. package/docs/patterns/components-switch--default.tsx +1 -1
  197. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  198. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  199. package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
  200. package/docs/patterns/components-table--approvals.tsx +3 -3
  201. package/docs/patterns/components-table--basic.tsx +1 -1
  202. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  203. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  204. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  205. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  206. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  207. package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
  208. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  209. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  210. package/docs/patterns/components-textarea--save-status.tsx +1 -1
  211. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  212. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  213. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  214. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  215. package/docs/patterns/components-textsequence--default.tsx +1 -1
  216. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  217. package/docs/patterns/components-textsequence--shapes.tsx +2 -2
  218. package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
  219. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  220. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  221. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  222. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  223. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  224. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  225. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  226. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  227. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  228. package/docs/patterns/guides-filter-panel--filtered-grid.tsx +3 -3
  229. package/docs/patterns/guides-filter-panel--filtered-index.tsx +3 -3
  230. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +3 -3
  231. package/docs/patterns/guides-post-page--post-page.tsx +3 -3
  232. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +6 -6
  233. package/docs/patterns/guides-resource-detail--detail.tsx +2 -2
  234. package/docs/patterns/index.json +17 -1
  235. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,51 @@ Every release of `@thewhatmatters/wmds` is listed here, newest first.
7
7
  - **Pasted patterns:** when a release changes a **Pattern — …** story's Show code, it is named under Consumer actions so apps re-copy it.
8
8
  - **How to add an entry** (contributors): add your change to the top entry. If that version is already on npm (`npm view @thewhatmatters/wmds versions`), start a new entry above it and bump `version` in `package.json` to match. `npm run check:changelog` enforces the format.
9
9
 
10
+ ## 0.4.32
11
+
12
+ **Errors and validation: an error summary, errors announced as errors, no lost typing, and no iOS zoom. Labels and placeholders: every field named, the hint above the field, and inset buttons you can tap and see focused.**
13
+
14
+ - **ErrorSummary** (new): "There's a problem" at the top of a form after a failed submit, one link per error in the field's own words. It takes focus when it appears, and each link moves focus to its field (V5). Story **Components/ErrorSummary → Pattern — form with an error summary**; interaction test **Internal/Interactions/ErrorSummary**.
15
+ - **Input, TextArea, Checkbox, Radio, Switch, CheckboxGroup, RadioGroup**: the status band reads a visually hidden "Error:" or "Warning:" before the message, so screen readers hear what kind of message it is (V6).
16
+ - **Status without a message** (V10): those components warn in the console when `status="error"` or `"warning"` has no `message`. **wmds-check** `status-without-message` (new, error) catches it in app code. A status-only success tick is fine.
17
+ - **Input** keeps the same `<input>` when a status appears. It used to swap its wrapper and remount the field, which dropped focus and, in an uncontrolled field, **what people had typed** (V4).
18
+ - **No iOS zoom:** Input, TextArea and Search (`sm` and `md`) and PromptBar set 16px text on touch screens (`pointer: coarse`), so Safari doesn't zoom the page when a field gets focus. Fine pointers keep 12px / 14px.
19
+ - **IntakeForm** default messages follow V1: "Enter your email address." for an empty field, "Enter an email address like name@example.com." and "Enter a website address like example.com." for a broken rule (were "Please enter a valid email address." / "…URL.").
20
+ - Unit test: every status band's message clears 4.5:1 on its band in light and dark (V7: 4.62–6.97:1 measured).
21
+ - **A success tick only** (V8): a status-only `success` on Input or TextArea shows the tick and keeps the normal border (it also turned the border green).
22
+ - **The hint sits above the field** (Labels F8): Input and TextArea render `description` between the label and the field, and keep it when a status message shows (it used to sit below and hide behind the message). Story **Components/Input → Pattern — hint with an error**.
23
+ - **Label required** (F7): **wmds-check** `missing-label` (new, error) fails an Input, TextArea, Select or Search with no `label`, `aria-label` or `aria-labelledby`. Hide a label (`aria-label`) only on a field alone with its button: search, a one-field newsletter.
24
+ - **Search** takes a `label` prop: the field's name for screen readers, which may stay hidden (F10). It warns in the console when there's no label at all.
25
+ - **Inset buttons** (F10) in Search, PromptBar and CopyField get a 44px tap area on touch screens, and show their own focus ring. The pill's ring now marks only the field (Search used to ring the whole pill for the button too; PromptBar and CopyField hid the button's ring).
26
+ - **No placeholders in forms** (F9): IntakeForm drops its placeholders ("https://", "What should feel different…"), and the stories no longer put examples in placeholders. Search keeps one, naming the action.
27
+
28
+ ### Consumer actions
29
+
30
+ None required. Fix any `status="error"` / `"warning"` without a `message` that `npx wmds-check` reports; say what's wrong and how to fix it. After a failed submit, add **ErrorSummary** at the top of the form (copy the Pattern). On phones and tablets, field text is now 16px. Give every field a `label` (fix what `npx wmds-check` reports as `missing-label`); pass `label` to Search; move examples and formats out of placeholders into `description`. If you style around the hint, it now renders above the field.
31
+
32
+ ## 0.4.31
33
+
34
+ **SiteNav's phone menu follows the Header rule: a "Menu" button that becomes "Close", a full-height panel under the bar, and a link tap closes it.**
35
+
36
+ - **HeroIntro** `actions` (new): the CTA row under the heading and description, one primary and an optional secondary (Hero rule R2); left on phones, centred from `md`. New story **Pattern — with description and actions**. Story copy is shorter, so the intro holds 3 lines at 390: "A design studio in Austin. / We help brands stand out online." (**HeroIntro**, **HeroTileStack**, **FooterReveal** stories).
37
+ - **SiteNav** `mobile` menu (below `md`), rebuilt to Header and mobile menu rules N5–N8:
38
+ - The trigger is a **Button** with an icon and a visible word, "☰ Menu", that becomes "✕ Close" in the same place (QA #28). The word is the accessible name (was an icon-only button named "Open menu" / "Close menu"). At least 44px tall.
39
+ - The menu opens as a full-height panel **under the bar**, not a side **Sheet**. The bar stays live, so Close sits where Menu was. The panel is a dialog: focus moves to its first link, Tab cycles through the bar and the panel, the page behind is inert and doesn't scroll, Escape or Close closes it, and focus returns to Menu. It closes when the window widens past `md`.
40
+ - **Tapping any link in the menu closes it** (QA #25; it used to stay open over the page).
41
+ - **SiteNav.MobileLink** rows are 56px and full width. The current page is marked by weight and the selected fill plus `aria-current="page"`, not colour alone.
42
+ - `mobileAction` (new): the main action, pinned to the bottom of the open menu.
43
+ - With `mobile`, the bar's `end` actions give way when brand + actions + Menu don't fit (measured, not a fixed width), so Menu keeps its word; `mobileAction` carries the main button there. Below `md` the actions and Menu sit at the trailing edge.
44
+ - `mobileTitle` is now a string (the dialog's accessible name).
45
+ - New interaction tests **Internal/Interactions/SiteNav → phone menu…** (390), **phone menu at 320** (N7) and **phone bar: trailing edge**.
46
+ - **SiteNav** full bar: a wordmark **SiteNav.Brand** and the Menu button pull their own 16px padding past the edges, so the wordmark and the Menu word line up with the content edges (hit areas unchanged; the compact pill keeps its padding). The bar's give-way check measures the slots' margin boxes instead of `scrollWidth`, so that pull doesn't hide a CTA that fits: "Get my free sketch" stays in the bar from 390 (N9). The Menu/Close button is quiet in both states (ghost hover and press fill only). While the phone menu is open, the bar's actions hide, so the menu's own action is the one CTA on screen. New interaction test **phone bar: wordmark and Menu word sit on the content edges**.
47
+ - **Breakpoints rule P5:** every `sm:` (640px) variant in WMDS moves to `md:` (768px): **Field** label column, **TileGrid** `--tile-grid-cols-sm` (now from `md`), **Breadcrumb** gap and label width, **FooterReveal** wordmark size, **Carousel** `--carousel-item-sm` and caption width, the Post page / Resource detail / Filter panel / Profile typography guides, and story Show code. Layout changes only between 640 and 767px, where these now keep their phone layout. New unit test: no `sm:` and no one-off `min-[…]` / `max-[…]` breakpoints anywhere in `src`.
48
+ - `lib/dialogOverlay` exports `tabbablesIn` and `inertAllBut` (internal helpers, also used by SiteNav).
49
+ - **ChatDock**: its 40rem chat column is documented as the text-only exception to Container width W5.
50
+
51
+ ### Consumer actions
52
+
53
+ If you pass `mobile` to **SiteNav**, also pass `mobileAction` (usually the same **Button** as your bar CTA) so small phones still reach it when the bar is too tight for it. Keep the bar's CTA label short (about 12 characters) so it fits beside Menu at 390. Tests that find the trigger by `aria-label="Open menu"` now find it by its text, `getByRole("button", { name: "Menu" })`, and the open menu is a `dialog` named by `mobileTitle` (default "Menu"). `mobileTitle` must be a string. Re-copy any **Pattern** whose Show code used `sm:` (the generated `docs/patterns` show which changed). `--tile-grid-cols-sm` and `--carousel-item-sm` keep their names but now apply from 768px.
54
+
10
55
  ## 0.4.30
11
56
 
12
57
  **Capitals are tracked 0.08–0.12em (Eyebrow rule E3).**
@@ -18,6 +18,10 @@
18
18
  * content, data, handlers, and exports may change
19
19
  * pattern-stale warn a pasted pattern's header names an older package version
20
20
  * pattern-removed error a pasted pattern's id no longer ships
21
+ * status-without-message error a WMDS field with status="error" or "warning" and no message
22
+ * (Errors and validation V10; a status-only success tick is fine)
23
+ * missing-label error a WMDS Input, TextArea, Select or Search with no label, aria-label or
24
+ * aria-labelledby (Labels and placeholders F7; a spread {...props} is trusted)
21
25
  * brand-contrast error a brand-kit pair in the app's CSS under WCAG AA 4.5:1: --color-on-X (and
22
26
  * --color-on-X-muted) on --color-X, for primary, brand-surface and field,
23
27
  * when both are hex values in the same rule
@@ -235,6 +239,40 @@ for (const file of files) {
235
239
  }
236
240
  });
237
241
 
242
+ // Reads a JSX element whole from its "<" (it may span lines), counting braces so `=>` and `{…}`
243
+ // values don't end it early.
244
+ const elementFrom = (start) => {
245
+ let depth = 0;
246
+ let end = start + 1;
247
+ for (; end < source.length; end++) {
248
+ const char = source[end];
249
+ if (char === "{") depth++;
250
+ else if (char === "}") depth--;
251
+ else if (char === ">" && depth === 0 && source[end - 1] !== "=") break;
252
+ }
253
+ return source.slice(start, end + 1);
254
+ };
255
+
256
+ // F7: every field has a name. A hidden one (aria-label) is the app's call; none at all fails.
257
+ if (/from\s+["']@thewhatmatters\/wmds["']/.test(source)) {
258
+ for (const match of source.matchAll(/<(Input|TextArea|Select|Search)(?=[\s/>])/g)) {
259
+ const element = elementFrom(match.index);
260
+ if (/\b(label|aria-label|aria-labelledby)=|\{\s*\.\.\./.test(element)) continue;
261
+ const line = source.slice(0, match.index).split("\n").length;
262
+ if (ignored(lines, line - 1, "missing-label")) continue;
263
+ report(file, line, "missing-label", "error", `<${match[1]}> has no label — add label (or aria-label when it sits alone with its button)`);
264
+ }
265
+ }
266
+
267
+ // V10: an error or warning status always says what's wrong.
268
+ for (const match of source.matchAll(/\bstatus=(?:"(error|warning)"|\{\s*["'](error|warning)["']\s*\})/g)) {
269
+ const element = elementFrom(source.lastIndexOf("<", match.index));
270
+ if (!/^<[A-Z]/.test(element) || /\bmessage=/.test(element)) continue;
271
+ const line = source.slice(0, match.index).split("\n").length;
272
+ if (ignored(lines, line - 1, "status-without-message")) continue;
273
+ report(file, line, "status-without-message", "error", `status="${match[1] ?? match[2]}" with no message — say what's wrong and how to fix it`);
274
+ }
275
+
238
276
  // Pasted patterns.
239
277
  // The header is the file's first comment line. A "use client" / "use server" directive or blank
240
278
  // lines may come before it.
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,OAAO,EAoBL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,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C3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAcD;;;GAGG;AACH,eAAO,MAAM,QAAQ,4GAiNnB,CAAC"}
@@ -1,119 +1,120 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import "../Input/inputShellStyles.js";
4
- import { InputStatusBanner as t } from "../inputShared/InputStatusBanner.js";
5
- import { checkboxBoxClassesFor as ee, checkboxCheckIconSizeClasses as n, checkboxCountClasses as te, checkboxCountTitleLineClasses as r, checkboxDescriptionClasses as i, checkboxDescriptionRowClasses as ne, checkboxHiddenInputClasses as re, checkboxHitTargetDescriptionAlignClasses as ie, checkboxHitTargetSizeClasses as ae, checkboxIndeterminateBarSizeClasses as oe, checkboxLabelClassesFor as a, checkboxMarkClasses as o, checkboxRowBaseClasses as s, checkboxRowSizeClasses as c, checkboxSizes as l, checkboxStatusBannerClassesFor as u, checkboxTextColumnClasses as d } from "./checkboxStyles.js";
6
- import { forwardRef as f, useCallback as p, useId as m, useState as se } from "react";
7
- import { Check as ce, Loader2 as le } from "lucide-react";
8
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
4
+ import { InputStatusBanner as t, warnStatusWithoutMessage as ee } from "../inputShared/InputStatusBanner.js";
5
+ import { checkboxBoxClassesFor as n, checkboxCheckIconSizeClasses as r, checkboxCountClasses as te, checkboxCountTitleLineClasses as i, checkboxDescriptionClasses as a, checkboxDescriptionRowClasses as ne, checkboxHiddenInputClasses as re, checkboxHitTargetDescriptionAlignClasses as ie, checkboxHitTargetSizeClasses as ae, checkboxIndeterminateBarSizeClasses as o, checkboxLabelClassesFor as s, checkboxMarkClasses as c, checkboxRowBaseClasses as oe, checkboxRowSizeClasses as se, checkboxSizes as l, checkboxStatusBannerClassesFor as u, checkboxTextColumnClasses as d } from "./checkboxStyles.js";
6
+ import { forwardRef as f, useCallback as p, useId as ce, useState as le } from "react";
7
+ import { Check as ue, Loader2 as de } from "lucide-react";
8
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
9
  //#region src/components/atoms/Checkbox/Checkbox.tsx
10
- var v = {
10
+ var _ = {
11
11
  sm: "sm",
12
12
  md: "md"
13
13
  };
14
- function y(e) {
14
+ function v(e) {
15
15
  e.message != null && e.status == null && console.warn("[WMDS Checkbox] `message` requires `status`.");
16
16
  }
17
- var b = f(function({ size: l = "md", label: f, labelHidden: b = !1, description: x, count: S, countLabel: C, indeterminate: w = !1, status: T, message: E, loading: D = !1, className: ue, disabled: O, readOnly: k, checked: A, defaultChecked: j, id: M, onChange: N, ...P }, F) {
18
- let I = m(), L = M ?? I;
19
- y({
20
- status: T,
21
- message: E
17
+ var y = f(function({ size: l = "md", label: f, labelHidden: y = !1, description: b, count: x, countLabel: fe, indeterminate: S = !1, status: C, message: w, loading: T = !1, className: E, disabled: D, readOnly: O, checked: k, defaultChecked: A, id: j, onChange: M, ...N }, P) {
18
+ ee("Checkbox", C, w);
19
+ let F = ce(), I = j ?? F;
20
+ v({
21
+ status: C,
22
+ message: w
22
23
  });
23
- let R = A !== void 0, [z, B] = se(j ?? !1), V = R ? !!A : z, H = O || D, U = D && !O, W = E != null && E.length > 0 && T != null, G = W ? `${L}-message` : void 0, K = x != null && !b ? `${L}-description` : void 0, de = [
24
- P["aria-describedby"],
25
- K,
26
- G
27
- ].filter(Boolean).join(" ") || void 0, fe = p((e) => {
28
- e && (e.indeterminate = w), typeof F == "function" ? F(e) : F != null && (F.current = e);
29
- }, [w, F]), pe = (e) => {
30
- if (k || U) {
24
+ let L = k !== void 0, [R, z] = le(A ?? !1), B = L ? !!k : R, V = D || T, H = T && !D, U = w != null && w.length > 0 && C != null, W = U ? `${I}-message` : void 0, G = b != null && !y ? `${I}-description` : void 0, pe = [
25
+ N["aria-describedby"],
26
+ G,
27
+ W
28
+ ].filter(Boolean).join(" ") || void 0, me = p((e) => {
29
+ e && (e.indeterminate = S), typeof P == "function" ? P(e) : P != null && (P.current = e);
30
+ }, [S, P]), K = (e) => {
31
+ if (O || H) {
31
32
  e.preventDefault();
32
33
  return;
33
34
  }
34
- R || B(e.target.checked), N?.(e);
35
- }, me = ee(l, V, w, H, W ? void 0 : T), q = x != null && !b, J = S != null, Y = S?.toLocaleString("en-US"), X = J ? /* @__PURE__ */ g("span", {
35
+ L || z(e.target.checked), M?.(e);
36
+ }, he = n(l, B, S, V, U ? void 0 : C), q = b != null && !y, J = x != null, Y = x?.toLocaleString("en-US"), X = J ? /* @__PURE__ */ h("span", {
36
37
  className: "sr-only",
37
- children: ` (${C ?? Y})`
38
- }) : null, Z = J ? /* @__PURE__ */ g("span", {
38
+ children: ` (${fe ?? Y})`
39
+ }) : null, Z = J ? /* @__PURE__ */ h("span", {
39
40
  className: te,
40
41
  "aria-hidden": !0,
41
42
  children: Y
42
- }) : null, Q = (t) => /* @__PURE__ */ _("span", {
43
+ }) : null, Q = (t) => /* @__PURE__ */ g("span", {
43
44
  className: e("relative flex shrink-0 items-center justify-center", ae[l], t),
44
- children: [/* @__PURE__ */ g("input", {
45
- ...P,
46
- ref: fe,
47
- id: L,
45
+ children: [/* @__PURE__ */ h("input", {
46
+ ...N,
47
+ ref: me,
48
+ id: I,
48
49
  type: "checkbox",
49
- checked: R ? A : void 0,
50
- defaultChecked: R ? void 0 : j,
51
- disabled: O,
52
- "aria-disabled": U || void 0,
53
- readOnly: k,
54
- "aria-invalid": T === "error" || void 0,
55
- "aria-describedby": de,
56
- "aria-checked": w ? "mixed" : void 0,
57
- "aria-busy": D || void 0,
58
- onChange: pe,
50
+ checked: L ? k : void 0,
51
+ defaultChecked: L ? void 0 : A,
52
+ disabled: D,
53
+ "aria-disabled": H || void 0,
54
+ readOnly: O,
55
+ "aria-invalid": C === "error" || void 0,
56
+ "aria-describedby": pe,
57
+ "aria-checked": S ? "mixed" : void 0,
58
+ "aria-busy": T || void 0,
59
+ onChange: K,
59
60
  className: re
60
- }), /* @__PURE__ */ g("span", {
61
- className: me,
61
+ }), /* @__PURE__ */ h("span", {
62
+ className: he,
62
63
  "aria-hidden": !0,
63
- children: D ? /* @__PURE__ */ g(le, {
64
- className: e(n[l], o, "animate-spin"),
64
+ children: T ? /* @__PURE__ */ h(de, {
65
+ className: e(r[l], c, "animate-spin"),
65
66
  strokeWidth: 2
66
- }) : w ? /* @__PURE__ */ g("span", { className: e(oe[l], o, "rounded-full bg-current") }) : V ? /* @__PURE__ */ g(ce, {
67
- className: e(n[l], o),
67
+ }) : S ? /* @__PURE__ */ h("span", { className: e(o[l], c, "rounded-full bg-current") }) : B ? /* @__PURE__ */ h(ue, {
68
+ className: e(r[l], c),
68
69
  strokeWidth: 3,
69
70
  "aria-hidden": !0
70
71
  }) : null
71
72
  })]
72
- }), $ = /* @__PURE__ */ g("label", {
73
- htmlFor: L,
74
- className: e(s, !q && "items-center", !q && c[l], H && "cursor-not-allowed", ue),
75
- children: b ? /* @__PURE__ */ _(h, { children: [Q(), /* @__PURE__ */ _("span", {
73
+ }), $ = /* @__PURE__ */ h("label", {
74
+ htmlFor: I,
75
+ className: e(oe, !q && "items-center", !q && se[l], V && "cursor-not-allowed", E),
76
+ children: y ? /* @__PURE__ */ g(m, { children: [Q(), /* @__PURE__ */ g("span", {
76
77
  className: "sr-only",
77
78
  children: [f, X]
78
- })] }) : q ? /* @__PURE__ */ _("span", {
79
+ })] }) : q ? /* @__PURE__ */ g("span", {
79
80
  className: e(ne[l], J && "flex-1"),
80
- children: [Q(ie[l]), /* @__PURE__ */ _("span", {
81
+ children: [Q(ie[l]), /* @__PURE__ */ g("span", {
81
82
  className: e(d, J && "flex-1"),
82
- children: [J ? /* @__PURE__ */ _("span", {
83
- className: r,
84
- children: [/* @__PURE__ */ _("span", {
85
- className: a(H, !0),
83
+ children: [J ? /* @__PURE__ */ g("span", {
84
+ className: i,
85
+ children: [/* @__PURE__ */ g("span", {
86
+ className: s(V, !0),
86
87
  children: [f, X]
87
88
  }), Z]
88
- }) : /* @__PURE__ */ g("span", {
89
- className: a(H, !0),
89
+ }) : /* @__PURE__ */ h("span", {
90
+ className: s(V, !0),
90
91
  children: f
91
- }), /* @__PURE__ */ g("span", {
92
- id: K,
93
- className: i,
94
- children: x
92
+ }), /* @__PURE__ */ h("span", {
93
+ id: G,
94
+ className: a,
95
+ children: b
95
96
  })]
96
97
  })]
97
- }) : /* @__PURE__ */ _(h, { children: [
98
+ }) : /* @__PURE__ */ g(m, { children: [
98
99
  Q(),
99
- /* @__PURE__ */ _("span", {
100
- className: a(H),
100
+ /* @__PURE__ */ g("span", {
101
+ className: s(V),
101
102
  children: [f, X]
102
103
  }),
103
104
  Z
104
105
  ] })
105
106
  });
106
- return !W || T == null || G == null ? $ : /* @__PURE__ */ _("div", {
107
+ return !U || C == null || W == null ? $ : /* @__PURE__ */ g("div", {
107
108
  className: "flex w-full flex-col gap-1.5",
108
- children: [$, /* @__PURE__ */ g(t, {
109
- status: T,
110
- message: E,
111
- messageId: G,
112
- size: v[l],
109
+ children: [$, /* @__PURE__ */ h(t, {
110
+ status: C,
111
+ message: w,
112
+ messageId: W,
113
+ size: _[l],
113
114
  messagePosition: "bottom",
114
- bannerClassName: u(T)
115
+ bannerClassName: u(C)
115
116
  })]
116
117
  });
117
118
  });
118
119
  //#endregion
119
- export { b as Checkbox, l as checkboxSizes };
120
+ export { y as Checkbox, l as checkboxSizes };
@@ -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10 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { typographyClass as t } from "../../../lib/typography.js";
4
- import { inputAttachedFieldClasses as n, inputAttachedInputClasses as r, inputBaseClasses as i, inputCompoundInnerFieldClassesFor as a, inputCompoundShellClassesFor as o, inputControlStackClasses as s, inputDisabledClasses as c, inputEndBadgeAndStatusGapClasses as l, inputEndBadgeGapClasses as u, inputEndBadgeWrapperClasses as ee, inputFieldStackClasses as te, inputIconGapClasses as d, inputIconPositionClasses as f, inputIconSizeClasses as p, inputInlineClasses as m, inputMessagePositions as h, inputShellClasses as g, inputSizeClasses as _, inputSizes as v, inputSoloFocusRingBaseClasses as y, inputSoloFocusRingColorClasses as b, inputSoloRadiusClasses as x, inputStatusGapClasses as S, inputStatusShellClasses as C, inputStatuses as w, inputTrailingInsetClasses as ne, inputTrailingInsetPositionClasses as re } from "./inputShellStyles.js";
5
- import { InputStatusBanner as ie } from "../inputShared/InputStatusBanner.js";
6
- import { InputTrailingAffordance as ae } from "../inputShared/InputTrailingAffordance.js";
7
- import { forwardRef as T, useId as oe } from "react";
4
+ import { inputAttachedFieldClasses as n, inputAttachedInputClasses as ee, inputBaseClasses as r, inputCompoundInnerFieldClassesFor as i, inputCompoundShellClassesFor as a, inputControlStackClasses as o, inputDisabledClasses as te, inputEndBadgeAndStatusGapClasses as s, inputEndBadgeGapClasses as c, inputEndBadgeWrapperClasses as ne, inputFieldStackClasses as l, inputIconGapClasses as u, inputIconPositionClasses as d, inputIconSizeClasses as f, inputInlineClasses as p, inputMessagePositions as m, inputShellClasses as h, inputSizeClasses as g, inputSizes as _, inputSoloFocusRingBaseClasses as re, inputSoloFocusRingColorClasses as v, inputSoloRadiusClasses as ie, inputStatusGapClasses as y, inputStatusShellClasses as ae, inputStatuses as b, inputTrailingInsetClasses as x, inputTrailingInsetPositionClasses as S } from "./inputShellStyles.js";
5
+ import { InputStatusBanner as C, warnStatusWithoutMessage as w } from "../inputShared/InputStatusBanner.js";
6
+ import { InputTrailingAffordance as oe } from "../inputShared/InputTrailingAffordance.js";
7
+ import { forwardRef as T, useId as se } from "react";
8
8
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
9
9
  //#region src/components/atoms/Input/Input.tsx
10
10
  function k(e) {
@@ -14,30 +14,31 @@ function A(e) {
14
14
  e.message != null && e.status == null && console.warn("[WMDS Input] `message` requires `status`."), e.inline && (e.label != null || e.description != null || e.status != null || e.message != null) && console.warn("[WMDS Input] `inline` is for a parent pill (Search, CopyField) — omit label, description, and validation.");
15
15
  }
16
16
  function j(e, t, n) {
17
- return t && n ? l[e] : t ? u[e] : n ? S[e] : !1;
17
+ return t && n ? s[e] : t ? c[e] : n ? y[e] : !1;
18
18
  }
19
- var M = T(function({ size: l = "md", label: u, description: h, status: v, message: S, messagePosition: w = "bottom", loading: T = !1, icon: M, endBadge: N, mono: P = !1, inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
20
- let H = oe(), U = R ?? H;
19
+ var M = T(function({ size: s = "md", label: c, description: m, status: _, message: y, messagePosition: b = "bottom", loading: T = !1, icon: M, endBadge: N, mono: P = !1, inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
20
+ w("Input", _, y);
21
+ let H = se(), U = R ?? H;
21
22
  k({
22
- label: u,
23
+ label: c,
23
24
  "aria-label": B["aria-label"],
24
25
  "aria-labelledby": B["aria-labelledby"]
25
26
  }), A({
26
- status: v,
27
- message: S,
28
- messagePosition: w,
27
+ status: _,
28
+ message: y,
29
+ messagePosition: b,
29
30
  loading: T,
30
31
  inline: F,
31
- label: u,
32
- description: h
32
+ label: c,
33
+ description: m
33
34
  });
34
- let W = S != null && S.length > 0 && v != null, G = N != null, K = !W && (T || v != null), q = M != null, J = j(l, G, K), Y = h != null && !W ? `${U}-description` : void 0, X = W ? `${U}-message` : void 0, se = [
35
+ let W = y != null && y.length > 0 && _ != null, G = N != null, K = !W && (T || _ != null), q = M != null, J = j(s, G, K), Y = m == null ? void 0 : `${U}-description`, X = W ? `${U}-message` : void 0, ce = [
35
36
  z,
36
37
  Y,
37
38
  X
38
- ].filter(Boolean).join(" ") || void 0, Z = /* @__PURE__ */ O(E, { children: [
39
+ ].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ O(E, { children: [
39
40
  q ? /* @__PURE__ */ D("span", {
40
- className: e("pointer-events-none absolute top-1/2 inline-flex -translate-y-1/2 [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", f[l], p[l]),
41
+ className: e("pointer-events-none absolute top-1/2 inline-flex -translate-y-1/2 [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", d[s], f[s]),
41
42
  "aria-hidden": !0,
42
43
  children: M
43
44
  }) : null,
@@ -46,60 +47,54 @@ var M = T(function({ size: l = "md", label: u, description: h, status: v, messag
46
47
  ref: V,
47
48
  id: U,
48
49
  disabled: L,
49
- "aria-invalid": v === "error" || void 0,
50
- "aria-describedby": se,
51
- className: e(c, P && "type-code !font-mono !leading-none", W ? e(n, _[l], q && d[l], J, r) : e(i, F ? e(m, q && d[l], I ?? _[l]) : e(_[l], q && d[l], J, v == null ? g[l] : e("border", C[v]), x[l], y, v == null ? b.default : b[v], I)))
50
+ "aria-invalid": _ === "error" || void 0,
51
+ "aria-describedby": ce,
52
+ className: e(te, P && "type-code !font-mono !leading-none", W ? e(n, g[s], q && u[s], J, ee) : e(r, F ? e(p, q && u[s], I ?? g[s]) : e(g[s], q && u[s], J, _ != null && _ !== "success" ? e("border", ae[_]) : h[s], ie[s], re, _ != null && _ !== "success" ? v[_] : v.default, I)))
52
53
  }),
53
54
  G || K ? /* @__PURE__ */ O("span", {
54
- className: e(ne, re[l]),
55
+ className: e(x, S[s]),
55
56
  children: [G ? /* @__PURE__ */ D("span", {
56
- className: ee,
57
+ className: ne,
57
58
  children: N
58
- }) : null, K ? /* @__PURE__ */ D(ae, {
59
- size: l,
60
- status: T ? void 0 : v,
59
+ }) : null, K ? /* @__PURE__ */ D(oe, {
60
+ size: s,
61
+ status: T ? void 0 : _,
61
62
  loading: T
62
63
  }) : null]
63
64
  }) : null
64
- ] }), Q = W && v != null && X != null ? /* @__PURE__ */ D(ie, {
65
- status: v,
66
- message: S,
65
+ ] }), Z = W && _ != null && X != null ? /* @__PURE__ */ D(C, {
66
+ status: _,
67
+ message: y,
67
68
  messageId: X,
68
- size: l,
69
- messagePosition: w
70
- }) : null, $ = W && v != null ? /* @__PURE__ */ O("div", {
71
- className: o(l, v),
69
+ size: s,
70
+ messagePosition: b
71
+ }) : null, Q = W && _ != null, $ = /* @__PURE__ */ O("div", {
72
+ className: Q ? a(s, _) : e(F ? "relative flex min-w-0 flex-1 items-center" : o),
72
73
  children: [
73
- w === "top" ? Q : null,
74
+ Q && b === "top" ? Z : null,
74
75
  /* @__PURE__ */ D("div", {
75
- className: a(l, v, w),
76
- children: Z
76
+ className: Q ? i(s, _, b) : "relative flex w-full items-center",
77
+ children: le
77
78
  }),
78
- w === "bottom" ? Q : null
79
+ Q && b === "bottom" ? Z : null
79
80
  ]
80
- }) : /* @__PURE__ */ D("div", {
81
- className: e(F ? "relative flex min-w-0 flex-1 items-center" : s),
82
- children: /* @__PURE__ */ D("div", {
83
- className: "relative flex w-full items-center",
84
- children: Z
85
- })
86
81
  });
87
- return F || u == null && h == null ? $ : /* @__PURE__ */ O("div", {
88
- className: te,
82
+ return F || c == null && m == null ? $ : /* @__PURE__ */ O("div", {
83
+ className: l,
89
84
  children: [
90
- u == null ? null : /* @__PURE__ */ D("label", {
85
+ c == null ? null : /* @__PURE__ */ D("label", {
91
86
  htmlFor: U,
92
87
  className: e(t("ui-label"), L && "opacity-50"),
93
- children: u
88
+ children: c
94
89
  }),
95
- $,
96
90
  Y == null ? null : /* @__PURE__ */ D("p", {
97
91
  id: Y,
98
92
  className: t("caption"),
99
- children: h
100
- })
93
+ children: m
94
+ }),
95
+ $
101
96
  ]
102
97
  });
103
98
  });
104
99
  //#endregion
105
- export { M as Input, h as inputMessagePositions, v as inputSizes, w as inputStatuses };
100
+ export { M as Input, m as inputMessagePositions, _ as inputSizes, b as inputStatuses };
@@ -20,8 +20,8 @@ var n = [
20
20
  warning: "focus-within:outline-none focus-within:ring-2 focus-within:ring-warning-focus-ring",
21
21
  success: "focus-within:outline-none focus-within:ring-2 focus-within:ring-success-focus-ring"
22
22
  }, d = {
23
- sm: "h-8 px-2.5 text-xs leading-none",
24
- md: "h-11 px-3 text-sm leading-none",
23
+ sm: "h-8 px-2.5 text-xs pointer-coarse:text-base leading-none",
24
+ md: "h-11 px-3 text-sm pointer-coarse:text-base leading-none",
25
25
  lg: "min-h-12 px-4 text-base leading-none"
26
26
  }, f = "border border-border-control", p = "shadow-raised", m = {
27
27
  sm: e(f, p),
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAGf,OAAO,EAgBL,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,MAAM,CA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