@thewhatmatters/wmds 0.4.43 → 0.4.46

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 (253) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/components/atoms/Button/ButtonSpinner.js +1 -1
  3. package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
  4. package/dist/components/atoms/Button/ButtonStatusButton.js +57 -38
  5. package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -1
  6. package/dist/components/atoms/Button/ButtonStatusContent.js +10 -10
  7. package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -1
  8. package/dist/components/atoms/Button/buttonStatusMotion.js +2 -2
  9. package/dist/components/atoms/Button/buttonStatusStyles.d.ts +4 -0
  10. package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -1
  11. package/dist/components/atoms/Button/buttonStatusStyles.js +4 -4
  12. package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
  13. package/dist/components/atoms/Checkbox/Checkbox.js +41 -40
  14. package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
  15. package/dist/components/atoms/IconButton/IconButton.js +75 -74
  16. package/dist/components/atoms/Input/Input.d.ts +2 -0
  17. package/dist/components/atoms/Input/Input.d.ts.map +1 -1
  18. package/dist/components/atoms/Input/Input.js +87 -81
  19. package/dist/components/atoms/Status/Status.js +1 -1
  20. package/dist/components/atoms/Status/statusRingStyles.d.ts +1 -1
  21. package/dist/components/atoms/Status/statusRingStyles.d.ts.map +1 -1
  22. package/dist/components/atoms/Status/statusRingStyles.js +1 -1
  23. package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
  24. package/dist/components/atoms/Switch/Switch.js +53 -52
  25. package/dist/components/atoms/TextArea/TextArea.d.ts +2 -0
  26. package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
  27. package/dist/components/atoms/TextArea/TextArea.js +59 -49
  28. package/dist/components/atoms/inputShared/InputTrailingAffordance.d.ts.map +1 -1
  29. package/dist/components/atoms/inputShared/InputTrailingAffordance.js +16 -14
  30. package/dist/components/molecules/CalEmbed/CalEmbed.d.ts.map +1 -1
  31. package/dist/components/molecules/CalEmbed/CalEmbed.js +17 -23
  32. package/dist/components/molecules/EmptyState/EmptyState.d.ts +41 -0
  33. package/dist/components/molecules/EmptyState/EmptyState.d.ts.map +1 -0
  34. package/dist/components/molecules/EmptyState/EmptyState.js +46 -0
  35. package/dist/components/molecules/EmptyState/emptyStateStyles.d.ts +10 -0
  36. package/dist/components/molecules/EmptyState/emptyStateStyles.d.ts.map +1 -0
  37. package/dist/components/molecules/EmptyState/emptyStateStyles.js +11 -0
  38. package/dist/components/molecules/IndexList/IndexList.d.ts +6 -1
  39. package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -1
  40. package/dist/components/molecules/IndexList/IndexList.js +67 -58
  41. package/dist/components/molecules/LinkTile/LinkTile.d.ts +4 -2
  42. package/dist/components/molecules/LinkTile/LinkTile.d.ts.map +1 -1
  43. package/dist/components/molecules/LinkTile/LinkTile.js +89 -81
  44. package/dist/components/molecules/LogView/LogView.d.ts.map +1 -1
  45. package/dist/components/molecules/LogView/LogView.js +68 -63
  46. package/dist/components/molecules/Progress/Progress.d.ts +38 -0
  47. package/dist/components/molecules/Progress/Progress.d.ts.map +1 -0
  48. package/dist/components/molecules/Progress/Progress.js +96 -0
  49. package/dist/components/molecules/Progress/progressStyles.d.ts +17 -0
  50. package/dist/components/molecules/Progress/progressStyles.d.ts.map +1 -0
  51. package/dist/components/molecules/Progress/progressStyles.js +9 -0
  52. package/dist/components/molecules/Stat/Stat.d.ts.map +1 -1
  53. package/dist/components/molecules/Stat/Stat.js +65 -61
  54. package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts.map +1 -1
  55. package/dist/components/molecules/TaskRows/TaskRowsTable.js +77 -76
  56. package/dist/components/molecules/TileGrid/TileGrid.d.ts +6 -1
  57. package/dist/components/molecules/TileGrid/TileGrid.d.ts.map +1 -1
  58. package/dist/components/molecules/TileGrid/TileGrid.js +52 -47
  59. package/dist/components/organisms/Carousel/Carousel.d.ts +3 -0
  60. package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
  61. package/dist/components/organisms/Carousel/Carousel.js +208 -198
  62. package/dist/components/organisms/Carousel/carouselStyles.d.ts +2 -0
  63. package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
  64. package/dist/components/organisms/Carousel/carouselStyles.js +3 -3
  65. package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts +10 -4
  66. package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts.map +1 -1
  67. package/dist/components/organisms/Chart/ChartSegmentedRing.js +7 -2
  68. package/dist/components/organisms/Chart/chartStyles.d.ts +4 -0
  69. package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -1
  70. package/dist/components/organisms/Chart/chartStyles.js +4 -2
  71. package/dist/components/organisms/SiteNav/SiteNav.d.ts +8 -1
  72. package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
  73. package/dist/components/organisms/SiteNav/SiteNav.js +73 -69
  74. package/dist/components/organisms/SiteNav/siteNavStyles.d.ts +6 -0
  75. package/dist/components/organisms/SiteNav/siteNavStyles.d.ts.map +1 -1
  76. package/dist/components/organisms/SiteNav/siteNavStyles.js +6 -6
  77. package/dist/index.d.ts +3 -0
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +158 -153
  80. package/dist/lib/useDelayedLoading.d.ts +13 -0
  81. package/dist/lib/useDelayedLoading.d.ts.map +1 -0
  82. package/dist/lib/useDelayedLoading.js +27 -0
  83. package/dist/motion.css +10 -0
  84. package/dist/styles.css +1 -1
  85. package/docs/components.md +1 -1
  86. package/docs/exports.json +26 -1
  87. package/docs/patterns/components-accordion--flush.tsx +1 -1
  88. package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
  89. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  90. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  91. package/docs/patterns/components-badge--status-pill.tsx +1 -1
  92. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  93. package/docs/patterns/components-band--page-in-bands.tsx +1 -1
  94. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  95. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  96. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  97. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  98. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  99. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  100. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  101. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  102. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  103. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  104. package/docs/patterns/components-button-button--multi-state-badge.tsx +2 -2
  105. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  106. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  107. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  108. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  109. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  110. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  111. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  112. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  113. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  114. package/docs/patterns/components-calembed--pattern-skip-above.tsx +1 -1
  115. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  116. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  117. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  118. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  119. package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
  120. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  121. package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
  122. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  123. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  124. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  125. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  126. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  127. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  128. package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
  129. package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
  130. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  131. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
  132. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
  133. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  134. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  135. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  136. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  137. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  138. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  139. package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
  140. package/docs/patterns/components-copyfield--copied.tsx +1 -1
  141. package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
  142. package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
  143. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  144. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  145. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  146. package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
  147. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  148. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  149. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  150. package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
  151. package/docs/patterns/components-errorsummary--contact-form.tsx +1 -1
  152. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  153. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  154. package/docs/patterns/components-field--multi-control.tsx +1 -1
  155. package/docs/patterns/components-filterpanel--panel.tsx +1 -1
  156. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  157. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  158. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  159. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  160. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  161. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  162. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  163. package/docs/patterns/components-herointro--with-actions.tsx +1 -1
  164. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  165. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  166. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  167. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  168. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  169. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  170. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  171. package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
  172. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  173. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  174. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  175. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  176. package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
  177. package/docs/patterns/components-linktile--router-link.tsx +1 -1
  178. package/docs/patterns/components-logview--detail-pane.tsx +1 -1
  179. package/docs/patterns/components-logview--log-viewer.tsx +1 -1
  180. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  181. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  182. package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
  183. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  184. package/docs/patterns/components-notice--account-not-connected.tsx +1 -1
  185. package/docs/patterns/components-notice--holiday-closure.tsx +1 -1
  186. package/docs/patterns/components-notice--private-buyout.tsx +1 -1
  187. package/docs/patterns/components-notice--sync-failed.tsx +1 -1
  188. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  189. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  190. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  191. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  192. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  193. package/docs/patterns/components-progress--upload-pattern.tsx +9 -0
  194. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  195. package/docs/patterns/components-prose--article-body.tsx +1 -1
  196. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  197. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  198. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  199. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  200. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  201. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  202. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  203. package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
  204. package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
  205. package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
  206. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  207. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  208. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  209. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  210. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  211. package/docs/patterns/components-stat--hero-stat.tsx +1 -1
  212. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  213. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  214. package/docs/patterns/components-switch--default.tsx +1 -1
  215. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  216. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  217. package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
  218. package/docs/patterns/components-table--approvals.tsx +1 -1
  219. package/docs/patterns/components-table--basic.tsx +1 -1
  220. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  221. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  222. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  223. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  224. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  225. package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
  226. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  227. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  228. package/docs/patterns/components-textarea--save-status.tsx +1 -1
  229. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  230. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  231. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  232. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  233. package/docs/patterns/components-textsequence--default.tsx +1 -1
  234. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  235. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  236. package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
  237. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  238. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  239. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  240. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  241. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  242. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  243. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  244. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  245. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  246. package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
  247. package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
  248. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  249. package/docs/patterns/guides-post-page--post-page.tsx +1 -1
  250. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  251. package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
  252. package/docs/patterns/index.json +9 -1
  253. package/package.json +1 -1
