@mizen-labs/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +72 -2
- package/dist/closed.d.ts +5 -0
- package/dist/closed.js +1 -0
- package/dist/components/accordion/accordion.d.ts +28 -0
- package/dist/components/accordion/accordion.js +1 -0
- package/dist/components/accordion/accordion.styles.js +1 -0
- package/dist/components/activity-feed/activity-feed.d.ts +28 -0
- package/dist/components/activity-feed/activity-feed.js +2 -0
- package/dist/components/activity-feed/activity-feed.styles.js +1 -0
- package/dist/components/agent-thinking/agent-thinking.d.ts +25 -0
- package/dist/components/agent-thinking/agent-thinking.js +16 -0
- package/dist/components/agent-thinking/agent-thinking.styles.js +3 -0
- package/dist/components/alert/alert.d.ts +14 -0
- package/dist/components/alert/alert.js +1 -0
- package/dist/components/alert/alert.styles.js +1 -0
- package/dist/components/alert/alert.stylex.js +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +29 -0
- package/dist/components/alert-dialog/alert-dialog.js +1 -0
- package/dist/components/alert-dialog/alert-dialog.styles.js +1 -0
- package/dist/components/approval-card/approval-card.d.ts +38 -0
- package/dist/components/approval-card/approval-card.js +8 -0
- package/dist/components/approval-card/approval-card.styles.js +1 -0
- package/dist/components/area-chart/area-chart.d.ts +29 -0
- package/dist/components/area-chart/area-chart.js +10 -0
- package/dist/components/area-chart/area-chart.styles.js +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.styles.js +1 -0
- package/dist/components/attachment/attachment.d.ts +20 -0
- package/dist/components/attachment/attachment.js +1 -0
- package/dist/components/attachment/attachment.styles.js +1 -0
- package/dist/components/avatar/avatar-character.styles.js +1 -0
- package/dist/components/avatar/avatar.d.ts +36 -0
- package/dist/components/avatar/avatar.js +4 -0
- package/dist/components/avatar/avatar.styles.js +1 -0
- package/dist/components/badge/badge.d.ts +8 -0
- package/dist/components/badge/badge.js +1 -0
- package/dist/components/badge/badge.styles.js +1 -0
- package/dist/components/bar-list/bar-list.d.ts +22 -0
- package/dist/components/bar-list/bar-list.js +4 -0
- package/dist/components/bar-list/bar-list.styles.js +1 -0
- package/dist/components/blockquote/blockquote.d.ts +12 -0
- package/dist/components/blockquote/blockquote.js +1 -0
- package/dist/components/blockquote/blockquote.styles.js +1 -0
- package/dist/components/breadcrumb/breadcrumb-link.d.ts +4 -0
- package/dist/components/breadcrumb/breadcrumb-link.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +16 -0
- package/dist/components/breadcrumb/breadcrumb.js +2 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +1 -0
- package/dist/components/button/button-colors.stylex.js +3 -0
- package/dist/components/button/button.css +16 -0
- package/dist/components/button/button.css.d.js +0 -0
- package/dist/components/button/button.d.ts +27 -0
- package/dist/components/button/button.js +1 -0
- package/dist/components/button/button.styles.js +3 -0
- package/dist/components/button-group/button-group.css +115 -0
- package/dist/components/button-group/button-group.d.ts +8 -0
- package/dist/components/button-group/button-group.js +3 -0
- package/dist/components/button-group/button-group.styles.js +1 -0
- package/dist/components/calendar/calendar-components.js +2 -0
- package/dist/components/calendar/calendar-context.js +1 -0
- package/dist/components/calendar/calendar-dropdowns.js +2 -0
- package/dist/components/calendar/calendar-utils.js +1 -0
- package/dist/components/calendar/calendar.d.ts +4 -0
- package/dist/components/calendar/calendar.js +1 -0
- package/dist/components/calendar/calendar.styles.js +1 -0
- package/dist/components/calendar/calendar.types.d.ts +48 -0
- package/dist/components/calendar/calendar.types.js +1 -0
- package/dist/components/calendar-heatmap/calendar-heatmap.d.ts +20 -0
- package/dist/components/calendar-heatmap/calendar-heatmap.js +9 -0
- package/dist/components/card/card.d.ts +17 -0
- package/dist/components/card/card.js +1 -0
- package/dist/components/card/card.styles.js +1 -0
- package/dist/components/carousel/carousel.d.ts +33 -0
- package/dist/components/carousel/carousel.js +21 -0
- package/dist/components/carousel/carousel.styles.js +4 -0
- package/dist/components/category-comparison/category-comparison.d.ts +30 -0
- package/dist/components/category-comparison/category-comparison.js +9 -0
- package/dist/components/category-comparison/category-comparison.styles.js +1 -0
- package/dist/components/chart-frame/arc-path.js +7 -0
- package/dist/components/chart-frame/chart-assert.js +2 -0
- package/dist/components/chart-frame/chart-colors.d.ts +10 -0
- package/dist/components/chart-frame/chart-colors.js +2 -0
- package/dist/components/chart-frame/chart-crosshair.js +6 -0
- package/dist/components/chart-frame/chart-data-table.js +4 -0
- package/dist/components/chart-frame/chart-frame.d.ts +24 -0
- package/dist/components/chart-frame/chart-frame.js +7 -0
- package/dist/components/chart-frame/chart-frame.styles.js +1 -0
- package/dist/components/chart-frame/chart-hover.js +3 -0
- package/dist/components/chart-frame/chart-loading.d.ts +22 -0
- package/dist/components/chart-frame/chart-loading.js +6 -0
- package/dist/components/chart-frame/ring-graphic.js +5 -0
- package/dist/components/chart-legend/chart-legend.d.ts +18 -0
- package/dist/components/chart-legend/chart-legend.js +1 -0
- package/dist/components/chart-legend/chart-legend.styles.js +1 -0
- package/dist/components/chart-tooltip/chart-tooltip.d.ts +14 -0
- package/dist/components/chart-tooltip/chart-tooltip.js +1 -0
- package/dist/components/chart-tooltip/chart-tooltip.styles.js +1 -0
- package/dist/components/checkbox/checkbox-card.d.ts +16 -0
- package/dist/components/checkbox/checkbox-card.js +1 -0
- package/dist/components/checkbox/checkbox-card.styles.js +1 -0
- package/dist/components/checkbox/checkbox.d.ts +13 -0
- package/dist/components/checkbox/checkbox.js +5 -0
- package/dist/components/checkbox/checkbox.styles.js +3 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +6 -0
- package/dist/components/checkbox-group/checkbox-group.js +1 -0
- package/dist/components/checkbox-group/checkbox-group.styles.js +1 -0
- package/dist/components/citation/citation.d.ts +6 -0
- package/dist/components/citation/citation.js +1 -0
- package/dist/components/citation/citation.styles.js +1 -0
- package/dist/components/code/code.d.ts +5 -0
- package/dist/components/code/code.js +1 -0
- package/dist/components/code/code.styles.js +3 -0
- package/dist/components/code-block/code-block-copy.d.ts +6 -0
- package/dist/components/code-block/code-block-copy.js +1 -0
- package/dist/components/code-block/code-block-highlight.d.ts +31 -0
- package/dist/components/code-block/code-block-highlight.js +8 -0
- package/dist/components/code-block/code-block.d.ts +22 -0
- package/dist/components/code-block/code-block.js +4 -0
- package/dist/components/code-block/code-block.styles.js +3 -0
- package/dist/components/collapsible/collapsible.d.ts +19 -0
- package/dist/components/collapsible/collapsible.js +1 -0
- package/dist/components/collapsible/collapsible.styles.js +1 -0
- package/dist/components/combobox/combobox-chips.js +1 -0
- package/dist/components/combobox/combobox-chips.styles.js +1 -0
- package/dist/components/combobox/combobox-context.d.ts +9 -0
- package/dist/components/combobox/combobox-context.js +1 -0
- package/dist/components/combobox/combobox-field.styles.js +1 -0
- package/dist/components/combobox/combobox-input.js +1 -0
- package/dist/components/combobox/combobox-popup.js +1 -0
- package/dist/components/combobox/combobox-popup.styles.js +1 -0
- package/dist/components/combobox/combobox-structure.js +1 -0
- package/dist/components/combobox/combobox.d.ts +27 -0
- package/dist/components/combobox/combobox.js +1 -0
- package/dist/components/combobox/combobox.types.d.ts +43 -0
- package/dist/components/combobox/combobox.types.js +1 -0
- package/dist/components/command/command-dialog.js +1 -0
- package/dist/components/command/command-dialog.styles.js +1 -0
- package/dist/components/command/command-field.styles.js +1 -0
- package/dist/components/command/command-input.js +1 -0
- package/dist/components/command/command-items.js +1 -0
- package/dist/components/command/command-items.styles.js +1 -0
- package/dist/components/command/command-structure.js +1 -0
- package/dist/components/command/command.d.ts +29 -0
- package/dist/components/command/command.js +2 -0
- package/dist/components/command/command.types.d.ts +28 -0
- package/dist/components/command/command.types.js +1 -0
- package/dist/components/composer/attachment-marker.stylex.js +2 -0
- package/dist/components/composer/composer-clipboard.js +1 -0
- package/dist/components/composer/composer-context-meter.d.ts +36 -0
- package/dist/components/composer/composer-context-meter.js +6 -0
- package/dist/components/composer/composer-dictation.d.ts +17 -0
- package/dist/components/composer/composer-dictation.js +5 -0
- package/dist/components/composer/composer-document.d.ts +32 -0
- package/dist/components/composer/composer-document.js +1 -0
- package/dist/components/composer/composer-editor.d.ts +57 -0
- package/dist/components/composer/composer-editor.js +4 -0
- package/dist/components/composer/composer-history.js +1 -0
- package/dist/components/composer/composer-options.d.ts +45 -0
- package/dist/components/composer/composer-options.js +1 -0
- package/dist/components/composer/composer-parts.d.ts +36 -0
- package/dist/components/composer/composer-parts.js +4 -0
- package/dist/components/composer/composer-parts.styles.js +4 -0
- package/dist/components/composer/composer-picker.d.ts +50 -0
- package/dist/components/composer/composer-picker.js +15 -0
- package/dist/components/composer/composer-progress-ring.js +1 -0
- package/dist/components/composer/composer-query.js +1 -0
- package/dist/components/composer/composer-scroll-area.js +1 -0
- package/dist/components/composer/composer-session.js +3 -0
- package/dist/components/composer/composer-value.d.ts +45 -0
- package/dist/components/composer/composer-value.js +1 -0
- package/dist/components/composer/composer.css +80 -0
- package/dist/components/composer/composer.d.ts +72 -0
- package/dist/components/composer/composer.js +3 -0
- package/dist/components/composer/composer.styles.js +2 -0
- package/dist/components/composer/use-composer-editor.d.ts +8 -0
- package/dist/components/composer/use-composer-editor.js +2 -0
- package/dist/components/context-menu/context-menu-items.d.ts +10 -0
- package/dist/components/context-menu/context-menu-items.js +2 -0
- package/dist/components/context-menu/context-menu-utils.js +1 -0
- package/dist/components/context-menu/context-menu.d.ts +22 -0
- package/dist/components/context-menu/context-menu.js +1 -0
- package/dist/components/context-menu/context-menu.types.d.ts +57 -0
- package/dist/components/context-menu/context-menu.types.js +1 -0
- package/dist/components/conversation/conversation.d.ts +41 -0
- package/dist/components/conversation/conversation.js +6 -0
- package/dist/components/conversation/conversation.styles.js +2 -0
- package/dist/components/data-table/data-table.d.ts +30 -0
- package/dist/components/data-table/data-table.js +13 -0
- package/dist/components/data-table/data-table.styles.js +1 -0
- package/dist/components/data-table/grid-navigation.js +10 -0
- package/dist/components/date-picker/date-picker-date.js +1 -0
- package/dist/components/date-picker/date-picker-icon.js +1 -0
- package/dist/components/date-picker/date-picker-state.js +1 -0
- package/dist/components/date-picker/date-picker.d.ts +4 -0
- package/dist/components/date-picker/date-picker.js +1 -0
- package/dist/components/date-picker/date-picker.styles.js +1 -0
- package/dist/components/date-picker/date-picker.types.d.ts +28 -0
- package/dist/components/date-picker/date-picker.types.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-date.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-state.js +1 -0
- package/dist/components/date-range-picker/date-range-picker-views.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +4 -0
- package/dist/components/date-range-picker/date-range-picker.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.styles.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.types.d.ts +37 -0
- package/dist/components/date-range-picker/date-range-picker.types.js +1 -0
- package/dist/components/date-time-input/date-time-input.d.ts +13 -0
- package/dist/components/date-time-input/date-time-input.js +1 -0
- package/dist/components/diagram/diagram-renderer.js +5 -0
- package/dist/components/diagram/diagram.css +51 -0
- package/dist/components/diagram/diagram.d.ts +11 -0
- package/dist/components/diagram/diagram.js +4 -0
- package/dist/components/diagram/diagram.styles.js +6 -0
- package/dist/components/dialog/dialog.d.ts +34 -0
- package/dist/components/dialog/dialog.js +1 -0
- package/dist/components/dialog/dialog.styles.js +1 -0
- package/dist/components/distribution/distribution.d.ts +16 -0
- package/dist/components/distribution/distribution.js +6 -0
- package/dist/components/distribution/distribution.styles.js +1 -0
- package/dist/components/drawer/drawer-affordance.styles.js +1 -0
- package/dist/components/drawer/drawer-bar.js +1 -0
- package/dist/components/drawer/drawer-content.js +1 -0
- package/dist/components/drawer/drawer-layout.js +1 -0
- package/dist/components/drawer/drawer-menu.d.ts +30 -0
- package/dist/components/drawer/drawer-menu.js +1 -0
- package/dist/components/drawer/drawer-menu.styles.js +1 -0
- package/dist/components/drawer/drawer-positions.styles.js +1 -0
- package/dist/components/drawer/drawer.context.js +1 -0
- package/dist/components/drawer/drawer.d.ts +22 -0
- package/dist/components/drawer/drawer.js +2 -0
- package/dist/components/drawer/drawer.styles.js +1 -0
- package/dist/components/drawer/drawer.types.d.ts +53 -0
- package/dist/components/drawer/drawer.types.js +1 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +1 -0
- package/dist/components/empty/empty.styles.js +1 -0
- package/dist/components/error-state/error-state.d.ts +15 -0
- package/dist/components/error-state/error-state.js +1 -0
- package/dist/components/error-state/error-state.styles.js +1 -0
- package/dist/components/field/field-context.d.ts +33 -0
- package/dist/components/field/field-context.js +1 -0
- package/dist/components/field/field.d.ts +44 -0
- package/dist/components/field/field.js +3 -0
- package/dist/components/field/field.styles.js +1 -0
- package/dist/components/fieldset/fieldset.d.ts +14 -0
- package/dist/components/fieldset/fieldset.js +1 -0
- package/dist/components/fieldset/fieldset.styles.js +1 -0
- package/dist/components/file-upload/file-upload-context.js +1 -0
- package/dist/components/file-upload/file-upload-controls.d.ts +4 -0
- package/dist/components/file-upload/file-upload-controls.js +7 -0
- package/dist/components/file-upload/file-upload-item-preview.d.ts +5 -0
- package/dist/components/file-upload/file-upload-item-preview.js +3 -0
- package/dist/components/file-upload/file-upload-items.d.ts +8 -0
- package/dist/components/file-upload/file-upload-items.js +5 -0
- package/dist/components/file-upload/file-upload-motion.js +6 -0
- package/dist/components/file-upload/file-upload-validation.d.ts +18 -0
- package/dist/components/file-upload/file-upload-validation.js +1 -0
- package/dist/components/file-upload/file-upload.d.ts +19 -0
- package/dist/components/file-upload/file-upload.js +2 -0
- package/dist/components/file-upload/file-upload.styles.js +2 -0
- package/dist/components/file-upload/file-upload.types.d.ts +87 -0
- package/dist/components/file-upload/file-upload.types.js +1 -0
- package/dist/components/frame/frame.d.ts +13 -0
- package/dist/components/frame/frame.js +1 -0
- package/dist/components/frame/frame.styles.js +1 -0
- package/dist/components/funnel/funnel-flow.js +3 -0
- package/dist/components/funnel/funnel.d.ts +31 -0
- package/dist/components/funnel/funnel.js +4 -0
- package/dist/components/funnel/funnel.styles.js +1 -0
- package/dist/components/grid/grid.d.ts +5 -0
- package/dist/components/grid/grid.js +1 -0
- package/dist/components/grid/grid.styles.js +1 -0
- package/dist/components/group/group.d.ts +5 -0
- package/dist/components/group/group.js +1 -0
- package/dist/components/group/group.styles.js +1 -0
- package/dist/components/heading/heading.d.ts +10 -0
- package/dist/components/heading/heading.js +1 -0
- package/dist/components/heading/heading.styles.js +1 -0
- package/dist/components/heatmap/heatmap-scale.js +3 -0
- package/dist/components/heatmap/heatmap.d.ts +17 -0
- package/dist/components/heatmap/heatmap.js +2 -0
- package/dist/components/inline/inline.d.ts +5 -0
- package/dist/components/inline/inline.js +1 -0
- package/dist/components/inline/inline.styles.js +1 -0
- package/dist/components/inline-citation/citation-source.d.ts +27 -0
- package/dist/components/inline-citation/citation-source.js +13 -0
- package/dist/components/inline-citation/inline-citation.d.ts +22 -0
- package/dist/components/inline-citation/inline-citation.js +10 -0
- package/dist/components/inline-citation/inline-citation.styles.js +1 -0
- package/dist/components/input/input.d.ts +17 -0
- package/dist/components/input/input.js +3 -0
- package/dist/components/input/input.styles.js +1 -0
- package/dist/components/input-group/input-group.d.ts +17 -0
- package/dist/components/input-group/input-group.js +1 -0
- package/dist/components/input-group/input-group.styles.js +1 -0
- package/dist/components/kbd/kbd.d.ts +7 -0
- package/dist/components/kbd/kbd.js +1 -0
- package/dist/components/kbd/kbd.styles.js +1 -0
- package/dist/components/label/label.d.ts +5 -0
- package/dist/components/label/label.js +1 -0
- package/dist/components/label/label.styles.js +1 -0
- package/dist/components/lightbox/lightbox-gallery.d.ts +25 -0
- package/dist/components/lightbox/lightbox-gallery.js +6 -0
- package/dist/components/lightbox/lightbox.d.ts +30 -0
- package/dist/components/lightbox/lightbox.js +6 -0
- package/dist/components/lightbox/lightbox.styles.js +3 -0
- package/dist/components/link/link.d.ts +15 -0
- package/dist/components/link/link.js +1 -0
- package/dist/components/link/link.styles.js +1 -0
- package/dist/components/list/list.d.ts +10 -0
- package/dist/components/list/list.js +2 -0
- package/dist/components/list/list.styles.js +1 -0
- package/dist/components/markdown/markdown.d.ts +34 -0
- package/dist/components/markdown/markdown.js +8 -0
- package/dist/components/markdown/markdown.styles.js +1 -0
- package/dist/components/menu/menu-align-context.js +3 -0
- package/dist/components/menu/menu.d.ts +75 -0
- package/dist/components/menu/menu.js +2 -0
- package/dist/components/menu/menu.styles.js +1 -0
- package/dist/components/menubar/menubar.d.ts +13 -0
- package/dist/components/menubar/menubar.js +1 -0
- package/dist/components/menubar/menubar.styles.js +1 -0
- package/dist/components/message/message.d.ts +47 -0
- package/dist/components/message/message.js +16 -0
- package/dist/components/message/message.styles.js +3 -0
- package/dist/components/message-scroller/message-scroller-store.d.ts +58 -0
- package/dist/components/message-scroller/message-scroller-store.js +27 -0
- package/dist/components/message-scroller/message-scroller.d.ts +76 -0
- package/dist/components/message-scroller/message-scroller.js +30 -0
- package/dist/components/message-scroller/message-scroller.styles.js +4 -0
- package/dist/components/meter/meter.d.ts +30 -0
- package/dist/components/meter/meter.js +2 -0
- package/dist/components/meter/meter.styles.js +1 -0
- package/dist/components/metric/metric.d.ts +17 -0
- package/dist/components/metric/metric.js +4 -0
- package/dist/components/metric/metric.styles.js +1 -0
- package/dist/components/metric-trend/metric-trend.d.ts +26 -0
- package/dist/components/metric-trend/metric-trend.js +6 -0
- package/dist/components/metric-trend/metric-trend.styles.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +40 -0
- package/dist/components/navigation-menu/navigation-menu.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.styles.js +1 -0
- package/dist/components/number-field/number-field-context.js +1 -0
- package/dist/components/number-field/number-field.d.ts +11 -0
- package/dist/components/number-field/number-field.js +1 -0
- package/dist/components/number-field/number-field.styles.js +1 -0
- package/dist/components/number-field/number-field.types.d.ts +30 -0
- package/dist/components/number-field/number-field.types.js +1 -0
- package/dist/components/otp-field/otp-field.d.ts +21 -0
- package/dist/components/otp-field/otp-field.js +1 -0
- package/dist/components/otp-field/otp-field.styles.js +1 -0
- package/dist/components/overflow-list/overflow-list.d.ts +10 -0
- package/dist/components/overflow-list/overflow-list.js +3 -0
- package/dist/components/overflow-list/overflow-list.styles.js +1 -0
- package/dist/components/pagination/pagination-link.d.ts +10 -0
- package/dist/components/pagination/pagination-link.js +1 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/pagination.js +2 -0
- package/dist/components/pagination/pagination.styles.js +1 -0
- package/dist/components/part-to-whole/part-to-whole.d.ts +18 -0
- package/dist/components/part-to-whole/part-to-whole.js +2 -0
- package/dist/components/part-to-whole/part-to-whole.styles.js +1 -0
- package/dist/components/popover/popover.d.ts +33 -0
- package/dist/components/popover/popover.js +1 -0
- package/dist/components/popover/popover.styles.js +1 -0
- package/dist/components/preview-card/preview-card.d.ts +21 -0
- package/dist/components/preview-card/preview-card.js +1 -0
- package/dist/components/preview-card/preview-card.styles.js +1 -0
- package/dist/components/progress/progress.d.ts +28 -0
- package/dist/components/progress/progress.js +1 -0
- package/dist/components/progress/progress.styles.js +1 -0
- package/dist/components/progress-rings/progress-rings.d.ts +25 -0
- package/dist/components/progress-rings/progress-rings.js +2 -0
- package/dist/components/progress-rings/progress-rings.styles.js +1 -0
- package/dist/components/property-list/property-list.d.ts +9 -0
- package/dist/components/property-list/property-list.js +1 -0
- package/dist/components/property-list/property-list.styles.js +1 -0
- package/dist/components/question-card/question-card.d.ts +35 -0
- package/dist/components/question-card/question-card.js +13 -0
- package/dist/components/question-card/question-card.styles.js +1 -0
- package/dist/components/radar-chart/radar-chart.d.ts +28 -0
- package/dist/components/radar-chart/radar-chart.js +1 -0
- package/dist/components/radial-bars/radial-bars.d.ts +19 -0
- package/dist/components/radial-bars/radial-bars.js +8 -0
- package/dist/components/radio/radio-card.d.ts +15 -0
- package/dist/components/radio/radio-card.js +1 -0
- package/dist/components/radio/radio.d.ts +9 -0
- package/dist/components/radio/radio.js +1 -0
- package/dist/components/radio/radio.styles.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +3 -0
- package/dist/components/radio-group/radio-group.js +1 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts +16 -0
- package/dist/components/sankey-chart/sankey-chart.js +1 -0
- package/dist/components/sankey-chart/sankey-layout.d.ts +34 -0
- package/dist/components/sankey-chart/sankey-layout.js +5 -0
- package/dist/components/scatter-chart/scatter-chart.d.ts +30 -0
- package/dist/components/scatter-chart/scatter-chart.js +6 -0
- package/dist/components/scatter-chart/scatter-chart.styles.js +1 -0
- package/dist/components/score-gauge/score-gauge.d.ts +24 -0
- package/dist/components/score-gauge/score-gauge.js +8 -0
- package/dist/components/score-gauge/score-gauge.styles.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +26 -0
- package/dist/components/scroll-area/scroll-area.js +1 -0
- package/dist/components/scroll-area/scroll-area.styles.js +2 -0
- package/dist/components/section/section.d.ts +5 -0
- package/dist/components/section/section.js +1 -0
- package/dist/components/section/section.styles.js +1 -0
- package/dist/components/segmented-control/segmented-control.d.ts +10 -0
- package/dist/components/segmented-control/segmented-control.js +1 -0
- package/dist/components/segmented-control/segmented-control.styles.js +1 -0
- package/dist/components/select/select.d.ts +55 -0
- package/dist/components/select/select.js +1 -0
- package/dist/components/select/select.styles.js +1 -0
- package/dist/components/separator/separator.d.ts +5 -0
- package/dist/components/separator/separator.js +1 -0
- package/dist/components/separator/separator.styles.js +1 -0
- package/dist/components/sheet/sheet-layout.js +1 -0
- package/dist/components/sheet/sheet-positions.styles.js +1 -0
- package/dist/components/sheet/sheet.d.ts +15 -0
- package/dist/components/sheet/sheet.js +1 -0
- package/dist/components/sheet/sheet.styles.js +1 -0
- package/dist/components/sheet/sheet.types.d.ts +32 -0
- package/dist/components/sheet/sheet.types.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +8 -0
- package/dist/components/skeleton/skeleton.js +1 -0
- package/dist/components/skeleton/skeleton.styles.js +1 -0
- package/dist/components/slider/slider-context.d.ts +23 -0
- package/dist/components/slider/slider-context.js +9 -0
- package/dist/components/slider/slider-default-anatomy.js +1 -0
- package/dist/components/slider/slider-ref-utils.js +1 -0
- package/dist/components/slider/slider-slot.js +1 -0
- package/dist/components/slider/slider.d.ts +15 -0
- package/dist/components/slider/slider.js +1 -0
- package/dist/components/slider/slider.styles.js +1 -0
- package/dist/components/slider/slider.types.d.ts +36 -0
- package/dist/components/slider/slider.types.js +1 -0
- package/dist/components/sources/sources.d.ts +22 -0
- package/dist/components/sources/sources.js +6 -0
- package/dist/components/sources/sources.styles.js +3 -0
- package/dist/components/spacer/spacer.d.ts +5 -0
- package/dist/components/spacer/spacer.js +1 -0
- package/dist/components/spacer/spacer.styles.js +1 -0
- package/dist/components/spinner/spinner.d.ts +18 -0
- package/dist/components/spinner/spinner.js +9 -0
- package/dist/components/spinner/spinner.styles.js +11 -0
- package/dist/components/stack/stack.d.ts +9 -0
- package/dist/components/stack/stack.js +1 -0
- package/dist/components/stack/stack.styles.d.ts +76 -0
- package/dist/components/stack/stack.styles.js +2 -0
- package/dist/components/status-dot/status-dot.d.ts +9 -0
- package/dist/components/status-dot/status-dot.js +1 -0
- package/dist/components/status-dot/status-dot.styles.js +1 -0
- package/dist/components/stepper/stepper.d.ts +42 -0
- package/dist/components/stepper/stepper.js +2 -0
- package/dist/components/stepper/stepper.styles.js +1 -0
- package/dist/components/streaming-text/streaming-text-words.d.ts +29 -0
- package/dist/components/streaming-text/streaming-text-words.js +19 -0
- package/dist/components/streaming-text/streaming-text.d.ts +35 -0
- package/dist/components/streaming-text/streaming-text.js +13 -0
- package/dist/components/streaming-text/streaming-text.styles.js +6 -0
- package/dist/components/suggestion/suggestion.d.ts +23 -0
- package/dist/components/suggestion/suggestion.js +7 -0
- package/dist/components/suggestion/suggestion.styles.js +3 -0
- package/dist/components/switch/switch.d.ts +12 -0
- package/dist/components/switch/switch.js +1 -0
- package/dist/components/switch/switch.styles.js +1 -0
- package/dist/components/table/table.d.ts +64 -0
- package/dist/components/table/table.js +1 -0
- package/dist/components/table/table.styles.js +1 -0
- package/dist/components/tabs/tabs.d.ts +32 -0
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/tabs/tabs.styles.js +1 -0
- package/dist/components/task-list/task-list.d.ts +34 -0
- package/dist/components/task-list/task-list.js +10 -0
- package/dist/components/task-list/task-list.styles.js +2 -0
- package/dist/components/terminal/ansi.js +11 -0
- package/dist/components/terminal/terminal.d.ts +23 -0
- package/dist/components/terminal/terminal.js +15 -0
- package/dist/components/terminal/terminal.styles.js +1 -0
- package/dist/components/text/text.d.ts +11 -0
- package/dist/components/text/text.js +1 -0
- package/dist/components/text/text.styles.js +1 -0
- package/dist/components/textarea/textarea.d.ts +13 -0
- package/dist/components/textarea/textarea.js +3 -0
- package/dist/components/textarea/textarea.styles.js +1 -0
- package/dist/components/thumbnail/thumbnail.d.ts +9 -0
- package/dist/components/thumbnail/thumbnail.js +2 -0
- package/dist/components/thumbnail/thumbnail.styles.js +1 -0
- package/dist/components/time-input/time-input.d.ts +13 -0
- package/dist/components/time-input/time-input.js +1 -0
- package/dist/components/time-series/time-format.d.ts +16 -0
- package/dist/components/time-series/time-format.js +10 -0
- package/dist/components/time-series/time-series.d.ts +30 -0
- package/dist/components/time-series/time-series.js +10 -0
- package/dist/components/time-series/time-series.styles.js +1 -0
- package/dist/components/timestamp/timestamp.d.ts +15 -0
- package/dist/components/timestamp/timestamp.js +4 -0
- package/dist/components/timestamp/timestamp.styles.js +1 -0
- package/dist/components/toast/toast-anchored.styles.js +1 -0
- package/dist/components/toast/toast-animation.styles.js +1 -0
- package/dist/components/toast/toast-icons.js +1 -0
- package/dist/components/toast/toast-stacked.styles.js +1 -0
- package/dist/components/toast/toast-utils.js +1 -0
- package/dist/components/toast/toast-views.js +1 -0
- package/dist/components/toast/toast.d.ts +8 -0
- package/dist/components/toast/toast.js +1 -0
- package/dist/components/toast/toast.styles.js +1 -0
- package/dist/components/toast/toast.types.d.ts +18 -0
- package/dist/components/toast/toast.types.js +1 -0
- package/dist/components/toggle/toggle-colors.stylex.js +2 -0
- package/dist/components/toggle/toggle.d.ts +33 -0
- package/dist/components/toggle/toggle.js +1 -0
- package/dist/components/toggle/toggle.styles.js +1 -0
- package/dist/components/token/token.d.ts +16 -0
- package/dist/components/token/token.js +1 -0
- package/dist/components/token/token.styles.js +1 -0
- package/dist/components/tool-call/tool-call-group.d.ts +17 -0
- package/dist/components/tool-call/tool-call-group.js +6 -0
- package/dist/components/tool-call/tool-call.d.ts +36 -0
- package/dist/components/tool-call/tool-call.js +12 -0
- package/dist/components/tool-call/tool-call.styles.js +3 -0
- package/dist/components/toolbar/toolbar-context.js +2 -0
- package/dist/components/toolbar/toolbar.d.ts +37 -0
- package/dist/components/toolbar/toolbar.js +1 -0
- package/dist/components/toolbar/toolbar.styles.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.js +1 -0
- package/dist/components/tooltip/tooltip.styles.js +1 -0
- package/dist/components/tree/tree.d.ts +31 -0
- package/dist/components/tree/tree.js +5 -0
- package/dist/components/tree/tree.styles.js +3 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +6 -0
- package/dist/components/visually-hidden/visually-hidden.js +1 -0
- package/dist/components/visually-hidden/visually-hidden.styles.js +1 -0
- package/dist/control-label.js +3 -0
- package/dist/copy-button.js +1 -0
- package/dist/form.d.ts +2 -0
- package/dist/form.js +2 -0
- package/dist/icon-masks.stylex.js +3 -0
- package/dist/icons.js +5 -0
- package/dist/index.d.ts +275 -0
- package/dist/index.js +1 -0
- package/dist/loading-indicator.js +3 -0
- package/dist/motion.js +9 -0
- package/dist/ref-utils.js +1 -0
- package/dist/render-utils.js +3 -0
- package/dist/styles/application-structure.stylex.js +1 -0
- package/dist/styles/colors.stylex.d.ts +50 -0
- package/dist/styles/colors.stylex.js +1 -0
- package/dist/styles/conditions.stylex.d.ts +9 -0
- package/dist/styles/conditions.stylex.js +1 -0
- package/dist/styles/dimensions.stylex.d.ts +14 -0
- package/dist/styles/dimensions.stylex.js +1 -0
- package/dist/styles/floating-item-colors.stylex.js +1 -0
- package/dist/styles/fonts.stylex.d.ts +5 -0
- package/dist/styles/fonts.stylex.js +1 -0
- package/dist/styles/interaction.stylex.d.ts +23 -0
- package/dist/styles/interaction.stylex.js +4 -0
- package/dist/styles/motion.stylex.d.ts +22 -0
- package/dist/styles/motion.stylex.js +3 -0
- package/dist/styles/overlay-layers.styles.js +1 -0
- package/dist/styles/palette.stylex.d.ts +26 -0
- package/dist/styles/palette.stylex.js +1 -0
- package/dist/styles/shadows.stylex.d.ts +10 -0
- package/dist/styles/shadows.stylex.js +1 -0
- package/dist/styles/shape.stylex.d.ts +9 -0
- package/dist/styles/shape.stylex.js +1 -0
- package/dist/styles/spacing.stylex.d.ts +14 -0
- package/dist/styles/spacing.stylex.js +3 -0
- package/dist/styles/themes.d.ts +49 -0
- package/dist/styles/themes.js +1 -0
- package/dist/styles/typography.styles.d.ts +90 -0
- package/dist/styles/typography.styles.js +8 -0
- package/dist/styles/typography.stylex.d.ts +35 -0
- package/dist/styles/typography.stylex.js +5 -0
- package/dist/styles.css +2125 -0
- package/dist/theme/index.d.ts +11 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/initialize.d.ts +4 -0
- package/dist/theme/initialize.js +1 -0
- package/dist/theme/theme-provider.d.ts +3 -0
- package/dist/theme/theme-provider.js +4 -0
- package/dist/theme/theme-root.js +1 -0
- package/dist/theme/theme-script.d.ts +3 -0
- package/dist/theme/theme-script.js +1 -0
- package/dist/theme/theme-storage.js +1 -0
- package/dist/theme/theme-tokens.js +1 -0
- package/dist/theme/theme-transition-guard.js +1 -0
- package/dist/theme/types.d.ts +25 -0
- package/dist/theme/types.js +1 -0
- package/dist/use-copy-to-clipboard.d.ts +17 -0
- package/dist/use-copy-to-clipboard.js +6 -0
- package/dist/use-elapsed.js +4 -0
- package/package.json +769 -3
- package/src/closed.ts +7 -0
- package/src/components/accordion/accordion.styles.ts +246 -0
- package/src/components/accordion/accordion.tsx +221 -0
- package/src/components/activity-feed/activity-feed.styles.ts +135 -0
- package/src/components/activity-feed/activity-feed.tsx +182 -0
- package/src/components/agent-thinking/agent-thinking.styles.ts +140 -0
- package/src/components/agent-thinking/agent-thinking.tsx +275 -0
- package/src/components/alert/alert.styles.ts +135 -0
- package/src/components/alert/alert.stylex.ts +6 -0
- package/src/components/alert/alert.tsx +123 -0
- package/src/components/alert-dialog/alert-dialog.styles.ts +29 -0
- package/src/components/alert-dialog/alert-dialog.tsx +197 -0
- package/src/components/approval-card/approval-card.styles.ts +69 -0
- package/src/components/approval-card/approval-card.tsx +379 -0
- package/src/components/area-chart/area-chart.styles.ts +14 -0
- package/src/components/area-chart/area-chart.tsx +571 -0
- package/src/components/aspect-ratio/aspect-ratio.styles.ts +20 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +43 -0
- package/src/components/attachment/attachment.styles.ts +71 -0
- package/src/components/attachment/attachment.tsx +132 -0
- package/src/components/avatar/avatar-character.styles.ts +32 -0
- package/src/components/avatar/avatar.styles.ts +118 -0
- package/src/components/avatar/avatar.tsx +262 -0
- package/src/components/badge/badge.styles.ts +116 -0
- package/src/components/badge/badge.tsx +66 -0
- package/src/components/bar-list/bar-list.styles.ts +72 -0
- package/src/components/bar-list/bar-list.tsx +157 -0
- package/src/components/blockquote/blockquote.styles.ts +26 -0
- package/src/components/blockquote/blockquote.tsx +75 -0
- package/src/components/breadcrumb/breadcrumb-link.tsx +32 -0
- package/src/components/breadcrumb/breadcrumb.styles.ts +114 -0
- package/src/components/breadcrumb/breadcrumb.tsx +137 -0
- package/src/components/button/button-colors.stylex.ts +7 -0
- package/src/components/button/button.css +16 -0
- package/src/components/button/button.css.d.ts +1 -0
- package/src/components/button/button.styles.ts +457 -0
- package/src/components/button/button.tsx +168 -0
- package/src/components/button-group/button-group.css +115 -0
- package/src/components/button-group/button-group.styles.ts +24 -0
- package/src/components/button-group/button-group.tsx +46 -0
- package/src/components/calendar/calendar-components.tsx +187 -0
- package/src/components/calendar/calendar-context.ts +16 -0
- package/src/components/calendar/calendar-dropdowns.tsx +84 -0
- package/src/components/calendar/calendar-utils.ts +67 -0
- package/src/components/calendar/calendar.styles.ts +270 -0
- package/src/components/calendar/calendar.tsx +244 -0
- package/src/components/calendar/calendar.types.ts +55 -0
- package/src/components/calendar-heatmap/calendar-heatmap.tsx +384 -0
- package/src/components/card/card.styles.ts +122 -0
- package/src/components/card/card.tsx +154 -0
- package/src/components/carousel/carousel.styles.ts +142 -0
- package/src/components/carousel/carousel.tsx +786 -0
- package/src/components/category-comparison/category-comparison.styles.ts +14 -0
- package/src/components/category-comparison/category-comparison.tsx +567 -0
- package/src/components/chart-frame/arc-path.ts +33 -0
- package/src/components/chart-frame/chart-assert.ts +47 -0
- package/src/components/chart-frame/chart-colors.ts +14 -0
- package/src/components/chart-frame/chart-crosshair.ts +129 -0
- package/src/components/chart-frame/chart-data-table.tsx +15 -0
- package/src/components/chart-frame/chart-frame.styles.ts +48 -0
- package/src/components/chart-frame/chart-frame.tsx +223 -0
- package/src/components/chart-frame/chart-hover.tsx +127 -0
- package/src/components/chart-frame/chart-loading.tsx +130 -0
- package/src/components/chart-frame/ring-graphic.tsx +100 -0
- package/src/components/chart-legend/chart-legend.styles.ts +80 -0
- package/src/components/chart-legend/chart-legend.tsx +107 -0
- package/src/components/chart-tooltip/chart-tooltip.styles.ts +71 -0
- package/src/components/chart-tooltip/chart-tooltip.tsx +94 -0
- package/src/components/checkbox/checkbox-card.styles.ts +75 -0
- package/src/components/checkbox/checkbox-card.tsx +71 -0
- package/src/components/checkbox/checkbox.styles.ts +199 -0
- package/src/components/checkbox/checkbox.tsx +104 -0
- package/src/components/checkbox-group/checkbox-group.styles.ts +11 -0
- package/src/components/checkbox-group/checkbox-group.tsx +29 -0
- package/src/components/citation/citation.styles.ts +7 -0
- package/src/components/citation/citation.tsx +30 -0
- package/src/components/code/code.styles.ts +22 -0
- package/src/components/code/code.tsx +22 -0
- package/src/components/code-block/code-block-copy.tsx +62 -0
- package/src/components/code-block/code-block-highlight.tsx +69 -0
- package/src/components/code-block/code-block.styles.ts +129 -0
- package/src/components/code-block/code-block.tsx +128 -0
- package/src/components/collapsible/collapsible.styles.ts +22 -0
- package/src/components/collapsible/collapsible.tsx +109 -0
- package/src/components/combobox/combobox-chips.styles.ts +182 -0
- package/src/components/combobox/combobox-chips.tsx +164 -0
- package/src/components/combobox/combobox-context.tsx +26 -0
- package/src/components/combobox/combobox-field.styles.ts +156 -0
- package/src/components/combobox/combobox-input.tsx +185 -0
- package/src/components/combobox/combobox-popup.styles.ts +190 -0
- package/src/components/combobox/combobox-popup.tsx +113 -0
- package/src/components/combobox/combobox-structure.tsx +138 -0
- package/src/components/combobox/combobox.tsx +162 -0
- package/src/components/combobox/combobox.types.ts +77 -0
- package/src/components/command/command-dialog.styles.ts +43 -0
- package/src/components/command/command-dialog.tsx +126 -0
- package/src/components/command/command-field.styles.ts +59 -0
- package/src/components/command/command-input.tsx +59 -0
- package/src/components/command/command-items.styles.ts +169 -0
- package/src/components/command/command-items.tsx +99 -0
- package/src/components/command/command-structure.tsx +172 -0
- package/src/components/command/command.tsx +157 -0
- package/src/components/command/command.types.ts +58 -0
- package/src/components/composer/attachment-marker.stylex.ts +4 -0
- package/src/components/composer/composer-clipboard.ts +49 -0
- package/src/components/composer/composer-context-meter.tsx +179 -0
- package/src/components/composer/composer-dictation.tsx +56 -0
- package/src/components/composer/composer-document.ts +508 -0
- package/src/components/composer/composer-editor.ts +544 -0
- package/src/components/composer/composer-history.ts +74 -0
- package/src/components/composer/composer-options.ts +51 -0
- package/src/components/composer/composer-parts.styles.ts +456 -0
- package/src/components/composer/composer-parts.tsx +245 -0
- package/src/components/composer/composer-picker.tsx +375 -0
- package/src/components/composer/composer-progress-ring.tsx +44 -0
- package/src/components/composer/composer-query.ts +52 -0
- package/src/components/composer/composer-scroll-area.tsx +29 -0
- package/src/components/composer/composer-session.ts +593 -0
- package/src/components/composer/composer-value.ts +46 -0
- package/src/components/composer/composer.css +80 -0
- package/src/components/composer/composer.styles.ts +236 -0
- package/src/components/composer/composer.tsx +581 -0
- package/src/components/composer/use-composer-editor.ts +153 -0
- package/src/components/context-menu/context-menu-items.tsx +230 -0
- package/src/components/context-menu/context-menu-utils.tsx +65 -0
- package/src/components/context-menu/context-menu.tsx +198 -0
- package/src/components/context-menu/context-menu.types.ts +97 -0
- package/src/components/conversation/conversation.styles.ts +56 -0
- package/src/components/conversation/conversation.tsx +142 -0
- package/src/components/data-table/data-table.styles.ts +63 -0
- package/src/components/data-table/data-table.tsx +723 -0
- package/src/components/data-table/grid-navigation.ts +186 -0
- package/src/components/date-picker/date-picker-date.ts +142 -0
- package/src/components/date-picker/date-picker-icon.tsx +6 -0
- package/src/components/date-picker/date-picker-state.ts +193 -0
- package/src/components/date-picker/date-picker.styles.ts +53 -0
- package/src/components/date-picker/date-picker.tsx +213 -0
- package/src/components/date-picker/date-picker.types.ts +32 -0
- package/src/components/date-range-picker/date-range-picker-date.ts +191 -0
- package/src/components/date-range-picker/date-range-picker-state.ts +235 -0
- package/src/components/date-range-picker/date-range-picker-views.tsx +144 -0
- package/src/components/date-range-picker/date-range-picker.styles.ts +80 -0
- package/src/components/date-range-picker/date-range-picker.tsx +208 -0
- package/src/components/date-range-picker/date-range-picker.types.ts +41 -0
- package/src/components/date-time-input/date-time-input.tsx +30 -0
- package/src/components/diagram/diagram-renderer.ts +35 -0
- package/src/components/diagram/diagram.css +51 -0
- package/src/components/diagram/diagram.styles.ts +130 -0
- package/src/components/diagram/diagram.tsx +238 -0
- package/src/components/dialog/dialog.styles.ts +226 -0
- package/src/components/dialog/dialog.tsx +227 -0
- package/src/components/distribution/distribution.styles.ts +14 -0
- package/src/components/distribution/distribution.tsx +450 -0
- package/src/components/drawer/drawer-affordance.styles.ts +61 -0
- package/src/components/drawer/drawer-bar.tsx +53 -0
- package/src/components/drawer/drawer-content.tsx +25 -0
- package/src/components/drawer/drawer-layout.tsx +129 -0
- package/src/components/drawer/drawer-menu.styles.ts +52 -0
- package/src/components/drawer/drawer-menu.tsx +222 -0
- package/src/components/drawer/drawer-positions.styles.ts +138 -0
- package/src/components/drawer/drawer.context.tsx +25 -0
- package/src/components/drawer/drawer.styles.ts +233 -0
- package/src/components/drawer/drawer.tsx +278 -0
- package/src/components/drawer/drawer.types.ts +85 -0
- package/src/components/empty/empty.styles.ts +118 -0
- package/src/components/empty/empty.tsx +175 -0
- package/src/components/error-state/error-state.styles.ts +97 -0
- package/src/components/error-state/error-state.tsx +151 -0
- package/src/components/field/field-context.ts +83 -0
- package/src/components/field/field.styles.ts +141 -0
- package/src/components/field/field.tsx +212 -0
- package/src/components/fieldset/fieldset.styles.ts +28 -0
- package/src/components/fieldset/fieldset.tsx +68 -0
- package/src/components/file-upload/file-upload-context.tsx +191 -0
- package/src/components/file-upload/file-upload-controls.tsx +280 -0
- package/src/components/file-upload/file-upload-item-preview.tsx +56 -0
- package/src/components/file-upload/file-upload-items.tsx +339 -0
- package/src/components/file-upload/file-upload-motion.ts +85 -0
- package/src/components/file-upload/file-upload-validation.ts +141 -0
- package/src/components/file-upload/file-upload.styles.ts +426 -0
- package/src/components/file-upload/file-upload.tsx +278 -0
- package/src/components/file-upload/file-upload.types.ts +161 -0
- package/src/components/frame/frame.styles.ts +66 -0
- package/src/components/frame/frame.tsx +126 -0
- package/src/components/funnel/funnel-flow.tsx +198 -0
- package/src/components/funnel/funnel.styles.ts +73 -0
- package/src/components/funnel/funnel.tsx +177 -0
- package/src/components/grid/grid.styles.ts +15 -0
- package/src/components/grid/grid.tsx +22 -0
- package/src/components/group/group.styles.ts +13 -0
- package/src/components/group/group.tsx +22 -0
- package/src/components/heading/heading.styles.ts +10 -0
- package/src/components/heading/heading.tsx +52 -0
- package/src/components/heatmap/heatmap-scale.tsx +92 -0
- package/src/components/heatmap/heatmap.tsx +402 -0
- package/src/components/inline/inline.styles.ts +13 -0
- package/src/components/inline/inline.tsx +22 -0
- package/src/components/inline-citation/citation-source.tsx +105 -0
- package/src/components/inline-citation/inline-citation.styles.ts +94 -0
- package/src/components/inline-citation/inline-citation.tsx +199 -0
- package/src/components/input/input.styles.ts +95 -0
- package/src/components/input/input.tsx +147 -0
- package/src/components/input-group/input-group.styles.ts +183 -0
- package/src/components/input-group/input-group.tsx +215 -0
- package/src/components/kbd/kbd.styles.ts +42 -0
- package/src/components/kbd/kbd.tsx +70 -0
- package/src/components/label/label.styles.ts +8 -0
- package/src/components/label/label.tsx +29 -0
- package/src/components/lightbox/lightbox-gallery.tsx +208 -0
- package/src/components/lightbox/lightbox.styles.ts +196 -0
- package/src/components/lightbox/lightbox.tsx +137 -0
- package/src/components/link/link.styles.ts +41 -0
- package/src/components/link/link.tsx +48 -0
- package/src/components/list/list.styles.ts +49 -0
- package/src/components/list/list.tsx +105 -0
- package/src/components/markdown/markdown.styles.ts +104 -0
- package/src/components/markdown/markdown.tsx +268 -0
- package/src/components/menu/menu-align-context.ts +8 -0
- package/src/components/menu/menu.styles.ts +281 -0
- package/src/components/menu/menu.tsx +485 -0
- package/src/components/menubar/menubar.styles.ts +97 -0
- package/src/components/menubar/menubar.tsx +89 -0
- package/src/components/message/message.styles.ts +145 -0
- package/src/components/message/message.tsx +501 -0
- package/src/components/message-scroller/message-scroller-store.ts +457 -0
- package/src/components/message-scroller/message-scroller.styles.ts +177 -0
- package/src/components/message-scroller/message-scroller.tsx +417 -0
- package/src/components/meter/meter.styles.ts +48 -0
- package/src/components/meter/meter.tsx +176 -0
- package/src/components/metric/metric.styles.ts +64 -0
- package/src/components/metric/metric.tsx +134 -0
- package/src/components/metric-trend/metric-trend.styles.ts +103 -0
- package/src/components/metric-trend/metric-trend.tsx +188 -0
- package/src/components/navigation-menu/navigation-menu.styles.ts +183 -0
- package/src/components/navigation-menu/navigation-menu.tsx +255 -0
- package/src/components/number-field/number-field-context.tsx +46 -0
- package/src/components/number-field/number-field.styles.ts +229 -0
- package/src/components/number-field/number-field.tsx +268 -0
- package/src/components/number-field/number-field.types.ts +46 -0
- package/src/components/otp-field/otp-field.styles.ts +138 -0
- package/src/components/otp-field/otp-field.tsx +174 -0
- package/src/components/overflow-list/overflow-list.styles.ts +25 -0
- package/src/components/overflow-list/overflow-list.tsx +84 -0
- package/src/components/pagination/pagination-link.tsx +96 -0
- package/src/components/pagination/pagination.styles.ts +137 -0
- package/src/components/pagination/pagination.tsx +153 -0
- package/src/components/part-to-whole/part-to-whole.styles.ts +56 -0
- package/src/components/part-to-whole/part-to-whole.tsx +329 -0
- package/src/components/popover/popover.styles.ts +177 -0
- package/src/components/popover/popover.tsx +197 -0
- package/src/components/preview-card/preview-card.styles.ts +61 -0
- package/src/components/preview-card/preview-card.tsx +94 -0
- package/src/components/progress/progress.styles.ts +82 -0
- package/src/components/progress/progress.tsx +153 -0
- package/src/components/progress-rings/progress-rings.styles.ts +65 -0
- package/src/components/progress-rings/progress-rings.tsx +163 -0
- package/src/components/property-list/property-list.styles.ts +49 -0
- package/src/components/property-list/property-list.tsx +91 -0
- package/src/components/question-card/question-card.styles.ts +106 -0
- package/src/components/question-card/question-card.tsx +525 -0
- package/src/components/radar-chart/radar-chart.tsx +281 -0
- package/src/components/radial-bars/radial-bars.tsx +197 -0
- package/src/components/radio/radio-card.tsx +57 -0
- package/src/components/radio/radio.styles.ts +57 -0
- package/src/components/radio/radio.tsx +61 -0
- package/src/components/radio-group/radio-group.tsx +29 -0
- package/src/components/sankey-chart/sankey-chart.tsx +340 -0
- package/src/components/sankey-chart/sankey-layout.ts +107 -0
- package/src/components/scatter-chart/scatter-chart.styles.ts +7 -0
- package/src/components/scatter-chart/scatter-chart.tsx +509 -0
- package/src/components/score-gauge/score-gauge.styles.ts +77 -0
- package/src/components/score-gauge/score-gauge.tsx +236 -0
- package/src/components/scroll-area/scroll-area.styles.ts +174 -0
- package/src/components/scroll-area/scroll-area.tsx +202 -0
- package/src/components/section/section.styles.ts +11 -0
- package/src/components/section/section.tsx +29 -0
- package/src/components/segmented-control/segmented-control.styles.ts +107 -0
- package/src/components/segmented-control/segmented-control.tsx +98 -0
- package/src/components/select/select.styles.ts +295 -0
- package/src/components/select/select.tsx +335 -0
- package/src/components/separator/separator.styles.ts +14 -0
- package/src/components/separator/separator.tsx +24 -0
- package/src/components/sheet/sheet-layout.tsx +92 -0
- package/src/components/sheet/sheet-positions.styles.ts +104 -0
- package/src/components/sheet/sheet.styles.ts +209 -0
- package/src/components/sheet/sheet.tsx +182 -0
- package/src/components/sheet/sheet.types.ts +67 -0
- package/src/components/skeleton/skeleton.styles.ts +52 -0
- package/src/components/skeleton/skeleton.tsx +35 -0
- package/src/components/slider/slider-context.tsx +414 -0
- package/src/components/slider/slider-default-anatomy.tsx +71 -0
- package/src/components/slider/slider-ref-utils.ts +16 -0
- package/src/components/slider/slider-slot.ts +7 -0
- package/src/components/slider/slider.styles.ts +368 -0
- package/src/components/slider/slider.tsx +303 -0
- package/src/components/slider/slider.types.ts +57 -0
- package/src/components/sources/sources.styles.ts +105 -0
- package/src/components/sources/sources.tsx +150 -0
- package/src/components/spacer/spacer.styles.ts +11 -0
- package/src/components/spacer/spacer.tsx +25 -0
- package/src/components/spinner/spinner.styles.ts +231 -0
- package/src/components/spinner/spinner.tsx +153 -0
- package/src/components/stack/stack.styles.ts +37 -0
- package/src/components/stack/stack.tsx +34 -0
- package/src/components/status-dot/status-dot.styles.ts +27 -0
- package/src/components/status-dot/status-dot.tsx +55 -0
- package/src/components/stepper/stepper.styles.ts +564 -0
- package/src/components/stepper/stepper.tsx +349 -0
- package/src/components/streaming-text/streaming-text-words.tsx +275 -0
- package/src/components/streaming-text/streaming-text.styles.ts +166 -0
- package/src/components/streaming-text/streaming-text.tsx +299 -0
- package/src/components/suggestion/suggestion.styles.ts +55 -0
- package/src/components/suggestion/suggestion.tsx +125 -0
- package/src/components/switch/switch.styles.ts +195 -0
- package/src/components/switch/switch.tsx +69 -0
- package/src/components/table/table.styles.ts +198 -0
- package/src/components/table/table.tsx +290 -0
- package/src/components/tabs/tabs.styles.ts +245 -0
- package/src/components/tabs/tabs.tsx +186 -0
- package/src/components/task-list/task-list.styles.ts +82 -0
- package/src/components/task-list/task-list.tsx +430 -0
- package/src/components/terminal/ansi.ts +86 -0
- package/src/components/terminal/terminal.styles.ts +20 -0
- package/src/components/terminal/terminal.tsx +339 -0
- package/src/components/text/text.styles.ts +8 -0
- package/src/components/text/text.tsx +47 -0
- package/src/components/textarea/textarea.styles.ts +85 -0
- package/src/components/textarea/textarea.tsx +163 -0
- package/src/components/thumbnail/thumbnail.styles.ts +33 -0
- package/src/components/thumbnail/thumbnail.tsx +63 -0
- package/src/components/time-input/time-input.tsx +30 -0
- package/src/components/time-series/time-format.ts +172 -0
- package/src/components/time-series/time-series.styles.ts +18 -0
- package/src/components/time-series/time-series.tsx +521 -0
- package/src/components/timestamp/timestamp.styles.ts +9 -0
- package/src/components/timestamp/timestamp.tsx +162 -0
- package/src/components/toast/toast-anchored.styles.ts +146 -0
- package/src/components/toast/toast-animation.styles.ts +64 -0
- package/src/components/toast/toast-icons.tsx +58 -0
- package/src/components/toast/toast-stacked.styles.ts +129 -0
- package/src/components/toast/toast-utils.ts +53 -0
- package/src/components/toast/toast-views.tsx +223 -0
- package/src/components/toast/toast.styles.ts +198 -0
- package/src/components/toast/toast.tsx +59 -0
- package/src/components/toast/toast.types.ts +41 -0
- package/src/components/toggle/toggle-colors.stylex.ts +27 -0
- package/src/components/toggle/toggle.styles.ts +267 -0
- package/src/components/toggle/toggle.tsx +193 -0
- package/src/components/token/token.styles.ts +135 -0
- package/src/components/token/token.tsx +208 -0
- package/src/components/tool-call/tool-call-group.tsx +147 -0
- package/src/components/tool-call/tool-call.styles.ts +146 -0
- package/src/components/tool-call/tool-call.tsx +324 -0
- package/src/components/toolbar/toolbar-context.ts +6 -0
- package/src/components/toolbar/toolbar.styles.ts +120 -0
- package/src/components/toolbar/toolbar.tsx +219 -0
- package/src/components/tooltip/tooltip.styles.ts +104 -0
- package/src/components/tooltip/tooltip.tsx +106 -0
- package/src/components/tree/tree.styles.ts +133 -0
- package/src/components/tree/tree.tsx +862 -0
- package/src/components/visually-hidden/visually-hidden.styles.ts +15 -0
- package/src/components/visually-hidden/visually-hidden.tsx +36 -0
- package/src/control-label.tsx +48 -0
- package/src/copy-button.tsx +38 -0
- package/src/form.ts +44 -0
- package/src/icon-masks.stylex.ts +7 -0
- package/src/icons.ts +43 -0
- package/src/index.ts +1392 -0
- package/src/loading-indicator.tsx +45 -0
- package/src/motion.tsx +124 -0
- package/src/ref-utils.ts +27 -0
- package/src/render-utils.ts +35 -0
- package/src/styles/application-structure.stylex.ts +5 -0
- package/src/styles/colors.stylex.ts +64 -0
- package/src/styles/conditions.stylex.ts +10 -0
- package/src/styles/dimensions.stylex.ts +17 -0
- package/src/styles/floating-item-colors.stylex.ts +22 -0
- package/src/styles/fonts.stylex.ts +9 -0
- package/src/styles/interaction.stylex.ts +34 -0
- package/src/styles/motion.stylex.ts +28 -0
- package/src/styles/overlay-layers.styles.ts +26 -0
- package/src/styles/palette.stylex.ts +28 -0
- package/src/styles/shadows.stylex.ts +14 -0
- package/src/styles/shape.stylex.ts +11 -0
- package/src/styles/spacing.stylex.ts +18 -0
- package/src/styles/themes.ts +57 -0
- package/src/styles/typography.styles.ts +116 -0
- package/src/styles/typography.stylex.ts +44 -0
- package/src/theme/index.ts +25 -0
- package/src/theme/initialize.ts +31 -0
- package/src/theme/theme-provider.tsx +189 -0
- package/src/theme/theme-root.ts +37 -0
- package/src/theme/theme-script.tsx +35 -0
- package/src/theme/theme-storage.ts +256 -0
- package/src/theme/theme-tokens.ts +11 -0
- package/src/theme/theme-transition-guard.ts +102 -0
- package/src/theme/types.ts +33 -0
- package/src/use-copy-to-clipboard.ts +57 -0
- package/src/use-elapsed.ts +40 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { create } from "@stylexjs/stylex";
|
|
2
|
+
import { space } from "../../styles/spacing.stylex";
|
|
3
|
+
|
|
4
|
+
export const categoryComparisonStyles = create({
|
|
5
|
+
empty: {
|
|
6
|
+
marginBlock: 0,
|
|
7
|
+
},
|
|
8
|
+
legend: {
|
|
9
|
+
marginBlockStart: space["2"],
|
|
10
|
+
},
|
|
11
|
+
root: {
|
|
12
|
+
minWidth: 0,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { props } from "@stylexjs/stylex";
|
|
4
|
+
import { barX, barY, defineChart, group } from "@tanstack/charts";
|
|
5
|
+
import { decorative } from "@tanstack/charts/mark/decorative";
|
|
6
|
+
import type { ChartTooltipBodyRenderContext } from "@tanstack/charts/react/tooltip";
|
|
7
|
+
import { scaleBand } from "@tanstack/charts/scales/band";
|
|
8
|
+
import { scaleLinear } from "@tanstack/charts/scales/linear";
|
|
9
|
+
import { tooltip as tooltipFeature } from "@tanstack/charts/tooltip";
|
|
10
|
+
import type { ComponentPropsWithRef } from "react";
|
|
11
|
+
import { useMemo } from "react";
|
|
12
|
+
import type { Closed } from "../../closed";
|
|
13
|
+
import { colors } from "../../styles/colors.stylex";
|
|
14
|
+
import { typeRoles } from "../../styles/typography.styles";
|
|
15
|
+
import { type ChartSeriesTone, chartColors } from "../chart-frame/chart-colors";
|
|
16
|
+
import { bandCrosshair } from "../chart-frame/chart-crosshair";
|
|
17
|
+
import { ChartFrame } from "../chart-frame/chart-frame";
|
|
18
|
+
import { ChartLegend } from "../chart-legend/chart-legend";
|
|
19
|
+
import { ChartTooltip } from "../chart-tooltip/chart-tooltip";
|
|
20
|
+
import { categoryComparisonStyles } from "./category-comparison.styles";
|
|
21
|
+
|
|
22
|
+
export interface CategoryComparisonDatum {
|
|
23
|
+
/** A reference value, such as last year, drawn as a muted bar beside value. */
|
|
24
|
+
comparison?: number;
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
value: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type CategoryComparisonOrientation = "horizontal" | "vertical";
|
|
31
|
+
|
|
32
|
+
export type CategoryComparisonProps = Omit<
|
|
33
|
+
Closed<ComponentPropsWithRef<"div">>,
|
|
34
|
+
"aria-label" | "children" | "data-slot" | "role"
|
|
35
|
+
> & {
|
|
36
|
+
"aria-description"?: string;
|
|
37
|
+
"aria-label": string;
|
|
38
|
+
categories: readonly CategoryComparisonDatum[];
|
|
39
|
+
/** Names the comparison values; required when any category has one. */
|
|
40
|
+
comparisonLabel?: string;
|
|
41
|
+
formatAxisValue?: (value: number) => string;
|
|
42
|
+
formatValue?: (value: number) => string;
|
|
43
|
+
/** Shows the legend below the chart. Turn it off when a card header shows it. */
|
|
44
|
+
legend?: boolean;
|
|
45
|
+
locale?: string;
|
|
46
|
+
/** vertical suits ordered categories such as months. */
|
|
47
|
+
orientation?: CategoryComparisonOrientation;
|
|
48
|
+
seriesLabel: string;
|
|
49
|
+
tone?: ChartSeriesTone;
|
|
50
|
+
/** Draws a track behind each bar showing the full scale. */
|
|
51
|
+
track?: boolean;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
interface CategoryComparisonChartProps {
|
|
55
|
+
"aria-description"?: string;
|
|
56
|
+
"aria-label": string;
|
|
57
|
+
categories: readonly CategoryComparisonDatum[];
|
|
58
|
+
comparisonLabel?: string;
|
|
59
|
+
domain: readonly [number, number];
|
|
60
|
+
formatAxisValue?: (value: number) => string;
|
|
61
|
+
formatValue?: (value: number) => string;
|
|
62
|
+
legend: boolean;
|
|
63
|
+
locale: string;
|
|
64
|
+
orientation: CategoryComparisonOrientation;
|
|
65
|
+
seriesLabel: string;
|
|
66
|
+
tone: ChartSeriesTone;
|
|
67
|
+
track: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface CategoryComparisonRow {
|
|
71
|
+
category: string;
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
series: "comparison" | "value";
|
|
75
|
+
value: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function assertCategory(category: CategoryComparisonDatum, ids: Set<string>) {
|
|
79
|
+
if (
|
|
80
|
+
typeof category.id !== "string" ||
|
|
81
|
+
!category.id.trim() ||
|
|
82
|
+
typeof category.label !== "string" ||
|
|
83
|
+
!category.label.trim()
|
|
84
|
+
) {
|
|
85
|
+
throw new TypeError(
|
|
86
|
+
"CategoryComparison categories require non-empty ids and labels."
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
if (ids.has(category.id)) {
|
|
90
|
+
throw new RangeError("CategoryComparison category ids must be unique.");
|
|
91
|
+
}
|
|
92
|
+
for (const value of [category.value, category.comparison ?? 0]) {
|
|
93
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
94
|
+
throw new RangeError("CategoryComparison values must be finite numbers.");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
ids.add(category.id);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function prepareCategories(categories: readonly CategoryComparisonDatum[]) {
|
|
101
|
+
if (!Array.isArray(categories)) {
|
|
102
|
+
throw new TypeError("CategoryComparison categories must be an array.");
|
|
103
|
+
}
|
|
104
|
+
const ids = new Set<string>();
|
|
105
|
+
let min = 0;
|
|
106
|
+
let max = 0;
|
|
107
|
+
for (const category of categories) {
|
|
108
|
+
assertCategory(category, ids);
|
|
109
|
+
const comparison = category.comparison ?? category.value;
|
|
110
|
+
min = Math.min(min, category.value, comparison);
|
|
111
|
+
max = Math.max(max, category.value, comparison);
|
|
112
|
+
}
|
|
113
|
+
if (!Number.isFinite(max - min)) {
|
|
114
|
+
throw new RangeError(
|
|
115
|
+
"CategoryComparison values exceed a finite chart range."
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
categories: [...categories],
|
|
120
|
+
domain: [min, max === min ? 1 : max] as const,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function assertLabels(ariaLabel: string, seriesLabel: string) {
|
|
125
|
+
if (
|
|
126
|
+
typeof ariaLabel !== "string" ||
|
|
127
|
+
typeof seriesLabel !== "string" ||
|
|
128
|
+
!ariaLabel.trim() ||
|
|
129
|
+
!seriesLabel.trim()
|
|
130
|
+
) {
|
|
131
|
+
throw new TypeError(
|
|
132
|
+
"CategoryComparison requires non-empty aria-label and seriesLabel values."
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function assertFormatters(
|
|
138
|
+
formatValue: ((value: number) => string) | undefined,
|
|
139
|
+
formatAxisValue: ((value: number) => string) | undefined
|
|
140
|
+
) {
|
|
141
|
+
for (const [name, formatter] of Object.entries({
|
|
142
|
+
formatAxisValue,
|
|
143
|
+
formatValue,
|
|
144
|
+
})) {
|
|
145
|
+
if (formatter !== undefined && typeof formatter !== "function") {
|
|
146
|
+
throw new TypeError(`CategoryComparison ${name} must be a function.`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function formatNumber(
|
|
152
|
+
value: number,
|
|
153
|
+
formatter: ((value: number) => string) | undefined,
|
|
154
|
+
numberFormat: Intl.NumberFormat,
|
|
155
|
+
formatterName = "formatValue"
|
|
156
|
+
) {
|
|
157
|
+
const formatted = formatter ? formatter(value) : numberFormat.format(value);
|
|
158
|
+
if (typeof formatted !== "string") {
|
|
159
|
+
throw new TypeError(
|
|
160
|
+
`CategoryComparison ${formatterName} must return a string.`
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
return formatted;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function toRows(
|
|
167
|
+
categories: readonly CategoryComparisonDatum[]
|
|
168
|
+
): CategoryComparisonRow[] {
|
|
169
|
+
return categories.flatMap(({ comparison, id, label, value }) => [
|
|
170
|
+
...(comparison === undefined
|
|
171
|
+
? []
|
|
172
|
+
: [
|
|
173
|
+
{
|
|
174
|
+
category: id,
|
|
175
|
+
id: `${id}:comparison`,
|
|
176
|
+
label,
|
|
177
|
+
series: "comparison" as const,
|
|
178
|
+
value: comparison,
|
|
179
|
+
},
|
|
180
|
+
]),
|
|
181
|
+
{ category: id, id, label, series: "value" as const, value },
|
|
182
|
+
]);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function renderTooltip(
|
|
186
|
+
context: ChartTooltipBodyRenderContext<
|
|
187
|
+
CategoryComparisonRow,
|
|
188
|
+
number | string,
|
|
189
|
+
number | string
|
|
190
|
+
>,
|
|
191
|
+
labels: { comparison?: string; value: string },
|
|
192
|
+
tone: ChartSeriesTone,
|
|
193
|
+
format: (value: number) => string
|
|
194
|
+
) {
|
|
195
|
+
const point = context.primaryPoint ?? context.points[0];
|
|
196
|
+
if (!point) {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
const rows = context.points
|
|
200
|
+
.map(({ datum }) => datum)
|
|
201
|
+
.filter(({ category }) => category === point.datum.category)
|
|
202
|
+
.sort((left) => (left.series === "value" ? -1 : 1));
|
|
203
|
+
return (
|
|
204
|
+
<ChartTooltip
|
|
205
|
+
items={rows.map((row) => ({
|
|
206
|
+
id: row.id,
|
|
207
|
+
label: row.series === "value" ? labels.value : labels.comparison,
|
|
208
|
+
tone: row.series === "value" ? tone : "muted",
|
|
209
|
+
value: format(row.value),
|
|
210
|
+
}))}
|
|
211
|
+
label={point.datum.label}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// The focused category keeps full color while the rest recede.
|
|
217
|
+
const RECEDE = [
|
|
218
|
+
{
|
|
219
|
+
style: { opacity: 0.35 },
|
|
220
|
+
transition: { duration: 150, type: "tween" as const },
|
|
221
|
+
when: { focus: "unmatched" as const },
|
|
222
|
+
},
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
interface MarkOptions {
|
|
226
|
+
domain: readonly [number, number];
|
|
227
|
+
grouped: boolean;
|
|
228
|
+
tone: ChartSeriesTone;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function barFill(tone: ChartSeriesTone) {
|
|
232
|
+
return (row: CategoryComparisonRow) =>
|
|
233
|
+
row.series === "value" ? chartColors[tone] : chartColors.muted;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Bar widths follow BoardUI's proportions: slim, fully rounded pairs when two
|
|
237
|
+
// bars share a slot, wider bars with softer corners when one stands alone.
|
|
238
|
+
function barSize(
|
|
239
|
+
orientation: CategoryComparisonOrientation,
|
|
240
|
+
grouped: boolean
|
|
241
|
+
): { radius: number; thickness: number } {
|
|
242
|
+
if (grouped) {
|
|
243
|
+
return { radius: 5, thickness: 10 };
|
|
244
|
+
}
|
|
245
|
+
return orientation === "vertical"
|
|
246
|
+
? { radius: 8, thickness: 28 }
|
|
247
|
+
: { radius: 6, thickness: 20 };
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// A full-scale track behind each category, as in a progress bar.
|
|
251
|
+
function getTrack(
|
|
252
|
+
categories: readonly CategoryComparisonDatum[],
|
|
253
|
+
orientation: CategoryComparisonOrientation,
|
|
254
|
+
{ domain, grouped }: MarkOptions
|
|
255
|
+
) {
|
|
256
|
+
const { radius, thickness } = barSize(orientation, grouped);
|
|
257
|
+
const common = {
|
|
258
|
+
fill: colors.controlSurface,
|
|
259
|
+
id: "category-comparison-track",
|
|
260
|
+
key: ({ id }: CategoryComparisonDatum) => id,
|
|
261
|
+
maxThickness: grouped ? thickness * 2 + 6 : thickness,
|
|
262
|
+
radius: { end: radius },
|
|
263
|
+
};
|
|
264
|
+
return decorative(
|
|
265
|
+
orientation === "vertical"
|
|
266
|
+
? barY(categories, { ...common, x: "id", y1: domain[0], y2: domain[1] })
|
|
267
|
+
: barX(categories, { ...common, x1: domain[0], x2: domain[1], y: "id" })
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function getBars(
|
|
272
|
+
rows: readonly CategoryComparisonRow[],
|
|
273
|
+
orientation: CategoryComparisonOrientation,
|
|
274
|
+
{ grouped, tone }: MarkOptions
|
|
275
|
+
) {
|
|
276
|
+
const { radius, thickness } = barSize(orientation, grouped);
|
|
277
|
+
const common = {
|
|
278
|
+
fill: barFill(tone),
|
|
279
|
+
id: "category-comparison-bars",
|
|
280
|
+
key: (row: CategoryComparisonRow) => row.id,
|
|
281
|
+
layout: grouped ? group({ padding: 0.2 }) : undefined,
|
|
282
|
+
maxThickness: thickness,
|
|
283
|
+
radius: { end: radius },
|
|
284
|
+
states: RECEDE,
|
|
285
|
+
z: "series" as const,
|
|
286
|
+
};
|
|
287
|
+
return orientation === "vertical"
|
|
288
|
+
? barY(rows, { ...common, x: "category", y: "value", y1: 0 })
|
|
289
|
+
: barX(rows, { ...common, x: "value", x1: 0, y: "category" });
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function getLegendItems(
|
|
293
|
+
seriesLabel: string,
|
|
294
|
+
tone: ChartSeriesTone,
|
|
295
|
+
comparisonLabel: string | undefined
|
|
296
|
+
) {
|
|
297
|
+
const items = [
|
|
298
|
+
{ id: "category-comparison-series", label: seriesLabel, tone },
|
|
299
|
+
];
|
|
300
|
+
return comparisonLabel === undefined
|
|
301
|
+
? items
|
|
302
|
+
: [
|
|
303
|
+
...items,
|
|
304
|
+
{
|
|
305
|
+
id: "category-comparison-comparison",
|
|
306
|
+
label: comparisonLabel,
|
|
307
|
+
tone: "muted" as const,
|
|
308
|
+
},
|
|
309
|
+
];
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function getHeight(
|
|
313
|
+
orientation: CategoryComparisonOrientation,
|
|
314
|
+
count: number,
|
|
315
|
+
grouped: boolean
|
|
316
|
+
) {
|
|
317
|
+
if (orientation === "vertical") {
|
|
318
|
+
return 200;
|
|
319
|
+
}
|
|
320
|
+
return Math.max(240, count * (grouped ? 64 : 48) + 72);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function CategoryComparisonChart({
|
|
324
|
+
"aria-description": ariaDescription,
|
|
325
|
+
"aria-label": ariaLabel,
|
|
326
|
+
categories,
|
|
327
|
+
comparisonLabel,
|
|
328
|
+
domain,
|
|
329
|
+
formatAxisValue,
|
|
330
|
+
formatValue,
|
|
331
|
+
legend,
|
|
332
|
+
locale,
|
|
333
|
+
orientation,
|
|
334
|
+
seriesLabel,
|
|
335
|
+
tone,
|
|
336
|
+
track,
|
|
337
|
+
}: CategoryComparisonChartProps) {
|
|
338
|
+
const numberFormat = useMemo(() => new Intl.NumberFormat(locale), [locale]);
|
|
339
|
+
// Axis ticks default to compact numbers ("13.5K"); tooltips stay exact.
|
|
340
|
+
const axisNumberFormat = useMemo(
|
|
341
|
+
() =>
|
|
342
|
+
new Intl.NumberFormat(locale, {
|
|
343
|
+
maximumFractionDigits: 1,
|
|
344
|
+
notation: "compact",
|
|
345
|
+
}),
|
|
346
|
+
[locale]
|
|
347
|
+
);
|
|
348
|
+
const format = useMemo(
|
|
349
|
+
() => (value: number) => formatNumber(value, formatValue, numberFormat),
|
|
350
|
+
[formatValue, numberFormat]
|
|
351
|
+
);
|
|
352
|
+
const rows = useMemo(() => toRows(categories), [categories]);
|
|
353
|
+
const grouped = rows.length > categories.length;
|
|
354
|
+
const definition = useMemo(() => {
|
|
355
|
+
const labels = new Map(categories.map(({ id, label }) => [id, label]));
|
|
356
|
+
// Tracks and the axis share one niced domain, so tracks reach the top tick.
|
|
357
|
+
const tickCount = orientation === "vertical" ? 4 : 5;
|
|
358
|
+
const scale = scaleLinear().domain(domain).nice(tickCount);
|
|
359
|
+
const [start, end] = scale.domain();
|
|
360
|
+
const options = { domain: [start, end] as const, grouped, tone };
|
|
361
|
+
const valueScale = {
|
|
362
|
+
axis: {
|
|
363
|
+
ticks: {
|
|
364
|
+
count: tickCount,
|
|
365
|
+
format: (value: number) =>
|
|
366
|
+
formatNumber(
|
|
367
|
+
value,
|
|
368
|
+
formatAxisValue ?? formatValue,
|
|
369
|
+
axisNumberFormat,
|
|
370
|
+
formatAxisValue ? "formatAxisValue" : "formatValue"
|
|
371
|
+
),
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
grid: true,
|
|
375
|
+
scale,
|
|
376
|
+
};
|
|
377
|
+
const categoryScale = {
|
|
378
|
+
axis: { ticks: { format: (id: string) => labels.get(id) ?? id } },
|
|
379
|
+
scale: scaleBand<string>()
|
|
380
|
+
.domain(categories.map(({ id }) => id))
|
|
381
|
+
.paddingInner(0.2)
|
|
382
|
+
.paddingOuter(0.08),
|
|
383
|
+
};
|
|
384
|
+
const vertical = orientation === "vertical";
|
|
385
|
+
return defineChart(
|
|
386
|
+
{
|
|
387
|
+
marks: [
|
|
388
|
+
bandCrosshair(vertical ? "x" : "y"),
|
|
389
|
+
...(track ? [getTrack(categories, orientation, options)] : []),
|
|
390
|
+
getBars(rows, orientation, options),
|
|
391
|
+
],
|
|
392
|
+
scales: vertical
|
|
393
|
+
? { x: categoryScale, y: valueScale }
|
|
394
|
+
: { x: valueScale, y: categoryScale },
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
focus: vertical ? "group-x" : "group-y",
|
|
398
|
+
// The brand band marks the focused category, so no point ring.
|
|
399
|
+
focusRing: false,
|
|
400
|
+
tooltip: tooltipFeature,
|
|
401
|
+
}
|
|
402
|
+
);
|
|
403
|
+
}, [
|
|
404
|
+
categories,
|
|
405
|
+
domain,
|
|
406
|
+
formatAxisValue,
|
|
407
|
+
axisNumberFormat,
|
|
408
|
+
formatValue,
|
|
409
|
+
grouped,
|
|
410
|
+
orientation,
|
|
411
|
+
rows,
|
|
412
|
+
tone,
|
|
413
|
+
track,
|
|
414
|
+
]);
|
|
415
|
+
const renderTooltipBody = useMemo(
|
|
416
|
+
() =>
|
|
417
|
+
(
|
|
418
|
+
context: ChartTooltipBodyRenderContext<
|
|
419
|
+
CategoryComparisonRow,
|
|
420
|
+
number | string,
|
|
421
|
+
number | string
|
|
422
|
+
>
|
|
423
|
+
) =>
|
|
424
|
+
renderTooltip(
|
|
425
|
+
context,
|
|
426
|
+
{ comparison: comparisonLabel, value: seriesLabel },
|
|
427
|
+
tone,
|
|
428
|
+
format
|
|
429
|
+
),
|
|
430
|
+
[comparisonLabel, format, seriesLabel, tone]
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
return (
|
|
434
|
+
<div data-slot="category-comparison-chart">
|
|
435
|
+
<ChartFrame
|
|
436
|
+
aria-description={ariaDescription}
|
|
437
|
+
aria-label={ariaLabel}
|
|
438
|
+
definition={definition}
|
|
439
|
+
height={getHeight(orientation, categories.length, grouped)}
|
|
440
|
+
renderTooltipBody={renderTooltipBody}
|
|
441
|
+
tabIndex={0}
|
|
442
|
+
/>
|
|
443
|
+
{legend ? (
|
|
444
|
+
<div
|
|
445
|
+
data-slot="category-comparison-legend"
|
|
446
|
+
{...props(categoryComparisonStyles.legend)}
|
|
447
|
+
>
|
|
448
|
+
<ChartLegend
|
|
449
|
+
aria-label={`${seriesLabel} series`}
|
|
450
|
+
items={getLegendItems(
|
|
451
|
+
seriesLabel,
|
|
452
|
+
tone,
|
|
453
|
+
grouped ? comparisonLabel : undefined
|
|
454
|
+
)}
|
|
455
|
+
/>
|
|
456
|
+
</div>
|
|
457
|
+
) : null}
|
|
458
|
+
</div>
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function assertLocaleAndTone(locale: string, tone: ChartSeriesTone) {
|
|
463
|
+
if (typeof locale !== "string" || !locale.trim()) {
|
|
464
|
+
throw new TypeError(
|
|
465
|
+
"CategoryComparison locale must be a non-empty string."
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
if (!Object.hasOwn(chartColors, tone)) {
|
|
469
|
+
throw new RangeError("CategoryComparison tone is not supported.");
|
|
470
|
+
}
|
|
471
|
+
// Throws a RangeError for an unknown locale.
|
|
472
|
+
new Intl.NumberFormat(locale).format(0);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function assertComparisonOptions(
|
|
476
|
+
categories: readonly CategoryComparisonDatum[],
|
|
477
|
+
comparisonLabel: string | undefined,
|
|
478
|
+
orientation: CategoryComparisonOrientation
|
|
479
|
+
) {
|
|
480
|
+
if (orientation !== "horizontal" && orientation !== "vertical") {
|
|
481
|
+
throw new RangeError(
|
|
482
|
+
"CategoryComparison orientation must be 'horizontal' or 'vertical'."
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
const hasComparison =
|
|
486
|
+
Array.isArray(categories) &&
|
|
487
|
+
categories.some(({ comparison }) => comparison !== undefined);
|
|
488
|
+
if (
|
|
489
|
+
hasComparison &&
|
|
490
|
+
(typeof comparisonLabel !== "string" || !comparisonLabel.trim())
|
|
491
|
+
) {
|
|
492
|
+
throw new TypeError(
|
|
493
|
+
"CategoryComparison requires a comparisonLabel when categories have comparison values."
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export function CategoryComparison({
|
|
499
|
+
"aria-description": ariaDescription,
|
|
500
|
+
"aria-label": ariaLabel,
|
|
501
|
+
categories: inputCategories,
|
|
502
|
+
comparisonLabel,
|
|
503
|
+
formatAxisValue,
|
|
504
|
+
formatValue,
|
|
505
|
+
legend = true,
|
|
506
|
+
locale = "en-US",
|
|
507
|
+
orientation = "horizontal",
|
|
508
|
+
ref: forwardedRef,
|
|
509
|
+
seriesLabel,
|
|
510
|
+
tone = "series1",
|
|
511
|
+
track = false,
|
|
512
|
+
...rest
|
|
513
|
+
}: CategoryComparisonProps) {
|
|
514
|
+
assertLabels(ariaLabel, seriesLabel);
|
|
515
|
+
assertFormatters(formatValue, formatAxisValue);
|
|
516
|
+
assertComparisonOptions(inputCategories, comparisonLabel, orientation);
|
|
517
|
+
assertLocaleAndTone(locale, tone);
|
|
518
|
+
const { categories, domain } = useMemo(
|
|
519
|
+
() => prepareCategories(inputCategories),
|
|
520
|
+
[inputCategories]
|
|
521
|
+
);
|
|
522
|
+
for (const name of [
|
|
523
|
+
"aria-label",
|
|
524
|
+
"children",
|
|
525
|
+
"className",
|
|
526
|
+
"data-slot",
|
|
527
|
+
"role",
|
|
528
|
+
"style",
|
|
529
|
+
]) {
|
|
530
|
+
Reflect.deleteProperty(rest, name);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return (
|
|
534
|
+
<div
|
|
535
|
+
{...rest}
|
|
536
|
+
data-slot="category-comparison"
|
|
537
|
+
ref={forwardedRef}
|
|
538
|
+
{...props(categoryComparisonStyles.root)}
|
|
539
|
+
>
|
|
540
|
+
{categories.length === 0 ? (
|
|
541
|
+
<p
|
|
542
|
+
aria-label={ariaLabel}
|
|
543
|
+
role="status"
|
|
544
|
+
{...props(typeRoles.body, categoryComparisonStyles.empty)}
|
|
545
|
+
>
|
|
546
|
+
No categories available.
|
|
547
|
+
</p>
|
|
548
|
+
) : (
|
|
549
|
+
<CategoryComparisonChart
|
|
550
|
+
aria-description={ariaDescription}
|
|
551
|
+
aria-label={ariaLabel}
|
|
552
|
+
categories={categories}
|
|
553
|
+
comparisonLabel={comparisonLabel}
|
|
554
|
+
domain={domain}
|
|
555
|
+
formatAxisValue={formatAxisValue}
|
|
556
|
+
formatValue={formatValue}
|
|
557
|
+
legend={legend}
|
|
558
|
+
locale={locale}
|
|
559
|
+
orientation={orientation}
|
|
560
|
+
seriesLabel={seriesLabel}
|
|
561
|
+
tone={tone}
|
|
562
|
+
track={track}
|
|
563
|
+
/>
|
|
564
|
+
)}
|
|
565
|
+
</div>
|
|
566
|
+
);
|
|
567
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SVG arc paths for ring charts. Angles are in turns: 0 is twelve o'clock and
|
|
2
|
+
// values grow clockwise, so 0.25 is three o'clock.
|
|
3
|
+
|
|
4
|
+
// Server and browser math can differ in the last digit; thousandths keep the
|
|
5
|
+
// path identical on both sides, far below a pixel.
|
|
6
|
+
const round = (value: number) => Math.round(value * 1000) / 1000;
|
|
7
|
+
|
|
8
|
+
function point(cx: number, cy: number, radius: number, turn: number) {
|
|
9
|
+
const angle = turn * 2 * Math.PI;
|
|
10
|
+
return [
|
|
11
|
+
round(cx + radius * Math.sin(angle)),
|
|
12
|
+
round(cy - radius * Math.cos(angle)),
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function arcPath(
|
|
17
|
+
cx: number,
|
|
18
|
+
cy: number,
|
|
19
|
+
radius: number,
|
|
20
|
+
start: number,
|
|
21
|
+
end: number
|
|
22
|
+
): string {
|
|
23
|
+
// A full turn needs two half arcs; one arc cannot start and end on a point.
|
|
24
|
+
// They share one subpath, so a dash runs on across the seam.
|
|
25
|
+
if (end - start >= 1) {
|
|
26
|
+
const [x, y] = point(cx, cy, radius, start);
|
|
27
|
+
return `${arcPath(cx, cy, radius, start, start + 0.5)} A${radius},${radius} 0 0 1 ${x},${y}`;
|
|
28
|
+
}
|
|
29
|
+
const [x1, y1] = point(cx, cy, radius, start);
|
|
30
|
+
const [x2, y2] = point(cx, cy, radius, end);
|
|
31
|
+
const large = end - start > 0.5 ? 1 : 0;
|
|
32
|
+
return `M${x1},${y1} A${radius},${radius} 0 ${large} 1 ${x2},${y2}`;
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ChartSeriesTone, chartColors } from "./chart-colors";
|
|
2
|
+
|
|
3
|
+
// Shared input checks for chart components; messages name the component.
|
|
4
|
+
|
|
5
|
+
export function assertAriaLabel(component: string, ariaLabel: unknown) {
|
|
6
|
+
if (typeof ariaLabel !== "string" || !ariaLabel.trim()) {
|
|
7
|
+
throw new TypeError(`${component} requires a non-empty aria-label.`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Checks a non-empty id and label, and that the id is new to `ids`. */
|
|
12
|
+
export function assertIdentity(
|
|
13
|
+
component: string,
|
|
14
|
+
item: { id: unknown; label: unknown },
|
|
15
|
+
ids: Set<string>
|
|
16
|
+
) {
|
|
17
|
+
const { id, label } = item;
|
|
18
|
+
if (
|
|
19
|
+
typeof id !== "string" ||
|
|
20
|
+
!id.trim() ||
|
|
21
|
+
typeof label !== "string" ||
|
|
22
|
+
!label.trim()
|
|
23
|
+
) {
|
|
24
|
+
throw new TypeError(`${component} items need non-empty ids and labels.`);
|
|
25
|
+
}
|
|
26
|
+
if (ids.has(id)) {
|
|
27
|
+
throw new RangeError(`${component} ids must be unique.`);
|
|
28
|
+
}
|
|
29
|
+
ids.add(id);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function assertNonNegative(component: string, value: unknown) {
|
|
33
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
34
|
+
throw new RangeError(
|
|
35
|
+
`${component} values must be finite and not negative.`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function assertTone(
|
|
41
|
+
component: string,
|
|
42
|
+
tone: ChartSeriesTone | undefined
|
|
43
|
+
) {
|
|
44
|
+
if (tone !== undefined && !Object.hasOwn(chartColors, tone)) {
|
|
45
|
+
throw new RangeError(`${component} tone is not a supported chart tone.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { colors } from "../../styles/colors.stylex";
|
|
2
|
+
|
|
3
|
+
export const chartColors = {
|
|
4
|
+
// Reference series such as last year: a dashed line or quieter bars.
|
|
5
|
+
muted: colors.chartReference,
|
|
6
|
+
series1: colors.chartSeries1,
|
|
7
|
+
series2: colors.chartSeries2,
|
|
8
|
+
series3: colors.chartSeries3,
|
|
9
|
+
series4: colors.chartSeries4,
|
|
10
|
+
series5: colors.chartSeries5,
|
|
11
|
+
series6: colors.chartSeries6,
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export type ChartSeriesTone = keyof typeof chartColors;
|