@thewhatmatters/wmds 0.3.0 → 0.4.1

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 (243) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CONSUMING.md +9 -4
  3. package/dist/collapse.css +9 -1
  4. package/dist/colors.css +7 -0
  5. package/dist/components/atoms/Badge/Badge.d.ts +16 -4
  6. package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
  7. package/dist/components/atoms/Badge/Badge.js +54 -42
  8. package/dist/components/atoms/Badge/badgeStyles.d.ts +12 -2
  9. package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
  10. package/dist/components/atoms/Badge/badgeStyles.js +24 -13
  11. package/dist/components/atoms/Button/Button.d.ts +11 -3
  12. package/dist/components/atoms/Button/Button.d.ts.map +1 -1
  13. package/dist/components/atoms/Button/Button.js +118 -98
  14. package/dist/components/atoms/Button/ButtonStatusButton.d.ts +3 -1
  15. package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
  16. package/dist/components/atoms/Button/ButtonStatusButton.js +19 -18
  17. package/dist/components/atoms/Button/ButtonStatusContent.d.ts +7 -1
  18. package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -1
  19. package/dist/components/atoms/Button/ButtonStatusContent.js +9 -6
  20. package/dist/components/atoms/Button/buttonStatusStyles.d.ts +5 -0
  21. package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -1
  22. package/dist/components/atoms/Button/buttonStatusStyles.js +10 -10
  23. package/dist/components/atoms/Button/buttonStyles.d.ts +2 -0
  24. package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
  25. package/dist/components/atoms/Button/buttonStyles.js +12 -12
  26. package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -0
  27. package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
  28. package/dist/components/atoms/Checkbox/Checkbox.js +86 -69
  29. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +6 -0
  30. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
  31. package/dist/components/atoms/Checkbox/checkboxStyles.js +11 -11
  32. package/dist/components/atoms/IconButton/IconButton.d.ts +5 -0
  33. package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
  34. package/dist/components/atoms/IconButton/IconButton.js +73 -68
  35. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +5 -0
  36. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
  37. package/dist/components/atoms/IconButton/iconButtonStyles.js +4 -4
  38. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts +13 -4
  39. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts.map +1 -1
  40. package/dist/components/atoms/Kbd/useKbdChoiceKeys.js +32 -13
  41. package/dist/components/atoms/Prose/Prose.d.ts +23 -0
  42. package/dist/components/atoms/Prose/Prose.d.ts.map +1 -0
  43. package/dist/components/atoms/Prose/Prose.js +15 -0
  44. package/dist/components/atoms/Prose/proseStyles.d.ts +17 -0
  45. package/dist/components/atoms/Prose/proseStyles.d.ts.map +1 -0
  46. package/dist/components/atoms/Prose/proseStyles.js +16 -0
  47. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts +26 -0
  48. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts.map +1 -0
  49. package/dist/components/atoms/SectionCaption/SectionCaption.js +25 -0
  50. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts +11 -0
  51. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts.map +1 -0
  52. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.js +12 -0
  53. package/dist/components/atoms/TextLink/TextLink.d.ts +10 -2
  54. package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
  55. package/dist/components/atoms/TextLink/TextLink.js +15 -15
  56. package/dist/components/atoms/TextLink/textLinkStyles.d.ts +13 -0
  57. package/dist/components/atoms/TextLink/textLinkStyles.d.ts.map +1 -1
  58. package/dist/components/atoms/TextLink/textLinkStyles.js +7 -3
  59. package/dist/components/molecules/Accordion/Accordion.d.ts +6 -1
  60. package/dist/components/molecules/Accordion/Accordion.d.ts.map +1 -1
  61. package/dist/components/molecules/Accordion/Accordion.js +57 -50
  62. package/dist/components/molecules/Accordion/accordionStyles.d.ts +9 -0
  63. package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
  64. package/dist/components/molecules/Accordion/accordionStyles.js +2 -2
  65. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts +5 -1
  66. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts.map +1 -1
  67. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.js +12 -10
  68. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts +37 -0
  69. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts.map +1 -0
  70. package/dist/components/molecules/DescriptionList/DescriptionList.js +50 -0
  71. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts +21 -0
  72. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts.map +1 -0
  73. package/dist/components/molecules/DescriptionList/descriptionListStyles.js +27 -0
  74. package/dist/components/molecules/IndexList/IndexList.d.ts +58 -0
  75. package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -0
  76. package/dist/components/molecules/IndexList/IndexList.js +96 -0
  77. package/dist/components/molecules/IndexList/indexListStyles.d.ts +29 -0
  78. package/dist/components/molecules/IndexList/indexListStyles.d.ts.map +1 -0
  79. package/dist/components/molecules/IndexList/indexListStyles.js +24 -0
  80. package/dist/components/molecules/PromptBar/PromptBar.d.ts +11 -1
  81. package/dist/components/molecules/PromptBar/PromptBar.d.ts.map +1 -1
  82. package/dist/components/molecules/PromptBar/PromptBar.js +54 -43
  83. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +16 -0
  84. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
  85. package/dist/components/molecules/PromptBar/promptBarStyles.js +5 -2
  86. package/dist/components/organisms/ChatDock/ChatDock.d.ts +203 -0
  87. package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -0
  88. package/dist/components/organisms/ChatDock/ChatDock.js +697 -0
  89. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +52 -0
  90. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -0
  91. package/dist/components/organisms/ChatDock/ChatDockGate.js +161 -0
  92. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +16 -0
  93. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -0
  94. package/dist/components/organisms/ChatDock/chatDockGateStyles.js +8 -0
  95. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +98 -0
  96. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -0
  97. package/dist/components/organisms/ChatDock/chatDockStyles.js +21 -0
  98. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts +21 -0
  99. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts.map +1 -0
  100. package/dist/components/organisms/ChatDock/chatDockViewport.js +46 -0
  101. package/dist/components/organisms/Dialog/AlertDialog.js +11 -11
  102. package/dist/components/organisms/Dialog/Dialog.js +44 -44
  103. package/dist/components/organisms/Sheet/Sheet.js +38 -38
  104. package/dist/components/organisms/Toast/Toast.js +5 -5
  105. package/dist/index.d.ts +7 -2
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +122 -110
  108. package/dist/lib/compositionAudit.d.ts.map +1 -1
  109. package/dist/lib/typography.d.ts +2 -2
  110. package/dist/lib/typography.d.ts.map +1 -1
  111. package/dist/lib/typography.js +27 -1
  112. package/dist/styles.css +1 -1
  113. package/dist/theme.css +1 -0
  114. package/dist/typography.css +34 -0
  115. package/docs/README.md +1 -1
  116. package/docs/component-contracts.md +16 -1
  117. package/docs/components.md +16 -11
  118. package/docs/exports.json +81 -4
  119. package/docs/patterns/components-accordion--flush.tsx +29 -0
  120. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  121. package/docs/patterns/components-badge--outline-tags.tsx +25 -0
  122. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  123. package/docs/patterns/components-button-button--copy-button.tsx +39 -0
  124. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  125. package/docs/patterns/components-button-button--external-link.tsx +30 -0
  126. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  127. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  128. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  129. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  130. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  131. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  132. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  133. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  134. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  135. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  136. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  137. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  138. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  139. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  140. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  141. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  142. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  143. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  144. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  145. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  146. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  147. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  148. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  149. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  150. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  151. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  152. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +158 -0
  153. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +180 -0
  154. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  155. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  156. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +19 -0
  157. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  158. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  159. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +17 -0
  160. package/docs/patterns/components-descriptionlist--details.tsx +21 -0
  161. package/docs/patterns/components-descriptionlist--post-metadata.tsx +52 -0
  162. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  163. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  164. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  165. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  166. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  167. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  168. package/docs/patterns/components-field--multi-control.tsx +1 -1
  169. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  170. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  171. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  172. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  173. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  174. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  175. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  176. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  177. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  178. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  179. package/docs/patterns/components-indexlist--post-index.tsx +36 -0
  180. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  181. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  182. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  183. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  184. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  185. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  186. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  187. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  188. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  189. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  190. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  191. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  192. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  193. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  194. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  195. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  196. package/docs/patterns/components-prose--article-body.tsx +11 -0
  197. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  198. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  199. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  200. package/docs/patterns/components-sectioncaption--column-caption.tsx +16 -0
  201. package/docs/patterns/components-sectioncaption--with-action.tsx +19 -0
  202. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  203. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  204. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  205. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  206. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  207. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  208. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  209. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  210. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  211. package/docs/patterns/components-switch--default.tsx +1 -1
  212. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  213. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  214. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  215. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  216. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  217. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  218. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  219. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  220. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  221. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  222. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  223. package/docs/patterns/components-textlink--quiet-title.tsx +15 -0
  224. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  225. package/docs/patterns/components-textsequence--default.tsx +1 -1
  226. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  227. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  228. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  229. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  230. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  231. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  232. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  233. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  234. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  235. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  236. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  237. package/docs/patterns/guides-filter-panel--filtered-index.tsx +174 -0
  238. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  239. package/docs/patterns/guides-post-page--post-page.tsx +143 -0
  240. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  241. package/docs/patterns/index.json +137 -9
  242. package/package.json +1 -1
  243. package/docs/patterns/components-promptbar--pattern-marketing-composer.tsx +0 -37
