@thewhatmatters/wmds 0.4.31 → 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 (208) hide show
  1. package/CHANGELOG.md +22 -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/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  19. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +53 -53
  20. package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -1
  21. package/dist/components/molecules/CopyField/copyFieldStyles.js +1 -1
  22. package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts +32 -0
  23. package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts.map +1 -0
  24. package/dist/components/molecules/ErrorSummary/ErrorSummary.js +37 -0
  25. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts +12 -0
  26. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts.map +1 -0
  27. package/dist/components/molecules/ErrorSummary/errorSummaryStyles.js +5 -0
  28. package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
  29. package/dist/components/molecules/IntakeForm/IntakeForm.js +4 -6
  30. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +3 -2
  31. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
  32. package/dist/components/molecules/PromptBar/promptBarStyles.js +2 -2
  33. package/dist/components/molecules/RadioGroup/RadioGroup.d.ts.map +1 -1
  34. package/dist/components/molecules/RadioGroup/RadioGroup.js +53 -53
  35. package/dist/components/molecules/Search/Search.d.ts +5 -0
  36. package/dist/components/molecules/Search/Search.d.ts.map +1 -1
  37. package/dist/components/molecules/Search/Search.js +14 -13
  38. package/dist/components/molecules/Search/searchStyles.d.ts +2 -1
  39. package/dist/components/molecules/Search/searchStyles.d.ts.map +1 -1
  40. package/dist/components/molecules/Search/searchStyles.js +4 -4
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +3 -1
  44. package/dist/styles.css +1 -1
  45. package/docs/components.md +2 -1
  46. package/docs/exports.json +14 -1
  47. package/docs/patterns/components-accordion--flush.tsx +1 -1
  48. package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
  49. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  50. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  51. package/docs/patterns/components-badge--status-pill.tsx +1 -1
  52. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  53. package/docs/patterns/components-band--page-in-bands.tsx +1 -1
  54. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  55. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  56. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  57. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  58. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  59. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  60. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  61. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  62. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  63. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  64. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  65. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  66. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  67. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  68. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  69. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  70. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  71. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  72. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  73. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  74. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  75. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  76. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  77. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  78. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  79. package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
  80. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  81. package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
  82. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  83. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  84. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  85. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  86. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  87. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  88. package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
  89. package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
  90. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  91. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
  92. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
  93. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  94. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  95. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  96. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  97. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  98. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  99. package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
  100. package/docs/patterns/components-copyfield--copied.tsx +1 -1
  101. package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
  102. package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
  103. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  104. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  105. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  106. package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
  107. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  108. package/docs/patterns/components-dialog--form-dialog.tsx +3 -3
  109. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  110. package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
  111. package/docs/patterns/components-errorsummary--contact-form.tsx +35 -0
  112. package/docs/patterns/components-field--horizontal-input.tsx +2 -2
  113. package/docs/patterns/components-field--horizontal-text-area.tsx +2 -2
  114. package/docs/patterns/components-field--multi-control.tsx +2 -2
  115. package/docs/patterns/components-filterpanel--panel.tsx +1 -1
  116. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  117. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  118. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  119. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  120. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  121. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  122. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  123. package/docs/patterns/components-herointro--with-actions.tsx +1 -1
  124. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  125. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  126. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  127. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  128. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  129. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  130. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  131. package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
  132. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  133. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  134. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  135. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  136. package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
  137. package/docs/patterns/components-linktile--router-link.tsx +1 -1
  138. package/docs/patterns/components-logview--detail-pane.tsx +1 -1
  139. package/docs/patterns/components-logview--log-viewer.tsx +1 -1
  140. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  141. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  142. package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
  143. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  144. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  145. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  146. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  147. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  148. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  149. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  150. package/docs/patterns/components-prose--article-body.tsx +1 -1
  151. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  152. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  153. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  154. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  155. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  156. package/docs/patterns/components-sheet--bottom-sheet.tsx +3 -3
  157. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  158. package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
  159. package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
  160. package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
  161. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  162. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  163. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  164. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  165. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  166. package/docs/patterns/components-stat--hero-stat.tsx +1 -1
  167. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  168. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  169. package/docs/patterns/components-switch--default.tsx +1 -1
  170. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  171. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  172. package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
  173. package/docs/patterns/components-table--approvals.tsx +1 -1
  174. package/docs/patterns/components-table--basic.tsx +1 -1
  175. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  176. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  177. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  178. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  179. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  180. package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
  181. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  182. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  183. package/docs/patterns/components-textarea--save-status.tsx +1 -1
  184. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  185. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  186. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  187. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  188. package/docs/patterns/components-textsequence--default.tsx +1 -1
  189. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  190. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  191. package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
  192. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  193. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  194. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  195. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  196. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  197. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  198. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  199. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  200. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  201. package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
  202. package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
  203. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +3 -3
  204. package/docs/patterns/guides-post-page--post-page.tsx +1 -1
  205. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  206. package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
  207. package/docs/patterns/index.json +9 -1
  208. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAMf,OAAO,EAkBL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAaD;;;GAGG;AACH,eAAO,MAAM,MAAM,0GA+KjB,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAMf,OAAO,EAkBL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAaD;;;GAGG;AACH,eAAO,MAAM,MAAM,0GAgLjB,CAAC"}
