@thewhatmatters/wmds 0.4.33 → 0.4.35

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 +70 -0
  2. package/bin/wmds-check.mjs +24 -0
  3. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
  4. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
  5. package/dist/components/atoms/Checkbox/checkboxStyles.js +6 -6
  6. package/dist/components/atoms/Input/Input.d.ts +13 -3
  7. package/dist/components/atoms/Input/Input.d.ts.map +1 -1
  8. package/dist/components/atoms/Input/Input.js +102 -67
  9. package/dist/components/atoms/Input/autofillFields.d.ts +9 -0
  10. package/dist/components/atoms/Input/autofillFields.d.ts.map +1 -0
  11. package/dist/components/atoms/Input/autofillFields.js +8 -0
  12. package/dist/components/atoms/Input/fieldWidth.d.ts +19 -0
  13. package/dist/components/atoms/Input/fieldWidth.d.ts.map +1 -0
  14. package/dist/components/atoms/Input/fieldWidth.js +24 -0
  15. package/dist/components/atoms/Radio/radioStyles.d.ts +1 -1
  16. package/dist/components/atoms/Radio/radioStyles.d.ts.map +1 -1
  17. package/dist/components/atoms/Radio/radioStyles.js +6 -6
  18. package/dist/components/molecules/CalEmbed/CalEmbed.d.ts +6 -6
  19. package/dist/components/molecules/CalEmbed/CalEmbed.d.ts.map +1 -1
  20. package/dist/components/molecules/CalEmbed/CalEmbed.js +20 -15
  21. package/dist/components/molecules/Field/Field.d.ts +11 -3
  22. package/dist/components/molecules/Field/Field.d.ts.map +1 -1
  23. package/dist/components/molecules/Field/Field.js +45 -30
  24. package/dist/components/molecules/Field/fieldStyles.d.ts +9 -6
  25. package/dist/components/molecules/Field/fieldStyles.d.ts.map +1 -1
  26. package/dist/components/molecules/Field/fieldStyles.js +1 -1
  27. package/dist/components/molecules/IntakeForm/IntakeForm.d.ts +15 -5
  28. package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
  29. package/dist/components/molecules/IntakeForm/IntakeForm.js +110 -70
  30. package/dist/components/molecules/IntakeForm/IntakeHoneypot.d.ts +17 -0
  31. package/dist/components/molecules/IntakeForm/IntakeHoneypot.d.ts.map +1 -0
  32. package/dist/components/molecules/IntakeForm/IntakeHoneypot.js +29 -0
  33. package/dist/components/molecules/PillGroup/PillGroup.d.ts +7 -3
  34. package/dist/components/molecules/PillGroup/PillGroup.d.ts.map +1 -1
  35. package/dist/components/molecules/PillGroup/PillGroup.js +37 -27
  36. package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts +3 -0
  37. package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts.map +1 -1
  38. package/dist/components/molecules/PillGroup/pillGroupStyles.js +4 -3
  39. package/dist/components/molecules/Search/Search.d.ts +1 -1
  40. package/dist/components/molecules/Search/Search.d.ts.map +1 -1
  41. package/dist/components/molecules/Select/Select.d.ts +19 -1
  42. package/dist/components/molecules/Select/Select.d.ts.map +1 -1
  43. package/dist/components/molecules/Select/Select.js +102 -60
  44. package/dist/components/molecules/Select/selectStyles.d.ts +9 -1
  45. package/dist/components/molecules/Select/selectStyles.d.ts.map +1 -1
  46. package/dist/components/molecules/Select/selectStyles.js +11 -3
  47. package/dist/components/molecules/Select/usStateOptions.d.ts +8 -0
  48. package/dist/components/molecules/Select/usStateOptions.d.ts.map +1 -0
  49. package/dist/components/molecules/Select/usStateOptions.js +7 -0
  50. package/dist/components/molecules/StepProgress/StepProgress.d.ts.map +1 -1
  51. package/dist/components/molecules/StepProgress/StepProgress.js +1 -0
  52. package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts +14 -2
  53. package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts.map +1 -1
  54. package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.js +38 -33
  55. package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts +5 -1
  56. package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts.map +1 -1
  57. package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.js +3 -3
  58. package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +14 -2
  59. package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
  60. package/dist/components/organisms/IntakeModal/IntakeModal.js +94 -62
  61. package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts +3 -3
  62. package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts.map +1 -1
  63. package/dist/components/organisms/IntakeModal/intakeModalStyles.js +1 -1
  64. package/dist/components/organisms/IntakeModal/useIntakeUrlState.d.ts +12 -0
  65. package/dist/components/organisms/IntakeModal/useIntakeUrlState.d.ts.map +1 -0
  66. package/dist/components/organisms/IntakeModal/useIntakeUrlState.js +16 -0
  67. package/dist/index.d.ts +6 -3
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +145 -141
  70. package/dist/styles.css +1 -1
  71. package/docs/components.md +1 -1
  72. package/docs/exports.json +2 -2
  73. package/docs/patterns/components-accordion--flush.tsx +1 -1
  74. package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
  75. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  76. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  77. package/docs/patterns/components-badge--status-pill.tsx +1 -1
  78. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  79. package/docs/patterns/components-band--page-in-bands.tsx +1 -1
  80. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  81. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  82. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  83. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  84. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  85. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  86. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  87. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  88. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  89. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  90. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  91. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  92. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  93. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  94. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  95. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  96. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  97. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  98. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  99. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  100. package/docs/patterns/components-calembed--pattern-skip-above.tsx +16 -0
  101. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  102. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  103. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  104. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  105. package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
  106. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  107. package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
  108. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  109. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  110. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  111. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  112. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  113. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  114. package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
  115. package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
  116. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  117. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
  118. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
  119. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  120. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  121. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  122. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  123. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  124. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  125. package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
  126. package/docs/patterns/components-copyfield--copied.tsx +1 -1
  127. package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
  128. package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
  129. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  130. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  131. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  132. package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
  133. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  134. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  135. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  136. package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
  137. package/docs/patterns/components-errorsummary--contact-form.tsx +1 -1
  138. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  139. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  140. package/docs/patterns/components-field--multi-control.tsx +1 -1
  141. package/docs/patterns/components-filterpanel--panel.tsx +1 -1
  142. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  143. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  144. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  145. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  146. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  147. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  148. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  149. package/docs/patterns/components-herointro--with-actions.tsx +1 -1
  150. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  151. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  152. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  153. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  154. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  155. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +8 -2
  156. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  157. package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
  158. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +2 -2
  159. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  160. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  161. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  162. package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
  163. package/docs/patterns/components-linktile--router-link.tsx +1 -1
  164. package/docs/patterns/components-logview--detail-pane.tsx +1 -1
  165. package/docs/patterns/components-logview--log-viewer.tsx +1 -1
  166. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  167. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  168. package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
  169. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  170. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  171. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  172. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  173. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  174. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +2 -2
  175. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  176. package/docs/patterns/components-prose--article-body.tsx +1 -1
  177. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  178. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  179. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  180. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  181. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  182. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  183. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  184. package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
  185. package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
  186. package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
  187. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  188. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  189. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  190. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  191. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  192. package/docs/patterns/components-stat--hero-stat.tsx +1 -1
  193. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  194. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  195. package/docs/patterns/components-switch--default.tsx +1 -1
  196. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  197. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  198. package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
  199. package/docs/patterns/components-table--approvals.tsx +1 -1
  200. package/docs/patterns/components-table--basic.tsx +1 -1
  201. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  202. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  203. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  204. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  205. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  206. package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
  207. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  208. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  209. package/docs/patterns/components-textarea--save-status.tsx +1 -1
  210. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  211. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  212. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  213. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  214. package/docs/patterns/components-textsequence--default.tsx +1 -1
  215. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  216. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  217. package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
  218. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  219. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  220. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  221. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  222. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  223. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  224. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  225. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  226. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  227. package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
  228. package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
  229. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  230. package/docs/patterns/guides-post-page--post-page.tsx +1 -1
  231. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  232. package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
  233. package/docs/patterns/index.json +5 -5
  234. package/package.json +1 -1
  235. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +0 -25
