@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,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ChartAxisTickLabelOpacityContext,
|
|
3
|
+
type ChartMark,
|
|
4
|
+
crosshair,
|
|
5
|
+
type SceneLabel,
|
|
6
|
+
type SceneNode,
|
|
7
|
+
} from "@tanstack/charts";
|
|
8
|
+
import { resolveCrosshairGuide } from "@tanstack/charts/crosshair";
|
|
9
|
+
import { colors } from "../../styles/colors.stylex";
|
|
10
|
+
import { mizenAxisLabels, mizenTickGap } from "./chart-frame";
|
|
11
|
+
|
|
12
|
+
// Mizen's focus guides wear the brand: a wine rule whose time label sits in a
|
|
13
|
+
// wine pill on the axis, and a lavender band behind the focused category.
|
|
14
|
+
|
|
15
|
+
const PILL_PADDING_X = 8;
|
|
16
|
+
const PILL_HEIGHT = 18;
|
|
17
|
+
// Tabular digits and short month names average a bit over half an em.
|
|
18
|
+
const CHARACTER_WIDTH = 0.58;
|
|
19
|
+
|
|
20
|
+
function isAxisLabel(node: SceneNode): node is SceneLabel {
|
|
21
|
+
return (
|
|
22
|
+
node.kind === "label" &&
|
|
23
|
+
(node.className ?? "").includes("crosshair-label--x")
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Puts a rounded wine pill behind the focused time label. */
|
|
28
|
+
function withPill(node: SceneNode | undefined): SceneNode | undefined {
|
|
29
|
+
if (node?.kind !== "group") {
|
|
30
|
+
return node;
|
|
31
|
+
}
|
|
32
|
+
const children = node.children.flatMap((child): SceneNode[] => {
|
|
33
|
+
if (!isAxisLabel(child)) {
|
|
34
|
+
return [withPill(child) ?? child];
|
|
35
|
+
}
|
|
36
|
+
const fontSize = child.fontSize ?? mizenAxisLabels.fontSize;
|
|
37
|
+
const width =
|
|
38
|
+
child.text.length * fontSize * CHARACTER_WIDTH + PILL_PADDING_X * 2;
|
|
39
|
+
const center = child.y - fontSize * 0.35;
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
height: PILL_HEIGHT,
|
|
43
|
+
key: `${child.key}:pill`,
|
|
44
|
+
kind: "rect",
|
|
45
|
+
radius: PILL_HEIGHT / 2,
|
|
46
|
+
style: { fill: colors.brandForeground },
|
|
47
|
+
width,
|
|
48
|
+
x: child.x - width / 2,
|
|
49
|
+
y: center - PILL_HEIGHT / 2,
|
|
50
|
+
},
|
|
51
|
+
{ ...child, style: { ...child.style, fill: colors.surface } },
|
|
52
|
+
];
|
|
53
|
+
});
|
|
54
|
+
return { ...node, children };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function pillCrosshair(mark: ChartMark<never, Date, number>) {
|
|
58
|
+
return {
|
|
59
|
+
...mark,
|
|
60
|
+
initialize: (context: Parameters<typeof mark.initialize>[0]) => {
|
|
61
|
+
const initialized = mark.initialize(context);
|
|
62
|
+
return {
|
|
63
|
+
...initialized,
|
|
64
|
+
render: (renderContext: Parameters<typeof initialized.render>[0]) => {
|
|
65
|
+
const scene = initialized.render(renderContext);
|
|
66
|
+
return {
|
|
67
|
+
...scene,
|
|
68
|
+
focusGuides: scene.focusGuides?.map((guide) => ({
|
|
69
|
+
...guide,
|
|
70
|
+
resolve: (resolveContext: Parameters<typeof guide.resolve>[0]) =>
|
|
71
|
+
withPill(resolveCrosshairGuide(resolveContext)),
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// A tick closer than this to the focused time would show through the pill.
|
|
81
|
+
const PILL_CLEARANCE = 40;
|
|
82
|
+
|
|
83
|
+
/** Tick label options that hide the ticks under the focus pill while it shows. */
|
|
84
|
+
export const pillTickLabels = {
|
|
85
|
+
opacity: ({ focus, position }: ChartAxisTickLabelOpacityContext) =>
|
|
86
|
+
focus && Math.abs(position - focus.primary.x) < PILL_CLEARANCE
|
|
87
|
+
? 0
|
|
88
|
+
: undefined,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** A vertical rule at the focused time, labeled in a pill on the x axis. */
|
|
92
|
+
export function timeCrosshair(format: (date: Date) => string) {
|
|
93
|
+
return pillCrosshair(
|
|
94
|
+
crosshair<Date, number>({
|
|
95
|
+
x: {
|
|
96
|
+
// The pill covers the gray tick under it, so the label reads alone.
|
|
97
|
+
label: {
|
|
98
|
+
fill: colors.surface,
|
|
99
|
+
fillOpacity: 1,
|
|
100
|
+
fontSize: mizenAxisLabels.fontSize,
|
|
101
|
+
fontWeight: mizenAxisLabels.fontWeight,
|
|
102
|
+
format,
|
|
103
|
+
offset: mizenTickGap,
|
|
104
|
+
strokeWidth: 0,
|
|
105
|
+
},
|
|
106
|
+
stroke: colors.brandForeground,
|
|
107
|
+
strokeOpacity: 0.4,
|
|
108
|
+
strokeWidth: 1,
|
|
109
|
+
},
|
|
110
|
+
y: false,
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** A soft band behind the focused category, drawn under the bars. */
|
|
116
|
+
export function bandCrosshair(axis: "x" | "y") {
|
|
117
|
+
const band = {
|
|
118
|
+
band: {
|
|
119
|
+
fill: colors.brandBackground,
|
|
120
|
+
fillOpacity: 1,
|
|
121
|
+
inset: -4,
|
|
122
|
+
radius: 8,
|
|
123
|
+
},
|
|
124
|
+
label: false,
|
|
125
|
+
};
|
|
126
|
+
return crosshair(
|
|
127
|
+
axis === "x" ? { x: band, y: false } : { x: false, y: band }
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { props } from "@stylexjs/stylex";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { visuallyHiddenStyles } from "../visually-hidden/visually-hidden.styles";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A chart's exact values as a table for assistive technology. It stays out of
|
|
7
|
+
* sight: sighted readers get the same values from tooltips and keyboard focus.
|
|
8
|
+
*/
|
|
9
|
+
export function ChartDataTable({ children }: { children: ReactNode }) {
|
|
10
|
+
return (
|
|
11
|
+
<div data-slot="chart-data" {...props(visuallyHiddenStyles.root)}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { create } from "@stylexjs/stylex";
|
|
2
|
+
import { colors } from "../../styles/colors.stylex";
|
|
3
|
+
import { conditions } from "../../styles/conditions.stylex";
|
|
4
|
+
import {
|
|
5
|
+
borderWidth,
|
|
6
|
+
focus,
|
|
7
|
+
focusMotion,
|
|
8
|
+
} from "../../styles/interaction.stylex";
|
|
9
|
+
|
|
10
|
+
export const chartFrameStyles = create({
|
|
11
|
+
customTooltip: {
|
|
12
|
+
"--ts-chart-tooltip-background": "transparent",
|
|
13
|
+
"--ts-chart-tooltip-border": "none",
|
|
14
|
+
"--ts-chart-tooltip-padding": "0",
|
|
15
|
+
"--ts-chart-tooltip-shadow": "none",
|
|
16
|
+
},
|
|
17
|
+
frame: {
|
|
18
|
+
"--ts-chart-1": colors.chartSeries1,
|
|
19
|
+
"--ts-chart-2": colors.chartSeries2,
|
|
20
|
+
"--ts-chart-3": colors.chartSeries3,
|
|
21
|
+
"--ts-chart-4": colors.chartSeries4,
|
|
22
|
+
"--ts-chart-5": colors.chartSeries5,
|
|
23
|
+
"--ts-chart-6": colors.chartSeries6,
|
|
24
|
+
// No halo: the frame inherits any parent surface, and the label redraws the
|
|
25
|
+
// tick beneath it in the same place.
|
|
26
|
+
"--ts-chart-crosshair-label-halo": "transparent",
|
|
27
|
+
"--ts-chart-tooltip-background": colors.floatingSurface,
|
|
28
|
+
"--ts-chart-tooltip-border": `1px solid ${colors.border}`,
|
|
29
|
+
"--ts-chart-tooltip-color": colors.content,
|
|
30
|
+
backgroundColor: "transparent",
|
|
31
|
+
color: colors.content,
|
|
32
|
+
fontFamily: "inherit",
|
|
33
|
+
fontVariantNumeric: "tabular-nums",
|
|
34
|
+
minWidth: 0,
|
|
35
|
+
width: "100%",
|
|
36
|
+
},
|
|
37
|
+
plot: {
|
|
38
|
+
animationDuration: { ":focus-visible": focusMotion.duration },
|
|
39
|
+
animationName: { ":focus-visible": focusMotion.ring },
|
|
40
|
+
outlineColor: {
|
|
41
|
+
default: colors.focusRing,
|
|
42
|
+
[conditions.forcedColors]: "Highlight",
|
|
43
|
+
},
|
|
44
|
+
outlineOffset: focus.offset,
|
|
45
|
+
outlineStyle: { ":focus-visible": "solid", default: "none" },
|
|
46
|
+
outlineWidth: borderWidth.focus,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { props } from "@stylexjs/stylex";
|
|
4
|
+
import type {
|
|
5
|
+
ChartPositionScaleOptions,
|
|
6
|
+
ChartTheme,
|
|
7
|
+
ChartValue,
|
|
8
|
+
DomChartDefinition,
|
|
9
|
+
} from "@tanstack/charts";
|
|
10
|
+
import {
|
|
11
|
+
type ChartProps,
|
|
12
|
+
Chart as TanStackChart,
|
|
13
|
+
} from "@tanstack/charts/react/tooltip";
|
|
14
|
+
import { useMemo } from "react";
|
|
15
|
+
import type { Closed } from "../../closed";
|
|
16
|
+
import { colors } from "../../styles/colors.stylex";
|
|
17
|
+
import { chartFrameStyles } from "./chart-frame.styles";
|
|
18
|
+
|
|
19
|
+
type ChartSizing =
|
|
20
|
+
| { aspectRatio?: never; height?: number }
|
|
21
|
+
| { aspectRatio: number; height?: never };
|
|
22
|
+
|
|
23
|
+
const mizenTheme: Partial<ChartTheme> = {
|
|
24
|
+
foreground: colors.content,
|
|
25
|
+
grid: colors.border,
|
|
26
|
+
muted: colors.mutedContent,
|
|
27
|
+
};
|
|
28
|
+
// TanStack chart option in px, matching the caption role.
|
|
29
|
+
// eslint-disable-next-line no-restricted-syntax -- a charts API value, not CSS.
|
|
30
|
+
export const mizenAxisLabels = { fontSize: 12, fontWeight: 400, opacity: 1 };
|
|
31
|
+
// Gap between the plot and x tick labels, in px; overlays on a tick reuse it.
|
|
32
|
+
export const mizenTickGap = 4;
|
|
33
|
+
const mizenGrid = {
|
|
34
|
+
stroke: colors.controlSurface,
|
|
35
|
+
strokeDasharray: "4 4",
|
|
36
|
+
// The engine fades grids to 0.11 by default; the track color is quiet enough.
|
|
37
|
+
strokeOpacity: 1,
|
|
38
|
+
strokeWidth: 1,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type MizenAxisOptions = Extract<
|
|
42
|
+
NonNullable<ChartPositionScaleOptions["axis"]>,
|
|
43
|
+
object
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
function withMizenAxisLabel(label: MizenAxisOptions["label"]) {
|
|
47
|
+
if (typeof label === "string") {
|
|
48
|
+
return { ...mizenAxisLabels, text: label };
|
|
49
|
+
}
|
|
50
|
+
return label === undefined ? undefined : { ...mizenAxisLabels, ...label };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type ChartFrameProps<
|
|
54
|
+
TDatum = unknown,
|
|
55
|
+
TXValue extends ChartValue = ChartValue,
|
|
56
|
+
TYValue extends ChartValue = ChartValue,
|
|
57
|
+
> = Omit<
|
|
58
|
+
Closed<ChartProps<TDatum, TXValue, TYValue>>,
|
|
59
|
+
| "ariaDescription"
|
|
60
|
+
| "ariaLabel"
|
|
61
|
+
| "aspectRatio"
|
|
62
|
+
| "height"
|
|
63
|
+
| "initialWidth"
|
|
64
|
+
| "measureText"
|
|
65
|
+
| "onRender"
|
|
66
|
+
| "renderSvg"
|
|
67
|
+
| "width"
|
|
68
|
+
> &
|
|
69
|
+
ChartSizing & {
|
|
70
|
+
/** Extra context for assistive tech, after the name. */
|
|
71
|
+
"aria-description"?: string;
|
|
72
|
+
"aria-label": string;
|
|
73
|
+
initialWidth?: number;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
function requireChartLabel(ariaLabel: string): void {
|
|
77
|
+
if (typeof ariaLabel !== "string" || !ariaLabel.trim()) {
|
|
78
|
+
throw new TypeError("ChartFrame requires a non-empty aria-label.");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function requirePositiveFinite(value: number, name: string): void {
|
|
83
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
84
|
+
throw new RangeError(`${name} must be a finite number greater than zero.`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function withMizenAxisDefaults(
|
|
89
|
+
scale: ChartPositionScaleOptions | null
|
|
90
|
+
): ChartPositionScaleOptions | null {
|
|
91
|
+
if (scale === null) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const { axis, ...scaleProps } = scale;
|
|
96
|
+
if (axis === false) {
|
|
97
|
+
return scale;
|
|
98
|
+
}
|
|
99
|
+
const { label, ticks, tickLabels, line, ...axisProps } = axis ?? {};
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
...scaleProps,
|
|
103
|
+
axis: {
|
|
104
|
+
...axisProps,
|
|
105
|
+
label: withMizenAxisLabel(label),
|
|
106
|
+
line: line ?? false,
|
|
107
|
+
tickLabels:
|
|
108
|
+
tickLabels === false ? false : { ...mizenAxisLabels, ...tickLabels },
|
|
109
|
+
ticks:
|
|
110
|
+
ticks === false ? false : { padding: mizenTickGap, size: 0, ...ticks },
|
|
111
|
+
},
|
|
112
|
+
// Grid lines are quiet dashes, so they guide the eye without boxing data.
|
|
113
|
+
grid: scaleProps.grid === true ? mizenGrid : scaleProps.grid,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function withMizenSpec<
|
|
118
|
+
TSpec extends {
|
|
119
|
+
scales: Readonly<Record<string, ChartPositionScaleOptions | null>>;
|
|
120
|
+
theme?: Partial<ChartTheme>;
|
|
121
|
+
},
|
|
122
|
+
>(spec: TSpec): TSpec {
|
|
123
|
+
// Object.fromEntries widens keys; this transform keeps every original scale key.
|
|
124
|
+
const scales = Object.fromEntries(
|
|
125
|
+
Object.entries(spec.scales).map(([name, scale]) => [
|
|
126
|
+
name,
|
|
127
|
+
withMizenAxisDefaults(scale),
|
|
128
|
+
])
|
|
129
|
+
) as TSpec["scales"];
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
...spec,
|
|
133
|
+
scales,
|
|
134
|
+
theme: { ...mizenTheme, ...spec.theme },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function withMizenTheme<
|
|
139
|
+
TDatum,
|
|
140
|
+
TXValue extends ChartValue,
|
|
141
|
+
TYValue extends ChartValue,
|
|
142
|
+
>(
|
|
143
|
+
definition: DomChartDefinition<TDatum, TXValue, TYValue>
|
|
144
|
+
): DomChartDefinition<TDatum, TXValue, TYValue> {
|
|
145
|
+
if ("chart" in definition) {
|
|
146
|
+
return {
|
|
147
|
+
...definition,
|
|
148
|
+
chart: (context) => withMizenSpec(definition.chart(context)),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return withMizenSpec(definition);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function styleChartPlot({ svg }: { svg: SVGSVGElement }) {
|
|
156
|
+
const { className } = props(chartFrameStyles.plot);
|
|
157
|
+
if (className) {
|
|
158
|
+
svg.classList.add(...className.split(" "));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function ChartFrame<
|
|
163
|
+
TDatum = unknown,
|
|
164
|
+
TXValue extends ChartValue = ChartValue,
|
|
165
|
+
TYValue extends ChartValue = ChartValue,
|
|
166
|
+
>({
|
|
167
|
+
"aria-description": ariaDescription,
|
|
168
|
+
"aria-label": ariaLabel,
|
|
169
|
+
aspectRatio,
|
|
170
|
+
definition,
|
|
171
|
+
height,
|
|
172
|
+
initialWidth = 896,
|
|
173
|
+
idPrefix,
|
|
174
|
+
onFocusChange,
|
|
175
|
+
onFocusGroupChange,
|
|
176
|
+
onSelect,
|
|
177
|
+
renderTooltipBody,
|
|
178
|
+
tabIndex,
|
|
179
|
+
}: ChartFrameProps<TDatum, TXValue, TYValue>) {
|
|
180
|
+
requireChartLabel(ariaLabel);
|
|
181
|
+
requirePositiveFinite(initialWidth, "initialWidth");
|
|
182
|
+
if (aspectRatio !== undefined && height !== undefined) {
|
|
183
|
+
throw new TypeError(
|
|
184
|
+
"ChartFrame accepts either height or aspectRatio, not both."
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
if (aspectRatio !== undefined) {
|
|
188
|
+
requirePositiveFinite(aspectRatio, "aspectRatio");
|
|
189
|
+
}
|
|
190
|
+
if (height !== undefined) {
|
|
191
|
+
requirePositiveFinite(height, "height");
|
|
192
|
+
}
|
|
193
|
+
const themedDefinition = useMemo(
|
|
194
|
+
() => withMizenTheme(definition),
|
|
195
|
+
[definition]
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
return (
|
|
199
|
+
<div
|
|
200
|
+
data-slot="chart-frame"
|
|
201
|
+
{...props(
|
|
202
|
+
chartFrameStyles.frame,
|
|
203
|
+
renderTooltipBody && chartFrameStyles.customTooltip
|
|
204
|
+
)}
|
|
205
|
+
>
|
|
206
|
+
<TanStackChart
|
|
207
|
+
ariaDescription={ariaDescription}
|
|
208
|
+
ariaLabel={ariaLabel}
|
|
209
|
+
aspectRatio={aspectRatio}
|
|
210
|
+
definition={themedDefinition}
|
|
211
|
+
height={aspectRatio === undefined ? (height ?? 320) : undefined}
|
|
212
|
+
idPrefix={idPrefix}
|
|
213
|
+
initialWidth={initialWidth}
|
|
214
|
+
onFocusChange={onFocusChange}
|
|
215
|
+
onFocusGroupChange={onFocusGroupChange}
|
|
216
|
+
onRender={styleChartPlot}
|
|
217
|
+
onSelect={onSelect}
|
|
218
|
+
renderTooltipBody={renderTooltipBody}
|
|
219
|
+
tabIndex={tabIndex}
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
);
|
|
223
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { create, props } from "@stylexjs/stylex";
|
|
4
|
+
import {
|
|
5
|
+
type PointerEvent,
|
|
6
|
+
type ReactNode,
|
|
7
|
+
useCallback,
|
|
8
|
+
useRef,
|
|
9
|
+
useState,
|
|
10
|
+
} from "react";
|
|
11
|
+
import { conditions } from "../../styles/conditions.stylex";
|
|
12
|
+
import { duration } from "../../styles/motion.stylex";
|
|
13
|
+
import { space } from "../../styles/spacing.stylex";
|
|
14
|
+
import {
|
|
15
|
+
ChartTooltip,
|
|
16
|
+
type ChartTooltipItem,
|
|
17
|
+
} from "../chart-tooltip/chart-tooltip";
|
|
18
|
+
|
|
19
|
+
// Hover for charts drawn without the chart engine: the hovered item stays at
|
|
20
|
+
// full strength while the rest recede, and a tooltip follows the pointer.
|
|
21
|
+
|
|
22
|
+
export interface ChartHoverTip {
|
|
23
|
+
items: readonly ChartTooltipItem[];
|
|
24
|
+
label?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface HoverState {
|
|
28
|
+
flip: boolean;
|
|
29
|
+
id: string;
|
|
30
|
+
tip?: ChartHoverTip;
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const styles = create({
|
|
36
|
+
// The focused item keeps full color while the rest recede, as on engine charts.
|
|
37
|
+
dim: { opacity: 0.3 },
|
|
38
|
+
host: { position: "relative" },
|
|
39
|
+
mark: {
|
|
40
|
+
transitionDuration: {
|
|
41
|
+
[conditions.reducedMotion]: duration.instant,
|
|
42
|
+
default: duration.fast,
|
|
43
|
+
},
|
|
44
|
+
transitionProperty: "opacity",
|
|
45
|
+
},
|
|
46
|
+
tip: (x: number, y: number, flip: boolean) => ({
|
|
47
|
+
insetBlockStart: y,
|
|
48
|
+
insetInlineStart: x,
|
|
49
|
+
pointerEvents: "none",
|
|
50
|
+
position: "absolute",
|
|
51
|
+
transform: flip
|
|
52
|
+
? `translate(calc(-100% - ${space["3"]}), -50%)`
|
|
53
|
+
: `translate(${space["3"]}, -50%)`,
|
|
54
|
+
// Small hosts such as rings must not squeeze the tooltip.
|
|
55
|
+
width: "max-content",
|
|
56
|
+
zIndex: 1,
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function useChartHover() {
|
|
61
|
+
const hostRef = useRef<HTMLDivElement>(null);
|
|
62
|
+
const [hover, setHover] = useState<HoverState | null>(null);
|
|
63
|
+
const [linked, setLinked] = useState<string | null>(null);
|
|
64
|
+
/** Pointer handlers for a mark: hovering shows its tooltip. */
|
|
65
|
+
const markProps = useCallback(
|
|
66
|
+
(id: string, tip?: ChartHoverTip) => ({
|
|
67
|
+
onPointerLeave: () => setHover(null),
|
|
68
|
+
onPointerMove: (event: PointerEvent) => {
|
|
69
|
+
const box = hostRef.current?.getBoundingClientRect();
|
|
70
|
+
if (!box) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const x = event.clientX - box.left;
|
|
74
|
+
setHover({
|
|
75
|
+
flip: x > box.width / 2,
|
|
76
|
+
id,
|
|
77
|
+
tip,
|
|
78
|
+
x,
|
|
79
|
+
y: event.clientY - box.top,
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
}),
|
|
83
|
+
[]
|
|
84
|
+
);
|
|
85
|
+
/** Pointer handlers for a legend tile or row: hovering highlights its mark. */
|
|
86
|
+
const linkProps = useCallback(
|
|
87
|
+
(id: string) => ({
|
|
88
|
+
onPointerEnter: () => setLinked(id),
|
|
89
|
+
onPointerLeave: () => setLinked(null),
|
|
90
|
+
}),
|
|
91
|
+
[]
|
|
92
|
+
);
|
|
93
|
+
const active = hover?.id ?? linked;
|
|
94
|
+
/** StyleX styles for a mark or tile: it recedes while another item is active. */
|
|
95
|
+
const fade = useCallback(
|
|
96
|
+
(id: string) =>
|
|
97
|
+
[styles.mark, active !== null && active !== id && styles.dim] as const,
|
|
98
|
+
[active]
|
|
99
|
+
);
|
|
100
|
+
return {
|
|
101
|
+
active,
|
|
102
|
+
fade,
|
|
103
|
+
hostRef,
|
|
104
|
+
hostStyle: styles.host,
|
|
105
|
+
hover,
|
|
106
|
+
linkProps,
|
|
107
|
+
markProps,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function ChartHoverTooltip({
|
|
112
|
+
hover,
|
|
113
|
+
}: {
|
|
114
|
+
hover: { flip: boolean; tip?: ChartHoverTip; x: number; y: number } | null;
|
|
115
|
+
}) {
|
|
116
|
+
if (!hover?.tip) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
return (
|
|
120
|
+
<div
|
|
121
|
+
aria-hidden="true"
|
|
122
|
+
{...props(styles.tip(hover.x, hover.y, hover.flip))}
|
|
123
|
+
>
|
|
124
|
+
<ChartTooltip items={hover.tip.items} label={hover.tip.label} />
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { create, keyframes, props } from "@stylexjs/stylex";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { colors } from "../../styles/colors.stylex";
|
|
6
|
+
import { conditions } from "../../styles/conditions.stylex";
|
|
7
|
+
import { duration, easing } from "../../styles/motion.stylex";
|
|
8
|
+
import { visuallyHiddenStyles } from "../visually-hidden/visually-hidden.styles";
|
|
9
|
+
|
|
10
|
+
/** Whether a chart's data is still on its way. */
|
|
11
|
+
export type ChartStatus = "loading" | "ready";
|
|
12
|
+
|
|
13
|
+
const pulse = keyframes({
|
|
14
|
+
"0%, 100%": { opacity: 0.45 },
|
|
15
|
+
"50%": { opacity: 1 },
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const wipe = keyframes({
|
|
19
|
+
from: { clipPath: "inset(0 100% 0 0)" },
|
|
20
|
+
to: { clipPath: "inset(0 0 0 0)" },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const wipeRtl = keyframes({
|
|
24
|
+
from: { clipPath: "inset(0 0 0 100%)" },
|
|
25
|
+
to: { clipPath: "inset(0 0 0 0)" },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const fade = keyframes({
|
|
29
|
+
from: { opacity: 0 },
|
|
30
|
+
to: { opacity: 1 },
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const styles = create({
|
|
34
|
+
area: { fill: colors.chartReference, fillOpacity: 0.14 },
|
|
35
|
+
frame: (height: number) => ({ blockSize: height, position: "relative" }),
|
|
36
|
+
grid: { stroke: colors.chartReference, strokeOpacity: 0.35 },
|
|
37
|
+
line: { fill: "none", stroke: colors.chartReference, strokeOpacity: 0.45 },
|
|
38
|
+
silhouette: {
|
|
39
|
+
animationDuration: "1.6s",
|
|
40
|
+
animationIterationCount: "infinite",
|
|
41
|
+
animationName: { [conditions.reducedMotion]: "none", default: pulse },
|
|
42
|
+
animationTimingFunction: easing.easeInOut,
|
|
43
|
+
},
|
|
44
|
+
svg: { blockSize: "100%", display: "block", inlineSize: "100%" },
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** The plot of a chart whose data replaced its loading state wipes in. */
|
|
48
|
+
export const chartRevealStyles = create({
|
|
49
|
+
reveal: {
|
|
50
|
+
animationDuration: {
|
|
51
|
+
[conditions.reducedMotion]: duration.fast,
|
|
52
|
+
default: "700ms",
|
|
53
|
+
},
|
|
54
|
+
animationFillMode: "both",
|
|
55
|
+
animationName: {
|
|
56
|
+
":dir(rtl)": wipeRtl,
|
|
57
|
+
[conditions.reducedMotion]: fade,
|
|
58
|
+
default: wipe,
|
|
59
|
+
},
|
|
60
|
+
animationTimingFunction: easing.expoOut,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* True once data arrives after a loading state, so the plot can reveal. A
|
|
66
|
+
* chart that starts ready shows at once. State updates during render, so no
|
|
67
|
+
* effect is needed.
|
|
68
|
+
*/
|
|
69
|
+
export function useLoadingReveal(status: ChartStatus): boolean {
|
|
70
|
+
const [sawLoading, setSawLoading] = useState(status === "loading");
|
|
71
|
+
if (status === "loading" && !sawLoading) {
|
|
72
|
+
setSawLoading(true);
|
|
73
|
+
}
|
|
74
|
+
return sawLoading && status === "ready";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// A gentle rise across the plot reads as a chart without implying values.
|
|
78
|
+
const LINE = "M0 30 C15 26 25 20 40 22 S65 12 80 14 S95 8 100 9";
|
|
79
|
+
const AREA = `${LINE} L100 40 L0 40 Z`;
|
|
80
|
+
const GRID_ROWS = [4, 16, 28, 40];
|
|
81
|
+
|
|
82
|
+
/** A placeholder at the chart's own height while its data loads. */
|
|
83
|
+
export function ChartLoading({
|
|
84
|
+
grid = true,
|
|
85
|
+
height,
|
|
86
|
+
}: {
|
|
87
|
+
grid?: boolean;
|
|
88
|
+
height: number;
|
|
89
|
+
}) {
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
data-slot="chart-loading"
|
|
93
|
+
role="status"
|
|
94
|
+
{...props(styles.frame(height))}
|
|
95
|
+
>
|
|
96
|
+
<svg
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
focusable="false"
|
|
99
|
+
preserveAspectRatio="none"
|
|
100
|
+
viewBox="0 0 100 40"
|
|
101
|
+
{...props(styles.svg)}
|
|
102
|
+
>
|
|
103
|
+
{grid
|
|
104
|
+
? GRID_ROWS.map((y) => (
|
|
105
|
+
<line
|
|
106
|
+
key={y}
|
|
107
|
+
strokeDasharray="3 3"
|
|
108
|
+
vectorEffect="non-scaling-stroke"
|
|
109
|
+
x1="0"
|
|
110
|
+
x2="100"
|
|
111
|
+
y1={y}
|
|
112
|
+
y2={y}
|
|
113
|
+
{...props(styles.grid)}
|
|
114
|
+
/>
|
|
115
|
+
))
|
|
116
|
+
: null}
|
|
117
|
+
<g {...props(styles.silhouette)}>
|
|
118
|
+
<path d={AREA} {...props(styles.area)} />
|
|
119
|
+
<path
|
|
120
|
+
d={LINE}
|
|
121
|
+
strokeWidth={2}
|
|
122
|
+
vectorEffect="non-scaling-stroke"
|
|
123
|
+
{...props(styles.line)}
|
|
124
|
+
/>
|
|
125
|
+
</g>
|
|
126
|
+
</svg>
|
|
127
|
+
<span {...props(visuallyHiddenStyles.root)}>Loading chart</span>
|
|
128
|
+
</div>
|
|
129
|
+
);
|
|
130
|
+
}
|