@@ -2,9 +2,9 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { motionTransitionProp as t } from "../../../lib/motion.js";
4
4
  import "../Input/inputShellStyles.js";
5
- import { InputStatusBanner as ee } from "../inputShared/InputStatusBanner.js";
6
- import { switchDescriptionClasses as n, switchDescriptionRowClasses as te, switchHiddenInputClasses as r, switchHitTargetDescriptionAlignClasses as i, switchHitTargetSizeClasses as a, switchLabelClassesFor as o, switchLayouts as s, switchRowBaseClasses as ne, switchRowLabelOnlyClasses as re, switchRowSizeClasses as ie, switchSettingsRowClasses as c, switchSizes as l, switchStatusBannerClassesFor as u, switchTextColumnClasses as d, switchThumbClasses as f, switchThumbOffsetPx as p, switchThumbSizeClasses as m, switchTrackClassesFor as ae } from "./switchStyles.js";
7
- import { forwardRef as h, useId as oe, useState as se } from "react";
5
+ import { InputStatusBanner as ee, warnStatusWithoutMessage as n } from "../inputShared/InputStatusBanner.js";
6
+ import { switchDescriptionClasses as te, switchDescriptionRowClasses as r, switchHiddenInputClasses as i, switchHitTargetDescriptionAlignClasses as ne, switchHitTargetSizeClasses as re, switchLabelClassesFor as a, switchLayouts as o, switchRowBaseClasses as ie, switchRowLabelOnlyClasses as s, switchRowSizeClasses as ae, switchSettingsRowClasses as oe, switchSizes as c, switchStatusBannerClassesFor as l, switchTextColumnClasses as u, switchThumbClasses as d, switchThumbOffsetPx as f, switchThumbSizeClasses as p, switchTrackClassesFor as se } from "./switchStyles.js";
7
+ import { forwardRef as m, useId as ce, useState as h } from "react";
8
8
  import { Loader2 as g } from "lucide-react";
9
9
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
10
10
  import { motion as b } from "motion/react";
