@glyphui/ui 0.4.0 → 0.5.0
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/README.md +9 -6
- package/dist/chart.d.ts +14 -202
- package/dist/chart.js +14 -465
- package/dist/components/accordion/accordion.d.ts +15 -0
- package/dist/components/accordion/accordion.js +69 -0
- package/dist/components/accordion/accordion.styles.d.ts +65 -0
- package/dist/components/accordion/accordion.styles.js +30 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/alert/alert-icons.js +62 -0
- package/dist/components/alert/alert.d.ts +19 -0
- package/dist/components/alert/alert.js +64 -0
- package/dist/components/alert/alert.styles.d.ts +107 -0
- package/dist/components/alert/alert.styles.js +86 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +29 -0
- package/dist/components/alert-dialog/alert-dialog.js +89 -0
- package/dist/components/alert-dialog/alert-dialog.styles.d.ts +63 -0
- package/dist/components/alert-dialog/alert-dialog.styles.js +19 -0
- package/dist/components/alert-dialog/confirm-dialog.js +22 -0
- package/dist/components/alert-dialog/confirm.d.ts +30 -0
- package/dist/components/alert-dialog/confirm.js +62 -0
- package/dist/components/alert-dialog/index.d.ts +4 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +55 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +28 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/avatar/avatar.d.ts +13 -0
- package/dist/components/avatar/avatar.js +50 -0
- package/dist/components/avatar/avatar.styles.d.ts +77 -0
- package/dist/components/avatar/avatar.styles.js +32 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/badge/badge.d.ts +10 -0
- package/dist/components/badge/badge.js +28 -0
- package/dist/components/badge/badge.styles.d.ts +62 -0
- package/dist/components/badge/badge.styles.js +72 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/banner/banner.d.ts +17 -0
- package/dist/components/banner/banner.js +71 -0
- package/dist/components/banner/banner.styles.d.ts +98 -0
- package/dist/components/banner/banner.styles.js +27 -0
- package/dist/components/banner/index.d.ts +3 -0
- package/dist/components/blockquote/blockquote.d.ts +72 -0
- package/dist/components/blockquote/blockquote.js +47 -0
- package/dist/components/blockquote/index.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb.js +85 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +63 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +18 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/button/button.d.ts +20 -0
- package/dist/components/button/button.js +52 -0
- package/dist/components/button/button.styles.d.ts +146 -0
- package/dist/components/button/button.styles.js +64 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/calendar/calendar.d.ts +9 -0
- package/dist/components/calendar/calendar.js +75 -0
- package/dist/components/calendar/calendar.styles.d.ts +171 -0
- package/dist/components/calendar/calendar.styles.js +42 -0
- package/dist/components/calendar/index.d.ts +4 -0
- package/dist/components/card/card.d.ts +17 -0
- package/dist/components/card/card.js +79 -0
- package/dist/components/card/card.styles.d.ts +113 -0
- package/dist/components/card/card.styles.js +38 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/carousel/carousel.d.ts +37 -0
- package/dist/components/carousel/carousel.js +190 -0
- package/dist/components/carousel/carousel.styles.d.ts +74 -0
- package/dist/components/carousel/carousel.styles.js +35 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/checkbox/checkbox.d.ts +37 -0
- package/dist/components/checkbox/checkbox.js +44 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/code/code.d.ts +18 -0
- package/dist/components/code/code.js +75 -0
- package/dist/components/code/code.styles.d.ts +76 -0
- package/dist/components/code/code.styles.js +18 -0
- package/dist/components/code/index.d.ts +3 -0
- package/dist/components/collapsible/collapsible.d.ts +56 -0
- package/dist/components/collapsible/collapsible.js +43 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/combobox/combobox.d.ts +50 -0
- package/dist/components/combobox/combobox.js +141 -0
- package/dist/components/combobox/combobox.styles.d.ts +110 -0
- package/dist/components/combobox/combobox.styles.js +42 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/command-menu/command-menu.d.ts +40 -0
- package/dist/components/command-menu/command-menu.js +148 -0
- package/dist/components/command-menu/command-menu.styles.d.ts +105 -0
- package/dist/components/command-menu/command-menu.styles.js +30 -0
- package/dist/components/command-menu/index.d.ts +3 -0
- package/dist/components/container/container.d.ts +34 -0
- package/dist/components/container/container.js +30 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/context-menu/context-menu.d.ts +34 -0
- package/dist/components/context-menu/context-menu.js +157 -0
- package/dist/components/context-menu/context-menu.styles.d.ts +135 -0
- package/dist/components/context-menu/context-menu.styles.js +14 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/copy-button/copy-button.d.ts +61 -0
- package/dist/components/copy-button/copy-button.js +79 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/date-picker/date-picker.d.ts +51 -0
- package/dist/components/date-picker/date-picker.js +235 -0
- package/dist/components/date-picker/date-picker.styles.d.ts +77 -0
- package/dist/components/date-picker/date-picker.styles.js +31 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/description-list/description-list.d.ts +15 -0
- package/dist/components/description-list/description-list.js +51 -0
- package/dist/components/description-list/description-list.styles.d.ts +74 -0
- package/dist/components/description-list/description-list.styles.js +35 -0
- package/dist/components/description-list/index.d.ts +3 -0
- package/dist/components/dialog/close-icon.js +22 -0
- package/dist/components/dialog/dialog.d.ts +21 -0
- package/dist/components/dialog/dialog.js +79 -0
- package/dist/components/dialog/dialog.styles.d.ts +83 -0
- package/dist/components/dialog/dialog.styles.js +34 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +34 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +160 -0
- package/dist/components/dropdown-menu/dropdown-menu.styles.d.ts +83 -0
- package/dist/components/dropdown-menu/dropdown-menu.styles.js +38 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/eyebrow/eyebrow.d.ts +9 -0
- package/dist/components/eyebrow/eyebrow.js +20 -0
- package/dist/components/eyebrow/eyebrow.styles.d.ts +38 -0
- package/dist/components/eyebrow/eyebrow.styles.js +13 -0
- package/dist/components/eyebrow/index.d.ts +3 -0
- package/dist/components/field/field-context.d.ts +25 -0
- package/dist/components/field/field-context.js +27 -0
- package/dist/components/field/field.d.ts +28 -0
- package/dist/{field-CVbywksE.js → components/field/field.js} +6 -35
- package/dist/components/field/field.styles.d.ts +53 -0
- package/dist/components/field/field.styles.js +22 -0
- package/dist/components/field/index.d.ts +4 -0
- package/dist/components/file-upload/file-upload.d.ts +52 -0
- package/dist/components/file-upload/file-upload.js +266 -0
- package/dist/components/file-upload/file-upload.styles.d.ts +123 -0
- package/dist/components/file-upload/file-upload.styles.js +32 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/grid/grid.d.ts +168 -0
- package/dist/components/grid/grid.js +126 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/heading/heading.d.ts +12 -0
- package/dist/components/heading/heading.js +28 -0
- package/dist/components/heading/heading.styles.d.ts +65 -0
- package/dist/components/heading/heading.styles.js +15 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/hover-card/hover-card.d.ts +43 -0
- package/dist/components/hover-card/hover-card.js +27 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/input.d.ts +13 -0
- package/dist/components/input/input.js +33 -0
- package/dist/components/input/input.styles.d.ts +55 -0
- package/dist/components/input/input.styles.js +33 -0
- package/dist/components/input-otp/index.d.ts +4 -0
- package/dist/components/input-otp/index.js +5 -0
- package/dist/components/input-otp/input-otp.d.ts +23 -0
- package/dist/components/input-otp/input-otp.js +86 -0
- package/dist/components/input-otp/input-otp.styles.d.ts +71 -0
- package/dist/components/input-otp/input-otp.styles.js +30 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/kbd.d.ts +30 -0
- package/dist/components/kbd/kbd.js +17 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/label.d.ts +31 -0
- package/dist/components/label/label.js +17 -0
- package/dist/components/link/index.d.ts +3 -0
- package/dist/components/link/link.d.ts +14 -0
- package/dist/components/link/link.js +57 -0
- package/dist/components/link/link.styles.d.ts +89 -0
- package/dist/components/link/link.styles.js +33 -0
- package/dist/components/modal/index.d.ts +3 -0
- package/dist/components/modal/modal.d.ts +33 -0
- package/dist/components/modal/modal.js +56 -0
- package/dist/components/modal/modal.styles.d.ts +61 -0
- package/dist/components/modal/modal.styles.js +14 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +37 -0
- package/dist/components/navigation-menu/navigation-menu.js +138 -0
- package/dist/components/navigation-menu/navigation-menu.styles.d.ts +111 -0
- package/dist/components/navigation-menu/navigation-menu.styles.js +39 -0
- package/dist/components/number-input/index.d.ts +3 -0
- package/dist/components/number-input/number-input.d.ts +30 -0
- package/dist/components/number-input/number-input.js +151 -0
- package/dist/components/number-input/number-input.styles.d.ts +68 -0
- package/dist/components/number-input/number-input.styles.js +35 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/pagination-range.d.ts +11 -0
- package/dist/components/pagination/pagination-range.js +42 -0
- package/dist/components/pagination/pagination.d.ts +18 -0
- package/dist/components/pagination/pagination.js +94 -0
- package/dist/components/pagination/pagination.styles.d.ts +65 -0
- package/dist/components/pagination/pagination.styles.js +35 -0
- package/dist/components/password-input/index.d.ts +3 -0
- package/dist/components/password-input/password-input.d.ts +20 -0
- package/dist/components/password-input/password-input.js +106 -0
- package/dist/components/password-input/password-input.styles.d.ts +66 -0
- package/dist/components/password-input/password-input.styles.js +21 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +52 -0
- package/dist/components/popover/popover.js +35 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/progress.d.ts +29 -0
- package/dist/components/progress/progress.js +108 -0
- package/dist/components/progress/progress.styles.d.ts +236 -0
- package/dist/components/progress/progress.styles.js +69 -0
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/prose.d.ts +90 -0
- package/dist/components/prose/prose.js +67 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/radio-group.d.ts +26 -0
- package/dist/components/radio-group/radio-group.js +102 -0
- package/dist/components/radio-group/radio-group.styles.d.ts +80 -0
- package/dist/components/radio-group/radio-group.styles.js +56 -0
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/resizable.d.ts +17 -0
- package/dist/components/resizable/resizable.js +81 -0
- package/dist/components/resizable/resizable.styles.d.ts +53 -0
- package/dist/components/resizable/resizable.styles.js +19 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +70 -0
- package/dist/components/scroll-area/scroll-area.js +70 -0
- package/dist/components/section/index.d.ts +2 -0
- package/dist/components/section/section.d.ts +52 -0
- package/dist/components/section/section.js +41 -0
- package/dist/components/segmented-control/index.d.ts +2 -0
- package/dist/components/segmented-control/segmented-control.d.ts +92 -0
- package/dist/components/segmented-control/segmented-control.js +86 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.d.ts +85 -0
- package/dist/components/select/select.js +81 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +40 -0
- package/dist/components/separator/separator.js +27 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/sheet.d.ts +20 -0
- package/dist/components/sheet/sheet.js +83 -0
- package/dist/components/sheet/sheet.styles.d.ts +101 -0
- package/dist/components/sheet/sheet.styles.js +62 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +30 -0
- package/dist/components/skeleton/skeleton.js +18 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/slider.d.ts +38 -0
- package/dist/components/slider/slider.js +68 -0
- package/dist/components/slider/slider.styles.d.ts +56 -0
- package/dist/components/slider/slider.styles.js +23 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/spinner.d.ts +9 -0
- package/dist/components/spinner/spinner.js +36 -0
- package/dist/components/spinner/spinner.styles.d.ts +53 -0
- package/dist/components/spinner/spinner.styles.js +18 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/stack.d.ts +109 -0
- package/dist/components/stack/stack.js +62 -0
- package/dist/components/stat-card/index.d.ts +3 -0
- package/dist/components/stat-card/stat-card.d.ts +22 -0
- package/dist/components/stat-card/stat-card.js +82 -0
- package/dist/components/stat-card/stat-card.styles.d.ts +83 -0
- package/dist/components/stat-card/stat-card.styles.js +16 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/stepper.d.ts +20 -0
- package/dist/components/stepper/stepper.js +100 -0
- package/dist/components/stepper/stepper.styles.d.ts +170 -0
- package/dist/components/stepper/stepper.styles.js +67 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.d.ts +51 -0
- package/dist/components/switch/switch.js +43 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.d.ts +78 -0
- package/dist/components/table/table.js +82 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +73 -0
- package/dist/components/tabs/tabs.js +103 -0
- package/dist/components/tag-input/index.d.ts +3 -0
- package/dist/components/tag-input/tag-input.d.ts +30 -0
- package/dist/components/tag-input/tag-input.js +149 -0
- package/dist/components/tag-input/tag-input.styles.d.ts +71 -0
- package/dist/components/tag-input/tag-input.styles.js +29 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/text.d.ts +9 -0
- package/dist/components/text/text.js +25 -0
- package/dist/components/text/text.styles.d.ts +188 -0
- package/dist/components/text/text.styles.js +36 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.d.ts +29 -0
- package/dist/components/textarea/textarea.js +23 -0
- package/dist/components/timeline/index.d.ts +3 -0
- package/dist/components/timeline/timeline.d.ts +28 -0
- package/dist/components/timeline/timeline.js +61 -0
- package/dist/components/timeline/timeline.styles.d.ts +110 -0
- package/dist/components/timeline/timeline.styles.js +30 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +119 -0
- package/dist/components/toast/toast.js +75 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/toggle.d.ts +20 -0
- package/dist/components/toggle/toggle.js +58 -0
- package/dist/components/toggle/toggle.styles.d.ts +80 -0
- package/dist/components/toggle/toggle.styles.js +34 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +39 -0
- package/dist/components/tooltip/tooltip.js +29 -0
- package/dist/components/tree-view/index.d.ts +3 -0
- package/dist/components/tree-view/tree-view.d.ts +31 -0
- package/dist/components/tree-view/tree-view.js +192 -0
- package/dist/components/tree-view/tree-view.styles.d.ts +59 -0
- package/dist/components/tree-view/tree-view.styles.js +32 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +10 -0
- package/dist/components/visually-hidden/visually-hidden.js +16 -0
- package/dist/data-table.d.ts +3 -110
- package/dist/data-table.js +2 -224
- package/dist/form.d.ts +2 -86
- package/dist/form.js +1 -108
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/use-component-config.d.ts +13 -0
- package/dist/hooks/use-component-config.js +22 -0
- package/dist/hooks/use-controllable-state.d.ts +9 -0
- package/dist/hooks/use-controllable-state.js +18 -0
- package/dist/hooks/use-media-query.d.ts +4 -0
- package/dist/hooks/use-media-query.js +13 -0
- package/dist/hooks/use-scrolled.d.ts +4 -0
- package/dist/hooks/use-scrolled.js +17 -0
- package/dist/index.d.ts +223 -6856
- package/dist/index.js +148 -6791
- package/dist/internal/dev.js +12 -0
- package/dist/internal/icons.js +91 -0
- package/dist/motion/active-indicator.d.ts +12 -0
- package/dist/motion/active-indicator.js +26 -0
- package/dist/motion/animated-number.d.ts +21 -0
- package/dist/motion/animated-number.js +88 -0
- package/dist/motion/features.js +10 -0
- package/dist/motion/index.d.ts +10 -0
- package/dist/motion/index.js +10 -0
- package/dist/motion/motion-root.js +48 -0
- package/dist/motion/page-transition.d.ts +16 -0
- package/dist/motion/page-transition.js +23 -0
- package/dist/motion/presence-list.js +46 -0
- package/dist/motion/presence.d.ts +11 -0
- package/dist/motion/presence.js +17 -0
- package/dist/motion/reveal.d.ts +18 -0
- package/dist/motion/reveal.js +37 -0
- package/dist/motion/stagger.d.ts +29 -0
- package/dist/motion/stagger.js +52 -0
- package/dist/motion/use-motion-settings.d.ts +25 -0
- package/dist/motion/use-motion-settings.js +47 -0
- package/dist/motion/use-reveal.d.ts +11 -0
- package/dist/motion/use-reveal.js +41 -0
- package/dist/patterns/app-shell/app-shell-context.d.ts +14 -0
- package/dist/patterns/app-shell/app-shell-context.js +16 -0
- package/dist/patterns/app-shell/app-shell.d.ts +21 -0
- package/dist/patterns/app-shell/app-shell.js +82 -0
- package/dist/patterns/app-shell/app-shell.styles.d.ts +302 -0
- package/dist/patterns/app-shell/app-shell.styles.js +106 -0
- package/dist/patterns/app-shell/index.d.ts +7 -0
- package/dist/patterns/app-shell/navbar.d.ts +29 -0
- package/dist/patterns/app-shell/navbar.js +116 -0
- package/dist/patterns/app-shell/page-header.d.ts +12 -0
- package/dist/patterns/app-shell/page-header.js +38 -0
- package/dist/patterns/app-shell/sidebar.d.ts +31 -0
- package/dist/patterns/app-shell/sidebar.js +141 -0
- package/dist/patterns/async/async.d.ts +40 -0
- package/dist/patterns/async/async.js +61 -0
- package/dist/patterns/async/index.d.ts +3 -0
- package/dist/patterns/async/states.d.ts +68 -0
- package/dist/patterns/async/states.js +116 -0
- package/dist/patterns/chart/cartesian.d.ts +128 -0
- package/dist/patterns/chart/cartesian.js +552 -0
- package/dist/patterns/chart/chart-card.d.ts +39 -0
- package/dist/patterns/chart/chart-card.js +103 -0
- package/dist/patterns/chart/chart-parts.d.ts +53 -0
- package/dist/patterns/chart/chart-parts.js +282 -0
- package/dist/patterns/chart/chart.styles.d.ts +200 -0
- package/dist/patterns/chart/chart.styles.js +43 -0
- package/dist/patterns/chart/export.d.ts +45 -0
- package/dist/patterns/chart/export.js +293 -0
- package/dist/patterns/chart/funnel.d.ts +23 -0
- package/dist/patterns/chart/funnel.js +129 -0
- package/dist/patterns/chart/heatmap.d.ts +37 -0
- package/dist/patterns/chart/heatmap.js +258 -0
- package/dist/patterns/chart/icons.js +39 -0
- package/dist/patterns/chart/pie.d.ts +36 -0
- package/dist/patterns/chart/pie.js +120 -0
- package/dist/patterns/chart/radial.d.ts +75 -0
- package/dist/patterns/chart/radial.js +282 -0
- package/dist/patterns/chart/sankey.d.ts +29 -0
- package/dist/patterns/chart/sankey.js +136 -0
- package/dist/patterns/chart/scatter.d.ts +42 -0
- package/dist/patterns/chart/scatter.js +203 -0
- package/dist/patterns/chart/sparkline.d.ts +20 -0
- package/dist/patterns/chart/sparkline.js +102 -0
- package/dist/patterns/chart/treemap.d.ts +25 -0
- package/dist/patterns/chart/treemap.js +128 -0
- package/dist/patterns/chart/use-element-width.js +23 -0
- package/dist/patterns/data-table/data-table.d.ts +109 -0
- package/dist/patterns/data-table/data-table.js +233 -0
- package/dist/patterns/form/form.d.ts +89 -0
- package/dist/patterns/form/form.js +111 -0
- package/dist/{color-mode-script-KdwItKN2.d.ts → provider/color-mode-script.d.ts} +4 -5
- package/dist/{color-mode-script-Bf7LYkOj.js → provider/color-mode-script.js} +1 -1
- package/dist/provider/color-mode.d.ts +24 -0
- package/dist/provider/color-mode.js +87 -0
- package/dist/{glyph-context-DxGJrdvr.d.ts → provider/glyph-context.d.ts} +13 -12
- package/dist/provider/glyph-context.js +28 -0
- package/dist/provider/glyph-provider.d.ts +37 -0
- package/dist/provider/glyph-provider.js +48 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/theme-scope.d.ts +12 -0
- package/dist/provider/theme-scope.js +42 -0
- package/dist/provider/theme-style.js +15 -0
- package/dist/react-router.d.ts +1 -1
- package/dist/register.d.ts +57 -0
- package/dist/themes.d.ts +22 -0
- package/dist/themes.js +49 -0
- package/dist/utils/cn.d.ts +6 -0
- package/dist/utils/cn.js +12 -0
- package/dist/utils/compose-refs.js +11 -0
- package/dist/{registry-BGSJoiLq.d.ts → utils/registry.d.ts} +2 -3
- package/dist/utils/styles.js +20 -0
- package/dist/{tv-DuMh7UH2.d.ts → utils/tv.d.ts} +2 -2
- package/dist/utils/tv.js +8 -0
- package/dist/utils/tw-merge-config.js +13 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1 -1
- package/package.json +3 -2
- package/src/components/accordion/accordion.styles.ts +1 -1
- package/src/components/alert/alert.styles.ts +1 -1
- package/src/components/alert-dialog/alert-dialog.styles.ts +5 -4
- package/src/components/alert-dialog/confirm-dialog.tsx +42 -0
- package/src/components/alert-dialog/confirm.tsx +12 -31
- package/src/components/aspect-ratio/aspect-ratio.tsx +1 -1
- package/src/components/avatar/avatar.styles.ts +1 -1
- package/src/components/badge/badge.styles.ts +1 -1
- package/src/components/banner/banner.styles.ts +1 -1
- package/src/components/blockquote/blockquote.tsx +1 -1
- package/src/components/breadcrumb/breadcrumb.styles.ts +1 -1
- package/src/components/button/button.styles.ts +4 -2
- package/src/components/calendar/calendar.styles.ts +1 -1
- package/src/components/card/card.styles.ts +1 -1
- package/src/components/carousel/carousel.styles.ts +1 -1
- package/src/components/checkbox/checkbox.tsx +20 -5
- package/src/components/code/code.styles.ts +2 -2
- package/src/components/collapsible/collapsible.tsx +1 -1
- package/src/components/combobox/combobox.styles.ts +5 -2
- package/src/components/command-menu/command-menu.styles.ts +6 -4
- package/src/components/container/container.tsx +1 -1
- package/src/components/context-menu/context-menu.styles.ts +4 -2
- package/src/components/copy-button/copy-button.tsx +1 -1
- package/src/components/date-picker/date-picker.styles.ts +2 -2
- package/src/components/description-list/description-list.styles.ts +1 -1
- package/src/components/dialog/dialog.styles.ts +11 -4
- package/src/components/dropdown-menu/dropdown-menu.styles.ts +3 -3
- package/src/components/eyebrow/eyebrow.styles.ts +1 -1
- package/src/components/field/field.styles.ts +1 -1
- package/src/components/file-upload/file-upload.styles.ts +1 -1
- package/src/components/file-upload/file-upload.tsx +51 -48
- package/src/components/grid/grid.tsx +1 -1
- package/src/components/heading/heading.styles.ts +1 -1
- package/src/components/hover-card/hover-card.tsx +5 -2
- package/src/components/input/input.styles.ts +1 -1
- package/src/components/input-otp/input-otp.styles.ts +1 -1
- package/src/components/kbd/kbd.tsx +1 -1
- package/src/components/label/label.tsx +1 -1
- package/src/components/link/link.styles.ts +1 -1
- package/src/components/modal/modal.styles.ts +1 -1
- package/src/components/navigation-menu/navigation-menu.styles.ts +2 -2
- package/src/components/number-input/number-input.styles.ts +1 -1
- package/src/components/pagination/pagination.styles.ts +6 -4
- package/src/components/pagination/pagination.tsx +14 -1
- package/src/components/password-input/password-input.styles.ts +1 -1
- package/src/components/popover/popover.tsx +1 -1
- package/src/components/progress/progress.styles.ts +2 -2
- package/src/components/prose/prose.tsx +1 -1
- package/src/components/radio-group/radio-group.styles.ts +1 -1
- package/src/components/resizable/resizable.styles.ts +1 -1
- package/src/components/scroll-area/scroll-area.tsx +1 -1
- package/src/components/section/section.tsx +1 -1
- package/src/components/segmented-control/segmented-control.tsx +24 -8
- package/src/components/select/select.tsx +2 -2
- package/src/components/separator/separator.tsx +1 -1
- package/src/components/sheet/sheet.styles.ts +1 -1
- package/src/components/skeleton/skeleton.tsx +1 -1
- package/src/components/slider/slider.styles.ts +1 -1
- package/src/components/spinner/spinner.styles.ts +1 -1
- package/src/components/stack/stack.tsx +1 -1
- package/src/components/stat-card/stat-card.styles.ts +1 -1
- package/src/components/stepper/stepper.styles.ts +1 -1
- package/src/components/switch/switch.tsx +2 -2
- package/src/components/table/table.tsx +1 -1
- package/src/components/tabs/tabs.tsx +46 -15
- package/src/components/tag-input/tag-input.styles.ts +1 -1
- package/src/components/tag-input/tag-input.tsx +27 -18
- package/src/components/text/text.styles.ts +1 -1
- package/src/components/textarea/textarea.tsx +1 -1
- package/src/components/timeline/timeline.styles.ts +1 -1
- package/src/components/toast/toast.tsx +1 -1
- package/src/components/toggle/toggle.styles.ts +1 -1
- package/src/components/tooltip/tooltip.tsx +6 -3
- package/src/components/tree-view/tree-view.styles.ts +1 -1
- package/src/index.ts +3 -0
- package/src/motion/active-indicator.tsx +26 -0
- package/src/motion/animated-number.tsx +113 -0
- package/src/motion/features.ts +7 -0
- package/src/motion/index.ts +9 -0
- package/src/motion/motion-root.tsx +46 -0
- package/src/motion/page-transition.tsx +30 -0
- package/src/motion/presence-list.tsx +42 -0
- package/src/motion/presence.tsx +13 -0
- package/src/motion/reveal.tsx +50 -0
- package/src/motion/stagger.tsx +81 -0
- package/src/motion/use-motion-settings.ts +52 -0
- package/src/motion/use-reveal.ts +54 -0
- package/src/patterns/app-shell/app-shell.styles.ts +18 -11
- package/src/patterns/app-shell/sidebar.tsx +28 -7
- package/src/patterns/async/states.tsx +1 -1
- package/src/patterns/chart/cartesian.tsx +755 -0
- package/src/patterns/chart/chart-card.tsx +148 -0
- package/src/patterns/chart/chart-parts.tsx +323 -58
- package/src/patterns/chart/chart.styles.ts +29 -3
- package/src/patterns/chart/export.ts +334 -0
- package/src/patterns/chart/funnel.tsx +171 -0
- package/src/patterns/chart/heatmap.tsx +339 -0
- package/src/patterns/chart/icons.tsx +44 -0
- package/src/patterns/chart/index.ts +52 -7
- package/src/patterns/chart/pie.tsx +169 -0
- package/src/patterns/chart/radial.tsx +361 -0
- package/src/patterns/chart/sankey.tsx +197 -0
- package/src/patterns/chart/scatter.tsx +254 -0
- package/src/patterns/chart/sparkline.tsx +111 -0
- package/src/patterns/chart/test-utils.tsx +35 -0
- package/src/patterns/chart/treemap.tsx +198 -0
- package/src/patterns/chart/use-element-width.ts +20 -0
- package/src/patterns/data-table/data-table.tsx +1 -1
- package/src/patterns/form/form.tsx +1 -1
- package/src/provider/glyph-context.ts +3 -1
- package/src/provider/glyph-provider.tsx +31 -12
- package/src/provider/theme-scope.tsx +14 -9
- package/src/themes.ts +3 -3
- package/src/utils/styles.ts +17 -3
- package/styles.css +122 -3
- package/dist/field-context-7I-cWvvS.js +0 -267
- package/dist/index-Bi7rZ6ba.d.ts +0 -244
- package/dist/states-IvhjBgna.js +0 -288
- package/dist/tv-DLbT66dC.js +0 -70
- package/src/patterns/chart/chart.tsx +0 -386
|
@@ -0,0 +1,755 @@
|
|
|
1
|
+
import { type ReactNode, useId, useMemo } from 'react'
|
|
2
|
+
import * as R from 'recharts'
|
|
3
|
+
import { useControllableState } from '../../hooks/use-controllable-state'
|
|
4
|
+
import {
|
|
5
|
+
type ChartColorValue,
|
|
6
|
+
ChartFrame,
|
|
7
|
+
type ChartStateProps,
|
|
8
|
+
ChartTooltipCard,
|
|
9
|
+
defaultFormatter,
|
|
10
|
+
type Key,
|
|
11
|
+
resolveColor,
|
|
12
|
+
toggleIn,
|
|
13
|
+
useChartAnimation,
|
|
14
|
+
} from './chart-parts'
|
|
15
|
+
|
|
16
|
+
export interface ChartSeries<T> {
|
|
17
|
+
/** Field of each data row holding this series' value. */
|
|
18
|
+
key: Key<T>
|
|
19
|
+
/** Name shown in the legend, tooltip and accessible table. Defaults to `key`. */
|
|
20
|
+
label?: string
|
|
21
|
+
/** A theme color name (`chart-2`, `primary`, ...) or any CSS color. Defaults follow the theme palette. */
|
|
22
|
+
color?: ChartColorValue
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type AxisBound = number | 'auto' | 'dataMin' | 'dataMax'
|
|
26
|
+
|
|
27
|
+
export interface ChartAxisOptions {
|
|
28
|
+
hide?: boolean
|
|
29
|
+
/** Formats tick labels. The y axis defaults to `valueFormatter`. */
|
|
30
|
+
formatter?: (value: never) => string
|
|
31
|
+
/** Axis title. */
|
|
32
|
+
label?: string
|
|
33
|
+
/** Y axis only: width reserved for tick labels, in pixels. Default 48. */
|
|
34
|
+
width?: number
|
|
35
|
+
/** Y axis only: fixed range, e.g. `[0, 100]` or `[0, 'auto']`. */
|
|
36
|
+
domain?: readonly [AxisBound, AxisBound]
|
|
37
|
+
allowDecimals?: boolean
|
|
38
|
+
tickCount?: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ChartReferenceLine {
|
|
42
|
+
/** Horizontal line at this value. */
|
|
43
|
+
y?: number
|
|
44
|
+
/** Vertical line at this category (x value). */
|
|
45
|
+
x?: string | number
|
|
46
|
+
label?: string
|
|
47
|
+
color?: ChartColorValue
|
|
48
|
+
/** Default true. */
|
|
49
|
+
dashed?: boolean
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ChartReferenceArea {
|
|
53
|
+
x1?: string | number
|
|
54
|
+
x2?: string | number
|
|
55
|
+
y1?: number
|
|
56
|
+
y2?: number
|
|
57
|
+
label?: string
|
|
58
|
+
color?: ChartColorValue
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ChartBrushOptions {
|
|
62
|
+
/** First and last visible row when the chart mounts. */
|
|
63
|
+
startIndex?: number
|
|
64
|
+
endIndex?: number
|
|
65
|
+
/** Height of the brush in pixels. Default 28. */
|
|
66
|
+
height?: number
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CartesianChartProps<T extends object> extends ChartStateProps {
|
|
70
|
+
data: readonly T[]
|
|
71
|
+
/** Field used for the x axis, e.g. `"month"`. */
|
|
72
|
+
index: Key<T>
|
|
73
|
+
series: readonly ChartSeries<T>[]
|
|
74
|
+
/** Accessible name; also shown as the caption unless `hideTitle` is set. */
|
|
75
|
+
title: string
|
|
76
|
+
description?: ReactNode
|
|
77
|
+
hideTitle?: boolean
|
|
78
|
+
/** Formats values on the y axis, in tooltips and in the accessible table. */
|
|
79
|
+
valueFormatter?: (value: number) => string
|
|
80
|
+
/** Formats the x value at the top of the tooltip. */
|
|
81
|
+
labelFormatter?: (label: ReactNode) => ReactNode
|
|
82
|
+
/** Plot height in pixels. Default 240. */
|
|
83
|
+
height?: number
|
|
84
|
+
showGrid?: boolean
|
|
85
|
+
/** Defaults to true when there is more than one series. */
|
|
86
|
+
showLegend?: boolean
|
|
87
|
+
/** Shorthand for `yAxis={{ hide: !showYAxis }}`. */
|
|
88
|
+
showYAxis?: boolean
|
|
89
|
+
xAxis?: ChartAxisOptions
|
|
90
|
+
yAxis?: ChartAxisOptions
|
|
91
|
+
/** Adds a range slider under the plot to zoom into part of the data. */
|
|
92
|
+
brush?: boolean | ChartBrushOptions
|
|
93
|
+
/** Targets, limits, averages... drawn across the plot. */
|
|
94
|
+
referenceLines?: readonly ChartReferenceLine[]
|
|
95
|
+
/** Shaded ranges, e.g. a launch window or an incident. */
|
|
96
|
+
referenceAreas?: readonly ChartReferenceArea[]
|
|
97
|
+
/** Series hidden through the legend (controlled). */
|
|
98
|
+
hiddenSeries?: readonly Key<T>[]
|
|
99
|
+
defaultHiddenSeries?: readonly Key<T>[]
|
|
100
|
+
onHiddenSeriesChange?: (hidden: Key<T>[]) => void
|
|
101
|
+
/** Charts with the same `syncId` share their tooltip and brush position. */
|
|
102
|
+
syncId?: string
|
|
103
|
+
/** Called with the row (and series, when known) the user clicked. */
|
|
104
|
+
onPointClick?: (row: T, seriesKey?: Key<T>) => void
|
|
105
|
+
className?: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const axisTick = { fill: 'var(--glyph-muted-foreground)', fontSize: 12 }
|
|
109
|
+
const margin = { top: 8, right: 8, bottom: 0, left: 0 }
|
|
110
|
+
/** Reference labels sit on top of data: a surface-colored halo keeps them readable. */
|
|
111
|
+
const halo = {
|
|
112
|
+
stroke: 'var(--glyph-surface)',
|
|
113
|
+
strokeWidth: 3,
|
|
114
|
+
strokeLinejoin: 'round',
|
|
115
|
+
paintOrder: 'stroke',
|
|
116
|
+
} as const
|
|
117
|
+
|
|
118
|
+
type Row = Record<string, unknown>
|
|
119
|
+
|
|
120
|
+
/** Shared setup for every cartesian chart: colors, legend, table, hidden series. */
|
|
121
|
+
export function useCartesian<T extends object, S extends ChartSeries<T>>(
|
|
122
|
+
props: Omit<CartesianChartProps<T>, 'series'> & { series: readonly S[] },
|
|
123
|
+
) {
|
|
124
|
+
const { data, index, series, valueFormatter = defaultFormatter } = props
|
|
125
|
+
const [hidden, setHidden] = useControllableState<readonly Key<T>[]>({
|
|
126
|
+
value: props.hiddenSeries,
|
|
127
|
+
defaultValue: props.defaultHiddenSeries ?? [],
|
|
128
|
+
onChange: props.onHiddenSeriesChange as ((value: readonly Key<T>[]) => void) | undefined,
|
|
129
|
+
})
|
|
130
|
+
const resolved = useMemo(
|
|
131
|
+
() =>
|
|
132
|
+
series.map((item, i) => ({
|
|
133
|
+
...item,
|
|
134
|
+
label: item.label ?? item.key,
|
|
135
|
+
stroke: resolveColor(item.color, i),
|
|
136
|
+
hidden: hidden.includes(item.key),
|
|
137
|
+
})),
|
|
138
|
+
[series, hidden],
|
|
139
|
+
)
|
|
140
|
+
const table = {
|
|
141
|
+
columns: [String(index), ...resolved.map((item) => item.label)],
|
|
142
|
+
rows: data.map((row) => [
|
|
143
|
+
String((row as Row)[index]),
|
|
144
|
+
...resolved.map((item) => valueFormatter(Number((row as Row)[item.key]))),
|
|
145
|
+
]),
|
|
146
|
+
}
|
|
147
|
+
const showLegend = props.showLegend ?? series.length > 1
|
|
148
|
+
const legend = showLegend
|
|
149
|
+
? resolved.map((item) => ({
|
|
150
|
+
key: item.key,
|
|
151
|
+
label: item.label,
|
|
152
|
+
color: item.stroke,
|
|
153
|
+
hidden: item.hidden,
|
|
154
|
+
}))
|
|
155
|
+
: undefined
|
|
156
|
+
const onLegendToggle =
|
|
157
|
+
series.length > 1
|
|
158
|
+
? (key: string) => setHidden(toggleIn(hidden, key as Key<T>, series.length))
|
|
159
|
+
: undefined
|
|
160
|
+
return { resolved, table, legend, onLegendToggle, valueFormatter }
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function frameProps<T extends object>(
|
|
164
|
+
props: Pick<
|
|
165
|
+
CartesianChartProps<T>,
|
|
166
|
+
| 'title'
|
|
167
|
+
| 'description'
|
|
168
|
+
| 'hideTitle'
|
|
169
|
+
| 'className'
|
|
170
|
+
| 'loading'
|
|
171
|
+
| 'error'
|
|
172
|
+
| 'onRetry'
|
|
173
|
+
| 'empty'
|
|
174
|
+
| 'height'
|
|
175
|
+
| 'data'
|
|
176
|
+
>,
|
|
177
|
+
) {
|
|
178
|
+
return {
|
|
179
|
+
title: props.title,
|
|
180
|
+
description: props.description,
|
|
181
|
+
hideTitle: props.hideTitle,
|
|
182
|
+
className: props.className,
|
|
183
|
+
loading: props.loading,
|
|
184
|
+
error: props.error,
|
|
185
|
+
onRetry: props.onRetry,
|
|
186
|
+
empty: props.empty,
|
|
187
|
+
height: props.height ?? 240,
|
|
188
|
+
isEmpty: props.data.length === 0,
|
|
189
|
+
} as const
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** recharts props that every cartesian chart root shares. */
|
|
193
|
+
export function rootProps<T extends object>(props: CartesianChartProps<T>) {
|
|
194
|
+
const { onPointClick, data, syncId } = props
|
|
195
|
+
return {
|
|
196
|
+
accessibilityLayer: false,
|
|
197
|
+
data: data as T[],
|
|
198
|
+
margin,
|
|
199
|
+
...(syncId && { syncId }),
|
|
200
|
+
...(onPointClick && {
|
|
201
|
+
style: { cursor: 'pointer' },
|
|
202
|
+
onClick: (state: { activeTooltipIndex?: unknown; activeDataKey?: unknown } | null) => {
|
|
203
|
+
const i = Number(state?.activeTooltipIndex)
|
|
204
|
+
const row = Number.isInteger(i) ? data[i] : undefined
|
|
205
|
+
if (!row) return
|
|
206
|
+
const key = typeof state?.activeDataKey === 'string' ? state.activeDataKey : undefined
|
|
207
|
+
onPointClick(row, key as Key<T> | undefined)
|
|
208
|
+
},
|
|
209
|
+
}),
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Width that fits the longest y tick label, estimated from the formatted data range, so
|
|
215
|
+
* labels like "340 ms" or "$1.2M" never wrap.
|
|
216
|
+
*/
|
|
217
|
+
export function axisWidth(
|
|
218
|
+
data: readonly object[],
|
|
219
|
+
keys: readonly string[],
|
|
220
|
+
formatter: (value: number) => string,
|
|
221
|
+
extra = 0,
|
|
222
|
+
): number {
|
|
223
|
+
let min = 0
|
|
224
|
+
let max = 0
|
|
225
|
+
let stacked = 0
|
|
226
|
+
for (const row of data as readonly Row[]) {
|
|
227
|
+
let sum = 0
|
|
228
|
+
for (const key of keys) {
|
|
229
|
+
const value = Number(row[key])
|
|
230
|
+
if (!Number.isFinite(value)) continue
|
|
231
|
+
min = Math.min(min, value)
|
|
232
|
+
max = Math.max(max, value)
|
|
233
|
+
sum += Math.max(value, 0)
|
|
234
|
+
}
|
|
235
|
+
stacked = Math.max(stacked, sum)
|
|
236
|
+
}
|
|
237
|
+
// Ticks round up to "nice" numbers, so pad the top a little.
|
|
238
|
+
const candidates = [min, max * 1.2, stacked * 1.2].map((value) => {
|
|
239
|
+
const magnitude = 10 ** Math.max(Math.floor(Math.log10(Math.abs(value) || 1)) - 1, 0)
|
|
240
|
+
return formatter(Math.ceil(value / magnitude) * magnitude)
|
|
241
|
+
})
|
|
242
|
+
const widest = Math.max(...candidates.map((label) => textWidth(String(label))))
|
|
243
|
+
return Math.min(Math.max(Math.ceil(widest) + 16 + extra, 36), 128)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
let measureContext: CanvasRenderingContext2D | null | undefined
|
|
247
|
+
|
|
248
|
+
/** Width of a 12px tick label in the page's font; an estimate where canvas is unavailable. */
|
|
249
|
+
function textWidth(text: string): number {
|
|
250
|
+
if (measureContext === undefined) {
|
|
251
|
+
measureContext =
|
|
252
|
+
typeof document !== 'undefined' && typeof CanvasRenderingContext2D !== 'undefined'
|
|
253
|
+
? document.createElement('canvas').getContext('2d')
|
|
254
|
+
: null
|
|
255
|
+
}
|
|
256
|
+
if (!measureContext) return text.length * 7
|
|
257
|
+
measureContext.font = `12px ${getComputedStyle(document.body).fontFamily}`
|
|
258
|
+
return measureContext.measureText(text).width
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** Grid and axes. Rendered as an array so recharts sees its own components as direct children. */
|
|
262
|
+
export function axes<T extends object>(
|
|
263
|
+
props: CartesianChartProps<T>,
|
|
264
|
+
valueFormatter: (value: number) => string,
|
|
265
|
+
{ rightAxis }: { rightAxis?: ChartAxisOptions | undefined } = {},
|
|
266
|
+
) {
|
|
267
|
+
const { xAxis = {}, yAxis = {} } = props
|
|
268
|
+
const hideY = yAxis.hide ?? props.showYAxis === false
|
|
269
|
+
const nodes: ReactNode[] = []
|
|
270
|
+
if (props.showGrid ?? true) {
|
|
271
|
+
nodes.push(
|
|
272
|
+
<R.CartesianGrid
|
|
273
|
+
key="grid"
|
|
274
|
+
vertical={false}
|
|
275
|
+
stroke="var(--glyph-border)"
|
|
276
|
+
strokeDasharray="3 3"
|
|
277
|
+
yAxisId="left"
|
|
278
|
+
/>,
|
|
279
|
+
)
|
|
280
|
+
}
|
|
281
|
+
nodes.push(
|
|
282
|
+
<R.XAxis
|
|
283
|
+
key="x"
|
|
284
|
+
dataKey={props.index}
|
|
285
|
+
hide={xAxis.hide}
|
|
286
|
+
tick={axisTick}
|
|
287
|
+
tickLine={false}
|
|
288
|
+
axisLine={false}
|
|
289
|
+
tickMargin={8}
|
|
290
|
+
minTickGap={16}
|
|
291
|
+
{...(xAxis.formatter && { tickFormatter: xAxis.formatter as (v: unknown) => string })}
|
|
292
|
+
{...(xAxis.label && {
|
|
293
|
+
label: { value: xAxis.label, position: 'insideBottom', offset: -4, ...axisTick },
|
|
294
|
+
height: 44,
|
|
295
|
+
})}
|
|
296
|
+
/>,
|
|
297
|
+
<R.YAxis
|
|
298
|
+
key="y"
|
|
299
|
+
yAxisId="left"
|
|
300
|
+
hide={hideY}
|
|
301
|
+
tick={axisTick}
|
|
302
|
+
tickLine={false}
|
|
303
|
+
axisLine={false}
|
|
304
|
+
width={
|
|
305
|
+
yAxis.width ??
|
|
306
|
+
axisWidth(
|
|
307
|
+
props.data,
|
|
308
|
+
props.series
|
|
309
|
+
.filter((item) => (item as { axis?: string }).axis !== 'right')
|
|
310
|
+
.map((item) => item.key),
|
|
311
|
+
(yAxis.formatter as ((v: number) => string) | undefined) ?? valueFormatter,
|
|
312
|
+
yAxis.label ? 18 : 0,
|
|
313
|
+
)
|
|
314
|
+
}
|
|
315
|
+
tickFormatter={(yAxis.formatter as ((v: number) => string) | undefined) ?? valueFormatter}
|
|
316
|
+
{...(yAxis.domain && { domain: yAxis.domain as [AxisBound, AxisBound] })}
|
|
317
|
+
{...(yAxis.allowDecimals !== undefined && { allowDecimals: yAxis.allowDecimals })}
|
|
318
|
+
{...(yAxis.tickCount !== undefined && { tickCount: yAxis.tickCount })}
|
|
319
|
+
{...(yAxis.label && {
|
|
320
|
+
label: { value: yAxis.label, angle: -90, position: 'insideLeft', ...axisTick },
|
|
321
|
+
})}
|
|
322
|
+
/>,
|
|
323
|
+
)
|
|
324
|
+
if (rightAxis) {
|
|
325
|
+
nodes.push(
|
|
326
|
+
<R.YAxis
|
|
327
|
+
key="y-right"
|
|
328
|
+
yAxisId="right"
|
|
329
|
+
orientation="right"
|
|
330
|
+
hide={rightAxis.hide}
|
|
331
|
+
tick={axisTick}
|
|
332
|
+
tickLine={false}
|
|
333
|
+
axisLine={false}
|
|
334
|
+
width={
|
|
335
|
+
rightAxis.width ??
|
|
336
|
+
axisWidth(
|
|
337
|
+
props.data,
|
|
338
|
+
props.series
|
|
339
|
+
.filter((item) => (item as { axis?: string }).axis === 'right')
|
|
340
|
+
.map((item) => item.key),
|
|
341
|
+
(rightAxis.formatter as ((v: number) => string) | undefined) ?? valueFormatter,
|
|
342
|
+
rightAxis.label ? 18 : 0,
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
tickFormatter={
|
|
346
|
+
(rightAxis.formatter as ((v: number) => string) | undefined) ?? valueFormatter
|
|
347
|
+
}
|
|
348
|
+
{...(rightAxis.domain && { domain: rightAxis.domain as [AxisBound, AxisBound] })}
|
|
349
|
+
{...(rightAxis.label && {
|
|
350
|
+
label: { value: rightAxis.label, angle: 90, position: 'insideRight', ...axisTick },
|
|
351
|
+
})}
|
|
352
|
+
/>,
|
|
353
|
+
)
|
|
354
|
+
}
|
|
355
|
+
return nodes
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** Reference lines, areas and the brush. */
|
|
359
|
+
export function overlays<T extends object>(props: CartesianChartProps<T>) {
|
|
360
|
+
const nodes: ReactNode[] = []
|
|
361
|
+
props.referenceAreas?.forEach((area, i) => {
|
|
362
|
+
const color = resolveColor(area.color ?? 'muted-foreground', 0)
|
|
363
|
+
nodes.push(
|
|
364
|
+
<R.ReferenceArea
|
|
365
|
+
key={`area-${i}`}
|
|
366
|
+
yAxisId="left"
|
|
367
|
+
{...(area.x1 !== undefined && { x1: area.x1 })}
|
|
368
|
+
{...(area.x2 !== undefined && { x2: area.x2 })}
|
|
369
|
+
{...(area.y1 !== undefined && { y1: area.y1 })}
|
|
370
|
+
{...(area.y2 !== undefined && { y2: area.y2 })}
|
|
371
|
+
fill={color}
|
|
372
|
+
fillOpacity={0.08}
|
|
373
|
+
stroke="none"
|
|
374
|
+
ifOverflow="extendDomain"
|
|
375
|
+
{...(area.label && {
|
|
376
|
+
label: { value: area.label, position: 'insideTop', ...axisTick, fontSize: 11, ...halo },
|
|
377
|
+
})}
|
|
378
|
+
/>,
|
|
379
|
+
)
|
|
380
|
+
})
|
|
381
|
+
props.referenceLines?.forEach((line, i) => {
|
|
382
|
+
const color = resolveColor(line.color ?? 'muted-foreground', 0)
|
|
383
|
+
nodes.push(
|
|
384
|
+
<R.ReferenceLine
|
|
385
|
+
key={`line-${i}`}
|
|
386
|
+
yAxisId="left"
|
|
387
|
+
{...(line.y !== undefined && { y: line.y })}
|
|
388
|
+
{...(line.x !== undefined && { x: line.x })}
|
|
389
|
+
stroke={color}
|
|
390
|
+
strokeWidth={1.25}
|
|
391
|
+
strokeDasharray={line.dashed === false ? undefined : '4 4'}
|
|
392
|
+
ifOverflow="extendDomain"
|
|
393
|
+
{...(line.label && {
|
|
394
|
+
label: {
|
|
395
|
+
value: line.label,
|
|
396
|
+
position: line.y !== undefined ? 'insideTopRight' : 'insideTopLeft',
|
|
397
|
+
fill: 'var(--glyph-muted-foreground)',
|
|
398
|
+
fontSize: 11,
|
|
399
|
+
...halo,
|
|
400
|
+
},
|
|
401
|
+
})}
|
|
402
|
+
/>,
|
|
403
|
+
)
|
|
404
|
+
})
|
|
405
|
+
if (props.brush) {
|
|
406
|
+
const options = props.brush === true ? {} : props.brush
|
|
407
|
+
nodes.push(
|
|
408
|
+
<R.Brush
|
|
409
|
+
key="brush"
|
|
410
|
+
dataKey={props.index}
|
|
411
|
+
height={options.height ?? 28}
|
|
412
|
+
stroke="var(--glyph-border-strong)"
|
|
413
|
+
fill="var(--glyph-subtle)"
|
|
414
|
+
travellerWidth={8}
|
|
415
|
+
tickFormatter={() => ''}
|
|
416
|
+
{...(options.startIndex !== undefined && { startIndex: options.startIndex })}
|
|
417
|
+
{...(options.endIndex !== undefined && { endIndex: options.endIndex })}
|
|
418
|
+
/>,
|
|
419
|
+
)
|
|
420
|
+
}
|
|
421
|
+
return nodes
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export function chartTooltip(
|
|
425
|
+
valueFormatter: (value: number) => string,
|
|
426
|
+
cursor: object | boolean,
|
|
427
|
+
options: {
|
|
428
|
+
total?: boolean | undefined
|
|
429
|
+
labelFormatter?: ((label: ReactNode) => ReactNode) | undefined
|
|
430
|
+
} = {},
|
|
431
|
+
) {
|
|
432
|
+
return (
|
|
433
|
+
<R.Tooltip
|
|
434
|
+
cursor={cursor}
|
|
435
|
+
isAnimationActive={false}
|
|
436
|
+
content={(p) => (
|
|
437
|
+
<ChartTooltipCard
|
|
438
|
+
active={p.active}
|
|
439
|
+
payload={p.payload as never}
|
|
440
|
+
label={p.label as ReactNode}
|
|
441
|
+
formatter={valueFormatter}
|
|
442
|
+
labelFormatter={options.labelFormatter}
|
|
443
|
+
total={options.total}
|
|
444
|
+
/>
|
|
445
|
+
)}
|
|
446
|
+
/>
|
|
447
|
+
)
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const lineCursor = { stroke: 'var(--glyph-border-strong)' }
|
|
451
|
+
const barCursor = { fill: 'var(--glyph-muted)', opacity: 0.6 }
|
|
452
|
+
|
|
453
|
+
/** Trends over time, one line per series. */
|
|
454
|
+
export function LineChart<T extends object>(
|
|
455
|
+
props: CartesianChartProps<T> & {
|
|
456
|
+
curve?: 'monotone' | 'linear' | 'step'
|
|
457
|
+
/** Show a dot on every data point. Default false. */
|
|
458
|
+
dots?: boolean
|
|
459
|
+
},
|
|
460
|
+
) {
|
|
461
|
+
const { resolved, table, legend, onLegendToggle, valueFormatter } = useCartesian(props)
|
|
462
|
+
const animation = useChartAnimation()
|
|
463
|
+
return (
|
|
464
|
+
<ChartFrame
|
|
465
|
+
{...frameProps(props)}
|
|
466
|
+
legend={legend}
|
|
467
|
+
onLegendToggle={onLegendToggle}
|
|
468
|
+
table={table}
|
|
469
|
+
>
|
|
470
|
+
<R.ResponsiveContainer width="100%" height={props.height ?? 240}>
|
|
471
|
+
<R.LineChart {...rootProps(props)}>
|
|
472
|
+
{axes(props, valueFormatter)}
|
|
473
|
+
{chartTooltip(valueFormatter, lineCursor, { labelFormatter: props.labelFormatter })}
|
|
474
|
+
{overlays(props)}
|
|
475
|
+
{resolved.map((item) => (
|
|
476
|
+
<R.Line
|
|
477
|
+
key={item.key}
|
|
478
|
+
yAxisId="left"
|
|
479
|
+
dataKey={item.key}
|
|
480
|
+
name={item.label}
|
|
481
|
+
hide={item.hidden}
|
|
482
|
+
type={props.curve === 'step' ? 'stepAfter' : (props.curve ?? 'monotone')}
|
|
483
|
+
stroke={item.stroke}
|
|
484
|
+
strokeWidth={2}
|
|
485
|
+
dot={props.dots ? { r: 3, strokeWidth: 0, fill: item.stroke } : false}
|
|
486
|
+
activeDot={{ r: 4, strokeWidth: 2, stroke: 'var(--glyph-surface)' }}
|
|
487
|
+
{...animation}
|
|
488
|
+
/>
|
|
489
|
+
))}
|
|
490
|
+
</R.LineChart>
|
|
491
|
+
</R.ResponsiveContainer>
|
|
492
|
+
</ChartFrame>
|
|
493
|
+
)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/** Trends with filled areas. `stacked` shows how series add up to a total. */
|
|
497
|
+
export function AreaChart<T extends object>(
|
|
498
|
+
props: CartesianChartProps<T> & {
|
|
499
|
+
stacked?: boolean
|
|
500
|
+
/** Stack to 100% to compare shares over time. */
|
|
501
|
+
expand?: boolean
|
|
502
|
+
curve?: 'monotone' | 'linear' | 'step'
|
|
503
|
+
},
|
|
504
|
+
) {
|
|
505
|
+
const { resolved, table, legend, onLegendToggle, valueFormatter } = useCartesian(props)
|
|
506
|
+
const animation = useChartAnimation()
|
|
507
|
+
const id = useId().replace(/:/g, '')
|
|
508
|
+
const stacked = props.stacked || props.expand
|
|
509
|
+
return (
|
|
510
|
+
<ChartFrame
|
|
511
|
+
{...frameProps(props)}
|
|
512
|
+
legend={legend}
|
|
513
|
+
onLegendToggle={onLegendToggle}
|
|
514
|
+
table={table}
|
|
515
|
+
>
|
|
516
|
+
<R.ResponsiveContainer width="100%" height={props.height ?? 240}>
|
|
517
|
+
<R.AreaChart {...rootProps(props)} {...(props.expand && { stackOffset: 'expand' })}>
|
|
518
|
+
<defs>
|
|
519
|
+
{resolved.map((item, i) => (
|
|
520
|
+
<linearGradient key={item.key} id={`${id}-${i}`} x1="0" x2="0" y1="0" y2="1">
|
|
521
|
+
<stop offset="0%" stopColor={item.stroke} stopOpacity={stacked ? 0.45 : 0.3} />
|
|
522
|
+
<stop offset="100%" stopColor={item.stroke} stopOpacity={stacked ? 0.12 : 0} />
|
|
523
|
+
</linearGradient>
|
|
524
|
+
))}
|
|
525
|
+
</defs>
|
|
526
|
+
{axes(
|
|
527
|
+
props.expand
|
|
528
|
+
? {
|
|
529
|
+
...props,
|
|
530
|
+
yAxis: { formatter: (v: number) => `${Math.round(v * 100)}%`, ...props.yAxis },
|
|
531
|
+
}
|
|
532
|
+
: props,
|
|
533
|
+
valueFormatter,
|
|
534
|
+
)}
|
|
535
|
+
{chartTooltip(valueFormatter, lineCursor, {
|
|
536
|
+
total: stacked && !props.expand,
|
|
537
|
+
labelFormatter: props.labelFormatter,
|
|
538
|
+
})}
|
|
539
|
+
{overlays(props)}
|
|
540
|
+
{resolved.map((item, i) => (
|
|
541
|
+
<R.Area
|
|
542
|
+
key={item.key}
|
|
543
|
+
yAxisId="left"
|
|
544
|
+
dataKey={item.key}
|
|
545
|
+
name={item.label}
|
|
546
|
+
hide={item.hidden}
|
|
547
|
+
type={props.curve === 'step' ? 'stepAfter' : (props.curve ?? 'monotone')}
|
|
548
|
+
stroke={item.stroke}
|
|
549
|
+
strokeWidth={2}
|
|
550
|
+
fill={`url(#${id}-${i})`}
|
|
551
|
+
activeDot={{ r: 4, strokeWidth: 2, stroke: 'var(--glyph-surface)' }}
|
|
552
|
+
{...(stacked && { stackId: 'stack' })}
|
|
553
|
+
{...animation}
|
|
554
|
+
/>
|
|
555
|
+
))}
|
|
556
|
+
</R.AreaChart>
|
|
557
|
+
</R.ResponsiveContainer>
|
|
558
|
+
</ChartFrame>
|
|
559
|
+
)
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/** Compare values across categories. `stacked` puts series on top of each other. */
|
|
563
|
+
export function BarChart<T extends object>(
|
|
564
|
+
props: CartesianChartProps<T> & {
|
|
565
|
+
stacked?: boolean
|
|
566
|
+
/** Bars run left to right, categories down the side. Good for long labels. */
|
|
567
|
+
layout?: 'vertical' | 'horizontal'
|
|
568
|
+
/** Corner radius of bar ends. Default 4. */
|
|
569
|
+
barRadius?: number
|
|
570
|
+
},
|
|
571
|
+
) {
|
|
572
|
+
const { resolved, table, legend, onLegendToggle, valueFormatter } = useCartesian(props)
|
|
573
|
+
const animation = useChartAnimation()
|
|
574
|
+
const radius = props.barRadius ?? 4
|
|
575
|
+
const horizontal = props.layout === 'vertical'
|
|
576
|
+
const visible = resolved.filter((item) => !item.hidden)
|
|
577
|
+
const top = visible[visible.length - 1]?.key
|
|
578
|
+
const endRadius = (key: string): number | [number, number, number, number] => {
|
|
579
|
+
if (props.stacked && key !== top) return 0
|
|
580
|
+
return horizontal ? [0, radius, radius, 0] : [radius, radius, 0, 0]
|
|
581
|
+
}
|
|
582
|
+
const { xAxis = {}, yAxis = {} } = props
|
|
583
|
+
return (
|
|
584
|
+
<ChartFrame
|
|
585
|
+
{...frameProps(props)}
|
|
586
|
+
legend={legend}
|
|
587
|
+
onLegendToggle={onLegendToggle}
|
|
588
|
+
table={table}
|
|
589
|
+
>
|
|
590
|
+
<R.ResponsiveContainer width="100%" height={props.height ?? 240}>
|
|
591
|
+
<R.BarChart
|
|
592
|
+
{...rootProps(props)}
|
|
593
|
+
layout={horizontal ? 'vertical' : 'horizontal'}
|
|
594
|
+
barGap={2}
|
|
595
|
+
barCategoryGap="24%"
|
|
596
|
+
>
|
|
597
|
+
{horizontal
|
|
598
|
+
? [
|
|
599
|
+
(props.showGrid ?? true) && (
|
|
600
|
+
<R.CartesianGrid
|
|
601
|
+
key="grid"
|
|
602
|
+
horizontal={false}
|
|
603
|
+
stroke="var(--glyph-border)"
|
|
604
|
+
strokeDasharray="3 3"
|
|
605
|
+
yAxisId="left"
|
|
606
|
+
/>
|
|
607
|
+
),
|
|
608
|
+
<R.XAxis
|
|
609
|
+
key="x"
|
|
610
|
+
type="number"
|
|
611
|
+
hide={yAxis.hide ?? props.showYAxis === false}
|
|
612
|
+
tick={axisTick}
|
|
613
|
+
tickLine={false}
|
|
614
|
+
axisLine={false}
|
|
615
|
+
tickFormatter={
|
|
616
|
+
(yAxis.formatter as ((v: number) => string) | undefined) ?? valueFormatter
|
|
617
|
+
}
|
|
618
|
+
{...(yAxis.domain && { domain: yAxis.domain as [AxisBound, AxisBound] })}
|
|
619
|
+
/>,
|
|
620
|
+
<R.YAxis
|
|
621
|
+
key="y"
|
|
622
|
+
yAxisId="left"
|
|
623
|
+
type="category"
|
|
624
|
+
dataKey={props.index}
|
|
625
|
+
hide={xAxis.hide}
|
|
626
|
+
tick={axisTick}
|
|
627
|
+
tickLine={false}
|
|
628
|
+
axisLine={false}
|
|
629
|
+
width={xAxis.width ?? yAxis.width ?? 96}
|
|
630
|
+
{...(xAxis.formatter && {
|
|
631
|
+
tickFormatter: xAxis.formatter as (v: unknown) => string,
|
|
632
|
+
})}
|
|
633
|
+
/>,
|
|
634
|
+
]
|
|
635
|
+
: axes(props, valueFormatter)}
|
|
636
|
+
{chartTooltip(valueFormatter, barCursor, {
|
|
637
|
+
total: props.stacked,
|
|
638
|
+
labelFormatter: props.labelFormatter,
|
|
639
|
+
})}
|
|
640
|
+
{overlays(props)}
|
|
641
|
+
{resolved.map((item) => (
|
|
642
|
+
<R.Bar
|
|
643
|
+
key={item.key}
|
|
644
|
+
yAxisId="left"
|
|
645
|
+
dataKey={item.key}
|
|
646
|
+
name={item.label}
|
|
647
|
+
hide={item.hidden}
|
|
648
|
+
fill={item.stroke}
|
|
649
|
+
radius={endRadius(item.key)}
|
|
650
|
+
maxBarSize={48}
|
|
651
|
+
{...(props.stacked && { stackId: 'stack' })}
|
|
652
|
+
{...animation}
|
|
653
|
+
/>
|
|
654
|
+
))}
|
|
655
|
+
</R.BarChart>
|
|
656
|
+
</R.ResponsiveContainer>
|
|
657
|
+
</ChartFrame>
|
|
658
|
+
)
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export interface ComposedSeries<T> extends ChartSeries<T> {
|
|
662
|
+
/** How this series is drawn. Default `bar`. */
|
|
663
|
+
type?: 'bar' | 'line' | 'area'
|
|
664
|
+
/**
|
|
665
|
+
* Which y axis this series uses. Use the right axis sparingly: two scales on one plot
|
|
666
|
+
* are easy to misread. Prefer two charts with a shared `syncId` when you can.
|
|
667
|
+
*/
|
|
668
|
+
axis?: 'left' | 'right'
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface ComposedChartProps<T extends object>
|
|
672
|
+
extends Omit<CartesianChartProps<T>, 'series'> {
|
|
673
|
+
series: readonly ComposedSeries<T>[]
|
|
674
|
+
/** Options for the right y axis, used by series with `axis: "right"`. */
|
|
675
|
+
rightAxis?: ChartAxisOptions
|
|
676
|
+
/** Stack the bar series. */
|
|
677
|
+
stacked?: boolean
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/** Bars, lines and areas on one plot, e.g. revenue bars with a target line. */
|
|
681
|
+
export function ComposedChart<T extends object>(props: ComposedChartProps<T>) {
|
|
682
|
+
const { resolved, table, legend, onLegendToggle, valueFormatter } = useCartesian(props)
|
|
683
|
+
const animation = useChartAnimation()
|
|
684
|
+
const id = useId().replace(/:/g, '')
|
|
685
|
+
const hasRight = props.series.some((item) => item.axis === 'right')
|
|
686
|
+
const cartesian = props as unknown as CartesianChartProps<T>
|
|
687
|
+
return (
|
|
688
|
+
<ChartFrame
|
|
689
|
+
{...frameProps(props)}
|
|
690
|
+
legend={legend}
|
|
691
|
+
onLegendToggle={onLegendToggle}
|
|
692
|
+
table={table}
|
|
693
|
+
>
|
|
694
|
+
<R.ResponsiveContainer width="100%" height={props.height ?? 240}>
|
|
695
|
+
<R.ComposedChart {...rootProps(cartesian)} barGap={2} barCategoryGap="24%">
|
|
696
|
+
<defs>
|
|
697
|
+
{resolved.map((item, i) => (
|
|
698
|
+
<linearGradient key={item.key} id={`${id}-${i}`} x1="0" x2="0" y1="0" y2="1">
|
|
699
|
+
<stop offset="0%" stopColor={item.stroke} stopOpacity={0.3} />
|
|
700
|
+
<stop offset="100%" stopColor={item.stroke} stopOpacity={0} />
|
|
701
|
+
</linearGradient>
|
|
702
|
+
))}
|
|
703
|
+
</defs>
|
|
704
|
+
{axes(cartesian, valueFormatter, {
|
|
705
|
+
rightAxis: hasRight ? (props.rightAxis ?? {}) : undefined,
|
|
706
|
+
})}
|
|
707
|
+
{chartTooltip(valueFormatter, barCursor, { labelFormatter: props.labelFormatter })}
|
|
708
|
+
{overlays(cartesian)}
|
|
709
|
+
{resolved.map((item, i) => {
|
|
710
|
+
const common = {
|
|
711
|
+
yAxisId: item.axis === 'right' ? 'right' : 'left',
|
|
712
|
+
dataKey: item.key,
|
|
713
|
+
name: item.label,
|
|
714
|
+
hide: item.hidden,
|
|
715
|
+
...animation,
|
|
716
|
+
}
|
|
717
|
+
if (item.type === 'line')
|
|
718
|
+
return (
|
|
719
|
+
<R.Line
|
|
720
|
+
key={item.key}
|
|
721
|
+
{...common}
|
|
722
|
+
type="monotone"
|
|
723
|
+
stroke={item.stroke}
|
|
724
|
+
strokeWidth={2}
|
|
725
|
+
dot={false}
|
|
726
|
+
activeDot={{ r: 4, strokeWidth: 2, stroke: 'var(--glyph-surface)' }}
|
|
727
|
+
/>
|
|
728
|
+
)
|
|
729
|
+
if (item.type === 'area')
|
|
730
|
+
return (
|
|
731
|
+
<R.Area
|
|
732
|
+
key={item.key}
|
|
733
|
+
{...common}
|
|
734
|
+
type="monotone"
|
|
735
|
+
stroke={item.stroke}
|
|
736
|
+
strokeWidth={2}
|
|
737
|
+
fill={`url(#${id}-${i})`}
|
|
738
|
+
/>
|
|
739
|
+
)
|
|
740
|
+
return (
|
|
741
|
+
<R.Bar
|
|
742
|
+
key={item.key}
|
|
743
|
+
{...common}
|
|
744
|
+
fill={item.stroke}
|
|
745
|
+
radius={props.stacked ? 0 : [4, 4, 0, 0]}
|
|
746
|
+
maxBarSize={48}
|
|
747
|
+
{...(props.stacked && { stackId: 'bars' })}
|
|
748
|
+
/>
|
|
749
|
+
)
|
|
750
|
+
})}
|
|
751
|
+
</R.ComposedChart>
|
|
752
|
+
</R.ResponsiveContainer>
|
|
753
|
+
</ChartFrame>
|
|
754
|
+
)
|
|
755
|
+
}
|