@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
|
@@ -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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
11
|
+
var k = x({
|
|
11
12
|
size: "lg",
|
|
12
13
|
titleAs: "h2"
|
|
13
14
|
});
|
|
14
|
-
function
|
|
15
|
-
let
|
|
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:
|
|
18
|
-
}), [n,
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
value:
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
className: e(
|
|
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: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
47
|
-
let { size: A, titleAs: j } =
|
|
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__ */
|
|
53
|
-
className: e(
|
|
61
|
+
return /* @__PURE__ */ O("li", {
|
|
62
|
+
className: e(s, w),
|
|
54
63
|
children: [
|
|
55
|
-
|
|
56
|
-
className:
|
|
57
|
-
children:
|
|
64
|
+
c == null ? null : /* @__PURE__ */ D("div", {
|
|
65
|
+
className: l,
|
|
66
|
+
children: c
|
|
58
67
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
className:
|
|
61
|
-
children: [/* @__PURE__ */
|
|
62
|
-
className: e(
|
|
63
|
-
children: /* @__PURE__ */
|
|
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:
|
|
66
|
-
render:
|
|
74
|
+
href: i,
|
|
75
|
+
render: o,
|
|
67
76
|
children: r
|
|
68
77
|
})
|
|
69
|
-
}), L ? /* @__PURE__ */
|
|
78
|
+
}), L ? /* @__PURE__ */ D(t, {
|
|
70
79
|
size: "md",
|
|
71
|
-
className:
|
|
72
|
-
icon: /* @__PURE__ */ E
|
|
73
|
-
"aria-label":
|
|
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__ */
|
|
81
|
-
className: e("motion-collapse",
|
|
89
|
+
L ? /* @__PURE__ */ D("div", {
|
|
90
|
+
className: e("motion-collapse", u),
|
|
82
91
|
"data-visible": I ? "true" : "false",
|
|
83
|
-
children: /* @__PURE__ */
|
|
92
|
+
children: /* @__PURE__ */ D("div", {
|
|
84
93
|
id: M,
|
|
85
|
-
className:
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
className:
|
|
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
|
|
104
|
+
var M = Object.assign(A, { Item: j });
|
|
96
105
|
//#endregion
|
|
97
|
-
export {
|
|
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,
|
|
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":"
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
11
|
-
return
|
|
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
|
|
18
|
+
function T(e) {
|
|
18
19
|
return e == null ? void 0 : { aspectRatio: String(e) };
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
className: e(
|
|
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-
|
|
27
|
-
children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
children: /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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__ */
|
|
60
|
-
render:
|
|
61
|
-
...
|
|
62
|
-
...
|
|
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(
|
|
67
|
-
"aria-labelledby":
|
|
74
|
+
className: e(p, I),
|
|
75
|
+
"aria-labelledby": W,
|
|
68
76
|
"data-link-tile": "",
|
|
69
|
-
"data-external":
|
|
70
|
-
children: [
|
|
71
|
-
className: e(
|
|
72
|
-
style:
|
|
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: [
|
|
75
|
-
id:
|
|
76
|
-
className:
|
|
77
|
-
children:
|
|
82
|
+
children: [k, M == null ? null : /* @__PURE__ */ x("span", {
|
|
83
|
+
id: V,
|
|
84
|
+
className: g,
|
|
85
|
+
children: M
|
|
78
86
|
})]
|
|
79
|
-
}) : null, /* @__PURE__ */
|
|
80
|
-
className:
|
|
87
|
+
}) : null, /* @__PURE__ */ S("span", {
|
|
88
|
+
className: r,
|
|
81
89
|
children: [
|
|
82
|
-
|
|
83
|
-
className:
|
|
90
|
+
N == null ? null : /* @__PURE__ */ x("span", {
|
|
91
|
+
className: m,
|
|
84
92
|
"aria-hidden": "true",
|
|
85
|
-
children:
|
|
93
|
+
children: N
|
|
86
94
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
className:
|
|
95
|
+
/* @__PURE__ */ S("span", {
|
|
96
|
+
className: _,
|
|
89
97
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
id:
|
|
92
|
-
className:
|
|
93
|
-
children: [
|
|
94
|
-
className:
|
|
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
|
-
|
|
100
|
-
id:
|
|
101
|
-
className:
|
|
102
|
-
children:
|
|
107
|
+
j == null ? null : /* @__PURE__ */ x("span", {
|
|
108
|
+
id: B,
|
|
109
|
+
className: f,
|
|
110
|
+
children: j
|
|
103
111
|
}),
|
|
104
|
-
|
|
105
|
-
id:
|
|
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
|
-
|
|
112
|
-
id:
|
|
113
|
-
className:
|
|
114
|
-
children:
|
|
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 {
|
|
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":"
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
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
|
|
19
|
+
function x(e) {
|
|
18
20
|
return e === 1 ? "1 line" : `${e} lines`;
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
...
|
|
23
|
-
...
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
if (!
|
|
27
|
-
let e =
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}, [
|
|
38
|
-
async function
|
|
39
|
-
let e =
|
|
39
|
+
}, [N]);
|
|
40
|
+
async function L() {
|
|
41
|
+
let e = S.join("\n");
|
|
40
42
|
try {
|
|
41
|
-
await navigator.clipboard.writeText(e),
|
|
43
|
+
await navigator.clipboard.writeText(e), P(!0);
|
|
42
44
|
} catch {
|
|
43
|
-
|
|
45
|
+
P(!1);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
className: e(
|
|
48
|
-
"data-follow":
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
-
className:
|
|
51
|
-
children: [
|
|
52
|
-
className:
|
|
53
|
-
children:
|
|
54
|
-
}), /* @__PURE__ */
|
|
55
|
-
className:
|
|
56
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
62
|
+
disabled: E || F === 0,
|
|
61
63
|
onClick: () => {
|
|
62
|
-
|
|
64
|
+
L();
|
|
63
65
|
},
|
|
64
|
-
children:
|
|
65
|
-
}), /* @__PURE__ */
|
|
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":
|
|
70
|
-
disabled:
|
|
71
|
-
onClick: () =>
|
|
72
|
-
children:
|
|
71
|
+
"aria-pressed": w,
|
|
72
|
+
disabled: E,
|
|
73
|
+
onClick: () => T?.(!w),
|
|
74
|
+
children: w ? A.following : A.follow
|
|
73
75
|
})]
|
|
74
76
|
})]
|
|
75
|
-
}), /* @__PURE__ */
|
|
76
|
-
ref:
|
|
77
|
-
className:
|
|
77
|
+
}), /* @__PURE__ */ y("div", {
|
|
78
|
+
ref: M,
|
|
79
|
+
className: f,
|
|
78
80
|
role: "log",
|
|
79
|
-
"aria-label":
|
|
80
|
-
"aria-busy":
|
|
81
|
+
"aria-label": C,
|
|
82
|
+
"aria-busy": E || void 0,
|
|
81
83
|
children: [
|
|
82
|
-
|
|
83
|
-
className: "
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
!
|
|
89
|
-
className:
|
|
93
|
+
!E && F === 0 ? /* @__PURE__ */ v("p", {
|
|
94
|
+
className: c,
|
|
90
95
|
role: "status",
|
|
91
|
-
children:
|
|
96
|
+
children: a(D ?? A.empty)
|
|
92
97
|
}) : null,
|
|
93
|
-
|
|
94
|
-
className:
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
-
className:
|
|
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__ */
|
|
100
|
-
className:
|
|
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 {
|
|
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"}
|