@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
|
@@ -2,102 +2,115 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { ButtonIcon as t } from "../../atoms/Button/ButtonIcon.js";
|
|
4
4
|
import { Button as n } from "../../atoms/Button/Button.js";
|
|
5
|
-
import { navListItemCountClasses as r, navListItemIconClasses as i, navListItemLabelClasses as a,
|
|
6
|
-
import { cloneElement as
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { navListItemCountClasses as r, navListItemIconClasses as i, navListItemLabelClasses as a, navListItemTrailClasses as o, navListItemWrapClasses as s, navListLabelAlignments as c, navListSectionBrandBandClasses as l, navListSectionClasses as u, navListSectionLabelBrandClasses as d, navListSectionLabelClasses as f, navListSectionLabelDefaultClasses as p, navListSectionLabelRowClasses as m, navListShellClasses as h } from "./navListStyles.js";
|
|
6
|
+
import { cloneElement as g, createContext as _, createElement as v, isValidElement as y, useContext as b } from "react";
|
|
7
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/molecules/NavList/NavList.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let a =
|
|
9
|
+
var C = _({});
|
|
10
|
+
function w({ icon: n, selected: r }) {
|
|
11
|
+
let a = y(n) ? g(n, {
|
|
12
12
|
strokeWidth: r ? 2.25 : 1.75,
|
|
13
13
|
...r ? {
|
|
14
14
|
fill: "currentColor",
|
|
15
15
|
fillOpacity: .12
|
|
16
16
|
} : { fill: "none" }
|
|
17
17
|
}) : n;
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ x("span", {
|
|
19
19
|
className: e("inline-flex shrink-0", i(r)),
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ x(t, {
|
|
21
21
|
size: "sm",
|
|
22
22
|
children: a
|
|
23
23
|
})
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
28
|
-
className:
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
className:
|
|
31
|
-
children:
|
|
32
|
-
})
|
|
33
|
-
}) : /* @__PURE__ */
|
|
34
|
-
className:
|
|
35
|
-
children:
|
|
26
|
+
function T({ label: t, labelAlign: n = "section", action: r }) {
|
|
27
|
+
return n === "brand" ? /* @__PURE__ */ S("div", {
|
|
28
|
+
className: e(l, r != null && "justify-between gap-2"),
|
|
29
|
+
children: [/* @__PURE__ */ x("p", {
|
|
30
|
+
className: d,
|
|
31
|
+
children: t
|
|
32
|
+
}), r]
|
|
33
|
+
}) : /* @__PURE__ */ S("div", {
|
|
34
|
+
className: e(p, m),
|
|
35
|
+
children: [/* @__PURE__ */ x("p", {
|
|
36
|
+
className: f,
|
|
37
|
+
children: t
|
|
38
|
+
}), r]
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
className: e(
|
|
41
|
-
children: [t == null ? null : /* @__PURE__ */
|
|
41
|
+
function E({ label: t, labelAlign: n = "section", action: r, children: i, className: a }) {
|
|
42
|
+
return /* @__PURE__ */ S("div", {
|
|
43
|
+
className: e(u, a),
|
|
44
|
+
children: [t == null ? null : /* @__PURE__ */ x(T, {
|
|
42
45
|
label: t,
|
|
43
|
-
labelAlign: n
|
|
44
|
-
|
|
46
|
+
labelAlign: n,
|
|
47
|
+
action: r
|
|
48
|
+
}), i]
|
|
45
49
|
});
|
|
46
50
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
function D(e, t) {
|
|
52
|
+
if (t != null && e != null && console.warn("[WMDS NavList] Pass `href` or `render` on an item, not both. `render` is used."), t != null) return t;
|
|
53
|
+
if (e != null) return v("a", { href: e });
|
|
54
|
+
}
|
|
55
|
+
function O({ id: t, label: i, icon: c, count: l, href: u, render: d, trailing: f, selected: p, onSelect: m, className: h }) {
|
|
56
|
+
let g = b(C), _ = p ?? g.activeId === t, v = m ?? g.onSelect, y = D(u, d);
|
|
57
|
+
return /* @__PURE__ */ x("div", {
|
|
58
|
+
className: e(s, h),
|
|
59
|
+
children: /* @__PURE__ */ S(n, {
|
|
52
60
|
layout: "nav",
|
|
53
61
|
type: "button",
|
|
54
|
-
selected:
|
|
55
|
-
|
|
62
|
+
selected: _,
|
|
63
|
+
render: y,
|
|
64
|
+
onClick: v == null ? void 0 : () => v(t),
|
|
56
65
|
children: [
|
|
57
|
-
|
|
58
|
-
icon:
|
|
59
|
-
selected:
|
|
66
|
+
c == null ? null : /* @__PURE__ */ x(w, {
|
|
67
|
+
icon: c,
|
|
68
|
+
selected: _
|
|
60
69
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ x("span", {
|
|
62
71
|
className: a,
|
|
63
72
|
children: i
|
|
64
73
|
}),
|
|
65
|
-
|
|
66
|
-
className:
|
|
67
|
-
children:
|
|
68
|
-
|
|
74
|
+
l != null || f != null ? /* @__PURE__ */ S("span", {
|
|
75
|
+
className: o,
|
|
76
|
+
children: [l == null ? null : /* @__PURE__ */ x("span", {
|
|
77
|
+
className: r,
|
|
78
|
+
children: l.toLocaleString()
|
|
79
|
+
}), f]
|
|
80
|
+
}) : null
|
|
69
81
|
]
|
|
70
82
|
})
|
|
71
83
|
});
|
|
72
84
|
}
|
|
73
|
-
function
|
|
85
|
+
function k({ sections: t, activeId: n, onSelect: r, children: i, "aria-label": a = "Section", className: o }) {
|
|
74
86
|
let s = {
|
|
75
87
|
activeId: n,
|
|
76
88
|
onSelect: r
|
|
77
89
|
};
|
|
78
|
-
return t == null ? /* @__PURE__ */
|
|
90
|
+
return t == null ? /* @__PURE__ */ x("nav", {
|
|
79
91
|
"aria-label": a,
|
|
80
|
-
className: e(
|
|
81
|
-
children: /* @__PURE__ */
|
|
92
|
+
className: e(h, o),
|
|
93
|
+
children: /* @__PURE__ */ x(C.Provider, {
|
|
82
94
|
value: s,
|
|
83
95
|
children: i
|
|
84
96
|
})
|
|
85
|
-
}) : /* @__PURE__ */
|
|
97
|
+
}) : /* @__PURE__ */ x("nav", {
|
|
86
98
|
"aria-label": a,
|
|
87
|
-
className: e(
|
|
88
|
-
children: /* @__PURE__ */
|
|
99
|
+
className: e(h, o),
|
|
100
|
+
children: /* @__PURE__ */ x(C.Provider, {
|
|
89
101
|
value: s,
|
|
90
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
102
|
+
children: t.map((e, t) => /* @__PURE__ */ x(E, {
|
|
91
103
|
label: e.label,
|
|
104
|
+
action: e.action,
|
|
92
105
|
labelAlign: e.labelAlign ?? (t === 0 && e.label != null ? "brand" : "section"),
|
|
93
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
106
|
+
children: e.items.map((e) => /* @__PURE__ */ x(O, { ...e }, e.id))
|
|
94
107
|
}, e.label ?? t))
|
|
95
108
|
})
|
|
96
109
|
});
|
|
97
110
|
}
|
|
98
|
-
var
|
|
99
|
-
Section:
|
|
100
|
-
Item:
|
|
111
|
+
var A = Object.assign(k, {
|
|
112
|
+
Section: E,
|
|
113
|
+
Item: O
|
|
101
114
|
});
|
|
102
115
|
//#endregion
|
|
103
|
-
export {
|
|
116
|
+
export { A as NavList, c as navListLabelAlignments };
|
|
@@ -10,6 +10,8 @@ export declare const navListSectionLabelBrandClasses: string;
|
|
|
10
10
|
export declare const navListSectionLabelDefaultClasses: string;
|
|
11
11
|
export declare const navListItemWrapClasses = "relative w-full px-2";
|
|
12
12
|
export declare const navListItemLabelClasses = "min-w-0 flex-1 truncate text-left";
|
|
13
|
+
export declare const navListItemTrailClasses = "ml-auto flex shrink-0 items-center gap-2";
|
|
13
14
|
export declare const navListItemCountClasses: string;
|
|
15
|
+
export declare const navListSectionLabelRowClasses = "flex items-center justify-between gap-2";
|
|
14
16
|
export declare function navListItemIconClasses(selected: boolean): "text-muted" | "text-fg";
|
|
15
17
|
//# sourceMappingURL=navListStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navListStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NavList/navListStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,+BAAgC,CAAC;AAEpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,sCAAsC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,kFAAkF;AAClF,eAAO,MAAM,8BAA8B,QAG1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAgD,CAAC;AAExF,eAAO,MAAM,+BAA+B,QAA6B,CAAC;AAE1E,eAAO,MAAM,iCAAiC,QAG7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E,eAAO,MAAM,uBAAuB,QAInC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,4BAEvD"}
|
|
1
|
+
{"version":3,"file":"navListStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/NavList/navListStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,+BAAgC,CAAC;AAEpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,sCAAsC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,kFAAkF;AAClF,eAAO,MAAM,8BAA8B,QAG1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAgD,CAAC;AAExF,eAAO,MAAM,+BAA+B,QAA6B,CAAC;AAE1E,eAAO,MAAM,iCAAiC,QAG7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E,eAAO,MAAM,uBAAuB,6CAA6C,CAAC;AAElF,eAAO,MAAM,uBAAuB,QAInC,CAAC;AAEF,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AAEvF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,4BAEvD"}
|
|
@@ -3,9 +3,9 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
import { pageHeaderAppBandHeightClasses as n } from "../PageHeader/pageHeaderStyles.js";
|
|
5
5
|
//#region src/components/molecules/NavList/navListStyles.ts
|
|
6
|
-
var r = ["brand", "section"], i = "flex h-full min-h-0 w-52 flex-col", a = "flex flex-col gap-1", o = e("box-border flex shrink-0 items-center px-4", n), s = e(t("overline"), "text-muted"), c = s, l = e(s, "px-4 pb-1 pt-3"), u = "relative w-full px-2", d = "min-w-0 flex-1 truncate text-left", f =
|
|
7
|
-
function
|
|
6
|
+
var r = ["brand", "section"], i = "flex h-full min-h-0 w-52 flex-col", a = "flex flex-col gap-1", o = e("box-border flex shrink-0 items-center px-4", n), s = e(t("overline"), "text-muted"), c = s, l = e(s, "px-4 pb-1 pt-3"), u = "relative w-full px-2", d = "min-w-0 flex-1 truncate text-left", f = "ml-auto flex shrink-0 items-center gap-2", p = e("tabular-nums", t("caption"), "text-muted"), m = "flex items-center justify-between gap-2";
|
|
7
|
+
function h(e) {
|
|
8
8
|
return e ? "text-fg" : "text-muted";
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export {
|
|
11
|
+
export { p as navListItemCountClasses, h as navListItemIconClasses, d as navListItemLabelClasses, f as navListItemTrailClasses, u as navListItemWrapClasses, r as navListLabelAlignments, o as navListSectionBrandBandClasses, a as navListSectionClasses, c as navListSectionLabelBrandClasses, s as navListSectionLabelClasses, l as navListSectionLabelDefaultClasses, m as navListSectionLabelRowClasses, i as navListShellClasses };
|
|
@@ -9,10 +9,10 @@ var l = {
|
|
|
9
9
|
toolbar: "span"
|
|
10
10
|
};
|
|
11
11
|
function u({ title: t, variant: o = "page", start: u, end: d, "aria-label": f, className: p }) {
|
|
12
|
-
let m = l[o], h = t != null && t.length > 0
|
|
12
|
+
let m = l[o], h = t != null && t.length > 0;
|
|
13
13
|
return o === "toolbar" ? /* @__PURE__ */ c("div", {
|
|
14
14
|
role: "toolbar",
|
|
15
|
-
"aria-label":
|
|
15
|
+
"aria-label": h ? void 0 : f,
|
|
16
16
|
className: e(r.toolbar, p),
|
|
17
17
|
children: [u != null || h ? /* @__PURE__ */ c("div", {
|
|
18
18
|
className: i,
|
|
@@ -25,7 +25,7 @@ function u({ title: t, variant: o = "page", start: u, end: d, "aria-label": f, c
|
|
|
25
25
|
children: d
|
|
26
26
|
})]
|
|
27
27
|
}) : /* @__PURE__ */ c("header", {
|
|
28
|
-
"aria-label":
|
|
28
|
+
"aria-label": f,
|
|
29
29
|
className: e(r[o], p),
|
|
30
30
|
children: [/* @__PURE__ */ c("div", {
|
|
31
31
|
className: i,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { clusterHeightClasses as t } from "../../../lib/clusterScale.js";
|
|
4
|
+
import { motionTransition as n } from "../../../lib/motion.js";
|
|
5
5
|
//#region src/components/molecules/SegmentedControl/segmentedControlStyles.ts
|
|
6
6
|
var r = [
|
|
7
7
|
"sm",
|
|
8
8
|
"md",
|
|
9
9
|
"lg"
|
|
10
|
-
], i = ["hug", "stretch"], a = e("relative inline-flex items-stretch rounded-full bg-body p-0.5 shadow-hairline",
|
|
11
|
-
sm:
|
|
12
|
-
md:
|
|
13
|
-
lg:
|
|
10
|
+
], i = ["hug", "stretch"], a = e("relative inline-flex items-stretch rounded-full bg-body p-0.5 shadow-hairline", n("fast")), o = "flex w-full min-w-0", s = {
|
|
11
|
+
sm: t.sm,
|
|
12
|
+
md: t.md,
|
|
13
|
+
lg: t.lg
|
|
14
14
|
}, c = {
|
|
15
15
|
sm: "px-2.5 text-xs leading-none",
|
|
16
16
|
md: "px-3 text-sm leading-none",
|
|
17
17
|
lg: "px-4 text-sm leading-none"
|
|
18
|
-
}, l = e("relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full font-sans font-medium tracking-normal", "transition-[color] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-inset",
|
|
18
|
+
}, l = e("relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full font-sans font-medium tracking-normal", "transition-[color] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-inset", n("fast")), u = "min-w-0 flex-1", d = "relative z-10 inline-flex min-w-0 items-center justify-center", f = "w-full", p = {
|
|
19
19
|
sm: "gap-1",
|
|
20
20
|
md: "gap-1.5",
|
|
21
21
|
lg: "gap-2"
|
|
@@ -7,10 +7,18 @@ export type StatLayoutClassName = string;
|
|
|
7
7
|
export interface StatTrend {
|
|
8
8
|
/** Trend copy — e.g. `+2.1%` or `-0.8%`. */
|
|
9
9
|
value: string;
|
|
10
|
+
/** `up` / `down` tint the badge. `neutral` and `flat` stay muted. */
|
|
10
11
|
direction?: StatTrendDirection;
|
|
11
|
-
/** Optional
|
|
12
|
+
/** Optional tooltip on the trend badge. Visible "vs" copy belongs on `context`. */
|
|
12
13
|
label?: string;
|
|
13
14
|
}
|
|
15
|
+
/** Replaces the figure when the metric source is not wired. */
|
|
16
|
+
export interface StatUnavailable {
|
|
17
|
+
/** Stand-in for the figure. Default `Not connected`. */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Why the figure is missing — visible under the stand-in. */
|
|
20
|
+
reason: string;
|
|
21
|
+
}
|
|
14
22
|
export interface StatProps {
|
|
15
23
|
/** Metric name — e.g. Followers, ER, Reach. */
|
|
16
24
|
label: string;
|
|
@@ -18,9 +26,25 @@ export interface StatProps {
|
|
|
18
26
|
value: ReactNode;
|
|
19
27
|
/** Compact delta — **Badge** `emphasis="muted"` in the value row. */
|
|
20
28
|
trend?: StatTrend;
|
|
21
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Visible secondary line under the figure — e.g. `vs $14,850` or `of $1M goal`.
|
|
31
|
+
* Tabular figures. Hidden while `unavailable` is set (the reason takes this line).
|
|
32
|
+
*/
|
|
33
|
+
context?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* One tabular line under the figure — for example "3 new" or "vs last scan".
|
|
36
|
+
* Hidden while `loading` or `unavailable`.
|
|
37
|
+
*/
|
|
38
|
+
detail?: ReactNode;
|
|
39
|
+
/** Leading tile — pass a Lucide glyph. Composed with **ButtonIcon**. */
|
|
40
|
+
icon?: ReactNode;
|
|
41
|
+
/** Label-row action — pass **Button** `size="sm"` (e.g. View details). */
|
|
42
|
+
action?: ReactNode;
|
|
43
|
+
/** Replaces the figure and hides `trend`, `context`, and `detail` when the source is not wired. */
|
|
44
|
+
unavailable?: StatUnavailable;
|
|
45
|
+
/** Leading slot — inline with the label row, after `icon`. */
|
|
22
46
|
start?: ReactNode;
|
|
23
|
-
/** Trailing slot — inline with the label row
|
|
47
|
+
/** Trailing slot — inline with the label row, before `action`. */
|
|
24
48
|
end?: ReactNode;
|
|
25
49
|
size?: StatSize;
|
|
26
50
|
/** Skeleton label + value — sets `aria-busy` on the tile. */
|
|
@@ -35,11 +59,13 @@ export interface StatGroupProps {
|
|
|
35
59
|
columns?: StatGroupColumns;
|
|
36
60
|
className?: StatLayoutClassName;
|
|
37
61
|
}
|
|
38
|
-
declare function StatRoot({ label, value, trend, start, end, size, loading, className, }: StatProps): import("react").JSX.Element;
|
|
62
|
+
declare function StatRoot({ label, value, trend, context, detail, icon, action, unavailable, start, end, size, loading, className, }: StatProps): import("react").JSX.Element;
|
|
39
63
|
declare function StatGroup({ children, "aria-label": ariaLabel, columns, className, }: StatGroupProps): import("react").JSX.Element;
|
|
40
64
|
/**
|
|
41
65
|
* At-a-glance metric tile — label, headline value, optional muted trend badge.
|
|
42
|
-
*
|
|
66
|
+
* `size="lg"` is the hero figure (`type-display-3`, tabular). `context` is the visible
|
|
67
|
+
* "vs" line. `detail` is one tabular line under the figure. Compose in **Stat.Group**
|
|
68
|
+
* for insights rows; pair **Card** + **Chart** below for history.
|
|
43
69
|
*/
|
|
44
70
|
export declare const Stat: typeof StatRoot & {
|
|
45
71
|
Group: typeof StatGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/Stat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Stat.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/Stat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAyBL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,SAAS;IACxB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,mGAAmG;IACnG,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAoCD,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,KAAK,EACL,GAAG,EACH,IAAW,EACX,OAAe,EACf,SAAS,GACV,EAAE,SAAS,+BAmDX;AAED,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,OAAW,EACX,SAAS,GACV,EAAE,cAAc,+BAUhB;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;CAEf,CAAC"}
|
|
@@ -1,76 +1,110 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { Badge as t } from "../../atoms/Badge/Badge.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { ButtonIcon as n } from "../../atoms/Button/ButtonIcon.js";
|
|
5
|
+
import { Skeleton as r } from "../../atoms/Skeleton/Skeleton.js";
|
|
6
|
+
import { statContentClasses as i, statContextClasses as a, statDetailClasses as o, statGroupColumns as s, statGroupGridClasses as c, statIconButtonSize as l, statIconTileClasses as u, statIconTileSizeClasses as d, statLabelClasses as f, statLabelEndClasses as p, statLabelLgClasses as m, statLabelRowClasses as h, statLabelStartClasses as g, statLabelTextClasses as _, statLabelTrailClasses as v, statLoadingLabelHeights as y, statLoadingValueHeights as b, statShellClasses as x, statShellSizeClasses as S, statSizes as C, statTrendBadgeVariant as w, statTrendDirections as T, statUnavailableClasses as E, statValueRowClasses as D, statValueSizeClasses as O } from "./statStyles.js";
|
|
7
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/molecules/Stat/Stat.tsx
|
|
8
|
-
function
|
|
9
|
+
function M({ trend: e }) {
|
|
9
10
|
let n = e.direction ?? "neutral";
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ A("span", {
|
|
11
12
|
title: e.label,
|
|
12
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ A(t, {
|
|
13
14
|
size: "sm",
|
|
14
15
|
emphasis: "muted",
|
|
15
|
-
variant:
|
|
16
|
+
variant: w(n),
|
|
16
17
|
children: e.value
|
|
17
18
|
})
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
function N({ size: e, index: t = 0 }) {
|
|
22
|
+
return /* @__PURE__ */ j(k, { children: [
|
|
23
|
+
/* @__PURE__ */ A(r, {
|
|
24
|
+
width: "45%",
|
|
25
|
+
height: y[e],
|
|
26
|
+
radius: "inner",
|
|
27
|
+
index: t
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ A(r, {
|
|
30
|
+
width: "70%",
|
|
31
|
+
height: b[e],
|
|
32
|
+
radius: "inner",
|
|
33
|
+
index: t + 1
|
|
34
|
+
}),
|
|
35
|
+
e === "lg" ? /* @__PURE__ */ A(r, {
|
|
36
|
+
width: "40%",
|
|
37
|
+
height: 16,
|
|
38
|
+
radius: "inner",
|
|
39
|
+
index: t + 2
|
|
40
|
+
}) : null
|
|
41
|
+
] });
|
|
32
42
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"aria-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
function P({ label: t, value: r, trend: s, context: c, detail: y, icon: b, action: C, unavailable: w, start: T, end: P, size: F = "sm", loading: I = !1, className: L }) {
|
|
44
|
+
let R = P != null || C != null;
|
|
45
|
+
return /* @__PURE__ */ A("article", {
|
|
46
|
+
className: e(x, S[F], L),
|
|
47
|
+
"aria-busy": I || void 0,
|
|
48
|
+
"aria-label": I ? t : void 0,
|
|
49
|
+
children: /* @__PURE__ */ A("div", {
|
|
50
|
+
className: e(i, F === "lg" && "gap-2"),
|
|
51
|
+
children: I ? /* @__PURE__ */ A(N, { size: F }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
|
|
52
|
+
className: h,
|
|
42
53
|
children: [
|
|
43
|
-
|
|
44
|
-
className:
|
|
45
|
-
children:
|
|
54
|
+
b == null ? null : /* @__PURE__ */ A("span", {
|
|
55
|
+
className: e(u, d[F]),
|
|
56
|
+
children: /* @__PURE__ */ A(n, {
|
|
57
|
+
size: l[F],
|
|
58
|
+
children: b
|
|
59
|
+
})
|
|
46
60
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
className:
|
|
61
|
+
T == null ? null : /* @__PURE__ */ A("div", {
|
|
62
|
+
className: g,
|
|
63
|
+
children: T
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ A("span", {
|
|
66
|
+
className: F === "lg" ? m : e(f, _),
|
|
49
67
|
children: t
|
|
50
68
|
}),
|
|
51
|
-
|
|
52
|
-
className:
|
|
53
|
-
children:
|
|
54
|
-
})
|
|
69
|
+
R ? /* @__PURE__ */ j("div", {
|
|
70
|
+
className: C == null ? p : v,
|
|
71
|
+
children: [P, C]
|
|
72
|
+
}) : null
|
|
55
73
|
]
|
|
56
|
-
}), /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
74
|
+
}), w == null ? /* @__PURE__ */ j(k, { children: [
|
|
75
|
+
/* @__PURE__ */ j("div", {
|
|
76
|
+
className: D,
|
|
77
|
+
children: [/* @__PURE__ */ A("span", {
|
|
78
|
+
className: O[F],
|
|
79
|
+
children: r
|
|
80
|
+
}), s == null ? null : /* @__PURE__ */ A(M, { trend: s })]
|
|
81
|
+
}),
|
|
82
|
+
c == null ? null : /* @__PURE__ */ A("p", {
|
|
83
|
+
className: a,
|
|
84
|
+
children: c
|
|
85
|
+
}),
|
|
86
|
+
y == null ? null : /* @__PURE__ */ A("p", {
|
|
87
|
+
className: o,
|
|
88
|
+
children: y
|
|
89
|
+
})
|
|
90
|
+
] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("p", {
|
|
91
|
+
className: E,
|
|
92
|
+
children: w.label ?? "Not connected"
|
|
93
|
+
}), /* @__PURE__ */ A("p", {
|
|
94
|
+
className: a,
|
|
95
|
+
children: w.reason
|
|
96
|
+
})] })] })
|
|
63
97
|
})
|
|
64
98
|
});
|
|
65
99
|
}
|
|
66
|
-
function
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
className: e(
|
|
100
|
+
function F({ children: t, "aria-label": n, columns: r = 4, className: i }) {
|
|
101
|
+
return /* @__PURE__ */ A("div", {
|
|
102
|
+
className: e(c(r), i),
|
|
69
103
|
role: n == null ? void 0 : "group",
|
|
70
104
|
"aria-label": n,
|
|
71
105
|
children: t
|
|
72
106
|
});
|
|
73
107
|
}
|
|
74
|
-
var
|
|
108
|
+
var I = Object.assign(P, { Group: F });
|
|
75
109
|
//#endregion
|
|
76
|
-
export {
|
|
110
|
+
export { I as Stat, s as statGroupColumns, c as statGroupGridClasses, C as statSizes, T as statTrendDirections };
|
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
import type { BadgeVariant } from "../../atoms/Badge/Badge";
|
|
2
|
-
|
|
2
|
+
import type { ButtonSize } from "../../atoms/Button/buttonStyles";
|
|
3
|
+
export declare const statSizes: readonly ["sm", "md", "lg"];
|
|
3
4
|
export type StatSize = (typeof statSizes)[number];
|
|
4
|
-
export declare const statTrendDirections: readonly ["up", "down", "neutral"];
|
|
5
|
+
export declare const statTrendDirections: readonly ["up", "down", "neutral", "flat"];
|
|
5
6
|
export type StatTrendDirection = (typeof statTrendDirections)[number];
|
|
6
7
|
export declare const statGroupColumns: readonly [2, 3, 4];
|
|
7
8
|
export type StatGroupColumns = (typeof statGroupColumns)[number];
|
|
8
9
|
/** Bordered metric tile — insights row and hero KPI. */
|
|
9
10
|
export declare const statShellClasses = "flex min-w-0 flex-col rounded-xl border border-border bg-surface";
|
|
10
11
|
export declare const statShellSizeClasses: Record<StatSize, string>;
|
|
11
|
-
export declare const statLabelRowClasses = "flex items-center gap-2";
|
|
12
|
+
export declare const statLabelRowClasses = "flex flex-wrap items-center gap-2";
|
|
12
13
|
export declare const statLabelStartClasses = "shrink-0";
|
|
13
14
|
export declare const statLabelTextClasses = "min-w-0 flex-1";
|
|
14
15
|
export declare const statLabelEndClasses = "ml-auto shrink-0";
|
|
16
|
+
/** Trailing cluster when `end` and `action` share the label row. */
|
|
17
|
+
export declare const statLabelTrailClasses = "ml-auto flex shrink-0 items-center gap-2";
|
|
15
18
|
export declare const statContentClasses = "flex min-w-0 flex-col gap-1";
|
|
19
|
+
export declare const statContentLgClasses = "gap-2";
|
|
16
20
|
export declare const statLabelClasses: string;
|
|
21
|
+
/** Hero label — sentence case. `sm` / `md` stay on the overline. */
|
|
22
|
+
export declare const statLabelLgClasses = "type-label min-w-0 flex-1 text-muted";
|
|
23
|
+
/**
|
|
24
|
+
* Leading glyph tile. `text-brand-outline` is navy in light (`--color-brand`) and the
|
|
25
|
+
* lifted navy in dark, where `#011272` disappears on the surface.
|
|
26
|
+
*/
|
|
27
|
+
export declare const statIconTileClasses = "inline-flex shrink-0 items-center justify-center rounded-lg bg-brand-tint text-brand-outline";
|
|
28
|
+
export declare const statIconTileSizeClasses: Record<StatSize, string>;
|
|
29
|
+
export declare const statIconButtonSize: Record<StatSize, ButtonSize>;
|
|
17
30
|
export declare const statValueRowClasses = "flex flex-wrap items-center gap-x-2 gap-y-1";
|
|
18
31
|
export declare const statValueSizeClasses: Record<StatSize, string>;
|
|
32
|
+
/** Visible secondary line — "vs $14,850", "of $1M goal". Figures stay tabular. */
|
|
33
|
+
export declare const statContextClasses: string;
|
|
34
|
+
/** One line under the figure — "3 new" or "vs last scan". Figures stay tabular. */
|
|
35
|
+
export declare const statDetailClasses: string;
|
|
36
|
+
/** Stand-in figure when the source is not wired. */
|
|
37
|
+
export declare const statUnavailableClasses = "type-body text-muted";
|
|
19
38
|
export declare const statLoadingLabelHeights: Record<StatSize, number>;
|
|
20
39
|
export declare const statLoadingValueHeights: Record<StatSize, number>;
|
|
40
|
+
export declare const statLoadingContextHeight = 16;
|
|
21
41
|
export declare function statGroupGridClasses(columns: StatGroupColumns): string;
|
|
22
42
|
export declare function statTrendBadgeVariant(direction: StatTrendDirection): BadgeVariant;
|
|
23
43
|
//# sourceMappingURL=statStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/statStyles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"statStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Stat/statStyles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,eAAO,MAAM,SAAS,6BAA8B,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,eAAO,MAAM,mBAAmB,4CAA6C,CAAC;AAE9E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB,oBAAqB,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,qEAAqE,CAAC;AAEnG,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAIzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,sCAAsC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAEtD,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,6CAA6C,CAAC;AAEhF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAEhE,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C,eAAO,MAAM,gBAAgB,QAA8C,CAAC;AAE5E,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,iGACgE,CAAC;AAEjG,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAI5D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,CAI3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,gDAAgD,CAAC;AAEjF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAIzD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,QAA+C,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,QAA0D,CAAC;AAEzF,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAI5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAI5D,CAAC;AAEF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAQtE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,kBAAkB,GAAG,YAAY,CAQjF"}
|
|
@@ -2,36 +2,53 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
//#region src/components/molecules/Stat/statStyles.ts
|
|
5
|
-
var n = [
|
|
5
|
+
var n = [
|
|
6
|
+
"sm",
|
|
7
|
+
"md",
|
|
8
|
+
"lg"
|
|
9
|
+
], r = [
|
|
6
10
|
"up",
|
|
7
11
|
"down",
|
|
8
|
-
"neutral"
|
|
12
|
+
"neutral",
|
|
13
|
+
"flat"
|
|
9
14
|
], i = [
|
|
10
15
|
2,
|
|
11
16
|
3,
|
|
12
17
|
4
|
|
13
18
|
], a = "flex min-w-0 flex-col rounded-xl border border-border bg-surface", o = {
|
|
14
19
|
sm: "gap-2 p-4",
|
|
15
|
-
md: "gap-3 p-5"
|
|
16
|
-
|
|
20
|
+
md: "gap-3 p-5",
|
|
21
|
+
lg: "gap-3 p-5"
|
|
22
|
+
}, s = "flex flex-wrap items-center gap-2", c = "shrink-0", l = "min-w-0 flex-1", u = "ml-auto shrink-0", d = "ml-auto flex shrink-0 items-center gap-2", f = "flex min-w-0 flex-col gap-1", p = "gap-2", m = `${t("overline")} text-muted`, h = "type-label min-w-0 flex-1 text-muted", g = "inline-flex shrink-0 items-center justify-center rounded-lg bg-brand-tint text-brand-outline", _ = {
|
|
23
|
+
sm: "size-7",
|
|
24
|
+
md: "size-8",
|
|
25
|
+
lg: "size-9"
|
|
26
|
+
}, v = {
|
|
27
|
+
sm: "xs",
|
|
28
|
+
md: "sm",
|
|
29
|
+
lg: "sm"
|
|
30
|
+
}, y = "flex flex-wrap items-center gap-x-2 gap-y-1", b = {
|
|
17
31
|
sm: `${t("section-heading")} tabular-nums tracking-tight text-fg`,
|
|
18
|
-
md: `${t("page-heading")} tabular-nums tracking-tight text-fg
|
|
19
|
-
|
|
32
|
+
md: `${t("page-heading")} tabular-nums tracking-tight text-fg`,
|
|
33
|
+
lg: "type-display-3 tabular-nums tracking-tight text-fg"
|
|
34
|
+
}, x = `${t("caption")} tabular-nums`, S = `${t("caption")} tabular-nums text-muted`, C = "type-body text-muted", w = {
|
|
20
35
|
sm: 12,
|
|
21
|
-
md: 14
|
|
22
|
-
|
|
36
|
+
md: 14,
|
|
37
|
+
lg: 16
|
|
38
|
+
}, T = {
|
|
23
39
|
sm: 28,
|
|
24
|
-
md: 36
|
|
40
|
+
md: 36,
|
|
41
|
+
lg: 40
|
|
25
42
|
};
|
|
26
|
-
function
|
|
43
|
+
function E(t) {
|
|
27
44
|
return e("grid grid-cols-2 gap-4", {
|
|
28
45
|
2: "lg:grid-cols-2",
|
|
29
46
|
3: "lg:grid-cols-3",
|
|
30
47
|
4: "lg:grid-cols-4"
|
|
31
48
|
}[t]);
|
|
32
49
|
}
|
|
33
|
-
function
|
|
50
|
+
function D(e) {
|
|
34
51
|
return e === "up" ? "success" : e === "down" ? "destructive" : "neutral";
|
|
35
52
|
}
|
|
36
53
|
//#endregion
|
|
37
|
-
export {
|
|
54
|
+
export { f as statContentClasses, p as statContentLgClasses, x as statContextClasses, S as statDetailClasses, i as statGroupColumns, E as statGroupGridClasses, v as statIconButtonSize, g as statIconTileClasses, _ as statIconTileSizeClasses, m as statLabelClasses, u as statLabelEndClasses, h as statLabelLgClasses, s as statLabelRowClasses, c as statLabelStartClasses, l as statLabelTextClasses, d as statLabelTrailClasses, w as statLoadingLabelHeights, T as statLoadingValueHeights, a as statShellClasses, o as statShellSizeClasses, n as statSizes, D as statTrendBadgeVariant, r as statTrendDirections, C as statUnavailableClasses, y as statValueRowClasses, b as statValueSizeClasses };
|