@thewhatmatters/wmds 0.4.43 → 0.4.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/components/atoms/Button/ButtonSpinner.js +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +57 -38
- package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusContent.js +10 -10
- package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStatusMotion.js +2 -2
- package/dist/components/atoms/Button/buttonStatusStyles.d.ts +4 -0
- package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStatusStyles.js +4 -4
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +41 -40
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +75 -74
- package/dist/components/atoms/Input/Input.d.ts +2 -0
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +87 -81
- package/dist/components/atoms/Status/Status.js +1 -1
- package/dist/components/atoms/Status/statusRingStyles.d.ts +1 -1
- package/dist/components/atoms/Status/statusRingStyles.d.ts.map +1 -1
- package/dist/components/atoms/Status/statusRingStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +53 -52
- package/dist/components/atoms/TextArea/TextArea.d.ts +2 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +59 -49
- package/dist/components/atoms/inputShared/InputTrailingAffordance.d.ts.map +1 -1
- package/dist/components/atoms/inputShared/InputTrailingAffordance.js +16 -14
- package/dist/components/molecules/CalEmbed/CalEmbed.d.ts.map +1 -1
- package/dist/components/molecules/CalEmbed/CalEmbed.js +17 -23
- package/dist/components/molecules/EmptyState/EmptyState.d.ts +41 -0
- package/dist/components/molecules/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/molecules/EmptyState/EmptyState.js +46 -0
- package/dist/components/molecules/EmptyState/emptyStateStyles.d.ts +10 -0
- package/dist/components/molecules/EmptyState/emptyStateStyles.d.ts.map +1 -0
- package/dist/components/molecules/EmptyState/emptyStateStyles.js +11 -0
- package/dist/components/molecules/IndexList/IndexList.d.ts +6 -1
- package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -1
- package/dist/components/molecules/IndexList/IndexList.js +67 -58
- package/dist/components/molecules/LinkTile/LinkTile.d.ts +4 -2
- package/dist/components/molecules/LinkTile/LinkTile.d.ts.map +1 -1
- package/dist/components/molecules/LinkTile/LinkTile.js +89 -81
- package/dist/components/molecules/LogView/LogView.d.ts.map +1 -1
- package/dist/components/molecules/LogView/LogView.js +68 -63
- package/dist/components/molecules/Progress/Progress.d.ts +38 -0
- package/dist/components/molecules/Progress/Progress.d.ts.map +1 -0
- package/dist/components/molecules/Progress/Progress.js +96 -0
- package/dist/components/molecules/Progress/progressStyles.d.ts +17 -0
- package/dist/components/molecules/Progress/progressStyles.d.ts.map +1 -0
- package/dist/components/molecules/Progress/progressStyles.js +9 -0
- package/dist/components/molecules/Stat/Stat.d.ts.map +1 -1
- package/dist/components/molecules/Stat/Stat.js +65 -61
- package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts.map +1 -1
- package/dist/components/molecules/TaskRows/TaskRowsTable.js +77 -76
- package/dist/components/molecules/TileGrid/TileGrid.d.ts +6 -1
- package/dist/components/molecules/TileGrid/TileGrid.d.ts.map +1 -1
- package/dist/components/molecules/TileGrid/TileGrid.js +52 -47
- package/dist/components/organisms/Carousel/Carousel.d.ts +3 -0
- package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/Carousel.js +208 -198
- package/dist/components/organisms/Carousel/carouselStyles.d.ts +2 -0
- package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselStyles.js +3 -3
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts +10 -4
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts.map +1 -1
- package/dist/components/organisms/Chart/ChartSegmentedRing.js +7 -2
- package/dist/components/organisms/Chart/chartStyles.d.ts +4 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -1
- package/dist/components/organisms/Chart/chartStyles.js +4 -2
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +8 -1
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +73 -69
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts +6 -0
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/siteNavStyles.js +6 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +158 -153
- package/dist/lib/useDelayedLoading.d.ts +13 -0
- package/dist/lib/useDelayedLoading.d.ts.map +1 -0
- package/dist/lib/useDelayedLoading.js +27 -0
- package/dist/motion.css +10 -0
- package/dist/styles.css +1 -1
- package/docs/components.md +1 -1
- package/docs/exports.json +26 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +2 -2
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-above.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-errorsummary--contact-form.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herointro--with-actions.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-notice--account-not-connected.tsx +1 -1
- package/docs/patterns/components-notice--holiday-closure.tsx +1 -1
- package/docs/patterns/components-notice--private-buyout.tsx +1 -1
- package/docs/patterns/components-notice--sync-failed.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-progress--upload-pattern.tsx +9 -0
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
4
|
+
import { Button as t } from "../../atoms/Button/Button.js";
|
|
5
|
+
import { progressActionsClasses as n, progressClasses as r, progressFillClasses as i, progressFooterClasses as a, progressHeaderClasses as o, progressIndeterminateClasses as s, progressLabelClasses as c, progressMessageClasses as l, progressMetaClasses as u, progressSizes as d, progressTrackClasses as f, progressValueClasses as p } from "./progressStyles.js";
|
|
6
|
+
import { useEffect as m, useId as h, useRef as g, useState as _ } from "react";
|
|
7
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/molecules/Progress/Progress.tsx
|
|
9
|
+
function b({ label: d, value: b, max: x = 100, unit: S, timeLeft: C, onCancel: w, cancelLabel: T = "Cancel", cancellable: E = !0, status: D, message: O, onRetry: k, retryLabel: A = "Try again", completeLabel: j, size: M = "md", className: N }) {
|
|
10
|
+
let P = h();
|
|
11
|
+
E && w == null && console.warn("[WMDS Progress] Give `onCancel` (a way out), or set `cancellable={false}` for work that can't be stopped.");
|
|
12
|
+
let F = b != null, I = F ? Math.min(Math.max(b, 0), x) : 0, L = F && x > 0 ? Math.round(I / x * 100) : 0, R = F ? S == null ? `${L}%` : `${I} of ${x} ${S}` : "Working…", z = F && I >= x, B = [R, C].filter(Boolean).join(", "), [V, H] = _(""), U = g(-1);
|
|
13
|
+
return m(() => {
|
|
14
|
+
if (D === "error") return;
|
|
15
|
+
if (z) {
|
|
16
|
+
H(j ?? `${d} complete`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (!F) return;
|
|
20
|
+
let e = S != null && x <= 10 ? I : Math.floor(L / 10);
|
|
21
|
+
e !== U.current && (U.current = e, H(B));
|
|
22
|
+
}, [
|
|
23
|
+
I,
|
|
24
|
+
z,
|
|
25
|
+
j,
|
|
26
|
+
F,
|
|
27
|
+
d,
|
|
28
|
+
x,
|
|
29
|
+
L,
|
|
30
|
+
B,
|
|
31
|
+
D,
|
|
32
|
+
S
|
|
33
|
+
]), /* @__PURE__ */ y("div", {
|
|
34
|
+
className: e(r, N),
|
|
35
|
+
"data-progress": "",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ y("div", {
|
|
38
|
+
className: o,
|
|
39
|
+
children: [/* @__PURE__ */ v("span", {
|
|
40
|
+
id: P,
|
|
41
|
+
className: c,
|
|
42
|
+
children: d
|
|
43
|
+
}), /* @__PURE__ */ v("span", {
|
|
44
|
+
className: p,
|
|
45
|
+
"aria-hidden": !0,
|
|
46
|
+
children: R
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ v("div", {
|
|
50
|
+
role: "progressbar",
|
|
51
|
+
"aria-labelledby": P,
|
|
52
|
+
"aria-valuemin": F ? 0 : void 0,
|
|
53
|
+
"aria-valuemax": F ? x : void 0,
|
|
54
|
+
"aria-valuenow": F ? I : void 0,
|
|
55
|
+
"aria-valuetext": B,
|
|
56
|
+
className: f[M],
|
|
57
|
+
children: F ? /* @__PURE__ */ v("div", {
|
|
58
|
+
className: e(i, D === "error" && "bg-error"),
|
|
59
|
+
style: { width: `${L}%` }
|
|
60
|
+
}) : /* @__PURE__ */ v("div", { className: s })
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ y("div", {
|
|
63
|
+
className: a,
|
|
64
|
+
children: [D === "error" && O != null ? /* @__PURE__ */ v("p", {
|
|
65
|
+
className: l,
|
|
66
|
+
role: "alert",
|
|
67
|
+
children: O
|
|
68
|
+
}) : C == null ? null : /* @__PURE__ */ v("p", {
|
|
69
|
+
className: u,
|
|
70
|
+
"aria-hidden": !0,
|
|
71
|
+
children: C
|
|
72
|
+
}), /* @__PURE__ */ y("div", {
|
|
73
|
+
className: n,
|
|
74
|
+
children: [D === "error" && k != null ? /* @__PURE__ */ v(t, {
|
|
75
|
+
role: "secondary",
|
|
76
|
+
size: "sm",
|
|
77
|
+
onClick: k,
|
|
78
|
+
children: A
|
|
79
|
+
}) : null, E && w != null && !z ? /* @__PURE__ */ v(t, {
|
|
80
|
+
role: D === "error" ? "ghost" : "secondary",
|
|
81
|
+
size: "sm",
|
|
82
|
+
onClick: w,
|
|
83
|
+
children: T
|
|
84
|
+
}) : null]
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ v("p", {
|
|
88
|
+
className: "sr-only",
|
|
89
|
+
role: "status",
|
|
90
|
+
children: V
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { b as Progress, d as progressSizes };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const progressSizes: readonly ["sm", "md"];
|
|
2
|
+
export type ProgressSize = (typeof progressSizes)[number];
|
|
3
|
+
export declare const progressClasses = "flex w-full min-w-0 flex-col gap-2";
|
|
4
|
+
export declare const progressHeaderClasses = "flex min-w-0 items-baseline justify-between gap-3";
|
|
5
|
+
export declare const progressLabelClasses = "min-w-0 truncate type-label text-fg";
|
|
6
|
+
export declare const progressValueClasses = "shrink-0 type-supporting tabular-nums text-muted";
|
|
7
|
+
/** Track: a soft mix of the text colour, so it reads on any surface. */
|
|
8
|
+
export declare const progressTrackClasses: Record<ProgressSize, string>;
|
|
9
|
+
export declare const progressFillClasses: string;
|
|
10
|
+
export declare const progressFillErrorClasses = "bg-error";
|
|
11
|
+
/** No total: a third of the track drifting across; still under reduced motion (the words carry it). */
|
|
12
|
+
export declare const progressIndeterminateClasses = "absolute inset-y-0 w-1/3 rounded-full bg-primary animate-[progress-drift_1.6s_ease-in-out_infinite] motion-reduce:animate-none motion-reduce:start-0";
|
|
13
|
+
export declare const progressFooterClasses = "flex min-w-0 flex-wrap items-center justify-between gap-3";
|
|
14
|
+
export declare const progressMetaClasses = "min-w-0 type-supporting text-muted";
|
|
15
|
+
export declare const progressMessageClasses = "type-supporting text-error";
|
|
16
|
+
export declare const progressActionsClasses = "ms-auto flex shrink-0 items-center gap-2";
|
|
17
|
+
//# sourceMappingURL=progressStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Progress/progressStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,uBAAwB,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,eAAe,uCAAuC,CAAC;AACpE,eAAO,MAAM,qBAAqB,sDAAsD,CAAC;AACzF,eAAO,MAAM,oBAAoB,wCAAwC,CAAC;AAC1E,eAAO,MAAM,oBAAoB,qDAAqD,CAAC;AAEvF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAG7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAA6I,CAAC;AAC9K,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,uGAAuG;AACvG,eAAO,MAAM,4BAA4B,yJAC+G,CAAC;AAEzJ,eAAO,MAAM,qBAAqB,8DAA8D,CAAC;AACjG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AACxE,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,sBAAsB,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
//#region src/components/molecules/Progress/progressStyles.ts
|
|
4
|
+
var t = ["sm", "md"], n = "flex w-full min-w-0 flex-col gap-2", r = "flex min-w-0 items-baseline justify-between gap-3", i = "min-w-0 truncate type-label text-fg", a = "shrink-0 type-supporting tabular-nums text-muted", o = {
|
|
5
|
+
sm: "relative h-1.5 w-full overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--color-text-primary)_10%,transparent)]",
|
|
6
|
+
md: "relative h-2 w-full overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--color-text-primary)_10%,transparent)]"
|
|
7
|
+
}, s = e("absolute inset-y-0 start-0 rounded-full bg-primary", "transition-[width] duration-medium ease-standard motion-reduce:transition-none"), c = "bg-error", l = "absolute inset-y-0 w-1/3 rounded-full bg-primary animate-[progress-drift_1.6s_ease-in-out_infinite] motion-reduce:animate-none motion-reduce:start-0", u = "flex min-w-0 flex-wrap items-center justify-between gap-3", d = "min-w-0 type-supporting text-muted", f = "type-supporting text-error", p = "ms-auto flex shrink-0 items-center gap-2";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { p as progressActionsClasses, n as progressClasses, s as progressFillClasses, c as progressFillErrorClasses, u as progressFooterClasses, r as progressHeaderClasses, l as progressIndeterminateClasses, i as progressLabelClasses, f as progressMessageClasses, d as progressMetaClasses, t as progressSizes, o as progressTrackClasses, a as progressValueClasses };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/Stat.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/Stat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAyBL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,SAAS;IACxB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mGAAmG;IACnG,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAoCD,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,KAAK,EACL,GAAG,EACH,IAAW,EACX,OAAe,EACf,SAAS,GACV,EAAE,SAAS,+BAuDX;AAED,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,OAAW,EACX,SAAS,GACV,EAAE,cAAc,+BAUhB;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;CAEf,CAAC"}
|
|
@@ -2,37 +2,38 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { Badge as t } from "../../atoms/Badge/Badge.js";
|
|
4
4
|
import { ButtonIcon as n } from "../../atoms/Button/ButtonIcon.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useDelayedLoading as r } from "../../../lib/useDelayedLoading.js";
|
|
6
|
+
import { Skeleton as i } from "../../atoms/Skeleton/Skeleton.js";
|
|
7
|
+
import { statContentClasses as a, statContextClasses as o, statDetailClasses as s, statGroupColumns as c, statGroupGridClasses as l, statIconButtonSize as u, statIconTileClasses as d, statIconTileSizeClasses as f, statLabelClasses as p, statLabelEndClasses as m, statLabelLgClasses as h, statLabelRowClasses as g, statLabelStartClasses as _, statLabelTextClasses as v, statLabelTrailClasses as y, statLoadingLabelHeights as b, statLoadingValueHeights as x, statShellClasses as S, statShellSizeClasses as C, statSizes as w, statTrendBadgeVariant as T, statTrendDirections as E, statUnavailableClasses as D, statValueRowClasses as O, statValueSizeClasses as k } from "./statStyles.js";
|
|
8
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/molecules/Stat/Stat.tsx
|
|
9
|
-
function
|
|
10
|
+
function N({ trend: e }) {
|
|
10
11
|
let n = e.direction ?? "neutral";
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ j("span", {
|
|
12
13
|
title: e.label,
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ j(t, {
|
|
14
15
|
size: "sm",
|
|
15
16
|
emphasis: "muted",
|
|
16
|
-
variant:
|
|
17
|
+
variant: T(n),
|
|
17
18
|
children: e.value
|
|
18
19
|
})
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
22
|
+
function P({ size: e, index: t = 0 }) {
|
|
23
|
+
return /* @__PURE__ */ M(A, { children: [
|
|
24
|
+
/* @__PURE__ */ j(i, {
|
|
24
25
|
width: "45%",
|
|
25
|
-
height:
|
|
26
|
+
height: b[e],
|
|
26
27
|
radius: "inner",
|
|
27
28
|
index: t
|
|
28
29
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ j(i, {
|
|
30
31
|
width: "70%",
|
|
31
|
-
height:
|
|
32
|
+
height: x[e],
|
|
32
33
|
radius: "inner",
|
|
33
34
|
index: t + 1
|
|
34
35
|
}),
|
|
35
|
-
e === "lg" ? /* @__PURE__ */
|
|
36
|
+
e === "lg" ? /* @__PURE__ */ j(i, {
|
|
36
37
|
width: "40%",
|
|
37
38
|
height: 16,
|
|
38
39
|
radius: "inner",
|
|
@@ -40,71 +41,74 @@ function N({ size: e, index: t = 0 }) {
|
|
|
40
41
|
}) : null
|
|
41
42
|
] });
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
let
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
className: e(
|
|
47
|
-
"aria-busy":
|
|
48
|
-
"aria-label":
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
className: e(
|
|
51
|
-
children:
|
|
52
|
-
className:
|
|
44
|
+
function F({ label: t, value: i, trend: c, context: l, detail: b, icon: x, action: w, unavailable: T, start: E, end: F, size: I = "sm", loading: L = !1, className: R }) {
|
|
45
|
+
let z = r(L), B = F != null || w != null;
|
|
46
|
+
return /* @__PURE__ */ j("article", {
|
|
47
|
+
className: e(S, C[I], R),
|
|
48
|
+
"aria-busy": L || void 0,
|
|
49
|
+
"aria-label": L ? t : void 0,
|
|
50
|
+
children: /* @__PURE__ */ j("div", {
|
|
51
|
+
className: e(a, I === "lg" && "gap-2"),
|
|
52
|
+
children: L ? /* @__PURE__ */ j("div", {
|
|
53
|
+
className: e("transition-opacity", z ? "opacity-100" : "opacity-0"),
|
|
54
|
+
children: /* @__PURE__ */ j(P, { size: I })
|
|
55
|
+
}) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
|
|
56
|
+
className: g,
|
|
53
57
|
children: [
|
|
54
|
-
|
|
55
|
-
className: e(
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
size:
|
|
58
|
-
children:
|
|
58
|
+
x == null ? null : /* @__PURE__ */ j("span", {
|
|
59
|
+
className: e(d, f[I]),
|
|
60
|
+
children: /* @__PURE__ */ j(n, {
|
|
61
|
+
size: u[I],
|
|
62
|
+
children: x
|
|
59
63
|
})
|
|
60
64
|
}),
|
|
61
|
-
|
|
62
|
-
className:
|
|
63
|
-
children:
|
|
65
|
+
E == null ? null : /* @__PURE__ */ j("div", {
|
|
66
|
+
className: _,
|
|
67
|
+
children: E
|
|
64
68
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
className:
|
|
69
|
+
/* @__PURE__ */ j("span", {
|
|
70
|
+
className: I === "lg" ? h : e(p, v),
|
|
67
71
|
children: t
|
|
68
72
|
}),
|
|
69
|
-
|
|
70
|
-
className:
|
|
71
|
-
children: [
|
|
73
|
+
B ? /* @__PURE__ */ M("div", {
|
|
74
|
+
className: w == null ? m : y,
|
|
75
|
+
children: [F, w]
|
|
72
76
|
}) : null
|
|
73
77
|
]
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
className:
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
-
className:
|
|
79
|
-
children:
|
|
80
|
-
}),
|
|
78
|
+
}), T == null ? /* @__PURE__ */ M(A, { children: [
|
|
79
|
+
/* @__PURE__ */ M("div", {
|
|
80
|
+
className: O,
|
|
81
|
+
children: [/* @__PURE__ */ j("span", {
|
|
82
|
+
className: k[I],
|
|
83
|
+
children: i
|
|
84
|
+
}), c == null ? null : /* @__PURE__ */ j(N, { trend: c })]
|
|
81
85
|
}),
|
|
82
|
-
|
|
83
|
-
className: a,
|
|
84
|
-
children: c
|
|
85
|
-
}),
|
|
86
|
-
y == null ? null : /* @__PURE__ */ A("p", {
|
|
86
|
+
l == null ? null : /* @__PURE__ */ j("p", {
|
|
87
87
|
className: o,
|
|
88
|
-
children:
|
|
88
|
+
children: l
|
|
89
|
+
}),
|
|
90
|
+
b == null ? null : /* @__PURE__ */ j("p", {
|
|
91
|
+
className: s,
|
|
92
|
+
children: b
|
|
89
93
|
})
|
|
90
|
-
] }) : /* @__PURE__ */
|
|
91
|
-
className:
|
|
92
|
-
children:
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
className:
|
|
95
|
-
children:
|
|
94
|
+
] }) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j("p", {
|
|
95
|
+
className: D,
|
|
96
|
+
children: T.label ?? "Not connected"
|
|
97
|
+
}), /* @__PURE__ */ j("p", {
|
|
98
|
+
className: o,
|
|
99
|
+
children: T.reason
|
|
96
100
|
})] })] })
|
|
97
101
|
})
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
|
-
function
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
className: e(
|
|
104
|
+
function I({ children: t, "aria-label": n, columns: r = 4, className: i }) {
|
|
105
|
+
return /* @__PURE__ */ j("div", {
|
|
106
|
+
className: e(l(r), i),
|
|
103
107
|
role: n == null ? void 0 : "group",
|
|
104
108
|
"aria-label": n,
|
|
105
109
|
children: t
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
|
-
var
|
|
112
|
+
var L = Object.assign(F, { Group: I });
|
|
109
113
|
//#endregion
|
|
110
|
-
export {
|
|
114
|
+
export { L as Stat, c as statGroupColumns, l as statGroupGridClasses, w as statSizes, E as statTrendDirections };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskRowsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TaskRows/TaskRowsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7G,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"TaskRowsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TaskRows/TaskRowsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7G,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAwBpE,eAAO,MAAM,sBAAsB,yCAA0C,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,oBAAoB,mDAAoD,CAAC;AAEtF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,qBAAqB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,2BAA2B,EAAE,cAAc,EAIvD,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAqC,EACrC,KAAyB,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE;IACD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,cAAc,CAAC,cAAc,CAAC,+BA0CjC;AAUD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,MAAgB,EAChB,IAAI,EACJ,OAAO,GACR,EAAE,gBAAgB,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,+BAuElD"}
|
|
@@ -4,20 +4,21 @@ import { Badge as t } from "../../atoms/Badge/Badge.js";
|
|
|
4
4
|
import { TextLink as n } from "../../atoms/TextLink/TextLink.js";
|
|
5
5
|
import { Skeleton as r } from "../../atoms/Skeleton/Skeleton.js";
|
|
6
6
|
import { Status as i } from "../../atoms/Status/Status.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { emptySlot as a } from "../EmptyState/EmptyState.js";
|
|
8
|
+
import { taskRowsTableClasses as o, taskRowsTableColumnsClasses as s, taskRowsTableDetailClasses as c, taskRowsTableEmptyClasses as l, taskRowsTableErrorClasses as u, taskRowsTableHeadCellClasses as d, taskRowsTableHeadClasses as f, taskRowsTableMetricClasses as p, taskRowsTableMetricValueClasses as m, taskRowsTableMobileLineClasses as h, taskRowsTableNoteClasses as g, taskRowsTableRowClasses as _, taskRowsTableStatusClasses as v, taskRowsTableStatusLabelClasses as y, taskRowsTableTitleClasses as b, taskRowsTableWaitingClasses as x } from "./taskRowsStyles.js";
|
|
9
|
+
import { Children as S } from "react";
|
|
10
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/molecules/TaskRows/TaskRowsTable.tsx
|
|
11
|
-
var
|
|
12
|
+
var T = [
|
|
12
13
|
"title",
|
|
13
14
|
"waiting",
|
|
14
15
|
"metric"
|
|
15
|
-
],
|
|
16
|
+
], E = [
|
|
16
17
|
"ready",
|
|
17
18
|
"loading",
|
|
18
19
|
"error",
|
|
19
20
|
"unwired"
|
|
20
|
-
],
|
|
21
|
+
], D = [
|
|
21
22
|
{
|
|
22
23
|
id: "title",
|
|
23
24
|
header: "Item"
|
|
@@ -32,138 +33,138 @@ var w = [
|
|
|
32
33
|
align: "end"
|
|
33
34
|
}
|
|
34
35
|
];
|
|
35
|
-
function
|
|
36
|
-
let
|
|
36
|
+
function O({ columns: t = D, empty: n = "Nothing waiting", className: r, children: i, ...c }) {
|
|
37
|
+
let u = S.toArray(i).filter(Boolean), p = [
|
|
37
38
|
"minmax(0,1.6fr)",
|
|
38
39
|
"minmax(0,1.2fr)",
|
|
39
40
|
"7rem"
|
|
40
|
-
],
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
...
|
|
41
|
+
], m = { "--task-rows-columns": t.map((e, t) => e.width ?? p[t] ?? "minmax(0,1fr)").join(" ") };
|
|
42
|
+
return /* @__PURE__ */ w("div", {
|
|
43
|
+
...c,
|
|
43
44
|
role: "table",
|
|
44
|
-
className: e(
|
|
45
|
+
className: e(o, r),
|
|
45
46
|
style: {
|
|
46
|
-
...
|
|
47
|
-
...
|
|
47
|
+
...c.style,
|
|
48
|
+
...m
|
|
48
49
|
},
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ C("div", {
|
|
50
51
|
role: "row",
|
|
51
|
-
className: e(
|
|
52
|
-
children: t.map((t) => /* @__PURE__ */
|
|
52
|
+
className: e(f, s),
|
|
53
|
+
children: t.map((t) => /* @__PURE__ */ C("div", {
|
|
53
54
|
role: "columnheader",
|
|
54
|
-
className: e(
|
|
55
|
+
className: e(d, t.align === "end" && "md:text-end"),
|
|
55
56
|
children: t.header
|
|
56
57
|
}, t.id))
|
|
57
|
-
}),
|
|
58
|
+
}), u.length === 0 ? /* @__PURE__ */ C("div", {
|
|
58
59
|
role: "row",
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ C("div", {
|
|
60
61
|
role: "cell",
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
className:
|
|
62
|
+
children: /* @__PURE__ */ C("p", {
|
|
63
|
+
className: l,
|
|
63
64
|
role: "status",
|
|
64
|
-
children: n
|
|
65
|
+
children: a(n, "done")
|
|
65
66
|
})
|
|
66
67
|
})
|
|
67
|
-
}) :
|
|
68
|
+
}) : u]
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
+
function k(e, t) {
|
|
71
72
|
return e.some((e) => e.id === t);
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function A(e, t) {
|
|
74
75
|
return e.find((e) => e.id === t)?.align ?? "start";
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
let
|
|
78
|
-
return /* @__PURE__ */
|
|
77
|
+
function j({ title: n, href: i, render: a, status: o, waiting: l, metric: d, source: f = "ready", note: v, columns: y }) {
|
|
78
|
+
let S = k(y, "waiting"), T = k(y, "metric"), E = A(y, "metric") === "end", D = f === "error" || f === "unwired";
|
|
79
|
+
return /* @__PURE__ */ w("div", {
|
|
79
80
|
role: "row",
|
|
80
|
-
className: e(
|
|
81
|
-
"aria-busy":
|
|
81
|
+
className: e(_, s),
|
|
82
|
+
"aria-busy": f === "loading" || void 0,
|
|
82
83
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ w("div", {
|
|
84
85
|
role: "cell",
|
|
85
86
|
className: "min-w-0",
|
|
86
87
|
children: [
|
|
87
|
-
|
|
88
|
+
f === "loading" ? /* @__PURE__ */ C(r, {
|
|
88
89
|
width: 168,
|
|
89
90
|
height: 16,
|
|
90
91
|
radius: "inner",
|
|
91
92
|
index: 0
|
|
92
|
-
}) : /* @__PURE__ */
|
|
93
|
-
className:
|
|
94
|
-
children: /* @__PURE__ */
|
|
93
|
+
}) : /* @__PURE__ */ C("h3", {
|
|
94
|
+
className: b,
|
|
95
|
+
children: /* @__PURE__ */ C(N, {
|
|
95
96
|
title: n,
|
|
96
97
|
href: i,
|
|
97
98
|
render: a
|
|
98
99
|
})
|
|
99
100
|
}),
|
|
100
|
-
|
|
101
|
+
f === "loading" ? /* @__PURE__ */ C(r, {
|
|
101
102
|
width: 120,
|
|
102
103
|
height: 12,
|
|
103
104
|
radius: "inner",
|
|
104
105
|
index: 1,
|
|
105
106
|
className: "mt-2 md:hidden"
|
|
106
107
|
}) : null,
|
|
107
|
-
D && v ? /* @__PURE__ */
|
|
108
|
-
className:
|
|
108
|
+
D && v ? /* @__PURE__ */ C("p", {
|
|
109
|
+
className: f === "error" ? u : g,
|
|
109
110
|
children: v
|
|
110
111
|
}) : null,
|
|
111
|
-
|
|
112
|
+
f === "ready" && o ? /* @__PURE__ */ C("div", {
|
|
112
113
|
className: "mt-1 max-md:hidden md:block",
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ C(M, { status: o })
|
|
114
115
|
}) : null,
|
|
115
|
-
|
|
116
|
-
className:
|
|
116
|
+
f === "ready" ? /* @__PURE__ */ w("div", {
|
|
117
|
+
className: h,
|
|
117
118
|
children: [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
className:
|
|
121
|
-
children:
|
|
119
|
+
o ? /* @__PURE__ */ C(M, { status: o }) : null,
|
|
120
|
+
S && l?.detail ? /* @__PURE__ */ C("span", {
|
|
121
|
+
className: c,
|
|
122
|
+
children: l.detail
|
|
122
123
|
}) : null,
|
|
123
|
-
T && d ? /* @__PURE__ */
|
|
124
|
-
className:
|
|
124
|
+
T && d ? /* @__PURE__ */ C("span", {
|
|
125
|
+
className: m,
|
|
125
126
|
children: d.value
|
|
126
127
|
}) : null
|
|
127
128
|
]
|
|
128
129
|
}) : null
|
|
129
130
|
]
|
|
130
131
|
}),
|
|
131
|
-
|
|
132
|
+
S ? /* @__PURE__ */ w("div", {
|
|
132
133
|
role: "cell",
|
|
133
134
|
className: "max-md:hidden min-w-0 md:block",
|
|
134
|
-
children: [
|
|
135
|
+
children: [f === "loading" ? /* @__PURE__ */ C(r, {
|
|
135
136
|
width: 112,
|
|
136
137
|
height: 20,
|
|
137
138
|
radius: "full",
|
|
138
139
|
index: 2
|
|
139
|
-
}) : null,
|
|
140
|
-
className:
|
|
141
|
-
children: [/* @__PURE__ */
|
|
140
|
+
}) : null, f === "ready" && l ? /* @__PURE__ */ w("span", {
|
|
141
|
+
className: x,
|
|
142
|
+
children: [/* @__PURE__ */ C(t, {
|
|
142
143
|
emphasis: "muted",
|
|
143
144
|
size: "sm",
|
|
144
|
-
children:
|
|
145
|
-
}),
|
|
146
|
-
className:
|
|
147
|
-
children:
|
|
145
|
+
children: l.label
|
|
146
|
+
}), l.detail ? /* @__PURE__ */ C("span", {
|
|
147
|
+
className: c,
|
|
148
|
+
children: l.detail
|
|
148
149
|
}) : null]
|
|
149
150
|
}) : null]
|
|
150
151
|
}) : null,
|
|
151
|
-
T ? /* @__PURE__ */
|
|
152
|
+
T ? /* @__PURE__ */ w("div", {
|
|
152
153
|
role: "cell",
|
|
153
154
|
className: e("max-md:hidden min-w-0 md:block", E && "md:text-end"),
|
|
154
|
-
children: [
|
|
155
|
+
children: [f === "loading" ? /* @__PURE__ */ C(r, {
|
|
155
156
|
width: 40,
|
|
156
157
|
height: 16,
|
|
157
158
|
radius: "inner",
|
|
158
159
|
index: 3,
|
|
159
160
|
className: "md:ml-auto"
|
|
160
|
-
}) : null,
|
|
161
|
-
className:
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
-
className:
|
|
161
|
+
}) : null, f === "ready" && d ? /* @__PURE__ */ w("span", {
|
|
162
|
+
className: p,
|
|
163
|
+
children: [/* @__PURE__ */ C("span", {
|
|
164
|
+
className: m,
|
|
164
165
|
children: d.value
|
|
165
|
-
}), d.detail ? /* @__PURE__ */
|
|
166
|
-
className:
|
|
166
|
+
}), d.detail ? /* @__PURE__ */ C("span", {
|
|
167
|
+
className: c,
|
|
167
168
|
children: d.detail
|
|
168
169
|
}) : null]
|
|
169
170
|
}) : null]
|
|
@@ -171,30 +172,30 @@ function A({ title: n, href: i, render: a, status: c, waiting: u, metric: d, sou
|
|
|
171
172
|
]
|
|
172
173
|
});
|
|
173
174
|
}
|
|
174
|
-
function
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
className:
|
|
177
|
-
children: [/* @__PURE__ */
|
|
175
|
+
function M({ status: e }) {
|
|
176
|
+
return /* @__PURE__ */ w("span", {
|
|
177
|
+
className: v,
|
|
178
|
+
children: [/* @__PURE__ */ C(i, {
|
|
178
179
|
variant: "dot",
|
|
179
180
|
tone: e.tone ?? "neutral",
|
|
180
181
|
besideLabel: !0,
|
|
181
182
|
pulsing: e.pulsing
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
-
className:
|
|
183
|
+
}), /* @__PURE__ */ C("span", {
|
|
184
|
+
className: y,
|
|
184
185
|
children: e.label
|
|
185
186
|
})]
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
return r ? (t != null && console.warn("[WMDS TaskRows] `render` wins over `href`."), /* @__PURE__ */
|
|
189
|
+
function N({ title: e, href: t, render: r }) {
|
|
190
|
+
return r ? (t != null && console.warn("[WMDS TaskRows] `render` wins over `href`."), /* @__PURE__ */ C(n, {
|
|
190
191
|
variant: "quiet",
|
|
191
192
|
render: r,
|
|
192
193
|
children: e
|
|
193
|
-
})) : t == null ? e : /* @__PURE__ */
|
|
194
|
+
})) : t == null ? e : /* @__PURE__ */ C(n, {
|
|
194
195
|
variant: "quiet",
|
|
195
196
|
href: t,
|
|
196
197
|
children: e
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
//#endregion
|
|
200
|
-
export {
|
|
201
|
+
export { j as TaskRowsRow, O as TaskRowsTable, T as taskRowsTableColumnIds, D as taskRowsTableColumnsDefault, E as taskRowsTableSources };
|
|
@@ -16,6 +16,11 @@ export interface TileGridProps {
|
|
|
16
16
|
columns?: TileGridColumns;
|
|
17
17
|
/** Shown in place of the tiles when there are none — for example "No resources match these filters." */
|
|
18
18
|
empty?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The result count, read out when it changes (Empty states Z6): "12 projects", "0 projects match".
|
|
21
|
+
* Kept in a status line that's always there, so the change is announced.
|
|
22
|
+
*/
|
|
23
|
+
resultsLabel?: string;
|
|
19
24
|
/** The tiles are placeholders for content on its way (`aria-busy`). */
|
|
20
25
|
busy?: boolean;
|
|
21
26
|
/** Names the list for screen readers, for example "Resources". */
|
|
@@ -35,7 +40,7 @@ export interface TileGridItemProps {
|
|
|
35
40
|
* both layouts: a masonry grid places each item in the shortest column, so the order runs across
|
|
36
41
|
* the top row and then down the page.
|
|
37
42
|
*/
|
|
38
|
-
declare function TileGridRoot({ layout, columns, empty, busy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className, }: TileGridProps): import("react").JSX.Element;
|
|
43
|
+
declare function TileGridRoot({ layout, columns, empty, resultsLabel, busy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className, }: TileGridProps): import("react").JSX.Element;
|
|
39
44
|
export declare const TileGrid: typeof TileGridRoot & {
|
|
40
45
|
Item: import("react").ForwardRefExoticComponent<TileGridItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
41
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TileGrid/TileGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TileGrid/TileGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAG1B,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,wGAAwG;IACxG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EACpB,MAAkB,EAClB,OAAO,EACP,KAAK,EACL,YAAY,EACZ,IAAY,EACZ,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,QAAQ,EACR,SAAS,GACV,EAAE,aAAa,+BA6Ff;AA2BD,eAAO,MAAM,QAAQ;;CAEnB,CAAC"}
|