@thewhatmatters/wmds 0.4.8 → 0.4.27
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 +284 -2
- package/CONSUMING.md +1 -1
- package/README.md +1 -1
- package/bin/wmds-check.mjs +8 -4
- package/dist/components/atoms/Badge/Badge.d.ts +13 -5
- package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +56 -48
- package/dist/components/atoms/Badge/badgeStyles.d.ts +15 -0
- package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
- package/dist/components/atoms/Badge/badgeStyles.js +38 -16
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/atoms/Button/Button.js +67 -48
- package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStatusMotion.js +6 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts +1 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +14 -12
- package/dist/components/atoms/Input/Input.d.ts +3 -1
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +59 -59
- package/dist/components/atoms/Input/inputShellStyles.d.ts +9 -3
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +38 -38
- package/dist/components/atoms/RiveHand/RiveHand.d.ts.map +1 -1
- package/dist/components/atoms/RiveHand/RiveHand.js +83 -81
- package/dist/components/atoms/Table/Table.d.ts +54 -0
- package/dist/components/atoms/Table/Table.d.ts.map +1 -0
- package/dist/components/atoms/Table/Table.js +66 -0
- package/dist/components/atoms/Table/tableStyles.d.ts +18 -0
- package/dist/components/atoms/Table/tableStyles.d.ts.map +1 -0
- package/dist/components/atoms/Table/tableStyles.js +14 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts +6 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +86 -78
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts +2 -2
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/textareaShellStyles.js +2 -2
- package/dist/components/atoms/TextLink/TextLink.d.ts +9 -3
- package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/atoms/TextLink/TextLink.js +22 -17
- package/dist/components/molecules/Card/Card.d.ts +28 -6
- package/dist/components/molecules/Card/Card.d.ts.map +1 -1
- package/dist/components/molecules/Card/Card.js +83 -42
- package/dist/components/molecules/Card/cardStyles.d.ts +16 -1
- package/dist/components/molecules/Card/cardStyles.d.ts.map +1 -1
- package/dist/components/molecules/Card/cardStyles.js +18 -4
- package/dist/components/molecules/Chip/chipStyles.js +9 -9
- package/dist/components/molecules/CopyField/CopyField.d.ts +41 -0
- package/dist/components/molecules/CopyField/CopyField.d.ts.map +1 -0
- package/dist/components/molecules/CopyField/CopyField.js +120 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts +28 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.js +7 -0
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts +16 -7
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts.map +1 -1
- package/dist/components/molecules/DisplayControls/DisplayControls.js +41 -39
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts +21 -0
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts.map +1 -1
- package/dist/components/molecules/DisplayControls/displayControlsState.js +46 -4
- package/dist/components/molecules/IndexList/IndexList.d.ts +6 -3
- package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -1
- package/dist/components/molecules/IndexList/IndexList.js +22 -21
- package/dist/components/molecules/LinkTile/LinkTile.d.ts.map +1 -1
- package/dist/components/molecules/LinkTile/LinkTile.js +74 -68
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts +7 -1
- package/dist/components/molecules/LinkTile/linkTileStyles.d.ts.map +1 -1
- package/dist/components/molecules/LinkTile/linkTileStyles.js +2 -2
- package/dist/components/molecules/LogView/LogView.d.ts +31 -0
- package/dist/components/molecules/LogView/LogView.d.ts.map +1 -0
- package/dist/components/molecules/LogView/LogView.js +109 -0
- package/dist/components/molecules/LogView/logViewStyles.d.ts +11 -0
- package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -0
- package/dist/components/molecules/LogView/logViewStyles.js +6 -0
- package/dist/components/molecules/NavList/NavList.d.ts +23 -4
- package/dist/components/molecules/NavList/NavList.d.ts.map +1 -1
- package/dist/components/molecules/NavList/NavList.js +65 -52
- package/dist/components/molecules/NavList/navListStyles.d.ts +2 -0
- package/dist/components/molecules/NavList/navListStyles.d.ts.map +1 -1
- package/dist/components/molecules/NavList/navListStyles.js +3 -3
- package/dist/components/molecules/PageHeader/PageHeader.js +3 -3
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +7 -7
- package/dist/components/molecules/Stat/Stat.d.ts +31 -5
- package/dist/components/molecules/Stat/Stat.d.ts.map +1 -1
- package/dist/components/molecules/Stat/Stat.js +83 -49
- package/dist/components/molecules/Stat/statStyles.d.ts +23 -3
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +29 -12
- package/dist/components/molecules/TaskRows/TaskRows.d.ts +13 -3
- package/dist/components/molecules/TaskRows/TaskRows.d.ts.map +1 -1
- package/dist/components/molecules/TaskRows/TaskRows.js +81 -57
- package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts +54 -0
- package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts.map +1 -0
- package/dist/components/molecules/TaskRows/TaskRowsTable.js +200 -0
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts +19 -1
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts.map +1 -1
- package/dist/components/molecules/TaskRows/taskRowsStyles.js +7 -3
- package/dist/components/molecules/TileGrid/tileGridStyles.d.ts +2 -2
- package/dist/components/organisms/AppShell/AppShell.d.ts +82 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/organisms/AppShell/AppShell.js +222 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +18 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -0
- package/dist/components/organisms/AppShell/appShellStyles.js +8 -0
- package/dist/components/organisms/Carousel/Carousel.d.ts +9 -1
- package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/Carousel.js +220 -182
- package/dist/components/organisms/Carousel/carouselMath.d.ts +5 -0
- package/dist/components/organisms/Carousel/carouselMath.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselMath.js +9 -1
- 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 +8 -7
- package/dist/components/organisms/Chart/Chart.d.ts +5 -1
- package/dist/components/organisms/Chart/Chart.d.ts.map +1 -1
- package/dist/components/organisms/Chart/Chart.js +126 -62
- package/dist/components/organisms/Chart/ChartLegend.d.ts +8 -1
- package/dist/components/organisms/Chart/ChartLegend.d.ts.map +1 -1
- package/dist/components/organisms/Chart/ChartLegend.js +43 -13
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts +52 -0
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartSegmentedRing.js +95 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts +32 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -1
- package/dist/components/organisms/Chart/chartStyles.js +15 -3
- package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDock.js +29 -25
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/OverlayPanelHeader.js +1 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts +3 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +74 -68
- package/dist/components/organisms/Sheet/sheetStyles.d.ts +8 -2
- package/dist/components/organisms/Sheet/sheetStyles.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/sheetStyles.js +16 -11
- package/dist/components/organisms/Tab/tabStyles.js +7 -7
- package/dist/index.d.ts +14 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -139
- package/dist/lib/chartTheme.d.ts +11 -0
- package/dist/lib/chartTheme.d.ts.map +1 -1
- package/dist/lib/compositionAudit.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.d.ts +7 -0
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +16 -1
- package/dist/lib/sheetParam/index.d.ts +3 -0
- package/dist/lib/sheetParam/index.d.ts.map +1 -0
- package/dist/lib/sheetParam/sheetParam.d.ts +15 -0
- package/dist/lib/sheetParam/sheetParam.d.ts.map +1 -0
- package/dist/lib/sheetParam/sheetParam.js +26 -0
- package/dist/lib/sheetParam/useSheetParam.d.ts +25 -0
- package/dist/lib/sheetParam/useSheetParam.d.ts.map +1 -0
- package/dist/lib/sheetParam/useSheetParam.js +29 -0
- package/dist/lib/typography.d.ts +2 -2
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/lib/typography.js +11 -0
- package/dist/styles.css +1 -1
- package/dist/typography.css +16 -0
- package/docs/README.md +1 -1
- package/docs/component-contracts.md +101 -0
- package/docs/components.md +21 -16
- package/docs/exports.json +88 -15
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +176 -0
- 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 +31 -0
- package/docs/patterns/components-badge--with-avatar.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 +1 -1
- 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-in-footer.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 +48 -0
- 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 +68 -0
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +144 -0
- 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 +9 -0
- package/docs/patterns/components-copyfield--copied.tsx +9 -0
- package/docs/patterns/components-copyfield--copy-key.tsx +9 -0
- package/docs/patterns/components-copyfield--on-navy.tsx +29 -0
- 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--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 +35 -0
- 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-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 +80 -0
- package/docs/patterns/components-logview--log-viewer.tsx +20 -0
- 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 +118 -0
- package/docs/patterns/components-navlist--side-nav-settings.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-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 +50 -0
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +51 -0
- package/docs/patterns/components-sheet--side-sheet.tsx +38 -0
- 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 +54 -0
- 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 +81 -0
- package/docs/patterns/components-table--approvals.tsx +223 -0
- package/docs/patterns/components-table--basic.tsx +60 -0
- 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 +62 -0
- 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 +32 -0
- 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 +7 -3
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +21 -4
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +13 -4
- package/docs/patterns/index.json +177 -1
- package/package.json +1 -1
|
@@ -43,48 +43,49 @@ function k({ captions: t, size: n = "lg", titleAs: i = "h2", empty: o, "aria-lab
|
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
function A({ title: r, href: a,
|
|
47
|
-
let { size:
|
|
48
|
-
function
|
|
49
|
-
let e = !
|
|
50
|
-
|
|
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;
|
|
48
|
+
function R() {
|
|
49
|
+
let e = !I;
|
|
50
|
+
F || P(e), b?.(e);
|
|
51
51
|
}
|
|
52
52
|
return /* @__PURE__ */ D("li", {
|
|
53
|
-
className: e(o,
|
|
53
|
+
className: e(o, k),
|
|
54
54
|
children: [
|
|
55
|
-
|
|
55
|
+
f == null ? null : /* @__PURE__ */ E("div", {
|
|
56
56
|
className: c,
|
|
57
|
-
children:
|
|
57
|
+
children: f
|
|
58
58
|
}),
|
|
59
59
|
/* @__PURE__ */ D("div", {
|
|
60
60
|
className: m,
|
|
61
|
-
children: [/* @__PURE__ */ E(
|
|
62
|
-
className: e(h, _[
|
|
61
|
+
children: [/* @__PURE__ */ E(j, {
|
|
62
|
+
className: e(h, _[A]),
|
|
63
63
|
children: /* @__PURE__ */ E(n, {
|
|
64
64
|
variant: "quiet",
|
|
65
65
|
href: a,
|
|
66
|
+
render: s,
|
|
66
67
|
children: r
|
|
67
68
|
})
|
|
68
|
-
}),
|
|
69
|
+
}), L ? /* @__PURE__ */ E(t, {
|
|
69
70
|
size: "md",
|
|
70
|
-
className: v[
|
|
71
|
-
icon: /* @__PURE__ */ E(T, { className: e(i,
|
|
72
|
-
"aria-label":
|
|
71
|
+
className: v[A],
|
|
72
|
+
icon: /* @__PURE__ */ E(T, { className: e(i, I && "rotate-180") }),
|
|
73
|
+
"aria-label": C ?? `Preview: ${r}`,
|
|
73
74
|
title: "",
|
|
74
|
-
"aria-expanded":
|
|
75
|
-
"aria-controls":
|
|
76
|
-
onClick:
|
|
75
|
+
"aria-expanded": I,
|
|
76
|
+
"aria-controls": M,
|
|
77
|
+
onClick: R
|
|
77
78
|
}) : null]
|
|
78
79
|
}),
|
|
79
|
-
|
|
80
|
+
L ? /* @__PURE__ */ E("div", {
|
|
80
81
|
className: e("motion-collapse", l),
|
|
81
|
-
"data-visible":
|
|
82
|
+
"data-visible": I ? "true" : "false",
|
|
82
83
|
children: /* @__PURE__ */ E("div", {
|
|
83
|
-
id:
|
|
84
|
+
id: M,
|
|
84
85
|
className: d,
|
|
85
86
|
children: /* @__PURE__ */ E("div", {
|
|
86
87
|
className: u,
|
|
87
|
-
children:
|
|
88
|
+
children: p
|
|
88
89
|
})
|
|
89
90
|
})
|
|
90
91
|
}) : null
|
|
@@ -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;
|
|
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;;;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,KAAK,EACL,KAAK,EACL,IAAI,EACJ,GAAG,EACH,MAAM,EACN,OAAe,EACf,SAAS,GACV,EAAE,aAAa,+BA0Ff"}
|
|
@@ -1,115 +1,121 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
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,
|
|
5
|
-
import { useId as
|
|
6
|
-
import { SquareArrowOutUpRight as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { useRender as
|
|
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";
|
|
9
9
|
//#region src/components/molecules/LinkTile/LinkTile.tsx
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
function C({ render: e, ...t }) {
|
|
11
|
+
return S({
|
|
12
12
|
render: e,
|
|
13
13
|
defaultTagName: "a",
|
|
14
14
|
props: t
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function w(e) {
|
|
18
18
|
return e == null ? void 0 : { aspectRatio: String(e) };
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
className: e(
|
|
20
|
+
function T({ title: l, href: S, render: T, external: E = !1, media: D, ratio: O, meta: k, tag: A, source: j, loading: M = !1, className: N }) {
|
|
21
|
+
let P = v(), F = `${P}-title`, I = `${P}-meta`, L = `${P}-tag`, R = `${P}-hint`;
|
|
22
|
+
if (M) return /* @__PURE__ */ x("div", {
|
|
23
|
+
className: e(u, N),
|
|
24
24
|
"data-link-tile": "",
|
|
25
25
|
"data-loading": "",
|
|
26
26
|
"aria-hidden": "true",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ b("span", {
|
|
28
28
|
className: i,
|
|
29
|
-
style:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
}), /* @__PURE__ */
|
|
32
|
-
className:
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
style: w(O ?? 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
|
+
})
|
|
43
49
|
})]
|
|
44
50
|
})]
|
|
45
51
|
});
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
S == null && T == null && console.warn("[WMDS LinkTile] Pass `href`, or `render` with a link that carries it.");
|
|
53
|
+
let z = D != null, B = [
|
|
54
|
+
F,
|
|
55
|
+
k != null && I,
|
|
56
|
+
A != null && L,
|
|
57
|
+
E && R
|
|
52
58
|
].filter(Boolean).join(" ");
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
render:
|
|
55
|
-
...
|
|
56
|
-
...
|
|
59
|
+
return /* @__PURE__ */ x(C, {
|
|
60
|
+
render: T,
|
|
61
|
+
...S == null ? null : { href: S },
|
|
62
|
+
...E ? {
|
|
57
63
|
target: "_blank",
|
|
58
64
|
rel: "noopener noreferrer"
|
|
59
65
|
} : null,
|
|
60
|
-
className: e(
|
|
61
|
-
"aria-labelledby":
|
|
66
|
+
className: e(f, N),
|
|
67
|
+
"aria-labelledby": B,
|
|
62
68
|
"data-link-tile": "",
|
|
63
|
-
"data-external":
|
|
64
|
-
children: [
|
|
65
|
-
className: e(i,
|
|
66
|
-
style:
|
|
69
|
+
"data-external": E ? "" : void 0,
|
|
70
|
+
children: [z ? /* @__PURE__ */ x("span", {
|
|
71
|
+
className: e(i, O == null ? o : a),
|
|
72
|
+
style: w(O),
|
|
67
73
|
"data-link-tile-frame": "",
|
|
68
|
-
children: [
|
|
69
|
-
id:
|
|
70
|
-
className:
|
|
71
|
-
children:
|
|
74
|
+
children: [D, A == null ? null : /* @__PURE__ */ b("span", {
|
|
75
|
+
id: L,
|
|
76
|
+
className: h,
|
|
77
|
+
children: A
|
|
72
78
|
})]
|
|
73
|
-
}) : null, /* @__PURE__ */
|
|
79
|
+
}) : null, /* @__PURE__ */ x("span", {
|
|
74
80
|
className: n,
|
|
75
81
|
children: [
|
|
76
|
-
|
|
77
|
-
className:
|
|
82
|
+
j == null ? null : /* @__PURE__ */ b("span", {
|
|
83
|
+
className: p,
|
|
78
84
|
"aria-hidden": "true",
|
|
79
|
-
children:
|
|
85
|
+
children: j
|
|
80
86
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
className:
|
|
87
|
+
/* @__PURE__ */ x("span", {
|
|
88
|
+
className: g,
|
|
83
89
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
id:
|
|
86
|
-
className:
|
|
87
|
-
children: [
|
|
90
|
+
/* @__PURE__ */ x("span", {
|
|
91
|
+
id: F,
|
|
92
|
+
className: _,
|
|
93
|
+
children: [l, E ? /* @__PURE__ */ b(y, {
|
|
88
94
|
className: r,
|
|
89
95
|
strokeWidth: 2,
|
|
90
96
|
"aria-hidden": !0
|
|
91
97
|
}) : null]
|
|
92
98
|
}),
|
|
93
|
-
|
|
94
|
-
id: P,
|
|
95
|
-
className: l,
|
|
96
|
-
children: D
|
|
97
|
-
}),
|
|
98
|
-
w ? /* @__PURE__ */ v("span", {
|
|
99
|
+
k == null ? null : /* @__PURE__ */ b("span", {
|
|
99
100
|
id: I,
|
|
101
|
+
className: d,
|
|
102
|
+
children: k
|
|
103
|
+
}),
|
|
104
|
+
E ? /* @__PURE__ */ b("span", {
|
|
105
|
+
id: R,
|
|
100
106
|
className: "sr-only",
|
|
101
107
|
children: "(opens in a new tab)"
|
|
102
108
|
}) : null
|
|
103
109
|
]
|
|
104
110
|
}),
|
|
105
|
-
|
|
106
|
-
id:
|
|
107
|
-
className:
|
|
108
|
-
children:
|
|
111
|
+
A != null && !z ? /* @__PURE__ */ b("span", {
|
|
112
|
+
id: L,
|
|
113
|
+
className: m,
|
|
114
|
+
children: A
|
|
109
115
|
}) : null
|
|
110
116
|
]
|
|
111
117
|
})]
|
|
112
118
|
});
|
|
113
119
|
}
|
|
114
120
|
//#endregion
|
|
115
|
-
export {
|
|
121
|
+
export { T as LinkTile, l as linkTileLoadingRatio };
|
|
@@ -21,10 +21,16 @@ export declare const linkTileTagOverClasses = "absolute start-2 top-2 z-[1] flex
|
|
|
21
21
|
export declare const linkTileCaptionClasses = "flex min-w-0 items-start gap-2";
|
|
22
22
|
/** Holds the source mark on the title's first line. */
|
|
23
23
|
export declare const linkTileSourceClasses = "flex h-5 shrink-0 items-center";
|
|
24
|
-
|
|
24
|
+
/** The title's lines, then the meta line on its 16px line, with no gap between them: the leading is the space. */
|
|
25
|
+
export declare const linkTileTextClasses = "flex min-w-0 flex-1 flex-col";
|
|
26
|
+
/** The loading placeholder's title line — the title's 20px line box, with the bar centered in it. */
|
|
27
|
+
export declare const linkTileLoadingLineClasses = "flex h-5 items-center";
|
|
28
|
+
/** The loading placeholder's meta line — the meta's 16px line box. */
|
|
29
|
+
export declare const linkTileLoadingMetaLineClasses = "flex h-4 items-center";
|
|
25
30
|
/** Two lines at most. Hover and keyboard focus underline it, as a quiet **TextLink** does. */
|
|
26
31
|
export declare const linkTileTitleClasses: string;
|
|
27
32
|
export declare const linkTileExternalIconClasses = "ml-1 inline-block size-[0.85em] align-[-0.05em] stroke-current text-muted";
|
|
33
|
+
/** One line, on the 16px caption line so it sits close under the title. */
|
|
28
34
|
export declare const linkTileMetaClasses: string;
|
|
29
35
|
/** A tag on a tile with no image sits at the caption's end. */
|
|
30
36
|
export declare const linkTileTagInlineClasses = "flex shrink-0 items-center";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkTileStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/linkTileStyles.ts"],"names":[],"mappings":"AAIA,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,2BAA2B,gDAAgD,CAAC;AAEzF,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,0FACmD,CAAC;AAE1F,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,8DAA8D,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"linkTileStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LinkTile/linkTileStyles.ts"],"names":[],"mappings":"AAIA,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAI/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,2BAA2B,gDAAgD,CAAC;AAEzF,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,0FACmD,CAAC;AAE1F,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,8DAA8D,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,kHAAkH;AAClH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,qGAAqG;AACrG,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,sEAAsE;AACtE,eAAO,MAAM,8BAA8B,0BAA0B,CAAC;AAEtE,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,eAAO,MAAM,2BAA2B,8EAA8E,CAAC;AAEvH,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,QAAmD,CAAC;AAEpF,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,+BAA+B,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
import { focusRingTransitionClasses as n, motionTransition as r } from "../../../lib/motion.js";
|
|
5
5
|
//#region src/components/molecules/LinkTile/linkTileStyles.ts
|
|
6
|
-
var i = 4 / 3, a = e("group/link-tile relative flex w-full min-w-0 flex-col gap-3 rounded-[var(--radius-card-body)] text-left no-underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-4 focus-visible:ring-offset-body", n), o = "flex w-full min-w-0 flex-col gap-3", s = e("relative block w-full overflow-hidden rounded-[var(--radius-card-body)] bg-muted-surface", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:content-['']", "after:transition-[border-color,background-color] after:duration-fast after:ease-standard", "group-hover/link-tile:after:border-border-emphasized group-hover/link-tile:after:bg-overlay-hover", "group-focus-visible/link-tile:after:border-border-emphasized"), c = "[&>img]:block [&>img]:h-auto [&>img]:w-full", l = "[&>img]:absolute [&>img]:inset-0 [&>img]:block [&>img]:size-full [&>img]:object-cover", u = "absolute start-2 top-2 z-[1] flex max-w-[calc(100%-1rem)]", d = "flex min-w-0 items-start gap-2", f = "flex h-5 shrink-0 items-center", p = "flex min-w-0 flex-1 flex-col
|
|
6
|
+
var i = 4 / 3, a = e("group/link-tile relative flex w-full min-w-0 flex-col gap-3 rounded-[var(--radius-card-body)] text-left no-underline", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-4 focus-visible:ring-offset-body", n), o = "flex w-full min-w-0 flex-col gap-3", s = e("relative block w-full overflow-hidden rounded-[var(--radius-card-body)] bg-muted-surface", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:content-['']", "after:transition-[border-color,background-color] after:duration-fast after:ease-standard", "group-hover/link-tile:after:border-border-emphasized group-hover/link-tile:after:bg-overlay-hover", "group-focus-visible/link-tile:after:border-border-emphasized"), c = "[&>img]:block [&>img]:h-auto [&>img]:w-full", l = "[&>img]:absolute [&>img]:inset-0 [&>img]:block [&>img]:size-full [&>img]:object-cover", u = "absolute start-2 top-2 z-[1] flex max-w-[calc(100%-1rem)]", d = "flex min-w-0 items-start gap-2", f = "flex h-5 shrink-0 items-center", p = "flex min-w-0 flex-1 flex-col", m = "flex h-5 items-center", h = "flex h-4 items-center", g = e(t("ui-label"), "line-clamp-2 text-pretty underline decoration-transparent decoration-solid underline-offset-[0.2em]", "transition-[text-decoration-color]", r("fast"), "group-hover/link-tile:decoration-current group-focus-visible/link-tile:decoration-current"), _ = "ml-1 inline-block size-[0.85em] align-[-0.05em] stroke-current text-muted", v = e(t("caption-tight"), "truncate"), y = "flex shrink-0 items-center";
|
|
7
7
|
//#endregion
|
|
8
|
-
export { d as linkTileCaptionClasses,
|
|
8
|
+
export { d as linkTileCaptionClasses, _ as linkTileExternalIconClasses, s as linkTileFrameClasses, l as linkTileFrameFixedClasses, c as linkTileFrameNaturalClasses, m as linkTileLoadingLineClasses, h as linkTileLoadingMetaLineClasses, i as linkTileLoadingRatio, o as linkTileLoadingRootClasses, v as linkTileMetaClasses, a as linkTileRootClasses, f as linkTileSourceClasses, y as linkTileTagInlineClasses, u as linkTileTagOverClasses, p as linkTileTextClasses, g as linkTileTitleClasses };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** Layout-only — height and margin. Not for re-theming the log. */
|
|
3
|
+
export type LogViewLayoutClassName = string;
|
|
4
|
+
export interface LogViewLabels {
|
|
5
|
+
copy: string;
|
|
6
|
+
copied: string;
|
|
7
|
+
follow: string;
|
|
8
|
+
following: string;
|
|
9
|
+
empty: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LogViewProps {
|
|
12
|
+
/** Log text, one entry per line. */
|
|
13
|
+
lines: readonly string[];
|
|
14
|
+
/** Accessible name of the log, for example "Scan log". */
|
|
15
|
+
label: string;
|
|
16
|
+
/** When true, the scroller stays on the last line. */
|
|
17
|
+
follow?: boolean;
|
|
18
|
+
onFollowChange?: (follow: boolean) => void;
|
|
19
|
+
/** Skeleton in the scroller. The line count stays hidden. */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** Replaces the lines when there are none. Default: "No log lines". */
|
|
22
|
+
empty?: ReactNode;
|
|
23
|
+
labels?: Partial<LogViewLabels>;
|
|
24
|
+
className?: LogViewLayoutClassName;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Scrolling log — line numbers, a tabular count, Copy, and Follow.
|
|
28
|
+
* Compose it inside a dark detail pane. The pane owns `data-theme`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function LogView({ lines, label, follow, onFollowChange, loading, empty, labels: labelsProp, className, }: LogViewProps): import("react").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=LogView.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
import { buttonStatusHoldMs as t } from "../../atoms/Button/buttonStatusStyles.js";
|
|
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";
|
|
9
|
+
//#region src/components/molecules/LogView/LogView.tsx
|
|
10
|
+
var v = {
|
|
11
|
+
copy: "Copy",
|
|
12
|
+
copied: "Copied",
|
|
13
|
+
follow: "Follow",
|
|
14
|
+
following: "Following",
|
|
15
|
+
empty: "No log lines"
|
|
16
|
+
};
|
|
17
|
+
function y(e) {
|
|
18
|
+
return e === 1 ? "1 line" : `${e} lines`;
|
|
19
|
+
}
|
|
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;
|
|
28
|
+
e != null && (e.scrollTop = e.scrollHeight);
|
|
29
|
+
}, [
|
|
30
|
+
S,
|
|
31
|
+
b,
|
|
32
|
+
N
|
|
33
|
+
]), p(() => {
|
|
34
|
+
if (!A) return;
|
|
35
|
+
let e = window.setTimeout(() => j(!1), t);
|
|
36
|
+
return () => window.clearTimeout(e);
|
|
37
|
+
}, [A]);
|
|
38
|
+
async function P() {
|
|
39
|
+
let e = b.join("\n");
|
|
40
|
+
try {
|
|
41
|
+
await navigator.clipboard.writeText(e), j(!0);
|
|
42
|
+
} catch {
|
|
43
|
+
j(!1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
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, {
|
|
57
|
+
role: "secondary",
|
|
58
|
+
size: "xs",
|
|
59
|
+
type: "button",
|
|
60
|
+
disabled: w || M === 0,
|
|
61
|
+
onClick: () => {
|
|
62
|
+
P();
|
|
63
|
+
},
|
|
64
|
+
children: A ? O.copied : O.copy
|
|
65
|
+
}), /* @__PURE__ */ g(n, {
|
|
66
|
+
role: "ghost",
|
|
67
|
+
size: "xs",
|
|
68
|
+
type: "button",
|
|
69
|
+
"aria-pressed": S,
|
|
70
|
+
disabled: w,
|
|
71
|
+
onClick: () => C?.(!S),
|
|
72
|
+
children: S ? O.following : O.follow
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
}), /* @__PURE__ */ _("div", {
|
|
76
|
+
ref: k,
|
|
77
|
+
className: u,
|
|
78
|
+
role: "log",
|
|
79
|
+
"aria-label": x,
|
|
80
|
+
"aria-busy": w || void 0,
|
|
81
|
+
children: [
|
|
82
|
+
w ? /* @__PURE__ */ g(r, {
|
|
83
|
+
className: "m-3",
|
|
84
|
+
width: "100%",
|
|
85
|
+
height: 96,
|
|
86
|
+
radius: "inner"
|
|
87
|
+
}) : null,
|
|
88
|
+
!w && M === 0 ? /* @__PURE__ */ g("p", {
|
|
89
|
+
className: o,
|
|
90
|
+
role: "status",
|
|
91
|
+
children: T ?? O.empty
|
|
92
|
+
}) : null,
|
|
93
|
+
N ? b.map((e, t) => /* @__PURE__ */ _("div", {
|
|
94
|
+
className: s,
|
|
95
|
+
children: [/* @__PURE__ */ g("span", {
|
|
96
|
+
className: c,
|
|
97
|
+
"aria-hidden": "true",
|
|
98
|
+
children: t + 1
|
|
99
|
+
}), /* @__PURE__ */ g("span", {
|
|
100
|
+
className: d,
|
|
101
|
+
children: e
|
|
102
|
+
})]
|
|
103
|
+
}, `${t}-${e}`)) : null
|
|
104
|
+
]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { b as LogView };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const logViewRootClasses = "flex min-h-0 flex-col overflow-hidden rounded-xl border border-border bg-surface";
|
|
2
|
+
export declare const logViewToolbarClasses = "flex h-9 shrink-0 items-center gap-2 border-b border-border px-3";
|
|
3
|
+
export declare const logViewCountClasses: string;
|
|
4
|
+
export declare const logViewActionsClasses = "ml-auto flex items-center gap-2";
|
|
5
|
+
export declare const logViewScrollerClasses = "min-h-40 flex-1 overflow-auto scroll-fade-y";
|
|
6
|
+
export declare const logViewLineClasses = "flex gap-3 px-3";
|
|
7
|
+
export declare const logViewNumberClasses = "type-code w-8 shrink-0 text-end text-muted tabular-nums";
|
|
8
|
+
export declare const logViewTextClasses = "type-code min-w-0 flex-1 whitespace-pre-wrap break-all";
|
|
9
|
+
export declare const logViewEmptyClasses: string;
|
|
10
|
+
export declare const logViewSkeletonClasses = "m-3";
|
|
11
|
+
//# sourceMappingURL=logViewStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logViewStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LogView/logViewStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,qFACqD,CAAC;AAErF,eAAO,MAAM,qBAAqB,qEACkC,CAAC;AAErE,eAAO,MAAM,mBAAmB,QAA0D,CAAC;AAE3F,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,gDAAgD,CAAC;AAEpF,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,4DAC0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB,2DAA2D,CAAC;AAE3F,eAAO,MAAM,mBAAmB,QAAuD,CAAC;AAExF,eAAO,MAAM,sBAAsB,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { typographyClass as e } from "../../../lib/typography.js";
|
|
3
|
+
//#region src/components/molecules/LogView/logViewStyles.ts
|
|
4
|
+
var t = "flex min-h-0 flex-col overflow-hidden rounded-xl border border-border bg-surface", n = "flex h-9 shrink-0 items-center gap-2 border-b border-border px-3", r = `${e("caption")} tabular-nums text-muted`, i = "ml-auto flex items-center gap-2", a = "min-h-40 flex-1 overflow-auto scroll-fade-y", o = "flex gap-3 px-3", s = "type-code w-8 shrink-0 text-end text-muted tabular-nums", c = "type-code min-w-0 flex-1 whitespace-pre-wrap break-all", l = `${e("caption")} px-3 py-4 text-muted`;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { i as logViewActionsClasses, r as logViewCountClasses, l as logViewEmptyClasses, o as logViewLineClasses, s as logViewNumberClasses, t as logViewRootClasses, a as logViewScrollerClasses, c as logViewTextClasses, n as logViewToolbarClasses };
|
|
@@ -10,11 +10,22 @@ export interface NavListItemDef {
|
|
|
10
10
|
label: string;
|
|
11
11
|
icon?: NavListIcon;
|
|
12
12
|
count?: number;
|
|
13
|
+
/** Plain URL. The row is an anchor, so a server-rendered app does not need `onSelect` to navigate. */
|
|
14
|
+
href?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Router link in place of `href` — `render={<Link href="/tasks/ikea" />}`.
|
|
17
|
+
* Pass `href` or `render`, not both.
|
|
18
|
+
*/
|
|
19
|
+
render?: ReactElement;
|
|
20
|
+
/** Trailing mark — a **Status** dot or a **Badge** `status` pill. Not a second label. */
|
|
21
|
+
trailing?: ReactNode;
|
|
13
22
|
}
|
|
14
23
|
export interface NavListSectionDef {
|
|
15
24
|
label?: string;
|
|
16
25
|
/** `brand` aligns the first section overline to an adjacent 56px header band. */
|
|
17
26
|
labelAlign?: NavListLabelAlignment;
|
|
27
|
+
/** Section control — filter or more. Pass **IconButton**. */
|
|
28
|
+
action?: ReactNode;
|
|
18
29
|
items: NavListItemDef[];
|
|
19
30
|
}
|
|
20
31
|
export interface NavListProps {
|
|
@@ -29,6 +40,8 @@ export interface NavListProps {
|
|
|
29
40
|
export interface NavListSectionProps {
|
|
30
41
|
label?: string;
|
|
31
42
|
labelAlign?: NavListLabelAlignment;
|
|
43
|
+
/** Section control — filter or more. Pass **IconButton**. */
|
|
44
|
+
action?: ReactNode;
|
|
32
45
|
children: ReactNode;
|
|
33
46
|
className?: NavListLayoutClassName;
|
|
34
47
|
}
|
|
@@ -37,16 +50,22 @@ export interface NavListItemProps {
|
|
|
37
50
|
label: string;
|
|
38
51
|
icon?: NavListIcon;
|
|
39
52
|
count?: number;
|
|
53
|
+
/** Plain URL. The row is an anchor. */
|
|
54
|
+
href?: string;
|
|
55
|
+
/** Router link in place of `href`. Pass one, not both. */
|
|
56
|
+
render?: ReactElement;
|
|
57
|
+
/** Trailing mark — a **Status** dot or a **Badge** `status` pill. */
|
|
58
|
+
trailing?: ReactNode;
|
|
40
59
|
selected?: boolean;
|
|
41
60
|
onSelect?: (id: string) => void;
|
|
42
61
|
className?: NavListLayoutClassName;
|
|
43
62
|
}
|
|
44
|
-
declare function NavListSectionRoot({ label, labelAlign, children, className, }: NavListSectionProps): import("react").JSX.Element;
|
|
45
|
-
declare function NavListItemRoot({ id, label, icon, count, selected: selectedProp, onSelect, className, }: NavListItemProps): import("react").JSX.Element;
|
|
63
|
+
declare function NavListSectionRoot({ label, labelAlign, action, children, className, }: NavListSectionProps): import("react").JSX.Element;
|
|
64
|
+
declare function NavListItemRoot({ id, label, icon, count, href, render, trailing, selected: selectedProp, onSelect, className, }: NavListItemProps): import("react").JSX.Element;
|
|
46
65
|
declare function NavListRoot({ sections, activeId, onSelect, children, "aria-label": ariaLabel, className, }: NavListProps): import("react").JSX.Element;
|
|
47
66
|
/**
|
|
48
|
-
* Sectioned secondary navigation — inset pills with optional icons and
|
|
49
|
-
* Compose **NavList.Item**
|
|
67
|
+
* Sectioned secondary navigation — inset pills with optional icons, counts, and trailing marks.
|
|
68
|
+
* `href` or `render` makes a row a link. Compose **NavList.Item** or pass a `sections` array.
|
|
50
69
|
*/
|
|
51
70
|
export declare const NavList: typeof NavListRoot & {
|
|
52
71
|
Section: typeof NavListSectionRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EACd,MAAM,OAAO,CAAC;AAIf,OAAO,EAaL,KAAK,qBAAqB,EAC3B,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,6DAA6D;AAC7D,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sGAAsG;IACtG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,yFAAyF;IACzF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAkDD,iBAAS,kBAAkB,CAAC,EAC1B,KAAK,EACL,UAAsB,EACtB,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,+BASrB;AAWD,iBAAS,eAAe,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,SAAS,GACV,EAAE,gBAAgB,+BA4BlB;AAED,iBAAS,WAAW,CAAC,EACnB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,YAAY,EAAE,SAAqB,EACnC,SAAS,GACV,EAAE,YAAY,+BA+Bd;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO;;;CAGlB,CAAC"}
|