package/CHANGELOG.md CHANGED
@@ -7,6 +7,76 @@ 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.35
11
+
12
+ **Contact and booking forms: two steps, booking after the request, a way out above the calendar, and nothing lost on close.**
13
+
14
+ - **IntakeModal** (Contact and booking forms T7, T9):
15
+ - Two steps by default (`steps` was 4): details, then the optional booking. The confirmation isn't counted.
16
+ - New `hasAnswers`: with typed answers, Close and Escape ask "Discard your answers?" (Keep editing, focused / Discard).
17
+ - New **useIntakeUrlState**: keeps `?sketch` in the URL while the modal is open. The link can be shared, a refresh reopens it, and Back closes it.
18
+ - **CalEmbed** (T8): the "Skip, just email me" link sits **above** the calendar, so on a phone it's visible without scrolling past the month. With no embed (not set up, or it failed), the email route shows inside the empty state straight away.
19
+ - **CalEmbed stories:** "Pattern — skip in footer" is replaced by **Pattern — skip above the calendar** (`CalEmbed.Skip` in `Card.Header`). The pasted pattern id changes, so `wmds-check` reports `pattern-removed` for copies of the old one: move the skip above the calendar.
20
+ - **IntakeConfirmation** (T2, T3): one "what happens next and when" sentence: `email` and `replyWithin` (default "within one business day") give "We'll email you at {email} within one business day with a few times that fit."; the booked variant names `bookingTime` in it. `summary` shows as "You told us: “…”". Then `contact`, then Done. New export `intakeConfirmationReplyWithin`.
21
+ - **IntakeModal**: no Back on step 1; the WM mark and wordmark take the ink in dark mode (navy on near-black failed 3:1).
22
+ - **IntakeHoneypot** and `isIntakeHoneypotFilled` (new, T4): a spam trap people never see or reach (`aria-hidden`, `tabindex="-1"`, no autofill). Drop requests where it's filled, on the server, with rate limits. No CAPTCHA.
23
+ - Stories **Components/IntakeModal → Pattern — sketch request** (details → optional booking → confirmation; "Send my request"; reply time under the form; contact details on the confirmation) and **Pattern — send failed** (answers kept, Try again, email route; T5, T6). Interaction tests cover the URL, the discard question, both steps, Back keeping answers, the skip above the calendar, the failure and the honeypot.
24
+
25
+ ### Consumer actions
26
+
27
+ - Pass `steps={2}` or drop `steps`, and move the booking after the details are sent.
28
+ - Pass `hasAnswers` while the visitor has typed something, and keep answers in your state.
29
+ - Open the modal with `useIntakeUrlState`, and give the form its own page too (see wmds-patterns Contact — Sketch Page).
30
+ - Add **IntakeHoneypot** and check it on the server.
31
+ - On the confirmation, pass `summary` and `contact`. Pass `email` so the sentence names it, and change `replyWithin` if one business day isn't true for you.
32
+ - If you placed `CalEmbed.Skip` after the calendar (for example in `Card.Footer`), move it to `Card.Header`, above the calendar.
33
+
34
+ ## 0.4.34
35
+
36
+ **Required and optional fields: mark the exception, read the badge with the field, never on autofill. Field width and form layout: widths that hint at the answer, a State select, side labels only on wide screens, and counters that don't cut text. Dropdowns, radios and checkboxes: a native Select for forms, bigger boxes with visible borders, and errors on Continue.**
37
+
38
+ - **Field** `description` sits **between the label and the control** (was below; Labels and placeholders F8), so every hint is read before typing. New **`counter`** prop: a character counter, the one helper that stays below the control. Both join the control's accessible description (hint first). New test **fieldHintOrder.test.ts**.
39
+ - **IntakeForm**: hints above their fields; the details counter ("67 / 400") uses `counter`, below the box. Company's hint is "So we can read up on you first."
40
+ - **Input** `endBadge` (Required and optional Q8):
41
+ - Screen readers hear the badge as part of the field's description, after the hint.
42
+ - With a status icon, the icon comes first, then the badge (it used to be the badge, then the icon).
43
+ - The field keeps room for the badge, so a long value stops before it. A new interaction test checks this at phone width.
44
+ - Input warns in the console when `endBadge` sits on an autofill field (`autoComplete` name, email, tel, password, address or organization fields).
45
+ - **wmds-check** `badge-on-autofill` (new, error): fails an Input with `endBadge` on an autofill field. Put "(optional)" in the label there.
46
+ - **IntakeForm** (Q2, Q7, Q9):
47
+ - Name, email and project details carry `aria-required`.
48
+ - The website field is now labelled "Your website", with an "Optional" badge and a stated use ("So we can see what you have now.").
49
+ - **Company is off by default** (`company` turns it on). It's labelled "Company (optional)", since it's an autofill field.
50
+ - **Field width** (Form layout L7): **Input** and **Select** take `width` in characters (`2ch`, `4ch`, `5ch`, `10ch`, `20ch`; default `full`) for fixed-length answers, never wider than their container. The label and hint keep their own width. A short field keeps its width when an error shows; the status band under it is at least 18rem wide, so the message reads on one or two lines. Story **Components/Input → Pattern — field widths** (city, state and ZIP share a row).
51
+ - **State select** (L7): `usStateOptions` (new export) lists the 50 states and DC as two-letter abbreviations. Story **Components/Select → Pattern — US state**.
52
+ - **Select `native`** (Dropdowns C8): the browser's own `<select>` in the WMDS shell, with the same chevron, sizes and focus ring, and 16px text on touch. The phone opens its own picker, typing jumps to an option, the browser can autofill it (`autoComplete="address-level1"`), and it submits with a plain form. It's the default when a Select has `name` or `autoComplete`. The custom listbox stays for toolbars, filters and menus with icons or counts (native options are text only). New `required` prop.
53
+ - **Select** `description` sits above the trigger (Labels F8), like Input, TextArea and Field.
54
+ - **Field** `orientation="horizontal"` (L8) puts the label beside the control only from `lg` (1024) and stacks below it. Use it for dense app settings only, never marketing or contact forms.
55
+ - **IntakeForm counter** (L9): no `maxLength`, so a long paste stays whole. The counter says "N characters left" or "You have N characters too many". A screen reader hears it once typing pauses, not on every keystroke. Over the limit, the error band repeats the counter's words ("You have 7 characters too many"), and the counter line hides while the band shows: one message, not two. `intakeCounterText` is exported. Story **Pattern — over the character limit**.
56
+ - **IntakeModal footer** (Buttons U6, U8): Continue comes first and stays enabled; Back follows as a `ghost` button. **IntakeForm `submitCount`** (new): the caller counts Continue presses. From the first press, every field shows its error. Two or more errors put an **ErrorSummary** at the top and focus it; one error focuses its field (V5, closes gap #49). `continueDisabled` is now discouraged. Story **Components/IntakeModal → Pattern — errors on Continue**.
57
+ - **Select**'s empty-choice text ("Select…") uses `text-muted`, which clears 4.5:1. It was `text-disabled`, which failed axe.
58
+ - **StepProgress** names its progressbar ("Step 1 of 4"), fixing a known axe violation.
59
+ - **Checkbox and Radio** (Dropdowns C3, C4):
60
+ - The box is 24px (`md`; `sm` grows to 24px on touch screens).
61
+ - Rows are 44px tall on touch screens.
62
+ - The empty box's border uses `border-control`, which clears 3:1 (it was 1.3:1).
63
+ - **PillGroup** `label` (new): a visible question above the pills that names the group (C2, C9). `aria-label` is now optional, for a question shown as a heading right above.
64
+ - **Docs** (C7, C9): when to use Select, Switch, SegmentedControl, PillGroup and SelectableCard. The Select "with label" story now has 8 alphabetical options, and the PillGroup story starts with nothing selected.
65
+ - **Stories:** the Input badge stories use a website field with "Optional", not an email field. They add "Pattern — end badge with a long value" and "Pattern — end badge + status icon". The validation morph demo drops its badge from the email field.
66
+
67
+ ### Consumer actions
68
+
69
+ - Run `npx wmds-check`, and move any badge on a name, email, phone, password, address or company field into its label ("Business email (optional)").
70
+ - Mark the exception: in a mostly-required form, badge the optional fields "Optional".
71
+ - `IntakeForm` no longer shows Company unless you pass `company`. The website field's accessible name changed from "Link" to "Your website".
72
+
73
+ - Give ZIP, phone, year and state fields a `width`, and use `usStateOptions` for a State select with `autoComplete="address-level1"`. Remove `maxLength` from text people write, and show a counter instead.
74
+ - Form Selects with `name` or `autoComplete` are now native; pass `native={false}` to keep the custom listbox (needed for options with `start`/`end`).
75
+ - IntakeModal: stop passing `continueDisabled`. Count Continue presses into IntakeForm's `submitCount` instead, and note that Back is now a ghost button after Continue.
76
+ - Give **PillGroup** a `label` (the question).
77
+ - `Field orientation="horizontal"` now stacks below 1024px. If you relied on side labels on tablets, that changes.
78
+ - If a **Field** `description` is a character counter, pass it as `counter` so it stays below the control.
79
+
10
80
  ## 0.4.33
11
81
 
12
82
  **Cards can take their own tone, and a Carousel can drift on its own with a Pause button and a follow cursor.**
@@ -22,6 +22,9 @@
22
22
  * (Errors and validation V10; a status-only success tick is fine)
23
23
  * missing-label error a WMDS Input, TextArea, Select or Search with no label, aria-label or
24
24
  * aria-labelledby (Labels and placeholders F7; a spread {...props} is trusted)
25
+ * badge-on-autofill error an Input with endBadge on an autofill field (autoComplete name, email, tel,
26
+ * password, address, organization…; Required and optional Q8): autofill paints
27
+ * over the badge, so say "(optional)" in the label
25
28
  * brand-contrast error a brand-kit pair in the app's CSS under WCAG AA 4.5:1: --color-on-X (and
26
29
  * --color-on-X-muted) on --color-X, for primary, brand-surface and field,