@@ -1,19 +1,20 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { ButtonBadge as t } from "./ButtonBadge.js";
4
- import { buttonAlignClasses as n, buttonAligns as r, buttonBaseClasses as i, buttonEmphases as a, buttonEndIconSquareClasses as o, buttonLayouts as s, buttonMonoLabelClasses as c, buttonNavLayoutClasses as l, buttonNavStateClasses as u, buttonOutlineQuietClasses as d, buttonPillClass as f, buttonRoleClasses as p, buttonRoles as m, buttonRowBaseClasses as h, buttonRowLayoutClasses as g, buttonRowWidthClasses as _, buttonSizeClasses as v, buttonWidths as y } from "./buttonStyles.js";
5
- import { ButtonIcon as b } from "./ButtonIcon.js";
6
- import { defaultStatusLabels as x, getNextButtonStatus as S } from "./buttonStatusStyles.js";
7
- import { ButtonStatusButton as C } from "./ButtonStatusButton.js";
8
- import { forwardRef as w } from "react";
9
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
10
- import { useRender as D } from "@base-ui/react/use-render";
4
+ import { buttonAlignClasses as n, buttonAligns as r, buttonBaseClasses as i, buttonEmphases as a, buttonEndIconSquareClasses as o, buttonExternalIconClasses as s, buttonLayouts as c, buttonMonoLabelClasses as l, buttonNavLayoutClasses as u, buttonNavStateClasses as d, buttonOutlineQuietClasses as f, buttonPillClass as p, buttonRoleClasses as m, buttonRoles as h, buttonRowBaseClasses as g, buttonRowLayoutClasses as _, buttonRowWidthClasses as v, buttonSizeClasses as y, buttonWidths as b } from "./buttonStyles.js";
5
+ import { ButtonIcon as x } from "./ButtonIcon.js";
6
+ import { buttonStatusHoldMs as S, defaultStatusLabels as C, getNextButtonStatus as w } from "./buttonStatusStyles.js";
7
+ import { ButtonStatusButton as T } from "./ButtonStatusButton.js";
8
+ import { forwardRef as E } from "react";
9
+ import { SquareArrowOutUpRight as D } from "lucide-react";
10
+ import { jsx as O, jsxs as k } from "react/jsx-runtime";
11
+ import { useRender as A } from "@base-ui/react/use-render";
11
12
  //#region src/components/atoms/Button/Button.tsx
