@thewhatmatters/wmds 0.4.42 → 0.4.45

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 +55 -1
  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/AppShell/AppShell.d.ts +10 -2
  60. package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -1
  61. package/dist/components/organisms/AppShell/AppShell.js +237 -198
  62. package/dist/components/organisms/AppShell/appShellStyles.d.ts +11 -0
  63. package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -1
  64. package/dist/components/organisms/AppShell/appShellStyles.js +2 -2
  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 +2 -1
@@ -2,89 +2,98 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { IconButton as t } from "../../atoms/IconButton/IconButton.js";
4
4
  import { TextLink as n } from "../../atoms/TextLink/TextLink.js";
5
- import { indexListCaptionsClasses as r, indexListChevronClasses as i, indexListEmptyClasses as a, indexListItemClasses as o, indexListListClasses as s, indexListMetaClasses as c, indexListPanelClasses as l, indexListPanelContentClasses as u, indexListPanelInnerClasses as d, indexListRootClasses as f, indexListSizes as p, indexListTitleCellClasses as m, indexListTitleClasses as h, indexListTitleElements as g, indexListTitleSizeClasses as _, indexListToggleAlignClasses as v } from "./indexListStyles.js";
6
- import { Children as y, createContext as b, useContext as x, useId as S, useMemo as C, useState as w } from "react";
7
- import { ChevronDown as T } from "lucide-react";
8
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
5
+ import { emptySlot as r } from "../EmptyState/EmptyState.js";
6
+ import { indexListCaptionsClasses as i, indexListChevronClasses as a, indexListEmptyClasses as o, indexListItemClasses as s, indexListListClasses as c, indexListMetaClasses as l, indexListPanelClasses as u, indexListPanelContentClasses as d, indexListPanelInnerClasses as f, indexListRootClasses as p, indexListSizes as m, indexListTitleCellClasses as h, indexListTitleClasses as g, indexListTitleElements as _, indexListTitleSizeClasses as v, indexListToggleAlignClasses as y } from "./indexListStyles.js";
7
+ import { Children as b, createContext as x, useContext as S, useId as C, useMemo as w, useState as T } from "react";
8
+ import { ChevronDown as E } from "lucide-react";
9
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
9
10
  //#region src/components/molecules/IndexList/IndexList.tsx