27
30
  * when both are hex values in the same rule
@@ -55,6 +58,15 @@ try {
55
58
  // Not installed: the pattern rules are skipped.
56
59
  }
57
60
 
61
+ // Required and optional Q8: autocomplete tokens browsers fill (same list as autofillFields.ts).
62
+ const autofillTokens = [
63
+ "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname",
64
+ "email", "username", "new-password", "current-password", "one-time-code", "organization", "organization-title",
65
+ "street-address", "address-line1", "address-line2", "address-line3", "address-level1", "address-level2",
66
+ "address-level3", "address-level4", "country", "country-name", "postal-code",
67
+ "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-extension",
68
+ ];
69
+
58
70
  const skipDirs = new Set(["node_modules", ".next", "dist", "build", "out", ".git", "coverage", "storybook-static"]);
59
71
  const files = [];
60
72
  const cssFiles = [];
@@ -264,6 +276,18 @@ for (const file of files) {
264
276
  }
265
277
  }
266
278
 
279
+ // Q8: no badge inside an autofill field. Keep this list in step with src/components/atoms/Input/autofillFields.ts.
280
+ for (const match of source.matchAll(/<Input(?=[\s/>])/g)) {
281
+ const element = elementFrom(match.index);
282
+ if (!/\bendBadge=/.test(element)) continue;
283
+ const autoComplete = element.match(/\bautoComplete=(?:"([^"]*)"|\{\s*["']([^"']*)["']\s*\})/);
284
+ const value = autoComplete?.[1] ?? autoComplete?.[2];
285
+ if (value == null || !value.toLowerCase().split(/\s+/).some((token) => autofillTokens.includes(token))) continue;
286
+ const line = source.slice(0, match.index).split("\n").length;
287
+ if (ignored(lines, line - 1, "badge-on-autofill")) continue;
288
+ report(file, line, "badge-on-autofill", "error", `endBadge on autoComplete="${value}" — autofill covers it; put "(optional)" in the label`);
289
+ }
290
+
267
291
  // V10: an error or warning status always says what's wrong.