12
- function O(e) {
13
- e.width != null && e.layout !== "row" && console.warn("[WMDS Button] `width` applies to `layout=\"row\"` only."), e.align != null && (e.layout === "row" || e.layout === "nav") && console.warn("[WMDS Button] `align` applies to pill buttons only."), e.emphasis != null && e.role !== "outline" && console.warn("[WMDS Button] `emphasis` applies to `role=\"outline\"` only."), (e.layout === "row" || e.layout === "nav") && (e.status != null || e.icon != null || e.count != null || e.endIcon != null || e.mono) && console.warn(`[WMDS Button] \`layout="${e.layout}"\` is mutually exclusive with \`status\`, \`icon\`, \`count\`, \`endIcon\`, and \`mono\`.`), e.status != null && (e.icon != null || e.count != null || e.endIcon != null || e.mono) && console.warn("[WMDS Button] `status` is mutually exclusive with `icon`, `count`, `endIcon`, and `mono`."), e.endIcon != null && e.count != null && console.warn("[WMDS Button] `endIcon` is mutually exclusive with `count`."), e.render != null && (e.layout !== "pill" || e.status != null) && console.warn("[WMDS Button] `render` is supported on `layout=\"pill\"` without `status` only.");
13
+ function j(e) {
14
+ e.external && (e.render == null || e.layout !== "pill") && console.warn("[WMDS Button] `external` needs `render={<a href />}` on a pill button."), e.external && e.endIcon != null && console.warn("[WMDS Button] `external` is mutually exclusive with `endIcon`."), e.width != null && e.layout !== "row" && console.warn("[WMDS Button] `width` applies to `layout=\"row\"` only."), e.align != null && (e.layout === "row" || e.layout === "nav") && console.warn("[WMDS Button] `align` applies to pill buttons only."), e.emphasis != null && e.role !== "outline" && console.warn("[WMDS Button] `emphasis` applies to `role=\"outline\"` only."), (e.layout === "row" || e.layout === "nav") && (e.status != null || e.icon != null || e.count != null || e.endIcon != null || e.mono) && console.warn(`[WMDS Button] \`layout="${e.layout}"\` is mutually exclusive with \`status\`, \`icon\`, \`count\`, \`endIcon\`, and \`mono\`.`), e.status != null && (e.count != null || e.endIcon != null || e.mono) && console.warn("[WMDS Button] `status` is mutually exclusive with `count`, `endIcon`, and `mono`."), e.endIcon != null && e.count != null && console.warn("[WMDS Button] `endIcon` is mutually exclusive with `count`."), e.render != null && (e.layout !== "pill" || e.status != null) && console.warn("[WMDS Button] `render` is supported on `layout=\"pill\"` without `status` only.");
14
15
  }
15
- var k = w(function({ render: e, type: t, disabled: n, ...r }, i) {
16
- return D({
16
+ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
17
+ return A({
17
18
  render: e,
18
19
  ref: i,
19
20
  defaultTagName: "button",
@@ -28,111 +29,130 @@ var k = w(function({ render: e, type: t, disabled: n, ...r }, i) {
28
29
  disabled: n
29
30
  }
30
31
  });
31
- }), A = w(function({ children: r, role: a = "primary", layout: s = "pill", width: m, align: y, emphasis: x, size: S = "md", disabled: w, type: D = "button", status: A, statusLabels: j, disableOnError: M, icon: N, count: P, mono: F = !1, endIcon: I, selected: L = !1, render: R, className: z, onClick: B, "aria-label": V, "aria-pressed": H, "aria-keyshortcuts": U, id: W, name: G, form: K, ...q }, J) {
32
- return O({
32
+ }), N = E(function({ children: r, role: a = "primary", layout: c = "pill", width: h, align: b, emphasis: S, size: C = "md", disabled: w, type: E = "button", status: A, statusLabels: N, disableOnError: P, icon: F, count: I, mono: L = !1, endIcon: R, selected: z = !1, render: B, external: V = !1, externalIcon: H = !0, className: U, onClick: W, "aria-label": G, "aria-pressed": K, "aria-keyshortcuts": q, id: J, name: Y, form: X, ...Z }, Q) {
33
+ if (j({
33
34
  status: A,
34
- icon: N,
35
- count: P,
36
- layout: s,
37
- render: R,
38
- endIcon: I,
39
- mono: F,
40
- width: m,
41
- align: y,
42
- emphasis: x,
43
- role: a
44
- }), A == null ? s === "row" ? /* @__PURE__ */ T("button", {
45
- ...q,
46
- ref: J,
47
- type: D,
35
+ icon: F,
36
+ count: I,
37
+ layout: c,
38
+ render: B,
39
+ endIcon: R,
40
+ mono: L,
41
+ width: h,
42
+ align: b,
43
+ emphasis: S,
44
+ role: a,
45
+ external: V
46
+ }), A != null) return /* @__PURE__ */ O(T, {
47
+ ...Z,
48
+ ref: Q,
49
+ status: A,
50
+ role: a,
51
+ size: C,
52
+ statusLabels: N,
53
+ icon: F,
54
+ disableOnError: P,
48
55
  disabled: w,
49
- onClick: B,
50
- "aria-label": V,
51
- "aria-pressed": H,
52
- "aria-keyshortcuts": U,
53
- id: W,
54
- name: G,
55
- form: K,
56
- className: e(h, p[a], g, _[m ?? "fill"], z),
56
+ className: U,
57
+ type: E,
58
+ onClick: W,
59
+ "aria-label": G,
60
+ "aria-pressed": K,
61
+ "aria-keyshortcuts": q,
62
+ id: J,
63
+ name: Y,
64
+ form: X,
65
+ children: r
66
+ });
67
+ if (c === "row") return /* @__PURE__ */ O("button", {
68
+ ...Z,
69
+ ref: Q,
70
+ type: E,
71
+ disabled: w,
72
+ onClick: W,
73
+ "aria-label": G,
74
+ "aria-pressed": K,
75
+ "aria-keyshortcuts": q,
76
+ id: J,
77
+ name: Y,
78
+ form: X,
79
+ className: e(g, m[a], _, v[h ?? "fill"], U),
57
80
  "data-role": a,
58
81
  "data-layout": "row",
59
- "data-width": m ?? "fill",
82
+ "data-width": h ?? "fill",
60
83
  children: r
61
- }) : s === "nav" ? /* @__PURE__ */ T("button", {
62
- ...q,
63
- ref: J,
64
- type: D,
84
+ });
85
+ if (c === "nav") return /* @__PURE__ */ O("button", {
86
+ ...Z,
87
+ ref: Q,
88
+ type: E,
65
89
  disabled: w,
66
- onClick: B,
67
- "aria-label": V,
68
- "aria-pressed": H,
69
- "aria-keyshortcuts": U,
70
- "aria-current": L ? "page" : void 0,
71
- id: W,
72
- name: G,
73
- form: K,
74
- className: e(h, l, u(L), z),
90
+ onClick: W,
91
+ "aria-label": G,
92
+ "aria-pressed": K,
93
+ "aria-keyshortcuts": q,
94
+ "aria-current": z ? "page" : void 0,
95
+ id: J,
96
+ name: Y,
97
+ form: X,
98
+ className: e(g, u, d(z), U),
75
99
  "data-layout": "nav",
76
- "data-selected": L ? "" : void 0,
100
+ "data-selected": z ? "" : void 0,
77
101
  children: r
78
- }) : /* @__PURE__ */ E(k, {
79
- ...q,
80
- ref: J,
81
- render: R,
82
- type: D,
102
+ });
103
+ let $ = V && B != null;
104
+ return /* @__PURE__ */ k(M, {
105
+ ...Z,
106
+ ...$ ? {
107
+ target: "_blank",
108
+ rel: "noopener noreferrer"
109
+ } : null,
110
+ ref: Q,
111
+ render: B,
112
+ type: E,
83
113
  disabled: w,
84
- onClick: B,
85
- "aria-label": V,
86
- "aria-pressed": H,
87
- "aria-keyshortcuts": U,
88
- id: W,
89
- name: G,
90
- form: K,
91
- className: e(i, n[y ?? "center"], a === "outline" && x === "quiet" ? d : p[a], v[S], f, "gap-2", z),
114
+ onClick: W,
115
+ "aria-label": G,
116
+ "aria-pressed": K,
117
+ "aria-keyshortcuts": q,
118
+ id: J,
119
+ name: Y,
120
+ form: X,
121
+ className: e(i, n[b ?? "center"], a === "outline" && S === "quiet" ? f : m[a], y[C], p, "gap-2", U),
92
122
  "data-role": a,
93
- "data-size": S,
94
- "data-align": y,
95
- "data-emphasis": a === "outline" ? x ?? "strong" : void 0,
96
- "data-mono": F ? "" : void 0,
97
- "data-end-icon": I ? "" : void 0,
123
+ "data-size": C,
124
+ "data-align": b,
125
+ "data-emphasis": a === "outline" ? S ?? "strong" : void 0,
126
+ "data-mono": L ? "" : void 0,
127
+ "data-end-icon": R ? "" : void 0,
128
+ "data-external": $ ? "" : void 0,
98
129
  children: [
99
- N ? /* @__PURE__ */ T(b, {
100
- size: S,
101
- children: N
130
+ F ? /* @__PURE__ */ O(x, {
131
+ size: C,
132
+ children: F
102
133
  }) : null,
103
- /* @__PURE__ */ T("span", {
104
- className: F ? c : void 0,
105
- children: r
134
+ /* @__PURE__ */ k("span", {
135
+ className: L ? l : void 0,
136
+ children: [r, $ ? /* @__PURE__ */ O("span", {
137
+ className: "sr-only",
138
+ children: " (opens in a new tab)"
139
+ }) : null]
106
140
  }),
107
- I ? /* @__PURE__ */ T("span", {
141
+ $ && H ? /* @__PURE__ */ O(D, {
142
+ className: s,
143
+ strokeWidth: 2,
144
+ "aria-hidden": !0
145
+ }) : null,
146
+ R ? /* @__PURE__ */ O("span", {
108
147
  className: o,
109
- children: /* @__PURE__ */ T(b, {
148
+ children: /* @__PURE__ */ O(x, {
110
149
  size: "xs",
111
- children: I
150
+ children: R
112
151
  })
113
152
  }) : null,
114
- P == null ? null : /* @__PURE__ */ T(t, { value: P })
153
+ I == null ? null : /* @__PURE__ */ O(t, { value: I })
115
154
  ]
116
- }) : /* @__PURE__ */ T(C, {
117
- ...q,
118
- ref: J,
119
- status: A,
120
- role: a,
121
- size: S,
122
- statusLabels: j,
123
- disableOnError: M,
124
- disabled: w,
125
- className: z,
126
- type: D,
127
- onClick: B,
128
- "aria-label": V,
129
- "aria-pressed": H,
130
- "aria-keyshortcuts": U,
131
- id: W,
132
- name: G,
133
- form: K,
134
- children: r
135
155
  });
136
156
  });
137
157
  //#endregion
138
- export { A as Button, r as buttonAligns, a as buttonEmphases, s as buttonLayouts, m as buttonRoles, y as buttonWidths, x as defaultStatusLabels, S as getNextButtonStatus };
158
+ export { N as Button, r as buttonAligns, a as buttonEmphases, c as buttonLayouts, h as buttonRoles, S as buttonStatusHoldMs, b as buttonWidths, C as defaultStatusLabels, w as getNextButtonStatus };
@@ -1,4 +1,4 @@
1
- import { type ButtonHTMLAttributes, type ReactNode } from "react";
1
+ import { type ButtonHTMLAttributes, type ReactElement, type ReactNode } from "react";
2
2
  import { type ButtonStatus } from "./buttonStatusStyles";
3
3
  import { type ButtonRole, type ButtonSize } from "./buttonStyles";
4
4
  export interface ButtonStatusButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className" | "role" | "size"> {
@@ -6,6 +6,8 @@ export interface ButtonStatusButtonProps extends Omit<ButtonHTMLAttributes<HTMLB
6
6
  role?: ButtonRole;
7
7
  size?: ButtonSize;
8
8
  statusLabels?: Partial<Record<ButtonStatus, string>>;
9
+ /** Leading icon while idle; the status glyphs morph out of it. */
10
+ icon?: ReactElement;
9
11
  disableOnError?: boolean;
10
12
  disabled?: boolean;
11
13
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,uHAiE7B,CAAC"}
1
+ {"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,uHAkE7B,CAAC"}
@@ -8,35 +8,36 @@ import { forwardRef as d } from "react";
8
8
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
9
  import { motion as m } from "motion/react";
10
10
  //#region src/components/atoms/Button/ButtonStatusButton.tsx
11
- var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabels: _, disableOnError: v = !1, disabled: y, className: b, children: x, type: S = "button", onClick: C, "aria-label": w, "aria-pressed": T, "aria-keyshortcuts": E, id: D, name: O, form: k, ...A }, j) {
12
- let M = u(x, _)[d], N = y || d === "loading" || d === "error" && v, P = r(d, h);
11
+ var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabels: _, icon: v, disableOnError: y = !1, disabled: b, className: x, children: S, type: C = "button", onClick: w, "aria-label": T, "aria-pressed": E, "aria-keyshortcuts": D, id: O, name: k, form: A, ...j }, M) {
12
+ let N = u(S, _)[d], P = b || d === "loading" || d === "error" && y, F = r(d, h);
13
13
  return /* @__PURE__ */ p(m.button, {
14
- ...A,
15
- ref: j,
16
- type: S,
14
+ ...j,
15
+ ref: M,
16
+ type: C,
17
17
  layout: !0,
18
- disabled: N,
18
+ disabled: P,
19
19
  "aria-busy": d === "loading" || void 0,
20
20
  "aria-live": "polite",
21
- "aria-label": w,
22
- "aria-pressed": T,
23
- "aria-keyshortcuts": E,
21
+ "aria-label": T,
22
+ "aria-pressed": E,
23
+ "aria-keyshortcuts": D,
24
24
  "data-role": h,
25
25
  "data-size": g,
26
26
  "data-status": d,
27
- animate: P,
27
+ animate: F,
28
28
  initial: !1,
29
- className: e(t, "justify-center", l[g], d !== "idle" && c[g], n, i(d, h), "overflow-hidden", b),
30
- whileTap: N ? void 0 : { scale: .98 },
29
+ className: e(t, "justify-center", l[g], (d !== "idle" || v != null) && c[g], n, i(d, h), "overflow-hidden", x),
30
+ whileTap: P ? void 0 : { scale: .98 },
31
31
  transition: a,
32
- onClick: C,
33
- id: D,
34
- name: O,
35
- form: k,
32
+ onClick: w,
33
+ id: O,
34
+ name: k,
35
+ form: A,
36
36
  children: [/* @__PURE__ */ f(o, {
37
37
  status: d,
38
- size: g
39
- }), /* @__PURE__ */ f(s, { label: M })]
38
+ size: g,
39
+ icon: v
40
+ }), /* @__PURE__ */ f(s, { label: N })]
40
41
  });
41
42
  });
42
43
  //#endregion
@@ -1,8 +1,14 @@
1
+ import type { ReactElement } from "react";
1
2
  import { type ButtonSize } from "./buttonStyles";
2
3
  import type { ButtonStatus } from "./buttonStatusStyles";
3
- export declare function ButtonStatusIcon({ status, size }: {
4
+ /**
5
+ * The status glyph. With `icon`, idle shows that icon and each status morphs out of it — a copy
6
+ * button's Copy glyph turns into the check.
7
+ */
8
+ export declare function ButtonStatusIcon({ status, size, icon, }: {
4
9
  status: ButtonStatus;
5
10
  size: ButtonSize;
11
+ icon?: ReactElement;
6
12
  }): import("react").JSX.Element | null;
7
13
  export declare function ButtonStatusLabel({ label }: {
8
14
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonStatusContent.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusContent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAwCzD,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,sCAsB5F;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAkB7D"}
1
+ {"version":3,"file":"ButtonStatusContent.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAwCzD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,IAAI,EACJ,IAAI,GACL,EAAE;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,sCAiCA;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAkB7D"}
@@ -26,8 +26,8 @@ function p({ status: n, size: r }) {
26
26
  "aria-hidden": !0
27
27
  });
28
28
  }
29
- function m({ status: e, size: t }) {
30
- return e === "idle" ? null : /* @__PURE__ */ s(c, {
29
+ function m({ status: r, size: i, icon: a }) {
30
+ return r === "idle" && a == null ? null : /* @__PURE__ */ s(c, {
31
31
  mode: "popLayout",
32
32
  initial: !1,
33
33
  children: /* @__PURE__ */ s(l.span, {
@@ -51,11 +51,14 @@ function m({ status: e, size: t }) {
51
51
  },
52
52
  transition: n,
53
53
  "aria-hidden": !0,
54
- children: /* @__PURE__ */ s(p, {
55
- status: e,
56
- size: t
54
+ children: r === "idle" ? /* @__PURE__ */ s("span", {
55
+ className: e("inline-flex shrink-0 [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", t[i]),
56
+ children: a
57
+ }) : /* @__PURE__ */ s(p, {
58
+ status: r,
59
+ size: i
57
60
  })
58
- }, e)
61
+ }, r)
59
62
  });
60
63
  }
61
64
  function h({ label: e }) {
@@ -2,6 +2,11 @@ import type { ReactNode } from "react";
2
2
  /** Multi-state pill cycle — inspired by [Motion multi-state badge](https://motion.dev/examples/react-multi-state-badge). */
3
3
  export type ButtonStatus = "idle" | "loading" | "success" | "error";
4
4
  export declare const buttonStatusCycle: ButtonStatus[];
5
+ /**
6
+ * How long a confirmation (`success`, or `error` after a quick action such as a copy) holds before
7
+ * the button returns to `idle`, in milliseconds.
8
+ */
9
+ export declare const buttonStatusHoldMs = 2000;
5
10
  export declare const defaultStatusLabels: Record<ButtonStatus, string>;
6
11
  export declare function getNextButtonStatus(current: ButtonStatus): ButtonStatus;
7
12
  export declare function resolveStatusLabels(children: ReactNode, overrides?: Partial<Record<ButtonStatus, string>>): Record<ButtonStatus, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"buttonStatusStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStatusStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,4HAA4H;AAC5H,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAA4C,CAAC;AAEzF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK5D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAGvE;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,EACnB,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAChD,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAW9B;AAED,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB;;;;;CAKW,CAAC;AAEhD,eAAO,MAAM,0BAA0B;;;;;CAKQ,CAAC"}
1
+ {"version":3,"file":"buttonStatusStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStatusStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,4HAA4H;AAC5H,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAA4C,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK5D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAGvE;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,EACnB,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAChD,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAW9B;AAED,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB;;;;;CAKW,CAAC;AAEhD,eAAO,MAAM,0BAA0B;;;;;CAKQ,CAAC"}
@@ -7,33 +7,33 @@ var n = [
7
7
  "loading",
8
8
  "success",
9
9
  "error"
10
- ], r = {
10
+ ], r = 2e3, i = {
11
11
  idle: "Start",
12
12
  loading: "Processing",
13
13
  success: "Success",
14
14
  error: "Error"
15
15
  };
16
- function i(e) {
16
+ function a(e) {
17
17
  return n[(n.indexOf(e) + 1) % n.length];
18
18
  }
19
- function a(e, t) {
19
+ function o(e, t) {
20
20
  return {
21
- idle: t?.idle ?? (typeof e == "string" || typeof e == "number" ? String(e) : r.idle),
22
- loading: t?.loading ?? r.loading,
23
- success: t?.success ?? r.success,
24
- error: t?.error ?? r.error
21
+ idle: t?.idle ?? (typeof e == "string" || typeof e == "number" ? String(e) : i.idle),
22
+ loading: t?.loading ?? i.loading,
23
+ success: t?.success ?? i.success,
24
+ error: t?.error ?? i.error
25
25
  };
26
26
  }
27
- var o = {
27
+ var s = {
28
28
  xs: `${e.sm} ${t.xs} py-1 text-sm leading-none`,
29
29
  sm: `${e.md} ${t.sm} py-1.5 text-sm leading-none`,
30
30
  md: `${e.lg} ${t.md} py-2.5 text-sm leading-none`,
31
31
  lg: `min-h-12 ${t.lg} py-3 text-base leading-none`
32
- }, s = {
32
+ }, c = {
33
33
  xs: "gap-1.5",
34
34
  sm: "gap-1.5",
35
35
  md: "gap-2",
36
36
  lg: "gap-2"
37
37
  };
38
38
  //#endregion
39
- export { n as buttonStatusCycle, s as buttonStatusIconGapClasses, o as buttonStatusSizeClasses, r as defaultStatusLabels, i as getNextButtonStatus, a as resolveStatusLabels };
39
+ export { n as buttonStatusCycle, r as buttonStatusHoldMs, c as buttonStatusIconGapClasses, s as buttonStatusSizeClasses, i as defaultStatusLabels, a as getNextButtonStatus, o as resolveStatusLabels };
@@ -27,6 +27,8 @@ export declare const buttonAlignClasses: Record<ButtonAlign, string>;
27
27
  * Size is `--font-size-sm` (12px) — small, still a control label.
28
28
  */
29
29
  export declare const buttonMonoLabelClasses = "!font-mono !text-[length:var(--font-size-sm)] !font-normal !uppercase !leading-none !tracking-[0.14em]";
30
+ /** Trailing new-tab glyph on an `external` link button — the icon **TextLink** `external` shows. */
31
+ export declare const buttonExternalIconClasses = "-ml-0.5 size-[0.85em] shrink-0 stroke-current";
30
32
  /** Trailing accent square for a Lucide glyph (`endIcon`). */
31
33
  export declare const buttonEndIconSquareClasses = "inline-flex size-5 shrink-0 items-center justify-center rounded-none bg-accent text-on-accent";
32
34
  /** Horizontal padding per size — md = 20px (`px-5`). Shared by action and status modes. */
@@ -1 +1 @@
1
- {"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"names":[],"mappings":"AAMA,uEAAuE;AACvE,eAAO,MAAM,WAAW,iFAAkF,CAAC;AAE3G,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,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,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAI/D"}
@@ -13,7 +13,7 @@ var i = [
13
13
  "pill",
14
14
  "row",
15
15
  "nav"
16
- ], s = ["fill", "hug"], c = ["center", "start"], l = ["strong", "quiet"], u = "inline-flex cursor-pointer items-center font-sans font-medium tracking-normal transition-[color,transform,box-shadow,border-color,outline-color,background-color] " + e("fast") + " " + t + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-50 no-underline", d = {
16
+ ], s = ["fill", "hug"], c = ["center", "start"], l = ["strong", "quiet"], u = "inline-flex cursor-pointer items-center font-sans font-medium normal-case tracking-normal transition-[color,transform,box-shadow,border-color,outline-color,background-color] " + e("fast") + " " + t + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-50 no-underline", d = {
17
17
  primary: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-active",
18
18
  secondary: "bg-secondary text-secondary-foreground shadow-raised hover:bg-secondary-hover active:bg-secondary-active",
19
19
  ghost: "bg-transparent text-ghost-foreground hover:bg-ghost-hover active:bg-ghost-active",
@@ -23,32 +23,32 @@ var i = [
23
23
  }, f = "border border-border bg-transparent text-fg hover:bg-ghost-hover active:bg-ghost-active", p = {
24
24
  center: "justify-center",
25
25
  start: "justify-start text-left"
26
- }, m = "!font-mono !text-[length:var(--font-size-sm)] !font-normal !uppercase !leading-none !tracking-[0.14em]", h = "inline-flex size-5 shrink-0 items-center justify-center rounded-none bg-accent text-on-accent", g = {
26
+ }, m = "!font-mono !text-[length:var(--font-size-sm)] !font-normal !uppercase !leading-none !tracking-[0.14em]", h = "-ml-0.5 size-[0.85em] shrink-0 stroke-current", g = "inline-flex size-5 shrink-0 items-center justify-center rounded-none bg-accent text-on-accent", _ = {
27
27
  xs: "px-3.5",
28
28
  sm: "px-4",
29
29
  md: "px-5",
30
30
  lg: "px-7"
31
- }, _ = {
32
- xs: `${n.sm} ${g.xs} py-1 text-sm leading-none`,
33
- sm: `${n.md} ${g.sm} py-1.5 text-sm leading-none`,
34
- md: `${n.lg} ${g.md} py-2.5 text-sm leading-none`,
35
- lg: `min-h-12 ${g.lg} py-3 text-base leading-none`
36
31
  }, v = {
32
+ xs: `${n.sm} ${_.xs} py-1 text-sm leading-none`,
33
+ sm: `${n.md} ${_.sm} py-1.5 text-sm leading-none`,
34
+ md: `${n.lg} ${_.md} py-2.5 text-sm leading-none`,
35
+ lg: `min-h-12 ${_.lg} py-3 text-base leading-none`
36
+ }, y = {
37
37
  xs: "size-3.5",
38
38
  sm: "size-4",
39
39
  md: "size-4",
40
40
  lg: "size-[1.125rem]"
41
- }, y = {
41
+ }, b = {
42
42
  xs: r.sm,
43
43
  sm: r.md,
44
44
  md: r.lg,
45
45
  lg: "size-12 shrink-0"
46
- }, b = "flex cursor-pointer items-center font-sans tracking-normal transition-[color,background-color,outline-color] " + e("fast") + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50", x = "h-auto min-h-0 rounded-md px-1.5 py-1 text-left font-normal focus-visible:ring-inset focus-visible:ring-offset-0", S = {
46
+ }, x = "flex cursor-pointer items-center font-sans tracking-normal transition-[color,background-color,outline-color] " + e("fast") + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50", S = "h-auto min-h-0 rounded-md px-1.5 py-1 text-left font-normal focus-visible:ring-inset focus-visible:ring-offset-0", C = {
47
47
  fill: "w-full justify-between gap-3",
48
48
  hug: "w-auto justify-start gap-1.5"
49
- }, C = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-xl px-2.5 py-2 text-left text-sm font-normal leading-[var(--line-height-sm)] focus-visible:ring-inset focus-visible:ring-offset-0";
50
- function w(e) {
49
+ }, w = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-xl px-2.5 py-2 text-left text-sm font-normal leading-[var(--line-height-sm)] focus-visible:ring-inset focus-visible:ring-offset-0";
50
+ function T(e) {
51
51
  return e ? "bg-secondary text-secondary-foreground" : "bg-transparent text-muted hover:bg-ghost-hover hover:text-fg";
52
52
  }
53
53
  //#endregion
54
- export { p as buttonAlignClasses, c as buttonAligns, u as buttonBaseClasses, l as buttonEmphases, h as buttonEndIconSquareClasses, g as buttonHorizontalPadding, v as buttonIconSizeClasses, o as buttonLayouts, m as buttonMonoLabelClasses, C as buttonNavLayoutClasses, w as buttonNavStateClasses, f as buttonOutlineQuietClasses, a as buttonPillClass, d as buttonRoleClasses, i as buttonRoles, b as buttonRowBaseClasses, x as buttonRowLayoutClasses, S as buttonRowWidthClasses, _ as buttonSizeClasses, s as buttonWidths, y as iconButtonSizeClasses };
54
+ export { p as buttonAlignClasses, c as buttonAligns, u as buttonBaseClasses, l as buttonEmphases, g as buttonEndIconSquareClasses, h as buttonExternalIconClasses, _ as buttonHorizontalPadding, y as buttonIconSizeClasses, o as buttonLayouts, m as buttonMonoLabelClasses, w as buttonNavLayoutClasses, T as buttonNavStateClasses, f as buttonOutlineQuietClasses, a as buttonPillClass, d as buttonRoleClasses, i as buttonRoles, x as buttonRowBaseClasses, S as buttonRowLayoutClasses, C as buttonRowWidthClasses, v as buttonSizeClasses, s as buttonWidths, b as iconButtonSizeClasses };
@@ -13,6 +13,13 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement
13
13
  labelHidden?: boolean;
14
14
  /** Neutral helper below the label. */
15
15
  description?: string;
16
+ /**
17
+ * Trailing count — for example how many posts a filter option matches. Muted, at the row's end.
18
+ * Screen readers hear it after the label in parentheses: "Guides (2)".
19
+ */
20
+ count?: number;
21
+ /** What screen readers hear for `count`, for example "2 posts". Default: the number. */
22
+ countLabel?: string;
16
23
  /** Mixed selection — sets native `indeterminate` on the input. */
17
24
  indeterminate?: boolean;
18
25
  /** Validation status — tints box border; pair with `message`. */
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,OAAO,EAiBL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAcD;;;GAGG;AACH,eAAO,MAAM,QAAQ,4GAgLnB,CAAC"}
1
+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