10
- var O = b({
11
+ var k = x({
11
12
  size: "lg",
12
13
  titleAs: "h2"
13
14
  });
14
- function k({ captions: t, size: n = "lg", titleAs: i = "h2", empty: o, "aria-label": c, "aria-labelledby": l, children: u, className: d }) {
15
- let p = y.toArray(u).length > 0, m = C(() => ({
15
+ function A({ captions: t, size: n = "lg", titleAs: a = "h2", empty: s, resultsLabel: l, "aria-label": u, "aria-labelledby": d, children: f, className: m }) {
16
+ let h = b.toArray(f).length > 0, g = w(() => ({
16
17
  size: n,
17
- titleAs: i
18
- }), [n, i]);
19
- return /* @__PURE__ */ E(O.Provider, {
20
- value: m,
21
- children: /* @__PURE__ */ D("div", {
22
- className: e(f, d),
18
+ titleAs: a
19
+ }), [n, a]);
20
+ return /* @__PURE__ */ D(k.Provider, {
21
+ value: g,
22
+ children: /* @__PURE__ */ O("div", {
23
+ className: e(p, m),
23
24
  "data-size": n,
24
- children: [p && t != null ? /* @__PURE__ */ D("div", {
25
- className: r,
26
- "aria-hidden": "true",
27
- "data-index-list-captions": "",
28
- children: [/* @__PURE__ */ D("span", { children: ["/ ", t.meta] }), /* @__PURE__ */ D("span", {
29
- className: "@lg:col-start-2",
30
- children: ["/ ", t.title]
31
- })]
32
- }) : null, p ? /* @__PURE__ */ E("ul", {
33
- role: "list",
34
- "aria-label": c,
35
- "aria-labelledby": l,
36
- className: e(s, t != null && "@lg:border-t-0"),
37
- children: u
38
- }) : o == null ? null : /* @__PURE__ */ E("div", {
39
- className: a,
40
- "data-index-list-empty": "",
41
- children: o
42
- })]
25
+ children: [
26
+ h && t != null ? /* @__PURE__ */ O("div", {
27
+ className: i,
28
+ "aria-hidden": "true",
29
+ "data-index-list-captions": "",
30
+ children: [/* @__PURE__ */ O("span", { children: ["/ ", t.meta] }), /* @__PURE__ */ O("span", {
31
+ className: "@lg:col-start-2",
32
+ children: ["/ ", t.title]
33
+ })]
34
+ }) : null,
35
+ h ? /* @__PURE__ */ D("ul", {
36
+ role: "list",
37
+ "aria-label": u,
38
+ "aria-labelledby": d,
39
+ className: e(c, t != null && "@lg:border-t-0"),
40
+ children: f
41
+ }) : s == null ? null : /* @__PURE__ */ D("div", {
42
+ className: o,
43
+ "data-index-list-empty": "",
44
+ children: r(s)
45
+ }),
46
+ l == null ? null : /* @__PURE__ */ D("p", {
47
+ role: "status",
48
+ className: "sr-only",
49
+ children: l
50
+ })
51
+ ]
43
52
  })
44
53
  });
45
54
  }
46
- function A({ title: r, href: a, render: s, meta: f, preview: p, defaultOpen: g = !1, open: y, onOpenChange: b, previewLabel: C, className: k }) {
47
- let { size: A, titleAs: j } = x(O), M = S(), [N, P] = w(g), F = y !== void 0, I = F ? y : N, L = p != null;
55
+ function j({ title: r, href: i, render: o, meta: c, preview: p, defaultOpen: m = !1, open: _, onOpenChange: b, previewLabel: x, className: w }) {
56
+ let { size: A, titleAs: j } = S(k), M = C(), [N, P] = T(m), F = _ !== void 0, I = F ? _ : N, L = p != null;
48
57
  function R() {
49
58
  let e = !I;
50
59
  F || P(e), b?.(e);
51
60
  }
52
- return /* @__PURE__ */ D("li", {
53
- className: e(o, k),
61
+ return /* @__PURE__ */ O("li", {
62
+ className: e(s, w),
54
63
  children: [
55
- f == null ? null : /* @__PURE__ */ E("div", {
56
- className: c,
57
- children: f
64
+ c == null ? null : /* @__PURE__ */ D("div", {
65
+ className: l,
66
+ children: c
58
67
  }),
59
- /* @__PURE__ */ D("div", {
60
- className: m,
61
- children: [/* @__PURE__ */ E(j, {
62
- className: e(h, _[A]),
63
- children: /* @__PURE__ */ E(n, {
68
+ /* @__PURE__ */ O("div", {
69
+ className: h,
70
+ children: [/* @__PURE__ */ D(j, {
71
+ className: e(g, v[A]),
72
+ children: /* @__PURE__ */ D(n, {
64
73
  variant: "quiet",
65
- href: a,
66
- render: s,
74
+ href: i,
75
+ render: o,
67
76
  children: r
68
77
  })
69
- }), L ? /* @__PURE__ */ E(t, {
78
+ }), L ? /* @__PURE__ */ D(t, {
70
79
  size: "md",
71
- className: v[A],
72
- icon: /* @__PURE__ */ E(T, { className: e(i, I && "rotate-180") }),
73
- "aria-label": C ?? `Preview: ${r}`,
80
+ className: y[A],
81
+ icon: /* @__PURE__ */ D(E, { className: e(a, I && "rotate-180") }),
82
+ "aria-label": x ?? `Preview: ${r}`,
74
83
  title: "",
75
84
  "aria-expanded": I,
76
85
  "aria-controls": M,
77
86
  onClick: R
78
87
  }) : null]
79
88
  }),
80
- L ? /* @__PURE__ */ E("div", {
81
- className: e("motion-collapse", l),
89
+ L ? /* @__PURE__ */ D("div", {
90
+ className: e("motion-collapse", u),
82
91
  "data-visible": I ? "true" : "false",
83
- children: /* @__PURE__ */ E("div", {
92
+ children: /* @__PURE__ */ D("div", {
84
93
  id: M,
85
- className: d,
86
- children: /* @__PURE__ */ E("div", {
87
- className: u,
94
+ className: f,
95
+ children: /* @__PURE__ */ D("div", {
96
+ className: d,
88
97
  children: p
89
98
  })
90
99
  })
@@ -92,6 +101,6 @@ function A({ title: r, href: a, render: s, meta: f, preview: p, defaultOpen: g =
92
101
  ]
93
102
  });
94
103
  }
95
- var j = Object.assign(k, { Item: A });
104
+ var M = Object.assign(A, { Item: j });
96
105
  //#endregion
97
- export { j as IndexList, p as indexListSizes, g as indexListTitleElements };
106
+ export { M as IndexList, m as indexListSizes, _ as indexListTitleElements };
@@ -35,13 +35,15 @@ export interface LinkTileProps {
35
35
  tag?: ReactNode;
36
36
  /** A mark before the title — **Avatar** `size="xsm"`, or a 20px favicon `<img alt="">`. */
37
37
  source?: ReactNode;
38
- /** A placeholder in the tile's shape, built on **Skeleton** — not a link, and hidden from screen readers. */
38
+ /** A placeholder in the tile's shape, built on **Skeleton** — not a link; busy, with `loadingLabel` for screen readers. */
39
39
  loading?: boolean;
40
+ /** Read out while `loading` (Loading states Y4). Default "Loading…". */
41
+ loadingLabel?: string;
40
42
  className?: LinkTileLayoutClassName;
41
43
  }
42
44
  /**
43
45
  * A resource tile that is one link — a preview image with the resource's name and where it lives
44
46
  * under it. Screen readers hear the title, the meta line, the tag, then "opens in a new tab" with `newTab`.
45
47
  */
46
- export declare function LinkTile({ title, href, render, external, newTab, media, ratio, meta, tag, source, loading, className, }: LinkTileProps): import("react").JSX.Element;
48
+ export declare function LinkTile({ title, href, render, external, newTab, media, ratio, meta, tag, source, loading, loadingLabel, className, }: LinkTileProps): import("react").JSX.Element;
47
49
  //# sourceMappingURL=LinkTile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkTile.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/LinkTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+GAA+G;IAC/G,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6GAA6G;IAC7G,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAuBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,MAAc,EACd,KAAK,EACL,KAAK,EACL,IAAI,EACJ,GAAG,EACH,MAAM,EACN,OAAe,EACf,SAAS,GACV,EAAE,aAAa,+BA0Ff"}
1
+ {"version":3,"file":"LinkTile.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/LinkTile.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+GAA+G;IAC/G,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2HAA2H;IAC3H,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAuBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAgB,EAChB,MAAc,EACd,KAAK,EACL,KAAK,EACL,IAAI,EACJ,GAAG,EACH,MAAM,EACN,OAAe,EACf,YAAyB,EACzB,SAAS,GACV,EAAE,aAAa,+BA6Ff"}
@@ -1,121 +1,129 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
- import { Skeleton as t } from "../../atoms/Skeleton/Skeleton.js";
4
- import { linkTileCaptionClasses as n, linkTileExternalIconClasses as r, linkTileFrameClasses as i, linkTileFrameFixedClasses as a, linkTileFrameNaturalClasses as o, linkTileLoadingLineClasses as s, linkTileLoadingMetaLineClasses as c, linkTileLoadingRatio as l, linkTileLoadingRootClasses as u, linkTileMetaClasses as d, linkTileRootClasses as f, linkTileSourceClasses as p, linkTileTagInlineClasses as m, linkTileTagOverClasses as h, linkTileTextClasses as g, linkTileTitleClasses as _ } from "./linkTileStyles.js";
5
- import { useId as v } from "react";
6
- import { SquareArrowOutUpRight as y } from "lucide-react";
7
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
8
- import { useRender as S } from "@base-ui/react/use-render";
3
+ import { useDelayedLoading as t } from "../../../lib/useDelayedLoading.js";
4
+ import { Skeleton as n } from "../../atoms/Skeleton/Skeleton.js";
5
+ import { linkTileCaptionClasses as r, linkTileExternalIconClasses as i, linkTileFrameClasses as a, linkTileFrameFixedClasses as o, linkTileFrameNaturalClasses as s, linkTileLoadingLineClasses as c, linkTileLoadingMetaLineClasses as l, linkTileLoadingRatio as u, linkTileLoadingRootClasses as d, linkTileMetaClasses as f, linkTileRootClasses as p, linkTileSourceClasses as m, linkTileTagInlineClasses as h, linkTileTagOverClasses as g, linkTileTextClasses as _, linkTileTitleClasses as v } from "./linkTileStyles.js";
6
+ import { useId as y } from "react";
7
+ import { SquareArrowOutUpRight as b } from "lucide-react";
8
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
9
+ import { useRender as C } from "@base-ui/react/use-render";
9
10
  //#region src/components/molecules/LinkTile/LinkTile.tsx
10
- function C({ render: e, ...t }) {
11
- return S({
11
+ function w({ render: e, ...t }) {
12
+ return C({
12
13
  render: e,
13
14
  defaultTagName: "a",
14
15
  props: t
15
16
  });
16
17
  }
17
- function w(e) {
18
+ function T(e) {
18
19
  return e == null ? void 0 : { aspectRatio: String(e) };
19
20
  }
20
- function T({ title: l, href: S, render: T, external: E = !1, newTab: D = !1, media: O, ratio: k, meta: A, tag: j, source: M, loading: N = !1, className: P }) {
21
- let F = v(), I = `${F}-title`, L = `${F}-meta`, R = `${F}-tag`, z = `${F}-hint`;
22
- if (N) return /* @__PURE__ */ x("div", {
23
- className: e(u, P),
21
+ function E({ title: u, href: C, render: E, external: D = !1, newTab: O = !1, media: k, ratio: A, meta: j, tag: M, source: N, loading: P = !1, loadingLabel: F = "Loading…", className: I }) {
22
+ let L = t(P), R = y(), z = `${R}-title`, B = `${R}-meta`, V = `${R}-tag`, H = `${R}-hint`;
23
+ if (P) return /* @__PURE__ */ S("div", {
24
+ className: e(d, !L && "[&>span]:opacity-0", I),
24
25
  "data-link-tile": "",
25
26
  "data-loading": "",
26
- "aria-hidden": "true",
27
- children: [/* @__PURE__ */ b("span", {
28
- className: i,
29
- style: w(k ?? 1.3333333333333333),
30
- children: /* @__PURE__ */ b(t, { radius: "none" })
31
- }), /* @__PURE__ */ x("span", {
32
- className: g,
33
- children: [/* @__PURE__ */ b("span", {
34
- className: s,
35
- children: /* @__PURE__ */ b(t, {
36
- width: "70%",
37
- height: 12,
38
- radius: "inner",
39
- index: 1
40
- })
41
- }), /* @__PURE__ */ b("span", {
42
- className: c,
43
- children: /* @__PURE__ */ b(t, {
44
- width: "40%",
45
- height: 10,
46
- radius: "inner",
47
- index: 2
48
- })
49
- })]
50
- })]
27
+ "aria-busy": "true",
28
+ children: [
29
+ /* @__PURE__ */ x("span", {
30
+ className: "sr-only",
31
+ children: F
32
+ }),
33
+ /* @__PURE__ */ x("span", {
34
+ className: a,
35
+ style: T(A ?? 1.3333333333333333),
36
+ children: /* @__PURE__ */ x(n, { radius: "none" })
37
+ }),
38
+ /* @__PURE__ */ S("span", {
39
+ className: _,
40
+ children: [/* @__PURE__ */ x("span", {
41
+ className: c,
42
+ children: /* @__PURE__ */ x(n, {
43
+ width: "70%",
44
+ height: 12,
45
+ radius: "inner",
46
+ index: 1
47
+ })
48
+ }), /* @__PURE__ */ x("span", {
49
+ className: l,
50
+ children: /* @__PURE__ */ x(n, {
51
+ width: "40%",
52
+ height: 10,
53
+ radius: "inner",
54
+ index: 2
55
+ })
56
+ })]
57
+ })
58
+ ]
51
59
  });
52
- S == null && T == null && console.warn("[WMDS LinkTile] Pass `href`, or `render` with a link that carries it.");
53
- let B = O != null, V = [
54
- I,
55
- A != null && L,
56
- j != null && R,
57
- E && D && z
60
+ C == null && E == null && console.warn("[WMDS LinkTile] Pass `href`, or `render` with a link that carries it.");
61
+ let U = k != null, W = [
62
+ z,
63
+ j != null && B,
64
+ M != null && V,
65
+ D && O && H
58
66
  ].filter(Boolean).join(" ");
59
- return /* @__PURE__ */ x(C, {
60
- render: T,
61
- ...S == null ? null : { href: S },
62
- ...E && D ? {
67
+ return /* @__PURE__ */ S(w, {
68
+ render: E,
69
+ ...C == null ? null : { href: C },
70
+ ...D && O ? {
63
71
  target: "_blank",
64
72
  rel: "noopener noreferrer"
65
73
  } : null,
66
- className: e(f, P),
67
- "aria-labelledby": V,
74
+ className: e(p, I),
75
+ "aria-labelledby": W,
68
76
  "data-link-tile": "",
69
- "data-external": E ? "" : void 0,
70
- children: [B ? /* @__PURE__ */ x("span", {
71
- className: e(i, k == null ? o : a),
72
- style: w(k),
77
+ "data-external": D ? "" : void 0,
78
+ children: [U ? /* @__PURE__ */ S("span", {
79
+ className: e(a, A == null ? s : o),
80
+ style: T(A),
73
81
  "data-link-tile-frame": "",
74
- children: [O, j == null ? null : /* @__PURE__ */ b("span", {
75
- id: R,
76
- className: h,
77
- children: j
82
+ children: [k, M == null ? null : /* @__PURE__ */ x("span", {
83
+ id: V,
84
+ className: g,
85
+ children: M
78
86
  })]
79
- }) : null, /* @__PURE__ */ x("span", {
80
- className: n,
87
+ }) : null, /* @__PURE__ */ S("span", {
88
+ className: r,
81
89
  children: [
82
- M == null ? null : /* @__PURE__ */ b("span", {
83
- className: p,
90
+ N == null ? null : /* @__PURE__ */ x("span", {
91
+ className: m,
84
92
  "aria-hidden": "true",
85
- children: M
93
+ children: N
86
94
  }),
87
- /* @__PURE__ */ x("span", {
88
- className: g,
95
+ /* @__PURE__ */ S("span", {
96
+ className: _,
89
97
  children: [
90
- /* @__PURE__ */ x("span", {
91
- id: I,
92
- className: _,
93
- children: [l, E ? /* @__PURE__ */ b(y, {
94
- className: r,
98
+ /* @__PURE__ */ S("span", {
99
+ id: z,
100
+ className: v,
101
+ children: [u, D ? /* @__PURE__ */ x(b, {
102
+ className: i,
95
103
  strokeWidth: 2,
96
104
  "aria-hidden": !0
97
105
  }) : null]
98
106
  }),
99
- A == null ? null : /* @__PURE__ */ b("span", {
100
- id: L,
101
- className: d,
102
- children: A
107
+ j == null ? null : /* @__PURE__ */ x("span", {
108
+ id: B,
109
+ className: f,
110
+ children: j
103
111
  }),
104
- E && D ? /* @__PURE__ */ b("span", {
105
- id: z,
112
+ D && O ? /* @__PURE__ */ x("span", {
113
+ id: H,
106
114
  className: "sr-only",
107
115
  children: "(opens in a new tab)"
108
116
  }) : null
109
117
  ]
110
118
  }),
111
- j != null && !B ? /* @__PURE__ */ b("span", {
112
- id: R,
113
- className: m,
114
- children: j
119
+ M != null && !U ? /* @__PURE__ */ x("span", {
120
+ id: V,
121
+ className: h,
122
+ children: M
115
123
  }) : null
116
124
  ]
117
125
  })]
118
126
  });
119
127
  }
120
128
  //#endregion
121
- export { T as LinkTile, l as linkTileLoadingRatio };
129
+ export { E as LinkTile, u as linkTileLoadingRatio };
@@ -1 +1 @@
1
- {"version":3,"file":"LogView.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LogView/LogView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1E,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAcD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAc,EACd,cAAc,EACd,OAAe,EACf,KAAK,EACL,MAAM,EAAE,UAAU,EAClB,SAAS,GACV,EAAE,YAAY,+BAsFd"}
1
+ {"version":3,"file":"LogView.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LogView/LogView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAkB1E,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAcD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAc,EACd,cAAc,EACd,OAAe,EACf,KAAK,EACL,MAAM,EAAE,UAAU,EAClB,SAAS,GACV,EAAE,YAAY,+BA4Fd"}
@@ -2,102 +2,107 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { buttonStatusHoldMs as t } from "../../atoms/Button/buttonStatusStyles.js";
4
4
  import { Button as n } from "../../atoms/Button/Button.js";
5
- import { Skeleton as r } from "../../atoms/Skeleton/Skeleton.js";
6
- import { logViewActionsClasses as i, logViewCountClasses as a, logViewEmptyClasses as o, logViewLineClasses as s, logViewNumberClasses as c, logViewRootClasses as l, logViewScrollerClasses as u, logViewTextClasses as d, logViewToolbarClasses as f } from "./logViewStyles.js";
7
- import { useLayoutEffect as p, useRef as m, useState as h } from "react";
8
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
5
+ import { useDelayedLoading as r } from "../../../lib/useDelayedLoading.js";
6
+ import { Skeleton as i } from "../../atoms/Skeleton/Skeleton.js";
7
+ import { emptySlot as a } from "../EmptyState/EmptyState.js";
8
+ import { logViewActionsClasses as o, logViewCountClasses as s, logViewEmptyClasses as c, logViewLineClasses as l, logViewNumberClasses as u, logViewRootClasses as d, logViewScrollerClasses as f, logViewTextClasses as p, logViewToolbarClasses as m } from "./logViewStyles.js";
9
+ import { useLayoutEffect as h, useRef as g, useState as _ } from "react";
10
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
9
11
  //#region src/components/molecules/LogView/LogView.tsx
10
- var v = {
12
+ var b = {
11
13
  copy: "Copy",
12
14
  copied: "Copied",
13
15
  follow: "Follow",
14
16
  following: "Following",
15
17
  empty: "No log lines"
16
18
  };
17
- function y(e) {
19
+ function x(e) {
18
20
  return e === 1 ? "1 line" : `${e} lines`;
19
21
  }
20
- function b({ lines: b, label: x, follow: S = !1, onFollowChange: C, loading: w = !1, empty: T, labels: E, className: D }) {
21
- let O = {
22
- ...v,
23
- ...E
24
- }, k = m(null), [A, j] = h(!1), M = b.length, N = !w && M > 0;
25
- p(() => {
26
- if (!S || !N) return;
27
- let e = k.current;
22
+ function S({ lines: S, label: C, follow: w = !1, onFollowChange: T, loading: E = !1, empty: D, labels: O, className: k }) {
23
+ let A = {
24
+ ...b,
25
+ ...O
26
+ }, j = r(E), M = g(null), [N, P] = _(!1), F = S.length, I = !E && F > 0;
27
+ h(() => {
28
+ if (!w || !I) return;
29
+ let e = M.current;
28
30
  e != null && (e.scrollTop = e.scrollHeight);
29
31
  }, [
32
+ w,
30
33
  S,
31
- b,
32
- N
33
- ]), p(() => {
34
- if (!A) return;
35
- let e = window.setTimeout(() => j(!1), t);
34
+ I
35
+ ]), h(() => {
36
+ if (!N) return;
37
+ let e = window.setTimeout(() => P(!1), t);
36
38
  return () => window.clearTimeout(e);
37
- }, [A]);
38
- async function P() {
39
- let e = b.join("\n");
39
+ }, [N]);
40
+ async function L() {
41
+ let e = S.join("\n");
40
42
  try {
41
- await navigator.clipboard.writeText(e), j(!0);
43
+ await navigator.clipboard.writeText(e), P(!0);
42
44
  } catch {
43
- j(!1);
45
+ P(!1);
44
46
  }
45
47
  }
46
- return /* @__PURE__ */ _("div", {
47
- className: e(l, D),
48
- "data-follow": S ? "" : void 0,
49
- children: [/* @__PURE__ */ _("div", {
50
- className: f,
51
- children: [w ? null : /* @__PURE__ */ g("span", {
52
- className: a,
53
- children: y(M)
54
- }), /* @__PURE__ */ _("div", {
55
- className: i,
56
- children: [/* @__PURE__ */ g(n, {
48
+ return /* @__PURE__ */ y("div", {
49
+ className: e(d, k),
50
+ "data-follow": w ? "" : void 0,
51
+ children: [/* @__PURE__ */ y("div", {
52
+ className: m,
53
+ children: [E ? null : /* @__PURE__ */ v("span", {
54
+ className: s,
55
+ children: x(F)
56
+ }), /* @__PURE__ */ y("div", {
57
+ className: o,
58
+ children: [/* @__PURE__ */ v(n, {
57
59
  role: "secondary",
58
60
  size: "xs",
59
61
  type: "button",
60
- disabled: w || M === 0,
62
+ disabled: E || F === 0,
61
63
  onClick: () => {
62
- P();
64
+ L();
63
65
  },
64
- children: A ? O.copied : O.copy
65
- }), /* @__PURE__ */ g(n, {
66
+ children: N ? A.copied : A.copy
67
+ }), /* @__PURE__ */ v(n, {
66
68
  role: "ghost",
67
69
  size: "xs",
68
70
  type: "button",
69
- "aria-pressed": S,
70
- disabled: w,
71
- onClick: () => C?.(!S),
72
- children: S ? O.following : O.follow
71
+ "aria-pressed": w,
72
+ disabled: E,
73
+ onClick: () => T?.(!w),
74
+ children: w ? A.following : A.follow
73
75
  })]
74
76
  })]
75
- }), /* @__PURE__ */ _("div", {
76
- ref: k,
77
- className: u,
77
+ }), /* @__PURE__ */ y("div", {
78
+ ref: M,
79
+ className: f,
78
80
  role: "log",
79
- "aria-label": x,
80
- "aria-busy": w || void 0,
81
+ "aria-label": C,
82
+ "aria-busy": E || void 0,
81
83
  children: [
82
- w ? /* @__PURE__ */ g(r, {
83
- className: "m-3",
84
- width: "100%",
85
- height: 96,
86
- radius: "inner"
84
+ E ? /* @__PURE__ */ v("div", {
85
+ className: j ? "opacity-100" : "opacity-0",
86
+ children: /* @__PURE__ */ v(i, {
87
+ className: "m-3",
88
+ width: "100%",
89
+ height: 96,
90
+ radius: "inner"
91
+ })
87
92
  }) : null,
88
- !w && M === 0 ? /* @__PURE__ */ g("p", {
89
- className: o,
93
+ !E && F === 0 ? /* @__PURE__ */ v("p", {
94
+ className: c,
90
95
  role: "status",
91
- children: T ?? O.empty
96
+ children: a(D ?? A.empty)
92
97
  }) : null,
93
- N ? b.map((e, t) => /* @__PURE__ */ _("div", {
94
- className: s,
95
- children: [/* @__PURE__ */ g("span", {
96
- className: c,
98
+ I ? S.map((e, t) => /* @__PURE__ */ y("div", {
99
+ className: l,
100
+ children: [/* @__PURE__ */ v("span", {
101
+ className: u,
97
102
  "aria-hidden": "true",
98
103
  children: t + 1
99
- }), /* @__PURE__ */ g("span", {
100
- className: d,
104
+ }), /* @__PURE__ */ v("span", {
105
+ className: p,
101
106
  children: e
102
107
  })]
103
108
  }, `${t}-${e}`)) : null
@@ -106,4 +111,4 @@ function b({ lines: b, label: x, follow: S = !1, onFollowChange: C, loading: w =
106
111
  });
107
112
  }
108
113
  //#endregion
109
- export { b as LogView };
114
+ export { S as LogView };
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ProgressSize } from "./progressStyles";
3
+ export { progressSizes, type ProgressSize } from "./progressStyles";
4
+ /** Layout-only — width or margin. */
5
+ export type ProgressLayoutClassName = string;
6
+ export interface ProgressProps {
7
+ /** What's happening ("Uploading photos"): the visible label and the bar's name. */
8
+ label: string;
9
+ /** Done so far. Omit only when there's no total (indeterminate). */
10
+ value?: number;
11
+ /** The total. Default 100. */
12
+ max?: number;
13
+ /** Counted things ("files"): shows "3 of 12 files". Omit for a percentage. */
14
+ unit?: string;
15
+ /** Caller-formatted, e.g. "About 2 minutes left". */
16
+ timeLeft?: string;
17
+ /** Stops the work. Required unless `cancellable={false}` (an action that can't be stopped once begun). */
18
+ onCancel?: () => void;
19
+ cancelLabel?: string;
20
+ /** Set `false` only for work that can't be stopped; the bar then has no Cancel. Default true. */
21
+ cancellable?: boolean;
22
+ /** `error`: the bar stops, `message` says why, and Retry appears with `onRetry`. */
23
+ status?: "error";
24
+ message?: ReactNode;
25
+ onRetry?: () => void;
26
+ retryLabel?: string;
27
+ /** Read out when `value` reaches `max` ("Upload complete"). Default: `${label} complete`. */
28
+ completeLabel?: string;
29
+ size?: ProgressSize;
30
+ className?: ProgressLayoutClassName;
31
+ }
32
+ /**
33
+ * Loading states Y9: a progress bar for waits over 10 seconds, uploads and exports. Determinate when there's
34
+ * a total ("3 of 12 files", "25%"), indeterminate only when there isn't. Always a way out (Cancel), a retry
35
+ * after an error, and screen readers hear milestones (every 10%) and the end, not every tick.
36
+ */
37
+ export declare function Progress({ label, value, max, unit, timeLeft, onCancel, cancelLabel, cancellable, status, message, onRetry, retryLabel, completeLabel, size, className, }: ProgressProps): import("react").JSX.Element;
38
+ //# sourceMappingURL=Progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Progress/Progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E,OAAO,EAaL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpE,qCAAqC;AACrC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oFAAoF;IACpF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,GAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,WAAsB,EACtB,WAAkB,EAClB,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAwB,EACxB,aAAa,EACb,IAAW,EACX,SAAS,GACV,EAAE,aAAa,+BAkFf"}