@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
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — approvals queue
|
|
2
|
+
// Storybook: Components/Table → Pattern — approvals queue (?path=/story/components-table--approvals)
|
|
3
|
+
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
|
+
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { useEffect, useState, type ReactNode } from "react";
|
|
8
|
+
import { Check, X } from "lucide-react";
|
|
9
|
+
import {
|
|
10
|
+
Badge,
|
|
11
|
+
Button,
|
|
12
|
+
Card,
|
|
13
|
+
Table,
|
|
14
|
+
TableBody,
|
|
15
|
+
TableCaption,
|
|
16
|
+
TableCell,
|
|
17
|
+
TableHead,
|
|
18
|
+
TableHeader,
|
|
19
|
+
TableRow,
|
|
20
|
+
} from "@thewhatmatters/wmds";
|
|
21
|
+
|
|
22
|
+
export type ApprovalDecision = "approved" | "denied";
|
|
23
|
+
|
|
24
|
+
export interface ApprovalItem {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
kind: string;
|
|
28
|
+
waiting: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ApprovalsQueueProps {
|
|
32
|
+
items: ApprovalItem[];
|
|
33
|
+
onDecision?: (item: ApprovalItem, decision: ApprovalDecision) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type ApprovalView = "table" | "card";
|
|
37
|
+
|
|
38
|
+
/** The row's buttons. `table` sits them side by side; `card` gives each half the row. */
|
|
39
|
+
function ActionGroup({
|
|
40
|
+
label,
|
|
41
|
+
view,
|
|
42
|
+
onEscape,
|
|
43
|
+
children,
|
|
44
|
+
}: {
|
|
45
|
+
label: string;
|
|
46
|
+
view: ApprovalView;
|
|
47
|
+
onEscape?: () => void;
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
}) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
role="group"
|
|
53
|
+
aria-label={label}
|
|
54
|
+
className={view === "card" ? "grid h-11 grid-cols-2 items-center gap-2" : "flex h-11 items-center gap-2"}
|
|
55
|
+
onKeyDown={(event) => {
|
|
56
|
+
if (event.key === "Escape") onEscape?.();
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ApprovalsQueue({ items, onDecision }: ApprovalsQueueProps) {
|
|
65
|
+
const [decisions, setDecisions] = useState<Record<string, ApprovalDecision>>({});
|
|
66
|
+
const [confirmingId, setConfirmingId] = useState<string | null>(null);
|
|
67
|
+
const [focusKey, setFocusKey] = useState<string | null>(null);
|
|
68
|
+
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!focusKey) return;
|
|
71
|
+
const targets = document.querySelectorAll<HTMLElement>(`[data-focus="${focusKey}"]`);
|
|
72
|
+
Array.from(targets)
|
|
73
|
+
.find((target) => target.getClientRects().length > 0)
|
|
74
|
+
?.focus();
|
|
75
|
+
}, [focusKey]);
|
|
76
|
+
|
|
77
|
+
const waiting = items.filter((item) => !decisions[item.id]).length;
|
|
78
|
+
|
|
79
|
+
function decide(item: ApprovalItem, decision: ApprovalDecision) {
|
|
80
|
+
setDecisions((current) => ({ ...current, [item.id]: decision }));
|
|
81
|
+
setConfirmingId(null);
|
|
82
|
+
setFocusKey(`${item.id}-decision`);
|
|
83
|
+
onDecision?.(item, decision);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function cancel(item: ApprovalItem) {
|
|
87
|
+
setConfirmingId(null);
|
|
88
|
+
setFocusKey(`${item.id}-deny`);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function renderDecision(item: ApprovalItem, view: ApprovalView) {
|
|
92
|
+
const decision = decisions[item.id];
|
|
93
|
+
const full = view === "card" ? "w-full" : undefined;
|
|
94
|
+
if (decision) {
|
|
95
|
+
return (
|
|
96
|
+
<div className="flex h-11 items-center">
|
|
97
|
+
<span
|
|
98
|
+
data-focus={`${item.id}-decision`}
|
|
99
|
+
tabIndex={-1}
|
|
100
|
+
className="inline-flex rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body"
|
|
101
|
+
>
|
|
102
|
+
<Badge status={decision === "approved" ? "success" : "failed"} dot>
|
|
103
|
+
{decision === "approved" ? "Approved" : "Denied"}
|
|
104
|
+
</Badge>
|
|
105
|
+
</span>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
if (confirmingId === item.id) {
|
|
110
|
+
return (
|
|
111
|
+
<ActionGroup label={`Confirm denying ${item.name}`} view={view} onEscape={() => cancel(item)}>
|
|
112
|
+
<Button
|
|
113
|
+
data-focus={`${item.id}-confirm`}
|
|
114
|
+
role="primary"
|
|
115
|
+
icon={<X />}
|
|
116
|
+
className={full}
|
|
117
|
+
aria-label={`Confirm deny ${item.name}`}
|
|
118
|
+
onClick={() => decide(item, "denied")}
|
|
119
|
+
>
|
|
120
|
+
Confirm deny
|
|
121
|
+
</Button>
|
|
122
|
+
<Button role="ghost" className={full} aria-label={`Cancel deny ${item.name}`} onClick={() => cancel(item)}>
|
|
123
|
+
Cancel
|
|
124
|
+
</Button>
|
|
125
|
+
</ActionGroup>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
return (
|
|
129
|
+
<ActionGroup label={`Actions for ${item.name}`} view={view}>
|
|
130
|
+
<Button
|
|
131
|
+
role="primary"
|
|
132
|
+
icon={<Check />}
|
|
133
|
+
className={full}
|
|
134
|
+
aria-label={`Approve ${item.name}`}
|
|
135
|
+
onClick={() => decide(item, "approved")}
|
|
136
|
+
>
|
|
137
|
+
Approve
|
|
138
|
+
</Button>
|
|
139
|
+
<Button
|
|
140
|
+
data-focus={`${item.id}-deny`}
|
|
141
|
+
role="outline"
|
|
142
|
+
icon={<X />}
|
|
143
|
+
className={full}
|
|
144
|
+
aria-label={`Deny ${item.name}`}
|
|
145
|
+
onClick={() => {
|
|
146
|
+
setConfirmingId(item.id);
|
|
147
|
+
setFocusKey(`${item.id}-confirm`);
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
Deny
|
|
151
|
+
</Button>
|
|
152
|
+
</ActionGroup>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<>
|
|
158
|
+
<div className="sm:hidden">
|
|
159
|
+
<p className="mb-3 text-muted">{waiting} waiting on you</p>
|
|
160
|
+
{items.length === 0 ? (
|
|
161
|
+
<Card variant="outlined" padding="md">
|
|
162
|
+
<p className="text-center">Nothing waiting on you</p>
|
|
163
|
+
</Card>
|
|
164
|
+
) : (
|
|
165
|
+
<ul aria-label="Approvals waiting on you" className="flex flex-col gap-3">
|
|
166
|
+
{items.map((item) => (
|
|
167
|
+
<li key={item.id}>
|
|
168
|
+
<Card variant="outlined" padding="md">
|
|
169
|
+
<div className="flex flex-col gap-3">
|
|
170
|
+
<div>
|
|
171
|
+
<p className="font-medium">{item.name}</p>
|
|
172
|
+
<p className="text-muted">
|
|
173
|
+
{item.kind} · Waiting {item.waiting}
|
|
174
|
+
</p>
|
|
175
|
+
</div>
|
|
176
|
+
{renderDecision(item, "card")}
|
|
177
|
+
</div>
|
|
178
|
+
</Card>
|
|
179
|
+
</li>
|
|
180
|
+
))}
|
|
181
|
+
</ul>
|
|
182
|
+
)}
|
|
183
|
+
</div>
|
|
184
|
+
<div className="hidden sm:block">
|
|
185
|
+
<Table aria-label="Approvals waiting on you">
|
|
186
|
+
<TableCaption>{waiting} waiting on you</TableCaption>
|
|
187
|
+
<colgroup>
|
|
188
|
+
<col className="w-40" />
|
|
189
|
+
<col className="w-44" />
|
|
190
|
+
<col className="w-32" />
|
|
191
|
+
<col className="w-72" />
|
|
192
|
+
</colgroup>
|
|
193
|
+
<TableHeader>
|
|
194
|
+
<TableRow>
|
|
195
|
+
<TableHead sticky>Name</TableHead>
|
|
196
|
+
<TableHead>Type</TableHead>
|
|
197
|
+
<TableHead>Waiting</TableHead>
|
|
198
|
+
<TableHead>Decision</TableHead>
|
|
199
|
+
</TableRow>
|
|
200
|
+
</TableHeader>
|
|
201
|
+
<TableBody>
|
|
202
|
+
{items.length === 0 ? (
|
|
203
|
+
<TableRow>
|
|
204
|
+
<TableCell colSpan={4} align="center">
|
|
205
|
+
Nothing waiting on you
|
|
206
|
+
</TableCell>
|
|
207
|
+
</TableRow>
|
|
208
|
+
) : (
|
|
209
|
+
items.map((item) => (
|
|
210
|
+
<TableRow key={item.id}>
|
|
211
|
+
<TableCell sticky>{item.name}</TableCell>
|
|
212
|
+
<TableCell>{item.kind}</TableCell>
|
|
213
|
+
<TableCell>{item.waiting}</TableCell>
|
|
214
|
+
<TableCell>{renderDecision(item, "table")}</TableCell>
|
|
215
|
+
</TableRow>
|
|
216
|
+
))
|
|
217
|
+
)}
|
|
218
|
+
</TableBody>
|
|
219
|
+
</Table>
|
|
220
|
+
</div>
|
|
221
|
+
</>
|
|
222
|
+
);
|
|
223
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — basic table
|
|
2
|
+
// Storybook: Components/Table → Pattern — basic table (?path=/story/components-table--basic)
|
|
3
|
+
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Badge,
|
|
7
|
+
Table,
|
|
8
|
+
TableBody,
|
|
9
|
+
TableCaption,
|
|
10
|
+
TableCell,
|
|
11
|
+
TableFooter,
|
|
12
|
+
TableHead,
|
|
13
|
+
TableHeader,
|
|
14
|
+
TableRow,
|
|
15
|
+
} from "@thewhatmatters/wmds";
|
|
16
|
+
|
|
17
|
+
export interface PostRow {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
author: string;
|
|
21
|
+
status: "success" | "warning" | "idle";
|
|
22
|
+
statusLabel: string;
|
|
23
|
+
words: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function RecentPosts({ posts, total }: { posts: PostRow[]; total: string }) {
|
|
27
|
+
return (
|
|
28
|
+
<Table aria-label="Recent posts">
|
|
29
|
+
<TableCaption>Posts from the last 30 days</TableCaption>
|
|
30
|
+
<TableHeader>
|
|
31
|
+
<TableRow>
|
|
32
|
+
<TableHead>Post</TableHead>
|
|
33
|
+
<TableHead>Author</TableHead>
|
|
34
|
+
<TableHead>Status</TableHead>
|
|
35
|
+
<TableHead align="end">Words</TableHead>
|
|
36
|
+
</TableRow>
|
|
37
|
+
</TableHeader>
|
|
38
|
+
<TableBody>
|
|
39
|
+
{posts.map((post) => (
|
|
40
|
+
<TableRow key={post.id}>
|
|
41
|
+
<TableCell>{post.title}</TableCell>
|
|
42
|
+
<TableCell>{post.author}</TableCell>
|
|
43
|
+
<TableCell>
|
|
44
|
+
<Badge status={post.status} dot={post.status !== "idle"}>
|
|
45
|
+
{post.statusLabel}
|
|
46
|
+
</Badge>
|
|
47
|
+
</TableCell>
|
|
48
|
+
<TableCell align="end">{post.words}</TableCell>
|
|
49
|
+
</TableRow>
|
|
50
|
+
))}
|
|
51
|
+
</TableBody>
|
|
52
|
+
<TableFooter>
|
|
53
|
+
<TableRow>
|
|
54
|
+
<TableCell colSpan={3}>Total</TableCell>
|
|
55
|
+
<TableCell align="end">{total}</TableCell>
|
|
56
|
+
</TableRow>
|
|
57
|
+
</TableFooter>
|
|
58
|
+
</Table>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — action details
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — action details (?path=/story/components-taskrows--action-details)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — capsules
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — capsules (?path=/story/components-taskrows--capsules)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — card + status rows
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — card + status rows (?path=/story/components-taskrows--card-with-status-rows)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — controlled expand
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — controlled expand (?path=/story/components-taskrows--controlled-expand)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — custom leading / trailing
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — custom leading / trailing (?path=/story/components-taskrows--custom-slots)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — needs you
|
|
2
|
+
// Storybook: Components/TaskRows → Pattern — needs you (?path=/story/components-taskrows--needs-you-table)
|
|
3
|
+
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
|
+
|
|
5
|
+
import { Card, TaskRows, cardLayoutBodyOccupantInsetXClasses, cardLayoutBodyOccupantPadYClasses, cardTitleClasses, type TaskRowsColumn } from "@thewhatmatters/wmds";
|
|
6
|
+
|
|
7
|
+
const columns: TaskRowsColumn[] = [
|
|
8
|
+
{ id: "title", header: "Campaign" },
|
|
9
|
+
{ id: "waiting", header: "Waiting on you" },
|
|
10
|
+
{ id: "metric", header: "Live posts", align: "end" },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const wellClasses = [
|
|
14
|
+
"flex flex-col",
|
|
15
|
+
cardLayoutBodyOccupantPadYClasses,
|
|
16
|
+
cardLayoutBodyOccupantInsetXClasses,
|
|
17
|
+
].join(" ");
|
|
18
|
+
|
|
19
|
+
export function CampaignsThatNeedYou() {
|
|
20
|
+
return (
|
|
21
|
+
<div className="grid w-full gap-6">
|
|
22
|
+
<section>
|
|
23
|
+
<Card shape="rounded">
|
|
24
|
+
<Card.Header start={<h2 className={cardTitleClasses}>Campaigns that need you</h2>} />
|
|
25
|
+
<Card.Body>
|
|
26
|
+
<div className={wellClasses}>
|
|
27
|
+
<TaskRows variant="table" columns={columns} empty="Nothing waiting">
|
|
28
|
+
<TaskRows.Row
|
|
29
|
+
title="Stir in strength"
|
|
30
|
+
href="/campaigns/stir"
|
|
31
|
+
status={{ tone: "success", label: "Active · day 41" }}
|
|
32
|
+
waiting={{ label: "22 creators", detail: "4 waiting over 5 days" }}
|
|
33
|
+
metric={{ value: "49", detail: "12 this week" }}
|
|
34
|
+
/>
|
|
35
|
+
<TaskRows.Row
|
|
36
|
+
title="Healthier every day"
|
|
37
|
+
href="/campaigns/healthier"
|
|
38
|
+
status={{ tone: "warning", label: "Open · 2d" }}
|
|
39
|
+
waiting={{ label: "4 creators", detail: "all within 48h target" }}
|
|
40
|
+
metric={{ value: "10", detail: "2 this week" }}
|
|
41
|
+
/>
|
|
42
|
+
<TaskRows.Row title="Outreach" source="unwired" note="Outreach is not connected" />
|
|
43
|
+
<TaskRows.Row title="Matching" source="loading" />
|
|
44
|
+
<TaskRows.Row title="Brand settings" source="error" note="Could not load this source" />
|
|
45
|
+
</TaskRows>
|
|
46
|
+
</div>
|
|
47
|
+
</Card.Body>
|
|
48
|
+
</Card>
|
|
49
|
+
</section>
|
|
50
|
+
<section>
|
|
51
|
+
<Card shape="rounded">
|
|
52
|
+
<Card.Header start={<h2 className={cardTitleClasses}>Caught up</h2>} />
|
|
53
|
+
<Card.Body>
|
|
54
|
+
<div className={wellClasses}>
|
|
55
|
+
<TaskRows variant="table" columns={columns} empty="Nothing waiting" />
|
|
56
|
+
</div>
|
|
57
|
+
</Card.Body>
|
|
58
|
+
</Card>
|
|
59
|
+
</section>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — status rows
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — status rows (?path=/story/components-taskrows--status-list)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — tag chips
|
|
2
2
|
// Storybook: Components/TaskRows → Pattern — tag chips (?path=/story/components-taskrows--tag-chips)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — save status
|
|
2
|
+
// Storybook: Components/TextArea → Pattern — save status (?path=/story/components-textarea--save-status)
|
|
3
|
+
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
|
+
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import { TextArea } from "@thewhatmatters/wmds";
|
|
9
|
+
|
|
10
|
+
export function NotesField() {
|
|
11
|
+
const [value, setValue] = useState("");
|
|
12
|
+
const [saveState, setSaveState] = useState<"idle" | "saving" | "saved">("idle");
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (saveState !== "saving") return;
|
|
16
|
+
const timer = setTimeout(() => setSaveState("saved"), 600);
|
|
17
|
+
return () => clearTimeout(timer);
|
|
18
|
+
}, [saveState, value]);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<TextArea
|
|
22
|
+
label="Notes"
|
|
23
|
+
description="Saved automatically as you type."
|
|
24
|
+
value={value}
|
|
25
|
+
onChange={(event) => {
|
|
26
|
+
setValue(event.target.value);
|
|
27
|
+
setSaveState("saving");
|
|
28
|
+
}}
|
|
29
|
+
liveStatus={saveState === "saving" ? "Saving…" : saveState === "saved" ? "Saved" : ""}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — external destination
|
|
2
2
|
// Storybook: Components/TextLink → Pattern — external destination (?path=/story/components-textlink--external-destination)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — inline prose link
|
|
2
2
|
// Storybook: Components/TextLink → Pattern — inline prose link (?path=/story/components-textlink--inline-prose)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — quiet title link
|
|
2
2
|
// Storybook: Components/TextLink → Pattern — quiet title link (?path=/story/components-textlink--quiet-title)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — supporting copy link
|
|
2
2
|
// Storybook: Components/TextLink → Pattern — supporting copy link (?path=/story/components-textlink--supporting-copy)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Default
|
|
2
2
|
// Storybook: Components/TextSequence → Default (?path=/story/components-textsequence--default)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Reduced motion
|
|
2
2
|
// Storybook: Components/TextSequence → Reduced motion (?path=/story/components-textsequence--reduced-motion)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — tile grid
|
|
2
2
|
// Storybook: Components/TileGrid → Pattern — tile grid (?path=/story/components-tilegrid--masonry)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — stacked notifications
|
|
2
2
|
// Storybook: Components/Toast → Pattern — stacked notifications (?path=/story/components-toast--stacked-notifications)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — controlled state
|
|
2
2
|
// Storybook: Components/Tooltip → Pattern — controlled state (?path=/story/components-tooltip--controlled)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — disabled control
|
|
2
2
|
// Storybook: Components/Tooltip → Pattern — disabled control (?path=/story/components-tooltip--disabled-control)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — icon-only action
|
|
2
2
|
// Storybook: Components/Tooltip → Pattern — icon-only action (?path=/story/components-tooltip--icon-action)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — keyboard shortcut
|
|
2
2
|
// Storybook: Components/Tooltip → Pattern — keyboard shortcut (?path=/story/components-tooltip--keyboard-shortcut)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — placement
|
|
2
2
|
// Storybook: Components/Tooltip → Pattern — placement (?path=/story/components-tooltip--placement)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — horizontal rail
|
|
2
2
|
// Storybook: Foundations/Scroll fade → Pattern — horizontal rail (?path=/story/foundations-scroll-fade--horizontal-rail)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — overflowing list
|
|
2
2
|
// Storybook: Foundations/Scroll fade → Pattern — overflowing list (?path=/story/foundations-scroll-fade--overflowing-list)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — chart comparison gallery
|
|
2
2
|
// Storybook: Guides/Chart explorations → Pattern — chart comparison gallery (?path=/story/guides-chart-explorations--comparison-gallery)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — filtered grid
|
|
2
2
|
// Storybook: Guides/Filter panel → Pattern — filtered grid (?path=/story/guides-filter-panel--filtered-grid)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — filtered index
|
|
2
2
|
// Storybook: Guides/Filter panel → Pattern — filtered index (?path=/story/guides-filter-panel--filtered-index)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|
|
5
|
-
import { type ReactNode } from "react";
|
|
5
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
6
6
|
import {
|
|
7
7
|
FilterPanel,
|
|
8
8
|
IndexList,
|
|
@@ -41,6 +41,8 @@ export interface FilteredIndexProps {
|
|
|
41
41
|
selection?: FilterSelection;
|
|
42
42
|
/** Every change: an option on or off, or Clear all. */
|
|
43
43
|
onSelectionChange?: (selection: FilterSelection) => void;
|
|
44
|
+
/** The router's link for a post's title, in place of a plain anchor — (post) => <Link href={post.href} />. */
|
|
45
|
+
renderLink?: (post: FilteredPost) => ReactElement;
|
|
44
46
|
/** Page-level layers inside the page grid — for example a GridOverlay. */
|
|
45
47
|
overlay?: ReactNode;
|
|
46
48
|
}
|
|
@@ -52,6 +54,7 @@ export function FilteredIndex({
|
|
|
52
54
|
defaultSelection,
|
|
53
55
|
selection: selectionProp,
|
|
54
56
|
onSelectionChange,
|
|
57
|
+
renderLink,
|
|
55
58
|
overlay,
|
|
56
59
|
}: FilteredIndexProps) {
|
|
57
60
|
const [selection, setSelection] = useFilterSelection({
|
|
@@ -93,7 +96,8 @@ export function FilteredIndex({
|
|
|
93
96
|
<IndexList.Item
|
|
94
97
|
key={post.slug}
|
|
95
98
|
title={post.title}
|
|
96
|
-
href={post.href}
|
|
99
|
+
href={renderLink != null ? undefined : post.href}
|
|
100
|
+
render={renderLink?.(post)}
|
|
97
101
|
meta={<time dateTime={post.date}>{post.dateLabel}</time>}
|
|
98
102
|
preview={<p>{post.description}</p>}
|
|
99
103
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @thewhatmatters/wmds@0.4.
|
|
1
|
+
// @thewhatmatters/wmds@0.4.27 · Pattern — notification preferences
|
|
2
2
|
// Storybook: Guides/Overlay flows → Pattern — notification preferences (?path=/story/guides-overlay-flows--notification-preferences)
|
|
3
3
|
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
4
|
|