@@ -2,90 +2,91 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { buttonBaseClasses as t, buttonRoleClasses as n, iconButtonSizeClasses as r } from "../Button/buttonStyles.js";
4
4
  import { ButtonIcon as i } from "../Button/ButtonIcon.js";
5
- import { ButtonSpinner as a } from "../Button/ButtonSpinner.js";
6
- import { iconButtonExpandedStyle as o, iconButtonInsetHitClasses as s, iconButtonInsetIconSizeClasses as c, iconButtonPressedClasses as l, iconButtonShapeClass as u } from "./iconButtonStyles.js";
7
- import { forwardRef as d } from "react";
8
- import { jsx as f } from "react/jsx-runtime";
9
- import { useRender as p } from "@base-ui/react/use-render";
5
+ import { useDelayedLoading as a } from "../../../lib/useDelayedLoading.js";
6
+ import { ButtonSpinner as o } from "../Button/ButtonSpinner.js";
7
+ import { iconButtonExpandedStyle as s, iconButtonInsetHitClasses as c, iconButtonInsetIconSizeClasses as l, iconButtonPressedClasses as u, iconButtonShapeClass as d } from "./iconButtonStyles.js";
8
+ import { forwardRef as f } from "react";
9
+ import { jsx as p } from "react/jsx-runtime";
10
+ import { useRender as m } from "@base-ui/react/use-render";
10
11
  //#region src/components/atoms/IconButton/IconButton.tsx