@@ -16,24 +16,25 @@ var x = {
16
16
  function S(e) {
17
17
  e.message != null && e.status == null && console.warn("[WMDS Switch] `message` requires `status`.");
18
18
  }
19
- var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden: C = !1, description: w, status: T, message: E, loading: D = !1, className: O, disabled: k, readOnly: A, checked: j, defaultChecked: M, id: N, onChange: P, ...F }, I) {
20
- let L = oe(), R = N ?? L;
19
+ var C = m(function({ size: o = "md", layout: c = "inline", label: m, labelHidden: C = !1, description: w, status: T, message: E, loading: D = !1, className: O, disabled: k, readOnly: A, checked: j, defaultChecked: M, id: N, onChange: P, ...F }, I) {
20
+ n("Switch", T, E);
21
+ let L = ce(), R = N ?? L;
21
22
  S({
22
23
  status: T,
23
24
  message: E
24
25
  });
25
- let z = j !== void 0, [B, V] = se(M ?? !1), H = z ? !!j : B, U = k || D, W = D && !k, G = E != null && E.length > 0 && T != null, K = G ? `${R}-message` : void 0, q = w != null && !C ? `${R}-description` : void 0, ce = [
26
+ let z = j !== void 0, [B, V] = h(M ?? !1), H = z ? !!j : B, U = k || D, W = D && !k, G = E != null && E.length > 0 && T != null, K = G ? `${R}-message` : void 0, q = w != null && !C ? `${R}-description` : void 0, le = [
26
27
  F["aria-describedby"],
27
28
  q,
28
29
  K
29
- ].filter(Boolean).join(" ") || void 0, le = (e) => {
30
+ ].filter(Boolean).join(" ") || void 0, ue = (e) => {
30
31
  if (A || W) {
31
32
  e.preventDefault();
32
33
  return;
33
34
  }
34
35
  z || V(e.target.checked), P?.(e);
35
- }, ue = ae(s, H, U, G ? void 0 : T), J = w != null && !C, Y = t("fast"), X = p[s], Z = (t) => /* @__PURE__ */ y("span", {
36
- className: e("relative flex shrink-0 items-center justify-center", a[s], t),
36
+ }, de = se(o, H, U, G ? void 0 : T), J = w != null && !C, Y = t("fast"), X = f[o], Z = (t) => /* @__PURE__ */ y("span", {
37
+ className: e("relative flex shrink-0 items-center justify-center", re[o], t),
37
38
  children: [/* @__PURE__ */ v("input", {
38
39
  ...F,
39
40
  ref: I,
@@ -46,15 +47,15 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
46
47
  "aria-disabled": W || void 0,
47
48
  readOnly: A,
48
49
  "aria-invalid": T === "error" || void 0,
49
- "aria-describedby": ce,
50
+ "aria-describedby": le,
50
51
  "aria-busy": D || void 0,
51
- onChange: le,
52
- className: r
52
+ onChange: ue,
53
+ className: i
53
54
  }), /* @__PURE__ */ v("span", {
54
- className: ue,
55
+ className: de,
55
56
  "aria-hidden": !0,
56
57
  children: D ? /* @__PURE__ */ v(b.span, {
57
- className: e(m[s], "flex items-center justify-center"),
58
+ className: e(p[o], "flex items-center justify-center"),
58
59
  animate: { x: H ? X : 0 },
59
60
  transition: Y,
60
61
  children: /* @__PURE__ */ v(g, {
@@ -62,36 +63,36 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
62
63
  strokeWidth: 2
63
64
  })
64
65
  }) : /* @__PURE__ */ v(b.span, {
65
- className: e(f, m[s]),
66
+ className: e(d, p[o]),
66
67
  animate: { x: H ? X : 0 },
67
68
  transition: Y
68
69
  })
69
70
  })]
70
71
  }), Q = C ? /* @__PURE__ */ v("span", {
71
72
  className: "sr-only",
72
- children: h
73
+ children: m
73
74
  }) : /* @__PURE__ */ y("span", {
74
- className: d,
75
+ className: u,
75
76
  children: [/* @__PURE__ */ v("span", {
76
- className: o(U, J),
77
- children: h
77
+ className: a(U, J),
78
+ children: m
78
79
  }), J ? /* @__PURE__ */ v("span", {
79
80
  id: q,
80
- className: n,
81
+ className: te,
81
82
  children: w
82
83
  }) : null]
83
84
  }), $ = /* @__PURE__ */ v("label", {
84
85
  htmlFor: R,
85
- className: e(ne, l === "settings" ? c : re, l === "inline" && !J && ie[s], l === "inline" && J && void 0, U && "cursor-not-allowed", O),
86
+ className: e(ie, c === "settings" ? oe : s, c === "inline" && !J && ae[o], c === "inline" && J && void 0, U && "cursor-not-allowed", O),
86
87
  children: C ? /* @__PURE__ */ y(_, { children: [Z(), /* @__PURE__ */ v("span", {
87
88
  className: "sr-only",
88
- children: h
89
- })] }) : l === "settings" ? /* @__PURE__ */ y(_, { children: [Q, Z()] }) : J ? /* @__PURE__ */ y("span", {
90
- className: te[s],
91
- children: [Z(i[s]), Q]
89
+ children: m
90
+ })] }) : c === "settings" ? /* @__PURE__ */ y(_, { children: [Q, Z()] }) : J ? /* @__PURE__ */ y("span", {
91
+ className: r[o],
92
+ children: [Z(ne[o]), Q]
92
93
  }) : /* @__PURE__ */ y(_, { children: [Z(), C ? null : /* @__PURE__ */ v("span", {
93
- className: o(U),
94
- children: h
94
+ className: a(U),
95
+ children: m
95
96
  })] })
96
97
  });
97
98
  return !G || T == null || K == null ? $ : /* @__PURE__ */ y("div", {
@@ -100,11 +101,11 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
100
101
  status: T,
101
102
  message: E,
102
103
  messageId: K,
103
- size: x[s],
104
+ size: x[o],
104
105
  messagePosition: "bottom",
105
- bannerClassName: u(T)
106
+ bannerClassName: l(T)
106
107
  })]
107
108
  });
108
109
  });
109
110
  //#endregion
110
- export { C as Switch, s as switchLayouts, l as switchSizes };
111
+ export { C as Switch, o as switchLayouts, c as switchSizes };
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAKvE,OAAO,EAqBL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE1G,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACjE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAqBD;;;GAGG;AACH,eAAO,MAAM,QAAQ,+GA6JnB,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAKvE,OAAO,EAqBL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE1G,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACjE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAqBD;;;GAGG;AACH,eAAO,MAAM,QAAQ,+GAgKnB,CAAC"}
@@ -1,105 +1,106 @@
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, inputCompoundShellClassesFor as r, inputControlStackClasses as i, inputDisabledClasses as a, inputFieldStackClasses as o, inputStatusGapClasses as s } from "../Input/inputShellStyles.js";
5
- import { InputStatusBanner as c } from "../inputShared/InputStatusBanner.js";
6
- import { InputTrailingAffordance as ee } from "../inputShared/InputTrailingAffordance.js";
7
- import { textareaBaseClasses as l, textareaCompoundFieldPaddingClasses as u, textareaCompoundInnerFieldClassesFor as d, textareaFixedPaddingClasses as f, textareaInlineClasses as p, textareaMinHeightClasses as m, textareaResizeClasses as te, textareaResizes as h, textareaShellFieldClasses as g, textareaSoloShellClassesFor as _, textareaStatusBannerClassesFor as v, textareaTrailingInsetClasses as y, textareaTrailingInsetPositionClasses as b } from "./textareaShellStyles.js";
8
- import { forwardRef as x, useId as S } from "react";
9
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
4
+ import { inputAttachedFieldClasses as n, inputCompoundShellClassesFor as r, inputControlStackClasses as i, inputDisabledClasses as a, inputFieldStackClasses as o, inputStatusGapClasses as ee } from "../Input/inputShellStyles.js";
5
+ import { InputStatusBanner as s, warnStatusWithoutMessage as c } from "../inputShared/InputStatusBanner.js";
6
+ import { InputTrailingAffordance as l } from "../inputShared/InputTrailingAffordance.js";
7
+ import { textareaBaseClasses as u, textareaCompoundFieldPaddingClasses as d, textareaCompoundInnerFieldClassesFor as f, textareaFixedPaddingClasses as p, textareaInlineClasses as m, textareaMinHeightClasses as h, textareaResizeClasses as g, textareaResizes as _, textareaShellFieldClasses as v, textareaSoloShellClassesFor as te, textareaStatusBannerClassesFor as y, textareaTrailingInsetClasses as b, textareaTrailingInsetPositionClasses as x } from "./textareaShellStyles.js";
8
+ import { forwardRef as S, useId as C } from "react";
9
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
10
10
  //#region src/components/atoms/TextArea/TextArea.tsx
