@thewhatmatters/wmds 0.4.9 → 0.4.28
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 +303 -0
- package/CONSUMING.md +62 -1
- package/README.md +1 -1
- package/bin/wmds-check.mjs +47 -0
- package/dist/colors.css +92 -0
- 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 +42 -20
- package/dist/components/atoms/Band/Band.d.ts +27 -0
- package/dist/components/atoms/Band/Band.d.ts.map +1 -0
- package/dist/components/atoms/Band/Band.js +22 -0
- package/dist/components/atoms/Band/bandStyles.d.ts +20 -0
- package/dist/components/atoms/Band/bandStyles.d.ts.map +1 -0
- package/dist/components/atoms/Band/bandStyles.js +23 -0
- 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/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +12 -5
- 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 +2 -2
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +16 -14
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +69 -68
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.js +1 -1
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +13 -12
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +2 -2
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/iconButtonStyles.js +1 -1
- package/dist/components/atoms/InlinePill/InlinePill.d.ts +42 -0
- package/dist/components/atoms/InlinePill/InlinePill.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/InlinePill.js +48 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts +27 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.js +19 -0
- package/dist/components/atoms/Input/Input.d.ts +9 -4
- 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 +10 -4
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +40 -40
- package/dist/components/atoms/RiveHand/RiveHand.d.ts.map +1 -1
- package/dist/components/atoms/RiveHand/RiveHand.js +83 -81
- package/dist/components/atoms/Skeleton/skeletonStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +45 -44
- package/dist/components/atoms/Switch/switchStyles.d.ts +1 -1
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -1
- package/dist/components/atoms/Switch/switchStyles.js +1 -1
- 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 +5 -5
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.js +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +80 -122
- 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 +19 -5
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.js +1 -1
- 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/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +30 -27
- package/dist/components/molecules/Dropdown/dropdownStyles.js +1 -1
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts +14 -0
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts.map +1 -0
- package/dist/components/{organisms/Tab/tabOverflow.js → molecules/Dropdown/resolveOverflow.js} +2 -2
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts +70 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.js +155 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts +71 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.js +61 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +11 -10
- 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/PillGroup/pillGroupStyles.js +1 -1
- package/dist/components/molecules/Search/searchStyles.js +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +8 -8
- package/dist/components/molecules/Select/Select.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +75 -119
- package/dist/components/molecules/Select/selectStyles.js +3 -3
- 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 +24 -4
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +30 -13
- 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/TextSequence/TextSequence.d.ts.map +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.js +35 -35
- package/dist/components/organisms/AppShell/AppShell.d.ts +84 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/organisms/AppShell/AppShell.js +231 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +20 -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/AlertDialog.d.ts +7 -1
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/AlertDialog.js +54 -50
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +52 -71
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/OverlayPanelHeader.js +1 -0
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +14 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +3 -3
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -1
- package/dist/components/organisms/FilterPanel/FilterPanel.js +52 -42
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +6 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +54 -66
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/components/organisms/MoreMenu/MoreMenu.js +45 -101
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -1
- package/dist/components/organisms/Panel/Panel.js +44 -53
- 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 +66 -81
- 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/SiteNav/SiteNav.d.ts +0 -9
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +236 -286
- package/dist/components/organisms/SiteNav/siteNavStyles.js +1 -1
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -1
- package/dist/components/organisms/Tab/Tab.js +77 -127
- package/dist/components/organisms/Tab/tabStyles.d.ts +2 -1
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -1
- package/dist/components/organisms/Tab/tabStyles.js +7 -7
- package/dist/fonts.css +10 -0
- package/dist/grid.css +38 -0
- package/dist/index.d.ts +16 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +152 -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/contrast.d.ts +11 -0
- package/dist/lib/contrast.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +34 -1
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +100 -23
- 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 +1 -1
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/shape.css +24 -3
- package/dist/styles.css +1 -1
- package/dist/typography.css +55 -8
- package/docs/README.md +1 -1
- package/docs/component-contracts.md +101 -0
- package/docs/components.md +19 -12
- package/docs/exports.json +142 -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-band--page-in-bands.tsx +39 -0
- 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--alert-dialog-typed-confirmation.tsx +54 -0
- 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 +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +193 -1
- package/package.json +1 -1
- package/dist/components/organisms/Tab/tabOverflow.d.ts +0 -14
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
import { type ChartSegmentFillVariant, type ChartSegmentPreset, type ChartTone } from "../../../lib/chartTheme";
|
|
3
|
+
import { ChartSegmentedRing } from "./ChartSegmentedRing";
|
|
3
4
|
import { ChartLegend } from "./ChartLegend";
|
|
4
5
|
import { ChartTooltipContent } from "./ChartTooltipContent";
|
|
5
6
|
import { ChartLoading } from "./ChartLoading";
|
|
@@ -12,6 +13,8 @@ import { ChartCartesian, ChartCartesianAreaSeries, ChartCartesianAxisBottom, Cha
|
|
|
12
13
|
export { chartKpiHeroRowClasses, chartKpiHeroValueClasses, chartKpiTrendLabelClasses, chartKpiTrendRowClasses, chartKpiTrendValueClasses, } from "./chartStyles";
|
|
13
14
|
export type { ChartSegmentFillVariant, ChartSegmentPreset, ChartTone } from "../../../lib/chartTheme";
|
|
14
15
|
export type { ChartSegmentedBarAnimate } from "./chartSegmentedBarMotion";
|
|
16
|
+
export type { ChartSegmentedRingProps, ChartSegmentedRingSize, ChartSegmentedRingUnavailable, } from "./ChartSegmentedRing";
|
|
17
|
+
export { chartSegmentedRingSegmentDefault, chartSegmentedRingSizes } from "./ChartSegmentedRing";
|
|
15
18
|
export { chartCategoricalCount, chartCategoricalPalette, chartFormatPercent, chartMaxTicksForWidth, chartSegmentBarWidth, chartSegmentFillVariants, chartSegmentPresets, chartSegmentTickSpec, resolveCapacityBarLayout, resolveSegmentBarConfig, } from "../../../lib/chartTheme";
|
|
16
19
|
/** Layout-only — width, margin in dashboard grids. */
|
|
17
20
|
export type ChartLayoutClassName = string;
|
|
@@ -45,6 +48,7 @@ declare function ChartSegmentedBar({ value, max, tone, fill, segments, preset, l
|
|
|
45
48
|
export declare const Chart: typeof ChartFrameRoot & {
|
|
46
49
|
Frame: typeof ChartFrameRoot;
|
|
47
50
|
SegmentedBar: typeof ChartSegmentedBar;
|
|
51
|
+
SegmentedRing: typeof ChartSegmentedRing;
|
|
48
52
|
RankedBars: typeof ChartRankedBars;
|
|
49
53
|
UnitGrid: typeof ChartUnitGrid;
|
|
50
54
|
DistributionStrip: typeof ChartDistributionStrip;
|
|
@@ -67,7 +71,7 @@ export { ChartCartesian, ChartCartesianAreaSeries, ChartCartesianAxisBottom, Cha
|
|
|
67
71
|
export type { ChartCartesianDefinedSegment, ChartCartesianGapBand, ChartCartesianGapMode, ChartCartesianGapRange, ChartCartesianGapRun, ChartCartesianNoDataOptions, ChartCartesianNoDataProp, ChartCartesianPoint, ChartCartesianProps, } from "./ChartCartesian";
|
|
68
72
|
export { ChartLoading, ChartLegend, ChartRankedBars, ChartUnitGrid, ChartDistributionStrip, ChartHeatmap, ChartTooltipContent };
|
|
69
73
|
export type { ChartLoadingLayoutClassName, ChartLoadingProps } from "./ChartLoading";
|
|
70
|
-
export type { ChartLegendProps, ChartLegendLayoutClassName } from "./ChartLegend";
|
|
74
|
+
export type { ChartLegendProps, ChartLegendLayoutClassName, ChartLegendVariant } from "./ChartLegend";
|
|
71
75
|
export type { ChartRankedBarItem, ChartRankedBarsAnimate, ChartRankedBarsLayoutClassName, ChartRankedBarsProps, } from "./ChartRankedBars";
|
|
72
76
|
export type { ChartUnitGridLayoutClassName, ChartUnitGridPart, ChartUnitGridProps, } from "./ChartUnitGrid";
|
|
73
77
|
export type { ChartDistributionItem, ChartDistributionReference, ChartDistributionStripLayoutClassName, ChartDistributionStripProps, } from "./ChartDistributionStrip";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Chart/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoF,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9I,OAAO,EAOL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAEL,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ACV,oBAAoB,EACpB,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,wBAAwB,EACxB,kCAAkC,GACnC,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { chartFormatPercent as t, chartMaxTicksForWidth as n, chartSegmentBarWidth as r, chartSegmentFillVariants as i, chartSegmentPosition as a, chartSegmentPresets as o, chartSegmentTickSpec as s, chartStroke as c, chartUiTokens as l, resolveCapacityBarLayout as u, resolveSegmentBarConfig as d } from "../../../lib/chartTheme.js";
|
|
4
|
-
import { chartFrameClasses as f, chartKpiHeroRowClasses as p, chartKpiHeroValueClasses as m, chartKpiTrendLabelClasses as h, chartKpiTrendRowClasses as g, chartKpiTrendValueClasses as _,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
4
|
+
import { chartFrameClasses as f, chartKpiHeroRowClasses as p, chartKpiHeroValueClasses as m, chartKpiTrendLabelClasses as h, chartKpiTrendRowClasses as g, chartKpiTrendValueClasses as _, chartSegmentBarFallbackClasses as v, chartSegmentBarFallbackTickClasses as y, chartSegmentBarHostClasses as b } from "./chartStyles.js";
|
|
5
|
+
import { chartSegmentedBarSpringConfig as x } from "./chartSegmentedBarMotion.js";
|
|
6
|
+
import { ChartSegmentedRing as S, chartSegmentedRingSegmentDefault as C, chartSegmentedRingSizes as w } from "./ChartSegmentedRing.js";
|
|
7
|
+
import { ChartLegend as T } from "./ChartLegend.js";
|
|
8
|
+
import { ChartTooltipContent as E } from "./ChartTooltipContent.js";
|
|
9
|
+
import { ChartLoading as D } from "./ChartLoading.js";
|
|
10
|
+
import { ChartRankedBars as O } from "./ChartRankedBars.js";
|
|
11
|
+
import { ChartUnitGrid as k } from "./ChartUnitGrid.js";
|
|
12
|
+
import { ChartDistributionStrip as A } from "./ChartDistributionStrip.js";
|
|
13
|
+
import { ChartHeatmap as j } from "./ChartHeatmap.js";
|
|
14
|
+
import { chartCartesianDefinedSegments as M, chartCartesianGapBands as N, chartCartesianGapRuns as P, chartCartesianHasPlottableValues as ee, chartCartesianNoDataLabelDefault as te, isChartCartesianNumber as ne, isChartCartesianSeriesDefined as re, resolveChartCartesianGapKeys as F, resolveChartCartesianNoData as I } from "./chartCartesianGaps.js";
|
|
15
|
+
import { ChartCartesian as L, ChartCartesianAreaSeries as R, ChartCartesianAxisBottom as z, ChartCartesianAxisLeft as B, ChartCartesianGrid as V, ChartCartesianNoData as H, ChartCartesianTooltipLayer as U } from "./ChartCartesian.js";
|
|
16
|
+
import { useEffect as W, useId as G, useLayoutEffect as K, useMemo as q, useRef as J, useState as Y } from "react";
|
|
17
|
+
import { Fragment as ie, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
18
|
+
import { useMotionValueEvent as ae, useReducedMotion as oe, useSpring as se } from "motion/react";
|
|
19
|
+
import { Group as ce } from "@visx/group";
|
|
19
20
|
//#region src/components/organisms/Chart/Chart.tsx
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
function Q({ children: t, segmentHeight: n = o.default.height, className: r, style: i, ...a }) {
|
|
22
|
+
return /* @__PURE__ */ X("div", {
|
|
22
23
|
className: e(f, r),
|
|
23
24
|
style: {
|
|
24
25
|
...i,
|
|
@@ -28,15 +29,15 @@ function $({ children: t, segmentHeight: n = o.default.height, className: r, sty
|
|
|
28
29
|
children: t
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function le({ isFilled: e, usesBarGradient: t, gradientId: n, fillColor: r, trackColor: i }) {
|
|
32
33
|
return e && t ? `url(#${n})` : e ? r : i;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function $({ width: e, value: t, max: n, tone: r = "primary", fill: o = "solid", segments: s, preset: d = "default", label: f, gradientId: p, fillProgress: m }) {
|
|
35
36
|
let { config: h, displayCount: g, tickWidth: _, gap: v, barWidth: y } = u(e, {
|
|
36
37
|
preset: d,
|
|
37
38
|
segments: s
|
|
38
|
-
}), b = h.height, x = h.segmentRadius, S = n > 0 ? n : 1, C = Math.min(Math.max(t, 0), S), w = `${Math.round(C / S * 100)}%`, T = f ?? `${w} of capacity`, E = Math.min(g, Math.max(0, Math.round(m * g))), D = Math.round(m * C), O =
|
|
39
|
-
return e <= 0 ? null : /* @__PURE__ */
|
|
39
|
+
}), b = h.height, x = h.segmentRadius, S = n > 0 ? n : 1, C = Math.min(Math.max(t, 0), S), w = `${Math.round(C / S * 100)}%`, T = f ?? `${w} of capacity`, E = Math.min(g, Math.max(0, Math.round(m * g))), D = Math.round(m * C), O = q(() => Array.from({ length: g }, (e, t) => t), [g]), k = c(r), A = l.placeholder, j = o === "velocity" || o === "semantic";
|
|
40
|
+
return e <= 0 ? null : /* @__PURE__ */ Z("svg", {
|
|
40
41
|
width: y,
|
|
41
42
|
height: b,
|
|
42
43
|
role: "meter",
|
|
@@ -45,35 +46,35 @@ function ie({ width: e, value: t, max: n, tone: r = "primary", fill: o = "solid"
|
|
|
45
46
|
"aria-valuemin": 0,
|
|
46
47
|
"aria-valuemax": S,
|
|
47
48
|
className: "block w-full max-w-full",
|
|
48
|
-
children: [j ? /* @__PURE__ */
|
|
49
|
+
children: [j ? /* @__PURE__ */ X("defs", { children: /* @__PURE__ */ X("linearGradient", {
|
|
49
50
|
id: p,
|
|
50
51
|
x1: 0,
|
|
51
52
|
x2: y,
|
|
52
53
|
y1: 0,
|
|
53
54
|
y2: 0,
|
|
54
55
|
gradientUnits: "userSpaceOnUse",
|
|
55
|
-
children: o === "velocity" ? /* @__PURE__ */
|
|
56
|
+
children: o === "velocity" ? /* @__PURE__ */ Z(ie, { children: [/* @__PURE__ */ X("stop", {
|
|
56
57
|
offset: "0%",
|
|
57
58
|
stopColor: k,
|
|
58
59
|
stopOpacity: i.velocity.startOpacity
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ X("stop", {
|
|
60
61
|
offset: "100%",
|
|
61
62
|
stopColor: k,
|
|
62
63
|
stopOpacity: i.velocity.endOpacity
|
|
63
|
-
})] }) : i.semantic.stops.map((e) => /* @__PURE__ */
|
|
64
|
+
})] }) : i.semantic.stops.map((e) => /* @__PURE__ */ X("stop", {
|
|
64
65
|
offset: `${e.offset * 100}%`,
|
|
65
66
|
stopColor: e.color
|
|
66
67
|
}, e.offset))
|
|
67
|
-
}) }) : null, /* @__PURE__ */
|
|
68
|
+
}) }) : null, /* @__PURE__ */ X(ce, { children: O.map((e) => {
|
|
68
69
|
let t = a(e, _, v);
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ X("rect", {
|
|
70
71
|
x: t,
|
|
71
72
|
y: 0,
|
|
72
73
|
width: _,
|
|
73
74
|
height: b,
|
|
74
75
|
rx: x,
|
|
75
76
|
ry: x,
|
|
76
|
-
fill:
|
|
77
|
+
fill: le({
|
|
77
78
|
isFilled: e < E,
|
|
78
79
|
usesBarGradient: j,
|
|
79
80
|
gradientId: p,
|
|
@@ -84,9 +85,63 @@ function ie({ width: e, value: t, max: n, tone: r = "primary", fill: o = "solid"
|
|
|
84
85
|
}) })]
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
let
|
|
89
|
-
return
|
|
88
|
+
function ue(e, t) {
|
|
89
|
+
let n = o[t];
|
|
90
|
+
return e ?? ("segments" in n ? n.segments : void 0) ?? o.default.segments;
|
|
91
|
+
}
|
|
92
|
+
function de(e, t, n, r, a) {
|
|
93
|
+
if (e >= n) return {
|
|
94
|
+
color: l.placeholder,
|
|
95
|
+
opacity: 1
|
|
96
|
+
};
|
|
97
|
+
if (a === "semantic") {
|
|
98
|
+
let n = t <= 1 ? 1 : e / (t - 1), r = i.semantic.stops, a = r[0].color;
|
|
99
|
+
for (let e of r) n + .001 >= e.offset && (a = e.color);
|
|
100
|
+
return {
|
|
101
|
+
color: a,
|
|
102
|
+
opacity: 1
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (a === "velocity") {
|
|
106
|
+
let n = t <= 1 ? 0 : e / (t - 1), { startOpacity: a, endOpacity: o } = i.velocity;
|
|
107
|
+
return {
|
|
108
|
+
color: c(r),
|
|
109
|
+
opacity: a + (o - a) * n
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
color: c(r),
|
|
114
|
+
opacity: 1
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function fe({ value: e, max: t, tone: n = "primary", fill: r = "solid", segments: i, preset: a = "default", label: o }) {
|
|
118
|
+
let s = ue(i, a), c = t > 0 ? t : 1, l = Math.min(Math.max(Number.isFinite(e) ? e : 0, 0), c), u = Math.round(l / c * s), d = `${Math.round(l / c * 100)}%`, f = o ?? `${d} of capacity`;
|
|
119
|
+
return /* @__PURE__ */ X("div", {
|
|
120
|
+
role: "meter",
|
|
121
|
+
"aria-label": f,
|
|
122
|
+
"aria-valuenow": Math.round(l),
|
|
123
|
+
"aria-valuemin": 0,
|
|
124
|
+
"aria-valuemax": c,
|
|
125
|
+
"aria-valuetext": d,
|
|
126
|
+
"data-chart-segment-fallback": "",
|
|
127
|
+
className: v,
|
|
128
|
+
children: Array.from({ length: s }, (e, t) => {
|
|
129
|
+
let i = de(t, s, u, n, r);
|
|
130
|
+
return /* @__PURE__ */ X("span", {
|
|
131
|
+
"data-segment": "",
|
|
132
|
+
"data-filled": t < u ? "true" : "false",
|
|
133
|
+
className: y,
|
|
134
|
+
style: {
|
|
135
|
+
backgroundColor: i.color,
|
|
136
|
+
opacity: i.opacity
|
|
137
|
+
}
|
|
138
|
+
}, t);
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function pe() {
|
|
143
|
+
let e = J(null), [t, n] = Y(0);
|
|
144
|
+
return K(() => {
|
|
90
145
|
let t = e.current;
|
|
91
146
|
if (!t) return;
|
|
92
147
|
let r = () => {
|
|
@@ -100,22 +155,22 @@ function ae() {
|
|
|
100
155
|
width: t
|
|
101
156
|
};
|
|
102
157
|
}
|
|
103
|
-
function
|
|
104
|
-
let { hostRef: d, width: f } =
|
|
158
|
+
function me({ value: t, max: n, tone: r = "primary", fill: i = "solid", segments: a, preset: o = "default", label: s, animate: c = "initial", className: l }) {
|
|
159
|
+
let { hostRef: d, width: f } = pe(), p = G().replace(/:/g, ""), m = u(f, {
|
|
105
160
|
preset: o,
|
|
106
161
|
segments: a
|
|
107
|
-
}).config.height, h =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, [
|
|
111
|
-
|
|
162
|
+
}).config.height, h = oe(), g = c === "initial" && !h, _ = n > 0 ? n : 1, v = Math.min(Math.max(t, 0), _) / _, y = se(g ? 0 : v, x), [S, C] = Y(g ? 0 : v);
|
|
163
|
+
W(() => {
|
|
164
|
+
y.set(v);
|
|
165
|
+
}, [y, v]), ae(y, "change", (e) => {
|
|
166
|
+
C(e);
|
|
112
167
|
});
|
|
113
|
-
let
|
|
114
|
-
return /* @__PURE__ */
|
|
168
|
+
let w = h ? v : S;
|
|
169
|
+
return /* @__PURE__ */ X("div", {
|
|
115
170
|
ref: d,
|
|
116
|
-
className: e(
|
|
171
|
+
className: e(b, l),
|
|
117
172
|
style: { "--chart-segment-height": `${m}px` },
|
|
118
|
-
children: f > 0 ? /* @__PURE__ */
|
|
173
|
+
children: f > 0 ? /* @__PURE__ */ X($, {
|
|
119
174
|
width: f,
|
|
120
175
|
value: t,
|
|
121
176
|
max: n,
|
|
@@ -125,28 +180,37 @@ function oe({ value: t, max: n, tone: r = "primary", fill: i = "solid", segments
|
|
|
125
180
|
preset: o,
|
|
126
181
|
label: s,
|
|
127
182
|
gradientId: p,
|
|
128
|
-
fillProgress:
|
|
129
|
-
}) :
|
|
183
|
+
fillProgress: w
|
|
184
|
+
}) : /* @__PURE__ */ X(fe, {
|
|
185
|
+
value: t,
|
|
186
|
+
max: n,
|
|
187
|
+
tone: r,
|
|
188
|
+
fill: i,
|
|
189
|
+
segments: a,
|
|
190
|
+
preset: o,
|
|
191
|
+
label: s
|
|
192
|
+
})
|
|
130
193
|
});
|
|
131
194
|
}
|
|
132
|
-
var
|
|
133
|
-
Frame:
|
|
134
|
-
SegmentedBar:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
195
|
+
var he = Object.assign(Q, {
|
|
196
|
+
Frame: Q,
|
|
197
|
+
SegmentedBar: me,
|
|
198
|
+
SegmentedRing: S,
|
|
199
|
+
RankedBars: O,
|
|
200
|
+
UnitGrid: k,
|
|
201
|
+
DistributionStrip: A,
|
|
202
|
+
Heatmap: j,
|
|
203
|
+
Loading: D,
|
|
204
|
+
Cartesian: Object.assign(L, {
|
|
205
|
+
Grid: V,
|
|
206
|
+
AxisBottom: z,
|
|
207
|
+
AxisLeft: B,
|
|
208
|
+
NoData: H,
|
|
209
|
+
Area: R,
|
|
210
|
+
Tooltip: U
|
|
147
211
|
}),
|
|
148
|
-
Legend:
|
|
149
|
-
Tooltip: { Content:
|
|
212
|
+
Legend: T,
|
|
213
|
+
Tooltip: { Content: E }
|
|
150
214
|
});
|
|
151
215
|
//#endregion
|
|
152
|
-
export {
|
|
216
|
+
export { he as Chart, L as ChartCartesian, H as ChartCartesianNoData, A as ChartDistributionStrip, j as ChartHeatmap, T as ChartLegend, D as ChartLoading, O as ChartRankedBars, E as ChartTooltipContent, k as ChartUnitGrid, M as chartCartesianDefinedSegments, N as chartCartesianGapBands, P as chartCartesianGapRuns, ee as chartCartesianHasPlottableValues, te as chartCartesianNoDataLabelDefault, t as chartFormatPercent, p as chartKpiHeroRowClasses, m as chartKpiHeroValueClasses, h as chartKpiTrendLabelClasses, g as chartKpiTrendRowClasses, _ as chartKpiTrendValueClasses, n as chartMaxTicksForWidth, r as chartSegmentBarWidth, i as chartSegmentFillVariants, o as chartSegmentPresets, s as chartSegmentTickSpec, C as chartSegmentedRingSegmentDefault, w as chartSegmentedRingSizes, ne as isChartCartesianNumber, re as isChartCartesianSeriesDefined, u as resolveCapacityBarLayout, F as resolveChartCartesianGapKeys, I as resolveChartCartesianNoData, d as resolveSegmentBarConfig };
|
|
@@ -2,12 +2,19 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
import type { ChartSeriesConfig } from "../../../lib/chartTheme";
|
|
3
3
|
/** Layout-only — margin in Card.Body below plot. */
|
|
4
4
|
export type ChartLegendLayoutClassName = string;
|
|
5
|
+
export declare const chartLegendVariants: readonly ["series", "tabular"];
|
|
6
|
+
export type ChartLegendVariant = (typeof chartLegendVariants)[number];
|
|
5
7
|
export interface ChartLegendProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
8
|
config: ChartSeriesConfig;
|
|
7
9
|
/** Subset and order — defaults to Object.keys(config). */
|
|
8
10
|
keys?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* `series` — swatch and label (Cartesian, unit grid).
|
|
13
|
+
* `tabular` — swatch, label, mono value, percent, delta.
|
|
14
|
+
*/
|
|
15
|
+
variant?: ChartLegendVariant;
|
|
9
16
|
className?: ChartLegendLayoutClassName;
|
|
10
17
|
}
|
|
11
18
|
/** Series key row — same config as **Chart.Tooltip.Content** (ADR-0015). */
|
|
12
|
-
export declare function ChartLegend({ config, keys, className, ...props }: ChartLegendProps): import("react").JSX.Element;
|
|
19
|
+
export declare function ChartLegend({ config, keys, variant, className, ...props }: ChartLegendProps): import("react").JSX.Element;
|
|
13
20
|
//# sourceMappingURL=ChartLegend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Chart/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Chart/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AAezF,oDAAoD;AACpD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEhD,eAAO,MAAM,mBAAmB,gCAAiC,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAMD,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,IAAI,EACJ,OAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA6ClB"}
|
|
@@ -1,24 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import { chartLegendClasses as t, chartLegendItemClasses as n, chartLegendLabelClasses as r, chartLegendSwatchClasses as i } from "./chartStyles.js";
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { chartLegendClasses as t, chartLegendItemClasses as n, chartLegendLabelClasses as r, chartLegendSwatchClasses as i, chartLegendTabularClasses as a, chartLegendTabularDeltaClasses as o, chartLegendTabularItemClasses as s, chartLegendTabularLabelClasses as c, chartLegendTabularPercentClasses as l, chartLegendTabularValueClasses as u } from "./chartStyles.js";
|
|
4
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/organisms/Chart/ChartLegend.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
var p = ["series", "tabular"];
|
|
7
|
+
function m(e) {
|
|
8
|
+
return o[e?.direction ?? "flat"];
|
|
9
|
+
}
|
|
10
|
+
function h({ config: o, keys: p, variant: h = "series", className: g, ..._ }) {
|
|
11
|
+
let v = p ?? Object.keys(o), y = h === "tabular";
|
|
12
|
+
return /* @__PURE__ */ d("div", {
|
|
13
|
+
..._,
|
|
14
|
+
className: e(y ? a : t, g),
|
|
11
15
|
role: "list",
|
|
12
|
-
children:
|
|
13
|
-
let t =
|
|
14
|
-
return t == null ? null : /* @__PURE__ */
|
|
16
|
+
children: v.map((e) => {
|
|
17
|
+
let t = o[e];
|
|
18
|
+
return t == null ? null : y ? /* @__PURE__ */ f("div", {
|
|
19
|
+
className: s,
|
|
20
|
+
role: "listitem",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ d("span", {
|
|
23
|
+
className: i,
|
|
24
|
+
style: { backgroundColor: t.color },
|
|
25
|
+
"aria-hidden": !0
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ d("span", {
|
|
28
|
+
className: c,
|
|
29
|
+
children: t.label
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ d("span", {
|
|
32
|
+
className: u,
|
|
33
|
+
children: t.value
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ d("span", {
|
|
36
|
+
className: l,
|
|
37
|
+
children: t.percent
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ d("span", {
|
|
40
|
+
className: m(t.delta),
|
|
41
|
+
children: t.delta?.label
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}, e) : /* @__PURE__ */ f("div", {
|
|
15
45
|
className: n,
|
|
16
46
|
role: "listitem",
|
|
17
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ d("span", {
|
|
18
48
|
className: i,
|
|
19
49
|
style: { backgroundColor: t.color },
|
|
20
50
|
"aria-hidden": !0
|
|
21
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ d("span", {
|
|
22
52
|
className: r,
|
|
23
53
|
children: t.label
|
|
24
54
|
})]
|
|
@@ -27,4 +57,4 @@ function s({ config: s, keys: c, className: l, ...u }) {
|
|
|
27
57
|
});
|
|
28
58
|
}
|
|
29
59
|
//#endregion
|
|
30
|
-
export {
|
|
60
|
+
export { h as ChartLegend, p as chartLegendVariants };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ChartTone } from "../../../lib/chartTheme";
|
|
3
|
+
import { type ChartSegmentedBarAnimate } from "./chartSegmentedBarMotion";
|
|
4
|
+
/** Discrete ticks around the ring. Channels uses a fine meter; 72 keeps the gaps visible. */
|
|
5
|
+
export declare const chartSegmentedRingSegmentDefault = 72;
|
|
6
|
+
export declare const chartSegmentedRingSizes: readonly ["sm", "md", "lg"];
|
|
7
|
+
export type ChartSegmentedRingSize = (typeof chartSegmentedRingSizes)[number];
|
|
8
|
+
/** Replaces the center figure when the source is unwired. The track stays empty. */
|
|
9
|
+
export interface ChartSegmentedRingUnavailable {
|
|
10
|
+
/** Defaults to "Not connected". */
|
|
11
|
+
label?: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ChartSegmentedRingProps {
|
|
15
|
+
/** Filled amount. Values above `max` clamp the arc and mark overflow. */
|
|
16
|
+
value: number;
|
|
17
|
+
/** Capacity. `0` is treated as 1 so the meter stays determinate. */
|
|
18
|
+
max: number;
|
|
19
|
+
/** Tick count. Default 72. */
|
|
20
|
+
segments?: number;
|
|
21
|
+
/** Semantic fill for filled ticks. */
|
|
22
|
+
tone?: ChartTone;
|
|
23
|
+
/** Figure in the hole — tabular. Hidden while `unavailable`. */
|
|
24
|
+
centerValue?: ReactNode;
|
|
25
|
+
/** Caption under `centerValue`. */
|
|
26
|
+
centerLabel?: ReactNode;
|
|
27
|
+
/** sm 96px, md 160px, lg 192px. */
|
|
28
|
+
size?: ChartSegmentedRingSize;
|
|
29
|
+
/** `initial` sweeps from empty on mount. Reduced motion stays on the final fill. */
|
|
30
|
+
animate?: ChartSegmentedBarAnimate;
|
|
31
|
+
/** Accessible name. Defaults to the percent of capacity. */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** Source not wired — empty track, muted label and reason in the hole. */
|
|
34
|
+
unavailable?: ChartSegmentedRingUnavailable;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function chartSegmentedRingModel(value: number, max: number, segments: number): {
|
|
38
|
+
count: number;
|
|
39
|
+
safeMax: number;
|
|
40
|
+
safeValue: number;
|
|
41
|
+
overflow: boolean;
|
|
42
|
+
clamped: number;
|
|
43
|
+
progress: number;
|
|
44
|
+
};
|
|
45
|
+
/** One tick as a wedge in a 100×100 viewBox, gap included, starting at 12 o'clock. */
|
|
46
|
+
export declare function chartSegmentedRingTickPath(index: number, count: number): string;
|
|
47
|
+
/**
|
|
48
|
+
* Segmented radial meter. A fixed viewBox, so the server HTML already has the ticks —
|
|
49
|
+
* unlike **Chart.SegmentedBar**, which measures the host.
|
|
50
|
+
*/
|
|
51
|
+
export declare function ChartSegmentedRing({ value, max, segments, tone, centerValue, centerLabel, size, animate, label, unavailable, className, }: ChartSegmentedRingProps): import("react").JSX.Element;
|
|
52
|
+
//# sourceMappingURL=ChartSegmentedRing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartSegmentedRing.d.ts","sourceRoot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sFAAsF;AACtF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB/E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,GAAG,EACH,QAA2C,EAC3C,IAAgB,EAChB,WAAW,EACX,WAAW,EACX,IAAW,EACX,OAAmB,EACnB,KAAK,EACL,WAAW,EACX,SAAS,GACV,EAAE,uBAAuB,+BA6FzB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
import { chartStroke as t, chartUiTokens as n } from "../../../lib/chartTheme.js";
|
|
4
|
+
import { chartSegmentedRingCenterClasses as r, chartSegmentedRingFrameClasses as i, chartSegmentedRingLabelClasses as a, chartSegmentedRingOverflowClasses as o, chartSegmentedRingSizeClasses as s, chartSegmentedRingUnavailableLabelClasses as c, chartSegmentedRingUnavailableReasonClasses as l, chartSegmentedRingValueClasses as u } from "./chartStyles.js";
|
|
5
|
+
import { chartSegmentedBarSpringConfig as d } from "./chartSegmentedBarMotion.js";
|
|
6
|
+
import { useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
7
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
|
+
import { useMotionValueEvent as y, useReducedMotion as b, useSpring as x } from "motion/react";
|
|
9
|
+
//#region src/components/organisms/Chart/ChartSegmentedRing.tsx
|
|
10
|
+
var S = 72, C = [
|
|
11
|
+
"sm",
|
|
12
|
+
"md",
|
|
13
|
+
"lg"
|
|
14
|
+
];
|
|
15
|
+
function w(e, t, n) {
|
|
16
|
+
let r = Math.max(1, Math.round(n)), i = t > 0 ? t : 1, a = Number.isFinite(e) ? e : 0, o = a > i, s = Math.min(Math.max(a, 0), i);
|
|
17
|
+
return {
|
|
18
|
+
count: r,
|
|
19
|
+
safeMax: i,
|
|
20
|
+
safeValue: a,
|
|
21
|
+
overflow: o,
|
|
22
|
+
clamped: s,
|
|
23
|
+
progress: s / i
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function T(e, t) {
|
|
27
|
+
let n = Math.PI * 2 / t, r = Math.min(n * .32, .08), i = -Math.PI / 2 + e * n + r / 2, a = -Math.PI / 2 + (e + 1) * n - r / 2, o = (e, t) => `${Math.round((50 + e * Math.cos(t)) * 1e3) / 1e3} ${Math.round((50 + e * Math.sin(t)) * 1e3) / 1e3}`, s = +(a - i > Math.PI);
|
|
28
|
+
return `M ${o(46, i)} A 46 46 0 ${s} 1 ${o(46, a)} L ${o(34, a)} A 34 34 0 ${s} 0 ${o(34, i)} Z`;
|
|
29
|
+
}
|
|
30
|
+
function E({ value: S, max: C, segments: E = 72, tone: D = "primary", centerValue: O, centerLabel: k, size: A = "md", animate: j = "initial", label: M, unavailable: N, className: P }) {
|
|
31
|
+
let F = w(S, C, E), I = b(), [L, R] = h(N ? 0 : F.progress), z = x(N ? 0 : F.progress, d), B = m(!1);
|
|
32
|
+
f(() => {
|
|
33
|
+
let e = N ? 0 : F.progress;
|
|
34
|
+
if (!B.current && (B.current = !0, j === "initial" && !I && !N)) {
|
|
35
|
+
z.jump(0), R(0), z.set(e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
z.jump(e), R(e);
|
|
39
|
+
}, [
|
|
40
|
+
j,
|
|
41
|
+
F.progress,
|
|
42
|
+
I,
|
|
43
|
+
z,
|
|
44
|
+
N
|
|
45
|
+
]), y(z, "change", (e) => {
|
|
46
|
+
R(e);
|
|
47
|
+
});
|
|
48
|
+
let V = N ? 0 : Math.round(Math.min(Math.max(L, 0), 1) * F.count), H = p(() => Array.from({ length: F.count }, (e, t) => T(t, F.count)), [F.count]), U = t(D), W = n.placeholder, G = Math.round((N ? 0 : F.clamped / F.safeMax) * 100), K = Math.round(F.safeValue / F.safeMax * 100), q = N?.label ?? "Not connected", J = N ? `${q}. ${N.reason}` : M ?? `${G}% of capacity`, Y = N ? J : F.overflow ? `${K}% of capacity, over capacity` : `${G}% of capacity`;
|
|
49
|
+
return /* @__PURE__ */ v("div", {
|
|
50
|
+
className: e(i, s[A], P),
|
|
51
|
+
"data-size": A,
|
|
52
|
+
"data-overflow": F.overflow && !N ? "" : void 0,
|
|
53
|
+
"data-state": N ? "unavailable" : void 0,
|
|
54
|
+
children: [/* @__PURE__ */ _("svg", {
|
|
55
|
+
viewBox: "0 0 100 100",
|
|
56
|
+
role: "meter",
|
|
57
|
+
"aria-label": J,
|
|
58
|
+
"aria-valuetext": Y,
|
|
59
|
+
"aria-valuenow": N ? 0 : Math.round(F.clamped),
|
|
60
|
+
"aria-valuemin": 0,
|
|
61
|
+
"aria-valuemax": F.safeMax,
|
|
62
|
+
"data-filled": V,
|
|
63
|
+
className: "block size-full",
|
|
64
|
+
children: H.map((e, t) => /* @__PURE__ */ _("path", {
|
|
65
|
+
d: e,
|
|
66
|
+
"data-filled": t < V ? "true" : "false",
|
|
67
|
+
fill: t < V ? U : W
|
|
68
|
+
}, t))
|
|
69
|
+
}), /* @__PURE__ */ _("div", {
|
|
70
|
+
className: r,
|
|
71
|
+
children: N ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("p", {
|
|
72
|
+
className: c,
|
|
73
|
+
children: q
|
|
74
|
+
}), /* @__PURE__ */ _("p", {
|
|
75
|
+
className: l,
|
|
76
|
+
children: N.reason
|
|
77
|
+
})] }) : /* @__PURE__ */ v(g, { children: [
|
|
78
|
+
O == null ? null : /* @__PURE__ */ _("p", {
|
|
79
|
+
className: u[A],
|
|
80
|
+
children: O
|
|
81
|
+
}),
|
|
82
|
+
k == null ? null : /* @__PURE__ */ _("p", {
|
|
83
|
+
className: a,
|
|
84
|
+
children: k
|
|
85
|
+
}),
|
|
86
|
+
F.overflow ? /* @__PURE__ */ _("p", {
|
|
87
|
+
className: o,
|
|
88
|
+
children: "Over capacity"
|
|
89
|
+
}) : null
|
|
90
|
+
] })
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { E as ChartSegmentedRing, w as chartSegmentedRingModel, S as chartSegmentedRingSegmentDefault, C as chartSegmentedRingSizes, T as chartSegmentedRingTickPath };
|
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
export declare const chartFrameClasses = "relative w-full";
|
|
3
3
|
/** Segmented bar — fixed tick height; width comes from layout. */
|
|
4
4
|
export declare const chartSegmentBarHostClasses = "relative block w-full min-w-0 [height:var(--chart-segment-height,2rem)]";
|
|
5
|
+
/** CSS ticks drawn before the host has a width (SSR and the first paint). */
|
|
6
|
+
export declare const chartSegmentBarFallbackClasses = "flex h-full w-full items-stretch gap-px";
|
|
7
|
+
export declare const chartSegmentBarFallbackTickClasses = "min-w-0 flex-1 rounded-[2px]";
|
|
8
|
+
/** Segmented ring — fixed box, ticks in a 100×100 viewBox. sm 96 / md 160 / lg 192. */
|
|
9
|
+
export declare const chartSegmentedRingFrameClasses = "relative inline-flex shrink-0 flex-col items-center";
|
|
10
|
+
export declare const chartSegmentedRingSizeClasses: {
|
|
11
|
+
readonly sm: "size-24";
|
|
12
|
+
readonly md: "size-40";
|
|
13
|
+
readonly lg: "size-48";
|
|
14
|
+
};
|
|
15
|
+
export declare const chartSegmentedRingCenterClasses = "pointer-events-none absolute inset-0 flex flex-col items-center justify-center px-[16%] text-center";
|
|
16
|
+
export declare const chartSegmentedRingValueClasses: {
|
|
17
|
+
readonly sm: `${string} tabular-nums`;
|
|
18
|
+
readonly md: `${string} tabular-nums`;
|
|
19
|
+
readonly lg: "type-display-3 tabular-nums tracking-tight text-fg";
|
|
20
|
+
};
|
|
21
|
+
export declare const chartSegmentedRingLabelClasses: string;
|
|
22
|
+
/** Muted on purpose — `typographyClass("ui-label")` includes `text-fg`, which would win. */
|
|
23
|
+
export declare const chartSegmentedRingUnavailableLabelClasses = "type-label text-muted";
|
|
24
|
+
export declare const chartSegmentedRingUnavailableReasonClasses: string;
|
|
25
|
+
export declare const chartSegmentedRingOverflowClasses = "type-caption text-destructive";
|
|
5
26
|
/** Ranked percentage breakdown — audience fit, locations, and demographics. */
|
|
6
27
|
export declare const chartRankedBarListClasses = "flex w-full min-w-0 flex-col gap-3";
|
|
7
28
|
export declare const chartRankedBarRowClasses = "flex min-w-0 flex-col gap-1.5";
|
|
@@ -77,6 +98,17 @@ export declare const chartLegendClasses = "flex flex-wrap items-center gap-x-4 g
|
|
|
77
98
|
export declare const chartLegendItemClasses = "flex items-center gap-2";
|
|
78
99
|
export declare const chartLegendSwatchClasses = "size-2 shrink-0 rounded-full";
|
|
79
100
|
export declare const chartLegendLabelClasses: string;
|
|
101
|
+
/** Tabular legend — swatch, label, mono value, percent, delta. One row per series. */
|
|
102
|
+
export declare const chartLegendTabularClasses = "flex w-full min-w-0 flex-col gap-2";
|
|
103
|
+
export declare const chartLegendTabularItemClasses = "grid grid-cols-[auto_minmax(0,1fr)_auto_auto_auto] items-baseline gap-x-3";
|
|
104
|
+
export declare const chartLegendTabularLabelClasses: string;
|
|
105
|
+
export declare const chartLegendTabularValueClasses = "text-right font-mono text-xs tabular-nums leading-none text-fg";
|
|
106
|
+
export declare const chartLegendTabularPercentClasses = "text-right font-mono text-xs tabular-nums leading-none text-muted";
|
|
107
|
+
export declare const chartLegendTabularDeltaClasses: {
|
|
108
|
+
readonly up: "text-right font-mono text-xs tabular-nums leading-none text-success";
|
|
109
|
+
readonly down: "text-right font-mono text-xs tabular-nums leading-none text-destructive";
|
|
110
|
+
readonly flat: "text-right font-mono text-xs tabular-nums leading-none text-muted";
|
|
111
|
+
};
|
|
80
112
|
/** @deprecated Use chartTooltipPanelClasses — ADR-0015 rename. */
|
|
81
113
|
export declare const chartPeriodTooltipClasses: string;
|
|
82
114
|
/** @deprecated Use chartTooltipLabelClasses. */
|