11
- function m(e) {
12
+ function h(e) {
12
13
  e.fab && e.role != null && e.role !== "primary" && console.warn("[WMDS IconButton] `fab` uses primary role — omit `role` or set `primary`."), e.render != null && (e.fab || e.inset) && console.warn("[WMDS IconButton] `render` is not supported with `fab` or `inset`."), e.pressed !== void 0 && (e.fab || e.inset) && console.warn("[WMDS IconButton] `pressed` (toggle) is not supported with `fab` or `inset`.");
13
14
  }
14
- var h = d(function({ icon: d, "aria-label": h, role: g, size: _ = "md", inset: v = !1, title: y, fab: b = !1, loading: x = !1, pressed: S, disabled: C, type: w = "button", render: T, className: E, onClick: D, onKeyDown: O, "aria-current": k, "aria-haspopup": A, "aria-expanded": j, "aria-controls": M, id: N, name: P, form: F, ...I }, L) {
15
- m({
16
- fab: b,
17
- role: g,
18
- render: T,
19
- inset: v,
20
- pressed: S
15
+ var g = f(function({ icon: f, "aria-label": g, role: _, size: v = "md", inset: y = !1, title: b, fab: x = !1, loading: S = !1, pressed: C, disabled: w, type: T = "button", render: E, className: D, onClick: O, onKeyDown: k, "aria-current": A, "aria-haspopup": j, "aria-expanded": M, "aria-controls": N, id: P, name: F, form: I, ...L }, R) {
16
+ h({
17
+ fab: x,
18
+ role: _,
19
+ render: E,
20
+ inset: y,
21
+ pressed: C
21
22
  });
22
- let R = b ? "primary" : g ?? "ghost", z = C || x, B = z, V = B ? (e) => {
23
+ let z = x ? "primary" : _ ?? "ghost", B = w || S, V = a(S), H = B, U = H ? (e) => {
23
24
  e.preventDefault(), e.stopPropagation();
24
- } : D, H = y === void 0 ? h : y, U = v ? _ : null, W = v ? s[U ?? "md"] : r[_], G = e(t, "justify-center", S === !0 ? l : n[R], W, u, v && "focus-visible:ring-offset-1 focus-visible:ring-offset-surface", b && "shadow-soft-card", E), K = x ? /* @__PURE__ */ f(a, { size: v ? "xs" : _ }) : v ? /* @__PURE__ */ f("span", {
25
- className: e("inline-flex shrink-0 items-center justify-center text-inherit [&>svg]:size-full", c[U ?? "md"]),
25
+ } : O, W = b === void 0 ? g : b, G = y ? v : null, K = y ? c[G ?? "md"] : r[v], q = e(t, "justify-center", C === !0 ? u : n[z], K, d, y && "focus-visible:ring-offset-1 focus-visible:ring-offset-surface", x && "shadow-soft-card", D), J = V ? /* @__PURE__ */ p(o, { size: y ? "xs" : v }) : y ? /* @__PURE__ */ p("span", {
26
+ className: e("inline-flex shrink-0 items-center justify-center text-inherit [&>svg]:size-full", l[G ?? "md"]),
26
27
  "aria-hidden": !0,
27
- children: d
28
- }) : /* @__PURE__ */ f(i, {
29
- size: _,
30
- children: d
28
+ children: f
29
+ }) : /* @__PURE__ */ p(i, {
30
+ size: v,
31
+ children: f
31
32
  });
32
- return p({
33
- render: T,
34
- ref: L,
33
+ return m({
34
+ render: E,
35
+ ref: R,
35
36
  defaultTagName: "button",
36
- props: T ? {
37
- ...I,
38
- className: G,
39
- "aria-label": h,
40
- "aria-current": k,
41
- "aria-haspopup": A,
42
- "aria-expanded": j,
43
- "aria-controls": M,
44
- "aria-pressed": S ?? I["aria-pressed"],
45
- "data-pressed": S === !0 ? "" : void 0,
46
- "aria-busy": x || void 0,
47
- "aria-disabled": z ? !0 : void 0,
48
- "data-disabled": z ? "" : void 0,
49
- "data-role": R,
50
- "data-size": _,
51
- "data-pattern": b ? "fab" : v ? "inset" : "icon",
52
- "data-loading": x || void 0,
53
- title: H === "" ? void 0 : H,
54
- onClick: V,
55
- onKeyDown: O,
56
- id: N,
57
- name: P,
58
- form: F,
59
- style: j && R === "ghost" ? o : void 0,
60
- children: K
37
+ props: E ? {
38
+ ...L,
39
+ className: q,
40
+ "aria-label": g,
41
+ "aria-current": A,
42
+ "aria-haspopup": j,
43
+ "aria-expanded": M,
44
+ "aria-controls": N,
45
+ "aria-pressed": C ?? L["aria-pressed"],
46
+ "data-pressed": C === !0 ? "" : void 0,
47
+ "aria-busy": S || void 0,
48
+ "aria-disabled": B ? !0 : void 0,
49
+ "data-disabled": B ? "" : void 0,
50
+ "data-role": z,
51
+ "data-size": v,
52
+ "data-pattern": x ? "fab" : y ? "inset" : "icon",
53
+ "data-loading": S || void 0,
54
+ title: W === "" ? void 0 : W,
55
+ onClick: U,
56
+ onKeyDown: k,
57
+ id: P,
58
+ name: F,
59
+ form: I,
60
+ style: M && z === "ghost" ? s : void 0,
61
+ children: J
61
62
  } : {
62
- ...I,
63
- className: G,
64
- type: w,
65
- "aria-disabled": B || void 0,
66
- "data-disabled": z ? "" : void 0,
67
- "aria-busy": x || void 0,
68
- "aria-label": h,
69
- "aria-current": k,
70
- "aria-haspopup": A,
71
- "aria-expanded": j,
72
- "aria-controls": M,
73
- "aria-pressed": S ?? I["aria-pressed"],
74
- "data-pressed": S === !0 ? "" : void 0,
75
- title: H === "" ? void 0 : H,
76
- onClick: V,
77
- onKeyDown: O,
78
- id: N,
79
- name: P,
80
- form: F,
81
- style: j && R === "ghost" ? o : void 0,
82
- "data-role": R,
83
- "data-size": _,
84
- "data-pattern": b ? "fab" : v ? "inset" : "icon",
85
- "data-loading": x || void 0,
86
- children: K
63
+ ...L,
64
+ className: q,
65
+ type: T,
66
+ "aria-disabled": H || void 0,
67
+ "data-disabled": B ? "" : void 0,
68
+ "aria-busy": S || void 0,
69
+ "aria-label": g,
70
+ "aria-current": A,
71
+ "aria-haspopup": j,
72
+ "aria-expanded": M,
73
+ "aria-controls": N,
74
+ "aria-pressed": C ?? L["aria-pressed"],
75
+ "data-pressed": C === !0 ? "" : void 0,
76
+ title: W === "" ? void 0 : W,
77
+ onClick: U,
78
+ onKeyDown: k,
79
+ id: P,
80
+ name: F,
81
+ form: I,
82
+ style: M && z === "ghost" ? s : void 0,
83
+ "data-role": z,
84
+ "data-size": v,
85
+ "data-pattern": x ? "fab" : y ? "inset" : "icon",
86
+ "data-loading": S || void 0,
87
+ children: J
87
88
  }
88
89
  });
89
90
  });
90
91
  //#endregion
91
- export { h as IconButton };
92
+ export { g as IconButton };
@@ -23,6 +23,8 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
23
23
  messagePosition?: InputMessagePosition;
24
24
  /** Trailing spinner — async validation. Combinable with `endBadge`. */
25
25
  loading?: boolean;
26
+ /** Read out while `loading` (Loading states Y4). Default "Checking…". */
27
+ loadingLabel?: string;
26
28
  /** Leading Lucide icon. */
27
29
  icon?: ReactElement;
28
30
  /** Monospace value — `type-code` instead of the sans face. For a read-only key or id. */
@@ -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,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,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,GAAG,OAAO,CAAC;IACrE,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;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,YAAY,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
+ {"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,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,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,GAAG,OAAO,CAAC;IACrE,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,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,yFAAyF;IACzF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,YAAY,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,yGAwMhB,CAAC"}
@@ -1,135 +1,141 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { typographyClass as t } from "../../../lib/typography.js";
4
- import { inputAttachedFieldClasses as n, inputAttachedInputClasses as r, inputBaseClasses as i, inputCompoundInnerFieldClassesFor as 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";
4
+ import { inputAttachedFieldClasses as n, inputAttachedInputClasses as r, inputBaseClasses as ee, inputCompoundInnerFieldClassesFor as te, inputCompoundShellClassesFor as ne, inputControlStackClasses as i, inputDisabledClasses as a, inputEndBadgeAndStatusGapClasses as o, inputEndBadgeGapClasses as s, inputEndBadgeWrapperClasses as re, inputFieldStackClasses as ie, inputIconGapClasses as c, inputIconPositionClasses as ae, inputIconSizeClasses as oe, inputInlineClasses as l, inputMessagePositions as u, inputShellClasses as d, inputSizeClasses as f, inputSizes as p, inputSoloFocusRingBaseClasses as se, inputSoloFocusRingColorClasses as m, inputSoloRadiusClasses as ce, inputStatusGapClasses as h, inputStatusShellClasses as le, inputStatuses as g, inputTrailingInsetClasses as ue, inputTrailingInsetPositionClasses as de } from "./inputShellStyles.js";
5
+ import { InputStatusBanner as fe, warnStatusWithoutMessage as _ } from "../inputShared/InputStatusBanner.js";
6
+ import { InputTrailingAffordance as pe } from "../inputShared/InputTrailingAffordance.js";
7
+ import { isAutofillField as v } from "./autofillFields.js";
8
+ import { fieldWidthBandStyle as y, fieldWidthStyle as b, fieldWidths as x } from "./fieldWidth.js";
9
+ import { forwardRef as S, useId as me } from "react";
10
+ import { Fragment as he, jsx as C, jsxs as w } from "react/jsx-runtime";
11
11
  //#region src/components/atoms/Input/Input.tsx
12
- function E(e) {
12
+ function T(e) {
13
13
  e.label == null && e["aria-label"] == null && e["aria-labelledby"] == null && console.warn("[WMDS Input] Provide `label`, `aria-label`, or `aria-labelledby`.");
14
14
  }
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.`);
15
+ function E(e, t) {
16
+ e && v(t) && console.warn(`[WMDS Input] No \`endBadge\` on an autofill field (autocomplete="${t}"): put "(optional)" in the label.`);
17
17
  }
18
- function O(e) {
18
+ function D(e) {
19
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.");
20
20
  }
21
- var k = {
21
+ var O = {
22
22
  sm: .625,
23
23
  md: .75,
24
24
  lg: 1
25
- }, A = {
25
+ }, k = {
26
26
  sm: 2,
27
27
  md: 2.5,
28
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
29
+ }, A = {
30
+ [h.sm]: 2,
31
+ [h.md]: 2.5,
32
+ [h.lg]: 2.75,
33
+ [s.sm]: 4.5,
34
+ [s.md]: 5,
35
+ [s.lg]: 6,
36
+ [o.sm]: 6.5,
37
+ [o.md]: 7,
38
+ [o.lg]: 8
39
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`;
40
+ function j(e, t, n) {
41
+ let r = O[e];
42
+ return `${(t ? k[e] : r) + (n === !1 ? r : A[n] ?? r)}rem + 2px`;
43
43
  }
44
- function N(e, t, n) {
45
- return t && n ? s[e] : t ? c[e] : n ? g[e] : !1;
44
+ function M(e, t, n) {
45
+ return t && n ? o[e] : t ? s[e] : n ? h[e] : !1;
46
46
  }
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({
51
- label: c,
47
+ var N = S(function({ size: o = "md", label: s, description: u, status: p, message: h, messagePosition: g = "bottom", loading: v = !1, loadingLabel: x = "Checking…", icon: S, endBadge: O, width: k = "full", mono: A = !1, inline: N = !1, className: P, disabled: F, id: I, "aria-describedby": L, ...R }, z) {
48
+ _("Input", p, h);
49
+ let ge = me(), B = I ?? ge;
50
+ T({
51
+ label: s,
52
52
  "aria-label": R["aria-label"],
53
53
  "aria-labelledby": R["aria-labelledby"]
54
- }), O({
55
- status: m,
56
- message: g,
57
- messagePosition: _,
58
- loading: y,
59
- inline: j,
60
- label: c,
61
- description: d
54
+ }), D({
55
+ status: p,
56
+ message: h,
57
+ messagePosition: g,
58
+ loading: v,
59
+ inline: N,
60
+ label: s,
61
+ description: u
62
62
  });
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 = [
63
+ let V = h != null && h.length > 0 && p != null, H = O != null;
64
+ E(H, R.autoComplete);
65
+ let U = !V && (v || p != null), W = S != null, G = M(o, H, U), K = u == null ? void 0 : `${B}-description`, q = V ? `${B}-message` : void 0, J = H ? `${B}-badge` : void 0, _e = [
66
66
  L,
67
67
  K,
68
68
  J,
69
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]),
70
+ ].filter(Boolean).join(" ") || void 0, ve = /* @__PURE__ */ w(he, { children: [
71
+ W ? /* @__PURE__ */ C("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", ae[o], oe[o]),
73
73
  "aria-hidden": !0,
74
74
  children: S
75
75
  }) : null,
76
- /* @__PURE__ */ w("input", {
76
+ /* @__PURE__ */ C("input", {
77
77
  ...R,
78
78
  ref: z,
79
79
  id: B,
80
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)))
81
+ "aria-invalid": p === "error" || void 0,
82
+ "aria-busy": v || void 0,
83
+ "aria-describedby": _e,
84
+ className: e(a, A && "type-code !font-mono !leading-none", V ? e(n, f[o], W && c[o], G, r) : e(ee, N ? e(l, W && c[o], P ?? f[o]) : e(f[o], W && c[o], G, p != null && p !== "success" ? e("border", le[p]) : d[o], ce[o], se, p != null && p !== "success" ? m[p] : m.default, P)))
84
85
  }),
85
- H || U ? /* @__PURE__ */ T("span", {
86
- className: e(le, ue[s]),
87
- children: [U ? /* @__PURE__ */ w(v, {
88
- size: s,
89
- status: y ? void 0 : m,
90
- loading: y
91
- }) : null, H ? /* @__PURE__ */ w("span", {
86
+ v ? /* @__PURE__ */ C("span", {
87
+ role: "status",
88
+ className: "sr-only",
89
+ children: x
90
+ }) : null,
91
+ H || U ? /* @__PURE__ */ w("span", {
92
+ className: e(ue, de[o]),
93
+ children: [U ? /* @__PURE__ */ C(pe, {
94
+ size: o,
95
+ status: v ? void 0 : p,
96
+ loading: v
97
+ }) : null, H ? /* @__PURE__ */ C("span", {
92
98
  id: J,
93
- className: ne,
94
- children: C
99
+ className: re,
100
+ children: O
95
101
  }) : null]
96
102
  }) : null
97
- ] }), Y = V && m != null && q != null ? /* @__PURE__ */ w(de, {
98
- status: m,
99
- message: g,
103
+ ] }), Y = V && p != null && q != null ? /* @__PURE__ */ C(fe, {
104
+ status: p,
105
+ message: h,
100
106
  messageId: q,
101
- size: s,
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),
107
+ size: o,
108
+ messagePosition: g,
109
+ className: k === "full" ? void 0 : g === "bottom" ? "rounded-tr-[1.375rem]" : "rounded-br-[1.375rem]"
110
+ }) : null, X = V && p != null, Z = j(o, W, G), Q = N ? void 0 : b(k, Z), $ = /* @__PURE__ */ w("div", {
111
+ style: X && !N ? y(k, Z) : Q,
112
+ className: X ? ne(o, p) : e(N ? "relative flex min-w-0 flex-1 items-center" : i),
107
113
  children: [
108
- X && _ === "top" ? Y : null,
109
- /* @__PURE__ */ w("div", {
114
+ X && g === "top" ? Y : null,
115
+ /* @__PURE__ */ C("div", {
110
116
  style: X ? Q : void 0,
111
- className: X ? ee(s, m, _) : "relative flex w-full items-center",
112
- children: _e
117
+ className: X ? te(o, p, g) : "relative flex w-full items-center",
118
+ children: ve
113
119
  }),
114
- X && _ === "bottom" ? Y : null
120
+ X && g === "bottom" ? Y : null
115
121
  ]
116
122
  });
117
- return j || c == null && d == null ? $ : /* @__PURE__ */ T("div", {
118
- className: re,
123
+ return N || s == null && u == null ? $ : /* @__PURE__ */ w("div", {
124
+ className: ie,
119
125
  children: [
120
- c == null ? null : /* @__PURE__ */ w("label", {
126
+ s == null ? null : /* @__PURE__ */ C("label", {
121
127
  htmlFor: B,
122
128
  className: e(t("ui-label"), F && "opacity-50"),
123
- children: c
129
+ children: s
124
130
  }),
125
- K == null ? null : /* @__PURE__ */ w("p", {
131
+ K == null ? null : /* @__PURE__ */ C("p", {
126
132
  id: K,
127
133
  className: t("caption"),
128
- children: d
134
+ children: u
129
135
  }),
130
136
  $
131
137
  ]
132
138
  });
133
139
  });
134
140
  //#endregion
135
- export { P as Input, S as fieldWidths, d as inputMessagePositions, m as inputSizes, _ as inputStatuses };
141
+ export { N as Input, x as fieldWidths, u as inputMessagePositions, p as inputSizes, g as inputStatuses };
@@ -31,7 +31,7 @@ function h({ active: t = !1, step: n, label: r, besideLabel: s = !1, className:
31
31
  children: [/* @__PURE__ */ f("svg", {
32
32
  width: 24,
33
33
  height: 24,
34
- className: e(l, t && "animate-spin"),
34
+ className: e(l, t && "animate-spin motion-reduce:animate-none"),
35
35
  "aria-hidden": !0,
36
36
  children: [/* @__PURE__ */ d("circle", {
37
37
  cx: 12,
@@ -5,7 +5,7 @@ export declare const statusRingStrokePx = 2;
5
5
  export declare const statusRingArcVisibleRatio = 0.28;
6
6
  export declare const statusRingShellClasses = "relative inline-flex shrink-0 items-center justify-center";
7
7
  export declare const statusRingSvgClasses = "absolute inset-0";
8
- export declare const statusRingSvgActiveClasses = "animate-spin";
8
+ export declare const statusRingSvgActiveClasses = "animate-spin motion-reduce:animate-none";
9
9
  export declare const statusRingTrackClasses = "stroke-border";
10
10
  export declare const statusRingArcClasses = "stroke-muted";
11
11
  export declare const statusRingStepClasses: string;
@@ -1 +1 @@
1
- {"version":3,"file":"statusRingStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Status/statusRingStyles.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,eAAO,MAAM,sBAAsB,8DAC0B,CAAC;AAE9D,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAEvD,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AAEzD,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,QAAgG,CAAC"}
1
+ {"version":3,"file":"statusRingStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Status/statusRingStyles.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,eAAO,MAAM,sBAAsB,8DAC0B,CAAC;AAE9D,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAEvD,eAAO,MAAM,0BAA0B,4CAA4C,CAAC;AAEpF,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,QAAgG,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { typographyClass as e } from "../../../lib/typography.js";
3
3
  //#region src/components/atoms/Status/statusRingStyles.ts
4
- var t = 24, n = .28, r = "relative inline-flex shrink-0 items-center justify-center", i = "absolute inset-0", a = "animate-spin", o = "stroke-border", s = "stroke-muted", c = `${e("caption")} relative font-semibold tabular-nums text-fg text-[0.65625rem]`;
4
+ var t = 24, n = .28, r = "relative inline-flex shrink-0 items-center justify-center", i = "absolute inset-0", a = "animate-spin motion-reduce:animate-none", o = "stroke-border", s = "stroke-muted", c = `${e("caption")} relative font-semibold tabular-nums text-fg text-[0.65625rem]`;
5
5
  //#endregion
6
6
  export { s as statusRingArcClasses, n as statusRingArcVisibleRatio, r as statusRingShellClasses, t as statusRingSizePx, c as statusRingStepClasses, a as statusRingSvgActiveClasses, i as statusRingSvgClasses, o as statusRingTrackClasses };
@@ -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,0GAgLjB,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":"AACA,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,0GAkLjB,CAAC"}
@@ -1,41 +1,42 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { motionTransitionProp as t } from "../../../lib/motion.js";
4
+ import { useDelayedLoading as n } from "../../../lib/useDelayedLoading.js";
4
5
  import "../Input/inputShellStyles.js";
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
- import { Loader2 as g } from "lucide-react";
9
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
10
- import { motion as b } from "motion/react";
6
+ import { InputStatusBanner as r, warnStatusWithoutMessage as ee } from "../inputShared/InputStatusBanner.js";
7
+ import { switchDescriptionClasses as i, switchDescriptionRowClasses as a, switchHiddenInputClasses as o, switchHitTargetDescriptionAlignClasses as te, switchHitTargetSizeClasses as ne, switchLabelClassesFor as s, switchLayouts as c, switchRowBaseClasses as l, switchRowLabelOnlyClasses as u, switchRowSizeClasses as d, switchSettingsRowClasses as f, switchSizes as p, switchStatusBannerClassesFor as m, switchTextColumnClasses as h, switchThumbClasses as re, switchThumbOffsetPx as ie, switchThumbSizeClasses as g, switchTrackClassesFor as ae } from "./switchStyles.js";
8
+ import { forwardRef as _, useId as v, useState as oe } from "react";
9
+ import { Loader2 as se } from "lucide-react";
10
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
+ import { motion as S } from "motion/react";
11
12
  //#region src/components/atoms/Switch/Switch.tsx
12
- var x = {
13
+ var ce = {
13
14
  sm: "sm",
14
15
  md: "md"
15
16
  };
16
- function S(e) {
17
+ function le(e) {
17
18
  e.message != null && e.status == null && console.warn("[WMDS Switch] `message` requires `status`.");
18
19
  }
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;
22
- S({
20
+ var C = _(function({ size: c = "md", layout: p = "inline", label: _, 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) {
21
+ ee("Switch", T, E);
22
+ let L = v(), R = N ?? L;
23
+ le({
23
24
  status: T,
24
25
  message: E
25
26
  });
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 = [
27
+ let z = j !== void 0, [B, V] = oe(M ?? !1), H = z ? !!j : B, U = k || D, W = D && !k, ue = n(D), G = E != null && E.length > 0 && T != null, K = G ? `${R}-message` : void 0, q = w != null && !C ? `${R}-description` : void 0, de = [
27
28
  F["aria-describedby"],
28
29
  q,
29
30
  K
30
- ].filter(Boolean).join(" ") || void 0, ue = (e) => {
31
+ ].filter(Boolean).join(" ") || void 0, fe = (e) => {
31
32
  if (A || W) {
32
33
  e.preventDefault();
33
34
  return;
34
35
  }
35
36
  z || V(e.target.checked), P?.(e);
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),
38
- children: [/* @__PURE__ */ v("input", {
37
+ }, pe = ae(c, H, U, G ? void 0 : T), J = w != null && !C, Y = t("fast"), X = ie[c], Z = (t) => /* @__PURE__ */ x("span", {
38
+ className: e("relative flex shrink-0 items-center justify-center", ne[c], t),
39
+ children: [/* @__PURE__ */ b("input", {
39
40
  ...F,
40
41
  ref: I,
41
42
  id: R,
@@ -47,65 +48,65 @@ var C = m(function({ size: o = "md", layout: c = "inline", label: m, labelHidden
47
48
  "aria-disabled": W || void 0,
48
49
  readOnly: A,
49
50
  "aria-invalid": T === "error" || void 0,
50
- "aria-describedby": le,
51
+ "aria-describedby": de,
51
52
  "aria-busy": D || void 0,
52
- onChange: ue,
53
- className: i
54
- }), /* @__PURE__ */ v("span", {
55
- className: de,
53
+ onChange: fe,
54
+ className: o
55
+ }), /* @__PURE__ */ b("span", {
56
+ className: pe,
56
57
  "aria-hidden": !0,
57
- children: D ? /* @__PURE__ */ v(b.span, {
58
- className: e(p[o], "flex items-center justify-center"),
58
+ children: ue ? /* @__PURE__ */ b(S.span, {
59
+ className: e(g[c], "flex items-center justify-center"),
59
60
  animate: { x: H ? X : 0 },
60
61
  transition: Y,
61
- children: /* @__PURE__ */ v(g, {
62
- className: "size-full animate-spin text-fg",
62
+ children: /* @__PURE__ */ b(se, {
63
+ className: "size-full animate-spin motion-reduce:animate-none text-fg",
63
64
  strokeWidth: 2
64
65
  })
65
- }) : /* @__PURE__ */ v(b.span, {
66
- className: e(d, p[o]),
66
+ }) : /* @__PURE__ */ b(S.span, {
67
+ className: e(re, g[c]),
67
68
  animate: { x: H ? X : 0 },
68
69
  transition: Y
69
70
  })
70
71
  })]
71
- }), Q = C ? /* @__PURE__ */ v("span", {
72
+ }), Q = C ? /* @__PURE__ */ b("span", {
72
73
  className: "sr-only",
73
- children: m
74
- }) : /* @__PURE__ */ y("span", {
75
- className: u,
76
- children: [/* @__PURE__ */ v("span", {
77
- className: a(U, J),
78
- children: m
79
- }), J ? /* @__PURE__ */ v("span", {
74
+ children: _
75
+ }) : /* @__PURE__ */ x("span", {
76
+ className: h,
77
+ children: [/* @__PURE__ */ b("span", {
78
+ className: s(U, J),
79
+ children: _
80
+ }), J ? /* @__PURE__ */ b("span", {
80
81
  id: q,
81
- className: te,
82
+ className: i,
82
83
  children: w
83
84
  }) : null]
84
- }), $ = /* @__PURE__ */ v("label", {
85
+ }), $ = /* @__PURE__ */ b("label", {
85
86
  htmlFor: R,
86
- className: e(ie, c === "settings" ? oe : s, c === "inline" && !J && ae[o], c === "inline" && J && void 0, U && "cursor-not-allowed", O),
87
- children: C ? /* @__PURE__ */ y(_, { children: [Z(), /* @__PURE__ */ v("span", {
87
+ className: e(l, p === "settings" ? f : u, p === "inline" && !J && d[c], p === "inline" && J && void 0, U && "cursor-not-allowed", O),
88
+ children: C ? /* @__PURE__ */ x(y, { children: [Z(), /* @__PURE__ */ b("span", {
88
89
  className: "sr-only",
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]
93
- }) : /* @__PURE__ */ y(_, { children: [Z(), C ? null : /* @__PURE__ */ v("span", {
94
- className: a(U),
95
- children: m
90
+ children: _
91
+ })] }) : p === "settings" ? /* @__PURE__ */ x(y, { children: [Q, Z()] }) : J ? /* @__PURE__ */ x("span", {
92
+ className: a[c],
93
+ children: [Z(te[c]), Q]
94
+ }) : /* @__PURE__ */ x(y, { children: [Z(), C ? null : /* @__PURE__ */ b("span", {
95
+ className: s(U),
96
+ children: _
96
97
  })] })
97
98
  });
98
- return !G || T == null || K == null ? $ : /* @__PURE__ */ y("div", {
99
+ return !G || T == null || K == null ? $ : /* @__PURE__ */ x("div", {
99
100
  className: "flex w-full flex-col gap-1.5",
100
- children: [$, /* @__PURE__ */ v(ee, {
101
+ children: [$, /* @__PURE__ */ b(r, {
101
102
  status: T,
102
103
  message: E,
103
104
  messageId: K,
104
- size: x[o],
105
+ size: ce[c],
105
106
  messagePosition: "bottom",
106
- bannerClassName: l(T)
107
+ bannerClassName: m(T)
107
108
  })]
108
109
  });
109
110
  });
110
111
  //#endregion
111
- export { C as Switch, o as switchLayouts, c as switchSizes };
112
+ export { C as Switch, c as switchLayouts, p as switchSizes };