11
- function E(e) {
11
+ function D(e) {
12
12
  e.label == null && e["aria-label"] == null && e["aria-labelledby"] == null && console.warn("[WMDS TextArea] Provide `label`, `aria-label`, or `aria-labelledby`.");
13
13
  }
14
- function D(e) {
14
+ function O(e) {
15
15
  e.message != null && e.status == null && console.warn("[WMDS TextArea] `message` requires `status`."), e.inline && (e.label != null || e.description != null || e.liveStatus != null || e.status != null || e.message != null) && console.warn("[WMDS TextArea] `inline` is for PromptBar only — omit label, description, and validation.");
16
16
  }
17
- var O = x(function({ size: c = "md", label: h, description: v, status: x, message: O, liveStatus: A, messagePosition: j = "bottom", loading: M = !1, rows: N = 4, resize: P = "vertical", inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
18
- let H = S(), U = R ?? H;
19
- E({
20
- label: h,
17
+ var k = S(function({ size: s = "md", label: _, description: y, status: S, message: k, liveStatus: A, messagePosition: j = "bottom", loading: M = !1, rows: N = 4, resize: P = "vertical", inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
18
+ c("TextArea", S, k);
19
+ let H = C(), U = R ?? H;
20
+ D({
21
+ label: _,
21
22
  "aria-label": B["aria-label"],
22
23
  "aria-labelledby": B["aria-labelledby"]
23
- }), D({
24
- status: x,
25
- message: O,
24
+ }), O({
25
+ status: S,
26
+ message: k,
26
27
  inline: F,
27
- label: h,
28
- description: v,
28
+ label: _,
29
+ description: y,
29
30
  liveStatus: A
30
31
  });
31
- let W = O != null && O.length > 0 && x != null, G = !W && (M || x != null), K = v != null && !W ? `${U}-description` : void 0, q = W ? `${U}-message` : void 0, J = [
32
+ let W = k != null && k.length > 0 && S != null, G = !W && (M || S != null), K = y == null ? void 0 : `${U}-description`, q = W ? `${U}-message` : void 0, J = [
32
33
  z,
33
34
  K,
34
35
  q
35
36
  ].filter(Boolean).join(" ") || void 0;
36
- if (F) return /* @__PURE__ */ w("textarea", {
37
+ if (F) return /* @__PURE__ */ T("textarea", {
37
38
  ...B,
38
39
  ref: V,
39
40
  id: U,
40
41
  rows: N,
41
42
  disabled: L,
42
- "aria-invalid": x === "error" || void 0,
43
+ "aria-invalid": S === "error" || void 0,
43
44
  "aria-describedby": J,
44
- className: e(a, p, I)
45
+ className: e(a, m, I)
45
46
  });
46
- let Y = /* @__PURE__ */ w("textarea", {
47
+ let Y = /* @__PURE__ */ T("textarea", {
47
48
  ...B,
48
49
  ref: V,
49
50
  id: U,
50
51
  rows: N,
51
52
  disabled: L,
52
- "aria-invalid": x === "error" || void 0,
53
+ "aria-invalid": S === "error" || void 0,
53
54
  "aria-describedby": J,
54
- className: e(a, te[P], l, f[c], m[c], g, G && s[c], W && e(n, "rounded-none border-0 shadow-none focus-visible:!outline-none focus-visible:!ring-0", "rounded-none"))
55
- }), X = G ? /* @__PURE__ */ w("span", {
56
- className: e(y, b[c]),
57
- children: /* @__PURE__ */ w(ee, {
58
- size: c,
59
- status: M ? void 0 : x,
55
+ className: e(a, g[P], u, p[s], h[s], v, G && ee[s], W && e(n, "rounded-none border-0 shadow-none focus-visible:!outline-none focus-visible:!ring-0", "rounded-none"))
56
+ }), X = G ? /* @__PURE__ */ T("span", {
57
+ className: e(b, x[s]),
58
+ children: /* @__PURE__ */ T(l, {
59
+ size: s,
60
+ status: M ? void 0 : S,
60
61
  loading: M
61
62
  })
62
- }) : null, Z = /* @__PURE__ */ T(C, { children: [Y, X] }), ne = /* @__PURE__ */ w("div", {
63
- className: e(_(c, x, P), I),
63
+ }) : null, Z = /* @__PURE__ */ E(w, { children: [Y, X] }), re = /* @__PURE__ */ T("div", {
64
+ className: e(te(s, S === "success" ? void 0 : S, P), I),
64
65
  children: Z
65
- }), re = /* @__PURE__ */ w("div", {
66
- className: e("relative w-full", u(P, c)),
66
+ }), ie = /* @__PURE__ */ T("div", {
67
+ className: e("relative w-full", d(P, s)),
67
68
  children: Z
68
- }), Q = W && x != null && q != null ? /* @__PURE__ */ w(k, {
69
- status: x,
70
- message: O,
69
+ }), Q = W && S != null && q != null ? /* @__PURE__ */ T(ne, {
70
+ status: S,
71
+ message: k,
71
72
  messageId: q,
72
- size: c,
73
+ size: s,
73
74
  messagePosition: j
74
- }) : null, $ = W && x != null ? /* @__PURE__ */ T("div", {
75
- className: r(c, x),
75
+ }) : null, $ = W && S != null ? /* @__PURE__ */ E("div", {
76
+ className: r(s, S),
76
77
  children: [
77
78
  j === "top" ? Q : null,
78
- /* @__PURE__ */ w("div", {
79
- className: d(c, x, j),
80
- children: re
79
+ /* @__PURE__ */ T("div", {
80
+ className: f(s, S, j),
81
+ children: ie
81
82
  }),
82
83
  j === "bottom" ? Q : null
83
84
  ]
84
- }) : /* @__PURE__ */ w("div", {
85
+ }) : /* @__PURE__ */ T("div", {
85
86
  className: i,
86
- children: ne
87
+ children: re
87
88
  });
88
- return h == null && v == null && A == null ? $ : /* @__PURE__ */ T("div", {
89
+ return _ == null && y == null && A == null ? $ : /* @__PURE__ */ E("div", {
89
90
  className: o,
90
91
  children: [
91
- h == null ? null : /* @__PURE__ */ w("label", {
92
+ _ == null ? null : /* @__PURE__ */ T("label", {
92
93
  htmlFor: U,
93
94
  className: e(t("ui-label"), L && "opacity-50"),
94
- children: h
95
+ children: _
95
96
  }),
96
- $,
97
- K == null ? null : /* @__PURE__ */ w("p", {
97
+ K == null ? null : /* @__PURE__ */ T("p", {
98
98
  id: K,
99
99
  className: t("caption"),
100
- children: v
100
+ children: y
101
101
  }),
102
- A == null ? null : /* @__PURE__ */ w("p", {
102
+ $,
103
+ A == null ? null : /* @__PURE__ */ T("p", {
103
104
  role: "status",
104
105
  "aria-live": "polite",
105
106
  id: `${U}-live-status`,
@@ -109,15 +110,15 @@ var O = x(function({ size: c = "md", label: h, description: v, status: x, messag
109
110
  ]
110
111
  });
111
112
  });
112
- function k({ status: e, message: t, messageId: n, size: r, messagePosition: i }) {
113
- return /* @__PURE__ */ w(c, {
113
+ function ne({ status: e, message: t, messageId: n, size: r, messagePosition: i }) {
114
+ return /* @__PURE__ */ T(s, {
114
115
  status: e,
115
116
  message: t,
116
117
  messageId: n,
117
118
  size: r,
118
119
  messagePosition: i,
119
- bannerClassName: v(e, r, i)
120
+ bannerClassName: y(e, r, i)
120
121
  });
121
122
  }
122
123
  //#endregion
123
- export { O as TextArea, h as textareaResizes };
124
+ export { k as TextArea, _ as textareaResizes };
@@ -19,8 +19,8 @@ var g = [
19
19
  md: "min-h-24",
20
20
  lg: "min-h-28"
21
21
  }, b = {
22
- sm: "px-2.5 py-2 text-xs leading-normal",
23
- md: "px-3 py-2.5 text-sm leading-normal",
22
+ sm: "px-2.5 py-2 text-xs pointer-coarse:text-base leading-normal",
23
+ md: "px-3 py-2.5 text-sm pointer-coarse:text-base leading-normal",
24
24
  lg: "px-4 py-3 text-base leading-normal"
25
25
  }, x = {
26
26
  sm: "pr-2.5 pb-2.5",
@@ -1,4 +1,9 @@
1
1
  import { type InputMessagePosition, type InputSize, type InputStatus } from "../Input/inputShellStyles";
2
+ /**
3
+ * Errors and validation V10: an error or a warning always says what's wrong. Warns in the console when a
4
+ * field has `status="error"` or `"warning"` and no `message`; a status-only success tick is fine.
5
+ */
6
+ export declare function warnStatusWithoutMessage(component: string, status: InputStatus | undefined, message: unknown): void;
2
7
  /** Tinted validation band — shared by **Input** and **TextArea** (ADR-0006). */
3
8
  export declare function InputStatusBanner({ status, message, messageId, size, messagePosition, bannerClassName, className, }: {
4
9
  status: InputStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"InputStatusBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/inputShared/InputStatusBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAenC,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,SAAS,EACT,IAAI,EACJ,eAAe,EACf,eAAe,EACf,SAAS,GACV,EAAE;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,eAAe,EAAE,oBAAoB,CAAC;IACtC,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAeA"}
1
+ {"version":3,"file":"InputStatusBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/inputShared/InputStatusBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAkBnC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,QAI5G;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,SAAS,EACT,IAAI,EACJ,eAAe,EACf,eAAe,EACf,SAAS,GACV,EAAE;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,eAAe,EAAE,oBAAoB,CAAC;IACtC,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAmBA"}
@@ -12,13 +12,24 @@ function c({ status: e }) {
12
12
  "aria-hidden": !0
13
13
  });
14
14
  }
15
- function l({ status: n, message: r, messageId: i, size: a, messagePosition: l, bannerClassName: u, className: d }) {
15
+ var l = {
16
+ error: "Error:",
17
+ warning: "Warning:",
18
+ success: null
19
+ };
20
+ function u(e, t, n) {
21
+ (t === "error" || t === "warning") && (n == null || n === "") && console.warn(`[WMDS ${e}] \`status="${t}"\` needs a \`message\` that says what's wrong and how to fix it.`);
22
+ }
23
+ function d({ status: n, message: r, messageId: i, size: a, messagePosition: u, bannerClassName: d, className: f }) {
16
24
  return /* @__PURE__ */ s("p", {
17
25
  id: i,
18
- className: e(u ?? t(n, a, l), "text-xs font-normal tracking-normal", d),
26
+ className: e(d ?? t(n, a, u), "text-xs font-normal tracking-normal", f),
19
27
  role: n === "error" ? "alert" : "status",
20
- children: [/* @__PURE__ */ o(c, { status: n }), /* @__PURE__ */ o("span", { children: r })]
28
+ children: [/* @__PURE__ */ o(c, { status: n }), /* @__PURE__ */ s("span", { children: [l[n] == null ? null : /* @__PURE__ */ s("span", {
29
+ className: "sr-only",
30
+ children: [l[n], " "]
31
+ }), r] })]
21
32
  });
22
33
  }
23
34
  //#endregion
24
- export { l as InputStatusBanner };
35
+ export { d as InputStatusBanner, u as warnStatusWithoutMessage };
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAUL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,KAAK,wBAAwB,EAC7B,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,qDAAqD;AACrD,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,4BAA4B,CAAC;CAC1C;AAkBD,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,WAAmB,EACnB,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAwB,EACxB,IAAW,EACX,QAAgB,EAChB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,+BA2EpB;AAED,eAAO,MAAM,aAAa;;CAExB,CAAC"}
1
+ {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAUL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,KAAK,wBAAwB,EAC7B,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,qDAAqD;AACrD,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,4BAA4B,CAAC;CAC1C;AAkBD,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,WAAmB,EACnB,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAwB,EACxB,IAAW,EACX,QAAgB,EAChB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,+BA4EpB;AAED,eAAO,MAAM,aAAa;;CAExB,CAAC"}
@@ -1,76 +1,76 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
- import { InputStatusBanner as t } from "../../atoms/inputShared/InputStatusBanner.js";
4
- import { checkboxStatusBannerClassesFor as n } from "../../atoms/Checkbox/checkboxStyles.js";
5
- import { checkboxGroupDescriptionClasses as r, checkboxGroupDescriptionSpacingClasses as i, checkboxGroupFieldStackClasses as a, checkboxGroupItemsClasses as o, checkboxGroupLabelClassesFor as s, checkboxGroupLegendLabelOnlySpacingClasses as c, checkboxGroupLegendWithDescriptionSpacingClasses as l, checkboxGroupMessageTopSpacingClasses as u, checkboxGroupOrientations as d } from "./checkboxGroupStyles.js";
6
- import { CheckboxGroupProvider as f } from "./CheckboxGroupContext.js";
7
- import { CheckboxGroupItem as p } from "./CheckboxGroupItem.js";
8
- import { useId as m, useMemo as h } from "react";
9
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
3
+ import { InputStatusBanner as t, warnStatusWithoutMessage as n } from "../../atoms/inputShared/InputStatusBanner.js";
4
+ import { checkboxStatusBannerClassesFor as r } from "../../atoms/Checkbox/checkboxStyles.js";
5
+ import { checkboxGroupDescriptionClasses as i, checkboxGroupDescriptionSpacingClasses as a, checkboxGroupFieldStackClasses as o, checkboxGroupItemsClasses as s, checkboxGroupLabelClassesFor as c, checkboxGroupLegendLabelOnlySpacingClasses as l, checkboxGroupLegendWithDescriptionSpacingClasses as u, checkboxGroupMessageTopSpacingClasses as d, checkboxGroupOrientations as f } from "./checkboxGroupStyles.js";
6
+ import { CheckboxGroupProvider as p } from "./CheckboxGroupContext.js";
7
+ import { CheckboxGroupItem as m } from "./CheckboxGroupItem.js";
8
+ import { useId as h, useMemo as g } from "react";
9
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
10
  //#region src/components/molecules/CheckboxGroup/CheckboxGroup.tsx
11
- var v = {
11
+ var y = {
12
12
  sm: "sm",
13
13
  md: "md"
14
14
  };
15
- function y(e) {
15
+ function b(e) {
16
16
  e.message != null && e.status == null && console.warn("[WMDS CheckboxGroup] `message` requires `status`."), e.values != null != (e.onValuesChange != null) && console.warn("[WMDS CheckboxGroup] `values` and `onValuesChange` must be used together.");
17
17
  }
18
- function b({ label: d, labelHidden: p = !1, description: b, values: x, onValuesChange: S, orientation: C = "vertical", size: w = "md", disabled: T = !1, status: E, message: D, children: O, className: k }) {
19
- let A = m();
20
- y({
21
- status: E,
22
- message: D,
23
- values: x,
24
- onValuesChange: S
25
- });
26
- let j = d == null ? void 0 : `${A}-legend`, M = b == null ? void 0 : `${A}-description`, N = D != null && E != null ? `${A}-message` : void 0, P = [M, N].filter(Boolean).join(" ") || void 0, F = h(() => ({
27
- values: x,
28
- onValuesChange: S,
29
- disabled: T,
30
- size: w
18
+ function x({ label: f, labelHidden: m = !1, description: x, values: S, onValuesChange: C, orientation: w = "vertical", size: T = "md", disabled: E = !1, status: D, message: O, children: k, className: A }) {
19
+ let j = h();
20
+ b({
21
+ status: D,
22
+ message: O,
23
+ values: S,
24
+ onValuesChange: C
25
+ }), n("CheckboxGroup", D, O);
26
+ let M = f == null ? void 0 : `${j}-legend`, N = x == null ? void 0 : `${j}-description`, P = O != null && D != null ? `${j}-message` : void 0, F = [N, P].filter(Boolean).join(" ") || void 0, I = g(() => ({
27
+ values: S,
28
+ onValuesChange: C,
29
+ disabled: E,
30
+ size: T
31
31
  }), [
32
- x,
33
32
  S,
34
- T,
35
- w
33
+ C,
34
+ E,
35
+ T
36
36
  ]);
37
- return /* @__PURE__ */ _("fieldset", {
38
- disabled: T,
39
- className: e(a, "min-w-0 border-0 p-0", k),
37
+ return /* @__PURE__ */ v("fieldset", {
38
+ disabled: E,
39
+ className: e(o, "min-w-0 border-0 p-0", A),
40
40
  children: [
41
- d == null ? null : /* @__PURE__ */ g("legend", {
42
- id: j,
43
- className: e(s(T), p && "sr-only", b == null ? c : l),
44
- children: d
45
- }),
46
- b == null ? null : /* @__PURE__ */ g("p", {
41
+ f == null ? null : /* @__PURE__ */ _("legend", {
47
42
  id: M,
48
- className: e(r, i),
49
- children: b
43
+ className: e(c(E), m && "sr-only", x == null ? l : u),
44
+ children: f
45
+ }),
46
+ x == null ? null : /* @__PURE__ */ _("p", {
47
+ id: N,
48
+ className: e(i, a),
49
+ children: x
50
50
  }),
51
- /* @__PURE__ */ g("div", {
51
+ /* @__PURE__ */ _("div", {
52
52
  role: "group",
53
- "aria-labelledby": j,
54
- "aria-describedby": P,
55
- "aria-invalid": E === "error" || void 0,
56
- "aria-disabled": T || void 0,
57
- className: o[C],
58
- children: /* @__PURE__ */ g(f, {
59
- value: F,
60
- children: O
53
+ "aria-labelledby": M,
54
+ "aria-describedby": F,
55
+ "aria-invalid": D === "error" || void 0,
56
+ "aria-disabled": E || void 0,
57
+ className: s[w],
58
+ children: /* @__PURE__ */ _(p, {
59
+ value: I,
60
+ children: k
61
61
  })
62
62
  }),
63
- D != null && E != null && N != null ? /* @__PURE__ */ g(t, {
64
- status: E,
65
- message: D,
66
- messageId: N,
67
- size: v[w],
63
+ O != null && D != null && P != null ? /* @__PURE__ */ _(t, {
64
+ status: D,
65
+ message: O,
66
+ messageId: P,
67
+ size: y[T],
68
68
  messagePosition: "bottom",
69
- bannerClassName: e(n(E), u)
69
+ bannerClassName: e(r(D), d)
70
70
  }) : null
71
71
  ]
72
72
  });
73
73
  }
74
- var x = Object.assign(b, { Item: p });
74
+ var S = Object.assign(x, { Item: m });
75
75
  //#endregion
76
- export { x as CheckboxGroup, d as checkboxGroupOrientations };
76
+ export { S as CheckboxGroup, f as checkboxGroupOrientations };
@@ -1 +1 @@
1
- {"version":3,"file":"copyFieldStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CopyField/copyFieldStyles.ts"],"names":[],"mappings":"AAOA,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,uCAAuC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAiE,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,yDAAyD,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAuC,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC"}
1
+ {"version":3,"file":"copyFieldStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CopyField/copyFieldStyles.ts"],"names":[],"mappings":"AAOA,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,uCAAuC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAiE,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,yDAAyD,CAAC;AAE5F;;;GAGG;AAEH,eAAO,MAAM,sBAAsB,QAAuE,CAAC;AAE3G;;;GAGG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC"}
@@ -2,6 +2,6 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { promptBarSendClasses as t, promptBarShellClasses as n, promptBarShellStartPadClasses as r } from "../PromptBar/promptBarStyles.js";
4
4
  //#region src/components/molecules/CopyField/copyFieldStyles.ts
5
- var i = "flex w-full min-w-0 flex-col gap-2", a = "type-label", o = e(n, r.field), s = "h-9 min-h-9 w-full min-w-0 flex-1 truncate px-0 py-0", c = e(t, "shrink-0"), l = "type-supporting";
5
+ var i = "flex w-full min-w-0 flex-col gap-2", a = "type-label", o = e(n, r.field), s = "h-9 min-h-9 w-full min-w-0 flex-1 truncate px-0 py-0", c = e(t, "shrink-0 pointer-coarse:overflow-visible"), l = "type-supporting";
6
6
  //#endregion
7
7
  export { c as copyFieldButtonClasses, i as copyFieldClasses, l as copyFieldHintClasses, a as copyFieldLabelClasses, o as copyFieldShellClasses, s as copyFieldValueClasses };
@@ -0,0 +1,32 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ErrorSummaryHeadingLevel } from "./errorSummaryStyles";
3
+ export { errorSummaryHeadingLevels, type ErrorSummaryHeadingLevel } from "./errorSummaryStyles";
4
+ /** Layout-only — margin or grid placement. */
5
+ export type ErrorSummaryLayoutClassName = string;
6
+ export interface ErrorSummaryItem {
7
+ /** The `id` of the field with the error; its link moves focus there. */
8
+ field: string;
9
+ /** The same words as the field's own message ("Enter your email address"). */
10
+ message: ReactNode;
11
+ }
12
+ export interface ErrorSummaryProps {
13
+ /** One line per error, in the order the fields appear. Renders nothing when empty. */
14
+ errors: ErrorSummaryItem[];
15
+ /** Default: "There's a problem". */
16
+ title?: ReactNode;
17
+ /** Its heading level in the page outline. Default `h2`. */
18
+ as?: ErrorSummaryHeadingLevel;
19
+ /**
20
+ * Move focus to the summary when its errors change, so a screen reader starts here after a failed
21
+ * submit. Default `true`.
22
+ */
23
+ focusOnShow?: boolean;
24
+ className?: ErrorSummaryLayoutClassName;
25
+ }
26
+ /**
27
+ * The summary at the top of a form after a failed submit (Errors and validation V5): "There's a problem",
28
+ * then one link per error, worded like the field's own message. It takes focus when it appears, and each
29
+ * link moves focus to its field. The fields keep their inline messages too.
30
+ */
31
+ export declare function ErrorSummary({ errors, title, as: Heading, focusOnShow, className }: ErrorSummaryProps): import("react").JSX.Element | null;
32
+ //# sourceMappingURL=ErrorSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/ErrorSummary/ErrorSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAKL,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,yBAAyB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhG,8CAA8C;AAC9C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,wBAAwB,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,KAA2B,EAAE,EAAE,EAAE,OAAc,EAAE,WAAkB,EAAE,SAAS,EAAE,EAAE,iBAAiB,sCA4CzI"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { errorSummaryClasses as t, errorSummaryHeadingLevels as n, errorSummaryLinkClasses as r, errorSummaryListClasses as i, errorSummaryTitleClasses as a } from "./errorSummaryStyles.js";
4
+ import { useEffect as o, useId as s, useRef as c } from "react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ //#region src/components/molecules/ErrorSummary/ErrorSummary.tsx
7
+ function d({ errors: n, title: d = "There's a problem", as: f = "h2", focusOnShow: p = !0, className: m }) {
8
+ let h = c(null), g = s(), _ = n.map((e) => e.field).join("|");
9
+ return o(() => {
10
+ p && _ !== "" && h.current?.focus();
11
+ }, [p, _]), n.length === 0 ? null : /* @__PURE__ */ u("div", {
12
+ ref: h,
13
+ role: "alert",
14
+ "aria-labelledby": g,
15
+ tabIndex: -1,
16
+ className: e(t, m),
17
+ "data-error-summary": "",
18
+ children: [/* @__PURE__ */ l(f, {
19
+ id: g,
20
+ className: a,
21
+ children: d
22
+ }), /* @__PURE__ */ l("ul", {
23
+ className: i,
24
+ children: n.map((e) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l("a", {
25
+ href: `#${e.field}`,
26
+ className: r,
27
+ onClick: (t) => {
28
+ let n = document.getElementById(e.field);
29
+ n != null && (t.preventDefault(), n.scrollIntoView({ block: "center" }), n.focus({ preventScroll: !0 }));
30
+ },
31
+ children: e.message
32
+ }) }, e.field))
33
+ })]
34
+ });
35
+ }
36
+ //#endregion
37
+ export { d as ErrorSummary, n as errorSummaryHeadingLevels };