268
292
  for (const match of source.matchAll(/\bstatus=(?:"(error|warning)"|\{\s*["'](error|warning)["']\s*\})/g)) {
269
293
  const element = elementFrom(source.lastIndexOf("<", match.index));
@@ -9,7 +9,7 @@ export declare const checkboxBoxSizeClasses: Record<CheckboxSize, string>;
9
9
  export declare const checkboxCheckIconSizeClasses: Record<CheckboxSize, string>;
10
10
  export declare const checkboxIndeterminateBarSizeClasses: Record<CheckboxSize, string>;
11
11
  export declare const checkboxBoxBaseClasses: string;
12
- export declare const checkboxBoxUncheckedClasses = "border-border-emphasized bg-surface group-hover/checkbox:border-border-emphasized group-hover/checkbox:bg-body";
12
+ export declare const checkboxBoxUncheckedClasses = "border-border-control bg-surface group-hover/checkbox:border-border-control group-hover/checkbox:bg-body";
13
13
  export declare const checkboxBoxCheckedClasses = "border-primary bg-primary text-primary-foreground group-hover/checkbox:border-primary group-hover/checkbox:bg-primary";
14
14
  /** Check / indeterminate / spinner marks on the filled box. */
15
15
  export declare const checkboxMarkClasses = "stroke-current text-inherit";
@@ -1 +1 @@
1
- {"version":3,"file":"checkboxStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/checkboxStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,aAAa,uBAAwB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAG/D,CAAC;AAEF,kIAAkI;AAClI,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAGrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAG/D,CAAC;AAEF,eA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iFAAiF;AACjF,eAAO,MAAM,0BAA0B,QAAiD,CAAC;AAEzF,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,QAAkE,CAAC;AAEpG,yFAAyF;AACzF,eAAO,MAAM,2BAA2B,WAAW,CAAC;AAEpD,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,sCAAsC,CAAC;AAEjF,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AAExE,eAAO,MAAM,mCAAmC,QAA4C,CAAC;AAE7F,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAGtE,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAGjF,CAAC;AAEF,eAAO,MAAM,sBAAsB,uDACmB,CAAC;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,kBAAkB,QAA0D,CAAC;AAE1F,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAE/D,eAAO,MAAM,0BAA0B,+HACuF,CAAC;AAE/H,eAAO,MAAM,wBAAwB,sKACgI,CAAC;AAEtK,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,OAAO,EACtB,QAAQ,CAAC,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAWR;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAK7F;AAED,iEAAiE;AACjE,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAK1E"}
@@ -5,21 +5,21 @@ import { motionTransition as n } from "../../../lib/motion.js";
5
5
  import { inputStatusBannerSurfaceClasses as r, inputStatusShellClasses as i } from "../Input/inputShellStyles.js";
6
6
  //#region src/components/atoms/Checkbox/checkboxStyles.ts
7
7
  var a = ["sm", "md"], o = {
8
- sm: "min-h-7 gap-2",
9
- md: "min-h-9 gap-2.5"
8
+ sm: "min-h-7 gap-2 pointer-coarse:min-h-11",
9
+ md: "min-h-9 gap-2.5 pointer-coarse:min-h-11"
10
10
  }, s = {
11
- sm: "size-7",
11
+ sm: "size-7 pointer-coarse:size-9",
12
12
  md: "size-9"
13
13
  }, c = {
14
- sm: "size-[18px] rounded",
15
- md: "size-[22px] rounded-md"
14
+ sm: "size-[18px] rounded pointer-coarse:size-6",
15
+ md: "size-6 rounded-md"
16
16
  }, l = {
17
17
  sm: "size-3",
18
18
  md: "size-3.5"
19
19
  }, u = {
20
20
  sm: "h-0.5 w-2.5",
21
21
  md: "h-0.5 w-3"
22
- }, d = e("pointer-events-none flex items-center justify-center border shadow-none", "transition-[background-color,border-color,color]", n("fast")), f = "border-border-emphasized bg-surface group-hover/checkbox:border-border-emphasized group-hover/checkbox:bg-body", p = "border-primary bg-primary text-primary-foreground group-hover/checkbox:border-primary group-hover/checkbox:bg-primary", m = "stroke-current text-inherit", h = "opacity-50", g = t("ui-label"), _ = e(t("caption"), "leading-snug"), v = e("ml-auto shrink-0 tabular-nums", t("caption")), y = "flex-1", b = "flex min-w-0 items-baseline gap-2", x = "flex min-w-0 flex-col gap-px", S = e(g, "leading-tight"), C = {
22
+ }, d = e("pointer-events-none flex items-center justify-center border shadow-none", "transition-[background-color,border-color,color]", n("fast")), f = "border-border-control bg-surface group-hover/checkbox:border-border-control group-hover/checkbox:bg-body", p = "border-primary bg-primary text-primary-foreground group-hover/checkbox:border-primary group-hover/checkbox:bg-primary", m = "stroke-current text-inherit", h = "opacity-50", g = t("ui-label"), _ = e(t("caption"), "leading-snug"), v = e("ml-auto shrink-0 tabular-nums", t("caption")), y = "flex-1", b = "flex min-w-0 items-baseline gap-2", x = "flex min-w-0 flex-col gap-px", S = e(g, "leading-tight"), C = {
23
23
  sm: "flex min-w-0 items-start gap-2",
24
24
  md: "flex min-w-0 items-start gap-2.5"
25
25
  }, w = {
@@ -1,10 +1,12 @@
1
1
  import { type InputHTMLAttributes, type ReactElement, type ReactNode } from "react";
2
2
  import { type InputMessagePosition, type InputSize, type InputStatus } from "./inputShellStyles";
3
+ import { type FieldWidth } from "./fieldWidth";
4
+ export { fieldWidths, type FieldWidth } from "./fieldWidth";
3
5
  export type { InputMessagePosition, InputSize, InputStatus } from "./inputShellStyles";
4
6
  export { inputMessagePositions, inputSizes, inputStatuses } from "./inputShellStyles";
5
7
  /** Layout-only — not for colors, borders, or typography overrides. */
6
8
  export type InputLayoutClassName = string;
7
- export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
9
+ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "width"> {
8
10
  size?: InputSize;
9
11
  /**
10
12
  * Optional visible label — omit for bare inputs. No label asterisk; use `endBadge` for Required.
@@ -26,10 +28,18 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
26
28
  /** Monospace value — `type-code` instead of the sans face. For a read-only key or id. */
27
29
  mono?: boolean;
28
30
  /**
29
- * Trailing inset inside the shell — pass {@link Badge} (e.g. Required).
30
- * Atoms cannot import Badge; compose at call site. Combinable with `status` / `loading`.
31
+ * Trailing inset inside the shell — pass {@link Badge} ("Optional" or "Required", whichever is the
32
+ * exception in the form). Atoms cannot import Badge; compose at call site. Combinable with
33
+ * `status` / `loading`: the status icon comes first, then the badge. Screen readers hear it as part
34
+ * of the field's description. Not on autofill fields (name, email, tel, password, address,
35
+ * organization): autofill paints over it, so put "(optional)" in the label there.
31
36
  */
32
37
  endBadge?: ReactElement;
38
+ /**
39
+ * Field width in characters for fixed-length answers (ZIP `5ch`, year `4ch`, phone `10ch`); default
40
+ * `full`. Free-form answers stay full width (Form layout L7). The label and hint keep their own width.
41
+ */
42
+ width?: FieldWidth;
33
43
  /** Inside a parent pill (Search, CopyField) — no outer shell; the parent owns border and focus ring. */
34
44
  inline?: boolean;
35
45
  className?: InputLayoutClassName;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EA2BL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtF,sEAAsE;AACtE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC3D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2GAA2G;IAC3G,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,yFAAyF;IACzF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,wGAAwG;IACxG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AA2CD;;;GAGG;AACH,eA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Y,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,wGAAwG;IACxG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAyED;;;GAGG;AACH,eAAO,MAAM,KAAK,yGAgMhB,CAAC"}
@@ -1,100 +1,135 @@
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 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
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
4
+ import { inputAttachedFieldClasses as n, inputAttachedInputClasses as r, inputBaseClasses as i, inputCompoundInnerFieldClassesFor as ee, inputCompoundShellClassesFor as te, inputControlStackClasses as a, inputDisabledClasses as o, inputEndBadgeAndStatusGapClasses as s, inputEndBadgeGapClasses as c, inputEndBadgeWrapperClasses as ne, inputFieldStackClasses as re, inputIconGapClasses as l, inputIconPositionClasses as ie, inputIconSizeClasses as ae, inputInlineClasses as u, inputMessagePositions as d, inputShellClasses as f, inputSizeClasses as p, inputSizes as m, inputSoloFocusRingBaseClasses as oe, inputSoloFocusRingColorClasses as h, inputSoloRadiusClasses as se, inputStatusGapClasses as g, inputStatusShellClasses as ce, inputStatuses as _, inputTrailingInsetClasses as le, inputTrailingInsetPositionClasses as ue } from "./inputShellStyles.js";
5
+ import { InputStatusBanner as de, warnStatusWithoutMessage as fe } from "../inputShared/InputStatusBanner.js";
6
+ import { InputTrailingAffordance as v } from "../inputShared/InputTrailingAffordance.js";
7
+ import { isAutofillField as y } from "./autofillFields.js";
8
+ import { fieldWidthBandStyle as b, fieldWidthStyle as x, fieldWidths as S } from "./fieldWidth.js";
9
+ import { forwardRef as C, useId as pe } from "react";
10
+ import { Fragment as me, jsx as w, jsxs as T } from "react/jsx-runtime";
9
11
  //#region src/components/atoms/Input/Input.tsx
10
- function k(e) {
12
+ function E(e) {
11
13
  e.label == null && e["aria-label"] == null && e["aria-labelledby"] == null && console.warn("[WMDS Input] Provide `label`, `aria-label`, or `aria-labelledby`.");
12
14
  }
13
- function A(e) {
15
+ function D(e, t) {
16
+ e && y(t) && console.warn(`[WMDS Input] No \`endBadge\` on an autofill field (autocomplete="${t}"): put "(optional)" in the label.`);
17
+ }
18
+ function O(e) {
14
19
  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
20
  }
16
- function j(e, t, n) {
17
- return t && n ? s[e] : t ? c[e] : n ? y[e] : !1;
21
+ var k = {
22
+ sm: .625,
23
+ md: .75,
24
+ lg: 1
25
+ }, A = {
26
+ sm: 2,
27
+ md: 2.5,
28
+ lg: 2.75
29
+ }, j = {
30
+ [g.sm]: 2,
31
+ [g.md]: 2.5,
32
+ [g.lg]: 2.75,
33
+ [c.sm]: 4.5,
34
+ [c.md]: 5,
35
+ [c.lg]: 6,
36
+ [s.sm]: 6.5,
37
+ [s.md]: 7,
38
+ [s.lg]: 8
39
+ };
40
+ function M(e, t, n) {
41
+ let r = k[e];
42
+ return `${(t ? A[e] : r) + (n === !1 ? r : j[n] ?? r)}rem + 2px`;
43
+ }
44
+ function N(e, t, n) {
45
+ return t && n ? s[e] : t ? c[e] : n ? g[e] : !1;
18
46
  }
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;
22
- k({
47
+ var P = C(function({ size: s = "md", label: c, description: d, status: m, message: g, messagePosition: _ = "bottom", loading: y = !1, icon: S, endBadge: C, width: k = "full", mono: A = !1, inline: j = !1, className: P, disabled: F, id: I, "aria-describedby": L, ...R }, z) {
48
+ fe("Input", m, g);
49
+ let he = pe(), B = I ?? he;
50
+ E({
23
51
  label: c,
24
- "aria-label": B["aria-label"],
25
- "aria-labelledby": B["aria-labelledby"]
26
- }), A({
27
- status: _,
28
- message: y,
29
- messagePosition: b,
30
- loading: T,
31
- inline: F,
52
+ "aria-label": R["aria-label"],
53
+ "aria-labelledby": R["aria-labelledby"]
54
+ }), O({
55
+ status: m,
56
+ message: g,
57
+ messagePosition: _,
58
+ loading: y,
59
+ inline: j,
32
60
  label: c,
33
- description: m
61
+ description: d
34
62
  });
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 = [
36
- z,
37
- Y,
38
- X
39
- ].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ O(E, { children: [
40
- q ? /* @__PURE__ */ D("span", {
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]),
63
+ let V = g != null && g.length > 0 && m != null, H = C != null;
64
+ D(H, R.autoComplete);
65
+ let U = !V && (y || m != null), W = S != null, G = N(s, H, U), K = d == null ? void 0 : `${B}-description`, q = V ? `${B}-message` : void 0, J = H ? `${B}-badge` : void 0, ge = [
66
+ L,
67
+ K,
68
+ J,
69
+ q
70
+ ].filter(Boolean).join(" ") || void 0, _e = /* @__PURE__ */ T(me, { children: [
71
+ W ? /* @__PURE__ */ w("span", {
72
+ className: e("pointer-events-none absolute top-1/2 inline-flex -translate-y-1/2 [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", ie[s], ae[s]),
42
73
  "aria-hidden": !0,
43
- children: M
74
+ children: S
44
75
  }) : null,
45
- /* @__PURE__ */ D("input", {
46
- ...B,
47
- ref: V,
48
- id: U,
49
- disabled: L,
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)))
76
+ /* @__PURE__ */ w("input", {
77
+ ...R,
78
+ ref: z,
79
+ id: B,
80
+ disabled: F,
81
+ "aria-invalid": m === "error" || void 0,
82
+ "aria-describedby": ge,
83
+ className: e(o, A && "type-code !font-mono !leading-none", V ? e(n, p[s], W && l[s], G, r) : e(i, j ? e(u, W && l[s], P ?? p[s]) : e(p[s], W && l[s], G, m != null && m !== "success" ? e("border", ce[m]) : f[s], se[s], oe, m != null && m !== "success" ? h[m] : h.default, P)))
53
84
  }),
54
- G || K ? /* @__PURE__ */ O("span", {
55
- className: e(x, S[s]),
56
- children: [G ? /* @__PURE__ */ D("span", {
57
- className: ne,
58
- children: N
59
- }) : null, K ? /* @__PURE__ */ D(oe, {
85
+ H || U ? /* @__PURE__ */ T("span", {
86
+ className: e(le, ue[s]),
87
+ children: [U ? /* @__PURE__ */ w(v, {
60
88
  size: s,
61
- status: T ? void 0 : _,
62
- loading: T
89
+ status: y ? void 0 : m,
90
+ loading: y
91
+ }) : null, H ? /* @__PURE__ */ w("span", {
92
+ id: J,
93
+ className: ne,
94
+ children: C
63
95
  }) : null]
64
96
  }) : null
65
- ] }), Z = W && _ != null && X != null ? /* @__PURE__ */ D(C, {
66
- status: _,
67
- message: y,
68
- messageId: X,
97
+ ] }), Y = V && m != null && q != null ? /* @__PURE__ */ w(de, {
98
+ status: m,
99
+ message: g,
100
+ messageId: q,
69
101
  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),
102
+ messagePosition: _,
103
+ className: k === "full" ? void 0 : _ === "bottom" ? "rounded-tr-[1.375rem]" : "rounded-br-[1.375rem]"
104
+ }) : null, X = V && m != null, Z = M(s, W, G), Q = j ? void 0 : x(k, Z), $ = /* @__PURE__ */ T("div", {
105
+ style: X && !j ? b(k, Z) : Q,
106
+ className: X ? te(s, m) : e(j ? "relative flex min-w-0 flex-1 items-center" : a),
73
107
  children: [
74
- Q && b === "top" ? Z : null,
75
- /* @__PURE__ */ D("div", {
76
- className: Q ? i(s, _, b) : "relative flex w-full items-center",
77
- children: le
108
+ X && _ === "top" ? Y : null,
109
+ /* @__PURE__ */ w("div", {
110
+ style: X ? Q : void 0,
111
+ className: X ? ee(s, m, _) : "relative flex w-full items-center",
112
+ children: _e
78
113
  }),
79
- Q && b === "bottom" ? Z : null
114
+ X && _ === "bottom" ? Y : null
80
115
  ]
81
116
  });
82
- return F || c == null && m == null ? $ : /* @__PURE__ */ O("div", {
83
- className: l,
117
+ return j || c == null && d == null ? $ : /* @__PURE__ */ T("div", {
118
+ className: re,
84
119
  children: [
85
- c == null ? null : /* @__PURE__ */ D("label", {
86
- htmlFor: U,
87
- className: e(t("ui-label"), L && "opacity-50"),
120
+ c == null ? null : /* @__PURE__ */ w("label", {
121
+ htmlFor: B,
122
+ className: e(t("ui-label"), F && "opacity-50"),
88
123
  children: c
89
124
  }),
90
- Y == null ? null : /* @__PURE__ */ D("p", {
91
- id: Y,
125
+ K == null ? null : /* @__PURE__ */ w("p", {
126
+ id: K,
92
127
  className: t("caption"),
93
- children: m
128
+ children: d
94
129
  }),
95
130
  $
96
131
  ]
97
132
  });
98
133
  });
99
134
  //#endregion
100
- export { M as Input, m as inputMessagePositions, _ as inputSizes, b as inputStatuses };
135
+ export { P as Input, S as fieldWidths, d as inputMessagePositions, m as inputSizes, _ as inputStatuses };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Required and optional fields Q8: autocomplete tokens the browser or a password manager fills.
3
+ * Autofill paints over a badge inside the field, so these fields say "(optional)" in the label instead.
4
+ * bin/wmds-check.mjs keeps the same list (a unit test holds them together).
5
+ */
6
+ export declare const autofillTokens: readonly ["name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "email", "username", "new-password", "current-password", "one-time-code", "organization", "organization-title", "street-address", "address-line1", "address-line2", "address-line3", "address-level1", "address-level2", "address-level3", "address-level4", "country", "country-name", "postal-code", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-extension"];
7
+ /** True when an `autocomplete` value names an autofill field ("shipping postal-code" counts). */
8
+ export declare function isAutofillField(autoComplete: string | undefined): boolean;
9
+ //# sourceMappingURL=autofillFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autofillFields.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Input/autofillFields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc,wfAgCjB,CAAC;AAEX,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIzE"}
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ //#region src/components/atoms/Input/autofillFields.ts
3
+ var e = /* @__PURE__ */ "name.honorific-prefix.given-name.additional-name.family-name.honorific-suffix.nickname.email.username.new-password.current-password.one-time-code.organization.organization-title.street-address.address-line1.address-line2.address-line3.address-level1.address-level2.address-level3.address-level4.country.country-name.postal-code.tel.tel-country-code.tel-national.tel-area-code.tel-local.tel-extension".split(".");
4
+ function t(t) {
5
+ return t != null && t.toLowerCase().split(/\s+/).some((t) => e.includes(t));
6
+ }
7
+ //#endregion
8
+ export { e as autofillTokens, t as isAutofillField };
@@ -0,0 +1,19 @@
1
+ import type { CSSProperties } from "react";
2
+ /**
3
+ * Form layout L7: a field's width hints at the answer. Characters for fixed-length answers (ZIP 5ch,
4
+ * a US state 2ch, a year 4ch, a phone 10ch…), `full` for everything else.
5
+ */
6
+ export declare const fieldWidths: readonly ["2ch", "4ch", "5ch", "10ch", "20ch", "full"];
7
+ export type FieldWidth = (typeof fieldWidths)[number];
8
+ /**
9
+ * Width for the field's shell: the characters plus the shell's own padding, border and insets (`chrome`,
10
+ * a CSS length), never wider than its container. `ch` is the inherited body face's, so the shell has a
11
+ * little room to spare at the smaller field sizes.
12
+ */
13
+ export declare function fieldWidthStyle(width: FieldWidth, chrome: string): CSSProperties | undefined;
14
+ /**
15
+ * The status band under a short field: at least 18rem (or the container), so a message reads on one or
16
+ * two lines while the field itself keeps its width — no jump when an error appears.
17
+ */
18
+ export declare function fieldWidthBandStyle(width: FieldWidth, chrome: string): CSSProperties | undefined;
19
+ //# sourceMappingURL=fieldWidth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldWidth.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Input/fieldWidth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,WAAW,wDAAyD,CAAC;AAElF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAG5F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAGhG"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ //#region src/components/atoms/Input/fieldWidth.ts
3
+ var e = [
4
+ "2ch",
5
+ "4ch",
6
+ "5ch",
7
+ "10ch",
8
+ "20ch",
9
+ "full"
10
+ ];
11
+ function t(e, t) {
12
+ if (e !== "full") return {
13
+ width: `calc(${e} + ${t})`,
14
+ maxWidth: "100%"
15
+ };
16
+ }
17
+ function n(e, t) {
18
+ if (e !== "full") return {
19
+ width: `max(calc(${e} + ${t}), min(100%, 18rem))`,
20
+ maxWidth: "100%"
21
+ };
22
+ }
23
+ //#endregion
24
+ export { n as fieldWidthBandStyle, t as fieldWidthStyle, e as fieldWidths };
@@ -7,7 +7,7 @@ export declare const radioHitTargetSizeClasses: Record<RadioSize, string>;
7
7
  export declare const radioCircleSizeClasses: Record<RadioSize, string>;
8
8
  export declare const radioDotSizeClasses: Record<RadioSize, string>;
9
9
  export declare const radioCircleBaseClasses: string;
10
- export declare const radioCircleUncheckedClasses = "border-border-emphasized bg-surface group-hover/radio:border-border-emphasized group-hover/radio:bg-body";
10
+ export declare const radioCircleUncheckedClasses = "border-border-control bg-surface group-hover/radio:border-border-control group-hover/radio:bg-body";
11
11
  export declare const radioCircleCheckedClasses = "border-primary bg-primary group-hover/radio:border-primary group-hover/radio:bg-primary";
12
12
  export declare const radioDotClasses = "rounded-full bg-primary-foreground";
13
13
  export declare const radioCircleDisabledClasses = "opacity-50";
@@ -1 +1 @@
1
- {"version":3,"file":"radioStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Radio/radioStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,WAAW,EACjB,MA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,0BAA0B,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAGhE,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAG3E,CAAC;AAEF,eAAO,MAAM,mBAAmB,oDAAoD,CAAC;AAErF,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,eAAO,MAAM,uBAAuB,8FACyD,CAAC;AAE9F,eAAO,MAAM,qBAAqB,sKACmI,CAAC;AAEtK,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CASR;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAK1F;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAKvE"}
@@ -5,18 +5,18 @@ import { motionTransition as n } from "../../../lib/motion.js";
5
5
  import { inputStatusBannerSurfaceClasses as r, inputStatusShellClasses as i } from "../Input/inputShellStyles.js";
6
6
  //#region src/components/atoms/Radio/radioStyles.ts
7
7
  var a = ["sm", "md"], o = {
8
- sm: "min-h-7 gap-2",
9
- md: "min-h-9 gap-2.5"
8
+ sm: "min-h-7 gap-2 pointer-coarse:min-h-11",
9
+ md: "min-h-9 gap-2.5 pointer-coarse:min-h-11"
10
10
  }, s = {
11
- sm: "size-7",
11
+ sm: "size-7 pointer-coarse:size-9",
12
12
  md: "size-9"
13
13
  }, c = {
14
- sm: "size-[18px] rounded-full",
15
- md: "size-[22px] rounded-full"
14
+ sm: "size-[18px] rounded-full pointer-coarse:size-6",
15
+ md: "size-6 rounded-full"
16
16
  }, l = {
17
17
  sm: "size-2",
18
18
  md: "size-2.5"
19
- }, u = e("pointer-events-none flex items-center justify-center border shadow-none", "transition-[background-color,border-color]", n("fast")), d = "border-border-emphasized bg-surface group-hover/radio:border-border-emphasized group-hover/radio:bg-body", f = "border-primary bg-primary group-hover/radio:border-primary group-hover/radio:bg-primary", p = "rounded-full bg-primary-foreground", m = "opacity-50", h = t("ui-label"), g = e(t("caption"), "leading-snug"), _ = "flex min-w-0 flex-col gap-px", v = e(h, "leading-tight"), y = {
19
+ }, u = e("pointer-events-none flex items-center justify-center border shadow-none", "transition-[background-color,border-color]", n("fast")), d = "border-border-control bg-surface group-hover/radio:border-border-control group-hover/radio:bg-body", f = "border-primary bg-primary group-hover/radio:border-primary group-hover/radio:bg-primary", p = "rounded-full bg-primary-foreground", m = "opacity-50", h = t("ui-label"), g = e(t("caption"), "leading-snug"), _ = "flex min-w-0 flex-col gap-px", v = e(h, "leading-tight"), y = {
20
20
  sm: "flex min-w-0 items-start gap-2",
21
21
  md: "flex min-w-0 items-start gap-2.5"
22
22
  }, b = {
@@ -4,7 +4,7 @@ export type CalEmbedLayoutClassName = string;
4
4
  export declare const calEmbedSkipHref = "#email";
5
5
  export declare const calEmbedSkipLabel = "Skip, just email me";
6
6
  export declare const calEmbedEmptyTitle = "Booking isn\u2019t available right now";
7
- export declare const calEmbedEmptyDescription = "Skip this step and we\u2019ll follow up by email.";
7
+ export declare const calEmbedEmptyDescription = "We\u2019ll follow up by email with a few times instead.";
8
8
  export interface CalEmbedSkipProps {
9
9
  /** Skip destination. Default `#email`. */
10
10
  skipHref?: string;
@@ -26,10 +26,10 @@ export interface CalEmbedProps {
26
26
  /** Empty-state supporting line. Default points visitors at the skip. */
27
27
  emptyDescription?: ReactNode;
28
28
  /**
29
- * Skip slot. Omit to render the default **TextLink** after the frame.
30
- * Pass `false` or **CalEmbed.Skip** when you place the skip yourself
31
- * (typically **Card.Footer**). CalEmbed does not render an in-body skip
32
- * when this slot is used.
29
+ * Skip slot. Omit to render the default **TextLink** above the frame (or inside the empty state).
30
+ * Pass `false` or **CalEmbed.Skip** when you place the skip yourself. Keep it visible without
31
+ * scrolling past the calendar at 390 (T8): above the frame or in a pinned footer, not after a month
32
+ * grid. CalEmbed does not render an in-body skip when this slot is used.
33
33
  */
34
34
  skip?: ReactNode | false;
35
35
  /** Skip destination when the in-body skip is shown. Default `#email`. */
@@ -41,7 +41,7 @@ export interface CalEmbedProps {
41
41
  className?: CalEmbedLayoutClassName;
42
42
  }
43
43
  /**
44
- * Same **TextLink** CalEmbed uses after the frame. Place it in **Card.Footer**
44
+ * Same **TextLink** CalEmbed uses above the frame. Place it in **Card.Header** (above the calendar, T8)
45
45
  * and pass `skip={false}` (or `skip={<CalEmbed.Skip />}`) so the in-body link is omitted.
46
46
  */
47
47
  export declare function CalEmbedSkip({ skipHref, skipLabel, onSkip, className, }: CalEmbedSkipProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CalEmbed.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CalEmbed/CalEmbed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAUnD,qCAAqC;AACrC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,kBAAkB,2CAAsC,CAAC;AACtE,eAAO,MAAM,wBAAwB,sDAAiD,CAAC;AAEvF,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iGAAiG;IACjG,UAAU,CAAC,E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